aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-01-24configs: Resync with savedefconfigTom Rini199-210/+155
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2022-01-24moveconfig: Fix some pylint errorsSimon Glass1-96/+110
There are over 200 errors in this file. Fix some of them, starting at the beginning of the file. Future work can continue this effort. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-24moveconfig: Use a function to read filesSimon Glass1-50/+63
At present there is quite a bit of ad-hoc code reading from files. The most common case is to read the file as lines. Put it in a function and set the unicode encoding correctly. Avoid writing back to a file when there are obviously no changes as this speeds things up slightly. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-24moveconfig: Use a function to write filesSimon Glass1-18/+23
At present there is quite a bit of ad-hoc code writing to files. The treatment of newlines is different in some of them. Put it in a function and set the unicode encoding correctly. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-24moveconfig: Drop check for old PythonSimon Glass1-9/+1
Python 2 is not supported anymore and Python 3 has had subprocess.DEVNULL since version 3.3 which was released in 2012. Drop the unnecessary check. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2022-01-24moveconfig: Convert to ArgumentParserSimon Glass1-109/+112
This is a newer library and is now preferred for Python scripts. Update the code to use it instead of optparse Use 'args' instead of 'options' throughout, since this is the term used in that module. Also it helps to avoid confusion with CONFIG options, a term that is used in this file. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-24moveconfig: Use single quotesSimon Glass1-36/+36
Quite a few places use double quotes. Fix this to be consistent with other Python code in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2022-01-24moveconfig: Allow querying board configurationSimon Glass2-6/+105
It is useful to be able to find out which boards define a particular option, or combination of options. This is not as easy as grepping the defconfig files since many options are implied by others. Add a -f option to the moveconfig tool to permit this. Update the documentation to cover this, including a better title for the doc page. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-24moveconfig: Allow adding unit testsSimon Glass1-0/+9
Add a -t option to run unit tests in this program. So far, there is none. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-24moveconfig: Sort the optionsSimon Glass1-10/+12
Put the options in sorted order by their short name so it is easier to find an option. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-24moveconfig: Read the database in a separate functionSimon Glass1-29/+49
Move this code out into a function so it can be used elsewhere. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-24moveconfig: Correct operation of the 'imply' featureSimon Glass1-4/+5
This doesn't work anymore, since the Kconfig update. The script has no tests so we did not notice. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-24test: fix pylint warnings in test_env.pyHeinrich Schuchardt1-8/+12
* assert does not need parentheses * add module docstring * fix misspelled constant True * limit lines to 100 characters Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-24Makefile: Add a pylint checker to the buildSimon Glass5-1/+351
At present the Python code in U-Boot is somewhat inconsistent, with some files passing pylint quite cleanly and others not. Add a way to track progress on this clean-up, by checking that no module has got any worse as a result of changes. This can be used with 'make pylint'. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Re-generate pylint.base]
2022-01-24tools: Add init files for Python toolsSimon Glass3-0/+0
Add some empty __init__ files for binman, buildman and dtoc so that pylint is able to recognise these as Python modules and produce more useful pylint output. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-24patman: Update the list of modulesSimon Glass1-3/+6
Update the __init__ file to include recently added files. Add a license header while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-24dtoc: Fix up a code comment that confuses pylintSimon Glass1-1/+1
This produces a pylint error at present. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-24.gitignore: Ignore any html coverage directorySimon Glass1-0/+3
This is created when checking code coverage of Python tools. Ignore it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-24pci: iproc: Set all 24 bits of PCI class codePali Rohár1-5/+4
Register 0x43c in its low 24 bits contains PCI class code. Update code to set all 24 bits of PCI class code and not only upper 16 bits of PCI class code. Use standard U-Boot macro (PCI_CLASS_BRIDGE_PCI << 8) for constructing all 24-bits of PCI class for PCI bridge Normal decode. Signed-off-by: Pali Rohár <pali@kernel.org> Acked-by: Roman Bacik <roman.bacik@broadcom.com>
2022-01-24Merge branch '2022-01-24-assorted-fixes-and-updates'Tom Rini16-50/+80
- Assorted dumpimage/mkimage fixes, allow setting the signature algorithm on the command line with mkimage - Bugfix to the misc uclass, CONFIG_MP / CMD_MP Kconfig logic improved, updated Xen platform MAINTAINERS entry and fixed vexpress_aemv8a_semi booting.
2022-01-24cmd: Add Kconfig option for multiprocessor cmdsAshok Reddy Soma3-6/+13
Add Kconfig option(CONFIG_CMD_MP) to enable or disable multiprocessor commands. Compile cmd/mp.c based on CONFIG_CMD_MP. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2022-01-24mkimage: struct stat.st_size may not be longHeinrich Schuchardt1-3/+4
The component st_size of struct stat is of type off_t. Depending on the system printing it using %ld leads to a warning: tools/mkimage.c:438:54: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'off_t' {aka 'long long int'} [-Wformat=] 438 | "%s: Bad size: \"%s\" is not valid image: size %ld < %u\n", | ~~^ | | | long int | %lld When comparing an off_t value to a 32bit integer we should not convert to uint32_t but to off_t which may be wider. Reported-by: Milan P. Stanić <mps@arvanta.net> Fixes: 331f0800f1a3 ("mkimage: allow -l to work on block devices on Linux") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2022-01-24MAINTAINERS: Update e-mail in Xen maintainershipAnastasiia Lukianenko1-1/+1
Changing e-mail because of leaving EPAM. Signed-off-by: Anastasiia Lukianenko <vicooodin@gmail.com> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
2022-01-24mkimage: Allow to specify the signature algorithm on the command lineJan Kiszka6-23/+42
This permits to prepare FIT image description that do not hard-code the final choice of the signature algorithm, possibly requiring the user to patch the sources. When -o <algo> is specified, this information is used in favor of the 'algo' property in the signature node. Furthermore, that property is set accordingly when writing the image. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2022-01-24mkimage: Drop unused OPT_STRING constantJan Kiszka1-1/+0
The actual opt string is inlined - and different. Seems this was a left-over from older versions of 603e26f76346. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-24image-fit: Make string of algo parameter constantJan Kiszka4-8/+8
Modifications would be invalid. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-24misc: mark write buffer constJohn Keeping2-2/+2
The write operation in misc_ops already takes a "const void *" buffer, but misc_write() takes a mutable "void *". There's no reason for this, so make misc_write() consistent with the standard write() prototype. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-24tools/fitimage: make sure dumpimage still works when "@" are detectedStefan Eichenberger1-2/+10
fit_verify_header fails if it detects unit addresses "@". However, this will break tools like dumpimage on fit images which worked with previous versions of the tool (e.g. 2020.04 vs 2021.07). As an example the output of: dumpimage -l <fit image> is: FIT description: U-Boot fitImage for Linux Distribution Created: Thu Jan 1 01:00:00 1970 Image 0 (kernel@1) Description: Linux kernel Created: Thu Jan 1 01:00:00 1970 Type: Kernel Image Compression: gzip compressed Data Size: 6442456 Bytes = 6291.46 KiB = 6.14 MiB Architecture: AArch64 OS: Linux Load Address: 0x80080000 Entry Point: 0x80080000 Hash algo: sha256 Hash value: ... Image 1 (fdt@freescale_fsl-s32g274a-evb.dtb) Description: Flattened Device Tree blob Created: Thu Jan 1 01:00:00 1970 Type: Flat Device Tree Compression: uncompressed Data Size: 39661 Bytes = 38.73 KiB = 0.04 MiB Architecture: AArch64 Hash algo: sha256 Hash value: ... Default Configuration: 'conf@freescale_fsl-s32g274a-evb.dtb' Configuration 0 (conf@freescale_fsl-s32g274a-evb.dtb) Description: 1 Linux kernel, FDT blob Kernel: kernel@1 FDT: fdt@freescale_fsl-s32g274a-evb.dtb Hash algo: sha256 Hash value: unavailable But with newer version it shows: dumpimage -l <fit image> GP Header: Size d00dfeed LoadAddr 62f0a4 This commit will output a warning that unit addresses were detected but will not fail: dumpimage -l <fit image> Image contains unit addresses @, this will break signing ... Signed-off-by: Stefan Eichenberger <eichest@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-24tools/fitimage: remove redundant format checkStefan Eichenberger1-5/+0
fit_extract_contents does a fit_check_format even thought it was already checked during imagetool_verify_print_header. Therefore, this check is not necessary. This commit removes the redundancy. Signed-off-by: Stefan Eichenberger <eichest@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-24vexpress64: semi_defconfig: disable CRC32 supportAndre Przywara1-0/+1
Commit 270f8710f92f ("crc32: Add crc32 implementation using __builtin_aarch64_crc32b") enabled the usage of ARMv8 CRC instructions by default, for all arm64 builds. And indeed all Arm Ltd. v8 Cortex-A cores support the instructions, and they are mandatory starting with architecture revision v8.1, so realistically every known hardware implementation should support them. The Arm Fastmodel however defaults to the bare minimum ARMv8 feature set by default, which means v8.0 without the CRC instructions, so U-Boot hangs very early at the moment, without any output (the boot-wrapper or TF-A printing the last visible lines). Support for those instructions can be enabled on the model command line by either: -C cluster0.cpu0.enable_crc32=1 (for each core) or by using a higher architecture revision by default: -C cluster0.has_arm_v8-1=1 (for each cluster) Of course any arch revision higher than v8.1 would work as well. But for the sake of a smooth out-of-the-box experience, let's just disable the usage of those instructions in the defconfig, to avoid random hangs without any clues. Reported-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Marek Vasut <marex@denx.de>
2022-01-24Merge tag 'u-boot-stm32-20220124' of ↵WIP/24Jan2022Tom Rini30-684/+1510
https://source.denx.de/u-boot/custodians/u-boot-stm - stm32mp15: sync DT with kernel v5.16 - stm32mp15: Enable OF_BOARD config flag - DHCOM: sync DT with kernel 5.15.12 - stm32mp: Fix USB boot device - stm32mp: Remove bootcount activation - stm32mp: Fix board_get_alt_info_mmc() - board: stm32mp1: solve compilation issue when ENV_IS_IN_MMC is deactivated - stm32prog: add partition name in treat_partition_list error messages
2022-01-24configs: stm32mp15: Enable OF_BOARD flagPatrice Chotard1-0/+1
Since commit 985503439762 ("fdt: Don't call board_fdt_blob_setup() without OF_BOARD") board_fdt_blob_setup() is no more called on STM32MP platforms in trusted boot which hangs during boot process. Enable OF_BOARD flag to fix this issue. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-01-24stm32prog: add partition name in treat_partition_list error messagesPatrick Delaunay1-6/+6
Add the partition name and remove the line number in error messages of treat_partition_list() to provide correct information to user of STM32CubeProgrammer. The "line number" value was confusing because it is incorrect here; the index in part_array[] is not aligned with the line number in the parsed Layout file, because the empty lines and the lines beginning by '#' are skipped during the first parsing in parse_flash_layout(). Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-01-24board: stm32mp1: solve compilation issue when ENV_IS_IN_MMC is deactivatedPatrick Delaunay1-2/+4
Solve compilation issue on undefined CONFIG_SYS_MMC_ENV_DEV when CONFIG_ENV_IS_IN_MMC is deactivated on STMicroelectronics boards defconfig Fixes: 9f97193616f1 ("board: stm32mp1: use CONFIG_SYS_MMC_ENV_DEV when available") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-01-24stm32mp: fix board_get_alt_info_mmc()Heinrich Schuchardt1-1/+1
MAX_SEARCH_PARTITIONS is the highest possible partition number. Do not skip the last partition in board_get_alt_info_mmc(). Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-01-24ARM: dts: stm32: Synchronize DHCOM DTs with Linux 5.15.12Marek Vasut10-424/+917
Synchronize DH DHCOM DTs with Linux commit 25960cafa06e ("Linux 5.15.12"). There is no functional change to the resulting DTs. The eeprom0 alias and PHY reset GPIO are now reinstated in SoM u-boot dtsi. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-01-24ARM: dts: stm32: Synchronize DHCOR DTs with Linux 5.15.12Marek Vasut9-224/+503
Synchronize DH DHCOR DTs with Linux commit 25960cafa06e ("Linux 5.15.12"). There is no functional change to the resulting DTs. The eeprom0 alias is now reinstated in SoM u-boot dtsi, the PHY reset GPIO is reinstated in AV96 u-boot dtsi. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-01-24arm: dts: stm32mp15: alignment with v5.16Patrick Delaunay3-14/+15
Device tree alignment with Linux kernel v5.16-rc5 - ARM: dts: stm32: set otg-rev on stm32mp151 - ARM: dts: stm32: use usbphyc ck_usbo_48m as USBH OHCI clock on stm32mp151 - ARM: dts: stm32: fix AV96 board SAI2 pin muxing on stm32mp15 - ARM: dts: stm32: fix SAI sub nodes register range - ARM: dts: stm32: fix STUSB1600 Type-C irq level on stm32mp15xx-dkx Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-01-24stm32mp: correct the dependency for bootcount configsPatrick Delaunay1-1/+1
Default value for CONFIG_SYS_BOOTCOUNT_SINGLEWORD and CONFIG_SYS_BOOTCOUNT_ADDR are only needed when CONFIG_BOOTCOUNT_GENERIC is used. This patch avoids to define these configs when an other bootcount backend is activated, for example for CONFIG_BOOTCOUNT_ENV. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-01-24stm32mp: remove the bootcount activationPatrick Delaunay2-9/+0
Today the bootcount is not managed by the Linux kernel for STM32MP15 as we don't have driver to update the used backup register in TAMP and the recovery command still executes the normal bootcmd with 'altbootcmd=run bootcmd'. So the bootcount feature is never used, the config CONFIG_BOOTCOUNT_LIMIT and the associated environment variable 'altbootcmd' can be removed to reduce the U-Boot size. Each boards can re-enable this feature later in their defconfig, if it is needed, with the expected backend, for example CONFIG_BOOTCOUNT_GENERIC or CONFIG_BOOTCOUNT_ENV. CC: Marek Vasut <marex@denx.de> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-01-24ARM: dts: stm32: Add DFU support for DHCOR recoveryMarek Vasut3-2/+61
This patch configures U-Boot SPL for DHCOR SoM to permit DFU upload of SPL and subsequent u-boot.itb for recovery or commissioning purposes. To start U-Boot on DHCOR based board, e.g. Avenger96, proceed as follows: - Install dfu-util on the host PC (in debian this is package 'dfu-util') - Power off the Avenger96 board. - Connect both USB-serial console and USB-OTG microB ports to host PC. - Switch Avenger96 to USB boot mode -- BOOT0..2 switches all set to 0. - Power on the Avenger96 board. - Verify using '$ dmesg' that a new device has been detected as follows: New USB device found, idVendor=0483, idProduct=df11, bcdDevice= 2.00 New USB device strings: Mfr=1, Product=2, SerialNumber=3 Product: DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000 Manufacturer: STMicroelectronics - Upload U-Boot SPL: $ dfu-util -a 1 -D u-boot-spl.stm32 - Upload U-Boot proper: $ dfu-util -a 0 -D u-boot.itb - At this point, SPL will wait for user to press "Ctrl-C" on serial console. When ready to interact with U-Boot, press Ctrl-C to start the bootloader. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-01-24arm: stm32mp: Fix USB boot device reportMarek Vasut1-1/+1
In case the SoC reports the boot device type is USB, it means the SPL was loaded via BootROM DFU mode. Currently the spl_boot_device() returns boot device as USB host, change it to DFU instead, so the SPL can continue the DFU boot and load U-Boot via DFU. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-01-23Merge https://source.denx.de/u-boot/custodians/u-boot-shTom Rini3-10/+11
- rzg2_beacon updates
2022-01-22arm: dts: rz-g2-beacon-u-boot: Enable pinmux for QSPIAdam Ford1-0/+9
When booting from QSPI, the boot ROM appears to mux the QSPI pins, but it's not guaranteed to be setup when booting from eMMC. Fix this by explicitly configuring the pinmux. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-01-22arm: rmobile: rzg2_beacon: Migrate reset to SYSRESET_PSCIAdam Ford2-10/+2
Instead of a custom cpu_reset function, use the sysreset_psci instead to reduce redundant code clutter. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-01-22Merge tag 'efi-2022-04-rc1-2' of ↵WIP/22Jan2022Tom Rini27-284/+480
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2022-04-rc1-2 Documentation: * describe printf() format codes UEFI * enable more algorithms for UEFI image verification, e.g. SHA256-RSA2048 General * simplify printing short texts for GUIDs * provide a unit test for printing GUIDs
2022-01-21Merge branch '2022-01-21-Kconfig-migrations'Tom Rini321-389/+473
- Migrate CONFIG_KEEP_SERVERADDR, CONFIG_UDP_CHECKSUM, CONFIG_TIMESTAMP, CONFIG_BOOTP_SERVERIP, CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR, CONFIG_SYS_MAX_FLASH_BANKS_DETECT, CONFIG_SYS_MAX_FLASH_BANKS and CONFIG_AT91_EFLASH to Kconfig
2022-01-21Convert CONFIG_AT91_EFLASH to KconfigPatrick Delaunay4-3/+9
This converts the following to Kconfig: CONFIG_AT91_EFLASH Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Acked-by: Eugen Hristev <eugen.hristev@microchip.com>
2022-01-21configs: Migrate CONFIG_SYS_MAX_FLASH_BANKS to KconfigPatrick Delaunay185-129/+114
Use moveconfig.py script to convert define CONFIG_SYS_MAX_FLASH_BANKS and CONFIG_SYS_MAX_FLASH_BANKS_DETECT to Kconfig and move these entries to defconfigs. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> [trini: Re-switch to IS_ENABLED check in spi-nor-core.c, re-run migration] Signed-off-by: Tom Rini <trini@konsulko.com>
2022-01-21mtd: cfi: change CONFIG_SYS_MAX_FLASH_BANKS_DETECT as booleanPatrick Delaunay18-27/+35
Prepare migration to Kconfig. CONFIG_SYS_MAX_FLASH_BANKS_DETECT becomes boolean and CONFIG_SYS_MAX_FLASH_BANKS define the MAX size, also used for detection when CONFIG_SYS_MAX_FLASH_BANKS_DETECT=y (CFI_MAX_FLASH_BANKS = CONFIG_SYS_MAX_FLASH_BANKS). CONFIG_SYS_MAX_FLASH_BANKS become mandatory when CONFIG_SYS_MAX_FLASH_BANKS_DETECT is activated. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Stefan Roese <sr@denx.de>