| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Makes the files not appear when searching for files that lack
SPDX-License-Identifier.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220103120539.1730644-4-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To verify only Kconfig/Makefile is touched:
git show --numstat --format=oneline HEAD | grep -v 'Kconfig\|Makefile'
will print only arch/powerpc/Kbuild.
To verify nothing unexpected is added:
git show -U0 | grep '^-[^-]\|^+[^+]' | sort -u
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220103120539.1730644-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
fw_orig_len is selectively initialized in read_firmware_all. In case
it's left uninitialized, fw_orig will keep it's initial value of NULL.
fw_orig is checked before fw_orig_len use, so there is no use of an
uninitialized variable in practice, but GCC 11.1.1 warns about it
anyway. Give it an initial value of 0 to silence the warning.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220103115718.1723730-4-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Like we do on ARM, let's add state and environment to RISC-V QEMU Virt
as well.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211125161042.3829996-8-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In preparation for extending support to RISC-V, sprinkle around some
preprocessor directives.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211125161042.3829996-7-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The state/environment overlay applied on top of QEMU is applicable to
other virt platforms as well, like RISC-V. In preparation for sharing
code across architectures, add a new common/boards and move the board
code there.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211125161042.3829996-6-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
First boot with uninitialized state is needlessly verbose:
state: New state registered 'state'
state: Detected old on-storage format
ERROR: state: Error, invalid header crc in raw format, calculated 0x7bd5c66f, found 0x00000000
state: Ignoring broken bucket 0@0x00000000...
state: Detected old on-storage format
ERROR: state: Error, invalid header crc in raw format, calculated 0x7bd5c66f, found 0x00000000
state: Ignoring broken bucket 1@0x00040000...
state: Detected old on-storage format
ERROR: state: Error, invalid header crc in raw format, calculated 0x7bd5c66f, found 0x00000000
state: Ignoring broken bucket 2@0x00080000...
ERROR: state: Failed to find any valid state copy in any bucket
ERROR: state: Failed to read state with format raw, -2
This has confused barebox-state novices more than once. Let's handle
the zeroed state case specially and reduce output in that case, so
it now looks like this:
state: New state registered 'state'
state: Detected old on-storage format
state: Detected old on-storage format
state: Detected old on-storage format
state state.of: Fresh state detected, continuing with defaults
This is only the output when CRC is zero (hinting at zeroed state
partition). If crc != zero, then output is a little more verbose than
before:
state: New state registered 'state'
state: Detected old on-storage format
ERROR: state: init error: Invalid argument: header crc in raw format, calculated 0x7bd5c66f, found 0x00000000
state: Ignoring broken bucket 0@0x00000000...
state: Detected old on-storage format
ERROR: state: init error: Invalid argument: header crc in raw format, calculated 0x7bd5c66f, found 0x00000000
state: Ignoring broken bucket 1@0x00040000...
state: Detected old on-storage format
ERROR: state: init error: Invalid argument: header crc in raw format, calculated 0x7bd5c66f, found 0x00000000
state: Ignoring broken bucket 2@0x00080000...
ERROR: state: init error: No such file or directory: no valid state copy in any bucket
ERROR: state: init error: No such file or directory: format raw read failed
WARNING: state state.of: Failed to load persistent state, continuing with defaults, -2
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211125161042.3829996-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
First boot with uninitialized state is needlessly verbose. As
preparation for making boot less noisy on fresh state, mark all the
error messages with newly introduced dev_err_state_init().
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211125161042.3829996-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While we have PBL console support, console isn't available during early
barebox startup. Implement DEBUG_LL for Qemu RISC-V Virt to make such
early debugging easier.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211125160657.3828643-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Allow retrieving warning and status messages about the environment via log.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Link: https://lore.barebox.org/20211129071756.2015218-1-ahmad@a3f.at
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We now got three compile-time selectable printf format specifiers. For
debugging, it can be useful to enable all of them, thus add a new
PRINTF_FULL option.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211209105708.3517684-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
boot_services::open_protocol supports opening protocols exclusively.
A protocol that is opened exclusively can not be used anymore by
an application that is called via boot_services::start_image.
We want to open the SNP protocol exclusively in the next step. That
would mean a chainloaded barebox could no longer use the SNP protocol
because it's exclusively opened by the current barebox already.
To work around this a efi_drv::dev_pause and efi_drv::dev_continue is
introduced. The former is called before an application is started and
the latter right after an application has exited. This will be used
by the SNP network driver to enter/leave exclusive mode.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
The correct code to change colours is "\033[1;31m", not "\033[31m". Fix
that.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| | |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| | |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
unpack_device_path() must not modify the efi_device_path * argument, so
make that sure by making it const.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Messages have some typos, fix them.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211122084732.2597109-31-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Similarly to how DEBUG_LL on non-EFI platforms often prints a >, make it
print L"barebox" as well on start of execution.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211122084732.2597109-28-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The header contains GUIDs and definitions that will become applicable outside
of the GPT partition parser as well, so move them out.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211122084732.2597109-27-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For security, it sometimes makes sense to zero memory before freeing.
This is not the case here, so remove the memset.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211122084732.2597109-26-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, when ELF prompt is visible, it's shown top level in the
menuconfig. Move it to the General Settings menu instead.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211122084732.2597109-25-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The function never returns, so mark it as such.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211122084732.2597109-23-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Incoming EFI loader support will deal a lot with wide strings, so it
makes sense to have printf directly support printing it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211122084732.2597109-20-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Turning an EFI varfs filename into its components will be useful for the
EFI loader as well, so factor that out.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211122084732.2597109-15-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The split between <efi.h> and <efi/efi.h> is confusing: The former
contains universal definitions, while the latter contains barebox
utilities on top. To make the distinction clear, rename <efi/efi.h>
to <efi/efi-payload.h> as it's used for EFI payloads.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211122084732.2597109-14-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The errno translation will come in handy for the EFI loader support, so
factor that out.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211122084732.2597109-13-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
CONFIG_EFI_BOOTUP isn't really a driver option and we got a new menu now
for all things EFI, so let's move it there.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211122084732.2597109-12-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Couple of files lack an explicit embedded license or contain
boilerplate. Replace with the appropriate SPDX-License-Identifier.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211122084732.2597109-11-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
So far, barebox EFI meant EFI payload support on x86. Upcoming changes
will extend barebox to support EFI payload _and_ loader on ARM64.
Prepare for this by renaming files and directories appropriately, so
it's immediately clear whether a file is about payload, loader or common
support.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211122084732.2597109-9-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
| |
Convention is to m/EFI_.*_PROTOCOLG_GUID/. Rename LOAD_FILE_PROTOCOL_GUID
for uniformity.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211122084732.2597109-7-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On several SoCs barebox is written to the raw device in front of the
first partition. So far we blindly trust that there is enough space
available for the barebox image. Start changing this by adding a
function that retrieves the available space.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.barebox.org/20211012073352.4071559-8-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Including <stdio.h> for printf is a bit problematic, because it pulls in
other headers for <console.h>, which includes quite a few more headers
as well. To make it easier to share code between barebox and host tools
make <printk.h> the new minimal header for printf and move the extra
logging stuff into <linux/printk.h>.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211030141739.2207431-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Until now it has been possible to create overlapping partitions. Go away
from that and allow to create partitions only in unallocated areas of a
device. This lowers the risk of having inconsistent partitioning and
increases the chance that inconsistent partitioning is recognized by
the user.
We had explicit overlap checking for the environment partition which
becomes unnecessary with this change and is removed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.barebox.org/20211011073025.4187545-1-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Link: https://lore.barebox.org/20211028012816.929611-3-antonynpavlov@gmail.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
IS_ENABLED() is supposed to be used for CONFIG_ macros, which a
local #define DEBUG isn't. Fix by using __is_defined instead.
The reason, we have this as a compile time switch is that the memory
map can be very extensive (> 100 entries) and is usually only
interesting during development.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211115090023.4192546-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The loader code and data memory descriptors describe code used by the
currently running barebox instance. This is already used memory, so
registering it as available SDRAM is wrong. Instead, just reserve the
IO MEM region for informational purposes.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211115090023.4192546-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Link: https://lore.barebox.org/20211012083920.14092-2-u.oelmann@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
|/|
| |
| |
| |
| | |
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Link: https://lore.barebox.org/20211012083920.14092-1-u.oelmann@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
| |
Fix typo in CONFIG_CONSOLE_DISABLE_INPUT case for simple console.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211002174417.27020-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We have four target tools and will add 3 more in a follow up commit.
Add a new menu to collect them.
Acked-by: Roland Hieber <rhi@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210917174127.23345-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
d4aa01503348 ("common: add dependency !SANDBOX on target tools") and
later commits disabled building the target tools with sandbox, because
the build failed when they were enabled.
This has been fixed since then. Remove the limitation, so target tools
can be cross-compiled when using the ARCH=sandbox.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210917174127.23345-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
LiteX is a Migen-based System on Chip, supporting softcore
VexRiscv CPU, a 32-bits Linux Capable RISC-V CPU.
See https://github.com/enjoy-digital/litex and
https://github.com/litex-hub/linux-on-litex-vexriscv
for details.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Acked-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210817101104.114945-8-antonynpavlov@gmail.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There are console drivers (linux, virtio, litex)
that don't support baud rate setting and has
no setbrg (set baudrate) callback, so
console_set_baudrate() returns -ENOSYS.
At the other hand console_set_baudrate() SUCCESS
return value is needed for the loadx/loady commands
correct work.
See discussion here:
http://lists.infradead.org/pipermail/barebox/2021-May/036237.html
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Tested-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210817101104.114945-4-antonynpavlov@gmail.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ \
| |/ /
|/| | |
|