[uClibc] [PATCH] Give buildroot a config file.
Rob Landley
rob at landley.net
Thu Aug 7 20:27:07 UTC 2003
The following patch removes the "TARGETS" list from the Makefile and instead
has it calculated from a config file via some "sed" statements. (This isn't
really a new dependency since uclibc's build already uses sed, and sed is in
busybox.)
The sample targets have been moved to a sample config (attached), and the
comments fluffed out a bit. Ordering is preserved: targets from the config
file wind up in the TARGETS list from top to bottom, left to right.
The patch to the makefile adds the new TARGETS parsing logic in place of the
original targets equals blank line, and removes the old manual setting of the
targets list.
It makes two other changes to the makefile: changing the default values for
USE_UCLIBC_SNAPSHOT and USE_BUSYBOX_SNAPSHOT to false. Anybody who knows
enough to use cvs snapshots instead of release versions knows enough to go
into the makefile and tweak it. Your first experience with the code should
probably be with a release version and not a cvs snapshot anyway, on general
principles.
With these changes, most new users should NOT have to tweak the Makefile on
their first attempt to get a working buildroot. They still have to for a
non-i386 architecture, for compiler optimizations, or to use buildroot
without the uclibc_toolchain, or for a bunch of other reasons. But hopefully
the new user experience should have a somewhat less vertical learning curve.
Rob
P.S. Note it should be possible to detect the existence of the
uclibc_toolchain target and use that to set USE_UCLIBC_TOOLCHAIN instead of
setting it manually. I've left that for now, but I just wanted to mention
it.
Patch and default config attached. Flame away...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile.diff
Type: text/x-makefile
Size: 3369 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20030807/4ae87ce3/attachment.bin
-------------- next part --------------
### The toolchain comes first if we are building one
uclibc_toolchain
### Do you want user mode Linux (x86 only), or are you building a
### real kernel that will run on its own? Perhaps you have a
### kernel you have already configured and you want to use that?
#linux
user-mode-linux
#system-linux
### The default minimal set
busybox tinylogin
### Openssh...
#zlib openssl openssh
### Everything needed to build a full uClibc development system!
#coreutils findutils bash ed flex bison file
#make diffutils patch sed gawk tar grep gcc_target
### Of course, if you are installing a development system, you
### may want some header files so you can compile stuff....
#ncurses-headers zlib-headers openssl-headers
### More development system stuff for those that want it
#m4 autoconf automake libtool
### Perl
#perl
### Some nice debugging tools
#gdb strace
### The Valgrind debugger (x86 only)
#valgrind
### Some stuff for access points and firewalls
#iptables hostap wtools dhcp_relay bridge
#iproute2 netsnmp
### Run customize.mk at the very end to add your own special config.
### This is useful for making your own distro within the buildroot
### process.
#customize
### Pick your root filesystem type: ext2, cramfs, or jffs2.
### (This target must go after the others, or your code won't wind up
### in the root_fs image.)
ext2root
### Must mount cramfs with 'ramdisk_blocksize=4096'
#cramfsroot
### You may need to edit make/jffs2root.mk to change target
### endian-ness or similar, but this is sufficient for most
### things as-is...
#jffs2root
More information about the uClibc
mailing list