9
0
Fork 0
Commit Graph

27 Commits

Author SHA1 Message Date
Marc Kleine-Budde d3be1ab1fc images: add HABv4 support for i.MX6
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>
2015-04-15 07:12:17 +02:00
Lucas Stach a5b9eb1ceb images: fix Tegra out-of-tree build
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>
2015-03-09 11:52:58 +01:00
Lucas Stach 2a2522eb8d images: move board variable to parent makefile
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>
2015-03-09 11:52:58 +01:00
Lucas Stach 5adb65518e ARM: do not specify -static and -pie at the same time
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>
2015-03-02 07:11:15 +01:00
Sascha Hauer ba4ace8110 ARM: MXS: Add multiimage support
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>
2015-01-05 11:31:07 +01:00
Sascha Hauer ccb2816477 Add xz decompression support
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>
2014-11-04 12:18:55 +01:00
Sascha Hauer 239b6559ed images: ignore and clean *.mlo/*.mlospi
Add *./mlo and *.mlospi to the clean rule and to .gitignore.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-11 08:27:01 +02:00
Lucas Stach 8f385481a7 images: add Tegra124 image build rules
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>
2014-06-05 08:01:15 +02:00
Lucas Stach c3bb8574c6 images: add Tegra30 image build rules
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>
2014-05-15 14:19:25 +02:00
Lucas Stach 8c08cd524d images: add Tegra20 image build rules
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>
2014-05-15 14:19:25 +02:00
Sascha Hauer 903b1d4309 ARM: Rockchip: switch to multiimage support
- 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>
2014-04-29 08:40:40 +02:00
Sascha Hauer 601bf0fcc6 Merge branch 'for-next/misc' 2014-02-03 09:55:54 +01:00
Sascha Hauer bf6846cacc images: fix image size in pblx
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>
2014-01-31 18:51:53 +01:00
Sascha Hauer f9b266ec40 images: remove unused command
cmd_selfextract is unused. Remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-29 10:32:39 +01:00
Sascha Hauer 9080ddd214 ARM: am33xx Phytec phyCORE: Switch to multiimage support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-10 14:35:34 +01:00
Sascha Hauer 509f622099 ARM: Make multi images startup process simpler
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>
2013-12-10 14:35:33 +01:00
Sascha Hauer 6e30646fa2 Merge branch 'for-next/tegra'
Conflicts:
	arch/arm/dts/Makefile
	images/Makefile
2013-10-07 08:02:36 +02:00
Sascha Hauer 904298deb0 Merge branch 'for-next/socfpga'
Conflicts:
	scripts/Makefile
2013-10-07 08:02:24 +02:00
Lucas Stach f93b5f8eb9 tegra: switch to multi image
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>
2013-10-02 10:24:05 +02:00
Lucas Stach 34129cbd76 images: correctly linebreak built images output
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-02 10:23:50 +02:00
Sascha Hauer 5b5f6ab6bf ARM: Add Altera SoCFPGA support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-23 08:40:32 +02:00
Sascha Hauer ec102f635b Merge branch 'for-next/mvebu' 2013-09-05 10:38:46 +02:00
Sascha Hauer dbd47524f4 ARM: mvebu: introduce multi image support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-16 08:45:37 +02:00
Sascha Hauer 1937523010 images: get rid of imximage-y
imximage-y is only needed to add its content to $targets so that
the build system does not rebuild the files because of the files
not being in $targets.
Automatically generate the files and add them to $targets and remove
imximage-y

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-12 17:47:06 +02:00
Jean-Christophe PLAGNIOL-VILLARD 618d669117 pbl: add lz4 support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-22 09:15:32 +02:00
Sascha Hauer bade1dbf46 ARM: i.MX: Add multi images support Makefile
This adds images/Makefile.imx which will contain the i.MX
specific image generation snippets.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-01 10:14:35 +02:00
Sascha Hauer 2078438662 Add multi images support
This adds the make infrastructure to build multiple SoC or
board specific images from a single barebox binary.

The basic idea is that we no longer have a single pbl, but instead
multiple pbls, one per image if necessary. Each pbl is defined
by its entry function so that each pbl can do exactly what a given
board needs. Additionally the pbls together with a self extracting
barebox binary can be encapsulated in specific image formats.

squashed in build fixes from Lucas Stach for make version >= 3.82:

Split Multimage Makefile rule in explicit and implicit parts

Fixes build with make version >=3.82

Frome the make 3.82 NEWS file:
* WARNING: Backward-incompatibility!
  In previous versions of make it was acceptable to list one or more explicit
  targets followed by one or more pattern targets in the same rule and it
  worked "as expected".  However, this was not documented as acceptable and if
  you listed any explicit targets AFTER the pattern targets, the entire rule
  would be mis-parsed.  This release removes this ability completely: make
  will generate an error message if you mix explicit and pattern targets in
  the same rule.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Lucas Stach <dev@lynxeye.de>
2013-07-01 10:13:12 +02:00