mk_mmc.sh: cleanup: drop flash_kernel_base_installer

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
pull/37/head
Robert Nelson 11 years ago
parent 4a965dfe8d
commit 2de7c19bff

@ -667,91 +667,6 @@ initrd_cleanup () {
echo "NetInstall: Final size [`du -ch ${TEMPDIR}/initrd-tree/ | grep total`]" echo "NetInstall: Final size [`du -ch ${TEMPDIR}/initrd-tree/ | grep total`]"
} }
flash_kernel_base_installer () {
#All this crap, is just to make "flash-kernel-installer" happy...
cat > ${TEMPDIR}/initrd-tree/usr/lib/post-base-installer.d/00flash-kernel <<-__EOF__
#!/bin/sh -e
#BusyBox: http://linux.die.net/man/1/busybox
cp /etc/flash-kernel.conf /target/etc/flash-kernel.conf
zcat /proc/config.gz > /target/boot/config-\$(uname -r)
mkdir -p /target/boot/uboot || true
mkdir -p /target/lib/modules/\$(uname -r) || true
#Some devices may have mmc cards in both slots...
unset got_boot_drive
if [ ! \${got_boot_drive} ] ; then
if [ -b /dev/mmcblk0p1 ] ; then
mount /dev/mmcblk0p1 /target/boot/uboot
if [ -f /target/boot/uboot/SOC.sh ] ; then
got_boot_drive=1
else
umount /target/boot/uboot
fi
fi
fi
if [ ! \${got_boot_drive} ] ; then
if [ -b /dev/mmcblk1p1 ] ; then
mount /dev/mmcblk1p1 /target/boot/uboot
if [ -f /target/boot/uboot/SOC.sh ] ; then
got_boot_drive=1
else
umount /target/boot/uboot
fi
fi
fi
if [ \${got_boot_drive} ] ; then
#z = gzip (busybox tar)
tar -xzv -f /target/boot/uboot/\$(uname -r)-modules.tar.gz -C /target/lib/modules/\$(uname -r)
#need by Ubuntu Trusty (flash-kernel)
mkdir -p /lib/firmware/\$(uname -r)/device-tree/
cp /target/boot/uboot/boot/dtbs/current/* /lib/firmware/\$(uname -r)/device-tree/
if [ -f /target/boot/uboot/boot/vmlinuz-current ] ; then
cp /target/boot/uboot/boot/vmlinuz-current /boot/vmlinuz-\$(uname -r)
fi
mount -o bind /sys /target/sys
cat /proc/mounts > /target/mounts
#patch ubuntu's linux-version:
if [ -f /fixes/linux-version ] ; then
chroot /target apt-get update
chroot /target apt-get -y --force-yes install linux-base
mv /target/usr/bin/linux-version /target/usr/bin/linux-version.broken
cp /fixes/linux-version /target/usr/bin/linux-version
fi
echo "00flash-kernel: update-initramfs -c -k \$(uname -r)"
chroot /target update-initramfs -c -k \$(uname -r)
rm -f /target/mounts || true
umount /target/sys
if [ -f /target/boot/uboot/boot/vmlinuz-current ] ; then
cp /target/boot/uboot/boot/vmlinuz-current /target/boot/vmlinuz-
cp /target/boot/uboot/boot/vmlinuz-current /target/boot/vmlinuz-\$(uname -r)
fi
if [ -f /target/boot/initrd.img-\$(uname -r) ] ; then
cp /target/boot/initrd.img-\$(uname -r) /target/boot/initrd.img-
fi
sync
umount /target/boot/uboot
export FLASH_KERNEL_SKIP=true
fi
__EOF__
chmod a+x ${TEMPDIR}/initrd-tree/usr/lib/post-base-installer.d/00flash-kernel
}
neuter_flash_kernel () { neuter_flash_kernel () {
cp -v "${DIR}/lib/flash_kernel/all.db" ${TEMPDIR}/initrd-tree/etc/all.db cp -v "${DIR}/lib/flash_kernel/all.db" ${TEMPDIR}/initrd-tree/etc/all.db

Loading…
Cancel
Save