From owner-freebsd-arm@freebsd.org Wed Oct 19 00:02:03 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 4D396C129E3 for ; Wed, 19 Oct 2016 00:02:03 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F7E7BAE for ; Wed, 19 Oct 2016 00:02:03 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from [208.184.220.60] (helo=limiting-factor.dolby.net) by id.bluezbox.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_2 (FreeBSD)) (envelope-from ) id 1bweKO-000FoG-Ob; Tue, 18 Oct 2016 17:01:53 -0700 From: Oleksandr Tymoshenko Message-Id: <2BC88734-CF40-4702-9483-ADEBA23C11F2@bluezbox.com> Mime-Version: 1.0 (Mac OS X Mail 10.0 \(3226\)) Subject: Re: Raspberry Pi 3 support Date: Tue, 18 Oct 2016 17:01:23 -0700 In-Reply-To: <20161018194958.GC22296@mutt-hardenedbsd> Cc: Ross Alexander , freebsd-arm@freebsd.org To: Shawn Webb References: <20161017140631.GA77580@mutt-hardenedbsd> <20161018194958.GC22296@mutt-hardenedbsd> X-Mailer: Apple Mail (2.3226) Sender: gonzo@id.bluezbox.com X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: > On Oct 18, 2016, at 12:49 PM, Shawn Webb wrote: > > 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: >>> >>>> 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). >>> >>> 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 - >>> >>> You say: "Download all the files from the boot directory in the >>> official Raspberry Pi firmware repository on GitHub." I read that as >>> >>> 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 >>> >>> You say: "Copy $MAKEOBJDIRPREFIX/arm64.aarch64//sys/boot/efi/boot1/boot1.efi >>> to /mnt/EFI/BOOT/bootaa64.efi". I read that as >>> >>> mount -t ufs /dev/da0s2a /mnt1 >>> mkdir -p /mnt0/EFI/BOOT >>> cp /mnt1/boot/boot1.efi /mnt0/EFI/BOOT/bootaa64.efi >>> >>> given that /dev/da0s2a is all the stuff from "Building", "World", and >>> "Kernel" sections and a "make -s installworld installkernel distribution >>> KERNCONF=RPI3 DESTDIR=/mnt1 TARGET=arm64 TARGET_ARCH=aarch64". >>> >>> And hey, guess what: it boots fine :). No hints as to how many times >>> I got it wrong, though. >> >> Hey Ross, >> >> 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 that >> bit to make better sense. > > Status update for FreeBSD on the RPI3: > > 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. [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 HTML_MESSAGE BODY: HTML included in message Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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:02:03 -0000 > On Oct 18, 2016, at 12:49 PM, Shawn Webb = wrote: >=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/b= oot1.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 = distribution >>> 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 = that >> 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. 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=E2=80=99ve updated wiki page already.