Photonicat 编译 OpenWRT, Debian: Difference between revisions
No edit summary |
|||
Line 36: | Line 36: | ||
==OpenWRT== | ==OpenWRT== | ||
Photonicat image contains following packages: | |||
# OpenWRT (within rk3568-linux-sdk) | |||
# pcat-manager (within rk3568-linux-sdk) | |||
# pcat-manager-web (closed source currently: e.g: https://dl.photonicat.com/repos/openwrt/volatile/pcat-manager-web_1.0.9-0_aarch64_cortex-a53.ipk, we need to change luci listen port to 8080.) | |||
# quectel-cm (within rk3568-linux-sdk) | |||
rk3568-linux-sdk will fetch [https://github.com/photonicat/rockchip_rk3568_uboot uboot], [https://github.com/photonicat/rockchip_rk3568_kernel kernel], [https://github.com/photonicat/rockchip_rk3568_openwrt openwrt], and copmile them in one build script. | rk3568-linux-sdk will fetch [https://github.com/photonicat/rockchip_rk3568_uboot uboot], [https://github.com/photonicat/rockchip_rk3568_kernel kernel], [https://github.com/photonicat/rockchip_rk3568_openwrt openwrt], and copmile them in one build script. |
Revision as of 23:19, 21 March 2023
Debian
Host System Requirements
Debian 11 (bullseye) or Ubuntu 20.04.
Compiling Requirements
On Debian/Ubuntu systems, install the packages:
sudo apt-get install build-essential flex bison genext2fs
Get Repo files by tarball(with .git)
wget https://dl.photonicat.com/repos/rk3568-debian-source-20220927.tar.xz
Install live build packages
Install live build packages if not installed yet:
sudo dpkg -i debian/ubuntu-build-service/packages/*.deb sudo apt-get install -f
Config build target
Run the command below:
./rk3568-config-photonicat-debian.sh
Build system image
Run the command below:
./build.sh
The output path is rockdev, system image path is rockdev/pack
OpenWRT
Photonicat image contains following packages:
- OpenWRT (within rk3568-linux-sdk)
- pcat-manager (within rk3568-linux-sdk)
- pcat-manager-web (closed source currently: e.g: https://dl.photonicat.com/repos/openwrt/volatile/pcat-manager-web_1.0.9-0_aarch64_cortex-a53.ipk, we need to change luci listen port to 8080.)
- quectel-cm (within rk3568-linux-sdk)
rk3568-linux-sdk will fetch uboot, kernel, openwrt, and copmile them in one build script.
In addition to default packages we have 3 more package for power and modem manager.
- modem/power_manager (written in c)
- web interface for displaying mobile modem and battery info. (written in python)
- c program modem watchdog
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 build-essential flex bison genext2fs \ ccache ecj fastjar file g++ gawk gettext git \ java-propose-classpath libelf-dev libncurses5-dev \ libncursesw5-dev libssl-dev python2.7-dev python3 \ unzip wget python3-distutils python3-setuptools python3-dev \ rsync subversion swig time xsltproc zlib1g-dev \ device-tree-compiler gcc-aarch64-linux-gnu bc lz4 python
Get repo files
Get repo files from Github (non-root user):
git clone https://github.com/photonicat/rockchip_rk3568_linux_sdk -b openwrt --single-branch rk3568-linux-sdk cd rk3568-linux-sdk git submodule update --init
Config build target
Run the command below:
./rk3568-config-photonicat-openwrt.sh
Build system image
Run the command below:
export CROSS_COMPILE=aarch64-linux-gnu- ./build.sh
The output path is rockdev
, system image path is rockdev/pack
cd openwrt make menuconfig ARCH=aarch64
save and re-run build process again.
IPKs will be under:
./openwrt/staging_dir/packages/armvirt/
Flash system images to the onboard eMMC
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:
sudo tools/linux/Linux_Upgrade_Tool/Linux_Upgrade_Tool/upgrade_tool uf rockdev/pack/BOARDCONFIG-RK3568-PHOTONICAT-OPENWRT-DDR4-GPT-IMAGE_DATE-IMAGE_TIME.img #Replace IMAGE_DATE and IMAGE_TIME with the one you get.