omap3-pandora-kernel2: first version of recipe
[openpandora.oe.git] / recipes / linux / omap3-pandora-kernel2_3.2-pandora.bb
1 DESCRIPTION = "3.2 Linux kernel for the Pandora handheld console"
2 SECTION = "kernel"
3 LICENSE = "GPLv2"
4 COMPATIBLE_MACHINE = "omap3-pandora"
5 PACKAGE_ARCH = "${MACHINE_ARCH}"
6
7 PR = "r0"
8
9 # we already build 2.6 kernel using OE infrastructure,
10 # as we don't know how to build another one into the same image,
11 # so just package manually prebuilt one
12 SRC_URI = "http://notaz.gp2x.de/misc/pnd/oe_rootfs_extra_r0.tar.bz2"
13
14 S = "${WORKDIR}"
15
16 do_install() {
17   cp -a ${S}/boot ${D}/
18   cp -a ${S}/lib ${D}/
19 }
20
21 FILES_${PN} = "boot lib"
22
23 pkg_postinst_${PN} () {
24   if ! grep -q '[[:blank:]]/[[:blank:]]*ubifs' /proc/mounts; then
25     test -e /media/PANDORABOOT/uImage && oldkernel=/media/PANDORABOOT/uImage
26     test -e /media/PANDORABOOT/uImage-3 && oldkernel=/media/PANDORABOOT/uImage-3
27     test -e /media/BOOT/uImage && oldkernel=/media/BOOT/uImage
28     test -e /media/BOOT/uImage-3 && oldkernel=/media/BOOT/uImage-3
29
30     if test -n "$oldkernel"; then
31       cp /boot/uImage-3 $oldkernel
32       msg="Updated kernel has beed copied to ${oldkernel}. \
33 If this location is wrong, copy /boot/uImage-3 to the location \
34 where your kernel is booted from (usually set in boot.txt / autoboot.txt)."
35     else
36       msg="The kernel in /boot/uImage-3 has been updated. You need to \
37 copy it to the location where kernel is booted from (usually set in \
38 boot.txt / autoboot.txt) or the system might not start after reboot."
39     fi
40     if test -n "$DISPLAY"; then
41       zenity --info --text "$msg"
42     else
43       echo "=================================="
44       echo "$msg"
45       sleep 5
46     fi
47   fi
48 }
49
50 PACKAGE_STRIP = "no"
51 SRC_URI[md5sum] = "58493848aed44373ecc503664bb7e0b8"
52 SRC_URI[sha256sum] = "e924e583c927e1f38e6543527451c3186a8447f83abd44b7f78b63c5278ba484"