omap3-pandora-kernel2: update
[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 = "r11"
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 # git://git.openpandora.org/pandora-kernel.git , branch pandora-3.2
13 # commit: f5522a07aa12c9d4cb9e55c80fac16dd37b04ae7
14 # out-of-tree modules are built from:
15 # http://git.openpandora.org/cgi-bin/gitweb.cgi?p=sgx.git
16 # http://notaz.gp2x.de/misc/pnd/oe_rootfs_extra_modules.tar.bz2
17 SRC_URI = "http://notaz.gp2x.de/misc/pnd/oe_rootfs_extra_${PR}.tar.bz2"
18
19 S = "${WORKDIR}"
20
21 do_install() {
22   cp -a ${S}/boot ${D}/
23   cp -a ${S}/lib ${D}/
24 }
25
26 FILES_${PN} = "boot lib"
27
28 pkg_postinst_${PN} () {
29   # this will cause depmod to be run on next boot
30   rm -f /lib/modules/`uname -r`/modules.dep
31   sync
32
33   if ! grep -q '[[:blank:]]/[[:blank:]]*ubifs' /proc/mounts; then
34     test -e /media/PANDORABOOT/uImage && oldkernel=/media/PANDORABOOT/uImage
35     test -e /media/PANDORABOOT/uImage-3 && oldkernel=/media/PANDORABOOT/uImage-3
36     test -e /media/BOOT/uImage && oldkernel=/media/BOOT/uImage
37     test -e /media/BOOT/uImage-3 && oldkernel=/media/BOOT/uImage-3
38
39     if test -n "$oldkernel"; then
40       cp /boot/uImage-3 $oldkernel
41       msg="Updated kernel has beed copied to ${oldkernel}. \
42 If this location is wrong, copy /boot/uImage-3 to the location \
43 where your kernel is booted from (usually set in boot.txt / autoboot.txt)."
44     else
45       msg="The kernel in /boot/uImage-3 has been updated. You need to \
46 copy it to the location where kernel is booted from (usually set in \
47 boot.txt / autoboot.txt) or the system might not start after reboot."
48     fi
49     sync
50     if test -n "$DISPLAY"; then
51       zenity --info --text "$msg"
52     else
53       echo "=================================="
54       echo "$msg"
55       sleep 5
56     fi
57   fi
58 }
59
60 PACKAGE_STRIP = "no"
61 SRC_URI[md5sum] = "b97b7007b74c8738d71859a670d8f408"
62 SRC_URI[sha256sum] = "a3fb2ecb3ad452c70b195775aeeedd3c73b71c286e90b1cdba068496ecf93f52"