Search code examples
linuxyoctobitbake

Creating ext3 image from yocto class


I am working on a bitbake class which creates an SDcard image. It is based on an existing class, which creates FAT partition images using mcopy.I want to change the partitions to ext3 partitions. mcopy only works with FAT, so this needs to be changed. Within Linux loopback can be used on a filesystem image, but this requires root permissions, which makes it more or less unusable from a bitbake script.

Any suggestions to solve this ?


Solution

  • Thanks for the answers. IMAGE_FSTYPES I am aware of. For several embedded platforms there is a class which handles the sdcard population, this bbclass is selected via IMAGE_FSTYPES.

    I looked at WIC which I was not aware of. It looks promising. In this stage I do not have the time to check if it is capable to fullfill all my requirements and since I already had a working bbclass where I only wanted to change from FAT to ext3.

    The advantage of a custom class is that you basically can do anything you want. Create an SD card with main and redundant kernel and root partition. Bootloader and preloader at specific locations. dedicated partitions for system recovery and persistent data.

    Well to answer my own question: e2tools It allows to create directories on and copy files to ext2/ex3 file images. It is an easy replacement for mtools which works on FAT partitions.