diff --git a/Makefile b/Makefile index e966063..3cc25d3 100644 --- a/Makefile +++ b/Makefile @@ -150,6 +150,7 @@ brainux: fi sudo cp /usr/bin/qemu-arm-static brainux/usr/bin/ sudo cp ./os-brainux/setup_brainux.sh brainux/ + sudo ./os-brainux/override-pre.sh ./os-brainux/override ./brainux sudo -E chroot brainux /setup_brainux.sh sudo rm brainux/setup_brainux.sh sudo ./os-brainux/override.sh ./os-brainux/override ./brainux diff --git a/os-brainux/override-pre.sh b/os-brainux/override-pre.sh new file mode 100755 index 0000000..b776f4a --- /dev/null +++ b/os-brainux/override-pre.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -uex -o pipefail + +SRC=$1 +DST=$2 + +install -g root -o root -m 0644 $SRC/lib/systemd/system/boot.mount $DST/lib/systemd/system/boot.mount +install -g root -o root -m 0644 $SRC/lib/systemd/system/rndis_gadget.service $DST/lib/systemd/system/rndis_gadget.service +install -g root -o root -m 0755 $SRC/usr/bin/enable_rndis_gadget $DST/usr/bin/enable_rndis_gadget diff --git a/os-brainux/override.sh b/os-brainux/override.sh index 06f29aa..e28c617 100755 --- a/os-brainux/override.sh +++ b/os-brainux/override.sh @@ -19,8 +19,3 @@ install -g 1000 -o 1000 -m 0644 $SRC/home/user/.config/fcitx/profile $DST/home/u sudo -u#1000 -g#1000 mkdir -p $DST/home/user/lxterminal install -g 1000 -o 1000 -m 0644 $SRC/home/user/lxterminal/lxterminal.conf $DST/home/user/lxterminal/lxterminal.conf install -g root -o root -m 0644 -D $SRC/etc/jwm/system.jwmrc $DST/etc/jwm/system.jwmrc - -install -g root -o root -m 0644 $SRC/lib/systemd/system/boot.mount $DST/lib/systemd/system/boot.mount - -install -g root -o root -m 0644 $SRC/lib/systemd/system/rndis_gadget.service $DST/lib/systemd/system/rndis_gadget.service -install -g root -o root -m 0755 $SRC/usr/bin/enable_rndis_gadget $DST/usr/bin/enable_rndis_gadget diff --git a/os-brainux/setup_brainux.sh b/os-brainux/setup_brainux.sh index 3fba364..90d7590 100755 --- a/os-brainux/setup_brainux.sh +++ b/os-brainux/setup_brainux.sh @@ -137,7 +137,6 @@ ttyLP0 EOF # Enable /boot mount -systemctl daemon-reload systemctl enable boot.mount # Enable RNDIS gadget