Skip to contentSkip to conversation

cmd: Move the "dm" command from test/dm/ to cmd/

PATCH New Tom Rini 1 participant 6 messages Dec 8, 2018 – Dec 17, 2018 Kbuild

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH v2 1/3 cmd: Move the "dm" command from test/dm/ to cmd/

The "dm" command under CONFIG_CMD_DM should live under cmd/ rather than test/dm/ so move it.

---
 cmd/Makefile     |  1 +
 cmd/dm.c         | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 test/dm/Makefile |  1 -
 test/dm/cmd_dm.c | 88 --------------------------------------------------------
 4 files changed, 89 insertions(+), 89 deletions(-)
 create mode 100644 cmd/dm.c
 delete mode 100644 test/dm/cmd_dm.c
cmd/Makefile +1 -0
index 49986437ba58..15ae4d250f50 100644
@@ -40,6 +40,7 @@ obj-$(CONFIG_CMD_CPU) += cpu.o
 obj-$(CONFIG_DATAFLASH_MMC_SELECT) += dataflash_mmc_mux.o
 obj-$(CONFIG_CMD_DATE) += date.o
 obj-$(CONFIG_CMD_DEMO) += demo.o
+obj-$(CONFIG_CMD_DM) += dm.o
 obj-$(CONFIG_CMD_SOUND) += sound.o
 ifdef CONFIG_POST
 obj-$(CONFIG_CMD_DIAG) += diag.o
cmd/dm.c new file +88 -0

88 lines not on this page · raw message

test/dm/Makefile +0 -1
index 2c9081e4dd66..42f1d81a33d2 100644
@@ -2,7 +2,6 @@
 #
 # Copyright (c) 2013 Google, Inc
 
-obj-$(CONFIG_CMD_DM) += cmd_dm.o
 obj-$(CONFIG_UT_DM) += bus.o
 obj-$(CONFIG_UT_DM) += test-driver.o
 obj-$(CONFIG_UT_DM) += test-fdt.o
test/dm/cmd_dm.c deleted +0 -88

88 lines not on this page · raw message

Signature · 1 line
2.7.4
author
#1 lore raw

PATCH v2 1/3 cmd: Move the "dm" command from test/dm/ to cmd/

Quoted 4 lines · Tom Rini

The "dm" command under CONFIG_CMD_DM should live under cmd/ rather than test/dm/ so move it.

Applied to u-boot/master, 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/20181217/cf9cc344/attachment.sig>
author
#2 lore raw

PATCH v2 2/3 test: Only descend into test/ when CONFIG_UNIT_TEST is enabled

In reply to Tom Rini

The contents of the test subdirectories only make sense when we have CONFIG_UNIT_TEST set. We will otherwise attempt to build code on for example sandbox that needs CONFIG_UNIT_TEST otherwise and rather than complicate the Makefiles simply leave them out when we can.

---
 Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Makefile +1 -2
index 0d11ff97971a..02326bea5f64 100644
@@ -725,8 +725,7 @@ libs-y += common/
 libs-y += env/
 libs-$(CONFIG_API) += api/
 libs-$(CONFIG_HAS_POST) += post/
-libs-y += test/
-libs-y += test/dm/
+libs-$(CONFIG_UNIT_TEST) += test/ test/dm/
 libs-$(CONFIG_UT_ENV) += test/env/
 libs-$(CONFIG_UT_OVERLAY) += test/overlay/
 
Signature · 1 line
2.7.4
author
#3 lore raw

PATCH v2 2/3 test: Only descend into test/ when CONFIG_UNIT_TEST is enabled

Quoted 6 lines · Tom Rini

The contents of the test subdirectories only make sense when we have CONFIG_UNIT_TEST set. We will otherwise attempt to build code on for example sandbox that needs CONFIG_UNIT_TEST otherwise and rather than complicate the Makefiles simply leave them out when we can.

Applied to u-boot/master, 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/20181217/39e6c09c/attachment.sig>
author
#4 lore raw

PATCH v2 3/3 tools: add a generic config for native tools building

In reply to Tom Rini

From: Otavio Salvador <[email protected]>

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

[trini: Add MAINTAINERS entry for myself, add to .travis.yml, make U-Boot itself buildable to not trip up other frameworks]

---
 .travis.yml                  |  4 ++++
 MAINTAINERS                  |  1 +
 configs/tools-only_defconfig | 24 ++++++++++++++++++++++++
 tools/Makefile               |  2 +-
 4 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100644 configs/tools-only_defconfig
.travis.yml +4 -0
index ed07d817fa47..f43a272b3231 100644
@@ -332,6 +332,10 @@ matrix:
     - name: "sloccount"
       script:
         - sloccount .
+    # Ensure host tools build
+    - name: "Build tools-only"
+      script:
+        - make tools-only_config tools-only -j$(nproc)
 
     # test/py
     - name: "test/py sandbox"
MAINTAINERS +1 -0
index 0cec39c542db..0fb089807c57 100644
@@ -719,5 +719,6 @@ L:	u-boot at lists.denx.de
 Q:	http://patchwork.ozlabs.org/project/uboot/list/
 S:	Maintained
 T:	git git://git.denx.de/u-boot.git
+F:	configs/tools-only_defconfig
 F:	*
 F:	*/
configs/tools-only_defconfig new file +24 -0
new file mode 100644
index 000000000000..fb0607678541
@@ -0,0 +1,24 @@
+CONFIG_SYS_TEXT_BASE=0
+CONFIG_ANDROID_BOOT_IMAGE=y
+CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
+# CONFIG_CMD_BOOTD is not set
+# CONFIG_CMD_BOOTM is not set
+# CONFIG_CMD_ELF is not set
+# CONFIG_CMD_DATE is not set
+CONFIG_OF_CONTROL=y
+CONFIG_OF_HOSTFILE=y
+CONFIG_DEFAULT_DEVICE_TREE="sandbox"
+# CONFIG_UDP_FUNCTION_FASTBOOT is not set
+CONFIG_SANDBOX_GPIO=y
+CONFIG_DM_I2C_COMPAT=y
+CONFIG_PCI=y
+CONFIG_DM_PCI=y
+CONFIG_PCI_SANDBOX=y
+CONFIG_DM_RTC=y
+CONFIG_SOUND=y
+CONFIG_SYSRESET=y
+# CONFIG_VIRTIO_MMIO is not set
+# CONFIG_VIRTIO_PCI is not set
+# CONFIG_VIRTIO_SANDBOX is not set
+# CONFIG_EFI_LOADER is not set
tools/Makefile +1 -1
index c93d17a42fdf..29ff6ed221b1 100644
@@ -125,7 +125,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.7.4
author
#5 lore raw

PATCH v2 3/3 tools: add a generic config for native tools building

Quoted 13 lines · Tom Rini

From: Otavio Salvador <[email protected]>

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:

Quoted 7 lines

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

[trini: Add MAINTAINERS entry for myself, add to .travis.yml, make U-Boot itself buildable to not trip up other frameworks]

Applied to u-boot/master, 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/20181217/1f60830d/attachment.sig>