Compare commits
355 Commits
2011.08
...
2011.11_rc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1507c39b76 | ||
|
|
2af8cace6f | ||
|
|
96474df156 | ||
|
|
0900c12556 | ||
|
|
7062aff3d1 | ||
|
|
dd3177cc1a | ||
|
|
e9c52d715b | ||
|
|
88b5a31f31 | ||
|
|
eb3785fca4 | ||
|
|
4e8fd936f5 | ||
|
|
891ba7a4ef | ||
|
|
b66156835e | ||
|
|
805de39555 | ||
|
|
8bb17cd441 | ||
|
|
3ac00334d6 | ||
|
|
7998d1d3e5 | ||
|
|
f5e5aeb712 | ||
|
|
789a7cf406 | ||
|
|
d7139cd936 | ||
|
|
69f34bafa8 | ||
|
|
3456a6a66c | ||
|
|
da8ecfecef | ||
|
|
c1fa253a1b | ||
|
|
d453d0bc9c | ||
|
|
922f19fe80 | ||
|
|
6fed97eb0d | ||
|
|
a43020192f | ||
|
|
6473f6c035 | ||
|
|
3fb6010dca | ||
|
|
d64c4ed3f7 | ||
|
|
9d885487ea | ||
|
|
c872a748b0 | ||
|
|
296eb11299 | ||
|
|
f3c4d8e533 | ||
|
|
fb97591e22 | ||
|
|
db697f96b7 | ||
|
|
92bf824b7d | ||
|
|
2c8502e821 | ||
|
|
eb8f0522f8 | ||
|
|
d384d6cf32 | ||
|
|
de23afb030 | ||
|
|
934fb90437 | ||
|
|
9b3526f56a | ||
|
|
939f0074ec | ||
|
|
30bcdbbb70 | ||
|
|
c1485d51e8 | ||
|
|
ccd96a3559 | ||
|
|
7f9c4c0aa5 | ||
|
|
2a56a141e0 | ||
|
|
48391acd2c | ||
|
|
8d04fa9cc6 | ||
|
|
9d7c922c5c | ||
|
|
aeea387d82 | ||
|
|
40fcbc359e | ||
|
|
6f5df8bcfe | ||
|
|
67a7d7b7d3 | ||
|
|
6fe0b202a2 | ||
|
|
2e1e0191d6 | ||
|
|
28eeaba8ea | ||
|
|
1836d23386 | ||
|
|
d9944722c1 | ||
|
|
22c547fba9 | ||
|
|
8792cf9e0d | ||
|
|
41c1cb44cd | ||
|
|
e55af699b5 | ||
|
|
9dd51dce95 | ||
|
|
6b48629f48 | ||
|
|
34920fa79a | ||
|
|
79e288f1fd | ||
|
|
c4b0af9885 | ||
|
|
80d7b68167 | ||
|
|
19e022a92f | ||
|
|
5889480ec6 | ||
|
|
0ca7b72668 | ||
|
|
1fd04dd41f | ||
|
|
bd96e4d70e | ||
|
|
d96e977e37 | ||
|
|
6206828e3f | ||
|
|
6161049aed | ||
|
|
ea729ab3e5 | ||
|
|
79f5d0e3b9 | ||
|
|
f6674a4d37 | ||
|
|
9a83a8a035 | ||
|
|
78a8ff844b | ||
|
|
117550b687 | ||
|
|
16eebdc45f | ||
|
|
6d3f11d2bb | ||
|
|
3d19fbd268 | ||
|
|
01a07559a7 | ||
|
|
1f5fd14f58 | ||
|
|
e447322c34 | ||
|
|
5222067783 | ||
|
|
69037a4847 | ||
|
|
16eb3ed2f1 | ||
|
|
b79ab02d46 | ||
|
|
c245be2bc7 | ||
|
|
c36b5d89c5 | ||
|
|
2da2281cbc | ||
|
|
491be12ca5 | ||
|
|
a073959015 | ||
|
|
5a9d386ca9 | ||
|
|
7f4f23eb1b | ||
|
|
2500d30018 | ||
|
|
fadf985228 | ||
|
|
6c4b16f062 | ||
|
|
a872ee462e | ||
|
|
933693d81c | ||
|
|
2b87acaa8b | ||
|
|
a8edc3aed0 | ||
|
|
5c57141228 | ||
|
|
b868449483 | ||
|
|
635a7f5e10 | ||
|
|
deac48ea63 | ||
|
|
211916ed46 | ||
|
|
bde4564fa7 | ||
|
|
3bb3143d5c | ||
|
|
ea28972734 | ||
|
|
3325bc627c | ||
|
|
744070ee64 | ||
|
|
760d4afd44 | ||
|
|
f35348c3f6 | ||
|
|
da653dd4ea | ||
|
|
66e09abc57 | ||
|
|
8ece8e2775 | ||
|
|
da6353c9e7 | ||
|
|
2e57043b4d | ||
|
|
ce1940ddea | ||
|
|
54bcf87b45 | ||
|
|
95af4fbfa5 | ||
|
|
b367d67afa | ||
|
|
839ee76187 | ||
|
|
3a7149347c | ||
|
|
1459fc24c5 | ||
|
|
42c0fb4dc3 | ||
|
|
062288f173 | ||
|
|
ae2364676f | ||
|
|
c72f54bba4 | ||
|
|
2c23e93766 | ||
|
|
cec7128dc1 | ||
|
|
610d64b4b9 | ||
|
|
ddb8c639c3 | ||
|
|
0fccab65a3 | ||
|
|
41ea5c9ff3 | ||
|
|
21f91bbba5 | ||
|
|
faf408f4af | ||
|
|
9db9779a3f | ||
|
|
16c8c56ade | ||
|
|
3b661b7721 | ||
|
|
8181103018 | ||
|
|
7f7cff5239 | ||
|
|
811fab1b26 | ||
|
|
bc9954e6d6 | ||
|
|
77ffba834f | ||
|
|
2e2244d6a4 | ||
|
|
ddb3e10707 | ||
|
|
b706e4d0e4 | ||
|
|
b426e34dbc | ||
|
|
e684cecbfa | ||
|
|
a5094a056a | ||
|
|
63b7450072 | ||
|
|
08540f43b6 | ||
|
|
efb5aefbfe | ||
|
|
42a28105f1 | ||
|
|
aeaa5e9422 | ||
|
|
9bc7b1d4ae | ||
|
|
b7b75b7167 | ||
|
|
228bde4dbe | ||
|
|
e23d0d7dd2 | ||
|
|
c5da6f9553 | ||
|
|
37f0d1bb7b | ||
|
|
3903c3a73d | ||
|
|
3b3d129c37 | ||
|
|
6e3e5a99f7 | ||
|
|
6b19842c67 | ||
|
|
fca4aa2336 | ||
|
|
d1c54ade86 | ||
|
|
cedbad56db | ||
|
|
a1c1077809 | ||
|
|
1c20b39cf3 | ||
|
|
2b16f70148 | ||
|
|
b4773c0562 | ||
|
|
455eb18a5a | ||
|
|
3196096149 | ||
|
|
d6e9b16b37 | ||
|
|
54b60ba6aa | ||
|
|
b2a6615b11 | ||
|
|
8511728696 | ||
|
|
767ad6900a | ||
|
|
9e045df4e1 | ||
|
|
190700ab03 | ||
|
|
4ad5533832 | ||
|
|
44e42c61c4 | ||
|
|
0692038878 | ||
|
|
2690e76aa2 | ||
|
|
9e4aeb3c2b | ||
|
|
300f9c9c9d | ||
|
|
0849e8193e | ||
|
|
e055aea216 | ||
|
|
793a2ea517 | ||
|
|
4ed4e5016b | ||
|
|
ee0246e1e1 | ||
|
|
da76f0f155 | ||
|
|
5ebe28cce6 | ||
|
|
30f416cc86 | ||
|
|
6fd3be048d | ||
|
|
531d31d286 | ||
|
|
def45ab622 | ||
|
|
cd142e80ab | ||
|
|
167b504bcd | ||
|
|
946a0ff97a | ||
|
|
25fd4e724e | ||
|
|
1b99a27956 | ||
|
|
8d6aaaa6ff | ||
|
|
6fc42cda36 | ||
|
|
c6fe0f1ee7 | ||
|
|
57194c2bd8 | ||
|
|
13a3afc536 | ||
|
|
3fac21ef8d | ||
|
|
0a775837fb | ||
|
|
2aa09fd460 | ||
|
|
11285bd2c7 | ||
|
|
a404b4443b | ||
|
|
06c3e21596 | ||
|
|
4353fec6d7 | ||
|
|
c20ab0feca | ||
|
|
6bad62cb78 | ||
|
|
49b058c8e7 | ||
|
|
62fc4c0f77 | ||
|
|
b766ed21e8 | ||
|
|
fd68d696ea | ||
|
|
f83cacf3b5 | ||
|
|
fa3410b606 | ||
|
|
2990308404 | ||
|
|
da9ebfbe9c | ||
|
|
945b5356fa | ||
|
|
6c213d64b3 | ||
|
|
4d33cb7021 | ||
|
|
a323d0eeab | ||
|
|
53b2602296 | ||
|
|
11bdfeaf3b | ||
|
|
eaee60a1f5 | ||
|
|
29a2f3d21b | ||
|
|
c2a43fb12a | ||
|
|
3d99796923 | ||
|
|
5a615f5c7c | ||
|
|
be27a7933f | ||
|
|
33518020ba | ||
|
|
8ca82530b8 | ||
|
|
dcb43a0eb0 | ||
|
|
358601f851 | ||
|
|
8797a9cd1f | ||
|
|
a473a616d2 | ||
|
|
4b78a50089 | ||
|
|
60d4822052 | ||
|
|
832ff5c9c0 | ||
|
|
638ee5cd48 | ||
|
|
956d4ab0f5 | ||
|
|
3011d23518 | ||
|
|
ad1fd97785 | ||
|
|
ec9ec06b56 | ||
|
|
661c18bffd | ||
|
|
2455c89bab | ||
|
|
a21642c7eb | ||
|
|
16d6e9b342 | ||
|
|
cbdb0a0922 | ||
|
|
102a93bdca | ||
|
|
56da3859c7 | ||
|
|
59a326b934 | ||
|
|
20f8a7dec6 | ||
|
|
f082c7c5cf | ||
|
|
3e304db0f0 | ||
|
|
8adad451a3 | ||
|
|
fa7e650710 | ||
|
|
27b58e3972 | ||
|
|
25c117fa2a | ||
|
|
e849ff5d33 | ||
|
|
ab9a76efff | ||
|
|
307c006695 | ||
|
|
9136457992 | ||
|
|
c961e963ff | ||
|
|
1a17d9f60a | ||
|
|
60eb1eef16 | ||
|
|
b7fe77e43f | ||
|
|
065762c091 | ||
|
|
4a54dafcd2 | ||
|
|
fcc55064e1 | ||
|
|
94349b4e59 | ||
|
|
c71b56b8c1 | ||
|
|
b25b711e4a | ||
|
|
ab6b9e77fe | ||
|
|
3e4d029219 | ||
|
|
227eebae00 | ||
|
|
a50f6ef29e | ||
|
|
d1a9698bec | ||
|
|
a991e3e143 | ||
|
|
d5b35e2c70 | ||
|
|
b4df72a914 | ||
|
|
dc1b29e9bc | ||
|
|
3bb8036335 | ||
|
|
aa6e5aed3a | ||
|
|
cfbfd488fe | ||
|
|
dc32ba990a | ||
|
|
e127003af5 | ||
|
|
8e837d5dfe | ||
|
|
ed8619dafa | ||
|
|
390b552f09 | ||
|
|
48573c70e6 | ||
|
|
e2f6269e13 | ||
|
|
9bbc3f7633 | ||
|
|
98304cb6a8 | ||
|
|
2caafe6be7 | ||
|
|
617169d1d0 | ||
|
|
6c0ea9684d | ||
|
|
8ea4d5b47b | ||
|
|
cc2597d0fc | ||
|
|
63dfeb295f | ||
|
|
4c5d599d9f | ||
|
|
9268aff0e6 | ||
|
|
a8d6e2cc70 | ||
|
|
dba4b18431 | ||
|
|
0e85b480ca | ||
|
|
9c83b37ccc | ||
|
|
77cc11d533 | ||
|
|
ede8ca0019 | ||
|
|
d97542c6d8 | ||
|
|
95951797b5 | ||
|
|
f9fe656ca4 | ||
|
|
9f5a613eef | ||
|
|
170fb5361d | ||
|
|
d9d7cab7bb | ||
|
|
34d2239ac4 | ||
|
|
0cc80d1e60 | ||
|
|
46ef812801 | ||
|
|
d1a7e85170 | ||
|
|
2a49da1646 | ||
|
|
4ee8dea567 | ||
|
|
90866f2705 | ||
|
|
b1ddfecdb9 | ||
|
|
6f103474ad | ||
|
|
fe7a4b524b | ||
|
|
d5368064c2 | ||
|
|
0789fd3825 | ||
|
|
e73cf2d5f3 | ||
|
|
4b9bd9736e | ||
|
|
7b1cf6c6a4 | ||
|
|
d2f84e1623 | ||
|
|
60b9bbfca9 | ||
|
|
6d267a8a35 | ||
|
|
3f346b7b85 | ||
|
|
5f150dc6d8 | ||
|
|
bd387486ad | ||
|
|
044edd0637 | ||
|
|
8a124c78ed | ||
|
|
5427c506bd | ||
|
|
d1dd9588ae |
86
CHANGES
86
CHANGES
@@ -1,3 +1,89 @@
|
||||
2011.11-rc1, Released November 11th, 2011:
|
||||
|
||||
Fixes all over the tree and new features.
|
||||
|
||||
Moved misc scripts and support stuff to support/. Renamed
|
||||
patch-kernel.sh to support/scripts/apply-patches.sh.
|
||||
|
||||
Documentation: Moved to asciidoc format, make targets to
|
||||
generate text/html/pdf/epub output added.
|
||||
|
||||
Defconfigs: Qemu configs updated to 3.1 kernel and readmes
|
||||
added.
|
||||
|
||||
Bootloaders: Add support for custom git tree / tarballs for
|
||||
barebox, similar to how it's handled for u-boot. Clean up
|
||||
menuconfig options.
|
||||
|
||||
Toolchain: Update external codesourcery toolchain download
|
||||
URLs after Codesourcery got bought by Mentor, add x86
|
||||
toolchain, update toolchain versions and optimize toolchain
|
||||
sysroot copying. Fix uClibc 0.9.32 builds for e500 PPC,
|
||||
updated GDB versions / download URLs. Binutils
|
||||
libbfd/libopcodes static/dynamic linking fix. GCC 4.6.2 added,
|
||||
use ctng-1.13.0.
|
||||
|
||||
Package infrastructure: Support for local packages /
|
||||
overrides, package dir / name arguments dropped from
|
||||
{GEN,AUTO,CMAKE}TARGETS.
|
||||
|
||||
Linux: Kernel extensions infrastructure support, Xenomai +
|
||||
RTAI support.
|
||||
|
||||
Updated/fixed packages: acpid, bind, busybox, dash, dbus,
|
||||
dbus-glib, directfb, dnsmasq, drystone, e2fsprogs, ethtool,
|
||||
fakeroot, fbdump, file, freetype, fuse, gamin, gmp, gmpc,
|
||||
gnutls, gob2, gst-plugins-{base,bad,good,ugly}, gstreamer,
|
||||
hostapd, ifplugd, imagemagick, intltool, ipsec-tools, ipset,
|
||||
iptables, iw, jpeg, kexec, leafpad, less, libargtable2, libao,
|
||||
libconfuse, libcuefile, libcurl, libdaemon, libevent,
|
||||
libglib2, libiconv, libmpd, libreplaygain, libroxml,
|
||||
libsamplerate, libsndfile, libsoup, libsvgtiny, libtool,
|
||||
libxcb, lighttpd, links, linux-fusion, lite, lrzsz, lsof, lzo,
|
||||
lzop, makedevs, mcookie, mpg123, mpd, mpfr, mtd, musepack,
|
||||
mutt, mysql_client, ncftp, ncurses, neon, netcat, netsnmp,
|
||||
ntfs-3g, ntfsprogs, ntp, openntpd, openssh, openssl, oprofile,
|
||||
orc, pciutils, psmisc, python, qt, quagga, radvd, rpm, rsync,
|
||||
samba, sawman, sdl_sound, smartmontools, sqlite, squid,
|
||||
stunnel, sudo, sylpheed, sysstat, taglib, tar, tcpreplay,
|
||||
tslib, usbutils, util-linux, valgrind, wget, whetstone, which,
|
||||
wpa-supplicant, xdata_xcursor-themes, xmlstarlet, xterm
|
||||
|
||||
New packages: bluez-utils, cifs-utils, fftw, fluxbox, json-c,
|
||||
libev, libftdi, libgeotiff, libmodbus, libplayer, live555,
|
||||
ngrep, noip, opencv, openocd, picocom, poco, portaudio,
|
||||
pulseaudio, pv, rtai, vala, xenomai.
|
||||
|
||||
Removed packages: liboil, sfdisk, swfdec, webif
|
||||
|
||||
Issues resolved (http://bugs.uclibc.org):
|
||||
|
||||
#505: live555: new package
|
||||
#507: Enable live and tv options in MPlayer-1.0rc2
|
||||
#531: let e2fsprogs package to export headers to staging dir if needed
|
||||
#1171: Linuxthreads new cannot find sysdep.h
|
||||
#1357: Add bluez to buildroot system
|
||||
#2107: New package: input-event-daemon
|
||||
#2599: New package: orc (Oil Runtime Compiler)
|
||||
#2605: gstreamer: Update to 0.10.30
|
||||
#2677: introducing util-linux-ng as replacement for util-linux
|
||||
#2917: Qt: Add declarative module
|
||||
#3145: jffs2 image generation fails
|
||||
#3271: netperf-2.4.5 fails to compile
|
||||
#3331: xdata_xcursor-themes depends on xcursorgen
|
||||
#3343: Add file:// download SITE_METHOD
|
||||
#3391: Add support for specifying an external kernel tree
|
||||
#3631: Error while compiling with Xorg
|
||||
#3709: oprofile doesn't build for mipsel
|
||||
#3925: midori not getting compile
|
||||
#4045: Add support for downloading i386 toolchains from codesourcery
|
||||
#4165: lrzsz-fix-symlink-at-rebuild.patch
|
||||
#4171: makedevs-unused-but-set-variable.patch
|
||||
#4183: Codesourcery toolchain download site has changed
|
||||
#4231: libneon.so: undefined reference to `SSL_SESSION_cmp'
|
||||
#4381: Add option to lighttpd to enable Lua support
|
||||
#4387: Make sure that dest dir exists before installing mtd files
|
||||
|
||||
2011.08, Released August 31th, 2011:
|
||||
|
||||
Fixes all over the tree.
|
||||
|
||||
14
Config.in
14
Config.in
@@ -32,6 +32,10 @@ config BR2_GIT
|
||||
string "Git command"
|
||||
default "git"
|
||||
|
||||
config BR2_LOCALFILES
|
||||
string "Local files retrieval command"
|
||||
default "cp"
|
||||
|
||||
config BR2_ZCAT
|
||||
string "zcat command"
|
||||
default "gzip -d -c"
|
||||
@@ -334,6 +338,16 @@ config BR2_HAVE_DEVFILES
|
||||
Install headers and static libraries in the
|
||||
target filesystem
|
||||
|
||||
config BR2_PACKAGE_OVERRIDE_FILE
|
||||
string "location of a package override file"
|
||||
default "$(TOPDIR)/local.mk"
|
||||
help
|
||||
A package override file is a short makefile that contains
|
||||
variable definitions of the form <pkg>_OVERRIDE_SRCDIR,
|
||||
which allows to tell Buildroot to use an existing directory
|
||||
as the source directory for a particular package. See the
|
||||
Buildroot documentation for more details on this feature.
|
||||
|
||||
endmenu
|
||||
|
||||
source "toolchain/Config.in"
|
||||
|
||||
78
Makefile
78
Makefile
@@ -24,7 +24,7 @@
|
||||
#--------------------------------------------------------------
|
||||
|
||||
# Set and export the version string
|
||||
export BR2_VERSION:=2011.08
|
||||
export BR2_VERSION:=2011.11-rc1
|
||||
|
||||
# This top-level Makefile can *not* be executed in parallel
|
||||
.NOTPARALLEL:
|
||||
@@ -32,12 +32,12 @@ export BR2_VERSION:=2011.08
|
||||
# absolute path
|
||||
TOPDIR:=$(shell pwd)
|
||||
CONFIG_CONFIG_IN=Config.in
|
||||
CONFIG=package/config
|
||||
CONFIG=support/kconfig
|
||||
DATE:=$(shell date +%Y%m%d)
|
||||
|
||||
# Compute the full local version string so packages can use it as-is
|
||||
# Need to export it, so it can be got from environment in children (eg. mconf)
|
||||
export BR2_VERSION_FULL:=$(BR2_VERSION)$(shell $(TOPDIR)/scripts/setlocalversion)
|
||||
export BR2_VERSION_FULL:=$(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlocalversion)
|
||||
|
||||
noconfig_targets:=menuconfig nconfig gconfig xconfig config oldconfig randconfig \
|
||||
defconfig %_defconfig savedefconfig allyesconfig allnoconfig silentoldconfig release \
|
||||
@@ -193,7 +193,7 @@ unexport CFLAGS
|
||||
unexport CXXFLAGS
|
||||
unexport GREP_OPTIONS
|
||||
|
||||
GNU_HOST_NAME:=$(shell package/gnuconfig/config.guess)
|
||||
GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess)
|
||||
|
||||
#############################################################
|
||||
#
|
||||
@@ -309,6 +309,13 @@ else ifeq ($(BR2_TOOLCHAIN_CTNG),y)
|
||||
include toolchain/toolchain-crosstool-ng.mk
|
||||
endif
|
||||
|
||||
# Include the package override file if one has been provided in the
|
||||
# configuration.
|
||||
PACKAGE_OVERRIDE_FILE=$(call qstrip,$(BR2_PACKAGE_OVERRIDE_FILE))
|
||||
ifneq ($(PACKAGE_OVERRIDE_FILE),)
|
||||
-include $(PACKAGE_OVERRIDE_FILE)
|
||||
endif
|
||||
|
||||
include package/*/*.mk
|
||||
|
||||
include boot/common.mk
|
||||
@@ -425,7 +432,7 @@ erase-fakeroots:
|
||||
|
||||
target-finalize:
|
||||
ifeq ($(BR2_HAVE_DEVFILES),y)
|
||||
( scripts/copy.sh $(STAGING_DIR) $(TARGET_DIR) )
|
||||
( support/scripts/copy.sh $(STAGING_DIR) $(TARGET_DIR) )
|
||||
else
|
||||
rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/aclocal
|
||||
find $(TARGET_DIR)/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
|
||||
@@ -607,7 +614,7 @@ endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
|
||||
# output directory.
|
||||
outputmakefile:
|
||||
ifeq ($(NEED_WRAPPER),y)
|
||||
$(Q)$(TOPDIR)/scripts/mkmakefile $(TOPDIR) $(O)
|
||||
$(Q)$(TOPDIR)/support/scripts/mkmakefile $(TOPDIR) $(O)
|
||||
endif
|
||||
|
||||
clean:
|
||||
@@ -664,6 +671,14 @@ ifeq ($(BR2_TARGET_BAREBOX),y)
|
||||
@echo ' barebox-menuconfig - Run barebox menuconfig'
|
||||
@echo ' barebox-savedefconfig - Run barebox savedefconfig'
|
||||
endif
|
||||
@echo
|
||||
@echo 'Documentation:'
|
||||
@echo ' manual - build manual in HTML, split HTML, PDF and txt'
|
||||
@echo ' manual-html - build manual in HTML'
|
||||
@echo ' manual-split-html - build manual in split HTML'
|
||||
@echo ' manual-pdf - build manual in PDF'
|
||||
@echo ' manual-txt - build manual in txt'
|
||||
@echo ' manual-epub - build manual in ePub'
|
||||
@echo
|
||||
@echo 'Miscellaneous:'
|
||||
@echo ' source - download all sources needed for offline-build'
|
||||
@@ -676,7 +691,7 @@ endif
|
||||
@$(foreach b, $(sort $(notdir $(wildcard $(TOPDIR)/configs/*_defconfig))), \
|
||||
printf " %-35s - Build for %s\\n" $(b) $(b:_defconfig=);)
|
||||
@echo
|
||||
@echo 'See docs/README and docs/buildroot.html for further details'
|
||||
@echo 'See docs/README, or generate the Buildroot manual for further details'
|
||||
@echo
|
||||
|
||||
release: OUT=buildroot-$(BR2_VERSION)
|
||||
@@ -684,5 +699,54 @@ release: OUT=buildroot-$(BR2_VERSION)
|
||||
release:
|
||||
git archive --format=tar --prefix=$(OUT)/ master|gzip -9 >$(OUT).tar.gz
|
||||
|
||||
################################################################################
|
||||
# GENDOC -- generates the make targets needed to build a specific type of
|
||||
# asciidoc documentation.
|
||||
#
|
||||
# argument 1 is the name of the document and must be a subdirectory of docs/;
|
||||
# the top-level asciidoc file must have the same name
|
||||
# argument 2 is the type of document to generate (-f argument of a2x)
|
||||
# argument 3 is the document type as used in the make target
|
||||
# argument 4 is the output file extension for the document type
|
||||
# argument 5 is the human text for the document type
|
||||
# argument 6 (optional) are extra arguments for a2x
|
||||
#
|
||||
# The variable <DOCUMENT_NAME>_SOURCES defines the dependencies.
|
||||
################################################################################
|
||||
define GENDOC_INNER
|
||||
$(1): $(1)-$(3)
|
||||
.PHONY: $(1)-$(3)
|
||||
$(1)-$(3): $$(O)/docs/$(1)/$(1).$(4)
|
||||
|
||||
$$(O)/docs/$(1)/$(1).$(4): docs/$(1)/$(1).txt $$($(call UPPERCASE,$(1))_SOURCES)
|
||||
@echo "Generating $(5) $(1)..."
|
||||
$(Q)mkdir -p $$(O)/docs/$(1)/$(2)
|
||||
$(Q)a2x $(6) -f $(2) -d book -L -r $(TOPDIR)/docs/images \
|
||||
-D $$(@D) $$<
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# GENDOC -- generates the make targets needed to build asciidoc documentation.
|
||||
#
|
||||
# argument 1 is the name of the document and must be a subdirectory of docs/;
|
||||
# the top-level asciidoc file must have the same name
|
||||
#
|
||||
# The variable <DOCUMENT_NAME>_SOURCES defines the dependencies.
|
||||
################################################################################
|
||||
define GENDOC
|
||||
$(call GENDOC_INNER,$(1),xhtml,html,html,HTML)
|
||||
$(call GENDOC_INNER,$(1),chunked,split-html,chunked,Split HTML)
|
||||
$(call GENDOC_INNER,$(1),pdf,pdf,pdf,PDF,--dblatex-opts "-P latex.output.revhistory=0")
|
||||
$(call GENDOC_INNER,$(1),text,txt,text,Text)
|
||||
$(call GENDOC_INNER,$(1),epub,epub,epub,EPUB)
|
||||
clean: clean-$(1)
|
||||
clean-$(1):
|
||||
$(Q)$(RM) -rf $(O)/docs/$(1)
|
||||
.PHONY: $(1) clean-$(1)
|
||||
endef
|
||||
|
||||
MANUAL_SOURCES = $(wildcard docs/manual/*.txt) $(wildcard docs/images/*)
|
||||
$(eval $(call GENDOC,manual))
|
||||
|
||||
.PHONY: $(noconfig_targets)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
6
board/qemu/arm-versatile/readme.txt
Normal file
6
board/qemu/arm-versatile/readme.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
Run the emulation with:
|
||||
|
||||
qemu-system-arm -M versatilepb -kernel output/images/zImage -drive file=output/images/rootfs.ext2,if=scsi -append "root=/dev/sda console=ttyAMA0,115200" -serial stdio
|
||||
|
||||
The login prompt will appear in the terminal that started Qemu. The
|
||||
graphical window is the framebuffer.
|
||||
@@ -1,17 +0,0 @@
|
||||
diff --git a/arch/sh/include/asm/syscalls_32.h b/arch/sh/include/asm/syscalls_32.h
|
||||
index be201fd..454538a 100644
|
||||
--- a/arch/sh/include/asm/syscalls_32.h
|
||||
+++ b/arch/sh/include/asm/syscalls_32.h
|
||||
@@ -19,8 +19,10 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
|
||||
asmlinkage int sys_vfork(unsigned long r4, unsigned long r5,
|
||||
unsigned long r6, unsigned long r7,
|
||||
struct pt_regs __regs);
|
||||
-asmlinkage int sys_execve(const char __user *ufilename, char __user * __user *uargv,
|
||||
- char __user * __user *uenvp, unsigned long r7,
|
||||
+asmlinkage int sys_execve(const char __user *ufilename,
|
||||
+ const char __user *const __user *uargv,
|
||||
+ const char __user *const __user *uenvp,
|
||||
+ unsigned long r7,
|
||||
struct pt_regs __regs);
|
||||
asmlinkage int sys_sigsuspend(old_sigset_t mask, unsigned long r5,
|
||||
unsigned long r6, unsigned long r7,
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
|
||||
index 33990fa..06645b6 100644
|
||||
--- a/arch/sh/Kconfig
|
||||
+++ b/arch/sh/Kconfig
|
||||
@@ -45,7 +45,7 @@ config SUPERH32
|
||||
select HAVE_ARCH_KGDB
|
||||
select HAVE_HW_BREAKPOINT
|
||||
select HAVE_MIXED_BREAKPOINTS_REGS
|
||||
- select PERF_EVENTS if HAVE_HW_BREAKPOINT
|
||||
+ select PERF_EVENTS
|
||||
select ARCH_HIBERNATION_POSSIBLE if MMU
|
||||
|
||||
config SUPERH64
|
||||
@@ -48,7 +48,6 @@ CONFIG_INPUT_FF_MEMLESS=m
|
||||
CONFIG_VT_HW_CONSOLE_BINDING=y
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_SH_SCI=y
|
||||
CONFIG_SERIAL_SH_SCI_NR_UARTS=1
|
||||
CONFIG_SERIAL_SH_SCI_CONSOLE=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_SPI=y
|
||||
@@ -1,17 +1,7 @@
|
||||
This little documentation explains how to build a kernel and a rootfs
|
||||
for qemu with sh4 architecture.
|
||||
Run the emulation with:
|
||||
|
||||
1) Select qemu sh4 configuration and compile it :
|
||||
qemu-system-sh4 -M r2d -kernel output/images/zImage -drive file=output/images/rootfs.ext2,if=ide -append "root=/dev/sda console=ttySC1,115200 noiotrap" -serial null -serial stdio
|
||||
|
||||
make sh4_defconfig
|
||||
make all
|
||||
The login prompt will appear in the terminal that started Qemu.
|
||||
The graphical window is the framebuffer.
|
||||
|
||||
2) Run qemu-system-sh4 with the kernel and rootfs previously generated
|
||||
|
||||
It's recommended to use a git release for qemu (the current stable
|
||||
version has framebuffer display issues). If you want to avoid building
|
||||
all target, you can use this option on qemu configure :
|
||||
--target-list=sh4-softmmu
|
||||
|
||||
The command is :
|
||||
qemu-system-sh4 -M r2d -kernel output/images/zImage -drive file=output/images/rootfs.ext2,if=ide,format=raw -append root=/dev/sda console=ttySC1,115200 noiotrap
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
# CONFIG_LOCALVERSION_AUTO is not set
|
||||
# CONFIG_SWAP is not set
|
||||
CONFIG_RCU_FANOUT=32
|
||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_IOSCHED_CFQ is not set
|
||||
# CONFIG_X86_EXTENDED_PLATFORM is not set
|
||||
# CONFIG_SCHED_OMIT_FRAME_POINTER is not set
|
||||
# CONFIG_NO_BOOTMEM is not set
|
||||
# CONFIG_X86_RESERVE_LOW_64K is not set
|
||||
# CONFIG_MTRR_SANITIZER is not set
|
||||
# CONFIG_SECCOMP is not set
|
||||
# CONFIG_RELOCATABLE is not set
|
||||
@@ -29,7 +25,6 @@ CONFIG_IP_PNP=y
|
||||
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
|
||||
# CONFIG_FIRMWARE_IN_KERNEL is not set
|
||||
# CONFIG_BLK_DEV is not set
|
||||
# CONFIG_MISC_DEVICES is not set
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_ATA=y
|
||||
CONFIG_ATA_PIIX=y
|
||||
@@ -44,13 +39,16 @@ CONFIG_8139CP=y
|
||||
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
# CONFIG_SERIO_SERPORT is not set
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
# CONFIG_DEVKMEM is not set
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
# CONFIG_HW_RANDOM is not set
|
||||
# CONFIG_HWMON is not set
|
||||
# CONFIG_MFD_SUPPORT is not set
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SND=y
|
||||
CONFIG_SND_HDA_INTEL=y
|
||||
# CONFIG_HID_SUPPORT is not set
|
||||
# CONFIG_USB_SUPPORT is not set
|
||||
# CONFIG_X86_PLATFORM_DEVICES is not set
|
||||
@@ -63,9 +61,7 @@ CONFIG_NFS_FS=y
|
||||
CONFIG_ROOT_NFS=y
|
||||
# CONFIG_ENABLE_WARN_DEPRECATED is not set
|
||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
||||
CONFIG_FRAME_WARN=1024
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
# CONFIG_FRAME_POINTER is not set
|
||||
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
|
||||
# CONFIG_X86_VERBOSE_BOOTUP is not set
|
||||
# CONFIG_VIRTUALIZATION is not set
|
||||
@@ -1,4 +1,4 @@
|
||||
menuconfig BR2_TARGET_AT91BOOTSTRAP
|
||||
config BR2_TARGET_AT91BOOTSTRAP
|
||||
depends on BR2_arm
|
||||
bool "AT91 Bootstrap"
|
||||
help
|
||||
|
||||
@@ -29,7 +29,7 @@ define AT91BOOTSTRAP_INSTALL_IMAGES_CMDS
|
||||
cp $(@D)/$(AT91BOOTSTRAP_BINARY) $(BINARIES_DIR)
|
||||
endef
|
||||
|
||||
$(eval $(call GENTARGETS,boot,at91bootstrap))
|
||||
$(eval $(call GENTARGETS))
|
||||
|
||||
ifeq ($(BR2_TARGET_AT91BOOTSTRAP),y)
|
||||
# we NEED a board name unless we're at make source
|
||||
|
||||
@@ -19,4 +19,4 @@ define AT91DATAFLASHBOOT_INSTALL_IMAGES_CMDS
|
||||
cp $(@D)/DataflashBoot-$(AT91DATAFLASHBOOT_VERSION).bin $(BINARIES_DIR)
|
||||
endef
|
||||
|
||||
$(eval $(call GENTARGETS,boot,at91dataflashboot))
|
||||
$(eval $(call GENTARGETS))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
menuconfig BR2_TARGET_BAREBOX
|
||||
config BR2_TARGET_BAREBOX
|
||||
bool "Barebox"
|
||||
help
|
||||
The Barebox bootloader, formerly known as U-Boot v2.
|
||||
@@ -6,6 +6,64 @@ menuconfig BR2_TARGET_BAREBOX
|
||||
http://www.barebox.org
|
||||
|
||||
if BR2_TARGET_BAREBOX
|
||||
choice
|
||||
prompt "version"
|
||||
default BR2_TARGET_BAREBOX_2011_10
|
||||
help
|
||||
Select the specific Barebox version you want to use
|
||||
|
||||
config BR2_TARGET_BAREBOX_2011_08
|
||||
depends on BR2_DEPRECATED
|
||||
bool "2011.08"
|
||||
|
||||
config BR2_TARGET_BAREBOX_2011_09
|
||||
bool "2011.09"
|
||||
|
||||
config BR2_TARGET_BAREBOX_2011_10
|
||||
bool "2011.10"
|
||||
|
||||
config BR2_TARGET_BAREBOX_CUSTOM_TARBALL
|
||||
bool "Custom tarball"
|
||||
|
||||
config BR2_TARGET_BAREBOX_CUSTOM_GIT
|
||||
bool "Custom Git repository"
|
||||
|
||||
endchoice
|
||||
|
||||
if BR2_TARGET_BAREBOX_CUSTOM_TARBALL
|
||||
|
||||
config BR2_TARGET_BAREBOX_CUSTOM_TARBALL_LOCATION
|
||||
string "URL of custom Barebox tarball"
|
||||
|
||||
endif
|
||||
|
||||
config BR2_TARGET_BAREBOX_VERSION
|
||||
string
|
||||
default "2011.08.0" if BR2_TARGET_BAREBOX_2011_08
|
||||
default "2011.09.0" if BR2_TARGET_BAREBOX_2011_09
|
||||
default "2011.10.0" if BR2_TARGET_BAREBOX_2011_10
|
||||
default "custom" if BR2_TARGET_BAREBOX_CUSTOM_TARBALL
|
||||
default $BR2_TARGET_BAREBOX_CUSTOM_GIT_VERSION if BR2_TARGET_BAREBOX_CUSTOM_GIT
|
||||
|
||||
config BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR
|
||||
string "custom patch dir"
|
||||
help
|
||||
If your board requires custom patches, add the path to the
|
||||
directory containing the patches here. The patches must be
|
||||
named barebox-<version>-<something>.patch.
|
||||
|
||||
Most users may leave this empty
|
||||
|
||||
if BR2_TARGET_BAREBOX_CUSTOM_GIT
|
||||
|
||||
config BR2_TARGET_BAREBOX_CUSTOM_GIT_REPO_URL
|
||||
string "URL of custom Git repository"
|
||||
|
||||
config BR2_TARGET_BAREBOX_CUSTOM_GIT_VERSION
|
||||
string "Custom Git version"
|
||||
|
||||
endif
|
||||
|
||||
config BR2_TARGET_BAREBOX_BOARD_DEFCONFIG
|
||||
string "board defconfig"
|
||||
help
|
||||
|
||||
@@ -4,9 +4,30 @@
|
||||
#
|
||||
#############################################################
|
||||
|
||||
BAREBOX_VERSION = 2011.08.0
|
||||
BAREBOX_VERSION = $(call qstrip,$(BR2_TARGET_BAREBOX_VERSION))
|
||||
|
||||
ifeq ($(BAREBOX_VERSION),custom)
|
||||
# Handle custom Barebox tarballs as specified by the configuration
|
||||
BAREBOX_TARBALL = $(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_TARBALL_LOCATION))
|
||||
BAREBOX_SITE = $(dir $(BAREBOX_TARBALL))
|
||||
BAREBOX_SOURCE = $(notdir $(BAREBOX_TARBALL))
|
||||
else ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_GIT),y)
|
||||
BAREBOX_SITE = $(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_GIT_REPO_URL))
|
||||
BAREBOX_SITE_METHOD = git
|
||||
else
|
||||
# Handle stable official Barebox versions
|
||||
BAREBOX_SOURCE = barebox-$(BAREBOX_VERSION).tar.bz2
|
||||
BAREBOX_SITE = http://www.barebox.org/download/
|
||||
endif
|
||||
|
||||
ifneq ($(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR)),)
|
||||
define BAREBOX_APPLY_CUSTOM_PATCHES
|
||||
support/scripts/apply-patches.sh $(@D) $(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR) \
|
||||
barebox-$(BAREBOX_VERSION)-\*.patch
|
||||
endef
|
||||
|
||||
BAREBOX_POST_PATCH_HOOKS += BAREBOX_APPLY_CUSTOM_PATCHES
|
||||
endif
|
||||
|
||||
BAREBOX_INSTALL_IMAGES = YES
|
||||
ifneq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
|
||||
@@ -51,7 +72,7 @@ define BAREBOX_INSTALL_TARGET_CMDS
|
||||
endef
|
||||
endif
|
||||
|
||||
$(eval $(call GENTARGETS,boot,barebox))
|
||||
$(eval $(call GENTARGETS))
|
||||
|
||||
ifeq ($(BR2_TARGET_BAREBOX),y)
|
||||
# we NEED a board defconfig file unless we're at make source
|
||||
|
||||
@@ -9,7 +9,7 @@ config BR2_TARGET_GRUB_SPLASH
|
||||
depends on BR2_TARGET_GRUB
|
||||
help
|
||||
Add support for splashimage.
|
||||
|
||||
|
||||
A splashimage is a 14-color indexed .xpm picture which
|
||||
is displayed as background for the grub menu.
|
||||
|
||||
|
||||
@@ -82,4 +82,4 @@ define GRUB_UNINSTALL_TARGET_CMDS
|
||||
rm -rf $(TARGET_DIR)/boot/grub
|
||||
endef
|
||||
|
||||
$(eval $(call AUTOTARGETS,boot,grub))
|
||||
$(eval $(call AUTOTARGETS))
|
||||
|
||||
@@ -26,4 +26,4 @@ define SYSLINUX_INSTALL_IMAGES_CMDS
|
||||
done
|
||||
endef
|
||||
|
||||
$(eval $(call GENTARGETS,boot,syslinux))
|
||||
$(eval $(call GENTARGETS))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
menuconfig BR2_TARGET_UBOOT
|
||||
config BR2_TARGET_UBOOT
|
||||
bool "U-Boot"
|
||||
help
|
||||
Build "Das U-Boot" Boot Monitor
|
||||
@@ -92,10 +92,9 @@ config BR2_TARGET_UBOOT_FORMAT_LDR
|
||||
endchoice
|
||||
|
||||
menuconfig BR2_TARGET_UBOOT_NETWORK
|
||||
bool "Network Settings"
|
||||
default y
|
||||
bool "Custom Network Settings"
|
||||
help
|
||||
Network settings for U-boot
|
||||
Custom network settings for U-boot
|
||||
|
||||
if BR2_TARGET_UBOOT_NETWORK
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ endef
|
||||
|
||||
ifneq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR)),)
|
||||
define UBOOT_APPLY_CUSTOM_PATCHES
|
||||
toolchain/patch-kernel.sh $(@D) $(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR) \
|
||||
support/scripts/apply-patches.sh $(@D) $(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR) \
|
||||
uboot-$(UBOOT_VERSION)-\*.patch
|
||||
endef
|
||||
|
||||
@@ -88,7 +88,7 @@ define UBOOT_INSTALL_IMAGES_CMDS
|
||||
cp -dpf $(@D)/$(UBOOT_BIN) $(BINARIES_DIR)/
|
||||
endef
|
||||
|
||||
$(eval $(call GENTARGETS,boot,uboot))
|
||||
$(eval $(call GENTARGETS))
|
||||
|
||||
ifeq ($(BR2_TARGET_UBOOT),y)
|
||||
# we NEED a board name unless we're at make source
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
menuconfig BR2_TARGET_XLOADER
|
||||
config BR2_TARGET_XLOADER
|
||||
bool "X-loader"
|
||||
depends on BR2_cortex_a8 || BR2_cortex_a9
|
||||
help
|
||||
|
||||
@@ -19,7 +19,7 @@ define XLOADER_INSTALL_IMAGES_CMDS
|
||||
$(INSTALL) -D -m 0755 $(@D)/MLO $(BINARIES_DIR)/
|
||||
endef
|
||||
|
||||
$(eval $(call GENTARGETS,boot,xloader))
|
||||
$(eval $(call GENTARGETS))
|
||||
|
||||
#############################################################
|
||||
#
|
||||
|
||||
@@ -25,8 +25,7 @@ BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="http://repo.or.cz/w/u-boot-openmoko/mi
|
||||
# Kernel
|
||||
#
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="http://www.pauljones.id.au/temp/linux-2.6.32.2-mini2440_20100113.tgz"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/friendlyarm/mini2440/linux-2.6.32.2.config"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.0.4"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="mini2440"
|
||||
BR2_LINUX_KERNEL_UIMAGE=y
|
||||
|
||||
@@ -13,7 +13,7 @@ BR2_TARGET_ROOTFS_EXT2=y
|
||||
# Kernel
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.38.8"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.1"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux-2.6.38.config"
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux-3.1.config"
|
||||
BR2_LINUX_KERNEL_ZIMAGE=y
|
||||
|
||||
@@ -9,9 +9,9 @@ BR2_TARGET_ROOTFS_EXT2=y
|
||||
# Kernel
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.38.8"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.1"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/mipsel-malta/linux-2.6.38.config"
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/mipsel-malta/linux-3.1.config"
|
||||
BR2_LINUX_KERNEL_VMLINUX=y
|
||||
|
||||
# Serial port config
|
||||
|
||||
@@ -9,9 +9,9 @@ BR2_TARGET_ROOTFS_EXT2=y
|
||||
# Kernel
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.36"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.1"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/powerpc-g3beige/linux-2.6.36.config"
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/powerpc-g3beige/linux-3.1.config"
|
||||
BR2_LINUX_KERNEL_VMLINUX=y
|
||||
|
||||
# Serial port config
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
BR2_sh=y
|
||||
BR2_sh4=y
|
||||
|
||||
# system
|
||||
BR2_TARGET_GENERIC_GETTY=y
|
||||
BR2_TARGET_GENERIC_GETTY_PORT="ttySC1"
|
||||
|
||||
# filesystem
|
||||
BR2_TARGET_ROOTFS_EXT2=y
|
||||
# BR2_TARGET_ROOTFS_TAR is not set
|
||||
@@ -14,8 +18,7 @@ BR2_EXTRA_GCC_CONFIG_OPTIONS="--with-multilib-list=m4,m4-nofpu"
|
||||
# Linux kernel
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.36"
|
||||
BR2_LINUX_KERNEL_PATCH="board/qemu/sh4-r2d/kernel-patches/"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.1"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/sh4-r2d/linux-2.6.36.config"
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/sh4-r2d/linux-3.1.config"
|
||||
BR2_LINUX_KERNEL_ZIMAGE=y
|
||||
|
||||
@@ -12,6 +12,6 @@ BR2_TARGET_ROOTFS_EXT2=y
|
||||
# Kernel
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.36"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.0.4"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86/linux-2.6.36.config"
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86/linux-3.0.config"
|
||||
|
||||
@@ -1,240 +0,0 @@
|
||||
<!--#include file="header.html" -->
|
||||
|
||||
<h2>uClibc vs. glibc</h2>
|
||||
|
||||
<p>
|
||||
uClibc and Glibc are not the same -- there are a number of differences which
|
||||
may or may not cause you problems. This document attempts to list these
|
||||
differences and, when completed, will contain a full list of all relevant
|
||||
differences.
|
||||
<br><br></p>
|
||||
<ol>
|
||||
<li>uClibc is smaller than glibc. We attempt to maintain a glibc compatible
|
||||
interface, allowing applications that compile with glibc to easily compile with
|
||||
uClibc. However, we do not include _everything_ that glibc includes, and
|
||||
therefore some applications may not compile. If this happens to you, please
|
||||
report the failure to the uclibc mailing list, with detailed error messages.
|
||||
</li><br>
|
||||
<li>uClibc is much more configurable then glibc. This means that a developer
|
||||
may have compiled uClibc in such a way that significant amounts of
|
||||
functionality have been omitted.
|
||||
</li><br>
|
||||
<li>uClibc does not even attempt to ensure binary compatibility across releases.
|
||||
When a new version of uClibc is released, you may or may not need to recompile
|
||||
all your binaries.
|
||||
</li><br>
|
||||
<li><ul><li> malloc(0) in glibc returns a valid pointer to something(!?!?) while in
|
||||
uClibc calling malloc(0) returns a NULL. The behavior of malloc(0) is listed
|
||||
as implementation-defined by SuSv3, so both libraries are equally correct.
|
||||
This difference also applies to realloc(NULL, 0). I personally feel glibc's
|
||||
behavior is not particularly safe. To enable glibc behavior, one has to
|
||||
explicitly enable the MALLOC_GLIBC_COMPAT option.
|
||||
</li><br><li>
|
||||
glibc's malloc() implementation has behavior that is tunable via the
|
||||
MALLOC_CHECK_ environment variable. This is primarily used to provide extra
|
||||
malloc debugging features. These extended malloc debugging features are not
|
||||
available within uClibc. There are many good malloc debugging libraries
|
||||
available for Linux (dmalloc, electric fence, valgrind, etc) that work much
|
||||
better than the glibc extended malloc debugging. So our omitting this
|
||||
functionality from uClibc is not a great loss.
|
||||
</li><br>
|
||||
</ul></li>
|
||||
<li>uClibc does not provide a database library (libdb).
|
||||
</li><br>
|
||||
<li>uClibc does not support NSS (/lib/libnss_*), which allows glibc to easily
|
||||
support various methods of authentication and DNS resolution. uClibc only
|
||||
supports flat password files and shadow password files for storing
|
||||
authentication information. If you need something more complex than this,
|
||||
you can compile and install pam.
|
||||
</li><br>
|
||||
<li>uClibc's libresolv is only a stub. Some, but not all of the functionality
|
||||
provided by glibc's libresolv is provided internal to uClibc. Other functions
|
||||
are not at all implemented.
|
||||
</li><br>
|
||||
<li>libnsl provides support for Network Information Service (NIS) which was
|
||||
originally called "Yellow Pages" or "YP", which is an extension of RPC invented
|
||||
by Sun to share Unix password files over the network. I personally think NIS
|
||||
is an evil abomination and should not be used. These days, using ldap is much
|
||||
more effective mechanism for doing the same thing. uClibc provides a stub
|
||||
libnsl, but has no actual support for Network Information Service (NIS).
|
||||
We therefore, also do not provide any of the headers files provided by glibc
|
||||
under /usr/include/rpcsvc.
|
||||
</li><br>
|
||||
<li>uClibc's locale support is not 100% complete yet. We are working on it.
|
||||
</li><br>
|
||||
<li>uClibc's math library only supports long double as inlines, and even
|
||||
then the long double support is quite limited. Also, very few of the
|
||||
float math functions are implemented. Stick with double and you should
|
||||
be just fine.
|
||||
</li><br>
|
||||
<li>uClibc's libcrypt does not support the reentrant crypt_r, setkey_r and
|
||||
encrypt_r, since these are not required by SuSv3.
|
||||
</li><br>
|
||||
<li>uClibc directly uses kernel types to define most opaque data types.
|
||||
</li><br>
|
||||
<li>uClibc directly uses the linux kernel's arch specific 'stuct stat'.
|
||||
</li><br>
|
||||
<li>uClibc's librt library currently lacks all aio routines, all clock
|
||||
routines, and all shm routines (only the timer routines and the mq
|
||||
routines are implemented).
|
||||
</li><br>
|
||||
</ol>
|
||||
<hr>
|
||||
<h3>Manuel's Notes</h3>
|
||||
|
||||
Some general comments...<br>
|
||||
<p>
|
||||
The intended target for all my uClibc code is ANSI/ISO C99 and SUSv3
|
||||
compliance. While some glibc extensions are present, many will eventually
|
||||
be configurable. Also, even when present, the glibc-like extensions may
|
||||
differ slightly or be more restrictive than the native glibc counterparts.
|
||||
They are primarily meant to be porting _aides_ and not necessarily
|
||||
drop-in replacements.
|
||||
</p><br>
|
||||
Now for some details...<br><br>
|
||||
|
||||
<u>time functions</u><br>
|
||||
<ol>
|
||||
<li>Leap seconds are not supported.</li><br>
|
||||
<li>/etc/timezone and the whole zoneinfo directory tree are not supported.
|
||||
To set the timezone, set the TZ environment variable as specified in
|
||||
http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html
|
||||
or you may also create an /etc/TZ file of a single line, ending with a
|
||||
newline, containing the TZ setting. For example
|
||||
echo CST6CDT > /etc/TZ
|
||||
</li><br>
|
||||
<li>Currently, locale specific eras and alternate digits are not supported.
|
||||
They are on my TODO list.
|
||||
</li>
|
||||
</ol><br>
|
||||
<u>wide char support</u><br>
|
||||
<ol>
|
||||
<li>The only multibyte encoding currently supported is UTF-8. The various
|
||||
ISO-8859-* encodings are (optionally) supported. The internal
|
||||
representation of wchar's is assumed to be 31 bit unicode values in
|
||||
native endian representation. Also, the underlying char encoding is
|
||||
assumed to match ASCII in the range 0-0x7f.
|
||||
</li>
|
||||
<li>In the next iteration of locale support, I plan to add support for
|
||||
(at least some) other multibyte encodings.
|
||||
</li>
|
||||
</ol>
|
||||
<u>locale support</u><br>
|
||||
<ol>
|
||||
<li>The target for support is SUSv3 locale functionality. While nl_langinfo
|
||||
has been extended, similar to glibc, it only returns values for related
|
||||
locale entries.
|
||||
</li>
|
||||
<li>Currently, all SUSv3 libc locale functionality should be implemented
|
||||
except for wcsftime and collating item support in regex.
|
||||
</li>
|
||||
</ol>
|
||||
<u>stdio</u><br>
|
||||
<ol>
|
||||
<li>Conversion of large magnitude floating-point values by printf suffers a loss
|
||||
of precision due to the algorithm used.
|
||||
</li><br>
|
||||
<li>uClibc's printf is much stricter than glibcs, especially regarding positional
|
||||
args. The entire format string is parsed first and an error is returned if
|
||||
a problem is detected. In locales other than C, the format string is checked
|
||||
to be a valid multibyte sequence as well. Also, currently at most 10 positional
|
||||
args are allowed (although this is configurable).
|
||||
</li><br>
|
||||
<li>BUFSIZ is configurable, but no attempt is made at automatic tuning of internal
|
||||
buffer sizes for stdio streams. In fact, the stdio code in general sacrifices
|
||||
sophistication/performace for minimal size.
|
||||
</li><br>
|
||||
<li>uClibc allows glibc-like custom printf functions. However, while not
|
||||
currently checked, the specifier must be <= 0x7f.
|
||||
</li><br>
|
||||
<li>uClibc allows glibc-like custom streams. However, no in-buffer seeking is
|
||||
done.
|
||||
</li><br>
|
||||
<li>The functions fcloseall() and __fpending() can behave differently than their
|
||||
glibc counterparts.
|
||||
</li><br>
|
||||
<li>uClibc's setvbuf is more restrictive about when it can be called than glibc's
|
||||
is. The standards specify that setvbuf must occur before any other operations
|
||||
take place on the stream.
|
||||
</li><br>
|
||||
<li>Right now, %m is not handled properly by printf when the format uses positional
|
||||
args.
|
||||
</li><br>
|
||||
<li>The FILEs created by glibc's fmemopen(), open_memstream(), and fopencookie()
|
||||
are not capable of wide orientation. The corresponding uClibc routines do
|
||||
not have this limitation.
|
||||
</li><br>
|
||||
<li>For scanf, the C99 standard states "The fscanf function returns the value of
|
||||
the macro EOF if an input failure occurs before any conversion." But glibc's
|
||||
scanf does not respect conversions for which assignment was surpressed, even
|
||||
though the standard states that the value is converted but not stored.
|
||||
</li></ol><br>
|
||||
<hr><h3>Glibc bugs</h3><br>
|
||||
glibc bugs that Ulrich Drepper has refused to acknowledge or comment on
|
||||
( <a href="http://sources.redhat.com/ml/libc-alpha/2003-09/">http://sources.redhat.com/ml/libc-alpha/2003-09/</a> )
|
||||
<br>
|
||||
<ol>
|
||||
<li>The C99 standard says that for printf, a %s conversion makes no special
|
||||
provisions for multibyte characters. SUSv3 is even more clear, stating
|
||||
that bytes are written and a specified precision is in bytes. Yet glibc
|
||||
treats the arg as a multibyte string when a precision is specified and
|
||||
not otherwise.
|
||||
</li><br>
|
||||
<li>Both C99 and C89 state that the %c conversion for scanf reads the exact
|
||||
number of bytes specified by the optional field width (or 1 if not specified).
|
||||
uClibc complies with the standard. There is an argument that perhaps the
|
||||
specified width should be treated as an upper bound, based on some historical
|
||||
use. However, such behavior should be mentioned in the Conformance document.
|
||||
</li><br>
|
||||
<li>glibc's scanf is broken regarding some numeric patterns. Some invalid
|
||||
strings are accepted as valid ("0x.p", "1e", digit grouped strings).
|
||||
In spite of my posting examples clearly illustrating the bugs, they remain
|
||||
unacknowledged by the glibc developers.
|
||||
</li><br>
|
||||
<li>glibc's scanf seems to require a 'p' exponent for hexadecimal float strings.
|
||||
According to the standard, this is optional.
|
||||
</li><br>
|
||||
<li>C99 requires that once an EOF is encountered, the stream should be treated
|
||||
as if at end-of-file even if more data becomes available. Further reading
|
||||
can be attempted by clearing the EOF flag though, via clearerr() or a file
|
||||
positioning function. For details concerning the original change, see
|
||||
Defect Report #141. glibc is currently non-compliant, and the developers
|
||||
did not comment when I asked for their official position on this issue.
|
||||
</li><br>
|
||||
<li>glibc's collation routines and/or localedef are broken regarding implicit
|
||||
and explicit UNDEFINED rules.
|
||||
</li><br></ol>
|
||||
More to follow as I think of it...
|
||||
<br><br><hr>
|
||||
<h3>Profiling:</h3>
|
||||
<p>
|
||||
uClibc no longer supports 'gcc -fprofile-arcs -pg' style profiling, which
|
||||
causes your application to generate a 'gmon.out' file that can then be analyzed
|
||||
by 'gprof'. Not only does this require explicit extra support in uClibc, it
|
||||
requires that you rebuild everything with profiling support. There is both a
|
||||
size and performance penalty to profiling your applications this way, as well
|
||||
as Heisenberg effects, where the act of measuring changes what is measured.
|
||||
</p>
|
||||
<p>
|
||||
There exist a number of less invasive alternatives that do not require you to
|
||||
specially instrument your application, and recompile and relink everything.
|
||||
</p><p>
|
||||
The OProfile system-wide profiler is an excellent alternative:
|
||||
<a href="http://oprofile.sourceforge.net/">http://oprofile.sourceforge.net/</a>
|
||||
</p><p>
|
||||
Many people have had good results using the combination of Valgrind
|
||||
to generate profiling information and KCachegrind for analysis:
|
||||
<a href="http://developer.kde.org/~sewardj/">http://developer.kde.org/~sewardj/</a>
|
||||
<a href="http://kcachegrind.sourceforge.net/">http://kcachegrind.sourceforge.net/</a>
|
||||
</p><p>
|
||||
Prospect is another alternative based on OProfile:
|
||||
<a href="http://prospect.sourceforge.net/">http://prospect.sourceforge.net/</a>
|
||||
</p><p>
|
||||
And the Linux Trace Toolkit (LTT) is also a fine tool:
|
||||
<a href="http://www.opersys.com/LTT/">http://www.opersys.com/LTT/</a>
|
||||
</p><p>
|
||||
FunctionCheck:
|
||||
<a href="http://www710.univ-lyon1.fr/~yperret/fnccheck/">http://www710.univ-lyon1.fr/~yperret/fnccheck/</a>
|
||||
</p>
|
||||
|
||||
<!--#include file="footer.html" -->
|
||||
@@ -13,15 +13,15 @@ here:<p>
|
||||
or
|
||||
<a href="/downloads/buildroot-2011.08.tar.bz2">buildroot-2011.08.tar.bz2</a>.
|
||||
<p>
|
||||
<!--
|
||||
The latest release candidate is <b>2011.08-rc2</b>, which can be
|
||||
|
||||
The latest release candidate is <b>2011.11-rc1</b>, which can be
|
||||
downloaded here:<p>
|
||||
|
||||
<a href="/downloads/buildroot-2011.08-rc2.tar.gz">buildroot-2011.08-rc2.tar.gz</a>
|
||||
<a href="/downloads/buildroot-2011.11-rc1.tar.gz">buildroot-2011.11-rc1.tar.gz</a>
|
||||
or
|
||||
<a href="/downloads/buildroot-2011.08-rc2.tar.bz2">buildroot-2011.08-rc2.tar.bz2</a>.
|
||||
<a href="/downloads/buildroot-2011.11-rc1.tar.bz2">buildroot-2011.11-rc1.tar.bz2</a>.
|
||||
<p>
|
||||
-->
|
||||
|
||||
This and earlier releases can always be downloaded from
|
||||
<a href="/downloads/">http://buildroot.net/downloads/</a>.
|
||||
|
||||
|
||||
171
docs/manual/adding-packages-autotargets.txt
Normal file
171
docs/manual/adding-packages-autotargets.txt
Normal file
@@ -0,0 +1,171 @@
|
||||
Infrastructure for autotools-based packages
|
||||
-------------------------------------------
|
||||
|
||||
[[autotargets-tutorial]]
|
||||
|
||||
+AUTOTARGETS+ tutorial
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
First, let's see how to write a +.mk+ file for an autotools-based
|
||||
package, with an example :
|
||||
|
||||
------------------------
|
||||
01: #############################################################
|
||||
02: #
|
||||
03: # libfoo
|
||||
04: #
|
||||
05: #############################################################
|
||||
06: LIBFOO_VERSION = 1.0
|
||||
07: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
|
||||
08: LIBFOO_SITE = http://www.foosoftware.org/download
|
||||
09: LIBFOO_INSTALL_STAGING = YES
|
||||
10: LIBFOO_INSTALL_TARGET = YES
|
||||
11: LIBFOO_CONF_OPT = --enable-shared
|
||||
12: LIBFOO_DEPENDENCIES = libglib2 host-pkg-config
|
||||
13:
|
||||
14: $(eval $(call AUTOTARGETS,package,libfoo))
|
||||
------------------------
|
||||
|
||||
On line 6, we declare the version of the package.
|
||||
|
||||
On line 7 and 8, we declare the name of the tarball and the location
|
||||
of the tarball on the Web. Buildroot will automatically download the
|
||||
tarball from this location.
|
||||
|
||||
On line 9, we tell Buildroot to install the package to the staging
|
||||
directory. The staging directory, located in +output/staging/+
|
||||
is the directory where all the packages are installed, including their
|
||||
development files, etc. By default, packages are not installed to the
|
||||
staging directory, since usually, only libraries need to be installed in
|
||||
the staging directory: their development files are needed to compile
|
||||
other libraries or applications depending on them. Also by default, when
|
||||
staging installation is enabled, packages are installed in this location
|
||||
using the +make install+ command.
|
||||
|
||||
On line 10, we tell Buildroot to also install the package to the
|
||||
target directory. This directory contains what will become the root
|
||||
filesystem running on the target. Usually, we try not to install header
|
||||
files and to install stripped versions of the binary. By default, target
|
||||
installation is enabled, so in fact, this line is not strictly
|
||||
necessary. Also by default, packages are installed in this location
|
||||
using the +make install+ command.
|
||||
|
||||
On line 11, we tell Buildroot to pass a custom configure option, that
|
||||
will be passed to the +./configure+ script before configuring
|
||||
and building the package.
|
||||
|
||||
On line 12, we declare our dependencies, so that they are built
|
||||
before the build process of our package starts.
|
||||
|
||||
Finally, on line line 14, we invoke the +AUTOTARGETS+
|
||||
macro that generates all the Makefile rules that actually allows the
|
||||
package to be built.
|
||||
|
||||
[[autotargets-reference]]
|
||||
|
||||
+AUTOTARGETS+ reference
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The main macro of the autotools package infrastructure is
|
||||
+AUTOTARGETS+. It has the same number of arguments and the
|
||||
same semantic as the +GENTARGETS+ macro, which is the main
|
||||
macro of the generic package infrastructure. For autotools packages, the
|
||||
ability to have target and host packages is also available (and is
|
||||
actually widely used).
|
||||
|
||||
Just like the generic infrastructure, the autotools infrastructure
|
||||
works by defining a number of variables before calling the
|
||||
+AUTOTARGETS+ macro.
|
||||
|
||||
First, all the package metadata information variables that exist in the
|
||||
generic infrastructure also exist in the autotools infrastructure:
|
||||
+LIBFOO_VERSION+, +LIBFOO_SOURCE+,
|
||||
+LIBFOO_PATCH+, +LIBFOO_SITE+,
|
||||
+LIBFOO_SUBDIR+, +LIBFOO_DEPENDENCIES+,
|
||||
+LIBFOO_INSTALL_STAGING+, +LIBFOO_INSTALL_TARGET+.
|
||||
|
||||
A few additional variables, specific to the autotools infrastructure,
|
||||
can also be defined. Many of them are only useful in very specific
|
||||
cases, typical packages will therefore only use a few of them.
|
||||
|
||||
* +LIBFOO_SUBDIR+ may contain the name of a subdirectory
|
||||
inside the package that contains the configure script. This is useful,
|
||||
if for example, the main configure script is not at the root of the
|
||||
tree extracted by the tarball. If +HOST_LIBFOO_SUBDIR+ is
|
||||
not specified, it defaults to +LIBFOO_SUBDIR+.
|
||||
|
||||
* +LIBFOO_CONF_ENV+, to specify additional environment
|
||||
variables to pass to the configure script. By default, empty.
|
||||
|
||||
* +LIBFOO_CONF_OPT+, to specify additional configure
|
||||
options to pass to the configure script. By default, empty.
|
||||
|
||||
* +LIBFOO_MAKE+, to specify an alternate +make+
|
||||
command. This is typically useful when parallel make is enabled in
|
||||
the configuration (using +BR2_JLEVEL+) but that this
|
||||
feature should be disabled for the given package, for one reason or
|
||||
another. By default, set to +$(MAKE)+. If parallel building
|
||||
is not supported by the package, then it should be set to
|
||||
+LIBFOO_MAKE=$(MAKE1)+.
|
||||
|
||||
* +LIBFOO_MAKE_ENV+, to specify additional environment
|
||||
variables to pass to make in the build step. These are passed before
|
||||
the +make+ command. By default, empty.
|
||||
|
||||
* +LIBFOO_MAKE_OPT+, to specify additional variables to
|
||||
pass to make in the build step. These are passed after the
|
||||
+make+ command. By default, empty.
|
||||
|
||||
* +LIBFOO_AUTORECONF+, tells whether the package should
|
||||
be autoreconfigured or not (i.e, if the configure script and
|
||||
Makefile.in files should be re-generated by re-running autoconf,
|
||||
automake, libtool, etc.). Valid values are +YES+ and
|
||||
+NO+. By default, the value is +NO+
|
||||
|
||||
* +LIBFOO_AUTORECONF_OPT+ to specify additional options
|
||||
passed to the 'autoreconf' program if
|
||||
+LIBFOO_AUTORECONF=YES+. By default, empty.
|
||||
|
||||
* +LIBFOO_LIBTOOL_PATCH+ tells whether the Buildroot
|
||||
patch to fix libtool cross-compilation issues should be applied or
|
||||
not. Valid values are +YES+ and +NO+. By
|
||||
default, the value is +YES+
|
||||
|
||||
* +LIBFOO_INSTALL_STAGING_OPT+ contains the make options
|
||||
used to install the package to the staging directory. By default, the
|
||||
value is +DESTDIR=$$(STAGING_DIR) install+, which is
|
||||
correct for most autotools packages. It is still possible to override
|
||||
it.
|
||||
|
||||
* +LIBFOO_INSTALL_TARGET_OPT+ contains the make options
|
||||
used to install the package to the target directory. By default, the
|
||||
value is +DESTDIR=$$(TARGET_DIR) install+. The default
|
||||
value is correct for most autotools packages, but it is still possible
|
||||
to override it if needed.
|
||||
|
||||
* +LIBFOO_CLEAN_OPT+ contains the make options used to
|
||||
clean the package. By default, the value is +clean+.
|
||||
|
||||
* +LIBFOO_UNINSTALL_STAGING_OPT+, contains the make
|
||||
options used to uninstall the package from the staging directory. By
|
||||
default, the value is +DESTDIR=$$(STAGING_DIR) uninstall+.
|
||||
|
||||
* +LIBFOO_UNINSTALL_TARGET_OPT+, contains the make
|
||||
options used to uninstall the package from the target directory. By
|
||||
default, the value is +DESTDIR=$$(TARGET_DIR) uninstall+.
|
||||
|
||||
With the autotools infrastructure, all the steps required to build
|
||||
and install the packages are already defined, and they generally work
|
||||
well for most autotools-based packages. However, when required, it is
|
||||
still possible to customize what is done in any particular step:
|
||||
|
||||
* By adding a post-operation hook (after extract, patch, configure,
|
||||
build or install). See the reference documentation of the generic
|
||||
infrastructure for details.
|
||||
|
||||
* By overriding one of the steps. For example, even if the autotools
|
||||
infrastructure is used, if the package +.mk+ file defines its
|
||||
own +LIBFOO_CONFIGURE_CMDS+ variable, it will be used
|
||||
instead of the default autotools one. However, using this method
|
||||
should be restricted to very specific cases. Do not use it in the
|
||||
general case.
|
||||
142
docs/manual/adding-packages-cmaketargets.txt
Normal file
142
docs/manual/adding-packages-cmaketargets.txt
Normal file
@@ -0,0 +1,142 @@
|
||||
Infrastructure for CMake-based packages
|
||||
---------------------------------------
|
||||
|
||||
[[cmaketargets-tutorial]]
|
||||
|
||||
+CMAKETARGETS+ tutorial
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
First, let's see how to write a +.mk+ file for a CMake-based package,
|
||||
with an example :
|
||||
|
||||
------------------------
|
||||
01: #############################################################
|
||||
02: #
|
||||
03: # libfoo
|
||||
04: #
|
||||
05: #############################################################
|
||||
06: LIBFOO_VERSION = 1.0
|
||||
07: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
|
||||
08: LIBFOO_SITE = http://www.foosoftware.org/download
|
||||
09: LIBFOO_INSTALL_STAGING = YES
|
||||
10: LIBFOO_INSTALL_TARGET = YES
|
||||
11: LIBFOO_CONF_OPT = -DBUILD_DEMOS=ON
|
||||
12: LIBFOO_DEPENDENCIES = libglib2 host-pkg-config
|
||||
13:
|
||||
14: $(eval $(call CMAKETARGETS,package,libfoo))
|
||||
------------------------
|
||||
|
||||
On line 6, we declare the version of the package.
|
||||
|
||||
On line 7 and 8, we declare the name of the tarball and the location
|
||||
of the tarball on the Web. Buildroot will automatically download the
|
||||
tarball from this location.
|
||||
|
||||
On line 9, we tell Buildroot to install the package to the staging
|
||||
directory. The staging directory, located in +output/staging/+
|
||||
is the directory where all the packages are installed, including their
|
||||
development files, etc. By default, packages are not installed to the
|
||||
staging directory, since usually, only libraries need to be installed in
|
||||
the staging directory: their development files are needed to compile
|
||||
other libraries or applications depending on them. Also by default, when
|
||||
staging installation is enabled, packages are installed in this location
|
||||
using the +make install+ command.
|
||||
|
||||
On line 10, we tell Buildroot to also install the package to the
|
||||
target directory. This directory contains what will become the root
|
||||
filesystem running on the target. Usually, we try not to install header
|
||||
files and to install stripped versions of the binary. By default, target
|
||||
installation is enabled, so in fact, this line is not strictly
|
||||
necessary. Also by default, packages are installed in this location
|
||||
using the +make install+ command.
|
||||
|
||||
On line 11, we tell Buildroot to pass custom options to CMake when it is
|
||||
configuring the package.
|
||||
|
||||
On line 12, we declare our dependencies, so that they are built
|
||||
before the build process of our package starts.
|
||||
|
||||
Finally, on line line 14, we invoke the +CMAKETARGETS+
|
||||
macro that generates all the Makefile rules that actually allows the
|
||||
package to be built.
|
||||
|
||||
[[cmaketargets-reference]]
|
||||
|
||||
+CMAKETARGETS+ reference
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The main macro of the CMake package infrastructure is
|
||||
+CMAKETARGETS+. It has the same number of arguments and the same
|
||||
semantic as the +GENTARGETS+ macro, which is the main macro of the
|
||||
generic package infrastructure. For CMake packages, the ability to
|
||||
have target and host packages is also available.
|
||||
|
||||
Just like the generic infrastructure, the CMake infrastructure works
|
||||
by defining a number of variables before calling the +CMAKETARGETS+
|
||||
macro.
|
||||
|
||||
First, all the package metadata information variables that exist in
|
||||
the generic infrastructure also exist in the CMake infrastructure:
|
||||
+LIBFOO_VERSION+, +LIBFOO_SOURCE+, +LIBFOO_PATCH+, +LIBFOO_SITE+,
|
||||
+LIBFOO_SUBDIR+, +LIBFOO_DEPENDENCIES+, +LIBFOO_INSTALL_STAGING+,
|
||||
+LIBFOO_INSTALL_TARGET+.
|
||||
|
||||
A few additional variables, specific to the CMake infrastructure, can
|
||||
also be defined. Many of them are only useful in very specific cases,
|
||||
typical packages will therefore only use a few of them.
|
||||
|
||||
* +LIBFOO_SUBDIR+ may contain the name of a subdirectory inside the
|
||||
package that contains the main CMakeLists.txt file. This is useful,
|
||||
if for example, the main CMakeLists.txt file is not at the root of
|
||||
the tree extracted by the tarball. If +HOST_LIBFOO_SUBDIR+ is not
|
||||
specified, it defaults to +LIBFOO_SUBDIR+.
|
||||
|
||||
* +LIBFOO_CONF_ENV+, to specify additional environment variables to
|
||||
pass to CMake. By default, empty.
|
||||
|
||||
* +LIBFOO_CONF_OPT+, to specify additional configure options to pass
|
||||
to CMake. By default, empty.
|
||||
|
||||
* +LIBFOO_MAKE+, to specify an alternate +make+ command. This is
|
||||
typically useful when parallel make is enabled in the configuration
|
||||
(using +BR2_JLEVEL+) but that this feature should be disabled for
|
||||
the given package, for one reason or another. By default, set to
|
||||
+$(MAKE)+. If parallel building is not supported by the package,
|
||||
then it should be set to +LIBFOO_MAKE=$(MAKE1)+.
|
||||
|
||||
* +LIBFOO_MAKE_ENV+, to specify additional environment variables to
|
||||
pass to make in the build step. These are passed before the +make+
|
||||
command. By default, empty.
|
||||
|
||||
* +LIBFOO_MAKE_OPT+, to specify additional variables to pass to make
|
||||
in the build step. These are passed after the +make+ command. By
|
||||
default, empty.
|
||||
|
||||
* +LIBFOO_INSTALL_STAGING_OPT+ contains the make options used to
|
||||
install the package to the staging directory. By default, the value
|
||||
is +DESTDIR=$$(STAGING_DIR) install+, which is correct for most
|
||||
CMake packages. It is still possible to override it.
|
||||
|
||||
* +LIBFOO_INSTALL_TARGET_OPT+ contains the make options used to
|
||||
install the package to the target directory. By default, the value
|
||||
is +DESTDIR=$$(TARGET_DIR) install+. The default value is correct
|
||||
for most CMake packages, but it is still possible to override it if
|
||||
needed.
|
||||
|
||||
* +LIBFOO_CLEAN_OPT+ contains the make options used to clean the
|
||||
package. By default, the value is +clean+.
|
||||
|
||||
With the CMake infrastructure, all the steps required to build and
|
||||
install the packages are already defined, and they generally work well
|
||||
for most CMake-based packages. However, when required, it is still
|
||||
possible to customize what is done in any particular step:
|
||||
|
||||
* By adding a post-operation hook (after extract, patch, configure,
|
||||
build or install). See the reference documentation of the generic
|
||||
infrastructure for details.
|
||||
|
||||
* By overriding one of the steps. For example, even if the CMake
|
||||
infrastructure is used, if the package +.mk+ file defines its own
|
||||
+LIBFOO_CONFIGURE_CMDS+ variable, it will be used instead of the
|
||||
default CMake one. However, using this method should be restricted
|
||||
to very specific cases. Do not use it in the general case.
|
||||
10
docs/manual/adding-packages-conclusion.txt
Normal file
10
docs/manual/adding-packages-conclusion.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
Conclusion
|
||||
----------
|
||||
|
||||
As you can see, adding a software package to Buildroot is simply a
|
||||
matter of writing a Makefile using an existing example and modifying it
|
||||
according to the compilation process required by the package.
|
||||
|
||||
If you package software that might be useful for other people, don't
|
||||
forget to send a patch to Buildroot developers!
|
||||
|
||||
75
docs/manual/adding-packages-directory.txt
Normal file
75
docs/manual/adding-packages-directory.txt
Normal file
@@ -0,0 +1,75 @@
|
||||
Package directory
|
||||
-----------------
|
||||
|
||||
First of all, create a directory under the +package+ directory for
|
||||
your software, for example +libfoo+.
|
||||
|
||||
Some packages have been grouped by topic in a sub-directory:
|
||||
+multimedia+, +java+, +x11r7+, and +games+. If your package fits in
|
||||
one of these categories, then create your package directory in these.
|
||||
|
||||
+Config.in+ file
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
Then, create a file named +Config.in+. This file will contain the
|
||||
option descriptions related to our +libfoo+ software that will be used
|
||||
and displayed in the configuration tool. It should basically contain :
|
||||
|
||||
---------------------------
|
||||
config BR2_PACKAGE_LIBFOO
|
||||
bool "libfoo"
|
||||
help
|
||||
This is a comment that explains what libfoo is.
|
||||
|
||||
http://foosoftware.org/libfoo/
|
||||
---------------------------
|
||||
|
||||
Of course, you can add other options to configure particular things in
|
||||
your software. You can look at examples in other packages. The syntax
|
||||
of the +Config.in+ file is the same as the one for the kernel Kconfig
|
||||
file. The documentation for this syntax is available at
|
||||
http://lxr.free-electrons.com/source/Documentation/kbuild/kconfig-language.txt[]
|
||||
|
||||
Finally you have to add your new +libfoo/Config.in+ to
|
||||
+package/Config.in+ (or in a category subdirectory if you decided to
|
||||
put your package in one of the existing categories). The files
|
||||
included there are 'sorted alphabetically' per category and are 'NOT'
|
||||
supposed to contain anything but the 'bare' name of the package.
|
||||
|
||||
--------------------------
|
||||
source "package/libfoo/Config.in"
|
||||
--------------------------
|
||||
|
||||
The +.mk+ file
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
Finally, here's the hardest part. Create a file named +libfoo.mk+. It
|
||||
describes how the package should be downloaded, configured, built,
|
||||
installed, etc.
|
||||
|
||||
Depending on the package type, the +.mk+ file must be written in a
|
||||
different way, using different infrastructures:
|
||||
|
||||
* *Makefiles for generic packages* (not using autotools): These are
|
||||
based on an infrastructure similar to the one used for
|
||||
autotools-based packages, but requires a little more work from the
|
||||
developer. They specify what should be done for the configuration,
|
||||
compilation, installation and cleanup of the package. This
|
||||
infrastructure must be used for all packages that do not use the
|
||||
autotools as their build system. In the future, other specialized
|
||||
infrastructures might be written for other build systems. We cover
|
||||
them through in a xref:gentargets-tutorial[tutorial] and a
|
||||
xref:gentargets-reference[reference].
|
||||
|
||||
* *Makefiles for autotools-based software* (autoconf, automake, etc.):
|
||||
We provide a dedicated infrastructure for such packages, since
|
||||
autotools is a very common build system. This infrastructure 'must'
|
||||
be used for new packages that rely on the autotools as their build
|
||||
system. We cover them through a xref:autotargets-tutorial[tutorial]
|
||||
and xref:autotargets-reference[reference].
|
||||
|
||||
* *Hand-written Makefiles:* These are currently obsolete, and no new
|
||||
manual Makefiles should be added. However, since there are still
|
||||
many of them in the tree, we keep them documented in a
|
||||
xref:handwritten-tutorial[tutorial].
|
||||
|
||||
307
docs/manual/adding-packages-gentargets.txt
Normal file
307
docs/manual/adding-packages-gentargets.txt
Normal file
@@ -0,0 +1,307 @@
|
||||
Infrastructure for packages with specific build systems
|
||||
-------------------------------------------------------
|
||||
|
||||
By 'packages with specific build systems' we mean all the packages
|
||||
whose build system is not one of the standard ones, such as
|
||||
'autotools' or 'CMake'. This typically includes packages whose build
|
||||
system is based on hand-written Makefiles or shell scripts.
|
||||
|
||||
[[gentargets-tutorial]]
|
||||
|
||||
+GENTARGETS+ Tutorial
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
------------------------------
|
||||
01: #############################################################
|
||||
02: #
|
||||
03: # libfoo
|
||||
04: #
|
||||
05: #############################################################
|
||||
06: LIBFOO_VERSION = 1.0
|
||||
07: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
|
||||
08: LIBFOO_SITE = http://www.foosoftware.org/download
|
||||
09: LIBFOO_INSTALL_STAGING = YES
|
||||
10: LIBFOO_DEPENDENCIES = host-libaaa libbbb
|
||||
11:
|
||||
12: define LIBFOO_BUILD_CMDS
|
||||
13: $(MAKE) CC=$(TARGET_CC) LD=$(TARGET_LD) -C $(@D) all
|
||||
14: endef
|
||||
15:
|
||||
16: define LIBFOO_INSTALL_STAGING_CMDS
|
||||
17: $(INSTALL) -D -m 0755 $(@D)/libfoo.a $(STAGING_DIR)/usr/lib/libfoo.a
|
||||
18: $(INSTALL) -D -m 0644 $(@D)/foo.h $(STAGING_DIR)/usr/include/foo.h
|
||||
19: $(INSTALL) -D -m 0755 $(@D)/libfoo.so* $(STAGING_DIR)/usr/lib
|
||||
20: endef
|
||||
21:
|
||||
22: define LIBFOO_INSTALL_TARGET_CMDS
|
||||
23: $(INSTALL) -D -m 0755 $(@D)/libfoo.so* $(TARGET_DIR)/usr/lib
|
||||
24: $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/foo.d
|
||||
25: endef
|
||||
26:
|
||||
27: $(eval $(call GENTARGETS,package,libfoo))
|
||||
--------------------------------
|
||||
|
||||
The Makefile begins on line 6 to 8 with metadata information: the
|
||||
version of the package (+LIBFOO_VERSION+), the name of the
|
||||
tarball containing the package (+LIBFOO_SOURCE+) and the
|
||||
Internet location at which the tarball can be downloaded
|
||||
(+LIBFOO_SITE+). All variables must start with the same prefix,
|
||||
+LIBFOO_+ in this case. This prefix is always the uppercased
|
||||
version of the package name (see below to understand where the package
|
||||
name is defined).
|
||||
|
||||
On line 9, we specify that this package wants to install something to
|
||||
the staging space. This is often needed for libraries, since they must
|
||||
install header files and other development files in the staging space.
|
||||
This will ensure that the commands listed in the
|
||||
+LIBFOO_INSTALL_STAGING_CMDS+ variable will be executed.
|
||||
|
||||
On line 10, we specify the list of dependencies this package relies
|
||||
on. These dependencies are listed in terms of lower-case package names,
|
||||
which can be packages for the target (without the +host-+
|
||||
prefix) or packages for the host (with the +host-+) prefix).
|
||||
Buildroot will ensure that all these packages are built and installed
|
||||
'before' the current package starts its configuration.
|
||||
|
||||
The rest of the Makefile defines what should be done at the different
|
||||
steps of the package configuration, compilation and installation.
|
||||
+LIBFOO_BUILD_CMDS+ tells what steps should be performed to
|
||||
build the package. +LIBFOO_INSTALL_STAGING_CMDS+ tells what
|
||||
steps should be performed to install the package in the staging space.
|
||||
+LIBFOO_INSTALL_TARGET_CMDS+ tells what steps should be
|
||||
performed to install the package in the target space.
|
||||
|
||||
All these steps rely on the +$(@D)+ variable, which
|
||||
contains the directory where the source code of the package has been
|
||||
extracted.
|
||||
|
||||
Finally, on line 27, we call the +GENTARGETS+ which
|
||||
generates, according to the variables defined previously, all the
|
||||
Makefile code necessary to make your package working.
|
||||
|
||||
[[gentargets-reference]]
|
||||
|
||||
+GENTARGETS+ Reference
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The +GENTARGETS+ macro takes three arguments:
|
||||
|
||||
* The first argument is the package directory prefix. If your package
|
||||
is in +package/libfoo+, then the directory prefix is +package+. If
|
||||
your package is in +package/editors/foo+, then the directory prefix
|
||||
must be +package/editors+.
|
||||
|
||||
* The second argument is the lower-cased package name. It must match
|
||||
the prefix of the variables in the +.mk+ file and must match the
|
||||
configuration option name in the +Config.in+ file. For example, if
|
||||
the package name is +libfoo+, then the variables in the +.mk+ file
|
||||
must start with +LIBFOO_+ and the configuration option in the
|
||||
+Config.in+ file must be +BR2_PACKAGE_LIBFOO+.
|
||||
|
||||
* The third argument is optional. It can be used to tell if the
|
||||
package is a target package (cross-compiled for the target) or a
|
||||
host package (natively compiled for the host). If unspecified, it is
|
||||
assumed that it is a target package. See below for details.
|
||||
|
||||
For a given package, in a single +.mk+ file, it is possible to call
|
||||
GENTARGETS twice, once to create the rules to generate a target
|
||||
package and once to create the rules to generate a host package:
|
||||
|
||||
----------------------
|
||||
$(eval $(call GENTARGETS,package,libfoo))
|
||||
$(eval $(call GENTARGETS,package,libfoo,host))
|
||||
----------------------
|
||||
|
||||
This might be useful if the compilation of the target package requires
|
||||
some tools to be installed on the host. If the package name is
|
||||
+libfoo+, then the name of the package for the target is also
|
||||
+libfoo+, while the name of the package for the host is
|
||||
+host-libfoo+. These names should be used in the DEPENDENCIES
|
||||
variables of other packages, if they depend on +libfoo+ or
|
||||
+host-libfoo+.
|
||||
|
||||
The call to the +GENTARGETS+ macro *must* be at the end of the +.mk+
|
||||
file, after all variable definitions.
|
||||
|
||||
For the target package, the +GENTARGETS+ uses the variables defined by
|
||||
the .mk file and prefixed by the uppercased package name:
|
||||
+LIBFOO_*+. For the host package, it uses the +HOST_LIBFOO_*+. For
|
||||
'some' variables, if the +HOST_LIBFOO_+ prefixed variable doesn't
|
||||
exist, the package infrastructure uses the corresponding variable
|
||||
prefixed by +LIBFOO_+. This is done for variables that are likely to
|
||||
have the same value for both the target and host packages. See below
|
||||
for details.
|
||||
|
||||
The list of variables that can be set in a +.mk+ file to give metadata
|
||||
information is (assuming the package name is +libfoo+) :
|
||||
|
||||
* +LIBFOO_VERSION+, mandatory, must contain the version of the
|
||||
package. Note that if +HOST_LIBFOO_VERSION+ doesn't exist, it is
|
||||
assumed to be the same as +LIBFOO_VERSION+. It can also be a
|
||||
Subversion or Git branch or tag, for packages that are fetched
|
||||
directly from their revision control system. +
|
||||
Example: +LIBFOO_VERSION = 0.1.2+
|
||||
|
||||
* +LIBFOO_SOURCE+ may contain the name of the tarball of
|
||||
the package. If +HOST_LIBFOO_SOURCE+ is not specified, it
|
||||
defaults to +LIBFOO_VERSION+. If none are specified, then
|
||||
the value is assumed to be
|
||||
+packagename-$(LIBFOO_VERSION).tar.gz+. +
|
||||
Example: +LIBFOO_SOURCE = foobar-$(LIBFOO_VERSION).tar.bz2+
|
||||
|
||||
* +LIBFOO_PATCH+ may contain the name of a patch, that will be
|
||||
downloaded from the same location as the tarball indicated in
|
||||
+LIBFOO_SOURCE+. If +HOST_LIBFOO_PATCH+ is not specified, it
|
||||
defaults to +LIBFOO_PATCH+. Also note that another mechanism is
|
||||
available to patch a package: all files of the form
|
||||
+packagename-packageversion-description.patch+ present in the
|
||||
package directory inside Buildroot will be applied to the package
|
||||
after extraction.
|
||||
|
||||
* +LIBFOO_SITE+ may contain the Internet location of the package. It
|
||||
can either be the HTTP or FTP location of a tarball, or the URL of a
|
||||
Git or Subversion repository (see +LIBFOO_SITE_METHOD+ below). If
|
||||
+HOST_LIBFOO_SITE+ is not specified, it defaults to
|
||||
+LIBFOO_SITE+. If none are specified, then the location is assumed
|
||||
to be
|
||||
+http://$$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/packagename+. +
|
||||
Examples: +LIBFOO_SITE=http://www.libfoosoftware.org/libfoo+ +
|
||||
+LIBFOO_SITE=http://svn.xiph.org/trunk/Tremor/+
|
||||
|
||||
* +LIBFOO_SITE_METHOD+ may contain the method to fetch the package
|
||||
source code. It can either be +wget+ (for normal FTP/HTTP downloads
|
||||
of tarballs), +svn+, +git+ or +bzr+. When not specified, it is
|
||||
guessed from the URL given in +LIBFOO_SITE+: +svn://+, +git://+ and
|
||||
+bzr://+ URLs will use the +svn+, +git+ and +bzr+ methods
|
||||
respectively. All other URL-types will use the +wget+ method. So for
|
||||
example, in the case of a package whose source code is available
|
||||
through Subversion repository on HTTP, one 'must' specifiy
|
||||
+LIBFOO_SITE_METHOD=svn+. For +svn+ and +git+ methods, what
|
||||
Buildroot does is a checkout/clone of the repository which is then
|
||||
tarballed and stored into the download cache. Next builds will not
|
||||
checkout/clone again, but will use the tarball directly. When
|
||||
+HOST_LIBFOO_SITE_METHOD+ is not specified, it defaults to the value
|
||||
of +LIBFOO_SITE_METHOD+. See +package/multimedia/tremor/+ for an
|
||||
example.
|
||||
|
||||
* +LIBFOO_DEPENDENCIES+ lists the dependencies (in terms of package
|
||||
name) that are required for the current target package to
|
||||
compile. These dependencies are guaranteed to be compiled and
|
||||
installed before the configuration of the current package starts. In
|
||||
a similar way, +HOST_LIBFOO_DEPENDENCIES+ lists the dependency for
|
||||
the current host package.
|
||||
|
||||
* +LIBFOO_INSTALL_STAGING+ can be set to +YES+ or +NO+ (default). If
|
||||
set to +YES+, then the commands in the +LIBFOO_INSTALL_STAGING_CMDS+
|
||||
variables are executed to install the package into the staging
|
||||
directory.
|
||||
|
||||
* +LIBFOO_INSTALL_TARGET+ can be set to +YES+ (default) or +NO+. If
|
||||
set to +YES+, then the commands in the +LIBFOO_INSTALL_TARGET_CMDS+
|
||||
variables are executed to install the package into the target
|
||||
directory.
|
||||
|
||||
The recommended way to define these variables is to use the following
|
||||
syntax:
|
||||
|
||||
----------------------
|
||||
LIBFOO_VERSION = 2.32
|
||||
----------------------
|
||||
|
||||
Now, the variables that define what should be performed at the
|
||||
different steps of the build process.
|
||||
|
||||
* +LIBFOO_CONFIGURE_CMDS+, used to list the actions to be performed to
|
||||
configure the package before its compilation
|
||||
|
||||
* +LIBFOO_BUILD_CMDS+, used to list the actions to be performed to
|
||||
compile the package
|
||||
|
||||
* +HOST_LIBFOO_INSTALL_CMDS+, used to list the actions to be performed
|
||||
to install the package, when the package is a host package. The
|
||||
package must install its files to the directory given by
|
||||
+$(HOST_DIR)+. All files, including development files such as
|
||||
headers should be installed, since other packages might be compiled
|
||||
on top of this package.
|
||||
|
||||
* +LIBFOO_INSTALL_TARGET_CMDS+, used to list the actions to be
|
||||
performed to install the package to the target directory, when the
|
||||
package is a target package. The package must install its files to
|
||||
the directory given by +$(TARGET_DIR)+. Only the files required for
|
||||
'documentation' and 'execution' of the package should be
|
||||
installed. Header files should not be installed, they will be copied
|
||||
to the target, if the +development files in target filesystem+
|
||||
option is selected.
|
||||
|
||||
* +LIBFOO_INSTALL_STAGING_CMDS+, used to list the actions to be
|
||||
performed to install the package to the staging directory, when the
|
||||
package is a target package. The package must install its files to
|
||||
the directory given by +$(STAGING_DIR)+. All development files
|
||||
should be installed, since they might be needed to compile other
|
||||
packages.
|
||||
|
||||
* +LIBFOO_CLEAN_CMDS+, used to list the actions to perform to clean up
|
||||
the build directory of the package.
|
||||
|
||||
* +LIBFOO_UNINSTALL_TARGET_CMDS+, used to list the actions to
|
||||
uninstall the package from the target directory +$(TARGET_DIR)+
|
||||
|
||||
* +LIBFOO_UNINSTALL_STAGING_CMDS+, used to list the actions to
|
||||
uninstall the package from the staging directory +$(STAGING_DIR)+.
|
||||
|
||||
The preferred way to define these variables is:
|
||||
|
||||
----------------------
|
||||
define LIBFOO_CONFIGURE_CMDS
|
||||
action 1
|
||||
action 2
|
||||
action 3
|
||||
endef
|
||||
----------------------
|
||||
|
||||
In the action definitions, you can use the following variables:
|
||||
|
||||
* +$(@D)+, which contains the directory in which the package source
|
||||
code has been uncompressed.
|
||||
|
||||
* +$(TARGET_CC)+, +$(TARGET_LD)+, etc. to get the target
|
||||
cross-compilation utilities
|
||||
|
||||
* +$(TARGET_CROSS)+ to get the cross-compilation toolchain prefix
|
||||
|
||||
* Of course the +$(HOST_DIR)+, +$(STAGING_DIR)+ and +$(TARGET_DIR)+
|
||||
variables to install the packages properly.
|
||||
|
||||
The last feature of the generic infrastructure is the ability to add
|
||||
hooks. These define further actions to perform after existing steps.
|
||||
Most hooks aren't really useful for generic packages, since the +.mk+
|
||||
file already has full control over the actions performed in each step
|
||||
of the package construction. The hooks are more useful for packages
|
||||
using the autotools infrastructure described below. However, since
|
||||
they are provided by the generic infrastructure, they are documented
|
||||
here. The exception is +LIBFOO_POST_PATCH_HOOKS+. Patching the
|
||||
package is not user definable, so +LIBFOO_POST_PATCH_HOOKS+ will be
|
||||
userful for generic packages.
|
||||
|
||||
The following hook points are available:
|
||||
|
||||
* +LIBFOO_POST_PATCH_HOOKS+
|
||||
* +LIBFOO_PRE_CONFIGURE_HOOKS+
|
||||
* +LIBFOO_POST_CONFIGURE_HOOKS+
|
||||
* +LIBFOO_POST_BUILD_HOOKS+
|
||||
* +LIBFOO_POST_INSTALL_HOOKS+ (for host packages only)
|
||||
* +LIBFOO_POST_INSTALL_STAGING_HOOKS+ (for target packages only)
|
||||
* +LIBFOO_POST_INSTALL_TARGET_HOOKS+ (for target packages only)
|
||||
|
||||
These variables are 'lists' of variable names containing actions to be
|
||||
performed at this hook point. This allows several hooks to be
|
||||
registered at a given hook point. Here is an example:
|
||||
|
||||
----------------------
|
||||
define LIBFOO_POST_PATCH_FIXUP
|
||||
action1
|
||||
action2
|
||||
endef
|
||||
|
||||
LIBFOO_POST_PATCH_HOOKS += LIBFOO_POST_PATCH_FIXUP
|
||||
----------------------
|
||||
44
docs/manual/adding-packages-gettext.txt
Normal file
44
docs/manual/adding-packages-gettext.txt
Normal file
@@ -0,0 +1,44 @@
|
||||
Gettext integration and interaction with packages
|
||||
-------------------------------------------------
|
||||
|
||||
Many packages that support internationalization use the gettext
|
||||
library. Dependencies for this library are fairly complicated and
|
||||
therefore, deserves some explanation.
|
||||
|
||||
The 'uClibc' C library doesn't implement gettext functionality,
|
||||
therefore with this C library, a separate gettext must be compiled. On
|
||||
the other hand, the 'glibc' C library does integrate its own gettext,
|
||||
and in this case, the separate gettext library should not be compiled,
|
||||
because it creates various kinds of build failures.
|
||||
|
||||
Additionally, some packages (such as +libglib2+) do require gettext
|
||||
unconditionally, while other packages (those who support
|
||||
+--disable-nls+ in general) only require gettext when locale support
|
||||
is enabled.
|
||||
|
||||
Therefore, Buildroot defines two configuration options:
|
||||
|
||||
* +BR2_NEEDS_GETTEXT+, which is true as soon as the toolchain doesn't
|
||||
provide its own gettext implementation
|
||||
|
||||
* +BR2_NEEDS_GETTEXT_IF_LOCALE+, which is true if the toolchain
|
||||
doesn't provide its own gettext implementation and if locale support
|
||||
is enabled
|
||||
|
||||
Therefore, packages that unconditionally need gettext should:
|
||||
|
||||
* Use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT+ and possibly
|
||||
+select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT+, if libintl is
|
||||
also needed
|
||||
|
||||
* Use +$(if $(BR2_NEEDS_GETTEXT),gettext)+ in the package
|
||||
+DEPENDENCIES+ variable
|
||||
|
||||
Packages that need gettext only when locale support is enabled should:
|
||||
|
||||
* Use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE+ and
|
||||
possibly +select BR2_PACKAGE_LIBINTL if
|
||||
BR2_NEEDS_GETTEXT_IF_LOCALE+, if libintl is also needed
|
||||
|
||||
* Use +$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)+ in the package
|
||||
+DEPENDENCIES+ variable
|
||||
167
docs/manual/adding-packages-handwritten.txt
Normal file
167
docs/manual/adding-packages-handwritten.txt
Normal file
@@ -0,0 +1,167 @@
|
||||
[[handwritten-tutorial]]
|
||||
|
||||
Manual Makefile
|
||||
---------------
|
||||
|
||||
*NOTE: new manual makefiles should not be created, and existing manual
|
||||
makefiles should be converted either to the generic, autotools or
|
||||
cmake infrastructure. This section is only kept to document the
|
||||
existing manual makefiles and to help understand how they work.*
|
||||
|
||||
------------------------
|
||||
01: #############################################################
|
||||
02: #
|
||||
03: # libfoo
|
||||
04: #
|
||||
05: #############################################################
|
||||
06: LIBFOO_VERSION:=1.0
|
||||
07: LIBFOO_SOURCE:=libfoo-$(LIBFOO_VERSION).tar.gz
|
||||
08: LIBFOO_SITE:=http://www.foosoftware.org/downloads
|
||||
09: LIBFOO_DIR:=$(BUILD_DIR)/foo-$(FOO_VERSION)
|
||||
10: LIBFOO_BINARY:=foo
|
||||
11: LIBFOO_TARGET_BINARY:=usr/bin/foo
|
||||
12:
|
||||
13: $(DL_DIR)/$(LIBFOO_SOURCE):
|
||||
14: $(call DOWNLOAD,$(LIBFOO_SITE),$(LIBFOO_SOURCE))
|
||||
15:
|
||||
16: $(LIBFOO_DIR)/.source: $(DL_DIR)/$(LIBFOO_SOURCE)
|
||||
17: $(ZCAT) $(DL_DIR)/$(LIBFOO_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
||||
18: touch $@
|
||||
19:
|
||||
20: $(LIBFOO_DIR)/.configured: $(LIBFOO_DIR)/.source
|
||||
21: (cd $(LIBFOO_DIR); rm -rf config.cache; \
|
||||
22: $(TARGET_CONFIGURE_OPTS) \
|
||||
23: $(TARGET_CONFIGURE_ARGS) \
|
||||
24: ./configure \
|
||||
25: --target=$(GNU_TARGET_NAME) \
|
||||
26: --host=$(GNU_TARGET_NAME) \
|
||||
27: --build=$(GNU_HOST_NAME) \
|
||||
28: --prefix=/usr \
|
||||
29: --sysconfdir=/etc \
|
||||
30: )
|
||||
31: touch $@
|
||||
32:
|
||||
33: $(LIBFOO_DIR)/$(LIBFOO_BINARY): $(LIBFOO_DIR)/.configured
|
||||
34: $(MAKE) CC=$(TARGET_CC) -C $(LIBFOO_DIR)
|
||||
35:
|
||||
36: $(TARGET_DIR)/$(LIBFOO_TARGET_BINARY): $(LIBFOO_DIR)/$(LIBFOO_BINARY)
|
||||
37: $(MAKE) DESTDIR=$(TARGET_DIR) -C $(LIBFOO_DIR) install-strip
|
||||
38: rm -Rf $(TARGET_DIR)/usr/man
|
||||
39:
|
||||
40: libfoo: uclibc ncurses $(TARGET_DIR)/$(LIBFOO_TARGET_BINARY)
|
||||
41:
|
||||
42: libfoo-source: $(DL_DIR)/$(LIBFOO_SOURCE)
|
||||
43:
|
||||
44: libfoo-clean:
|
||||
45: $(MAKE) prefix=$(TARGET_DIR)/usr -C $(LIBFOO_DIR) uninstall
|
||||
46: -$(MAKE) -C $(LIBFOO_DIR) clean
|
||||
47:
|
||||
48: libfoo-dirclean:
|
||||
49: rm -rf $(LIBFOO_DIR)
|
||||
50:
|
||||
51: #############################################################
|
||||
52: #
|
||||
53: # Toplevel Makefile options
|
||||
54: #
|
||||
55: #############################################################
|
||||
56: ifeq ($(BR2_PACKAGE_LIBFOO),y)
|
||||
57: TARGETS+=libfoo
|
||||
58: endif
|
||||
------------------------
|
||||
|
||||
First of all, this Makefile example works for a package which
|
||||
comprises a single binary executable. For other software, such as
|
||||
libraries or more complex stuff with multiple binaries, it must be
|
||||
qqadapted. For examples look at the other +*.mk+ files in the
|
||||
+package+ directory.
|
||||
|
||||
At lines 6-11, a couple of useful variables are defined:
|
||||
|
||||
* +LIBFOO_VERSION+: The version of 'libfoo' that should be downloaded.
|
||||
|
||||
* +LIBFOO_SOURCE+: The name of the tarball of 'libfoo' on the download
|
||||
website or FTP site. As you can see +LIBFOO_VERSION+ is used.
|
||||
|
||||
* +LIBFOO_SITE+: The HTTP or FTP site from which 'libfoo' archive is
|
||||
downloaded. It must include the complete path to the directory where
|
||||
+LIBFOO_SOURCE+ can be found.
|
||||
|
||||
* +LIBFOO_DIR+: The directory into which the software will be
|
||||
configured and compiled. Basically, it's a subdirectory of
|
||||
+BUILD_DIR+ which is created upon decompression of the tarball.
|
||||
|
||||
* +LIBFOO_BINARY+: Software binary name. As said previously, this is
|
||||
an example for a package with a single binary.
|
||||
|
||||
* +LIBFOO_TARGET_BINARY+: The full path of the binary inside the
|
||||
target filesystem. Lines 13-14 define a target that downloads the
|
||||
tarball from the remote site to the download directory (+DL_DIR+).
|
||||
|
||||
Lines 16-18 define a target and associated rules that uncompress the
|
||||
downloaded tarball. As you can see, this target depends on the tarball
|
||||
file so that the previous target (lines 13-14) is called before
|
||||
executing the rules of the current target. Uncompressing is followed
|
||||
by 'touching' a hidden file to mark the software as having been
|
||||
uncompressed. This trick is used everywhere in a Buildroot Makefile to
|
||||
split steps (download, uncompress, configure, compile, install) while
|
||||
still having correct dependencies.
|
||||
|
||||
Lines 20-31 define a target and associated rules that configure the
|
||||
software. It depends on the previous target (the hidden +.source+
|
||||
file) so that we are sure the software has been uncompressed. In order
|
||||
to configure the package, it basically runs the well-known
|
||||
+./configure+ script. As we may be doing cross-compilation, +target+,
|
||||
+host+ and +build+ arguments are given. The prefix is also set to
|
||||
+/usr+, not because the software will be installed in +/usr+ on your
|
||||
host system, but because the software will be installed in + /usr+ on
|
||||
the target filesystem. Finally it creates a +.configured+ file to mark
|
||||
the software as configured.
|
||||
|
||||
Lines 33-34 define a target and a rule that compile the software. This
|
||||
target will create the binary file in the compilation directory and
|
||||
depends on the software being already configured (hence the reference
|
||||
to the +.configured+ file). It basically runs +make+ inside the
|
||||
source directory.
|
||||
|
||||
Lines 36-38 define a target and associated rules that install the
|
||||
software inside the target filesystem. They depend on the binary file
|
||||
in the source directory to make sure the software has been
|
||||
compiled. They use the +install-strip+ target of the software
|
||||
+Makefile+ by passing a +DESTDIR+ argument so that the +Makefile+
|
||||
doesn't try to install the software in the host +/usr+ but rather in
|
||||
the target +/usr+. After the installation, the +/usr/man + directory
|
||||
inside the target filesystem is removed to save space.
|
||||
|
||||
Line 40 defines the main target of the software — the one that
|
||||
will eventually be used by the top level +Makefile+ to download,
|
||||
compile, and then install this package. This target should first of
|
||||
all depend on all needed dependencies of the software (in our example,
|
||||
'uclibc' and 'ncurses') and also depend on the final binary. This last
|
||||
dependency will call all previous dependencies in the correct order.
|
||||
|
||||
Line 42 defines a simple target that only downloads the code
|
||||
source. This is not used during normal operation of Buildroot, but is
|
||||
needed if you intend to download all required sources at once for
|
||||
later offline build. Note that if you add a new package, providing a
|
||||
+libfoo-source+ target is 'mandatory' to support users that wish to do
|
||||
offline-builds. Furthermore, it eases checking if all package-sources
|
||||
are downloadable.
|
||||
|
||||
Lines 44-46 define a simple target to clean the software build by
|
||||
calling the Makefile with the appropriate options. The +-clean+
|
||||
target should run +make clean+ on $(BUILD_DIR)/package-version and
|
||||
MUST uninstall all files of the package from $(STAGING_DIR) and from
|
||||
$(TARGET_DIR).
|
||||
|
||||
Lines 48-49 define a simple target to completely remove the directory
|
||||
in which the software was uncompressed, configured and compiled. The
|
||||
+-dirclean+ target MUST completely rm $(BUILD_DIR)/ package-version.
|
||||
|
||||
Lines 51-58 add the target +libfoo+ to the list of targets to be
|
||||
compiled by Buildroot, by first checking if the configuration option
|
||||
for this package has been enabled using the configuration tool. If so,
|
||||
it then "subscribes" this package to be compiled by adding
|
||||
the package to the TARGETS global variable. The name added to the
|
||||
TARGETS global variable is the name of this package's target, as
|
||||
defined on line 40, which is used by Buildroot to download, compile,
|
||||
and then install this package.
|
||||
21
docs/manual/adding-packages.txt
Normal file
21
docs/manual/adding-packages.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
Adding new packages to Buildroot
|
||||
================================
|
||||
|
||||
This section covers how new packages (userspace libraries or
|
||||
applications) can be integrated into Buildroot. It also shows how
|
||||
existing packages are integrated, which is needed for fixing issues or
|
||||
tuning their configuration.
|
||||
|
||||
include::adding-packages-directory.txt[]
|
||||
|
||||
include::adding-packages-gentargets.txt[]
|
||||
|
||||
include::adding-packages-autotargets.txt[]
|
||||
|
||||
include::adding-packages-cmaketargets.txt[]
|
||||
|
||||
include::adding-packages-handwritten.txt[]
|
||||
|
||||
include::adding-packages-gettext.txt[]
|
||||
|
||||
include::adding-packages-conclusion.txt[]
|
||||
35
docs/manual/board-support.txt
Normal file
35
docs/manual/board-support.txt
Normal file
@@ -0,0 +1,35 @@
|
||||
Creating your own board support
|
||||
===============================
|
||||
|
||||
Creating your own board support in Buildroot allows users of a
|
||||
particular hardware platform to easily build a system that is known to
|
||||
work.
|
||||
|
||||
To do so, you need to create a normal Buildroot configuration that
|
||||
builds a basic system for the hardware: toolchain, kernel, bootloader,
|
||||
filesystem and a simple Busybox-only userspace. No specific package
|
||||
should be selected: the configuration should be as minimal as
|
||||
possible, and should only build a working basic Busybox system for the
|
||||
target platform. You can of course use more complicated configurations
|
||||
for your internal projects, but the Buildroot project will only
|
||||
integrate basic board configurations. This is because package
|
||||
selections are highly application-specific.
|
||||
|
||||
Once you have a known working configuration, run +make
|
||||
savedefconfig+. This will generate a minimal +defconfig+ file at the
|
||||
root of the Buildroot source tree. Move this file into the +configs/+
|
||||
directory, and rename it +MYBOARD_defconfig+.
|
||||
|
||||
It is recommended to use as much as possible upstream versions of the
|
||||
Linux kernel and bootloaders, and to use as much as possible default
|
||||
kernel and bootloader configurations. If they are incorrect for your
|
||||
platform, we encourage you to send fixes to the corresponding upstream
|
||||
projects.
|
||||
|
||||
However, in the mean time, you may want to store kernel or bootloader
|
||||
configuration or patches specific to your target platform. To do so,
|
||||
create a directory +board/MANUFACTURER+ and a subdirectory
|
||||
+board/MANUFACTURER/BOARDNAME+ (after replacing, of course,
|
||||
MANUFACTURER and BOARDNAME with the appropriate values, in lower case
|
||||
letters). You can then store your patches and configurations in these
|
||||
directories, and reference them from the main Buildroot configuration.
|
||||
21
docs/manual/ccache-support.txt
Normal file
21
docs/manual/ccache-support.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
Using +ccache+ in Buildroot
|
||||
===========================
|
||||
|
||||
http://ccache.samba.org[ccache] is a compiler cache. It stores the
|
||||
object files resulting from each compilation process, and is able to
|
||||
skip future compilation of the same source file (with same compiler
|
||||
and same arguments) by using the pre-existing object files. When doing
|
||||
almost identical builds from scratch a number of times, it can nicely
|
||||
speed up the build process.
|
||||
|
||||
+ccache+ support is integrated in Buildroot. You just have to enable
|
||||
+Enable compiler cache+ in +Build options+. This will automatically
|
||||
build +ccache+ and use it for every host and target compilation.
|
||||
|
||||
The cache is located in +$HOME/.buildroot-ccache+. It is stored
|
||||
outside of Buildroot output directory so that it can be shared by
|
||||
separate Buildroot builds. If you want to get rid of the cache, simply
|
||||
remove this directory.
|
||||
|
||||
You can get statistics on the cache (its size, number of hits,
|
||||
misses, etc.) by running +make ccache-stats+.
|
||||
24
docs/manual/customize-busybox-config.txt
Normal file
24
docs/manual/customize-busybox-config.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
Customizing the Busybox configuration
|
||||
-------------------------------------
|
||||
[[busybox-custom]]
|
||||
|
||||
http://www.busybox.net/[Busybox] is very configurable, and you may
|
||||
want to customize it. You can follow these simple steps to do so. This
|
||||
method isn't optimal, but it's simple, and it works:
|
||||
|
||||
* Do an initial compilation of Buildroot, with busybox, without
|
||||
trying to customize it.
|
||||
|
||||
* Invoke +make busybox-menuconfig+.
|
||||
The nice configuration tool appears, and you can
|
||||
customize everything.
|
||||
|
||||
* Run the compilation of Buildroot again.
|
||||
|
||||
Otherwise, you can simply change the
|
||||
+package/busybox/busybox-<version>.config+ file, if you know the
|
||||
options you want to change, without using the configuration tool.
|
||||
|
||||
If you want to use an existing config file for busybox, then see
|
||||
section xref:env-vars[].
|
||||
|
||||
12
docs/manual/customize-kernel-config.txt
Normal file
12
docs/manual/customize-kernel-config.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
Customizing the Linux kernel configuration
|
||||
------------------------------------------
|
||||
|
||||
The Linux kernel configuration can be customized just like
|
||||
xref:busybox-custom[BusyBox] and xref:uclibc-custom[uClibc] using
|
||||
+make linux-menuconfig+. Make sure you have enabled the kernel build
|
||||
in +make menuconfig+ first. Once done, run +make+ to (re)build
|
||||
everything.
|
||||
|
||||
If you want to use an existing config file for Linux, then see
|
||||
xref:env-vars[].
|
||||
|
||||
36
docs/manual/customize-rootfs.txt
Normal file
36
docs/manual/customize-rootfs.txt
Normal file
@@ -0,0 +1,36 @@
|
||||
Customizing the generated target filesystem
|
||||
-------------------------------------------
|
||||
|
||||
There are a few ways to customize the resulting target filesystem:
|
||||
|
||||
* Customize the target filesystem directly and rebuild the image. The
|
||||
target filesystem is available under +output/target/+. You can
|
||||
simply make your changes here and run make afterwards - this will
|
||||
rebuild the target filesystem image. This method allows you to do
|
||||
anything to the target filesystem, but if you decide to completely
|
||||
rebuild your toolchain and tools, these changes will be lost.
|
||||
|
||||
* Create your own 'target skeleton'. You can start with the default
|
||||
skeleton available under +fs/skeleton+ and then customize it to suit
|
||||
your needs. The +BR2_ROOTFS_SKELETON_CUSTOM+ and
|
||||
+BR2_ROOTFS_SKELETON_CUSTOM_PATH+ will allow you to specify the
|
||||
location of your custom skeleton. At build time, the contents of the
|
||||
skeleton are copied to output/target before any package
|
||||
installation.
|
||||
|
||||
* In the Buildroot configuration, you can specify the path to a
|
||||
post-build script, that gets called 'after' Buildroot builds all the
|
||||
selected software, but 'before' the rootfs packages are
|
||||
assembled. The destination root filesystem folder is given as the
|
||||
first argument to this script, and this script can then be used to
|
||||
copy programs, static data or any other needed file to your target
|
||||
filesystem. You should, however, use this feature with care.
|
||||
Whenever you find that a certain package generates wrong or unneeded
|
||||
files, you should fix that package rather than work around it with a
|
||||
post-build cleanup script.
|
||||
|
||||
* A special package, 'customize', stored in +package/customize+ can be
|
||||
used. You can put all the files that you want to see in the final
|
||||
target root filesystem in +package/customize/source+, and then
|
||||
enable this special package in the configuration system.
|
||||
|
||||
32
docs/manual/customize-uclibc-config.txt
Normal file
32
docs/manual/customize-uclibc-config.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
Customizing the uClibc configuration
|
||||
------------------------------------
|
||||
[[uclibc-custom]]
|
||||
|
||||
Just like xref:busybox-custom[BusyBox], http://www.uclibc.org/[uClibc]
|
||||
offers a lot of configuration options. They allow you to select
|
||||
various functionalities depending on your needs and limitations.
|
||||
|
||||
The easiest way to modify the configuration of uClibc is to
|
||||
follow these steps:
|
||||
|
||||
* Do an initial compilation of Buildroot without trying to customize
|
||||
uClibc.
|
||||
|
||||
* Invoke +make uclibc-menuconfig+. The nice configuration assistant,
|
||||
similar to the one used in the Linux kernel or Buildroot,
|
||||
appears. Make your configuration changes as appropriate.
|
||||
|
||||
* Copy the +$(O)/toolchain/uclibc-VERSION/.config+ file to a different
|
||||
place (like +toolchain/uClibc/uClibc-myconfig.config+, or
|
||||
+board/mymanufacturer/myboard/uClibc.config+) and adjust the uClibc
|
||||
configuration (configuration option +BR2_UCLIBC_CONFIG+) to use this
|
||||
configuration instead of the default one.
|
||||
|
||||
* Run the compilation of Buildroot again.
|
||||
|
||||
Otherwise, you can simply change +toolchain/uClibc/uClibc.config+,
|
||||
without running the configuration assistant.
|
||||
|
||||
If you want to use an existing config file for uclibc, then see
|
||||
xref:env-vars[].
|
||||
|
||||
10
docs/manual/customize.txt
Normal file
10
docs/manual/customize.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
Customization
|
||||
=============
|
||||
|
||||
include::customize-rootfs.txt[]
|
||||
|
||||
include::customize-busybox-config.txt[]
|
||||
|
||||
include::customize-uclibc-config.txt[]
|
||||
|
||||
include::customize-kernel-config.txt[]
|
||||
26
docs/manual/download-location.txt
Normal file
26
docs/manual/download-location.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
Location of downloaded packages
|
||||
===============================
|
||||
|
||||
It might be useful to know that the various tarballs that are
|
||||
downloaded by the Makefiles are all stored in the +DL_DIR+ which by
|
||||
default is the +dl+ directory. It's useful, for example, if you want
|
||||
to keep a complete version of Buildroot which is known to be working
|
||||
with the associated tarballs. This will allow you to regenerate the
|
||||
toolchain and the target filesystem with exactly the same versions.
|
||||
|
||||
If you maintain several Buildroot trees, it might be better to have a
|
||||
shared download location. This can be accessed by creating a symbolic
|
||||
link from the +dl+ directory to the shared download location:
|
||||
|
||||
-----------------
|
||||
$ ln -s <shared download location> dl
|
||||
-----------------
|
||||
|
||||
Another way of accessing a shared download location is to create the
|
||||
+BUILDROOT_DL_DIR+ environment variable. If this is set, then the
|
||||
value of DL_DIR in the project is overridden. The following line
|
||||
should be added to +<~/.bashrc>+.
|
||||
|
||||
-----------------
|
||||
$ export BUILDROOT_DL_DIR <shared download location>
|
||||
-----------------
|
||||
84
docs/manual/external-toolchain.txt
Normal file
84
docs/manual/external-toolchain.txt
Normal file
@@ -0,0 +1,84 @@
|
||||
Using an external toolchain
|
||||
===========================
|
||||
|
||||
Using an already existing toolchain is useful for different
|
||||
reasons:
|
||||
|
||||
* you already have a toolchain that is known to work for your specific
|
||||
CPU
|
||||
|
||||
* you want to speed up the Buildroot build process by skipping the
|
||||
long toolchain build part
|
||||
|
||||
* the toolchain generation feature of Buildroot is not sufficiently
|
||||
flexible for you (for example if you need to generate a system with
|
||||
'glibc' instead of 'uClibc')
|
||||
|
||||
Buildroot supports using existing toolchains through a mechanism
|
||||
called 'external toolchain'. The external toolchain mechanism is
|
||||
enabled in the +Toolchain+ menu, by selecting +External toolchain+ in
|
||||
+Toolchain type+.
|
||||
|
||||
Then, you have three solutions to use an external toolchain:
|
||||
|
||||
* Use a predefined external toolchain profile, and let Buildroot
|
||||
download, extract and install the toolchain. Buildroot already knows
|
||||
about a few CodeSourcery toolchains for ARM, PowerPC, MIPS and
|
||||
SuperH. Just select the toolchain profile in +Toolchain+ through the
|
||||
available ones. This is definitely the easiest solution.
|
||||
|
||||
* Use a predefined external toolchain profile, but instead of having
|
||||
Buildroot download and extract the toolchain, you can tell Buildroot
|
||||
where your toolchain is already installed on your system. Just
|
||||
select the toolchain profile in +Toolchain+ through the available
|
||||
ones, unselect +Download toolchain automatically+, and fill the
|
||||
+Toolchain path+ text entry with the path to your cross-compiling
|
||||
toolchain.
|
||||
|
||||
* Use a completely custom external toolchain. This is particularly
|
||||
useful for toolchains generated using crosstool-NG. To do this,
|
||||
select the +Custom toolchain+ solution in the +Toolchain+ list. You
|
||||
need to fill the +Toolchain path+, +Toolchain prefix+ and +External
|
||||
toolchain C library+ options. Then, you have to tell Buildroot what
|
||||
your external toolchain supports. If your external toolchain uses
|
||||
the 'glibc' library, you only have to tell whether your toolchain
|
||||
supports C++ or not. If your external toolchain uses the 'uclibc'
|
||||
library, then you have to tell Buildroot if it supports largefile,
|
||||
IPv6, RPC, wide-char, locale, program invocation, threads and
|
||||
C++. At the beginning of the execution, Buildroot will tell you if
|
||||
the selected options do not match the toolchain configuration.
|
||||
|
||||
|
||||
Our external toolchain support has been tested with toolchains from
|
||||
CodeSourcery, toolchains generated by
|
||||
http://crosstool-ng.org[crosstool-NG], and toolchains generated by
|
||||
Buildroot itself. In general, all toolchains that support the
|
||||
'sysroot' feature should work. If not, do not hesitate to contact the
|
||||
developers.
|
||||
|
||||
We do not support toolchains from the
|
||||
http://www.denx.de/wiki/DULG/ELDK[ELDK] of Denx, for two reasons:
|
||||
|
||||
* The ELDK does not contain a pure toolchain (i.e just the compiler,
|
||||
binutils, the C and C++ libraries), but a toolchain that comes with
|
||||
a very large set of pre-compiled libraries and programs. Therefore,
|
||||
Buildroot cannot import the 'sysroot' of the toolchain, as it would
|
||||
contain hundreds of megabytes of pre-compiled libraries that are
|
||||
normally built by Buildroot.
|
||||
|
||||
* The ELDK toolchains have a completely non-standard custom mechanism
|
||||
to handle multiple library variants. Instead of using the standard
|
||||
GCC 'multilib' mechanism, the ARM ELDK uses different symbolic links
|
||||
to the compiler to differentiate between library variants (for ARM
|
||||
soft-float and ARM VFP), and the PowerPC ELDK compiler uses a
|
||||
+CROSS_COMPILE+ environment variable. This non-standard behaviour
|
||||
makes it difficult to support ELDK in Buildroot.
|
||||
|
||||
We also do not support using the distribution toolchain (i.e the
|
||||
gcc/binutils/C library installed by your distribution) as the
|
||||
toolchain to build software for the target. This is because your
|
||||
distribution toolchain is not a "pure" toolchain (i.e only with the
|
||||
C/C++ library), so we cannot import it properly into the Buildroot
|
||||
build environment. So even if you are building a system for a x86 or
|
||||
x86_64 target, you have to generate a cross-compilation toolchain with
|
||||
Buildroot or crosstool-NG.
|
||||
23
docs/manual/getting.txt
Normal file
23
docs/manual/getting.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
Getting Buildroot
|
||||
=================
|
||||
|
||||
Buildroot releases are made approximately every 3 months. Direct Git
|
||||
access and daily snapshots are also available, if you want more
|
||||
bleeding edge.
|
||||
|
||||
Releases are available at http://buildroot.net/downloads/[].
|
||||
|
||||
The latest snapshot is always available at
|
||||
http://buildroot.net/downloads/snapshots/buildroot-snapshot.tar.bz2[],
|
||||
and previous snapshots are also available at
|
||||
http://buildroot.net/downloads/snapshots/[].
|
||||
|
||||
To download Buildroot using Git, you can simply follow the rules
|
||||
described on the "Accessing Git" page
|
||||
(http://buildroot.net/git.html[]) of the Buildroot website
|
||||
(http://buildroot.net[]). For the impatient, here's a quick recipe:
|
||||
|
||||
---------------------
|
||||
$ git clone git://git.buildroot.net/buildroot
|
||||
---------------------
|
||||
|
||||
59
docs/manual/how-buildroot-works.txt
Normal file
59
docs/manual/how-buildroot-works.txt
Normal file
@@ -0,0 +1,59 @@
|
||||
How Buildroot works
|
||||
===================
|
||||
|
||||
As mentioned above, Buildroot is basically a set of Makefiles that
|
||||
download, configure, and compile software with the correct options. It
|
||||
also includes patches for various software packages - mainly the ones
|
||||
involved in the cross-compilation tool chain (+gcc+, +binutils+ and
|
||||
+uClibc+).
|
||||
|
||||
There is basically one Makefile per software package, and they are
|
||||
named with the +.mk+ extension. Makefiles are split into three main
|
||||
sections:
|
||||
|
||||
* *toolchain* (in the +toolchain/+ directory) contains the Makefiles
|
||||
and associated files for all software related to the
|
||||
cross-compilation toolchain: +binutils+, +gcc+, +gdb+,
|
||||
+kernel-headers+ and +uClibc+.
|
||||
|
||||
* *package* (in the +package/+ directory) contains the Makefiles and
|
||||
associated files for all user-space tools that Buildroot can compile
|
||||
and add to the target root filesystem. There is one sub-directory
|
||||
per tool.
|
||||
|
||||
* *target* (in the +target+ directory) contains the Makefiles and
|
||||
associated files for software related to the generation of the
|
||||
target root filesystem image. Four types of filesystems are
|
||||
supported: ext2, jffs2, cramfs and squashfs. For each of them there
|
||||
is a sub-directory with the required files. There is also a
|
||||
+default/+ directory that contains the target filesystem skeleton.
|
||||
|
||||
Each directory contains at least 2 files:
|
||||
|
||||
* +something.mk+ is the Makefile that downloads, configures,
|
||||
compiles and installs the package +something+.
|
||||
|
||||
* +Config.in+ is a part of the configuration tool
|
||||
description file. It describes the options related to the
|
||||
package.
|
||||
|
||||
The main Makefile performs the following steps (once the
|
||||
configuration is done):
|
||||
|
||||
* Create all the output directories: +staging+, +target+, +build+,
|
||||
+stamps+, etc. in the output directory (+output/+ by default,
|
||||
another value can be specified using +O=+)
|
||||
|
||||
* Generate all the targets listed in the +BASE_TARGETS+ variable. When
|
||||
an internal toolchain is used, this means generating the
|
||||
cross-compilation toolchain. When an external toolchain is used,
|
||||
this means checking the features of the external toolchain and
|
||||
importing it into the Buildroot environment.
|
||||
|
||||
* Generate all the targets listed in the +TARGETS+ variable. This
|
||||
variable is filled by all the individual components'
|
||||
Makefiles. Generating these targets will trigger the compilation of
|
||||
the userspace packages (libraries, programs), the kernel, the
|
||||
bootloader and the generation of the root filesystem images,
|
||||
depending on the configuration.
|
||||
|
||||
69
docs/manual/introduction.txt
Normal file
69
docs/manual/introduction.txt
Normal file
@@ -0,0 +1,69 @@
|
||||
About Buildroot
|
||||
===============
|
||||
|
||||
Buildroot is a set of Makefiles and patches that allows you to easily
|
||||
generate a cross-compilation toolchain, a root filesystem and a Linux
|
||||
kernel image for your target. Buildroot can be used for one, two or
|
||||
all of these options, independently.
|
||||
|
||||
Buildroot is useful mainly for people working with embedded systems.
|
||||
Embedded systems often use processors that are not the regular x86
|
||||
processors everyone is used to having in his PC. They can be PowerPC
|
||||
processors, MIPS processors, ARM processors, etc.
|
||||
|
||||
A compilation toolchain is the set of tools that allows you to compile
|
||||
code for your system. It consists of a compiler (in our case, +gcc+),
|
||||
binary utils like assembler and linker (in our case, +binutils+) and a
|
||||
C standard library (for example
|
||||
http://www.gnu.org/software/libc/libc.html[GNU Libc],
|
||||
http://www.uclibc.org/[uClibc] or
|
||||
http://www.fefe.de/dietlibc/[dietlibc]). The system installed on your
|
||||
development station certainly already has a compilation toolchain that
|
||||
you can use to compile an application that runs on your system. If
|
||||
you're using a PC, your compilation toolchain runs on an x86 processor
|
||||
and generates code for an x86 processor. Under most Linux systems, the
|
||||
compilation toolchain uses the GNU libc (glibc) as the C standard
|
||||
library. This compilation toolchain is called the "host compilation
|
||||
toolchain". The machine on which it is running, and on which you're
|
||||
working, is called the "host system". The compilation toolchain is
|
||||
provided by your distribution, and Buildroot has nothing to do with it
|
||||
(other than using it to build a cross-compilation toolchain and other
|
||||
tools that are run on the development host).
|
||||
|
||||
As said above, the compilation toolchain that comes with your system
|
||||
runs on and generates code for the processor in your host system. As
|
||||
your embedded system has a different processor, you need a
|
||||
cross-compilation toolchain - a compilation toolchain that runs on
|
||||
your host system but generates code for your target system (and target
|
||||
processor). For example, if your host system uses x86 and your target
|
||||
system uses ARM, the regular compilation toolchain on your host runs on
|
||||
x86 and generates code for x86, while the cross-compilation toolchain
|
||||
runs on x86 and generates code for ARM.
|
||||
|
||||
Even if your embedded system uses an x86 processor, you might be
|
||||
interested in Buildroot for two reasons:
|
||||
|
||||
* The compilation toolchain on your host certainly uses the GNU Libc
|
||||
which is a complete but huge C standard library. Instead of using
|
||||
GNU Libc on your target system, you can use uClibc which is a tiny C
|
||||
standard library. If you want to use this C library, then you need a
|
||||
compilation toolchain to generate binaries linked with it. Buildroot
|
||||
can do that for you.
|
||||
|
||||
* Buildroot automates the building of a root filesystem with all
|
||||
needed tools like busybox. That makes it much easier than doing it
|
||||
by hand.
|
||||
|
||||
You might wonder why such a tool is needed when you can compile +gcc+,
|
||||
+binutils+, +uClibc+ and all the other tools by hand. Of course doing
|
||||
so is possible but, dealing with all of the configure options and
|
||||
problems of every +gcc+ or +binutils+ version is very time-consuming
|
||||
and uninteresting. Buildroot automates this process through the use
|
||||
of Makefiles and has a collection of patches for each +gcc+ and
|
||||
+binutils+ version to make them work on most architectures.
|
||||
|
||||
Moreover, Buildroot provides an infrastructure for reproducing the
|
||||
build process of your kernel, cross-toolchain, and embedded root
|
||||
filesystem. Being able to reproduce the build process will be useful
|
||||
when a component needs to be patched or updated or when another person
|
||||
is supposed to take over the project.
|
||||
32
docs/manual/manual.txt
Normal file
32
docs/manual/manual.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
The Buildroot user manual
|
||||
=========================
|
||||
:toc:
|
||||
|
||||
Buildroot usage and documentation by Thomas Petazzoni. Contributions
|
||||
from Karsten Kruse, Ned Ludd, Martin Herren and others.
|
||||
|
||||
image::logo.png[]
|
||||
|
||||
:leveloffset: 1
|
||||
|
||||
include::introduction.txt[]
|
||||
|
||||
include::getting.txt[]
|
||||
|
||||
include::using.txt[]
|
||||
|
||||
include::customize.txt[]
|
||||
|
||||
include::rebuilding-packages.txt[]
|
||||
|
||||
include::how-buildroot-works.txt[]
|
||||
|
||||
include::using-buildroot-toolchain.txt[]
|
||||
|
||||
include::external-toolchain.txt[]
|
||||
|
||||
include::ccache-support.txt[]
|
||||
|
||||
include::download-location.txt[]
|
||||
|
||||
include::adding-packages.txt[]
|
||||
62
docs/manual/rebuilding-packages.txt
Normal file
62
docs/manual/rebuilding-packages.txt
Normal file
@@ -0,0 +1,62 @@
|
||||
Understanding how to rebuild packages
|
||||
=====================================
|
||||
|
||||
One of the most common questions asked by Buildroot users is how to
|
||||
rebuild a given package or how to remove a package without rebuilding
|
||||
everything from scratch.
|
||||
|
||||
Removing a package is currently unsupported by Buildroot without
|
||||
rebuilding from scratch. This is because Buildroot doesn't keep track
|
||||
of which package installs what files in the +output/staging+ and
|
||||
+output/target+ directories. However, implementing clean package
|
||||
removal is on the TODO-list of Buildroot developers.
|
||||
|
||||
The easiest way to rebuild a single package from scratch is to remove
|
||||
its build directory in +output/build+. Buildroot will then re-extract,
|
||||
re-configure, re-compile and re-install this package from scratch.
|
||||
|
||||
However, if you don't want to rebuild the package completely from
|
||||
scratch, a better understanding of the Buildroot internals is
|
||||
needed. Internally, to keep track of which steps have been done and
|
||||
which steps remain to be done, Buildroot maintains stamp files (empty
|
||||
files that just tell whether this or that action has been done). The
|
||||
problem is that these stamp files are not uniformly named and handled
|
||||
by the different packages, so some understanding of the particular
|
||||
package is needed.
|
||||
|
||||
For packages relying on Buildroot packages infrastructures (see
|
||||
xref:add-packages[this section] for details), the following stamp
|
||||
files are relevant:
|
||||
|
||||
* +output/build/packagename-version/.stamp_configured+. If removed,
|
||||
Buildroot will trigger the recompilation of the package from the
|
||||
configuration step (execution of +./configure+).
|
||||
|
||||
* +output/build/packagename-version/.stamp_built+. If removed,
|
||||
Buildroot will trigger the recompilation of the package from the
|
||||
compilation step (execution of +make+).
|
||||
|
||||
For other packages, an analysis of the specific 'package.mk' file is
|
||||
needed. For example, the zlib Makefile used to look like this (before
|
||||
it was converted to the generic package infrastructure):
|
||||
|
||||
-----------------
|
||||
$(ZLIB_DIR)/.configured: $(ZLIB_DIR)/.patched
|
||||
(cd $(ZLIB_DIR); rm -rf config.cache; \
|
||||
[...]
|
||||
)
|
||||
touch $@
|
||||
|
||||
$(ZLIB_DIR)/libz.a: $(ZLIB_DIR)/.configured
|
||||
$(MAKE) -C $(ZLIB_DIR) all libz.a
|
||||
touch -c $@
|
||||
-----------------
|
||||
|
||||
If you want to trigger the reconfiguration, you need to remove
|
||||
+output/build/zlib-version/.configured+. If you want to trigger only
|
||||
the recompilation, you need to remove
|
||||
+output/build/zlib-version/libz.a+.
|
||||
|
||||
Note that most packages, if not all, will progressively be ported over
|
||||
to the generic or autotools infrastructure, making it much easier to
|
||||
rebuild individual packages.
|
||||
20
docs/manual/using-buildroot-toolchain.txt
Normal file
20
docs/manual/using-buildroot-toolchain.txt
Normal file
@@ -0,0 +1,20 @@
|
||||
Using the generated toolchain outside Buildroot
|
||||
===============================================
|
||||
|
||||
You may want to compile, for your target, your own programs or other
|
||||
software that are not packaged in Buildroot. In order to do this you
|
||||
can use the toolchain that was generated by Buildroot.
|
||||
|
||||
The toolchain generated by Buildroot is located by default in
|
||||
+output/host/+. The simplest way to use it is to add
|
||||
+output/host/usr/bin/+ to your PATH environment variable and then to
|
||||
use +ARCH-linux-gcc+, +ARCH-linux-objdump+, +ARCH-linux-ld+, etc.
|
||||
|
||||
It is possible to relocate the toolchain - but then +--sysroot+ must
|
||||
be passed every time the compiler is called to tell where the
|
||||
libraries and header files are.
|
||||
|
||||
It is also possible to generate the Buildroot toolchain in a directory
|
||||
other than +output/host+ by using the +Build options -> Host dir+
|
||||
option. This could be useful if the toolchain must be shared with
|
||||
other users.
|
||||
183
docs/manual/using.txt
Normal file
183
docs/manual/using.txt
Normal file
@@ -0,0 +1,183 @@
|
||||
Using Buildroot
|
||||
===============
|
||||
|
||||
Configuration and general usage
|
||||
-------------------------------
|
||||
|
||||
Buildroot has a nice configuration tool similar to the one you can
|
||||
find in the http://www.kernel.org/[Linux kernel] or in
|
||||
http://www.busybox.org/[Busybox]. Note that you can (and should) build
|
||||
everything as a normal user. There is no need to be root to configure
|
||||
and use Buildroot. The first step is to run the configuration
|
||||
assistant:
|
||||
|
||||
--------------------
|
||||
$ make menuconfig
|
||||
--------------------
|
||||
|
||||
to run the curses-based configurator, or
|
||||
|
||||
--------------------
|
||||
$ make xconfig
|
||||
--------------------
|
||||
|
||||
or
|
||||
|
||||
--------------------
|
||||
$ make gconfig
|
||||
--------------------
|
||||
|
||||
to run the Qt or GTK-based configurators.
|
||||
|
||||
All of these "make" commands will need to build a configuration
|
||||
utility, so you may need to install "development" packages for
|
||||
relevant libraries used by the configuration utilities. On Debian-like
|
||||
systems, the +libncurses5-dev+ package is required to use the
|
||||
'menuconfig' interface, +libqt4-dev+ is required to use the 'xconfig'
|
||||
interface, and +libglib2.0-dev, libgtk2.0-dev and libglade2-dev+ are
|
||||
needed to use the 'gconfig' interface.
|
||||
|
||||
For each menu entry in the configuration tool, you can find associated
|
||||
help that describes the purpose of the entry.
|
||||
|
||||
Once everything is configured, the configuration tool generates a
|
||||
+.config+ file that contains the description of your
|
||||
configuration. It will be used by the Makefiles to do what's needed.
|
||||
|
||||
Let's go:
|
||||
|
||||
--------------------
|
||||
$ make
|
||||
--------------------
|
||||
|
||||
You *should never* use +make -jN+ with Buildroot: it does not support
|
||||
'top-level parallel make'. Instead, use the +BR2_JLEVEL+ option to
|
||||
tell Buildroot to run each package compilation with +make -jN+.
|
||||
|
||||
This command will generally perform the following steps:
|
||||
|
||||
* Download source files (as required)
|
||||
* Configure, build and install the cross-compiling toolchain if an
|
||||
internal toolchain is used, or import a toolchain if an external
|
||||
toolchain is used
|
||||
* Build/install selected target packages
|
||||
* Build a kernel image, if selected
|
||||
* Build a bootloader image, if selected
|
||||
* Create a root filesystem in selected formats
|
||||
|
||||
Buildroot output is stored in a single directory, +output/+.
|
||||
This directory contains several subdirectories:
|
||||
|
||||
* +images/+ where all the images (kernel image, bootloader and root
|
||||
filesystem images) are stored.
|
||||
|
||||
* +build/+ where all the components except for the cross-compilation
|
||||
toolchain are built (this includes tools needed to run Buildroot on
|
||||
the host and packages compiled for the target). The +build/+
|
||||
directory contains one subdirectory for each of these components.
|
||||
|
||||
* +staging/+ which contains a hierarchy similar to a root filesystem
|
||||
hierarchy. This directory contains the installation of the
|
||||
cross-compilation toolchain and all the userspace packages selected
|
||||
for the target. However, this directory is 'not' intended to be
|
||||
the root filesystem for the target: it contains a lot of development
|
||||
files, unstripped binaries and libraries that make it far too big
|
||||
for an embedded system. These development files are used to compile
|
||||
libraries and applications for the target that depend on other
|
||||
libraries.
|
||||
|
||||
* +target/+ which contains 'almost' the complete root filesystem for
|
||||
the target: everything needed is present except the device files in
|
||||
+/dev/+ (Buildroot can't create them because Buildroot doesn't run
|
||||
as root and doesn't want to run as root). Therefore, this directory
|
||||
*should not be used on your target*. Instead, you should use one of
|
||||
the images built in the +images/+ directory. If you need an
|
||||
extracted image of the root filesystem for booting over NFS, then
|
||||
use the tarball image generated in +images/+ and extract it as
|
||||
root. Compared to +staging/+, +target/+ contains only the files and
|
||||
libraries needed to run the selected target applications: the
|
||||
development files (headers, etc.) are not present, unless the
|
||||
+development files in target filesystem+ option is selected.
|
||||
|
||||
* +host/+ contains the installation of tools compiled for the host
|
||||
that are needed for the proper execution of Buildroot, including the
|
||||
cross-compilation toolchain.
|
||||
|
||||
* +toolchain/+ contains the build directories for the various
|
||||
components of the cross-compilation toolchain.
|
||||
|
||||
Offline builds
|
||||
--------------
|
||||
|
||||
If you intend to do an offline build and just want to download
|
||||
all sources that you previously selected in the configurator
|
||||
('menuconfig', 'xconfig' or 'gconfig'), then issue:
|
||||
|
||||
--------------------
|
||||
$ make source
|
||||
--------------------
|
||||
|
||||
You can now disconnect or copy the content of your +dl+
|
||||
directory to the build-host.
|
||||
|
||||
Building out-of-tree
|
||||
--------------------
|
||||
|
||||
Buildroot supports building out of tree with a syntax similar to the
|
||||
Linux kernel. To use it, add +O=<directory>+ to the make command line:
|
||||
|
||||
--------------------
|
||||
$ make O=/tmp/build
|
||||
--------------------
|
||||
|
||||
Or:
|
||||
|
||||
--------------------
|
||||
$ cd /tmp/build; make O=$PWD -C path/to/buildroot
|
||||
--------------------
|
||||
|
||||
All the output files will be located under +/tmp/build+.
|
||||
|
||||
When using out-of-tree builds, the Buildroot +.config+ and temporary
|
||||
files are also stored in the output directory. This means that you can
|
||||
safely run multiple builds in parallel using the same source tree as
|
||||
long as they use unique output directories.
|
||||
|
||||
For ease of use, Buildroot generates a Makefile wrapper in the output
|
||||
directory - So after the first run, you no longer need to pass +O=..+
|
||||
and +-C ..+, simply run (in the output directory):
|
||||
|
||||
--------------------
|
||||
$ make <target>
|
||||
--------------------
|
||||
|
||||
Environment variables
|
||||
---------------------
|
||||
[[env-vars]]
|
||||
|
||||
Buildroot also honors some environment variables, when they are passed
|
||||
to +make+ or set in the environment:
|
||||
|
||||
* +HOSTCXX+, the host C++ compiler to use
|
||||
* +HOSTCC+, the host C compiler to use
|
||||
* +UCLIBC_CONFIG_FILE=<path/to/.config>+, path to
|
||||
the uClibc configuration file, used to compile uClibc, if an
|
||||
internal toolchain is being built
|
||||
* +BUSYBOX_CONFIG_FILE=<path/to/.config>+, path to
|
||||
the Busybox configuration file
|
||||
* +BUILDROOT_DL_DIR+ to override the directory in which
|
||||
Buildroot stores/retrieves downloaded files
|
||||
|
||||
An example that uses config files located in the toplevel directory and
|
||||
in your $HOME:
|
||||
|
||||
--------------------
|
||||
$ make UCLIBC_CONFIG_FILE=uClibc.config BUSYBOX_CONFIG_FILE=$HOME/bb.config
|
||||
--------------------
|
||||
|
||||
If you want to use a compiler other than the default +gcc+
|
||||
or +g+++ for building helper-binaries on your host, then do
|
||||
|
||||
--------------------
|
||||
$ make HOSTCXX=g++-4.3-HEAD HOSTCC=gcc-4.3-HEAD
|
||||
--------------------
|
||||
@@ -5,7 +5,20 @@
|
||||
<p>
|
||||
|
||||
<ul>
|
||||
<li><b>32 August 2011 -- 2011.08 released</b>
|
||||
<li><b>11 November 2011 -- 2011.11-rc1 released</b>
|
||||
|
||||
<p>We have a new release candidate! Lots of changes all over the
|
||||
tree, see the <a
|
||||
href="http://git.buildroot.net/buildroot/plain/CHANGES?id=2011.11_rc1">CHANGES</a>
|
||||
file for details.
|
||||
|
||||
<p>Head to the <a href="/downloads/">downloads page</a> to pick up the
|
||||
<a href="/downloads/buildroot-2011.11-rc1.tar.bz2">2011.11-rc1
|
||||
release candidate</a>, and report any problems found to the <a
|
||||
href="lists.html">mailing list</a> or <a
|
||||
href="https://bugs.uclibc.org">bug tracker</a>.</p>
|
||||
|
||||
<li><b>31 August 2011 -- 2011.08 released</b>
|
||||
|
||||
<p>The stable 2011.08 release is out - Thanks to everyone
|
||||
contributing and testing the release candidates. See the
|
||||
|
||||
@@ -4,15 +4,29 @@
|
||||
#
|
||||
#############################################################
|
||||
|
||||
define ROOTFS_CPIO_INIT_SYMLINK
|
||||
rm -f $(TARGET_DIR)/init
|
||||
ln -s sbin/init $(TARGET_DIR)/init
|
||||
ifeq ($(BR2_ROOTFS_DEVICE_CREATION_STATIC),y)
|
||||
|
||||
define ROOTFS_CPIO_ADD_INIT
|
||||
if [ ! -e $(TARGET_DIR)/init ]; then \
|
||||
ln -sf sbin/init $(TARGET_DIR)/init; \
|
||||
fi
|
||||
endef
|
||||
|
||||
ROOTFS_CPIO_PRE_GEN_HOOKS += ROOTFS_CPIO_INIT_SYMLINK
|
||||
else
|
||||
# devtmpfs does not get automounted when initramfs is used.
|
||||
# Add a pre-init script to mount it before running init
|
||||
define ROOTFS_CPIO_ADD_INIT
|
||||
if [ ! -e $(TARGET_DIR)/init ]; then \
|
||||
$(INSTALL) -m 0755 fs/cpio/init $(TARGET_DIR)/init; \
|
||||
fi
|
||||
endef
|
||||
|
||||
endif # BR2_ROOTFS_DEVICE_CREATION_STATIC
|
||||
|
||||
ROOTFS_CPIO_PRE_GEN_HOOKS += ROOTFS_CPIO_ADD_INIT
|
||||
|
||||
define ROOTFS_CPIO_CMD
|
||||
cd $(TARGET_DIR) && find . | cpio --quiet -o -H newc > $$@
|
||||
endef
|
||||
|
||||
$(eval $(call ROOTFS_TARGET,cpio))
|
||||
$(eval $(call ROOTFS_TARGET,cpio))
|
||||
|
||||
@@ -9,14 +9,10 @@ else
|
||||
CRAMFS_OPTS=-l
|
||||
endif
|
||||
|
||||
ifneq ($(ROOTFS_DEVICE_TABLE),)
|
||||
CRAMFS_OPTS += -D $(ROOTFS_DEVICE_TABLE)
|
||||
endif
|
||||
|
||||
define ROOTFS_CRAMFS_CMD
|
||||
$(HOST_DIR)/usr/bin/mkcramfs -q $(CRAMFS_OPTS) $(TARGET_DIR) $$@
|
||||
endef
|
||||
|
||||
ROOTFS_CRAMFS_DEPENDENCIES = host-cramfs
|
||||
|
||||
$(eval $(call ROOTFS_TARGET,cramfs))
|
||||
$(eval $(call ROOTFS_TARGET,cramfs))
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
config BR2_TARGET_ROOTFS_INITRAMFS
|
||||
bool "initramfs for initial ramdisk of linux kernel"
|
||||
depends on BR2_LINUX_KERNEL
|
||||
select BR2_TARGET_ROOTFS_CPIO
|
||||
help
|
||||
Integrate the root filesystem generated by Buildroot as an
|
||||
initramfs inside the kernel image. This integration will
|
||||
take place automatically.
|
||||
|
||||
The rootfs.initramfs file generated in the images/ directory
|
||||
is only a text file describing the contents of the initramfs
|
||||
in a format understood by the CONFIG_INITRAMFS_SOURCE kernel
|
||||
configuration option.
|
||||
A rootfs.cpio file will be generated in the images/ directory.
|
||||
This is the archive that will be included in the kernel image.
|
||||
The rootfs in the kernel will always be gzip'ed, regardless
|
||||
of how buildroot's cpio archive is configured.
|
||||
|
||||
Note that enabling initramfs together with other filesystem
|
||||
Note that enabling initramfs together with another filesystem
|
||||
formats doesn't make sense: you would end up having two
|
||||
identical root filesystems, one embedded inside the kernel
|
||||
image, and one separatly.
|
||||
image, and one separately.
|
||||
|
||||
comment "initramfs requires a Linux kernel to be built"
|
||||
depends on !BR2_LINUX_KERNEL
|
||||
|
||||
@@ -1,203 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) Martin Schlemmer <azarah@nosferatu.za.org>
|
||||
# Released under the terms of the GNU GPL
|
||||
#
|
||||
# Generate a newline separated list of entries from the file/directory
|
||||
# supplied as an argument.
|
||||
#
|
||||
# If a file/directory is not supplied then generate a small dummy file.
|
||||
#
|
||||
# The output is suitable for gen_init_cpio built from usr/gen_init_cpio.c.
|
||||
#
|
||||
|
||||
default_initramfs() {
|
||||
cat <<-EOF
|
||||
# This is a very simple, default initramfs
|
||||
|
||||
dir /dev 0755 0 0
|
||||
nod /dev/console 0600 0 0 c 5 1
|
||||
dir /root 0700 0 0
|
||||
EOF
|
||||
}
|
||||
|
||||
filetype() {
|
||||
local argv1="$1"
|
||||
|
||||
# symlink test must come before file test
|
||||
if [ -L "$argv1" ]; then
|
||||
echo "slink"
|
||||
elif [ -f "$argv1" ]; then
|
||||
echo "file"
|
||||
elif [ -d "$argv1" ]; then
|
||||
echo "dir"
|
||||
elif [ -b "$argv1" -o -c "$argv1" ]; then
|
||||
echo "nod"
|
||||
elif [ -p "$argv1" ]; then
|
||||
echo "pipe"
|
||||
elif [ -S "$argv1" ]; then
|
||||
echo "sock"
|
||||
else
|
||||
echo "invalid"
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
print_mtime() {
|
||||
local argv1="$1"
|
||||
local mymtime="0"
|
||||
|
||||
if [ -e "$argv1" ]; then
|
||||
mymtime=$(find "$argv1" -printf "%T@\n" | sort -r | head -n 1)
|
||||
fi
|
||||
|
||||
echo "# Last modified: $mymtime"
|
||||
echo
|
||||
}
|
||||
|
||||
parse() {
|
||||
local location="$1"
|
||||
local name=$(echo "$location" | sed -e "s,$srcdir,,")
|
||||
# change '//' into '/'
|
||||
name=$(echo $name | sed -e 's,/[/]*,/,g')
|
||||
local mode="$2"
|
||||
local uid="$3"
|
||||
local gid="$4"
|
||||
local ftype=$(filetype "$location")
|
||||
# remap uid/gid to 0 if necessary
|
||||
[ "x$uid" != "x" ] && [ $uid -eq $root_uid ] && uid=0
|
||||
[ "x$gid" != "x" ] && [ $gid -eq $root_gid ] && gid=0
|
||||
local str="$mode $uid $gid"
|
||||
|
||||
[ "$ftype" = "invalid" ] && return 0
|
||||
[ "$location" = "$srcdir" ] && return 0
|
||||
|
||||
case "$ftype" in
|
||||
"file")
|
||||
str="$ftype $name $location $str"
|
||||
;;
|
||||
"nod")
|
||||
local devtype=
|
||||
local maj=$(LC_ALL=C ls -l "$location" | \
|
||||
awk '{sub(/,/, "", $5); print $5}')
|
||||
local min=$(LC_ALL=C ls -l "$location" | \
|
||||
awk '{print $6}')
|
||||
|
||||
if [ -b "$location" ]; then
|
||||
devtype="b"
|
||||
else
|
||||
devtype="c"
|
||||
fi
|
||||
str="$ftype $name $str $devtype $maj $min"
|
||||
;;
|
||||
"slink")
|
||||
local target=$(LC_ALL=C ls -l "$location" | \
|
||||
awk '{print $11}')
|
||||
str="$ftype $name $target $str"
|
||||
;;
|
||||
*)
|
||||
str="$ftype $name $str"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "$str"
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
usage() {
|
||||
printf "Usage:\n"
|
||||
printf "$0 [ [-u <root_uid>] [-g <root_gid>] [-d | <cpio_source>] ] . . .\n"
|
||||
printf "\n"
|
||||
printf -- "-u <root_uid> User ID to map to user ID 0 (root).\n"
|
||||
printf " <root_uid> is only meaningful if <cpio_source>\n"
|
||||
printf " is a directory.\n"
|
||||
printf -- "-g <root_gid> Group ID to map to group ID 0 (root).\n"
|
||||
printf " <root_gid> is only meaningful if <cpio_source>\n"
|
||||
printf " is a directory.\n"
|
||||
printf "<cpio_source> File list or directory for cpio archive.\n"
|
||||
printf " If <cpio_source> is not provided then a\n"
|
||||
printf " a default list will be output.\n"
|
||||
printf -- "-d Output the default cpio list. If no <cpio_source>\n"
|
||||
printf " is given then the default cpio list will be output.\n"
|
||||
printf "\n"
|
||||
printf "All options may be repeated and are interpreted sequentially\n"
|
||||
printf "and immediately. -u and -g states are preserved across\n"
|
||||
printf "<cpio_source> options so an explicit \"-u 0 -g 0\" is required\n"
|
||||
printf "to reset the root/group mapping.\n"
|
||||
}
|
||||
|
||||
build_list() {
|
||||
printf "\n#####################\n# $cpio_source\n"
|
||||
|
||||
if [ -f "$cpio_source" ]; then
|
||||
print_mtime "$cpio_source"
|
||||
cat "$cpio_source"
|
||||
elif [ -d "$cpio_source" ]; then
|
||||
srcdir=$(echo "$cpio_source" | sed -e 's://*:/:g;s:/$::')
|
||||
dirlist=$(find "$srcdir" -printf "%p %m %U %G\n" 2>/dev/null)
|
||||
|
||||
# If $dirlist is only one line, then the directory is empty
|
||||
if [ "$(echo "$dirlist" | wc -l)" -gt 1 ]; then
|
||||
print_mtime "$cpio_source"
|
||||
|
||||
echo "$dirlist" | \
|
||||
while read x; do
|
||||
parse $x
|
||||
done
|
||||
else
|
||||
# Failsafe in case directory is empty
|
||||
default_initramfs
|
||||
fi
|
||||
else
|
||||
echo " $0: Cannot open '$cpio_source'" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
root_uid=0
|
||||
root_gid=0
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
arg="$1"
|
||||
shift
|
||||
case "$arg" in
|
||||
"-u")
|
||||
root_uid="$1"
|
||||
shift
|
||||
;;
|
||||
"-g")
|
||||
root_gid="$1"
|
||||
shift
|
||||
;;
|
||||
"-d")
|
||||
default_list="$arg"
|
||||
default_initramfs
|
||||
;;
|
||||
"-h")
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
case "$arg" in
|
||||
"-"*)
|
||||
printf "ERROR: unknown option \"$arg\"\n" >&2
|
||||
printf "If the filename validly begins with '-', then it must be prefixed\n" >&2
|
||||
printf "by './' so that it won't be interpreted as an option." >&2
|
||||
printf "\n" >&2
|
||||
usage >&2
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
cpio_source="$arg"
|
||||
build_list
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# spit out the default cpio list if a source hasn't been specified
|
||||
[ -z "$cpio_source" -a -z "$default_list" ] && default_initramfs
|
||||
|
||||
exit 0
|
||||
@@ -1,36 +1,23 @@
|
||||
#############################################################
|
||||
#
|
||||
# Make a initramfs_list file to be used by gen_init_cpio
|
||||
# gen_init_cpio is part of the 2.6 linux kernels to build an
|
||||
# initial ramdisk filesystem based on cpio
|
||||
# Build a kernel with an integrated initial ramdisk
|
||||
# filesystem based on cpio.
|
||||
#
|
||||
#############################################################
|
||||
|
||||
ifeq ($(BR2_ROOTFS_DEVICE_CREATION_STATIC),y)
|
||||
|
||||
define ROOTFS_INITRAMFS_ADD_INIT
|
||||
if [ ! -e $(TARGET_DIR)/init ]; then \
|
||||
ln -sf sbin/init $(TARGET_DIR)/init; \
|
||||
fi
|
||||
endef
|
||||
|
||||
else
|
||||
# devtmpfs does not get automounted when initramfs is used.
|
||||
# Add a pre-init script to mount it before running init
|
||||
define ROOTFS_INITRAMFS_ADD_INIT
|
||||
if [ ! -e $(TARGET_DIR)/init ]; then \
|
||||
$(INSTALL) -m 0755 fs/initramfs/init $(TARGET_DIR)/init; \
|
||||
fi
|
||||
endef
|
||||
|
||||
endif # BR2_ROOTFS_DEVICE_CREATION_STATIC
|
||||
|
||||
ROOTFS_INITRAMFS_PRE_GEN_HOOKS += ROOTFS_INITRAMFS_ADD_INIT
|
||||
|
||||
define ROOTFS_INITRAMFS_CMD
|
||||
$(SHELL) fs/initramfs/gen_initramfs_list.sh -u 0 -g 0 $(TARGET_DIR) > $$@
|
||||
endef
|
||||
ROOTFS_INITRAMFS_DEPENDENCIES += rootfs-cpio
|
||||
|
||||
ROOTFS_INITRAMFS_POST_TARGETS += linux26-rebuild-with-initramfs
|
||||
|
||||
$(eval $(call ROOTFS_TARGET,initramfs))
|
||||
|
||||
# The generic fs infrastructure isn't very useful here.
|
||||
|
||||
rootfs-initramfs: $(ROOTFS_INITRAMFS_DEPENDENCIES) $(ROOTFS_INITRAMFS_POST_TARGETS)
|
||||
|
||||
rootfs-initramfs-show-depends:
|
||||
@echo $(ROOTFS_INITRAMFS_DEPENDENCIES)
|
||||
|
||||
ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
|
||||
TARGETS += rootfs-initramfs
|
||||
endif
|
||||
|
||||
|
||||
@@ -46,3 +46,10 @@ if [ "$PS1" ]; then
|
||||
alias calc='calc -Cd '
|
||||
alias bc='calc -Cd '
|
||||
fi;
|
||||
|
||||
# Source configuration files from /etc/profile.d
|
||||
for i in /etc/profile.d/*.sh ; do
|
||||
if [ -r "$i" ]; then
|
||||
. $i
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -40,3 +40,9 @@ ttyO3
|
||||
ttyAM0
|
||||
ttyAM1
|
||||
ttyAM2
|
||||
ttySC0
|
||||
ttySC1
|
||||
ttySC2
|
||||
ttySC3
|
||||
ttySC4
|
||||
ttySC5
|
||||
|
||||
31
linux/Config.ext.in
Normal file
31
linux/Config.ext.in
Normal file
@@ -0,0 +1,31 @@
|
||||
menu "Linux Kernel Extensions"
|
||||
|
||||
# Xenomai
|
||||
config BR2_LINUX_KERNEL_EXT_XENOMAI
|
||||
bool "Adeos/Xenomai Real-time patch"
|
||||
select BR2_PACKAGE_XENOMAI
|
||||
help
|
||||
Xenomai Kernel part.
|
||||
|
||||
config BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH
|
||||
depends on BR2_LINUX_KERNEL_EXT_XENOMAI
|
||||
string "Path for Adeos patch file"
|
||||
help
|
||||
Optionally, explicitly specify the Adeos patch to use.
|
||||
Download it at http://download.gna.org/adeos/patches/v2.6/$(ARCH)/
|
||||
and verify that your kernel version in buildroot matches.
|
||||
|
||||
# RTAI
|
||||
config BR2_LINUX_KERNEL_EXT_RTAI
|
||||
bool "RTAI Real-time patch"
|
||||
select BR2_PACKAGE_RTAI
|
||||
help
|
||||
RTAI Kernel part.
|
||||
|
||||
config BR2_LINUX_KERNEL_EXT_RTAI_PATCH
|
||||
depends on BR2_LINUX_KERNEL_EXT_RTAI
|
||||
string "Path for RTAI patch file"
|
||||
help
|
||||
Optionally, explicitly specify the RTAI patch to use.
|
||||
|
||||
endmenu
|
||||
@@ -19,10 +19,10 @@ if BR2_LINUX_KERNEL
|
||||
#
|
||||
choice
|
||||
prompt "Kernel version"
|
||||
default BR2_LINUX_KERNEL_2_6_39
|
||||
default BR2_LINUX_KERNEL_3_1
|
||||
|
||||
config BR2_LINUX_KERNEL_2_6_39
|
||||
bool "2.6.39.4"
|
||||
config BR2_LINUX_KERNEL_3_1
|
||||
bool "3.1"
|
||||
|
||||
config BR2_LINUX_KERNEL_SAME_AS_HEADERS
|
||||
bool "Same as toolchain kernel headers"
|
||||
@@ -58,7 +58,7 @@ endchoice
|
||||
config BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE
|
||||
string "Kernel version"
|
||||
depends on BR2_LINUX_KERNEL_CUSTOM_VERSION
|
||||
default "2.6.39.4"
|
||||
default "3.1"
|
||||
|
||||
config BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION
|
||||
string "URL of custom kernel tarball"
|
||||
@@ -74,7 +74,7 @@ config BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION
|
||||
|
||||
config BR2_LINUX_KERNEL_VERSION
|
||||
string
|
||||
default "2.6.39.4" if BR2_LINUX_KERNEL_2_6_39
|
||||
default "3.1" if BR2_LINUX_KERNEL_3_1
|
||||
default BR2_DEFAULT_KERNEL_HEADERS if BR2_LINUX_KERNEL_SAME_AS_HEADERS
|
||||
default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE if BR2_LINUX_KERNEL_CUSTOM_VERSION
|
||||
default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL
|
||||
@@ -146,6 +146,10 @@ config BR2_LINUX_KERNEL_VMLINUX_BIN
|
||||
|
||||
config BR2_LINUX_KERNEL_VMLINUX
|
||||
bool "vmlinux"
|
||||
depends on BR2_mips || BR2_mipsel || BR2_powerpc
|
||||
|
||||
config BR2_LINUX_KERNEL_VMLINUZ
|
||||
bool "vmlinuz"
|
||||
depends on BR2_mips || BR2_mipsel
|
||||
|
||||
config BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM
|
||||
@@ -176,6 +180,10 @@ config BR2_LINUX_KERNEL_INSTALL_TARGET
|
||||
/boot in the target root filesystem, as is typically done on
|
||||
x86/x86_64 systems.
|
||||
|
||||
|
||||
# Linux extensions
|
||||
source "linux/Config.ext.in"
|
||||
|
||||
endif # BR2_LINUX_KERNEL
|
||||
|
||||
endmenu
|
||||
|
||||
47
linux/linux-ext-rtai.mk
Normal file
47
linux/linux-ext-rtai.mk
Normal file
@@ -0,0 +1,47 @@
|
||||
##################################################
|
||||
# Linux RTAI extensions
|
||||
#
|
||||
# Patch the linux kernel with RTAI extension
|
||||
##################################################
|
||||
|
||||
ifeq ($(BR2_LINUX_KERNEL_EXT_RTAI),y)
|
||||
# Add dependency to RTAI (user-space) which provide kernel patches
|
||||
LINUX_DEPENDENCIES += rtai-patch
|
||||
|
||||
RTAI_PATCH = $(call qstrip,$(BR2_LINUX_KERNEL_EXT_RTAI_PATCH))
|
||||
|
||||
ifeq ($(KERNEL_ARCH),i386)
|
||||
RTAI_ARCH = x86
|
||||
else ifeq ($(KERNEL_ARCH),x86_64)
|
||||
RTAI_ARCH = x86
|
||||
else ifeq ($(KERNEL_ARCH),powerpc)
|
||||
RTAI_ARCH = ppc
|
||||
else
|
||||
RTAI_ARCH = $(KERNEL_ARCH)
|
||||
endif
|
||||
|
||||
# Prepare kernel patch
|
||||
ifeq ($(RTAI_PATCH),)
|
||||
define RTAI_PREPARE_KERNEL
|
||||
kver=`$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) --no-print-directory -s kernelversion` ; \
|
||||
if test -f $(RTAI_DIR)/base/arch/$(RTAI_ARCH)/patches/hal-linux-$${kver}-*patch ; then \
|
||||
support/scripts/apply-patches.sh $(LINUX_DIR) \
|
||||
$(RTAI_DIR)/base/arch/$(RTAI_ARCH)/patches/ \
|
||||
hal-linux-$${kver}-*patch ; \
|
||||
else \
|
||||
echo "No RTAI patch for your kernel version" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
endef
|
||||
else
|
||||
define RTAI_PREPARE_KERNEL
|
||||
support/scripts/apply-patches.sh \
|
||||
$(LINUX_DIR) \
|
||||
$(dir $(RTAI_PATCH)) \
|
||||
$(notdir $(RTAI_PATCH))
|
||||
endef
|
||||
endif
|
||||
|
||||
LINUX_PRE_PATCH_HOOKS += RTAI_PREPARE_KERNEL
|
||||
|
||||
endif #BR2_LINUX_EXT_RTAI
|
||||
30
linux/linux-ext-xenomai.mk
Normal file
30
linux/linux-ext-xenomai.mk
Normal file
@@ -0,0 +1,30 @@
|
||||
##################################################
|
||||
# Linux Adeos/Xenomai extensions
|
||||
#
|
||||
# Patch the linux kernel with xenomai extension
|
||||
##################################################
|
||||
|
||||
ifeq ($(BR2_LINUX_KERNEL_EXT_XENOMAI),y)
|
||||
# Add dependency to xenomai (user-space) which provide ksrc part
|
||||
LINUX_DEPENDENCIES += xenomai
|
||||
|
||||
# Adeos patch version
|
||||
XENOMAI_ADEOS_PATCH = $(call qstrip,$(BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH))
|
||||
ifeq ($(XENOMAI_ADEOS_PATCH),)
|
||||
XENOMAI_ADEOS_OPT = --default
|
||||
else
|
||||
XENOMAI_ADEOS_OPT = --adeos=$(XENOMAI_ADEOS_PATCH)
|
||||
endif
|
||||
|
||||
# Prepare kernel patch
|
||||
define XENOMAI_PREPARE_KERNEL
|
||||
$(XENOMAI_DIR)/scripts/prepare-kernel.sh \
|
||||
--linux=$(LINUX_DIR) \
|
||||
--arch=$(KERNEL_ARCH) \
|
||||
$(XENOMAI_ADEOS_OPT) \
|
||||
--verbose
|
||||
endef
|
||||
|
||||
LINUX_PRE_PATCH_HOOKS += XENOMAI_PREPARE_KERNEL
|
||||
|
||||
endif #BR2_LINUX_EXT_XENOMAI
|
||||
@@ -18,9 +18,11 @@ LINUX_SOURCE = linux-$(LINUX_VERSION).tar.bz2
|
||||
# In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order
|
||||
# to use the $(word) function. We support versions such as 3.1,
|
||||
# 2.6.32, 2.6.32-rc1, 3.0-rc6, etc.
|
||||
LINUX_VERSION_MAJOR = $(word 1,$(subst ., ,$(subst -, ,$(LINUX_VERSION))))
|
||||
LINUX_VERSION_MINOR = $(word 2,$(subst ., ,$(subst -, ,$(LINUX_VERSION))))
|
||||
LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v$(LINUX_VERSION_MAJOR).$(LINUX_VERSION_MINOR)/
|
||||
ifeq ($(findstring x2.6.,x$(LINUX_VERSION)),x2.6.)
|
||||
LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/
|
||||
else
|
||||
LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v3.x/
|
||||
endif
|
||||
# release candidates are in testing/ subdir
|
||||
ifneq ($(findstring -rc,$(LINUX_VERSION)),)
|
||||
LINUX_SITE := $(LINUX_SITE)testing/
|
||||
@@ -63,6 +65,8 @@ else ifeq ($(BR2_LINUX_KERNEL_VMLINUX_BIN),y)
|
||||
LINUX_IMAGE_NAME=vmlinux.bin
|
||||
else ifeq ($(BR2_LINUX_KERNEL_VMLINUX),y)
|
||||
LINUX_IMAGE_NAME=vmlinux
|
||||
else ifeq ($(BR2_LINUX_KERNEL_VMLINUZ),y)
|
||||
LINUX_IMAGE_NAME=vmlinuz
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -80,6 +84,8 @@ endif
|
||||
|
||||
ifeq ($(BR2_LINUX_KERNEL_VMLINUX),y)
|
||||
LINUX_IMAGE_PATH=$(LINUX_DIR)/$(LINUX_IMAGE_NAME)
|
||||
else ifeq ($(BR2_LINUX_KERNEL_VMLINUZ),y)
|
||||
LINUX_IMAGE_PATH=$(LINUX_DIR)/$(LINUX_IMAGE_NAME)
|
||||
else
|
||||
ifeq ($(KERNEL_ARCH),avr32)
|
||||
LINUX_IMAGE_PATH=$(KERNEL_ARCH_PATH)/boot/images/$(LINUX_IMAGE_NAME)
|
||||
@@ -100,11 +106,11 @@ LINUX_POST_DOWNLOAD_HOOKS += LINUX_DOWNLOAD_PATCHES
|
||||
define LINUX_APPLY_PATCHES
|
||||
for p in $(LINUX_PATCHES) ; do \
|
||||
if echo $$p | grep -q -E "^ftp://|^http://" ; then \
|
||||
toolchain/patch-kernel.sh $(@D) $(DL_DIR) `basename $$p` ; \
|
||||
support/scripts/apply-patches.sh $(@D) $(DL_DIR) `basename $$p` ; \
|
||||
elif test -d $$p ; then \
|
||||
toolchain/patch-kernel.sh $(@D) $$p linux-\*.patch ; \
|
||||
support/scripts/apply-patches.sh $(@D) $$p linux-\*.patch ; \
|
||||
else \
|
||||
toolchain/patch-kernel.sh $(@D) `dirname $$p` `basename $$p` ; \
|
||||
support/scripts/apply-patches.sh $(@D) `dirname $$p` `basename $$p` ; \
|
||||
fi \
|
||||
done
|
||||
endef
|
||||
@@ -126,13 +132,13 @@ define LINUX_CONFIGURE_CMDS
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config),
|
||||
$(call KCONFIG_DISABLE_OPT,CONFIG_AEABI,$(@D)/.config))
|
||||
# As the kernel gets compiled before root filesystems are
|
||||
# built, we create a fake initramfs file list. It'll be
|
||||
# replaced later by the real list, and the kernel will be
|
||||
# built, we create a fake cpio file. It'll be
|
||||
# replaced later by the real cpio archive, and the kernel will be
|
||||
# rebuilt using the linux26-rebuild-with-initramfs target.
|
||||
$(if $(BR2_TARGET_ROOTFS_INITRAMFS),
|
||||
touch $(BINARIES_DIR)/rootfs.initramfs
|
||||
touch $(BINARIES_DIR)/rootfs.cpio
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config)
|
||||
$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"$(BINARIES_DIR)/rootfs.initramfs\",$(@D)/.config)
|
||||
$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"$(BINARIES_DIR)/rootfs.cpio\",$(@D)/.config)
|
||||
$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(@D)/.config)
|
||||
$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(@D)/.config)
|
||||
$(call KCONFIG_DISABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_NONE,$(@D)/.config)
|
||||
@@ -177,7 +183,9 @@ define LINUX_INSTALL_TARGET_CMDS
|
||||
fi
|
||||
endef
|
||||
|
||||
$(eval $(call GENTARGETS,,linux))
|
||||
include linux/linux-ext-*.mk
|
||||
|
||||
$(eval $(call GENTARGETS))
|
||||
|
||||
linux-menuconfig linux-xconfig linux-gconfig linux-nconfig linux26-menuconfig linux26-xconfig linux26-gconfig linux26-nconfig: dirs $(LINUX_DIR)/.stamp_configured
|
||||
$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) \
|
||||
@@ -188,13 +196,21 @@ linux-savedefconfig linux26-savedefconfig: dirs $(LINUX_DIR)/.stamp_configured
|
||||
$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) \
|
||||
$(subst linux-,,$(subst linux26-,,$@))
|
||||
|
||||
# Support for rebuilding the kernel after the initramfs file list has
|
||||
# been generated in $(BINARIES_DIR)/rootfs.initramfs.
|
||||
$(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_target_installed $(LINUX_DIR)/.stamp_images_installed $(BINARIES_DIR)/rootfs.initramfs
|
||||
ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y)
|
||||
linux-update-config linux26-update-config: $(LINUX_DIR)/.config
|
||||
cp -f $(LINUX_DIR)/.config $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE)
|
||||
|
||||
linux-update-defconfig linux26-update-defconfig: linux-savedefconfig
|
||||
cp -f $(LINUX_DIR)/defconfig $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE)
|
||||
else
|
||||
linux-update-config linux26-update-config: ;
|
||||
linux-update-defconfig linux26-update-defconfig: ;
|
||||
endif
|
||||
|
||||
# Support for rebuilding the kernel after the cpio archive has
|
||||
# been generated in $(BINARIES_DIR)/rootfs.cpio.
|
||||
$(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_target_installed $(LINUX_DIR)/.stamp_images_installed $(BINARIES_DIR)/rootfs.cpio
|
||||
@$(call MESSAGE,"Rebuilding kernel with initramfs")
|
||||
# Remove the previously generated initramfs which was empty,
|
||||
# to make sure the kernel will actually regenerate it.
|
||||
$(RM) -f $(@D)/usr/initramfs_data.cpio*
|
||||
# Build the kernel.
|
||||
$(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_IMAGE_NAME)
|
||||
# Copy the kernel image to its final destination
|
||||
|
||||
@@ -31,6 +31,7 @@ source "package/oprofile/Config.in"
|
||||
source "package/strace/Config.in"
|
||||
source "package/whetstone/Config.in"
|
||||
source "package/valgrind/Config.in"
|
||||
source "package/pv/Config.in"
|
||||
endmenu
|
||||
|
||||
menu "Development tools"
|
||||
@@ -127,6 +128,7 @@ comment "X Window managers"
|
||||
source "package/matchbox/Config.in"
|
||||
source "package/metacity/Config.in"
|
||||
source "package/blackbox/Config.in"
|
||||
source "package/fluxbox/Config.in"
|
||||
|
||||
comment "X applications"
|
||||
source "package/alsamixergui/Config.in"
|
||||
@@ -142,6 +144,7 @@ source "package/rdesktop/Config.in"
|
||||
source "package/sylpheed/Config.in"
|
||||
source "package/synergy/Config.in"
|
||||
source "package/torsmo/Config.in"
|
||||
source "package/vala/Config.in"
|
||||
source "package/x11vnc/Config.in"
|
||||
source "package/xstroke/Config.in"
|
||||
source "package/xterm/Config.in"
|
||||
@@ -190,14 +193,12 @@ source "package/memtester/Config.in"
|
||||
source "package/mtd/Config.in"
|
||||
source "package/ntfs-3g/Config.in"
|
||||
source "package/ntfsprogs/Config.in"
|
||||
source "package/openocd/Config.in"
|
||||
source "package/pciutils/Config.in"
|
||||
source "package/picocom/Config.in"
|
||||
source "package/rng-tools/Config.in"
|
||||
source "package/sdparm/Config.in"
|
||||
source "package/setserial/Config.in"
|
||||
if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
# busybox has fdisk
|
||||
source "package/sfdisk/Config.in"
|
||||
endif
|
||||
source "package/smartmontools/Config.in"
|
||||
source "package/squashfs/Config.in"
|
||||
source "package/squashfs3/Config.in"
|
||||
@@ -265,7 +266,7 @@ menu "Filesystem"
|
||||
source "package/gamin/Config.in"
|
||||
source "package/libconfig/Config.in"
|
||||
source "package/libconfuse/Config.in"
|
||||
source "package/fuse/Config.in"
|
||||
source "package/libfuse/Config.in"
|
||||
source "package/liblockfile/Config.in"
|
||||
source "package/libsysfs/Config.in"
|
||||
endmenu
|
||||
@@ -283,6 +284,7 @@ source "package/libart/Config.in"
|
||||
source "package/libdrm/Config.in"
|
||||
source "package/libexif/Config.in"
|
||||
source "package/libgail/Config.in"
|
||||
source "package/libgeotiff/Config.in"
|
||||
source "package/libglade/Config.in"
|
||||
source "package/gdk-pixbuf/Config.in"
|
||||
source "package/libgtk2/Config.in"
|
||||
@@ -291,6 +293,7 @@ source "package/libraw/Config.in"
|
||||
source "package/librsvg/Config.in"
|
||||
source "package/libsvgtiny/Config.in"
|
||||
source "package/libungif/Config.in"
|
||||
source "package/opencv/Config.in"
|
||||
source "package/pango/Config.in"
|
||||
source "package/pixman/Config.in"
|
||||
source "package/tiff/Config.in"
|
||||
@@ -301,6 +304,7 @@ menu "Hardware handling"
|
||||
source "package/libaio/Config.in"
|
||||
source "package/libraw1394/Config.in"
|
||||
source "package/tslib/Config.in"
|
||||
source "package/libftdi/Config.in"
|
||||
source "package/libhid/Config.in"
|
||||
source "package/libiqrf/Config.in"
|
||||
source "package/libusb/Config.in"
|
||||
@@ -325,6 +329,7 @@ source "package/libidn/Config.in"
|
||||
source "package/libmicrohttpd/Config.in"
|
||||
source "package/neon/Config.in"
|
||||
source "package/libmnl/Config.in"
|
||||
source "package/libmodbus/Config.in"
|
||||
source "package/libnl/Config.in"
|
||||
source "package/libpcap/Config.in"
|
||||
source "package/libosip2/Config.in"
|
||||
@@ -334,6 +339,7 @@ source "package/libupnp/Config.in"
|
||||
endmenu
|
||||
|
||||
menu "Other"
|
||||
source "package/fftw/Config.in"
|
||||
source "package/libargtable2/Config.in"
|
||||
source "package/argp-standalone/Config.in"
|
||||
source "package/libatomic_ops/Config.in"
|
||||
@@ -341,12 +347,13 @@ source "package/libcap/Config.in"
|
||||
source "package/libdaemon/Config.in"
|
||||
source "package/libelf/Config.in"
|
||||
source "package/libevent/Config.in"
|
||||
source "package/libev/Config.in"
|
||||
source "package/libffi/Config.in"
|
||||
source "package/libglib2/Config.in"
|
||||
source "package/libnspr/Config.in"
|
||||
source "package/liboil/Config.in"
|
||||
source "package/libsigc/Config.in"
|
||||
source "package/orc/Config.in"
|
||||
source "package/poco/Config.in"
|
||||
source "package/startup-notification/Config.in"
|
||||
endmenu
|
||||
|
||||
@@ -365,6 +372,7 @@ endmenu
|
||||
menu "JSON/XML"
|
||||
source "package/expat/Config.in"
|
||||
source "package/ezxml/Config.in"
|
||||
source "package/json-c/Config.in"
|
||||
source "package/libroxml/Config.in"
|
||||
source "package/libxml-parser-perl/Config.in"
|
||||
source "package/libxml2/Config.in"
|
||||
@@ -385,6 +393,7 @@ menu "Networking applications"
|
||||
source "package/argus/Config.in"
|
||||
source "package/avahi/Config.in"
|
||||
source "package/axel/Config.in"
|
||||
source "package/bluez_utils/Config.in"
|
||||
if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
source "package/boa/Config.in"
|
||||
endif
|
||||
@@ -394,6 +403,7 @@ source "package/bridge-utils/Config.in"
|
||||
source "package/bwm-ng/Config.in"
|
||||
source "package/can-utils/Config.in"
|
||||
source "package/ctorrent/Config.in"
|
||||
source "package/cifs-utils/Config.in"
|
||||
source "package/cups/Config.in"
|
||||
if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
source "package/dhcp/Config.in"
|
||||
@@ -404,7 +414,9 @@ source "package/dropbear/Config.in"
|
||||
source "package/ebtables/Config.in"
|
||||
source "package/ethtool/Config.in"
|
||||
source "package/hostapd/Config.in"
|
||||
if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
source "package/ifplugd/Config.in"
|
||||
endif
|
||||
source "package/iperf/Config.in"
|
||||
source "package/iproute2/Config.in"
|
||||
source "package/ipsec-tools/Config.in"
|
||||
@@ -412,7 +424,6 @@ source "package/ipset/Config.in"
|
||||
source "package/iptables/Config.in"
|
||||
source "package/iw/Config.in"
|
||||
source "package/kismet/Config.in"
|
||||
source "package/xl2tp/Config.in"
|
||||
if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
source "package/lighttpd/Config.in"
|
||||
endif
|
||||
@@ -431,8 +442,10 @@ endif
|
||||
source "package/netplug/Config.in"
|
||||
source "package/netsnmp/Config.in"
|
||||
source "package/netstat-nat/Config.in"
|
||||
source "package/noip/Config.in"
|
||||
source "package/nfs-utils/Config.in"
|
||||
source "package/ngircd/Config.in"
|
||||
source "package/ngrep/Config.in"
|
||||
source "package/ntp/Config.in"
|
||||
source "package/nuttcp/Config.in"
|
||||
source "package/olsr/Config.in"
|
||||
@@ -441,11 +454,11 @@ source "package/openssh/Config.in"
|
||||
source "package/openvpn/Config.in"
|
||||
source "package/portmap/Config.in"
|
||||
source "package/pppd/Config.in"
|
||||
source "package/radvd/Config.in"
|
||||
source "package/rp-pppoe/Config.in"
|
||||
source "package/pptp-linux/Config.in"
|
||||
source "package/proftpd/Config.in"
|
||||
source "package/quagga/Config.in"
|
||||
source "package/radvd/Config.in"
|
||||
source "package/rp-pppoe/Config.in"
|
||||
source "package/rsh-redone/Config.in"
|
||||
source "package/rsync/Config.in"
|
||||
source "package/samba/Config.in"
|
||||
@@ -467,12 +480,12 @@ source "package/udpcast/Config.in"
|
||||
source "package/vpnc/Config.in"
|
||||
source "package/vsftpd/Config.in"
|
||||
source "package/vtun/Config.in"
|
||||
source "package/webif/Config.in"
|
||||
if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
source "package/wget/Config.in"
|
||||
endif
|
||||
source "package/wireless_tools/Config.in"
|
||||
source "package/wpa_supplicant/Config.in"
|
||||
source "package/xl2tp/Config.in"
|
||||
|
||||
endmenu
|
||||
|
||||
@@ -483,6 +496,11 @@ source "package/rpm/Config.in"
|
||||
endif
|
||||
endmenu
|
||||
|
||||
menu "Real-Time"
|
||||
source "package/xenomai/Config.in"
|
||||
source "package/rtai/Config.in"
|
||||
endmenu
|
||||
|
||||
menu "Shell and utilities"
|
||||
source "package/at/Config.in"
|
||||
if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
@@ -496,7 +514,9 @@ source "package/lockfile-progs/Config.in"
|
||||
source "package/logrotate/Config.in"
|
||||
source "package/screen/Config.in"
|
||||
source "package/sudo/Config.in"
|
||||
if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
source "package/which/Config.in"
|
||||
endif
|
||||
source "package/xmlstarlet/Config.in"
|
||||
endmenu
|
||||
|
||||
|
||||
@@ -22,6 +22,22 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
|
||||
#
|
||||
# Utility function to upgrade config.sub and config.guess files
|
||||
#
|
||||
# argument 1 : directory into which config.guess and config.sub need
|
||||
# to be updated. Note that config.sub and config.guess are searched
|
||||
# recursively in this directory.
|
||||
#
|
||||
define CONFIG_UPDATE
|
||||
for file in config.guess config.sub; do \
|
||||
for i in $$(find $(1) -name $$file); do \
|
||||
cp support/gnuconfig/$$file $$i; \
|
||||
done; \
|
||||
done
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# AUTOTARGETS_INNER -- defines how the configuration, compilation and
|
||||
# installation of an autotools package should be done, implements a
|
||||
@@ -100,6 +116,7 @@ define $(2)_CONFIGURE_CMDS
|
||||
--prefix=/usr \
|
||||
--exec-prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--program-prefix="" \
|
||||
$$(DISABLE_DOCUMENTATION) \
|
||||
$$(DISABLE_NLS) \
|
||||
$$(DISABLE_LARGEFILE) \
|
||||
@@ -131,11 +148,8 @@ endif
|
||||
# Hook to update config.sub and config.guess if needed
|
||||
#
|
||||
define UPDATE_CONFIG_HOOK
|
||||
for file in config.guess config.sub; do \
|
||||
for i in $$$$(find $$(@D) -name $$$$file); do \
|
||||
cp package/gnuconfig/$$$$file $$$$i; \
|
||||
done; \
|
||||
done
|
||||
@$$(call MESSAGE, "Updating config.sub and config.guess")
|
||||
$$(call CONFIG_UPDATE,$$(@D))
|
||||
endef
|
||||
|
||||
$(2)_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK
|
||||
@@ -151,11 +165,11 @@ define LIBTOOL_PATCH_HOOK
|
||||
ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' $$$$i | \
|
||||
sed -e 's/\([0-9].[0-9]*\).*/\1/' -e 's/\"//'`; \
|
||||
if test $$$${ltmain_version} = '1.5'; then \
|
||||
toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v1.5.patch; \
|
||||
support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v1.5.patch; \
|
||||
elif test $$$${ltmain_version} = "2.2"; then\
|
||||
toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v2.2.patch; \
|
||||
support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.2.patch; \
|
||||
elif test $$$${ltmain_version} = "2.4"; then\
|
||||
toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v2.4.patch; \
|
||||
support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.4.patch; \
|
||||
fi \
|
||||
done \
|
||||
fi
|
||||
@@ -176,11 +190,11 @@ define AUTORECONF_HOOK
|
||||
for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \
|
||||
ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' $$$$i | sed 's/\([0-9].[0-9]*\).*/\1/'`; \
|
||||
if test $$$${ltmain_version} = "1.5"; then \
|
||||
toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v1.5.patch; \
|
||||
support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v1.5.patch; \
|
||||
elif test $$$${ltmain_version} = "2.2"; then\
|
||||
toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v2.2.patch; \
|
||||
support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.2.patch; \
|
||||
elif test $$$${ltmain_version} = "2.4"; then\
|
||||
toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v2.4.patch; \
|
||||
support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.4.patch; \
|
||||
fi \
|
||||
done \
|
||||
fi
|
||||
@@ -280,15 +294,13 @@ endef
|
||||
################################################################################
|
||||
# AUTOTARGETS -- the target generator macro for autotools packages
|
||||
#
|
||||
# Argument 1 is the package directory prefix [mandatory]
|
||||
# Argument 2 is the lowercase package name [mandatory]
|
||||
# Argument 3 is "target" or "host" [optional, default: "target"]
|
||||
# Argument 1 is "target" or "host" [optional, default: "target"]
|
||||
################################################################################
|
||||
|
||||
define AUTOTARGETS
|
||||
ifeq ($(3),host)
|
||||
$(call AUTOTARGETS_INNER,$(3)-$(2),$(call UPPERCASE,$(3)-$(2)),$(call UPPERCASE,$(2)),$(1),host)
|
||||
ifeq ($(1),host)
|
||||
$(call AUTOTARGETS_INNER,$(1)-$(call pkgname),$(call UPPERCASE,$(1)-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host)
|
||||
else
|
||||
$(call AUTOTARGETS_INNER,$(2),$(call UPPERCASE,$(2)),$(call UPPERCASE,$(2)),$(1),target)
|
||||
$(call AUTOTARGETS_INNER,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target)
|
||||
endif
|
||||
endef
|
||||
|
||||
@@ -183,15 +183,13 @@ endef
|
||||
################################################################################
|
||||
# CMAKETARGETS -- the target generator macro for CMake packages
|
||||
#
|
||||
# Argument 1 is the package directory prefix [mandatory]
|
||||
# Argument 2 is the lowercase package name [mandatory]
|
||||
# Argument 3 is "target" or "host" [optional, default: "target"]
|
||||
# Argument 1 is "target" or "host" [optional, default: "target"]
|
||||
################################################################################
|
||||
|
||||
define CMAKETARGETS
|
||||
ifeq ($(3),host)
|
||||
$(call CMAKETARGETS_INNER,$(3)-$(2),$(call UPPERCASE,$(3)-$(2)),$(call UPPERCASE,$(2)),$(1),host)
|
||||
ifeq ($(1),host)
|
||||
$(call CMAKETARGETS_INNER,$(1)-$(call pkgname),$(call UPPERCASE,$(1)-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host)
|
||||
else
|
||||
$(call CMAKETARGETS_INNER,$(2),$(call UPPERCASE,$(2)),$(call UPPERCASE,$(2)),$(1),target)
|
||||
$(call CMAKETARGETS_INNER,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target)
|
||||
endif
|
||||
endef
|
||||
|
||||
@@ -55,6 +55,24 @@ define KCONFIG_DISABLE_OPT
|
||||
echo "# $(1) is not set" >> $(2)
|
||||
endef
|
||||
|
||||
# Helper functions to determine the name of a package and its
|
||||
# directory from its makefile directory, using the $(MAKEFILE_LIST)
|
||||
# variable provided by make. This is used by the *TARGETS macros to
|
||||
# automagically find where the package is located. Note that the
|
||||
# pkgdir macro is carefully written to handle the case of the Linux
|
||||
# package, for which the package directory is an empty string.
|
||||
define pkgdir
|
||||
$(dir $(lastword $(MAKEFILE_LIST)))
|
||||
endef
|
||||
|
||||
define pkgname
|
||||
$(lastword $(subst /, ,$(call pkgdir)))
|
||||
endef
|
||||
|
||||
define pkgparentdir
|
||||
$(patsubst %$(call pkgname)/,%,$(call pkgdir))
|
||||
endef
|
||||
|
||||
# Define extractors for different archive suffixes
|
||||
INFLATE.bz2 = $(BZCAT)
|
||||
INFLATE.gz = $(ZCAT)
|
||||
@@ -71,9 +89,10 @@ TERM_RESET := $(shell tput rmso)
|
||||
|
||||
# Download method commands
|
||||
WGET:=$(call qstrip,$(BR2_WGET)) $(QUIET)
|
||||
SVN:=$(call qstrip,$(BR2_SVN)) $(QUIET)
|
||||
BZR:=$(call qstrip,$(BR2_BZR)) $(QUIET)
|
||||
GIT:=$(call qstrip,$(BR2_GIT)) $(QUIET)
|
||||
SVN:=$(call qstrip,$(BR2_SVN))
|
||||
BZR:=$(call qstrip,$(BR2_BZR))
|
||||
GIT:=$(call qstrip,$(BR2_GIT))
|
||||
LOCALFILES:=$(call qstrip,$(BR2_LOCALFILES))
|
||||
|
||||
# Default spider mode is 'DOWNLOAD'. Other possible values are 'SOURCE_CHECK'
|
||||
# used by the _source-check target and 'SHOW_EXTERNAL_DEPS', used by the
|
||||
@@ -86,18 +105,18 @@ DL_DIR:=$(TOPDIR)/dl
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# The DOWNLOAD_{GIT,SVN,BZR} helpers are in charge of getting a
|
||||
# The DOWNLOAD_{GIT,SVN,BZR,LOCALFILES} helpers are in charge of getting a
|
||||
# working copy of the source repository for their corresponding SCM,
|
||||
# checking out the requested version / commit / tag, and create an
|
||||
# archive out of it. DOWNLOAD_WGET is the normal wget-based download
|
||||
# mechanism.
|
||||
#
|
||||
# The SOURCE_CHECK_{GIT,SVN,BZR,WGET} helpers are in charge of simply
|
||||
# The SOURCE_CHECK_{GIT,SVN,BZR,WGET,LOCALFILES} helpers are in charge of simply
|
||||
# checking that the source is available for download. This can be used
|
||||
# to make sure one will be able to get all the sources needed for
|
||||
# one's build configuration.
|
||||
#
|
||||
# The SHOW_EXTERNAL_DEPS_{GIT,SVN,BZR,WGET} helpers simply output to
|
||||
# The SHOW_EXTERNAL_DEPS_{GIT,SVN,BZR,WGET,LOCALFILES} helpers simply output to
|
||||
# the console the names of the files that will be downloaded, or path
|
||||
# and revision of the source repositories, producing a list of all the
|
||||
# "external dependencies" of a given build configuration.
|
||||
@@ -122,7 +141,7 @@ define SOURCE_CHECK_GIT
|
||||
endef
|
||||
|
||||
define SHOW_EXTERNAL_DEPS_GIT
|
||||
echo "$($(PKG)_SITE) [git: $($(PKG)_DL_VERSION)]"
|
||||
echo $($(PKG)_SOURCE)
|
||||
endef
|
||||
|
||||
|
||||
@@ -136,7 +155,7 @@ define SOURCE_CHECK_BZR
|
||||
endef
|
||||
|
||||
define SHOW_EXTERNAL_DEPS_BZR
|
||||
echo "$($(PKG)_SITE) [bzr: $($(PKG)_DL_VERSION)]"
|
||||
echo $($(PKG)_SOURCE)
|
||||
endef
|
||||
|
||||
|
||||
@@ -154,7 +173,7 @@ define SOURCE_CHECK_SVN
|
||||
endef
|
||||
|
||||
define SHOW_EXTERNAL_DEPS_SVN
|
||||
echo "$($(PKG)_SITE) [svn: $($(PKG)_DL_VERSION)]"
|
||||
echo $($(PKG)_SOURCE)
|
||||
endef
|
||||
|
||||
|
||||
@@ -171,6 +190,19 @@ define SHOW_EXTERNAL_DEPS_WGET
|
||||
echo $(2)
|
||||
endef
|
||||
|
||||
define DOWNLOAD_LOCALFILES
|
||||
test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
|
||||
$(LOCALFILES) $(call qstrip,$(subst file://,,$($(PKG)_SITE)))/$($(PKG)_SOURCE) $(DL_DIR)
|
||||
endef
|
||||
|
||||
define SOURCE_CHECK_LOCALFILES
|
||||
test -e $(call qstrip,$(subst file://,,$($(PKG)_SITE)))/$($(PKG)_SOURCE)
|
||||
endef
|
||||
|
||||
define SHOW_EXTERNAL_DEPS_LOCALFILES
|
||||
echo $($(PKG)_SITE)/$($(PKG)_SOURCE)
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# DOWNLOAD -- Download helper. Will try to download source from:
|
||||
# 1) BR2_PRIMARY_SITE if enabled
|
||||
@@ -193,6 +225,7 @@ define DOWNLOAD
|
||||
git) $($(DL_MODE)_GIT) && exit ;; \
|
||||
svn) $($(DL_MODE)_SVN) && exit ;; \
|
||||
bzr) $($(DL_MODE)_BZR) && exit ;; \
|
||||
file) $($(DL_MODE)_LOCALFILES) && exit ;; \
|
||||
*) $(call $(DL_MODE)_WGET,$(1),$(2)) && exit ;; \
|
||||
esac ; \
|
||||
fi ; \
|
||||
@@ -251,6 +284,25 @@ $(BUILD_DIR)/%/.stamp_extracted:
|
||||
$(foreach hook,$($(PKG)_POST_EXTRACT_HOOKS),$(call $(hook))$(sep))
|
||||
$(Q)touch $@
|
||||
|
||||
# Rsync the source directory if the <pkg>_OVERRIDE_SRCDIR feature is
|
||||
# used.
|
||||
$(BUILD_DIR)/%/.stamp_rsynced:
|
||||
@$(call MESSAGE,"Syncing from source dir $(SRCDIR)")
|
||||
@test -d $(SRCDIR) || (echo "ERROR: $(SRCDIR) does not exist" ; exit 1)
|
||||
rsync -au $(SRCDIR)/ $(@D)
|
||||
$(Q)touch $@
|
||||
|
||||
# Handle the SOURCE_CHECK and SHOW_EXTERNAL_DEPS cases for rsynced
|
||||
# packages
|
||||
$(BUILD_DIR)/%/.stamp_rsync_sourced:
|
||||
ifeq ($(DL_MODE),SOURCE_CHECK)
|
||||
test -d $(SRCDIR)
|
||||
else ifeq ($(DL_MODE),SHOW_EXTERNAL_DEPS)
|
||||
echo "file://$(SRCDIR)"
|
||||
else
|
||||
@true # Nothing to do to source a local package
|
||||
endif
|
||||
|
||||
# Patch
|
||||
#
|
||||
# The RAWNAME variable is the lowercased package name, which allows to
|
||||
@@ -259,15 +311,16 @@ $(BUILD_DIR)/%/.stamp_extracted:
|
||||
$(BUILD_DIR)/%/.stamp_patched: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION)
|
||||
$(BUILD_DIR)/%/.stamp_patched:
|
||||
@$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$(RAWNAME)")
|
||||
$(if $($(PKG)_PATCH),toolchain/patch-kernel.sh $(@D) $(DL_DIR) $($(PKG)_PATCH))
|
||||
$(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep))
|
||||
$(if $($(PKG)_PATCH),support/scripts/apply-patches.sh $(@D) $(DL_DIR) $($(PKG)_PATCH))
|
||||
$(Q)( \
|
||||
if test -d $($(PKG)_DIR_PREFIX)/$(RAWNAME); then \
|
||||
if test "$(wildcard $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER)*.patch*)"; then \
|
||||
toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(NAMEVER)\*.patch $(NAMEVER)\*.patch.$(ARCH) || exit 1; \
|
||||
support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(NAMEVER)\*.patch $(NAMEVER)\*.patch.$(ARCH) || exit 1; \
|
||||
else \
|
||||
toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(RAWNAME)\*.patch $(RAWNAME)\*.patch.$(ARCH) || exit 1; \
|
||||
support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(RAWNAME)\*.patch $(RAWNAME)\*.patch.$(ARCH) || exit 1; \
|
||||
if test -d $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER); then \
|
||||
toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER) \*.patch \*.patch.$(ARCH) || exit 1; \
|
||||
support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER) \*.patch \*.patch.$(ARCH) || exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
fi; \
|
||||
@@ -383,6 +436,10 @@ $(2)_BASE_NAME = $(1)-$$($(2)_VERSION)
|
||||
$(2)_DL_DIR = $$(DL_DIR)/$$($(2)_BASE_NAME)
|
||||
$(2)_DIR = $$(BUILD_DIR)/$$($(2)_BASE_NAME)
|
||||
|
||||
ifneq ($$($(2)_OVERRIDE_SRCDIR),)
|
||||
$(2)_VERSION = custom
|
||||
endif
|
||||
|
||||
ifndef $(2)_SOURCE
|
||||
ifdef $(3)_SOURCE
|
||||
$(2)_SOURCE = $($(3)_SOURCE)
|
||||
@@ -415,6 +472,12 @@ ifndef $(2)_SITE_METHOD
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($$($(2)_SITE_METHOD),local)
|
||||
ifeq ($$($(2)_OVERRIDE_SRCDIR),)
|
||||
$(2)_OVERRIDE_SRCDIR = $($(2)_SITE)
|
||||
endif
|
||||
endif
|
||||
|
||||
$(2)_DEPENDENCIES ?=
|
||||
$(2)_INSTALL_STAGING ?= NO
|
||||
$(2)_INSTALL_IMAGES ?= NO
|
||||
@@ -428,6 +491,8 @@ $(2)_TARGET_INSTALL_IMAGES = $$($(2)_DIR)/.stamp_images_installed
|
||||
$(2)_TARGET_INSTALL_HOST = $$($(2)_DIR)/.stamp_host_installed
|
||||
$(2)_TARGET_BUILD = $$($(2)_DIR)/.stamp_built
|
||||
$(2)_TARGET_CONFIGURE = $$($(2)_DIR)/.stamp_configured
|
||||
$(2)_TARGET_RSYNC = $$($(2)_DIR)/.stamp_rsynced
|
||||
$(2)_TARGET_RSYNC_SOURCE = $$($(2)_DIR)/.stamp_rsync_sourced
|
||||
$(2)_TARGET_PATCH = $$($(2)_DIR)/.stamp_patched
|
||||
$(2)_TARGET_EXTRACT = $$($(2)_DIR)/.stamp_extracted
|
||||
$(2)_TARGET_SOURCE = $$($(2)_DIR)/.stamp_downloaded
|
||||
@@ -443,6 +508,7 @@ $(2)_EXTRACT_CMDS ?= \
|
||||
# post-steps hooks
|
||||
$(2)_POST_DOWNLOAD_HOOKS ?=
|
||||
$(2)_POST_EXTRACT_HOOKS ?=
|
||||
$(2)_PRE_PATCH_HOOKS ?=
|
||||
$(2)_POST_PATCH_HOOKS ?=
|
||||
$(2)_PRE_CONFIGURE_HOOKS ?=
|
||||
$(2)_POST_CONFIGURE_HOOKS ?=
|
||||
@@ -487,21 +553,42 @@ $(1)-install-host: $(1)-build $$($(2)_TARGET_INSTALL_HOST)
|
||||
$(1)-build: $(1)-configure \
|
||||
$$($(2)_TARGET_BUILD)
|
||||
|
||||
$(1)-configure: $(1)-patch \
|
||||
ifeq ($$($(2)_OVERRIDE_SRCDIR),)
|
||||
# In the normal case (no package override), the sequence of steps is
|
||||
# source, by downloading
|
||||
# depends
|
||||
# extract
|
||||
# patch
|
||||
# configure
|
||||
$(1)-configure: $(1)-patch $(1)-depends \
|
||||
$$($(2)_TARGET_CONFIGURE)
|
||||
|
||||
$(1)-patch: $(1)-extract $$($(2)_TARGET_PATCH)
|
||||
|
||||
$(1)-extract: $(1)-depends \
|
||||
$(1)-extract: $(1)-source \
|
||||
$$($(2)_TARGET_EXTRACT)
|
||||
|
||||
$(1)-depends: $(1)-source $$($(2)_DEPENDENCIES)
|
||||
$(1)-depends: $$($(2)_DEPENDENCIES)
|
||||
|
||||
$(1)-source: $$($(2)_TARGET_SOURCE)
|
||||
else
|
||||
# In the package override case, the sequence of steps
|
||||
# source, by rsyncing
|
||||
# depends
|
||||
# configure
|
||||
$(1)-configure: $(1)-depends \
|
||||
$$($(2)_TARGET_CONFIGURE)
|
||||
|
||||
$(1)-depends: $(1)-rsync $$($(2)_DEPENDENCIES)
|
||||
|
||||
$(1)-rsync: $$($(2)_TARGET_RSYNC)
|
||||
|
||||
$(1)-source: $$($(2)_TARGET_RSYNC_SOURCE)
|
||||
endif
|
||||
|
||||
$(1)-show-depends:
|
||||
@echo $$($(2)_DEPENDENCIES)
|
||||
|
||||
$(1)-source: $$($(2)_TARGET_SOURCE)
|
||||
|
||||
$(1)-uninstall: $(1)-configure $$($(2)_TARGET_UNINSTALL)
|
||||
|
||||
$(1)-clean: $(1)-uninstall \
|
||||
@@ -509,6 +596,22 @@ $(1)-clean: $(1)-uninstall \
|
||||
|
||||
$(1)-dirclean: $$($(2)_TARGET_DIRCLEAN)
|
||||
|
||||
$(1)-clean-for-rebuild:
|
||||
ifneq ($$($(2)_OVERRIDE_SRCDIR),)
|
||||
rm -f $$($(2)_TARGET_RSYNC)
|
||||
endif
|
||||
rm -f $$($(2)_TARGET_BUILD)
|
||||
rm -f $$($(2)_TARGET_INSTALL_STAGING)
|
||||
rm -f $$($(2)_TARGET_INSTALL_TARGET)
|
||||
rm -f $$($(2)_TARGET_INSTALL_HOST)
|
||||
|
||||
$(1)-rebuild: $(1)-clean-for-rebuild all
|
||||
|
||||
$(1)-clean-for-reconfigure: $(1)-clean-for-rebuild
|
||||
rm -f $$($(2)_TARGET_CONFIGURE)
|
||||
|
||||
$(1)-reconfigure: $(1)-clean-for-reconfigure all
|
||||
|
||||
# define the PKG variable for all targets, containing the
|
||||
# uppercase package variable prefix
|
||||
$$($(2)_TARGET_INSTALL_TARGET): PKG=$(2)
|
||||
@@ -517,6 +620,10 @@ $$($(2)_TARGET_INSTALL_IMAGES): PKG=$(2)
|
||||
$$($(2)_TARGET_INSTALL_HOST): PKG=$(2)
|
||||
$$($(2)_TARGET_BUILD): PKG=$(2)
|
||||
$$($(2)_TARGET_CONFIGURE): PKG=$(2)
|
||||
$$($(2)_TARGET_RSYNC): SRCDIR=$$($(2)_OVERRIDE_SRCDIR)
|
||||
$$($(2)_TARGET_RSYNC): PKG=$(2)
|
||||
$$($(2)_TARGET_RSYNC_SOURCE): SRCDIR=$$($(2)_OVERRIDE_SRCDIR)
|
||||
$$($(2)_TARGET_RSYNC_SOURCE): PKG=$(2)
|
||||
$$($(2)_TARGET_PATCH): PKG=$(2)
|
||||
$$($(2)_TARGET_PATCH): RAWNAME=$(patsubst host-%,%,$(1))
|
||||
$$($(2)_TARGET_EXTRACT): PKG=$(2)
|
||||
@@ -530,7 +637,7 @@ $$($(2)_TARGET_DIRCLEAN): PKG=$(2)
|
||||
# kernel case, the bootloaders case, and the normal packages case.
|
||||
ifeq ($(1),linux)
|
||||
$(2)_KCONFIG_VAR = BR2_LINUX_KERNEL
|
||||
else ifeq ($(4),boot)
|
||||
else ifeq ($(4),boot/)
|
||||
$(2)_KCONFIG_VAR = BR2_TARGET_$(2)
|
||||
else
|
||||
$(2)_KCONFIG_VAR = BR2_PACKAGE_$(2)
|
||||
@@ -556,18 +663,16 @@ endef # GENTARGETS_INNER
|
||||
################################################################################
|
||||
# GENTARGETS -- the target generator macro for generic packages
|
||||
#
|
||||
# Argument 1 is the package directory prefix [mandatory]
|
||||
# Argument 2 is the lowercase package name [mandatory]
|
||||
# Argument 3 is "target" or "host" [optional, default: "target"]
|
||||
# Argument 1 is "target" or "host" [optional, default: "target"]
|
||||
################################################################################
|
||||
|
||||
define GENTARGETS
|
||||
ifeq ($(3),host)
|
||||
ifeq ($(1),host)
|
||||
# In the case of host packages, turn the package name "pkg" into "host-pkg"
|
||||
$(call GENTARGETS_INNER,$(3)-$(2),$(call UPPERCASE,$(3)-$(2)),$(call UPPERCASE,$(2)),$(1),host)
|
||||
$(call GENTARGETS_INNER,$(1)-$(call pkgname),$(call UPPERCASE,$(1)-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host)
|
||||
else
|
||||
# In the case of target packages, keep the package name "pkg"
|
||||
$(call GENTARGETS_INNER,$(2),$(call UPPERCASE,$(2)),$(call UPPERCASE,$(2)),$(1),target)
|
||||
$(call GENTARGETS_INNER,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target)
|
||||
endif
|
||||
endef
|
||||
|
||||
|
||||
@@ -25,4 +25,4 @@ ACL_INSTALL_TARGET_OPT = \
|
||||
exec_prefix=$(TARGET_DIR)/usr \
|
||||
install install-lib
|
||||
|
||||
$(eval $(call AUTOTARGETS,package,acl))
|
||||
$(eval $(call AUTOTARGETS))
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# acpid
|
||||
#
|
||||
#############################################################
|
||||
ACPID_VERSION = 2.0.6
|
||||
ACPID_VERSION = 2.0.11
|
||||
ACPID_SOURCE = acpid_$(ACPID_VERSION).orig.tar.gz
|
||||
ACPID_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/a/acpid
|
||||
|
||||
@@ -30,4 +30,4 @@ define ACPID_CLEAN_CMDS
|
||||
-$(MAKE) -C $(@D) clean
|
||||
endef
|
||||
|
||||
$(eval $(call GENTARGETS,package,acpid))
|
||||
$(eval $(call GENTARGETS))
|
||||
|
||||
@@ -14,5 +14,5 @@ ALSAMIXERGUI_CONF_ENV = ac_cv_lib_fltk_numericsort=yes \
|
||||
|
||||
ALSAMIXERGUI_DEPENDENCIES = fltk alsa-lib
|
||||
|
||||
$(eval $(call AUTOTARGETS,package,alsamixergui))
|
||||
$(eval $(call AUTOTARGETS))
|
||||
|
||||
|
||||
@@ -18,4 +18,4 @@ define ARGP_STANDALONE_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -D $(@D)/argp.h $(TARGET_DIR)/usr/include/argp.h
|
||||
endef
|
||||
|
||||
$(eval $(call AUTOTARGETS,package,argp-standalone))
|
||||
$(eval $(call AUTOTARGETS))
|
||||
|
||||
@@ -11,10 +11,10 @@ ARGUS_DEPENDENCIES=libpcap
|
||||
|
||||
define ARGUS_DEBIAN_PATCH_APPLY
|
||||
if [ -d $(@D)/debian/patches ]; then \
|
||||
toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*.patch; \
|
||||
support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches \*.patch; \
|
||||
fi
|
||||
endef
|
||||
|
||||
ARGUS_POST_PATCH_HOOKS += ARGUS_DEBIAN_PATCH_APPLY
|
||||
|
||||
$(eval $(call AUTOTARGETS,package,argus))
|
||||
$(eval $(call AUTOTARGETS))
|
||||
|
||||
@@ -41,4 +41,4 @@ define AT_UNINSTALL_TARGET_CMDS
|
||||
at.1 atq.1 atrm.1 batch.1 at_allow.5 at_deny.5 atd.8 atrun.8)
|
||||
endef
|
||||
|
||||
$(eval $(call AUTOTARGETS,package,at))
|
||||
$(eval $(call AUTOTARGETS))
|
||||
|
||||
@@ -57,5 +57,5 @@ HOST_ATK_DEPENDENCIES = host-libglib2 host-pkg-config
|
||||
HOST_ATK_CONF_OPT = \
|
||||
--disable-glibtest
|
||||
|
||||
$(eval $(call AUTOTARGETS,package,atk))
|
||||
$(eval $(call AUTOTARGETS,package,atk,host))
|
||||
$(eval $(call AUTOTARGETS))
|
||||
$(eval $(call AUTOTARGETS,host))
|
||||
|
||||
@@ -24,4 +24,4 @@ ATTR_INSTALL_TARGET_OPT = \
|
||||
exec_prefix=$(TARGET_DIR)/usr \
|
||||
install install-lib
|
||||
|
||||
$(eval $(call AUTOTARGETS,package,attr))
|
||||
$(eval $(call AUTOTARGETS))
|
||||
|
||||
@@ -17,8 +17,8 @@ HOST_AUTOCONF_CONF_ENV = ac_cv_path_M4=$(HOST_DIR)/usr/bin/m4 \
|
||||
|
||||
HOST_AUTOCONF_DEPENDENCIES = host-m4 host-libtool
|
||||
|
||||
$(eval $(call AUTOTARGETS,package,autoconf))
|
||||
$(eval $(call AUTOTARGETS,package,autoconf,host))
|
||||
$(eval $(call AUTOTARGETS))
|
||||
$(eval $(call AUTOTARGETS,host))
|
||||
|
||||
# variables used by other packages
|
||||
AUTOCONF:=$(HOST_DIR)/usr/bin/autoconf
|
||||
|
||||
@@ -23,8 +23,8 @@ endef
|
||||
HOST_AUTOMAKE_POST_INSTALL_HOOKS += GTK_DOC_M4_INSTALL
|
||||
HOST_AUTOMAKE_POST_INSTALL_HOOKS += HOST_AUTOMAKE_MAKE_ACLOCAL
|
||||
|
||||
$(eval $(call AUTOTARGETS,package,automake))
|
||||
$(eval $(call AUTOTARGETS,package,automake,host))
|
||||
$(eval $(call AUTOTARGETS))
|
||||
$(eval $(call AUTOTARGETS,host))
|
||||
|
||||
# variables used by other packages
|
||||
AUTOMAKE = $(HOST_DIR)/usr/bin/automake
|
||||
|
||||
@@ -164,4 +164,4 @@ ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y)
|
||||
AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_INSTALL_DAEMON_INITSCRIPT
|
||||
endif
|
||||
|
||||
$(eval $(call AUTOTARGETS,package,avahi))
|
||||
$(eval $(call AUTOTARGETS))
|
||||
|
||||
@@ -44,4 +44,4 @@ define AXEL_CLEAN_CMDS
|
||||
-$(MAKE) -C $(@D) clean
|
||||
endef
|
||||
|
||||
$(eval $(call GENTARGETS,package,axel))
|
||||
$(eval $(call GENTARGETS))
|
||||
|
||||
@@ -34,4 +34,4 @@ define BASH_UNINSTALL_TARGET_CMDS
|
||||
fi
|
||||
endef
|
||||
|
||||
$(eval $(call AUTOTARGETS,package,bash))
|
||||
$(eval $(call AUTOTARGETS))
|
||||
|
||||
@@ -13,4 +13,4 @@ BEECRYPT_CONF_OPT = --without-cplusplus \
|
||||
--without-python \
|
||||
--disable-rpath
|
||||
|
||||
$(eval $(call AUTOTARGETS,package,beecrypt))
|
||||
$(eval $(call AUTOTARGETS))
|
||||
|
||||
@@ -52,4 +52,4 @@ BERKELEYDB_POST_INSTALL_TARGET_HOOKS += BERKELEYDB_REMOVE_DOCS
|
||||
|
||||
endif
|
||||
|
||||
$(eval $(call AUTOTARGETS,package,berkeleydb))
|
||||
$(eval $(call AUTOTARGETS))
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
config BR2_PACKAGE_BIND
|
||||
bool "bind"
|
||||
depends on BR2_INET_IPV6
|
||||
depends on BR2_LARGEFILE
|
||||
help
|
||||
BIND (Berkeley Internet Name Domain) is an implementation of
|
||||
@@ -21,11 +22,20 @@ config BR2_PACKAGE_BIND
|
||||
|
||||
http://www.isc.org/sw/bind/
|
||||
|
||||
if BR2_PACKAGE_BIND
|
||||
|
||||
config BR2_PACKAGE_BIND_SERVER
|
||||
bool "Install server components"
|
||||
default y
|
||||
help
|
||||
Install server components (named, lwresd)
|
||||
|
||||
config BR2_PACKAGE_BIND_TOOLS
|
||||
bool "Install tools"
|
||||
depends on BR2_PACKAGE_BIND
|
||||
help
|
||||
Install tools (host, nslookup, dig, nsupdate)
|
||||
|
||||
comment "bind requires a toolchain with LARGEFILE support"
|
||||
depends on !BR2_LARGEFILE
|
||||
endif
|
||||
|
||||
comment "bind requires a toolchain with LARGEFILE and IPV6 support"
|
||||
depends on !(BR2_LARGEFILE || BR2_INET_IPV6)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
#############################################################
|
||||
|
||||
BIND_VERSION = 9.6-ESV-R4
|
||||
BIND_VERSION = 9.6-ESV-R5
|
||||
BIND_SITE = ftp://ftp.isc.org/isc/bind9/$(BIND_VERSION)
|
||||
BIND_MAKE = $(MAKE1)
|
||||
BIND_TARGET_SBINS = lwresd named named-checkconf named-checkzone
|
||||
@@ -40,19 +40,27 @@ endef
|
||||
|
||||
BIND_POST_INSTALL_TARGET_HOOKS += BIND_TARGET_INSTALL_FIXES
|
||||
|
||||
define BIND_TARGET_REMOVE_SERVER
|
||||
rm -rf $(addprefix $(TARGET_DIR)/usr/sbin/, $(BIND_TARGET_SBINS))
|
||||
endef
|
||||
|
||||
define BIND_TARGET_REMOVE_TOOLS
|
||||
rm -rf $(addprefix $(TARGET_DIR)/usr/bin/, $(BIND_TARGET_BINS))
|
||||
endef
|
||||
|
||||
ifneq ($(BR2_PACKAGE_BIND_SERVER),y)
|
||||
BIND_POST_INSTALL_TARGET_HOOKS += BIND_TARGET_REMOVE_SERVER
|
||||
endif
|
||||
|
||||
ifneq ($(BR2_PACKAGE_BIND_TOOLS),y)
|
||||
BIND_POST_INSTALL_TARGET_HOOKS += BIND_TARGET_REMOVE_TOOLS
|
||||
endif
|
||||
|
||||
define BIND_UNINSTALL_TARGET_CMDS
|
||||
rm -rf $(addprefix $(TARGET_DIR)/usr/sbin/, $(BIND_TARGET_SBINS))
|
||||
rm -rf $(addprefix $(TARGET_DIR)/usr/bin/, $(BIND_TARGET_BINS))
|
||||
$(BIND_TARGET_REMOVE_SERVER)
|
||||
$(BIND_TARGET_REMOVE_TOOLS)
|
||||
rm -rf $(addprefix $(TARGET_DIR)/usr/lib/, $(BIND_TARGET_LIBS))
|
||||
rm -f $(TARGET_DIR)/etc/init.d/S81named
|
||||
endef
|
||||
|
||||
$(eval $(call AUTOTARGETS,package,bind))
|
||||
$(eval $(call AUTOTARGETS))
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
config BR2_PACKAGE_BINUTILS
|
||||
bool "libbfd (binutils)"
|
||||
depends on BR2_TOOLCHAIN_BUILDROOT
|
||||
bool "binutils"
|
||||
select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
|
||||
select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
|
||||
help
|
||||
Install libbfd from binutils in the target.
|
||||
|
||||
This is used by oprofile to avoid a full-blown target binutils.
|
||||
Install binutils on the target
|
||||
|
||||
config BR2_PACKAGE_BINUTILS_TARGET
|
||||
bool "binutils binaries"
|
||||
|
||||
@@ -4,7 +4,13 @@
|
||||
#
|
||||
#############################################################
|
||||
|
||||
# Version is set when using buildroot toolchain.
|
||||
# If not, we do like other packages
|
||||
BINUTILS_VERSION = $(call qstrip,$(BR2_BINUTILS_VERSION))
|
||||
ifeq ($(BINUTILS_VERSION),)
|
||||
BINUTILS_VERSION = 2.21
|
||||
endif
|
||||
|
||||
BINUTILS_SOURCE = binutils-$(BINUTILS_VERSION).tar.bz2
|
||||
BINUTILS_SITE = $(BR2_GNU_MIRROR)/binutils
|
||||
ifeq ($(ARCH),avr32)
|
||||
@@ -30,26 +36,23 @@ endif
|
||||
# We just keep the convention of "host utility" for now
|
||||
HOST_BINUTILS_CONF_OPT = --disable-multilib --disable-werror \
|
||||
--target=$(REAL_GNU_TARGET_NAME) \
|
||||
--disable-shared --enable-static \
|
||||
$(BR2_CONFIGURE_STAGING_SYSROOT) \
|
||||
$(BINUTILS_EXTRA_CONFIG_OPTIONS)
|
||||
|
||||
# We just want libbfd, not the full-blown binutils in staging
|
||||
# We just want libbfd and libiberty, not the full-blown binutils in staging
|
||||
define BINUTILS_INSTALL_STAGING_CMDS
|
||||
$(MAKE) -C $(@D)/bfd DESTDIR=$(STAGING_DIR) install
|
||||
$(MAKE) -C $(@D)/libiberty DESTDIR=$(STAGING_DIR) install
|
||||
endef
|
||||
|
||||
# only libbfd in the target...
|
||||
BINUTILS_INSTALL_FROM = $(@D)/bfd
|
||||
|
||||
# unless we want full...
|
||||
ifeq ($(BR2_PACKAGE_BINUTILS_TARGET),y)
|
||||
BINUTILS_INSTALL_FROM = $(@D)
|
||||
# If we don't want full binutils on target
|
||||
ifneq ($(BR2_PACKAGE_BINUTILS_TARGET),y)
|
||||
define BINUTILS_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/bfd DESTDIR=$(TARGET_DIR) install
|
||||
$(MAKE) -C $(@D)/libiberty DESTDIR=$(STAGING_DIR) install
|
||||
endef
|
||||
endif
|
||||
|
||||
define BINUTILS_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(BINUTILS_INSTALL_FROM) \
|
||||
DESTDIR=$(TARGET_DIR) install
|
||||
endef
|
||||
|
||||
$(eval $(call AUTOTARGETS,package,binutils))
|
||||
$(eval $(call AUTOTARGETS,package,binutils,host))
|
||||
$(eval $(call AUTOTARGETS))
|
||||
$(eval $(call AUTOTARGETS,host))
|
||||
|
||||
@@ -13,5 +13,5 @@ endef
|
||||
|
||||
BISON_POST_CONFIGURE_HOOKS += BISON_DISABLE_EXAMPLES
|
||||
|
||||
$(eval $(call AUTOTARGETS,package,bison))
|
||||
$(eval $(call AUTOTARGETS,package,bison,host))
|
||||
$(eval $(call AUTOTARGETS))
|
||||
$(eval $(call AUTOTARGETS,host))
|
||||
|
||||
@@ -20,4 +20,4 @@ ifneq ($(BR2_ENABLE_LOCALE),y)
|
||||
BLACKBOX_DEPENDENCIES += libiconv
|
||||
endif
|
||||
|
||||
$(eval $(call AUTOTARGETS,package,blackbox))
|
||||
$(eval $(call AUTOTARGETS))
|
||||
|
||||
35
package/bluez_utils/Config.in
Normal file
35
package/bluez_utils/Config.in
Normal file
@@ -0,0 +1,35 @@
|
||||
config BR2_PACKAGE_BLUEZ_UTILS
|
||||
bool "bluez-utils"
|
||||
depends on BR2_USE_WCHAR # libglib2
|
||||
select BR2_PACKAGE_DBUS
|
||||
select BR2_PACKAGE_EXPAT if !BR2_PACKAGE_DBUS_LIBXML2
|
||||
select BR2_PACKAGE_LIBGLIB2
|
||||
help
|
||||
bluez utils
|
||||
|
||||
http://www.kernel.org/pub/linux/bluetooth
|
||||
|
||||
if BR2_PACKAGE_BLUEZ_UTILS
|
||||
|
||||
config BR2_PACKAGE_BLUEZ_UTILS_COMPAT
|
||||
bool "BlueZ 3.x compatibility binaries"
|
||||
help
|
||||
BlueZ 3.x compatibility binaries like pand, hidd, sdp
|
||||
|
||||
config BR2_PACKAGE_BLUEZ_UTILS_AUDIO
|
||||
bool "audio support"
|
||||
select BR2_PACKAGE_ALSA_LIB
|
||||
select BR2_PACKAGE_LIBSNDFILE
|
||||
help
|
||||
Audio support
|
||||
|
||||
config BR2_PACKAGE_BLUEZ_UTILS_USB
|
||||
bool "USB support"
|
||||
select BR2_PACKAGE_LIBUSB
|
||||
help
|
||||
USB support
|
||||
|
||||
endif
|
||||
|
||||
comment "bluez-utils require a toolchain with WCHAR support"
|
||||
depends on !(BR2_USE_WCHAR)
|
||||
46
package/bluez_utils/bluez_utils.mk
Normal file
46
package/bluez_utils/bluez_utils.mk
Normal file
@@ -0,0 +1,46 @@
|
||||
#############################################################
|
||||
#
|
||||
# bluez_utils
|
||||
#
|
||||
#############################################################
|
||||
BLUEZ_UTILS_VERSION = 4.96
|
||||
BLUEZ_UTILS_SOURCE = bluez-$(BLUEZ_UTILS_VERSION).tar.gz
|
||||
BLUEZ_UTILS_SITE = http://www.kernel.org/pub/linux/bluetooth/
|
||||
BLUEZ_UTILS_INSTALL_STAGING = YES
|
||||
BLUEZ_UTILS_DEPENDENCIES = dbus libglib2
|
||||
BLUEZ_UTILS_CONF_OPT = --enable-test --enable-tools
|
||||
|
||||
# BlueZ 3.x compatibility
|
||||
ifeq ($(BR2_PACKAGE_BLUEZ_UTILS_COMPAT),y)
|
||||
BLUEZ_UTILS_CONF_OPT += \
|
||||
--enable-hidd \
|
||||
--enable-pand \
|
||||
--enable-sdp \
|
||||
--enable-dund
|
||||
endif
|
||||
|
||||
# audio support
|
||||
ifeq ($(BR2_PACKAGE_BLUEZ_UTILS_AUDIO),y)
|
||||
BLUEZ_UTILS_DEPENDENCIES += \
|
||||
alsa-lib \
|
||||
libsndfile
|
||||
BLUEZ_UTILS_CONF_OPT += \
|
||||
--enable-alsa \
|
||||
--enable-audio
|
||||
else
|
||||
BLUEZ_UTILS_CONF_OPT += \
|
||||
--disable-alsa \
|
||||
--disable-audio
|
||||
endif
|
||||
|
||||
# USB support
|
||||
ifeq ($(BR2_PACKAGE_BLUEZ_UTILS_USB),y)
|
||||
BLUEZ_UTILS_DEPENDENCIES += libusb
|
||||
BLUEZ_UTILS_CONF_OPT += \
|
||||
--enable-usb
|
||||
else
|
||||
BLUEZ_UTILS_CONF_OPT += \
|
||||
--disable-usb
|
||||
endif
|
||||
|
||||
$(eval $(call AUTOTARGETS))
|
||||
@@ -29,4 +29,4 @@ define BMON_UNINSTALL_TARGET_CMDS
|
||||
rm -f $(TARGET_DIR)/usr/bin/bmon
|
||||
endef
|
||||
|
||||
$(eval $(call AUTOTARGETS,package,bmon))
|
||||
$(eval $(call AUTOTARGETS))
|
||||
|
||||
@@ -25,4 +25,4 @@ define BOA_UNINSTALL_TARGET_CMDS
|
||||
$(TARGET_DIR)/etc/mime.types $(TARGET_DIR)/etc/boa
|
||||
endef
|
||||
|
||||
$(eval $(call AUTOTARGETS,package,boa))
|
||||
$(eval $(call AUTOTARGETS))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user