sudo apt-get update
sudo apt-get install -y build-essential flex bison g++ gawk gcc-multilib g++-multilib gettext git libfuse-dev libncurses5-dev libssl-dev python3 python3-pip python3-ply python3-distutils python3-pyelftools rsync unzip zlib1g-dev file wget subversion patch upx-ucl autoconf automake curl asciidoc binutils bzip2 lib32gcc-s1 libc6-dev-i386 uglifyjs msmtp texinfo libreadline-dev libglib2.0-dev xmlto libelf-dev libtool autopoint antlr3 gperf ccache swig coreutils haveged scons libpython3-dev jq
一些过旧的发行版没有提供 clang-15,可以通过 llvm 官方提供源安装:https://apt.llvm.org
# debian 11
sudo sh -c 'echo "deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-15 main" >> /etc/apt/sources.list'
sudo sh -c 'echo "deb-src http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-15 main" >> /etc/apt/sources.list'
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y clang-15
# ubuntu 20.04
sudo sh -c 'echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main" >> /etc/apt/sources.list'
sudo sh -c 'echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main" >> /etc/apt/sources.list'
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y clang-15
# debian 12 or latest & ubuntu 22 or latest
sudo apt-get update
sudo apt-get install -y clang-15
export USE_GLIBC=y
export ENABLE_BPF=y
export BUILD_FAST=y
export MINIMAL_BUILD=y
# linux-6.1
bash <(curl -sS https://init2.cooluc.com/build.sh) rc2 nanopi-r4s
# linux-6.1
bash <(curl -sS https://init2.cooluc.com/build.sh) rc2 nanopi-r5s
# linux-6.1
bash <(curl -sS https://init2.cooluc.com/build.sh) rc2 x86_64
# linux-6.1
bash <(curl -sS https://init2.cooluc.com/build.sh) dev nanopi-r4s
# linux-6.1
bash <(curl -sS https://init2.cooluc.com/build.sh) dev nanopi-r5s
# linux-6.1
bash <(curl -sS https://init2.cooluc.com/build.sh) dev x86_64
将 init.cooluc.com 补丁默认连接替换为你的 github raw 连接(不带 https://),像这样 raw.githubusercontent.com/你的用户名/r4s_build_script/master
# script url
if [ "$isCN" = "CN" ]; then
- export mirror=init.cooluc.com
+ export mirror=raw.githubusercontent.com/你的用户名/r4s_build_script/master
else
- export mirror=init2.cooluc.com
+ export mirror=raw.githubusercontent.com/你的用户名/r4s_build_script/master
fi
# linux-6.1
bash <(curl -sS https://raw.githubusercontent.com/你的用户名/r4s_build_script/master/openwrt/build.sh) rc2 nanopi-r4s
# linux-6.1
bash <(curl -sS https://raw.githubusercontent.com/你的用户名/r4s_build_script/master/openwrt/build.sh) rc2 nanopi-r5s
# linux-6.1
bash <(curl -sS https://raw.githubusercontent.com/你的用户名/r4s_build_script/master/openwrt/build.sh) rc2 x86_64
- Name:
workflow_token
- Secret:
你的 GitHub Token
创建 New personal access token (classic) (所需权限:repo
和workflow
)