summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/kernel-yocto.bbclass71
-rw-r--r--meta/conf/bitbake.conf2
-rw-r--r--meta/conf/distro/include/poky-default-revisions.inc3
-rw-r--r--meta/conf/machine/mpc8315e-rdb.conf1
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross-canadian.inc3
-rw-r--r--meta/recipes-kernel/dtc/dtc-native_git.bb3
-rw-r--r--meta/recipes-kernel/linux/linux-dtb.inc27
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-stable_git.bb10
-rw-r--r--meta/recipes-kernel/linux/linux-yocto.inc5
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_git.bb4
-rw-r--r--meta/recipes-kernel/linux/linux.inc27
11 files changed, 59 insertions, 97 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 4c52bca43..15802fabd 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -1,61 +1,5 @@
S = "${WORKDIR}/linux"
-# Determine which branch to fetch and build. Not all branches are in the
-# upstream repo (but will be locally created after the fetchers run) so
-# a fallback branch needs to be chosen.
-#
-# The default machine 'UNDEFINED'. If the machine is not set to a specific
-# branch in this recipe or in a recipe extension, then we fallback to a
-# branch that is always present 'standard'. This sets the KBRANCH variable
-# and is used in the SRC_URI. The machine is then set back to ${MACHINE},
-# since futher processing will use that to create local branches
-
-SRCPV_prepend = "${@yoctokernel_variables_fixup(d)}"
-
-def yoctokernel_variables_fixup(d):
- if d.getVar("PVFIXUPDONE", False) is "done":
- return ""
-
- import bb, re, string
-
- version = bb.data.getVar("LINUX_VERSION", d, 1)
- # 2.6.34 signifies the old-style tree, so we need some temporary
- # conditional processing based on the kernel version.
- if version == "2.6.34":
- bb.data.setVar("KBRANCH", "${KMACHINE}-${LINUX_KERNEL_TYPE}", d)
- bb.data.setVar("KMETA", "wrs_meta", d)
- mach = bb.data.getVar("KMACHINE", d, 1)
- if mach == "UNDEFINED":
- bb.data.setVar("KBRANCH", "standard", d)
- bb.data.setVar("KMACHINE", "${MACHINE}", d)
- # track the global configuration on a bootstrapped BSP
- bb.data.setVar("SRCREV_machine", "${SRCREV_meta}", d)
- bb.data.setVar("BOOTSTRAP", bb.data.expand("${MACHINE}",d) + "-standard", d)
- else:
- # The branch for a build is:
- # yocto/<kernel type>/${KMACHINE} or
- # yocto/<kernel type>/${KMACHINE}/base
- mach = bb.data.getVar("KMACHINE_" + bb.data.expand("${MACHINE}",d), d, 1)
- if mach == None:
- mach = bb.data.getVar("KMACHINE", d, 1)
-
- bb.data.setVar("KBRANCH", mach, d)
- bb.data.setVar("KMETA", "meta", d)
-
- # drop the "/base" if it was on the KMACHINE
- kmachine = mach.replace('/base','')
- # drop everything but the last segment
- kmachine = os.path.basename( kmachine )
- # and then write KMACHINE back
- bb.data.setVar('KMACHINE_' + bb.data.expand("${MACHINE}",d), kmachine, d)
-
- if mach == "UNDEFINED":
- bb.data.setVar('KMACHINE_' + bb.data.expand("${MACHINE}",d), bb.data.expand("${MACHINE}",d), d)
- bb.data.setVar("KBRANCH", "yocto/standard/base", d)
- bb.data.setVar("BOOTSTRAP", "yocto/standard/" + bb.data.expand("${MACHINE}",d), d)
- d.setVar("PVFIXUPDONE", "done")
- return ""
-
do_patch() {
cd ${S}
if [ -f ${WORKDIR}/defconfig ]; then
@@ -63,12 +7,11 @@ do_patch() {
fi
kbranch=${KBRANCH}
- if [ -n "${BOOTSTRAP}" ]; then
+ if [ -n "${YOCTO_KERNEL_EXTERNAL_BRANCH}" ]; then
# switch from a generic to a specific branch
- kbranch=${BOOTSTRAP}
+ kbranch=${YOCTO_KERNEL_EXTERNAL_BRANCH}
fi
-
# simply ensures that a branch of the right name has been created
createme ${ARCH} ${kbranch} ${defconfig}
if [ $? -ne 0 ]; then
@@ -131,8 +74,14 @@ addtask kernel_checkout before do_patch after do_unpack
do_kernel_configme() {
echo "[INFO] doing kernel configme"
+ kbranch=${KBRANCH}
+ if [ -n "${YOCTO_KERNEL_EXTERNAL_BRANCH}" ]; then
+ # switch from a generic to a specific branch
+ kbranch=${YOCTO_KERNEL_EXTERNAL_BRANCH}
+ fi
+
cd ${S}
- configme --reconfig --output ${B} ${KBRANCH} ${MACHINE}
+ configme --reconfig --output ${B} ${kbranch} ${MACHINE}
if [ $? -ne 0 ]; then
echo "ERROR. Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}"
exit 1
@@ -165,7 +114,7 @@ do_validate_branches() {
target_meta_head="${SRCREV_meta}"
# nothing to do if bootstrapping
- if [ -n "${BOOTSTRAP}" ]; then
+ if [ -n "${YOCTO_KERNEL_EXTERNAL_BRANCH}" ]; then
return
fi
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 7368097e2..da50fe5c4 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -321,7 +321,7 @@ DEPLOY_DIR_TOOLS = "${DEPLOY_DIR}/tools"
PKGDATA_DIR = "${TMPDIR}/pkgdata/${MULTIMACH_TARGET_SYS}"
-SDK_NAME = "${DISTRO}/${TARGET_ARCH}"
+SDK_NAME = "${DISTRO}-${SDK_ARCH}-${TARGET_ARCH}"
SDKPATH = "/usr/local/${SDK_NAME}"
SDKPATHNATIVE = "${SDKPATH}/sysroots/${SDK_SYS}"
diff --git a/meta/conf/distro/include/poky-default-revisions.inc b/meta/conf/distro/include/poky-default-revisions.inc
index 9abc4a55b..a04fa9e04 100644
--- a/meta/conf/distro/include/poky-default-revisions.inc
+++ b/meta/conf/distro/include/poky-default-revisions.inc
@@ -59,7 +59,7 @@ SRCREV_pn-gypsy ??= "147"
SRCREV_pn-inputproto ??= "7203036522ba9d4b224d282d6afc2d0b947711ee"
SRCREV_pn-inputproto-native ??= "7203036522ba9d4b224d282d6afc2d0b947711ee"
SRCREV_pn-inputproto-nativesdk ??= "7203036522ba9d4b224d282d6afc2d0b947711ee"
-SRCREV_pn-kern-tools-native ??= "fde7ef8fa8043607752563b9b7908f487eb2f7dd"
+SRCREV_pn-kern-tools-native ??= "4f13a46499261ea181fdc13db5459067df08aca7"
SRCREV_pn-libdrm ??= "3f3c5be6f908272199ccf53f108b1124bfe0a00e"
SRCREV_pn-libfakekey ??= "e8c2e412ea4a417afc1f30e32cb7bdc508b1dccc"
SRCREV_pn-libgdbus ??= "aeab6e3c0185b271ca343b439470491b99cc587f"
@@ -110,6 +110,7 @@ SRCREV_machine_pn-linux-yocto_mpc8315e-rdb ?= "68fb0b8d73bbb336ffa4a47bc70ec1eab
SRCREV_machine_pn-linux-yocto_beagleboard ?= "343c06b25b221aa7f7019aee83b2d976041fddce"
SRCREV_machine_pn-linux-yocto ?= "cb4faf3af527e25feee584f39c3956ca0c9448c8"
SRCREV_meta_pn-linux-yocto ?= "5a32d7fe3b817868ebb697d2d883d743903685ae"
+SRCREV_machine_pn-linux-yocto ?= "cb4faf3af527e25feee584f39c3956ca0c9448c8"
SRCREV_pn-linux-libc-headers-yocto ??= "343c06b25b221aa7f7019aee83b2d976041fddce"
SRCREV_pn-matchbox-config-gtk ??= "3ed74dfb7c57be088a5ab36e446c0ccde9fa1028"
SRCREV_pn-matchbox-desktop-sato ??= "76"
diff --git a/meta/conf/machine/mpc8315e-rdb.conf b/meta/conf/machine/mpc8315e-rdb.conf
index ac518fb98..578751c57 100644
--- a/meta/conf/machine/mpc8315e-rdb.conf
+++ b/meta/conf/machine/mpc8315e-rdb.conf
@@ -17,3 +17,4 @@ PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto"
UBOOT_ENTRYPOINT = "0x00000000"
+KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8315erdb.dts"
diff --git a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
index e042ac76b..95e535a1b 100644
--- a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
+++ b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
@@ -6,7 +6,8 @@ BPN = "binutils"
DEPENDS = "flex-native bison-native virtual/${HOST_PREFIX}gcc-crosssdk virtual/libc-nativesdk zlib-nativesdk gettext-nativesdk"
EXTRA_OECONF = "--with-sysroot=${SDKPATH}/sysroots/${TARGET_SYS} \
- --program-prefix=${TARGET_PREFIX}"
+ --program-prefix=${TARGET_PREFIX} \
+ --disable-werror"
do_install () {
autotools_do_install
diff --git a/meta/recipes-kernel/dtc/dtc-native_git.bb b/meta/recipes-kernel/dtc/dtc-native_git.bb
index 2d6f09217..fd5bde576 100644
--- a/meta/recipes-kernel/dtc/dtc-native_git.bb
+++ b/meta/recipes-kernel/dtc/dtc-native_git.bb
@@ -1,2 +1,5 @@
+LIC_FILES_CHKSUM = "file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://libfdt/libfdt.h;beginline=3;endline=52;md5=fb360963151f8ec2d6c06b055bcbb68c"
+
require dtc-native.inc
require dtc_git.inc
diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc
new file mode 100644
index 000000000..0b27d18de
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-dtb.inc
@@ -0,0 +1,27 @@
+# Support for device tree generation
+FILES_kernel_devicetree = "/boot/devicetree*"
+KERNEL_DEVICETREE_FLAGS = "-R 8 -p 0x3000"
+
+python __anonymous () {
+ import bb
+
+ devicetree = bb.data.getVar("KERNEL_DEVICETREE", d, 1) or ''
+ if devicetree:
+ depends = bb.data.getVar("DEPENDS", d, 1)
+ bb.data.setVar("DEPENDS", "%s dtc-native" % depends, d)
+ packages = bb.data.getVar("PACKAGES", d, 1)
+ bb.data.setVar("PACKAGES", "%s kernel-devicetree" % packages, d)
+}
+
+do_install_append() {
+ if test -n "${KERNEL_DEVICETREE}"; then
+ dtc -I dts -O dtb ${KERNEL_DEVICETREE_FLAGS} -o devicetree ${KERNEL_DEVICETREE}
+ install -m 0644 devicetree ${D}/boot/devicetree-${KERNEL_VERSION}
+ install -d ${DEPLOY_DIR_IMAGE}
+ install -m 0644 devicetree ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.dtb
+ cd ${DEPLOY_DIR_IMAGE}
+ rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.dtb
+ ln -sf ${KERNEL_IMAGE_BASE_NAME}.dtb ${KERNEL_IMAGE_SYMLINK_NAME}.dtb
+ fi
+}
+
diff --git a/meta/recipes-kernel/linux/linux-yocto-stable_git.bb b/meta/recipes-kernel/linux/linux-yocto-stable_git.bb
index d4bee77c2..3c1e66973 100644
--- a/meta/recipes-kernel/linux/linux-yocto-stable_git.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-stable_git.bb
@@ -1,6 +1,7 @@
inherit kernel
require linux-yocto.inc
+KMACHINE = "common_pc"
KMACHINE_qemux86 = "common_pc"
KMACHINE_qemux86-64 = "common_pc_64"
KMACHINE_qemuppc = "qemu_ppc32"
@@ -14,20 +15,19 @@ KMACHINE_beagleboard = "beagleboard"
LINUX_VERSION ?= "2.6.34"
LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE_EXTENSION}"
+KMETA = wrs_meta
+KBRANCH = ${KMACHINE}-${LINUX_KERNEL_TYPE_EXTENSION}
+
PR = "r1"
PV = "${LINUX_VERSION}+git${SRCPV}"
SRCREV_FORMAT = "meta_machine"
COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemux86-64|atom-pc|routerstationpro|mpc8315e-rdb|beagleboard)"
-# this performs a fixup on the SRCREV for new/undefined BSPs
+# this performs a fixup on historical kernel types with embedded _'s
python __anonymous () {
import bb, re, string
- rev = bb.data.getVar("SRCREV_machine", d, 1)
- if rev == "standard":
- bb.data.setVar("SRCREV_machine", "${SRCREV_meta}", d)
-
kerntype = string.replace(bb.data.expand("${LINUX_KERNEL_TYPE}", d), "_", "-")
bb.data.setVar("LINUX_KERNEL_TYPE_EXTENSION", kerntype, d)
}
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc
index 3ad849e46..0812144d4 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
# A KMACHINE is the mapping of a yocto $MACHINE to what is built
# by the kernel. This is typically the branch that should be built,
# and it can be specific to the machine or shared
-KMACHINE = "UNDEFINED"
+# KMACHINE = "UNDEFINED"
# Set this to 'preempt_rt' in the local.conf if you want a real time kernel
LINUX_KERNEL_TYPE ?= standard
@@ -18,5 +18,6 @@ addtask kernel_configme before do_configure after do_patch
# Pick up shared functions
inherit kernel-yocto
+require linux-dtb.inc
-B = "${WORKDIR}/linux-${KMACHINE}-${LINUX_KERNEL_TYPE}-build"
+B = "${WORKDIR}/linux-${MACHINE}-${LINUX_KERNEL_TYPE}-build"
diff --git a/meta/recipes-kernel/linux/linux-yocto_git.bb b/meta/recipes-kernel/linux/linux-yocto_git.bb
index cc5239700..75c6fb165 100644
--- a/meta/recipes-kernel/linux/linux-yocto_git.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_git.bb
@@ -1,6 +1,7 @@
inherit kernel
require linux-yocto.inc
+KMACHINE = "yocto/standard/base"
KMACHINE_qemux86 = "yocto/standard/common-pc/base"
KMACHINE_qemux86-64 = "yocto/standard/common-pc-64/base"
KMACHINE_qemuppc = "yocto/standard/qemu-ppc32"
@@ -11,6 +12,9 @@ KMACHINE_routerstationpro = "yocto/standard/routerstationpro"
KMACHINE_mpc8315e-rdb = "yocto/standard/fsl-mpc8315e-rdb"
KMACHINE_beagleboard = "yocto/standard/beagleboard"
+KBRANCH = ${KMACHINE}
+KMETA = meta
+
LINUX_VERSION ?= "2.6.37"
LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
PR = "r15"
diff --git a/meta/recipes-kernel/linux/linux.inc b/meta/recipes-kernel/linux/linux.inc
index 93859bb5a..726d3d690 100644
--- a/meta/recipes-kernel/linux/linux.inc
+++ b/meta/recipes-kernel/linux/linux.inc
@@ -3,6 +3,7 @@ SECTION = "kernel"
LICENSE = "GPL"
inherit kernel
+require linux-dtb.inc
DEPENDS_append_em-x270 = " mtd-utils "
@@ -15,21 +16,6 @@ CMDLINE_at91sam9263ek = "mem=64M console=ttyS0,115200 root=/dev/mmcblk0p1 rootfs
#boot from nfs
#CMDLINE_at91sam9263ek = "mem=64M console=ttyS0,115200 root=301 root=/dev/nfs nfsroot=172.20.3.1:/data/at91 ip=172.20.0.5:::255.255.0.0"
-# Support for device tree generation
-FILES_kernel_devicetree = "/boot/devicetree*"
-KERNEL_DEVICETREE_FLAGS = "-R 8 -p 0x3000"
-
-python __anonymous () {
- import bb
-
- devicetree = bb.data.getVar("KERNEL_DEVICETREE", d, 1) or ''
- if devicetree:
- depends = bb.data.getVar("DEPENDS", d, 1)
- bb.data.setVar("DEPENDS", "%s dtc-native" % depends, d)
- packages = bb.data.getVar("PACKAGES", d, 1)
- bb.data.setVar("PACKAGES", "%s kernel-devicetree" % packages, d)
-}
-
do_configure_prepend() {
echo "" > ${S}/.config
@@ -105,14 +91,3 @@ do_install_prepend() {
fi
}
-do_install_append() {
- if test -n "${KERNEL_DEVICETREE}"; then
- dtc -I dts -O dtb ${KERNEL_DEVICETREE_FLAGS} -o devicetree ${KERNEL_DEVICETREE}
- install -m 0644 devicetree ${D}/boot/devicetree-${KERNEL_VERSION}
- install -d ${DEPLOY_DIR_IMAGE}
- install -m 0644 devicetree ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.dtb
- cd ${DEPLOY_DIR_IMAGE}
- rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.dtb
- ln -sf ${KERNEL_IMAGE_BASE_NAME}.dtb ${KERNEL_IMAGE_SYMLINK_NAME}.dtb
- fi
-}