summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-12-14 15:55:03 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-12-14 15:55:03 +0000
commit51497a74361a20b6d1495c45e838969998a5ecba (patch)
tree8699061e48be381f00456f8cec8ee394219f6c77 /meta/classes
parent62ab23e067d603a4a98be1db6de31fd78e983ebc (diff)
downloadpoky-51497a74361a20b6d1495c45e838969998a5ecba.tar.gz
kernel.bbclass: Sync with OE.dev
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/kernel.bbclass26
1 files changed, 22 insertions, 4 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 0907a48fb2..f902b7e9ce 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -43,7 +43,7 @@ KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}
43KERNEL_LD = "${LD}${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}" 43KERNEL_LD = "${LD}${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}"
44 44
45# Where built kernel lies in the kernel tree 45# Where built kernel lies in the kernel tree
46KERNEL_OUTPUT = "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}" 46KERNEL_OUTPUT ?= "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}"
47KERNEL_IMAGEDEST = "boot" 47KERNEL_IMAGEDEST = "boot"
48 48
49# 49#
@@ -63,6 +63,10 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
63UBOOT_ENTRYPOINT ?= "20008000" 63UBOOT_ENTRYPOINT ?= "20008000"
64UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}" 64UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}"
65 65
66# For the kernel, we don't want the '-e MAKEFLAGS=' in EXTRA_OEMAKE.
67# We don't want to override kernel Makefile variables from the environment
68EXTRA_OEMAKE = ""
69
66kernel_do_compile() { 70kernel_do_compile() {
67 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE 71 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
68 oe_runmake include/linux/version.h CC="${KERNEL_CC}" LD="${KERNEL_LD}" 72 oe_runmake include/linux/version.h CC="${KERNEL_CC}" LD="${KERNEL_LD}"
@@ -91,6 +95,7 @@ kernel_do_install() {
91 install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION} 95 install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION}
92 install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION} 96 install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION}
93 install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION} 97 install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION}
98 [ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION}
94 install -d ${D}/etc/modutils 99 install -d ${D}/etc/modutils
95 if [ "${KERNEL_MAJOR_VERSION}" = "2.6" ]; then 100 if [ "${KERNEL_MAJOR_VERSION}" = "2.6" ]; then
96 install -d ${D}/etc/modprobe.d 101 install -d ${D}/etc/modprobe.d
@@ -106,7 +111,20 @@ kernel_do_install() {
106 111
107 mkdir -p $kerneldir/include/$ASMDIR 112 mkdir -p $kerneldir/include/$ASMDIR
108 cp -fR include/$ASMDIR/* $kerneldir/include/$ASMDIR/ 113 cp -fR include/$ASMDIR/* $kerneldir/include/$ASMDIR/
109 rm -f $ASMDIR $kerneldir/include/asm 114 # Kernel 2.6.27 moved headers from includes/asm-${ARCH} to arch/${ARCH}/include/asm
115 if [ -e arch/${ARCH}/include/asm/ ] ; then
116 cp -fR arch/${ARCH}/include/asm/* $kerneldir/include/$ASMDIR/
117 install -d $kerneldir/arch/${ARCH}/include
118 cp -fR arch/${ARCH}/* $kerneldir/arch/${ARCH}/
119
120 # Check for arch/x86 on i386
121 elif [ -d arch/x86/include/asm/ ]; then
122 cp -fR arch/x86/include/asm/* $kerneldir/include/asm-x86/
123 install -d $kerneldir/arch/x86/include
124 cp -fR arch/x86/* $kerneldir/arch/x86/
125 fi
126
127 rm -f $kerneldir/include/asm
110 ln -sf $ASMDIR $kerneldir/include/asm 128 ln -sf $ASMDIR $kerneldir/include/asm
111 129
112 mkdir -p $kerneldir/include/asm-generic 130 mkdir -p $kerneldir/include/asm-generic
@@ -121,7 +139,7 @@ kernel_do_install() {
121 mkdir -p $kerneldir/include/pcmcia 139 mkdir -p $kerneldir/include/pcmcia
122 cp -fR include/pcmcia/* $kerneldir/include/pcmcia/ 140 cp -fR include/pcmcia/* $kerneldir/include/pcmcia/
123 141
124 for entry in drivers/crypto include/media include/acpi include/sound include/video; do 142 for entry in drivers/crypto drivers/media include/media include/acpi include/sound include/video include/scsi include/trace; do
125 if [ -d $entry ]; then 143 if [ -d $entry ]; then
126 mkdir -p $kerneldir/$entry 144 mkdir -p $kerneldir/$entry
127 cp -fR $entry/* $kerneldir/$entry/ 145 cp -fR $entry/* $kerneldir/$entry/
@@ -201,7 +219,7 @@ EXPORT_FUNCTIONS do_compile do_install do_configure
201PACKAGES = "kernel kernel-base kernel-image kernel-dev kernel-vmlinux" 219PACKAGES = "kernel kernel-base kernel-image kernel-dev kernel-vmlinux"
202FILES = "" 220FILES = ""
203FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*" 221FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*"
204FILES_kernel-dev = "/boot/System.map* /boot/config*" 222FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config*"
205FILES_kernel-vmlinux = "/boot/vmlinux*" 223FILES_kernel-vmlinux = "/boot/vmlinux*"
206RDEPENDS_kernel = "kernel-base" 224RDEPENDS_kernel = "kernel-base"
207# Allow machines to override this dependency if kernel image files are 225# Allow machines to override this dependency if kernel image files are