Bug 6513

Summary: wic needs to support creating FAT partitions
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Phlip Balister <philip>
Component: deploymentAssignee: Tom Zanussi <tom.zanussi>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: tom.zanussi
Version: unspecified   
Target Milestone: 1.7   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Phlip Balister 2014-07-08 21:15:48 UTC
part /boot --source rootfs --size 1000 --ondisk mmcblkp0 --fstype=vfat --label FAT --active --align 1024

this line in a wks file creates a partition, however a vfat filesystem is not created on the sd card. Many ARM based systems that boot from SD card need a vfat partition to hold u-boot and related files.
Comment 1 Tom Zanussi 2014-07-08 22:10:12 UTC
Details and initial plan from IRC:

<Crofton|work> tomz, shoudl I get one FAT partion with this wks?<Crofton|work> http://pastebin.com/67yMU0TY
<tomz> Crofton: it would if there were vfat support for rootfs - currently the only filesystem types supported for rootfs are ext2/3/4 and btrfs. we'd need to add vfat support
* nitink1 has quit (Quit: Leaving.)
* radzy has quit (Ping timeout: 240 seconds)
<Crofton|work> how do we add vfat?
<Crofton|work> tomz, for arm we need to make vfat partitions on sd cards for most
<Crofton|work> boot
<Crofton|work> boot loaders
<tomz> Crofton: likewise for x86 - if you look a the bootimg-pcbios and bootimg-efi plugins, they create fat partitions using mkdosfs and mcopy
<tomz> Crofton: sounds like that needs to be upleveled to some common code
<Crofton|work> tomz, any hints on how to do this?
<Crofton|work> we need to make progress getting wic usable
<tomz> Crofton: I think what needs to be done is to take the dosfs code from the pcbios/efi plugins that I mentioned and use it to implement a new case in /scripts/lib/mic/kickstart/custom_commands/partition.py:prepare_rootfs().  Then of course have those two other plugins reuse the new code.
Comment 2 Tom Zanussi 2014-07-15 15:44:39 UTC
Patchset for this among other things sent to oe-core.
Comment 3 Tom Zanussi 2014-10-30 16:59:10 UTC
In master:

commit 83e5c09d2fa9209e11b312126571a6653c330eea
Author: Tom Zanussi <tom.zanussi@linux.intel.com>
Date:   Thu Jul 10 14:29:27 2014 -0500

    wic: Add vfat support
    
    Add vfat as a supported rootfs type (in addition to the current
    ext2/3/4 and btrfs support).
    
    vfat partitions can now be created using --source rootfs along with
    --fstype=vfat, or without --source but specifying a --size.
    
    (From OE-Core rev: d9efc110fd73822629b2a3326761f2256b9f23b0)