]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel: create base recipe for Wind River Linux kernel building
authorBruce Ashfield <bruce.ashfield@windriver.com>
Fri, 18 Jun 2010 05:09:42 +0000 (01:09 -0400)
committerBruce Ashfield <bruce.ashfield@windriver.com>
Mon, 19 Jul 2010 15:59:51 +0000 (11:59 -0400)
This base recipe implements support for building a git based
Wind River Linux kernel repository.

There are several restrictions in this first import:

  - no patching (needs guilt)
  - missing Wind River features (config audit, etc)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
meta/conf/distro/include/poky-default-revisions.inc
meta/packages/linux/linux-wrs_git.bb [new file with mode: 0644]

index a65e5876d74d8bed65d93cb00859f0311cd2bcf0..9e651d90e895d930aa27863a815734aaca4c31d6 100644 (file)
@@ -68,6 +68,10 @@ SRCREV_pn-libxext-nativesdk ??= "d1f3bc77a48c8e42771579e3fdf3370b35d3209d"
 SRCREV_pn-libxi ??= "d0326fe8cdbb08d4f52d79fd3fd4e1b2a0951d5e"
 SRCREV_pn-linux-openmoko ??= "5ccaca2adb1c37b5955a4733f68ae08a755e3d78"
 SRCREV_pn-linux-omap3-pm ??= "totallybroken"
+SRCREV_pn-linux-wrs_qemuarm ??= "426480c5062f8e3af7fe6fad507de09c8f1444e0
+SRCREV_pn-linux-wrs_qemumips ??= "77cd56e5642c094c1849ed1669b3b6a0a087087a"
+SRCREV_pn-linux-wrs_qemuppc ??= "cf03da29f5fa62bbaffa44501a40e297d5794706"
+SRCREV_pn-linux-wrs_qemux86 ??= "b6327f69b5aed1aa10d0c7ff10b2763379ef2ed"
 SRCREV_pn-linux-libc-headers-wrs ??= "63a07cb64ccc3ceae619d3298545d602ab5ecd38"
 SRCREV_pn-matchbox-config-gtk ??= "2081"
 SRCREV_pn-matchbox-desktop-sato ??= "76"
diff --git a/meta/packages/linux/linux-wrs_git.bb b/meta/packages/linux/linux-wrs_git.bb
new file mode 100644 (file)
index 0000000..a4bdcab
--- /dev/null
@@ -0,0 +1,82 @@
+DESCRIPTION = "Wind River Kernel"
+SECTION = "kernel"
+LICENSE = "GPL"
+
+# Set this to 'preempt_rt' in the local.conf if you want a real time kernel
+LINUX_KERNEL_TYPE ?= standard
+DEPENDS = "kern-tools-native"
+PV = "2.6.34+git${SRCPV}"
+
+# To use a staged, on-disk bare clone of a Wind River Kernel, use a 
+# variant of the below
+# SRC_URI = "git://///path/to/kernel/default_kernel.git;fullclone=1"
+SRC_URI = "git://git.pokylinux.org/linux-2.6-windriver.git;protocol=git;fullclone=1;branch=${WRMACHINE}-${LINUX_KERNEL_TYPE}"
+
+
+WRMACHINE = "${MACHINE}
+WRMACHINE_qemux86  = "common_pc"
+WRMACHINE_qemuppc  = "qemu_ppc32"
+WRMACHINE_qemumips = "mti_malta32_be"
+WRMACHINE_qemuarm  = "arm_versatile_926ejs"
+
+LINUX_VERSION=v2.6.34
+LINUX_VERSION_EXTENSION="-wr-${LINUX_KERNEL_TYPE}"
+PR = r1
+PV = "2.6.34+${PR}+git${SRCREV}"
+
+S = "${WORKDIR}/linux"
+B = "${WORKDIR}/linux-${WRMACHINE}-${LINUX_KERNEL_TYPE}-build"
+
+do_patch() {
+    echo "[INFO] Patching is currently not supported"
+}
+
+do_wrlinux_checkout() {
+       if [ -d ${WORKDIR}/.git/refs/remotes/origin ]; then
+               echo "Fixing up git directory for ${WRMACHINE}-${LINUX_KERNEL_TYPE}"
+               rm -rf ${S}
+               mkdir ${S}
+               mv ${WORKDIR}/.git ${S}
+               mv ${S}/.git/refs/remotes/origin/* ${S}/.git/refs/heads
+               rmdir ${S}/.git/refs/remotes/origin
+       fi
+       cd ${S}
+       git checkout -f ${WRMACHINE}-${LINUX_KERNEL_TYPE}
+}
+
+addtask wrlinux_checkout before do_patch after do_unpack
+
+do_wrlinux_configme() {
+       echo "Doing wrlinux configme"
+       rm -rf ${B}
+       cd ${S}
+       configme
+       echo "# CONFIG_WRNOTE is not set" >> ${B}/.config
+       echo "# Global settings from linux recipe" >> ${B}/.config
+       echo "CONFIG_LOCALVERSION="\"${LINUX_VERSION_EXTENSION}\" >> ${B}/.config
+}
+
+do_wrlinux_configcheck() {
+       echo "[INFO] validating kernel configuration"
+       cd ${B}/..
+       kconf_check ${B}/.config ${B} ${S} ${B} ${LINUX_VERSION} ${WRMACHINE}-${LINUX_KERNEL_TYPE}
+}
+
+do_wrlinux_link_vmlinux() {
+        if [ -n "${KERNEL_IMAGETYPE_LINK}" ]; then
+               cd ${B}/arch/${ARCH}/boot
+               ln -sf ../../../${KERNEL_IMAGETYPE_LINK}
+        fi
+}
+
+do_wrlinux_configme[depends] = "kern-tools-native:do_populate_sysroot"
+addtask wrlinux_configme before do_configure after do_patch
+addtask wrlinux_link_vmlinux after do_compile before do_install
+
+# XXX 
+#addtask wrlinux_configcheck after do_configure before do_compile
+
+inherit kernel
+
+# object files are in B, not S, so we need to override this
+do_deploy[dirs] = "${B}"