armbian-build/patch/kernel/odroidc1-default/packaging-odroid.patch
2016-04-23 21:12:11 +02:00

50 lines
1.9 KiB
Diff

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -126,7 +126,7 @@
installed_image_path="boot/vmlinux-$version"
;;
*)
- installed_image_path="boot/vmlinuz-$version"
+ installed_image_path="boot/uImage-$version"
esac
BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)"
@@ -164,12 +164,8 @@
cp System.map "$tmpdir/boot/System.map-$version"
cp $KCONFIG_CONFIG "$tmpdir/boot/config-$version"
fi
-# Not all arches include the boot path in KBUILD_IMAGE
-if [ -e $KBUILD_IMAGE ]; then
- cp $KBUILD_IMAGE "$tmpdir/$installed_image_path"
-else
- cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/$installed_image_path"
-fi
+# odroid c1 need uimage
+cp arch/$ARCH/boot/uImage "$tmpdir/$installed_image_path"
if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
INSTALL_MOD_PATH="$tmpdir" $MAKE KBUILD_SRC= modules_install
@@ -243,10 +239,10 @@
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
-ln -sf $(basename $kernel_tmp_version) /boot/zImage > /dev/null 2>&1 || mv /$kernel_tmp_version /boot/zImage
+ln -sf $(basename $kernel_tmp_version) /boot/uImage > /dev/null 2>&1 || mv /$kernel_tmp_version /boot/uImage
if [ -f "/boot/initrd.img-$version" ]; then
-mkimage -A $UTS_MACHINE -O linux -T ramdisk -C gzip -a 0 -e 0 -n uInitrd -d /boot/initrd.img-$version /boot/uInitrd > /dev/null 2>&1
+mkimage -A $UTS_MACHINE -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/initrd.img-$version /boot/uInitrd > /dev/null 2>&1
rm /boot/initrd.img-$version
fi
@@ -274,7 +270,7 @@
bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
if [ "\$bootfstype" = "vfat" ]; then
-rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/zImage /boot/uImage /boot/*nitrd*
+rm -f /boot/System.map* /boot/config* /boot/uImage* /boot/*nitrd*
fi
}
mountpoint -q /boot && check_and_unmount