aboutsummaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/recipes-kernel/kern-tools-native
diff options
context:
space:
mode:
authorStephane Desneux <stephane.desneux@iot.bzh>2018-06-05 10:38:03 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2018-06-06 12:30:09 +0000
commit9509ef8e57221bc3b72d2fcf7132771b3508bb65 (patch)
tree6f070016e63598def9bf9b1cdab5e177a7964d04 /meta-agl-bsp/recipes-kernel/kern-tools-native
parentad34efe7bc84ae83af9e08695f633e8792130707 (diff)
kern-tools-native: fix fragments merging script
When concatenating kernel config fragments, if a fragment file doesn't end with a carriage return, then the last config option of the fragment and the first one of the next fragment are on the same line in the result file. This leads to misconfiguration because some options are not taken into account. This commit includes a patch that will add a \n in the result file after each fragment. Bug-AGL: SPEC-1475 Change-Id: I52d13b42909f56f4608860af865a80d0d9b2579e Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Diffstat (limited to 'meta-agl-bsp/recipes-kernel/kern-tools-native')
-rw-r--r--meta-agl-bsp/recipes-kernel/kern-tools-native/files/0001-merge_config.sh-add-CR-after-fragment.patch34
-rw-r--r--meta-agl-bsp/recipes-kernel/kern-tools-native/kern-tools-native_git.bbappend6
2 files changed, 40 insertions, 0 deletions
diff --git a/meta-agl-bsp/recipes-kernel/kern-tools-native/files/0001-merge_config.sh-add-CR-after-fragment.patch b/meta-agl-bsp/recipes-kernel/kern-tools-native/files/0001-merge_config.sh-add-CR-after-fragment.patch
new file mode 100644
index 000000000..350f9d4bf
--- /dev/null
+++ b/meta-agl-bsp/recipes-kernel/kern-tools-native/files/0001-merge_config.sh-add-CR-after-fragment.patch
@@ -0,0 +1,34 @@
+From 8d12bbfc6179d7e9777e4663e10f1795de158b57 Mon Sep 17 00:00:00 2001
+From: Stephane Desneux <stephane.desneux@iot.bzh>
+Date: Tue, 5 Jun 2018 10:53:24 +0200
+Subject: [PATCH] tools/merge_config.sh: add CR after each fragment
+
+If a fragment file doesn't contain a CR at the end, two config options
+may be merged on the same line in the result file, leading to misconfiguration.
+
+This patch adds a CR after each fragment to ensure that config options
+are well separated in the result file.
+
+Bug-AGL: SPEC-1475
+
+Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
+---
+ tools/merge_config.sh | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tools/merge_config.sh b/tools/merge_config.sh
+index 67d1314..296e759 100755
+--- a/tools/merge_config.sh
++++ b/tools/merge_config.sh
+@@ -129,6 +129,8 @@ for MERGE_FILE in $MERGE_LIST ; do
+ sed -i "/$CFG[ =]/d" $TMP_FILE
+ done
+ cat $MERGE_FILE >> $TMP_FILE
++ # workaround for fragments not ending with carriage return
++ echo >> $TMP_FILE
+ done
+
+ if [ "$RUNMAKE" = "false" ]; then
+--
+2.1.4
+
diff --git a/meta-agl-bsp/recipes-kernel/kern-tools-native/kern-tools-native_git.bbappend b/meta-agl-bsp/recipes-kernel/kern-tools-native/kern-tools-native_git.bbappend
new file mode 100644
index 000000000..814278302
--- /dev/null
+++ b/meta-agl-bsp/recipes-kernel/kern-tools-native/kern-tools-native_git.bbappend
@@ -0,0 +1,6 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += "\
+ file://0001-merge_config.sh-add-CR-after-fragment.patch;patchdir=git \
+ "
+