build/patch/kernel/mvebu64-dev/zImage_to_Image.patch

50 lines
1.9 KiB
Diff

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 0f8de20..3a39d73 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -251,7 +251,7 @@ done
##
sed -e "s/set -e//g" -i $tmpdir/DEBIAN/postinst
sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/postinst
-cat >> $tmpdir/DEBIAN/postinst <<EOT
+cat >> $tmpdir/DEBIAN/postinst <<EOT
if [ "\$(grep nand /proc/partitions)" != "" ] && [ "\$(grep mmc /proc/partitions)" = "" ]; then
mkimage -A arm -O linux -T kernel -C none -a "0x40008000" -e "0x40008000" -n "Linux kernel" -d /$installed_image_path /boot/uImage > /dev/null 2>&1
cp /boot/uImage /tmp/uImage
@@ -260,7 +260,7 @@ mountpoint -q /boot || mount /boot
cp /tmp/uImage /boot/uImage
rm -f /$installed_image_path
else
-ln -sf $(basename $installed_image_path) /boot/zImage > /dev/null 2>&1 || mv /$installed_image_path /boot/zImage
+ln -sf $(basename $installed_image_path) /boot/Image > /dev/null 2>&1 || mv /$installed_image_path /boot/Image
fi
touch /boot/.next
exit 0
@@ -270,7 +270,7 @@ EOT
##
sed -e "s/set -e//g" -i $tmpdir/DEBIAN/preinst
sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/preinst
-cat >> $tmpdir/DEBIAN/preinst <<EOT
+cat >> $tmpdir/DEBIAN/preinst <<EOT
# exit if we are running chroot
if [ "\$(stat -c %d:%i /)" != "\$(stat -c %d:%i /proc/1/root/.)" ]; then exit 0; fi
@@ -286,14 +286,14 @@ for file in /dev/* ; do
done
bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
-if [ "\$bootfstype" = "vfat" ]; then
-umount /boot;
-rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage
+if [ "\$bootfstype" = "vfat" ]; then
+umount /boot;
+rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/Image /boot/uImage
fi
}
mountpoint -q /boot && check_and_unmount
EOT
-echo "exit 0" >> $tmpdir/DEBIAN/preinst
+echo "exit 0" >> $tmpdir/DEBIAN/preinst
# Try to determine maintainer and email values
if [ -n "$DEBEMAIL" ]; then