17 Jan, 2021

1 commit

  • Refine the dependency of some configs to make it
    easier to add/modify android config files.

    Test: builds.

    Change-Id: Iccb044dadc7ce1e0b839bf83e2e9157e718f286c
    Signed-off-by: Ji Luo
    (cherry picked from commit 86f4f99a367bbc0ef99d4ab2a0b4078babfbfbd2)

    Ji Luo
     

08 Jan, 2021

1 commit

  • The device IDs are provisioned from bootloader, this commit
    add commands to provision the deivce IDs:
    $ fastboot oem append-device-id

    Test: Device IDs provision and attest.

    Change-Id: Id3c737d3da02f7ba463e51b0525f3cb9bcf0c6d1
    Signed-off-by: Ji Luo
    (cherry picked from commit 7575ac07ac625c35269868511297385a69c96196)

    Ji Luo
     

30 Oct, 2020

1 commit

  • To use dynamic partition feature in Android, recovery ramdisk is used to
    mount the logical partitions and boot up Android.

    Define a configuration item "CONFIG_ANDROID_DYNAMIC_PARTITION", use it
    to control the bootargs and whether ramdisk should be loaded instead of
    "CONFIG_ANDROID_AUTO" because now Android auto also use dynamic
    partition feature now.

    Move the definition of function "fastboot_setup_system_boot_args" under
    the macro "CONFIG_CMD_BOOTA" to avoid build warnings.

    Signed-off-by: faqiang.zhu
    Change-Id: I0b1cfe6120fc939e7f1a1eb600d8176c81edf129
    (cherry picked from commit 972ccff86796e2b7f9a444d09550cd5e393cd93e)

    faqiang.zhu
     

19 Oct, 2020

1 commit

  • Add config "CONFIG_LOAD_KEY_FROM_RPMB" to decide loading the
    avb public key from RPMB storage or building it statically.

    Test: AVB verify.

    Signed-off-by: Ji Luo
    Change-Id: I1ca09c28bbfa18dd00aa28405389b382e09fe07e
    (cherry picked from commit 5a7973e8f42e54b3cd8ce15624478dcbe19c49fd)

    Ji Luo
     

26 Aug, 2020

2 commits

  • As we have to support GKI and non-GKI at the same time, it will be
    a must to decide if the GKI is enabled or not at run-time.

    This commit will decide the GKI is enabled if the parition "vendor_boot"
    is found in the GPT.

    This commit also make some cleanup to make the code more readable and
    easier to maintain.

    Test: boots on Android and Anroid Auto.

    Signed-off-by: Ji Luo
    Change-Id: I6068bbaa60f5d76049b6ff0a892b5b8ca2c2f86b
    (cherry picked from commit b39f7532ab524408550b8b2827bb42ab38159033)

    Ji Luo
     
  • A 'misc_virtual_ab_message' struct will be stored at the 32kB offset
    in misc partition, which will be used to record the virtual A/B update
    status.

    Bootloader should take care of this status, some operations must be
    restricted. This commit will:
    1. Restrict erase/flash operations to "misc", "userdata" or
    "metadata" partitions if the merge status are "SNAPSHOTTED" or
    "MERGING".
    2. Restrict slot switch if the merge status is "MERGING".
    3. Output a warning in slot switch if the merge status is "SNAPSHOTTED".
    4. Set the merge status as "CANCELLED" if image flash happen.

    Test: 1. fastboot erase/flash "userdata", "misc", "metadata" after virtual
    A/B update
    2. slot switch after virtual A/B update

    Signed-off-by: Ji Luo
    Change-Id: I33f0041c5e76913d3970d943cad52353e0ac5f2d
    (cherry picked from commit 30df087bfc5e31413473f85dfefaa7176bc394a8)

    Ji Luo
     

16 Jun, 2020

5 commits

  • 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
    Change-Id: Ib3298ae46bfc728aa4a34909d372eff6cc86ca70

    Ji Luo
     
  • According to the spec of android wear, the device MUST provides a
    bootloader menu for debugging purpose.

    This commit implements a simple bootloader menu based on imx7ulp_evk
    revb board, the menu will show when booting with 'VOL+' key pressed,
    users can press "VOL+" to choose the item, then press "ONOFF" key to
    confirm.

    Test: bootloader menu show on imx7ulp_evk revb.

    Change-Id: I80638a43afa17e312e633b05888c62440380b42b
    Signed-off-by: Ji Luo

    Ji Luo
     
  • According to the google boot flow, an orange warning should
    be displayed on UNLOCKED device to reminder the users of the
    potential risks.

    This commit will show an orange warning logo and warning text
    on the screen, it shall be dismissed after 3 seconds, users
    can also skip it by pressing the ON-OFF button.

    Config 'CONFIG_AVB_WARNING_LOGO_COLS' and 'CONFIG_AVB_WARNING_LOGO_ROWS'
    define the (x, y) position of the warning logo, its default
    value is for 1080*720 resolution display and can be overridden.

    Test: Orange warning logo show on all imx8m/imx8q platfroms.

    Change-Id: I607edb3da039b47ddfac681f855834d8da187af8
    Signed-off-by: Ji Luo

    Ji Luo
     
  • Guard oem unlock permission protection feature with new config
    'CONFIG_TRUSTY_UNLOCK_PERMISSION', so we can enable or disable
    it as needed.

    Test: build and boot on imx8mm.

    Signed-off-by: Ji Luo
    (cherry picked from commit c664d8e8b94e9b6f66b2bf04d1be47e9b8a22978)

    Change-Id: If1db4b46ecac21b8f187854531704eaff2df30c4

    Ji 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
    (cherry picked from commit 631149fc0fc8ce035311949db643c2708e41435a)

    Ji Luo
     

06 May, 2020

1 commit

  • Porting the android AVB lib from imx u-boot v2018.03. Since 2019 u-boot
    has added latest AVB library, try to reuse it.

    Signed-off-by: Ye Li
    (cherry picked from commit 2105662ada738a271e12a81d775134a5821dc38f)
    (cherry picked from commit f7291d86c4183ce2e299ad271aa5618c71507ffc)
    (cherry picked from commit b871714c519e1bda3de6afbd354bee2cb246e4b7)

    Ye Li
     

26 Jan, 2020

1 commit


15 Dec, 2019

1 commit

  • SPL and TPL can access information about binman entries using link-time
    symbols but this is not available in U-Boot proper. Of course it could be
    made available, but the intention is to just read the device tree.

    Add support for this, so that U-Boot can locate entries.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     

07 Dec, 2019

5 commits

  • Imported from linux kernel v5.3:
    x509.asn1 without changes
    x509_akid.asn1 without changes
    x509_parser.h without changes
    x509_cert_parser.c with changes marked as __UBOOT__
    x509_public_key.c with changes marked as __UBOOT__

    Signed-off-by: AKASHI Takahiro

    AKASHI Takahiro
     
  • Imported from linux kernel v5.3:
    build_OID_registry without changes
    oid_registry.h without changes
    oid_registry.c with changes marked as __UBOOT__

    Signed-off-by: AKASHI Takahiro

    AKASHI Takahiro
     
  • Imported from linux kernel v5.3:
    lib/asn1_decoder.c with changes marked as __UBOOT__

    Signed-off-by: AKASHI Takahiro

    AKASHI Takahiro
     
  • Imported from linux kernel v5.3:
    asn1.h without changes
    asn1_ber_bytecode.h without changes
    asn1_decoder.h without changes
    asn1_compiler.c without changes

    This host command will be used to create a ASN1 parser, for example,
    for pkcs7 messages or x509 certificates. More specifically, it will
    generate *byte code* which will be interpreted by asn1 decoder library.

    Signed-off-by: AKASHI Takahiro
    Reviewed-by: Heinrich Schuchardt

    AKASHI Takahiro
     
  • In the next commit, rtc_mktime(), for compatibility with linux, will be
    implemented using rtc_mktime(), which is no longer drivers/rtc specific.
    So move this file under lib/.

    Signed-off-by: AKASHI Takahiro

    AKASHI Takahiro
     

03 Dec, 2019

1 commit


05 Nov, 2019

1 commit

  • For better or worse libfdt recent grew a lot of code that checks the
    validity of the device tree in great detail. When using unsigned or
    unverified data this makes things safer, but it does add to code size.

    Add some controls to select the trade-off between safety and code size.

    Signed-off-by: Simon Glass
    Reviewed-by: Tom Rini

    Simon Glass
     

08 Oct, 2019

1 commit

  • At present there is only one control for this and it is used for both SPL
    and TPL. But SPL might have a lot more space than TPL so the extra cost of
    a full printf() might be acceptable.

    Split the option into two, providing separate SPL and TPL controls. The
    TPL setting defaults to the same as SPL.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     

13 Jul, 2019

1 commit

  • The USE_TINY_PRINTF symbol only changes things within SPL and TPL
    builds, so make it depend on that support. Next, make it default as
    within these cases we should rarely have need of more advanced print
    formats outside of the debug context.

    To do this, in a few cases we need to correct our Kconfig dependencies
    as we had cases of non-SPL targets select'ing this symbol. Finally, in
    the case of a few boards we really do need the full printf
    functionality.

    Signed-off-by: Tom Rini

    Tom Rini
     

11 Jul, 2019

1 commit

  • Up to now we had hard coded values for the call depth up to which trace
    records are created: 200 for early tracing, 15 thereafter. UEFI
    applications reach a call depth of 80 or above.

    Provide customizing settings for the call trace depth limit and the early
    call trace depth limit. Use the old values as defaults.

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

    Heinrich Schuchardt
     

05 May, 2019

2 commits

  • Add the zstd library from Linux kernel (only decompression support).
    There are minimal changes to build with U-Boot, otherwise the files are
    identical to Linux commit dc35da16 from March 2018, the files had not
    been touched since in kernel. Also SPDX lincese tags were added.

    Signed-off-by: Marek Behún

    Marek Behún
     
  • This adds the xxhash support from Linux. Files are almost identical to
    those added to Linux in commit 5d240522 ("lib: Add xxhash module") (they
    haven't been touched since in Linux). The only difference is to add some
    includes to be compatible with U-Boot. Also SPDX lincese tags were
    added.

    Signed-off-by: Marek Behún

    Marek Behún
     

03 May, 2019

1 commit


24 Apr, 2019

2 commits


12 Apr, 2019

1 commit


10 Apr, 2019

1 commit


18 Jan, 2019

1 commit


21 Nov, 2018

1 commit


15 Nov, 2018

1 commit


09 Oct, 2018

2 commits


27 Jul, 2018

1 commit

  • fdt_fixup_mtdparts() calls mtdparts_init() and device_find(),
    which are defined in cmd/mtdparts.c

    The combination of FDT_FIXUP_PARTITIONS=y and CMD_MTDPARTS=n
    emits the following link error:

    common/fdt_support.c:903: undefined reference to `mtdparts_init'
    common/fdt_support.c:914: undefined reference to `device_find'

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Simon Glass

    Masahiro Yamada
     

19 Jun, 2018

1 commit


13 Jun, 2018

1 commit

  • Often during debugging session it's very interesting to see
    what data we were dealing with. For example what we write or read
    to/from memory or peripherals.

    This change introduces functions that allow to dump binary
    data with one simple function invocation like:
    ------------------->8----------------
    print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf, len);
    ------------------->8----------------

    which gives us the following:
    ------------------->8----------------
    00000000: f2 b7 c9 88 62 61 75 64 72 61 74 65 3d 31 31 35 ....baudrate=115
    00000010: 32 30 30 00 62 6f 6f 74 61 72 67 73 3d 63 6f 6e 200.bootargs=con
    00000020: 73 6f 6c 65 3d 74 74 79 53 33 2c 31 31 35 32 30 sole=ttyS3,11520
    00000030: 30 6e 38 00 62 6f 6f 74 64 65 6c 61 79 3d 33 00 0n8.bootdelay=3.
    00000040: 62 6f 6f 74 66 69 6c 65 3d 75 49 6d 61 67 65 00 bootfile=uImage.
    00000050: 66 64 74 63 6f 6e 74 72 6f 6c 61 64 64 72 3d 39 fdtcontroladdr=9
    00000060: 66 66 62 31 62 61 30 00 6c 6f 61 64 61 64 64 72 ffb1ba0.loadaddr
    00000070: 3d 30 78 38 32 30 30 30 30 30 30 00 73 74 64 65 =0x82000000.stde
    00000080: 72 72 3d 73 65 72 69 61 6c 30 40 65 30 30 32 32 rr=serial0@e0022
    00000090: 30 30 30 00 73 74 64 69 6e 3d 73 65 72 69 61 6c 000.stdin=serial
    000000a0: 30 40 65 30 30 32 32 30 30 30 00 73 74 64 6f 75 0@e0022000.stdou
    000000b0: 74 3d 73 65 72 69 61 6c 30 40 65 30 30 32 32 30 t=serial0@e00220
    000000c0: 30 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00..............
    ...
    ------------------->8----------------

    Source of hexdump.c was copied from Linux kernel v4.7-rc2.

    Signed-off-by: Alexey Brodkin
    Cc: Anatolij Gustschin
    Cc: Mario Six
    Cc: Simon Glass
    Cc: Tom Rini
    Cc: Stefan Roese

    Alexey Brodkin
     

30 May, 2018

1 commit

  • Introduce CONFIG_IMAGE_SPARSE and CONFIG_CMD_MMC_SWRITE so the "mmc
    swrite" command is separated from the fastboot code.

    Move image-sparse from common to lib so it's clear it's library code.

    Rename CONFIG_FASTBOOT_FLASH_FILLBUF_SIZE to CONFIG_IMAGE_SPARSE_FILLBUF_SIZE
    and migrate it to Kconfig.

    Signed-off-by: Alex Kiernan
    Acked-by: Jassi Brar
    Reviewed-by: Simon Glass

    Alex Kiernan