<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 02/02/2013 03:08 AM, Bruce Ashfield
wrote:<br>
</div>
<blockquote
cite="mid:CADkTA4OuDqRE25oNRbFJCyrWpkkj62HpHHNN4qOFocNnrgSY_w@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Fri, Feb 1, 2013 at 1:56 PM, Saul
Wold <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:sgw@linux.intel.com" target="_blank">sgw@linux.intel.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 02/01/2013 06:18 AM, Bruce Ashfield
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">
<br>
<br>
<br>
On Fri, Feb 1, 2013 at 4:00 AM, <<a
moz-do-not-send="true"
href="mailto:Qi.Chen@windriver.com" target="_blank">Qi.Chen@windriver.com</a><br>
</div>
<mailto:<a moz-do-not-send="true"
href="mailto:Qi.Chen@windriver.com" target="_blank">Qi.Chen@windriver.com</a>>>
wrote:<br>
<br>
From: Chen Qi <<a moz-do-not-send="true"
href="mailto:Qi.Chen@windriver.com" target="_blank">Qi.Chen@windriver.com</a>
<mailto:<a moz-do-not-send="true"
href="mailto:Qi.Chen@windriver.com" target="_blank">Qi.Chen@windriver.com</a>>>
<div class="im">
<br>
<br>
Add config fragments to busybox.<br>
<br>
Both the implementation and the use case are
similar to yocto kernel's<br>
configuration fragments.<br>
<br>
<br>
I can fairly easily tweak the configuration parts of
the kern-tools to<br>
handle this<br>
use case as well. That would allow us to re-use the
kernel's merge_config.sh<br>
script (with a minor dependency change) and save some
duplicated code. It<br>
also gets you the advantage that you can consolidate
configuration fragments<br>
outside of any build system, which isn't as critical
here, but something<br>
that<br>
is used quite a bit during kernel testing.<br>
<br>
</div>
</blockquote>
Bruce,<br>
<br>
Where is the merge_config.sh script today? Would you
propose moving it to the scripts dir and have the busybox
recipe call it?<br>
</blockquote>
<div><br>
</div>
<div style="">It's part of the mainline kernel, hence why
grabbing the guts out of it reproducing </div>
<div style="">it here isn't the best idea, we'll have a need
to keep them in sync. In fact, I have</div>
<div style="">2 or 3 pending patches for it in the
kern-tools repository that I need to get upstream</div>
<div style="">
(as an example).</div>
<div style=""><br>
</div>
<div style="">I'd propose either creating a separate recipe
for it (i.e. like kconfig-frontends) or I could</div>
<div style="">keep it in kern-tools (badly named, but we can
work on that ;) and maintain / coordinate</div>
<div style="">changes to it.</div>
<div style=""><br>
</div>
<div style="">I just don't want to see the effort happen
twice, we are busy enough!</div>
</div>
</div>
</div>
</blockquote>
<br>
I thought about keeping the codes in sync but couldn't figure out a
nice way.<br>
It would be great if you do so.<br>
<br>
Thanks in advance :)<br>
<br>
Best Regards,<br>
Chen Qi<br>
<br>
<blockquote
cite="mid:CADkTA4OuDqRE25oNRbFJCyrWpkkj62HpHHNN4qOFocNnrgSY_w@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
What would be your timing on making such a change, ie hold
this patch until your get it merge or merge this and then
fix it when you merge your changes?<br>
</blockquote>
<div><br>
</div>
<div style="">I could feasibly get it done in the next few
weeks, the changes aren't bug, I just</div>
<div style="">have to avoid regressions on either side
(kernel or busy box). </div>
<div style=""><br>
</div>
<div style="">That being said, the interface to the SRC_URI
is the same for the two, so if we are</div>
<div style="">ok with me arriving and removing the in-recipe
support, I guess I can't object too</div>
<div style="">much :) The only risk is that if anyone starts
using this first support immediately, </div>
<div style="">I do risk regressing their use case, where if
it never goes in, that won't happen.</div>
<div style=""><br>
</div>
<div style="">Cheers,</div>
<div style=""><br>
</div>
<div style="">Bruce</div>
<div style=""><br>
</div>
<div style=""><br>
</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Sau!<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">
To be clear, I'm not talking about the entire
kern-tools here, just the<br>
config parts.<br>
<br>
Cheers,<br>
<br>
Bruce<br>
<br>
<br>
[YOCTO #3379]<br>
<br>
Signed-off-by: Chen Qi <<a
moz-do-not-send="true"
href="mailto:Qi.Chen@windriver.com" target="_blank">Qi.Chen@windriver.com</a><br>
</div>
<mailto:<a moz-do-not-send="true"
href="mailto:Qi.Chen@windriver.com" target="_blank">Qi.Chen@windriver.com</a>>>
<div>
<div class="h5"><br>
---<br>
meta/recipes-core/busybox/busybox.inc | 45<br>
+++++++++++++++++++++++++++++++++<br>
1 file changed, 45 insertions(+)<br>
<br>
diff --git a/meta/recipes-core/busybox/busybox.inc<br>
b/meta/recipes-core/busybox/busybox.inc<br>
index 972e7d0..66044f8 100644<br>
--- a/meta/recipes-core/busybox/busybox.inc<br>
+++ b/meta/recipes-core/busybox/busybox.inc<br>
@@ -112,8 +112,53 @@ do_prepare_config () {<br>
fi<br>
}<br>
<br>
+# returns all the elements from the src uri
that are .cfg files<br>
+def find_cfgs(d):<br>
+ sources=src_patches(d, True)<br>
+ sources_list=[]<br>
+ for s in sources:<br>
+ if s.endswith('.cfg'):<br>
+ sources_list.append(s)<br>
+<br>
+ return sources_list<br>
+<br>
+# Merge config fragments<br>
+# All config fragments for busybox should end
with .cfg<br>
+do_merge_config() {<br>
+ SED_CONFIG_EXP="s/^\(#
\)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[=<br>
].*/\2/p"<br>
+ MERGE_LIST="${@" ".join(find_cfgs(d))}"<br>
+ if [ -n "$MERGE_LIST" ]; then<br>
+ # Make a temp file, merge
.config and .cfg files<br>
into it<br>
+ TMP_FILE=`mktemp
.tmp.config.XXXXXXXX`<br>
+ cp .config $TMP_FILE<br>
+ for MERGE_FILE in $MERGE_LIST;
do<br>
+ CFG_LIST=`sed -n
"${SED_CONFIG_EXP}"<br>
$MERGE_FILE`<br>
+ for CFG in $CFG_LIST ;
do<br>
+ grep -q -w $CFG
$TMP_FILE<br>
+ if [ $? -eq 0 ]
; then<br>
+
PREV_VAL=`grep -w $CFG<br>
$TMP_FILE`<br>
+
NEW_VAL=`grep -w $CFG<br>
$MERGE_FILE`<br>
+ if [
"x$PREV_VAL" !=<br>
"x$NEW_VAL" ] ; then<br>
+
echo Value of $CFG<br>
is redefined by fragment $MERGE_FILE:<br>
+
echo Previous<br>
value: $PREV_VAL<br>
+
echo New value:<br>
$NEW_VAL<br>
+
echo<br>
+ fi<br>
+ sed -i
"/$CFG[ =]/d" $TMP_FILE<br>
+ fi<br>
+ done<br>
+ echo >> $TMP_FILE<br>
+ cat $MERGE_FILE
>> $TMP_FILE<br>
+ done<br>
+ # Copy the temp file to
.config, do some cleanup<br>
+ cp $TMP_FILE .config<br>
+ rm $TMP_FILE<br>
+ fi<br>
+}<br>
+<br>
do_configure () {<br>
do_prepare_config<br>
+ do_merge_config<br>
cml1_do_configure<br>
}<br>
<br>
--<br>
1.7.9.5<br>
<br>
<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a moz-do-not-send="true"
href="mailto:Openembedded-core@lists.openembedded.org"
target="_blank">Openembedded-core@lists.openembedded.org</a><br>
</div>
</div>
<mailto:<a moz-do-not-send="true"
href="mailto:Openembedded-core@lists.openembedded.org"
target="_blank">Openembedded-core@lists.openembedded.org</a>>
<div class="im"><br>
<a moz-do-not-send="true"
href="http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core"
target="_blank">http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core</a><br>
<br>
<br>
<br>
<br>
--<br>
"Thou shalt not follow the NULL pointer, for chaos and
madness await<br>
thee at its end"<br>
<br>
<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a moz-do-not-send="true"
href="mailto:Openembedded-core@lists.openembedded.org"
target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a moz-do-not-send="true"
href="http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core"
target="_blank">http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core</a><br>
<br>
</div>
</blockquote>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
"Thou shalt not follow the NULL pointer, for chaos and madness
await thee at its end"
</div>
</div>
</blockquote>
<br>
</body>
</html>