From 2e92c095def3997eec5b9341c047da7974a65f60 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Tue, 21 Jun 2011 14:52:11 -0500 Subject: [PATCH] boot scripts: generate uImage and uInitrd address based on what board is selected Signed-off-by: Robert Nelson --- mk_mmc.sh | 24 +++++++++++++++++++++ scripts/boot.scr/dvi-normal-maverick.cmd | 2 +- scripts/boot.scr/dvi-normal-natty.cmd | 2 +- scripts/boot.scr/dvi-normal-squeeze.cmd | 2 +- scripts/boot.scr/dvi.cmd | 2 +- scripts/boot.scr/serial-normal-maverick.cmd | 2 +- scripts/boot.scr/serial-normal-natty.cmd | 2 +- scripts/boot.scr/serial-normal-squeeze.cmd | 2 +- scripts/boot.scr/serial.cmd | 2 +- 9 files changed, 32 insertions(+), 8 deletions(-) diff --git a/mk_mmc.sh b/mk_mmc.sh index 5d38e2d..b0320cb 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -157,6 +157,12 @@ fi echo "Using: ${ACTUAL_DEB_FILE}" + #Set uImage boot address + sed -i -e 's:UIMAGE_ADDR:'$UIMAGE_ADDR':g' ${DIR}/scripts/boot.scr/*.cmd + + #Set uInitrd boot address + sed -i -e 's:UINITRD_ADDR:'$UINITRD_ADDR':g' ${DIR}/scripts/boot.scr/*.cmd + if [ "$USB_ROOTFS" ];then sed -i 's/mmcblk0p5/sda1/g' ${DIR}/scripts/boot.scr/dvi-normal-*.cmd sed -i 's/mmcblk0p5/sda1/g' ${DIR}/scripts/boot.scr/serial-normal-*.cmd @@ -731,6 +737,12 @@ echo "done" function reset_scripts { + #Set uInitrd boot address + sed -i -e 's:'$UIMAGE_ADDR':UIMAGE_ADDR:g' ${DIR}/scripts/boot.scr/*.cmd + + #Set uInitrd boot address + sed -i -e 's:'$UINITRD_ADDR':UINITRD_ADDR:g' ${DIR}/scripts/boot.scr/*.cmd + if [ "$USB_ROOTFS" ];then sed -i 's/sda1/mmcblk0p5/g' ${DIR}/scripts/boot.scr/dvi-normal-*.cmd sed -i 's/sda1/mmcblk0p5/g' ${DIR}/scripts/boot.scr/serial-normal-*.cmd @@ -787,6 +799,8 @@ case "$UBOOT_TYPE" in DO_UBOOT=1 HASMLO=1 ABI_VER=1 + UIMAGE_ADDR="0x80300000" + UINITRD_ADDR="0x81600000" ;; beagle) @@ -796,6 +810,8 @@ case "$UBOOT_TYPE" in DO_UBOOT=1 HASMLO=1 ABI_VER=7 + UIMAGE_ADDR="0x80300000" + UINITRD_ADDR="0x81600000" ;; panda) @@ -806,6 +822,8 @@ case "$UBOOT_TYPE" in HASMLO=1 ABI_VER=2 SMSC95XX_MOREMEM=1 + UIMAGE_ADDR="0x80300000" + UINITRD_ADDR="0x81600000" ;; touchbook) @@ -815,6 +833,8 @@ case "$UBOOT_TYPE" in DO_UBOOT=1 HASMLO=1 ABI_VER=5 + UIMAGE_ADDR="0x80300000" + UINITRD_ADDR="0x81600000" BETA_KERNEL=1 SERIAL_MODE=1 @@ -827,6 +847,8 @@ case "$UBOOT_TYPE" in DO_UBOOT=1 HASMLO=1 ABI_VER=6 + UIMAGE_ADDR="0x80300000" + UINITRD_ADDR="0x81600000" #with the crane, we need the beta kernel and serial-more BETA_KERNEL=1 @@ -840,6 +862,8 @@ case "$UBOOT_TYPE" in DO_UBOOT=1 DO_UBOOT_DD=1 ABI_VER=8 + UIMAGE_ADDR="0x70800000" + UINITRD_ADDR="0x72100000" BETA_KERNEL=1 SERIAL_MODE=1 diff --git a/scripts/boot.scr/dvi-normal-maverick.cmd b/scripts/boot.scr/dvi-normal-maverick.cmd index ba4c839..6f4eaa5 100644 --- a/scripts/boot.scr/dvi-normal-maverick.cmd +++ b/scripts/boot.scr/dvi-normal-maverick.cmd @@ -1,7 +1,7 @@ echo "Debug: Maverick DVI" setenv dvimode 1280x720MR-16@60 setenv vram 12MB -setenv bootcmd 'fatload mmc 0:1 0x80300000 uImage; fatload mmc 0:1 0x81600000 uInitrd; bootm 0x80300000 0x81600000' +setenv bootcmd 'fatload mmc 0:1 UIMAGE_ADDR uImage; fatload mmc 0:1 UINITRD_ADDR uInitrd; bootm UIMAGE_ADDR UINITRD_ADDR' setenv bootargs console=ttyO2,115200n8 console=tty0 root=/dev/mmcblk0p5 ro vram=${vram} omapfb.mode=dvi:${dvimode} fixrtc buddy=${buddy} mpurate=${mpurate} boot diff --git a/scripts/boot.scr/dvi-normal-natty.cmd b/scripts/boot.scr/dvi-normal-natty.cmd index 4f27ad5..26a5158 100644 --- a/scripts/boot.scr/dvi-normal-natty.cmd +++ b/scripts/boot.scr/dvi-normal-natty.cmd @@ -1,7 +1,7 @@ echo "Debug: Natty DVI" setenv dvimode 1280x720MR-16@60 setenv vram 12MB -setenv bootcmd 'fatload mmc 0:1 0x80300000 uImage; fatload mmc 0:1 0x81600000 uInitrd; bootm 0x80300000 0x81600000' +setenv bootcmd 'fatload mmc 0:1 UIMAGE_ADDR uImage; fatload mmc 0:1 UINITRD_ADDR uInitrd; bootm UIMAGE_ADDR UINITRD_ADDR' setenv bootargs console=ttyO2,115200n8 console=tty0 root=/dev/mmcblk0p5 ro vram=${vram} omapfb.mode=dvi:${dvimode} fixrtc buddy=${buddy} mpurate=${mpurate} boot diff --git a/scripts/boot.scr/dvi-normal-squeeze.cmd b/scripts/boot.scr/dvi-normal-squeeze.cmd index cd43ccc..58893ea 100644 --- a/scripts/boot.scr/dvi-normal-squeeze.cmd +++ b/scripts/boot.scr/dvi-normal-squeeze.cmd @@ -1,7 +1,7 @@ echo "Debug: Squeeze DVI" setenv dvimode 1280x720MR-16@60 setenv vram 12MB -setenv bootcmd 'fatload mmc 0:1 0x80300000 uImage; fatload mmc 0:1 0x81600000 uInitrd; bootm 0x80300000 0x81600000' +setenv bootcmd 'fatload mmc 0:1 UIMAGE_ADDR uImage; fatload mmc 0:1 UINITRD_ADDR uInitrd; bootm UIMAGE_ADDR UINITRD_ADDR' setenv bootargs console=ttyO2,115200n8 console=tty0 root=/dev/mmcblk0p5 ro vram=${vram} omapfb.mode=dvi:${dvimode} buddy=${buddy} mpurate=${mpurate} boot diff --git a/scripts/boot.scr/dvi.cmd b/scripts/boot.scr/dvi.cmd index 396a810..c5586be 100644 --- a/scripts/boot.scr/dvi.cmd +++ b/scripts/boot.scr/dvi.cmd @@ -1,7 +1,7 @@ echo "Debug: running debian netinstall" setenv dvimode 1280x720MR-16@60 setenv vram 12MB -setenv bootcmd 'fatload mmc 0:1 0x80300000 uImage.net; fatload mmc 0:1 0x81600000 uInitrd.net; bootm 0x80300000 0x81600000' +setenv bootcmd 'fatload mmc 0:1 UIMAGE_ADDR uImage.net; fatload mmc 0:1 UINITRD_ADDR uInitrd.net; bootm UIMAGE_ADDR UINITRD_ADDR' setenv bootargs console=tty0 root=/dev/ram0 rw vram=${vram} omapfb.mode=dvi:${dvimode} buddy=${buddy} mpurate=${mpurate} boot diff --git a/scripts/boot.scr/serial-normal-maverick.cmd b/scripts/boot.scr/serial-normal-maverick.cmd index 962c227..11df429 100644 --- a/scripts/boot.scr/serial-normal-maverick.cmd +++ b/scripts/boot.scr/serial-normal-maverick.cmd @@ -1,5 +1,5 @@ echo "Debug: Maverick Serial" -setenv bootcmd 'fatload mmc 0:1 0x80300000 uImage; fatload mmc 0:1 0x81600000 uInitrd; bootm 0x80300000 0x81600000' +setenv bootcmd 'fatload mmc 0:1 UIMAGE_ADDR uImage; fatload mmc 0:1 UINITRD_ADDR uInitrd; bootm UIMAGE_ADDR UINITRD_ADDR' setenv bootargs console=ttyO2,115200n8 root=/dev/mmcblk0p5 ro fixrtc buddy=${buddy} mpurate=${mpurate} boot diff --git a/scripts/boot.scr/serial-normal-natty.cmd b/scripts/boot.scr/serial-normal-natty.cmd index 5f2c413..6c6f7e0 100644 --- a/scripts/boot.scr/serial-normal-natty.cmd +++ b/scripts/boot.scr/serial-normal-natty.cmd @@ -1,5 +1,5 @@ echo "Debug: Natty Serial" -setenv bootcmd 'fatload mmc 0:1 0x80300000 uImage; fatload mmc 0:1 0x81600000 uInitrd; bootm 0x80300000 0x81600000' +setenv bootcmd 'fatload mmc 0:1 UIMAGE_ADDR uImage; fatload mmc 0:1 UINITRD_ADDR uInitrd; bootm UIMAGE_ADDR UINITRD_ADDR' setenv bootargs console=ttyO2,115200n8 root=/dev/mmcblk0p5 ro fixrtc buddy=${buddy} mpurate=${mpurate} boot diff --git a/scripts/boot.scr/serial-normal-squeeze.cmd b/scripts/boot.scr/serial-normal-squeeze.cmd index 9fbbadc..4f763b9 100644 --- a/scripts/boot.scr/serial-normal-squeeze.cmd +++ b/scripts/boot.scr/serial-normal-squeeze.cmd @@ -1,5 +1,5 @@ echo "Debug: Squeeze Serial" -setenv bootcmd 'fatload mmc 0:1 0x80300000 uImage; fatload mmc 0:1 0x81600000 uInitrd; bootm 0x80300000 0x81600000' +setenv bootcmd 'fatload mmc 0:1 UIMAGE_ADDR uImage; fatload mmc 0:1 UINITRD_ADDR uInitrd; bootm UIMAGE_ADDR UINITRD_ADDR' setenv bootargs console=ttyO2,115200n8 root=/dev/mmcblk0p5 ro buddy=${buddy} mpurate=${mpurate} boot diff --git a/scripts/boot.scr/serial.cmd b/scripts/boot.scr/serial.cmd index 011eadd..057833b 100644 --- a/scripts/boot.scr/serial.cmd +++ b/scripts/boot.scr/serial.cmd @@ -1,5 +1,5 @@ echo "Debug: running debian netinstall" -setenv bootcmd 'fatload mmc 0:1 0x80300000 uImage.net; fatload mmc 0:1 0x81600000 uInitrd.net; bootm 0x80300000 0x81600000' +setenv bootcmd 'fatload mmc 0:1 UIMAGE_ADDR uImage.net; fatload mmc 0:1 UINITRD_ADDR uInitrd.net; bootm UIMAGE_ADDR UINITRD_ADDR' setenv bootargs console=ttyO2,115200n8 root=/dev/ram0 rw buddy=${buddy} mpurate=${mpurate} boot