mirror of
https://github.com/openglow-org/forgefirm.git
synced 2026-09-27 08:41:13 -07:00
- Controllers stop at K80, before forgectrl at K90: runlevel 0/6 no longer tears down the cooling engine, fire gates, and broker while a controller may still be executing a job. - The grblhal/gfcloud init scripts are real emergency levers: stop routes through the supervisor (POST /controller/stop - a bare pkill was safed and respawned seconds later), start resumes supervision, status exists, and the pkill fallback matches full executable paths instead of truncated names or bare substrings. - slotmigrate: the partition grow gets the same 2048-sector tolerance as the filesystem branch (an exact compare rewrote the MBR at S02 on every boot on disks where the grow cannot land on the last sector), verifies it made progress, and the resize2fs retry is bounded at three attempts with the counter kept on p3 itself. - Installer: archive product/platform are verified after the signature, and a validly signed OLDER release now requires an explicit yes instead of installing as a silent downgrade. All predictable /tmp paths in the installer and ffboot are mktemp now. - release.sh rejects multiple positional versions (the last one used to win silently) and a release without factory-era verification dies unless explicitly bypassed; mkfw.sh refuses to pack when the public key for the post-sign self-check is missing. - forgefirm-logrotate: size-capped rotation (boot + hourly) for the /data logs - a full /data breaks settings, update staging, and the controllers own writes. - Bench build scripts derive every path from their own location or FF_SRC_TOP/FF_BUILD_TOP and log to mktemp files.
32 lines
1.5 KiB
Bash
32 lines
1.5 KiB
Bash
#!/bin/bash
|
|
# Cross-compiles forgectrl (the sibling repo) for the factory board,
|
|
# borrowing the Yocto cross toolchain + sysroot from the forgectrl
|
|
# recipe work directory (which carries ulfius and libjpeg). If that
|
|
# path ages out after a clean, regenerate it with: bitbake forgectrl.
|
|
#
|
|
# Environment (defaults derive from this script's location, assuming
|
|
# the standard multi-repo checkout layout):
|
|
# FF_SRC_TOP checkout holding the sibling repos
|
|
# FF_BUILD_TOP Yocto build tree (default: $FF_SRC_TOP/forgefirm/build)
|
|
set -e
|
|
SP="$(cd "$(dirname "$0")" && pwd)"
|
|
FF_SRC_TOP="${FF_SRC_TOP:-$(cd "$SP/../../.." && pwd)}"
|
|
FF_BUILD_TOP="${FF_BUILD_TOP:-$FF_SRC_TOP/forgefirm/build}"
|
|
TC="$FF_BUILD_TOP/tmp/work/cortexa9t2hf-neon-fslc-linux-gnueabi/forgectrl/0.1.0"
|
|
[ -d "$TC/recipe-sysroot" ] || { echo "toolchain not staged at $TC (run: bitbake forgectrl)"; exit 1; }
|
|
export PATH="$TC/recipe-sysroot-native/usr/bin:$TC/recipe-sysroot-native/usr/bin/arm-fslc-linux-gnueabi:$PATH"
|
|
LOG=$(mktemp -t fcbuild.XXXXXX)
|
|
cd "$FF_SRC_TOP/forgectrl"
|
|
rm -rf build-arm
|
|
cmake -B build-arm \
|
|
-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=arm \
|
|
-DCMAKE_C_COMPILER=arm-fslc-linux-gnueabi-gcc \
|
|
-DCMAKE_BUILD_TYPE=None \
|
|
"-DCMAKE_C_FLAGS=--sysroot=$TC/recipe-sysroot -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 -O2 -g" \
|
|
"-DCMAKE_EXE_LINKER_FLAGS=--sysroot=$TC/recipe-sysroot" \
|
|
> "$LOG" 2>&1
|
|
cmake --build build-arm -j8 >> "$LOG" 2>&1 || { tail -30 "$LOG"; exit 1; }
|
|
rm -f "$LOG"
|
|
echo BUILD-OK
|
|
file build-arm/forgectrl 2>/dev/null || ls build-arm/
|