Buildroot Development
Buildroot is a framework for building embedded Linux systems on Linux platforms. Buildroot consists of a Makefile(*.mk) script and a Kconfig(Config.in) configuration file. You can build a complete Linux system (including boot, kernel, rootfs, and rootfs libraries and applications) that can be burned directly into your machine, just like you would build a Linux kernel, by using the buildroot configuration, menuconfig modifications, and compiling a complete Linux system. For more information on Buildroot development, please refer to the official Buildroot Development Manual.
Hardware Configuration
Recommended hardware configuration for compiling Ubuntu development environment:
64-bit CPU
Ubuntu 20.04, do not use Windows Subsystem (WSL)
16GB of RAM
250GB free space for compiling
Normal user to compile, do not use root user to compile
Software Configuration
Installation packages
sudo apt update
sudo apt-get install git ssh make gcc libssl-dev liblz4-tool \
expect g++ patchelf chrpath gawk texinfo chrpath diffstat binfmt-support \
qemu-user-static live-build bison flex fakeroot cmake gcc-multilib g++-multilib \
unzip device-tree-compiler libncurses-dev
sudo pip install python-pip pyelftools
Get SDK
Email support@neardi.com for development materials
After downloading, check the MD5 code and Neardi-3588-SDK-Linux-${Version}.tar.gz.md5sum for consistency before unzipping:
$ md5sum Neardi-3588-SDK-Linux-${Version}.tar.gz
******************************** Neardi-3588-SDK-Linux-${Version}.tar.gz
Unzip:
tar zxvf Neardi-3588-SDK-Linux-${Version}.tar.gz
Extract:
cd Neardi-3588-SDK-Linux-${Version}
git reset --hard
Switch branches:
branch | explain |
---|---|
LZ16000002 | Neardi master branch |
git checkout LZ16000002
Compile SDK
Select Configuration
boardConfig | explain |
---|---|
BoardConfig-rk3588-neardi-linux-lpb3588-f0.mk | HDMIIN + HDMI1 + HDMI2 + HDMI3 + DP |
./build.sh lunch BoardConfig-rk3588-neardi-linux-lpb3588-f0.mk
Fully Automatic Compilation
For the first compilation of the SDK, it is imperative to compile everything once, otherwise packaging will fail.
Fully automatic compilation will execute all compilations, generating u-boot, kernel, and buildroot.
./build.sh
Partial Compilation
Compile u-boot
./build.sh uboot
Compile kernel
./build.sh kernel
Compile recovery
./build.sh recovery
Compile Buildroot
./build.sh rootfs
Packaging Firmware
RK firmware is packaged in a proprietary format by Rockchip, and can be flashed onto eMMC or SD card using tools provided by Rockchip (Note: Unless specified otherwise, the firmware mentioned on the WIKI by default refers to RK firmware).
# Package RK firmware
./build.sh updateimg
The complete firmware will be saved to rockdev/update.img
。