[elbe-devel] Best way to build kernel & u-boot in an elbe setup?

John Ogness john.ogness at linutronix.de
Thu Jan 28 17:22:22 CET 2016


Hi Norbert,

On 2016-01-25, Norbert Nemec | BLOKS. <nn at bloks.de> wrote:
> Currently, I am cross-compiling kernel and u-boot inside the
> initvm. Compiling them inside the virtual target architecture seems
> like a waste of time, since cross-compiling is really straightforward
> for these pages.
>
> I understand the value of the virtual environment to avoid
> cross-compiling of applications with all their library
> dependencies. For kernel and boot-loaded I don't see the point.
>
> Is this really the way to go? How do others build kernel&bootloader
> with elbe?

One important aspect of ELBE is that it provides a mechanism for
reproducability. If you are cross-compiling the kernel and bootloader in
the initvm (or host machine), then you are using tools (and in fact, an
entire build environment) that will not be available on the ISO
image. That means that if in 10 years you want to reproduce that kernel
or bootloader, you will need to have a backup of the build environment
you used. The ISO image alone is not enough.

In contrast, if you build the kernel and bootloader as an ELBE project,
then you have a nice ISO image where all components necessary to
reproduce those packages exist.

I, personally, also do cross-compiling to save time during
development. However, for final production releases, I use an ELBE
project to generate Debian packages for my kernel and boot loader. Those
packages are then added to a local Debian repository. And then a
separate ELBE project is used to generate a root filesystem making use
of the kernel and bootloader packages. In the end I have 2 ISO images, 1
to reproduce the kernel/bootloader packages, 1 to reproduce the root
filesystem.

> How is it supposed to be done?

I think that is a good question. I do not know if an official answer to
it exists yet.

John Ogness




More information about the elbe-devel mailing list