1

I have a partition on an eMMC in an embedded linux device that I would like to expose as storage through the g_mass_storage USB gadget. Everything is being build via yocto/bitbake and mostly works; where I am stumbling is in the configuration of the wic (kickstart) description of this so as to make it formatted as a FAT32 drive in a way that windows can understand.

My WIC configuration (.wks file) appears to put a FAT32 partition starting at 0 whereas if I initialise and format a bare partition using windows the FAT appears at 0x10000 (sector 128 with 512byte sectors) with what looks to be an MBR starting at 0.

Now I can work around this by treating the thing as a black box and using dd, however I would greatly prefer if this could be described in the wic descriptor for my image.

my current wks contains

part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4 --fixed-size 16
part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 4 --fixed-size 512
part  --ondisk mmcblk0 --fixed-size 3072 --fstype=vfat --label data --align 4 --use-uuid 

any suggestions would be really appreciated

Thanks

-sdude

sdude
  • 11
  • 1
  • I think wic defaults to a GPT partition table. You can force an MBR-style partition table with ``` bootloader --ptable msdos ``` – benf May 12 '22 at 00:09
  • thanks - I've gone for an approach where the resulting OS formats the partition if it decides it is necessary No harm in trying to force an MBR from the wic at the same time – sdude May 19 '22 at 04:23

0 Answers0