aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-06-19Prepare v2018.07-rc2Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-06-19test_avb: Add pymark.buildconfigspec information for the AVB testsTom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-06-19libavb: Update SPDX tag styleTom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-06-19configs: Update Meson GX configsNeil Armstrong
Enable USB on all Amlogic Meson GXL based board. Enable Regulator support on all boards. Enable ADC support on the LibreTech-CC board. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-06-19meson: use the clock driverBeniamino Galvani
Use the clk framework to initialize clocks from drivers that need them instead of having hardcoded frequencies and initializations from board code. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-06-19clk: add Amlogic meson clock driverBeniamino Galvani
Introduce a basic clock driver for Amlogic Meson SoCs which supports enabling/disabling clock gates and getting their frequency. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-06-19config: meson-gx-common: Enable USB bootNeil Armstrong
Add USB as boot target depending on the configuration. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-06-19adc: meson-saradc: fix regmap_init_mem callNeil Armstrong
The SARADC driver was merged after the following commit : commit d35812368a59 ("regmap: change regmap_init_mem() to take ofnode instead udevice") Thus breaking build, this patch fixes the regmap_init_mem accordingly. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2018-06-19configs: dragonboard410c: remove env partition offsetRamon Fried
BOOT2 is not partitioned, no need for partition offset. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-06-19configs: db410c: Set eMMC env partition to BOOT2Ramon Fried
BOOT2 partition is empty and free for using to store the environment. Use that instead of the default user partition. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-06-19common: Fix cpu nr type which is always unsigned typeMichal Simek
cpu_cmd() is reading cpu number via simple_strtoul() which is always unsigned type. Platform code implementations are not expecting that nr can be negative and there is not checking in the code for that too. This patch is using u32 type for cpu number to make sure that platform code get proper value range. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-06-19bootm: Handle kernel_noload on arm64Marek Vasut
The ARM64 has 2 MiB alignment requirement for the kernel. When using fitImage, this requirement may by violated, the kernel will thus be executed from unaligned address and fail to boot. Do what booti does and run booti_setup() for kernel_noload images on arm64 to obtain a suitable aligned address to which the image shall be relocated. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Bin Chen <bin.chen@linaro.org> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Tom Rini <trini@konsulko.com>
2018-06-19ARM: image: Add option for ignoring ep bit 3Marek Vasut
Add option to the booti_setup() which indicates to it that the caller requires the image to be relocated to the beginning of the RAM and that the information whether the image can be located anywhere in RAM at 2 MiB aligned boundary or not is to be ignored. This is useful ie. in case the Image is wrapped in another envelope, ie. fitImage and not relocating it but moving it would corrupt the envelope. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Bin Chen <bin.chen@linaro.org> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Tom Rini <trini@konsulko.com> Reviewed-By: Bin Chen <bin.chen@linaro.org>
2018-06-19sandbox: swap_case: Increase number of base address regsSimon Glass
At present the code overruns the bar[] array. Fix this. At the same time, drop the leading / from the "/spl" path so that we can run U-Boot SPL with: spl/u-boot-spl rather than requiring: /path/to/spl/u-boot-spl Reported-by: Coverity (CID: 131199) Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-06-19spi: sandbox: Fix memory leak in sandbox_sf_bind_emul()Simon Glass
Move the strdup() call so that it is only done when we know we will bind the device. Reported-by: Coverity (CID: 131216) Signed-off-by: Simon Glass <sjg@chromium.org>
2018-06-19rsa: Fix missing memory leak on error in fdt_add_bignum()Simon Glass
Thsi function can fail without freeing all its memory. Fix it. Reported-by: Coverity (CID: 131217) Signed-off-by: Simon Glass <sjg@chromium.org>
2018-06-19fdtgrep: Separate out checking of two allocationsSimon Glass
The current code might succeed on the first allocation and fail on the second. Separate the checks to avoid this problem. Of course, free() will never fail and the chances that (when allocating two small areas) one will succeed and one will fail are just as remote. But this keeps coverity happy. Reported-by: Coverity (CID: 131226) Signed-off-by: Simon Glass <sjg@chromium.org>
2018-06-19fdtgrep: Fix logic of free() in do_fdtgrep()Simon Glass
This loop never actually exits, but the way the code is written this is not obvious. Add an explicit error check. Reported-by: Coverity (CID: 131280) Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Add explicit init of region to NULL per LLVM warning] Signed-off-by: Tom Rini <trini@konsulko.com>
2018-06-18console: Fix handling of NULL global_dataSimon Glass
Both putc() and puts() can be called before global_data is set up. Some of the code paths don't handle this correctly. Add an explicit test before any member is accessed. Reported-by: Coverity (CID: 169030) Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-06-18log: Fix incorect range check in log_get_cat_name()Simon Glass
This allows access to an element after the end of the array. Fix it. Reported-by: Coverity (CID: 173279) Signed-off-by: Simon Glass <sjg@chromium.org>
2018-06-18gpio: omap_gpio: Name GPIO's by bank and index with DM_GPIOAdam Ford
There are multiple GPIO banks with up to 32 pins / bank. When using 'gpio status -a' to read the pins, this patch displays both GPIO<bank>_<index> similar to how the device trees display in addition to displaying gpio_# Signed-off-by: Adam Ford <aford173@gmail.com>
2018-06-18arm: mach-omap2/omap3/clock.c: Enable all GPIO with CMD_GPIOAdam Ford
When CMD_GPIO is enabled the command 'gpio status -a' can cause a hang or reboot if GPIO banks are not enabled, because it scans all banks. This patch enables all GPIO banks so 'gpio status -a' can fully execute. Signed-off-by: Adam Ford <aford173@gmail.com>
2018-06-18block: Add SPL_BLOCK_CACHE and default nAdam Ford
When enabling BLOCK_CACHE on devices with limited RAM during SPL, some devices may not boot. This creates an option to enable block caching in SPL by defaults off. It is dependent on SPL_BLK Fixes: 46960ad6d09b ("block: Have BLOCK_CACHE default to y in some cases") Signed-off-by: Adam Ford <aford173@gmail.com>
2018-06-18arm: Do not clear LR on exception in SPLAndrew F. Davis
When an exception or interrupt occurs the link register (LR) may contain the source of the exception, although we do not print the value it may still be extracted with a debugger. When in SPL we loop on getting and exception, but use a linking branch, which over-writes the LR value, use a regular branch instruction here. Signed-off-by: Andrew F. Davis <afd@ti.com>
2018-06-18mmc: Remove hwpartition help text when command is disabledAlex Kiernan
When the `mmc hwpartition` command is disabled, remove the associated help text. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
2018-06-18fs: btrfs: Do not fail when all root_backups are emptyYevgeny Popovych
This is the case when reading freshly created filesystem. The error message is like the following: btrfs_read_superblock: No valid root_backup found! Since the data from super_roots/root_backups is not actually used - decided to rework btrfs_newest_root_backup() into btrfs_check_super_roots() that will only check if super_roots array is valid and correctly handle empty scenario. As a result: * btrfs_read_superblock() now only checks if super_roots array is valid; the case when it is empty is considered OK. * removed root_backup pointer from btrfs_info, which would be NULL in case of empty super_roots. * btrfs_read_superblock() verifies number of devices from the superblock itself, not newest root_backup. Signed-off-by: Yevgeny Popovych <yevgenyp@pointgrab.com> Cc: Marek Behun <marek.behun@nic.cz> Cc: Sergey Struzh <sergeys@pointgrab.com>
2018-06-18.gitignore: move *.dtb and *.dtb.S patterns to the top-level .gitignoreMasahiro Yamada
Follow Linux commit 10b62a2f785a (".gitignore: move *.dtb and *.dtb.S patterns to the top-level .gitignore"). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-06-18.gitignore: sort normal pattern rules alphabeticallyMasahiro Yamada
Follow Linux commit 1377dd3e2987 (".gitignore: sort normal pattern rules alphabetically"). This would allow us to easily catch duplicated patterns if any. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-06-18dm: gpio: Add DM compatibility to GPIO driver for DavinciAdam Ford
This adds DM_GPIO support for the davinici GPIO driver with DT support. Signed-off-by: Adam Ford <aford173@gmail.com>
2018-06-18MAINTAINERS: update ARM SnapdragonRamon Fried
Replace Mateusz as Maintainer for ARM Snapdragon arch. Signed-off-by: Ramon Fried <ramon.fried@gmail.com> Acked-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
2018-06-18db410c: fix alignment of dts fileRamon Fried
Alignment was wrong, missing one tab. fix it. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-06-18iotrace: fix behaviour when buffer is fullRamon Fried
Don't continue updating the offset when buffer is full. When the buffer size exhausts and there's no space left to write warn the user and update only the needed size and not both the offset and needed size. Add needed buffer size information in the iotrace command. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-06-18cmd: iotrace: add dump trace commandRamon Fried
Add dump trace command which dump all trace buffer content in a much more readable fashion than md. Signed-off-by: Ramon Fried <ramon.fried@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-18iotrace: move record definitons to header fileRamon Fried
The header definitions are needed for reading record information in cmd/iotrace.c Signed-off-by: Ramon Fried <ramon.fried@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-18ARM: sunxi: remove empty #ifdef/endif blockChris Packham
Whatever code this was guarding has been removed so remove the guards too. Signed-off-by: Chris Packham <judge.packham@gmail.com>
2018-06-18m68k: Remove empty #ifdef/#ifndef blockChris Packham
Whatever code this was guarding has been removed so remove the guards too. Signed-off-by: Chris Packham <judge.packham@gmail.com>
2018-06-18configs: Remove empty #ifdef/#ifndef blocksChris Packham
Remove empty #ifdef/#ifndef..#endif blocks where the configuration they guarded has been completely removed. Signed-off-by: Chris Packham <judge.packham@gmail.com>
2018-06-18doc: avb2.0: add README about AVB2.0 integrationIgor Opaniuk
Contains: 1. Overview of Android Verified Boot 2.0 2. Description of avb subset of commands 3. Examples of errors when boot/vendor/system/vbmeta partitions are tampered 4. Examples of enabling AVB2.0 on your setup Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
2018-06-18test/py: avb2.0: add tests for avb commandsIgor Opaniuk
1. Run AVB 2.0 full verification chain, avb verify 2. Check if 'avb get_uuid' works, compare results with 'part list mmc 1' output 3. Test `avb read` commands, which reads N bytes from a partition identified by a name Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
2018-06-18am57xx_hs: avb2.0: add support of AVB 2.0Igor Opaniuk
1. Add vbmeta partition info to android partition layout for TI platforms. 2. Add support of AVB 2.0 (including avb subset of commands) for am57xx HS Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org> [trini: Move to include/environment/ti/boot.h, reword commit slightly] Signed-off-by: Tom Rini <trini@konsulko.com>
2018-06-18avb2.0: add boot states and dm-verity supportIgor Opaniuk
1. Add initial support of boot states mode (red, green, yellow) 2. Add functions for enforcing dm-verity configurations Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
2018-06-18cmd: avb2.0: avb command for performing verificationIgor Opaniuk
Enable a "avb" command to execute Android Verified Boot 2.0 operations. It includes such subcommands: avb init - initialize avb2 subsystem avb read_rb - read rollback index avb write_rb - write rollback index avb is_unlocked - check device lock state avb get_uuid - read and print uuid of a partition avb read_part - read data from partition avb read_part_hex - read data from partition and output to stdout avb write_part - write data to partition avb verify - run full verification chain Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
2018-06-18avb2.0: implement AVB opsIgor Opaniuk
Implement AVB ops on top of existing mmc subsystem API. Currently there is a full implementation of such operations, defined by [1] AVB2.0 specification: .read_from_partition() - reads N bytes from a partition identified by a name. .write_to_partition() - Writes N bytes to a partition identified by a name. .validate_vbmeta_public_key() - checks if the given public ‘vbmeta’ partition is trusted. .get_unique_guid_for_partition() - Gets the GUID for a partition identified by a string name. As [1] specification recommends to use tamper-evident storage for storing rollback indexes and device state (LOCKED/UNLOCKED), currently are only stubs instead of full implementation for these ops: .read_rollback_index() - Gets the rollback index for a given index location .write_rollback_index() - Sets the rollback index to a given location .read_is_device_unlocked() - Gets where the device is unlocked [1] https://android.googlesource.com/platform/external/avb/+/master/README.md Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
2018-06-18avb2.0: integrate avb 2.0 into the build systemIgor Opaniuk
Integrate libavb into the build system. Introduce CONFIG_LIBAVB build option. Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
2018-06-18avb2.0: add Android Verified Boot 2.0 libraryIgor Opaniuk
Add libavb lib (3rd party library from AOSP), that implements support of AVB 2.0. This library is used for integrity checking of Android partitions on eMMC. libavb was added as it is and minimal changes were introduced to reduce maintenance cost, because it will be deviated from AOSP upstream in the future. Changes: - license headers changed to conform SPDX-style - avb_crc32.c dropped - updates in avb_sysdeps_posix.c/avb_sysdeps.h For additional details check [1] AVB 2.0 README. [1] https://android.googlesource.com/platform/external/avb/+/master/README.md Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
2018-06-18Merge git://git.denx.de/u-boot-x86Tom Rini
2018-06-17x86: efi: app: Display correct CPU info during bootBin Meng
Currently when EFI application boots, it says: CPU: x86_64, vendor <invalid cpu vendor>, device 0h Fix this by calling x86_cpu_init_f() in arch_cpu_init(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-17x86: Rename efi-x86 target to efi-x86_appBin Meng
To avoid confusion, let's rename the efi-x86 target to efi-x86_app. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-17x86: efi: payload: Add EFI framebuffer driver supportBin Meng
This turns on the EFI framebuffer driver support so that a graphics console can be of additional help. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-06-17dm: video: Add an EFI framebuffer driverBin Meng
This adds a DM video driver for U-Boot as the EFI payload. The driver makes use of all necessary information from the passed EFI GOP info to create a linear framebuffer device, as if it were initialized by U-Boot itself. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Anatolij Gustschin <agust@denx.de>