Bootable image for Macchatobin Double Shot?

Mark Murray markm at FreeBSD.org
Sat Apr 25 12:22:01 UTC 2020


Hi

Apologies for not responding to this earlier. Things got disorganised before I got organised.

Thanks for this response; I was able to make progress, but now I'm stuck.

> On 21 Mar 2020, at 17:03, Marcel Flores <marcel at brickporch.com> wrote:
> 
>> On Mar 21, 2020, at 3:58 AM, Mark Murray <markm at FreeBSD.org> wrote:
>> 
>> Hi Folks,
>> 
>> I'm keen to get a Macchiatobin Double Shot running as both a firewall and native build box at home. Part of the appeal is also to retire a very old, large, slow and power-hungry PC.
>> 
>> I know there are no drivers for the on-board network devices, and I'm very happy to use a dual-port PCIe card. Serial console is fine. I'll be needing the SATA. If SATA doesn't work, this is a hard failure.
>> 
>> Does anybody here have a recipe for creating a bootable image for this board please? Success/failure stories also welcome!
>> 
>> Thanks!
>> 
>> M
>> --
>> Mark R V Murray
> 
> I’ve had no trouble using edk2 UEFI and CURRENT. My setup has the edk2
> binary on an SD Card and the FreeBSD install on SATA (though it booted fine
> from the USB originally to install it). An intel PCIE nic seems to work fine as
> well, but I’ve not really played with it exhaustively to see what works.
> 
> I used the 18.09.4 UEFI image from here:
> 
> https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/wiki/Binaries
> 
> Did something like:
> 
> dd if=/root/flash-image-18.09.4.bin bs=512 seek=1 of=<path-to-sd-device> conv=sync
> 
> to copy to the SD card. And it basically booted straight away with no issue.

This worked for me, thanks! I had to tell UEFI to use ACPI not Device_Tree, and I was
able to boot a recent FreeBSD-13 MemStick image off USB. With this I could install onto
SATA HDD with GPT volumes and ZFS filesystem.

So far so good! :-) - but see the dmesg(8) output at the end of this; there is a lot missing.

I have a PCIeX4 Intel dual ethernet card installed, and it doesn't appear on the booted
OS. NO PCi is visible, in fact, according to "pciconf -l".

I suspect that the lack of DTB is to blame, so I built a kernel with a modified
src/sys/modules/dtb/mv/Makefile to add armada-8040-mcbin.dts to the existing
armada-3720-espressobin.dts in the DTS.

At boot time, I loaded the resulting DTB (transcribed by hand):

OK unload
OK load boot/kernel/kernel
boot /kernel/kernel text=.... (etc)
OK load -t dts boot/dtb/marvell/armada-8040-mcbin.dtb
boot/dtb/marvell/armada-8040-mcbin.dtb size=0xb970
OK boot -v
Using DTB from loaded file 'boot/dtb/marvell/armada-8040-mcbin.dtb'.
******(nothing else)

... where the "*****" chars are my terminal's "unknown character" symbol. I can't
get any attempt to boot with DTB loaded to work; it always ends up with that short line
of garbage and nothing else.

Is the FDT stuff in CURRENT out of sync with the device drivers? I know Jacques
Schidt about FDT. :-)


> Sorted this based on discussion in this thread:
> https://lists.freebsd.org/pipermail/freebsd-arm/2019-December/020823.html

I had similar problems to the folks in this thread, and I tried some of the same things.

I tried building a DTB (see above).

I tried using UEFI DTB - hang similar to above.

I tried a FreeBSD-12 image - boots with ACPI, but PCI not present. With UEFI DTB
I get the same hang.

Any ideas?

M

---<<BOOT>>---
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2020 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 13.0-CURRENT #0: Sat Apr 25 11:33:44 BST 2020
    root at grimoire:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC arm64
FreeBSD clang version 10.0.0 (git at github.com:llvm/llvm-project.git llvmorg-10.0.0-0-gd32170dbd5b)
WARNING: WITNESS option enabled, expect reduced performance.
VT: init without driver.
module firmware already present!
Starting CPU 1 (1)
Starting CPU 2 (100)
Starting CPU 3 (101)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
random: unblocking device.
random: entropy device external interface
MAP bf810000 mode 2 pages 992
MAP bfc90000 mode 2 pages 848
MAP f4284000 mode 0 pages 1
MAP f4440000 mode 0 pages 1
MAP f4700000 mode 0 pages 1
MAP f93c0000 mode 0 pages 48
WARNING: Device "kbd" is Giant locked and may be deleted before FreeBSD 13.0.
kbd0 at kbdmux0
WARNING: Device "openfirm" is Giant locked and may be deleted before FreeBSD 13.0.
acpi0: <MVEBU ARMADA8K>
acpi0: Power Button (fixed)
acpi0: Sleep Button (fixed)
acpi0: Could not update all GPEs: AE_NOT_CONFIGURED
psci0: <ARM Power State Co-ordination Interface Driver> on acpi0
gic0: <ARM Generic Interrupt Controller> iomem 0xf0210000-0xf0210fff,0xf022f000-0xf022ffff on acpi0
gic0: pn 0x2, arch 0x2, rev 0x1, implementer 0x43b irqs 352
gic0: frame: 0 f0280000 0 0 0
gic0: frame: 1 f0290000 0 0 0
gic0: frame: 2 f02a0000 0 0 0
gic0: frame: 3 f02b0000 0 0 0
gicv2m0: <ARM Generic Interrupt Controller MSI/MSIX> mem 0xf0280000-0xf0280fff on gic0
gicv2m1: <ARM Generic Interrupt Controller MSI/MSIX> mem 0xf0290000-0xf0290fff on gic0
gicv2m2: <ARM Generic Interrupt Controller MSI/MSIX> mem 0xf02a0000-0xf02a0fff on gic0
gicv2m3: <ARM Generic Interrupt Controller MSI/MSIX> mem 0xf02b0000-0xf02b0fff on gic0
generic_timer0: <ARM Generic Timer> irq 8,9,10 on acpi0
Timecounter "ARM MPCore Timecounter" frequency 25000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 25000000 Hz quality 1000
efirtc0: <EFI Realtime Clock>
efirtc0: registered as a time-of-day clock, resolution 1.000000s
cpu0: <ACPI CPU> on acpi0
ahci0: <AHCI SATA controller> iomem 0xf2540000-0xf2541fff irq 0 on acpi0
ahci0: AHCI v1.00 with 2 6Gbps ports, Port Multiplier supported with FBS
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
ahci1: <AHCI SATA controller> iomem 0xf4540000-0xf4541fff irq 1 on acpi0
ahci1: AHCI v1.00 with 2 6Gbps ports, Port Multiplier supported with FBS
ahcich2: <AHCI channel> at channel 0 on ahci1
ahcich3: <AHCI channel> at channel 1 on ahci1
xhci0: <Generic USB 3.0 controller> iomem 0xf2500000-0xf2503fff irq 2 on acpi0
xhci0: 32 bytes context size, 32-bit DMA
usbus0 on xhci0
xhci1: <Generic USB 3.0 controller> iomem 0xf2510000-0xf2513fff irq 3 on acpi0
xhci1: 32 bytes context size, 32-bit DMA
usbus1 on xhci1
xhci2: <Generic USB 3.0 controller> iomem 0xf4500000-0xf4503fff irq 4 on acpi0
xhci2: 32 bytes context size, 32-bit DMA
usbus2 on xhci2
uart0: <16550 or compatible> iomem 0xf0512000-0xf05120ff irq 5 on acpi0
uart0: console (115200,n,8,1)
pcib0: <Generic PCI host controller> on acpi0
pci0: <PCI bus> on pcib0
cryptosoft0: <software crypto>
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
Timecounters tick every 1.000 msec
Obsolete code will be removed soon: random(9) is the obsolete Park-Miller LCG from 1988
Release APs...usbus0: 5.0Gbps Super Speed USB v3.0
usbus1: 5.0Gbps Super Speed USB v3.0
usbus2: 5.0Gbps Super Speed USB v3.0
done
CPU  0: ARM Cortex-A72 r0p1 affinity:  0  0
                   Cache Type = <64 byte D-cacheline,64 byte I-cacheline,PIPT ICache,64 byte ERG,64 byte CWG>
Trying to mount root from zfs:zroot/ROOT/default []...
 Instruction Set Attributes 0 = <CRC32,SHA2,SHA1,AES+PMULL>
Root mount waiting for: Instruction Set Attributes 1 = <>
 CAM         Processor Features 0 = <AdvSIMD,FP,EL3 32,EL2 32,EL1 32,EL0 32>
 usbus0         Processor Features 1 = <>
 usbus1      Memory Model Features 0 = <TGran4,TGran64,SNSMem,BigEnd,16bit ASID,16TB PA>
 usbus2
      Memory Model Features 1 = <8bit VMID>
      Memory Model Features 2 = <32bit CCIDX,48bit VA>
             Debug Features 0 = <2 CTX BKPTs,4 Watchpoints,6 Breakpoints,PMUv3,Debugv8>
             Debug Features 1 = <>
         Auxiliary Features 0 = <>
         Auxiliary Features 1 = <>
CPU  1: ARM Cortex-A72 r0p1 affinity:  0  1
CPU  2: ARM Cortex-A72 r0p1 affinity:  1  0
CPU  3: ARM Cortex-A72 r0p1 affinity:  1  1
WARNING: WITNESS option enabled, expect reduced performance.
ugen2.1: <Generic XHCI root HUB> at usbus2
ugen0.1: <Generic XHCI root HUB> at usbus0
ugen1.1: <Generic XHCI root HUB> at usbus1
uhub0 on usbus2
uhub1 on usbus1
uhub1: <Generic XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus1
uhub0: <Generic XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus2
uhub2 on usbus0
uhub2: <Generic XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
ada0 at ahcich2 bus 0 scbus2 target 0 lun 0
ada0: <ST3500413AS JC45> ATA8-ACS SATA 3.x device
ada0: Serial Number 5VMRHEHM
ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 476940MB (976773168 512 byte sectors)
ada1 at ahcich3 bus 0 scbus3 target 0 lun 0
ada1: <WDC WDS120G2G0A-00JH30 UE220400> ACS-3 ATA SATA 3.x device
ada1: Serial Number 1942A1801501
ada1: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 512bytes)
ada1: Command Queueing enabled
ada1: 114473MB (234441648 512 byte sectors)
ada1: quirks=0x3<4K,NCQ_TRIM_BROKEN>
uhub2: 2 ports with 2 removable, self powered
uhub0: 2 ports with 2 removable, self powered
uhub1: 2 ports with 2 removable, self powered
ugen2.2: <USB Flash Disk> at usbus2
umass0 on uhub0
umass0: <USB Flash Disk, class 0/0, rev 2.00/11.00, addr 1> on usbus2
umass0:  SCSI over Bulk-Only; quirks = 0x4000
umass0:4:0: Attached to scbus4
da0 at umass-sim0 bus 0 scbus4 target 0 lun 0
da0: <USB Flash Disk 1100> Removable Direct Access SPC-2 SCSI device
da0: Serial Number FBH1210240200727
da0: 40.000MB/s transfers
da0: 7648MB (15663104 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>
GEOM: da0: the secondary GPT header is not in the last LBA.
lo0: link state changed to UP
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 556 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20200425/ee383f9e/attachment.sig>


More information about the freebsd-arm mailing list