02 Apr, 2018

3 commits

  • U-Boot can instantiate CAAM RNG if needed by crypto operations.
    Call sec_init() prior running a blob operation to ensure
    RNG is correctly instantiated.

    Make sure CAAM clock is enabled and check if a job ring is
    available for that operation.

    Signed-off-by: Breno Lima
    Reviewed-by: Ye Li
    (cherry picked from commit b2b745515d06f05ea288524e26cf2389d6924ff2)

    Breno Lima
     
  • In order to build CMD_BLOB on i.MX CAAM supported devices it's
    necessary to select SECURE_BOOT. Add SECURE_BOOT and CAAM supported
    SoCs as dependency.

    Signed-off-by: Breno Lima
    Reviewed-by: Ye Li
    (cherry picked from commit 4afb519038d190687cac6d410e9ad65d0655f1c0)

    Breno Lima
     
  • This converts the following to Kconfig:
    CONFIG_CMD_BLOB

    Signed-off-by: Simon Glass
    [trini: Add imply CMD_BLOB under CHAIN_OF_TRUST]
    Signed-off-by: Tom Rini
    [Breno: Backported to v2017.03]
    Signed-off-by: Breno Lima
    Reviewed-by: Ye Li

    (cherry picked from commit 921eb14d54c612680c3e73d9ddf9e1b9f526905f)

    Simon Glass
     

28 Mar, 2018

1 commit


08 Dec, 2017

1 commit


30 Nov, 2017

1 commit


03 Nov, 2017

3 commits


18 May, 2017

1 commit


05 Apr, 2017

3 commits

  • Add Android support for mx6qarm2 lpddr2 pop target

    Signed-off-by: Adrian Alonso
    (cherry picked from commit 6356f2b420f3571493755f6b3a307a66a539b60c)

    Adrian Alonso
     
  • Integrate the FSL android fastboot features into community's fastboot.

    1. Use USB gadget g_dnl driver
    2. Integrate the FSL SD/SATA/NAND flash operations, since the GPT and
    EFI partitions are not support by i.MX.
    3. Add FDT support to community's android image.
    4. Add a new boot command "boota" for android image boot. The boota
    implements to load ramdisk and fdt to their loading addresses
    specified in boot.img header, while bootm won't do it for android image.
    5. Support the authentication of boot.img at the "load_addr" for
    both SD and NAND.
    6. We use new configuration CONFIG_FSL_FASTBOOT for Freescale's fastboot
    with relevant header file "fsl_fastboot.h". While disabling the
    configuration, the community fastboot is used.
    7. Overwrite the cmdline in boot.img by using bootargs saved in local environment.
    8. Add recovery and reboot-bootloader support.

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

    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)

    Ye Li
     

13 Feb, 2017

1 commit

  • We repeated partial moves for CONFIG_SYS_NO_FLASH, but this is
    not completed. Finish this work by the tool.

    During this move, let's rename it to CONFIG_MTD_NOR_FLASH.
    Actually, we have more instances of "#ifndef CONFIG_SYS_NO_FLASH"
    than those of "#ifdef CONFIG_SYS_NO_FLASH". Flipping the logic will
    make the code more readable. Besides, negative meaning symbols do
    not fit in obj-$(CONFIG_...) style Makefiles.

    This commit was created as follows:

    [1] Edit "default n" to "default y" in the config entry in
    common/Kconfig.

    [2] Run "tools/moveconfig.py -y -r HEAD SYS_NO_FLASH"

    [3] Rename the instances in defconfigs by the following:
    find . -path './configs/*_defconfig' | xargs sed -i \
    -e '/CONFIG_SYS_NO_FLASH=y/d' \
    -e 's/# CONFIG_SYS_NO_FLASH is not set/CONFIG_MTD_NOR_FLASH=y/'

    [4] Change the conditionals by the following:
    find . -name '*.[ch]' | xargs sed -i \
    -e 's/ifndef CONFIG_SYS_NO_FLASH/ifdef CONFIG_MTD_NOR_FLASH/' \
    -e 's/ifdef CONFIG_SYS_NO_FLASH/ifndef CONFIG_MTD_NOR_FLASH/' \
    -e 's/!defined(CONFIG_SYS_NO_FLASH)/defined(CONFIG_MTD_NOR_FLASH)/' \
    -e 's/defined(CONFIG_SYS_NO_FLASH)/!defined(CONFIG_MTD_NOR_FLASH)/'

    [5] Modify the following manually
    - Rename the rest of instances
    - Remove the description from README
    - Create the new Kconfig entry in drivers/mtd/Kconfig
    - Remove the old Kconfig entry from common/Kconfig
    - Remove the garbage comments from include/configs/*.h

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

09 Feb, 2017

4 commits

  • CONFIG_CMD_ZIP is not defined by any board. I am moving
    CONFIG_CMD_UNZIP to defconfig files except UniPhier SoC family.

    I am the maintainer of UniPhier platform, so I know "select CMD_UNZIP"
    is better for this platform.

    Signed-off-by: Masahiro Yamada
    Acked-by: Michal Simek
    Acked-by: Stefan Roese
    Acked-by: Ryan Harkin
    Tested-by: Ryan Harkin

    Masahiro Yamada
     
  • Now when CONFIG_CMD_IMLS_NAND is enabled the u-boot build will fail,
    because nand_read_skip_bad() function has been changed to accept more
    parameters, hence fix it.

    CC cmd/bootm.o
    cmd/bootm.c: In function 'nand_imls_legacyimage':
    cmd/bootm.c:390:8: error: too few arguments to function 'nand_read_skip_bad'
    ret = nand_read_skip_bad(mtd, off, &len, imgdata);
    ^
    In file included from cmd/bootm.c:18:0:
    include/nand.h:101:5: note: declared here
    int nand_read_skip_bad(struct mtd_info *mtd, loff_t offset, size_t *length,
    ^
    LD drivers/block/built-in.o

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

    Grygorii Strashko
     
  • The previous commit ("add a new command to show .config contents")
    improves the basic infrastructure of "embed a compressed file into
    the U-Boot image, and print it by a command". The same pattern for
    the "license" command.

    This commit reworks the command to improve the following:

    [1] Improve log style

    Kbuild style log

    GZIP cmd/license_data.gz
    CHK cmd/license_data_gz.h
    UPD cmd/license_data_gz.h
    CHK cmd/license_data_size.h
    UPD cmd/license_data_size.h

    instead of the bare Make log:

    cat ./Licenses/gpl-2.0.txt | gzip -9 -c | \
    tools/bin2header license_gzip > ./include/license.h

    [2] Collect related code into the "cmd" directory

    Prior to this commit, the license.h was created by tools/Makefile,
    placed under the "include" directory, included from cmd/license.c,
    and deleted by the top-level Makefile. It is not a good idea to
    scatter related code.

    [3] Drop the fixed-malloc size LICENSE_MAX

    Just allocate the minimum required size of buffer because we know
    the size of the original gpl-2.0.txt.

    [4] Fix more issues

    Terminate the buffer with zero to prevent puts() from over-running.
    Add "static" to do_license.

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

    Masahiro Yamada
     
  • This feature is inspired by /proc/config.gz of Linux. In Linux,
    if CONFIG_IKCONFIG is enabled, the ".config" file contents are
    embedded in the kernel image. If CONFIG_IKCONFIG_PROC is also
    enabled, the ".config" contents are exposed to /proc/config.gz.
    Users can do "zcat /proc/config.gz" to check which config options
    are enabled on the running kernel image.

    The idea is almost the same here; if CONFIG_CMD_CONFIG is enabled,
    the ".config" contents are compressed and saved in the U-Boot image,
    then printed by the new command "config".

    The usage is quite simple. Enable CONFIG_CMD_CONFIG, then run
    > config
    from the command line interface. The ".config" contents will be
    printed on the console.

    This feature increases the U-Boot image size by about 4KB (this is
    mostly due to the gzip-compressed .config file). By default, it is
    enabled only for Sandbox because we do not care about the memory
    footprint on it. Of course, this feature is architecture agnostic,
    so you can enable it on any board if the image size increase is
    acceptable for you.

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

    Masahiro Yamada
     

01 Feb, 2017

1 commit


29 Jan, 2017

1 commit

  • Commit ec6617c39741adc6c549 ("armv8: Support loading 32-bit OS in AArch32
    execution state") broke SMP boot by assuming that an image is 32-bit if
    the arch field in the spin table != IH_ARCH_DEFAULT (i.e.
    IH_ARCH_ARM64), even if the arch field also does not match IH_ARCH_ARM,
    even though nothing actually set the arch field in the spin table.

    Commit e2c18e40b111470f ("armv8: fsl-layerscape: SMP support for loading
    32-bit OS") fixed this for bootm by setting the arch field of the spin
    table based on images.os.arch, but booti remaineed broken because it did
    not set images.os.arch.

    Fixes: ec6617c39741adc6c549 ("armv8: Support loading 32-bit OS in AArch32 execution state")
    Fixes: e2c18e40b111 ("armv8: fsl-layerscape: SMP support for loading 32-bit OS")
    Cc: Alison Wang
    Cc: Chenhui Zhao
    Cc: York Sun
    Cc: Stuart Yoder
    Signed-off-by: Scott Wood
    Reviewed-by: Tom Rini

    Scott Wood
     

28 Jan, 2017

4 commits


27 Jan, 2017

1 commit


26 Jan, 2017

1 commit


25 Jan, 2017

1 commit


24 Jan, 2017

1 commit


22 Jan, 2017

1 commit

  • Move all of the status LED feature to drivers/led/Kconfig.
    The LED status definitions were moved from the board configuration
    files to the defconfig files.

    TBD: Move all of the definitions in the include/status_led.h to the
    relevant board's defconfig files.

    Tested boards: CL-SOM-AM57x, CM-T335

    Signed-off-by: Uri Mashiach

    Uri Mashiach
     

21 Jan, 2017

1 commit


20 Jan, 2017

3 commits

  • Signed-off-by: Sébastien Szymanski

    Sébastien Szymanski
     
  • In 35fc84f, bootm was refactored so plain 'bootm' and
    'bootm ' shared a common implementation.
    The 'bootm ramdisk' command implementation is now part of the common
    implementation but not invoke by plain 'bootm' since the original
    implementation never did ramdisk relocation. Instead, ramdisk
    relocation happened in image_setup_linux() which is typically called
    during the OS portion of 'bootm'.

    On ARM, parameters to the Linux kernel can either be passed by FDT or
    ATAGS. When using FDT, image_setup_linux() is called which also triggers
    ramdisk relocation. When using ATAGS, image_setup_linux() is _not_
    called because it mostly does FDT setup.

    Instead of calling image_setup_linux() in both FDT and ATAGS cases,
    include BOOTM_STATE_RAMDISK in the requested states during a plain
    'bootm' if CONFIG_SYS_BOOT_RAMDISK_HIGH is set and remove the ramdisk
    relocation from image_setup_linux(). This causes ramdisk relocation to
    happen on any system where CONFIG_SYS_BOOT_RAMDISK_HIGH regardless of
    the OS being booted. Also remove IMAGE_ENABLE_RAMDISK_HIGH as it was
    only used by the now-removed code from image_setup_linux().

    Signed-off-by: Rick Altherr
    Reviewed-by: Simon Glass
    Reviewed-by: Joel Stanley

    Rick Altherr
     
  • Tom Rini
     

19 Jan, 2017

1 commit

  • For 64-bit kernel, there is a warning about x1-x3 nonzero in violation
    of boot protocol. To fix this issue, input argument 4 is added for
    armv8_switch_to_el2 and armv8_switch_to_el1. The input argument 4 will
    be set to the right value, such as zero.

    Signed-off-by: Alison Wang
    Reviewed-by: Alexander Graf
    Tested-by: Ryan Harkin
    Tested-by: Michal Simek
    Reviewed-by: York Sun

    Alison Wang
     

17 Jan, 2017

1 commit

  • By enabling DM_USB information about number of storage devices
    was lost.
    Get this information back simply by printing number of devices detected
    via BLK uclass.

    For example:
    scanning bus 0 for devices... 7 USB Device(s) found
    scanning usb for storage devices... 3 Storage Device(s) found
    scanning usb for ethernet devices... 0 Ethernet Device(s) found

    Signed-off-by: Michal Simek

    Michal Simek
     

15 Jan, 2017

2 commits

  • Since commit aa6ab905b2, sata_initialize returns -1 if init_sata or
    scan_sata fails. But this return value becomes the do_sata return
    value which is equivalent to CMD_RET_USAGE.

    In case one issues 'sata init' and that the hardware fails to
    initialize, there's no need to display the command usage. Instead
    the command shoud just return the CMD_RET_FAILURE value.

    Fixes: aa6ab905b2 (sata: fix sata command can not being executed bug)

    Signed-off-by: Gary Bisson
    Reviewed-by: Eric Nelson
    Reviewed-by: Simon Glass

    Gary Bisson
     
  • On a Raspberry Pi 2 disagreements on cell endianness can be observed:

    U-Boot> fdt print /soc/gpio@7e200000 phandle
    phandle =
    U-Boot> fdt get value myvar /soc/gpio@7e200000 phandle; printenv myvar
    myvar=0x0D000000

    Fix this by always treating the pointer as BE and converting it in
    fdt_value_setenv(), like its counterpart fdt_parse_prop() already does.

    Consistently use fdt32_t, fdt32_to_cpu() and cpu_to_fdt32().

    Fixes: bc80295 ("fdt: Add get commands to fdt")
    Cc: Joe Hershberger
    Cc: Gerald Van Baren
    Signed-off-by: Andreas Färber
    Acked-by: Simon Glass

    Andreas Färber
     

14 Jan, 2017

1 commit


13 Jan, 2017

1 commit

  • Simplify the 'cp' command implementation by using the memcpy() function,
    which brings the additional benefit of performance gain for those who have
    CONFIG_USE_ARCH_MEMCPY selected.

    Tested on a mx6qsabreauto board where a 5x gain in performance is seen
    when reading 10MB from the parallel NOR memory.

    Signed-off-by: Fabio Estevam

    Fabio Estevam
     

10 Jan, 2017

1 commit