Commit Graph

9 Commits

Author SHA1 Message Date
Ji Luo 71562aae3b MA-13938 [Android] imx8q: Support dual bootloader feature
Support dual bootloader feature for imx8q which uses the
container format. Move the A/B slot select and verify to
SPL stage, the bootloader rollback index will be stored
at the last 8K bytes of eMMC rpmb storage.

Test: Boot and rbindex verify pass on imx8q.

Change-Id: I0a48210f65984a083037a0cd3f9558951029ed7d
Signed-off-by: Ji Luo <ji.luo@nxp.com>
2019-01-18 12:07:21 +08:00
Ye Li 4b2850ccfd MLK-20664-1 imx8qxp: spl: Enable SPL container support for NAND
Add the NAND support to SPL container parser and enable it for imx8qxp arm2
nand reworked board.
The SPL NAND will read from nandfit mtdpart (128MB offset) to parsing the entire
boot image and get the 3rd container from it. This requires burning tool (uuu)
to program the entire boot image into nandfit.

Signed-off-by: Ye Li <ye.li@nxp.com>
2019-01-16 02:17:43 -08:00
Ye Li cddb0fde37 MLK-20559-6 f_sdp: Support searching and loading FIT or container image
Add support to f_sdp to search and load iMX8 container image or iMX8M
FIT image by new UUU command SDPV.

When using the SDPV, the uuu will continue to send out data after first
level boot loader used by ROM. This means uuu won't skip to the offset
of the second boot loader, and the padding data before second boot loader
will be sent out. So we have to search the FIT header or container header
in the buffer that SDP received.

The new BCD value is used by uuu to distinguish if the SPL supports the
SDPV.

Signed-off-by: Ye Li <ye.li@nxp.com>
2019-01-08 21:46:31 -08:00
Ye Li cedcc6634b MLK-20663 imx8: Fix malloc issue in container parser
The size used for malloc is wrong, the following read function will
read 1KB to the container header buffer not the size of the header.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
2018-12-28 18:04:42 -08:00
faqiang.zhu c258131f49 MA-13588 Fix build warning caused by previous android SPL+CONTAINER patch
compile waring info is as below:
	arch/arm/mach-imx/imx8/parser.c: In function ‘mmc_load_image_parse_container’:
	arch/arm/mach-imx/imx8/parser.c:244:1: warning: control reaches end of non-void function [-Wreturn-type]
	}
	^

previouse patch change ID:
I40a791d5b5b1eba6a0170d6853626fb546be4b2c

Change-Id: Ia605df11beab42e720fff6442a11b1e4b25ac209
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
2018-11-28 12:00:41 +08:00
faqiang.zhu 12d066f4ef MA-13488 check rpmb keyblob after SPL load container
To enable SPL+CONTAINER format on android auto with tee, after SPL load
container, SPL need to check rpmb keyblob and copy it to secure memory
for latter use.

Change-Id: I40a791d5b5b1eba6a0170d6853626fb546be4b2c
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
2018-11-21 18:48:41 +08:00
Abel Vesa 2bd8277fd7 MLK-20233 spl_spi: Add QSPI boot device support to the container parser
Before parsing the image header, try to check if there is a container and
validate it first. If no (valid) container then as a fall-through parse
the image as before.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
2018-11-09 11:45:15 +02:00
Abel Vesa 32adc4aed8 MLK-20233 imx8: Fix QSPI read in container parser
The check for CONFIG_SPL_SPI_LOAD is fixed, get rid of ret local variable
(that's actually a bug) and fix the length for the spi_flash_read call.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
2018-11-09 11:44:45 +02:00
Abel Vesa c853049068 MLK-20233 arch: imx8: Add container parser for loading ATF and uboot proper
This intends to replace the FIT image support since that cannot be
authenticated. Instead, we append another container at the end of
flash.bin, this new one containing a new container with two
images representing the ATF and uboot proper.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
2018-11-07 15:56:52 +02:00