linux: Add copy-defconfig and setup-defconfig include files
PATCH 1/1 linux: Add copy-defconfig and setup-defconfig include files
* Port copy-defconfig and setup-defconfig from Arago.
* These include files are used in a variety of kernel recipes in the Arago SDK.
* copy-defconfig copies the config file used by the SDK build to the kernel sources to be packaged into the sourceipk.
* setup-defconfig.inc determines which kernel configuration file to use.
--- .../recipes-kernel/linux/copy-defconfig.inc | 11 ++++++++ .../recipes-kernel/linux/setup-defconfig.inc | 26 ++++++++++++++++++++ 2 files changed, 37 insertions(+), 0 deletions(-) create mode 100644 meta-arago-distro/recipes-kernel/linux/copy-defconfig.inc create mode 100644 meta-arago-distro/recipes-kernel/linux/setup-defconfig.inc
meta-arago-distro/recipes-kernel/linux/copy-defconfig.inc new file +11 -0
@@ -0,0 +1,11 @@ +CONFIG_NAME ?= "tisdk_${MACHINE}_defconfig" + +# Copy the configuration file used during the SDK build in Arago to +# the kernel sources to be packaged into the sourceipk. Then call +# the function to build the sourceipk again. This is done as a +# do_compile_prepend so that we can pick up any changes to the +# defconfig thay may have been done by the sanitizer code. +do_compile_prepend() { + cp ${S}/.config ${S}/arch/arm/configs/${CONFIG_NAME} + sourceipk_do_create_srcipk +}
meta-arago-distro/recipes-kernel/linux/setup-defconfig.inc new file +26 -0
@@ -0,0 +1,26 @@ +# Check the defconfig file and see if it points to an in kernel +# defconfig that should be used, or if it is a complete config file + +addtask setup_defconfig before do_configure after do_patch +do_setup_defconfig() { + # Always copy the defconfig file to .config to keep consistency + # between the case where there is a real config and the in kernel + # tree config + cp ${WORKDIR}/defconfig ${S}/.config +} + +# define our own do_configure that will: +# 1. Check the .config file and see if string use-kernel-config= is present +# 2. If the use-kernel-config string is present parse out the config to use +# and run make ${config} +# 3. else run yes '' | oe_runmake oldconfig like the default do_configure +# does +do_configure() { + config=`cat ${S}/.config | grep use-kernel-config | cut -d= -f2` + if [ "x${config}" != "x" ] + then + oe_runmake ${config} + else + yes '' | oe_runmake oldconfig + fi +}
Signature · 1 line
1.7.0.4
Where is the append to actually use these? I know you are pending some patches going into meta-ti but we could at least review your appends and planned changes ahead of time. Just let us know that the patch is dependent on the patch to meta-ti.
Quoted 99 lines
-----Original Message-----
From: [email protected] [mailto:meta-arago- [email protected]] On Behalf Of Franklin S. Cooper Jr
Sent: Wednesday, October 10, 2012 2:56 PM
To: [email protected]
Cc: Cooper Jr., Franklin
Subject: [meta-arago] [PATCH] linux: Add copy-defconfig and setup-defconfig include files* Port copy-defconfig and setup-defconfig from Arago.
* These include files are used in a variety of kernel recipes in the Arago SDK.
* copy-defconfig copies the config file used by the SDK build to the kernel
sources to be packaged into the sourceipk.
* setup-defconfig.inc determines which kernel configuration file to use.Signed-off-by Franklin S. Cooper Jr <[email protected]>--- .../recipes-kernel/linux/copy-defconfig.inc | 11 ++++++++ .../recipes-kernel/linux/setup-defconfig.inc | 26 ++++++++++++++++++++ 2 files changed, 37 insertions(+), 0 deletions(-) create mode 100644 meta-arago-distro/recipes-kernel/linux/copy- defconfig.inc create mode 100644 meta-arago-distro/recipes-kernel/linux/setup-defconfig.inc
(quoted diff) +0
-0defconfig.inc b/meta-arago-distro/recipes-kernel/linux/copy- defconfig.inc
new file mode 100644
index 0000000..10be10cmeta-arago-distro/recipes-kernel/linux/copy-defconfig.inc new file +3
-0@@ -0,0 +1,11 @@ +CONFIG_NAME ?= "tisdk_${MACHINE}_defconfig" + +# Copy the configuration file used during the SDK build in Aragoto
+# the kernel sources to be packaged into the sourceipk. Then callmeta-arago-distro/recipes-kernel/linux/copy-defconfig.inc new file +7
-0+# the function to build the sourceipk again. This is done as a +# do_compile_prepend so that we can pick up any changes to the +# defconfig thay may have been done by the sanitizer code. +do_compile_prepend() { + cp ${S}/.config ${S}/arch/arm/configs/${CONFIG_NAME} + sourceipk_do_create_srcipk +}(quoted diff) +0
-0defconfig.inc b/meta-arago-distro/recipes-kernel/linux/setup- defconfig.inc
new file mode 100644
index 0000000..fc5e18emeta-arago-distro/recipes-kernel/linux/setup-defconfig.inc new file +2
-0@@ -0,0 +1,26 @@ +# Check the defconfig file and see if it points to an in kernel +# defconfig that should be used, or if it is a complete configfile
meta-arago-distro/recipes-kernel/linux/setup-defconfig.inc new file +4
-0+ +addtask setup_defconfig before do_configure after do_patch +do_setup_defconfig() { + # Always copy the defconfig file to .config to keepconsistency
+ # between the case where there is a real config and the in
kernelmeta-arago-distro/recipes-kernel/linux/setup-defconfig.inc new file +6
-0+ # tree config + cp ${WORKDIR}/defconfig ${S}/.config +} + +# define our own do_configure that will: +# 1. Check the .config file and see if string use-kernel-config= is present
+# 2. If the use-kernel-config string is present parse out the
config to usemeta-arago-distro/recipes-kernel/linux/setup-defconfig.inc new file +2
-0+# and run make ${config} +# 3. else run yes '' | oe_runmake oldconfig like the default
do_configuremeta-arago-distro/recipes-kernel/linux/setup-defconfig.inc new file +10
-2+# does +do_configure() { + config=`cat ${S}/.config | grep use-kernel-config | cut -d= -f2` + if [ "x${config}" != "x" ] + then + oe_runmake ${config} + else + yes '' | oe_runmake oldconfig + fi +} --1.7.0.4
_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago