Tree [ac9db1] master /

HTTPS access

File Date Author Commit
 buildtool 2015-05-16 Andrew Denisenko Andrew Denisenko [4c08fb] buildpacket: added PackageExt option
 conf 7 days ago kapeka kapeka [dcd92d] remove mariadb; does not compile yet
 contrib 2012-10-20 Yves Blusseau Yves Blusseau [d2dc91] Update buildtool completion script
 doc 2011-06-21 Andrew Denisenko Andrew Denisenko [4db573] Removed buildtool level
 make 7 days ago kapeka kapeka [679c3a] kernel: updated to upstream version 4.9.33
 repo 2 days ago kapeka kapeka [ac9db1] sqlite: updated to upstream version 3.19.03
 tools 2017-05-30 kapeka kapeka [f777e7] add armv8a (raspberry 3) to architecures build ...
 .gitignore 2013-05-06 Andrew Denisenko Andrew Denisenko [1c5739] Toolchain/linux: headers installation change
 COPYING 2011-06-21 Andrew Denisenko Andrew Denisenko [4db573] Removed buildtool level
 Changes 2012-09-16 Yves Blusseau Yves Blusseau [a29808] Buildtool upgrade
 README 2011-06-21 Andrew Denisenko Andrew Denisenko [4db573] Removed buildtool level
 TODO 2011-06-21 Andrew Denisenko Andrew Denisenko [4db573] Removed buildtool level 2015-09-26 kapeka kapeka [eff23c] - do not generate modules.tgz 2015-01-29 Erich Titl Erich Titl [de3f64] Moved pppoe to makefile-built lwp packages 2017-06-12 kapeka kapeka [165206] uClibc-ng: udated to upstrem version 1.0.25 2014-01-06 Andrew Denisenko Andrew Denisenko [c37928] buildtool: add chomp() to kbranch var 2012-03-21 david M brooke david M brooke [09be8d] must now delete conf/*/installed

Read Me

This is the second attempt to build a tool to be able to build
bering-uclibc from scratch. The first one was heavily based on buildroot
from erik andersen (from, but this time things are a bit
different. This tool is mainly written in Perl, although it still uses Makefiles
and the buildenvironment is uses comes still from buildroot (which won't change

- a working compile environment gcc+binutils+libs
- wget
- fakeroot (you can find it in the tools directory)
- Perl (testesd only with 5.6.1)

Perl modules:
- Config::General (you can install it with  perl -MCPAN -e 'install Config::General')
- libvcs-perl > 1.00 , you can get it from

- Proxy: If you need to use a http proxy to download , please set the 
environment var http_proxy according to it before you start buildtool,
e.g export http_proxy=""
Note that at this time no user authentication for a proxy is supported.

edit buildconf.cfg to adjust to your needs (especially the dir stuff).
start with a './ build buildenv ' to get a working build
 environment. This will download the required sources for you automatically.

You can make a ./ --help to get a full listing of what is
 supported now. To be honest, i already did this for you:

usage: ./ command [pkgname]|[srcname] [...]

describe [pkgname]|[srcname]     shows descriptionlines of package
list                     shows a list of build/sourced packages and sources 
[-f] source [pkgname]|[srcname]  downloads, unpacks and patches
                                 the wanted package/source
[-f] build [pkgname]|[srcname]   the same as source, but builds
                                 and installs sources/packages also
[-f] buildclean [pkgname]|[srcname]      removes everything that is outside
                                         the source dir
[-f] remove [pkgname|srcname]    remove everything from dldir or all
distclean                        remove everything
maketar                          make a tar for distribution

The -f switch allows you to force building sourcing and cleaning
 even if it seems the packages/sources are already installed or cleaned.

How things work:
First buildtool reads its config (buildtool.conf), after that it reads
the global.cfg file , which both reside in the conf subdir. 
The global.cfg defines what packages and sources are out there 
and how to find the buildtool.cfg file which must be provided for each
package. After that, buildtool searches for commands from the commandline.
Assume you make a './ build example-package' and the example-package
section (<Package example-package>) in the global.cfg says:
	Name = example-src1
	Name = example-src2

buildtool will download the sources and files for the two sources as well. So 
first of all, it will download the buildtool.cfg file from the location
defined in global.cfg. It will download such a file for every packages/source
that should be downloaded and build. After that it will download all the files 
defined in buildtool.cfg and place them in the source dir (in an subdir named as
the package, "source/example" for this example). 
Having done that, the same is done for the Required packages (downloading 
buildtool.cfg, downloading all files defined there).
Note that you have to define a file called in the files section
as this is the one that will be used by buildtool to do a 'make source' later.
This leads us to the next step. Going into each source sub-directory and 
calling a 'make -f ./ source'. This should unpack the sources
in this subdir, do the patching and whatever is needed to get a clean source
tree. But nothing is configured or made here, just unpacked.
A call to ./configure would be called by the next step , the build step. 
buildtool goes into each subdir (like before) and do a 
'make -f ./ build'
to have everything build. How the makefile actually make things is not 
of any interest for us right now, thats the part of the file. It only
has to provide some targets (see doc/writing-mkfiles). Note that build
for any source dir is done before a 'make build' in the package directory
where the sources belog too (the programs should be compiled before they
are packed ;-)...
So that's how things (should) work.

A few words about the directories in here:
source		contains all the (unpacked and even compiled) sources
		for both packages and sources, in subdirs named like
		the package/source.
		After compiling the sources should always be installed in:

build		holds the installed programs that are used to build the 
		packages. Like in source there should be always a
		subdir named as the package/source

staging		This is the place where everything needed for compiling
		should go, e.g. the gcc lives here as well as (at least 
		a copy of) all libraries that programs are compiled

doc		as you suggest, here is the documentation

make		The mastermakefile (which sets some vars and should
		be included in every mk file for soruces/packages) is here
		nothing more right now

log		In here you find the buildtoollog which is the logfile
		of buildtool. Most messages (and errors) go here, so
		you might want to have a look if things go wrong (
		or if they don't - if you like ;-)

package		In here you will find the builded packages, ready to

conf		the buildtool config files are here (buildtool.conf, 
		global.conf, and installed)

tools		includes some toolĂs that are needed to build stuff

A few words how you can use this for developing new packages. Perhaps i should
mention first that there is a switch in the buildtool.conf that can be used
to prevent buildtool from overwriting existing files. If this (OverwriteFiles)
is set to 0 buildtool will not overwrite anything, but it will also not
download. This is ment to be used if you are a developer and want to change
the buildtool or patchfiles before updating them on the server. If you don't 
use it, buildtool will overwrite your work and that's mostly not what you

If you wish (for whatever reason) to use the file to build 
by hand you should call it with something like:
'make -f source BT_BUILDROOT=/my/example/dir \
or export the BT_BUILDROOT and MASTERMAKEFILE vars into the environment. 
If you do this , everything should be fine (at least if your makefiles are
o.k. ;-)

@FIXME@ write more about developing a new package!

Please have a look at the file COPYING in this directory

(C) 2003-2004 Arne Bernin & Martin Hejl

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks