From fc4dee45c3d8b0eab2e09dd0caa0fffd1cce02ec Mon Sep 17 00:00:00 2001 From: John Doe Date: Sun, 24 Apr 2022 18:04:01 +0800 Subject: [PATCH 1/2] Build: add cpufreq driver for r1s --- scripts/patches.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/patches.sh b/scripts/patches.sh index 5268ce2..f7d9bf9 100644 --- a/scripts/patches.sh +++ b/scripts/patches.sh @@ -86,5 +86,5 @@ cd ~ && git clone -b openwrt-21.02 https://github.com/immortalwrt/immortalwrt && git log --grep r1s -i | grep '^commit ' | head -n -2 | cut -d' ' -f2 | tac | xargs git show | sed '0,/UENV/s//ATF/' > r1s.diff git show 124116564e8a6081e79cb2e87b0d87b2af99c583 >> r1s.diff cd ~/lede && chmod +x target/linux/sunxi/base-files/etc/board.d/* && git apply ~/immortalwrt/r1s.diff -wget https://github.com/immortalwrt/immortalwrt/raw/openwrt-21.02/target/linux/sunxi/cortexa53/config-5.4 -O target/linux/sunxi/cortexa53/config-5.4 +echo "\nCONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM=y\nCONFIG_ARM_SCPI_CPUFREQ=y" >> target/linux/sunxi/cortexa53/config-5.4 fi \ No newline at end of file From 02b7bdf051f915042b4b235a638c8f7f71f30f40 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sun, 24 Apr 2022 22:25:30 +0800 Subject: [PATCH 2/2] Build: downgrade kernel to fix 8821cu driver --- .github/workflows/lo-test.yml | 1 - scripts/patches.sh | 14 ++++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lo-test.yml b/.github/workflows/lo-test.yml index adfade5..05b5b43 100644 --- a/.github/workflows/lo-test.yml +++ b/.github/workflows/lo-test.yml @@ -52,7 +52,6 @@ jobs: LOOP_DEVICE=$(losetup -f) && echo "LOOP_DEVICE=$LOOP_DEVICE" >> $GITHUB_ENV sudo losetup -P --direct-io $LOOP_DEVICE lede.img mkdir lede && sudo mount -o nossd,compress=zstd $LOOP_DEVICE lede - [ $BRANCH != 'master' ] && BRANCH='openwrt-18.06-k5.4' if [ -d 'lede/.git' ]; then cd lede && rm -f zerospace && git config --local user.email "action@github.com" && git config --local user.name "GitHub Action" git fetch && git reset --hard origin/$BRANCH && git clean -df diff --git a/scripts/patches.sh b/scripts/patches.sh index f7d9bf9..5c3cd52 100644 --- a/scripts/patches.sh +++ b/scripts/patches.sh @@ -81,10 +81,12 @@ sed -i '/uci commit luci/i\uci set luci.main.mediaurlbase="/luci-static/argon"' sed -i '/182.140.223.146/d;/\.cn\//d;/tencent/d' scripts/download.pl # add r1s support to Lean's repo -if [ $DEVICE == 'r1s' ]; then -cd ~ && git clone -b openwrt-21.02 https://github.com/immortalwrt/immortalwrt && cd immortalwrt -git log --grep r1s -i | grep '^commit ' | head -n -2 | cut -d' ' -f2 | tac | xargs git show | sed '0,/UENV/s//ATF/' > r1s.diff -git show 124116564e8a6081e79cb2e87b0d87b2af99c583 >> r1s.diff -cd ~/lede && chmod +x target/linux/sunxi/base-files/etc/board.d/* && git apply ~/immortalwrt/r1s.diff -echo "\nCONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM=y\nCONFIG_ARM_SCPI_CPUFREQ=y" >> target/linux/sunxi/cortexa53/config-5.4 +if [[ $DEVICE == 'r1s' ]]; then + cd ~ && git clone -b openwrt-21.02 https://github.com/immortalwrt/immortalwrt && cd immortalwrt + git log --grep r1s -i | grep '^commit ' | head -n -2 | cut -d' ' -f2 | tac | xargs git show | sed '0,/UENV/s//ATF/' > r1s.diff + git show 124116564e8a6081e79cb2e87b0d87b2af99c583 >> r1s.diff + cd ~/lede && chmod +x target/linux/sunxi/base-files/etc/board.d/* && git apply ~/immortalwrt/r1s.diff + echo "\nCONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM=y\nCONFIG_ARM_SCPI_CPUFREQ=y" >> target/linux/sunxi/cortexa53/config-5.4 +elif [[ $DEVICE == 'r2s' || $DEVICE == 'r2c' || $DEVICE == 'r1p' || $DEVICE == 'r1p-lts' ]]; then + sed -i 's/5.15/5.4/g' target/linux/rockchip/Makefile fi \ No newline at end of file