You are here: TWiki > LinuxFilesystem Web > AELMMUless r7 - 17 Jan 2008 - 15:04 - PeterPearse


Start of topic | Skip to actions

Using buildroot with the Code Sourcery toolchain to produce a uClibc based file system for uclinux

Code Sourcery
uClibc
Uclinux for linux programmers
buildroot

Process

Take the following steps to produce a minimal, static linked, flat binary file system.
The process below was carried out using buildroot revision 20649
with the Code Sourcery toolchain
arm-uclinuxeabi-gcc (CodeSourcery Sourcery G++ Lite 2007q1-21) 4.2.0 20070413 (prerelease)
  • svn co svn://uclibc.org/trunk/buildroot
  • Unpack the Code Sourcery uclinuxeabi toolchain.
  • Patch buildroot as per patch attached
    Note that the patch contains a full busybox config file...
  • Adjust for changes since my build....
  • Setup the environment as in the attached script.
  • Copy in the attached .config
  • Adjust for your environment - at least
    • Location of the CS toolset
  • (?sudo?) make oldconfig
  • (?sudo?) make PREFERRED_LIB_FLAGS="--enable-static --disable-shared" PMP_MY_REAL_CROSS_GCC=<The Code Sourcery cross compiler>
  • Adjust for changes since my build....
You'll need to twiddle the startup scripts in the resulting file system for your platform.
Make, stderr and boot log attached
I've only booted - not checked every binary runs
Please report bugs to mailto:peter.pearse@armNO-SPAM.com with Wiki [uClibc] in the subject

Retry with buildroot 20854

  • package/fakeroot.mk and package/fakeroot-uclibc-LFS.patch are now patched in the buildroot tree.
  • busybox has gone up to 1.9
    • Move the patches up where necessary
      transormer no longer required, others apply with offset.
  • Kernel, GNU, Debian mirrors added - accepted defaults

Thumb-2

  • Just add the gcc options as in the comment in the setup file.

TODO (not in order)

  • Implement dynamic linking for flat binaries - I believe this needs both kernel and file system work....
  • Add more packages
  • Perfect the patch - still some generated files & binaries in it
  • Actually run some of the binaries wink

Detailed explanation of (some of) the patches

  • Stripping gave some problems so I turned it off throughout
  • -Dfork=vfork worked in most packages, but I had to patch some headers to stop them failing e.g. busybox/libbb.h
  • Some packages needed really hammering to build static libraries
    • Maintainers - please don't use .so files as targets if your package can be built statically.....
  • Of course, some package versions changed
  • Some packages had to be apprised of the existence of uclinux (altho I haven't checked that they work with it!)
  • ARM still hasn't caught up with syscall()
  • Some packages initialize their flags
    - I think it's nicer if the append to the environment values, rather than losing them.
-- PeterPearse - 13 Dec 2007
toggleopenShow attachmentstogglecloseHide attachments
Topic attachments
I Attachment Action Size Date Who Comment
elselog wiki.log manage 13.9 K 13 Dec 2007 - 16:18 PeterPearse Boot log on ARM IntegratorCP CMARM926EJS
elseEXT makelog manage 1538.9 K 07 Jan 2008 - 11:59 PeterPearse STDOUT from build
elseconfig buildroot.config manage 10.9 K 07 Jan 2008 - 11:32 PeterPearse The buildroot .config file
elselog buildroot.config.log manage 16.9 K 13 Dec 2007 - 16:01 PeterPearse The buildroot .config file
elsebz2 makelog.tar.bz2 manage 56.5 K 07 Jan 2008 - 12:03 PeterPearse tar.bz2 of STDOUT from build
elseenv buildroot.env manage 145.3 K 13 Dec 2007 - 16:01 PeterPearse The build environment used
elseEXT errlog manage 44.4 K 13 Dec 2007 - 16:06 PeterPearse STDERR from build
elsepatch buildroot.20649.patch manage 63.4 K 13 Dec 2007 - 15:58 PeterPearse The patch for the buildroot tree
elsebz2 files_20857.tar.bz2 manage 79.0 K 17 Jan 2008 - 15:04 PeterPearse Similar files for buildroot svn 20857
elsesrc buildroot.setup.src manage 0.7 K 13 Dec 2007 - 16:02 PeterPearse Additions to my normal environment for the build
Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r7 < r6 < r5 < r4 < r3 | More topic actions
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Use of this site is governed by these TermsAndConditions
Ideas, requests, problems regarding TWiki? Send feedback