c6cd9bc400b70a9c547e4fb2eb3c36af616e7374
[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 = "r3"
8
9 # we already build 2.6 kernel using OE infrastructure, and
10 # as we don't know how to build another one into the same image
11 # (especially out-of-tree modules), we just package manually prebuilt one
12 SRC_URI = "http://notaz.gp2x.de/misc/pnd/oe_rootfs_extra_r2.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] = "2370f29cdff0ae2621344dea04fe1d21"
52 SRC_URI[sha256sum] = "d00755889f464426f9cc0b9791716005d9460777ad3c31938d0e562d1f6e9926"