Executing beaglebone's programs by qemu-user-static

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Executing beaglebone's programs by qemu-user-static

Otacílio de Araújo Ramos Neto-3
Hi

I would like to ask for some help. I own a  beaglebone black and an
amd64 machine. Both running FreeBSD 11.1. I want to write programs to
the beaglebone by running codeblocks on the AMD64 machine and also to
execute the beaglebone's C compiler. Firstly, I exported the beaglebone
black / file system using NFS and mounted it on the AMD64 machine in the
/usr/bbb folder. Then I installed qemu-user-static and added the entry
in /etc/rc.conf to execute the beaglebone's ARM programs through qemu.
For example, when I run /usr/bbb/usr/bin/cc the beaglebone's C compiler
is executed on the amd64 machine through qemu. But, as far as I
understand the C compiler of the beaglebone searches for the library
files from the /usr/lib and /usr/local/lib folders and not
/usr/bbb/usr/lib and /usr/bbb/usr/local/lib folders, where the port
libraries that are installed on the beaglebone are in fact. I thought of
modifying the qemu code to add a chroot call after qemu-arm-static loads
the beaglebone's application, but the qemu would need to execute as root
for this to happen. Is there any way to turn the qemu process restricted
to the /usr/bbb folder after loading the beaglebone application without
the qemu running as a root? So far I'm thinking that perhaps I'll need
to add something like a dir base on qemu to do that, so any systems that
call or access a file or directory always start from that base folder
(/usr/bbb).

Faithfully,
-Otacílio
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-emulation
To unsubscribe, send any mail to "[hidden email]"