toolchains and source trees and kernels, oh my!

if it's possible, i'd like to clarify and document the current state
of both toolchains and kernel source trees, completely independent of
their respective distros. more specifically, i'd like to clarify the
"best* possible combination of toolchain and source tree which can
build the "best" bootable kernel on a BB, totally irrespective of the
root filesystem to come after it.

  (actually, i'm interested in the "best" possible kernel leaving out
the root filesystem entirely -- just let the kernel boot and fall over
when it tries to mount the rootfs and doesn't find one. who cares?
we just want to work the bugs out of the kernel. does that make
sense?)

  first, toolchains. IIRC, no one was terribly impressed with the
codesourcery products. has that changed at all recently? i thought
they'd had some new releases recently but i'll defer to the wisdom of
the list.

  then there's the pre-built (android) toolchain downloadable from
embinux here: http://www.embinux.com/download_toolchain.php. that
would *seem* to work properly. then there's the toolchain you can
build from OE, and yann morin tells me that he created one using
crosstool-ng that would appear to work. so ... in a nutshell, what's
the best choice? in any event, it might be useful to put up a wiki
page explaining how many different choices there are for toolchains
for BB work and where you can get them, and i can do that.

  then there are kernel source trees, with varying levels of
completeness. at a bare minimum, we can start with linus' git tree,
which will allow you to:

  $ make ARCH=arm CROSS_COMPILE=<whatever> omap3_beagle_defconfig
  $ make uImage

sure, you'll get a beagle-bootable kernel, but one that's lagging
behind the other trees in terms of features.

  there's the (certainly more up-to-date) omap 2.6 git tree here:

http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=summary

and the android tree you can find here:

http://android.git.kernel.org/?p=kernel/common.git;a=tree

and i'm guessing angstrom comes with one as well, etc, etc.

  and, in the end, in a perfect world, one would think that everyone
would eventually be able to converge to a common toolchain and kernel
source tree (the source tree being linus' tree once all the OMAP stuff
is pushed upstream), then diverge drastically in terms of kernel
boot-time parameters and root filesystems.

  does all of this make sense? i'm going to test some of this by
building various kernels and test-booting them on my C2 rev BB, just
to see how stable they are.

rday

From: beagleboard@googlegroups.com
[mailto:beagleboard@googlegroups.com] On Behalf Of Robert P. J. Day
Sent: Friday, May 22, 2009 9:40 AM
To: Beagle Board
Subject: [beagleboard] toolchains and source trees and kernels, oh my!

  if it's possible, i'd like to clarify and document the current state
of both toolchains and kernel source trees, completely independent of
their respective distros. more specifically, i'd like to clarify the
"best* possible combination of toolchain and source tree which can
build the "best" bootable kernel on a BB, totally irrespective of the
root filesystem to come after it.

  (actually, i'm interested in the "best" possible kernel leaving out
the root filesystem entirely -- just let the kernel boot and fall over
when it tries to mount the rootfs and doesn't find one. who cares?
we just want to work the bugs out of the kernel. does that make
sense?)

  first, toolchains. IIRC, no one was terribly impressed with the
codesourcery products. has that changed at all recently? i thought
they'd had some new releases recently but i'll defer to the wisdom of
the list.

  then there's the pre-built (android) toolchain downloadable from
embinux here: http://www.embinux.com/download_toolchain.php. that
would *seem* to work properly. then there's the toolchain you can
build from OE, and yann morin tells me that he created one using
crosstool-ng that would appear to work. so ... in a nutshell, what's
the best choice? in any event, it might be useful to put up a wiki
page explaining how many different choices there are for toolchains
for BB work and where you can get them, and i can do that.

OE is currently the best option as it does everything you need, such as
setting up all build tools, downloading source code, configuring, patching,
building and installing. OE has all the tools you need to build almost
everything you want to install on Linux. You don't have to worry about
updating to the latest version of GCC or installing a compatible version of
automake or autoconfig or any of the other multitude of build tools you need
to build various Linux modules/applications. If you want to keep up to date
with the latest releases, go a "git pull" every day and then build OE again
by issuing the bitbake command. Work with OE for a while and it becomes
really easy to use.

My only gripe about OE is the way it handles GIT repositories. Instead of
taking advantage of GIT, it creates an archive and then expands the archive
to a separate folder. There is to .git folder, so you cannot take advantage
of the many features of git to modify the code, like creating experimental
branches, tracking changes, applying patches, etc.

Alternatively, you could always build your own xloader, u-boot and Linux
kernel from the various GIT repositories, apply the patches that OE applies
in a separate git branch, which is a lot more work. Robert Nelson does this
for you on his RCN website.

You could also use the Ubuntu filesystem builder
https://wiki.ubuntu.com/ARM/RootfsFromScratch which works very well.

  then there are kernel source trees, with varying levels of
completeness. at a bare minimum, we can start with linus' git tree,
which will allow you to:

  $ make ARCH=arm CROSS_COMPILE=<whatever> omap3_beagle_defconfig
  $ make uImage

sure, you'll get a beagle-bootable kernel, but one that's lagging
behind the other trees in terms of features.

  there's the (certainly more up-to-date) omap 2.6 git tree here:

http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=summar
y

and the android tree you can find here:

http://android.git.kernel.org/?p=kernel/common.git;a=tree

and i'm guessing angstrom comes with one as well, etc, etc.

OE uses the same linux-omap-2.6 GIT