Date: Fri, 16 Feb 2018 14:15:52 +0000 From: tech-lists <tech-lists@zyxst.net> To: =?UTF-8?Q?Mika=c3=abl_Urankar?= <mikael.urankar@gmail.com> Cc: freebsd-virtualization@freebsd.org, freebsd-stable@freebsd.org Subject: Re: is it possible to chroot into arm64 from amd64? Message-ID: <ec14ca9d-5a17-34f8-5f4d-0ef69ab308b1@zyxst.net> In-Reply-To: <CAJwjRmQVKEU5P98wJs2f4eQdp-OOE%2B3UpKb7VMXk=ja0TC=%2B%2Bw@mail.gmail.com> References: <30cfa8a3-76e4-73ac-3b2a-2d64ed24aef8@zyxst.net> <CAJwjRmQVKEU5P98wJs2f4eQdp-OOE%2B3UpKb7VMXk=ja0TC=%2B%2Bw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 16/02/2018 08:21, Mikaël Urankar wrote: > Put /usr/local/bin/qemu-aarch64-static in > $SYSROOT/usr/local/bin/qemu-aarch64-static > you can use "service qemu_user_static start" to add the interpreter That did it! :D many thanks. I had a bit of a problem with ldconfig but it seems ok so far. Here's what I did from start to finish in case anyone else is interested: ### root@sm1:/# chflags -Rf noschg crossbuild/ root@sm1:/# rm -Rf crossbuild/* root@sm1:/# mkdir crossbuild/arm64 root@sm1:/# sh # SYSROOT=/crossbuild/arm64 # cd /usr/src # make -j96 cleandir && make -j96 clean && make -j96 clean # make -j96 TARGET=arm64 TARGET_ARCH=aarch64 buildworld # make DESTDIR=$SYSROOT TARGET=arm64 TARGET_ARCH=aarch64 installworld # make DESTDIR=$SYSROOT TARGET=arm64 TARGET_ARCH=aarch64 distribution # cp /usr/local/bin/qemu-aarch64-static $SYSROOT/usr/local/bin/qemu-aarch64-static cp: /crossbuild/arm64/usr/local/bin/qemu-aarch64-static: No such file or directory # cp /usr/local/bin/qemu-aarch64-static $SYSROOT/usr/local/bin/ cp: directory /crossbuild/arm64/usr/local/bin does not exist # ls -lah $SYSROOT/usr/local total 8 drwxr-xr-x 2 root wheel 512B Feb 16 12:28 . drwxr-xr-x 13 root wheel 512B Feb 16 12:28 .. # mkdir $SYSROOT/usr/local/bin # cp /usr/local/bin/qemu-aarch64-static $SYSROOT/usr/local/bin/ # service qemu_user_static start Cannot 'start' qemu_user_static. Set qemu_user_static_enable to YES in /etc/rc.conf or use 'onestart' instead of 'start'. # echo "qemu_user_static_enable="YES"" >>/etc/rc.conf # service qemu_user_static start # mount -t devfs devfs ${DESTDIR}/dev # chroot -u root $SYSROOT root@sm1:/ # root@sm1:~ # file /usr/bin/file /usr/bin/file: ELF 64-bit LSB executable, ARM aarch64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 11.1 (1101509), FreeBSD-style, stripped root@sm1:~ # service start ldconfig ps: empty file: Invalid argument start does not exist in /etc/rc.d or the local startup directories (/usr/local/etc/rc.d), or is not executable root@sm1:~ # which ldconfig /sbin/ldconfig root@sm1:~ # /sbin/ldconfig root@sm1:~ # root@sm1:~ # exit # -- J.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ec14ca9d-5a17-34f8-5f4d-0ef69ab308b1>