21 Aug, 2018
14 commits
-
Some configs and definations changed from imx_v2017.03 to
imx_v2018.03, refine related codes to make pico-imx7d work.Test: pico-imx7d boots ok.
Change-Id: I10e5a1849964a62259e0d6c353e5588c1529a840
Signed-off-by: Ji Luo -
In order to use uuu, SPL needs USB functions.
USB releated Configurations are added for imx8mm_evk.Change-Id: Ibf49ac4c8f1107b15706f752a393847b4188b344
Signed-off-by: faqiang.zhu -
Change bootcmd to "fastboot 0" directly when detect
booted from USB. By this the u-boot which booted by
uuu will enter fastboot mode and ready for the
remain commands.Change-Id: I937c07f770e68568dcb3ea67130ee6634feea47a
Signed-off-by: Haoran.Wang -
Sometimes we don't need to dump the whole partition table when
some partition can't be found, only dump the partition table
when it's needed.Test: Build and boot ok.
Change-Id: I52407f0117b73f4b3656fe2435b08dfc7a349939
Signed-off-by: Ji Luo -
Remove CONFIG_LOAD_FDT_FROM_PART and decide the fdt
location at run time.Test: build and build ok on both Android and Android Things.
Change-Id: Ice49e71b54db33468e49298705a714e4acb333e3
Signed-off-by: Ji Luo -
The hdmi rx firmware is appended to the end of u-boot binary,
load it in u-boot, this will increase the size of u-boot binary
by 128k.Test: hdmi rx firmware loaded successfully on imx8qm_mek.
Change-Id: Ib8e8ecd70a35b56ba4498c21d8c4716f6ad6405a
Signed-off-by: Luo Ji -
The oem_bootloader partition is critical and should be verified. All
necessary verify data has been added (hash footer in oem_bootloader
and descriptors in vbmeta), verify the oem_bootloader by libavb at
u-boot stage.
Since the oem_bootloader will be loaded by libavb, use it directly
instead of loading it from disk again.Test: oem_bootloader verify ok and boot ok for both imx7d and imx8m.
Change-Id: Ic37d2555f800385a982f6664b3858b9c83b9c484
Signed-off-by: Luo Ji -
The RPMB keyslot is stored in last block of boot1 partition which
is easily erased or tampered, set power-on write protection for this
partition to prevent corruption.Test: Power-on write protection works as expected on imx8m.
Change-Id: I7aadaed81ff81de680da9b20049f163a982e3d57
Signed-off-by: Luo Ji -
Enable CONFIG_SPL_ENV_SUPPORT to fix build errors like
below:
common/built-in.o:(.data.env_htab+0xc): undefined reference to 'env_flags_validate'
lib/built-in.o: In function `hsearch_r':
lib/hashtable.c:380: undefined reference to 'env_callback_init'
lib/hashtable.c:382: undefined reference to 'env_flags_init'Change-Id: Ife7dc129ac2a4dd0ee2f18ee41a5128d868ea031
Signed-off-by: Ji Luo -
124KB spl max size is not enough anymore, enlarge the max size
to 172KB.Test: build and boot ok on Enterprise.
Change-Id: I4569430b1be88cacbf86026fc1741f1e7cb03d90
Signed-off-by: Ji Luo -
Bootloader image take fit format and the rollback index for bootloader
is stored at the "rbindex" node, SPL will read the rollback index for
bootloader and compare it with the one stored in RPMB. The stored
rollback index will be updated only when current slot pass the verify
and has been marked as successful.Bug:109947126
Test: Rollback index protection feature works fine for imx8m.Change-Id: Ic12db4571287fbcb99e5eba0127e0b09378fa5d6
Signed-off-by: Luo Ji -
This commit is cherry-picked from community:
commit 343749c42554b058e53086aefe21d47b383326d5
author Kever Yang
date Wed, 19 Jul 2017 18:13:59 +0800 (19:13 +0900)mmc: rpmb: update size format for write_counter
According to MMC spec, the write_counter is 4-byte length,
use 'int' instead of 'long' type for the 'long' is not 4-byte
in 64 bit CPU.Signed-off-by: Jason Zhu
Signed-off-by: Kever Yang
Reviewed-by: Simon Glass
Signed-off-by: Jaehoon ChungTest: Access RPMB successfully on imx8m.
Change-Id: I402b53c990856c2cdf7c3686eabf259f5581464d
Signed-off-by: Luo Ji -
Change VDD_DRAM to 0.9V
Change-Id: Ia2d0672b2f31f18add6626ac2e23e66b8c421a75
Signed-off-by: Zhang Bo
Reviewed-on: http://androidsource.ap.freescale.net/project/5139
Reviewed-by: Wang Haoran -
Change the VDD_3V3 and VDD_1V8 to lower one to save power.
Change-Id: I61f1f4ed8c6e036173d9adc5358db01bd9c835a2
Signed-off-by: Zhang Bo
Reviewed-on: http://androidsource.ap.freescale.net/project/5144
Reviewed-by: Wang Haoran
20 Aug, 2018
26 commits
-
Decrease the phanbell DDR(1G + 3G) frequency to 1600
MTS, this may save some power.Test: Boot ok on both 1G and 3G DDR board, the dram_core_clk
decrease from 800000000 to 400000000.Change-Id: I73b78865e7691001a868061826f0211cb9927cee
Signed-off-by: Luo Ji
Reviewed-on: http://androidsource.ap.freescale.net/project/5100
Reviewed-by: Wang Haoran -
Add 1G DDR support, distinguish different boards by the
Board ID, They are:
SAI5_MCLK: Board_id[6]
SAI5_RXFS: Board_id[5]
SAI5_RXC: Board_id[4]
SAI5_RXD3: Board_id[3]
SAI5_RXD2: Board_id[2]
SAI5_RXD1: Board_id[1]
SAI5_RXD0: Board_id[0]
Current Board ID for imx8m boards are:
AIY Micron 1G: 0x5c
AIY Hynix 1G: 0x56
AIY Mirconb 3G: 0x40
Wibo 3G: 0x00
imx8m_ref 3G: 0x00Test: Boot ok on all imx8m boards.
Change-Id: I3d65931483f369c545632b660f04fc9da120547d
Signed-off-by: Luo Ji
Reviewed-on: http://androidsource.ap.freescale.net/project/5093
Reviewed-by: guoyin.chen
Reviewed-by: Wang Haoran -
Unlocked device maybe locked when gpt overlay changed, unlock the device
after valid gpt is flashed, erase the userdata to ensure safety.Test: device unlocked after valid gpt flashed.
Change-Id: I7b0306606c632b7dc5668ea1ff8aad63428f278f
Signed-off-by: Luo Ji -
"fastboot reboot bootloader" fails to transmit "OKAY" back to host on
imx8qm because fastboot_tx_write_str() will dequeue the IN request
first before queue it, cdns3 usb driver will always invoke the complete
callback in dequeue, so if we are going to do_reset() in the complete
callback, the device will reboot before we can transmit "OKAY" back to
host in queue.
Check the request status in dequeue first before invoke the complete
callback, this is basically ported from kernel.Test: No error messages when run "fastboot reboot bootloader" on
imx8qm_mek.Change-Id: I085df3bd0f37480b8636585cc1068d5fcae331c1
Signed-off-by: Luo Ji -
Open configs to enable A/B dual bootloader
feature for imx8m.Test: A/B dual bootloader feature works
on imx8m.Change-Id: Ia0ef8ca6957ec6288ceee3fe9065532a96c1f772
Signed-off-by: Luo Ji -
A/B switch logic will be moved to SPL stage if dual bootloader
feature is enable, in such case, we just need to verify single
slot which is selected in SPL stage.Test: verify and boot ok for imx8m.
Change-Id: Iafe0d2d4aea1c178551940808416eec4a3547259
Signed-off-by: Luo Ji -
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.
Change-Id: Ie3d827a9be0298b491bf2bc8d48833597fd70e90
Signed-off-by: Luo Ji -
The userdata partition size for some platforms
(like imx8/imx8m) could be larger than 4GB, use
"unsigned long int" to store the partition size
instead of "unsigned int".Test: Get correct userdata partition size for imx8m.
Change-Id: Ib626fa2c3c64dde4eba3a93ee0455f45d1286c9f
Signed-off-by: Luo Ji -
Fix the null dereferenced issues from converity scan results.
issue id:
3618300:Dereference after null check
3618364:Dereference after null check
3618463:Dereference after null check
3618470:Explicit null dereferenced
3618520:Dereference after null checkTest: issue fixed by converity scan.
Change-Id: I577ed094a1f9b493de61b84827c0e1157a4fbd2f
Signed-off-by: Luo Ji -
Fix build warnings in u-boot.
Change-Id: I1944657d2d89a03c0d2303a22a09538dfaa5fd2c
Signed-off-by: Luo Ji -
Android Things has supported load fdt from "oem_bootloader" partition,
open related configs.Change-Id: I82476d71abd9cbeab60b4d2b5fbb402e37c0916b
Signed-off-by: Luo Ji -
Android Things will load dtb from a single partition like
"oem_bootloader" and we are going to sync normal Android
with Android Things. But just keep loading dtb from bootimage
before everything is ready.Change-Id: I205528b1485d3e8e9961f19812f380a2b11b991b
Signed-off-by: Luo Ji -
Some partition name can be larger than 16 bytes like
"factory_bootloader", enlage the buffer size to 20 bytes.Change-Id: I266c4e0af02e0ac1d758334aafcd6ed41d072dba
Signed-off-by: Luo Ji -
We have different baseboard for same imx8m SoM, add
fastboot variable 'baseboard_id' to distinguish different
boards.Test: "fastboot getvar baseboard_id" shows "0x0" for imx8m_wibo
board and shows "0x40" for imx8m_enterprise board.Change-Id: Iec24aa52ae5de546594dd3ce602efb6dcaa60660
Signed-off-by: Luo Ji -
'calc_sha256' should only be valid when CONFIG_IMX_TRUSTY_OS
is defined. Error message is like below:
error: label 'calc_sha256' defined but not used
[-Werror=unused-label]Test: build pass with or without CONFIG_IMX_TRUSTY_OS enabled.
Change-Id: I0938e641596cb9faccd0c64f7c03d526dab3b7d4
Signed-off-by: Luo Ji
Reviewed-on: http://androidsource.ap.freescale.net/project/4932
Reviewed-by: Wang Haoran -
Make the board enter fastboot mode if we get fatal
errors in AVB. We may fall into infinite boot loop
if panic or reboot the board when fatal errors happen
in AVB.Bug: 109842106
Test: Build & boot ok for imx8m and imx7d.Change-Id: I13cdbc1fc0077f8d710c706dae639f004492546b
Signed-off-by: Luo Ji -
For the device under development, the perm attr
not fused will break unlock ATX/AVB process and
make dm-verity parameters not output for kernel.Use hard code one if Trusty OS didn't get the
perm attr.Bug:93961668
Test: Verify kernel command line contains avb information.Change-Id: Idd55dde79eed793dccdd7319600fbd04e11ca12d
Signed-off-by: Haoran.Wang -
i2c_setup calls force_idle_bus which calls
get_timer if SDA and SCL are not high. On the Pico
baseboard there are level shifters that pull SDA
and SCL high, but the test harness does not have
pull-ups on these lines. Because
board_early_init_f is called before timer_init the
call to get_timer was causing a divide-by-zero
error due to CNTFRQ not being initialized. Moving
the i2c_setup calls to board_init fixes this
issue. power_init_board (which uses I2C to
configure the PMIC) is called after board_init, so
this should be safe.Bug:
Test: PMIC registers are read correctly on both
boards (DEV_ID=0x30 REV_ID=0x11)
Test: iMX7D SOM boots on Pico baseboard
Test: iMX7D SOM boots on test harness
Change-Id: Iecdd28f3177fe915a3b614565d8dfa6e20e6a842 -
http://ag/3824663 changed the config file used for
building for the iMX7D bootloader, so change
CONFIG_BOOTDELAY there as well.Bug: 79093530
Test: iMX7D U-Boot has CONFIG_BOOTDELAY=3
Change-Id: Iaa967095cd6dd9e3b07f730c90c99a64581ae740 -
Test: None
Bug: None
Change-Id: I2c899e42d8b2911ed96df535c4864d1316d66383 -
Correct oem and vendor partition to ext4.
This make it available to use fastboot command
to format above two parts.Test: Builds, loads & boots successfully. ext4 file system type
displayed for expected partitions in "fastboot getvar all"
output..Change-Id: If6d2c58abfb526a7162fb4cd644b6e1e209f8456
Signed-off-by: Haoran.Wang -
Since Trusty OS will hand RPMB so no touch
the RPMB partition.Change-Id: I07ed0e4a024171f6b353b038723ccd6e66a00d54
Signed-off-by: Haoran.Wang -
Use rollback index interface to trap into Trusty OS directly.
This interface added due new libavb upgrade.Change-Id: Id9d158d6e48ff33386613d2920a1bd2d95f68b6f
Signed-off-by: Haoran.Wang -
When SECURE_BOOT enabled, use HAB verify
Trusty OS image or check its IVT available.If not available, bootloader consider the TOS
lost unexpected and wipe all data on disk.
Then enter limited fastboot mode. In this situation
only bootloader and tos is able to flash, gpt won't
be available for external.Change-Id: I04f037f5bd5a51f53174b5b99b2c3053182a8fcf
Signed-off-by: Haoran.Wang -
Add API and IPC calls to read the ATAP certificate UUID from keymaster.
Also rename const local variables to the standard convention.
This cherry-picked the CL 649562 from trusty/external/trusty.Bug: 76211194
Change-Id: I98ab68180c3855e07884994dc20b879f0b59965d
Signed-off-by: Haoran.Wang -
Support Android Things Attestation Protocol
in u-boot for imx7d.Change-Id: I0aef8f208cf8e81238248efc8d7dcfdbc09c3119
Signed-off-by: Haoran.Wang