From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] asking for advice on improving our buildroot setup
Date: Thu, 7 Jul 2011 13:59:22 +0200 [thread overview]
Message-ID: <20110707135922.5b7ff449@skate> (raw)
In-Reply-To: <1310033360.2076.18.camel@sven>
Hello Sven,
Thanks for your feedback on this, it is really interesting to see how
people are using Buildroot, what are their use cases, and how we could
improve things to match more use cases.
Le Thu, 07 Jul 2011 12:09:20 +0200,
Sven Neumann <s.neumann@raumfeld.com> a ?crit :
> We are building factory images, USB rescue images and update images
> for our Raumfeld evices. In order to do this we need to build, for
> each target platform (2 platforms currently):
>
> (1) a kernel and initramfs with some basic tools
> (2) an ext2 rootfs that contains factory tests as well
> as tools to format the flash and unpack a tar.gz
> rootfs on it
> (3) the actual rootfs of the devices as tar.gz
> this includes a kernel and modules and this kernel
> may be different from the kernel built in step 1
>
> So what we are doing currently is that we are running full independent
> buildroot builds for each of the steps listed above and then build our
> images from the results of those runs. That is we pick up the kernel
> with initramfs from step 1, combine it with the ext rootfs that is
> created in step 2 and add the rootfs.tar.gz from step 3.
I am not sure to understand why (2) and (3) are separate things here.
Can't you just build a single rootfs with all normal production
applications and factory tests, and after the build simply copy the
rootfs and remove factory tests from that copy ?
> (1) Add an initial step that builds a toolchain and then use that
> toolchain from the following steps. This would save the time
> to rebuild the toolchain for each of the steps.
You can even remove that step. Either use a pre-compiled toolchain or
build a toolchain once for all with Crosstool-NG and Buildroot. Keep
that toolchain around as a reference, and use it for all your builds.
To me, it really doesn't make any sense rebuilding a toolchain over and
over again: while it is likely that you make multiple changes to your
kernel and rootfs, it is quite unlikely that you do many changes at the
toolchain level. So just generate it once and use it for all your
builds. Of course, keep the recipe use to generate the toolchain
somewhere, so that if you ever need to regenerate the toolchain to make
some modification, you know how to do it.
> (2) Combine all steps and build different rootfs from within the
> same buildroot tree. I read that this would be supported. But
> I would like to get advice from you first. Is there a chance
> that this will work for the described setup?
There is currently no plan in Buildroot to support more than one rootfs
in one build.
To reduce the build time and number of builds, I would:
*) Generate the toolchain once for all, as detailed above. If your
root filesystems are quite small, then there is a big chance that 50,
60 or 70% of the build time is due to the toolchain building.
*) Combine your (2) and (3) rootfs into one build, if possible (see my
question above)
*) If possible, do not generate two different rootfs for your two
devices, but generate a single rootfs that works on both (of course
this is only possible if the CPU architecture is the same)
Regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2011-07-07 11:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-07 10:09 [Buildroot] asking for advice on improving our buildroot setup Sven Neumann
2011-07-07 11:42 ` Peter Korsgaard
2011-07-07 11:59 ` Thomas Petazzoni [this message]
2011-07-07 12:22 ` Daniel Mack
-- strict thread matches above, loose matches on Subject: below --
2011-07-21 7:53 Arnout Vandecappelle
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=20110707135922.5b7ff449@skate \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/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