summaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)Author
2018-12-14MA-13748 Pass BDADDR from uboot cmdlineyang.tian
Pass bt mac address from uboot cmdline to write ro.boot.btmacaddr property for bluetooth hal to parse BDADDR which is composed from ro.boot.serialno, or it will fall back to persist property seted in init.rc. Change-Id: If6886596c79c699b8530d3249b1cc98f19aad51f Signed-off-by: yang.tian <yang.tian@nxp.com>
2018-12-12MA-13759-1 imx8mm: Enable trusty supportJi Luo
Open configs to enable trusty for imx8mm_evk and also add new config imx8mm_evk_android_trusty_defconfig based on imx8mm_evk_android_defconfig. Test: Trusty starts ok. Change-Id: Iaea90de21f886ed23082a5e8e8d2fa7fb139a9cb Signed-off-by: Ji Luo <ji.luo@nxp.com>
2018-12-04MA-13628 [Auto] Read/Write rollback index from rpmbJi Luo
Secure storage is ready in trusty so we should read/write the rollback index from rpmb. But for borads without rpmb key, read/write the rpmb will fail and will block the following avb verify process. In this case, check if the rpmb key has been set and always return AVB_IO_RESULT_OK for the boards without rpmb key. Test: build and boot pass on imx8qm_mek. Change-Id: I10c438e56d049ae97ebedfc446c8202642630d8b Signed-off-by: Ji Luo <ji.luo@nxp.com>
2018-11-28MA-13588 Fix build warning caused by previous android SPL+CONTAINER patchfaqiang.zhu
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-27MLK-20467 imx8m: Fix issue for booting signed image through uuuYe Li
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 <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 710efd3ccb99e144bd30af8e1ee46459b4a54dd6)
2018-11-22MLK-20442 imx8qm/qxp: Fix SPL crash when authentication is failedYe Li
When booting SPL from SD/MMC, the codes load and parse container image first, if its authentication is failed, the flow continues to load and parse for FIT image and cause crash in SPL. The correct way should stop the booting if authentication is failed, avoid trying the FIT image since FIT does not support AHAB on 8QM/QXP. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 7843ab1b619d53c24a11f7db10b277287dcd1b11)
2018-11-21MA-13480-1 [Auto] Fix XEN hang with wrong keymaster serviceJi Luo
Pass "androidboot.keystore=trusty" for trusty backed keymaster service, pass "androidboot.keystore=software" for software keymaster service. Test: boot pass on imx8qm_mek. Change-Id: I9fa38c15a7c10aef09ab29b0e9859b690e3e7a41 Signed-off-by: Ji Luo <ji.luo@nxp.com>
2018-11-14MLK-20356-1 common: Fix resource leak in sparse image writtingYe Li
Fix coverity issue CID 18031: Resource leak (RESOURCE_LEAK) leaked_storage: Variable fill_buf going out of scope leaks the storage it points to Should free the fill_buf before function return. Signed-off-by: Ye Li <ye.li@nxp.com>
2018-11-12[iot] Load Trusty to different address for AIY 1G/3G ddr boardJi Luo
Trusty image should be loaded to different address for AIY 1G/3G ddr board which have different ddr size. Use board id to distinguish different baseboard, load trusty image to 0x7e00_0000 for AIY 1G ddr board and 0xfe00_0000 for AIY 3G ddr board. Test: build and boot Trusty ok for AIY 1G/3G ddr board. Change-Id: I62d8a19b13fe19f38075512a6faa4bbb36f74791 Signed-off-by: Ji Luo <ji.luo@nxp.com>
2018-11-12Set different bootargs for imx8m_phanbell based on ram capacityfaqiang.zhu
for 1GB ram: cma=296M galcore.contiguousSize=8388608 for 3GB ram: cma=384M Test: Boot successfully on AIY-1G & AIY-3G Change-Id: If082d5b751b5a5e06efe301c0b8e49ec4ac3dfb7 Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com> Reviewed-on: http://androidsource.ap.freescale.net/project/5262 Reviewed-by: Wang Haoran <elven.wang@nxp.com> Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
2018-11-09MLK-20233 spl_spi: Add QSPI boot device support to the container parserAbel Vesa
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-07MLK-20233 arch: imx8: Add container parser for loading ATF and uboot properAbel Vesa
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-02MA-13276 [Auto] Generate key blob when set the rpmb keyJi Luo
Generate the key blob and store it to the last block of boot1 partition after setting the rpmb key. The key blob should be checked in spl and be passed to Trusty OS if it's valid. If the key blob are damaged, RPMB storage proxy service will return fail and should make the device hang. Test: Build and boot ok on imx8qm/qxp. Change-Id: Ia274cd72109ab6ae15920e91b2a2008e1f1e667c Signed-off-by: Ji Luo <ji.luo@nxp.com>
2018-11-02MLK-19877-1: iMX8QXP: Add NAND SPL supportTeo Hall
Add implementation necessary for supporting SPL on QXP ARM2 board with dynamic offset detection from container header. Signed-off-by: Teo Hall <teo.hall@nxp.com>
2018-10-18MLK-19969 fastboot: write to wrong position when size bigger than 4GBFrank Li
chunk_data_sz = sparse_header->blk_sz * chunk_header->chunk_sz; All is uint32. chunk_data_sz may be bigger than 4G. Change chunk_data_sz to 64bit. force chunk_header->chunk_sz and sparse_header->blk_sz to 64bit. Signed-off-by: Frank Li <Frank.Li@nxp.com> Acked-by: Ye Li <Ye.Li@nxp.com>
2018-10-16common: spl_mmc: Allow FIT image raw loadingAbel Vesa
If SPL is built with CONFIG_SPL_LOAD_FIT make the checking for FIT image. If there is no FIT image go with the raw default mode. Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
2018-10-08MA-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>
2018-09-28MA-12943 [VTS] Fix firmware dtbo verify failJi Luo
VTS need commandline 'androidboot.dtbo_idx=<dtb_index_in_dtbo>' to verify fdt overlay. Pass the dtb index as "0" here since we only have one dtb in dtbo partition and haven't enabled the dtb overlay. Test: VTS case "VtsFirmwareDtboVerification#testVerifyOverlay" pass on imx8mq and imx8qxp. Change-Id: I33b089bf5a945e0b558bbb189b183a38f145dcbe Signed-off-by: Ji Luo <ji.luo@nxp.com>
2018-09-27MA-12915 [AUTO] Only print kernel command line in debug modeJi Luo
Print the kernel command line in normal mode will consume about 122ms on imx8qm, move the log print to debug mode to save some boot time. Change-Id: I5996555cf3f210be8ea25111d2bc84e0d06caa5c Signed-off-by: Ji Luo <ji.luo@nxp.com>
2018-09-26MA-12886 Set keymaster HAL to trusty when use Trusty OSHaoran.Wang
When use Trusty OS, set the property keymaster HAL to use the Trusty OS backed one. This patch make the bootloader able to control the Android Keymaster HAL. Change-Id: I0a533c12b99824ef499ce642cf87c22d72b51503 Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
2018-09-18MLK-19219-4 iMX8QXP/QM: Add support to get container image set size from QSPIAbel Vesa
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 <abel.vesa@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com>
2018-09-13MA-12703 Android: Read bootargs from u-boot dtsLuo Ji
Load bootargs from the "/chosen/bootargs" dts node and combine it with the bootargs in bootimage header. Change-Id: I68c9b0d53fff1f51c4d91aa513dfd38b5d9650d4 Signed-off-by: Luo Ji <ji.luo@nxp.com>
2018-09-11MA-12335 Canonical Boot Reason in Android Pie 9.0Ji Luo
Read boot reason from SRC(system reset controller) and report it to kernel by "androidboot.bootreason=<>" kernel commandline. This is enabled on imx6/7/7ulp/8m, imx8 will report default value "androidboot.bootreason=reboot" since it can't get such info on A core at u-boot stage. Test: Boot reason report ok on imx6qp/imx7ulp/imx8qxp. Change-Id: I03effaa03bc513bec6153e82c1a04e29c07e7db8 Signed-off-by: Ji Luo <ji.luo@nxp.com>
2018-09-04MA-12283-2 fix issue of imx6 boot from SD card when use uuufaqiang.zhu
get_boot_device() for imx6 series can't judge the chips is boot from USB or not. So, when use uuu, "bootcmd" parameter will get the same value as boot from SD card, so if the SD card has image in it, uboot will not enter fastboot mode when use uuu. This patch use is_boot_from_usb(void) to judge whether boot from USB then change the "bootcmd" parameter accordingly. Change-Id: I366aca2e32eab67193f45798abd142b2d5cb86bc Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
2018-08-22MA-12492 Remove some redundant codes for androidJi Luo
Some redundant codes are added after cherry-picking android related commits from imx_v2017.03, remove them in this commit. Test: build and boot pass on imx6q_sabresd. Signed-off-by: Ji Luo <ji.luo@nxp.com>
2018-08-21MLK-19263-3 imx8m: Enable CONFIG_SPL_FIT_IMAGE_TINY for iMX8MQ/MMYe Li
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 <ye.li@nxp.com>
2018-08-21[iot] Support rollback index protection at SPL stageLuo Ji
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 <ji.luo@nxp.com>
2018-08-20[iot] Support dual bootloader in SPLLuo 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 <ji.luo@nxp.com>
2018-08-20MA-12124 [Android] Fix build warnings for u-bootLuo Ji
Fix build warnings in u-boot. Change-Id: I1944657d2d89a03c0d2303a22a09538dfaa5fd2c Signed-off-by: Luo Ji <ji.luo@nxp.com>
2018-08-14MLK-19219-1 spl: Add function to get u-boot raw sectorYe Li
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 <ye.li@nxp.com>
2018-08-10MLK-19181-1: sdp: call board_usb_init at spl_sdp_load_imageFrank Li
Need initialize UDC before run sdp download Signed-off-by: Frank Li <Frank.Li@nxp.com>
2018-08-09MLK-19183-8 iMX8QXP SPL: common: spl: Hack for allowing raw ATF image bootingAbel Vesa
Since the default way to boot ATF from SPL is by using a FIT blob, this hack allows us to boot raw ATF image, without checking anything in the header of the image since is non-existent. Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
2018-06-13MLK-18257-4 use another method check if need run bootcmd_mfgFrank Li
Signed-off-by: Frank Li <Frank.Li@nxp.com> (cherry picked from commit 09b1876fa4c74f8bd9b1efbf17ab8ab012a14555)
2018-06-13MLK-18591-6 android: iot: Add boot Trusty OS codes for imx6 and imx7Ye Li
Use trusty_os_init to load Trusty OS from CONFIG_TRUSTY_OS_ENTRY before u-boot ready. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
2018-06-13MLK-18591-3 android: Add FSL android fastboot supportYe Li
Porting the FSL android fastboot features from imx u-boot v2017.03 to support all SoCs: imx6/imx7/imx7ulp/imx8/imx8m Signed-off-by: Ye Li <ye.li@nxp.com>
2018-06-13MLK-18591-1 android: Add the AVB libraryYe Li
Porting the android AVB lib from imx u-boot v2017.03 Signed-off-by: Ye Li <ye.li@nxp.com>
2018-05-23MLK-18333-1 spl: nor: add fit image supportPeng Fan
Extend spl_nor to support FIT image loading. CONFIG_SYS_UBOOT_BASE is the Uboot location in NOR memmap address. Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 60e943cd1a7c248eccc8892073efdada588a208d)
2018-04-27MLK-16758-4 SPL: Add HAB image authentication to FITYe Li
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 <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 078dd4eed6a04c3db7ec49a1bd1fbc63ebb82e1b)
2018-04-27MLK-18157 mfgtool: Add mfgtool supportYe Li
If boot from usb, reset environment to default value. Auto apply mfgtools setting and boot mfgtools kernel. Only add for mx6, the mx7 and mx7ulp have implemented relevant USB functions in soc level. Signed-off-by: Ye Li <ye.li@nxp.com>
2018-04-27MLK-11211 lcd: fix build warningPeng Fan
Fix build warning: common/lcd.c: In function 'lcd_clear': common/lcd.c:166:6: warning: variable 'bg_color' set but not used [-Wunused-but-set-variable] int bg_color; ^ common/lcd.c: In function 'lcd_setmem': common/lcd.c:296:2: warning: format '%d' expects argument of type 'int', but argument 2 has type 'u_long' [-Wformat=] debug("LCD panel info: %d x %d, %d bit/pix\n", panel_info.vl_col, ^ common/lcd.c:296:2: warning: format '%d' expects argument of type 'int', but argument 3 has type 'u_long' [-Wformat=] Signed-off-by: Peng Fan <Peng.Fan@freescale.com> (cherry picked from commit acfeb43685efb04423ce064c67228d15fa6d3da5) (cherry picked from commit 69a7c6f0877f4a984209f1be3e14ed5fe56928ad)
2018-04-27MLK-12425-2 video: epdc: introduce epdc supportPeng Fan
Support EPDC. E-Ink feature is supported by i.MX6DL/SL/SLL/ULL and i.MX7D. This driver supports user defined logo file, if there is no logo file, it will draw a black border around a white screen. If need to enable EPDC, a waveform file is required to let all work. Since we need LCD_MONOCHROME mode for EPDC, we introduce LCD_MONOCHROME support. Please refer to Linux Reference Manual for how to flash WAVEFORM file. Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Robby Cai <R63905@freescale.com> Signed-off-by: Nitin Garg <nitin.garg@freescale.com> Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit a7244f279cc3c3994bcd103f5e9a183b1075ae71)
2018-03-05libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>Masahiro Yamada
Thomas reported U-Boot failed to build host tools if libfdt-devel package is installed because tools include libfdt headers from /usr/include/ instead of using internal ones. This commit moves the header code: include/libfdt.h -> include/linux/libfdt.h include/libfdt_env.h -> include/linux/libfdt_env.h and replaces include directives: #include <libfdt.h> -> #include <linux/libfdt.h> #include <libfdt_env.h> -> #include <linux/libfdt_env.h> Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-03-05spl: Kconfig: Rename SPL_USBETH_SUPPORT to SPL_USB_ETHER to match with the ↵Faiz Abbas
U-boot CONFIG Rename CONFIG_SPL_USBETH_SUPPORT to CONFIG_SPL_USB_ETHER. This enables users to block text using CONFIG_IS_ENABLED() instead of resorting to #if ladders with SPL and non-SPL cases. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2018-02-23Convert CONFIG_BOOTP_BOOTPATH et al to KconfigAdam Ford
This converts the following to Kconfig: CONFIG_BOOTP_BOOTPATH CONFIG_BOOTP_DNS CONFIG_BOOTP_GATEWAY CONFIG_BOOTP_HOSTNAME CONFIG_BOOTP_PXE CONFIG_BOOTP_SUBNETMASK CONFIG_CMDLINE_EDITING CONFIG_AUTO_COMPLETE CONFIG_SYS_LONGHELP CONFIG_SUPPORT_RAW_INITRD CONFIG_ENV_VARS_UBOOT_CONFIG Signed-off-by: Adam Ford <aford173@gmail.com> [trini: Re-run the migration] Signed-off-by: Tom Rini <trini@konsulko.com>
2018-02-23Merge git://git.denx.de/u-boot-usbTom Rini
2018-02-23fdt: Fixup only valid memory banksThierry Reding
Memory banks with address 0 and size 0 are empty and should not be passed to the OS via device tree. Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-02-21dfu: Rename _FUNCTION_DFU to DFU_OVER_Marek Vasut
Do the following to make the symbol names less confusing. sed -i "s/\([TU][^_]\+\)_FUNCTION_DFU/DFU_OVER_\1/g" \ `git grep _FUNCTION_DFU | cut -d ":" -f 1 | sort -u` Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Lukasz Majewski <lukma@denx.de>
2018-02-21dfu: Fix up the Kconfig messMarek Vasut
Clean up the screaming mess of configuration options that DFU is. It was impossible to configure DFU such that TFTP is enabled and USB is not, this patch fixes that and assures that DFU TFTP and DFU USB can be enabled separatelly and that the correct pieces of code are compiled in. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Lukasz Majewski <lukma@denx.de>
2018-02-21usb: gadget: sdp: add missing line breaksAndre Heider
Cosmetic change. Signed-off-by: Andre Heider <a.heider@gmail.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Acked-by: Stefan Agner <stefan.agner@toradex.com>
2018-02-18fdt: Fixup only valid memory banksThierry Reding
Memory banks with address 0 and size 0 are empty and should not be passed to the OS via device tree. Signed-off-by: Thierry Reding <treding@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com>