From: Rob Landley <rob@landley.net>
To: Leon Woestenberg <leon.woestenberg@gmail.com>
Cc: Greg Ungerer <gerg@snapgear.com>, Sam Ravnborg <sam@ravnborg.org>,
David Woodhouse <dwmw2@infradead.org>,
linux-embedded@vger.kernel.org
Subject: Re: [PATCH 0/1] Embedded Maintainer(s), linux-embedded@vger list
Date: Sun, 15 Jun 2008 16:43:55 -0500 [thread overview]
Message-ID: <200806151643.56572.rob@landley.net> (raw)
In-Reply-To: <c384c5ea0806150839l4b18b988pf69990bc87e52bcf@mail.gmail.com>
On Sunday 15 June 2008 10:39:43 Leon Woestenberg wrote:
> Hello all,
>
> On Thu, Jun 12, 2008 at 2:41 AM, Rob Landley <rob@landley.net> wrote:
> > Most packages don't cross compile at all. Debian has somewhere north of
> > 30,000 packages. Every project that does large scale cross compiling
> > (buildroot, gentoo embedded, timesys making fedora cross compile, etc)
> > tends to have about 200 packages that cross compile more or less easily,
> > another 400 or so that can be made to cross compile with _lot_ of effort
> > and a large enough rock, and then the project stalls at about that size.
>
> Agreed, OpenEmbedded has a few thousands, but your point is valid.
> However, fleeing to target-native compilation is not the way to
> improve the situation IMHO.
You say it like fleeing is a bad thing. :)
I believe building natively under emulation is the Right Thing. Cross
compiling has always historically been a transitional step until native
compiling became available on the target.
When Ken Thompson and Dennis Ritchie were originally creating Unix for the
PDP-7, they cross compiled their code from a honking big GE mainframe because
that was their only option. One of the first things they wrote was a PDP-7
assembler that ran on the PDP-7. The reason they created the B programming
language in the first place was to have a tiny compiler that could run
natively on the PDP-7, and when they moved up to a PDP-11 Dennis had more
space to work with and expanded B into C.
When they severed the mainframe umbilical cord as soon as they were able to
get the system self-hosting, it wasn't because the PDP-7 had suddenly become
faster than the GE mainframe.
Compiling natively where possible has been the normal way to build Unix
software ever since. Linux became a real project when Linus stopped needing
Minix to cross-compile it. Linus didn't "flee" Minix, he assures us he
erased his minix partition purely by accident. :)
> Moore's law on hardware also goes for the host,
Which is why people no longer regularly write application software in assembly
language, because we don't need to do that anymore. The result would be
faster, but not better.
The rise of scripting languages like Python and javascript that run the source
code directly is also related (and if you don't think people don't write
complete applications in those you haven't seen any of the google apps). The
big push for Java in 1998 could happen because the hardware was now fast
enough to run _everything_ under an emulator for a processor that didn't
actually exist (until Rockwell built one, anyway).
Build environments are now literally thousands of times faster than when I
started programming. The first machine I compiled code on was a commodore 64
(1mhz, 8 bits, the compiler was called "blitz" and the best accelerator for
it was a book). The slowest machine I ever ran Linux on was a 16 mhz 386sx.
According to my blog, I moved from a 166mhz laptop to a 266mhz one on April
13, 2002. I started building entire Linux From Scratch systems on the 166mhz
machine, including a ton of optional packages (apache, postgresql, openssh,
samba, plus it was based on glibc and coreutils and stuff back then so the
build was _slow_), hence the necessity of scripting it and leaving the build
to its own devices for a few hours.
Even without distcc calling out to the cross compiler, the emulated system
running on my laptop is several times faster than the build environment I had
7 years ago (2001), somewhat faster than the one I had 5 years ago (2003),
and somewhat slower than the one I had 3 years ago (2005). (That's emulating
an x86 build environment on my x86_64 laptop. I didn't _have_ a non-x86
build enviornment 5 years ago for comparison purposes.)
> I think the progress is even bigger on big iron.
Not that I've noticed, unless by "big iron", you mean "PC clusters". (You can
expand laterally if you've got the money for it and your problem distributes
well...)
> Also, how much of the 30000 packages are useful for something like
> your own firmware Linux?
None of them, because Firmware Linux has a strictly limited agenda: provide a
native build environment on every system emulation supported by qemu. That's
the 1.0 release criteria. (Some day I may add other emulators like hercules
for s390, but the principle's the same.)
Once you have the native build environment, you can bootstrap Gentoo, or
Debian, or Linux From Scratch, or whatever you like. I've got instructions
for some of 'em.
The buildroot project fell into the trap of becoming a distro and having to
care about the interaction between hundreds of packages. I'm not interested
in repeating that mistake.
Figuring out what packages will other people might need is something I stopped
trying to predict a long time ago. If it exists, somebody wanted it. People
want/need the weirdest stuff: the accelerometer in laptops is used for
rolling marble games, and the iPhone is a cell phone with 3D support for
(among other things) video playback.
> > Distcc can take advantage of smp, but that won't help the ./configure
> > stage and I need to do some work on distcc to teach it to understand more
> > gcc
>
> If you want to build 1000+ packages, you don't need to run configure
> itself multithreaded. There are enough jobs available to keep 16/32
> processors busy (beyond that, you probably end up in
> inter-package-dependencies stalling the build). This is just a guess
> from what I see during a multi-threaded bake and multi-threaded make
> on OpenEmbedded.
If your package management system can work out the dependencies and launch the
package builds in parallel, have at. Another reason I'm not trying to
address package management: lots of people have already done it, and put a
lot more work into it than I ever would. I'm just trying to help them do
their thing while staying out of their way.
> > However, having one or more full-time engineers devoted to debugging
> > cross-compile issues is quite a high price to pay too. Moore's law
> > really doesn't help that one.
>
> How about 30+ volunteers.
I presume you're referring to OpenEmbedded, rather than Gentoo Embedded,
Debian Embedded, buildroot, openmoko, or any of the others?
Making cross compiling work is tied to your choice of package management
systems. Making native compling work, less so. The point of my project is
to _unbundle_ stuff. Separate out that layer, and make it as thin as
possible.
> > I'm not saying either solution is perfect, I'm just saying the "build
> > under emulation" approach is a viable alternative that gets more
> > attractive as time passes, both because of ongoing development on
> > emulators and because of Moore's law on the hardware.
>
> I cannot follow your reasoning - Moore's law will help you more on the
> big iron side of things.
Actually it helps exactly as much, just on about a 5 year delay.
Moore's Law does not reduce the need for your above mentioned 30+ volunteers
to endlessly debug cross compiling bugs.
My point is that building under emulation didn't used to be even _feasible_.
Now it's an option. Building under an emulator in 2008 gives us about the
speed of building natively around 2003, and that seemed tolerable at the
time. Both the emulators and the hardware should improve going forward.
> That said, I welcome any effort (such as yours) to help improve the
> embedded Linux domain, I rather try to fix the cross-compile stuff of
> the few thousand packages I am interested in.
I've gotten involved in too many big complicated projects that got sidelined
by somebody figuring out how to substitute a simpler problem and solve that
one instead. (Remember how much work maintaining kernel headers was
before "make headers_install"?)
These days when I see big problem that can most obviously be solved by lots of
people doing lots of work for a long time, my first instinct is try to figure
out how to avoid needing to do that.
> Yes it hurts my brain.
It hurts everybody's brain.
There are two ways to build natively: you can do so under an emulator, or you
can do so on real hardware.
The Fedora for Arm project builds natively, and started by using real ARM
hardware to do it. (They've added qemu since; I note that the guy who runs
that project used to be my boss back before we all left TimeSys.)
http://fedoraproject.org/wiki/Architectures/ARM#Technical_Approach
The Ubuntu for Arm project did the same, bought high end arm machines and made
a compile farm out of them:
http://mojo.handhelds.org/files/HandheldsMojo_ELC2008.pdf
If you're going to throw money at the problem, you can get a lot of
specialized native hardware to build on, and that's an option a number of
large projects have been taking.
The advantage of using emulators is that it's cheaper and more flexible.
Anybody can do it, it's just a build environment you can take with you on
your laptop (no contention for a limited number of devices and your
developers aren't tethered to them to get work/testing done). PC hardware is
the cheapest and most flexible way to buy raw computing power (including
memory/disk/network), and pretty much everybody already has it or they
wouldn't be doing Linux development in the first place.
You don't snag hobbyists by saying "buy this hardware to play". You snag
hobbyists by giving them something they can download and poke at with the
lowest threshold possible, which is why I provide precompiled images ala
http://landley.net/code/firmware/downloads/system-image
Rob
--
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson.
next prev parent reply other threads:[~2008-06-15 21:43 UTC|newest]
Thread overview: 182+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1209577322.25560.402.camel@pmac.infradead.org>
[not found] ` <87bq3rgq40.fsf@basil.nowhere.org>
[not found] ` <1209582709.25560.441.camel@pmac.infradead.org>
[not found] ` <1209582709.25560.441.camel-ZP4jZrcIevRpWr+L1FloEB2eb7JE58TQ@public.gmane.org>
2008-05-28 21:52 ` [PATCH 0/1] Embedded Maintainer(s), linux-embedded@vger list Rob Landley
2008-06-09 21:27 ` Leon Woestenberg
2008-06-10 3:53 ` Rob Landley
2008-06-10 4:30 ` Sam Ravnborg
2008-06-10 6:55 ` Rob Landley
2008-06-10 7:54 ` Sam Ravnborg
2008-06-10 9:09 ` Wolfgang Denk
2008-06-10 13:12 ` Jamie Lokier
2008-06-10 13:25 ` Will Newton
2008-06-10 13:33 ` David Woodhouse
2008-06-10 13:47 ` Will Newton
2008-06-10 13:53 ` David Woodhouse
2008-06-10 14:00 ` Grant Likely
2008-06-10 14:01 ` Wolfgang Denk
2008-06-10 14:29 ` Jamie Lokier
2008-06-11 5:34 ` Rob Landley
2008-06-10 13:49 ` Wolfgang Denk
2008-06-11 5:25 ` Rob Landley
2008-06-12 18:18 ` Enrico Weigelt
2008-06-12 18:55 ` Wolfgang Denk
2008-06-12 20:55 ` Enrico Weigelt
2008-06-15 21:48 ` Rob Landley
2008-06-17 14:11 ` Enrico Weigelt
2008-06-10 13:47 ` Wolfgang Denk
2008-06-10 10:20 ` Jamie Lokier
2008-06-10 10:36 ` Adrian Bunk
2008-06-10 10:50 ` Sam Ravnborg
2008-06-11 5:28 ` Paul Mundt
2008-06-10 17:36 ` Tim Bird
2008-06-11 3:35 ` Rob Landley
2008-06-11 5:47 ` Greg Ungerer
2008-06-12 0:41 ` Rob Landley
2008-06-12 7:55 ` Jamie Lokier
2008-06-12 15:23 ` cross-compiling alternatives (was Re: [PATCH 0/1] Embedded Maintainer(s)...) Tim Bird
2008-06-12 15:50 ` David Woodhouse
2008-06-12 16:05 ` Mike Frysinger
2008-06-12 16:08 ` David Woodhouse
2008-06-12 16:15 ` Mike Frysinger
2008-06-12 16:12 ` Robert P. J. Day
2008-06-13 0:25 ` Rob Landley
2008-06-13 1:22 ` Bill Gatliff
2008-06-13 6:55 ` Alexander Neundorf
2008-06-13 15:06 ` Enrico Weigelt
2008-06-13 7:04 ` David Woodhouse
2008-06-13 15:02 ` linux-embedded-owner
2008-06-13 17:00 ` David Woodhouse
2008-06-13 17:12 ` Bill Traynor
2008-06-13 18:44 ` Tim Bird
2008-06-13 18:55 ` Sam Ravnborg
2008-06-13 19:00 ` Bill Traynor
2008-06-13 19:43 ` Johannes Stezenbach
2008-06-13 17:30 ` Makefile debugger linux-embedded-owner
2008-06-13 8:50 ` cross-compiling alternatives Bernd Petrovitsch
2008-06-13 9:11 ` Alexander Neundorf
2008-06-13 14:51 ` cross-compiling alternatives (was Re: [PATCH 0/1] Embedded Maintainer(s)...) Enrico Weigelt
2008-06-16 7:58 ` Alexander Neundorf
2008-06-16 16:00 ` Enrico Weigelt
2008-06-16 17:38 ` Adrian Bunk
2008-06-17 13:57 ` Enrico Weigelt
2008-06-13 11:14 ` Geert Uytterhoeven
2008-06-13 11:22 ` Bart Van Assche
2008-06-12 18:29 ` Josh Boyer
2008-06-12 19:02 ` Mike Frysinger
2008-06-13 13:29 ` Josh Boyer
2008-06-13 13:59 ` Josh Boyer
2008-06-12 16:08 ` Paul Mundt
2008-06-12 16:28 ` Bill Gatliff
2008-06-12 16:31 ` Paul Mundt
2008-06-12 16:38 ` Mike Frysinger
2008-06-12 18:50 ` Bernhard Fischer
2008-06-12 17:14 ` Bill Gatliff
2008-06-12 17:22 ` Mike Frysinger
2008-06-12 17:23 ` Sam Ravnborg
2008-06-13 18:01 ` Rob Landley
2008-06-12 16:37 ` David Woodhouse
2008-06-12 17:01 ` Adrian Bunk
2008-06-12 17:19 ` Bill Gatliff
2008-06-12 17:17 ` Bill Gatliff
2008-06-13 11:15 ` Geert Uytterhoeven
2008-06-13 11:17 ` David Woodhouse
2008-06-12 18:34 ` Enrico Weigelt
2008-06-12 19:00 ` Bill Gatliff
2008-06-15 21:51 ` Rob Landley
2008-06-12 18:30 ` Enrico Weigelt
2008-06-12 18:57 ` Wolfgang Denk
2008-06-12 16:23 ` Tim Bird
2008-06-12 18:37 ` Enrico Weigelt
2008-06-13 18:45 ` Robert Schwebel
2008-06-15 23:12 ` Enrico Weigelt
2008-06-16 8:02 ` Alexander Neundorf
2008-06-16 8:28 ` cross-compiling alternatives Bernd Petrovitsch
2008-06-16 9:25 ` Alexander Neundorf
2008-06-13 1:25 ` cross-compiling alternatives (was Re: [PATCH 0/1] Embedded Maintainer(s)...) Rob Landley
2008-06-13 1:28 ` Robert P. J. Day
2008-06-13 1:29 ` Mike Frysinger
2008-06-13 6:30 ` Alexander Neundorf
2008-06-13 18:51 ` Robert Schwebel
2008-06-13 22:25 ` Jamie Lokier
2008-06-13 23:19 ` Robert Schwebel
2008-06-14 0:07 ` Jamie Lokier
2008-06-14 11:26 ` Robert Schwebel
2008-06-16 11:39 ` Jamie Lokier
2008-06-16 12:06 ` Alexander Neundorf
2008-06-16 13:32 ` Jamie Lokier
2008-06-16 16:28 ` Bernhard Fischer
2008-06-16 22:28 ` Jamie Lokier
2008-06-16 22:44 ` Adrian Bunk
2008-06-16 5:11 ` Enrico Weigelt
2008-06-16 11:33 ` Jamie Lokier
2008-06-16 8:33 ` cross-compiling alternatives Bernd Petrovitsch
2008-06-16 11:17 ` Jamie Lokier
2008-06-16 11:43 ` Bernd Petrovitsch
2008-06-16 7:55 ` cross-compiling alternatives (was Re: [PATCH 0/1] Embedded Maintainer(s)...) Alexander Neundorf
2008-06-16 15:15 ` Enrico Weigelt
2008-06-17 6:27 ` Alexander Neundorf
2008-06-17 13:46 ` Enrico Weigelt
2008-06-17 14:22 ` Alexander Neundorf
2008-06-16 4:57 ` Enrico Weigelt
2008-06-16 11:44 ` Jamie Lokier
2008-06-16 4:31 ` Enrico Weigelt
2008-06-16 8:13 ` Alexander Neundorf
2008-06-16 8:21 ` cross-compiling alternatives Bernd Petrovitsch
2008-06-13 3:11 ` cross-compiling alternatives (was Re: [PATCH 0/1] Embedded Maintainer(s)...) Sam Ravnborg
2008-06-13 18:47 ` Robert Schwebel
2008-06-13 6:43 ` Alexander Neundorf
2008-06-13 8:38 ` Bernd Petrovitsch
2008-06-13 9:06 ` Alexander Neundorf
2008-06-13 9:12 ` David Woodhouse
2008-06-13 9:32 ` Alexander Neundorf
2008-06-13 15:28 ` Enrico Weigelt
2008-06-14 0:31 ` Jamie Lokier
2008-06-16 4:23 ` Enrico Weigelt
2008-06-16 10:49 ` Jamie Lokier
2008-06-16 11:09 ` David Woodhouse
2008-06-16 11:52 ` Jamie Lokier
2008-06-16 11:59 ` David Woodhouse
2008-06-16 16:43 ` Bernhard Fischer
2008-06-13 10:03 ` cross-compiling alternatives Bernd Petrovitsch
2008-06-13 11:24 ` Alexander Neundorf
2008-06-13 13:17 ` Jamie Lokier
2008-06-13 13:28 ` Bernd Petrovitsch
2008-06-13 13:40 ` Alexander Neundorf
2008-06-13 13:56 ` Matthieu CASTET
2008-06-13 14:41 ` Enrico Weigelt
2008-06-13 14:49 ` Jamie Lokier
2008-06-13 14:51 ` Enrico Weigelt
2008-06-13 14:55 ` Enrico Weigelt
2008-06-13 15:16 ` Enrico Weigelt
2008-06-13 18:45 ` Bernd Petrovitsch
2008-06-13 19:10 ` Robert Schwebel
2008-06-16 4:08 ` Enrico Weigelt
2008-06-16 7:31 ` Peter Korsgaard
2008-06-16 14:33 ` Enrico Weigelt
2008-06-16 16:45 ` Bernhard Fischer
2008-06-13 19:14 ` cross-compiling alternatives (was Re: [PATCH 0/1] Embedded Maintainer(s)...) Rob Landley
2008-06-13 15:25 ` Enrico Weigelt
2008-06-12 18:25 ` [PATCH 0/1] Embedded Maintainer(s), linux-embedded@vger list Enrico Weigelt
2008-06-12 21:11 ` David VomLehn
2008-06-12 21:42 ` James Chapman
2008-06-12 21:46 ` Mike Frysinger
2008-06-12 21:53 ` Tim Bird
2008-06-12 21:56 ` Mike Frysinger
2008-06-13 8:39 ` James Chapman
2008-06-13 9:02 ` Daniel THOMPSON
2008-06-13 11:28 ` James Chapman
2008-06-12 22:02 ` Jim Freeman
2008-06-13 13:14 ` Samuel Robb
2008-06-13 14:36 ` Enrico Weigelt
2008-06-13 14:26 ` Enrico Weigelt
2008-06-13 22:24 ` David VomLehn
2008-06-15 15:39 ` Leon Woestenberg
2008-06-15 21:43 ` Rob Landley [this message]
2008-06-23 17:22 ` Denys Vlasenko
2008-06-23 18:57 ` Sam Ravnborg
2008-06-23 19:12 ` Denys Vlasenko
2008-06-23 19:33 ` Sam Ravnborg
[not found] ` <1209636171.25560.508.camel@pmac.infradead.org>
[not found] ` <20080501104158.GM20451@one.firstfloor.org>
2008-06-23 17:28 ` Denys Vlasenko
2008-06-23 17:45 ` Adrian Bunk
2008-06-23 18:19 ` Denys Vlasenko
2008-06-23 19:05 ` Tim Bird
2008-06-25 9:50 ` James Chapman
2008-06-25 15:41 ` Adrian Bunk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200806151643.56572.rob@landley.net \
--to=rob@landley.net \
--cc=dwmw2@infradead.org \
--cc=gerg@snapgear.com \
--cc=leon.woestenberg@gmail.com \
--cc=linux-embedded@vger.kernel.org \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).