LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File uboot-image-setup of Package JeOS (Project openSUSE:12.2:ARM)

#!/bin/bash     

set -x

file=boot/boot.script

echo 'printenv kerneladdr || setenv kerneladdr ${kernel_addr_r}'   >> $file
echo 'printenv ramdiskaddr|| setenv ramdiskaddr ${ramdisk_addr_r}' >> $file
# CuBox Hack   
echo 'if itest 1$arcNumber == 13905; then'                         >> $file
echo '  setenv kerneladdr 0x2000000'                               >> $file
echo '  setenv ramdiskaddr 0x3000000'                              >> $file
echo 'fi'                                                          >> $file
echo -n 'setenv bootcmd "'                                         >> $file
echo -n 'ext2load mmc 0:1 ${kerneladdr} boot/linux.vmx; '          >> $file
echo -n 'ext2load mmc 0:1 ${ramdiskaddr} boot/initrd.uboot; '      >> $file
echo 'bootm ${kerneladdr} ${ramdiskaddr}";'                        >> $file
echo 'boot'                                                        >> $file

#==========================================
# Create machine readable uboot format
#------------------------------------------
mkopts="-A arm -O linux -a 0 -e 0 -T script -C none";
inputf="boot/boot.script";
result="boot/boot.scr";
if ! mkimage $mkopts -n 'Boot-Script' -d $inputf $result;then
	echo "Failed to create uboot script image"
	exit 1
fi