Manufacture du Son
On this page

U-Boot Development

Iterate on the bootloader, the DTS and the environment

Edit on GitHub

U-Boot Development

The bootloader uses U-Boot 2026.04 with a custom defconfig and devicetree. All the moving parts live under mds_external/board/mds_network_player/.

Rebuild

make build-uboot-rebuild

Produced artifacts (build/output/<machine>/images/):

  • u-boot-sunxi-with-spl.bin — SPL + U-Boot, raw image
  • spi-nand.bin — same, post-processed by mknandboot.sh for SPI NAND boot

Edit the configuration

make build-uboot-menuconfig
make build-uboot-savedefconfig
cp build/output/network_player/build/uboot-*/defconfig \
   mds_external/board/mds_network_player/u-boot_defconfig

Devicetree and patches

  • u-boot_devicetree.dts — board DTS injected into U-Boot at configure time.
  • uboot-patches/ — patches applied on top of upstream U-Boot, in lexicographic order.

After editing either, force a clean rebuild:

make build-uboot-dirclean
make build-uboot

U-Boot environment

uboot.env (regular) and uboot.bootstrap.env (bootstrap image) describe the script U-Boot evaluates at boot.

Common things you may want to add there:

  • Probe /run.ota from the fota partition to trigger a recovery path.
  • Adjust the kernel command line (ubi.mtd=, console=, rootfstype=).
  • Pick uImage from fota vs rootfs.

Heads up: today the environment is loaded from "nowhere" (boot log: Loading Environment from nowhere... OK). Persisting the env back to a dedicated MTD region is on the TODO list — until then the script must be baked at build time.

SPI NAND boot machinery

Two scripts handle the SPL/U-Boot relocation needed for SPI NAND boot on the f1c200s:

  • mknandboot.sh — splits and re-packs u-boot-with-spl.bin so the BootROM can load the SPL and the SPL can find U-Boot at the right offset.
  • f1c100_uboot_spinand.sh — older companion script kept for reference.

Background and references:

FIT image

A FIT image (image.its) is used because plain legacy bootm was failing with Wrong Image Type for bootm command. The FIT bundles the kernel, the DTB and (for the FOTA flow) the initramfs.