diff mbox series

package/18xx-ti-utils: update makefile in order to compile wlconf

Message ID 20200916135834.400-1-mvalabdas@distech-controls.com
State Superseded
Headers show
Series package/18xx-ti-utils: update makefile in order to compile wlconf | expand

Commit Message

Miken Valabdas Sept. 16, 2020, 1:58 p.m. UTC
Signed-off-by: Miken Valabdas <mvalabdas@distech-controls.com>
---
 package/18xx-ti-utils/18xx-ti-utils.mk | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Thomas Petazzoni Sept. 16, 2020, 2:57 p.m. UTC | #1
Hello Miken,

Thanks for your contribution!

On Wed, 16 Sep 2020 09:58:34 -0400
Miken Valabdas via buildroot <buildroot@busybox.net> wrote:

> Signed-off-by: Miken Valabdas <mvalabdas@distech-controls.com>
> ---
>  package/18xx-ti-utils/18xx-ti-utils.mk | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/package/18xx-ti-utils/18xx-ti-utils.mk b/package/18xx-ti-utils/18xx-ti-utils.mk
> index d1f0388c3a..41ce8ab973 100644
> --- a/package/18xx-ti-utils/18xx-ti-utils.mk
> +++ b/package/18xx-ti-utils/18xx-ti-utils.mk
> @@ -21,6 +21,11 @@ define 18XX_TI_UTILS_BUILD_CMDS
>  		NFSROOT="$(STAGING_DIR)" NLVER=3 $(MAKE) -C $(@D) \
>  		CFLAGS="$(TARGET_CFLAGS) $(18XX_TI_UTILS_CFLAGS)" \
>  		$(18XX_TI_UTILS_BUILD_TARGET)
> +
> +	$(TARGET_MAKE_ENV) CROSS_COMPILE=$(TARGET_CROSS) \
> +		NFSROOT="$(STAGING_DIR)" NLVER=3 $(MAKE) -C $(@D)/wlconf \
> +		CFLAGS="$(TARGET_CFLAGS) $(18XX_TI_UTILS_CFLAGS)" \
> +		$(18XX_TI_UTILS_BUILD_TARGET)

So this is going to build another tool, but you haven't changed the
18XX_TI_UTILS_INSTALL_TARGET_CMDS to also install it. So how is this
tool going to be practically useful ?

Thanks!

Thomas
Gervais, Francois via buildroot Sept. 16, 2020, 4:14 p.m. UTC | #2
Hello Thomas,

Thanks for your message.
The reason why I haven't changed the 18XX_TI_UTILS_INSTALL_TARGET_CMDS is because this tool will be used in a host computer (not on the target board) in conjunction with BR2_ROOTFS_POST_IMAGE_SCRIPT.
In resume, this tool will be used by a script through BR2_ROOTFS_POST_IMAGE_SCRIPT. The script itself will install the appropriate output (after doing some stuffs).

Thanks!
Miken 




-----Original Message-----
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> 
Sent: 16 septembre 2020 10:57
To: Valabdas, Miken <mvalabdas@distech-controls.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/18xx-ti-utils: update makefile in order to compile wlconf

Hello Miken,

Thanks for your contribution!

On Wed, 16 Sep 2020 09:58:34 -0400
Miken Valabdas via buildroot <buildroot@busybox.net> wrote:

> Signed-off-by: Miken Valabdas <mvalabdas@distech-controls.com>
> ---
>  package/18xx-ti-utils/18xx-ti-utils.mk | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/package/18xx-ti-utils/18xx-ti-utils.mk 
> b/package/18xx-ti-utils/18xx-ti-utils.mk
> index d1f0388c3a..41ce8ab973 100644
> --- a/package/18xx-ti-utils/18xx-ti-utils.mk
> +++ b/package/18xx-ti-utils/18xx-ti-utils.mk
> @@ -21,6 +21,11 @@ define 18XX_TI_UTILS_BUILD_CMDS
>  		NFSROOT="$(STAGING_DIR)" NLVER=3 $(MAKE) -C $(@D) \
>  		CFLAGS="$(TARGET_CFLAGS) $(18XX_TI_UTILS_CFLAGS)" \
>  		$(18XX_TI_UTILS_BUILD_TARGET)
> +
> +	$(TARGET_MAKE_ENV) CROSS_COMPILE=$(TARGET_CROSS) \
> +		NFSROOT="$(STAGING_DIR)" NLVER=3 $(MAKE) -C $(@D)/wlconf \
> +		CFLAGS="$(TARGET_CFLAGS) $(18XX_TI_UTILS_CFLAGS)" \
> +		$(18XX_TI_UTILS_BUILD_TARGET)

So this is going to build another tool, but you haven't changed the 18XX_TI_UTILS_INSTALL_TARGET_CMDS to also install it. So how is this tool going to be practically useful ?

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://urldefense.com/v3/__https://bootlin.com__;!!Po4YltK3bPMkYw!nIVmpi0i8yXDE-CppSCDd56kOjhCnuUXrq0QLj-UBQgyigt5BaYRYF8QHgYt3qmOJ1jr2Fkv$
Thomas Petazzoni Sept. 16, 2020, 4:28 p.m. UTC | #3
Hello,

On Wed, 16 Sep 2020 16:14:07 +0000
"Valabdas, Miken" <mvalabdas@distech-controls.com> wrote:

> Thanks for your message.
>
> The reason why I haven't changed the
> 18XX_TI_UTILS_INSTALL_TARGET_CMDS is because this tool will be used
> in a host computer (not on the target board) in conjunction with
> BR2_ROOTFS_POST_IMAGE_SCRIPT.
>
> In resume, this tool will be used by a script through
> BR2_ROOTFS_POST_IMAGE_SCRIPT. The script itself will install the
> appropriate output (after doing some stuffs).

OK, so this tool is built with the host compiler, and runs on the host
machine. It seems weird as you're passing CFLAGS="$(TARGET_CFLAGS) ..."
for example.

Also, a host tool should be installed in $(HOST_DIR)/bin or
$(HOST_DIR)/sbin.

Best regards,

Thomas
Gervais, Francois via buildroot Sept. 16, 2020, 6:52 p.m. UTC | #4
Hello,

I see, I will change accordingly. Thanks for your input.

Regards,
Miken.
mvalabdas@distech-controls.com






-----Original Message-----
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> 
Sent: 16 septembre 2020 12:29
To: Valabdas, Miken <mvalabdas@distech-controls.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/18xx-ti-utils: update makefile in order to compile wlconf

Hello,

On Wed, 16 Sep 2020 16:14:07 +0000
"Valabdas, Miken" <mvalabdas@distech-controls.com> wrote:

> Thanks for your message.
>
> The reason why I haven't changed the
> 18XX_TI_UTILS_INSTALL_TARGET_CMDS is because this tool will be used in 
> a host computer (not on the target board) in conjunction with 
> BR2_ROOTFS_POST_IMAGE_SCRIPT.
>
> In resume, this tool will be used by a script through 
> BR2_ROOTFS_POST_IMAGE_SCRIPT. The script itself will install the 
> appropriate output (after doing some stuffs).

OK, so this tool is built with the host compiler, and runs on the host machine. It seems weird as you're passing CFLAGS="$(TARGET_CFLAGS) ..."
for example.

Also, a host tool should be installed in $(HOST_DIR)/bin or $(HOST_DIR)/sbin.

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://urldefense.com/v3/__https://bootlin.com__;!!Po4YltK3bPMkYw!jjfxu5py5t8nd8ucVhSs2-N5n3EdfjudvNwyVbcc5lGNbET1KSf4rOMlgzqqIxvs7YGLi0TO$
diff mbox series

Patch

diff --git a/package/18xx-ti-utils/18xx-ti-utils.mk b/package/18xx-ti-utils/18xx-ti-utils.mk
index d1f0388c3a..41ce8ab973 100644
--- a/package/18xx-ti-utils/18xx-ti-utils.mk
+++ b/package/18xx-ti-utils/18xx-ti-utils.mk
@@ -21,6 +21,11 @@  define 18XX_TI_UTILS_BUILD_CMDS
 		NFSROOT="$(STAGING_DIR)" NLVER=3 $(MAKE) -C $(@D) \
 		CFLAGS="$(TARGET_CFLAGS) $(18XX_TI_UTILS_CFLAGS)" \
 		$(18XX_TI_UTILS_BUILD_TARGET)
+
+	$(TARGET_MAKE_ENV) CROSS_COMPILE=$(TARGET_CROSS) \
+		NFSROOT="$(STAGING_DIR)" NLVER=3 $(MAKE) -C $(@D)/wlconf \
+		CFLAGS="$(TARGET_CFLAGS) $(18XX_TI_UTILS_CFLAGS)" \
+		$(18XX_TI_UTILS_BUILD_TARGET)
 endef
 
 define 18XX_TI_UTILS_INSTALL_TARGET_CMDS