From owner-freebsd-arm@freebsd.org Wed Oct 19 07:46:21 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 B8BB2C179E7 for ; Wed, 19 Oct 2016 07:46:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x236.google.com (mail-it0-x236.google.com [IPv6:2607:f8b0:4001:c0b::236]) (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 7FC20DD9 for ; Wed, 19 Oct 2016 07:46:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x236.google.com with SMTP id 4so104875239itv.0 for ; Wed, 19 Oct 2016 00:46:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=IAn6e5bpJ6Lrvok0EuT++mKjR8VU46/NeczoVGUk1PI=; b=GEat47eXPiU6Bwv4L/owk9bBB0M+ZOk48NorrEsgZzDP5BcDYDMDVDdQIUzqtLffNJ 0Iek/6n8RHpU7yA117QcXk1EimM7rQgqt1GZ+BPxoYhDtrK6fa7xRk3VExoMIWNSYGef ebVBnJZzucC4ieIYwBarfkfKm7Vxvhw9HXaj8jRyCAG2AAf5Ktoiyh7OAy8SgUtujNSE m2dqjJWfJpJ/r+RrhVW/2N5inZ05eKnzdVdYW7GcGQguuTvL7+m//elKq+QZrNzGHUUR qb7BcmSR+hdkH0xkdsBZDDXjORkozvjAXstYMpmvDuz2Do5mWrBsncfgigI3E38ECrU1 brBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=IAn6e5bpJ6Lrvok0EuT++mKjR8VU46/NeczoVGUk1PI=; b=loBxgS0C/FKoGulVl8SN2Xwl7WEysXtAlsWHsa4+aKAhmdpwSYorvLa6O4Tg5aOkhq F15OwbY4KP9KxF+hCI5r6+viVxVwrtYEIds02PRA+g86ObHBpr6JzVPqmgt5kRYjLpZ2 VftvMLVuBOos7M1tWQqEPAoW+8uhTlFWofJwZ2b/WOmHEjtMwB2Qalu6h4N+alOpsY8X 76FdoJ3fGJCy4PwdwGhtg0myq1jVqzctZ3mz7h4yJfkjE5QayTuCtDqcYYoJetrb1mpe 1o721bq7W28vvX494b7h+sQ88KYpFrOWb7gk8cPzCqGWgscPiSBqIACh6deeaLDPrGII C1jQ== X-Gm-Message-State: AA6/9RkJl+mPK6LyX2EePNgufRmdKBE27DS9trAKIQJdeREnGWorMsQRH3I0iUY/b+00a+2fQGWj8nKmgVtRZw== X-Received: by 10.36.89.206 with SMTP id p197mr4964399itb.103.1476863180868; Wed, 19 Oct 2016 00:46:20 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.77.85 with HTTP; Wed, 19 Oct 2016 00:46:20 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: <20161019002146.GA57025@mutt-hardenedbsd> References: <20161017140631.GA77580@mutt-hardenedbsd> <20161018194958.GC22296@mutt-hardenedbsd> <2BC88734-CF40-4702-9483-ADEBA23C11F2@bluezbox.com> <20161019002146.GA57025@mutt-hardenedbsd> From: Warner Losh Date: Wed, 19 Oct 2016 01:46:20 -0600 X-Google-Sender-Auth: W4kwirsWKgH4zPTP2FoFPVJQDMg Message-ID: Subject: Re: Raspberry Pi 3 support To: Shawn Webb Cc: Oleksandr Tymoshenko , "freebsd-arm@freebsd.org" , Ross Alexander Content-Type: text/plain; charset=UTF-8 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 07:46:21 -0000 On Tue, Oct 18, 2016 at 6:21 PM, Shawn Webb wrote: > On Tue, Oct 18, 2016 at 05:01:23PM -0700, Oleksandr Tymoshenko wrote: >> >> > 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. 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 for documenting this stuff, Shawn. Just for your information - >> I committed new kernel config that should be used instead of RPI3: >> GENERIC-UP. I???ve updated wiki page already. I've updated the nanobsd build. Is the u-boot-rpi3 port different from the other u-boot ports in requiring someone to snag firmware in addition to u-boot? Will that be fixed? Or should I go ahead and fix it when I get to rpi3 in my uboot cleanup? Warner