Linux

Where Does U-Boot Keep Config and Scripts?

Where U-Boot keeps its environment config and full boot script set across target rootfs and FAT views.

Last updated

U-Boot keeps its environment access config on the target root filesystem. That file tells userland tools which flash offsets hold the variables. Boot scripts and text environments live separately on the FAT partition the loader scans.

Board layouts differ on every detail from offsets to FAT paths. Mounted Linux views remap the same files under boot prefixes. Fix the config file first whenever userland tools disagree with the loader. Boot targets share the script files, so keep FAT copies versioned together.

Where U-Boot stores this, by platform

Linux
/etc/fw_env.config

Target rootfs file mapping flash offsets for userland tools. Boot scripts live separately on the FAT partition. Board docs carry exact numbers.

Frequently asked questions

fw_printenv reports a bad config. How do I fix it?

Open the environment config on the target rootfs and fix the device plus offset lines to match the board. The print command fails when those lines point at the wrong flash. Board docs carry the exact numbers per revision.

Where do I put boot.scr so U-Boot actually runs it?

Place the script at the FAT root or under boot per the board boot command, since layouts differ by vendor. The loader scans devices and partitions in its own order. Check the boot command listing to learn which spot your board reads first.

Notice an outdated path? Let us know.