summaryrefslogtreecommitdiffstats
path: root/images/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/stm32'Sascha Hauer2019-04-091-0/+1
|\
| * ARM: Add initial STM32MP1 supportSascha Hauer2019-03-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | This adds initial STMicroelectronics MP1 support along with support for the DK2 devel board. Only very basic support: - UART - SDRAM memory base/size - No 1st stage support Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: Add basic Layerscape supportSascha Hauer2019-03-131-1/+2
| | | | | | | | | | | | | | | | | | | | This adds basic Layerscape support: - Makefile/Kconfig - Register maps - errata workarounds Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | pbl multiimage: Allow to check image sizesSascha Hauer2019-03-131-0/+32
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PBL images are often constrained in size by limitations exposed by the SoCs SRAM size or partition sizes on the boot device. So far we tried to configure these limits in Kconfig, but with PBL multi images and thus different limitations for the different supported images this no longer works. This patch has another approach for it: During build time make variables containing the relevant sizes for each image are created. These are: PBL_CODE_SIZE_$(symbol) PBL_MEMORY_SIZE_$(symbol) PBL_IMAGE_SIZE_$(symbol) PBL_CODE_SIZE_$(symbol) contains the pure code size of the PBL, it should be smaller than the available SRAM during boot. Normally the PBL's bss segment also needs to be in the initial SRAM, for this case PBL_MEMORY_SIZE_$(symbol) is the relevant variable. PBL_IMAGE_SIZE_$(symbol) contains the full size of the PBL image including the compressed payload (but without any image headers created later by SoC specific image tools). $(symbol) is a placeholder for the start symbol used for this PBL image, thus for the i.MX53 QSB with entry start_imx53_loco PBL_CODE_SIZE_start_imx53_loco will be created. The images/Makefile.* can use these variables directly to check sizes or specify the same variables with a "MAX_" prefix. So when images/Makefile.imx specifies MAX_PBL_CODE_SIZE_start_imx53_loco = 0x10000 then the build system will make sure that the PBL code for the QSB will not get bigger than 64KiB. Also included in this patch are the size restrictions for the i.MX8MQ images as an example how to use this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* images: pbl: verify CONFIG_BAREBOX_MAX_IMAGE_SIZE is not exceededAhmad Fatoum2019-03-071-0/+1
| | | | | | | | | | | | | | | For platforms such as the at91, the boot ROM imposes an upper limit on barebox file size. Prior to 5a1a5ed253 ("ARM: images: use piggydata"), BAREBOX_MAX_PBLX_SIZE seems to have been the way to go for limiting the size of the final barebox binary when using the PBL. With pblx removed, this variable is of no use, so have the existing BAREBOX_MAX_IMAGE_SIZE replace its functionality. Currently BAREBOX_MAX_IMAGE_SIZE is only checked against in the non-PBL case, so add a check in the PBL case as well. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Revert "images: Drop unnecessary fix_size"Sascha Hauer2019-02-131-1/+2
| | | | | | | | | | | | | This reverts commit 5c0e16591d9471a345b77a41fde76de34f301f6b. The fix_size scripts is not necessary for newer ARM toolchains, it is however necessary for the older ARM toolchains (gcc-5 and older). The original reason to drop fix_size was that it doesn't work on MIPS. With this patch we add the -i flag so that we ignore unknown images and can succesfully build MIPS images. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* images: check for use of obsolete pblx-*Ahmad Fatoum2019-01-181-0/+4
| | | | | | | | | | | | | | pblx-* has been removed in 5a1a5ed253 ("ARM: images: use piggydata") and using it (e.g. because a patchset was rebased) results in a non-obvious: make[1]: *** No rule to make target 'images/*.pblx.*', \ needed by 'images/barebox-*.img'. Stop. Avoid this by explicitly failing with an error message whenever pblx-y or pblx- has been defined. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* images: Drop unnecessary fix_sizeSascha Hauer2019-01-161-2/+1
| | | | | | | | Now that we compile the compressed binary into the decompressor we no longer need fix_size but can use the linker to fill in the image size into the binary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ultrascale'Sascha Hauer2019-01-151-0/+1
|\
| * ARM: zynqmp: add support for Xilinx ZCU104 boardMichael Tretter2018-12-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the Xilinx Zynq Ultrascale+ MPSoC architecture (ZynqMP) and the Xilinx ZCU104 board. Barebox is booted as BL33 in EL-1 and expects that a BL2 (i.e. the FSBL) already took care of initializing the RAM. Also for debug_ll, the UART is expected to be already setup correctly. Thus, you have to add the Barebox binary to a boot image as described in "Chapter 11: Boot and Configuration" of "Zynq Ultrascale+ Device Technical Reference Manual". Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mips'Sascha Hauer2019-01-151-1/+7
|\ \
| * | MIPS: port all mach* to multiimageOleksij Rempel2018-12-171-1/+7
| |/ | | | | | | | | Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/kconfig'Sascha Hauer2019-01-151-2/+0
|\ \
| * | kbuild: add .SECONDARY special targetMasahiro Yamada2019-01-031-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the following Linux commits: - 54a702f70589 ("kbuild: mark $(targets) as .SECONDARY and remove .PRECIOUS markers") - 8e9b61b293d9 ("kbuild: move .SECONDARY special target to Kbuild.include") This consolidates those two commits and adjusts commit log for barebox. GNU Make automatically deletes intermediate files that are updated in a chain of pattern rules. Example 1) %.dtb.o <- %.dtb.S <- %.dtb <- %.dts Example 2) %.o <- %.c <- %.c_shipped arch/arm/crypto/Makefile marks such targets as .PRECIOUS to prevent Make from deleting them, but the correct way is to use .SECONDARY. .SECONDARY Prerequisites of this special target are treated as intermediate files but are never automatically deleted. .PRECIOUS When make is interrupted during execution, it may delete the target file it is updating if the file was modified since make started. If you mark the file as precious, make will never delete the file if interrupted. Both can avoid deletion of intermediate files, but the difference is the behavior when Make is interrupted; .SECONDARY deletes the target, but .PRECIOUS does not. The use of .PRECIOUS is relatively rare since we do not want to keep partially constructed (possibly corrupted) targets. .SECONDARY with no prerequisites causes all targets to be treated as secondary. This agrees the policy of Kbuild. scripts/Kbuild.include seems a suitable place to add it because it is included from almost all sub-makes. I deleted 'SECONDARY' (no dot) from images/Makefile, which I guess a typo. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/am35xx'Sascha Hauer2019-01-151-0/+1
|\ \ \ | |/ / |/| |
| * | ARM: omap: Add board support for WAGO pfc200 platformSascha Hauer2019-01-071-0/+1
| |/ | | | | | | | | | | This adds support for the AM3517 based WAGO pfc200 SPS. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | images: fix force rebuild of piggy.oSam Ravnborg2019-01-031-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | piggy.o would be build for every time barebox was built This had the sideeffect that the image(s) would always be rebuilt despite no changes Fix this by adding piggy.o to targets and avoid an extra command in the rule to create .pblb files The patch includes the removal of a stray assignment Fixes: 5a1a5ed253 ("ARM: images: use piggydata") Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Images: Add image size to built imagesSascha Hauer2018-12-181-0/+1
|/ | | | | | | | | | | This brings back the image size written into the built images which got lost in the conversion to using piggydata in the PBL images. Fixes: 5a1a5ed253 ("ARM: images: use piggydata") Reported-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Teresa Remmet <t.remmet@phytec.de>
* ARM: images: use piggydataSascha Hauer2018-12-031-27/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | The way we assemble the multi images on ARM is rather complicated and error prone. We currently cat the compressed barebox image behind the PBL executable and need some magic to obtain the size of the payload and also have to do tricks to reliably get a pointer to the compressed image. This patch switches over to compile the compressed payload into the PBL image itself which has proven to work for the single PBL case and for the ARM Linux Kernel aswell. The goal is to unify the single PBL and the multi PBL cases together in the future to get an easier startup path for ARM. This patch has been tested on the i.MX53 QSB, i.MX53 Vincell, Beaglebone black (both MLO and 2nd stage) and a Phytec phyFLEX i.MX6 board. SoCFPGA Arria10 has also be changed slightly with this patch. We used to generate a single image (barebox-socfpga-achilles.img) which was used as xload image and full image. We now instead generate two images: barebox-socfpga-achilles-xload.img and barebox-socfpga-achilles.img, the former loaded by the ROM and the latter loaded by the xload image. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: vexpress: switch to DT probe and multi-image buildLucas Stach2017-10-171-0/+1
| | | | | | | | | | This switches the VExpress support to use an internal DT, instead of probing the peripherals from a board file. It also switches to a multi-iamge build with both CA9 and CA15 variants of the VExpress board being supported. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Makefile: Speed up evaluation of ld optionsSascha Hauer2017-05-241-4/+1
| | | | | | | | | Since "333ff7b1e4 Fix linking with new ld, based on u-boot" the build with multiple images became unreasonable slow. This is because the ld-option macro was evaluated once for each image. Fix this by exporting and using LDFLAGS_barebox from the main Makefile. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* images: clean *.imx-sram-img filesStefan Lengfeld2017-05-171-1/+1
| | | | | | | | | | | The command make ARCH=arm clean should also clean the *.imx-sram-img files. Signed-off-by: Stefan Lengfeld <contact@stefanchrist.eu> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Fix linking with new ld, based on u-bootAndrey Panov2017-05-171-0/+3
| | | | | | | | U-boot commit info: http://git.denx.de/?p=u-boot.git;a=commit;h=e391b1e64b0bd65709a28a4764afe4f32d408243 Signed-off-by: Andrey Panov <rockford@yandex.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* at91sam9x5ek: Convert to mult-image buildAndrey Smirnov2017-03-301-0/+1
| | | | | | | | Convert AT91SAM9X5-EK board code to multi-image build process, similar to how majority of i.MX board code is built. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: rpi: switch to DT probe and multi-image buildLucas Stach2017-03-021-0/+1
| | | | | | | | This commit switches the RaspberryPi arch over to probe Barebox from the builtin DT and enables multi-image builds. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add comp_copy function for use with CONFIG_IMAGE_COMPRESSION_NONESascha Hauer2016-09-151-1/+1
| | | | | | | | | | The Makefile compression commands all append the size of the uncompressed image. With CONFIG_IMAGE_COMPRESSION_NONE simply 'shipped' is used which does not append the size. Add and use a special comp_copy function which adds the size. This helps us to get the uncompressed image size in the startup code later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* images: imx: Add targets for signed images and signed usb imagesSascha Hauer2016-02-041-1/+2
| | | | | | | Add .simximg target for signed images and .usimximg for signed images suitable for USB upload Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: imx: Generate signed images with imx-imageSascha Hauer2016-02-041-1/+0
| | | | | | | | | | | The imx-image tool can now generate signed images itself, so we can switch to this mechanism: - Move the CSF templates to header files which can be included by the flash config files - remove images/Makefile.imxhabv4 which is no longer necessary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Make list of flash images and fix link all single image casesTrent Piepho2015-10-271-1/+17
| | | | | | | | | | | | | | | Create a new file named 'barebox-flash-images' in the top level output directory that lists each image generated, one per line. Paths will be relative to the top level output directory. This works if multiple images are generated as well as for a single image. Also update the existing barebox-flash-image symlink to point to the image in all cases where there is a single image generated. If multiple images are generated, it will point to the non-existent file 'multi-image-build'. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/omap'Sascha Hauer2015-07-031-0/+1
|\ | | | | | | | | Conflicts: arch/arm/boards/beagle/board.c
| * ARM: beagleboard: Move to multiimage supportSascha Hauer2015-07-021-0/+1
| | | | | | | | | | | | | | | | | | | | Breathe some life back into the beagleboard: - switch to multiimage support - update config - initialize early UART for debugging Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | images: Add file size check for PBLX filesWadim Egorov2015-06-261-0/+2
|/ | | | | Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* images: add HABv4 support for i.MX6Marc Kleine-Budde2015-04-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds high assurance boot support (HABv4) image generation to barebox, currently tested on i.MX6 only. In order to build a signed barebox image, add a new image target to images/Makefile.imx as illustrated in the diff below: - - - a/images/Makefile.imx + + + b/images/Makefile.imx @@ -163,10 +163,14 @@ image-$(CONFIG_MACH_SABRELITE) += barebox-freescale-imx6dl-sabrelite.img pblx-$(CONFIG_MACH_SABRESD) += start_imx6q_sabresd CFG_start_imx6q_sabresd.pblx.imximg = $(board)/freescale-mx6-sabresd/flash-header-mx6-sabresd.imxcfg FILE_barebox-freescale-imx6q-sabresd.img = start_imx6q_sabresd.pblx.imximg image-$(CONFIG_MACH_SABRESD) += barebox-freescale-imx6q-sabresd.img +CSF_start_imx6q_sabresd.pblx.imximg = $(havb4_imx6csf) +FILE_barebox-freescale-imx6q-sabresd-signed.img = start_imx6q_sabresd.pblx.imximg.signed +image-$(CONFIG_MACH_SABRESD) += barebox-freescale-imx6q-sabresd-signed.img + Here the default i.MX6 CSF file $(havb4_imx6csf) is used, it's generated during build on from the template "scripts/habv4/habv4-imx6.csf.in". You can configure the paths to the SRK table and certificates via: System Type -> i.MX specific settings -> HABv4 support. The proprietary tool "cst" by Freescale tool is expected in the PATH. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* images: fix Tegra out-of-tree buildLucas Stach2015-03-091-0/+1
| | | | | | | | | The BCTs are build objects and as such are located in the objtree instead of the srctree. Fix out-of-tree build by defining a variable which refers to the board directories in the objtree and use it for Tegra. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* images: move board variable to parent makefileLucas Stach2015-03-091-0/+2
| | | | | | | | | | | | | A lot of the image makefiles define an equal board variable, which gives the impression that this variable is unique for this makefile. As those files aren't freestanding makefiles but get included into a parent makefile this is not actually true. Attempts to override this variable will not work reliable as make is picking up a random instance. Fix this confusion by moving this variable out of the individual makefiles. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: do not specify -static and -pie at the same timeLucas Stach2015-03-021-1/+1
| | | | | | | | | | | | PIE is a form of dynamic linking and thus inherently incompatible with -static. It worked ok as the current behavior of ld.bfd is to not respect -static if -pie has been specified. ld.gold and future versions of ld.bfd will fail to link if both of those incompatible switches are specified at the same time. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: MXS: Add multiimage supportSascha Hauer2015-01-051-1/+2
| | | | | | | | | | | | | | | | | | | | The Freescale MXS SoCs have a multi staged boot process which needs different images composed out of different binaries. The ROM executes a so called bootstream which contains multiple executables. The first one is executed in SRAM and the purpose of this binary is to setup the internal PMIC and the SDRAM. The second image is usually the bootloader itself. In case of barebox the bootstream is composed out of the self extracting barebox image (pblx) and the prepare stage for setting up the SDRAM. The bootstream image itself is useful for USB boot, but for booting from SD cards or NAND a BCB header has to be prepended to the image. In case of SD boot the image has the .mxssd file extension in barebox. Since the bootstream images are encrypted they are not suitable for 2nd stage execution. For this purpose the 2nd stage images are generated. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add xz decompression supportSascha Hauer2014-11-041-0/+1
| | | | | | | | This adds xz decompression support from the kernel. Both compressing the barebox binary with xz and decompressing xz files on the commandline is supported. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* images: ignore and clean *.mlo/*.mlospiSascha Hauer2014-07-111-1/+1
| | | | | | Add *./mlo and *.mlospi to the clean rule and to .gitignore. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* images: add Tegra124 image build rulesLucas Stach2014-06-051-1/+1
| | | | | | | | Allows to build persistent images for the Tegra124 line of SoCs. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* images: add Tegra30 image build rulesLucas Stach2014-05-151-1/+2
| | | | | | | | Allows to build persistent images for the Tegra30 line of SoCs. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* images: add Tegra20 image build rulesLucas Stach2014-05-151-1/+1
| | | | | | | | Allows to build persistent images for the Tegra20 line of SoCs. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Rockchip: switch to multiimage supportSascha Hauer2014-04-291-0/+1
| | | | | | | | | | | | - Add images/Makefile.rockchip - Allow multiple boards to be selected - protect initcalls with appropriate of_machine_is_compatible - rename board specific config to SoC config - Add dtb file to compilation - turn barebox_arm_reset_vectorto ENTRY_FUNCTION - pass dtb to barebox_arm_entry Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2014-02-031-5/+0
|\
| * images: remove unused commandSascha Hauer2014-01-291-5/+0
| | | | | | | | | | | | cmd_selfextract is unused. Remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | images: fix image size in pblxSascha Hauer2014-01-311-1/+2
|/ | | | | | | | | | | The pblx is a self extracting barebox binary. This doesn't have the size of the image correctly set because the linker doesn't generate it for relocatable binaries. This currently only works on ARM, but this is the only architecture supporting multi images anyway. TO make it work on other architectures fix_size would have to be extended to recognize other images. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: am33xx Phytec phyCORE: Switch to multiimage supportSascha Hauer2013-12-101-1/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Make multi images startup process simplerSascha Hauer2013-12-101-9/+3
| | | | | | | | | | | The multi image startup process used to have three binaries involved: - The lowlevel board code to initialize SDRAM - the uncompressor - the regular (compressed) barebox binary Drop the uncompressor and put the uncompress code into the lowlevel board code binary. This makes the startup process easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/tegra'Sascha Hauer2013-10-071-0/+1
|\ | | | | | | | | | | Conflicts: arch/arm/dts/Makefile images/Makefile
| * tegra: switch to multi imageLucas Stach2013-10-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | To keep things clean I removed all support for the old way to build images. There is now a single tegra_v7 defconfig which builds both supported Tegra boards as images. The new image generation also paves the way for integration of the tegra-cbootimage tool to produce directly flashable images. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>