diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-04-08 10:17:15 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-04-08 10:17:15 +0200 |
commit | c239b65fc2bc779343d7b8f0afd1c4cac1dd0beb (patch) | |
tree | 0f4cd6fb5cf7fae9f67d5eb7a95f24ecead54e35 /images | |
parent | 62e4a326f060853bb2ef0bb03c11f1b5bab2cdb9 (diff) | |
parent | 26b2a029e97369efbe1520fc3a7f2412ccb1baeb (diff) | |
download | barebox-c239b65fc2bc779343d7b8f0afd1c4cac1dd0beb.tar.gz barebox-c239b65fc2bc779343d7b8f0afd1c4cac1dd0beb.tar.xz |
Merge branch 'for-next/layerscape'
Diffstat (limited to 'images')
-rw-r--r-- | images/Makefile | 35 | ||||
-rw-r--r-- | images/Makefile.imx | 3 | ||||
-rw-r--r-- | images/Makefile.layerscape | 59 |
3 files changed, 96 insertions, 1 deletions
diff --git a/images/Makefile b/images/Makefile index 59b81f9b6d..542cfdb22c 100644 --- a/images/Makefile +++ b/images/Makefile @@ -68,6 +68,38 @@ $(obj)/%.pblb: $(obj)/%.pbl FORCE $(call if_changed,objcopy_bin,$(*F)) $(call cmd,check_file_size,$@,$(CONFIG_BAREBOX_MAX_IMAGE_SIZE)) +# +# For each start symbol create three variables containing the +# relevant sizes in the image: +# PBL_CODE_SIZE_$(symbol) - contains the pure code size of the image +# PBL_MEMORY_SIZE_$(symbol) - contains the code size + bss size of the +# image +# PBL_IMAGE_SIZE_$(symbol) - contains the full image size including the +# compressed payload +# + $(eval PBL_CODE_SIZE_$* = \ + $(shell $(srctree)/scripts/extract_symbol_offset pbl_code_size $^)) + $(eval PBL_MEMORY_SIZE_$*= \ + $(shell $(srctree)/scripts/extract_symbol_offset pbl_memory_size $^)) + $(eval PBL_IMAGE_SIZE_$*= \ + $(shell $(srctree)/scripts/extract_symbol_offset pbl_image_size $^)) + +# +# if MAX_PBL_xxx_SIZE_$(symbol) is defined it contains the maximum size the +# code/memory/image for this PBL may get. Check these values. +# + $(if $(MAX_PBL_CODE_SIZE_$*), \ + $(call cmd,check_size, $(PBL_CODE_SIZE_$*), $(MAX_PBL_CODE_SIZE_$*)) \ + ) + + $(if $(MAX_PBL_MEMORY_SIZE_$*), \ + $(call cmd,check_size, $(PBL_MEMORY_SIZE_$*), $(MAX_PBL_MEMORY_SIZE_$*)) \ + ) + + $(if $(MAX_PBL_IMAGE_SIZE_$*), \ + $(call cmd,check_size, $(PBL_IMAGE_SIZE_$*), $(MAX_PBL_IMAGE_SIZE_$*)) \ + ) + $(obj)/%.s: $(obj)/% FORCE $(call if_changed,disasm) @@ -113,6 +145,7 @@ include $(srctree)/images/Makefile.vexpress include $(srctree)/images/Makefile.xburst include $(srctree)/images/Makefile.at91 include $(srctree)/images/Makefile.zynqmp +include $(srctree)/images/Makefile.layerscape ifneq ($(pblx-y)$(pblx-),) $(error pblx- has been removed. Please use pblb- instead.) @@ -147,5 +180,5 @@ $(flash-list): $(image-y-path) clean-files := *.pbl *.pblb *.map start_*.imximg *.img barebox.z start_*.kwbimg \ start_*.kwbuartimg *.socfpgaimg *.mlo *.t20img *.t20img.cfg *.t30img \ *.t30img.cfg *.t124img *.t124img.cfg *.mlospi *.mlo *.mxsbs *.mxssd \ - start_*.simximg start_*.usimximg *.imx-sram-img + start_*.simximg start_*.usimximg *.imx-sram-img *.image clean-files += pbl.lds diff --git a/images/Makefile.imx b/images/Makefile.imx index c83f14aa51..e6f741cdb4 100644 --- a/images/Makefile.imx +++ b/images/Makefile.imx @@ -554,15 +554,18 @@ image-$(CONFIG_MACH_ZII_IMX7D_RPU2) += barebox-zii-imx7d-rpu2.img # ----------------------- i.MX8mq based boards -------------------------- pblb-$(CONFIG_MACH_NXP_IMX8MQ_EVK) += start_nxp_imx8mq_evk CFG_start_nxp_imx8mq_evk.pblb.imximg = $(board)/nxp-imx8mq-evk/flash-header-imx8mq-evk.imxcfg +MAX_PBL_MEMORY_SIZE_start_nxp_imx8mq_evk = 0x3f000 FILE_barebox-nxp-imx8mq-evk.img = start_nxp_imx8mq_evk.pblb.imximg image-$(CONFIG_MACH_NXP_IMX8MQ_EVK) += barebox-nxp-imx8mq-evk.img pblb-$(CONFIG_MACH_ZII_IMX8MQ_DEV) += start_zii_imx8mq_dev CFG_start_zii_imx8mq_dev.pblb.imximg = $(board)/zii-imx8mq-dev/flash-header-zii-imx8mq-dev.imxcfg +MAX_PBL_MEMORY_SIZE_start_zii_imx8mq_dev.pbl = 0x3f000 FILE_barebox-zii-imx8mq-dev.img = start_zii_imx8mq_dev.pblb.imximg image-$(CONFIG_MACH_ZII_IMX8MQ_DEV) += barebox-zii-imx8mq-dev.img pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX8MQ) += start_phytec_phycore_imx8mq CFG_start_phytec_phycore_imx8mq.pblb.imximg = $(board)/phytec-som-imx8mq/flash-header-phycore-imx8mq.imxcfg +MAX_PBL_MEMORY_SIZE_start_phytec_phycore_imx8mq.pbl = 0x3f000 FILE_barebox-phytec-phycore-imx8mq.img = start_phytec_phycore_imx8mq.pblb.imximg image-$(CONFIG_MACH_PHYTEC_SOM_IMX8MQ) += barebox-phytec-phycore-imx8mq.img diff --git a/images/Makefile.layerscape b/images/Makefile.layerscape new file mode 100644 index 0000000000..47df3777f0 --- /dev/null +++ b/images/Makefile.layerscape @@ -0,0 +1,59 @@ +# +# barebox image generation Makefile for NXP Layerscape images +# + +lspbl_cfg_cpp_flags = -Wp,-MD,$(depfile) -nostdinc -x assembler-with-cpp \ + -I $(srctree)/include -include include/generated/autoconf.h + +lspbl-rcw-tmp = $(subst $(comma),_,$(dot-target).lspbl_rcw.tmp) +lspbl-pbi-tmp = $(subst $(comma),_,$(dot-target).lspbl_pbi.tmp) + +quiet_cmd_lspbl_image = LSPBL-IMG $@ + cmd_lspbl_image = $(CPP) $(lspbl_cfg_cpp_flags) -o $(lspbl-rcw-tmp) $(word 2,$^) ; \ + $(CPP) $(lspbl_cfg_cpp_flags) -o $(lspbl-pbi-tmp) $(word 3,$^) ; \ + $(objtree)/scripts/pblimage -o $@ -r $(lspbl-rcw-tmp) \ + -m $($(patsubst $(obj)/%.pblb,PBL_CODE_SIZE_%,$<)) -p $(lspbl-pbi-tmp) -i $< + +pbl-$(CONFIG_MACH_LS1046ARDB) += start_ls1046ardb.pbl +$(obj)/barebox-ls1046ardb-2nd.image: $(obj)/start_ls1046ardb.pblb + $(call if_changed,shipped) + +$(obj)/barebox-ls1046ardb-sd.image: $(obj)/start_ls1046ardb.pblb \ + $(board)/ls1046ardb/ls1046ardb_rcw_sd.cfg \ + $(board)/ls1046ardb/ls1046ardb_pbi.cfg + $(call if_changed,lspbl_image) + +$(obj)/barebox-ls1046ardb-emmc.image: $(obj)/start_ls1046ardb.pblb \ + $(board)/ls1046ardb/ls1046ardb_rcw_emmc.cfg \ + $(board)/ls1046ardb/ls1046ardb_pbi.cfg + $(call if_changed,lspbl_image) + +$(obj)/barebox-ls1046ardb-qspi.image: $(obj)/start_ls1046ardb.pblb \ + $(board)/ls1046ardb/ls1046ardb_rcw_qspi.cfg \ + $(board)/ls1046ardb/ls1046ardb_pbi.cfg + $(call if_changed,lspbl_image) + +image-$(CONFIG_MACH_LS1046ARDB) += barebox-ls1046ardb-sd.image barebox-ls1046ardb-qspi.image \ + barebox-ls1046ardb-emmc.image barebox-ls1046ardb-2nd.image + +pbl-$(CONFIG_MACH_TQMLS1046A) += start_tqmls1046a.pbl +$(obj)/barebox-tqmls1046a-2nd.image: $(obj)/start_tqmls1046a.pblb + $(call if_changed,shipped) + +$(obj)/barebox-tqmls1046a-sd.image: $(obj)/start_tqmls1046a.pblb \ + $(board)/tqmls1046a/tqmls1046a_rcw_sd_3333_5559.cfg \ + $(board)/tqmls1046a/tqmls1046a_pbi_sd.cfg + $(call if_changed,lspbl_image) + +$(obj)/barebox-tqmls1046a-emmc.image: $(obj)/start_tqmls1046a.pblb \ + $(board)/tqmls1046a/tqmls1046a_rcw_emmc_3333_5559.cfg \ + $(board)/tqmls1046a/tqmls1046a_pbi_sd.cfg + $(call if_changed,lspbl_image) + +$(obj)/barebox-tqmls1046a-qspi.image: $(obj)/start_tqmls1046a.pblb \ + $(board)/tqmls1046a/tqmls1046a_rcw_qspi_3333_5559.cfg \ + $(board)/tqmls1046a/tqmls1046a_pbi_qspi.cfg + $(call if_changed,lspbl_image) + +image-$(CONFIG_MACH_TQMLS1046A) += barebox-tqmls1046a-sd.image barebox-tqmls1046a-emmc.image \ + barebox-tqmls1046a-qspi.image barebox-tqmls1046a-2nd.image |