From fccf446ffd554f0e5d75f5640288c07cc6fdbf87 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 11 Sep 2020 13:37:03 +0800 Subject: [PATCH] enable kerner module zram add theme https://github.com/garypang13/luci-theme-edge --- .github/workflows/r1s_lean.yml | 2 +- .github/workflows/r1s_lean_h3.yml | 2 +- .github/workflows/r2s_lean.yml | 2 +- .github/workflows/r2s_lean_minimal-dev.yml | 2 +- .github/workflows/r2s_lean_minimal-test.yml_ | 2 +- .github/workflows/r2s_lean_minimal.yml | 2 +- 2_clone_rouce.sh => 2_clone_source.sh | 6 ++++++ 3_prepare_packages.sh | 1 + app_config.seed | 1 + patch_kernel_5.4.sh | 2 -- remove_unused_config.sh | 8 +++----- 11 files changed, 17 insertions(+), 13 deletions(-) rename 2_clone_rouce.sh => 2_clone_source.sh (54%) diff --git a/.github/workflows/r1s_lean.yml b/.github/workflows/r1s_lean.yml index 7c376a95ca..96fdce6f0c 100644 --- a/.github/workflows/r1s_lean.yml +++ b/.github/workflows/r1s_lean.yml @@ -28,7 +28,7 @@ jobs: run: . 1_initialization_environment.sh - name: Clone Source - run: . 2_clone_rouce.sh master h5 + run: . 2_clone_source.sh master h5 - name: Mods run: | diff --git a/.github/workflows/r1s_lean_h3.yml b/.github/workflows/r1s_lean_h3.yml index fd4192a11d..34e51f883b 100644 --- a/.github/workflows/r1s_lean_h3.yml +++ b/.github/workflows/r1s_lean_h3.yml @@ -28,7 +28,7 @@ jobs: run: . 1_initialization_environment.sh - name: Clone Source - run: . 2_clone_rouce.sh master-v19.07.1 h3 + run: . 2_clone_source.sh master-v19.07.1 h3 - name: Mods run: | diff --git a/.github/workflows/r2s_lean.yml b/.github/workflows/r2s_lean.yml index f053f37233..5065cccc8e 100644 --- a/.github/workflows/r2s_lean.yml +++ b/.github/workflows/r2s_lean.yml @@ -28,7 +28,7 @@ jobs: run: . 1_initialization_environment.sh - name: Clone Source - run: . 2_clone_rouce.sh master-v19.07.1 rk3328 + run: . 2_clone_source.sh master-v19.07.1 rk3328 - name: Patch Kernel run: . patch_kernel_5.4.sh diff --git a/.github/workflows/r2s_lean_minimal-dev.yml b/.github/workflows/r2s_lean_minimal-dev.yml index e4553edd2b..2db5320ba3 100644 --- a/.github/workflows/r2s_lean_minimal-dev.yml +++ b/.github/workflows/r2s_lean_minimal-dev.yml @@ -28,7 +28,7 @@ jobs: run: . 1_initialization_environment.sh - name: Clone Source - run: . 2_clone_rouce.sh master-v19.07.1 rk3328 + run: . 2_clone_source.sh master-v19.07.1 rk3328 - name: Patch Kernel run: . patch_kernel_5.4-test.sh diff --git a/.github/workflows/r2s_lean_minimal-test.yml_ b/.github/workflows/r2s_lean_minimal-test.yml_ index f2a25533e6..f799c74783 100644 --- a/.github/workflows/r2s_lean_minimal-test.yml_ +++ b/.github/workflows/r2s_lean_minimal-test.yml_ @@ -29,7 +29,7 @@ jobs: run: . 1_initialization_environment.sh - name: Clone Source - run: . 2_clone_rouce.sh + run: . 2_clone_source.sh - name: Patch Kernel run: . patch_kernel_5.4-test.sh diff --git a/.github/workflows/r2s_lean_minimal.yml b/.github/workflows/r2s_lean_minimal.yml index 08caadc7e2..99e0984c2c 100644 --- a/.github/workflows/r2s_lean_minimal.yml +++ b/.github/workflows/r2s_lean_minimal.yml @@ -28,7 +28,7 @@ jobs: run: . 1_initialization_environment.sh - name: Clone Source - run: . 2_clone_rouce.sh master-v19.07.1 rk3328 + run: . 2_clone_source.sh master-v19.07.1 rk3328 - name: Patch Kernel run: . patch_kernel_5.4.sh diff --git a/2_clone_rouce.sh b/2_clone_source.sh similarity index 54% rename from 2_clone_rouce.sh rename to 2_clone_source.sh index 22c2fc6563..326aa1c4c9 100644 --- a/2_clone_rouce.sh +++ b/2_clone_source.sh @@ -6,3 +6,9 @@ repo init -u https://github.com/friendlyarm/friendlywrt_manifests -b $1 -m $2.xm repo sync -c --no-tags --no-clone-bundle -j8 cd friendlywrt/ && git fetch --unshallow git checkout `git branch -va | grep remotes/m | awk '{print $3}' | awk -F\/ '{print $2}'` + +[ -f target/linux/rockchip-rk3328/config-4.14 ] && sed -i '/CONFIG_CGROUPS/a\CONFIG_CGROUP_PERF=y' target/linux/rockchip-rk3328/config-4.14 +[ -f target/linux/allwinner-h5/config-4.14 ] && sed -i '/CONFIG_CGROUPS/a\CONFIG_CGROUP_PERF=y' target/linux/allwinner-h5/config-4.14 +git add . && git commit -m 'reset' + +cd ../ && find device/ -name distfeeds.conf -delete diff --git a/3_prepare_packages.sh b/3_prepare_packages.sh index 9d997f8a52..7d37b83086 100644 --- a/3_prepare_packages.sh +++ b/3_prepare_packages.sh @@ -4,6 +4,7 @@ fi git clone https://github.com/destan19/OpenAppFilter.git git clone https://github.com/rufengsuixing/luci-app-adguardhome git clone -b 18.06 https://github.com/jerrykuku/luci-theme-argon.git +git clone -b 18.06 https://github.com/garypang13/luci-theme-edge git clone https://github.com/xiaoqingfengATGH/luci-theme-infinityfreedom #git clone https://github.com/jerrykuku/lua-maxminddb.git diff --git a/app_config.seed b/app_config.seed index 8f46df6263..6796a02c6f 100644 --- a/app_config.seed +++ b/app_config.seed @@ -83,6 +83,7 @@ CONFIG_PACKAGE_luci-theme-netgear-mc=y CONFIG_PACKAGE_luci-theme-openwrt=y CONFIG_PACKAGE_autocore=y +CONFIG_PACKAGE_zram-swap=y CONFIG_PACKAGE_luci-app-smartdns=y CONFIG_PACKAGE_luci-app-wireguard=y CONFIG_PACKAGE_luci-app-oaf=y diff --git a/patch_kernel_5.4.sh b/patch_kernel_5.4.sh index e73c4a7c81..97286f8437 100644 --- a/patch_kernel_5.4.sh +++ b/patch_kernel_5.4.sh @@ -16,5 +16,3 @@ cd ../ wget https://github.com/torvalds/linux/raw/master/scripts/kconfig/merge_config.sh && chmod +x merge_config.sh grep -i '_NETFILTER_\|FLOW' ../.config.override > .config.override ./merge_config.sh -m .config.override kernel/arch/arm64/configs/nanopi-r2_linux_defconfig && mv .config kernel/arch/arm64/configs/nanopi-r2_linux_defconfig - -sed -i -r 's/# (CONFIG_.*_ERRATUM_.*?) is.*/\1=y/g' kernel/arch/arm64/configs/nanopi-r2_linux_defconfig diff --git a/remove_unused_config.sh b/remove_unused_config.sh index c601d96c42..33c53cde39 100644 --- a/remove_unused_config.sh +++ b/remove_unused_config.sh @@ -1,12 +1,10 @@ [ -f configs/config_rk3328 ] && sed -i '/=m/d;/CONFIG_IB/d;/CONFIG_SDK/d;/CONFIG_BUILDBOT/d;/CONFIG_ALL_KMODS/d;/CONFIG_PACKAGE_kmod/d;/CONFIG_ALL_NONSHARED/d;/docker/d;/DOCKER/d;/CONFIG_DISPLAY_SUPPORT/d;/CONFIG_AUDIO_SUPPORT/d;/CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM/d;/CONFIG_VERSION/d;/SAMBA/Id;/modemmanager/d;/CGROUPS/d;/PACKAGE_lib/d;/luci-lib/d' configs/config_rk3328 [ -f configs/config_h5 ] && sed -i '/=m/d;/CONFIG_IB/d;/CONFIG_SDK/d;/CONFIG_BUILDBOT/d;/CONFIG_ALL_KMODS/d;/CONFIG_PACKAGE_kmod/d;/CONFIG_ALL_NONSHARED/d;/docker/d;/DOCKER/d;/CONFIG_DISPLAY_SUPPORT/d;/CONFIG_AUDIO_SUPPORT/d;/CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM/d;/CONFIG_VERSION/d;/SAMBA/Id;/modemmanager/d;/CGROUPS/d;/PACKAGE_lib/d;/luci-lib/d' configs/config_h5 [ -f configs/config_h3 ] && sed -i '/=m/d;/CONFIG_IB/d;/CONFIG_SDK/d;/CONFIG_BUILDBOT/d;/CONFIG_ALL_KMODS/d;/CONFIG_PACKAGE_kmod/d;/CONFIG_ALL_NONSHARED/d;/docker/d;/DOCKER/d;/CONFIG_DISPLAY_SUPPORT/d;/CONFIG_AUDIO_SUPPORT/d;/CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM/d;/CONFIG_VERSION/d;/SAMBA/Id;/modemmanager/d;/CGROUPS/d;/PACKAGE_lib/d;/luci-lib/d' configs/config_h3 -[ -f friendlywrt/target/linux/rockchip-rk3328/config-4.14 ] && sed -i '/CONFIG_CGROUPS/a\CONFIG_CGROUP_PERF=y' friendlywrt/target/linux/rockchip-rk3328/config-4.14 -[ -f friendlywrt/target/linux/allwinner-h5/config-4.14 ] && sed -i '/CONFIG_CGROUPS/a\CONFIG_CGROUP_PERF=y' friendlywrt/target/linux/allwinner-h5/config-4.14 -cd friendlywrt/ && git add . && git commit -m 'reset' && cd ../ - -find device/ -name distfeeds.conf -delete [ -f configs/config_rk3328 ] && echo -e '\nCONFIG_KERNEL_BUILD_USER="Dayong Chen"\nCONFIG_GRUB_TITLE="OpenWrt on Nanopi devices compiled by DayongChen"' >> configs/config_rk3328 [ -f configs/config_h5 ] && echo -e '\nCONFIG_KERNEL_BUILD_USER="Dayong Chen"\nCONFIG_GRUB_TITLE="OpenWrt on Nanopi devices compiled by DayongChen"' >> configs/config_h5 [ -f configs/config_h3 ] && echo -e '\nCONFIG_KERNEL_BUILD_USER="Dayong Chen"\nCONFIG_GRUB_TITLE="OpenWrt on Nanopi devices compiled by DayongChen"' >> configs/config_h3 + +sed -i -r 's/# (CONFIG_.*_ERRATUM_.*?) is.*/\1=y/g' kernel/arch/arm64/configs/nanopi-r2_linux_defconfig +echo "\nCONFIG_ZRAM=m\n" >> kernel/arch/arm64/configs/sunxi_arm64_defconfig