non-interactive build question

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Wed Nov 6 21:51:21 UTC 2013


On 16 October 2013 09:02, Mike Frysinger <vapier at gentoo.org> wrote:
> On Monday 14 October 2013 12:43:34 Steve Ellcey wrote:
>> I am new to building uclibc, but have experience building glibc and newlib,
>> and I have a question about the best way to build multiple versions of
>> uclibc from a script without any user interaction.
>
> you have experience building the kernel though right ?  uClibc largely behaves
> the same as that.
>
>> Currently, I run 'make defconfig' to create a default .config file and then
>> use grep to modify the .config file before each build (strip out some lines
>> and then append my versions back in).  I.e. I remove the ARCH_BIG_ENDIAN=y
>> line and then add in a ARCH_LITTLE_ENDIAN=y line. to change from big-endian
>> to little-endian or I may pick a different MIPS ABI.  But what I noticed is
>> that when I run the normal 'make' command after modifying .config is that
>> my .config changes are getting wiped out and .config is getting restored
>> to a default state.
>
> try `make oldconfig` first (assuming you pass ARCH=/etc... on the command line)
>
>> Can someone explain why this is happening and if there is a way to prevent
>> it?  Is there a better way to do multiple uclibc builds with different
>> defaults and without requiring any user interaction?
>
> usually the simplest thing is to create the .config files by hand as you care
> about them, and then use those when building
>
> alternatively, we could update our kconfig snapshot to the latest kernel which
> would get use miniconfig support

yea, i've done that now but syncing kconfig is always a PITA, still
didn't change
much over the years.
Anyways.

It would be awesome if somebody would try to push parts of
extra/config/kconfig-to-uclibc.tar.gz
upstream (mike? anyone? *blink* :)

Namely:
02: getopt
b0rkenness, relies on getopt_long, hardcoded. The 02 uses non-long
unconditionally
but you get the idea of how that would look like if it was written
convieniently..
You'd have to rephrase that obviously but please try to keep the short
letters as
i suggests, TIA.

03: O=
I could start an endless rant about doing out-of-tree builds which
i'll try to resist
here and now.
Put short, i really wonder how kernel's O= works, if at all.
The 03 takes care that in uClibc a
$ git clean -fxd && rm -rf /tmp/x /tmp/i
$ sudo chown -R 0.0 .
$ make O=/tmp/x ;# does defconfig or menuconfig, i forgot which one.
$ make O=/tmp/x
#$make O=/tmp/x PREFIX=/tmp/i

works.
Reminds me that i forgot to update Makefile.help (patches welcome..)

So there's your savedefconfig.
HTH,


More information about the uClibc mailing list