From owner-freebsd-arm@freebsd.org Mon Oct 8 20:26:58 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 723EB10CAAB0 for ; Mon, 8 Oct 2018 20:26:58 +0000 (UTC) (envelope-from mw@semihalf.com) Received: from mail-it1-x12d.google.com (mail-it1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 100D97C124 for ; Mon, 8 Oct 2018 20:26:57 +0000 (UTC) (envelope-from mw@semihalf.com) Received: by mail-it1-x12d.google.com with SMTP id 134-v6so13237482itz.2 for ; Mon, 08 Oct 2018 13:26:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=YYLt0JN6mqAwU/P3MA0GmuKNbi3glqvbqNz+DPBuJqQ=; b=zMRQrujmW5l8IZ6ML9f3Lgsj4zdN9LbvMgcivbwK2Rp6TMbhAMNWknHQ6plNkP7vOt DTqNUumiT027C2bl1BjYWfegBuEFPlElVi+F9GntWKMqrmcNv+elad1mvvfY4o6YAIPT mVWkomwzrFaQAjC0he7BnyfoHaoIZbibHhosi3nv+Zc5r9ho5fAtWyp65SNjkoEDF04F bJLui89/NE4pkG2cBOjTt/ZiYmPJygxLOfl8tkpVL+VMfmw9IYysr0wpkxj/B5TK8qnl FSogFYnXFT4v/Hx2h4XLLeJ2mI5hXdQPDKvA0J1yeGuqBb7vnpY9xjmTBpeM6Cpdtv0c ZthA== 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:content-transfer-encoding; bh=YYLt0JN6mqAwU/P3MA0GmuKNbi3glqvbqNz+DPBuJqQ=; b=bWMGSv9IBU6pTrGlTdy7PuYY0gQk7u3V76mQEI2S8w1yGQZIXTVEXPujmXcarh6kjg 5jAMqql2CmxuT0KMDcvF+sZpq9BXJeiEumArky3LBfgdlwOdfyIQFFKn1yb/mS4XWb0I IdvW+QEWjKbQvwl8++WHw5apTLeeAwgtFqcBAWLXHFrA0b3qReN+raz1p8h+X/bx6XjW oQFhMQL8ghRpvA8nG9vvJcI0XKTYTHEUxPJ/oViMViIGRy6iy80aAp2B73aSIRNkcisG XjA9sgROXl98zAxhW2x2Dn5MSSQO2pNazvN7A4SsMOXo6pa/ONJuoDnfM8pUavgOKpVs cieQ== X-Gm-Message-State: ABuFfohB980KYKEAi85BCzZsvZ48TB3AXDGiNSeqVYu04SsC7JQqIHZN V/BFElZmSj28TZ3nsGiWpPJfA+n1QGJGmcZoFRZrRA== X-Google-Smtp-Source: ACcGV63xzWIKllcxghhZaXGDvRUZY8eqs9eSi1eirm+atfb0+7CDxhugxDFHQc+ksc9gSw5qagOpobzLJ7WM8gJaGAM= X-Received: by 2002:a24:c543:: with SMTP id f64-v6mr18271684itg.138.1539030417230; Mon, 08 Oct 2018 13:26:57 -0700 (PDT) MIME-Version: 1.0 References: <1539023879.3199.0@smtp.migadu.com> <84911233-9535-4005-82DC-1910BC3BF101@yahoo.com> In-Reply-To: <84911233-9535-4005-82DC-1910BC3BF101@yahoo.com> From: Marcin Wojtas Date: Mon, 8 Oct 2018 22:26:45 +0200 Message-ID: Subject: Re: Question: How to boot FreeBSD head on a MACCHIATOBin (double shot)? To: marklmi@yahoo.com Cc: greg@unrelenting.technology, freebsd-arm Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Oct 2018 20:26:58 -0000 Hi Mark, pon., 8 pa=C5=BA 2018 o 21:56 Mark Millard via freebsd-arm napisa=C5=82(a): > > On 2018-Oct-8, at 11:37 AM, Greg V wrote= : > > > On Mon, Oct 8, 2018 at 1:05 AM, Mark Millard via freebsd-arm wrote: > >> Anyone willing to provide notes or instructions > >> for setting up a MACCHIATOBin (double shot) to boot > >> FreeBSD head from a SATA SSD? (Failing that: a USB > >> storage device?) (Failing that: microsd card?) > >> This could well include notes/instructions about > >> what needs to be on the media that may be unique > >> to the MACCHIATOBin. I realize that various things > >> will not work yet. I'd just explore some of what > >> does work. > > > > From what I remember on this mailing list, PCIe and Ethernet won't work= . > > > > (BTW, OpenBSD does have a PCIe driver for it already... and for the Roc= kchip RK3399 too... dang) > > > >> Needing to have the kernel and earlier stages > >> and a preliminary /etc/fstab and /boot/loader.conf > >> on an microsd card but getting the UFS file system > >> (/) from the SATA SSD is likely a workable combination, > >> similar to what I've sometimes done on smaller > >> single board computers. For such, it is the kernel > >> and earlier stages where I'm unclear on the details > >> for the MACCHIATOBin double shot. > > > > According to their wiki, SATA is supported in U-Boot: > > http://wiki.macchiatobin.net/tiki-index.php?page=3DUse+SATA+drives+in+U= -Boot > > Various details do not seem to match, such as the 1, 8, 9 > device numbering for SATA (scsi) vs.: > > Marvell>> scsi scan > scanning bus for devices... > SATA link 0 timeout. > SATA link 1 timeout. > AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl SATA mode > flags: 64bit ncq led only pmp fbss pio slum part sxs > Target spinup took 0 ms. > SATA link 1 timeout. > AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl SATA mode > flags: 64bit ncq led only pmp fbss pio slum part sxs > Device 0: (0:0) Vendor: ATA Prod.: Samsung SSD 850 Rev: EXM0 > Type: Hard Disk > Capacity: 976762.3 MB =3D 953.8 GB (2000409264 x 512) > > The text seem to be for some older version of the board > and/or firmware: the picture and description of the > SATA connector position numbering is for an older board. > > > You should be able to just load and run loader.efi from the drive's EFI= System Partition. > > The help at the Marvell>> prompt mentioned EFI once: > > bootefi - Boots an EFI payload from memory > > with the longer description being: > > bootefi [fdt address] > - boot EFI payload stored at address . > If specified, the device tree located at gets > exposed as EFI configuration table. > > I interpreted this as a lack of direct use of on-media EFI > material being supported. > > > (And USB is supported too, so you can load from a USB stick to install = onto the SATA drive.) > > I was not successful at referencing USB media, > despite: > > Marvell>> usb info > 1: Hub, USB Revision 3.0 > - U-Boot XHCI Host Controller > - Class: Hub > - PacketSize: 9 Configurations: 1 > - Vendor: 0x0000 Product 0x0000 Version 1.0 > Configuration: 1 > - Interfaces: 1 Self Powered 0mA > Interface: 0 > - Alternate Setting 0, Endpoints: 1 > - Class Hub > - Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms > > 2: Mass Storage, USB Revision 3.0 > - SanDisk Extreme > - Class: (from Interface) Mass Storage > - PacketSize: 9 Configurations: 1 > - Vendor: 0x0781 Product 0x5580 Version 0.16 > Configuration: 1 > - Interfaces: 1 Bus Powered 100mA > Interface: 0 > - Alternate Setting 0, Endpoints: 2 > - Class Mass Storage, Transp. SCSI, Bulk only > - Endpoint 1 In Bulk MaxPacket 1024 > - Endpoint 2 Out Bulk MaxPacket 1024 > > I just got "** Bad device usb 2 **" when trying > have it do something with "2:" above --and things > like: > > Marvell>> usb storage > Card did not respond to voltage select! > mmc_init: -95, time 26 > No storage devices, perhaps not 'usb start'ed..? > > > > If the built-in U-Boot doesn't support EFI, you can chainload a custom = build of U-Boot with the EFI option enabled. > > I'm not familiar with setting up and doing such (yet?). > > > According to https://linux.debian.ports.arm.narkive.com/Co7jtx9F/debian= -installer-on-arm64#post2 > > you can even load an EDK II (TianoCore) build from U-Boot (without dire= ctly flashing it). > > > > I'm not familiar with setting up doing such (yet?). > > > Based on my (lack of) background in the area, no > direction seemed to have clear steps to take. It > seemed more like an error-prone exploration for > me. > I personally recommend using UEFI edk2 (it happens, I'm its maintainer;). If you don't want to risk bricking the board, you can burn it on the uSD (and keep the u-boot on the SPI flash) e.g. directly via tftp or from usb (see 'help bubt'): Marvell>> mmc dev 1 Marvell>> bubt flash-image.bin mmc After that simply change the boot source: http://wiki.macchiatobin.net/tiki-index.php?page=3DMACCHIATObin+Interface+l= ist#Boot_Selection All UEFI sources are open - either in Marvell repos: https://github.com/MarvellEmbeddedProcessors/uefi-marvell/commits/uefi-2.7-= armada-18.09 or in the official upstream branch: https://github.com/tianocore/edk2-platforms/commits/master The gap between Marvell branch and the tianocore is very narrow, working on pushing everything. If you wish I can spare you reading the build howtos and send you a valid binary, just let know. Best regards, Marcin