Build host: Ubuntu 22.04, Debian 12
sudo apt update -y
sudo apt install -y ack binutils bison build-essential \
ccache cmake device-tree-compiler flex gawk gettext \
git gperf intltool libelf-dev libglib2.0-dev \
libgmp3-dev libltdl-dev libncurses5-dev libssl-dev \
libreadline-dev libtool wget nano patch sudo \
pkgconf python3 python3-pyelftools xxd zlib1g-dev \
subversion swig texinfo unzip rsync
git clone https://github.com/chainsx/openwrt-th1520 --depth=1
cd openwrt-th1520/riscv-openwrt
./scripts/feeds update -a
./scripts/feeds install -a
cd ..
cp lpi4a.config riscv-openwrt/.config
cd riscv-openwrt && make defconfig
make download V=s -j$(nproc) && make V=s -j$(nproc)
bash build_all.sh
Reference here.
wifi config
reboot