09 Aug, 2019
1 commit
-
On imx8 platform, the usb2 and usb3 ports are both supported. Which
means we can use usb2(ci_udc_otg) and usb3(cdns3_generic_peripheral)
gadget driver to run sdp/fastboot/ums at the same time.For sdp and the fastboot that runs automatically when uboot starts,
board_usb_gadget_port_auto() is added to autodetect usb port, this
means that we don't have to specify which USB port should be used to
download in code, now we can just connect either usb port then it
will download automatically.Signed-off-by: Sherry Sun
01 Aug, 2019
1 commit
-
We may need to enable the dual bootloader feature on non-trusty
platforms, skip the bootloader rollback index check in spl if
trusty is not enabled.Don't generate rpmb key in spl, it should be generated in u-boot
proper with u-boot commands.Test: dual bootloader on imx8mm.
Change-Id: Iac454e0140cd6f4472a66d267d9ba0d40df7102c
Signed-off-by: Ji Luo
24 Jul, 2019
1 commit
-
Add support for AIY 2GB DDR size. Wrap support for
3GB DDR board with CONFIG_AIY_LPDDR4_3G because of
the limited ocram size.Test: build and boot on 2GB AIY board.
Change-Id: I04da60cc0d0b22c6c32ff705bcab4095068ba6ea
Signed-off-by: Ji Luo
15 Jul, 2019
1 commit
-
this commit is a merge of three patches from imx_v2018.03 as below:
1.
commit dbcf1e3cc079d2f1b3df6c4c9ec3a34d0c05eb4c
Author: Luo Ji
Date: Fri Jun 8 10:31:11 2018 +0800[iot] Support dual bootloader in SPL
Move the A/B slot check to SPL, the A/B slot switch
workflow is just like what we have in libavb_ab.Test: A/B select works fine on imx8m.
2.
commit 71562aae3b8123ccd7503e596e478951568fcd24
Author: Ji Luo
Date: Mon Jan 14 18:28:08 2019 +0800MA-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: Ic9410a48092cc05de599dd897fc912177e2a1fe1
Signed-off-by: faqiang.zhu
09 Jul, 2019
3 commits
-
When download image through ROM API for stream mode (USB, eMMC fastboot).
We uses tricky way to get the total image size:
The spl_load_simple_fit is called but the data reading is invalid, so the image
data is not really downloaded.
We should not call HAB authenticate in this tricky way. Otherwise it
will alway fail.
This patch add a new flag SPL_FIT_BYPASS_POST_LOAD to skip the authentication
only for this tricky using.Signed-off-by: Ye Li
Reviewed-by: Peng Fan
(cherry picked from commit 47b0cf6de06ff9b3e2b2755d5c8203210378b26a) -
ROM supports secondary boot which can boot from a new offset specified
by fuse. So adjust the offset calculation by counting the ROM's image_offset
parameter for SD/eMMC.
The secondary boot on flexspi is different like SD/eMMC. ROM will map the
space of secondary boot to the start of flexspi AHB memory. So it is same
as primary boot for SPL.Signed-off-by: Ye Li
Reviewed-by: Peng Fan
(cherry picked from commit c33881aa8a7e5a545b156ea2c452c5f7578f1ebd) -
i.MX8MNano ROM exports APIs to load images from boot device. We use this way
for SPL loading FIT image. Users need enable CONFIG_SPL_IMX_ROMAPI_SUPPORT
and set a buffer address via CONFIG_SPL_IMX_ROMAPI_LOADADDRSigned-off-by: Ye Li
Signed-off-by: Frank Li
(cherry picked from commit 4783e96fa88a7f279a3efee2cc7646bb53c7c1a7)
28 Jun, 2019
1 commit
-
When enable CONFG_SPL_DM_USB_GADGET, sdp should use
usb_gadget_initialize() and usb_gadget_release() to
support DM gadget driver.Signed-off-by: Sherry Sun
24 May, 2019
13 commits
-
The SPL loads the FIT image FDT part to an address related with the device
block length. This length is 512 for SD/MMC and is 1 for other devices
like SDP, NOR, NAND, SPI, etc.
When signing FIT image, we use fixed address caculated by SD/MMC block length
to sign FDT part. Thus, when booting through uuu, this causes mismatch and
gets authentication failed.Fix the issue by providing a override function for this FIT buffer address.
When secure boot is enabled, adjust the addresses of other devices to be same
with SD/MMC.Signed-off-by: Ye Li
Reviewed-by: Peng Fan
(cherry picked from commit 710efd3ccb99e144bd30af8e1ee46459b4a54dd6) -
Use trusty_os_init to load Trusty OS from CONFIG_TRUSTY_OS_ENTRY
before u-boot ready.Add Trusty OS SOC level codes and u-boot/SPL common codes.
Signed-off-by: Ye Li
Signed-off-by: Haoran.Wang
(cherry picked from commit 1ae9ecc73f5001b8bd743011c06a7d07861be64e) -
Since FSPI is assigned to M4 partition, A core only can read it from its
memory-map address. So we have to enable SPL NOR which won't access
flexspi driver.Update SPL container parser for the RAW NOR support.
Signed-off-by: Ye Li
(cherry picked from commit 7ea7a16fd892558098fb8cbea134ac275d1220d3) -
The RAW image support must be disabled, otherwise a RAW image can be used
to bypass FIT image.Signed-off-by: Ye Li
(cherry picked from commit ca7ebfcf0737699d5f62f97be4b0015c88108ae7) -
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
(cherry picked from commit 4b2850ccfd8b387590c9fb4abfffdd0ac5cc8e58) -
Because SDP directly jumps to next level boot image, we'd better
clean up the USB driver before it. Implement a weak callback function,
that spl sdp can use it to clean up USB driver.Signed-off-by: Ye Li
(cherry picked from commit 1f6b3efc62cb277fd4316d8ed5115f47b09369a0) -
Add a new configuration CONFIG_SPL_SDP_USB_DEV to specify the
usb index for spl sdp driver, so that we change use different device.
The default value is 0.Signed-off-by: Ye Li
(cherry picked from commit dba0d7c7dc3b9b60043726931b1f635b725e9756) -
Need initialize UDC before run sdp download
Signed-off-by: Frank Li
(cherry picked from commit ab6696c4f7ff3f13153e27b696fcbf38188b009a) -
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
Reviewed-by: Ye Li
(cherry picked from commit 2bd8277fd7eceed3aa4b07b6fe238b7beef62530) -
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
Reviewed-by: Ye Li
(cherry picked from commit c853049068ba2026cf91a6268958913db379a432) -
Add implementation necessary for supporting SPL loading image from NAND.
Signed-off-by: Teo Hall
(cherry picked from commit fe6af144930a0a32cbc4599635a96c8a629432a1) -
This transforms almost all related functions from mmc specific to device
independent. This allows the container size to be computed from QSPI and other
future devices that will be supported for boot.Signed-off-by: Abel Vesa
Reviewed-by: Ye Li
(cherry picked from commit c70afc348ee9fae242f00be56cde556822f93156) -
Add a weak function spl_mmc_get_uboot_raw_sector to get u-boot raw sector.
At default it returns CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR. Users
can overwrite it to return customized offset.Signed-off-by: Ye Li
(cherry picked from commit 9f2ffbe41493fb9233d79e2933e337d7a6c2e20a)
23 Mar, 2019
1 commit
-
If FIT_IMAGE_TINY is enabled, spl_fit_image_get_os returns -ENOTSUPP.
In this case, we should default to IH_OS_U_BOOT not to IH_OS_INVALID.Signed-off-by: Abel Vesa
Tested-by: Fabio Estevam
01 Mar, 2019
1 commit
-
To find out how big the early malloc heap must be in SPL, add a debug
print statement that dumps its usage before switching to relocated heap
in spl_relocate_stack_gd() via CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN.Signed-off-by: Simon Goldschmidt
19 Feb, 2019
1 commit
-
SPL currently does not check uImage CRCs when loading U-Boot.
This patch adds checking the uImage CRC when SPL loads U-Boot. It does
this by reusing the existing config option SPL_CRC32_SUPPORT to allow
leaving out the CRC check on boards where the additional code size or
boot time is a problem (adding the CRC check currently adds ~1.4 kByte
to flash).The SPL_CRC32_SUPPORT config option now gets enabled by default if SPL
support for legacy images is enabled to check the CRC on all boards
that don't actively take countermeasures.Signed-off-by: Simon Goldschmidt
Reviewed-by: Simon Glass
16 Feb, 2019
1 commit
-
Since there is the SPL_USB_HOST_SUPPORT for enabling USB support in SPL,
makes more sense to rename the SPL_USB_SUPPORT as SPL_USB_STORAGE.
Everything that is not part of the usb storage support in SPL is now
build under SPL_USB_HOST_SUPPORT.Signed-off-by: Abel Vesa
Reviewed-by: Tom Rini
Reviewed-by: Fabio Estevam
Reviewed-by: Lukasz Majewski
07 Feb, 2019
3 commits
-
SPL only needs to be able to read from SPI Flash to load next stage and
does not really need write/erase etc. Therefore in order to reduce SPI
Flash code size in SPL, enable SPI_FLASH_TINY, that only supports
reading from SPI flash, as default.Note: Since, SPI_FLASH_TINY does not support SPI_FLASH_BAR,
SPI_FLASH_TINY is not enabled for boards with SPI controllers that
cannot support 4 byte addressing.Signed-off-by: Vignesh R
Reviewed-by: Jagan Teki
Tested-by: Jagan Teki #zynq-microzed -
Add a tiny SPI flash stack that just supports reading data/images from
SPI flash. This is useful for boards that have SPL size constraints and
would need to use SPI flash framework just to read images/data from
flash. There is approximately 1.5 to 2KB savings with this.Based on prior work of reducing spi flash id table by
Simon GoldschmidtSigned-off-by: Vignesh R
Tested-by: Simon Goldschmidt
Tested-by: Stefan Roese
Tested-by: Horatiu Vultur
Reviewed-by: Jagan Teki
Tested-by: Jagan Teki #zynq-microzed -
Sync Serial Flash Discoverable Parameters (SFDP) parsing support from
Linux. This allows auto detection and configuration of Flash parameters.Signed-off-by: Vignesh R
Tested-by: Simon Goldschmidt
Tested-by: Stefan Roese
Tested-by: Horatiu Vultur
Reviewed-by: Jagan Teki
Tested-by: Jagan Teki #zynq-microzed
01 Feb, 2019
3 commits
-
Replace CONFIG_SPL_EXT_SUPPORT to CONFIG_SPLY_FS_EXT4 so both
obj-$(CONFIG_$(SPL_)FS_EXT4) and CONFIG_IS_ENABLED(FS_EXT4) can be
used to control the build in both SPL and U-Boot.Signed-off-by: Tien Fong Chee
Reviewed-by: Tom Rini -
Most of the time SPL only needs very simple FAT reading, so having
CONFIG_IS_ENABLED(FAT_WRITE) to exclude it from SPL build would help
to save 64KiB default max clustersize from memory.Signed-off-by: Tien Fong Chee
Reviewed-by: Simon Goldschmidt
Reviewed-by: Tom Rini -
Replace CONFIG_SPL_FAT_SUPPORT with CONFIG_SPL_FS_FAT so
obj-$(CONFIG_$(SPL_)FS_FAT) can be used to control the build in both
SPL and U-Boot.Signed-off-by: Tien Fong Chee
Reviewed-by: Simon Goldschmidt
Reviewed-by: Tom Rini
27 Jan, 2019
1 commit
-
Make use of "IMAGE_MAX_SIZE" and "IMAGE_TEXT_BASE" rather than
CONFIG_SPL_MAX_SIZE and CONFIG_SPL_TEXT_BASE. This lets us re-use the
same script for both SPL and TPL. Add logic to scripts/Makefile.spl to
pass in the right value when preprocessing the script.Cc: Stefano Babic
Cc: Fabio Estevam
Cc: Jagan Teki
Cc: Maxime Ripard
Cc: Andreas Bießmann
Cc: Philipp Tomsich
Cc: Michal Simek
Cc: Daniel Schwierzeck
Cc: York Sun
Cc: Bin Meng
Cc: Heiko Schocher
Cc: Adam Ford
Signed-off-by: Tom Rini
Reviewed-by: Daniel Schwierzeck
Tested-by: Daniel Schwierzeck
Tested-by: Adam Ford #da850evm & omap3_logic_somlv
Reviewed-by: Simon Goldschmidt
26 Jan, 2019
1 commit
-
The symbol CONFIG_SPL_DFU_SUPPORT in SPL build has the same
meaning as CONFIG_DFU in regular U-Boot. Drop the _SUPPORT
to allow for cleaner use in code.Signed-off-by: Andrew F. Davis
Reviewed-by: Tom Rini
Acked-by: Lukasz Majewski
18 Jan, 2019
1 commit
-
Signed-off-by: Chris Packham
Reviewed-by: Simon Glass
16 Jan, 2019
1 commit
-
Add support for gunzip-ing gzip-compressed uImages in the SPL Ymodem code.
Loading data over Ymodem can be gruelingly slow, gzip-ing the data can
reduce that aggravating slowness at least slightly (depends on the data,
u-boot.bin compresses to ~1/3 of it's original size on ARM64), hence add
optional support for decompressing gzip-compressed uImages.Signed-off-by: Marek Vasut
Cc: Tom Rini
11 Jan, 2019
1 commit
-
The SPL option for USB gadget should be named after the option for u-boot
(CONFIG_USB_GADGET)Signed-off-by: Jean-Jacques Hiblot
01 Jan, 2019
3 commits
-
imx for 2019.01
- introduce support for i.MX8M
- fix size limit for Vhybrid / pico boards
- several board fixes
- w1 driver for MX2x / MX5x -
If we don't define CONFIG_SPL_FIT_IMAGE_TINY, when loading images from FIT,
the SPL will record all loadables' info to u-boot's FDT. This causes
problem when HAB is enabled, because FDT's content is modified before
we authenticate it.Signed-off-by: Ye Li
Signed-off-by: Peng Fan -
Introduce two board level callback functions to FIT image loading process, and
a SPL_FIT_FOUND flag to differentiate FIT image or RAW image.Implement functions in imx common SPL codes to call HAB funtion
to authenticate the FIT image. Generally, we have to sign multiple regions
in FIT image:
1. Sign FIT FDT data (configuration)
2. Sign FIT external data (Sub-images)Because the CSF supports to sign multiple memory blocks, so that we can use one
signature to cover all regions in FIT image and only authenticate once.
The authentication should be done after the entire FIT image is loaded into
memory including all sub-images.
We use "-p" option to generate FIT image to reserve a space for FIT IVT
and FIT CSF, also this help to fix the offset of the external data (u-boot-nodtb.bin,
ATF, u-boot DTB).The signed FIT image layout is as below:
--------------------------------------------------
| | | | | | | |
| FIT | FIT | FIT | | U-BOOT | ATF | U-BOOT |
| FDT | IVT | CSF | | nodtb.bin | | DTB |
| | | | | | | |
--------------------------------------------------Signed-off-by: Ye Li
Reviewed-by: Peng Fan
Reviewed-by: Tom Rini
Signed-off-by: Peng Fan
15 Dec, 2018
1 commit
-
If DM_USB_GADGET is used, the usb ethernet gadget driver must be bound to a
controller before the image can be downloaded over the network.
In u-boot this can be done with the bind command. In SPL it must be done
programmatically.Signed-off-by: Jean-Jacques Hiblot
Reviewed-by: Tom Rini