All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denys Dmytriyenko <denys@ti.com>
To: Chase Maupin <Chase.Maupin@ti.com>
Cc: meta-ti@yoctoproject.org
Subject: Re: [PATCH 3/4] setup-defconfig: allow use of in-kernel config fragments
Date: Thu, 22 May 2014 12:19:01 -0400	[thread overview]
Message-ID: <20140522161900.GL21819@edge> (raw)
In-Reply-To: <1400775376-28129-3-git-send-email-Chase.Maupin@ti.com>

On Thu, May 22, 2014 at 11:16:15AM -0500, Chase Maupin wrote:
> * Allow the use of in-kernel config fragments instead of only
>   pulling config fragments from the OE meta data.  The OE meta
>   data fragments will still take precedence over in tree .cfg
>   files.

I was thinking to do it differently...


> Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
> ---
>  recipes-kernel/linux/setup-defconfig.inc |   36 ++++++++++++++++++++++++++++--
>  1 file changed, 34 insertions(+), 2 deletions(-)
> 
> diff --git a/recipes-kernel/linux/setup-defconfig.inc b/recipes-kernel/linux/setup-defconfig.inc
> index 4277f26..fbe7e96 100644
> --- a/recipes-kernel/linux/setup-defconfig.inc
> +++ b/recipes-kernel/linux/setup-defconfig.inc
> @@ -2,6 +2,10 @@
>  # kernel version string.  such as the commit id
>  KERNEL_LOCALVERSION ?= ""
>  
> +# KERNEL_CONFIG_DIR can be set to specify a subdirectory to search for
> +# kernel configuration fragments
> +KERNEL_CONFIG_DIR ?= ""
> +
>  # 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
>  
> @@ -27,10 +31,38 @@ do_configure() {
>          yes '' | oe_runmake oldconfig
>      fi
>  
> -    # check for fragments
> +    # Check for kernel config fragments.  First check the files copied from
> +    # the OE meta data since we may want to override kernel config fragments
> +    # in the recipe.  If you don't find the fragment in the OE meta data
> +    # then check the kernel sources.  If you still can't find it then bail
> +    # with an error.
> +    # Check if any config fragments are specified.
>      if [ ! -z "${KERNEL_CONFIG_FRAGMENTS}" ]
>      then
> -        ( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${S} ${S}/.config ${KERNEL_CONFIG_FRAGMENTS} 1>&2 )
> +        # Variable to hold the assembled list of fragments with absolute paths
> +        configs=""
> +
> +        for f in ${KERNEL_CONFIG_FRAGMENTS}
> +        do
> +            # Check if the config fragment was copied into the WORKDIR from
> +            # the OE meta data
> +            if [ -e "${WORKDIR}/$f" ]
> +            then
> +                echo "Found config in workdir"
> +                configs="$configs ""${WORKDIR}/$f"
> +            # Check if the fragement is in the kernel sources
> +            elif [ -e "${S}/${KERNEL_CONFIG_DIR}/$f" ]
> +            then
> +                echo "Found config in kernel"
> +                configs="$configs ""${S}/${KERNEL_CONFIG_DIR}/$f"
> +            else
> +                echo "Could not find kernel config fragment $f"
> +                exit 1
> +            fi
> +        done
> +
> +        # Now that all the fragments are located merge them.
> +        ( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${S} ${S}/.config ${configs} 1>&2 )
>          yes '' | oe_runmake oldconfig
>      fi
>  }
> -- 
> 1.7.9.5
> 
> -- 
> _______________________________________________
> meta-ti mailing list
> meta-ti@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-ti


  reply	other threads:[~2014-05-22 16:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-22 16:16 [PATCH 1/4] linux-ti-staging: Remove old 3.8 version Chase Maupin
2014-05-22 16:16 ` [PATCH 2/4] linux-ti-staging: Make files directory version specific Chase Maupin
2014-05-22 16:16 ` [PATCH 3/4] setup-defconfig: allow use of in-kernel config fragments Chase Maupin
2014-05-22 16:19   ` Denys Dmytriyenko [this message]
2014-05-22 16:50     ` Denys Dmytriyenko
2014-05-22 17:16       ` Maupin, Chase
2014-05-22 17:36         ` Denys Dmytriyenko
2014-05-22 19:38           ` Maupin, Chase
2014-05-22 16:16 ` [PATCH 4/4] linux-ti-staging: Add version 3.15 of TI integration kernel Chase Maupin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140522161900.GL21819@edge \
    --to=denys@ti.com \
    --cc=Chase.Maupin@ti.com \
    --cc=meta-ti@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.