Build DS920+ 7.2.0-64570 For UNAS_T401P #53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build DS920+ 7.2.0-64570 For UNAS_T401P | |
on: | |
schedule: | |
- cron: '0 18 * * *' | |
workflow_dispatch: | |
inputs: | |
clean_cache: | |
description: 'Clear caches' | |
required: false | |
type: boolean | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: 编译 "${{matrix.platform}} ${{matrix.version}} ${{matrix.machine}}" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: DS920+ | |
version: 7.2.0-64570 | |
machine: UNAS_T401P | |
user: chenxudong2020 | |
steps: | |
- name: 检出项目文件 | |
uses: actions/checkout@v3 | |
- name: 获取当前时间 | |
id: date | |
run: | | |
echo "today=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_OUTPUT | |
echo "now=$(date +'%s')" >> $GITHUB_OUTPUT | |
- name: 环境准备 | |
run: | | |
sudo apt-get install -y curl bspatch jq git | |
git clone -b develop https://github.com/pocopico/redpill-load.git /home/runner/redpill-load | |
cp -f type.sh /home/runner/redpill-load | |
wget https://raw.githubusercontent.com/${{matrix.user}}/Redpill_Build/master/config/${{matrix.machine}}_ds920p_user_config.json -O /home/runner/redpill-load/ds920_user_config.json | |
# 编译arpl使用的lkm | |
mkdir ./lkms && cd ./lkms | |
wget https://github.com/chenxudong2020/rp-ext/raw/main/lkms/rp-geminilake-4.4.302-prod.ko.gz | |
gzip -d rp-geminilake-4.4.302-prod.ko.gz | |
mv `basename ./*` ./lkms.ko | |
mv ./lkms.ko /home/runner/redpill-load/ext/rp-lkm/redpill-linux-v4.4.302+.ko | |
- name: 添加扩展驱动 | |
run: | | |
cd /home/runner/redpill-load | |
curl -skL https://github.com/chenxudong2020/rp-ext/raw/main/used.sh | bash | |
./ext-manager.sh add 'https://raw.githubusercontent.com/chenxudong2020/rp-ext/main/addons/boot-wait/rpext-index.json' | |
./ext-manager.sh add 'https://raw.githubusercontent.com/chenxudong2020/rp-ext/main/addons/misc/rpext-index.json' | |
./ext-manager.sh add 'https://raw.githubusercontent.com/chenxudong2020/rp-ext/main/addons/acpid2/rpext-index.json' | |
./ext-manager.sh add 'https://raw.githubusercontent.com/chenxudong2020/rp-ext/main/addons/hdddb/rpext-index.json' | |
./ext-manager.sh add 'https://raw.githubusercontent.com/chenxudong2020/rp-ext/main/addons/nvmevolume/rpext-index.json' | |
./ext-manager.sh add 'https://raw.githubusercontent.com/chenxudong2020/rp-ext/main/addons/wol/rpext-index.json' | |
./ext-manager.sh add 'https://raw.githubusercontent.com/chenxudong2020/rp-ext/main/modules/r8125/rpext-index.json' | |
- name: 编译DTB | |
run: | | |
cd /home/runner/redpill-load | |
wget https://raw.githubusercontent.com/pocopico/rp-ext/main/redpill-dtb-static/releases/dtc | |
chmod +x ./dtc | |
echo "编译DTS为DTB" | |
wget -O ${{matrix.machine}}_ds920p.dts https://raw.githubusercontent.com/${{matrix.user}}/Redpill_Build/master/dts/${{matrix.machine}}_ds920p.dts | |
./dtc -I dts -O dtb -o ./ds920p.dtb ./${{matrix.machine}}_ds920p.dts | |
EXT_PATH="`./ext/dtbstatic/make.sh ./ds920p.dtb`" | |
if [ -n "${EXT_PATH}" ]; then | |
echo "EXT_PATH: ${EXT_PATH}" | |
./ext-manager.sh add "${EXT_PATH}" | |
else | |
echo "loacl dtbstatic error" | |
exit 1 | |
fi | |
- name: 编译引导 | |
run: | | |
cd /home/runner/redpill-load | |
# 容错 | |
chmod +x type.sh && ./type.sh | |
sed -i 's/\/images\/redpill\-/\/images\/${{matrix.machine}}\-/g' ./build-loader.sh | |
sudo BRP_JUN_MOD=0 BRP_DEBUG=1 BRP_USER_CFG=ds920p_user_config.json ./build-loader.sh '${{matrix.platform}}' '${{matrix.version}}' | |
- name: 上传固件GitHub | |
uses: actions/upload-artifact@master | |
if: always() | |
with: | |
name: ${{matrix.machine}}-${{matrix.platform}}-${{matrix.version}}-b${{steps.date.outputs.now}} | |
path: /home/runner/redpill-load/images | |