From owner-freebsd-arm@freebsd.org Mon Apr 20 22:30:46 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7117B2B1D4D for ; Mon, 20 Apr 2020 22:30:46 +0000 (UTC) (envelope-from jonc@chen.org.nz) Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495hH9456nz4FBG for ; Mon, 20 Apr 2020 22:30:44 +0000 (UTC) (envelope-from jonc@chen.org.nz) Received: by mail-pj1-x1042.google.com with SMTP id kb16so520527pjb.1 for ; Mon, 20 Apr 2020 15:30:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chen-org-nz.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Vv28bl+dh6Kd57GntlTSDnQASrzL3SIQ3Vu2hiDELb0=; b=MDHtGIHdFcRhRj1tmaNMh62s6hctB0Lqw1u62zweVPi52veETO/nyfAfw2WgqserTV 3BS8ciFg8pThSy+5f+A03n+Hf8N86ZGYoNVERRwPZoH/u2MfkBXbhabMyPe+sw5X/ksv 5TxYpswtuwToU6CEz3NWEcbenp+SDzs7tKJn2ealTs27RZDeWHp3CmraCcidZE1izs2R kwHcnEo+BR33M7gO4hBxFH9+ZrzhArCNZMtBCgpxrmBWBwcS70T049KReq2ro8kzOoHD Zm/xaF57ugXoOGHueuE9Lh6H73s66AT3R1mdCVab87P4Hs+EKtlLq6YYp1Abz1Bp3fG8 1QVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Vv28bl+dh6Kd57GntlTSDnQASrzL3SIQ3Vu2hiDELb0=; b=lnYjg2GjGqRNeFY59jmwrgbaK+bH2ASwO1Q+Kz5a7K8vftuT1IezNmDuO/4+or/o1U D3r1Z17Zbg1CrRTvskhiETbAUXIxX8+GhmMKIQQFT0N3MA9pRjjnU2TQpSnpCoRdEUOZ 4ElF9/wSozR89YUNE9AxTmTMFhGWc0H0wDzA7mKLd9mcTg5jc4vUnbSEaK9y3quDz25f 5ZG93MVBCpYVmykYrmHUwuWHrcWEes06TQwaot814pW7ju8LTitIwte+pL7pgCOA5AYn dQQb51BTi8KAuXBWhj/Lz6hrze920GkSfAXrYSxLBgKgMmXbQOqh4DTDptJBT8jZkAs4 fY+A== X-Gm-Message-State: AGi0PubU/XSzaaH/I23Nfar/qazs4BD0/D86PM8AlmZpX6XC9enLY5vw cY9Wuo2+2MZFoZWjaug2QyUVvBY4rYvSmpe0LqYw7+21 X-Google-Smtp-Source: APiQypINhPreF+VqqU1nHfrJGtT8Fwc/bmuErg4swlp0BL5L0F//OIghsWGx6q26rp3hg2X6/kexynnQmszxJF2Vi7Y= X-Received: by 2002:a17:902:261:: with SMTP id 88mr13012837plc.308.1587421843238; Mon, 20 Apr 2020 15:30:43 -0700 (PDT) MIME-Version: 1.0 References: <20200420172512.GA94315@www.zefox.net> <20200420220756.GC94315@www.zefox.net> In-Reply-To: <20200420220756.GC94315@www.zefox.net> From: Jonathan Chen Date: Tue, 21 Apr 2020 10:30:27 +1200 Message-ID: Subject: Re: Booting from USB on RPi3 To: bob prohaska Cc: freebsd-arm@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 495hH9456nz4FBG X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=chen-org-nz.20150623.gappssmtp.com header.s=20150623 header.b=MDHtGIHd; dmarc=none; spf=softfail (mx1.freebsd.org: 2607:f8b0:4864:20::1042 is neither permitted nor denied by domain of jonc@chen.org.nz) smtp.mailfrom=jonc@chen.org.nz X-Spamd-Result: default: False [-2.46 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[chen-org-nz.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; DMARC_NA(0.00)[chen.org.nz]; R_SPF_SOFTFAIL(0.00)[~all]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[chen-org-nz.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2.4.0.1.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-0.16)[ip: (-0.01), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.43), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 22:30:46 -0000 On Tue, 21 Apr 2020 at 10:07, bob prohaska wrote: > > On Tue, Apr 21, 2020 at 07:31:40AM +1200, Jonathan Chen wrote: > > > > This is how I got my RPI3 running 12-STABLE to boot off USB. It does > > require a microSD card with u-boot, and the loader.efi built sometime > > after Sep 2019 though. However, my root-filesystem (and swap) lives on > > an external USB drive. > > > > 1. Copy the loader.efi to EFI/BOOT/bootaa64.efi > > > > 2. Create a text file: EFI/FreeBSD/loader.env, this file contains a > > one-line directive to loader(8) on where to find a kernel to boot. > > Mine contains: > > rootdev=disk1p1: > > The disk entry should be the same as what loader(8) expects with your > > USB disk setup. Mine has a GPT partitioning scheme, with the root-fs > > on partition-1. > > > > 3. All /etc/fstab entries should use symbolic name entries instead of da0*. eg: > > 7:27am# cat /etc/fstab > > # Device Mountpoint FStype Options Dump Pass# > > /dev/gpt/topaz-root / ufs rw 1 1 > > /dev/gpt/topaz-swap none swap sw 0 0 > > > > Hope this helps. > > -- > > Where is the kernel loading from? I gather it's been long-time > practice to load the kernel from microSD and then mount the USB > device as root; it that what you're doing? It appears that using > usbboot (correctly!) would eliminate that extra step. The kernel loads from the external USB drive. The only thing on the microSD card is the renamed loader.efi and the loader.env file. Cheers. -- Jonathan Chen