Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Jun 2019 15:34:09 -0600
From:      Kim Shrier <kim@westryn.net>
To:        =?utf-8?Q?S=C3=B8ren_Schmidt?= <deepcore.dk@gmail.com>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>, James Shuriff <james@opentech.cc>, Marcin Wojtas <mw@semihalf.com>
Subject:   Re: Espressobin anyone ?
Message-ID:  <12BC81D2-C7E8-4F76-97C4-AA1DC7FA4E66@westryn.net>
In-Reply-To: <7CDBFAF1-C36F-4A2D-8D80-CFF1F03CD2B9@deepcore.dk>
References:  <F4B29A2F-D94B-4E44-B5D7-8F29B63BC286@deepcore.dk> <CAPv3WKdFWkxLLY9orLee8G9Z=vbVrGoRAJv%2BhcM%2BmE%2B4Ue9SDQ@mail.gmail.com> <334C83B6-1F12-436A-866B-947977A34D4D@deepcore.dk> <E73AFF5D-43CA-41A7-BDBA-ADEF2D342479@deepcore.dk> <BN7PR06MB518773EC2F92D56E1BE6587BAA090@BN7PR06MB5187.namprd06.prod.outlook.com> <051F7682-B3EC-49D8-B52A-2A8C75BEE757@gmail.com> <BN7PR06MB51872A92C05A6EFC02C32BFCAA090@BN7PR06MB5187.namprd06.prod.outlook.com> <F36EE3C6-17E6-4229-BFE1-D7BE81589D28@gmail.com> <9B48E915-C705-4582-837B-C92B40AD63EB@westryn.net> <7CDBFAF1-C36F-4A2D-8D80-CFF1F03CD2B9@deepcore.dk>

next in thread | previous in thread | raw e-mail | index | archive | help


> On Jun 2, 2019, at 10:40 AM, S=C3=B8ren Schmidt =
<deepcore.dk@gmail.com> wrote:
>=20
> Hi
>=20
> I managed to get it to boot with the following:
>=20
> setenv fdt_name 'efi/boot/armada-3720-espressobin.dtb'
> setenv image_name 'efi/boot/bootaa64.efi'
> setenv bootmmc 'mmc dev 0; fatload mmc 0:1 $kernel_addr =
$image_name;fatload mmc 0:1 $fdt_addr $fdt_name; bootefi $kernel_addr =
$fdt_addr'
> run bootmmc
>=20
> Then when the FreeBSD loader fails to load the kernel enter:
>=20
> set currdev=3Ddisk0p2
> Boot
>=20
> That will boot the kernel:
>=20
> /boot/kernel/kernel text=3D0x92aab0 data=3D0x190f48+0x84ab1c =
syms=3D[0x8+0x137580+0x8+0x12372b]
> Using DTB provided by EFI at 0x8000000.
> ---<<BOOT>>---
> KDB: debugger backends: ddb
> KDB: current backend: ddb
> Copyright (c) 1992-2019 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 r348210 GENERIC arm64
> FreeBSD clang version 8.0.0 (tags/RELEASE_800/final 356365) (based on =
LLVM 8.0.0)
> WARNING: WITNESS option enabled, expect reduced performance.
> VT: init without driver.
> Starting CPU 1 (1)
> FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
> arc4random: WARNING: initial seeding bypassed the cryptographic random =
device because it was not yet seeded and the knob =
'bypass_before_seeding' was enabled.
> random: entropy device external interface
> MAP 3e679000 mode 2 pages 1
> MAP 3ffa6000 mode 2 pages 1
> kbd0 at kbdmux0
> ofwbus0: <Open Firmware Device Tree>
> simplebus0: <Flattened device tree simple bus> on ofwbus0
> simplebus1: <Flattened device tree simple bus> on simplebus0
> psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
> gic0: <ARM Generic Interrupt Controller v3.0> mem =
0x1d00000-0x1d0ffff,0x1d40000-0x1d7ffff irq 37 on simplebus1
> generic_timer0: <ARMv8 Generic Timer> irq 0,1,2,3 on ofwbus0
> Timecounter "ARM MPCore Timecounter" frequency 12500000 Hz quality =
1000
> Event timer "ARM MPCore Eventtimer" frequency 12500000 Hz quality 1000
> cpulist0: <Open Firmware CPU Group> on ofwbus0
> cpu0: <Open Firmware CPU> on cpulist0
> cpu1: <Open Firmware CPU> on cpulist0
> uart0: <Marvell Armada 3700 UART> mem 0x12000-0x123ff irq 8 on =
simplebus1
> uart0: console (115200,n,8,1)
> mvneta0: <NETA controller> mem 0x30000-0x33fff irq 10 on simplebus1
> mvneta0: version is 10
> mvneta0: Ethernet address: f0:ad:4e:08:61:5e
> mvneta1: <NETA controller> mem 0x40000-0x43fff irq 11 on simplebus1
> mvneta1: Failed to acquire PHY mode from FDT.
> device_attach: mvneta1 attach returned 6
> xhci0: <Generic USB 3.0 controller> mem 0x58000-0x5bfff irq 31 on =
simplebus1
> xhci0: 32 bytes context size, 32-bit DMA
> usbus0 on xhci0
> ehci0: <Marvell Integrated USB 2.0 controller> mem 0x5e000-0x5ffff irq =
33 on simplebus1
> usbus1: EHCI version 1.0
> usbus1 on ehci0
> sdhci_xenon0: <Armada Xenon SDHCI controller> mem =
0xd0000-0xd02ff,0x1e808-0x1e80b irq 34 on simplebus1
> sdhci_xenon1: <Armada Xenon SDHCI controller> mem =
0xd8000-0xd82ff,0x17808-0x1780b irq 35 on simplebus1
> ahci0: <AHCI SATA controller> mem 0xe0000-0xe1fff irq 36 on simplebus1
> ahci0: AHCI v1.30 with 1 6Gbps ports, Port Multiplier supported with =
FBS
> ahcich0: <AHCI channel> at channel 0 on ahci0
> cryptosoft0: <software crypto>
> Timecounters tick every 1.000 msec
> mvneta0: link state changed to UP
> usbus0: 5.0Gbps Super Speed USB v3.0
> usbus1: 480Mbps High Speed USB v2.0
> ugen0.1: <Generic XHCI root HUB> at usbus0
> uhub0: <Generic XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on =
usbus0
> ugen1.1: <Marvell EHCI root HUB> at usbus1
> uhub1: <Marvell EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on =
usbus1
> Release APs...done
> CPU  0: ARM Cortex-A53 r0p4 affinity:  0
>  Instruction Set Attributes 0 =3D <CRC32,SHA2,SHA1,AES+PMULL>
> Trying to mount root from ufs:/dev/ufs/FreeBSD_Install [ro,noatime]...
>  Instruction Set Attributes 1 =3D <>
> Root mount waiting for:         Processor Features 0 =3D =
<GIC,AdvSIMD,Float,EL3 32,EL2 32,EL1 32,EL0 32>
>  usbus1         Processor Features 1 =3D <0>
>  usbus0      Memory Model Features 0 =3D <4k Granule,64k Granule,S/NS =
Mem,MixedEndian,16bit ASID,1TB PA>
>=20
>       Memory Model Features 1 =3D <>
>       Memory Model Features 2 =3D <32b CCIDX,48b VA>
>              Debug Features 0 =3D <2 CTX Breakpoints,4 Watchpoints,6 =
Breakpoints,PMUv3,Debug v8>
>              Debug Features 1 =3D <0>
>          Auxiliary Features 0 =3D <0>
>          Auxiliary Features 1 =3D <0>
> CPU  1: ARM Cortex-A53 r0p4 affinity:  1
> WARNING: WITNESS option enabled, expect reduced performance.
> uhub0: 2 ports with 2 removable, self powered
> uhub1: 1 port with 1 removable, self powered
> mountroot: waiting for device /dev/ufs/FreeBSD_Install...
> Mounting from ufs:/dev/ufs/FreeBSD_Install failed with error 19.
>=20
> Loader variables:
>   vfs.root.mountfrom=3Dufs:/dev/ufs/FreeBSD_Install
>   vfs.root.mountfrom.options=3Dro,noatime
>=20
> Manual root filesystem specification:
>   <fstype>:<device> [options]
>       Mount <device> using filesystem <fstype>
>       and with the specified (optional) option list.
>=20
>     eg. ufs:/dev/da0s1a
>         zfs:zroot/ROOT/default
>         cd9660:/dev/cd0 ro
>           (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /)
>=20
>   ?               List valid disk boot devices
>   .               Yield 1 second (for background tasks)
>   <empty line>    Abort manual input
>=20
> mountroot>=20
>=20
> However, the MMC/SDcard fails to be found so it will stop at mounting =
root.
>=20
> Having a disk on the SATA port can make it work from there though.
>=20
> The etherswitch is not found, but the single =E2=80=9Cnata=E2=80=9D =
port does show up..
>=20
> All in all the support is barely enough to boot a kernel, but a long =
way from being useful.
>=20
> You can use 12-stable as well, the same support seems to be present =
there, and its much more stable, -current as is today panics=E2=80=A6
>=20
> Oh, and you need to get the =E2=80=9Cright=E2=80=9D .dtb file, =
otherwise you get panic=E2=80=99s etc.
>=20
> YMMV=E2=80=A6
>=20
> -S=C3=B8ren
>=20
>=20

My milage varies.

I have experimented with many permutations of commands and nothing has =
worked so far.

The main difference I see between what I am doing and what you are doing =
is that I am trying to boot from a usb stick, not a sdcard.

It appears that after bootaa64.efi starts running, it does not see the =
usb interface or the usb stick plugged in to it.

I have also tried plugging in a sata drive that I built with an EFI =
partition and a freebsd-ufs partition that I had installed freebsd into.

In all cases, after bootaa64.efi is running, it seems determined to look =
on the sdcard for the kernel and it completely ignores the presence of =
the usb stick and the sata drive.

At the loader prompt, it appears that bootaa64.efi does not know about =
either of these devices.

    OK lsdev
    net devices:
        net0:

I suspect that there may be something wrong in the =
armada-3720-community-v7.dtb file but I don=E2=80=99t know how to =
investigate that or correct it.  Pointers would be appreciated.

Thanks,
Kim




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?12BC81D2-C7E8-4F76-97C4-AA1DC7FA4E66>