Skip to contentSkip to conversation

tools: add a generic config for native tools building

RFC PATCH New Otavio Salvador 5 participants 8 messages Nov 27, 2018 – Dec 4, 2018

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 tools: add a generic config for native tools building

The motivation for this is to allow distributions to distribute all possible tools in a generic way, avoiding the need of specific tools building for each machine.

Especially on OpenEmbedded / Yocto Project ecosystem, it is very common each BSP to end providing their specific tools when they need to generate images for some SoC (e.g MX23 / MX28 in meta-freescale case).

Using this, we can package the tools doing:

$: make tools-only_defconfig
$: make tools-only

---

 configs/tools-only_defconfig | 3 +++
 tools/Makefile               | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
 create mode 100644 configs/tools-only_defconfig
configs/tools-only_defconfig new file +3 -0
new file mode 100644
index 0000000000..be69bdf43a
@@ -0,0 +1,3 @@
+CONFIG_SYS_TEXT_BASE=0
+CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
tools/Makefile +1 -1
index 3c0521f655..e916d0cebb 100644
@@ -124,7 +124,7 @@ fit_info-objs   := $(dumpimage-mkimage-objs) fit_info.o
 fit_check_sign-objs   := $(dumpimage-mkimage-objs) fit_check_sign.o
 file2include-objs := file2include.o
 
-ifneq ($(CONFIG_MX23)$(CONFIG_MX28),)
+ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_FIT_SIGNATURE),)
 # Add CONFIG_MXS into host CFLAGS, so we can check whether or not register
 # the mxsimage support within tools/mxsimage.c .
 HOSTCFLAGS_mxsimage.o += -DCONFIG_MXS
Signature · 1 line
2.19.2
#1 lore raw

RFC PATCH 1/1 tools: add a generic config for native tools building

Quoted 36 lines · Otavio Salvador

The motivation for this is to allow distributions to distribute all possible tools in a generic way, avoiding the need of specific tools building for each machine.

Especially on OpenEmbedded / Yocto Project ecosystem, it is very common each BSP to end providing their specific tools when they need to generate images for some SoC (e.g MX23 / MX28 in meta-freescale case).

Using this, we can package the tools doing:

$: make tools-only_defconfig
$: make tools-only

---

 configs/tools-only_defconfig | 3 +++
 tools/Makefile               | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
 create mode 100644 configs/tools-only_defconfig
configs/tools-only_defconfig new file +3 -0
new file mode 100644
index 0000000000..be69bdf43a
@@ -0,0 +1,3 @@
+CONFIG_SYS_TEXT_BASE=0
+CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
tools/Makefile +0 -0
index 3c0521f655..e916d0cebb 100644

tools/Makefile fit_info-objs := $(dumpimage-mkimage-objs) fit_info.o · line 130

Quoted 8 lines
tools/Makefile +1 -1
@@ -124,7 +124,7 @@ fit_info-objs   := $(dumpimage-mkimage-objs) fit_info.o
 fit_check_sign-objs   := $(dumpimage-mkimage-objs) fit_check_sign.o
 file2include-objs := file2include.o
 
-ifneq ($(CONFIG_MX23)$(CONFIG_MX28),)
+ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_FIT_SIGNATURE),)
 # Add CONFIG_MXS into host CFLAGS, so we can check whether or not register
 # the mxsimage support within tools/mxsimage.c .
 HOSTCFLAGS_mxsimage.o += -DCONFIG_MXS

Adding in Peter since Fedora had this same problem crop up. Does something like this work for you guys? Also adding in Vagrant Cascadian since Debian might want to switch to this too. Thoughts? Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181129/591016c9/attachment.sig>
#2 lore raw

RFC PATCH 1/1 tools: add a generic config for native tools building

Quoted 40 lines · Tom Rini
Quoted 39 lines · Otavio Salvador

The motivation for this is to allow distributions to distribute all possible tools in a generic way, avoiding the need of specific tools building for each machine.

Especially on OpenEmbedded / Yocto Project ecosystem, it is very common each BSP to end providing their specific tools when they need to generate images for some SoC (e.g MX23 / MX28 in meta-freescale case).

Using this, we can package the tools doing:

$: make tools-only_defconfig
$: make tools-only

---

 configs/tools-only_defconfig | 3 +++
 tools/Makefile               | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
 create mode 100644 configs/tools-only_defconfig
configs/tools-only_defconfig new file +3 -0
new file mode 100644
index 0000000000..be69bdf43a
@@ -0,0 +1,3 @@
+CONFIG_SYS_TEXT_BASE=0
+CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
tools/Makefile +0 -0
index 3c0521f655..e916d0cebb 100644
@@ -124,7 +124,7 @@ fit_info-objs   := $(dumpimage-mkimage-objs) fit_info.o
 fit_check_sign-objs   := $(dumpimage-mkimage-objs) fit_check_sign.o
 file2include-objs := file2include.o
 
Quoted 9 lines

tools/Makefile fit_info-objs := $(dumpimage-mkimage-objs) fit_info.o · line 130

Quoted 5 lines
tools/Makefile +1 -1
-ifneq ($(CONFIG_MX23)$(CONFIG_MX28),)
+ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_FIT_SIGNATURE),)
 # Add CONFIG_MXS into host CFLAGS, so we can check whether or not register
 # the mxsimage support within tools/mxsimage.c .
 HOSTCFLAGS_mxsimage.o += -DCONFIG_MXS

Adding in Peter since Fedora had this same problem crop up. Does something like this work for you guys? Also adding in Vagrant Cascadian since Debian might want to switch to this too. Thoughts? Thanks!

Thanks.

The u-boot packages in Debian include similar patches and workarounds that I've been meaning to submit upstream for quite some time now... so glad to see someone else started the process!

I'll try to follow-up and check if these patches work for Debian.

live well,
vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181129/b7cd7b57/attachment.sig>

#3 lore raw

RFC PATCH 1/1 tools: add a generic config for native tools building

In reply to Tom Rini
Quoted 42 lines · Tom Rini
Quoted 39 lines · Otavio Salvador

The motivation for this is to allow distributions to distribute all possible tools in a generic way, avoiding the need of specific tools building for each machine.

Especially on OpenEmbedded / Yocto Project ecosystem, it is very common each BSP to end providing their specific tools when they need to generate images for some SoC (e.g MX23 / MX28 in meta-freescale case).

Using this, we can package the tools doing:

$: make tools-only_defconfig
$: make tools-only

---

 configs/tools-only_defconfig | 3 +++
 tools/Makefile               | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
 create mode 100644 configs/tools-only_defconfig
configs/tools-only_defconfig new file +3 -0
new file mode 100644
index 0000000000..be69bdf43a
@@ -0,0 +1,3 @@
+CONFIG_SYS_TEXT_BASE=0
+CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
tools/Makefile +0 -0
index 3c0521f655..e916d0cebb 100644
@@ -124,7 +124,7 @@ fit_info-objs   := $(dumpimage-mkimage-objs) fit_info.o
 fit_check_sign-objs   := $(dumpimage-mkimage-objs) fit_check_sign.o
 file2include-objs := file2include.o
 
Quoted 9 lines

tools/Makefile fit_info-objs := $(dumpimage-mkimage-objs) fit_info.o · line 130

Quoted 5 lines
tools/Makefile +1 -1
-ifneq ($(CONFIG_MX23)$(CONFIG_MX28),)
+ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_FIT_SIGNATURE),)
 # Add CONFIG_MXS into host CFLAGS, so we can check whether or not register
 # the mxsimage support within tools/mxsimage.c .
 HOSTCFLAGS_mxsimage.o += -DCONFIG_MXS

Adding in Peter since Fedora had this same problem crop up. Does something like this work for you guys? Also adding in Vagrant Cascadian since Debian might want to switch to this too. Thoughts? Thanks!

We currently use the tools-all option, details below, to build the tools, which broken in 2018.11 on non arm/x86 platforms due to the sandbox dep being added in there. I'm happy to adjust as necessary to fix that but I'm not sure the difference between tools-all vs the above.

make CROSS_COMPILE="" defconfig V=1 O=builds/
make CROSS_COMPILE="" tools-all V=1 O=builds/

#4 lore raw

RFC PATCH 1/1 tools: add a generic config for native tools building

Quoted 53 lines · Peter Robinson
Quoted 42 lines · Tom Rini
Quoted 39 lines · Otavio Salvador

The motivation for this is to allow distributions to distribute all possible tools in a generic way, avoiding the need of specific tools building for each machine.

Especially on OpenEmbedded / Yocto Project ecosystem, it is very common each BSP to end providing their specific tools when they need to generate images for some SoC (e.g MX23 / MX28 in meta-freescale case).

Using this, we can package the tools doing:

$: make tools-only_defconfig
$: make tools-only

---

 configs/tools-only_defconfig | 3 +++
 tools/Makefile               | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
 create mode 100644 configs/tools-only_defconfig
configs/tools-only_defconfig new file +3 -0
new file mode 100644
index 0000000000..be69bdf43a
@@ -0,0 +1,3 @@
+CONFIG_SYS_TEXT_BASE=0
+CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
tools/Makefile +0 -0
index 3c0521f655..e916d0cebb 100644
@@ -124,7 +124,7 @@ fit_info-objs   := $(dumpimage-mkimage-objs) fit_info.o
 fit_check_sign-objs   := $(dumpimage-mkimage-objs) fit_check_sign.o
 file2include-objs := file2include.o
 
Quoted 9 lines

tools/Makefile fit_info-objs := $(dumpimage-mkimage-objs) fit_info.o · line 130

Quoted 5 lines
tools/Makefile +1 -1
-ifneq ($(CONFIG_MX23)$(CONFIG_MX28),)
+ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_FIT_SIGNATURE),)
 # Add CONFIG_MXS into host CFLAGS, so we can check whether or not register
 # the mxsimage support within tools/mxsimage.c .
 HOSTCFLAGS_mxsimage.o += -DCONFIG_MXS

Adding in Peter since Fedora had this same problem crop up. Does something like this work for you guys? Also adding in Vagrant Cascadian since Debian might want to switch to this too. Thoughts? Thanks!

Quoted 8 lines

We currently use the tools-all option, details below, to build the tools, which broken in 2018.11 on non arm/x86 platforms due to the sandbox dep being added in there. I'm happy to adjust as necessary to fix that but I'm not sure the difference between tools-all vs the above.

make CROSS_COMPILE="" defconfig V=1 O=builds/
make CROSS_COMPILE="" tools-all V=1 O=builds/

Well, with the above you would do tools-only_defconfig then tools-all, and we would make sure to _not_ enable options in tools-only_defconfig that may not build on some host platforms as it's intended only for building tools rather than the myriad of things sandbox is used for.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181201/9b4614e0/attachment.sig>
#5 lore raw

RFC PATCH 1/1 tools: add a generic config for native tools building

Quoted 64 lines · On Sat, 1 Dec 2018, 13:54 Tom Rini <[email protected] wrote:
Quoted 21 lines · Peter Robinson
Quoted 20 lines · Tom Rini
Quoted 17 lines · Otavio Salvador

The motivation for this is to allow distributions to distribute all possible tools in a generic way, avoiding the need of specific tools building for each machine.

Especially on OpenEmbedded / Yocto Project ecosystem, it is very common each BSP to end providing their specific tools when they need to generate images for some SoC (e.g MX23 / MX28 in meta-freescale case).

Using this, we can package the tools doing:

$: make tools-only_defconfig
$: make tools-only

---

Quoted 6 lines
Quoted 6 lines

Review

Quoted 6 lines
 configs/tools-only_defconfig | 3 +++
 tools/Makefile               | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
 create mode 100644 configs/tools-only_defconfig
(quoted diff) +0 -0

b/configs/tools-only_defconfig

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

new file mode 100644
index 0000000000..be69bdf43a

configs/tools-only_defconfig new file +0 -0
@@ -0,0 +1,3 @@
Quoted 8 lines
Quoted 8 lines

tools/Makefile fit_info-objs := $(dumpimage-mkimage-objs)

Quoted 8 lines
configs/tools-only_defconfig new file +3 -0
+CONFIG_SYS_TEXT_BASE=0
+CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
tools/Makefile +0 -0
index 3c0521f655..e916d0cebb 100644
@@ -124,7 +124,7 @@ fit_info-objs   := $(dumpimage-mkimage-objs)

fit_info.o

Quoted 6 lines
Quoted 6 lines

tools/Makefile fit_info-objs := $(dumpimage-mkimage-objs) fit_info.o

Quoted 6 lines
tools/Makefile +1 -1
 fit_check_sign-objs   := $(dumpimage-mkimage-objs) fit_check_sign.o
 file2include-objs := file2include.o
 
-ifneq ($(CONFIG_MX23)$(CONFIG_MX28),)
+ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_FIT_SIGNATURE),)
 # Add CONFIG_MXS into host CFLAGS, so we can check whether or not

register

Quoted 5 lines
Quoted 5 lines

tools/Makefile fit_info-objs := $(dumpimage-mkimage-objs) fit_info.o · line 130

Quoted 2 lines
tools/Makefile +0 -0
 # the mxsimage support within tools/mxsimage.c .
 HOSTCFLAGS_mxsimage.o += -DCONFIG_MXS

Adding in Peter since Fedora had this same problem crop up. Does something like this work for you guys? Also adding in Vagrant

Cascadian

Quoted 8 lines
Quoted 1 line

since Debian might want to switch to this too. Thoughts? Thanks!

We currently use the tools-all option, details below, to build the tools, which broken in 2018.11 on non arm/x86 platforms due to the sandbox dep being added in there. I'm happy to adjust as necessary to fix that but I'm not sure the difference between tools-all vs the above.

Quoted 8 lines
Quoted 2 lines

make CROSS_COMPILE="" defconfig V=1 O=builds/
make CROSS_COMPILE="" tools-all V=1 O=builds/

Well, with the above you would do tools-only_defconfig then tools-all, and we would make sure to _not_ enable options in tools-only_defconfig that may not build on some host platforms as it's intended only for building tools rather than the myriad of things sandbox is used for.

That would be fine as far as I'm concerned.

Thanks
Peter

Quoted 1 line
#6 lore raw

RFC PATCH 1/1 tools: add a generic config for native tools building

Quoted 68 lines · Peter Robinson
Quoted 67 lines · On Sat, 1 Dec 2018, 13:54 Tom Rini <[email protected] wrote:
Quoted 21 lines · Peter Robinson
Quoted 20 lines · Tom Rini
Quoted 17 lines · Otavio Salvador

The motivation for this is to allow distributions to distribute all possible tools in a generic way, avoiding the need of specific tools building for each machine.

Especially on OpenEmbedded / Yocto Project ecosystem, it is very common each BSP to end providing their specific tools when they need to generate images for some SoC (e.g MX23 / MX28 in meta-freescale case).

Using this, we can package the tools doing:

$: make tools-only_defconfig
$: make tools-only

---

Quoted 6 lines
Quoted 6 lines

Review

Quoted 6 lines
 configs/tools-only_defconfig | 3 +++
 tools/Makefile               | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
 create mode 100644 configs/tools-only_defconfig
(quoted diff) +0 -0

b/configs/tools-only_defconfig

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

new file mode 100644
index 0000000000..be69bdf43a

configs/tools-only_defconfig new file +0 -0
@@ -0,0 +1,3 @@
Quoted 8 lines
Quoted 8 lines

tools/Makefile fit_info-objs := $(dumpimage-mkimage-objs)

Quoted 8 lines
configs/tools-only_defconfig new file +3 -0
+CONFIG_SYS_TEXT_BASE=0
+CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
tools/Makefile +0 -0
index 3c0521f655..e916d0cebb 100644
@@ -124,7 +124,7 @@ fit_info-objs   := $(dumpimage-mkimage-objs)

fit_info.o

Quoted 6 lines
Quoted 6 lines

tools/Makefile fit_info-objs := $(dumpimage-mkimage-objs) fit_info.o

Quoted 6 lines
tools/Makefile +1 -1
 fit_check_sign-objs   := $(dumpimage-mkimage-objs) fit_check_sign.o
 file2include-objs := file2include.o
 
-ifneq ($(CONFIG_MX23)$(CONFIG_MX28),)
+ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_FIT_SIGNATURE),)
 # Add CONFIG_MXS into host CFLAGS, so we can check whether or not

register

Quoted 5 lines
Quoted 5 lines

tools/Makefile fit_info-objs := $(dumpimage-mkimage-objs) fit_info.o · line 130

Quoted 2 lines
tools/Makefile +0 -0
 # the mxsimage support within tools/mxsimage.c .
 HOSTCFLAGS_mxsimage.o += -DCONFIG_MXS

Adding in Peter since Fedora had this same problem crop up. Does something like this work for you guys? Also adding in Vagrant

Cascadian

Quoted 10 lines
Quoted 1 line

since Debian might want to switch to this too. Thoughts? Thanks!

We currently use the tools-all option, details below, to build the tools, which broken in 2018.11 on non arm/x86 platforms due to the sandbox dep being added in there. I'm happy to adjust as necessary to fix that but I'm not sure the difference between tools-all vs the above.

make CROSS_COMPILE="" defconfig V=1 O=builds/
make CROSS_COMPILE="" tools-all V=1 O=builds/

Quoted 7 lines
Quoted 5 lines

Well, with the above you would do tools-only_defconfig then tools-all, and we would make sure to _not_ enable options in tools-only_defconfig that may not build on some host platforms as it's intended only for building tools rather than the myriad of things sandbox is used for.

That would be fine as far as I'm concerned.

If people are likely to use tools-all, we may use tools-all_defconfig so we connect both. What do you think guys?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750
#7 lore raw

RFC PATCH 1/1 tools: add a generic config for native tools building

Quoted 76 lines · Otavio Salvador
Quoted 74 lines · Peter Robinson
Quoted 72 lines · On Sat, 1 Dec 2018, 13:54 Tom Rini <[email protected] wrote:
Quoted 21 lines · Peter Robinson
Quoted 20 lines · Tom Rini
Quoted 17 lines · Otavio Salvador

The motivation for this is to allow distributions to distribute all possible tools in a generic way, avoiding the need of specific tools building for each machine.

Especially on OpenEmbedded / Yocto Project ecosystem, it is very common each BSP to end providing their specific tools when they need to generate images for some SoC (e.g MX23 / MX28 in meta-freescale case).

Using this, we can package the tools doing:

$: make tools-only_defconfig
$: make tools-only

---

Quoted 6 lines
Quoted 6 lines

Review

Quoted 6 lines
 configs/tools-only_defconfig | 3 +++
 tools/Makefile               | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
 create mode 100644 configs/tools-only_defconfig
(quoted diff) +0 -0

b/configs/tools-only_defconfig

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

new file mode 100644
index 0000000000..be69bdf43a

configs/tools-only_defconfig new file +0 -0
@@ -0,0 +1,3 @@
Quoted 8 lines
Quoted 8 lines

tools/Makefile fit_info-objs := $(dumpimage-mkimage-objs)

Quoted 8 lines
configs/tools-only_defconfig new file +3 -0
+CONFIG_SYS_TEXT_BASE=0
+CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
tools/Makefile +0 -0
index 3c0521f655..e916d0cebb 100644
@@ -124,7 +124,7 @@ fit_info-objs   := $(dumpimage-mkimage-objs)

fit_info.o

Quoted 6 lines
Quoted 6 lines

tools/Makefile fit_info-objs := $(dumpimage-mkimage-objs) fit_info.o

Quoted 6 lines
tools/Makefile +1 -1
 fit_check_sign-objs   := $(dumpimage-mkimage-objs) fit_check_sign.o
 file2include-objs := file2include.o
 
-ifneq ($(CONFIG_MX23)$(CONFIG_MX28),)
+ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_FIT_SIGNATURE),)
 # Add CONFIG_MXS into host CFLAGS, so we can check whether or not

register

Quoted 5 lines
Quoted 5 lines

tools/Makefile fit_info-objs := $(dumpimage-mkimage-objs) fit_info.o · line 130

Quoted 2 lines
tools/Makefile +0 -0
 # the mxsimage support within tools/mxsimage.c .
 HOSTCFLAGS_mxsimage.o += -DCONFIG_MXS

Adding in Peter since Fedora had this same problem crop up. Does something like this work for you guys? Also adding in Vagrant

Cascadian

Quoted 10 lines
Quoted 1 line

since Debian might want to switch to this too. Thoughts? Thanks!

We currently use the tools-all option, details below, to build the tools, which broken in 2018.11 on non arm/x86 platforms due to the sandbox dep being added in there. I'm happy to adjust as necessary to fix that but I'm not sure the difference between tools-all vs the above.

make CROSS_COMPILE="" defconfig V=1 O=builds/
make CROSS_COMPILE="" tools-all V=1 O=builds/

Well, with the above you would do tools-only_defconfig then tools-all, and we would make sure to _not_ enable options in tools-only_defconfig that may not build on some host platforms as it's intended only for building tools rather than the myriad of things sandbox is used for.

Quoted 4 lines
Quoted 1 line

That would be fine as far as I'm concerned.

If people are likely to use tools-all, we may use tools-all_defconfig so we connect both. What do you think guys?

That seems fine to me, let me know when there's something you'd like me to test.

Peter