Expand description
Module handling various procedures for a specific device, and the device specification itself.
§Adding support for new device
Adding a new device involves the following steps:
- Gather basic device information, such as its model name, vendor, and a unique ID.
- Determine the necessary Board Support Package (BSP) packages to be installed.
- Determine the device’s partition layout (partition table type, number of partitions, sizes, starting positions, filesystems, etc.). See Partition Specification for details.
- Determine how to apply or flash bootloaders to the target image. This is often common across devices using U-Boot. See Bootloaders for details.
- Identify any additional image preparation steps. These can be implemented in a post-installation script.
Once you have this information, create a device-level directory in the registry and write the device specification file.
§Testing
-
run the built-in validity checks:
./target/release/mkrawimg check
If there are errors in your device specification file, correct them based on the program’s output. Repeat this step until no errors are reported.
-
after all errors are fixed, run a test build:
./target/release/mkrawimg build -V base -- your-device-ID
-
Flash the image to your device to confirm that the image is bootable.
-
Submit a Pull Request to add the device to this project.
Structs§
- Device Specification