From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH RFC 2/2] MAKEALL: add a new develop mode option
Date: Mon, 12 Jan 2026 15:17:40 +0100 [thread overview]
Message-ID: <20260112141746.3068571-2-a.fatoum@barebox.org> (raw)
In-Reply-To: <20260112141746.3068571-1-a.fatoum@barebox.org>
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
prev parent reply other threads:[~2026-01-12 14:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260112141746.3068571-2-a.fatoum@barebox.org \
--to=a.fatoum@barebox.org \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox