Finalize verified 2720 Flip release source and untrack image outputs
This commit is contained in:
1 parent
2a3078e42c
commit
1c011b360a
121 files changed
+8467
-686
No files matched your search
@@ -87,10 +87,19 @@ if command -v docker >/dev/null 2>&1; then
|
||||
[ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/netfilter/xt_owner.ko.zst" ] || \
|
||||
[ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/netfilter/nft_redir.ko.zst" ] || \
|
||||
[ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/leds/leds-msm8905-torch.ko.zst" ] || \
|
||||
[ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/camera/msm8905-cam.ko.zst" ]; then
|
||||
[ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/camera/msm8905-cam.ko.zst" ] || \
|
||||
[ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/mux/mux-core.ko.zst" ] || \
|
||||
[ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/mux/mux-gpio.ko.zst" ] || \
|
||||
[ ! -f "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/spi/spi-mux.ko.zst" ]; then
|
||||
echo " -> Missing prebuilt kernel modules or DTBs; running scripts/build-kernel-audio.sh..."
|
||||
"$BASE_DIR/scripts/build-kernel-audio.sh"
|
||||
fi
|
||||
if [ ! -x "$BASE_DIR/prebuilt/bananarchy-daemons/usr/bin/bananarchy-lid" ] || \
|
||||
[ ! -x "$BASE_DIR/prebuilt/bananarchy-daemons/usr/bin/bananarchy-cover-idle" ] || \
|
||||
[ ! -x "$BASE_DIR/prebuilt/bananarchy-daemons/usr/bin/bananarchy-volume-keys" ]; then
|
||||
echo " -> Missing compiled idle daemons; running scripts/build-bananarchy-daemons.sh..."
|
||||
"$BASE_DIR/scripts/build-bananarchy-daemons.sh"
|
||||
fi
|
||||
if [ ! -f "$BASE_DIR/prebuilt/bantam/bantam" ]; then
|
||||
echo " -> Missing prebuilt bantam binary; running scripts/build-bantam.sh..."
|
||||
"$BASE_DIR/scripts/build-bantam.sh"
|
||||
@@ -100,6 +109,45 @@ fi
|
||||
echo "[1/4] Installing Bananarchy rootfs overlay (artwork, branding, Sxmo 240x320, UCM, udev)..."
|
||||
rm -f "$TARGET_ROOTFS/usr/bin/bantam" "$TARGET_ROOTFS/usr/local/bin/bantam" "$TARGET_ROOTFS/etc/doas.d/wheel.conf"
|
||||
cp -af "$BASE_DIR/overlay/rootfs/." "$TARGET_ROOTFS/"
|
||||
rm -f "$TARGET_ROOTFS/usr/bin/bananarchy-lid.py" \
|
||||
"$TARGET_ROOTFS/usr/bin/bananarchy-cover-idle.py" \
|
||||
"$TARGET_ROOTFS/usr/bin/bananarchy-volume-keys.py"
|
||||
for daemon in bananarchy-lid bananarchy-cover-idle bananarchy-volume-keys; do
|
||||
cp -af "$BASE_DIR/prebuilt/bananarchy-daemons/usr/bin/$daemon" \
|
||||
"$TARGET_ROOTFS/usr/bin/$daemon"
|
||||
chmod 0755 "$TARGET_ROOTFS/usr/bin/$daemon"
|
||||
done
|
||||
ln -sfn /bin/busybox "$TARGET_ROOTFS/sbin/init"
|
||||
|
||||
# Some rootfs trees were snapshotted before BusyBox installed its applet
|
||||
# symlinks. /bin/ash is the "user" login shell and /bin/grep is used by
|
||||
# openrc-run.sh; without them sshd rejects the account and the udev service
|
||||
# fails, leaving /dev/input/event* root-owned and untagged so Xorg cannot
|
||||
# attach the keypad. Never overwrite a real binary, only fill in gaps.
|
||||
APPLET_LIST="$BASE_DIR/scripts/busybox-applets.txt"
|
||||
if [ -f "$APPLET_LIST" ]; then
|
||||
while IFS= read -r applet; do
|
||||
[ -n "$applet" ] || continue
|
||||
if [ ! -e "$TARGET_ROOTFS/bin/$applet" ]; then
|
||||
[ ! -L "$TARGET_ROOTFS/bin/$applet" ] || \
|
||||
rm -f "$TARGET_ROOTFS/bin/$applet"
|
||||
ln -s /bin/busybox "$TARGET_ROOTFS/bin/$applet"
|
||||
fi
|
||||
done < "$APPLET_LIST"
|
||||
fi
|
||||
# /sbin was pruned too: reboot/poweroff/halt (Sxmo power menu), syslogd,
|
||||
# klogd, mdev, ip-* helpers and the ifconfig/route tools live there.
|
||||
SBIN_LIST="$BASE_DIR/scripts/busybox-sbin-applets.txt"
|
||||
if [ -f "$SBIN_LIST" ]; then
|
||||
while IFS= read -r applet; do
|
||||
[ -n "$applet" ] || continue
|
||||
if [ ! -e "$TARGET_ROOTFS/sbin/$applet" ]; then
|
||||
[ ! -L "$TARGET_ROOTFS/sbin/$applet" ] || \
|
||||
rm -f "$TARGET_ROOTFS/sbin/$applet"
|
||||
ln -s /bin/busybox "$TARGET_ROOTFS/sbin/$applet"
|
||||
fi
|
||||
done < "$SBIN_LIST"
|
||||
fi
|
||||
if [ -x "$BASE_DIR/scripts/version.sh" ]; then
|
||||
"$BASE_DIR/scripts/version.sh" "$TARGET_ROOTFS"
|
||||
fi
|
||||
@@ -203,6 +251,16 @@ if [ -d "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/wcn36xx" ] && \
|
||||
cp -af "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/wcn36xx/"*.ko.zst \
|
||||
"$TARGET_ROOTFS/lib/modules/6.12.1-msm8916/kernel/drivers/net/wireless/ath/wcn36xx/"
|
||||
fi
|
||||
if [ -d "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/mux" ]; then
|
||||
mkdir -p "$TARGET_ROOTFS/lib/modules/6.12.1-msm8916/kernel/drivers/mux"
|
||||
cp -af "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/mux/"*.ko.zst \
|
||||
"$TARGET_ROOTFS/lib/modules/6.12.1-msm8916/kernel/drivers/mux/"
|
||||
fi
|
||||
if [ -d "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/spi" ]; then
|
||||
mkdir -p "$TARGET_ROOTFS/lib/modules/6.12.1-msm8916/kernel/drivers/spi"
|
||||
cp -af "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/spi/"*.ko.zst \
|
||||
"$TARGET_ROOTFS/lib/modules/6.12.1-msm8916/kernel/drivers/spi/"
|
||||
fi
|
||||
if [ -d "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/codecs" ] && \
|
||||
[ -d "$TARGET_ROOTFS/lib/modules/6.12.1-msm8916/kernel/sound/soc/codecs" ]; then
|
||||
cp -af "$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/codecs/"*.ko.zst \
|
||||
@@ -329,6 +387,7 @@ rm -rf \
|
||||
ln -sf /etc/init.d/kill-plymouth "$TARGET_ROOTFS/etc/runlevels/default/kill-plymouth"
|
||||
ln -sf /etc/init.d/bananarchy-power-policy "$TARGET_ROOTFS/etc/runlevels/default/bananarchy-power-policy"
|
||||
ln -sf /etc/init.d/bananarchy-time-sync "$TARGET_ROOTFS/etc/runlevels/default/bananarchy-time-sync"
|
||||
ln -sf /etc/init.d/bananarchy-sshd-debug "$TARGET_ROOTFS/etc/runlevels/default/bananarchy-sshd-debug"
|
||||
mkdir -p "$TARGET_ROOTFS/var/lib/tinydm"
|
||||
ln -sf /usr/share/xsessions/sxmo.desktop "$TARGET_ROOTFS/var/lib/tinydm/default-session.desktop"
|
||||
|
||||
@@ -370,4 +429,24 @@ if [ -f "$TARGET_ROOTFS/boot/extlinux/extlinux.conf" ]; then
|
||||
sed -i "s|^[[:space:]]*fdt .*|\tfdt /$DTB_FILE|" "$TARGET_ROOTFS/boot/extlinux/extlinux.conf"
|
||||
fi
|
||||
|
||||
# sshd's StrictModes rejects authorized_keys when $HOME/.ssh is group/world
|
||||
# writable or the file is owned by the wrong uid. cp -af preserves the source
|
||||
# modes but not numeric uids, so enforce both after the overlay copy.
|
||||
chmod 644 "$TARGET_ROOTFS/etc/pam.d/sshd" \
|
||||
"$TARGET_ROOTFS/etc/ssh/sshd_config.d/90-bananarchy-access.conf" \
|
||||
2>/dev/null || true
|
||||
chown 0:0 "$TARGET_ROOTFS/etc/pam.d/sshd" \
|
||||
"$TARGET_ROOTFS/etc/ssh/sshd_config.d/90-bananarchy-access.conf" \
|
||||
2>/dev/null || true
|
||||
for ssh_home in "$TARGET_ROOTFS/etc/skel/.ssh" \
|
||||
"$TARGET_ROOTFS/home/user/.ssh" \
|
||||
"$TARGET_ROOTFS/root/.ssh"; do
|
||||
[ -d "$ssh_home" ] || continue
|
||||
chmod 700 "$ssh_home"
|
||||
chmod 600 "$ssh_home/authorized_keys" 2>/dev/null || true
|
||||
done
|
||||
chown -R 10000:10000 "$TARGET_ROOTFS/home/user/.ssh" 2>/dev/null || true
|
||||
chown -R 0:0 "$TARGET_ROOTFS/etc/skel/.ssh" "$TARGET_ROOTFS/root/.ssh" \
|
||||
2>/dev/null || true
|
||||
|
||||
echo "Bananarchy overlay applied to $TARGET_ROOTFS for device $DEVICE."
|
||||
Reference in new issue
Block a user