Customizing U-Boot¶
Introduction¶
This guide demonstrates how to patch and rebuild Debian U-Boot images.
To learn how to build the U-Boot images outside of Debian, see: Build U-Boot from source code
Prerequirements¶
Make sure you set up the Flexbuild Docker environment properly. Follow the instructions from step 5 of the Build Debian from source code page.
Add your patches on top of the Variscite source code¶
The following steps can be executed outside or inside the container.
Fetch the U-Boot source:
$ git clone https://github.com/varigit/uboot-imx -b lf_v2025.04_6.12.49-2.2.0_var01
$ cd uboot-imx
$ git clean -fdx
Next, make the desired changes to the U-Boot source code. Example:
After changing the source code, commit the changes locally and generate a patch file:
Once the patch is created, copy it to the U-Boot patch folder, which is inside the Flexbuild directory:
Build U-Boot individually¶
Do not run any 'git am' or 'git apply' command. That will be done inside the U-Boot Makefile. Now, if you're not inside the container, get in with the following commands:
$ cd [...]/flexbuild # (Outside Docker environment)
$ . setup.env # (Outside Docker environment)
$ bld docker # (Outside Docker environment)
Once you've entered the Docker environment, run:
Rebuild U-Boot¶
Once you've built U-Boot, a clean step is needed if a rebuild is required:
Then, just build U-Boot normally with:
Supported hardware variants¶
The DART-MX95 is available with different RAM size configurations. Currently, a separate image must be compiled for each RAM size.
This can be configured via the OEI_DDR_CONFIG value in the board configuration file:
flexbuild/configs/board/imx95-var-dart.conf
Depending on the RAM size, set OEI_DDR_CONFIG to the corresponding value:
- DART-MX95 2GB:
lpddr5_2gb_6400mbps_train_timing - DART-MX95 4GB:
lpddr5_4gb_6400mbps_train_timing - DART-MX95 8GB:
lpddr5_8gb_6400mbps_train_timing - DART-MX95 16GB:
lpddr5_16gb_6400mbps_train_timing
The default configuration is lpddr5_8gb_6400mbps_train_timing.