summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-01-31arm: kirkwood: Pogoplug-V4 : Add DTS filesTony Dinh
Add DTS files for Pogoplug V4 board Reviewed-by: Stefan Roese <[email protected]> Signed-off-by: Tony Dinh <[email protected]> Reviewed-by: Pali Rohár <[email protected]>
2022-01-31arm: mvebu: Espressobin: Fix URLs in commentsPali Rohár
Use versioned URLs for line numbers as branches are moving in the time and use master branch for mv-ddr-marvell where is up-to-date code. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-01-30binman: Skip node generation for images read from filesJan Kiszka
We can and should run the node generator only when creating a new image. When we read it back, there is no need to generate nodes - they already exits, and binman does not dive that deep into the image - and there is no way to provide the required fdt-list. So store the mode in the image object so that Entry_fit can simply skip generator nodes when reading them from an fdtmap. This unbreaks all read-backs of images that contain generator nodes in their fdtmap. To confirm this, add a corresponding test case. Signed-off-by: Jan Kiszka <[email protected]> Reviewed-by: Simon Glass <[email protected]> Tested-by: Simon Glass <[email protected]> Add SPDX to dts file: Signed-off-by: Simon Glass <[email protected]>
2022-01-30moveconfig: Fix code relying on now-stripped newline charactersAlper Nebi Yasak
Commit 37f815cad07d ("moveconfig: Use a function to read files") adds a helper function that can read a file as lines, but strips the newline characters. This change broke parts of moveconfig code that relied on their existence, resulting in a few issues: Configs that are defined as empty aren't removed from header files (e.g. "#define CONFIG_REMAKE_ELF"). Make regex patterns use '\b' to match word boundaries instead of '\W' (which matched the newlines) so these lines still match and get removed. All changes in defconfig are considered removed by savedefconfig even if they weren't, and line continuations in the headers aren't recognized and removed properly, because their checks explicitly look for a newline character. Remove the character from both comparisons. The printed diff of header files is wrongly formatted and raises an IndexError if a blank line was removed. Let print() print the new lines, and use size-independent ways to check strings to fix the diff output. Signed-off-by: Alper Nebi Yasak <[email protected]> Reviewed-by: Simon Glass <[email protected]> Tested-by: Simon Glass <[email protected]>
2022-01-30Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxiTom Rini
a bit delayed, the first batch of the sunxi pull request for this cycle. This is mostly collecting some patches that were lying around for a while, plus some recent fixes. Nothing too exciting at this point, but of course they should be merged nevertheless. There is the much bigger F1C100s SoC support coming up, which I hope to be able to send in the next few days, along with the removal of sunxi's lowlevel_init usage. Compile tested for all 159 sunxi boards, plus briefly tested on BananaPi M1, OrangePi Zero, Pine64 and Pine-H64.
2022-01-30mkimage: sunxi_egon: Allow overriding the padding sizeSamuel Holland
Due to a bug in the H3 SoC, where the CPU 0 hotplug flag cannot be written, resuming CPU 0 requires using the "Super Standby" code path in the BROM instead of the hotplug path. This path requires jumping to an eGON image in SRAM. This resume image, whose single purpose is to jump back to the secure monitor, only needs to contain a single instruction. Padding the image to 8 KiB would be wasteful of SRAM. Hook up the -B (block size) option so users can set the block/padding size. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2022-01-30sunxi: Fix H616 DRAM read calibration for dual rankJernej Skrabec
Although it isn't known what bit 0 in PHY reg 8 does, it's obvious that it has to be set before read calibration and cleared afterwards. This is already done for first rank, but not for second (copy & paste error.) Fix it. Fixes: f4317dbd06b6 ("sunxi: Add H616 DRAM support") Signed-off-by: Jernej Skrabec <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2022-01-30sunxi: fix H616 DRAM ODT supportJernej Skrabec
Kconfig symbol is missing CONFIG_ prefix, so compiler will always skip ODT configuration. Fix symbol name. Fixes: f4317dbd06b6 ("sunxi: Add H616 DRAM support") Signed-off-by: Jernej Skrabec <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2022-01-30sunxi: Add option to prevent booting on power plug-inChris Morgan
For sunxi boards with the AXP209, AXP221, AXP809, and AXP818 PMICs (plus possibly others, I only confirmed the datasheets for these), it is sometimes desirable to not boot whenever the device is plugged in. An example would be when using the NTC CHIP inside a PocketCHIP. This provides a configurable option to check if bit 0 of register 0 of the PMIC says it was powered because of a power button press (0) or a plug-in event (1). If the value is 1 and this option is selected, the device shuts down shortly after printing a message to console stating the reason why it's shutting down. Powering up the board with the power button is not affected. Signed-off-by: Chris Morgan <[email protected]> [Andre: reword to speak of boot, remove #ifdefs] Signed-off-by: Andre Przywara <[email protected]>
2022-01-30pmic: axp: define ALDO_IN startup bitAndre Przywara
Most AXP PMICs feature a "startup source" register, which keeps information about how the PMIC started operation. Bit 0 in there means it has been started by "plugging in the power cable". Define a symbol in each PMIC's header file to be able to use that register and bit later on. Signed-off-by: Andre Przywara <[email protected]>
2022-01-30sunxi: gpio: Fix up pointer arithmeticAndre Przywara
The calls for flipping bits in the Allwinner pin controller registers were using unnecessarily complex pointer arithmetic. Improve readability by simplifying the expression. Signed-off-by: Andre Przywara <[email protected]>
2022-01-30mmc: sunxi: Use DM_GPIO flags to set pull-upSamuel Holland
Now that the sunxi_gpio driver handles pull-up/down via the driver model, pin configuration does not need a platform-specific function. Signed-off-by: Samuel Holland <[email protected]> Tested-by: Heinrich Schuchardt <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2022-01-30gpio: sunxi: Implement .set_flagsSamuel Holland
This, along with gpio_flags_xlate(), allows the GPIO driver to handle pull-up/down flags provided by consumer drivers or in the device tree. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2022-01-30sunxi: gpio: Add per-bank drive and pull settersSamuel Holland
The GPIO and pinctrl drivers need these setters for pin configuration. Since they are DM drivers, they should not be using hardcoded base addresses. Factor out variants of the setter functions which take a pointer to the GPIO bank's MMIO registers. Signed-off-by: Samuel Holland <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2022-01-30sunxi: gpio: Return void from setter functionsSamuel Holland
The return values of these functions are always zero, and they are never checked. Since they are not needed, remove them. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2022-01-30sunxi: dram_sun4i/5i: use DRAM_MEMORY_TYPE_DDR3 instead of magic number 3Giulio Benetti
Since DRAM_MEMORY_TYPE_DDR3 is defined let's use it instead of magic number 3. Signed-off-by: Giulio Benetti <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2022-01-30i2c: mvtwsi: Add compatible string for allwinner, sun4i-a10-i2cChris Morgan
This adds a compatible string for the Allwinner Sun4i-A10 I2C controller. Without this, boards based on the R8 and A13 (at a minimum) fail to boot. Signed-off-by: Chris Morgan <[email protected]> Acked-by: Akash Gajjar <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2022-01-30sunxi: call fdt_fixup_ethernet again to set macaddr for more aliasesIcenowy Zheng
Sometimes some ethernet aliases do not exist in U-Boot DT but they exist in the DT used to boot the system (for example, modified via DT overlays). In this situation setup_environment is called again in ft_board_setup() to generate macaddr environment variable for them. However now the call to fdt_fixup_ethernet() is moved before the call of ft_board_setup(). Call fdt_fixup_ethernet() again to add MAC addresses for the extra ethernet aliases. Signed-off-by: Icenowy Zheng <[email protected]> [updated commit message] Signed-off-by: Jernej Skrabec <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2022-01-30sunxi: SPI: fix pinmuxing for Allwinner H6 SoCsDaniel Wagenknecht
The driver for SPI0 on Allwinner H6 SoCs did not use the correct define SUN50I_GPC_SPI0 for the pin function, but one for a different Allwinner SoC series. Fix the conditionals to use the correct define for H6 SoCs. This matches the conditional logic in the SPL spi driver. Tested by probing the spi-flash on a pine64_h64-model-b board with adapted device-tree (disable mmc2, enable spi0). Signed-off-by: Daniel Wagenknecht <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2022-01-29Merge tag 'efi-2022-04-rc1-3' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2022-04-rc1-3 Documentation: * update Nokia RX-51 documentation and move it to rst * describe boot switch settings for HiFive Unmatched board UEFI: * fix the checking of images hashes and signatures * provide the RISCV_EFI_BOOT_PROTOCOL
2022-01-29Merge branch '2022-01-28-assorted-fixes'Tom Rini
- Extend the pci command to support a few more features. - Add support for custom SPL boot device names (so it's easier for users to understand) - Updates for am64x to address some review comments. - Migration deadline notice for DM_SERIAL - coreboot payload test - Support rsa3072 signatures. - DFU should skip writing empty UBI pages, bootcount printf format char correction.
2022-01-29squashfs: show an error message if the inode_table can't be, allocatedLars Weber
Signed-off-by: Lars Weber <[email protected]>
2022-01-29efi_loader: hash the image once before checking against db/dbxIlias Apalodimas
We don't have to recalculate the image hash every time we check against a new db/dbx entry. So let's add a flag forcing it to run once since we only support sha256 hashes Suggested-by: Heinrich Schuchardt <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2022-01-29efi_loader: correctly handle mixed hashes and signatures in dbIlias Apalodimas
A mix of signatures and hashes in db doesn't always work as intended. Currently if the digest algorithm is not explicitly set to sha256 we stop walking the security database and reject the image. That's problematic in case we find and try to check a signature before inspecting the sha256 hash. If the image is unsigned we will reject it even if the digest matches. Since we no longer reject the image on unknown algorithms add an explicit check and reject the image if any other hash algorithm apart from sha256 is detected on dbx. Suggested-by: Heinrich Schuchardt <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2022-01-29lib: allow printing RISC-V EFI Boot Protocol GUIDHeinrich Schuchardt
On RISC-V a new UEFI protocol has been introduced. Support printing its GUID using %pUs. Signed-off-by: Heinrich Schuchardt <[email protected]>
2022-01-29efi_loader: Enable RISCV_EFI_BOOT_PROTOCOL supportSunil V L
This adds support for new RISCV_EFI_BOOT_PROTOCOL to communicate the boot hart ID to bootloader/kernel on RISC-V UEFI platforms. The specification of the protocol is hosted at: https://github.com/riscv-non-isa/riscv-uefi Signed-off-by: Sunil V L <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2022-01-29tools: mkeficapsule: rework the code a little bitAKASHI Takahiro
Abstract common routines to make the code easily understandable. No functional change. Signed-off-by: AKASHI Takahiro <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-01-29tools: mkeficapsule: output messages to stderr instead of stdoutAKASHI Takahiro
All the error messages should be printed out to stderr. Signed-off-by: AKASHI Takahiro <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2022-01-29efi_loader: correct function comment styleHeinrich Schuchardt
Replace @return and @param. Signed-off-by: Heinrich Schuchardt <[email protected]>
2022-01-29doc: describe MSEL settings for booting from SD cardHeinrich Schuchardt
unmatched.rst describes booting from SD card or from SPI. But only for booting from SPI the boot selection settings are described. Add the missing information. Fix a typo 'uSD'. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2022-01-29Nokia RX-51: Convert documentation to rst formatPali Rohár
Convert documentation to rst format Signed-off-by: Pali Rohár <[email protected]> Signed-off-by: Heinrich Schuchardt <[email protected]>
2022-01-29Nokia RX-51: Update documentation about flashingPali Rohár
This change contains update for doc/README.nokia_rx51 documentation file with information how to load U-Boot image to device RAM without need to flash it and also how to flash it into OneNAND via 0xFFFF flasher. Signed-off-by: Pali Rohár <[email protected]>
2022-01-29Nokia RX-51: Update documentation about ext2/3/4Pali Rohár
Since commit 25c5b6517854 ("Nokia RX-51: Do not try calling both ext2load and ext4load") command ext4load is used for all ext2/3/4 fs variants. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2022-01-28dm: serial: Add a migration deadline for serialSimon Glass
This probably should have been done a while back since it is a core system. Very few boards remain to be migrated. Addd a migration deadline for a year out. Signed-off-by: Simon Glass <[email protected]>
2022-01-28gitlab/azure: x86: Add a coreboot testSimon Glass
Coreboot supports U-Boot as a payload and this recently got a bit of a facelist. Add a test for this. For now this uses a binary build of coreboot (v4.15). Future work could potentially build it from source, but we need to figure out the toolchain problems first, since coreboot uses its own toolchain. It turns out that this is tricky, because coreboot fails to build with a vanilla gcc. This needs some changes to the hooks scripts as well. An example build is at https://source.denx.de/u-boot/custodians/u-boot-dm/-/jobs/359687 Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2022-01-28configs: am64x_evm_r5/a53_defconfig: Enable configs required for EthbootVignesh Raghavendra
Enable config options needed to support Ethernet boot on AM64x SK. Signed-off-by: Vignesh Raghavendra <[email protected]>
2022-01-28configs: am64xx_evm: Increase BSS max size to 16KVignesh Raghavendra
With Ethboot support in SPL, network stack requires more BSS area, so increase BSS max size to 16K Signed-off-by: Vignesh Raghavendra <[email protected]>
2022-01-28ARM: dts: k3-am642-sk: Disable cpsw_port1 in SPLVignesh Raghavendra
ROM supports cpsw_port2 for Ethernet boot and SPL stages continue to download images on the same port, therefore there is no need to enable cpsw_port1. Disable the same. Signed-off-by: Vignesh Raghavendra <[email protected]>
2022-01-28net: ti: am65-cpsw-nuss: Fix err msg for port bind failuresVignesh Raghavendra
Replace error case print with meaning full message. Signed-off-by: Vignesh Raghavendra <[email protected]>
2022-01-28rsa: adds rsa3072 algorithmJamin Lin
Add to support rsa 3072 bits algorithm in tools for image sign at host side and adds rsa 3072 bits verification in the image binary. Add test case in vboot for sha384 with rsa3072 algorithm testing. Signed-off-by: Jamin Lin <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-01-28bootcount: fix printf() codeHeinrich Schuchardt
For printing phys_addr_t we should use %pa to avoid warning like: drivers/bootcount/bootcount_syscon.c:110:17: note: in expansion of macro ‘dev_err’ 110 | dev_err(dev, "%s: Unsupported register size: %d\n", __func__, | ^~~~~~~ seen for sandbox_defconfig with CONFIG_PHYS_64BIT=y. Cf. commit 1eebd14b7902 ("vsprintf: Add modifier for phys_addr_t") Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-01-28dfu: mtd: skip empty pages when writing page for UBI partitionPatrick Delaunay
Align the DFU MTD backend for the UBI partitions with the mtd command write behavior when the option .dontskipff is not used: don't write the empty pages (full of 0xFF); it is not required for UBI, see [1] for details. This patch avoids the "free space fixup" procedure in the kernel [2] and allows to program a UBIFS volume generated by mkfs.ubifs without the option -F, --space-fixup. The MTD DFU backend implements this behavior introduced on DFU NAND backend by the commit 13cb7cc9e8e4 ("dfu: Add option to skip empty pages when flashing UBI images to NAND") and also supported by the command nand by CONFIG_CMD_NAND_TRIMFFS and by commit c9494866df83 ("cmd_nand: add nand write.trimffs command"). [1] http://www.linux-mtd.infradead.org/doc/ubi.html#L_flasher_algo [2] http://www.linux-mtd.infradead.org/faq/ubifs.html#L_free_space_fixup Signed-off-by: Patrick Delaunay <[email protected]>
2022-01-28pci: Extend 'pci' command with bus option '*'Pali Rohár
Allow to call 'pci' and 'pci regions' commands with bus option '*' which cause pci to process all buses. PCIe is point-to-point HW and so on each bus is maximally one physical device. Therefore for PCIe it is common to have multiple buses. This change allows to easily print all available PCIe devices in system. Make '*' as default option when no bus argument is specified. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-01-28pci: Add checks for valid cmdline argumentsPali Rohár
Currently pci command ignores invalid cmdline arguments and do something. Add checks that all passed arguments were processed. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-01-28pci: Extend 'pci regions' command with bus numberPali Rohár
'pci regions' currently prints only region information from bus 0 which belongs to controller 0. Parser for 'pci regions' cmdline currently ignores any additional arguments and so U-Boot always uses bus 0. Regions are stored in controller (not on the bus) and therefore to retrieve controller from the bus, it is needed to call pci_get_controller() which returns root bus. Because bus 0 is root bus, current code worked fine for controller 0. Extend cmdline parser for 'pci regions' to allows specifying bus number, extend pci_show_regions() code to accept also non-zero bus number and print bus ranges for which is regions configuration assigned. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-01-28pci: Fix setting controller's last_busnoPali Rohár
Initially it is set to dev_seq but update to the last bus number is missing. Fix it. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-01-28spl: add support for custom boot method namesHeiko Thiery
Currently the names MMC1, MMC2 and MMC2_2 are output in the SPL. To achieve more userbility here the name of the boot source can be returned. E.g. for "MMC1" -> "eMMC" or "MMC2" -> "SD card". Signed-off-by: Heiko Thiery <[email protected]> Reviewed-by: Michael Walle <[email protected]> Tested-by: Michael Walle <[email protected]>
2022-01-28Merge branch '2022-01-28-fastboot-updates'Tom Rini
- 3 DFU/fastboot bugfixes
2022-01-28fastboot: only look up real partition names when no alias existsMatthias Schiffer
Having U-Boot look up the passed partition name even though an alias exists is unexpected, leading to warning messages (when the alias name doesn't exist as a real partition name) or the use of the wrong partition. Change part_get_info_by_name_or_alias() to consider real partitions names only if no alias of the same name exists, allowing to use aliases to override the configuration for existing partition names. Also change one use of strcpy() to strlcpy(). Signed-off-by: Matthias Schiffer <[email protected]> Reviewed-by: Sean Anderson <[email protected]>
2022-01-28dfu: handle short frame result of UPLOAD in state_dfu_idlePatrick Delaunay
In DFU v1.1 specification [1] the DFU_UPLOAD (Short Frame) is handled only in dfuUPLOADIDLE state: - Figure A.1 Interface state transition diagram - the state description in chapter A.2 A.2.3 State 2 dfuIDLE on Receipt of the DFU_UPLOAD request,and bitCanUpload = 1 the Next State is dfuUPLOADIDLE A.2.10 State 9 dfuUPLOAD-IDLE When the length of the data transferred by the device in response to a DFU_UPLOAD request is less than wLength. (Short frame) the Next State is dfuIDLE In current code, when an UPLOAD is completely performed after the first request (for example with wLength=200 and data read = 9), the DFU state stay at dfuUPLOADIDLE until receiving a DFU_UPLOAD or a DFU_ABORT request even it is unnecessary as the previous DFU_UPLOAD request already reached the EOF. This patch proposes to finish the DFU uploading (don't go to dfuUPLOADIDLE) and completes the control-read operation (go to DFU_STATE_dfuIDLE) when the first UPLOAD response has a short frame as an end of file (EOF) indicator even if it is not explicitly allowed in the DFU specification but this seems logical. [1] https://www.usb.org/sites/default/files/DFU_1.1.pdf Signed-off-by: Patrick Delaunay <[email protected]>