From owner-freebsd-arm@freebsd.org Tue Oct 18 19:50:02 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 33543C17B8D for ; Tue, 18 Oct 2016 19:50:02 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qk0-x234.google.com (mail-qk0-x234.google.com [IPv6:2607:f8b0:400d:c09::234]) (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 DF7A784F for ; Tue, 18 Oct 2016 19:50:01 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qk0-x234.google.com with SMTP id z190so5767471qkc.2 for ; Tue, 18 Oct 2016 12:50:01 -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=rgkq53EbRfn5hLS8IfGdRPzHbkk4KnQpqLWwgmF3niE=; b=Bnc3nsBCNVA10jH2uVj3sPxvYNGTEvr5GOw3qrJL8My+HIVkx6Vuo+No6NTx4AgZ+U c+Co0hkws0EKg4n8HleJH7zzHa4AHpaeB+fzc4WsUizIhDnNwDGcJfAn24T2fOYOb4hJ ED4270hD7kUVit/L/gk9i4KKqlbOffggPl3a1fTlQnHIstED3bR3XPloTSpcqvsR8pCj vY5QxzvbGi0zyoDQl7qcgFuIKDWMfOObKip/GgagXP3QefQ0DW//Q4tXfGQoY5ZhTzw7 gCFEtZzOCIsTse9qFWCSvQLj/ugipcwxTMsyUKh6jl2s292Ln8JGY0uK0sNgLgIL45YW WUYQ== 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=rgkq53EbRfn5hLS8IfGdRPzHbkk4KnQpqLWwgmF3niE=; b=eSOktVx3GClwXx2+UGyhLnWFYtiGitXGcq9icGh4gChfXqLmLniBNpXTAluSxqM53W qEtDd2LBOMg653GwvOmKVtNFctovfetpzHDiLNfBrgsemmKzxxRuvleUEhHGONNwxKIo 9NtO4KNt5KWBBbWVSMLDbkbya7LpIbXo0LhuA0ljd0k3uQaVJmnwa62ifzj41munBDPX 0mI2UaDk5dRhb5vgCBJJ8rqCd8V3ZGv4u9bF8MdM8/AT+BTgd1GOnFpIvwgYM64aO6l+ WYALaC/jGkMcfA+rBpNss1tjET2qVdqAcCrHYe/d3mVb283V/7dvUHWa0WhKQh05Xrqz Yp0g== X-Gm-Message-State: ABUngvfUeYL77IR9Ctrtu227o6YcmlfL/NUkUX7zpj8M7YsjCZiRXD8qxX/ylwKRTATFhO8g X-Received: by 10.55.170.143 with SMTP id t137mr2292215qke.151.1476820201000; Tue, 18 Oct 2016 12:50:01 -0700 (PDT) Received: from mutt-hardenedbsd ([63.88.83.66]) by smtp.gmail.com with ESMTPSA id y55sm18874198qty.23.2016.10.18.12.49.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Oct 2016 12:49:59 -0700 (PDT) Date: Tue, 18 Oct 2016 15:49:58 -0400 From: Shawn Webb To: Ross Alexander Cc: freebsd-arm@freebsd.org Subject: Re: Raspberry Pi 3 support Message-ID: <20161018194958.GC22296@mutt-hardenedbsd> References: <20161017140631.GA77580@mutt-hardenedbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LwW0XdcUbUexiWVK" Content-Disposition: inline In-Reply-To: <20161017140631.GA77580@mutt-hardenedbsd> 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: Tue, 18 Oct 2016 19:50:02 -0000 --LwW0XdcUbUexiWVK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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//sy= s/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 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. 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. 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 All this has been documented in more detail at the RP3 wiki page: https://wiki.freebsd.org/arm64/rpi3 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. Again, if anyone has any suggestions for the documentation, please let me know. 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 --LwW0XdcUbUexiWVK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYBnziAAoJEGqEZY9SRW7uWrUQAMmc6JQaDtZomDCFqTuMMXBv qPII112nn8ykj8IlFDv8DdNdxiLhmgfnjFuWNIcCOKbU0GWn9tJ61GvsNCx+66qc dD4xU9kuZpUUOZdg+h0VHuKguar5Undr3Jq6nTCMXb24Ip0RC37hd5Rk7Z5s7RDs 7dkoP3xyEUBgLkAPoy2wy9q+J8Ob3o4O6CwqkqIZzBR3QjpSxoBqzOOY2sXdmBjR DMk+dh+OmpF8RUEAQZRO5E0xBEc1jixbpVXNyJvhvzAqJrmMWWEMBlfu7naAJpFo U8Y/jCNZ7tmtQq9jbNS8XqpwfsYW5IWGsy5JK9fvcTQqr39lBDr3Nn+2c7TBkaAs uyFxryL9LBu21xed8hVgr3TQXZZYEWKVUlDXZXc122n/lBcexwJUV5PDMz1eEc7j mTx4fNQSOAvvg/o5yaxplY6sf4PMbSf4CAHd5iQ7FPZV25je4E2G9NnLWPWh4+K3 yUsxLeMDsVX0zdsHwUcEHt9qSEVBYPsoycfQ2I9CICh58tQ2Vnvo4NesWgS5iGZX Vz5o1TpfmjOXqiGc7MMm96Jtdq5PtXgfgjAziXvZOSUWAfXu4IHHsxWGmprFh67J ZWyAL9Y/7F0FYVAj5r6Hy0iNQM0P7SmyeUb8tHEKVmfqlnpD/3QY6LqI8dEhpyW0 /v31uW/SWwEg6kzvp6ja =in11 -----END PGP SIGNATURE----- --LwW0XdcUbUexiWVK--