aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcreate_4412_emmc_image.sh19
-rwxr-xr-xcreate_4412_sd_image.sh19
2 files changed, 28 insertions, 10 deletions
diff --git a/create_4412_emmc_image.sh b/create_4412_emmc_image.sh
index 5187d6bc85..f821d181f8 100755
--- a/create_4412_emmc_image.sh
+++ b/create_4412_emmc_image.sh
@@ -7,6 +7,15 @@
# published by the Free Software Foundation.
#
####################################
+check_for_file()
+{
+ file="$1"
+ if [ ! -f "${file}" ] ; then
+ echo "Error: ${file} not found"
+ exit 66 # EX_NOINPUT
+ fi
+}
+
if [ -z $1 ]
then
echo "usage: ./create_4412_emmc_image.sh <output file>"
@@ -27,14 +36,14 @@ bl2_pos=$(($fwbl1_pos + $fwbl1_size))
uboot_pos=$(($bl2_pos + $bl2_size))
####################################
-echo "Exynos4412 FWBL1 fusing"
-dd if=./p4412_s_fwbl1.bin of=$1 bs=$block_size seek=$fwbl1_pos
+check_for_file p4412_s_fwbl1.bin
+dd if=p4412_s_fwbl1.bin of=$1 bs=$block_size seek=$fwbl1_pos
####################################
-echo "Exynos4412 BL2 fusing"
+check_for_file spl/midas-spl.bin
dd if=spl/midas-spl.bin of=$1 bs=$block_size seek=$bl2_pos
####################################
-echo "Exynos4412 bootloader fusing"
-dd if=./u-boot.bin of=$1 bs=$block_size seek=$uboot_pos
+check_for_file u-boot.bin
+dd if=u-boot.bin of=$1 bs=$block_size seek=$uboot_pos
####################################
sync
diff --git a/create_4412_sd_image.sh b/create_4412_sd_image.sh
index 226d612a1e..7a1cef4a09 100755
--- a/create_4412_sd_image.sh
+++ b/create_4412_sd_image.sh
@@ -7,6 +7,15 @@
# published by the Free Software Foundation.
#
####################################
+check_for_file()
+{
+ file="$1"
+ if [ ! -f "${file}" ] ; then
+ echo "Error: ${file} not found"
+ exit 66 # EX_NOINPUT
+ fi
+}
+
if [ -z $1 ]
then
echo "usage: ./create_4412_sd_image.sh <output file>"
@@ -30,14 +39,14 @@ bl2_pos=$(($fwbl1_pos + $fwbl1_size))
uboot_pos=$(($bl2_pos + $bl2_size))
####################################
-echo "Exynos4412 FWBL1 fusing"
-dd if=./p4412_s_fwbl1.bin of=$1 bs=$block_size seek=$fwbl1_pos
+check_for_file p4412_s_fwbl1.bin
+dd if=p4412_s_fwbl1.bin of=$1 bs=$block_size seek=$fwbl1_pos
####################################
-echo "Exynos4412 BL2 fusing"
+check_for_file spl/midas-spl.bin
dd if=spl/midas-spl.bin of=$1 bs=$block_size seek=$bl2_pos
####################################
-echo "Exynos4412 bootloader fusing"
-dd if=./u-boot.bin of=$1 bs=$block_size seek=$uboot_pos
+check_for_file u-boot.bin
+dd if=u-boot.bin of=$1 bs=$block_size seek=$uboot_pos
####################################
sync