Make clean-clone OS rebuilds autonomous
A fresh clone can now bootstrap a complete armv7 rootfs, apply the Bananarchy overlay, regenerate boot artifacts, and produce a flashable image without local build artifacts. - Add a shared package list and Docker-based rootfs bootstrap, wired into rebuild-image.sh and chroot-shell.sh. - Add offline rebuild preflight checks and prebuilt-to-overlay artifact synchronization. - Vendor the patched EDL client and provision host flashing dependencies. - Remove the hardcoded credential from the power menu helper. - Refresh documentation and changelog for the autonomous workflow.
This commit is contained in:
1 parent
a9b72700ac
commit
0ab9367e28
31 files changed
+3809
-181
No files matched your search
+16
-1
@@ -4,6 +4,21 @@ set -eu
|
||||
BASE_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
PYTHON_BIN="${PYTHON_BIN:-python3}"
|
||||
FLASHER_PY="$BASE_DIR/flash-edl.py"
|
||||
FLASH_DEPS="$BASE_DIR/.flash-deps"
|
||||
|
||||
if [ -d "$FLASH_DEPS" ]; then
|
||||
PYTHONPATH="$FLASH_DEPS${PYTHONPATH:+:$PYTHONPATH}"
|
||||
export PYTHONPATH
|
||||
fi
|
||||
|
||||
# flash-edl.py imports pyusb at startup, so ensure it is available before
|
||||
# even handling --help or elevating privileges.
|
||||
if ! "$PYTHON_BIN" -c 'import usb.core' >/dev/null 2>&1; then
|
||||
echo "[*] Preparing host flashing dependencies..."
|
||||
"$BASE_DIR/scripts/bootstrap-flash-deps.sh"
|
||||
PYTHONPATH="$FLASH_DEPS${PYTHONPATH:+:$PYTHONPATH}"
|
||||
export PYTHONPATH
|
||||
fi
|
||||
|
||||
for arg in "$@"; do
|
||||
if [ "$arg" = "-h" ] || [ "$arg" = "--help" ]; then
|
||||
@@ -14,7 +29,7 @@ done
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
if command -v sudo >/dev/null 2>&1; then
|
||||
echo "[*] Elevating privileges via sudo for raw USB EDL (05c6:9008) access..."
|
||||
exec sudo "$0" "$@"
|
||||
exec sudo env PYTHONPATH="${PYTHONPATH:-}" "$0" "$@"
|
||||
else
|
||||
echo "[!] Warning: Not running as root and 'sudo' not found. Continuing..."
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user