Skip to content

Commit

Permalink
enable kerner module zram
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Sep 11, 2020
1 parent ab4b12d commit fccf446
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/r1s_lean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/r1s_lean_h3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/r2s_lean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/r2s_lean_minimal-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/r2s_lean_minimal-test.yml_
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/r2s_lean_minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions 2_clone_rouce.sh → 2_clone_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions 3_prepare_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions app_config.seed
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions patch_kernel_5.4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 3 additions & 5 deletions remove_unused_config.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit fccf446

Please sign in to comment.