[buildgear-devel] Buildgear: build failure for u-boot
martin.lund at keep-it-simple.com
Tue Jun 10 08:13:04 MDT 2014
> Here are some quick questions:-
> a: Me coming from Linux kernel background, one obvious question is how do
> I custom config the kernel using menuconfig in buildgear ?
> I don’t want to manually edit the defconfig file every time in buildgear.
Buildgear does not provide any means of triggering eg. menuconfig or any
other type of configuration system. It simply builds stuff with
preconfigured configuration files.
This means that any reconfiguration of the linux kernel config using
menuconfig must be done outside of buildgear context. But its quite easy.
For example, to reconfigure the beaglebone kernel, the easiest way is to
let buildgear prepare the kernel source to make sure all patches are
included (if any):
$ buildgear build native/linux-source
Then, to reconfigure the kernel I go extract the prepared source and
reconfigures it like so:
$ cd build/package/native
$ tar xf linux-source#3.8.13-1.pkg.tar.gz
$ cd usr/src/linux
$ make ARCH=arm menuconfig
$ cp .config
That's it, kernel is reconfigured and ready to build:
$ buildgear build linux
Notice, that building linux is split into two builds:
native/linux-source and linux. The first prepares the source and the
latter simply builds the kernel from the same source. The reason this is
so is that the native toolchain build (crosstool-ng) also needs the
linux source and to avoid circular dependencies a split is required
(both native/crosstool-ng and linux depends on linux-source). Also worth
mentioning is that the kernel version is defined in the top level
configuration file (config/config) because this definition is used in
more than one buildfile.
> b: If I suppose to add a application or a library as part of fs this
> in itself should
> have a complete build system (what I mean is Makefile) ? an example for this
> in handbook would be very helpful.
Buildgear is a build system for building firmware images. As such, it
does not provide a build mechanism for building individual component
software distributions - this is what make, cmake, autoconf etc. take
So yes, in case you have some source code (be it lib or app), it would
very helpful to have a makefile that defines how to build it.
Alternatively, you could of course put all the gcc/g++/ld commands in a
buildfile - it is not recommended but I guess it could be done for quick
and dirty development/debug.
Ps. make sure that your custom Makefile features cross compilation.
More information about the buildgear-devel