summaryrefslogtreecommitdiff
path: root/openembedded/classes/kernel.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-02-10 11:38:23 +0000
committerRichard Purdie <richard@openedhand.com>2006-02-10 11:38:23 +0000
commit31116d6c7e368c42bcfdf2dba2000b2203f08e85 (patch)
tree9737ea7c974da46ca2a9ee4acad8aabb9cbb2bac /openembedded/classes/kernel.bbclass
parent9df0203e2b27ef3ae28b60447df6b91be7be81dc (diff)
downloadopenembedded-core-31116d6c7e368c42bcfdf2dba2000b2203f08e85.tar.gz
openembedded-core-31116d6c7e368c42bcfdf2dba2000b2203f08e85.tar.bz2
openembedded-core-31116d6c7e368c42bcfdf2dba2000b2203f08e85.tar.xz
openembedded-core-31116d6c7e368c42bcfdf2dba2000b2203f08e85.zip
Update bbclasses from OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@266 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/classes/kernel.bbclass')
-rw-r--r--openembedded/classes/kernel.bbclass23
1 files changed, 20 insertions, 3 deletions
diff --git a/openembedded/classes/kernel.bbclass b/openembedded/classes/kernel.bbclass
index 8416b8acb..bbe047a2f 100644
--- a/openembedded/classes/kernel.bbclass
+++ b/openembedded/classes/kernel.bbclass
@@ -5,6 +5,9 @@ DEPENDS += "virtual/${TARGET_PREFIX}depmod-${@get_kernelmajorversion('${PV}')} v
inherit kernel-arch
+PACKAGES_DYNAMIC += "kernel-module-*"
+PACKAGES_DYNAMIC += "kernel-image-*"
+
export OS = "${TARGET_OS}"
export CROSS_COMPILE = "${TARGET_PREFIX}"
KERNEL_IMAGETYPE = "zImage"
@@ -21,8 +24,16 @@ KERNEL_RELEASE ?= "${PV}${KERNEL_LOCALVERSION}"
KERNEL_CCSUFFIX ?= ""
KERNEL_LDSUFFIX ?= ""
-KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX}"
-KERNEL_LD = "${LD}${KERNEL_LDSUFFIX}"
+# Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture
+# specific options necessary for building the kernel and modules.
+#FIXME: should be this: TARGET_CC_KERNEL_ARCH ?= "${TARGET_CC_ARCH}"
+TARGET_CC_KERNEL_ARCH ?= ""
+HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}"
+TARGET_LD_KERNEL_ARCH ?= ""
+HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
+
+KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}"
+KERNEL_LD = "${LD}${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}"
KERNEL_OUTPUT = "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}"
KERNEL_IMAGEDEST = "boot"
@@ -83,6 +94,7 @@ kernel_do_stage() {
mkdir -p ${STAGING_KERNEL_DIR}/include/$ASMDIR
cp -fR include/$ASMDIR/* ${STAGING_KERNEL_DIR}/include/$ASMDIR/
+ rm -f $ASMDIR ${STAGING_KERNEL_DIR}/include/asm
ln -sf $ASMDIR ${STAGING_KERNEL_DIR}/include/asm
mkdir -p ${STAGING_KERNEL_DIR}/include/asm-generic
@@ -97,6 +109,11 @@ kernel_do_stage() {
mkdir -p ${STAGING_KERNEL_DIR}/include/pcmcia
cp -fR include/pcmcia/* ${STAGING_KERNEL_DIR}/include/pcmcia/
+ if [ -d include/sound ]; then
+ mkdir -p ${STAGING_KERNEL_DIR}/include/sound
+ cp -fR include/sound/* ${STAGING_KERNEL_DIR}/include/sound/
+ fi
+
if [ -d drivers/sound ]; then
# 2.4 alsa needs some headers from this directory
mkdir -p ${STAGING_KERNEL_DIR}/include/drivers/sound
@@ -133,7 +150,7 @@ kernel_do_install() {
else
oenote "no modules to install"
fi
-
+
install -d ${D}/${KERNEL_IMAGEDEST}
install -d ${D}/boot
install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_RELEASE}