| Commit message (Collapse) | Author | Age | Lines |
... | |
|
|
|
|
|
|
|
|
| |
if device has no avbkey partition, rbk idx erase
fails in 'fastboot unlock', host will get FAIL
although unlock is already done.
do not check the rbk idx erase's return
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
| |
use FASTBOOT_PARTITION_AVBKEY defined in fsl_fastboot.h
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
|
| |
Remove the log in uboot when no valid partition can be found
"Partition:'<NULL>' does not exist"
Signed-off-by: Chen Guoyin <guoyin.chen@nxp.com>
|
|
|
|
|
|
|
| |
Make all partitions can be flashed by sparse image if it is
in raw format
Signed-off-by: Chen Guoyin <guoyin.chen@nxp.com>
|
|
|
|
|
|
| |
change CONFIG_FSL_BOOTCTL to CONFIG_AVB_SUPPORT
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
| |
change CONFIG_FSL_BOOTCTL to CONFIG_AVB_SUPPORT
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
|
| |
CONFIG_AVB_FUSE to PERMANENT write to fuse, or just
write/read the shadow fuse register.
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
avb's verify process adds cmdline from the vbmeta generated
by avbtoo's option '-kernel_cmdlines'.
this additional kernel cmdline is consist of below items:
dm="1 vroot none ro 1,0 ..."
androidboot.slot_suffix=_a
androidboot.vbmeta.device_state=locked
androidboot.vbmeta.hash_alg=sha256
androidboot.vbmeta.size=2944
androidboot.vbmeta.digest=...
these items are used either by dm-verity or by system service
after boot.
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* support avb in picosom/evk_6ul boards;
* use CONFIG_FSL_BOOTCTL instead of CONFIG_BRILLO_SUPPORT
to separate using FSL version of bootctl or not;
* separate all avb part with CONFIG_AVB_SUPPORT;
* in picosom/evk_6ul board config headers:
modify malloc size as avb needs to load the whole bootimage;
add partition uuid which libavb needs.
* add avb verify in boota;
* add bootctl set_active cb using libavb's interface;
* add bootctl getvar cb using libavb's interface;
* add vbmeta_a/b partition to store vbmeta image, add avbkey
partition to store avb related keyblob;
* add LOCK/UNLOCK for avb;
if in LOCK state, verify fail will cause boot fail;
if in UNLOCK state, verify fail only print a msg and
go on boot the "_a" slot, maybe it's better to use bootctl
to select the bootable slot, but libavb doesn't have this
interface exported.
switch from LOCK to UNLOCK causes a erase of rollback_index
in avbkey partition.
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
| |
modify AVB_MAX_NUMBER_OF_ROLLBACK_INDEX_SLOTS to 4
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
|
|
|
| |
* add fsl uboot version of AvbOps;
* export some bootctl interface from libavb;
* save avb public key and rollback index using
keyblob encrypted by caam;
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
| |
use gun99, add sysdeps for uboot env.
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
|
|
|
|
| |
init libavb from git:
https://android.googlesource.com/platform/external/avb/
commit:
4cc9652142693767098d5d96fccc822cefaf63de
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
| |
free bdata if needed
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
|
| |
use partition name instead of part_index for fbmisc/data/prdata
partitions.
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
|
| |
use type FbLockState for state LOCK/UNLOCK,
use type FbLockEnableResult for DISABLE/ENABLE unlock device.
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
| |
unify support for android/brillo.
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
| |
unify partition index for GPT/MBR and android/brillo.
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
|
| |
better move partition_table_valid to f_fastboot as it's
not related with lock/unlock function.
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
|
| |
use partition name instead of part_index in rw_block
get partition from the ptable loaded by fastboot
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
|
| |
add iopb config in board/freescale/mx6ul_nxpu_iopb
add brillo config in include/configs/mx6ul_nxpu_iopb.h
Signed-off-by: fang hui <hui.fang@nxp.com>
|
|
|
|
|
|
|
| |
Need the CONFIG_MX6 for using the mx6_ecspi_fused funtion, otherwise will
break build for other platforms like MX7.
Signed-off-by: Ye Li <ye.li@nxp.com>
|
|
|
|
|
|
|
| |
Some type style problems found by review-commits for previous patch
MLK-12483, fix them in this patch and re-check.
Signed-off-by: Ye Li <ye.li@nxp.com>
|
|
|
|
|
|
|
| |
Enable the configurations CONFIG_MODULE_FUSE and CONFIG_OF_SYSTEM_SETUP for
module fuse check. And modify board level codes for SD, FEC and EIM.
Signed-off-by: Ye Li <ye.li@nxp.com>
|
|
|
|
|
|
|
|
|
|
| |
Add the fuse checking in drivers, when the module is disabled in fuse,
the driver will not work.
Changed drivers: BEE, GPMI, APBH-DMA, ESDHC, FEC, QSPI, ECSPI, I2C,
USB-EHCI, GIS, LCDIF.
Signed-off-by: Ye Li <ye.li@nxp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement a functionality to read the soc fuses and check if any module
is fused. For fused module, we have to disable it in u-boot dynamically,
and change the its node in FDT to "disabled" status before starting the kernel.
In this patch, we implement the ft_system_setup for FDT fixup. This function will
be called during boot process or by "fdt systemsetup" command.
To enable the module fuse checking, two configurations must be defined:
CONFIG_MODULE_FUSE
CONFIG_OF_SYSTEM_SETUP
Signed-off-by: Ye Li <ye.li@nxp.com>
|
|
|
|
|
|
|
| |
When using ft_system_setup, the return value fdt_ret is not assigned,
so the fdt_strerror(fdt_ret) uses a uninitialized value.
Signed-off-by: Ye Li <ye.li@nxp.com>
|
|
|
|
|
|
|
|
|
| |
The fdt command "fdt systemsetup" can't work because the do_fdt check the
start char 's' for command "fdt set". So the fdt systemsetup will also go into
the "fdt set" in fault. Fix this problem by checking the whole word "set" for
"fdt set" command.
Signed-off-by: Ye Li <ye.li@nxp.com>
|
|
|
|
|
|
| |
increase the max part_num to 32 if using GPT
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
|
|
|
| |
The mfgtool environments only can set in BSP u-boot image, not for android
u-boot. Since android u-boot may go into fastboot in board_r phase which is
earlier than mfgtool environment check. The USB status from android fastboot
will cause u-boot to configure mfgtool environment.
Signed-off-by: Ye Li <ye.li@nxp.com>
|
|
|
|
|
|
|
|
| |
. Variable "has-slot:" no need to read_bootctl
. If gpt damaged, use lock status in memory
. Once gpt change from invalid to valid, call do_fastboot_unlock
Signed-off-by: fang hui <hui.fang@nxp.com>
|
|
|
|
|
|
|
|
|
| |
Pin GPIO5_IO01 is for detect 256M/512M version,
this pin is pulled high for 512M version and low
for 256M version.
Just print version check message out .
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
| |
Add CONFIG_CMD_FS_GENERIC and CONFIG_CMD_EXT4
Signed-off-by: Chen Guoyin <guoyin.chen@nxp.com>
|
|
|
|
|
|
|
|
| |
support iot on imx7d emmc board
use gpt partition
not use encrypt lock for imx7d
Signed-off-by: fang hui <hui.fang@nxp.com>
|
|
|
|
|
|
| |
change PRODUCT_NAME to 'imx6ul'
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
|
| |
Init slot meta if it's not inited,
so no need to flash misc.img
Signed-off-by: fang hui <hui.fang@nxp.com>
|
|
|
|
|
|
|
| |
Align the fastboot serialno springf format with
kernel boot cmdline, which is "%08x%08x".
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
|
|
|
|
| |
Get valid serialno.
Product name should be set according to the special board.
The default name set to "NXP i.MX",
For picoimx board, use "picoimx".
Signed-off-by: fang hui <hui.fang@nxp.com>
|
|
|
|
|
|
|
| |
on picoimx, DRAM is 256M,
change CONFIG_USB_FASTBOOT_BUF_SIZE from 400M to 200M
Signed-off-by: fang hui <hui.fang@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
. for pico, add CONFIG_EFI_PARTITION to support gpt
. for pico, save boot_para in boot0 area
. align partition sequence as brillo defined
boot_a, boot_b, system_a, system_b, oem_a, oem_b, misc, userdata, fbmic
. in fsl_caam.c, use mask 0xffffffc0 to assure the addr is 64 bytes align
Signed-off-by: fang hui <hui.fang@freescale.com>
|
|
|
|
|
|
|
|
|
|
| |
. in f_fastboot.c, rename global var ptable to g_ptable
. fix compile warnings in fsl_caam.c, f_fastboot.c, fastboot_lock_unlock.c
. fix code style warnings in fsl_caam.c, f_fastboot.c, fastboot_lock_unlock.c
Signed-off-by: fang hui <hui.fang@freescale.com>
|
|
|
|
|
|
|
|
| |
The uboot binary for auto 6q board may exceed the 512k
The env offset need to be larger thn the uboot binary size
Extend the env offset to 768k for all imx6/7 boards
Signed-off-by: Chen Guoyin <guoyin.chen@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Table 41 of the JEDEC standard for eMMC says that bit 31 of
the command argument is obsolete when issuing the ERASE
command (CMD38) on page 115 of this document:
http://www.jedec.org/sites/default/files/docs/jesd84-B45.pdf
The SD Card Association Physical Layer Simplified Specification also
makes no mention of the use of bit 31.
https://www.sdcard.org/downloads/pls/part1_410.pdf
The Linux kernel distinguishes between secure (bit 31 set) and
non-secure erase, and this patch copies the macro names from
include/linux/mmc/core.h.
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Eric Nelson <eric@nelint.com>
Tested-by: Hector Palacios <hector.palacios@digi.com>
(cherry picked from commit 1aa2d074a7acda61eb43e654ced21c139703633c)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if the lock/unlock partitions are not created, reboot will fail
with "boota: bad boot image magic".
get_device_and_partition will return negtive value if error,
fix this return value check if there is no lock/unlock related
partitions, or block_write in fastboot_set_lock_stat may destroy
boot partition.
refine code indentation.
Signed-off-by: Winter Wang <wente.wang@nxp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fastboot host end will erase the ext4 partition before
flash them. This is enable into fastboot when it can
get ext4 partition by "getvar partition-type".
Because by default "fastboot erase" will get FAIL
result so the "fastboot flash" process will be end
by the failure.
As "fastboot flash" will overwrite the partition so we
don't need to erase partition. Return OKAY will let
the "fastboot flash" continue.
This patch also refined fastboot lock/unlock codes.
Signed-off-by: Haoran Wang <Haoran.Wang@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support below fastboot getvar commands:
o version-baseband
o version-bootloader
o product
o off-mode-charge
o variant
o battery-voltage
o battery-soc-ok
o partition-size:<partition name>
o partition-type:< partition name>
Signed-off-by: Wang Haoran <Haoran.Wang@freescale.com>
|
|
|
|
|
|
|
|
|
| |
Enable fastboot lock/unlock for Brillo in i.MX6UL
platforms include:
o Pico i.MX6UL
o EVK i.MX6UL 14x14
Signed-off-by: Wang Haoran <Haoran.Wang@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Enable fastboot lock/unlock support for Android in i.MX6
platform include:
o i.MX6QP/Q/DL sabresd
o i.MX6QP/Q/DL sabreauto (non NAND)
o i.MX6SX sabresd
o i.MX6SX sabreauto (nan NAND)
Signed-off-by: Wang Haoran <Haoran.Wang@freescale.com>
|
|
|
|
|
|
|
|
|
| |
Support "fastboot flashing/oem lock/unlock" command.
Support "fastboot getvar secure/unlocked" command.
Protect the lock/unlock status by CAAM-Keyblob.
Signed-off-by: Wang Haoran <Haoran.Wang@freescale.com>
|
|
|
|
|
|
|
|
|
| |
Cherry-pick patch from Renato Frias <b13784@freescale.com>
to enable CAAM in U-Boot.
Modify the CAAM Keyblob to general memory mode.
Signed-off-by: Wang Haoran <Haoran.Wang@freescale.com>
|