summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* cros_ec: Add run-time check for input buffer overflowSimon Glass2021-01-301-0/+2
| | | | | | | This should not happen in normal operation, but the EC might have a bug, so add a run-time check just in case. Signed-off-by: Simon Glass <sjg@chromium.org>
* cros_ec: Tidy up a few delaysSimon Glass2021-01-301-7/+17
| | | | | | | Allow a longer time for the EC to reboot. Also use a constant for the hash delay time, so it is clear what it is for. Signed-off-by: Simon Glass <sjg@chromium.org>
* cros_ec: Add a function for the hello messageSimon Glass2021-01-306-15/+101
| | | | | | | | | | This is used several times in this file. Put it in a function to avoid code duplication. Also add a test for this function. There are no cros_ec tests at present, so it is time to update the code. Signed-off-by: Simon Glass <sjg@chromium.org>
* doc/sandbox: improve formatting of command line optionsHeinrich Schuchardt2021-01-301-14/+14
| | | | | | | Show the command line options in bold. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* sandbox: fix sandbox_cmdline_cb_test_fdt()Heinrich Schuchardt2021-01-301-1/+1
| | | | | | | fmt does not foresee any parameter. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* x86: typo segementHeinrich Schuchardt2021-01-302-2/+2
| | | | | | | %s/segement/segment/ Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* binman: Allow for skip_at_start when reading entriesSimon Glass2021-01-303-4/+48
| | | | | | | The offset of an entry needs to be adjusted by its skip-at-start value. This is currently missing when reading entry data. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
* binman: Support alignment of filesSimon Glass2021-01-307-1/+53
| | | | | | | | When packing files it is sometimes useful to align the start of each file, e.g. if the flash driver can only access 32-bit-aligned data. Provides a new property to support this. Signed-off-by: Simon Glass <sjg@chromium.org>
* binman: Allow vblock to include devicetree blobsSimon Glass2021-01-305-10/+96
| | | | | | | | | | | | | | At present if a devicetree blob is included in a vblock it does not deal with updates. This is because the vblock is created once at the start and does not have a method to update itself later, after all the entry contents are finalised. Fix this by adjusting how the vblock is created. Also simplify Image.ProcessEntryContents() since it effectively duplicates the code in Section.ProcessContents(). Signed-off-by: Simon Glass <sjg@chromium.org>
* binman: Support reading an image with entry argsSimon Glass2021-01-305-4/+64
| | | | | | | | | | | | | | | | | | Normally when an entry is created, any entry arguments it has are required to be provided, so it can actually generate its contents correctly. However when an existing image is read, Entry objects are created for each of the entries in the image. This happens as part of the process of reading the image into binman. In this case we don't need the entry arguments, since we do not intend to regenerate the entries, or at least not unless requested. So there is no sense in reporting an error for missing entry arguments. Add a new property for the Image to handle this case. Update the error reporting to be conditional on this property. Signed-off-by: Simon Glass <sjg@chromium.org>
* binman: Support finding symbols in sub-sectionsSimon Glass2021-01-306-7/+123
| | | | | | | | | | At present binman only supports resolving symbols in the same section as the binary that uses it. This is quite limited because we often need to group entries into different sections. Enhance the algorithm to search the entire image for symbols. Signed-off-by: Simon Glass <sjg@chromium.org>
* binman: Fix a few file commentsSimon Glass2021-01-302-2/+1
| | | | | | Two files have the wrong comment at the top of them. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
* binman: Show the size when writing entriesSimon Glass2021-01-301-1/+2
| | | | | | Update the log output to show the size, since this is useful information. Signed-off-by: Simon Glass <sjg@chromium.org>
* binman: Update the TODO listSimon Glass2021-01-301-2/+1
| | | | | | | Two of the items have been completed and I thought of another one. Update the list. Signed-off-by: Simon Glass <sjg@chromium.org>
* patman: Correct lz4 compression parametersSimon Glass2021-01-301-1/+2
| | | | | | | | | | | At present on large files, lz4 uses a larger block size (e.g. 256KB) than the 64KB supported by the U-Boot decompression implementation. Also it is optimised for maximum compression speed, producing larger output than we would like. Update the parameters to correct these problems. Signed-off-by: Simon Glass <sjg@chromium.org>
* dtoc: binman: Drop Python 2 codeSimon Glass2021-01-302-4/+3
| | | | | | Drop a few more Python 2 relics that are no-longer needed. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: coral: Enable CONFIG_BOOTARGS_SUBSTSimon Glass2021-01-301-0/+1
| | | | | | | Enable this option so that the boot-script substitutions of %U works as expected. With this, it can boot into Chrome OS. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: coral: Update an unused pin to reduce powerSimon Glass2021-01-301-0/+1
| | | | | | GPIO_25 is not used on coral, so set it up in deep sleep. Signed-off-by: Simon Glass <sjg@chromium.org>
* tpm: cr50: Rename driver to work with of-platdataSimon Glass2021-01-301-2/+2
| | | | | | | Update the driver name to match the compatible string, so it can work with of-platdata. Signed-off-by: Simon Glass <sjg@chromium.org>
* tpm: cr50: Add a better description and more debugSimon Glass2021-01-301-4/+18
| | | | | | | | Update the TPM description to include the interrupt mechanicm since this is useful to know. Also add a warning if the TPM cannot be found and a debug line if it succeeds. Signed-off-by: Simon Glass <sjg@chromium.org>
* tpm: cr50: Check for valid localitySimon Glass2021-01-301-4/+12
| | | | | | | | | | | | | | When the Cr50 starts up it doesn't have a valid locality. The driver sets it to -1 to indicate that. Tracking this allows cr50_i2c_cleanup() to avoid releasing a locality that was not claimed. However the helper functions that generate the flags use a u8 type which cannot support -1, so they return a locality of 0xff. Fix this by updating the type. With this, 'tpm startup TPM2_SU_CLEAR' works as expected. Signed-off-by: Simon Glass <sjg@chromium.org>
* configs: Resync with savedefconfigWIP/29Jan2021Tom Rini2021-01-2927-108/+62
| | | | | | Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge branch '2021-01-29-assorted-fixes'Tom Rini2021-01-2922-52/+677
|\ | | | | | | | | | | | | | | - Assorted test fixes - Assorted minor FAT fixes - Assorted Kconfig dependency fixes - MediaTek, vexpress_aemv8a improvements - Other assorted minor fixes
| * cmd: add more implementation IDs to sbi commandWIP/2021-01-29-assorted-fixesHeinrich Schuchardt2021-01-291-16/+21
| | | | | | | | | | | | | | | | | | Additional SBI implementation IDs have been added to the upcoming next version of the SBI specification. https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * test: inconsistent string testsHeinrich Schuchardt2021-01-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Excluding ut str in test/cmd_ut.c but compiling test/str_ut.c results in failure of the Python test invoking the C unit tests as observed on sipeed_riscv_smode_defconfig: FAILED test/py/tests/test_ut.py::test_ut[ut_str_upper] Allow to compile test/str_ut.c on all boards. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * test: inconsistent bootm testsHeinrich Schuchardt2021-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Excluding ut bootm in test/cmd_ut.c but compiling test/bootm.c results in failure of the Python test invoking the C unit tests as observed on sipeed_riscv_smode_defconfig: FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_nop] FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_nospace] FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_silent] FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_silent_var] FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_subst] FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_subst_both] FAILED test/py/tests/test_ut.py::test_ut[ut_bootm_subst_var] Only compile test/bootm.c on the sandbox. Fixes: f158ba15ee0f ("bootm: Add tests for fixup_silent_linux()") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * env: sf: cosmetic: remove unnecessary spacePatrick Delaunay2021-01-291-2/+2
| | | | | | | | | | | | | | Remove the unnecessary space before the 2 "done:" labels in env_sf_save(). Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
| * test: Update test_fs to not use deprecated pytest.yield_fixture()Tom Rini2021-01-291-10/+5
| | | | | | | | | | | | | | | | | | As noted in comments, yield_fixture has been deprecated for longer than our minimum required version of pytest. Newer versions of pytest cause this to be a louder warning, and as the migration is trivial, perform it now. Signed-off-by: Tom Rini <trini@konsulko.com>
| * test: correct entry point to pytestHeinrich Schuchardt2021-01-291-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With Pytest 6.0.2 'make tests' fails: sandbox: Traceback (most recent call last): File "./test/py/test.py", line 20, in <module> sys.exit(load_entry_point('pytest', 'console_scripts', 'pytest')(args)) TypeError: console_main() takes 0 positional arguments but 1 was given The definition of console_scripts has changed as follows: Pytest 4.6.1: [options.entry_points] console_scripts =         pytest=pytest:main         py.test=pytest:main          Pytest 6.0.2:          [options.entry_points] console_scripts = pytest=pytest:console_main py.test=pytest:console_main The new function console_main() has a comment: "This function is not meant for programmable use; use `main()`" Hence let's call pytest.main() directly. Move args processing into the __main__ paragraph. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Tested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Tested-by: Tom Rini <trini@konsulko.com>
| * test: pr_cont_test.o depends on CONFIG_LOG=yHeinrich Schuchardt2021-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compiling wandboard_defconfig with CONFIG_UT_LOG=y leads to a build error: test/log/pr_cont_test.c: In function ‘log_test_pr_cont’: test/log/pr_cont_test.c:28:14: error: ‘gd_t’ {aka ‘volatile struct global_data’} has no member named ‘log_fmt’  log_fmt = gd->log_fmt; We do not want to let CONFIG_UT_LOG depend on CONFIG_LOG=y because we have tests for logging functions called with CONFIG_LOG=n. Fix the build dependency. Reported-by: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * fs: btrfs: Select SHA256 in KconfigMatthias Brugger2021-01-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 565a4147d17a ("fs: btrfs: Add more checksum algorithms") btrfs uses the sha256 checksum algorithm. But Kconfig lacks to select it. This leads to compilation errors: fs/built-in.o: In function `hash_sha256': fs/btrfs/crypto/hash.c:25: undefined reference to `sha256_starts' fs/btrfs/crypto/hash.c:26: undefined reference to `sha256_update' fs/btrfs/crypto/hash.c:27: undefined reference to `sha256_finish' Signed-off-by: Matthias Brugger <mbrugger@suse.com> Reviewed-by: Qu Wenruo <wqu@suse.com>
| * fs: fat: remove superfluous assignmentsHeinrich Schuchardt2021-01-292-4/+5
| | | | | | | | | | | | Do not assign a value to a variable if it is not used. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * fs: fat: avoid out of bounds access warningHeinrich Schuchardt2021-01-291-5/+2
| | | | | | | | | | | | | | When copying short name plus extension refer to the encapsulating structure and not to the short name element. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * avb: AVB_VERIFY depends on MMCHeinrich Schuchardt2021-01-291-0/+1
| | | | | | | | | | | | | | AVB Verified Boot uses functions related to MMC. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io>
| * vexpress_aemv8a: allow overriding BOOTCOMMANDStanislav Pinchuk2021-01-291-2/+4
| | | | | | | | | | | | | | | | | | | | Re-send because of line-wraps. This patch fixes the behaviour of the menuconfig's BOOTCOMMAND setting. Which is just ignored without that patch on vexpress_aemv8a platform. Signed-off-by: Stanislav.Pinchuk@kaspersky.com
| * arm: dts: enable MTK SPI NOR controller driverSkyLake.Huang2021-01-296-4/+56
| | | | | | | | | | | | | | 1. Enable MTK SPI NOR controller driver on mt7622 & mt7629. 2. Enable quad mode for read and single mode for write. Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
| * spi: mtk_snor: add support for MTK SPI NOR controllerSkyLake.Huang2021-01-293-0/+571
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for MTK SPI NOR controller, which you can see on mt7622 & mt7629. 1. This controller is designed only for SPI NOR. We can't adjust its bus clock dynamically. Set clock in dts instead. 2. This controller only supports 1-1-1 write mode. 3. Remove mtk_snor_match_read() since upper SPI-MEM layer already handles command. 4. sf read/write/update commands are tested with this driver. Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
| * test: test_ofplatdata: Mark as sandbox specificTom Rini2021-01-291-0/+1
|/ | | | | | | This test checks for output specific to the sandbox device tree, mark it as sandbox specific. Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge branch '2021-01-27-assorted-fixes-and-improvements'WIP/28Jan2021Tom Rini2021-01-2834-128/+915
|\ | | | | | | - A wide variety of fixes throughout the tree.
| * cmd: misc: Fix return value for the sleep commandWIP/2021-01-27-assorted-fixes-and-improvementsMarek Szyprowski2021-01-271-1/+1
| | | | | | | | | | | | | | | | | | If sleeping has been interrupted, return CMD_RET_FAILURE instead of -1 (CMD_RET_USAGE). Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
| * doc: device-tree-bindings: rtc: Abracon AB x80x i2c rtcYing-Chun Liu (PaulLiu)2021-01-271-0/+31
| | | | | | | | | | | | Document the bindings for abracon,abx80x and related compatibles. Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
| * rtc: add rtc-abx80x, a driver for the Abracon AB x80x i2c rtcYing-Chun Liu (PaulLiu)2021-01-273-0/+563
| | | | | | | | | | | | | | | | | | This is a basic driver for the ultra-low-power Abracon AB x80x series of RTC chips. It supports in particular, the supersets AB0805 and AB1805. It allows reading and writing the time, and enables the supercapacitor or battery charger. Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
| * autoboot: fix illegal memory access when stop key and delay key are emptyYuezhang.Mo@sony.com2021-01-271-3/+3
| | | | | | | | | | | | | | | | | | | | If both stop key and delay key are empty, the length of these keys is 0. The subtraction operation will cause the u_int type variable to overflow, will cause illegal memory access in key input loop. This commit fixes this bug by using int type instead of u_init. Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * binman: Allow reading entries from a subnodeSimon Glass2021-01-272-0/+32
| | | | | | | | | | | | | | | | | | Some images may have multiple copies of the same thing, e.g. two versions of the read/write U-Boots. It is necessary to read data from one or other of these under selection of the verified-boot logic. Add a function to select the subnode to use. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Move selection of the binman node into a functionSimon Glass2021-01-271-10/+33
| | | | | | | | | | | | | | | | | | | | Move this logic out of the main init function so it is available for other purpose. Use a different error when multiple-images is in use but no subnode is available. This makes it easier to determine what is wrong. Signed-off-by: Simon Glass <sjg@chromium.org>
| * crc32: Exclude crc32 from TPLSimon Glass2021-01-271-0/+2
| | | | | | | | | | | | | | | | Unfortunately the toolchain often brings in the crc32 table even if the function is not actually used. For now, exclude it from the TPL build, which is very sensitive to size. Signed-off-by: Simon Glass <sjg@chromium.org>
| * mmc: pci_mmc: Set the removable flagSimon Glass2021-01-271-0/+8
| | | | | | | | | | | | | | | | | | Set this flag so that it is available to those looking at the device. For non-removable devices there is no need to check for insertion/removable since the media can never change. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
| * mmc: pci_mmc: Only generate ACPI code for the SD cardSimon Glass2021-01-271-1/+10
| | | | | | | | | | | | | | | | | | | | At present if an eMMC part is in the system, the ACPI table generated will include information about that, as well as the SD card. We only need to include the SD card, since it has a card-detect GPIO. Use a different compatible string for each option, and add code only for the SD card. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
| * uuid: Add a comment for UUID_STR_LENSimon Glass2021-01-271-0/+1
| | | | | | | | | | | | | | | | This macro is the length of the string but excludes the terminator. Users must add 1 when declaring a large-enough string. Add a comment to make this clear. Signed-off-by: Simon Glass <sjg@chromium.org>
| * display_options: Use USE_TINY_PRINTF for SPL checkSimon Glass2021-01-271-5/+4
| | | | | | | | | | | | | | At present this code uses a simple printf() format if running in SPL. But SPL can use the full printf. Use USE_TINY_PRINTF instead. Signed-off-by: Simon Glass <sjg@chromium.org>