From c494e6aae01412cc3a85aa7bf65f8f53f4e8b285 Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Sun, 10 Feb 2013 03:04:30 +0200 Subject: [PATCH 1/1] omap3-pandora-kernel2: first version of recipe hacks as usual --- .../omap3-pandora-kernel2_3.2-pandora.bb | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 recipes/linux/omap3-pandora-kernel2_3.2-pandora.bb diff --git a/recipes/linux/omap3-pandora-kernel2_3.2-pandora.bb b/recipes/linux/omap3-pandora-kernel2_3.2-pandora.bb new file mode 100644 index 0000000..2c84644 --- /dev/null +++ b/recipes/linux/omap3-pandora-kernel2_3.2-pandora.bb @@ -0,0 +1,52 @@ +DESCRIPTION = "3.2 Linux kernel for the Pandora handheld console" +SECTION = "kernel" +LICENSE = "GPLv2" +COMPATIBLE_MACHINE = "omap3-pandora" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +PR = "r0" + +# we already build 2.6 kernel using OE infrastructure, +# as we don't know how to build another one into the same image, +# so just package manually prebuilt one +SRC_URI = "http://notaz.gp2x.de/misc/pnd/oe_rootfs_extra_r0.tar.bz2" + +S = "${WORKDIR}" + +do_install() { + cp -a ${S}/boot ${D}/ + cp -a ${S}/lib ${D}/ +} + +FILES_${PN} = "boot lib" + +pkg_postinst_${PN} () { + if ! grep -q '[[:blank:]]/[[:blank:]]*ubifs' /proc/mounts; then + test -e /media/PANDORABOOT/uImage && oldkernel=/media/PANDORABOOT/uImage + test -e /media/PANDORABOOT/uImage-3 && oldkernel=/media/PANDORABOOT/uImage-3 + test -e /media/BOOT/uImage && oldkernel=/media/BOOT/uImage + test -e /media/BOOT/uImage-3 && oldkernel=/media/BOOT/uImage-3 + + if test -n "$oldkernel"; then + cp /boot/uImage-3 $oldkernel + msg="Updated kernel has beed copied to ${oldkernel}. \ +If this location is wrong, copy /boot/uImage-3 to the location \ +where your kernel is booted from (usually set in boot.txt / autoboot.txt)." + else + msg="The kernel in /boot/uImage-3 has been updated. You need to \ +copy it to the location where kernel is booted from (usually set in \ +boot.txt / autoboot.txt) or the system might not start after reboot." + fi + if test -n "$DISPLAY"; then + zenity --info --text "$msg" + else + echo "==================================" + echo "$msg" + sleep 5 + fi + fi +} + +PACKAGE_STRIP = "no" +SRC_URI[md5sum] = "58493848aed44373ecc503664bb7e0b8" +SRC_URI[sha256sum] = "e924e583c927e1f38e6543527451c3186a8447f83abd44b7f78b63c5278ba484" -- 2.39.2