This now includes flags and the layout has changed slightly in recent
versions of Linux. Update the generator accordingly.
Signed-off-by: Simon Glass <sjg@chromium.org>
The flags in this tool don't match the comments or help. Also the variable
names are quite confusing. Update them for consistency.
Signed-off-by: Simon Glass <sjg@chromium.org>
Add messages to make it clearer which part of the FIT creation is failing.
This can happen when an invalid 'algo' property is provided in the .its
file.
Signed-off-by: Simon Glass <sjg@chromium.org>
This can be written before relocation. Move it to the data section, since
accessing BSS before relocation is not permitted.
Signed-off-by: Simon Glass <sjg@chromium.org>
If the FDT overlaps with the data region of the image, or with the stack,
it can become corrupted before relocation. Add a check for this, behind a
debug flag, as it can be very confusing and time-consuming to debug.
Signed-off-by: Simon Glass <sjg@chromium.org>
This function uses gd->fdt_blob a lot and cannot be used to check any
other device tree. Use a parameter instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
This function is a bit messy with several #ifdefs. Convert them to use C
for the conditions.
Rewrite the function comment since most of it is stale.
Signed-off-by: Simon Glass <sjg@chromium.org>
The current approach is a bit of a hack and only works for the tpm
subsystem. Add a Kconfig so that crc8 can be enabled in SPL for other
purposes.
Signed-off-by: Simon Glass <sjg@chromium.org>
Use the notrace attribute so that timer functions can be used when
tracing. This is required to avoid infinite loops when recording a trace.
Signed-off-by: Simon Glass <sjg@chromium.org>
To quote the author:
So far standard boot lacks a boot menu, although it is possible to create
a rudimentary one using the existing 'bootmenu' command.
Even then, this text-based menu offer only basic functionality and does
not take full advantage of the displays which are common on many devices.
This series provides a 'bootflow menu' command which allows the user to
select from the available bootflows. An attempt is made to show the name
of the available operating systems, by reading more information into the
bootflow. A logo can be read also, where supported, so that this can be
presented to the user when an option is highlighted.
Full use is made of TrueType fonts, if enabled. For cases where only a
serial console is available, it falls back to a simple text-based menu.
All of this is implementing using a new 'expo' construct, a collection of
scenes (like menu screens) which can be navigated by the user to view
information and select options. This is fairly general and should be able
to cope with a wider array of use cases, with less hacking of the menu
code, such as is currently needed for CMD_BOOTEFI_BOOTMGR.
Of course it would be possible to enhance the existing menu rather than
creating a new setup. Instead it seems better to make the existing menu
use expo, if code space permits. It avoids the event-loop problem and
should be more extensible, given its loosely coupled components and use of
IDs instead of pointers. Further motivation is provided in the
documentation.
For now the CLI keypress-decoding code is split out to be used by the new
menu. The key codes defined by menu.h are reused also.
This is of course just a starting point. Some ideas for future work are
included in the documentation.
For Kirkwood boards, it is necessary to have early malloc in DRAM area
when Driver Model for Serial is enabled. Please see Michael's patch here:
https://lore.kernel.org/u-boot/20220817193809.1059688-20-michael@walle.cc/
This patch enables the early malloc in DRAM for all Kirkwood boards.
Note that this will work for boards that have either non-DM serial
and DM_SERIAL. Also, add the CONFIG_KIRKWOOD_COMMON option to enable
DM_SERIAL as a common option for boards that have been tested.
Signed-off-by: Tony Dinh <mibodhi@gmail.com>
It was noticed that Clearfog is currently broken with this newly
introduced early_init_done() function. Apparently the timer is enabled
here when U-Boot is run but not configured - at least not correctly.
Resulting in a hangup in the timer reading functions.
To fix this, also read the value of the reload register and check it's
value with the one written to by U-Boot. Only if this matches, the
init has already been done.
Fixes: 5387b093cb ("timer: orion-timer: Fix problem with early static variable")
Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Pali Rohár <pali@kernel.org>
Cc: Martin Rowe <martin.p.rowe@gmail.com>
Cc: Tony Dinh <mibodhi@gmail.com>
Cc: Pali Rohár <pali@kernel.org>
Cc: Michael Walle <michael@walle.cc>
- Add support for rv1126 soc and rv1126 neu2 io board;
- Add support for rk3399 pine64 pinephone pro board;
- dts sync from linux for rk3399 and px30;
- Add support for PX30 Ringneck SoM board;
Add a test which checks that two operating systems can be displayed in a
menu, allowing one to be selected.
Enable a few things on snow so that the unit tests build.
Signed-off-by: Simon Glass <sjg@chromium.org>
Create an expo to handle the boot menu. For now this is quite simple, with
just a header, some menu items and a pointer to show the current one.
Signed-off-by: Simon Glass <sjg@chromium.org>
A menu is a key part of the expo design. It consists of a number of items
which the user can select from.
Add the initial implementation of this.
Signed-off-by: Simon Glass <sjg@chromium.org>
A scene is a single screen within an expo. It is possible to move between
scenes but only one can be displayed at once.
Add a basic implementation.
Signed-off-by: Simon Glass <sjg@chromium.org>
An expo is a way of presenting and collecting information from the
user. It consists of a collection of 'scenes' of which only one is
presented at a time. An expo is typically used to show a boot menu
and allow settings to be changed.
One created, the same expo can be automatically presented in graphical
form using a vidconsole, or in text form on a serial console.
Add an initial implementation of the expo itself. Supports for scenes
and objects is provided later.
Signed-off-by: Simon Glass <sjg@chromium.org>
Some operating systems provide a logo in bmp format. Read this in if
present so it can be displayed in the menu.
Signed-off-by: Simon Glass <sjg@chromium.org>
Add the concept of an OS name to the bootflow. This typically includes the
OS name, version and kernel version.
Implement this for the distro and script bootmeths so that it works with
Armbian and older version of Fedora.
Signed-off-by: Simon Glass <sjg@chromium.org>
Support for fonts currently depends on the type of vidconsole in use. Add
two new methods to enumerate fonts and to set the font.
Fix a few other method comments while we are here.
Signed-off-by: Simon Glass <sjg@chromium.org>
This is not generally needed unless EFI_LOADER is used. Adjust the default
setting to reduce the size of the U-Boot build.
Signed-off-by: Simon Glass <sjg@chromium.org>
We should use the cmd/ directory for commands rather than for common code
used elsewhere in U-Boot. Move the common 'source' code into
image-board.c to achieve this.
The image_source_script() function needs to call run_command_list() so
seems to belong better in the command library. Move and rename it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Split this functionality out of the 'source' command so it can be used
from another place. For now leave it where it is, but a future patch will
move it out of cmd/
Signed-off-by: Simon Glass <sjg@chromium.org>
Use the return value to save having to pass around a pointer. This also
resolves any ambiguity about what *key contains when the function is
called.
Signed-off-by: Simon Glass <sjg@chromium.org>
Use the return value to save having to pass around a pointer. This also
resolves any ambiguity about what *key contains when the function is
called.
Signed-off-by: Simon Glass <sjg@chromium.org>
The behaviour of these two functions is completely undocumented. Add some
notes so the poor, suffering dev can figure out what is going on.
Signed-off-by: Simon Glass <sjg@chromium.org>
The current cread_line() function is very long. It handles the escape
processing inline. The menu command does similar processing but at the
character level, so there is some duplication.
Split the character processing into a new function cli_ch_process() which
processes individual characters and returns the resulting input character,
taking account of escape sequences. It requires the caller to set up and
maintain its state.
Update cread_line() to use this new function.
The only intended functional change is that an invalid escape sequence
does not add invalid/control characters into the input buffer, but instead
discards these.
Signed-off-by: Simon Glass <sjg@chromium.org>
The mmc command is useful for testing mmc disk images in sandbox, so
enable it. We also need to enable legacy images so that we can run tests
which use them.
Disable it for a few avb tests since MMC is not implemented there yet.
Signed-off-by: Simon Glass <sjg@chromium.org>
Sync the px30 dtsi from Linux kernel v6.1.
Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
It is possible to boot U-Boot proper from a different storage medium
than the one used by the BOOTROM to load the SPL. This information is
stored in the u-boot,spl-boot-device Device Tree property and is
accessible from U-Boot proper so that it has knowledge at runtime where
it was loaded from.
Let's add support for this feature for px30.
Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
BOOTROM sets a bit in a CPU register so that the software can know from
where the first stage bootloader was booted. One use case for this is to
specify the default loading medium for U-Boot proper to match the one
used by the BOOTROM to load the SPL (same-as-spl in
u-boot,spl-boot-order).
Let's create the mapping between BOOTROM value and Device Tree node
names for MMC devices.
Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
The IRAM on PX30 (or Int_MEM in datasheet) starts at 0xff0e0000 and not
0xff020000 as rightfully stated in the FIXME comment.
Let's fix it so that BROM_BOOTSOURCE_ID_ADDR points to the correct
address for PX30.
Fixes: 46281a76be ("rockchip: add core px30 headers")
Cc: Quentin Schulz <foss+uboot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
The grf and cru are only used when no UART base is provided by the user
(defaults to UART2) or for UART1, UART3 and UART5 to be used for the
debug UART. Therefore, let's surround those variable definitions with
the proper checks.
This wasn't an issue before support for UART0 was added, because all
cases were using cru and grf. UART0 only uses pmucru so there's a need
to not define those variables anymore.
Fixes: d0af506625 ("rockchip: px30: support debug uart on UART0")
Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
The Pinephone Pro is another device by PINE64. It's closely related
to the Pinebook Pro of which this initial support is derived from.
Specification:
- A variant of the Rockchip RK3399
- A 6 inch 720*1440 DSI display
- Front and rear cameras
- Type-C interface with alt mode display (DP 1.2) and PD charging
- 4GB LPDDR4 RAM
- 128GB eMMC
- mSD card slot
- An AP6255 module for 802.11ac WiFi and Bluetooth 5
- Quectel EG25-G 4G/LTE modem
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Initial support for the PinePhone Pro has now landed upstream in
Linux 6.1 RC1 so sync the dts from 6.2-rc1 for initial support.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Neural Compute Module 2(Neu2) IO board is an industrial form factor
IO board from Edgeble AI.
General features:
- microSD slot
- MIPI DSI connector
- 2x USB Host
- 1x USB OTG
- Ethernet
- mini PCIe
- Onboard PoE
- RS485, RS232, CAN
- Micro Phone array
- Speaker
- RTC battery slot
- 40-pin expansion
Neu2 needs to mount on top of this IO board in order to create complete
Edgeble Neural Compute Module 2(Neu2) IO platform.
Add support for it.
Signed-off-by: Jagan Teki <jagan@edgeble.ai>