1f850acd5ea8306c65d1d8b006f06c48738f30e8
[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 = "r19"
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: 7a86414d402959803aae2576377ce1b158bc41ef
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   rm -f ${D}/lib/modules/*/modules.dep*
25 }
26
27 FILES_${PN} = "boot lib"
28
29 pkg_postinst_${PN} () {
30   # this will cause depmod to be run on next boot
31   rm -f /lib/modules/`uname -r`/modules.dep
32   sync
33
34   if ! grep -q '[[:blank:]]/[[:blank:]]*ubifs' /proc/mounts; then
35     for dir in `ls -d /media/*boot* 2> /dev/null` `ls -d /media/*BOOT* 2> /dev/null`; do
36       test -e $dir/uImage && oldkernel=$dir/uImage
37       test -e $dir/uImage-3 && oldkernel=$dir/uImage-3
38     done
39
40     if test -n "$oldkernel"; then
41       cp /boot/uImage-3 $oldkernel
42       msg="Updated kernel has beed copied to ${oldkernel}. \
43 If this location is wrong, copy /boot/uImage-3 to the location \
44 where your kernel is booted from (usually set in boot.txt / autoboot.txt)."
45     else
46       msg="The kernel in /boot/uImage-3 has been updated. You need to \
47 copy it to the location where kernel is booted from (usually set in \
48 boot.txt / autoboot.txt) or the system might not start after reboot."
49     fi
50     sync
51     if test -n "$DISPLAY"; then
52       zenity --info --text "$msg"
53     else
54       echo "=================================="
55       echo "$msg"
56       sleep 5
57     fi
58   fi
59 }
60
61 PACKAGE_STRIP = "no"
62 SRC_URI[md5sum] = "9d5d4438a5df7d300b8ede40896af5d5"
63 SRC_URI[sha256sum] = "d25db14612257d115ce07c05ece3ca006f633171d80c49d0031592e9a46dc231"