From owner-freebsd-arm@freebsd.org Wed Oct 19 00:21:55 2016 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 3F7E9C12EC7 for ; Wed, 19 Oct 2016 00:21:55 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt0-x233.google.com (mail-qt0-x233.google.com [IPv6:2607:f8b0:400d:c0d::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E76B17C0 for ; Wed, 19 Oct 2016 00:21:54 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt0-x233.google.com with SMTP id m5so6409501qtb.3 for ; Tue, 18 Oct 2016 17:21:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=EsUvH24syHSaA29TDcXT+zUsufQorKvOCme6PkaQyeA=; b=Mut/2mjOFOtRxl52WrxRUQF1UMyY6JLtSk0n9fGl85oMHdeyithZ6/aS1+dVgPWE2V cBspoNS6NzAcZvpEton4zBS84hZ4tdoUarFitxgrwFuid2K07g5hk+H2DtmDWRr/+far cwW1ePusTt+VB8ijlVzzQLjXRNVCFOSLjfC2E+Yo4ONtttzIisH3+/k9KFJAsFoC3wHf y2htecP3t+QBGe0kULTKIoSzoN6KkZbZYrNBnkb74tZHS40ET3HRyellz4kF9nYNEitX /eOQI4FibDNxC6t8knFtwD5yE436A8CEeTGDSSS/B9W2PuyoehX+sSLBXqqSvO9go0nO e7nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=EsUvH24syHSaA29TDcXT+zUsufQorKvOCme6PkaQyeA=; b=YOeRaosttLHdv+gj3d/YywtgxL/0+FG5K/7841ona9Ebwqh72UNU73bvyReTA3p/gb gw+EqrtVID7YlVEyRHubmlhMog+y6cohsFX2vYprwApsCya7ofHZhxD6Cw+ah1yejgls e19WZOWLYkQWk6czG+G8pqbaoQwMXlNtFzWjkucPrkYpfAFyp3rDk6RTDxF24IuElkHe nG9bk4GZksWJ4x2u/j3rugEBkzQ8kbI5dCEgzuCCoRKnLU+Lx08AqpU59WzYrG7NFUNX zp2mUl4KQ8kENmoOKBBZWyNdUZCMj4nGcSGYI6yIEZmvtfkohD1Q4cVzVGmQ2fN20Q2J W9Yw== X-Gm-Message-State: AA6/9Rk+2pkcWOQznb6FQJ1pMZ6W6tydIfSz1dFx3wc+ItrolVFOo8JpDlgcX+hltCRJLpNm X-Received: by 10.200.57.166 with SMTP id v35mr3632486qte.36.1476836514015; Tue, 18 Oct 2016 17:21:54 -0700 (PDT) Received: from mutt-hardenedbsd (pool-100-16-218-231.bltmmd.fios.verizon.net. [100.16.218.231]) by smtp.gmail.com with ESMTPSA id s23sm19472371qka.10.2016.10.18.17.21.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Oct 2016 17:21:49 -0700 (PDT) Date: Tue, 18 Oct 2016 20:21:46 -0400 From: Shawn Webb To: Oleksandr Tymoshenko Cc: Ross Alexander , freebsd-arm@freebsd.org Subject: Re: Raspberry Pi 3 support Message-ID: <20161019002146.GA57025@mutt-hardenedbsd> References: <20161017140631.GA77580@mutt-hardenedbsd> <20161018194958.GC22296@mutt-hardenedbsd> <2BC88734-CF40-4702-9483-ADEBA23C11F2@bluezbox.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="W/nzBZO5zC0uMSeA" Content-Disposition: inline In-Reply-To: <2BC88734-CF40-4702-9483-ADEBA23C11F2@bluezbox.com> X-Operating-System: FreeBSD mutt-hardenedbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: Mutt/1.6.1 (2016-04-27) 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: Wed, 19 Oct 2016 00:21:55 -0000 --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 18, 2016 at 05:01:23PM -0700, Oleksandr Tymoshenko wrote: >=20 > > On Oct 18, 2016, at 12:49 PM, Shawn Webb w= rote: > >=20 > > On Mon, Oct 17, 2016 at 10:06:31AM -0400, Shawn Webb wrote: > >> On Mon, Oct 17, 2016 at 12:33:27AM -0600, Ross Alexander wrote: > >>> On Fri Oct 14 22:10:56 UTC 2016, Shawn Webb wrote: > >>>=20 > >>>> I've documented the steps I took to install FreeBSD on my RPI3: > >>>> https://wiki.freebsd.org/arm64 > >>>> I hope I didn't miss anything. It's a wiki, so if I did, feel free to > >>>> correct it (or let me know and I can correct it, too). > >>>=20 > >>> I'm referencing https://wiki.freebsd.org/arm64/rpi3 as it seems > >>> to be "the one". The following notes are meant to be clarifications > >>> for people as clueless as myself - > >>>=20 > >>> You say: "Download all the files from the boot directory in the > >>> official Raspberry Pi firmware repository on GitHub." I read that as > >>>=20 > >>> newfs_msdos -F 16 /dev/da0s1 > >>> mount -t msdosfs /dev/da0s1 /mnt0 > >>> cd /mnt0 > >>> svn checkout https://github.com/raspberrypi/firmware/trunk/boot/ > >>> mv boot/* . > >>> rm -R boot > >>>=20 > >>> You say: "Copy $MAKEOBJDIRPREFIX/arm64.aarch64//= sys/boot/efi/boot1/boot1.efi > >>> to /mnt/EFI/BOOT/bootaa64.efi". I read that as > >>>=20 > >>> mount -t ufs /dev/da0s2a /mnt1 > >>> mkdir -p /mnt0/EFI/BOOT > >>> cp /mnt1/boot/boot1.efi /mnt0/EFI/BOOT/bootaa64.efi > >>>=20 > >>> given that /dev/da0s2a is all the stuff from "Building", "World", and > >>> "Kernel" sections and a "make -s installworld installkernel distribut= ion > >>> KERNCONF=3DRPI3 DESTDIR=3D/mnt1 TARGET=3Darm64 TARGET_ARCH=3Daarch64". > >>>=20 > >>> And hey, guess what: it boots fine :). No hints as to how many times > >>> I got it wrong, though. > >>=20 > >> Hey Ross, > >>=20 > >> Good catch. What I'll do is add a "prerequisites" section, instructing > >> on how and where to download the required files. Then I'll refactor th= at > >> bit to make better sense. > >=20 > > Status update for FreeBSD on the RPI3: > >=20 > > 1) There is now a sysutils/u-boot-rpi3 port. Thanks Diane Bruce! > > 2) Using clang 3.9.0 + lld in base, one can build and install some ports > > with a few workarounds. boot1.efi, loader.efi, and the kernel need to > > come from a non-clang 3.9.0 branch (HEAD). > > 3) jemalloc has issues on the RPI3, can be worked around by disabling > > tcache via malloc.conf. Diane Bruce ponders whether this could be > > related to locking on arm64. > > 4) linking dynamically-loaded executables (via installing ports entries) > > has issues > > 5) SMP support is being actively worked on by Diane Bruce > > 6) I need to update the documentation to use the u-boot-rpi3 port > > 7) I need to update the documentation to use crochet now that crochet > > supports the rpi3 and we have the u-boot-rpi3 port > >=20 > > All this has been documented in more detail at the RP3 wiki page: > >=20 > > https://wiki.freebsd.org/arm64/rpi3 > >=20 > > I'm going to start researching in more detail the jemalloc and dynamic > > linking issues this weekend. If someone gets to it sooner than me, then > > yay! Otherwise, I'm happy to take a gander. > >=20 > > Again, if anyone has any suggestions for the documentation, please let > > me know. >=20 > Thanks for documenting this stuff, Shawn. Just for your information -=20 > I committed new kernel config that should be used instead of RPI3: > GENERIC-UP. I???ve updated wiki page already. >=20 Cool! Thanks! --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --W/nzBZO5zC0uMSeA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYBryYAAoJEGqEZY9SRW7uPyQQAJXXMrdIzV+Y680IGwOAjzDg vpTIpP+58VNpbPrnUMesM45y3CeGi/6qZlSbFMwaQ3wQDuNHxwRQJO8t7yksRExV 5EiHuG/qfiGsTjMMiP+Fcg5KSYvxmCI6z96yqKsMphY1Gw1iuAbAPwmZwiGXxcec e4uXK4NaxgEktYfg3LPFvdNsrSrOWwXdhZMFxGhhzXcl8kVrHEfflgNMnHDYeuIw qBAjoSNDNXRqEpTfgOt4Ef0SwLQ0fSQTpWqyV37fe1A9LKoEw4TJA05sFVMaBulH heVf3IDcK4rZhzyqR3AJQ+2LNN7kCrD9jh6V/O2XnDsmE+u/lg088PZmPGiTK7o3 k2evKXwsK2sqj0AEdgS4zBoBxEQZp+vt7x69rzb3KTylUDne9CaJZy6AafvIehVj 4qPqKqtqS2Qb/wwcINxS4btKlKC6UVwffdqoL9l+1ok8WwwBxE6B2GVI2s/LDIr7 Lu92y1LGmfWJNp1GM7Vc8e6I3TvVC9h0QOnFowu/SAKOY+IMx0TJajTw63XxDelp IDN1UccrJ+BoV+ZmWjRg9dxEHLMcHnIogQYO97DaNx62nWkDXKREc0R5rDGvgE8O MM4hnyOHoZt0KOr4wrwZmYoca8l5tjkTFhuxP+d00ocL6U8KRhHNByRiqFOoUeI6 wXaS1PPZqIzEfT9Mk6T6 =d1IT -----END PGP SIGNATURE----- --W/nzBZO5zC0uMSeA--