[Buildroot] [PATCH] linux: CONFIG_KERNEL_LZO option requires host-lzop

Peter Korsgaard jacmet at uclibc.org
Tue May 14 15:30:42 UTC 2013


>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni at free-electrons.com> writes:

 Thomas> Dear Fabio Porcedda,
 Thomas> On Tue, 14 May 2013 11:02:32 +0200, Fabio Porcedda wrote:

 >> I know that the best solution is to depend on the linux kernel
 >> configuration, but I don't know a way to do that cleanly.
 >> Maybe some clever idea?
 >> 
 >> Adding mandatory dependency is the simplest and always works but as
 >> you pointed it always builds host-lzop even when is not used.
 >> 
 >> Choosing the compression within buildroot doesn't wok when using a
 >> defconfig or linux-xconfig target but at least does build host-lzop
 >> only when is used.

 Thomas> It does work, as long as the compression type is enforced by
 Thomas> Buildroot, regardless of what was selected by linux-xconfig or
 Thomas> the defconfig.  That's what we do today for
 Thomas> DEVTMPFS/DEVTMPFS_MOUNT/INITRAMFS_SOURCE for example.

 Thomas> However, before going ahead and implementing that, I'd like to
 Thomas> have the opinion of Peter and maybe others.

I agree that it isn't really nice to needlessly build host-lzop/xz if
not needed, but I also dislike extra configuration options (that might
not be in sync with the defconfig).

The difference between the other options we have and this is that either
we closely interact with the kernel build (for initramfs) or the system
fails in nonobvious ways at runtime if not set (devtmpfs).

Nothing else in buildroot really cares about the kernel compression
option (besides that the kernel needs specific build tools).

A quick test on my not-especially-beefy laptop shows:

make host-lzop  29.83s user 3.73s system 107% cpu 31.312 total
make host-xz  21.03s user 2.66s system 126% cpu 18.759 total

So ~50s extra build time if you build a Linux kernel, which isn't too
bad.

Perhaps we can come up with a better solution later, but I'll apply the
patch as it is for 2013.05.

-- 
Bye, Peter Korsgaard


More information about the buildroot mailing list