mirror of
https://github.com/dikeckaan/mu300-linux.git
synced 2026-12-05 08:02:40 +00:00
- mu300-hotspot (hostapd/DHCP on wlan0) with config imported from Android's SoftAP (tools/android-import-hotspot.sh) or generated once; credentials shown at login - cp_diskserver/refnotify from the Android chroot (android-run), extract-subset updated - mu300-extra-modules: thermal cooling, RGB LED, SIM tray, vibra, DVFS; blue LED on data - fix ssh.socket being dropped by an ordering cycle (hostkeys unit) - fix boot_b verification (persistent log area), mknod race in the Android mount helper - journald limits, early boot recorder, findings 18-20 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
15 lines
1.2 KiB
Bash
Executable File
15 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
# From rooted Android: boot the Linux image already on boot_b once more (no reflash).
|
|
# usage: android-boot-linux.sh boot-linux-slotb.img (uses its .json/.misc-slot-b-trial.bin for verification)
|
|
# Inside Linux, `sudo mu300-next-boot linux` then keeps Linux as the default.
|
|
set -eu
|
|
BASE=${1%.img}
|
|
# boot_b's tail (48 MiB+) holds the persistent init log and changes on every boot; compare the image part only
|
|
EXP=$(python3 -c "import hashlib,sys;print(hashlib.sha256(open(sys.argv[1],'rb').read()[:48<<20]).hexdigest())" "$1")
|
|
su_do() { adb shell "su -c '$1'" | tr -d '\r'; }
|
|
[ "$(su_do 'dd if=/dev/block/by-name/boot_b bs=1048576 count=48 2>/dev/null | sha256sum' | cut -d' ' -f1)" = "$EXP" ] || { echo "boot_b does not contain $1; use flash-trial.sh" >&2; exit 1; }
|
|
adb push "$BASE.misc-slot-b-trial.bin" /data/local/tmp/mu300-bc-b.bin
|
|
su_do 'dd if=/data/local/tmp/mu300-bc-b.bin of=/dev/block/by-name/misc bs=1 seek=2048 conv=notrunc && sync'
|
|
[ "$(su_do 'dd if=/dev/block/by-name/misc bs=1 skip=2048 count=32 2>/dev/null | od -An -tx1 -v' | tr -d ' \n')" = "$(xxd -p "$BASE.misc-slot-b-trial.bin" | tr -d '\n')" ] || { echo "misc verify failed" >&2; exit 1; }
|
|
adb reboot
|