# # Copyright (C) 2010 Samsung Electronics Co., Ltd. # http://www.samsung.com/ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # 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 " exit 0 fi block_size=512 #sizes are multiplied by block_size #8kB fwbl1_size=16 #16kB bl2_size=32 #1024kB uboot_size=2048 fwbl1_pos=0 bl2_pos=$(($fwbl1_pos + $fwbl1_size)) uboot_pos=$(($bl2_pos + $bl2_size)) #################################### check_for_file p4412_s_fwbl1.bin dd if=p4412_s_fwbl1.bin of=$1 bs=$block_size seek=$fwbl1_pos #################################### check_for_file spl/midas-spl.bin dd if=spl/midas-spl.bin of=$1 bs=$block_size seek=$bl2_pos #################################### check_for_file u-boot.bin dd if=u-boot.bin of=$1 bs=$block_size seek=$uboot_pos #################################### sync # echo "$1 - Exynos4412 U-Boot EMMC boot image is ready."