I have tested the new buildroot.
It works now with buildroot-snapshot, uClibc-0.9.28, busybox-snapshot.
http://buildroot.uclibc.org/downloads/snap...napshot.tar.bz2 (
http://buildroot.uclibc.org/downloads/snapshots/buildroot-snapshot.tar.bz2)
http://www.uclibc.org/downloads/uclibc-0.9.28.tar.bz2 (
http://www.uclibc.org/downloads/uclibc-0.9.28.tar.bz2)
http://busybox.net/downloads/snapshots/bus...napshot.tar.bz2 (
http://busybox.net/downloads/snapshots/busybox-snapshot.tar.bz2)
1. unpack buildroot , tar jxf buildroot-snapshot.tar.bz2
2. download uClibc-0.9.28 into buildroot/dl dir.
# unpack uClibc-0.9.28,
tar jxf uClibc-0.9.28.tar.bz2
# remove the line of "default nios2-elf-" from uClibc-0.9.28/extran/Configs/Config.nios2
# repack
tar jcf uClibc-0.9.28.tar.bz2 uClibc-0.9.28
3. update buildroot/package/busybox/busybox.config
CONFIG_STATIC=y
EXTRA_CFLAGS_OPTIONS="-D__uClinux__ -Dfork=vfork"# CONFIG_START_STOP_DAEMON is not set
CONFIG_FEATURE_2_6_MODULES=y
4. update buildroot/toolchain/uClibc/uClibc.config
DL_FINI_CRT_COMPAT=y
COMPAT_ATEXIT=y
5. get the elf2flt patch of marc's into buildroot/dl
http://bugs.uclibc.org/file_download.php?f...id=225&type=bug (
http://bugs.uclibc.org/file_download.php?file_id=225&type=bug)
update the first part of elf2flt.diff
Index: buildroot/toolchain/Config.in
===================================================================
--- buildroot/toolchain/Config.in 2006-01-07 16:15:08.000000000 +0800
+++ buildroot/toolchain/Config.in 2006-01-09 09:08:15.000000000 +0800
@@ -10,6 +10,7 @@
source "toolchain/ccache/Config.in"
source "toolchain/gdb/Config.in"
source "toolchain/sstrip/Config.in"
+source "toolchain/elf2flt/Config.in"
comment "Common Toolchain Options"
Apply the patch
cd buildroot
patch -p1 <dl/elf2flt.diff
6. in buildroot dir
make menuconfig
select nios2, in toolchain option,
[ ] Use a daily snapshot of uClibc?
[*] Enable elf2flt support?
[ ] Include target utils in cross toolchain
7. make, it will make binutils,gcc,uclibc, and fail in busybox
8. update the busybox's
buildroot/build_nios2/busybox/Rules.mak, add elf2flt
#LDFLAGS+=-nostdlib# LIBRARIES:=$(LIBCDIR)/lib/libc.a -lgcc
LDFLAGS+=-Wl,-elf2flt="-s 16000" -Wl,-v -Wl,-d
LIBRARIES:=-lc -lgcc
buildroot/build_nios2/busybox/Makefile, comment out the stripcmd
busybox: .depend $(libraries-y)
$(CC) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -Wl,--start-group $(libraries-y) $(LIBRARIES) -Wl,--end-group# $(STRIPCMD) $@
9. cd buildroot/build_nios2/busybox, make menuconfig
in "shell->", choose default shell "msh", unselect ash, select "standalone shell".
10. back to buildroot/
make, and it will build busybox
11. copy the buildroot/build_nios2/root to another place, cp -a
remove usr/lib,usr/include
it is your new root fs now.
add a sym-link for initramfs , ln -s /sbin/init init
This is the cross compiler for nios2 with default to uClibc, and the root fs with busybox.
Thanks a lots, to marc and vapier.