just source SOC.sh to get the values

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
pull/10/merge
Robert Nelson 13 years ago
parent e45e2ec261
commit ba7a48a6d5

@ -10,6 +10,7 @@ else
FINAL_PART=$(cat /mounts | grep /dev/ | grep "/target " | awk '{print $1}')
FINAL_FSTYPE=$(cat /mounts | grep /dev/ | grep "/target " | awk '{print $3}')
fi
mount > /boot/uboot/backup/mount.log
#Cleanup: NetInstall Files
rm -f /boot/uboot/uInitrd.net || true
@ -34,30 +35,23 @@ fi
#Install Correct Kernel Image:
dpkg -x /boot/uboot/linux-image-*_1.0*_arm*.deb /
update-initramfs -c -k `uname -r`
cp /boot/vmlinuz-`uname -r` /boot/uboot/zImage
cp /boot/initrd.img-`uname -r` /boot/uboot/initrd.img
rm -f /boot/uboot/linux-image-*_1.0*_arm*.deb || true
boot_image=$(cat /boot/uboot/SOC.sh | grep boot_image | awk -F"=" '{print $2}')
#Device Tweaks:
source /boot/uboot/SOC.sh
if [ "x${boot_image}" == "xbootm" ] ; then
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/initrd.img-`uname -r` /boot/uboot/uInitrd
load_addr=$(cat /boot/uboot/SOC.sh | grep load_addr | awk -F"=" '{print $2}')
mkimage -A arm -O linux -T kernel -C none -a ${load_addr} -e ${load_addr} -n `uname -r` -d /boot/vmlinuz-`uname -r` /boot/uboot/uImage
fi
cp /boot/vmlinuz-`uname -r` /boot/uboot/zImage
cp /boot/initrd.img-`uname -r` /boot/uboot/initrd.img
rm -f /boot/uboot/linux-image-*_1.0*_arm*.deb || true
serial_tty=$(cat /boot/uboot/SOC.sh | grep serial_tty | awk -F"=" '{print $2}')
if [ "x${serial_tty}" != "x" ] ; then
cat etc/inittab | grep -v '#' | grep ${serial_tty} || echo "T2:23:respawn:/sbin/getty -L ${serial_tty} 115200 vt102" >> /etc/inittab && echo "#" >> /etc/inittab
fi
boot_fstype=$(cat /boot/uboot/SOC.sh | grep boot_fstype | awk -F"=" '{print $2}')
if [ "x${boot_fstype}" == "xext2" ] ; then
echo "/dev/mmcblk0p1 /boot/uboot ext2 defaults 0 2" >> /etc/fstab
else
echo "/dev/mmcblk0p1 /boot/uboot auto defaults 0 0" >> /etc/fstab
fi
#Debug:
mount > /boot/uboot/backup/mount.log

@ -10,6 +10,7 @@ else
FINAL_PART=$(cat /mounts | grep /dev/ | grep "/target " | awk '{print $1}')
FINAL_FSTYPE=$(cat /mounts | grep /dev/ | grep "/target " | awk '{print $3}')
fi
mount > /boot/uboot/backup/mount.log
#Cleanup: NetInstall Files
rm -f /boot/uboot/uInitrd.net || true
@ -76,21 +77,19 @@ apt-get -y autoremove || true
#Install Correct Kernel Image:
dpkg -x /boot/uboot/linux-image-*_1.0*_arm*.deb /
update-initramfs -c -k `uname -r`
cp /boot/vmlinuz-`uname -r` /boot/uboot/zImage
cp /boot/initrd.img-`uname -r` /boot/uboot/initrd.img
rm -f /boot/uboot/linux-image-*_1.0*_arm*.deb || true
boot_image=$(cat /boot/uboot/SOC.sh | grep boot_image | awk -F"=" '{print $2}')
#Device Tweaks:
source /boot/uboot/SOC.sh
if [ "x${boot_image}" == "xbootm" ] ; then
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/initrd.img-`uname -r` /boot/uboot/uInitrd
load_addr=$(cat /boot/uboot/SOC.sh | grep load_addr | awk -F"=" '{print $2}')
mkimage -A arm -O linux -T kernel -C none -a ${load_addr} -e ${load_addr} -n `uname -r` -d /boot/vmlinuz-`uname -r` /boot/uboot/uImage
fi
cp /boot/vmlinuz-`uname -r` /boot/uboot/zImage
cp /boot/initrd.img-`uname -r` /boot/uboot/initrd.img
rm -f /boot/uboot/linux-image-*_1.0*_arm*.deb || true
serial_tty=$(cat /boot/uboot/SOC.sh | grep serial_tty | awk -F"=" '{print $2}')
if [ "x${serial_tty}" != "x" ] ; then
if [ "x${serial_tty}" != "x" ] ; then
cat > /etc/init/${serial_tty}.conf <<-__EOF__
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]
@ -99,15 +98,11 @@ if [ "x${serial_tty}" != "x" ] ; then
exec /sbin/getty 115200 ${serial_tty}
__EOF__
fi
fi
boot_fstype=$(cat /boot/uboot/SOC.sh | grep boot_fstype | awk -F"=" '{print $2}')
if [ "x${boot_fstype}" == "xext2" ] ; then
echo "/dev/mmcblk0p1 /boot/uboot ext2 defaults 0 2" >> /etc/fstab
else
echo "/dev/mmcblk0p1 /boot/uboot auto defaults 0 0" >> /etc/fstab
fi
#Debug:
mount > /boot/uboot/backup/mount.log

Loading…
Cancel
Save