Date: Mon, 12 Feb 2018 22:51:35 -0300 From: Otacilio <otacilio.neto@bsd.com.br> To: freebsd-emulation@freebsd.org Subject: Executing beaglebone's programs by qemu-user-static Message-ID: <5071c535-c0de-5f00-7e76-1f1f18d2fb8d@bsd.com.br>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5071c535-c0de-5f00-7e76-1f1f18d2fb8d>