* Scarthgap recipe to save and package to secondary partition
@ 2024-12-12 13:14 pierre.daye
2024-12-12 13:19 ` [yocto] " Gyorgy Sarvari
0 siblings, 1 reply; 5+ messages in thread
From: pierre.daye @ 2024-12-12 13:14 UTC (permalink / raw)
To: yocto
[-- Attachment #1: Type: text/plain, Size: 1964 bytes --]
Hello,
I am updating our system from Honnister to Scarthgap.
I do have a wks file that prepare the system with multiple partitions (a boot, two rootfs, one persistent media and one swap).
>
> part /boot --source bootimg-partition --ondisk mmcblk1 --fstype=vfat
> --label boot_A --active --align 4096 --size 20 --fsoptions "vfat
> rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro"
>
> part / --source rootfs --ondisk mmcblk1 --fstype=ext4 --label root_A
> --align 4096 --exclude-path=media/
> part --source rootfs --ondisk mmcblk1 --fstype=ext4 --label root_B --align
> 4096
> part /media --rootfs-dir=${IMAGE_ROOTFS}/media --size=128M --ondisk
> mmcblk1 --fstype=ext4 --label data --align 4096
> part swap --ondisk mmcblk1 --size 44 --label swap --fstype=swap
> --size=2048M --overhead-factor 1
>
I am trying to store configuration files onto the persistent media partition in one of my recipes. I am showing here the relevant part:
>
> do_install:append() {
> mkdir -p ${D}/media/data/calibrations
> install -m 0644 ${S}/../system_config.json
> ${D}/media/data/system_config.json
> install -m 0644 ${S}/../system_config_temperature.json
> ${D}/media/data/system_config_temperature.json
> install -m 0644 ${S}/../calib_0000_00_00_00_00_00.raw
> ${D}/media/data/calibrations/calib_0000_00_00_00_00_00.raw
> }
> FILES:${PN} += "/usr/share/p3_paradigms/*"
> FILES:${PN} += "/media/data/* "
> FILES:${PN} += "/media/data/calibrations/* "
>
The recipe was working great under honnister and my wic file contained the media partition and all the files I copied into it with the recipe. However, when I use the same approach with Scarthgap, I have QA error for empty-dirs
>
> do_package_qa: QA Issue: embedded-services installs files in /media, but
> it is expected to be empty [empty-dirs]
>
Any idea on how I can solve this? What am I doing wrongly?
Thanks!
[-- Attachment #2: Type: text/html, Size: 2405 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [yocto] Scarthgap recipe to save and package to secondary partition
2024-12-12 13:14 Scarthgap recipe to save and package to secondary partition pierre.daye
@ 2024-12-12 13:19 ` Gyorgy Sarvari
2024-12-12 13:36 ` Gyorgy Sarvari
2024-12-12 13:37 ` pierre.daye
0 siblings, 2 replies; 5+ messages in thread
From: Gyorgy Sarvari @ 2024-12-12 13:19 UTC (permalink / raw)
To: yocto, pierre.daye
> Any idea on how I can solve this? What am I doing wrongly?
> Thanks!
>
You could try to remove /media from QA_EMPTY_DIRS in distro.conf or
similar place:
QA_EMPTY_DIRS:remove = "/media"
See also:
https://docs.yoctoproject.org/ref-manual/variables.html#term-QA_EMPTY_DIRS
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [yocto] Scarthgap recipe to save and package to secondary partition
2024-12-12 13:19 ` [yocto] " Gyorgy Sarvari
@ 2024-12-12 13:36 ` Gyorgy Sarvari
2024-12-12 13:37 ` pierre.daye
1 sibling, 0 replies; 5+ messages in thread
From: Gyorgy Sarvari @ 2024-12-12 13:36 UTC (permalink / raw)
To: yocto, pierre.daye
On 12.12.24 14:19, Gyorgy Sarvari wrote:
>> Any idea on how I can solve this? What am I doing wrongly?
>> Thanks!
>>
>
> You could try to remove /media from QA_EMPTY_DIRS in distro.conf or
> similar place:
>
> QA_EMPTY_DIRS:remove = "/media"
>
> See also:
> https://docs.yoctoproject.org/ref-manual/variables.html#term-QA_EMPTY_DIRS
>
Small self-correction (and regrettable noise): looking at it a bit more,
it isn't necessary to make it a global config, it should be enough to
add it to the package recipe itself. (But the main idea remains the same)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [yocto] Scarthgap recipe to save and package to secondary partition
2024-12-12 13:19 ` [yocto] " Gyorgy Sarvari
2024-12-12 13:36 ` Gyorgy Sarvari
@ 2024-12-12 13:37 ` pierre.daye
2024-12-12 14:36 ` pierre.daye
1 sibling, 1 reply; 5+ messages in thread
From: pierre.daye @ 2024-12-12 13:37 UTC (permalink / raw)
To: Gyorgy Sarvari, yocto
[-- Attachment #1: Type: text/plain, Size: 184 bytes --]
Hello
Thanks for the update, I do not have the error anymore! That is a great step forward but the files are not populated on the /media partition...
any supplemental thoughts?
[-- Attachment #2: Type: text/html, Size: 217 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [yocto] Scarthgap recipe to save and package to secondary partition
2024-12-12 13:37 ` pierre.daye
@ 2024-12-12 14:36 ` pierre.daye
0 siblings, 0 replies; 5+ messages in thread
From: pierre.daye @ 2024-12-12 14:36 UTC (permalink / raw)
To: pierre.daye, yocto
[-- Attachment #1: Type: text/plain, Size: 1218 bytes --]
... I finally figured it out!
This is how the wks file should be defined:
>
> part /boot --source bootimg-partition --ondisk mmcblk1 --fstype=vfat
> --label boot_A --active --align 4096 --size 20 --fsoptions "vfat
> rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro"
>
> part / --source rootfs --ondisk mmcblk1 --fstype=ext4 --label root_A
> --align 4096 --exclude-path=media/
> part --source rootfs --ondisk mmcblk1 --fstype=ext4 --label root_B --align
> 4096 --exclude-path=media/
> part /media --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/media --size=128M
> --ondisk mmcblk1 --fstype=ext4 --label data --align 4096
> part swap --ondisk mmcblk1 --size 44 --label swap --fstype=swap
> --size=2048M --overhead-factor 1
>
>
Notice the fact that:
* The mounted point should be excluded from both the root_A and root_B
* The media partition should be sourced on rootfs
* The media partition needs the --rootfs-dir=${IMAGE_ROOTFS}/media options (otherwise the whole rootfs is copied onto /media
Using this in the original method in the recipe above makes it works as expected (if you add the QA_EMPTY_DIRS:remove = "/media"
Thanks
[-- Attachment #2: Type: text/html, Size: 3521 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-12-12 14:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-12 13:14 Scarthgap recipe to save and package to secondary partition pierre.daye
2024-12-12 13:19 ` [yocto] " Gyorgy Sarvari
2024-12-12 13:36 ` Gyorgy Sarvari
2024-12-12 13:37 ` pierre.daye
2024-12-12 14:36 ` pierre.daye
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.