This repository contains scripts for creating boot images used with debug boards based on MacroGroup DiaSom modules.
(Component versions may vary per board)
- barebox 2026.06+ (bootloader)
- buildroot 2026.05+ (root filesystem generator)
- linux 6.19+ (Linux kernel)
git clone https://github.com/MacroGroup/bsp.git
cd bsp
./ds-imx8m-evb.shSD-card image created after successful build in the output/ds-imx8m-evb/images directory.
git clone https://github.com/MacroGroup/bsp.git
cd bspFirst build - specify your board type:
# For DS-RK3568-EVB board:
./ds-rk35xx-evb.sh -b ds-rk3568-evb
# For DS-RK3588-BTB-EVB board:
./ds-rk35xx-evb.sh -b ds-rk3588-btb-evbSubsequent builds (with existing configuration):
./ds-rk35xx-evb.sh -b ds-rk3568-evb # Use the same board name as beforeSD-card image created after successful build in the output/ds-rk35xx-evb/images directory.
The build system uses a board.cfg file to track board-specific configurations and can contain:
- BOARD_NAME - Your board name (required for persistent configuration)
- BRANCH - Buildroot branch name (optional, defaults to "macro")
1. No board.cfg exists:
- With -b option: Creates board.cfg with specified board name and branch
# Creates config: BOARD_NAME=my_board, BRANCH=macro (default)
./ds-rk35xx-evb.sh -b my_board
# Creates config: BOARD_NAME=my_board, BRANCH=custom
./ds-rk35xx-evb.sh -b my_board -r custom- Without -b option: Uses default settings (no config created)
# Uses default branch "macro", no board configuration
./ds-rk35xx-evb.sh
# Uses custom branch, no board configuration
./ds-rk35xx-evb.sh -r custom-branch2. board.cfg exists:
- All specified parameters must match existing values in the config
- Unspecified parameters are taken from the config
- To change any value: Remove board.cfg manually and start fresh
- Partial configs allowed: Can contain only BOARD_NAME, only BRANCH, or both
Examples with existing config (BOARD_NAME=my_board, BRANCH=master):
# All match - OK
./ds-rk35xx-evb.sh -b my_board -r master
# Board matches, branch from config - OK
./ds-rk35xx-evb.sh -b my_board
# Branch matches, board from config - OK
./ds-rk35xx-evb.sh -r master
# Mismatch - ERROR
./ds-rk35xx-evb.sh -b different_board # Error: board name mismatch
./ds-rk35xx-evb.sh -r different_branch # Error: branch mismatchAvailable options:
- -h, --help - Show help message
- -b, --board NAME - Set board\
- -r, --branch NAME - Set buildroot branch (default: "macro")
- -o, --offline - Run in offline mode (skip network operations)
Starting fresh (no existing config):
# Create config with board name and default branch
./ds-rk35xx-evb.sh -b ds-rk3568-evb
# Create config with board name and specific branch
./ds-rk35xx-evb.sh -b ds-rk3588-btb-evb -r master
# Build without saving config (uses default branch)
./ds-rk35xx-evb.shUsing existing configuration:
# Check what's in your config
cat output/ds-rk35xx-evb/board.cfg
# Build with existing config (specify matching parameters)
./ds-rk35xx-evb.sh -b [board_from_config] -r [branch_from_config]Changing configuration:
# Remove existing config
rm output/ds-rk35xx-evb/board.cfg
# Create new config
./ds-rk35xx-evb.sh -b new-board -r new-branchWhen you have no internet access or want to avoid repeated downloads, you can use the --offline (or -o) flag.
What happens in offline mode:
- The script does not clone or update the
buildrootrepository. - It does not run
git fetchorgit pullfor the main repository. - It validates that the local
buildrootdirectory exists and is a Git repository. - It checks that the requested branch is available locally (and switches to it if needed).
- If
buildrootis missing or the branch does not exist locally, the script fails immediately.
Important prerequisites for offline mode:
- Manual clone of
buildroot– you must have the repository already checked out in the script’s directory (e.g.,./buildroot/). - Pre‑filled source cache – Buildroot downloads external sources into
output/download/during the build. For a truly offline build, you need to have all required source archives already present inoutput/download/. (You can prepare this cache by running a normal online build once, or by manually placing the archives.)
Example:
# Prepare the environment (online, once)
git clone https://github.com/MacroGroup/buildroot.git -b macro
# (Optional) run a full build to populate output/download/ cache
# Later, offline build:
./ds-rk35xx-evb.sh -b ds-rk3568-evb --offlineIf the script attempts to download anything during the offline build, it will fail – make sure your output/download/ cache is complete.
- Ensure you have at least 50 GB of free disk space for the build.
- Build times vary significantly (30 minutes to several hours) depending on hardware specifications
- All output images are ready for direct writing to SD cards using tools like:
dd(command-line)- BalenaEtcher (graphical interface)
- Offline builds require manual preparation of the
buildrootrepository and theoutput/download/source cache – the script itself does not download anything when--offlineis used.