From owner-freebsd-arm@freebsd.org Sun Oct 15 19:09:54 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B588AE48FD2; Sun, 15 Oct 2017 19:09:54 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 32B1283404; Sun, 15 Oct 2017 19:09:53 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([92.228.157.238]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MAyVY-1dw53F1iZ2-009xOG; Sun, 15 Oct 2017 21:09:45 +0200 Date: Sun, 15 Oct 2017 21:09:35 +0200 From: "O. Hartmann" Cc: freebsd-arm@FreeBSD.org, FreeBSD Questions Subject: Re: NanoBSD: Current/NANO_ARCH=aarch64: chroot: : No such file or directory Message-ID: <20171015210935.5a50a85a@thor.intern.walstatt.dynvpn.de> In-Reply-To: <20171012153922.6e747356@hermann> References: <20171011204722.3622d73c@thor.intern.walstatt.dynvpn.de> <1507762426.8386.24.camel@freebsd.org> <20171012153922.6e747356@hermann> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/VEohY/ZPeRQcvsDZPOmJLyo"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:a3mv5UZndTCntjdAgVOfgfRM4QR/tZktCtBsXP3wv4+o4jW4nqz IAaFKXNGRYc9EQNbTR597EdVnT2UsogU5Urdemz6e23fa/LFSN0u8B6N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KMzwMBSNk5p1dA6VfWlto= X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Oct 2017 19:09:54 -0000 --Sig_/VEohY/ZPeRQcvsDZPOmJLyo Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Am Thu, 12 Oct 2017 15:39:26 +0200 "Hartmann, O." schrieb: > On Wed, 11 Oct 2017 16:53:46 -0600 > Ian Lepore wrote: >=20 > > On Wed, 2017-10-11 at 20:47 +0200, O. Hartmann wrote: =20 > > > Trying to install a successfully cross compiled FreeBSD > > > (TARGET=3Darm64) as NanoBSD. NanoBSD is configure using > > > NANO_ARCH=3D"aarch64". > > >=20 > > > Port emulators/qemu-user-static is installed and loaded: > > >=20 > > > =A08=A0=A0=A0=A01 0xffffffff8243f000 1564=A0=A0=A0=A0=A0imgact_binmis= c.ko > > >=20 > > > When installing NanoBSD's world and then running mtree, the nanobsd > > > script runs into this error: > > >=20 > > > /pool/nanobsd/aarch64/NANO_aarch64/_.w/./boot/loader.conf.local > > > 283 blocks > > > + [ -n /home/user/Projects/router/nanobsd/mtree/Files.mtree -a \ > > > -f /home/user/Projects/router/nanobsd/mtree/Files.mtree > > > ] > > > + CR 'mtree -eiU -p /' > > > + chroot /pool/nanobsd/aarch64/NANO_aarch64/_.w '' /bin/sh -exc > > > 'mtree -eiU -p /' chroot: : No such file or directory =20 >=20 > Oops, I confused the output. >=20 > The correct one is: >=20 > [ from _.cust.cust_install_files ] >=20 > ... > + chroot /pool/nanobsd/aarch64/NANO_aarch64/_.w /bin/sh -exc 'mtree > -eiU -p /' chroot: /bin/sh: No such file or directory >=20 > The empty '' is due to my (hopeless helpless) attempt to fit-in another > variable which was set to an empty string. >=20 > The error looks to me as chroot does't find the proper shell, /bin/sh, > but it has been properly installed: >=20 > # file _.w/bin/sh > _.w/bin/sh: ELF 64-bit LSB executable, ARM aarch64, version 1 > (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for > FreeBSD 12.0 (1200051), FreeBSD-style, stripped >=20 > # ll _.w/bin/sh > 839832 -r-xr-xr-x 1 root wheel uarch 261K 12 Okt. 15:32 _.w/bin/sh >=20 > NanoBSD works on the native host when building on host arch amd64 for > host arch amd64 and I guess it is due to the properly installed OS of > the host. >=20 > I do not get the problem here. qemu_user_static should catch up with > the alien binary here - I suppose it does. The absolute path should > ensure the use of the right binary ... >=20 > Regards, >=20 > Oliver >=20 > > > =20 > >=20 > > I'm not sure how or why it's happening (I've never used nanobsd), but > > the complaint is about those empty quotes ('') between the pathname > > and the /bin/sh in the chroot command. =A0It's trying to run a program > > named '' and chroot is complaining that it can't find anything named > > that. > >=20 > > -- Ian > > =20 > > > Is there anything I miss here with the QEMU emulator catching up? > > >=20 > > > Thanks in advance, > > >=20 > > > Oliver > > > =20 >=20 I didn't find a solution to this problem, it might be that someone has alre= ady have such a problem solved, so I'm sending CC'ed also to the list "questions". The background is above described. Running most recent qemu-user-static (qemu-user-static-2.9.94.g20171011), l= oaded and running a kernel module, chrooting into a cross-compiled aarch64 installati= on of recent 12-CURRENT (r324621) fails with error (from NanoBSD): [...] chroot /pool/nanobsd/aarch64/NANO_aarch64/_.w /bin/sh -exc 'mtree -eiU -p /' chroot: /bin/sh: No such file or directory There is no further output so I fly blind. As mentioned above, /bin/sh is i= nstalled and present in the chrooted target folder and file states, that it has been co= mpiled for aarch64. I tried manually the very same command - amongst other attempts to chroot a= nd execute a command - but always the same: I get the error shown above, no such file or= directory. Do I miss something here? Do I have to install some crosse development tool= s/libs into the chrooted target first, so /bin/sh can be emulated correctly? I'm quite new to cross compiling. But at this point with this thin, faintin= g amount of information why it fails, I can't even start searching ... Hopefully someone can shed some light on this. Thanks in advance, oh --=20 O. Hartmann Ich widerspreche der Nutzung oder =DCbermittlung meiner Daten f=FCr Werbezwecke oder f=FCr die Markt- oder Meinungsforschung (=A7 28 Abs. 4 BDS= G). --Sig_/VEohY/ZPeRQcvsDZPOmJLyo Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWeOybwAKCRDS528fyFhY lFHmAf98Ypw4dHXVM+7ALrH9Ecinqdxt6qNawMKwuL1hVQda5DLX7rCIVNkMhLSI lm1X78roO+KtV1Uc87Jl/Ib0GJ9GAf4jjCVjW+/WItAH68l/TQvng/NeOmyC3N4/ LodI5HkspYNEr0JOYGc0I7j3KWZ2kR03Z8XAEAgj/fxaMJAXBPMV =e8TZ -----END PGP SIGNATURE----- --Sig_/VEohY/ZPeRQcvsDZPOmJLyo--