Build SECO BSP for i.MX and Rockchip boards
In embedded systems, the Board Support Package (BSP) is the layer of the software that contains hardware-specific drivers and other routines that allow a particular operating system to work in a specific hardware environment, integrated with the software itself.
BSPs are typically customizable, allowing the user to specify which drivers and routines should be included in the build based on their selection of hardware and software options.
SECO also provides a toolchain to build programs to run on the embedded system and other utilities needed to configure the device (while running) along with the BSP.
To perform the following procedure, you will need to install Docker Engine on Ubuntu according to these instructions https://docs.docker.com/engine/install/ubuntu/.
For further information on Docker platform, visit https://docs.docker.com/get-started/overview/.
INDEX
Source code for linux kernel, u-boot and yocto seco layers is available here.
How can I configure my environment with Docker?
To avoid the time consuming setup of the building environment, we distribute it inside a Docker container.
The following table contains the instructions to create the building environment from the Docker container, depending on the product family of the device used.
Product Family | Environment Setup |
---|---|
i.MX6 |
|
i.MX8 |
|
Rockchip |
|
How can I build SECO U-Boot?
Clone SECO U-Boot from SECO repository
In the following paragraphs, the procedures for selecting the correct defconfig
file are different for i.MX6 and i.MX8 based boards. Be careful to follow the right one according to your device.
Procedure for i.MX6-based boards
For i.MX6 Quad, DualLite and Solo CPUs there’s a specific defconfig
file for each RAM configuration.
i.MX6 SoloX, on the other hand, has dynamic RAM setup implemented in U-Boot.
U-boot will allocate the RAM memory based on your board configuration with the correct default defconfig
file.
The table below shows the correct association RAM Configuration/defconfig
file.
Choose the right defconfig
file from table below using the following command. After having chosen the right defconfig
file, you can build SECO U-Boot.
Device | RAM Configuration |
|
---|---|---|
RAM Size=1GB RAM Configuration=4x256 MB |
| |
RAM Size=2GB RAM Configuration=4x512 MB |
| |
RAM Size=512 MB RAM Configuration=2x256 MB |
| |
Q7-928 | RAM Size=1GB RAM Configuration=4x256 MB |
|
RAM Size=2GB RAM Configuration=4x512 MB |
| |
RAM Size=512 MB RAM Configuration=2x256 MB |
| |
RAM Size=4GB RAM Configuration=8x512 MB |
| |
μQ7-A75-J | RAM Size=1GB RAM Configuration=4x256 MB |
|
RAM Size=256MB RAM Configuration=1x256 MB |
| |
RAM Size=512 MB RAM Configuration=2x256 MB |
| |
SBC-A62-J | RAM Size=1GB RAM Configuration=4x256 MB |
|
RAM Size=2GB RAM Configuration=4x512 MB |
| |
RAM Size=512 MB RAM Configuration=2x256 MB |
| |
SBC-C23 | RAM Size=dynamic RAM Configuration=512MB and 1GB |
|
SBC-B08 | RAM Size=dynamic RAM Configuration=512MB and 1GB |
|
SYS-A62-J | RAM Size=1GB RAM Configuration=4x256 MB |
|
RAM Size=2GB RAM Configuration=4x512 MB |
| |
RAM Size=512 MB RAM Configuration=2x256 MB |
| |
SYS-B08-7 | RAM Size=dynamic RAM Configuration=512MB and 1GB |
|
Procedure for i.MX8-based boards
For i.MX8 CPUs, dynamic RAM management has been implemented at U-Boot level.
Choose the right defconfig
file from table below using the following command for BSP9:
Choose the right defconfig
file from table below using the following command for BSP10:
Device | BSP | RAM Configuration |
|
---|---|---|---|
SM-C12 | BSP 9 | Dynamic RAM |
|
SM-D16 | BSP 10 | Dynamic RAM |
|
Q7-C25 | BSP 9 | Dynamic RAM |
|
Q7-C26 | BSP 9 | Dynamic RAM |
|
Q7-C58 | BSP 9 | To be defined |
|
μQ7-C72 | BSP 9 / BSP 10 | Dynamic RAM for i.MX8MM |
|
BSP 10 | Dynamic RAM for i.MX8MN |
| |
SBC-C20 | BSP 9 | Dynamic RAM |
|
SBC-C43 | BSP 9 | Dynamic RAM |
|
SBC-C57 | BSP 9 | Dynamic RAM |
|
SBC-C61 | BSP 9 | Dynamic RAM |
|
SM-D18 | BSP 10 | Dynamic RAM |
|
u-boot.bin
and spl/u-boot-spl.bin
will be available as outputs.
Now you are ready to combine U-boot with other firmware to build the final binary.
Go in the same folder level of U-Boot and execute following command:
Move inside the imx-mkimage folder:
You can build the binary flash.bin launching the script:
The table below summarizes the eligible values to insert in the script, according to the device used.
Device | flash.bin eligible values |
---|---|
SM-C12 |
|
SBC-C20 with DP Video Output |
|
SBC-C20 with HDMI |
|
Q7-C25 with DP Video Output |
|
Q7-C25 with HDMI |
|
Q7-C26 |
|
SBC-C61 |
|
μQ7-C72 |
|
μQ7-C72n |
|
SBC-C57 |
|
SBC-C43 |
|
SM-D16 |
|
SM-D18 |
|
Procedure for Rockchip RK3399 based boards
For Rockchip RK3399 based boards:
For Rockchip RK3399 Flexy boards:
For Rockchip RK3399 IPC boards:
Now jump inside u-boot folder and modify in make.sh script the TOOLCHAIN_ARM64 variable with the right toolchain path from this:
To this path if you use docker:
Then build it using the following command:
How can I build SECO Kernel?
First, clone SECO Kernel from SECO repository executing one of the following command:
for i.MX6 and i.MX8-based boards:
for Rockchip PX30 based boards:
for Rockchip RK3399 based boards:
for Rockchip RK3399 Flexy boards:
for Rockchip RK3399 IPC boards:
Now, depending on your device, choose the right defconfig
from Kernel configs folder and build it using the following command:
For Rockchip RK3399 based boards:
For NXP i.MX6 based boards:
For NXP i.MX8 based boards:
Device | BSP |
|
---|---|---|
i.MX6 | BSP 9 |
|
i.MX8 | BSP 9 |
|
BSP 10 |
| |
Rockchip PX30 | - |
|
Rockchip RK3399 | - |
|
The compiled files are inside of the following folder:
Device | Files & path |
---|---|
i.MX6 |
|
i.MX8 |
|
Rockchip |
|
How can I setup my BSP?
To setup the custom hardware configuration, please follow https://secospa.atlassian.net/wiki/spaces/SECOTech/blog/2021/09/20/770703361 .
How can I build Buildroot filesystem image for Rockchip RK3399?
To build Rockchip RK3399 Buildroot Image please follow these steps inside an ubuntu 18.04:
first fetch the rk_rockchip tarball and prepare the environment:
then cd into rk_rockchip folder and start the filesystem build:
How can I build Yocto image?
To build the Yocto Image, for i.MX soc based board please follow:
Build Yocto distribution for ARM i.MX products
To build the Yocto Image, for Rockchip soc based board please follow:
https://secogroup.atlassian.net/wiki/spaces/SECOTech/blog/2021/10/18/1403912774