diff mbox

Added menu entry to build squashfs host tools separately

Message ID 2146187109.45390160.1391089943313.JavaMail.root@telenet.be
State Rejected
Headers show

Commit Message

jeroen.de.wachter@telenet.be Jan. 30, 2014, 1:52 p.m. UTC
Before, the squashfs tools for host were only built when a squashfs
root filesystem image was generated.

If the squashfs image is selected, it automatically selects the
squahsfs host tools as well. Consequently, I've removed
host-squashfs from ROOTFS_SQUASHFS_DEPENDENCIES.
---
 fs/squashfs/Config.in           |    1 +
 fs/squashfs/squashfs.mk         |    2 --
 package/Config.in.host          |    1 +
 package/squashfs/Config.in.host |    6 ++++++
 4 files changed, 8 insertions(+), 2 deletions(-)
 create mode 100644 package/squashfs/Config.in.host

--
1.7.1

Comments

Thomas Petazzoni Jan. 31, 2014, 8:22 a.m. UTC | #1
Dear Jeroen De Wachter,

On Thu, 30 Jan 2014 14:52:23 +0100 (CET), Jeroen De Wachter wrote:

> If the squashfs image is selected, it automatically selects the
> squahsfs host tools as well. Consequently, I've removed
> host-squashfs from ROOTFS_SQUASHFS_DEPENDENCIES.

In the other filesystems, we do not necessarily select
BR2_PACKAGE_HOST_<utilities to build the filesystem>, and therefore we
keep the <pkg>_DEPENDENCIES that contains host-<utilities to build the
filesystem>.

I don't have a very strong opinion on which solution we should use, but
I am sure that we want things to be consistent across the different
filesystems. So for the time being:

>  config BR2_TARGET_ROOTFS_SQUASHFS
>         bool "squashfs root filesystem"
> +       select BR2_PACKAGE_HOST_SQUASHFS

This is not necessary.

>         help
>           Build a squashfs root filesystem
> 
> diff --git a/fs/squashfs/squashfs.mk b/fs/squashfs/squashfs.mk
> index eb5fc3e..b5ece9d 100644
> --- a/fs/squashfs/squashfs.mk
> +++ b/fs/squashfs/squashfs.mk
> @@ -4,8 +4,6 @@
>  #
>  ################################################################################
> 
> -ROOTFS_SQUASHFS_DEPENDENCIES = host-squashfs

And this should be preserved.

Unless of course we decide to change our strategy.

Thomas
Arnout Vandecappelle Feb. 2, 2014, 5:53 p.m. UTC | #2
On 31/01/14 09:22, Thomas Petazzoni wrote:
> Dear Jeroen De Wachter,
>
> On Thu, 30 Jan 2014 14:52:23 +0100 (CET), Jeroen De Wachter wrote:
>
>> If the squashfs image is selected, it automatically selects the
>> squahsfs host tools as well. Consequently, I've removed
>> host-squashfs from ROOTFS_SQUASHFS_DEPENDENCIES.
>
> In the other filesystems, we do not necessarily select
> BR2_PACKAGE_HOST_<utilities to build the filesystem>, and therefore we
> keep the <pkg>_DEPENDENCIES that contains host-<utilities to build the
> filesystem>.

  I would actually prefer to have both the select and the dependencies, 
since that's what we do for target packages.

  In addition (but that's just a small consideration), if at some point 
we make TARGETS contain only the target targets (heh), then the 
dependency chain for filesystems is still correct.

  Regards,
  Arnout

>
> I don't have a very strong opinion on which solution we should use, but
> I am sure that we want things to be consistent across the different
> filesystems. So for the time being:
>
>>   config BR2_TARGET_ROOTFS_SQUASHFS
>>          bool "squashfs root filesystem"
>> +       select BR2_PACKAGE_HOST_SQUASHFS
>
> This is not necessary.
>
>>          help
>>            Build a squashfs root filesystem
>>
>> diff --git a/fs/squashfs/squashfs.mk b/fs/squashfs/squashfs.mk
>> index eb5fc3e..b5ece9d 100644
>> --- a/fs/squashfs/squashfs.mk
>> +++ b/fs/squashfs/squashfs.mk
>> @@ -4,8 +4,6 @@
>>   #
>>   ################################################################################
>>
>> -ROOTFS_SQUASHFS_DEPENDENCIES = host-squashfs
>
> And this should be preserved.
>
> Unless of course we decide to change our strategy.
>
> Thomas
>
Thomas Petazzoni Feb. 3, 2014, 7:10 a.m. UTC | #3
Dear Arnout Vandecappelle,

On Sun, 02 Feb 2014 18:53:28 +0100, Arnout Vandecappelle wrote:

> > In the other filesystems, we do not necessarily select
> > BR2_PACKAGE_HOST_<utilities to build the filesystem>, and therefore we
> > keep the <pkg>_DEPENDENCIES that contains host-<utilities to build the
> > filesystem>.
> 
>   I would actually prefer to have both the select and the dependencies, 
> since that's what we do for target packages.

But then we should be consistent and do this all over the place: as
soon as a host package has a Config.in symbol, then it should be
selected by its reverse dependencies.

>   In addition (but that's just a small consideration), if at some point 
> we make TARGETS contain only the target targets (heh), then the 
> dependency chain for filesystems is still correct.

Hum, there are some host packages that we want to build and that are
not dependencies of target packages. That's the very reason why we have
the "Host utilities" menu.

That being said, it would certainly be good to have two make variables:

 * TARGET_PACKAGES
 * HOST_PACKAGES

that are respectively used to contain the list of targets for
enabled target packages, and the list of targets for enabled host
packages.

Thomas
Yann E. MORIN Feb. 3, 2014, 11:26 a.m. UTC | #4
Jeroen, All,

On 2014-01-30 14:52 +0100, Jeroen De Wachter spake thusly:
> Before, the squashfs tools for host were only built when a squashfs
> root filesystem image was generated.

We already have such a patch to that effect (and only about showing it
in the menuconfig) waiting in the patchwork:
    http://patchwork.ozlabs.org/patch/306629/

Regards,
Yann E. MORIN.
jeroen.de.wachter@telenet.be Feb. 3, 2014, 6:56 p.m. UTC | #5
Ok,

I just wanted to make sure that when the squashfs host tools would be built, they'd show
as selected in the host utilities too (regardless of whether they'd been selected
separately or by enabling the squashfs file system image). I don't think that will be
the case with the current patch?

I didn't check the way host tools were selected for the other filesystems though. I have
no issues following convention :-)

Cheers,
Jeroen

----- Original Message -----
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: "Jeroen De Wachter" <jeroen.de.wachter@telenet.be>
Cc: buildroot@busybox.net
Sent: Monday, February 3, 2014 12:26:10 PM
Subject: Re: [Buildroot] [PATCH] Added menu entry to build squashfs host tools separately

Jeroen, All,

On 2014-01-30 14:52 +0100, Jeroen De Wachter spake thusly:
> Before, the squashfs tools for host were only built when a squashfs
> root filesystem image was generated.

We already have such a patch to that effect (and only about showing it
in the menuconfig) waiting in the patchwork:
    http://patchwork.ozlabs.org/patch/306629/

Regards,
Yann E. MORIN.
Arnout Vandecappelle Feb. 4, 2014, 11:26 p.m. UTC | #6
On 03/02/14 08:10, Thomas Petazzoni wrote:
> Dear Arnout Vandecappelle,
> 
> On Sun, 02 Feb 2014 18:53:28 +0100, Arnout Vandecappelle wrote:
> 
>>> In the other filesystems, we do not necessarily select
>>> BR2_PACKAGE_HOST_<utilities to build the filesystem>, and therefore we
>>> keep the <pkg>_DEPENDENCIES that contains host-<utilities to build the
>>> filesystem>.
>>
>>   I would actually prefer to have both the select and the dependencies, 
>> since that's what we do for target packages.
> 
> But then we should be consistent and do this all over the place: as
> soon as a host package has a Config.in symbol, then it should be
> selected by its reverse dependencies.

 Indeed.


>>   In addition (but that's just a small consideration), if at some point 
>> we make TARGETS contain only the target targets (heh), then the 
>> dependency chain for filesystems is still correct.
> 
> Hum, there are some host packages that we want to build and that are
> not dependencies of target packages. That's the very reason why we have
> the "Host utilities" menu.
> 
> That being said, it would certainly be good to have two make variables:
> 
>  * TARGET_PACKAGES
>  * HOST_PACKAGES
> 
> that are respectively used to contain the list of targets for
> enabled target packages, and the list of targets for enabled host
> packages.

 That's exactly what I mean.

 Regards,
 Arnout
diff mbox

Patch

diff --git a/fs/squashfs/Config.in b/fs/squashfs/Config.in
index 817909d..e788e61 100644
--- a/fs/squashfs/Config.in
+++ b/fs/squashfs/Config.in
@@ -1,5 +1,6 @@ 
 config BR2_TARGET_ROOTFS_SQUASHFS
        bool "squashfs root filesystem"
+       select BR2_PACKAGE_HOST_SQUASHFS
        help
          Build a squashfs root filesystem

diff --git a/fs/squashfs/squashfs.mk b/fs/squashfs/squashfs.mk
index eb5fc3e..b5ece9d 100644
--- a/fs/squashfs/squashfs.mk
+++ b/fs/squashfs/squashfs.mk
@@ -4,8 +4,6 @@ 
 #
 ################################################################################

-ROOTFS_SQUASHFS_DEPENDENCIES = host-squashfs
-
 ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZO),y)
 ROOTFS_SQUASHFS_ARGS += -comp lzo
 else
diff --git a/package/Config.in.host b/package/Config.in.host
index 34e84bf..71597bf 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -12,6 +12,7 @@  source "package/omap-u-boot-utils/Config.in.host"
 source "package/openocd/Config.in.host"
 source "package/parted/Config.in.host"
 source "package/sam-ba/Config.in.host"
+source "package/squashfs/Config.in.host"
 source "package/sunxi-tools/Config.in.host"
 source "package/uboot-tools/Config.in.host"

diff --git a/package/squashfs/Config.in.host b/package/squashfs/Config.in.host
new file mode 100644
index 0000000..b353374
--- /dev/null
+++ b/package/squashfs/Config.in.host
@@ -0,0 +1,6 @@ 
+config BR2_PACKAGE_HOST_SQUASHFS
+       bool "host squashfs"
+       help
+         Tools to generate SquashFS filesystems.
+
+         http://squashfs.sourceforge.net/