Skip to contentSkip to conversation

linux-yocto: build fixes and BSP support

PATCH New Bruce Ashfield 1 participant 5 messages May 8, 2015

lore
Share & tools
lore
#0 lore raw

cover linux-yocto: build fixes and BSP support

Richard,

Here's the second revision of this series. I've included the braswell and qemumips fixes again, since they are still outstanding from an older pull request.

On top of those, I have two fixes for KBUILD_DEFCONFIG processing and in-tree configs (reported on the mailing list), and a fix for the race condition that was likely breaking Martin's builds. Ross managed to reproduce the error locally, and that got me on the right track to find the race condition.

I never did see the error locally, but the ordering fix should be correct, and it is worth getting into the mix IMHO.

I've also built this for qemux86, and there are no configuration warnings, so that issue should be solved as well.

Bruce

The following changes since commit 4a711028c709d4bb1421e1637ae3fb0ac404fb45:

oe-selftest: devtool: add a proper test to see if tap devices exist (2015-05-07 14:59:43 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib zedd/kernel
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=zedd/kernel

Bruce Ashfield (4):
linux-yocto/3.19: Braswell support and bug fixes linux-yocto/3.14: fix qemumips build error
linux-yocto: fix race between checkout and meta data generation
kernel-yocto: propagate in tree defconfigs to WORKDIR

 meta/classes/kernel-yocto.bbclass                  | 13 +++++++------
 meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb   |  4 ++--
 meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb |  2 +-
 meta/recipes-kernel/linux/linux-yocto-tiny_3.19.bb |  2 +-
 meta/recipes-kernel/linux/linux-yocto_3.14.bb      | 16 ++++++++--------
 meta/recipes-kernel/linux/linux-yocto_3.19.bb      | 16 ++++++++--------
 6 files changed, 27 insertions(+), 26 deletions(-)
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/4 linux-yocto/3.19: Braswell support and bug fixes

Updating to include the following commits:

a4d0c407cced dmaengine: dw: don't handle interrupt when dmaengine is not used e92b2ce791b2 dmaengine: dw: define DW_DMA_MAX_NR_MASTERS
931304a6567e dmaengine: dw: provide DMA capabilities
468bad4f7a6f dmaengine: dw: Split device_control
b4afd7710db7 i2c: i801: Use managed pcim_* PCI device initialization and reservation d81a8a11ecba i2c: i801: Remove pci_enable_device() call from i801_resume() 40e18604e70c i2c: i801: Use managed devm_* memory and irq allocation b54f65dbe57b i2c: i801: Remove i801_driver forward declaration
e95740d4d079 i2c: i801: Don't break user-visible strings
423e98721e04 ACPI: Introduce has_acpi_companion()
291f620dc052 i2c: designware: Suppress error message if platform_get_irq() < 0 cf5ff51a8e3f i2c: designware-pci: no need to provide clk_khz
4f583ce420d3 i2c: designware-pci: remove Moorestown support
e000c549c9d8 i2c: designware: Add Intel Baytrail PMIC I2C bus support 7ffbd9ca19a7 i2c: designware: fixup return handling of wait_for_completion_timeout 5758d5a1df32 i2c: designware: Do not calculate SCL timing parameters needlessly 2f58fcae92db i2c: designware: Add i2c bus locking support
84a73e51e900 i2c: designware: use {readl|writel}_relaxed instead of readl/writel f672bb8424e6 serial: 8250_dw: Fix get_mctrl behaviour
91bd64585489 serial: 8250: add support for ACPI-probed serial port for X-Gene platform 1190cba71f09 serial:8250:8250_pci: delete unneeded quirk entries
6405a4b71451 serial:8250:8250_pci: fix redundant entry report for WCH_CH352_2S 0a1a31bbbc19 serial: 8250_pci: remove one useless explicit type conversion 4edc52a55f82 intel_idle: Add support for the Airmont Core in the Cherrytrail and Braswell SOCs 934f85e8bfdb x86/irq, ACPI: Implement ACPI driver to support IOAPIC hotplug c6a3440252a8 ACPI / LPSS: check the result of ioremap()
6aacc0c931b7 pinctrl: update direction_output function of cherryview driver cb4a43a2177d pinctrl: cherryview: Configure HiZ pins to be input when requested as GPIOs 0df22c007ce1 pinctrl: intel: drop owner assignment from platform_drivers 07b16f04700b pinctrl: cherryview: Save and restore pin configs over system sleep e8e5cfffa231 pinctrl: baytrail: Save pin context over system sleep 04cb3cc0ff21 pinctrl: baytrail: Rework interrupt handling
4cac25d2574d pinctrl: baytrail: Clear interrupt triggering from pins that are in GPIO mode eacab9ab234a pinctrl: baytrail: Relax GPIO request rules

---
 meta/recipes-kernel/linux/linux-yocto-tiny_3.19.bb |  2 +-
 meta/recipes-kernel/linux/linux-yocto_3.19.bb      | 16 ++++++++--------
 2 files changed, 9 insertions(+), 9 deletions(-)
meta/recipes-kernel/linux/linux-yocto-tiny_3.19.bb +1 -1
index 1f91471dd622..50a426d665bf 100644
@@ -9,7 +9,7 @@ LINUX_VERSION ?= "3.19.5"
 KMETA = "meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
-SRCREV_machine ?= "d5d30ba4d20e65c15df624ffce7a5cd38150348b"
+SRCREV_machine ?= "0a0d499541e2bb13ecc1001d0947bed6106c26a6"
 SRCREV_meta ?= "7215fe431391a322c7e39f410e7b8f2a2b507892"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
meta/recipes-kernel/linux/linux-yocto_3.19.bb +8 -8
index 6ddbe8c59336..429c019ece79 100644
@@ -11,14 +11,14 @@ KBRANCH_qemux86  ?= "standard/common-pc"
 KBRANCH_qemux86-64 ?= "standard/common-pc-64/base"
 KBRANCH_qemumips64 ?= "standard/mti-malta64"
 
-SRCREV_machine_qemuarm ?= "4f9b327ff33521c08ed279891e2a2099b5504d0e"
-SRCREV_machine_qemuarm64 ?= "d5d30ba4d20e65c15df624ffce7a5cd38150348b"
-SRCREV_machine_qemumips ?= "03b975caa49e6e1693d6fe5fec8f316e0481ead5"
-SRCREV_machine_qemuppc ?= "9a3edc9c341e6f57423f2b4b218b83a84fc2726d"
-SRCREV_machine_qemux86 ?= "d5d30ba4d20e65c15df624ffce7a5cd38150348b"
-SRCREV_machine_qemux86-64 ?= "d5d30ba4d20e65c15df624ffce7a5cd38150348b"
-SRCREV_machine_qemumips64 ?= "f631de1c3df29a85a4b882acf19682fe05eec0f3"
-SRCREV_machine ?= "d5d30ba4d20e65c15df624ffce7a5cd38150348b"
+SRCREV_machine_qemuarm ?= "060c6306d0be2726638ab18bd68977de4c7a38e5"
+SRCREV_machine_qemuarm64 ?= "0a0d499541e2bb13ecc1001d0947bed6106c26a6"
+SRCREV_machine_qemumips ?= "4b206f611f6d4c35a27a44e24ba0cedfc71301ec"
+SRCREV_machine_qemuppc ?= "18e00694ed76d18bf020e3288a6fdce63412887d"
+SRCREV_machine_qemux86 ?= "0a0d499541e2bb13ecc1001d0947bed6106c26a6"
+SRCREV_machine_qemux86-64 ?= "0a0d499541e2bb13ecc1001d0947bed6106c26a6"
+SRCREV_machine_qemumips64 ?= "0e31a9b3e54a2c87645f34bcbbe704ac62c04602"
+SRCREV_machine ?= "0a0d499541e2bb13ecc1001d0947bed6106c26a6"
 SRCREV_meta ?= "7215fe431391a322c7e39f410e7b8f2a2b507892"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.19.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta"
Signature · 1 line
2.1.0
#3 lore raw

PATCH 3/4 linux-yocto: fix race between checkout and meta data generation

In reply to Bruce Ashfield

There are two tasks that must run before a linux-yocto kernel is built.

- Kernel checkout and relocation to work-shared (kernel_checkout)
- Meta data gathering and configuration prep (kernel_metadata)

The current task definitions for both are simply "before do_patch", which is correct, but kernel_checkout must run before and not race with kernel_metadata.

So we set the definition of kernel_checkout to be more specific and enforce the proper ordering.

[YOCTO: #7731]

---
 meta/classes/kernel-yocto.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/kernel-yocto.bbclass +1 -1
index 650ae5a4736b..0dd5b4851361 100644
@@ -259,7 +259,7 @@ do_kernel_checkout() {
 }
 do_kernel_checkout[dirs] = "${S}"
 
-addtask kernel_checkout before do_patch after do_unpack
+addtask kernel_checkout before do_kernel_metadata after do_unpack
 addtask kernel_metadata after do_validate_branches before do_patch
 do_kernel_metadata[depends] = "kern-tools-native:do_populate_sysroot"
 
Signature · 1 line
2.1.0
#2 lore raw

PATCH 2/4 linux-yocto/3.14: fix qemumips build error

In reply to Bruce Ashfield

Updating the SRCREVs to import the following fix:

mips: define cpu_has_saa in common features include

To avoid build failures such as the following on non-cavium platforms:

| arch/mips/include/asm/atomic.h: In function 'atomic_add':
| arch/mips/include/asm/atomic.h:52:6: error: 'cpu_has_saa' | undeclared (first use in this function)
| if (cpu_has_saa) {
| ^

We define a disabled cpu_has_saa unless the machine specific feature overrides define a value.

---
 meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb   |  4 ++--
 meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb |  2 +-
 meta/recipes-kernel/linux/linux-yocto_3.14.bb      | 16 ++++++++--------
 3 files changed, 11 insertions(+), 11 deletions(-)
meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb +2 -2
index 23e1688daeda..86b31738b609 100644
@@ -3,8 +3,8 @@ KBRANCH_qemuppc ?= "standard/preempt-rt/qemuppc"
 
 require recipes-kernel/linux/linux-yocto.inc
 
-SRCREV_machine ?= "91dc6afcecd47c08e7e13e674d8d7e9dcede5aca"
-SRCREV_machine_qemuppc ?= "2655b44cfe839f6f9ba15b061e1b4d386d5821f6"
+SRCREV_machine ?= "0c641a6c0e38137364535b99e43657a0cbc07cd4"
+SRCREV_machine_qemuppc ?= "cfc4e296efcaa84358c9ab1cdeee6ce7c378436f"
 SRCREV_meta ?= "46df2668fa657162d11f96a6f1af138c562a03aa"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb +1 -1
index 1d999650611c..d0b71c4859b1 100644
@@ -9,7 +9,7 @@ LINUX_VERSION ?= "3.14.36"
 KMETA = "meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
-SRCREV_machine ?= "2a2be8720802fae73fbdf1da37f61d7843332ba3"
+SRCREV_machine ?= "b991a586470900e3de824f5ea75653aa2150594d"
 SRCREV_meta ?= "46df2668fa657162d11f96a6f1af138c562a03aa"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
meta/recipes-kernel/linux/linux-yocto_3.14.bb +8 -8
index fa433b61c821..d4ea55a2398e 100644
@@ -11,14 +11,14 @@ KBRANCH_qemux86  ?= "standard/common-pc/base"
 KBRANCH_qemux86-64 ?= "standard/common-pc-64/base"
 KBRANCH_qemumips64 ?= "standard/mti-malta64"
 
-SRCREV_machine_qemuarm ?= "90f1033d72d422b4e4a8125f68cd1623d6788870"
-SRCREV_machine_qemuarm64 ?= "2a2be8720802fae73fbdf1da37f61d7843332ba3"
-SRCREV_machine_qemumips ?= "bc927927f774c9d12f6c4689dbfba9f5578d0b62"
-SRCREV_machine_qemuppc ?= "e4dfdbf1a059e0edb1be677973f8e2c73e012c8a"
-SRCREV_machine_qemux86 ?= "594bfbce3133d75d9aa569883bdeaed15eeadc8f"
-SRCREV_machine_qemux86-64 ?= "2a2be8720802fae73fbdf1da37f61d7843332ba3"
-SRCREV_machine_qemumips64 ?= "ea8b5406c6ec027d0475146ac84f24eb34196b78"
-SRCREV_machine ?= "2a2be8720802fae73fbdf1da37f61d7843332ba3"
+SRCREV_machine_qemuarm ?= "e4f91293908648d495b4f9735768633569e39b9f"
+SRCREV_machine_qemuarm64 ?= "b991a586470900e3de824f5ea75653aa2150594d"
+SRCREV_machine_qemumips ?= "6623389731309b0ac591736d5b438de833f195c7"
+SRCREV_machine_qemuppc ?= "3217fbcd002914fba4914d2e61dabb378081fd25"
+SRCREV_machine_qemux86 ?= "8794bd6a473199b2baa7a405d44cdbfa5351b60b"
+SRCREV_machine_qemux86-64 ?= "b991a586470900e3de824f5ea75653aa2150594d"
+SRCREV_machine_qemumips64 ?= "6649ef219b3bf6da1678547b9da376367520e80a"
+SRCREV_machine ?= "b991a586470900e3de824f5ea75653aa2150594d"
 SRCREV_meta ?= "46df2668fa657162d11f96a6f1af138c562a03aa"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta"
Signature · 1 line
2.1.0
#4 lore raw

PATCH 4/4 kernel-yocto: propagate in tree defconfigs to WORKDIR

In reply to Bruce Ashfield

As reported by Steffen Pankratz <[email protected]>, the previous logic of KBUILD_DEFCONFIG processing would not propagate an in tree defcofig to WORKDIR if one was not already present.

We fix the propagation by copying the in tee config if a defconfig is not already in WORKDIR.

Additionally we only warn (versus copying) if an in tree configuration is specified, is different than the WORKDIR version and isn't copied.

---
 meta/classes/kernel-yocto.bbclass | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
meta/classes/kernel-yocto.bbclass +6 -5
index 0dd5b4851361..88588d7cacc9 100644
@@ -97,14 +97,15 @@ do_kernel_metadata() {
 	if [ -n "${KBUILD_DEFCONFIG}" ]; then
 		if [ -f "${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG}" ]; then
 			if [ -f "${WORKDIR}/defconfig" ]; then
-				# If the two defconfigs are the same, leave the existing one in place
+				# If the two defconfig's are different, warn that we didn't overwrite the
+				# one already placed in WORKDIR by the fetcher.
 				cmp "${WORKDIR}/defconfig" "${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG}"
 				if [ $? -ne 0 ]; then
-					bbnote "defconfig detected in WORKDIR. ${KBUILD_DEFCONFIG} skipped"
-				else
-					cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${WORKDIR}/defconfig
-					sccs="${WORKDIR}/defconfig"
+					bbwarn "defconfig detected in WORKDIR. ${KBUILD_DEFCONFIG} skipped"
 				fi
+			else
+				cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${WORKDIR}/defconfig
+				sccs="${WORKDIR}/defconfig"
 			fi
 		else
 			bbfatal "A KBUILD_DECONFIG '${KBUILD_DEFCONFIG}' was specified, but not present in the source tree"
Signature · 1 line
2.1.0