intelligent-agent / Refactor

Linux distro for 3D-printers
https://wiki.iagent.no/wiki/Refactor
GNU Affero General Public License v3.0
28 stars 18 forks source link

Use the eMMC device partitions for u-boot and config files #228

Closed eliasbakken closed 2 years ago

eliasbakken commented 3 years ago

It is possible to install u-boot in a separate boot partition on the eMMC. There are two device partitions each with 4MB each and they are by default a read only, but can be written to by a special operation from Linux. I suggest using mmcblk0boot0 for u-boot and mmcblk0boot1 for storing config/testing files and a UUID for the board.

eliasbakken commented 2 years ago

It might be possible to set the boot partition from Linux so that the ROM bootloader uses one of the boot partitions instead of the user partition. See here for more info: https://forum.radxa.com/t/flashing-bootloader-to-dev-mmcblk0boot0/1718

This might not be something we want to do at this point, since it requires more research, but a lower hanging fruit is to add the testing file created during the testing of the board to one of the partitions. This can be done without creating a file system, by using dd, or optionally a filesystem can be added to the partition.

eliasbakken commented 2 years ago

The calibration file is added to the boot0 partition during the testing and calibration of each board. A system for using that data in a config file can be made at a later stage.