Using Buildroot SDK
Cross Compilation
Cross Compilation here refers to compiling Jupiter's firmware on an X86 PC.
Development Environment
Hardware requirements
Recommended hardware:
- CPU:12th Gen Intel(R) Core(TM) i5 or above
- Memory:16GB or above
- Disk:SSD,256GB or above
Operating System
Ubuntu 20.04 is recommended, other Linux distributions have not been tested.
Install Dependencies
-
Ubuntu 16.04 and 18.04
sudo apt-get install git build-essential cpio unzip rsync file bc wget python3 libncurses5-dev libssl-dev dosfstools mtools u-boot-tools flex bison python3-pip zipsudo pip3 install pyyaml -
Ubuntu 20.04
sudo apt-get install git build-essential cpio unzip rsync file bc wget python3 python-is-python3 libncurses5-dev libssl-dev dosfstools mtools u-boot-tools flex bison python3-pip zipsudo pip3 install pyyaml
Download source code
Use repo (version >= 2.41) to download the complete SDK.
Before using repo, please check whether the git environment is configured with user information. If not, you can refer to the following command to configure it:
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
Create and enter the working directory:
mkdir jupiter-linux
cd jupiter-linux
Download the code, for example download the k1-bl-v2.1.y branch:
repo init -u https://github.com/milkv-jupiter/manifests.git -b main -m k1-bl-v2.1.y.xml
repo sync
repo start k1-bl-v2.1.y --all
When you need to synchronize the latest code later, just execute repo sync.
During the compilation process, Buildroot will download some source packages. To avoid download failures due to network reasons, you can use the following command to download the required source packages from the spacemit server in advance:
wget -c -r -nv -np -nH -R "index.html*" http://archive.spacemit.com/buildroot/dl
The downloaded source package is in the buildroot/dl directory.
Directory Structure:
├── bsp-src # Linux kernel,uboot and opensbi source code
│ ├── linux-6.6
│ ├── opensbi
│ └── uboot-2022.10
├── buildroot # Buildroot main directory
│ ├── dl # Buildroot dependent packages
├── buildroot-ext # Customized ext, such as board, configs, package, and patches
├── Makefile # Top Makefile
├── package-src # Locally deployed application or library source directory
│ ├── ai-support
│ ├── drm-test
│ ├── factorytest
│ ├── glmark2
│ ├── img-gpu-powervr
│ ├── jetson-utils
│ ├── k1x-cam
│ ├── k1x-jpu
│ ├── k1x-vpu-firmware
│ ├── k1x-vpu-test
│ ├── mesa3d
│ ├── mpp
│ ├── rtk_hciattach
│ ├── usb-gadget
│ └── v2d-test
└── scripts # Scripts used during compilation