diff options
| author | Maupin, Chase <chase.maupin@ti.com> | 2014-05-23 02:08:32 +0000 |
|---|---|---|
| committer | Denys Dmytriyenko <denys@ti.com> | 2014-05-23 14:49:47 -0400 |
| commit | 1c87802589eb622c3fa9ea800c3c09c7bb350b82 (patch) | |
| tree | ffeb948e92c7b22766c96c409ef26f78ddf5e570 | |
| parent | ecfdfaa6fd53c94e73e228788eeb589920bf1ad1 (diff) | |
| download | meta-ti-1c87802589eb622c3fa9ea800c3c09c7bb350b82.tar.gz | |
setup-defconfig: allow use of in-kernel config fragments
* Allow the use of in-kernel config fragments instead of only
pulling config fragments from the OE meta data.
* The absolute path to the config fragment is used to allow
pointing to different fragment locations.
* Update the linux-ti-staging_3.12 recipe which uses config
fragments to specify the absolute path
Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
| -rw-r--r-- | recipes-kernel/linux/linux-ti-staging_3.12.bb | 3 | ||||
| -rw-r--r-- | recipes-kernel/linux/setup-defconfig.inc | 24 |
2 files changed, 25 insertions, 2 deletions
diff --git a/recipes-kernel/linux/linux-ti-staging_3.12.bb b/recipes-kernel/linux/linux-ti-staging_3.12.bb index dbb49b37..cb289c4e 100644 --- a/recipes-kernel/linux/linux-ti-staging_3.12.bb +++ b/recipes-kernel/linux/linux-ti-staging_3.12.bb | |||
| @@ -46,7 +46,8 @@ PV = "3.12.20" | |||
| 46 | MACHINE_KERNEL_PR_append = "a+gitr${SRCPV}" | 46 | MACHINE_KERNEL_PR_append = "a+gitr${SRCPV}" |
| 47 | PR = "${MACHINE_KERNEL_PR}" | 47 | PR = "${MACHINE_KERNEL_PR}" |
| 48 | 48 | ||
| 49 | KERNEL_CONFIG_FRAGMENTS = "baseport.cfg connectivity.cfg ipc.cfg" | 49 | KERNEL_CONFIG_FRAGMENTS = "${WORKDIR}/baseport.cfg ${WORKDIR}/connectivity.cfg \ |
| 50 | ${WORKDIR}/ipc.cfg" | ||
| 50 | 51 | ||
| 51 | SRC_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git;protocol=git;branch=${BRANCH} \ | 52 | SRC_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git;protocol=git;branch=${BRANCH} \ |
| 52 | file://defconfig \ | 53 | file://defconfig \ |
diff --git a/recipes-kernel/linux/setup-defconfig.inc b/recipes-kernel/linux/setup-defconfig.inc index 4277f26e..dbfd0d4a 100644 --- a/recipes-kernel/linux/setup-defconfig.inc +++ b/recipes-kernel/linux/setup-defconfig.inc | |||
| @@ -27,9 +27,31 @@ do_configure() { | |||
| 27 | yes '' | oe_runmake oldconfig | 27 | yes '' | oe_runmake oldconfig |
| 28 | fi | 28 | fi |
| 29 | 29 | ||
| 30 | # check for fragments | 30 | # Check for kernel config fragments. The assumption is that the config |
| 31 | # fragment will be specified with the absolute path. For example: | ||
| 32 | # * ${WORKDIR}/config1.cfg | ||
| 33 | # * ${S}/config2.cfg | ||
| 34 | # Iterate through the list of configs and make sure that you can find | ||
| 35 | # each one. If not then error out. | ||
| 36 | # NOTE: If you want to override a configuration that is kept in the kernel | ||
| 37 | # with one from the OE meta data then you should make sure that the | ||
| 38 | # OE meta data version (i.e. ${WORKDIR}/config1.cfg) is listed | ||
| 39 | # after the in kernel configuration fragment. | ||
| 40 | # Check if any config fragments are specified. | ||
| 31 | if [ ! -z "${KERNEL_CONFIG_FRAGMENTS}" ] | 41 | if [ ! -z "${KERNEL_CONFIG_FRAGMENTS}" ] |
| 32 | then | 42 | then |
| 43 | for f in ${KERNEL_CONFIG_FRAGMENTS} | ||
| 44 | do | ||
| 45 | # Check if the config fragment was copied into the WORKDIR from | ||
| 46 | # the OE meta data | ||
| 47 | if [ ! -e "$f" ] | ||
| 48 | then | ||
| 49 | echo "Could not find kernel config fragment $f" | ||
| 50 | exit 1 | ||
| 51 | fi | ||
| 52 | done | ||
| 53 | |||
| 54 | # Now that all the fragments are located merge them. | ||
| 33 | ( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${S} ${S}/.config ${KERNEL_CONFIG_FRAGMENTS} 1>&2 ) | 55 | ( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${S} ${S}/.config ${KERNEL_CONFIG_FRAGMENTS} 1>&2 ) |
| 34 | yes '' | oe_runmake oldconfig | 56 | yes '' | oe_runmake oldconfig |
| 35 | fi | 57 | fi |
