From 67b1483a3d0cf93e62a10e332afafed61f7f74a7 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Tue, 19 Jun 2012 12:57:07 -0500 Subject: [PATCH] script: use kernel_addr directly, bypass sed call Signed-off-by: Robert Nelson --- mk_mmc.sh | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/mk_mmc.sh b/mk_mmc.sh index 9ab6927..cf6075d 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -407,26 +407,26 @@ function boot_uenv_txt_template { if [ ! "${USE_ZIMAGE}" ] ; then cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__ - bootfile=uImage.net + kernel_file=uImage.net bootinitrd=uInitrd.net boot=bootm __EOF__ cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__ - bootfile=uImage + kernel_file=uImage bootinitrd=uInitrd boot=bootm __EOF__ else cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__ - bootfile=zImage.net + kernel_file=zImage.net bootinitrd=initrd.net boot=bootz __EOF__ cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__ - bootfile=zImage + kernel_file=zImage bootinitrd=initrd.img boot=bootz @@ -434,14 +434,14 @@ function boot_uenv_txt_template { fi cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__ - address_image=kernel_addr + kernel_addr=${kernel_addr} address_initrd=initrd_addr console=DICONSOLE mmcroot=/dev/ram0 rw - xyz_load_image=fatload mmc 0:1 \${address_image} \${bootfile} + xyz_load_image=fatload mmc 0:1 \${kernel_addr} \${kernel_file} xyz_load_initrd=fatload mmc 0:1 \${address_initrd} \${bootinitrd} xyz_mmcboot=run xyz_load_image; run xyz_load_initrd; echo Booting from mmc ... @@ -451,7 +451,7 @@ function boot_uenv_txt_template { __EOF__ cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__ - address_image=kernel_addr + kernel_addr=${kernel_addr} address_initrd=initrd_addr console=SERIAL_CONSOLE @@ -459,7 +459,7 @@ function boot_uenv_txt_template { mmcroot=FINAL_PART ro mmcrootfstype=FINAL_FSTYPE rootwait fixrtc - xyz_load_image=fatload mmc 0:1 \${address_image} \${bootfile} + xyz_load_image=fatload mmc 0:1 \${kernel_addr} \${kernel_file} xyz_load_initrd=fatload mmc 0:1 \${address_initrd} \${bootinitrd} xyz_mmcboot=run xyz_load_image; run xyz_load_initrd; echo Booting from mmc ... @@ -472,70 +472,70 @@ function boot_uenv_txt_template { beagle_bx|beagle_cx) cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__ deviceargs=setenv device_args mpurate=\${mpurate} buddy=\${buddy} buddy2=\${buddy2} musb_hdrc.fifo_mode=5 - loaduimage=run xyz_mmcboot; run deviceargs; run mmcargs; \${boot} \${address_image} \${address_initrd}:\${filesize} + loaduimage=run xyz_mmcboot; run deviceargs; run mmcargs; \${boot} \${kernel_addr} \${address_initrd}:\${filesize} __EOF__ cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__ optargs=VIDEO_CONSOLE deviceargs=setenv device_args mpurate=\${mpurate} buddy=\${buddy} buddy2=\${buddy2} musb_hdrc.fifo_mode=5 - loaduimage=run xyz_mmcboot; run deviceargs; run mmcargs; \${boot} \${address_image} \${address_initrd}:\${filesize} + loaduimage=run xyz_mmcboot; run deviceargs; run mmcargs; \${boot} \${kernel_addr} \${address_initrd}:\${filesize} __EOF__ ;; beagle_xm) cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__ deviceargs=setenv device_args mpurate=\${mpurate} buddy=\${buddy} buddy2=\${buddy2} - loaduimage=run xyz_mmcboot; run deviceargs; run mmcargs; \${boot} \${address_image} \${address_initrd}:\${filesize} + loaduimage=run xyz_mmcboot; run deviceargs; run mmcargs; \${boot} \${kernel_addr} \${address_initrd}:\${filesize} __EOF__ cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__ optargs=VIDEO_CONSOLE deviceargs=setenv device_args mpurate=\${mpurate} buddy=\${buddy} buddy2=\${buddy2} - loaduimage=run xyz_mmcboot; run deviceargs; run mmcargs; \${boot} \${address_image} \${address_initrd}:\${filesize} + loaduimage=run xyz_mmcboot; run deviceargs; run mmcargs; \${boot} \${kernel_addr} \${address_initrd}:\${filesize} __EOF__ ;; crane|igepv2|mx51evk|mx53loco|panda|panda_es) cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__ deviceargs=setenv device_args - loaduimage=run xyz_mmcboot; run deviceargs; run mmcargs; \${boot} \${address_image} \${address_initrd}:\${filesize} + loaduimage=run xyz_mmcboot; run deviceargs; run mmcargs; \${boot} \${kernel_addr} \${address_initrd}:\${filesize} __EOF__ cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__ optargs=VIDEO_CONSOLE deviceargs=setenv device_args - loaduimage=run xyz_mmcboot; run deviceargs; run mmcargs; \${boot} \${address_image} \${address_initrd}:\${filesize} + loaduimage=run xyz_mmcboot; run deviceargs; run mmcargs; \${boot} \${kernel_addr} \${address_initrd}:\${filesize} __EOF__ ;; bone) cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__ deviceargs=setenv device_args ip=\${ip_method} - mmc_load_uimage=run xyz_mmcboot; run bootargs_defaults; run deviceargs; run mmcargs; \${boot} \${address_image} \${address_initrd} + mmc_load_uimage=run xyz_mmcboot; run bootargs_defaults; run deviceargs; run mmcargs; \${boot} \${kernel_addr} \${address_initrd} __EOF__ cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__ deviceargs=setenv device_args ip=\${ip_method} - mmc_load_uimage=run xyz_mmcboot; run bootargs_defaults; run deviceargs; run mmcargs; \${boot} \${address_image} \${address_initrd} + mmc_load_uimage=run xyz_mmcboot; run bootargs_defaults; run deviceargs; run mmcargs; \${boot} \${kernel_addr} \${address_initrd} __EOF__ ;; bone_zimage) cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__ deviceargs=setenv device_args ip=\${ip_method} - mmc_load_uimage=run xyz_mmcboot; run bootargs_defaults; run deviceargs; run mmcargs; \${boot} \${address_image} \${address_initrd}:\${filesize} - loaduimage=run xyz_mmcboot; run deviceargs; run mmcargs; \${boot} \${address_image} \${address_initrd}:\${filesize} + mmc_load_uimage=run xyz_mmcboot; run bootargs_defaults; run deviceargs; run mmcargs; \${boot} \${kernel_addr} \${address_initrd}:\${filesize} + loaduimage=run xyz_mmcboot; run deviceargs; run mmcargs; \${boot} \${kernel_addr} \${address_initrd}:\${filesize} __EOF__ cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__ deviceargs=setenv device_args ip=\${ip_method} - mmc_load_uimage=run xyz_mmcboot; run bootargs_defaults; run deviceargs; run mmcargs; \${boot} \${address_image} \${address_initrd}:\${filesize} - loaduimage=run xyz_mmcboot; run deviceargs; run mmcargs; \${boot} \${address_image} \${address_initrd}:\${filesize} + mmc_load_uimage=run xyz_mmcboot; run bootargs_defaults; run deviceargs; run mmcargs; \${boot} \${kernel_addr} \${address_initrd}:\${filesize} + loaduimage=run xyz_mmcboot; run deviceargs; run mmcargs; \${boot} \${kernel_addr} \${address_initrd}:\${filesize} __EOF__ @@ -575,9 +575,6 @@ function tweak_boot_scripts { ALL="*.cmd" NET="netinstall.cmd" FINAL="normal.cmd" - #Set kernel boot address - sed -i -e 's:kernel_addr:'$kernel_addr':g' ${TEMPDIR}/bootscripts/${ALL} - #Set initrd boot address sed -i -e 's:initrd_addr:'$initrd_addr':g' ${TEMPDIR}/bootscripts/${ALL}