On Thu, 2020-09-17 at 20:09 -0700, Chuck Wolber wrote:
Hi all,
I have a need to unpack an ISO image during do_unpack. This does not appear to be one of the extensions that is handled by default, so I am working out a way to use xorriso to do this for me.
I can get this to work in the following way, but it involves calling an executable running on the build host, which only works by luck since the host executable is the same architecture as what I am currently building. I would like to do this in a portable way that does not break when I try to build for a different architecture.
I have a need to unpack an ISO image during do_unpack. This does not appear to be one of the extensions that is handled by default, so I am working out a way to use xorriso to do this for me.
I can get this to work in the following way, but it involves calling an executable running on the build host, which only works by luck since the host executable is the same architecture as what I am currently building. I would like to do this in a portable way that does not break when I try to build for a different architecture.
DEPENDS += "xorriso"
do_unpack_append() {
bb.build.exec_func('unpack_iso', d)
}
unpack_iso() {
/usr/bin/xorriso -osirrox on -indev ${WORKDIR}/${PN}_${PV}.iso -extract / ${S}
}
From looking at base.bbclass, it _seems_ as if my solution involves something like this: