Build system image for photonicat2:修订间差异
Monstercat(留言 | 贡献) |
Monstercat(留言 | 贡献) |
||
| (未显示同一用户的3个中间版本) | |||
| 第24行: | 第24行: | ||
mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pyelftools \ | mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pyelftools \ | ||
libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip \ | libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip \ | ||
vim wget xmlto xxd zlib1g-dev | vim wget xmlto xxd zlib1g-dev llvm | ||
</pre> | </pre> | ||
| 第30行: | 第30行: | ||
Get repo files from Github (non-root user): | Get repo files from Github (non-root user): | ||
<pre> | <pre> | ||
git clone https://github.com/photonicat/ | git clone https://github.com/photonicat/rockchip_rk3568_openwrt.git | ||
cd | cd rockchip_rk3568_openwrt | ||
</pre> | </pre> | ||
| 第39行: | 第39行: | ||
./scripts/feeds update -a | ./scripts/feeds update -a | ||
./scripts/feeds install -a | ./scripts/feeds install -a | ||
cp ./configs/photonicat2_base_defconfig .config | cp ./configs/photonicat2_base_defconfig .config #For photonicat (v1), use photonicat_base_defconfig instead. | ||
</pre> | </pre> | ||
| 第61行: | 第61行: | ||
Use <pre>make menuconfig</pre> to select <pre><M> package_name</pre> for your desired package(s). | Use <pre>make menuconfig</pre> to select <pre><M> package_name</pre> for your desired package(s). | ||
If you want to include your own packages to system image, see OpenWRT official documents https://openwrt.org/docs/guide-developer/packages for help. | If you want to include your own packages to system image, see OpenWRT official documents https://openwrt.org/docs/guide-developer/packages for help. | ||
==Flash system images to the onboard eMMC== | ==Flash system images to the onboard eMMC== | ||
| 第112行: | 第87行: | ||
==How to modify your own version of kernel for OpenWRT== | ==How to modify your own version of kernel for OpenWRT== | ||
Compile <code> | Compile <code>rockchip_rk3568_openwrt</code> with above steps. | ||
Modify: | Modify: | ||
*DTB: https://github.com/photonicat/ | *DTB: https://github.com/photonicat/rockchip_rk3568_openwrt/blob/master/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3576-photonicat2.dts | ||
*kernel patches: (we need to add/ modify your version of kernel patches into this dir and recompile): https://github.com/photonicat/ | *kernel patches: (we need to add/ modify your version of kernel patches into this dir and recompile): https://github.com/photonicat/rockchip_rk3568_openwrt/tree/master/target/linux/rockchip/patches-6.12 | ||
Recompile and done. | Recompile and done. | ||
2026年10月19日 (一) 16:08的最新版本
Create System Image
Host System Requirements
At least Debian 12 (bookworm) or Ubuntu 22.04. with Memory >= 16GB and disk space >= 100GB.
Build Debian/Ubuntu system image (mainline kernel)
Check README in https://github.com/photonicat/rockchip_rk3576_linux_mainline for building system image.
Build OpenWRT
Host System Requirements
Debian 11 (bullseye) or Ubuntu 20.04, other distributions may work but not tested.
Compiling Requirements
Please a NORMAL USER, not root
On Debian/Ubuntu systems, install the packages:
sudo apt update sudo apt upgrade -y sudo apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \ bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \ git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \ libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \ mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pyelftools \ libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip \ vim wget xmlto xxd zlib1g-dev llvm
Get repo files
Get repo files from Github (non-root user):
git clone https://github.com/photonicat/rockchip_rk3568_openwrt.git cd rockchip_rk3568_openwrt
Config build target
Run the command below:
./scripts/feeds update -a ./scripts/feeds install -a cp ./configs/photonicat2_base_defconfig .config #For photonicat (v1), use photonicat_base_defconfig instead.
Build system image
Run the command below:
make
The output path is bin/targets/rockchip/armv8/, system image will be named like photonicatwrt-25.02.0-rxxxx+xx-xxxxxxxxx-rockchip-armv8-ariaboard_photonicat2-squashfs-sysupgrade.img.gz
Edit your menuconfig (Optional)
make menuconfig
save and re-run build process again.
IPKs will be under:
bin/targets/rockchip/armv8/packages/
Build your own package, modules on OpenWRT (Optional)
Use
make menuconfig
to select
<M> package_name
for your desired package(s).
If you want to include your own packages to system image, see OpenWRT official documents https://openwrt.org/docs/guide-developer/packages for help.
Flash system images to the onboard eMMC
Prepare update tools and files:
git clone https://github.com/rockchip-linux/rkdeveloptool.git cd rkdeveloptool sudo apt-get install libudev-dev libusb-1.0-0-dev dh-autoreconf aclocal autoreconf -i autoheader automake --add-missing ./configure make wget https://dl.photonicat.com/images/photonicat2/RK3576_MiniLoaderAll.bin
Refer: Photonicat_快速上手#4G/5G版本按键功能定义 to enter the firmware update mode, use A-to-A cable to connect USB OTG port to PC, and use the command below:
gunzip photonicatwrt-25.02.0-rxxxx+xx-xxxxxxxxx-rockchip-armv8-ariaboard_photonicat2-squashfs-sysupgrade.img.gz #Replace file name with the one you get indeed. sudo ./rkdeveloptool db MiniLoaderAll.bin sudo ./rkdeveloptool wl 0 photonicatwrt-25.02.0-rxxxx+xx-xxxxxxxxx-rockchip-armv8-ariaboard_photonicat2-squashfs-sysupgrade.img sudo ./rkdeveloptool rd
How to modify your own version of kernel for OpenWRT
Compile rockchip_rk3568_openwrt with above steps.
Modify:
- DTB: https://github.com/photonicat/rockchip_rk3568_openwrt/blob/master/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3576-photonicat2.dts
- kernel patches: (we need to add/ modify your version of kernel patches into this dir and recompile): https://github.com/photonicat/rockchip_rk3568_openwrt/tree/master/target/linux/rockchip/patches-6.12
Recompile and done.