| Age | Commit message (Collapse) | Author |
|
Add a command to read cedit settings from environment variables so that
they can be restored as part of the environment.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add a command to write cedit settings to environment variables so that
they can be stored with 'saveenv'.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add a command to read cedit settings from a devicetree file.
Signed-off-by: Simon Glass <[email protected]>
|
|
Support writing settings from an expo into a file in FDT format. It
consists of a single node with a two properties for each sceneitem,
one with tag ID chosen by the user and another for its text value.
Signed-off-by: Simon Glass <[email protected]>
|
|
Make this function available to other expo code so we can use it to look
up a menu item.
Signed-off-by: Simon Glass <[email protected]>
|
|
Split out the code which prepares the cedit for use, so we can call it
from a test.
Add a log category while we are here.
Signed-off-by: Simon Glass <[email protected]>
|
|
Before adding more functions to this interface, create a new header for
the configuration editor.
Fix up the expo header guard while we are here.
Signed-off-by: Simon Glass <[email protected]>
|
|
The caller reads the ID but menu_build() does this again. Add the ID as
a parameter to avoid this. Return the object created so that the caller
can adjust it.
Signed-off-by: Simon Glass <[email protected]>
|
|
For some operations it is necessary to process all objects in an expo.
Provide an iterator to handle this.
Signed-off-by: Simon Glass <[email protected]>
|
|
This does not change the scene, so mark the pointer const.
Signed-off-by: Simon Glass <[email protected]>
|
|
Prepare v2023.10-rc3
Signed-off-by: Tom Rini <[email protected]>
|
|
As it is only called in bootmeth_efi.c
Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
|
|
Support booting ChromiumOS on ARM devices using FIT. Add an entry into the
boot implementation which does not require a command line. This can be
expanded over time as the bootm code is refactored.
Signed-off-by: Simon Glass <[email protected]>
|
|
Some bootflows (such as EFI and ChromiumOS) delay reading the kernel until
it is needed to boot. This saves time when scanning and avoids needing to
allocate memory for something that may never be used.
To permit reading of these files, add a new 'bootflow read' command.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the two new functions to separate reading of the ChromiumOS info from
the partition from actually reading the kernel and booting it.
Signed-off-by: Simon Glass <[email protected]>
|
|
The code to read the ChromiumOS information from the partition is
currently all in one function.
Create a new function which reads the kernel, assuming that the metadata
has been parsed.
For now this function is not used. Future work will plumb it in.
Signed-off-by: Simon Glass <[email protected]>
|
|
The code to read the ChromiumOS information from the partition is
currently all in one function. It reads the entire kernel, which is
unnecessary unless it is to be booted.
Create a new function which reads just the minimum required data from the
disk, then obtains what it needs from there.
For now this function is not used. Future work will plumb it in.
Signed-off-by: Simon Glass <[email protected]>
|
|
Some bootmeths need to store their own information related to the
bootflow, in addition to the generic information in struct bootflow.
Add a pointer for this.
Signed-off-by: Simon Glass <[email protected]>
|
|
Create a new private structure to hold information gleaned from the disk.
This will allow separation between reading of the bootflow information and
(later) reading the whole kernel.
Signed-off-by: Simon Glass <[email protected]>
|
|
Provide brief documentation about the ChromiumOS kernel layout.
Signed-off-by: Simon Glass <[email protected]>
|
|
We want to avoid using #ifdefs around header files and in the code. It
makes sense to collect the various functions used for loading images into
a single header which can be included by all architectures. The best place
for this is the arch-neutral bootm.h header, so use that.
Move some zimage functions into this bootm.h header.
Signed-off-by: Simon Glass <[email protected]>
|
|
Create a common base from which the other parts are offset and make all
of the offsets related to that. This makes the code a little easier to
read.
Use X86_ prefixes for the two values which are x86-specific.
Drop OFFSET_BASE since it is available in a header field.
Drop the unnecessary 'start' variable too.
Signed-off-by: Simon Glass <[email protected]>
|
|
Decode the kernel start and size using the structures provided. This
accesses the same data, just in a cleaner way.
Add some logging for some of the fields in the kernel preamble.
Signed-off-by: Simon Glass <[email protected]>
|
|
ChromiumOS allows a kernel to be on either partition 2 or 4. Add support
for scanning both and using the first one we find with a suitable
signature.
Record the partition which is used.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add a header file with structures for booting ChromiumOS, taken from the
vboot tree. Using these makes it easier to understand the code.
Note that the code style has not been updated for U-Boot, with use of
uint64_t, __attribute__((packed)) and one comment-style nit. This should
make it easier to keep the code in sync. It was taken from commit:
5b8596ce ("2sha256_arm: Fix data abort issue")
Update the CHROMEOS string to use the defined values.
Signed-off-by: Simon Glass <[email protected]>
|
|
Move the code which reads a partition into its own function. Add a
constant for the number of bytes to 'probe' at the start of the partition.
Signed-off-by: Simon Glass <[email protected]>
|
|
Return -EIO when the read failed, rather than the number of blocks read.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add some more output to make it easier to see what is going wrong when
a bootdev hunter fails.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
This name is a little confusing since it suggests that it sets up the
sibling block device. In fact it sets up a bootdev for it. Rename the
function to make this clearer.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Mattijs Korpershoek <[email protected]>
|
|
It is not a parse error to have a default value of "0" for a "hex" type
entry, instead of "0x0". However, "0" and "0x0" are not treated the
same even by the tools themselves. Correct this by changing the default
value from "0" to "0x0" for all hex type questions that had the
incorrect default. Fix one instance (in two configs) of a default of "0"
being used on a hex question to be "0x0". Remove the cases where a
defconfig had set a value of "0x0" to be used as the default had been
"0".
Signed-off-by: Tom Rini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Fixes: 3db711085752 ("crc32: Use the crc.h header for crc functions")
Signed-off-by: Ilya Lukin <[email protected]>
|
|
This should be allocating the memory for "item" instead of "menu".
The item struct is 48 bytes instead of 96 (assuming a 64bit system)
so this saves a little memory.
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
These lines are supposed to be indented one more tab. Otherwise it's
confusing to read.
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Patrick Delaunay <[email protected]>
|
|
The implementation in extlinux_pxe_getfile() does not pass a valid size
to bootmeth_read_file(), so this can fail if the uninited value happens to
be too small.
Fix this.
Signed-off-by: Simon Glass <[email protected]>
|
|
The implementation in distro_efi_try_bootflow_files() does not pass a
valid size to bootmeth_common_read_file(), so this can fail if the
uninted value happens to be too small.
Fix this.
This was reported by someone but I cannot now find the email.
Signed-off-by: Simon Glass <[email protected]>
|
|
The current bootflow-iteration algorithm reads the bootflow file into
an allocated memory buffer so it can be examined. This works well in
most cases.
However, while the common case is that the first bootflow is immediately
booted, it is also possible just to scan for available bootflows, perhaps
selecting one to boot later.
Even with the common case, EFI bootflows can be quite large. It doesn't
make sense to read it into an allocated buffer when we have kernel_addr_t
providing a suitable address for it. Even if we do have plenty of malloc()
space available, it is a violation of U-Boot's lazy-init principle to
read the bootflow before it is needed.
So overall it seems better to make a change.
Adjust the logic to read just the size of the EFI file at first. Later,
when the bootflow is booted, read the rest of the file into the designated
kernel buffer.
Signed-off-by: Simon Glass <[email protected]>
Reported-by: Da Xue <[email protected]>
Reported-by: Vincent Stehlé <[email protected]>
|
|
This checks for a network-based bootflow in two places, one of which is
less than ideal. Move the correct test into a function and use it in both
places.
Signed-off-by: Simon Glass <[email protected]>
|
|
This function is used in some bootmeth implementations. Export it.
Signed-off-by: Simon Glass <[email protected]>
|
|
uclass_get_device_by_name() is meant to return 0 or a negative error code.
simple_itoa() cannot handle negative numbers.
This leads to output like:
=> bootdev list -p
Seq Probed Status Uclass Name
--- ------ ------ -------- ------------------
c [ ] 18446744073709551614 spi_flash [email protected]
Convert the status to a positive number. Now we get
Seq Probed Status Uclass Name
--- ------ ------ -------- ------------------
c [ ] 2 spi_flash [email protected]
Signed-off-by: Heinrich Schuchardt <[email protected]>
|
|
Enabling FIT_SIGNATURE required the old authentication method to be
disabled so disable this for K3 SOCs and enable FIT_SIGNATURE for K3
Platforms.
Signed-off-by: Kamlesh Gurudasani <[email protected]>
[ cleanup the patch ]
Signed-off-by: Manorit Chawdhry <[email protected]>
|
|
Change the device type from "usb_mass_storage" to "usb" when
booting a script.
Before this change:
=> printenv devtype
devtype=usb_mass_storage
After this change:
=> printenv devtype
devtype=usb
Signed-off-by: John Clark <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Some devices keep 2 copies of the bootloader_message in the misc
partition and write each in sequence when updating. This ensures that
there is always one valid copy of the bootloader_message. Teach u-boot
to optionally try a backup bootloader_message from a specified offset if
the primary one fails its CRC check.
Signed-off-by: Joshua Watt <[email protected]>
|
|
It is is sometimes desired to be able to skip decrementing the number of
tries remaining in an Android A/B boot, and instead just check which
slot will be tried later. This can commonly be be the case for platforms
that want to A/B u-boot itself, but are required to boot from a FAT MBR
partition. In these cases, u-boot must do an early check that the MBR
points to the correct A/B boot partition, and if not rewrite the MBR to
point to the correct one and reboot. Decrementing the try count in this
case is not desired because it means that each u-boot might constantly
ping-pong overwriting the MBR and rebooting until all the retries are
used up.
Signed-off-by: Joshua Watt <[email protected]>
|
|
It is possible to boot x86-based ChromeOS machines by parsing a table and
locating the kernel and command line. Add a bootmeth for this.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
Some Linux parameters can be set automatically by U-Boot, if it knows the
device being used. For example, since U-Boot knows the serial console
being used, it can add parameters for earlycon and console.
Add support for this.
Note that this is an experimental feature and we will see how useful it
turns out to be. It is very handy for ChromeOS, since otherwise it is very
difficult to manually determine the UART address or port number,
particularly in a script.
Provide an example of how this is used with ChromeOS.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
Add a bootflow command to update the command line more easily. This allows
changing a particular parameter rather than editing a very long strings.
It is also easier to handle with scripting.
The new 'bootflow cmdline' command allows getting and setting single
parameters.
Fix up the example output while we are here, since there are a few new
items.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
The Linux command line consists of a number of words with optional values.
At present U-Boot allows this to be changed using the bootargs environment
variable.
But this is quite painful, since the command line can be very long.
Add a function which can adjust a single field in the command line, so
that it is easier to make changes before booting.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
The "bootargs" environment variable is used to set the command-line
arguments to pass to the OS. Use this same mechanism with bootstd as well.
When the variable is updated, it is written to the current bootflow. When
the current bootflow is updated, the environment variable is updated too.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
This is a copy error. Fix it.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
It seems better to call this a 'bootdev' since this is name used in the
documentation. The older 'Bootdevice' name is no-longer used and may cause
confusion with the 'bootdevice' environment variable.
Update throughout to use bootdev.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|