This gives us support for the new -s (strict mode) and -Q (disable
warnings) options. The latter will be used in the follow-up commit.
Signed-off-by: Ahmad Fatoum
---
scripts/kconfig/merge_config.sh | 40 +
1 file changed, 31 insertions(+), 9 deletions(-)
diff --
We currently use scripts/kconfig/merge_config.sh only in MAKEALL.
Linux has been using it inside Kbuild as well to derive new defconfigs
from the existing ones that differ only by a few options, e.g. to enable
virtualization or to switch endianness.
This is useful for us in barebox as well to cut
QEmu's Malta emulation can be used in four flavors depending on
endianness and CPU register width. So far we only had two defconfigs and
expected users to adjust the config to arrive at the other two flavors
to cut down on duplication in the config files. Let's use the new merged
defconfigs mechani
We'll start using these fragments inside Kbuild too for merged defconfigs
to cut down on defconfigs that are largely duplicated, but differ only
in a few options. To share such configs between architectures, we add
common/boards/configs as a common fragment directory here and
standardize on using .
Build with no console whatsoever is not a common configuration for
development, but is used in some verified boot scenarios. Some
configurations go even further and disable the shell altogether.
Add headless.config and noshell.config fragments that describes these
configurations and sandbox targets
We currently use scripts/kconfig/merge_config.sh only in MAKEALL.
Linux has been using it inside Kbuild as well to derive new defconfigs
from the existing ones that differ only by a few options, e.g. to enable
virtualization or to switch endianness.
This is useful for us in barebox as well to cut
The reboot_mode_add_globalvar initcall would run even without
CONFIG_GLOBALVAR if it didn't fail at link time, because it references
the global_device. Fix this by only registering the initcall if global
variable support is enabled.
Signed-off-by: Ahmad Fatoum
---
drivers/power/reset/reboot-mode
While sandbox defines arch_ctrlc() unconditionally, ctrlc() is not
defined when CONFIG_CONSOLE_NONE=y for all architectures, so we need the
inline stub on sandbox too to avoid a link error.
Signed-off-by: Ahmad Fatoum
---
include/stdio.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/inclu
Some common networking code like fastboot over UDP calls ifup_all(0) to
bring up all interfaces. ifup_all(0) in turn runs commands to execute
interface discovery scripts and source network configurations.
This leads to a link error, because run_command is not defined in a
CONFIG_SHELL_NONE build a
Linux & BSD define the ioctl command parameter to be always unsigned.
POSIX differs and uses a signed integer instead, but as we are importing
Linux code, it makes sense to use the same signedness to avoid false
positive warnings about sign-extended constants that get truncated.
Signed-off-by: Ahm
There's no point in compiling PBL decompression code when
CONFIG_HAVE_IMAGE_COMPRESSION is not selected, so reflect that in Kbuild
to save some build time.
Signed-off-by: Ahmad Fatoum
---
pbl/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pbl/Makefile b/pbl/Makefile
We have no size constraints on sandbox, so enable frame pointers for
easier debugging.
Signed-off-by: Ahmad Fatoum
---
arch/sandbox/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/sandbox/Kconfig b/arch/sandbox/Kconfig
index 3419b6e4f686..d82027e75047 100644
--- a/arch/sandbox/K
As FIT is built only for ARM so far, this sandbox-related code has
bitrotted. To prepare allowing it to build for other platforms, adjust
the API to the current state.
Signed-off-by: Ahmad Fatoum
---
common/image-fit.c | 16 +---
1 file changed, 9 insertions(+), 7 deletions(-)
diff
There's no reason to restrict FIT to ARM. In preparation for adding
fuzzing infrastructure for FIT images, allow its selection on other
architectures as well.
Signed-off-by: Ahmad Fatoum
---
common/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/Kconfig b/commo
We leak this allocation, but we don't actually need it, so drop it.
Signed-off-by: Ahmad Fatoum
---
drivers/regulator/of_regulator.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index 10f75a4f1c60..c037f85c439d 10064
of_unflatten_dtb allocates an unflattened tree and of_overlay_apply_tree
copies it into another tree. The unflattened tree is then usually
leaked. Add a function that takes care of these two steps and then frees
the tree.
Signed-off-by: Ahmad Fatoum
---
arch/riscv/boards/riscvemu/board.c | 4 +-
The selftest leaks memory by letting the pointers go out of scope.
Signed-off-by: Ahmad Fatoum
---
test/self/digest.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/test/self/digest.c b/test/self/digest.c
index 4cda5b09637b..32815c85ba70 100644
--- a/test/self/digest.
magicbuf is only used for comparisons and debug output in
reboot_mode_register() and is then leaked after its return.
Free it instead once no longer needed.
Signed-off-by: Ahmad Fatoum
---
drivers/power/reset/nvmem-reboot-mode.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/powe
val is copied and then goes out of scope, thereby leaking the buffer it
points at. Free it before that happens.
Signed-off-by: Ahmad Fatoum
---
common/globalvar.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/common/globalvar.c b/common/globalvar.c
index a83529f98fe0..79624adcfe6f 100644
-
Like many other tests, ramfs also leaks memory. Fix this.
Signed-off-by: Ahmad Fatoum
---
test/self/ramfs.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/test/self/ramfs.c b/test/self/ramfs.c
index 1bc2b3b068f0..239e3e690740 100644
--- a/test/self/ramfs.c
+++ b/test/sel
new_path is freshly allocated in every iteration and then leaked
after of_property_write_string() takes a copy from it.
Fix the leak by freeing it before it goes out of scope.
Signed-off-by: Ahmad Fatoum
---
drivers/of/overlay.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/of/ove
We don't require an executable stack for our x86 setjmp
implementations. Note that, so we don't get a warning when we start
using this implementation for sandbox when compiled on x86.
Signed-off-by: Ahmad Fatoum
---
arch/x86/lib/setjmp_32.S | 2 ++
arch/x86/lib/setjmp_64.S | 2 ++
2 files change
The hash section contains only data, so add a note that an executable
stack is not needed. This will suppress a warning when we start using
this on sandbox.
Signed-off-by: Ahmad Fatoum
---
images/sha_sum.S | 2 ++
1 file changed, 2 insertions(+)
diff --git a/images/sha_sum.S b/images/sha_sum.S
The ARM and RISC-V kernel Image format features a 64-byte header and
places the 32-bit magic value identifying it at offset 56.
The check for the magic values should thus ensure that at least 56 bytes
are guaranteed to be available in the buffer, thus move it into
the >= 64 byte segment of the fun
24 matches
Mail list logo