summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2019-06-11 11:02:03 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-06-13 07:56:05 +0200
commita040f79300139caec375e8125810ddc92316972e (patch)
tree58df155ed28709ed88a0857c2c231acc63ccea13
parent98723024413d745d6c053cd6823ebe426d8b04dc (diff)
images/mvebu: Convert Armada machines to mvebuimg
The results are bytewise identical apart from armada-xp-db where the (AFAIK unused) parameters for the binary header are different (i.e. 0000005b 00000000 instead of 0000005b 00000068 for all other boards). The advantage is that the build system now knows about the binary headers and changes to them result in a rebuild of the images. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/boards/globalscale-mirabox/kwbimage.cfg5
-rw-r--r--arch/arm/boards/lenovo-ix4-300d/kwbimage.cfg5
-rw-r--r--arch/arm/boards/marvell-armada-xp-db/kwbimage.cfg3
-rw-r--r--arch/arm/boards/marvell-armada-xp-gp/kwbimage.cfg3
-rw-r--r--arch/arm/boards/netgear-rn104/kwbimage.cfg7
-rw-r--r--arch/arm/boards/netgear-rn2120/kwbimage.cfg7
-rw-r--r--arch/arm/boards/plathome-openblocks-ax3/kwbimage.cfg3
-rw-r--r--arch/arm/boards/turris-omnia/kwbimage.cfg7
-rw-r--r--images/Makefile.mvebu85
-rw-r--r--scripts/Makefile.lib3
10 files changed, 56 insertions, 72 deletions
diff --git a/arch/arm/boards/globalscale-mirabox/kwbimage.cfg b/arch/arm/boards/globalscale-mirabox/kwbimage.cfg
deleted file mode 100644
index fa8e5a6..0000000
--- a/arch/arm/boards/globalscale-mirabox/kwbimage.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-VERSION 1
-BOOT_FROM nand
-NAND_BLKSZ 00020000
-NAND_BADBLK_LOCATION 01
-BINARY ./binary.0 0000005b 00000068
diff --git a/arch/arm/boards/lenovo-ix4-300d/kwbimage.cfg b/arch/arm/boards/lenovo-ix4-300d/kwbimage.cfg
deleted file mode 100644
index a9b035e..0000000
--- a/arch/arm/boards/lenovo-ix4-300d/kwbimage.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-VERSION 1
-BOOT_FROM nand
-NAND_BLKSZ 00020000
-NAND_BADBLK_LOCATION 00
-BINARY ./binary.0 0000005b 00000068
diff --git a/arch/arm/boards/marvell-armada-xp-db/kwbimage.cfg b/arch/arm/boards/marvell-armada-xp-db/kwbimage.cfg
deleted file mode 100644
index 28e60e2..0000000
--- a/arch/arm/boards/marvell-armada-xp-db/kwbimage.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-VERSION 1
-BOOT_FROM uart
-BINARY ./binary.0 0000005b 00000000
diff --git a/arch/arm/boards/marvell-armada-xp-gp/kwbimage.cfg b/arch/arm/boards/marvell-armada-xp-gp/kwbimage.cfg
deleted file mode 100644
index eb8a2e7..0000000
--- a/arch/arm/boards/marvell-armada-xp-gp/kwbimage.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-VERSION 1
-BOOT_FROM spi
-BINARY ./binary.0 0000005b 00000068
diff --git a/arch/arm/boards/netgear-rn104/kwbimage.cfg b/arch/arm/boards/netgear-rn104/kwbimage.cfg
deleted file mode 100644
index 83a4149..0000000
--- a/arch/arm/boards/netgear-rn104/kwbimage.cfg
+++ /dev/null
@@ -1,7 +0,0 @@
-VERSION 1
-BOOT_FROM nand
-DESTADDR 00600000
-EXECADDR 006a0000
-NAND_BLKSZ 00020000
-NAND_BADBLK_LOCATION 01
-BINARY binary.0 0000005b 00000068
diff --git a/arch/arm/boards/netgear-rn2120/kwbimage.cfg b/arch/arm/boards/netgear-rn2120/kwbimage.cfg
deleted file mode 100644
index a6f0aa6..0000000
--- a/arch/arm/boards/netgear-rn2120/kwbimage.cfg
+++ /dev/null
@@ -1,7 +0,0 @@
-VERSION 1
-BOOT_FROM nand
-DESTADDR 00000000
-EXECADDR 00000000
-NAND_BLKSZ 00020000
-NAND_BADBLK_LOCATION 01
-BINARY binary.0 0000005b 00000068
diff --git a/arch/arm/boards/plathome-openblocks-ax3/kwbimage.cfg b/arch/arm/boards/plathome-openblocks-ax3/kwbimage.cfg
deleted file mode 100644
index eb8a2e7..0000000
--- a/arch/arm/boards/plathome-openblocks-ax3/kwbimage.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-VERSION 1
-BOOT_FROM spi
-BINARY ./binary.0 0000005b 00000068
diff --git a/arch/arm/boards/turris-omnia/kwbimage.cfg b/arch/arm/boards/turris-omnia/kwbimage.cfg
deleted file mode 100644
index 789ee5d..0000000
--- a/arch/arm/boards/turris-omnia/kwbimage.cfg
+++ /dev/null
@@ -1,7 +0,0 @@
-VERSION 1
-BOOT_FROM spi
-DESTADDR 00800000
-EXECADDR 00800000
-NAND_BLKSZ 00000000
-NAND_BADBLK_LOCATION 00
-BINARY binary.0 0000005b 00000068
diff --git a/images/Makefile.mvebu b/images/Makefile.mvebu
index 846dd46..fb4a980 100644
--- a/images/Makefile.mvebu
+++ b/images/Makefile.mvebu
@@ -7,72 +7,89 @@
$(obj)/%.kwbimg: $(obj)/% FORCE
$(call if_changed,kwb_image)
+$(obj)/%.mvebu0img: $(obj)/% scripts/mvebuimg FORCE
+ $(call if_changed,mvebu0_image)
+
+$(obj)/%.mvebu1img: $(obj)/% scripts/mvebuimg FORCE
+ $(call if_changed,mvebu1_image)
+
KWBOPTS = -c -d 0x1000000 -e 0x1000000
# ----------------------- Armada 370 based boards ---------------------------
-GLOBALSCALE_MIRABOX_KWBOPTS = ${KWBOPTS} -i $(board)/globalscale-mirabox/kwbimage.cfg
-OPTS_start_globalscale_mirabox.pblb.kwbimg = $(GLOBALSCALE_MIRABOX_KWBOPTS)
-FILE_barebox-globalscale-mirabox.img = start_globalscale_mirabox.pblb.kwbimg
-FILE_barebox-globalscale-mirabox-2nd.img = start_globalscale_mirabox.pblb
+BOOTSRC_start_globalscale_mirabox.pblb.mvebu1img = nand
+BINHDR_start_globalscale_mirabox.pblb.mvebu1img = $(board)/globalscale-mirabox/binary.0
+FLAGS_start_globalscale_mirabox.pblb.mvebu1img = -B 0x20000:1
+FILE_barebox-globalscale-mirabox.img = start_globalscale_mirabox.pblb.mvebu1img
pblb-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += start_globalscale_mirabox
image-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += barebox-globalscale-mirabox.img
+
+FILE_barebox-globalscale-mirabox-2nd.img = start_globalscale_mirabox.pblb
image-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += barebox-globalscale-mirabox-2nd.img
-NETGEAR_RN104_KWBOPTS = ${KWBOPTS} -i $(board)/netgear-rn104/kwbimage.cfg
-OPTS_start_netgear_rn104.pblb.kwbimg = $(NETGEAR_RN104_KWBOPTS)
-FILE_barebox-netgear-rn104.img = start_netgear_rn104.pblb.kwbimg
-FILE_barebox-netgear-rn104-2nd.img = start_netgear_rn104.pblb
+FLAGS_start_netgear_rn104.pblb.mvebu1img = -d 0x600000 -e 0x6e0000
+BOOTSRC_start_netgear_rn104.pblb.mvebu1img = nand
+BINHDR_start_netgear_rn104.pblb.mvebu1img = $(board)/netgear-rn104/binary.0
+FLAGS_start_netgear_rn104.pblb.mvebu1img = -B 0x20000:1
+FILE_barebox-netgear-rn104.img = start_netgear_rn104.pblb.mvebu1img
pblb-$(CONFIG_MACH_NETGEAR_RN104) += start_netgear_rn104
image-$(CONFIG_MACH_NETGEAR_RN104) += barebox-netgear-rn104.img
+
+FILE_barebox-netgear-rn104-2nd.img = start_netgear_rn104.pblb
image-$(CONFIG_MACH_NETGEAR_RN104) += barebox-netgear-rn104-2nd.img
# ----------------------- Armada XP based boards ---------------------------
-LENOVO_IX4_300D_KWBOPTS = ${KWBOPTS} -i $(board)/lenovo-ix4-300d/kwbimage.cfg
-OPTS_start_lenovo_ix4_300d.pblb.kwbimg = $(LENOVO_IX4_300D_KWBOPTS)
-FILE_barebox-lenovo-ix4-300d.img = start_lenovo_ix4_300d.pblb.kwbimg
-FILE_barebox-lenovo-ix4-300d-2nd.img = start_lenovo_ix4_300d.pblb
+BOOTSRC_start_lenovo_ix4_300d.pblb.mvebu1img = nand
+BINHDR_start_lenovo_ix4_300d.pblb.mvebu1img = $(board)/lenovo-ix4-300d/binary.0
+FLAGS_start_lenovo_ix4_300d.pblb.mvebu1img = -B 0x20000:0
+FILE_barebox-lenovo-ix4-300d.img = start_lenovo_ix4_300d.pblb.mvebu1img
pblb-$(CONFIG_MACH_LENOVO_IX4_300D) += start_lenovo_ix4_300d
image-$(CONFIG_MACH_LENOVO_IX4_300D) += barebox-lenovo-ix4-300d.img
+
+FILE_barebox-lenovo-ix4-300d-2nd.img = start_lenovo_ix4_300d.pblb
image-$(CONFIG_MACH_LENOVO_IX4_300D) += barebox-lenovo-ix4-300d-2nd.img
-MARVELL_ARMADA_XP_GP_KWBOPTS = ${KWBOPTS} -i $(board)/marvell-armada-xp-gp/kwbimage.cfg
-OPTS_start_marvell_armada_xp_gp.pblb.kwbimg = $(MARVELL_ARMADA_XP_GP_KWBOPTS)
-FILE_barebox-marvell-armada-xp-gp.img = start_marvell_armada_xp_gp.pblb.kwbimg
-FILE_barebox-marvell-armada-xp-gp-2nd.img = start_marvell_armada_xp_gp.pblb
+BOOTSRC_start_marvell_armada_xp_gp.pblb.mvebu1img = spi
+BINHDR_start_marvell_armada_xp_gp.pblb.mvebu1img = $(board)/marvell-armada-xp-gp/binary.0
+FILE_barebox-marvell-armada-xp-gp.img = start_marvell_armada_xp_gp.pblb.mvebu1img
pblb-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += start_marvell_armada_xp_gp
image-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += barebox-marvell-armada-xp-gp.img
+
+FILE_barebox-marvell-armada-xp-gp-2nd.img = start_marvell_armada_xp_gp.pblb
image-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += barebox-marvell-armada-xp-gp-2nd.img
-MARVELL_ARMADA_XP_DB_KWBOPTS = ${KWBOPTS} -i $(board)/marvell-armada-xp-db/kwbimage.cfg
-OPTS_start_marvell_armada_xp_db.pblb.kwbimg = $(MARVELL_ARMADA_XP_DB_KWBOPTS)
-FILE_barebox-marvell-armada-xp-db.img = start_marvell_armada_xp_db.pblb.kwbimg
-FILE_barebox-marvell-armada-xp-db-2nd.img = start_marvell_armada_xp_db.pblb
+BOOTSRC_start_marvell_armada_xp_db.pblb.mvebu1img = uart
+BINHDR_start_marvell_armada_xp_db.pblb.mvebu1img = $(board)/marvell-armada-xp-db/binary.0
+FILE_barebox-marvell-armada-xp-db.img = start_marvell_armada_xp_db.pblb.mvebu1img
pblb-$(CONFIG_MACH_MARVELL_ARMADA_XP_DB) += start_marvell_armada_xp_db
image-$(CONFIG_MACH_MARVELL_ARMADA_XP_DB) += barebox-marvell-armada-xp-db.img
+
+FILE_barebox-marvell-armada-xp-db-2nd.img = start_marvell_armada_xp_db.pblb
image-$(CONFIG_MACH_MARVELL_ARMADA_XP_DB) += barebox-marvell-armada-xp-db-2nd.img
-NETGEAR_RN2120_KWBOPTS = ${KWBOPTS} -i $(board)/netgear-rn2120/kwbimage.cfg
-OPTS_start_netgear_rn2120.pblb.kwbimg = $(NETGEAR_RN2120_KWBOPTS)
-FILE_barebox-netgear-rn2120.img = start_netgear_rn2120.pblb.kwbimg
-FILE_barebox-netgear-rn2120-2nd.img = start_netgear_rn2120.pblb
+BOOTSRC_start_netgear_rn2120.pblb.mvebu1img = nand
+BINHDR_start_netgear_rn2120.pblb.mvebu1img = $(board)/netgear-rn2120/binary.0
+FLAGS_start_netgear_rn2120.pblb.mvebu1img = -B 0x20000:1
+FILE_barebox-netgear-rn2120.img = start_netgear_rn2120.pblb.mvebu1img
pblb-$(CONFIG_MACH_NETGEAR_RN2120) += start_netgear_rn2120
image-$(CONFIG_MACH_NETGEAR_RN2120) += barebox-netgear-rn2120.img
+
+FILE_barebox-netgear-rn2120-2nd.img = start_netgear_rn2120.pblb
image-$(CONFIG_MACH_NETGEAR_RN2120) += barebox-netgear-rn2120-2nd.img
# ----------------------- Armada 38x based boards ---------------------------
-TURRIS_OMNIA_KWBOPTS = ${KWBOPTS} -i $(board)/turris-omnia/kwbimage.cfg
-OPTS_start_turris_omnia.pblb.kwbimg = $(TURRIS_OMNIA_KWBOPTS)
-FILE_barebox-turris-omnia.img = start_turris_omnia.pblb.kwbimg
-FILE_barebox-turris-omnia-2nd.img = start_turris_omnia.pblb
+BOOTSRC_start_turris_omnia.pblb.mvebu1img = spi
+BINHDR_start_turris_omnia.pblb.mvebu1img = $(board)/turris-omnia/binary.0
+FILE_barebox-turris-omnia.img = start_turris_omnia.pblb.mvebu1img
pblb-$(CONFIG_MACH_TURRIS_OMNIA) += start_turris_omnia
image-$(CONFIG_MACH_TURRIS_OMNIA) += barebox-turris-omnia.img
-PLATHOME_OPENBLOCKS_AX3_KWBOPTS = ${KWBOPTS} -i $(board)/plathome-openblocks-ax3/kwbimage.cfg
-OPTS_start_plathome_openblocks_ax3.pblb.kwbimg = $(PLATHOME_OPENBLOCKS_AX3_KWBOPTS)
-FILE_barebox-plathome-openblocks-ax3.img = start_plathome_openblocks_ax3.pblb.kwbimg
-FILE_barebox-plathome-openblocks-ax3-2nd.img = start_plathome_openblocks_ax3.pblb
+BOOTSRC_start_plathome_openblocks_ax3.pblb.mvebu1img = spi
+BINHDR_start_plathome_openblocks_ax3.pblb.mvebu1img = $(board)/plathome-openblocks-ax3/binary.0
+FILE_barebox-plathome-openblocks-ax3.img = start_plathome_openblocks_ax3.pblb.mvebu1img
pblb-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_AX3) += start_plathome_openblocks_ax3
image-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_AX3) += barebox-plathome-openblocks-ax3.img
+
+FILE_barebox-plathome-openblocks-ax3-2nd.img = start_plathome_openblocks_ax3.pblb
image-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_AX3) += barebox-plathome-openblocks-ax3-2nd.img
# ----------------------- Dove 88AP510 based boards ---------------------------
@@ -108,3 +125,7 @@ FILE_barebox-usi-topkick-2nd.img = start_usi_topkick.pblb
pblb-$(CONFIG_MACH_USI_TOPKICK) += start_usi_topkick
image-$(CONFIG_MACH_USI_TOPKICK) += barebox-usi-topkick.img
image-$(CONFIG_MACH_USI_TOPKICK) += barebox-usi-topkick-2nd.img
+
+# ensure that an image depends on its included binhdrs
+$(foreach f,$(pblb-y),$(eval $$(obj)/$f.pblb.mvebu0img: $$(BINHDR_$f.pblb.mvebu0img)))
+$(foreach f,$(pblb-y),$(eval $$(obj)/$f.pblb.mvebu1img: $$(BINHDR_$f.pblb.mvebu1img)))
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 87bff2d..75e1734 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -503,6 +503,9 @@ quiet_cmd_imx_image = IMX-IMG $@
quiet_cmd_kwb_image = KWB $@
cmd_kwb_image = scripts/kwbimage -p $< $(OPTS_$(@F)) -o $@
+quiet_cmd_mvebu1_image = MVIMG $@
+ cmd_mvebu1_image = scripts/mvebuimg -v 1 create -o $@ $(foreach b,$(BINHDR_$(@F)),-b $b) $(FLAGS_$(@F)) $(BOOTSRC_$(@F)) $<
+
quiet_cmd_cboot_bct = BCT $@
cmd_cboot_bct = $(objtree)/scripts/tegra/cbootimage -gbct -s $(soc) $< $@