Summary
When verbose (debug) mode is enabled — by answering "yes" to the debug mode question in the interactive settings menu — the framework rebuild logs are helpful, but they are only printed after each step completes. During a long-running patch there is no on-screen indication of what is currently being processed, so it is hard to tell which step a slow or stuck boot is spending time on.
Current behavior
In scripts/brunch-init, the patch-application loop logs the result only once each patch has already finished:
for patch in /rootc/patches/*.sh
do
"$patch" "$options"
ret="$?"
if [ "$ret" -eq 0 ]; then
echo "brunch: $patch success" > /dev/kmsg
else
echo "brunch: $patch failed with ret=$ret" > /dev/kmsg
fi
done
Because the message is emitted after "$patch" returns, each success line actually corresponds to the previous patch, and the patch currently running (e.g. the dmesg-scanning 50-add_generic_firmwares.sh or 80-unibuild.sh) is unlabeled while it runs.
Proposal
Emit a marker before running each patch, and optionally report how long it took, so verbose mode shows progress in real time:
for patch in /rootc/patches/*.sh
do
echo "brunch: $patch running..." > /dev/kmsg
patch_start=$(date +%s)
"$patch" "$options"
ret="$?"
patch_time=$(( $(date +%s) - patch_start ))
if [ "$ret" -eq 0 ]; then
echo "brunch: $patch success (${patch_time}s)" > /dev/kmsg
else
echo "brunch: $patch failed with ret=$ret (${patch_time}s)" > /dev/kmsg
fi
done
The same "announce before doing" approach could optionally be applied to the heavier pre-loop steps (the pv ROOT-B→ROOT-A copy already shows progress, but resize2fs and the tar zxf kernel-*.tar.gz module extraction are currently silent).
Notes
- This only affects what is printed when verbose (debug) mode is enabled; no new option is required.
date and arithmetic expansion are available in the busybox initramfs, so there is no added dependency.
- It adds one extra
kmsg line per patch (~45 lines total), which is negligible.
Summary
When verbose (debug) mode is enabled — by answering "yes" to the debug mode question in the interactive settings menu — the framework rebuild logs are helpful, but they are only printed after each step completes. During a long-running patch there is no on-screen indication of what is currently being processed, so it is hard to tell which step a slow or stuck boot is spending time on.
Current behavior
In
scripts/brunch-init, the patch-application loop logs the result only once each patch has already finished:Because the message is emitted after
"$patch"returns, eachsuccessline actually corresponds to the previous patch, and the patch currently running (e.g. the dmesg-scanning50-add_generic_firmwares.shor80-unibuild.sh) is unlabeled while it runs.Proposal
Emit a marker before running each patch, and optionally report how long it took, so verbose mode shows progress in real time:
The same "announce before doing" approach could optionally be applied to the heavier pre-loop steps (the
pvROOT-B→ROOT-A copy already shows progress, butresize2fsand thetar zxf kernel-*.tar.gzmodule extraction are currently silent).Notes
dateand arithmetic expansion are available in the busybox initramfs, so there is no added dependency.kmsgline per patch (~45 lines total), which is negligible.