aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-11-03spi: Add support for memory-mapped flashSimon Glass
On x86 platforms the SPI flash can be mapped into memory so that the contents can be read with normal memory accesses. Add a new SPI method to find the location of the SPI flash in memory. This differs from the existing device-tree "memory-map" mechanism in that the location can be discovered at run-time. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-11-03spl: Correct priority selection for image loadersSimon Glass
At present the name of the image comes first in the linker-list symbol used. This means that the name of the function sets the sort order, which is not the intention. Update it to put the boot-device type first, then the priority. This produces the expected behaviour. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-11-02binman: Fix up comment in intel-fsp-mSimon Glass
This comment references the wrong FSP component. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-11-02binman: Add support for Intel FSP-TSimon Glass
This entry is used to hold an Intel FSP-T (Firmware Support Package Temp-RAM init) binary. Add support for this in binman. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-11-02binman: Add support for Intel FSP-SSimon Glass
This entry is used to hold an Intel FSP-S (Firmware Support Package Silicon init) binary. Add support for this in binman. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-11-02binman: Correct symbol calculation with non-zero image baseSimon Glass
At present binman adds the image base address to the symbol value before it writes it to the binary. This is not correct since the symbol value itself (e.g. image position) has no relationship to the image base. Fix this and update the tests to cover this case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-11-02cbfs: do not pack struct cbfs_cachenodeHeinrich Schuchardt
With the __packed attribute sandbox_defconfig cannot be compiled with GCC 9.2.1: fs/cbfs/cbfs.c: In function ‘file_cbfs_fill_cache’: fs/cbfs/cbfs.c:164:16: error: taking address of packed member of ‘struct cbfs_cachenode’ may result in an unaligned pointer value [-Werror=address-of-packed-member] 164 | cache_tail = &new_node->next; | ^~~~~~~~~~~~~~~ struct cbfs_cachenode is only an internal structure. So let's rearrange the fields such that the structure is naturally packed and remove the __packed attribute. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-11-01azure: Update the script to prepend PATH not override PATHTom Rini
Similar to 90d3d78a1c68 ("gitlab-ci: Prepend to PATH rather than replace it") we need to prepend the PATH with our additional binaries and not replace the value fully as doing so breaks virtualenv. Signed-off-by: Tom Rini <trini@konsulko.com>
2019-11-01Merge tag 'efi-2020-01-rc2' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2020-01-rc2 Provide a better user interface for setting UEFI variables. Bug fixes: - ext4 file system not discovered on UEFI block device - 'make tests' build error on 32bit systems
2019-11-01Merge tag 'video-for-2020.01-rc1' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-video - fix splash build breakage with newer llvm-7
2019-11-01Merge tag 'dm-pull-29oct19' of git://git.denx.de/u-boot-dmTom Rini
- Fix for patman with email addresses containing commas - Bootstage improvements for TPL, SPL - Various sandbox and dm improvements and fixes
2019-11-01Merge branch '2019-10-30-master-imports'Tom Rini
- Migrate test.py to use python3 and current pytest. - NVMe bugfixes - Assorted other fixes - Android AVB updates.
2019-10-31azure: Update for python3 and current pytestTom Rini
Similar to the rework for GitLab-CI and Travis-CI, rework the Azure Pipeline to use python3 and requirements.txt to install the necessary modules. Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-31cmd: avb: Support A/B slotsSam Protsenko
Add optional parameter to 'avb verify' sub-command, so that user is able to specify which slot to use, in case when user's partitions are slotted. If that parameter is omitted, the behavior of 'avb verify' will be the same as before, so user API is content. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com> Acked-by: Igor Opaniuk <igor.opaniuk@gmail.com>
2019-10-31cmd: avb: Fix requested partitions listSam Protsenko
The requested_partitions[] array should contain only boot partitions. Usually it's only 'boot' partition, as can be seen in [1]. Also, seems like the requested_partitions[] are only used when there is no 'vbmeta' partition [2], which is not a regular use-case. Make requested_partitions[] contain only 'boot' partition as it was supposed to be, and also make that array to be a local in do_avb_verify_part() function, as nobody else needs that. [1] https://android.googlesource.com/platform/external/avb/+/5fbb42a189aa/test/avb_slot_verify_unittest.cc#108 [2] https://android.googlesource.com/platform/external/avb/+/5fbb42a189aa/libavb/avb_slot_verify.c#1461 Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
2019-10-31libavb: Fix build warnings after updating the libSam Protsenko
After updating libavb to most recent version from AOSP/master, two new warnings appear: Warning #1: lib/libavb/avb_cmdline.c: In function 'avb_append_options': lib/libavb/avb_cmdline.c:365:15: warning: 'dm_verity_mode' may be used uninitialized in this function [-Wmaybe-uninitialized] new_ret = avb_replace( ^~~~~~~~~~~~ slot_data->cmdline, "$(ANDROID_VERITY_MODE)", dm_verity_mode); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/libavb/avb_cmdline.c:374:8: warning: 'verity_mode' may be used uninitialized in this function [-Wmaybe-uninitialized] if (!cmdline_append_option( ^~~~~~~~~~~~~~~~~~~~~~ slot_data, "androidboot.veritymode", verity_mode)) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Warning #2: lib/libavb/avb_slot_verify.c: In function 'avb_slot_verify': lib/libavb/avb_slot_verify.c:1349:23: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] AvbSlotVerifyResult ret; ^~~ Fix those by providing default return values to affected functions. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2019-10-31libavb: Update libavb to current AOSP masterSam Protsenko
Update libavb to commit 5fbb42a189aa in AOSP/master, because new version has support for super partition [1], which we need for implementing Android dynamic partitions. All changes from previous patches for libavb in U-Boot are accounted for in this commit: - commit ecc6f6bea6a2 ("libavb: Handle wrong hashtree_error_mode in avb_append_options()") - commit 897a1d947e7e ("libavb: Update SPDX tag style") - commit d8f9d2af96b3 ("avb2.0: add Android Verified Boot 2.0 library") Tested on X15: ## Android Verified Boot 2.0 version 1.1.0 read_is_device_unlocked not supported yet read_rollback_index not supported yet read_is_device_unlocked not supported yet Verification passed successfully AVB verification OK. Unit test passes: $ ./test/py/test.py --bd sandbox --build -k test_avb test/py/tests/test_android/test_avb.py ss..s. [1] https://android.googlesource.com/platform/external/avb/+/49936b4c0109411fdd38bd4ba3a32a01c40439a9 Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Eugeniu Rosca <rosca.eugeniu@gmail.com> Acked-by: Igor Opaniuk <igor.opaniuk@gmail.com>
2019-10-31mkimage: Set correct FDT type and ramdisk architecture in FIT auto modeMichal Sojka
When running the following command mkimage -f auto -A arm -O linux -T kernel -C none -a 0x8000 -e 0x8000 \ -d zImage -b zynq-microzed.dtb -i initramfs.cpio image.ub the type of fdt subimage is the same as of the main kernel image and the architecture of the initramfs image is not set. Such an image is refused by U-Boot when booting. This commits sets the mentioned attributes, allowing to use the "-f auto" mode in this case instead of writing full .its file. Following is the diff of mkimage output without and with this commit: FIT description: Kernel Image image with one or more FDT blobs Created: Thu Sep 12 23:23:16 2019 Image 0 (kernel-1) Description: Created: Thu Sep 12 23:23:16 2019 Type: Kernel Image Compression: uncompressed Data Size: 4192744 Bytes = 4094.48 KiB = 4.00 MiB Architecture: ARM OS: Linux Load Address: 0x00008000 Entry Point: 0x00008000 Image 1 (fdt-1) Description: zynq-microzed Created: Thu Sep 12 23:23:16 2019 - Type: Kernel Image + Type: Flat Device Tree Compression: uncompressed Data Size: 9398 Bytes = 9.18 KiB = 0.01 MiB Architecture: ARM - OS: Unknown OS - Load Address: unavailable - Entry Point: unavailable Image 2 (ramdisk-1) Description: unavailable Created: Thu Sep 12 23:23:16 2019 Type: RAMDisk Image Compression: Unknown Compression Data Size: 760672 Bytes = 742.84 KiB = 0.73 MiB - Architecture: Unknown Architecture + Architecture: ARM OS: Linux Load Address: unavailable Entry Point: unavailable Default Configuration: 'conf-1' Configuration 0 (conf-1) Description: zynq-microzed Kernel: kernel-1 Init Ramdisk: ramdisk-1 FDT: fdt-1 Loadables: kernel-1 Signed-off-by: Michal Sojka <michal.sojka@cvut.cz>
2019-10-31drivers: phy: Handle gracefully NULL pointersJean-Jacques Hiblot
For some controllers PHYs can be optional. Handling NULL pointers without crashing nor failing, makes it easy to handle optional PHYs. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2019-10-31linux_compat: fix potential NULL pointer accessMarek Szyprowski
malloc_cache_aligned() might return zero, so fix potential NULL pointer access if __GFP_ZERO flag is set. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Ralph Siemsen <ralph.siemsen@linaro.org>
2019-10-31tiny-printf: Support vsnprintf()Simon South
Add a simple implementation of this function, to allow logging to be enabled in the SPL or TPL for systems that rely on the tiny printf() implementation. To keep the code size small, - The function is built only when logging is enabled, as it (currently) is not needed otherwise; and - Like the existing implementation of snprintf(), its buffer-size parameter is ignored. Signed-off-by: Simon South <simon@simonsouth.net>
2019-10-31common: Kconfig: Fix typo in TPL_LOG_CONSOLE descriptionSimon South
Signed-off-by: Simon South <simon@simonsouth.net>
2019-10-31lib: errno: avoid error format-overflowHeinrich Schuchardt
In cmd/regulator.c an error occurs with GCC 9.2.1 if CONFIG_ERRNO_STR is not defined: cmd/regulator.c: In function ‘failure’: cmd/regulator.c:20:2: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 20 | printf("Error: %d (%s)\n", ret, errno_str(ret)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function ‘constraint’, inlined from ‘constraint’ at cmd/regulator.c:111:12: cmd/regulator.c:115:3: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 115 | printf(" %s (err: %d)\n", errno_str(val), val); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ errno_str() should return a valid string instead of NULL if CONFIG_ERRNO_STR is not defined. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-10-31lib: errno: sync error codesHeinrich Schuchardt
Macro ERRNO_MSG() ignores the error number but we should still use the same constants as in include/linux/errno.h. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-10-31dts: fix MULTI_DTB_FIT compression choice promptBaruch Siach
This choice is not about SPL for which we have a separate choice. Fixes: 95f4bbd581 ("lib: fdt: Allow LZO and GZIP DT compression in U-Boot") Cc: Marek Vasut <marek.vasut+renesas@gmail.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2019-10-31ata: ahci allow 64-bit DMA for SATARoman Kapl
Allow 64-bit DMA on AHCI. If not supported by the host controller, at least print a message and fail. Signed-off-by: Roman Kapl <rka@sysgo.com>
2019-10-31disk: part_dos: correctly detect DOS PBRHeinrich Schuchardt
The signature 0x55 0xAA in bytes 510 and 511 of the first sector can either indicate a DOS partition table of the first sector of a FAT file system. The current code tries to check if the partition table is valid by looking at the boot indicator of the partition entries. But first of all it does not count from 0 to 3 but only from 0 to 2. And second it misses to increment the pointer for the partition entry. If it is a FAT file system can be discovered by looking for the text 'FAT' at offset 0x36 or 'FAT32' at offset 0x52. In a DOS PBR there are no partition entries, so those bytes are undefined. Don't require the byte at offset 0x1BE to differ from 0x00 and 0x80. With the patch the logic is changed as follows: If the partition table has either an invalid boot flag for any partition or has no partition at all, check if the first sector is a DOS PBR by looking at the FAT* signature. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-10-31test: provide test for errno_str()Heinrich Schuchardt
Provide a unit test for errno_str(). Test that known and unknown error numbers are handled correctly. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-10-31lib: errno: check for unsupported error numberHeinrich Schuchardt
If errno_str() is called with an unsupported error number, do not return a random pointer but a reasonable text. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-10-31lib: time: Add microsecond timerMarek Vasut
Add get_timer_us(), which is useful e.g. when we need higher precision timestamps. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> [trini: Fixup arch/arm/mach-bcm283x/include/mach/timer.h] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-31NVMe: do PCI enumerate before nvme scanPatrick Wildt
Make sure that the PCI busses are enumerated before trying to find a NVMe device. Signed-off-by: Patrick Wildt <patrick@blueri.se> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-31nvme: use page-aligned buffer for identify commandPatrick Wildt
Change the stack-allocated buffer for the identification command to explicitly allocate page-aligned buffers. Even though the spec seems to allow having admin queue commands on non page-aligned buffers, it seems to not be possible on my i.MX8MQ board with a a Silicon Power P34A80. Since all of the NVMe drivers I have seen always do admin commands on a page-aligned buffer, which does work on my system, it makes sense for us to do that as well. Signed-off-by: Patrick Wildt <patrick@blueri.se> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-31nvme: flush dcache on both r/w, and the prp listPatrick Wildt
It's possible that the data cache for the buffer still holds data to be flushed to memory, since the buffer was probably used as stack before. Thus we need to make sure to flush it also on reads, since it's possible that the cache is automatically flused to memory after the NVMe DMA transfer happened, thus overwriting the NVMe transfer's data. Also add a missing dcache flush for the prp list. Signed-off-by: Patrick Wildt <patrick@blueri.se> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-31virtio: pci: use correct type in virtio_pci_bind()Heinrich Schuchardt
For printing as %u we should use an unsigned int. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-10-31checkpatch.pl: update from Linux kernel v5.4-rc3Heinrich Schuchardt
Update from upstream. Just minor changes like checking that the author has also done a sign-off. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-10-31splash: fix build breakage with newer llvm-7Anatolij Gustschin
Some configurations (i.e. sandbox) result in unused splash_display_banner() and we get build errors like: common/splash.c:148:20: error: unused function 'splash_display_banner' [-Werror,-Wunused-function] static inline void splash_display_banner(void) { } Drop empty inline function and add guards around the call. Fixes: d2a8271c8851 ("splash: fix splash banner output") Signed-off-by: Anatolij Gustschin <agust@denx.de> Reported-by: Tom Rini <trini@konsulko.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-10-30dts: Kconfig: Fix help for SPL_OF_CONTROLWalter Lozano
As initially this feature was implemented as a negative CONFIG and later it was redesigned to be positive the help text should be updated to reflect this change. This commit updates the help text to match the current implementation. Signed-off-by: Walter Lozano <wlozano@collabora.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-10-30Makefile: Fix printing problem in size_check on overflowTom Rini
When we have an excess size growth, fix the "limit" printf call to pass in just the limit variable rather than the string bytes to the format character. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2019-10-30gpio: da8xx_gpio: Fix the _gpio_direction_output functionKeerthy
_gpio_direction_output function currently calls gpio_set_value with the wrong gpio number. gpio_set_value in the uclass driver expects a different gpio number and the _gpio_direction_output is currently providing the number specific to the bank. Hence fix it by calling the _gpio_set_value function instead. Reported-by: Faiz Abbas <faiz_abbas@ti.com> Fixes: 8e51c0f254 ("dm: gpio: Add DM compatibility to GPIO driver for Davinci") Signed-off-by: Keerthy <j-keerthy@ti.com>
2019-10-30test/py: Use raw strings more to avoid deprecation warningsTom Rini
We have two further uses of raw string usage in the test/py codebase that are used under CI. The first of which is under the bind test and is a direct update. The second of which is to strip VT100 codes from the match buffer. While switching this to a raw string is also a direct update, the comment it notes that problems were encountered on Ubuntu 14.04 (and whatever Python 2 version that was) that required slight tweaks to the regex. Replace that now that we're saying Python 3.5 is the minimum. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30gitlab/travis: Rework how and when we use virtualenv in order to use python3Tom Rini
As things stand today, we have tools that CI requires where "python" must be "python2". We need to use a virtualenv and pip in order to ensure that our pytest tests can be run. Rework things slightly so that: - On Travis-CI, we install python-pyelftools for the platforms that require pyelftools to be installed. - On GitLab-CI, we move to a newer base image that includes python3-pip and continue to use a virtualenv per job that needs it, for the correct set of packages. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30test/py: Update docs, add requirements.txt for pipTom Rini
To be more closely aligned with Python community best practices, we need to better document our usage of pip and make use of a requirements.txt file that shows the versions of the tools that we are using. This will aide in ensuring reproducibility of our tests as well. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30test/py: Rework test.py to be a different kind of wrapperTom Rini
Now that we have moved to being based on pytest for python3 we need to make our test.py wrapper more robust in terms of only calling python3 rather than possibly finding and using python2. To do this, change from execvp()'ing pytest to invoking the package itself via python. In the event that pytest is unavailable we still get a user-friendly error: pkg_resources.DistributionNotFound: The 'pytest' distribution was not found and is required by the application Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30test/py: Update test_fs to decode check_output callsTom Rini
The check_output function from the subprocess Python module by default returns data as encoded bytes and leaves decoding to the application. Given our uses of the call, it makes the most sense to immediately decode the results. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30test/py: test_efi_selftest.py: Updates for python 3 supportTom Rini
- In python 3 you must use raw strings for regex as other forms are deprecated and would require further changes to the pattern here. In one case this lets us have a simpler match pattern. - As strings are now Unicode our complex tests (Euro symbol, SHIFT+ALT+FN 5) we need to declare that as a bytes string and then decode it for use. Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30test/py: test_ut.py: Ensure we use bytesTom Rini
In the case of some unit tests we are working with providing a fake flash device that we have written some text strings in to. In this case we want to tell Python to encode things to bytes for us. Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30test/py: Manual python3 fixesTom Rini
- Modern pytest is more visible in telling us about parameters that we had not described, so describe a few more. - ConfigParser.readfp(...) is now configparser.read_file(...) - As part of the "strings vs bytes" conversions in Python 3, we use the default encoding/decoding of utf-8 but in some places tell Python to replace problematic conversions rather than throw a fatal error. - Fix a typo noticed while doing the above ("tot he" -> "to the"). - As suggested by Stephen, re-alphabetize the import list - Per Heinrich, replace how we write contents in test_fit.py Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30test/py: Automated conversion to Python 3Tom Rini
Use the 2to3 tool to perform numerous automatic conversions from Python 2 syntax to Python 3. Also fix whitespace problems that Python 3 catches that Python 2 did not. Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30test/py: Fix pytest4 deprecation warningsMarek Vasut
Fix the following spit from pytest: u-boot/test/py/conftest.py:438: RemovedInPytest4Warning: MarkInfo objects are deprecated as they contain merged marks which are hard to deal with correctly. Please use node.get_closest_marker(name) or node.iter_markers(name). Docs: https://docs.pytest.org/en/latest/mark.html#updating-code for board in mark.args: In both cases, the later suggestion is applicable. Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Igor Opaniuk <igor.opaniuk@gmail.com> [trini: Update for current file with a few more cases, un-pin pytest in CI] Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2019-10-30test/py: Split mark to multiple linesTom Rini
We inconsistently note multiple dependencies today in our tests, sometimes with a single line that declares multiple and sometimes multiple single lines. Current pytest seems to fail on the single line format so change to multiple declarations. Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Tom Rini <trini@konsulko.com>