Merge branch 'org.openembedded.dev' of git://git.openembedded.net/openembedded into...
[vuplus_openembedded] / packages / linux / mnci-ramses_2.4.21-rmk2-pxa1.bb
1 SECTION = "kernel"
2 DESCRIPTION = "Linux kernel for MNCI device"
3 LICENSE = "GPL"
4 DEPENDS = "modutils-cross virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX}"
5 COMPATIBLE_MACHINE = "mnci"
6 KV = "2.4.21"
7 RMKV = "2"
8 PXAV = "1"
9 PR = "r5"
10
11 SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.4/linux-${KV}.tar.bz2 \
12            http://ftp.linux.org.uk/pub/linux/arm/kernel/v2.4/patch-${KV}-rmk${RMKV}.bz2;patch=1 \
13            file://diff-${KV}-rmk${RMKV}-pxa${PXAV}.gz;patch=1 \
14            file://mnci-combined.patch;patch=1"
15
16 S = "${WORKDIR}/linux-${KV}"
17
18 inherit kernel
19
20 KERNEL_CCSUFFIX = "-3.3.4"
21
22 # Put the zImage into kernel-image
23 ALLOW_EMPTY_kernel = "1"
24 FILES_kernel = ""
25 FILES_kernel-image += "/tmp/zImage"
26
27 do_configure_prepend() {
28         install -m 0644 ${S}/arch/arm/def-configs/${MACHINE} ${S}/.config || die "No default configuration for ${MACHINE} available."
29 }
30
31 kernel_do_install() {
32         unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
33         if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
34                 oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install
35         else
36                 oenote "no modules to install"
37         fi
38         install -d ${D}/tmp
39         install -m 0644 ${KERNEL_OUTPUT} ${D}/tmp
40         install -d ${D}/boot
41         install -m 0644 .config ${D}/boot/config-${PV}
42         bzip2 -9 ${D}/boot/*
43         install -d ${D}${sysconfdir}/modutils
44 }
45
46
47 pkg_postinst_kernel-image () {
48 test -f /tmp/zImage || exit 0
49 cp /tmp/zImage /dev/mtdblock/1
50 rm /tmp/zImage
51 sync
52 cat /dev/mtdblock/1 >/dev/null
53 }
54
55 pkg_postinst_kernel () {
56 }
57
58 pkg_postinst_modules () {
59 if [ -n "$D" ]; then
60         ${HOST_PREFIX}depmod-${KERNEL_MAJOR_VERSION} -A -b $D -F $D/boot/System.map-${PV} ${KERNEL_VERSION}
61 else
62         depmod -A
63 fi
64 }
65
66 pkg_postrm_modules () {
67 }
68
69 pkg_postrm_kernel () {
70 }
71