08 May, 2023

1 commit


18 Apr, 2022

1 commit

  • 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
    (cherry picked from commit f907e4ac090e960ba5110b8039cccc4296841595)
    (cherry picked from commit f9f6ae742696f51326ec7da5b0c74a7fca21f774)
    (cherry picked from commit cadfe9a4fa40333dc1813506cd58c5c5000027f8)

    Ji Luo
     

06 Apr, 2022

11 commits

  • modified caam descriptor to support black key blob.

    Signed-off-by: Gaurav Jain
    Reviewed-by: Horia Geantă
    (cherry picked from commit b218e498e802c2c8546b11830240075753adbb36)

    Gaurav Jain
     
  • Add support for generating BKEK.

    Signed-off-by: Ji Luo
    Signed-off-by: Ye Li
    Signed-off-by: Gaurav Jain
    (cherry picked from commit 8e2e370296672d0199d05bee88966821a290171d)

    Gaurav Jain
     
  • The video link framework bases a port-endpoint gragh in DTB to
    connect the video components in uclass like: video, display, bridge,
    and panel.

    Using the port-endpoint gragh, we manage multiple video link and
    user can select one of them for splash screen.

    Signed-off-by: Ye Li
    (cherry picked from commit d6e6b1293f89b8a26033ac2f82151985f70e4036)
    (cherry picked from commit 0257e77fdae8faf7a00b3bc9f5c91f11de65f205)
    (cherry picked from commit 3d8e964596129d54d71ea104a1d0a51f76bbc92d)
    (cherry picked from commit 7cc8e2625df97f6b373d695397990fc5e2c69ca0)

    Ye Li
     
  • 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
    (cherry picked from commit 2b6fd3da6fffae0732e8e91ef5c1f870ea393ca9)
    (cherry picked from commit 7c8e0606ea4aaeceae1f1d1e17db1503ac9f841e)
    (cherry picked from commit f680079db70dfb53a96dbafe0b3f6bf8f3f6ca42)
    (cherry picked from commit 6767d87d4db3947b62164a44f35280ea7daa8e0c)

    Sherry Sun
     
  • mtdparts quit when invalid mtd devices found. Add thes patches to skip
    the invalid devices, so NAND partitions can be alway found to burn boot
    images.

    For instance,

    On i.MX6DL Sabreauto, nand config u-boot didn't enable the weim nor, so
    parsing 8000000.nor leads to error:

    Device nor0 not found!

    With the patches, we can skip this invalid device and still get nand
    boot partition table:

    Device nor0 not found!
    current device is invalid, skip it and check the next one

    device nand0 , # parts = 5
    0: nandboot 0x04000000 0x00000000 0
    1: nandkernel 0x01000000 0x04000000 0
    2: nanddtb 0x01000000 0x05000000 0
    3: nandtee 0x01000000 0x06000000 0
    4: nandrootfs 0xf9000000 0x07000000 0

    active partition: nand0,0 - (nandboot) 0x04000000 @ 0x00000000

    Signed-off-by: Han Xu
    (cherry picked from commit e674896123983e152ef3cc9d1304b775e5086a5e)
    (cherry picked from commit 75e8911f64b27cc90b38b3780e9ebe88b2cadad2)
    (cherry picked from commit fd9441bfa12858aeb533622b786553dc07bcef39)

    Han Xu
     
  • add a new option in mtdparts to skip the invalid devices rather than
    just quit

    Signed-off-by: Han Xu
    (cherry picked from commit dbe3763931e536cba4925fdd04fda39cc748fc1c)
    (cherry picked from commit e6aebc13f81012fea8ed9d98bdd1d106b75ad56f)
    (cherry picked from commit 43a785a0e336342f1d54901c291dc63460a38c75)

    Han Xu
     
  • Porting the FSL android fastboot features from imx u-boot v2018.03 to
    support all SoCs: imx6/imx7/imx7ulp/imx8/imx8m.

    The UUU commands like UCmd and ACmd are also added. Users need set
    CONFIG_FASTBOOT_UUU_SUPPORT=y to enable the feature.

    Signed-off-by: Frank Li
    Signed-off-by: Ye Li
    (cherry picked from commit 65120b06a7f750b9b1a6e0db3d2082cc7088d5a8)
    (cherry picked from commit 9b149c2a28829fe7017f83981d634157bc31cc94)
    (cherry picked from commit 9f99e9de1d37e9f6c02c1b27348ea3dcdab94569)
    (cherry picked from commit 6ae1c043431a4987f563026b179b33945a5880ee)
    (cherry picked from commit 806c9ba15e8742a23b1b9147d9b85219133b6f10)
    (cherry picked from commit 1357b84595d617f6ebc09f23e7b9d14b080f8048)

    Ye Li
     
  • When IMX_OPTEE is enabled for secure boot, update bootm to authenticate the optee
    image and the kernel zImage before booting into optee.

    Signed-off-by: Ye Li
    (cherry picked from commit d3bee08f12f1d41c83c47773aec6cfa28056694a)
    (cherry picked from commit 3825c3fedbbe59fdf8c4f59f10221823a5fc6f03)
    (cherry picked from commit a09dca5eff735ef8ef46313de09cfa0f3b4cf189)
    (cherry picked from commit c83877f5ad9385279c5db3d6ab78ed103d45d1d5)
    (cherry picked from commit 0e492bffc2b4cc804e8db6c035bf9dd08fae6a95)
    (cherry picked from commit 77f0447b4fa51ff2807f4b4508bcbfe72982e802)
    (cherry picked from commit f07032ce3d65137d873d9ae05d520bcaaf223ead)
    (cherry picked from commit ea808b54604e698086371a0b89234ba1f208d487)

    Ye Li
     
  • When sata stop is executed, the sata_curr_device is not reset to -1, so
    any following sata commands will not initialize the sata again and cause
    problem.

    Additional, in sata init implementation, the sata_curr_device should be updated,
    otherwise sata will be initialized again when doing other sata commands like
    read/write/info/part/device.

    Signed-off-by: Ye Li
    (cherry picked from commit 9bccfd01c618a5d059f332c000c42e5bf39880d9)
    (cherry picked from commit f162bbb14b5c9b0c4073eee5ceeea6a9d1780394)
    (cherry picked from commit 1707f011d5c79ae0f32b50ecf87f8aaed94944d0)
    (cherry picked from commit a52efe725cc4c2a032660965f7aeabb1aec1f61d)
    (cherry picked from commit c1a0ed87eddceb23af4dfbd5a1b331baef1af5fd)

    Ye Li
     
  • When secure boot is enabled, add authenticate_image in booti to authenticate
    kernel image.

    Signed-off-by: Ye Li
    (cherry picked from commit f29a143cdb8c74566113737e9be7e1bcd8c625f4)
    (cherry picked from commit 1e33f493a55dad7e016f948b932000ec295c6df4)
    (cherry picked from commit 677c332120eff7161532288685c58f246d1f00ff)
    (cherry picked from commit 2cd26c924355e6bcf88899d559235bab121837ab)
    (cherry picked from commit bf4c51707fdf1b2760f84f051e88c3c3a326ac88)

    Ye Li
     
  • To support the trust boot chain, we integrate the authentication
    into the kernel image loading process. The kernel image will be verified
    at its load address. So when signing the kernel image, we need to
    use this load address which may change on different platforms.

    Signed-off-by: Ye Li
    (cherry picked from commit 3c118b8d6bbe1a25ca8c8bafeb528309f16fc73d)
    (cherry picked from commit fd9a9759ed9b3a9fc26b18aff00880382213b1ca)
    (cherry picked from commit 98d4faefdb83579d4a5a170e06af5efb64ad2b3c)
    (cherry picked from commit 3c0f0eed6cb703cd7d67ec97520b1990b5e35fb2)
    (cherry picked from commit 6605ea47d7fbbd4687c8eb636335f4c1165be4e4)
    (cherry picked from commit 6391ea5549199bff43a31c923593624f1c55e663)

    Ye Li
     

26 Mar, 2022

1 commit


23 Mar, 2022

1 commit


20 Mar, 2022

2 commits

  • The GUID of partitions is sufficient for identification and will stay
    constant in the lifetime of a boot option. The preceding path of the
    device-path may change due to changes in the enumeration of devices.
    Therefore it is preferable to use the short-form of device-paths in load
    options. Adjust the 'efidebug boot add' command accordingly.

    Signed-off-by: Heinrich Schuchardt

    Heinrich Schuchardt
     
  • For targets that enable ACPI, we should not pass Device Trees into
    the payload. However, our distro boot logic always passes the builtin
    DT as an argument.

    To make it easy to use ACPI with distro boot, let's just ignore the DT
    argument to bootefi when ACPI is enabled. That way, we can successfully
    distro boot payloads on ACPI enabled targets.

    Signed-off-by: Alexander Graf
    Reviewed-by: Mark Kettenis
    Reviewed-by: Heinrich Schuchardt

    Alexander Graf
     

16 Mar, 2022

1 commit

  • e-MMC and SD standards differ for some CID fields:

    - 6 Byte Name - assigned by Manufacturer (SD 5 Byte)
    - 1 Byte OEM - assigned by Jedec (SD 2 Byte)

    See e-MMC standard (JEDEC Standard No. 84-B51), 7.2.3 (OID) and 7.2.4 (PNM)

    Signed-off-by: Max Merchel
    Signed-off-by: Markus Niebel
    Reviewed-by: Jaehoon Chung

    Max Merchel
     

12 Mar, 2022

1 commit

  • Currently the cls command does not support the serial console

    The screen can be cleared in the video uclass, the colored frame buffer
    console, and the serial console by sending the same escape sequence.
    This reduces the cls command to a single printf() statement on most
    boards.

    Signed-off-by: Heinrich Schuchardt
    Reviewed-by: Simon Glass

    Heinrich Schuchardt
     

05 Mar, 2022

1 commit


26 Feb, 2022

1 commit

  • UEFI specification requires that 5 minutes watchdog timer is
    armed before the firmware's boot manager invokes an EFI boot option.
    This watchdog timer is updated as follows, according to the
    UEFI specification.

    1) The EFI Image may reset or disable the watchdog timer as needed.
    2) If control is returned to the firmware's boot manager,
    the watchdog timer must be disabled.
    3) On successful completion of EFI_BOOT_SERVICES.ExitBootServices()
    the watchdog timer is disabled.

    1) is up to the EFI image, and 3) is already implemented in U-Boot.
    This patch implements 2), the watchdog is disabled when control is
    returned to U-Boot.

    In addition, current implementation arms the EFI watchdog at only
    the first "bootefi" invocation. The EFI watchdog must be armed
    in every EFI boot option invocation.

    Signed-off-by: Masahisa Kojima
    Reviewed-by: Heinrich Schuchardt

    Masahisa Kojima
     

25 Feb, 2022

4 commits

  • Fix the long help message for "clk setfreq" command

    Fixes: 7ab418fbe612 ("clk: add support for setting clk rate from cmdline")
    Signed-off-by: Patrick Delaunay
    Reviewed-by: Sean Anderson
    Link: https://lore.kernel.org/r/20220131172131.4.Ic863c28ffdcc15b3f4616434c2efd88b4e45495c@changeid

    Patrick Delaunay
     
  • Update the result of do_clk_setfreq and always returns a CMD_RET_ value
    (-EINVAL was a possible result).

    This patch avoid the CLI output "exit not allowed from main input shell."

    Fixes: 7ab418fbe612 ("clk: add support for setting clk rate from cmdline")
    Signed-off-by: Patrick Delaunay
    Reviewed-by: Sean Anderson
    Link: https://lore.kernel.org/r/20220131172131.3.Iec2029edb7fc0b29e13bcb86058ad2f614f62779@changeid

    Patrick Delaunay
     
  • The function clk_lookup can be replaced by a direct call
    to uclass_get_device_by_name for UCLASS_CLK.

    This patch removes duplicated codes by the generic DM API and avoids
    issue in clk_lookup because result of uclass_get_device wasn't tested;
    when ret < 0, dev = NULL and dev->name is invalid, the next function
    call strcmp(name, dev->name) causes a crash.

    Signed-off-by: Patrick Delaunay
    Link: https://lore.kernel.org/r/20220131172131.2.I7bc7762eff1e31ab7ff5b34c416ee03b8fe52200@changeid

    Patrick Delaunay
     
  • Test the number of argument in setfreq command to avoid a crash when
    the command setfreq is called without argument:

    STM32MP> clk setfreq
    data abort
    pc : [] lr : []
    reloc pc : [] lr : []
    sp : dbaf45b8 ip : ddb1d859 fp : 00000002
    r10: dbb3fd80 r9 : dbb11e90 r8 : ddbf38cc
    r7 : ddb39725 r6 : 00000000 r5 : 00000000 r4 : dbb3fd84
    r3 : dbb3fd84 r2 : 0000000a r1 : dbaf45bc r0 : 00000011
    Flags: nzCv IRQs off FIQs off Mode SVC_32 (T)
    Code: 4dd3 1062 85a3 ddbd (7803) 2b30
    Resetting CPU ...

    Fixes: 7ab418fbe612 ("clk: add support for setting clk rate from cmdline")
    Signed-off-by: Patrick Delaunay
    Reviewed-by: Sean Anderson
    Link: https://lore.kernel.org/r/20220131172131.1.I32a8f213d330dccd922f7aafc60d3d63fcbe8615@changeid

    Patrick Delaunay
     

19 Feb, 2022

2 commits


15 Feb, 2022

1 commit

  • The pstore command tries to create a reserved-memory node but fails if
    it is already present with:

    Add 'reserved-memory' node failed: FDT_ERR_EXISTS

    This patch creates the node only if it does not exist and adapts the reg
    values sizes depending on already present #address-cells and #size-cells
    values.

    Signed-off-by: Detlev Casanova

    Detlev Casanova
     

12 Feb, 2022

1 commit


11 Feb, 2022

1 commit


09 Feb, 2022

1 commit

  • In case the eMMC contains any GP partitions or user sets up new GP
    partitions, the size of these GP partitions reduce the size of the
    USER partition. Subtract the size of those GP partitions from the
    calculated size of USER partition when using `user enh start -`.

    The following test used to fail before:
    ```
    u-boot=> mmc hwpartition gp1 524288 enh user enh 0 - wrrel on check
    Partition configuration:
    User Enhanced Start: 0 Bytes
    User Enhanced Size: 1.8 GiB
    User partition write reliability: on
    GP1 Capacity: 256 MiB ENH
    No GP2 partition
    No GP3 partition
    No GP4 partition
    Total enhanced size exceeds maximum (261 > 229)
    Failed!
    ```
    The test now passes:
    ```
    u-boot=> mmc hwpartition gp1 524288 enh user enh 0 - wrrel on check
    Partition configuration:
    User Enhanced Start: 0 Bytes
    User Enhanced Size: 1.5 GiB
    User partition write reliability: on
    GP1 Capacity: 256 MiB ENH
    No GP2 partition
    No GP3 partition
    No GP4 partition
    ```

    Signed-off-by: Marek Vasut
    Cc: Fabio Estevam
    Cc: Jaehoon Chung
    Cc: Peng Fan
    Cc: Stefano Babic
    Reviewed-by: Fabio Estevam
    Reviewed-by: Jaehoon Chung

    Marek Vasut
     

08 Feb, 2022

1 commit


06 Feb, 2022

1 commit


05 Feb, 2022

1 commit

  • Without this patch the bcb struct could be located at an odd address
    which resulted in data not being copied to the buffer.

    Here was the repro steps (from Mattijs):
    => mmc dev 1
    => bcb load 1 misc
    => bcb dump command
    00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    => part start mmc 1 misc misc_start
    => mmc read ${loadaddr} ${misc_start} 4
    => bcb load 1 misc
    => bcb dump command
    00000000: 62 6f 6f 74 6f 6e 63 65 2d 62 6f 6f 74 6c 6f 61
    00000010: 64 65 72 00 00 00 00 00 00 00 00 00 00 00 00 00

    This behavior was observed on an Amlogic A311D (ARM64) platform with a
    recent GCC toolchain (11.2.0) but is most likely affecting other
    platforms.

    To avoid issues the structure is aligned on DMA minimum alignment value
    as it is passed directly to the read function.

    Signed-off-by: Gary Bisson
    Tested-by: Mattijs Korpershoek # on khadas vim3

    Gary Bisson
     

04 Feb, 2022

1 commit

  • At present we use wide characters for unicode but this is not necessary.
    Change the code to use the 'u' literal instead. This helps to fix build
    warnings for sandbox on rpi.

    Signed-off-by: Simon Glass
    Suggested-by: Heinrich Schuchardt
    Reviewed-by: Heinrich Schuchardt

    Simon Glass
     

29 Jan, 2022

3 commits

  • Allow to call 'pci' and 'pci regions' commands with bus option '*' which
    cause pci to process all buses.

    PCIe is point-to-point HW and so on each bus is maximally one physical
    device. Therefore for PCIe it is common to have multiple buses.

    This change allows to easily print all available PCIe devices in system.

    Make '*' as default option when no bus argument is specified.

    Signed-off-by: Pali Rohár
    Reviewed-by: Stefan Roese

    Pali Rohár
     
  • Currently pci command ignores invalid cmdline arguments and do something.
    Add checks that all passed arguments were processed.

    Signed-off-by: Pali Rohár
    Reviewed-by: Stefan Roese

    Pali Rohár
     
  • 'pci regions' currently prints only region information from bus 0 which
    belongs to controller 0. Parser for 'pci regions' cmdline currently ignores
    any additional arguments and so U-Boot always uses bus 0.

    Regions are stored in controller (not on the bus) and therefore to retrieve
    controller from the bus, it is needed to call pci_get_controller() which
    returns root bus. Because bus 0 is root bus, current code worked fine for
    controller 0.

    Extend cmdline parser for 'pci regions' to allows specifying bus number,
    extend pci_show_regions() code to accept also non-zero bus number and
    print bus ranges for which is regions configuration assigned.

    Signed-off-by: Pali Rohár
    Reviewed-by: Stefan Roese

    Pali Rohár
     

26 Jan, 2022

2 commits

  • At present this is really just a debugging aid, but it is a bit untidy.
    Add proper columns so it is easier to read.

    Sample output for coral:

    => acpi list
    Name Base Size Detail
    ---- -------- ----- ------
    RSDP 79925000 24 v02 U-BOOT
    RSDT 79925030 48 v01 U-BOOT U-BOOTBL 20220101 INTL 0
    XSDT 799250e0 6c v01 U-BOOT U-BOOTBL 20220101 INTL 0
    FACP 79929570 f4 v04 U-BOOT U-BOOTBL 20220101 INTL 1
    DSDT 79925280 32ea v02 U-BOOT U-BOOTBL 20110725 INTL 20180105
    FACS 79925240 40
    MCFG 79929670 2c v01 U-BOOT U-BOOTBL 20220101 INTL 0
    SPCR 799296a0 50 v02 U-BOOT U-BOOTBL 20220101 INTL 0
    TPM2 799296f0 4c v04 U-BOOT U-BOOTBL 20220101 INTL 0
    APIC 79929740 6c v02 U-BOOT U-BOOTBL 20220101 INTL 0
    SSDT 799297b0 1523 v02 U-BOOT U-BOOTBL 20220101 INTL 1
    NHLT 7992ace0 e60 v05 coral coral 3 INTL 0
    DBG2 7992db40 61 v00 U-BOOT U-BOOTBL 20220101 INTL 0
    HPET 7992dbb0 38 v01 U-BOOT U-BOOTBL 20220101 INTL 0

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Allow this to be used on any arch. Also convert to using macros so that
    we can check the CONFIG option in C code.

    Signed-off-by: Simon Glass

    Simon Glass