Add flasher credential provisioning, LUKS2 FDE, LED fixes, and docs
This commit is contained in:
1 parent
2706b9a901
commit
b7dca4f15f
49 files changed
+1524
-183
No files matched your search
+15
-5
@@ -55,7 +55,7 @@ EOF
|
||||
[ -f /geminux/prebuilt/kernel/boot/Image.gz ] && \
|
||||
[ -f /geminux/prebuilt/kernel/boot/mt6797-gemini-pda-geminux.dtb ]; then
|
||||
echo "[1/2] Installing initramfs & bootimg tools in Docker (repack-only)..."
|
||||
apk add --no-cache cpio gzip coreutils mkbootimg-osm0sis >/dev/null
|
||||
apk add --no-cache cpio gzip coreutils mkbootimg-osm0sis kbd kbd-legacy >/dev/null
|
||||
else
|
||||
REPACK_ONLY=0
|
||||
echo "[1/6] Installing Linux 7.3.5 cross-compile & bootimg tools in Docker..."
|
||||
@@ -84,6 +84,8 @@ EOF
|
||||
openssl-dev \
|
||||
linux-headers \
|
||||
dtc \
|
||||
kbd \
|
||||
kbd-legacy \
|
||||
mkbootimg-osm0sis \
|
||||
gcc-aarch64 \
|
||||
g++-aarch64 \
|
||||
@@ -175,10 +177,13 @@ EOF
|
||||
for cmd in sh ash mount umount switch_root mkdir mknod chmod chown \
|
||||
cat cp mv rm ln ls echo printf grep awk sed head tail \
|
||||
cut tr wc sort uniq find xargs hexdump dd sync sleep usleep \
|
||||
loadkmap clear stty readlink stat \
|
||||
poweroff reboot ip ifconfig route basename dirname env touch; do
|
||||
ln -sf busybox "$stage_dir/bin/$cmd"
|
||||
done
|
||||
# Pull static/musl e2fsck + resize2fs if available from aarch64 rootfs/apk
|
||||
cp /tmp/gemini-us.kmap "$stage_dir/etc/gemini-us.kmap"
|
||||
chmod 0644 "$stage_dir/etc/gemini-us.kmap"
|
||||
# Pull static/musl e2fsck + resize2fs + cryptsetup if available from aarch64 rootfs/apk
|
||||
if [ "$mode" = "recovery" ]; then
|
||||
cp /geminux/src/initramfs/init-recovery "$stage_dir/init"
|
||||
else
|
||||
@@ -188,10 +193,15 @@ EOF
|
||||
(cd "$stage_dir" && find . -print0 | cpio --null -ov --format=newc --quiet | gzip -9 > "$out_gz")
|
||||
}
|
||||
|
||||
# Also add e2fsprogs (e2fsck, resize2fs) + shared libs for initramfs filesystem safety,
|
||||
# Also add e2fsprogs (e2fsck, resize2fs), cryptsetup (LUKS2 FDE), + shared libs for initramfs,
|
||||
# and wireless-regdb so built-in cfg80211 loads regulatory.db at early boot.
|
||||
apk --root "$SYSROOT_INIT" --arch aarch64 add --no-scripts \
|
||||
musl e2fsprogs e2fsprogs-extra util-linux-misc wireless-regdb >/dev/null
|
||||
musl e2fsprogs e2fsprogs-extra util-linux-misc wireless-regdb cryptsetup >/dev/null
|
||||
|
||||
(
|
||||
cd /usr/share/keymaps/legacy/i386/include
|
||||
loadkeys -b /geminux/overlay/rootfs/etc/keymap/gemini-us.map > /tmp/gemini-us.kmap
|
||||
)
|
||||
|
||||
build_cpio_with_fs() {
|
||||
mode="$1"
|
||||
@@ -206,7 +216,7 @@ EOF
|
||||
mkdir -p "$stage_dir/lib/firmware"
|
||||
cp -a "$SYSROOT_INIT/lib/firmware/regulatory.db"* "$stage_dir/lib/firmware/"
|
||||
fi
|
||||
for tool in e2fsck fsck.ext4 resize2fs blkid; do
|
||||
for tool in e2fsck fsck.ext4 resize2fs blkid cryptsetup dmsetup; do
|
||||
if [ -e "$SYSROOT_INIT/sbin/$tool" ]; then
|
||||
cp -a "$SYSROOT_INIT/sbin/$tool" "$stage_dir/sbin/"
|
||||
elif [ -e "$SYSROOT_INIT/usr/sbin/$tool" ]; then
|
||||
|
||||
Reference in new issue
Block a user