Re: How to install files to custom partition?


Alexander Kanavin
 

I think it goes like this.

In your recipe you need to install files into the root directory of
the partition itself and not its mount point, e.g. strip the
mnt/custom prefix.

Then you need to create an image recipe that will install one or more
of the packages that contain the files that should be on the
partition.

Then you can compose a complete 'bundle' containing all the needed
partitions (created from image recipes) that can be written to a disk
of the target device, using wic for example like described here:
https://git.yoctoproject.org/poky/tree/scripts/lib/wic/canned-wks/directdisk-multi-rootfs.wks?h=master-next

There's a manual for wic too:
https://docs.yoctoproject.org/dev/dev-manual/wic.html

Alex

On Wed, 8 Mar 2023 at 08:09, Sourabh Hegde <hrsourabh011@...> wrote:

Hello,

I have some files which I need to install them to a custom partition (to /mnt/custom). But, I couldn't find any installation variables to install files to /mnt/ (partiton other than rootfs).
I want to do something like below:

do_install() {
install -d ${D}$<mnt>/custom
install -m 0755 ${S}/sample.sh ${D}$<mnt>/custom/sample.sh
}

But I think this is not supported or not easily possible.

Can anyone please let me know how to install files to partition other than / ?

Thanks in advance


Join yocto@lists.yoctoproject.org to automatically receive all group messages.