non-interactive build question
Rob Landley
rob at landley.net
Wed Oct 30 21:42:46 UTC 2013
On 10/14/2013 11:43:34 AM, Steve Ellcey wrote:
>
> I am new to building uclibc,
And I'm about two weeks behind on my email. :)
> 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.
>
> 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.
>
> 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?
In Aboriginal Linux I use the miniconfig technique, which starts with
allnoconfig and switches on specific symbols, allowing dependency
resolution to happen to each one. You basically make a file going
CONFIG_BLAH=y
CONFIG_THINGY=42
And so on for each symbol you'd modify by hand if you were doing a
menuconfig after allnoconfig, and then you go:
make allnoconfig KCONFIG_ALLCONFIG=mini.conf
My basic uClibc config is here:
http://landley.net/hg/aboriginal/file/1620/sources/baseconfig-uClibc
That's the set of symbols common to all architures. The build adds the
architecture specific symbols from the architecture config files in
targets directory:
http://landley.net/hg/aboriginal/file/1620/sources/targets
So in the case of armv5l it adds:
TARGET_arm=y
CONFIG_ARM_EABI=y
ARCH_WANTS_LITTLE_ENDIAN=y
DOPIC=y
For sparc it adds this instead:
TARGET_sparc=y
UCLIBC_HAS_FPU=y
FORCE_SHAREABLE_TEXT_SEGMENTS=y
I note that I patched my copy of uClibc to remove the pointless
"ARCH_HAS_MMU" symbol:
http://landley.net/hg/aboriginal/file/1620/sources/patches/uClibc-mmu.patch
If you don't patch ARCH_HAS_MMU out, you'll have to add it to your
config in order to be able to say ARCH_USE_MMU (which is the actual
meaningful symbol).
Rob
More information about the uClibc
mailing list