Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Sagaert <sagaert.johan@proximus.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] build host lz4 to support lz4 compression in the kernel.
Date: Wed, 01 Apr 2015 14:25:38 +0200	[thread overview]
Message-ID: <551BE3C2.8020508@proximus.be> (raw)
In-Reply-To: <20150401133722.6d6ab6c9@free-electrons.com>

Thomas Petazzoni schreef op 1/04/2015 om 13:37:
> Dear Sagaert Johan,
>
> On Wed,  1 Apr 2015 12:30:57 +0200, Sagaert Johan wrote:
>
>> diff --git a/linux/linux.mk b/linux/linux.mk
>> index 22fce35..137c64d 100644
>> --- a/linux/linux.mk
>> +++ b/linux/linux.mk
>> @@ -49,7 +49,7 @@ LINUX_PATCHES = $(call qstrip,$(BR2_LINUX_KERNEL_PATCH))
>>   LINUX_PATCH = $(filter ftp://% http://% https://%,$(LINUX_PATCHES))
>>   
>>   LINUX_INSTALL_IMAGES = YES
>> -LINUX_DEPENDENCIES += host-kmod host-lzop
>> +LINUX_DEPENDENCIES += host-kmod host-lzop host-lz4
> 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.
Not sure about this : could host-lz4 be build in a kernel_pre_build hook ?
checking the kernels .config  before the kernel build starts.
>> diff --git a/package/lz4/host-lz4.mk b/package/lz4/host-lz4.mk
>> new file mode 100644
>> index 0000000..03138f9
>> --- /dev/null
>> +++ b/package/lz4/host-lz4.mk
>> @@ -0,0 +1,21 @@
>> +################################################################################
>> +#
>> +# host-lz4
>> +#
>> +################################################################################
>> +
>> +HOST_LZ4_VERSION = r123
>> +HOST_LZ4_SITE = $(call github,Cyan4973,lz4,$(HOST_LZ4_VERSION))
>> +HOST_LZ4_LICENSE = BSD-2c
>> +HOST_LZ4_LICENSE_FILES = LICENSE
>> +
>> +define HOST_LZ4_BUILD_CMDS
>> +	$(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)
>> +endef
>> +
>> +define HOST_LZ4_INSTALL_CMDS
>> +	$(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) install DESTDIR=$(HOST_DIR)
>> +endef
>> +
>> +$(eval $(host-generic-package))
>> +
>> diff --git a/package/lz4/lz4.mk b/package/lz4/lz4.mk
>> index 38e10d8..6f8af03 100644
>> --- a/package/lz4/lz4.mk
>> +++ b/package/lz4/lz4.mk
>> @@ -17,14 +17,6 @@ endef
>>   LZ4_POST_PATCH_HOOKS += LZ4_DISABLE_SHARED
>>   endif
>>   
>> -define HOST_LZ4_BUILD_CMDS
>> -	$(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)
>> -endef
>> -
>> -define HOST_LZ4_INSTALL_CMDS
>> -	$(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) install DESTDIR=$(HOST_DIR)
>> -endef
>> -
>>   define LZ4_BUILD_CMDS
>>   	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) liblz4
>>   endef
>> @@ -38,4 +30,3 @@ define LZ4_INSTALL_TARGET_CMDS
>>   endef
>>   
>>   $(eval $(generic-package))
>> -$(eval $(host-generic-package))
> This entire change seems completely unnecessary, and not only that, but
> it is completely incompatible with the Buildroot best practices to
> write host packages. Why did you do this change in the first place?
>
> Thanks,
>
> Thomas
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 )

Regards , Johan

  reply	other threads:[~2015-04-01 12:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-01 10:30 [Buildroot] [PATCH 1/1] build host lz4 to support lz4 compression in the kernel Sagaert Johan
2015-04-01 11:37 ` Thomas Petazzoni
2015-04-01 12:25   ` Johan Sagaert [this message]
2015-04-01 13:02     ` Thomas Petazzoni
2015-04-01 13:17       ` Thomas Petazzoni
2015-04-01 20:24       ` Johan Sagaert

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=551BE3C2.8020508@proximus.be \
    --to=sagaert.johan@proximus.be \
    --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