[Buildroot] [PATCH 1/1] build host lz4 to support lz4 compression in the kernel.
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Wed Apr 1 13:02:37 UTC 2015
Dear Johan Sagaert,
On Wed, 01 Apr 2015 14:25:38 +0200, Johan Sagaert wrote:
> > I think it's time to add some Config.in options in linux/Config.in to
> > select the compression tools to be made available, and enforce their
> > usage/availability in the Linux .config file. It is annoying to bvuild
> > host-lzop and host-lz4 every time you're building a kernel if you don't
> > care about those compressions algos.
> I am not sure if all kernel releases have the lz4 compression option, so
> this
> seemed the most simple solution, lz4 is not taking large resources in
> terms of build time
> This works fine for me now.
Yes, it works. But everyone now needs to build host-lzop and host-lz4
before building a kernel even if they don't work.
> Not sure about this : could host-lz4 be build in a kernel_pre_build hook ?
> checking the kernels .config before the kernel build starts.
Unfortunately, no. The dependencies have to be known before the kernel
configuration is generated.
> I don't want lz4 on the target , that is why i have done it this way,
> lz4 that can be selected via the menu
> if needed on the target , and a host-lz4 that is always build when
> building a kernel.
> Sent me your suggestion, and i will try to fix this patch. (have to do
> all buildroot patchwork in free-time )
Just don't do *any* change to the lz4 package. Add your host-lz4
dependency to LINUX_DEPENDENCIES, and this is enough. It will only
build the host variant of lz4. The target variant will only be built if
BR2_PACKAGE_LZ4 is enabled in your Buildroot .config.
You seem to believe that because the target and host variant of lz4 are
implemented in the same .mk file, both of them are always built
together. But this is not the case. Even with both defined in the
same .mk file, it perfectly supports building only the host variant,
only the target variant, or both.
So your change to lz4.mk and creating a host-lz4.mk is completely
unnecessary.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
More information about the buildroot
mailing list