Michal Suchanek [Thu, 4 Aug 2022 17:57:45 +0000 (19:57 +0200)]
doc: dm: clarify activation.
Explain when devices should get activated.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Sun, 14 Aug 2022 14:13:49 +0000 (16:13 +0200)]
doc: qemu-riscv: describe booting with QEMU and KVM
The ELF U-Boot image produced by qemu-riscv64_smode_defconfig can be
used to boot with QEMU and KVM.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tom Rini [Wed, 17 Aug 2022 16:10:34 +0000 (12:10 -0400)]
Merge tag 'fsl-qoriq-2022-8-17' of https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq
Enable SPL authentication for ls1021atwr
Fdt fixups for ls1043ardb v7.0 board
Camelia Groza [Thu, 28 Jul 2022 14:28:11 +0000 (17:28 +0300)]
board: ls1043ardb: fdt fixups for revision v7.0 boards
The LS1043ARDB rev v7.0 board replaces the AQR105 PHY on MAC9 with an
AQR113C PHY. The address of the PHY on the MDIO bus changes from 0x1 to
0x8. Enable CONFIG_OF_BOARD_FIXUP and update both u-boot and Linux device
trees to reflect this change.
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Gaurav Jain [Thu, 23 Jun 2022 11:01:35 +0000 (16:31 +0530)]
ls1021atwr: caam: Enable Uboot validaion in SPL.
caam driver model enabled in spl for secure boot.
fsl_rsa_mod_exp driver enabled in spl for validating uboot image.
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Tom Rini [Sat, 13 Aug 2022 11:37:48 +0000 (07:37 -0400)]
Merge tag 'efi-2022-10-rc3' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2022-10-rc3
Documentation:
* Add HTML documentation for patman
* Improve binman documentation
* Man-page for gpio
UEFI:
* move udevice pointer into struct efi_object
* fix efi_convert_device_path_to_text()
Other:
* fs/erofs: silence messages from erofs_probe()
Michal Simek [Tue, 9 Aug 2022 14:31:12 +0000 (16:31 +0200)]
cmd: efidebug: Add missing \n at the end of message
Currently message is not intended that prompt end up at the end of debug
line. For example like this:
DFU alt info setting: done
DFU entities configuration failed!
(partition table does not match dfu_alt_info?)
Firmware update failed: <NULL>
Cannot handle a capsule at 10000000Zynq>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Masahisa Kojima [Fri, 22 Jul 2022 02:39:10 +0000 (11:39 +0900)]
efi_loader: move udevice pointer into struct efi_object
This is a preparation patch to provide the unified method
to access udevice pointer associated with the EFI handle
by adding udevice pointer into struct efi_object.
The patch also introduces a helper function efi_link_dev()
to link the udevice and EFI handle.
The EFI handles of both EFI block io driver implemented in
lib/efi_loader/efi_disk.c and EFI block io driver implemented
as EFI payload can access the udevice pointer in the struct efi_object.
We can use this udevice pointer to get the U-Boot friendly
block device name(e.g. mmc 0:1, nvme 0:1) through EFI handle.
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Tue, 26 Jul 2022 05:45:18 +0000 (07:45 +0200)]
efi_loader: fix efi_convert_device_path_to_text()
Ensure that the string we convert to UTF-16 is NUL terminated even
if the device path only contains end nodes.
Fixes:
bd3d75bb0c58 ("efi_loader: multi part device paths to text")
Addresses-Coverity: 350434 ("Uninitialized scalar variable")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Simon Glass [Sun, 7 Aug 2022 22:33:26 +0000 (16:33 -0600)]
binman: Add more documentation about binman usage
This is an attempt to answer the comments provided by Xavier [1].
[1] https://lore.kernel.org/all/Yulcol7HpTHtjXTX@begut/
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Simon Glass [Sun, 7 Aug 2022 22:33:25 +0000 (16:33 -0600)]
binman: Add rST references for binman entry types
Add references in the documentation for each entry type, so we can refer
to them from other documentation.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Tue, 9 Aug 2022 19:49:57 +0000 (13:49 -0600)]
patman: Add documentation to doc/
Link to patman's documentation from the doc/ directory so that it appears
in the 'make htmldocs' output.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Simon Glass [Sun, 7 Aug 2022 13:24:52 +0000 (07:24 -0600)]
doc: Drop a reference to Travis
This was widely used by U-Boot for a long time, but is not used anymore,
with Gitlab and Azure taking over.
Drop the text.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tom Rini [Mon, 1 Aug 2022 18:57:01 +0000 (14:57 -0400)]
doc: develop: Add a note about importing code from other projects
We talk about importing code from other projects in two places. The
first place is in the coding style section, where we explain when to or
not to deviate in terms of white space, etc. In the process
documentation we now add a note about saying where the code was imported
from and to ensure that you do not copy Signed-off-by or other tags.
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Tue, 2 Aug 2022 13:36:42 +0000 (15:36 +0200)]
doc: crash_dumps.rst missing documentation link
Add link to usage/cmd/exception.rst.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Tue, 2 Aug 2022 13:23:32 +0000 (15:23 +0200)]
doc: add more details for crash dump analysis
* describe crashs in UEFI binaries
* provide architechture specific information for the sandbox and RISC-V
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Tue, 2 Aug 2022 12:20:32 +0000 (14:20 +0200)]
doc: man-page for gpio command
Provide a man-page for the gpio command.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Paul Barker [Fri, 29 Jul 2022 13:31:58 +0000 (14:31 +0100)]
bootstd: doc: Fix typos
These typos were found while reading the docs.
Signed-off-by: Paul Barker <paul.barker@sancloud.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Mon, 1 Aug 2022 13:27:11 +0000 (15:27 +0200)]
fs/erofs: silence erofs_probe()
fs_set_blk_dev() probes all file-systems until it finds one that matches
the volume. We do not expect any console output for non-matching
file-systems.
Convert error messages in erofs_read_superblock() to debug output.
Fixes:
830613f8f5bb ("fs/erofs: add erofs filesystem support")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Huang Jianan <jnhuang95@gmail.com>
Heinrich Schuchardt [Mon, 8 Aug 2022 19:51:10 +0000 (21:51 +0200)]
git-mailrc: remove invalid entry 'efi'
Remove alias 'efi' with invalid data.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Sat, 13 Aug 2022 01:39:15 +0000 (21:39 -0400)]
Merge branch '2022-08-12-assorted-updates'
- Clean up some code with the DH electronics boards, remove a few boards
that have had their removal ack'd, update Azure CI hosts for macOS and
Ubuntu, and migrate a few more symbols to Kconfig.
Tom Rini [Tue, 2 Aug 2022 11:33:35 +0000 (07:33 -0400)]
net: Remove smc91111 ethernet driver
This driver has not been converted to DM_ETH. The migration deadline
passed 2 years ago.
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: David Feng <fenghua@phytium.com.cn>
Cc: Liviu Dudau <liviu.dudau@foss.arm.com>
Cc: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Ramon Fried <rfried.dev@gmail.com>
Tom Rini [Tue, 2 Aug 2022 11:33:29 +0000 (07:33 -0400)]
arm: Remove snapper9260 board
This board is behind on several mandatory DM migrations and is missing
OF_CONTROL support that makes other conversions impossible. Remove it.
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Tue, 2 Aug 2022 11:33:28 +0000 (07:33 -0400)]
ppc: Remove ids8313 board
This board is behind on several mandatory DM migrations and is missing
OF_CONTROL support that makes other conversions impossible. Remove it.
Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Heiko Schocher <hs@denx.de>
Tom Rini [Tue, 2 Aug 2022 11:33:27 +0000 (07:33 -0400)]
Convert CONFIG_SYS_FDT_PAD to Kconfig
This converts the following to Kconfig:
CONFIG_SYS_FDT_PAD
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Mon, 1 Aug 2022 01:08:29 +0000 (21:08 -0400)]
Convert CONFIG_SYS_FSL_QMAN_V3 et al to Kconfig
This converts the following to Kconfig:
CONFIG_FSL_NGPIXIS
CONFIG_SYS_FSL_QMAN_V3
CONFIG_SYS_FSL_RAID_ENGINE
CONFIG_SYS_FSL_RMU
CONFIG_SYS_FSL_SINGLE_SOURCE_CLK
CONFIG_SYS_FSL_SRIO_LIODN
CONFIG_SYS_FSL_TBCLK_DIV
CONFIG_SYS_FSL_USB1_PHY_ENABLE
CONFIG_SYS_FSL_USB2_PHY_ENABLE
CONFIG_SYS_FSL_USB_DUAL_PHY_ENABLE
CONFIG_SYS_FSL_USB_INTERNAL_UTMI_PHY
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 1 Aug 2022 01:08:28 +0000 (21:08 -0400)]
Convert CONFIG_SYS_FSL_PCIE_COMPAT to Kconfig
This converts the following to Kconfig:
CONFIG_SYS_FSL_PCIE_COMPAT
To do this, introduce a choice and option for each of the strings used
and set CONFIG_SYS_FSL_PCIE_COMPAT based on that.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 1 Aug 2022 01:08:27 +0000 (21:08 -0400)]
Convert CONFIG_SYS_FSL_NUM_CC_PLLS to Kconfig
This converts the following to Kconfig:
CONFIG_SYS_FSL_NUM_CC_PLLS
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 1 Aug 2022 01:08:26 +0000 (21:08 -0400)]
Convert CONFIG_SYS_FSL_MAX_NUM_OF_SEC to Kconfig
This converts the following to Kconfig:
CONFIG_SYS_FSL_MAX_NUM_OF_SEC
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 1 Aug 2022 01:08:25 +0000 (21:08 -0400)]
Convert CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE to Kconfig
This converts the following to Kconfig:
CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 1 Aug 2022 01:08:24 +0000 (21:08 -0400)]
Remove CONFIG_SYS_FSL_SCFG_IODSECR1_ADDR et al
This removes the following symbols:
CONFIG_SYS_FSL_DSPI_BE
CONFIG_SYS_FSL_DSP_CCSRBAR_DEFAULT
CONFIG_SYS_FSL_DSP_CCSR_DDR_ADDR
CONFIG_SYS_FSL_DSP_CCSR_DDR_OFFSET
CONFIG_SYS_FSL_DSP_DDR_ADDR
CONFIG_SYS_FSL_DSP_M2_RAM_ADDR
CONFIG_SYS_FSL_DSP_M3_RAM_ADDR
CONFIG_SYS_FSL_ERRATUM_A008751
CONFIG_SYS_FSL_ESDHC_BROKEN_TIMEOUT
CONFIG_SYS_FSL_ESDHC_NUM
CONFIG_SYS_FSL_ESDHC_P1010_BROKEN_SDCLK
CONFIG_SYS_FSL_FM1_RX0_1G_OFFSET
CONFIG_SYS_FSL_FM1_RX1_1G_OFFSET
CONFIG_SYS_FSL_FM1_RX2_1G_OFFSET
CONFIG_SYS_FSL_FM1_RX3_1G_OFFSET
CONFIG_SYS_FSL_FM1_RX4_1G_OFFSET
CONFIG_SYS_FSL_FM1_RX5_1G_OFFSET
CONFIG_SYS_FSL_ISBC_VER
CONFIG_SYS_FSL_QSPI_LE
CONFIG_SYS_FSL_SCFG_IODSECR1_ADDR
CONFIG_SYS_FSL_SCFG_IODSECR1_OFFSET
CONFIG_SYS_FSL_SCFG_PIXCLKCR_OFFSET
CONFIG_SYS_FSL_SCFG_PIXCLK_ADDR
CONFIG_SYS_FSL_SRDS_NUM_PLLS
CONFIG_SYS_FSL_WDOG_BE
CONFIG_SYS_GP1DIR
CONFIG_SYS_GP1ODR
CONFIG_SYS_GP2DIR
CONFIG_SYS_GP2ODR
CONFIG_SYS_HALT_BEFOR_RAM_JUMP
CONFIG_SYS_HMI_BASE
FSL_QSPI_FLASH_NUM
FSL_QSPI_FLASH_SIZE
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 1 Aug 2022 01:08:23 +0000 (21:08 -0400)]
arc: Move SYS_LITTLE_ENDIAN / SYS_BIG_ENDIAN selection to Kconfig
We can determine which of these we need given CPU_BIG_ENDIAN being
enabled or not, so move that logic to Kconfig from config.mk.
Cc: Alexey Brodkin <alexey.brodkin@synopsys.com>
Cc: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 1 Aug 2022 01:08:22 +0000 (21:08 -0400)]
Convert CONFIG_SYS_FSL_DDR_MAIN_NUM_CTRLS et al to Kconfig
This converts the following to Kconfig:
CONFIG_SYS_FSL_DDR_MAIN_NUM_CTRLS
CONFIG_SYS_FSL_OTHER_DDR_NUM_CTRLS
And we remove the entries from the README for a number of already
converted items.
Signed-off-by: Tom Rini <trini@konsulko.com>
Philip Oberfichtner [Tue, 26 Jul 2022 13:04:53 +0000 (15:04 +0200)]
ARM: stm32: DH: Use common MAC address functions
To reduce code duplication, let the stm32 based DH boards use the common
code for setting up their MAC addresses.
Signed-off-by: Philip Oberfichtner <pro@denx.de>
Tested-by: Marek Vasut <marex@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Philip Oberfichtner [Tue, 26 Jul 2022 13:04:52 +0000 (15:04 +0200)]
ARM: imx8: DH: Use common MAC address functions
To reduce code duplication, let the imx8 based DH boards use the common
code for setting up their MAC addresses.
Signed-off-by: Philip Oberfichtner <pro@denx.de>
Tested-by: Marek Vasut <marex@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Philip Oberfichtner [Tue, 26 Jul 2022 13:04:51 +0000 (15:04 +0200)]
ARM: imx6: DH: Use common MAC address functions
To reduce code duplication, let the imx6 based DH boards use the common
code for setting up their MAC addresses.
Signed-off-by: Philip Oberfichtner <pro@denx.de>
Tested-by: Marek Vasut <marex@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Philip Oberfichtner [Tue, 26 Jul 2022 13:04:50 +0000 (15:04 +0200)]
board: dhelectronics: Implement common MAC address functions
This is a starting point for unifying duplicate code in the DH board
files. The functions for setting up MAC addresses are very similar for
the i.MX6, i.MX8 and stm32mp1 based boards.
All pre-existing implementations follow the same logic:
(1) Check if ethaddr is already set in the environment
(2) If not, try to get it from a board specific location (e.g. fuse)
(3) If not, try to get it from eeprom
After this commit, (1) and (3) are implemented as common functions,
ready to be used by board specific files.
Furthermore there is an implementation of (2) for imx based boards.
Signed-off-by: Philip Oberfichtner <pro@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Tom Rini [Wed, 27 Jul 2022 15:10:24 +0000 (11:10 -0400)]
CI: Azure: Move to using macOS-12 image
As per https://github.com/actions/virtual-environments/issues/5583 the
macOS-10.15 image is being deprecated. Move us up to macOS-12.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Tue, 9 Aug 2022 02:44:45 +0000 (22:44 -0400)]
CI: Azure: Move to Ubuntu 22.04 image
As per https://github.com/actions/runner-images/issues/6002 the Ubuntu
18.04 image is deprecated and will be removed by December 1, 2022.
Move to the Ubuntu 22.04 image as our base for launching our containers
from.
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Fri, 12 Aug 2022 16:51:14 +0000 (12:51 -0400)]
Merge branch '2022-08-11-verified-boot-for-embedded-initial-support'
To quote Simon:
This adds the concept of a VBE method to U-Boot, along with an
implementation of the 'VBE simple' method, basically a simple way of
updating firmware in MMC from userspace and monitoring it from U-Boot.
VBE simple is implemented in fwupd. U-Boot's role is to set up the
device tree with the required firmware-update properties and provide the
developer with information about the current VBE state. To that end this
series includes a new 'vbe' command that allows VBE methods to be listed
and examined.
As part of this work, support for doing FDT fixups via the event interface
is provided, along with the ability to write to the device tree via the
ofnode interface.
Another (significant) change is that bootmeths now have a 'global' flag,
to allow the implementation of EFI bootmgr (and VBE) to be cleaned up.
The 'system' bootdev is no-longer needed and these bootmeths are scanned
first.
Further work is needed to pull everything together, but this is a step
along the way.
Simon Glass [Sat, 30 Jul 2022 21:52:37 +0000 (15:52 -0600)]
vbe: Add a new vbe command
Add a command to look at VBE methods and their status. Provide a test for
all of this as well.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:36 +0000 (15:52 -0600)]
bootstd: Check building without global bootmeths
Use the sandbox_flattree build to check that everything works correctly
with BOOTMETH_GLOBAL disabled.
Update the tests as needed.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:35 +0000 (15:52 -0600)]
bootstd: Update documentation
Add some documentation updates, particularly about global bootmeths.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:34 +0000 (15:52 -0600)]
bootstd: Add vbe bootmeth into sandbox
Update sandbox to include the VBE bootmeth. Update a few existing tests to
take account of this change, specifically that the new bootmeth now
appears when scanning.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:33 +0000 (15:52 -0600)]
vbe: Support VBE simple
Add support for VBE simple, which permits firmware update of a single
image stored in MMC or another block device.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:32 +0000 (15:52 -0600)]
vbe: Add initial support for VBE
Create a new bootmeth for VBE along with a library to handle finding the
VBE methods.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:31 +0000 (15:52 -0600)]
event: Add an event for device tree fixups
At present there is a confusing array of functions that handle the
device tree fix-ups needed for booting an OS. We should be able to switch
to using events to clean this up.
As a first step, create a new event type and call it from the standard
place.
Note that this event uses the ofnode interface only, since this can
support live tree which is more efficient when making lots of updates.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:30 +0000 (15:52 -0600)]
event: Change EVENT_SPY to global
This creates static records at present, but it causes a problem with clang
and LTO: the linker list records are sometimes dropped from the image.
Fix this by making the records global.
Update to use __used while we are here.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:29 +0000 (15:52 -0600)]
bootstd: Drop the system bootdev
This was a work-around for the fact that global bootmeths such as EFI
bootmgr and VBE don't use a particular bootdev, or at least select it
themselves so that we don't need to scan all bootdevs when using that
bootmeth.
Drop the system bootdev entirely.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:28 +0000 (15:52 -0600)]
bootstd: Always create the EFI bootmgr bootmeth
Now that we can separate this out from the normal bootmeths, update the
code to create it always.
We cannot rely on the device tree to create this, since the EFI project
is quite opposed to having anything in the device tree that helps U-Boot
with its processing.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:27 +0000 (15:52 -0600)]
bootstd: Allow scanning for global bootmeths separately
Typically we want to find and use global bootmeths first, since they have
the best idea of how the system should boot. We then use normal bootmeths
as a fallback.
Add the logic for this, putting global bootmeths at the end of the
ordering. We can then easily scan the global bootmeths first, then drop
them from the list for subsequent bootdev-centric scans.
This changes the ordering of global bootmeths, so update the
bootflow_system() accordingly.
Drop the comment from bootmeth_setup_iter_order() since this is an
exported function and it should be in the header file.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:26 +0000 (15:52 -0600)]
dm: core: Call dm_scan_other() when setting up for tests
At present this function is not called, so tests miss out on any devices
created by it. Add it in so that tests can rely on these extra devices.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:25 +0000 (15:52 -0600)]
bootstd: Support bootflows with global bootmeths
Add support for handling this concept in bootflows. Update the 'bootflow'
command to allow only the normal bootmeths to be used. This alllows
skipping EFI bootmgr and VBE, for example.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:24 +0000 (15:52 -0600)]
bootstd: Tidy comments in bootflow_scan_bootdev()
Fix a few nits in this function comment.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:23 +0000 (15:52 -0600)]
bootstd: Allow the bootdev to be optional in bootflows
With global bootmeths we want to scan without a bootdev. Update the logic
to allow this.
Change the bootflow command to show the bootdev only when valid.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:22 +0000 (15:52 -0600)]
bootstd: Allow EFI bootmgr to support an invalid bootflow
For most testing we don't want this bootmeth to actually do anything. For
the one test where we do, add a test hook to obtain the correct behaviour.
This will allow us to bind the device always, rather than just doing it
for this test.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:21 +0000 (15:52 -0600)]
bootstd: Allow bootmeths to be marked as global
The current way of handling things like EFI bootmgr is a bit odd, since
that bootmeth handles selection of the bootdev itself. VBE needs to work
the same way, so we should support it properly.
Add a flag that indicates that the bootmeth is global, rather than being
invoked on each bootdev. Provide a helper to read a bootflow from the
bootmeth.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:20 +0000 (15:52 -0600)]
bootstd: Tidy up var naming in bootdev_setup_iter_order()
Avoid using 'count' to mean either a count or an error, since this is
confusing. In fact, the called function never return 0, since that is an
error.
Use 'ret' instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:19 +0000 (15:52 -0600)]
bootstd: Provide a bootmeth method to obtain state info
Some bootmeths can provide information about what is available to boot.
For example, VBE simple provides access to the firmware state.
Add a new method for this, along with a sandbox test.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:18 +0000 (15:52 -0600)]
bootstd: Detect empty bootmeth ordering
If the ordering produces no entries, this is an error. Report it, so that
the caller doesn't try to continue with a NULL bootmeth.
This fixes a crash in the bootflow_iter test when running with the sandbox
'default' device tree, instead of the required 'test' one.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:17 +0000 (15:52 -0600)]
bootstd: Fix comment in bootmeth test
Correct the comment at the top of this file.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:16 +0000 (15:52 -0600)]
bootstd: Drop delays in the tests
Some tests go as far as booting a distribution. In this case a menu is
presented to the user, with a two-second timeout. This adds a total of
12 seconds to the test runs at present.
Avoid this by inserting a response using the console-recording feature.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:15 +0000 (15:52 -0600)]
dm: core: Support sandbox with read interface
Update the 'read' command to work correctly with sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:14 +0000 (15:52 -0600)]
dm: core: Add support for writing u32 with ofnode
Add a new function to write an integer to an ofnode (live tree or
flat tree).
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:13 +0000 (15:52 -0600)]
dm: core: Allow writing to a flat tree with ofnode
In generally it is not permitted to implement an ofnode function only for
flat tree or live tree. Both must be supported. Also the code for
live tree access should be in of_access.c rather than ofnode.c which is
really just for holding the API-conversion code.
Update ofnode_write_prop() accordingly and fix the test so it can work
with flat tree too.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:12 +0000 (15:52 -0600)]
dm: core: Prepare for updating the device tree with ofnode
Add some documentation and a new flag so that we can safely enabled using
the ofnode interface to write to the device tree.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:11 +0000 (15:52 -0600)]
dm: core: Tidy up ofnode-writing test
Update this test to use the livetree flag so that special check can be
avoided. Also drop a few blank lines.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:10 +0000 (15:52 -0600)]
dm: core: Swap parameters of ofnode_write_prop()
It is normal for the length to come after the value in libfdt. Follow this
same convention with ofnode.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:09 +0000 (15:52 -0600)]
dm: core: Move ofnode-writing test to ofnode
This fits better in the ofnode tests, so move it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:08 +0000 (15:52 -0600)]
dm: core: Introduce support for multiple trees
At present ofnode only works with a single device tree, for the most part.
This is the control FDT used by U-Boot.
When booting an OS we may obtain a different device tree and want to
modify it. Add some initial support for this into the ofnode API.
Note that we don't permit aliases in this other device tree, since the
of_access implementation maintains a list of aliases collected at
start-up. Also, we don't need aliases to do fixups in the other FDT. So
make sure that flat tree and live tree processing are consistent in this
area.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:07 +0000 (15:52 -0600)]
dm: core: Add a note about how livetree updates work
The unflattening algorithm results in a single block of memory being
allocated for the whole tree. When writing new properties, these are
allocated new memory outside that block. When the block is freed, the
allocated properties remain.
Document how this works and the potential memory leak, as well as
mentioning that updating the livetree is actually supported now.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:06 +0000 (15:52 -0600)]
dm: core: Split out the declaration of ofnode
This is used by a lot of files, but ofnode.h needs to include a lot of
header files. This can create dependency cycles, particularly with
global_data.h which must include various declarations.
Split the core delcarations into a separate file to fix this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:05 +0000 (15:52 -0600)]
video: Rename structs and functions to avoid VBE
Rename these to VESA, itself an abbreviation, to avoid a conflict with
Verified Boot for Embedded.
Rename this to avoid referencing VBE.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:04 +0000 (15:52 -0600)]
video: Renname vbe.h to vesa.h
We want to use VBE to mean Verfiied Boot for Embedded in U-Boot. Rename
the existing VBE (Vesa BIOS extensions) to allow this.
Verified Boot for Embedded is documented doc/develop/vbe.rst
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 30 Jul 2022 21:52:03 +0000 (15:52 -0600)]
vbe: Add some documentation
Add a few links to documents about Verified Boot for Embedded (VBE).
These will be expanded as development proceeds.
Signed-off-by: Simon Glass <sjg@chromium.org>
Tom Rini [Fri, 12 Aug 2022 02:20:01 +0000 (22:20 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Thu, 11 Aug 2022 12:47:20 +0000 (08:47 -0400)]
Merge tag 'dm-pull-9aug22-take2' of https://source.denx.de/u-boot/custodians/u-boot-dm
dtoc fixes with pylint, tests
Nikita Shubin [Mon, 8 Aug 2022 10:28:52 +0000 (13:28 +0300)]
spl: opensbi: convert scratch options to config
Convert hardcoded "opensbi_info.options" to config provided value, this
allows changing options passed to OpenSBI.
SPL_OPENSBI_SCRATCH_OPTIONS is defaulted to SBI_SCRATCH_NO_BOOT_PRINTS.
Link: https://github.com/riscv-software-src/opensbi/blob/master/docs/firmware/fw_dynamic.md
Signed-off-by: Nikita Shubin <n.shubin@yadro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Nikita Shubin [Mon, 8 Aug 2022 10:24:25 +0000 (13:24 +0300)]
spl: opensbi: fix typo
s/obensbi_info/opensbi_info/
Signed-off-by: Nikita Shubin <n.shubin@yadro.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Leo Yu-Chi Liang [Wed, 1 Jun 2022 02:01:49 +0000 (10:01 +0800)]
riscv: ae350: Fix XIP config boot failure
The booting flow is SPL -> OpenSBI -> U-Boot.
The boot hart may change after OpenSBI and may not always be hart0,
so wrap the related branch instruction with M-MODE.
Current DTB setup for XIP is not valid.
There is no chance for CONFIG_SYS_FDT_BASE, the DTB address used
in XIP mode, to be returned. Fix this.
Fixes:
2e8d2f88439d ("riscv: Remove OF_PRIOR_STAGE from RISC-V boards")
Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Nikita Shubin [Fri, 20 May 2022 11:41:17 +0000 (14:41 +0300)]
riscv: cpu: set gp before board_init_f_init_reserve
Restore global pointer before board_init_f_init_reserve call,
as "a0" can be set in harts_early_init call and we end up with
invalid global pointer.
Signed-off-by: Nikita Shubin <n.shubin@yadro.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Tom Rini [Wed, 10 Aug 2022 21:49:20 +0000 (17:49 -0400)]
Merge branch '2022-08-10-assorted-updates'
- An assortment of bugfixes and minor updates
John Keeping [Thu, 28 Jul 2022 10:19:15 +0000 (11:19 +0100)]
boot: allow bootmeth-distro without CONFIG_NET
Remove the dependency on CMD_PXE from BOOTMETH_DISTRO by introducing a
new hidden kconfig symbol to control whether pxe_utils is compiled,
allowing bootstd's distro method to be compiled without needing
networking support enabled.
Signed-off-by: John Keeping <john@metanate.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Correct build errors when CMD_BOOTM is not enabled:
Signed-off-by: Simon Glass <sjg@chromium.org>
Joao Marcos Costa [Sun, 24 Jul 2022 15:13:34 +0000 (17:13 +0200)]
MAINTAINERS: Update e-mail address
Replace former professional address by my personal e-mail.
Signed-off-by: Joao Marcos Costa <jmcosta944@gmail.com>
Pali Rohár [Wed, 27 Jul 2022 15:24:23 +0000 (17:24 +0200)]
lz4: Fix compile warning comparison of distinct pointer types
In file included from include/linux/bitops.h:22,
from include/log.h:15,
from include/linux/printk.h:4,
from include/common.h:20,
from lib/lz4_wrapper.c:6:
lib/lz4_wrapper.c: In function ‘ulz4fn’:
include/linux/kernel.h:184:17: warning: comparison of distinct pointer types lacks a cast
(void) (&_min1 == &_min2); \
^~
lib/lz4_wrapper.c:104:18: note: in expansion of macro ‘min’
size_t size = min((ptrdiff_t)block_size, end - out);
^~~
Signed-off-by: Pali Rohár <pali@kernel.org>
Milan P. Stanić [Wed, 27 Jul 2022 17:09:20 +0000 (19:09 +0200)]
scripts/config: pick config script from kernel scripts
pulled from kernel tag v5.18
Heinrich Schuchardt [Sun, 31 Jul 2022 08:06:13 +0000 (10:06 +0200)]
Makefile: avoid false positive -Wmaybe-uninitialized
When compiling with -Og gcc reports false positive -Wmaybe-uninitialized as
reported in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78394.
Silence these warnings when building with CONFIG_CC_OPTIMIZE_FOR_DEBUG.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 31 Jul 2022 18:28:48 +0000 (12:28 -0600)]
common: Drop display_options.h from common header
Move this out of the common header and include it only where needed.
Signed-off-by: Simon Glass <sjg@chromium.org>
Michal Simek [Mon, 1 Aug 2022 12:19:06 +0000 (14:19 +0200)]
power: regulator: Remove i2c header from gpio regulator
i2c is not used that's why header is not needed.
Signed-off-by: Michal Simek <michal.simek@amd.com>
Heinrich Schuchardt [Mon, 1 Aug 2022 13:17:49 +0000 (15:17 +0200)]
cmd: inconsistent return type of command_process()
The declarations in the header and in the implementation must match.
Reported-by: Sergei Antonov <saproj@gmail.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Simon Glass [Mon, 1 Aug 2022 13:57:59 +0000 (07:57 -0600)]
test: Add some tests for kconfig.h
The macros in this file are a little confusing and we currently have no
tests to check that they work as expected.
Add some tests which check the macros in C code. Add a few tests which
check that the build errors are generated correctly too, using buildman's
-a option.
Signed-off-by: Simon Glass <sjg@chromium.org>
Patrice Chotard [Tue, 2 Aug 2022 08:21:35 +0000 (10:21 +0200)]
lmb: Fix LMB_MEMORY_REGIONS flag usage
This patch is fixing a broken boot observed on stm32mp157c-dk2 board.
IS_ENABLED macro should be used to check if a compilation flag is set
to "y" or "m".
LMB_MEMORY_REGIONS is set to a numerical value, IS_ENABLED macro is not
suitable in this case.
Fixes:
7c1860fce4e3 ("lmb: Fix lmb property's defination under struct lmb")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass [Wed, 3 Aug 2022 18:08:29 +0000 (12:08 -0600)]
Makefile: Correct the rule removing old of-platdata files
This makes use of makefile variables that don't exist anymore. Fix it and
also remove the object files in that directory.
Also add FORCE as a dependency as required by the if_changed macro.
Fixes
354d2324635 ("Makefile: Remove old of-platdata files before regenerating")
Reported-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Marek Vasut [Thu, 14 Jul 2022 23:58:24 +0000 (01:58 +0200)]
mmc: Do not send status of send_status is false
Commit
44645f87de5 ("mmc: Fix mmc_switch excessive timeout") introduced
a side effect where CMD13 SEND_STATUS is issued in case mmc_wait_dat0()
does not return -ENOSYS and $send_status is not set. This happens on all
hardware which does implement .mmc_wait_dat0 callback, e.g. i.MX8M .
This leads to lengthy timeout before booting OS in case of eMMC in one
of the HS200/HS400 modes, since the card cannot respond to CMD13 while
downgrading from HS200/HS400 to regular HS mode.
Fix this by adding the missing conditional.
Fixes:
44645f87de5 ("mmc: Fix mmc_switch excessive timeout")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Kirill Kapranov <kirill.kapranov@compulab.co.il>
Cc: Marek Behún <marek.behun@nic.cz>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Ye Li <ye.li@nxp.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Simon Glass [Sun, 31 Jul 2022 02:57:10 +0000 (20:57 -0600)]
dtoc: Correct remaining pylint problems in test_fdt
Fix various camel-case and other naming problems. Update the pylint base
file to avoid regressions.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 31 Jul 2022 02:57:09 +0000 (20:57 -0600)]
test_fdt: Convert to use argparse
Drop the deprecated OptionParser.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 31 Jul 2022 02:57:08 +0000 (20:57 -0600)]
dtoc: Move main program into its own function
Use a function for the main program so everything there doesn't look like
a global variable to pylint.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 31 Jul 2022 02:57:07 +0000 (20:57 -0600)]
dtoc: Fix fdt test coverage
Fix a bug that the --processes option was ignored, thus resulting in no
test coverage information being generated.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes:
42ae363ddd9 ("dtoc: Update fdt tests to use test_util")
Simon Glass [Sun, 31 Jul 2022 02:57:06 +0000 (20:57 -0600)]
dtoc: Tidy up fdt_tests RunTests()
Pass the options args in rather than using the global variables. Use snake
case, fix up comments and use a ternary operator to make pylint happy.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 31 Jul 2022 02:57:05 +0000 (20:57 -0600)]
dtoc: Tidy up fdt_tests RunTestCoverage() args
Pass the options args in rather than using the global various. Use snake
case and fix up comments to make pylint happy.
Signed-off-by: Simon Glass <sjg@chromium.org>