From 719e9c20aa39e664c3030cb74314240964fc7e5b Mon Sep 17 00:00:00 2001 From: John Doe Date: Thu, 1 Apr 2021 21:29:00 +0800 Subject: [PATCH] setup: re-add r2s fan control --- .github/workflows/lo-test.yml | 11 ++--------- merge_files.sh | 12 ++++++++++++ merge_packages.sh | 6 ------ 3 files changed, 14 insertions(+), 15 deletions(-) create mode 100644 merge_files.sh diff --git a/.github/workflows/lo-test.yml b/.github/workflows/lo-test.yml index 48b0ebc..e3d8452 100644 --- a/.github/workflows/lo-test.yml +++ b/.github/workflows/lo-test.yml @@ -198,10 +198,7 @@ jobs: sudo sysctl vm.swappiness=0 curl -L https://github.com/klever1988/sshactions/releases/download/cache/ib-$DEVICE.tar.xz | tar -Jxvf - mv *imagebuilder* ib && cd ib - mv $GITHUB_WORKSPACE/files ./ - chmod 600 files/etc/dropbear/* - eval `cat .config | grep \" | head -n 10` - . files/etc/opkg/distfeeds.conf | tee files/etc/opkg/distfeeds.conf + . $GITHUB_WORKSPACE/merge_files.sh mkdir -p files/local_feed && sudo mount --bind packages files/local_feed sed -i 's/luci-app-[^ ]*//g' include/target.mk $(find target/ -name Makefile) sed -i 's/$(OPKG) install $(BUILD_PACKAGES)/$(OPKG) install --force-overwrite $(BUILD_PACKAGES)/' Makefile @@ -243,12 +240,8 @@ jobs: sudo sysctl vm.swappiness=0 curl -L https://github.com/klever1988/sshactions/releases/download/cache/ib-$DEVICE.tar.xz | tar -Jxvf - mv *imagebuilder* ib && cd ib - mv $GITHUB_WORKSPACE/files ./ - chmod 600 files/etc/dropbear/* - eval `cat .config | grep \" | head -n 10` - . files/etc/opkg/distfeeds.conf | tee files/etc/opkg/distfeeds.conf + . $GITHUB_WORKSPACE/merge_files.sh sed -i '/local/d;s/#//' files/etc/opkg/distfeeds.conf - cat files/etc/opkg/distfeeds.conf sed -i 's/luci-app-[^ ]*//g' include/target.mk $(find target/ -name Makefile) sed -i 's/$(OPKG) install $(BUILD_PACKAGES)/$(OPKG) install --force-overwrite $(BUILD_PACKAGES)/' Makefile PACKAGES=$(cat $GITHUB_WORKSPACE/$DEVICE.config.seed | grep CONFIG_PACKAGE | sed '/dnsmasq_full_dhcpv6/d;/INCLUDE/d' | grep -v luci-app | sed 's/CONFIG_PACKAGE_//;s/=y//' | xargs echo) diff --git a/merge_files.sh b/merge_files.sh new file mode 100644 index 0000000..45e6492 --- /dev/null +++ b/merge_files.sh @@ -0,0 +1,12 @@ +mv $GITHUB_WORKSPACE/files ./ +if [ $DEVICE = 'r2s' ]; then + mkdir -p files/usr/bin files/etc/init.d files/etc/rc.d + wget https://github.com/friendlyarm/friendlywrt/raw/master-v19.07.1/target/linux/rockchip-rk3328/base-files/usr/bin/start-rk3328-pwm-fan.sh -qNP files/usr/bin + chmod +x files/usr/bin/start-rk3328-pwm-fan.sh + wget https://github.com/friendlyarm/friendlywrt/raw/master-v19.07.1/target/linux/rockchip-rk3328/base-files/etc/init.d/fa-rk3328-pwmfan -qNP files/etc/init.d + chmod +x files/etc/init.d/fa-rk3328-pwmfan + ln -sf ../init.d/fa-rk3328-pwmfan files/etc/rc.d/S96fa-rk3328-pwmfan +fi +chmod 600 files/etc/dropbear/* +eval `cat .config | grep \" | head -n 10` +. files/etc/opkg/distfeeds.conf | tee files/etc/opkg/distfeeds.conf \ No newline at end of file diff --git a/merge_packages.sh b/merge_packages.sh index a7d6cda..e023f98 100644 --- a/merge_packages.sh +++ b/merge_packages.sh @@ -21,12 +21,6 @@ merge_package https://github.com/coolsnowwolf/packages/trunk/kernel/ksmbd merge_package https://github.com/coolsnowwolf/packages/trunk/net/ksmbd-tools if [ $DEVICE = 'r2s' ]; then - mkdir -p files/usr/bin files/etc/init.d files/etc/rc.d - wget https://github.com/friendlyarm/friendlywrt/raw/master-v19.07.1/target/linux/rockchip-rk3328/base-files/usr/bin/start-rk3328-pwm-fan.sh -qNP files/usr/bin - chmod +x files/usr/bin/start-rk3328-pwm-fan.sh - wget https://github.com/friendlyarm/friendlywrt/raw/master-v19.07.1/target/linux/rockchip-rk3328/base-files/etc/init.d/fa-rk3328-pwmfan -qNP files/etc/init.d - chmod +x files/etc/init.d/fa-rk3328-pwmfan - ln -sf ../init.d/fa-rk3328-pwmfan files/etc/rc.d/S96fa-rk3328-pwmfan merge_package https://github.com/NateLol/luci-app-oled sed -i "s/enable '0'/enable '1'/" package/luci-app-oled/root/etc/config/oled fi