Build: fix r5s

This commit is contained in:
John Doe
2022-06-29 06:07:29 +08:00
parent 89fb3f0e27
commit f6d27ac0ef
2 changed files with 23 additions and 20 deletions

View File

@@ -19,6 +19,7 @@ jobs:
env:
TG: ${{ secrets.TELEGRAM_BOT_TOKEN }}
DEVICE: r5s
BRANCH: master
steps:
@@ -107,13 +108,12 @@ jobs:
./scripts/feeds update -a
./scripts/feeds install -a
. $GITHUB_WORKSPACE/scripts/merge_packages.sh
BRANCH='master'
. $GITHUB_WORKSPACE/scripts/patches.sh
- name: compile
run: |
cd friendlywrt-rk3568
./build.sh nanopi_r5s.mk || (cd friendlywrt && make V=sc)
./build.sh nanopi_r5s.mk || (cd friendlywrt && make V=sc && exit 255)
cd friendlywrt
make target/imagebuilder/compile

View File

@@ -56,19 +56,20 @@ if [[ $BRANCH == 'master' ]]; then
case $DEVICE in
(r2s|r2c|r1p)
# change the voltage value for over-clock stablization
config_file_cpufreq=`find package/ -follow -type f -path '*/luci-app-cpufreq/root/etc/config/cpufreq'`
truncate -s-1 $config_file_cpufreq
echo -e "\toption governor0 'schedutil'" >> $config_file_cpufreq
echo -e "\toption minfreq0 '816000'" >> $config_file_cpufreq
echo -e "\toption maxfreq0 '1512000'\n" >> $config_file_cpufreq
r2s|r2c|r1p|r1p-lts)
# change the voltage value for over-clock stablization
config_file_cpufreq=`find package/ -follow -type f -path '*/luci-app-cpufreq/root/etc/config/cpufreq'`
truncate -s-1 $config_file_cpufreq
echo -e "\toption governor0 'schedutil'" >> $config_file_cpufreq
echo -e "\toption minfreq0 '816000'" >> $config_file_cpufreq
echo -e "\toption maxfreq0 '1512000'\n" >> $config_file_cpufreq
# add pwm fan control service
wget https://github.com/friendlyarm/friendlywrt/commit/cebdc1f94dcd6363da3a5d7e1e69fd741b8b718e.patch
git apply cebdc1f94dcd6363da3a5d7e1e69fd741b8b718e.patch
rm cebdc1f94dcd6363da3a5d7e1e69fd741b8b718e.patch
sed -i 's/pwmchip1/pwmchip0/' target/linux/rockchip/armv8/base-files/usr/bin/fa-fancontrol.sh target/linux/rockchip/armv8/base-files/usr/bin/fa-fancontrol-direct.sh
# add pwm fan control service
wget https://github.com/friendlyarm/friendlywrt/commit/cebdc1f94dcd6363da3a5d7e1e69fd741b8b718e.patch
git apply cebdc1f94dcd6363da3a5d7e1e69fd741b8b718e.patch
rm cebdc1f94dcd6363da3a5d7e1e69fd741b8b718e.patch
sed -i 's/pwmchip1/pwmchip0/' target/linux/rockchip/armv8/base-files/usr/bin/fa-fancontrol.sh target/linux/rockchip/armv8/base-files/usr/bin/fa-fancontrol-direct.sh
;;
esac
fi
@@ -105,12 +106,14 @@ if [[ $DEVICE == 'r1s' ]]; then
merge_package https://github.com/immortalwrt/immortalwrt/branches/openwrt-18.06-k5.4/package/emortal/autocore
fi
if [[ $DEVICE == 'r4s' || $DEVICE == 'r2s' || $DEVICE == 'r2c' || $DEVICE == 'r1p' || $DEVICE == 'r1p-lts' ]]; then
sed -i 's/5.10/5.4/g' target/linux/rockchip/Makefile
line_number_CONFIG_CRYPTO_LIB_BLAKE2S=$[`grep -n 'CONFIG_CRYPTO_LIB_BLAKE2S' package/kernel/linux/modules/crypto.mk | cut -d: -f 1`+1]
sed -i $line_number_CONFIG_CRYPTO_LIB_BLAKE2S' s/HIDDEN:=1/DEPENDS:=@(LINUX_5_4||LINUX_5_10)/' package/kernel/linux/modules/crypto.mk
sed -i 's/libblake2s.ko@lt5.9/libblake2s.ko/;s/libblake2s-generic.ko@lt5.9/libblake2s-generic.ko/' package/kernel/linux/modules/crypto.mk
fi
case $DEVICE in
r2s|r2c|r1p|r1p-lts)
sed -i 's/5.10/5.4/g' target/linux/rockchip/Makefile
line_number_CONFIG_CRYPTO_LIB_BLAKE2S=$[`grep -n 'CONFIG_CRYPTO_LIB_BLAKE2S' package/kernel/linux/modules/crypto.mk | cut -d: -f 1`+1]
sed -i $line_number_CONFIG_CRYPTO_LIB_BLAKE2S' s/HIDDEN:=1/DEPENDS:=@(LINUX_5_4||LINUX_5_10)/' package/kernel/linux/modules/crypto.mk
sed -i 's/libblake2s.ko@lt5.9/libblake2s.ko/;s/libblake2s-generic.ko@lt5.9/libblake2s-generic.ko/' package/kernel/linux/modules/crypto.mk
;;
esac
# ...
sed -i 's/kmod-usb-net-rtl8152/kmod-usb-net-rtl8152-vendor/' target/linux/rockchip/image/armv8.mk target/linux/sunxi/image/cortexa53.mk target/linux/sunxi/image/cortexa7.mk