From 63366741e680cc6bcd0de2e26081d438161be93f Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Wed, 23 Aug 2023 13:28:10 -0500 Subject: [PATCH] rootfs/linux: script cleanups Signed-off-by: Robert Nelson --- 04_build_linux.sh | 5 +++++ 06_generate_debian_console_root.sh | 20 +++++--------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/04_build_linux.sh b/04_build_linux.sh index aa6acc2..d3c60e1 100755 --- a/04_build_linux.sh +++ b/04_build_linux.sh @@ -231,6 +231,11 @@ fi echo "make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} Image modules dtbs" make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} Image modules dtbs +if [ ! -f ./arch/riscv/boot/Image ] ; then + echo "Build Failed" + exit 2 +fi + KERNEL_UTS=$(cat "${wdir}/linux/include/generated/utsrelease.h" | awk '{print $3}' | sed 's/\"//g' ) if [ -d "${wdir}/deploy/tmp/" ] ; then diff --git a/06_generate_debian_console_root.sh b/06_generate_debian_console_root.sh index 293f631..12c5643 100755 --- a/06_generate_debian_console_root.sh +++ b/06_generate_debian_console_root.sh @@ -58,27 +58,17 @@ rm -rf ./ignore/.root/etc/systemd/system/getty.target.wants/serial-getty@ttyGS0. rm -rf ./ignore/.root/etc/systemd/network/usb0.network || true rm -rf ./ignore/.root/etc/systemd/network/usb1.network || true -rm -rf ./ignore/.root/etc/systemd/system/multi-user.target.wants/wpa_supplicant@wlan0.service || true +cp -v ./ignore/.root/etc/bbb.io/templates/eth0-DHCP.network ./ignore/.root/etc/systemd/network/eth0.network || true + +if [ -f ./ignore/.root/etc/systemd/system/multi-user.target.wants/wpa_supplicant@wlan0.service ] ; then + rm -rf ./ignore/.root/etc/systemd/system/multi-user.target.wants/wpa_supplicant@wlan0.service || true +fi #rm -rf ./ignore/.root/usr/lib/systemd/system/grow_partition.service || true #cd ./ignore/.root/ #ln -L -f -s -v /lib/systemd/system/resize_filesystem.service --target-directory=./etc/systemd/system/multi-user.target.wants/ #cd ../../ -if [ -f ./ignore/.root/etc/bbb.io/templates/eth0-DHCP.network ] ; then - cp -v ./ignore/.root/etc/bbb.io/templates/eth0-DHCP.network ./ignore/.root/etc/systemd/network/eth0.network || true -else - echo '[Match]' > ./ignore/.root/etc/systemd/network/eth0.network - echo 'Name=eth0' >> ./ignore/.root/etc/systemd/network/eth0.network - echo 'Type=ether' >> ./ignore/.root/etc/systemd/network/eth0.network - echo '' >> ./ignore/.root/etc/systemd/network/eth0.network - echo '[Link]' >> ./ignore/.root/etc/systemd/network/eth0.network - echo 'RequiredForOnline=yes' >> ./ignore/.root/etc/systemd/network/eth0.network - echo '' >> ./ignore/.root/etc/systemd/network/eth0.network - echo '[Network]' >> ./ignore/.root/etc/systemd/network/eth0.network - echo 'DHCP=ipv4' >> ./ignore/.root/etc/systemd/network/eth0.network -fi - # setuid root ping+ping6 chmod u+s ./ignore/.root/usr/bin/ping ./ignore/.root/usr/bin/ping6