Skip to contentSkip to conversation

linux-yocto: consolidated pull request

PATCH Superseded Bruce Ashfield 1 participant 4 messages Jan 4, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover linux-yocto: consolidated pull request

Richard/Saul,

Here's a 3pack of kernel changes. The breakdown is as follows:

1) kern-tools: import flexible branching support

This fixes an issue that Saul found with the Intel boards that use the yocto/emgd, yocto/eg20t graphics branches. We need to be able to have features that allow a branch to be tested via multiple creations. So these changes allow that again.

2) linux-yocto: bump kernel version to v3.0.14

Normal maintainance here. Bumping the version to pickup 3.0.14 fixes.

3) linux-yocto: use src_patches for out of tree kernel feature support

This is to fix some issue we found in 1.1 and was on the M2 feature schedule. This sets the stage for Tom's BSP scripts and out of tree development.

At the least, you want #1 right away to fix potential breakage.

Cheers,

Bruce

The following changes since commit 021848be9eeb71de8acfba6c66c11645b01523b8:

valgrind: Fix for automake update (2012-01-04 16:04:08 +0000)

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 (3):
kern-tools: import flexible branching support
linux-yocto: bump kernel version to v3.0.14
linux-yocto: use src_patches for out of tree kernel feature support

 meta/classes/kernel-yocto.bbclass                  |   67 +++++++++++++++++++-
 .../kern-tools/kern-tools-native_git.bb            |    2 +-
 meta/recipes-kernel/linux/linux-yocto-rt_3.0.bb    |    8 +-
 meta/recipes-kernel/linux/linux-yocto_3.0.bb       |   19 +++---
 4 files changed, 80 insertions(+), 16 deletions(-)
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/3 kern-tools: import flexible branching support

The commit:

kern-tools: update SRCREV to pickup git operation fixes

Brought in the ability to trap failed git operations on the working tree, but what it missed were some branching changes that allow arbitrary branch points and the ability to create a branch multiple times (if a feature is included multiple times). The graphics driver branches used by some BSPs need this part of the change to properly handle graphics driver branches.

Updating the SRCREV to pickup the associated kern-tools changes for this support.

---
 .../kern-tools/kern-tools-native_git.bb            |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/recipes-kernel/kern-tools/kern-tools-native_git.bb +1 -1
index 6bb9c85..c387af8 100644
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=e2bf4415f3d8
 
 DEPENDS = "git-native guilt-native"
 
-SRCREV = "806f1452eeced0bbd05433456ac0d6786d5362dc"
+SRCREV = "710067f39a2518f095456eed0232de6300f0b6df"
 PR = r12
 PV = "0.1+git${SRCPV}"
 
Signature · 1 line
1.7.4.1
#2 lore raw

PATCH 2/3 linux-yocto: bump kernel version to v3.0.14

In reply to Bruce Ashfield

Updating the 3.0 kernel recipe to contain v3.0.14 -stable.

---
 meta/recipes-kernel/linux/linux-yocto-rt_3.0.bb |    8 ++++----
 meta/recipes-kernel/linux/linux-yocto_3.0.bb    |   19 ++++++++++---------
 2 files changed, 14 insertions(+), 13 deletions(-)
meta/recipes-kernel/linux/linux-yocto-rt_3.0.bb +4 -4
index 81d22d0..8ece90a 100644
@@ -11,12 +11,12 @@ KMACHINE_qemumips = "mti-malta32-be"
 KBRANCH = "yocto/standard/preempt-rt/base"
 KBRANCH_qemuppc = "yocto/standard/preempt-rt/qemu-ppc32"
 
-LINUX_VERSION ?= "3.0.12"
+LINUX_VERSION ?= "3.0.14"
 LINUX_KERNEL_TYPE = "preempt-rt"
 
-SRCREV_machine ?= "6e96ccbbf19a4a7b67d98fdcd74d2c9da2c7c463"
-SRCREV_machine_qemuppc ?= "8ea61de7fd201ff0001a039f2fda8ec2e4a562a1"
-SRCREV_meta ?= "c979f1365b1eb74e882b2cbbc8407ec536ab6eb8"
+SRCREV_machine ?= "bcf4107c7f22d10952618a2ad146e6149d240cd2"
+SRCREV_machine_qemuppc ?= "1e5511ea2cb5f150ffce86071035a81c0499494b"
+SRCREV_meta ?= "e6d8ed43eb051a5db90856cb6226d1cc05d301c5"
 
 PR = "r1"
 PV = "${LINUX_VERSION}+git${SRCPV}"
meta/recipes-kernel/linux/linux-yocto_3.0.bb +10 -9
index b650c84..7edcb1f 100644
@@ -10,15 +10,16 @@ KMACHINE_qemuarm  = "yocto/standard/arm-versatile-926ejs"
 
 KBRANCH = ${KMACHINE}
 
-LINUX_VERSION ?= "3.0.12"
-
-SRCREV_machine_qemuarm ?= "b2a7d668b963f1c5f9876f130278dd9fb7df4831"
-SRCREV_machine_qemumips ?= "62bb04e5ba19b5b8aacd9079fdfbcb8284cd9fc8"
-SRCREV_machine_qemuppc ?= "7ecece328c5987112de2959f8f998dfcedaf7210"
-SRCREV_machine_qemux86 ?= "a611ba462ac51b2bfdac1c5c6538dac95ad9b4dd"
-SRCREV_machine_qemux86-64 ?= "b15a9b67089e31ef9780fdbd0481f48ef7facdba"
-SRCREV_machine ?= "f389d310965a56091f688b28ea8be6d9cbb7fbbe"
-SRCREV_meta ?= "c979f1365b1eb74e882b2cbbc8407ec536ab6eb8"
+LINUX_VERSION ?= "3.0.14"
+
+
+SRCREV_machine_qemuarm ?= "5a941c2d553d3244527845f096d0a7d95cdfac22"
+SRCREV_machine_qemumips ?= "0f2c18fe373339e61a55a6d826784b0cde2d5704"
+SRCREV_machine_qemuppc ?= "925b585f17da9c51e2159023f813bca391528013"
+SRCREV_machine_qemux86 ?= "54794354969774f71fdd71bd20de02f1a990b84d"
+SRCREV_machine_qemux86-64 ?= "20a790396e6eeb7c0e77135fa2a86ea8ad505b6f"
+SRCREV_machine ?= "e143cd3316f18a15d93365442e1f6eea716aab84"
+SRCREV_meta ?= "e6d8ed43eb051a5db90856cb6226d1cc05d301c5"
 
 PR = "r2"
 PV = "${LINUX_VERSION}+git${SRCPV}"
Signature · 1 line
1.7.4.1
#3 lore raw

PATCH 3/3 linux-yocto: use src_patches for out of tree kernel feature support

In reply to Bruce Ashfield

To support larger out of tree kernel features and enhanced patching schemes, this changeset modifies the linux-yocto patching routines to call the recently factored out 'src_patches' routine. Using the returned list of local URIs for all valid patches, the logic can then determine whether or not patches can be used in place, or need to be migrated and have re-usable kernel features created. The results are then fed to the existing infrastructure to be applied and commited to the tree.

---
 meta/classes/kernel-yocto.bbclass |   67 +++++++++++++++++++++++++++++++++++-
 1 files changed, 65 insertions(+), 2 deletions(-)
meta/classes/kernel-yocto.bbclass +65 -2
index f78caaf..1b73e6e 100644
@@ -1,5 +1,15 @@
 S = "${WORKDIR}/linux"
 
+
+def find_patches(d):
+	patches=src_patches(d)
+	patch_list=[]
+	for p in patches:
+	    _, _, local, _, _, _ = bb.decodeurl(p)
+ 	    patch_list.append(local)
+
+	return patch_list
+
 do_patch() {
 	cd ${S}
 	if [ -f ${WORKDIR}/defconfig ]; then
@@ -31,14 +41,67 @@ do_patch() {
 		exit 1
 	fi
 
-	# updates or generates the target description
+	patches="${@" ".join(find_patches(d))}"
+
+	# This loops through all patches, and looks for directories that do
+	# not already have feature descriptions. If a directory doesn't have
+	# a feature description, we switch to the ${WORKDIR} variant of the
+	# feature (so we can write to it) and generate a feature for those
+	# patches. The generated feature will respect the patch order.
+	#
+	# By leaving source patch directories that already have .scc files
+	# as-is it means that a SRC_URI can only contain a .scc file, and all
+	# patches that the .scc references will be picked up, without having
+	# to be repeated on the SRC_URI line .. which is more intutive
+	set +e
+	patch_dirs=
+	for p in ${patches}; do
+		pdir=`dirname ${p}`
+		pname=`basename ${p}`
+		scc=`find ${pdir} -maxdepth 1 -name '*.scc'`
+		if [ -z "${scc}" ]; then
+			# there is no scc file. We need to switch to someplace that we know
+		        # we can create content (the workdir)
+			workdir_subdir=`echo ${pdir} | sed "s%^.*/${PN}%%" | sed 's%^/%%'`
+			suggested_dir="${WORKDIR}/${workdir_subdir}"
+			echo ${gen_feature_dirs} | grep -q ${suggested_dir}
+			if [ $? -ne 0 ]; then
+				gen_feature_dirs="${gen_feature_dirs} ${suggested_dir}"
+			fi
+			# we call the file *.scc_tmp, so the test above will continue to find
+			# that patches from a common subdirectory don't have a scc file and 
+			# they'll be placed in order, into this file. We'll rename it later.
+			echo "patch ${pname}" >> ${suggested_dir}/gen_${workdir_subdir}_desc.scc_tmp
+		else
+			suggested_dir="${pdir}"
+		fi
+		echo ${patch_dirs} | grep -q ${suggested_dir}
+		if [ $? -ne 0 ]; then
+			patch_dirs="${patch_dirs} ${suggested_dir}"
+		fi
+	done
+
+	# go through the patch directories and look for any scc feature files
+	# that were constructed above. If one is found, rename it to ".scc" so
+	# the kernel patching can see it.
+	for pdir in ${patch_dirs}; do
+		scc=`find ${pdir} -maxdepth 1 -name '*.scc_tmp'`
+                if [ -n "${scc}" ]; then
+			new_scc=`echo ${scc} | sed 's/_tmp//'`
+			mv -f ${scc} ${new_scc}
+		fi
+	done
+
+	# add any explicitly referenced features onto the end of the feature
+	# list that is passed to the kernel build scripts.
 	if [ -n "${KERNEL_FEATURES}" ]; then
 		for feat in ${KERNEL_FEATURES}; do
 			addon_features="$addon_features --feature $feat"
 		done
 	fi
+	# updates or generates the target description
 	updateme --branch ${kbranch} -DKDESC=${KMACHINE}:${LINUX_KERNEL_TYPE} \
-                         ${addon_features} ${ARCH} ${KMACHINE} ${WORKDIR}
+                           ${addon_features} ${ARCH} ${KMACHINE} ${patch_dirs}
 	if [ $? -ne 0 ]; then
 		echo "ERROR. Could not update ${kbranch}"
 		exit 1
Signature · 1 line
1.7.4.1