* [PATCH RFC 2/2] MAKEALL: add a new develop mode option
2026-01-12 14:17 [PATCH RFC 1/2] images: allow suppressing missing firmware stderr output Ahmad Fatoum
@ 2026-01-12 14:17 ` Ahmad Fatoum
2026-02-09 12:36 ` [PATCH RFC 1/2] images: allow suppressing missing firmware stderr output Ahmad Fatoum
1 sibling, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2026-01-12 14:17 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
Of course, everyone has their own development workflow, but first
experiments with Claude CLI show that all the individual steps make it
easy for it to get lost in the weeds.
Add a development mode that is enabled via passing -d/-D to MAKEALL,
which enables a more AI-friendly building experience with -d:
- Generate compile_commands.json on every successful build, so LSP can
be used (doesn't 100% work yet for me, but that's not barebox'
fault)
- implies -i, so old build directories aren't wiped
- Use build/ as name for the build directory as clangd will look
there automatically if the file is not found in the source
directory[1]. Support for multiple build directories can be handled
via git worktrees still.
The -D goes on and adds some more things, that may falsify results in
some cases:
- Output missing firmware warnings that may be expected with
defconfigs and no firmware on stdout, no stderr, so MAKEALL output
is cleaner
- Enable sanitizers. This will affect binary size.
[1]: https://github.com/llvm/llvm-project/blob/263802c56b4d/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp#L151
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
MAKEALL | 17 ++++++++++++++++-
common/boards/configs/devel.config | 2 ++
common/boards/configs/sanitizers.config | 6 ++++++
3 files changed, 24 insertions(+), 1 deletion(-)
create mode 100644 common/boards/configs/devel.config
create mode 100644 common/boards/configs/sanitizers.config
diff --git a/MAKEALL b/MAKEALL
index bfc0f917aca8..1e6d0c97b868 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -60,6 +60,8 @@ usage() {
echo "TARGET -t Makefile target"
echo "V -v verbosity"
echo "INCREMENTAL -i"
+ echo " -d (iterative development mode)"
+ echo " -D (extended iterative development mode)"
echo ""
}
@@ -189,6 +191,9 @@ do_build_defconfig() {
report "Compile: " ${defconfig}
if [ "$compile_result" = "0" ]; then
+ if [ "$DEVEL" = "1" ]; then
+ ${MAKE} $silent_flag compile_commands.json
+ fi
report "OK \n"
else
report "FAILED \n"
@@ -288,7 +293,7 @@ do_build_all() {
return $nbuilds
}
-while getopts "hc:j:O:l:a:e:k:t:v:i" Option
+while getopts "hc:j:O:l:a:e:k:t:v:idD" Option
do
case $Option in
a )
@@ -321,6 +326,16 @@ case $Option in
i )
INCREMENTAL=1
;;
+ d | D)
+ DEVEL=1
+ INCREMENTAL=1
+ KCONFIG_ADD="${KCONFIG_ADD} common/boards/configs/devel.config"
+ BUILDDIR="build"
+ if [ "$Option" = D ]; then
+ KCONFIG_ADD="${KCONFIG_ADD} common/boards/configs/sanitizers.config"
+ export NO_MISSING_FIRMWARE_WARNING=1
+ fi
+ ;;
h )
usage
exit 0
diff --git a/common/boards/configs/devel.config b/common/boards/configs/devel.config
new file mode 100644
index 000000000000..fd046c9ab08e
--- /dev/null
+++ b/common/boards/configs/devel.config
@@ -0,0 +1,2 @@
+CONFIG_WERROR=y
+CONFIG_PANIC_POWEROFF=y
diff --git a/common/boards/configs/sanitizers.config b/common/boards/configs/sanitizers.config
new file mode 100644
index 000000000000..7e6cffd67874
--- /dev/null
+++ b/common/boards/configs/sanitizers.config
@@ -0,0 +1,6 @@
+CONFIG_KASAN=y
+CONFIG_ASAN=y
+CONFIG_UBSAN=y
+CONFIG_DEBUG_LIST=y
+CONFIG_BUG_ON_DATA_CORRUPTION=y
+CONFIG_STACKPROTECTOR_STRONG=y
--
2.47.3
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH RFC 1/2] images: allow suppressing missing firmware stderr output
2026-01-12 14:17 [PATCH RFC 1/2] images: allow suppressing missing firmware stderr output Ahmad Fatoum
2026-01-12 14:17 ` [PATCH RFC 2/2] MAKEALL: add a new develop mode option Ahmad Fatoum
@ 2026-02-09 12:36 ` Ahmad Fatoum
1 sibling, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2026-02-09 12:36 UTC (permalink / raw)
To: BAREBOX, Sascha Hauer
Hello Sascha,
On 1/12/26 3:17 PM, Ahmad Fatoum wrote:
> There is a Kconfig option to turn missing firmware to an error, but
> there is no way to suppress the warning that is printed in any case.
>
> Suppressing the warning is useful however when reproducing an issue with
> a multi_defconfig, so allow changing it to output to stdout by means of
> an environment variable.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
Any thoughts on this?
Cheers,
Ahmad
> ---
> images/Makefile | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/images/Makefile b/images/Makefile
> index ebbf57b46355..96f66b0a8e70 100644
> --- a/images/Makefile
> +++ b/images/Makefile
> @@ -254,7 +254,8 @@ images: $(image-y-path) $(flash-link) $(flash-list) $(symlink-y-path) FORCE
> @echo "images built:"
> @for i in $(image-y); do \
> if [ -s $(obj)/$$i ]; then echo $$i; \
> - else >&2 echo "** $$i skipped due to missing firmware **"; \
> + else $(if $(NO_MISSING_FIRMWARE_WARNING),,>&2) \
> + echo "** $$i skipped due to missing firmware **"; \
> $(if $(CONFIG_MISSING_FIRMWARE_ERROR), >&2 sed 's/^/\t/' <$(obj)/$${i}.missing-firmware; missing=1;) \
> fi; done; if [ -n "$$missing" ]; then \
> echo >&2 "Firmware missing in CONFIG_MISSING_FIRMWARE_ERROR=y build"; exit 1; fi
^ permalink raw reply [flat|nested] 3+ messages in thread