
The zynqmp cmds.c is currently tied to the board but the commands contained within are more closely tied to the architecture. To allow usage of those commands when the architecture is ZynqMP but the board is not, this change moves the cmds into the cmd/ tree instead of the board tree that would only be included if the board were also a ZynqMP predefined board.
Signed-off-by: Charlie Johnston charlie.johnston@loftorbital.com --- board/xilinx/zynqmp/Makefile | 4 ---- cmd/Makefile | 3 +++ board/xilinx/zynqmp/cmds.c => cmd/zynqmp.c | 0 3 files changed, 3 insertions(+), 4 deletions(-) rename board/xilinx/zynqmp/cmds.c => cmd/zynqmp.c (100%)
diff --git a/board/xilinx/zynqmp/Makefile b/board/xilinx/zynqmp/Makefile index 204e4fadf0..9ab50eca40 100644 --- a/board/xilinx/zynqmp/Makefile +++ b/board/xilinx/zynqmp/Makefile @@ -40,10 +40,6 @@ $(obj)/pm_cfg_obj.o: $(shell cd $(srctree); readlink -f $(CONFIG_ZYNQMP_SPL_PM_C endif endif
-ifndef CONFIG_SPL_BUILD -obj-$(CONFIG_CMD_ZYNQMP) += cmds.o -endif - # Suppress "warning: function declaration isn't a prototype" CFLAGS_REMOVE_psu_init_gpl.o := -Wstrict-prototypes
diff --git a/cmd/Makefile b/cmd/Makefile index 87133cc27a..7afb1c9a7c 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -232,6 +232,9 @@ obj-$(CONFIG_CMD_SCP03) += scp03.o
obj-$(CONFIG_HUSH_SELECTABLE) += cli.o
+# ZynqMP +obj-$(CONFIG_CMD_ZYNQMP) += zynqmp.o + obj-$(CONFIG_ARM) += arm/ obj-$(CONFIG_RISCV) += riscv/ obj-$(CONFIG_SANDBOX) += sandbox/ diff --git a/board/xilinx/zynqmp/cmds.c b/cmd/zynqmp.c similarity index 100% rename from board/xilinx/zynqmp/cmds.c rename to cmd/zynqmp.c