18 May, 2020

7 commits

  • Include correct header files to avoid build warning:
    common/image-android.c:151:68: warning: implicit declaration
    of function ‘mmc_get_env_dev’ [-Wimplicit-function-declaration]
    " androidboot.boot_device_root=mmcblk%d", mmc_map_to_kernel_blk(mmc_get_env_dev()));

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

    Ji Luo
     
  • androidboot.storage_type has been replaced by androidboot.boot_device_root.

    Change-Id: Ibec80808e6ae720be128c0a2d9e2f4d325c56716
    Signed-off-by: Jindong
    (cherry picked from commit 6a5534d13b9e7fe14a457c5f4664b054382d35e3)

    Jindong
     
  • The A/B slot selection is moved to spl, it may lead to hang
    if no bootable slots found. The only way to recover the board
    is re-flash images with uuu tool, which is quite inconvenient
    for some customers who can't enter serial download mode.

    This patch will set "spl recovery mode" which will give us a
    chance to re-flash images with fastboot commands.

    Test: Enter spl recovery mode and flash images when no bootable
    slots found.

    Change-Id: I31278f5212bde7609fe2f49e77b3849e92c0c516
    Signed-off-by: Ji Luo
    (cherry picked from commit 46cc755cf3f42422ee1d7783394e14e8125df2b6)

    Ji Luo
     
  • Do not pass BDADDR from uboot cmdline when
    serial is all zero, and instead btmacaddr
    will be set from persist.service.bdroid.bdaddr
    which is set in device's init.freescale.rc

    Change-Id: I429c6f369d0b7aaca643443fe505d943a3901215
    Signed-off-by: yang.tian
    (cherry picked from c23398fb379131ad3c5c17c3d762c582796698fb)

    yang.tian
     
  • storage_type is emmc or sd, which is not friendly
    for user space, for example android health HAL need access
    /sys/block/mmcblkX/stat.

    Replace it with mmcblkX named as boot_device_root.
    (Keep storage_type for compatibility now)

    Change-Id: I7486d522696e9fe3dde8bdc8834ac11d25df7d79
    Signed-off-by: Jindong
    (cherry picked from commit db441a89a090c46149457ee29492bc315c2bdfa9)

    Jindong
     
  • 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
    Reviewed-by: Ye Li
    (cherry picked from commit 690a14ed2fc64328b417a9de448f4a18cc653698)

    Ji Luo
     
  • This commit enables dual bootloader feature for imx8m/imx8q, but
    as commit 'a2018ab' already brings in some dual bootloader codes
    when enabling fastboot support, so this commit won't be a complete
    and standalone patch to introduce the dual bootloader feature.

    This commit will do the following:
    1. clean up dual bootloader flow and add missing implementation.
    2. Merge the dual bootloader entry for fit and container to one
    function 'mmc_load_image_raw_sector_dual_uboot'.

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

    Ji Luo
     

11 May, 2020

2 commits

  • Meet below warning on ARM64 platform, because the bmp_load_addr
    is defined to u32.

    common/splash.c: In function ‘splash_video_logo_load’:
    common/splash.c:74:9: warning: cast to pointer from integer
    of different size [-Wint-to-pointer-cast]
    74 | memcpy((void *)bmp_load_addr, bmp_logo_bitmap,

    Signed-off-by: Ye Li
    (cherry picked from commit 037db06f9441b0e889c730f78874d3b120942ea9)

    Ye Li
     
  • 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)

    Ye Li
     

27 Apr, 2020

14 commits

  • 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)

    Sherry Sun
     
  • When download image through ROM API for stream mode (USB, eMMC fastboot).
    We uses tricky way to get the total image size:
    The spl_load_simple_fit is called but the data reading is invalid, so the image
    data is not really downloaded.
    We should not call HAB authenticate in this tricky way. Otherwise it
    will alway fail.
    This patch add a new flag SPL_FIT_BYPASS_POST_LOAD to skip the authentication
    only for this tricky using.

    Signed-off-by: Ye Li
    Reviewed-by: Peng Fan
    (cherry picked from commit 47b0cf6de06ff9b3e2b2755d5c8203210378b26a)
    (cherry picked from commit 3e50573a7007771586e737b343bdde4d98c21c23)

    Ye Li
     
  • When enable CONFG_SPL_DM_USB_GADGET, sdp should use
    usb_gadget_initialize() and usb_gadget_release() to
    support DM gadget driver.

    Signed-off-by: Sherry Sun
    (cherry picked from commit 22b59b69af0bfc0a2aeff9a995252d58c77c3955)

    Sherry Sun
     
  • Previous patch "MLK-21885 lmb: Handle the overlap case for lmb reserve" adds
    the overlap support to lmb reserve. However, u-boot has some places to use the
    lmb_reserve when allocating memory in loading images. If we allowed overlap
    in this function, it means images loading address can overlap each other and
    cause the address check mechanism not work.

    So add another function to allow overlap and only use it for fdt reserved-memory
    nodes. The FDT reserved-memory is ok to merge with other reserved memory, since
    this won't break image loading address check.

    Signed-off-by: Ye Li
    (cherry picked from commit 2109dc2a4da592003ec62820f5bdfb6bd0899805)

    Ye 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
    Reviewed-by: Peng Fan
    (cherry picked from commit 710efd3ccb99e144bd30af8e1ee46459b4a54dd6)
    (cherry picked from commit f48835f0b6b801cb267b4c27a50136c93dfd3bcf)

    Ye Li
     
  • When booting from USB device, change u-boot autoboot to default
    run UUU bootcmd or enter fastboot directly for android.

    Signed-off-by: Ye Li
    (cherry picked from commit eba8710106348a283940b851080b049bc7fbe466)

    Ye Li
     
  • Use trusty_os_init to load Trusty OS from CONFIG_TRUSTY_OS_ENTRY
    before u-boot ready.

    Add Trusty OS SOC level codes and u-boot/SPL common codes.

    Signed-off-by: Ye Li
    Signed-off-by: Haoran.Wang
    (cherry picked from commit 1ae9ecc73f5001b8bd743011c06a7d07861be64e)
    (cherry picked from commit 6fa4f4a42fd90631f8dc8303b17f600c085d8595)

    Ye Li
     
  • 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)

    Ye Li
     
  • 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
     
  • 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
    Signed-off-by: Robby Cai
    Signed-off-by: Nitin Garg
    Signed-off-by: Ye.Li
    (cherry picked from commit a7244f279cc3c3994bcd103f5e9a183b1075ae71)
    (cherry picked from commit 21bf1c38b7d75c31875fb02a972c458f25d9c33a)
    (cherry picked from commit 237742f73998b35dd896592e19f1e119e72baa71)

    Peng Fan
     
  • Because SDP directly jumps to next level boot image, we'd better
    clean up the USB driver before it. Implement a weak callback function,
    that spl sdp can use it to clean up USB driver.

    Signed-off-by: Ye Li
    (cherry picked from commit 1f6b3efc62cb277fd4316d8ed5115f47b09369a0)
    (cherry picked from commit a3ed6467a4efb7acaa15281ec2c37e7f051b00db)

    Ye Li
     
  • Add a new configuration CONFIG_SPL_SDP_USB_DEV to specify the
    usb index for spl sdp driver, so that we change use different device.
    The default value is 0.

    Signed-off-by: Ye Li
    (cherry picked from commit dba0d7c7dc3b9b60043726931b1f635b725e9756)
    (cherry picked from commit c2da455b3d690d1d0bafece240360a288dad661a)

    Ye Li
     
  • Need initialize UDC before run sdp download

    Signed-off-by: Frank Li
    (cherry picked from commit ab6696c4f7ff3f13153e27b696fcbf38188b009a)
    (cherry picked from commit 9f0962216f852a7f5ade66bbf66f57a36654a5bd)

    Frank Li
     
  • The RAW image support must be disabled, otherwise a RAW image can be used
    to bypass FIT image.

    Signed-off-by: Ye Li
    (cherry picked from commit ca7ebfcf0737699d5f62f97be4b0015c88108ae7)
    (cherry picked from commit 9e9524c86a08d5b16bb94c1a30eda378536c4860)

    Ye Li
     

23 Apr, 2020

1 commit


10 Apr, 2020

1 commit

  • Rather than keeping the asynchronous schedule running always, keep it
    running only across USB mass storage transfers for now, as it seems
    that keeping it running all the time interferes with certain control
    transfers during device enumeration.

    Note that running the async schedule all the time should not be an
    issue, especially on EHCI HCD, as that one implements most of the
    transfers using async schedule.

    Note that we have usb_disable_asynch(), which however is utterly broken.
    The usb_disable_asynch() blocks the USB core from doing async transfers
    by setting a global flag. The async schedule should however be disabled
    per USB controller. Moreover, setting a global flag does not prevent the
    controller from using the async schedule, which e.g. the EHCI HCD does.

    This patch implements additional callback to the controller, which
    permits it to lock the async schedule and keep it running across
    multiple transfers. Once the schedule is unlocked, it must also be
    disabled. This thus prevents the async schedule from running outside
    of the USB mass storage transfers.

    Signed-off-by: Marek Vasut
    Cc: Lukasz Majewski
    Cc: Tom Rini
    Tested-by: Tom Rini [omap3_beagle, previously failing]

    Marek Vasut
     

03 Apr, 2020

1 commit


02 Apr, 2020

1 commit

  • Enable pre console buffer for rk3399 platform.

    This would help to capture the console messages prior to
    the console being initialised. Enabling this would help
    to capture all the console messages on video output source
    like HDMI. So we can find the full console messages of
    U-Boot proper on HDMI display when enabled it for RK3399
    platform boards.

    Buffer address used for pre console is 0x0f200000 which is
    ram base plus 240MiB. right now the Allwinner SoC is using
    similar computation.

    Signed-off-by: Jagan Teki
    Reviewed-by: Kever Yang
    Tested-by: Peter Robinson

    Jagan Teki
     

01 Apr, 2020

6 commits


31 Mar, 2020

1 commit


13 Mar, 2020

1 commit

  • GCC-10 reports:

    In file included from tools/common/image-fit.c:1:
    include/image.h: In function ‘fit_image_get_data_and_size’:
    ./tools/../common/image-fit.c:1015:9: warning: ‘len’ may be used
    uninitialized in this function [-Wmaybe-uninitialized]
    1015 | *size = len;
    | ~~~~~~^~~~~
    ./tools/../common/image-fit.c:996:6: note: ‘len’ was declared here
    996 | int len;
    | ^~~

    Add the missing check of the return value of fit_image_get_data_size().

    Fixes: c3c863880479 ("add FIT data-position & data-offset property support")
    Signed-off-by: Heinrich Schuchardt
    Reviewed-by: Simon Goldschmidt

    Heinrich Schuchardt
     

09 Mar, 2020

1 commit


19 Feb, 2020

1 commit

  • Enable pre console buffer for rk3288 platform.

    This would help to capture the console messages prior to
    the console being initialised. Enabling this would help
    to capture all the console messages on video output source
    like HDMI. So we can find the full console messages of
    U-Boot proper on HDMI display when enabled it for RK3288
    platform boards.

    Buffer address used for pre console is 0x0f000000 which is
    ram base plus 240MiB. right now the Allwinner SoC is using
    similar computation.

    Signed-off-by: Jagan Teki
    Reviewed-by: Kever Yang

    Jagan Teki
     

13 Feb, 2020

2 commits

  • clear_bss is already used by 3 arches (x86, arc, xtensa), so make it generic
    and provide a weak nop stub for it. This also removes arch-specific ifdef
    duplications around clear_bss.

    Signed-off-by: Ovidiu Panait

    Ovidiu Panait
     
  • Avoid errors of like

    common/console.c: In function ‘console_record_reset’:
    common/console.c:615:16: error: passing argument 1 of ‘membuff_purge’
    discards ‘volatile’ qualifier from pointer target type
    [-Werror=discarded-qualifiers]
    615 | membuff_purge(&gd->console_out);
    | ^~~~~~~~~~~~~~~~

    by casting to non-volatile.

    The volatile property stems from declarations like

    arch/arm/include/asm/global_data.h:114:

    But there is no need to treat gd->console_out and gd->console_in as
    volatile in the context of common/console.c.

    Fixes: b612312816ff ("console: Add a function to read a line of the output / eof")
    Signed-off-by: Heinrich Schuchardt
    Reviewed-by: Simon Glass

    Heinrich Schuchardt
     

11 Feb, 2020

1 commit