Reputation: 415
Fairly new to yocto, I am using meta-swupdate
to generate a cpio update file. This layer will scan for artifacts within tmp/deploy/images
to build the cpio.
I want my compiled executable to be contained as a file inside the cpio. Thus I need to copy the executable to tmp/deploy/images.
After some googling, I found that I can make a copy using the deploy
class inside my executable recipe, use addtask
and define a do_deploy()
function, and I do end up with a copy of the executable! However, the executable is many times larger than it ought to be; it's definitely not the same file that ends up in rootfs.tar.gz
How can I tell yocto to copy the stripped version of my executable to tmp/deploy/images?
Upvotes: 0
Views: 41
Reputation: 415
In the end I found a workaround - though I consider it a hack.
I had a look at image_types.bbclass
, and was able to create a new bbclass for a new filesystem.
Basically it is just mimicking the behavior of the ext4
class, except that rather than an .ext4
file, it just copies over the contents that I need into a directory.
Then I added the new filesystem to local.conf
by appending to IMAGE_CLASSES
and IMAGE_FSTYPES
, and finally made my swupdate recipe depending on that new filesystem being populated by appending to IMAGE_DEPENDS
.
I ended up with a new filesystem in tmp/deploy/images
that was just a directory containing the files I needed.
Upvotes: 0