fix: figure out final drive partition and filesystem late in install, obsoletes --usb-rootfs

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
pull/8/head
Robert Nelson 13 years ago
parent 604cf8f096
commit a1baff8393

@ -372,16 +372,19 @@ function boot_files_template {
cat > ${TEMPDIR}/bootscripts/netinstall.cmd <<netinstall_boot_cmd
setenv dvimode VIDEO_TIMING
setenv vram 12MB
setenv mmcroot /dev/ram0 rw
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=SERIAL_CONSOLE VIDEO_CONSOLE root=/dev/ram0 rw VIDEO_RAM VIDEO_DEVICE:VIDEO_MODE fixrtc buddy=\${buddy} buddy2=\${buddy2} mpurate=\${mpurate}
setenv bootargs console=SERIAL_CONSOLE VIDEO_CONSOLE \${mmcroot} VIDEO_RAM VIDEO_DEVICE:VIDEO_MODE fixrtc buddy=\${buddy} buddy2=\${buddy2} mpurate=\${mpurate}
boot
netinstall_boot_cmd
cat > ${TEMPDIR}/bootscripts/boot.cmd <<boot_cmd
setenv dvimode VIDEO_TIMING
setenv vram 12MB
setenv mmcroot FINAL_PART ro
setenv mmcrootfstype FINAL_FSTYPE rootwait fixrtc
setenv bootcmd 'fatload mmc 0:1 UIMAGE_ADDR uImage; fatload mmc 0:1 UINITRD_ADDR uInitrd; bootm UIMAGE_ADDR UINITRD_ADDR'
setenv bootargs console=SERIAL_CONSOLE VIDEO_CONSOLE root=/dev/mmcblk0p5 rootwait ro VIDEO_RAM VIDEO_DEVICE:VIDEO_MODE fixrtc buddy=\${buddy} buddy2=\${buddy2} mpurate=\${mpurate}
setenv bootargs console=SERIAL_CONSOLE VIDEO_CONSOLE \${mmcroot} \${mmcrootfstype} VIDEO_RAM VIDEO_DEVICE:VIDEO_MODE buddy=\${buddy} buddy2=\${buddy2} mpurate=\${mpurate}
boot
boot_cmd
@ -873,7 +876,6 @@ else
echo "-----------------------------"
echo "Normal Boot Script:"
cp -v ${TEMPDIR}/bootscripts/boot.cmd ${TEMPDIR}/disk/boot.cmd
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Boot" -d ${TEMPDIR}/bootscripts/boot.cmd ${TEMPDIR}/disk/normal.scr
cat ${TEMPDIR}/bootscripts/boot.cmd
echo "-----------------------------"
fi

@ -21,8 +21,11 @@ if [ -f "/boot/uboot/use_uenv" ]; then
fi
else
if [ -f "/boot/uboot/boot.scr" ]; then
sed -i -e 's:FINAL_PART:'$FINAL_PART':g' /boot/uboot/boot.cmd
sed -i -e 's:FINAL_FSTYPE:'$FINAL_FSTYPE':g' /boot/uboot/boot.cmd
rm -f /boot/uboot/boot.scr || true
mv /boot/uboot/normal.scr /boot/uboot/boot.scr
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Boot" -d /boot/uboot/boot.cmd /boot/uboot/boot.scr
fi
fi
@ -30,5 +33,3 @@ fi
update-initramfs -c -k `uname -r`
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/initrd.img-`uname -r` /boot/uboot/uInitrd
mkimage -A arm -O linux -T kernel -C none -a ZRELADD -e ZRELADD -n `uname -r` -d /boot/vmlinuz-`uname -r` /boot/uboot/uImage

@ -44,8 +44,11 @@ if [ -f "/boot/uboot/use_uenv" ]; then
fi
else
if [ -f "/boot/uboot/boot.scr" ]; then
sed -i -e 's:FINAL_PART:'$FINAL_PART':g' /boot/uboot/boot.cmd
sed -i -e 's:FINAL_FSTYPE:'$FINAL_FSTYPE':g' /boot/uboot/boot.cmd
rm -f /boot/uboot/boot.scr || true
mv /boot/uboot/normal.scr /boot/uboot/boot.scr
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Boot" -d /boot/uboot/boot.cmd /boot/uboot/boot.scr
fi
fi
@ -60,5 +63,3 @@ apt-get remove -y flash-kernel || true
update-initramfs -c -k `uname -r`
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/initrd.img-`uname -r` /boot/uboot/uInitrd
mkimage -A arm -O linux -T kernel -C none -a ZRELADD -e ZRELADD -n `uname -r` -d /boot/vmlinuz-`uname -r` /boot/uboot/uImage

Loading…
Cancel
Save