summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-04-18MA-17382 spl: Add weak function at the end of image loadJi Luo
Add a weak function after the image load in case we have extra steps to complete, like check the rpmb keyblob for trusty enabled platform. Test: Boots with trusty. Signed-off-by: Ji Luo <ji.luo@nxp.com> Change-Id: Ie8181fcb32d1640e39fdcc3cebb2dbf50cbfdbab (cherry picked from commit b16fc52cf9a9ea4d63bced50b949d0bc2328ddea) (cherry picked from commit 3e40454cdac6b7b63cdff36ab48f86e4b98502be) (cherry picked from commit f3fb8740f9aea5a024a2b4579903e78affcda9e1)
2022-04-18MA-17353-1 Add system board reset command for imx8q devicesJi Luo
Default 'reset' command in bootloader will only trigger partition reboot for A core, which will not reload everything (like SPL, SCFW, M4, etc.). Sometimes, we want to trigger a board reboot without pressing the reset button, it can be very helpful in some cases like remote debugging... This commit adds command 'reboot' to trigger system board reboot via the psci interface provided by ATF, it's enabled on i.MX 8 Quad platforms only. Test: system board reboot on imx8qm/imx8qxp. Change-Id: I27f2291806b6959d46fa6f55fe186041d141d2f4 Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit f8a127354ba4f77ba5b1af87f692133bb704cfe0) (cherry picked from commit 646b99c6bcba96c97d3517a2c21d54908a8c4ed5) (cherry picked from commit 69d8d7c88af20faae578b30207737a2336f2560b)
2022-04-18MA-17261 fix start kernel hang issuezhang sanshan
overwrite the console to hvc0 in xen, otherwise it will hang at starting kernel. specific androidboot.android_dt_dir which define dts, and let the system mount in first stage. It may change in xen. disable selinux temporarily Change-Id: I90d4c374f0d0478d6386ae31cddb3f7ef510ae93 Signed-off-by: zhang sanshan <pete.zhang@nxp.com> (cherry picked from commit: e7ddf17f0e95867d0e59ef5e7aef1e3b5c4e7a3b) (cherry picked from commit: 32f73a745946456f0e3923cac3be6039901900d4)
2022-04-18MA-17260 Add vendor boot and boot header v3 supportJi Luo
GKI(Generic Kernel Image) would require the boot header v3 and vendor boot support, all device specific info are moved to vendor_boot partition ,the boot header v3 will not be compatible with earlier version(0/1/2). This commit adds support for boot header v3 and vendor boot, it would concatenate the generic ramdisk and vendor ramdisk to generate the final ramdisk passed to kernel. Test: boots with or without boot header v3 and vendor boot support. Signed-off-by: Ji Luo <ji.luo@nxp.com> Change-Id: Ib3298ae46bfc728aa4a34909d372eff6cc86ca70 (cherry picked from commit c3854f270a19e7d57b996e6074d692ab9bc88c32)
2022-04-18MA-17226 Invalidate the dcache after DMA operationJi Luo
The main memory contents can spontaneously come to the cache due to the speculative memory access by the CPU, this may cause coherency problem if this happens during the DMA operaion is on-going. Invalidate the dcache range after DMA opeartion but before the main memory read to avoid coherency problem. Test: reboot test. Change-Id: I93824deab9285b5478669e0a311e0b338bf02f8a Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit 4cd1d087111dd3b4ddaad33ef4862f7ac1ab1b34) (cherry picked from commit ee720d8d69d4d3e97d2daea9b91f8d076ffb05b0)
2022-04-18MA-17046-3 Add implementation to get ONOFF button statusJi Luo
Add board level implementation to get the ON-OFF button status for imx8q/imx8m. Test: Get ON-OFF button status on imx7ulp/imx8m/imx8q. Change-Id: I8e4ea61ec1c52ab7cfa20b5498756a25f3cd2f8d Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit 44c6edfbd2607f1458220031467fc7de20dc46be) (cherry picked from commit f7584f25285b94e2ea0f312399d1aef9671673b2)
2022-04-18MA-17046-2 imx8q: porting scu api to get onoff button statusJi Luo
Porting the scu api 'sc_misc_get_button_status()' to get the ON-OFF button status. Test: Get the ON-OFF button status. Change-Id: I8e06ef4dc170750fe2dfbeeba7850b5e0dcfc774 Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit 130747618d813ea64611ed111e5d80487aa154b6) (cherry picked from commit 562eefcbddf3b6f186fc7e26b5bce2ca32000eb8)
2022-04-18MA-17144 Only do security check for rpmb key flashed boardsJi Luo
Only check the bootloader rollback index and trusty keyslot package for rpmb key flashed boards. Test: boots on boards without rpmb key. Change-Id: I130e4d906c0f08d602eac820ec5612214e01ff55 Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry pick from commit bb0c880bb2cd5d9414b4c167eac546682a5d5ccc) (cherry pick from commit b05bacf279a65d8d98754adc0492209e90f1790f)
2022-04-18MA-13050-5 [Android] support evs on mek-8qxp boardJi Luo
camera sometime can't been open once run M4 image. ISI-CH0 probe funtion is not called when meet issue. The root cause is: M4 image set assign resource SC_R_ISI_CH0 into m4 partition when open camera in m4 side. Uboot will call update_fdt_with_owned_resources to check the pd in current dts node. it will call sc_rm_is_resource_owned to check the pd whether in other partition, if yes, it will delete the dts node. uboot delete isi_0 node whose pd is SC_R_ISI_CH0. add CONFIG_SKIP_RESOURCE_CHECKING to skip checking resource when load dtb. Change-Id: Iaf9a5eda07074c45c15c43f23cb6ad6b5a77de47 Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com> (cherry picked from commit: bd0682f5b3208525363690d446bc86da15a43120) (cherry picked from commit: 11126b31964eabdd321cdbc284e0abccfc6af9cd)
2022-04-18MA-16940 remove logically dead codefaqiang.zhu
boot_buf was used to point to the memory allocated in do_boota function to save boot partition data. now boot partition is loaded by AVB, this boot_buf should be removed. Change-Id: I614c412b5f7ed980d29106b364a8193c56db13dc Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com> (cherry picked from commit 2a27f021798e31a8bab37804b053d2b9ebaea928) (cherry picked from commit 4ae3275bb7065dfcf99dcdf559eaf99d044c51e0) (cherry picked from commit f07776066ff6445e1b5aff21508fded0d4fc5aa4)
2022-04-18MA-16877 Skip kernel hab authentication for androidJi Luo
Android use AVB to verify the kernel, hab authentication is not necessary for boot image. For imx8m, don't authenticate the kernel image when AVB (CONFIG_AVB_SUPPORT) is enabled. For imx8q, as android uses different 'CONFIG_EXTRA_ENV_SETTINGS' and 'CONFIG_BOOTCOMMAND' with linux bsp, so it won't try to do kernel hab authentication. by default. Test: boot imx8mp with "CONFIG_IMX_HAB" and imx8qxp with 'CONFIG_AHAB_BOOT'. Change-Id: I1b2087ce7d8f9795422a053b6b68a694c86f0b3d Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit f907e4ac090e960ba5110b8039cccc4296841595) (cherry picked from commit f9f6ae742696f51326ec7da5b0c74a7fca21f774) (cherry picked from commit cadfe9a4fa40333dc1813506cd58c5c5000027f8)
2022-04-18MA-16594-1 Set dtb load offset in bootloaderJi Luo
This commit sets the dtb load address in bootloader, the dtb load address would be 'kernel_addr + FDT_OFFSET_TO_KERNEL'. For imx8m, this commit will reserve 64MB for kernel, 2MB for fdt and 16MB for ramdisk. For imx8q, this commit will reserve 60MB for kernel, 1.5MB for fdt and 16MB for ramdisk. This commit is a merge of below commits: f581f72be1 MA-16594-1 Set dtb load offset in bootloader 207f813b2d MA-16668-2 Fix kernel hang after enabling debug configs 42cdd5ef6d MA-16939-1 correct reserved space for kernel image for non-imx8 SoC Change-Id: Ie597731992107ec2343e5ab6db0cab0e123f009c Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit b48c03f3d925cb48385d3f9970c5e06b99fb527d)
2022-04-18MA-16457-2 support reboot-fastboot command in u-bootHaoran.Wang
Android implement the userspace fastboot in Android Recovery. Follow Google's spec, added below 2 fastboot command support: * fastboot getvar is-userspace * fastboot reboot fastboot TEST: fastboot commands. Change-Id: Ib6047413be0a45b3c00626cdb8594809eb8a2b6b Signed-off-by: Haoran.Wang <elven.wang@nxp.com> (cherry picked from commit 314bded076dfc3e544cc7094ce3f6c4c330be4dd) (cherry picked from commit 89e63a8f1b20dfe5633f4d854aeb6d712b3ccaa4) (cherry picked from commit e85a5f856e7819eff2c4ba8da9490a03f5edd346)
2022-04-18MA-16457-1 avoid to try to access system partitionfaqiang.zhu
To enable dynamic partition feature, system partition will be a logic parition in "super" partition, uboot can't access system partition anymore. In i.MX Android use case, only vbmeta partition is used to verify other imags. boot and system are not used. so there is no need to access system partition to get avb device info, remove system partition from avb lib for standard android. Now, standard Android will boot with ramdisk in boot.img, there is no need to provide root info to kernel for standard Android. so only Android Auto will provide this info. Change-Id: I99a43eb8f7aa1dc635e3937c93266f881c9b3655 Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com> (cherry picked from commit 3a2418a1cc097cd956347fc12b0b4e0566652bfd) (cherry picked from commit 133644540d6e5c89cc6e8109b2bf3ac6a9b897d1) (cherry picked from commit 10a635bbbbfe36ab39ed77c84fe8d30000c638f5)
2022-04-18MA-16418 [Android] Support imx8mp spl boot from mmcJi Luo
Add mmc board level implementation for imx8mp, so we can support boot from mmc besides ROMAPI. Test: eMMC/SD boot. Change-Id: Ie3c28e5622dd819583e2146557ac75f89dbe19ef Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit 05b64483e5f46f82beb7f542d0148498fc21334f) (cherry picked from commit e310c753afd0e31bac21488f594d2edd5df4297e)
2022-04-18MA-16203 Load boot/dtbo image to fixed memoryJi Luo
When the device is locked, avb will try to verify one slot first, it will continue to verify another if the first slot returns failure. Function load_full_partition() will alloc memory to load boot/dtbo images from heap (which is a big and continuous memory region), this memory will be freed if the first slot returns verify failure. but because part of the continous memory region will be used in following verify process, even total available memory is enough, u-boot can't find a continous memory region to load the boot/dtbo image for another slot and will return error "Failed to allocate memory". Instead, this commit use fixed memory region start from 96MB offset of CONFIG_FASTBOOT_BUF_ADDR to load the boot/dtbo images. Test: slot verify and A/B slot switch. Change-Id: Ifc83bed5a6be37196c0fd109d942eaf9b07b6a74 Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit d13752e831957fb84c71f8ca24fd1979d3605cde) (cherry picked from commit 11f79ca63338a00960e90763d4764956907fdcb5) (cherry picked from commit c9e9af7549662633d70d48cb8d55845a066d9bc0)
2022-04-18MA-16191 eliminate warning info about "is-logical" when flash imagesfaqiang.zhu
"is-logical" is used to check whether the partition to be flashed is dynamic partition, if it is, a partition resize command will be issued by host fastboot. this can be well processed in fastbootd. process this "is-logical" in uboot, now there is no logical partition, for every partition found in u-boot, returns "no". Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com> Change-Id: I4d93a0c7b32fed9fe5a5ac846bc4e97bfbe69e67 (cherry picked from commit 7b27a2290aec78b49ce7c2aed497db858f436eb4) (cherry picked from commit cfc8e3034c5ce4f6f777bc7faff3dbb880de43fe) (cherry picked from commit 1692c3ecc6af3d743c936db40ecd90a9161b119f)
2022-04-18MA-15860 Get and switch the target dev in fastboot eraseJi Luo
Target mmc dev is not properly switched when the device enters fastboot mode via uuu "-i" parameter, which causes "erase" operation doesn't work. Get and switch the target mmc dev every time before erase operations happen. Test: "fastboot erase boot_a" in uuu fastboot mode. Change-Id: I4822d2b4ecfd2d874dfbe7474d6824b8fc3a7903 Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit 46161b62c341139dcdbb13e00634ae8ae903c5da) (cherry picked from commit b66d13c7ecd1c1e44dd9edb6c0d5566b4f738bbe) (cherry picked from commit ab2a2323a22e7692126f21cd873b7bcf3c4cc520)
2022-04-18MA-15813 [Android] imx8q: Enable reset in spl stageJi Luo
To avoid both A/B slots are marked as unbootable because of some random failures, we will need to reset at spl stage when current slot load/verify fail but already with flag "successful_boot" set. imx8q can't be reset via the psci driver because the atf is not avaiable at spl stage, porting the sc_pm_reboot() scu api so we can do reset at spl stage for imx8qm/imx8qxp mek boards. Test: reset on imx8qm_mek and imx8qxp_mek. Change-Id: Ifa0bdea9393e413942a8a0188a4f937fa0aa9ab8 Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from a5c5748101c383bc3afb424a3ef2689ab2664846) (cherry picked from c9f8d7c19a7fc20c99e061beabbb094b6bd50f52) (cherry picked from e42f06dbc70934ff9f535104f7322b9ac36491ce)
2022-04-18MA-15814 Check 'successful_boot' flag before marking unbootableJi Luo
Slot will be marked as "unbootable" state if error happens during image load/verify process, this may cause the board never boot up if some random failures happen (like eMMC/DRAM access error at some critical temperature). Check the "successful_boot" flag before marking the slot as "unbootable", this will help ease the "no bootable slot" issue. Test: slot switch on imx8qm_mek. Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit 6db8ebe2224ab6656e8e798288bd1b3c0472c0c0) (cherry picked from commit b64a9dcd87da333265c2ac4da2be8a735186b77e) (cherry picked from commit d3510370046c603872c24db24a07c784c3fe960e) Change-Id: Ib060b11cc6687a3bacd09cecda7dd925beba6316
2022-04-18MA-16966 Add hdmi rx/tx fw loading functionJi Luo
Add implementation to load hdmi rx/tx firmwares, use different config to guide the function. Change-Id: Ibb43c2301b5f6cdc8b5103bd04cc30baefac9b9f Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit 942bf95ae42750a1f8b8092040ebb3ca144777fd) (cherry picked from commit 6e0bd811e1901cfb91e3f3fa0e5520b0ee143025)
2022-04-18MA-15715-1 Refine trusty logsJi Luo
Refine trusty logs output to make it more simple. Test: boots. Change-Id: Id94fc245206c5f78e0dbcb0baf5db6475c9f744d Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit a50b4fca22111fe7b85b5584ff317db55d664c50) (cherry picked from commit c17f0cb30c23ed6dab7312cec88707cb355e91a3) (cherry picked from commit 9dd25cbbba17c4193a95e19a68c06071bcd93323)
2022-04-18MA-15339-1 load ramdisk in boot image to do first stage mountfaqiang.zhu
With Android10 code, to build GSI image for devices launching with Android10, the target should be "aosp_$arch-user". Google releases GSI images is so built in user mode. To do CTS-on-GSI test, a debug ramdisk containing .prop file to enable adb root permission and GSI keys to verify the GSI image is needed, this ramdisk is in boot image. so ramdisk in boot image need to be loaded by uboot even in non-recovery mode. To save boot time, only standard Android use ramdisk to boot up Android, Android Auto keeps the original way: kernel be responsible for verify and mount system partition. Let the customers to decide whether to use recovery ramdisk to boot the system. and under this condition, user-debug Android Auto GSI image need to be used for VTS-on-GSI test. when use ramdisk to bootup Android, info provided by "dm=" bootarg is not used by kernel to setup dm-verity, so it is removed from the bootargs. The 4.19 kernel used together with this uboot does not handle "skip_initramfs", so it's also removed. Change-Id: Ia8b8fa8b85a44acda2670b46504038a009ce01a8 Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com> (cherry picked from commit e7d3c9ee1a713434d2948928ff0c4daea09ce3dc) (cherry picked from commit 8f191d088797e9fbea49f482d0aa517f989b7821) (cherry picked from commit ff5e376fa1eba58510cd7f001f0d134f51f82e01)
2022-04-18MA-15575-3 Add support for oemlock 1.0 halJi Luo
Add commands to read oem device unlock state from trusty avb app. Use the oem device unlock state to determine if the device can be unlocked instead of the state in persistdata part. Test: Read oem device unlock state from avb app. Change-Id: Ifccaa788ba0f681c2b3a47151c8474e8da5a2559 Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit c6eaf8e32987f120c0c5441ea39aa0f39a65b50d) (cherry picked from commit 8b58afda1cd1f91048504b48b95260e930a37326) (cherry picked from commit dc2acac3cdfe0ca77747e9c435e3f140acc07705)
2022-04-18MA-15360 Verify vbmeta public key for non-trusty devicesJi Luo
Don't skip vbmeta public key verify for non-trusty platforms. Test: boot on imx8mm. Change-Id: I4712e5dd6e5c8848468e9d85c6b38eb5fb11377f Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit 9b8264c89ccb3e9179a438e428ad79d72c7efe9b) (cherry picked from commit 75d9dfb2474d03bd83a5b4d3f03d0a5cea6ea25d) (cherry picked from commit cb6582267a1d7659af5d12ae49fc088546cdef5a)
2022-04-18MA-15321-3 Support secure unlock featureJi Luo
Decrypt and verify the secure credential in keymaster TA, unlock operation can only be allowed after secure credential verify pass. Since the mppubk can only be generated on hab closed imx8q, so secure unlock feature can only supported when hab is closed. Test: secure unlock credential verify on hab closed imx8mm_evk. Change-Id: I1ab5e24df28d1e75ff853de3adf29f34da1d0a71 Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit 631149fc0fc8ce035311949db643c2708e41435a) (cherry picked from commit 063d358ab4bbfea998e0c975f31724757243545a) (cherry picked from commit 5980e3882093c522723aa6a3af6f85fb5b8a47c1)
2022-04-18MA-15321-2 Add command to get serial numberJi Luo
Add commands to support extract serial number from device. Commands: $ fastboot oem get-serial-number $ fastboot get_staged <path-to-serial-number> Test: serial number upload on imx8mm. Change-Id: I5c905ab797d4fd28d76c8403914f191eaf2ef687 Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit 250ef119c1dc02908046113893df5eeb9ef40605) (cherry picked from commit e4790456a5b19c4a108dc5b9ec02e81ee8e2752b)
2022-04-18MA-15158 Set spl recovery mode for dual bootloaderJi Luo
The A/B slot selection is moved to spl, it may lead to hang if no bootable slots found. The only way to recover the board is re-flash images with uuu tool, which is quite inconvenient for some customers who can't enter serial download mode. This patch will set "spl recovery mode" which will give us a chance to re-flash images with fastboot commands. Test: Enter spl recovery mode and flash images when no bootable slots found. Change-Id: I31278f5212bde7609fe2f49e77b3849e92c0c516 Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit 46cc755cf3f42422ee1d7783394e14e8125df2b6) (cherry picked from commit 047f09ef2ef33657d76fd92d8f5599e00158cd6b) (cherry picked from commit e96b68d22e89e4031d1117ab347f042577c5c8f1)
2022-04-18MA-15152 erase user data before setting lock/unlock statusfaqiang.zhu
when conduct fastboot lock/unlock operations, erase the userdata first and then set lock/unlock status to improve security level. Change-Id: I74c571c35b88afd6fdd4c287463f7209da8c15ff Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com> (cherry picked from commit b81f0b617d23548cd30953b94aca4ff8cc4da723) (cherry picked from commit fb9d5e07623098aefd12a81d74c0779060b0bf0a) (cherry picked from commit 6c7c67500cb033c0cbb227845052a42413728af1)
2022-04-18MA-15151 Limit some hwcrypto commands within bootloaderJi Luo
It can be dangerous to export some hwcrypto commands to Linux, add commands to limit some commands within bootloader. Test: hwcrypto commands can't be used after locking boot state. Change-Id: Ib0a96a87f661778c133178840d8dccf49f151c22 Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit 3fc3f521957677b1f363624494ed866985a25505) (cherry picked from commit 38f9975064dbd6b9c7183a5e7fc54a099a56e973) (cherry picked from commit 62f2b87290750c91f29e0d573bf8560134415b39)
2022-04-18MA-15017 Add new command to generate bkek from trustyJi Luo
Add new command to generate bkek from trusty. Test: generate and dump bkek. Change-Id: I6b2a30b87c755eecd00ced7c53cfb86e432040de Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit 6c1087c030de491a12b7f1be9d332f30ba27d183) (cherry picked from commit 02f0cd1484bc8883d784e08ea9c8fd2e9fc7dd3d) (cherry picked from commit 2ad901636baf6678c6a1e42d51e7fd1d1772c316)
2022-04-18MA-15015 Add sha256_hmac supportJi Luo
Add sha256 hmac support in u-boot. Test: hmac calculation. Change-Id: I0f1438fed8290620a1bb0663d19c21e20098eb5a Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from 1e06de6ef23c1ae9d51383f3c57bb045ea180c03) (cherry picked from 3fc7a485b5098bec7fa22184da28a937a407192e)
2022-04-18MA-15142 Support secure attestation provisionHaoran.Wang
In host end, need encrypt the attestation keys and certs by manufacture protection public key though AES-128-ECB. Then use below 4 set of commands to provision encrypted RSA attestation and EC attestation: * $fastboot stage atte_rsa_key.bin * $fastboot oem set-rsa-atte-key-enc * $fastboot stage atte_rsa_cert.bin * $fastboot oem append-rsa-atte-cert-enc * $fastboot stage atte_ec_key.bin * $fastboot oem set-ec-atte-key-enc * $fastboot stage atte_ec_cert.bin * $fastboot oem append-ec-atte-cert-enc Change-Id: I8a7c64004a17f7dde89f28c3123a2e2b1a6d3346 Signed-off-by: Haoran.Wang <elven.wang@nxp.com> (cherry picked from commit 58965915dd69050429142d3d180c75e98ad14788) (cherry picked from commit 55669422dc8e2094f95d92075b69fc2f0a3b409c)
2022-04-18MA-15019-1 Support Manufacture Protection public key generationJi Luo
Add new keymaster commands to get Manufacure Production key (mppubk). Since the mppubk can only be generated in OEM CLOSED imx8q board, so we can only use this command when the board is HAB/AHAB closed. Commands to extract the mppubk: * $fastboot oem get-mppubk * $fastboot get_staged mppubk.bin Test: Generate and dump the mppubk.bin Change-Id: Idc59e78ca6345497e744162664b8293f50d1eda4 Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit 52300d644a275dfa4fe73ecb51601a8efaff8ab7) (cherry picked from commit 7320c7c0efacfb7706e85bfe82d11ac6c2e5b61f)
2022-04-18MA-15087-4 Support mmc loader for imx8mn_evkHaoran.Wang
Align using emmc loader when there is no Trusty OS for Android standard boot in SD/EMMC. Add hook for getting correct offset when load uboot. Change-Id: I5898cf196e734ffaca1a513918a049ce504b14e9 Signed-off-by: Haoran.Wang <elven.wang@nxp.com> (cherry picked from commit c5151ab339c9a37a6c95cabebe328aeba88636f9) (cherry picked from commit 9d2675b8f347df1f75b8839db0b3397267ad6ffb)
2022-04-18MA-14948 Append lock status by Android PropertyHaoran.Wang
Follow Bootloader requirement spec in https://source.android.com/devices/bootloader/unlock-trusty. Need to pass the flash lock status by androidboot.flash.locked. This patch fixed the GTS failure com.google.android.gts.persistentdata.PersistentDataHostTest#testTestGetFlashLockState. Change-Id: I9a3508f7546b02c998e7668df2a33f864a58db75 Signed-off-by: Haoran.Wang <elven.wang@nxp.com> (cherry picked from commit 3f2c4d49fe147637e61309421e5817b3e574ed56) (cherry picked from commit 51d84ed5c237fcd2fdd11806639449b6099f2233)
2022-04-18MA-15082 Do not pass btmacaddr from uboot if serial is all zeroyang.tian
Do not pass BDADDR from uboot cmdline when serial is all zero, and instead btmacaddr will be set from persist.service.bdroid.bdaddr which is set in device's init.freescale.rc Change-Id: I429c6f369d0b7aaca643443fe505d943a3901215 Signed-off-by: yang.tian <yang.tian@nxp.com> (cherry picked from c23398fb379131ad3c5c17c3d762c582796698fb) (cherry picked from 3a25ac711b9732c16cb822b9e43ef494e835a337)
2022-04-18MA-15062-2 change mcu firmware partition nameJi Luo
new imx8mn chips have Cortex-M7 inside, not like any other existing multi-core i.MX MPU, users may manually flash mcu firmware with fastboot, partition name need to be specified at the same time, so the mcu firmware partition name need to be changed. related enum and variable names are also modified. Change-Id: Ia801e76fb3a20d0074dbbc1433258358c1a53907 Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com> Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit dc25b7b27fa5c2293d09789a338a1aed2e3a010f) (cherry picked from commit 74da26c497c9a4d28e9fc153a543ada3f2b9cc0d)
2022-04-18MA-15208 Remap mmc device id in splHaoran.Wang
This patch adds mmc device id remap function in spl to get the correct device id. Test: boot on imx8mm with trusty enabled. Change-Id: I41c46494326d9eb2658d2cda692968fb895d0292 Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit c079188d06b3669df7836e1b8c6126558b1fa39e) (cherry picked from commit 1597b96ee023c5b2de9eea6cc198d2f4b3404fda)
2022-04-18MA-14916-10 fix fastboot reboot bootloader issuefaqiang.zhu
In Android, the reboot bootloader flag is written to misc partition, in the boot flow, u-boot will check that message to decide whether enter fastboot mode or not. To be compatible with the common implemention, keep the fastboot_set_reboot_flag there and redefine it to avoid the error return value which block the reboot process. Change-Id: Ifb55236d5a5daf3edd124d3ed01851ff6e916e1a Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com> (cherry picked from commit aa78cbe3d3148ab99ea039ede767e6d1152092b4) (cherry picked from commit 2574a4d52d6f982a9a4a9eb6af1421fe65bc6e1f)
2022-04-18MA-14712 change androidboot.storage_type to androidboot.boot_device_rootJindong
storage_type is emmc or sd, which is not friendly for user space, for example android health HAL need access /sys/block/mmcblkX/stat. Replace it with mmcblkX named as boot_device_root. Change-Id: I7486d522696e9fe3dde8bdc8834ac11d25df7d79 Signed-off-by: Jindong <jindong.yue@nxp.com> (cherry picked from commit db441a89a090c46149457ee29492bc315c2bdfa9) (cherry picked from commit 82dd5d685c7b6f59aa85f7b69b1781ffaa9d39ca)
2022-04-18MA-12973 [AUTO] Skip serial init in board_init_fJi Luo
Serial init in board_init_f will cost much time, skip it here because the serial will be initialized again in board_init_r and it's more faster (after cache is enabled). We will miss some logs before the serial is ready but it's ok for Android Auto. This commit will save about 190ms on imx8qm. Test: boot ok for both imx8qm and imx8qxp. Change-Id: If6efdc19794aecda862f22b6fec7f7aba2005766 Signed-off-by: Ji Luo <ji.luo@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 690a14ed2fc64328b417a9de448f4a18cc653698) (cherry picked from commit fdea93a968d6f6b353fd1343acbed051b812edc8)
2022-04-18MA-14916-4 support dual bootloader for imx8m/imx8qJi Luo
This commit enables dual bootloader feature for imx8m/imx8q, but as commit 'a2018ab' already brings in some dual bootloader codes when enabling fastboot support, so this commit won't be a complete and standalone patch to introduce the dual bootloader feature. This commit will do the following: 1. clean up dual bootloader flow and add missing implementation. 2. Merge the dual bootloader entry for fit and container to one function 'mmc_load_image_raw_sector_dual_uboot'. Change-Id: Ic9410a48092cc05de599dd897fc912177e2a1fe1 Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit d00da7c6e2d3b0ed5f3f93eb98d841d1b7a114ca)
2022-04-18MA-14916-8 [iot] Set power-on write protection for boot1 partitionLuo 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: Ib7e1094b979f7d94c0a2817391c5b3b5f3205d76 Signed-off-by: Luo Ji <ji.luo@nxp.com> (cherry picked from commit c7e207fbbcd8618d29b1192829c630777fea5220) (cherry picked from commit 1bbf98ec8a550e4027f399f18781245c9faefc8e)
2022-04-18MA-14916-7 comply with mmc struct definition in avb libraryfaqiang.zhu
Driver Module may be used in SPL, with CONFIG_BLK enabled for U-Boot, CONFIG_SPL_BLK will be enabled, struct mmc definition will be different. comply with that mmc struct definition in fsl_avbkey.c file to handle conditions when DM is used in SPL. Change-Id: I632600556e764b25228ba467a5e5141cf3fc3dfe Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com> (cherry picked from commit de905a8a3c6dfdf9241a188b2e22c76dbef851c1)
2022-04-18MA-14916-1 adapt to the directory change of libavbfaqiang.zhu
libavb is now under the directory of lib/, not lib/avb/ as before, to adapt to this change, some modifications are made: 1. header file inclusion change, including parameter of -I option in Makefile 2. remove fsl_avb_sysdeps_uboot.c as the functions have been defined in avb_sysdeps_posix.c. Change-Id: I4216e3ddb4e3e810783e4f46b953eda510c2627b Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com> Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry pick from 58010b99560eea2027dd39909eb5b35404e6030e)
2022-04-18MA-20205 Check arm64 kernel imageJi Luo
Add util function to check if the kernel image is arm64 kernel image. Change-Id: I52a11ef403ba349870385594cfc92e28d94e7a9a Signed-off-by: Ji Luo <ji.luo@nxp.com>
2022-04-18LFU-314 caam: fsl_rsa: Fix dcache issue in the driverYe Li
Since the keys and output decrypted data are processed by CAAM master, we need to flush and invalidate the dcache for them, otherwise CAAM JR returns failure with key error. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit fa705c54a55fcc65d61467751a67097d50257a74)
2022-04-18MLK-25832: include: configs: imx8qm_mek: Fix build break adding HDMI RXOliver Brown
Fixing imx8qm_mek_cockpit_a72_defconfig build break due to missing HDPRX_LOAD_ENV define. Signed-off-by: Oliver Brown <oliver.brown@nxp.com> Reviewed-by: Nitin Garg <nitin.garg@nxp.com> (cherry picked from commit a3f15e3bb4b3b27bd994bfb026ba0fe7321d2161)
2022-04-18LFU-302-2 arm: dts: imx8ulp-9x9: add the I3C bus supportClark Wang
Add I3C bus support for imx8ulp-9x9-evk. Because i3c's pins conflict with fec, add a separate dts for i3c. Signed-off-by: Clark Wang <xiaoning.wang@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com> (cherry picked from commit a0f689d8bf0a4b9b931ea8dae4717d921183795c)