mkrawimg

Module device

source
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:

  1. Gather basic device information, such as its model name, vendor, and a unique ID.
  2. Determine the necessary Board Support Package (BSP) packages to be installed.
  3. Determine the device’s partition layout (partition table type, number of partitions, sizes, starting positions, filesystems, etc.). See Partition Specification for details.
  4. Determine how to apply or flash bootloaders to the target image. This is often common across devices using U-Boot. See Bootloaders for details.
  5. 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

  1. 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.

  2. after all errors are fixed, run a test build:

    ./target/release/mkrawimg build -V base -- your-device-ID
  3. Flash the image to your device to confirm that the image is bootable.

  4. Submit a Pull Request to add the device to this project.

Structs§

Enums§

Constants§