Photonicat 编译 OpenWRT, Debian: Difference between revisions

From Photonicat Wiki
Jump to navigation Jump to search
No edit summary
Line 47: Line 47:


===Host System Requirements===
===Host System Requirements===
Debian 11 (bullseye) or Ubuntu 20.04/22.04, other distributions may work but not tested.
Debian 11 (bullseye) or Ubuntu 20.04, other distributions may work but not tested.


===Compiling Requirements===
===Compiling Requirements===
Line 61: Line 61:
     unzip wget python3-distutils python3-setuptools python3-dev \
     unzip wget python3-distutils python3-setuptools python3-dev \
     rsync subversion swig time xsltproc zlib1g-dev \
     rsync subversion swig time xsltproc zlib1g-dev \
     device-tree-compiler gcc-aarch64-linux-gnu bc #python #if needed
     device-tree-compiler gcc-aarch64-linux-gnu bc lz4 python  
</pre>
</pre>



Revision as of 12:13, 20 September 2022

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

Get repo files from Github:

git clone https://github.com/photonicat/rockchip_rk3568_linux_sdk -b debian --single-branch rk3568-linux-sdk
cd rk3568-linux-sdk
git submodule update --init

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

Install system image to the eMMC on board

Set the board to firmware update mode, 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-DEBIAN-DDR4-GPT-IMAGE_DATE-IMAGE_TIME.img #Replace IMAGE_DATE and IMAGE_TIME with the one you get.

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 install 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:

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

Install system image to the eMMC on board

Set the board to firmware update mode, 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.