[meta-freescale] Improving SD-Card images

Jens Rehsack rehsack at gmail.com
Tue Jul 22 00:09:48 PDT 2014


Am 22.07.2014 um 08:37 schrieb Maciek Borzecki <maciej.borzecki at open-rnd.pl>:

> On wto, 2014-07-22 at 07:16 +0200, Jens Rehsack wrote:
>> Am 21.07.2014 um 16:50 schrieb Otavio Salvador <otavio at ossystems.com.br>:
>> 
>>> Hello,
>>> 
>>> On Sun, Jul 20, 2014 at 8:13 AM, maciej.borzecki at open-rnd.pl
>>> <maciej.borzecki at open-rnd.pl> wrote:
>>>>> Dnia 19 lipiec 2014 o 16:50 Jens Rehsack <rehsack at gmail.com> napisał(a):
>>>>> the options of meta-fsl-arm/classes/image_types_fsl.bbclass to generate
>>>>> sdcards are somehow limited :)
>>>>> 
>>>>> For the final release we'd like to have following partitions:
>>>>> 1) boot (ext2, fat?)
>>>>> 2) prod-root (squashfs)
>>>>> 3) recovery-root (squashfs)
>>>>> 4) volatile (ext[34]?)
>>>>> 5) changes (unionfs over 2)
>>>>> 
>>>>> Looks as if image_types_fsl.bbclass would need rework to support >2
>>>>> partition, but that's just coding.
>>>> 
>>>> Have you considered wic? I've posted a patch that adds building of SD card
>>>> image for BBB:
>>>> http://article.gmane.org/gmane.linux.embedded.yocto.meta-ti/4171 also
>>>> meta-ti have already dumped their
>>>> sdimg bbclass in favor of wic. Not saying that meta-fsl should do the same,
>>>> just pointing out that there may
>>>> be some room for unification.
>>> ...
>>> 
>>> This is the long-term goal for sure.
>>> 
>>> I have worked with Tom in extending 'wic' to have the plugin system
>>> you used to enable BBB to generate the image. I also want to try to
>>> leverage the U-Boot support backend so we can avoid a lot of
>>> custom-made recipes and duplication.
>>> 
>>> I wasn't aware of your patch (thanks), I will look at it next week ...
>> 
>> But beside of unifying image creation - which is of course a great step
>> for both, anyone who can give me a hint where to look for 2 independent
>> filesystems being created in one target (foo-image)?.
> 
> This should help:
> http://article.gmane.org/gmane.linux.embedded.yocto.meta-ti/4185
> 
> You'll also need these patches:
> http://article.gmane.org/gmane.comp.handhelds.openembedded.core/53449
> http://article.gmane.org/gmane.comp.handhelds.openembedded.core/53422

That's regarding how to put more partitions/filesystems in one image, not
how to built a recovery-rootfs, isn't it?

> Then, the kickstart file is as follows:
> # vfat boot partition
> part --source beaglebonebootimg --ondisk mmcblk0p --fstype=vfat --label boot --active --align 1024 --size 10
> # root filesystem
> part / --source rootfs --ondisk mmcblk0p --fstype=ext3 --label root --align 1024
> # data partition
> part /media/data --ondisk mmcblk0p --fstype=vfat --label data --align 1024 --size 100 --fsoptions sync
> 
> 3 partitions are defined in the file:
> - vfat, built by beaglebonebootimg source plugin (see first patch for
>  reference on what the plugin does)
> - 2nd partition (ext3), built by rootfs plugin (contents of
>  IMAGE_ROOTFS)
> - 3rd partition (vfat, 100MB, mounted with sync), empty partition,
>  automatically added to fstab
> 
> Hope this clears things up a bit.

Not really - I'd like to know how to get 
# vfat boot partition
part --source uboot-imx-img --ondisk mmcblk0 --fstype=vfat --active --align 1024 --size 10
# root-fs
part / --source rootfs --ondisk mmcblk0 --fstype=squashfs --label root --align 1024
# recovery-root-fs
part /recovery --source recoverfs --ondisk mmcblk0 --fstype=squashfs --label root --align 1024
# data/tmp partition
part /var/tmp --ondisk mmcblk0p --fstype=ext3 --label data --align 1024 --size 1024 --fsoptions sync
# union-fs for root-fs changes - howto will come later
part / --ondisk mmcblk0p --fstype=unionfs --label change --align 1024 --size 1536 --fsoptions sync

And the crucial question is: where does the recoverfs filesystem image comes from, when rootfs is generated magically by image.bbclass?

Cheers
-- 
Jens Rehsack
rehsack at gmail.com







More information about the meta-freescale mailing list