From 15ca78eb82d77de49661f4ed3da06a5db4132b21 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Thu, 13 Dec 2012 11:25:52 -0600 Subject: [PATCH] ubuntu: first step in recovering from fat16 reformating Signed-off-by: Robert Nelson --- mk_mmc.sh | 30 ++++++++++++++++++++++++++++++ scripts/debian-finish.sh | 6 +++++- scripts/ubuntu-finish.sh | 6 +++++- 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/mk_mmc.sh b/mk_mmc.sh index 9ea30fb..ee7b9c9 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -1050,6 +1050,8 @@ function finish_installing_device { mount -o bind /sys /target/sys cat /proc/mounts > /target/mounts cat /proc/mounts > /target/boot/uboot/backup/proc_mounts + + cp /SOC.sh /target/etc/ chroot /target /bin/bash /etc/finish-install.sh rm -f /target/mounts || true cat /var/log/syslog > /target/boot/uboot/backup/syslog.log @@ -1088,6 +1090,34 @@ function initrd_preseed_settings { sed -i -e 's:d-i console-keymaps-at:#d-i console-keymaps-at:g' ${TEMPDIR}/initrd-tree/preseed.cfg fi + #This should be compatible with hwpacks variable names.. + #https://code.launchpad.net/~linaro-maintainers/linaro-images/ + cat > ${TEMPDIR}/initrd-tree/SOC.sh <<-__EOF__ + #!/bin/sh + format=1.0 + board=${BOOTLOADER} + + bootloader_location=${bootloader_location} + dd_spl_uboot_seek=${dd_spl_uboot_seek} + dd_spl_uboot_bs=${dd_spl_uboot_bs} + dd_uboot_seek=${dd_uboot_seek} + dd_uboot_bs=${dd_uboot_bs} + + boot_image=${boot} + boot_script=${boot_script} + boot_fstype=${boot_fstype} + + serial_tty=${SERIAL} + kernel_addr=${kernel_addr} + initrd_addr=${initrd_addr} + load_addr=${load_addr} + dtb_addr=${dtb_addr} + dtb_file=${dtb_file} + + usbnet_mem=${usbnet_mem} + + __EOF__ + cd "${DIR}"/ } diff --git a/scripts/debian-finish.sh b/scripts/debian-finish.sh index 1a38ce3..94fb8f0 100644 --- a/scripts/debian-finish.sh +++ b/scripts/debian-finish.sh @@ -41,8 +41,12 @@ 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 -#Device Tweaks: +#Device Configuration: +if [ ! -f /boot/uboot/SOC.sh ] ; then + cp /etc/SOC.sh /boot/uboot/SOC.sh +fi 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 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 diff --git a/scripts/ubuntu-finish.sh b/scripts/ubuntu-finish.sh index b51114a..55a07f2 100644 --- a/scripts/ubuntu-finish.sh +++ b/scripts/ubuntu-finish.sh @@ -92,8 +92,12 @@ 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 -#Device Tweaks: +#Device Configuration: +if [ ! -f /boot/uboot/SOC.sh ] ; then + cp /etc/SOC.sh /boot/uboot/SOC.sh +fi 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 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