I now have a "stockpile" of complete images that have since been deployed to real platforms, and I can easily "spin up" one of these images, and update it as described above more efficiently that doing the update on a disadvantaged platform ... but I'd like advice on one challenge I have run into --
Background: the qemu chroot paradigm involves placing a build-host binary (e.g. qemu-system-arm) inside the TARGET's root file system. Example for a raspberry pi b system image on an x86_64 development workstation:
Code: Select all
$ file /usr/armv6j-unknown-linux-gnueabihf/usr/bin/qemu-system-arm
/usr/armv6j-unknown-linux-gnueabihf/usr/bin/qemu-system-arm: \
ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), \
dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for \
GNU/Linux 3.2.0, strippedChallenge: (1) the emerge --depclean will remove the app-emulation/qemu package [it is only needed in the target to enable the qemu-chroot]. I could prevent its removal by adding it to the TARGET's world set with emerge --noreplace, but then (2) a subsequent emerge world update will try to rebuild it as a TARGET_ARCH (arm) binary instead of the x86_64 binary that is needed to enable the qemu-chroot, and it would also "pull in" all of that package's dependencies...
Is there a way to protect this "foreign-arch" package (as just such) in the TARGET root_fs w/o confusing the TARGET system as to its purpose? (i.e. can I prevent it from being removed by this kind of update process?
How have you or others dealt with this in embedded/SBC projects?

