21 May, 2020

1 commit

  • 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
     

19 May, 2020

1 commit

  • 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
     

18 May, 2020

2 commits

  • 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
     

27 Apr, 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
     

08 May, 2018

2 commits


29 Apr, 2018

1 commit

  • When SPL serial is disabled, callers who need sprintf or strtoul fail
    because their inclusion is guarded by CONFIG_SPL_SERIAL_SUPPORT/
    CONFIG_TPL_SERIAL_SUPPORT.

    Split printf, sprintf and strto into their own entries and then select
    all of them if SERIAL_SUPPORT is enabled to match the current behaviour.

    Include panic.o unconditionally as it can be called from anywhere which
    uses BUG_ON().

    Signed-off-by: Alex Kiernan

    Alex Kiernan
     

05 Apr, 2018

1 commit


04 Apr, 2018

1 commit

  • In January some commits were introduced to mitigate the U-Boot image
    size issues we encountered on sunxi builds.
    Now with the MMC environment removed we can bring them back, as we
    practically don't have a size limit anymore.

    Signed-off-by: Andre Przywara
    Acked-by: Maxime Ripard
    Reviewed-by: Jagan Teki

    Andre Przywara
     

20 Mar, 2018

1 commit

  • This patch adds code to lib to enable sharing of useful OPTEE code between
    board-ports and architectures. The code on lib/optee/optee.c comes from the
    TI omap2 port. Eventually the OMAP2 code will be patched to include the
    shared code. The intention here is to add more useful OPTEE specific code
    as more functionality gets added.

    Signed-off-by: Bryan O'Donoghue
    Cc: Harinarayan Bhatta
    Cc: Andrew F. Davis
    Cc: Tom Rini
    Cc: Kever Yang
    Cc: Philipp Tomsich
    Cc: Peng Fan
    Tested-by: Peng Fan

    Bryan O'Donoghue
     

15 Feb, 2018

1 commit