[lug] Strange Ideas for Cross-Platform/Cross-Distribution Development

Lee Woodworth blug-mail at duboulder.com
Tue Jun 12 22:51:57 MDT 2018


If I understand correctly you want to use an x86-based package manager to
use arm64 repositories to install arm64 binary packages in a sysroot. I
just wonder about whether any package prerequisite checking or install phases
would try to run target code. An emulator could be more reliable in that case.

Re existing tools, I think what gentoo calls cross-emerge (aka package install)
is like what you want to do. This is for a full cross-compiled source install
though. And it doesn't work with all packages since some do run target code
during the install. AFICT trying make it work for those cases gets complex, it
involves binfmt handlers to run the target tools in an emulator while
chrooted into the target sysroot.


On 06/12/2018 01:09 PM, stimits at comcast.net wrote:
> Hi,
>   
> This is more or less just for fun, but could end up being quite valuable. I am looking at an image of an Ubuntu file system in a subdirectory of a Fedora 27 installation. Not only is this root file system Ubuntu instead of Fedora, it is also 64-bit ARM (and the Fedora holding it is x86_64). I have a number of cross-compile tools, and typically this Ubuntu file system gets edited and then flashed to an embedded system.
>   
> The strangeness comes because I was thinking how cool it would be to chroot to that alternate root file system and to use "apt" and family (e.g., "apt-get") within that alternate root file system independently of what is on my Fedora host. Fedora actually has some cross-ubuntu apt tools, but they are designed to be some sort of bridge between RPM format and DEB format packages. I don't want to do that...I want this chroot to be purely within the alternate directory.
>   
> If I just chroot (or "systemd-nspawn") nothing will work at all because everything there is arm64. However, I suppose it might be possible to place the x86_64 versions of apt and apt-get and dpkg within that directory tree and use those while pretending arm64 is a foreign architecture. Has anyone here heard of any kind of HOWTO for this? Or perhaps suggestions on which Ubuntu packages I might have to copy from an Ubuntu x86_64 system to make this work chroot?
>   
> Thanks!
> 
> 
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
> 



More information about the LUG mailing list