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