Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Dec 2015 10:18:30 -0800
From:      Thomas Skibo <thomasskibo@yahoo.com>
To:        freebsd-arm@freebsd.org
Cc:        Thomas Skibo <thomasskibo@yahoo.com>
Subject:   u-boot and ubldr on arm64
Message-ID:  <5695944F-A052-4959-8F9A-ACD4CD3413D6@yahoo.com>

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

Hello.

I=E2=80=99ve been taking a stab at getting an arm64 kernel running on =
qemu acting as a Zynq Ultrascale evaluation board.  The first hurdle was =
getting the u-boot API and ubldr to compile and run in 64-bit mode.  =
I=E2=80=99ve managed to get that much to work and wanted to let you know =
in case this is interesting and I can share the code.  Or, so you can =
tell me that u-boot/ubldr is the wrong approach.

In any case, here=E2=80=99s how far it boots.  The next step is to whip =
my kernel configuration into shape but I may have to put this aside =
until after the holidays.

Cheers,
=E2=80=94Thomas

=E2=80=94
Thomas Skibo
thomasskibo@yahoo.com


Script started on Fri 18 Dec 2015 09:34:49 AM PST
skibo@robleda:~/Projects/Zynq/qemu$ source GO.txt=20
WARNING: Image format was not specified for '../debug.qemu/SDCARD.img' =
and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, =
write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
QEMU 2.4.93 monitor - type 'help' for more information
(qemu) c=1B[K
(qemu)=20

U-Boot 2015.07-00006-gd3fba7f-dirty (Dec 18 2015 - 09:30:17 -0800) =
Xilinx ZynqMP

I2C:   ready
DRAM:  1 GiB
Enabling Caches...

EL Level:	EL1
NAND:  ERROR:arasan_nand_reset timedout
ERROR:arasan_nand_read_buf timedout:Buff RDY
ERROR:arasan_nand_read_buf timedout:Xfer CMPLT
ERROR:arasan_nand_read_buf timedout:Buff RDY
ERROR:arasan_nand_read_buf timedout:Xfer CMPLT
ERROR:arasan_nand_read_buf timedout:Buff RDY
ERROR:arasan_nand_read_buf timedout:Xfer CMPLT
ERROR:arasan_nand_read_buf timedout:Buff RDY
ERROR:arasan_nand_read_buf timedout:Xfer CMPLT
arasan_nand_init: nand_scan_ident failed
NAND init failed
0 MiB
MMC:   zynq_sdhci: 0
Using default environment

In:    serial
Out:   serial
Err:   serial
Bootmode: JTAG_MODE
SCSI:  SATA link 0 timeout.
AHCI 0001.0000 32 slots 2 ports 1.5 Gbps 0x3 impl SATA mode
flags: ncq only=20
scanning bus for devices...
Found 0 device(s).
Net:   Gem.ff0b0000
Hit any key to stop autoboot:  5 =08=08=08 0=20
ZynqMP> fatls mmc 0
   254704   ubldr=20
      172   uenv.txt=20
   160405   demo=20
     1408   board.dtb=20

4 file(s), 0 dir(s)

ZynqMP> fatload mmc 0 0x1000000 ubldr
reading ubldr
254704 bytes read in 72 ms (3.4 MiB/s)
ZynqMP> setenv fdt_file board.dtb
ZynqMP> bootelf 0x1000000
## Starting application at 0x010000b0 ...
Consoles: U-Boot console =20
Compatible U-Boot API signature found @3df02860

FreeBSD/aarch64 U-Boot loader, Revision 1.2
(skibo@ashbury, Fri Dec 18 09:33:17 PST 2015)

DRAM: 1024MB
Number of U-Boot devices: 2
U-Boot env: loaderdev not set, will probe all devices.
Found U-Boot device: disk
  Probing all disk devices...
  Checking unit=3D0 slice=3D<auto> partition=3D<auto>... good.
Booting from disk0s2a:
=
|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08=
\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08=
-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08=
/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08=
|=08/=08-=08\=08|=08/boot/kernel/kernel data=3D0x5ead28+0x2f4620 =
/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08=
|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08=
\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08syms=3D[0x8+0xc0120-=08\=08|=08=
/=08-=08\=08+0x8+0xbde15|=08/=08-=08\=08|=08/=08]

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel] in 9 seconds... Booting =
[/boot/kernel/kernel] in 8 seconds... Booting [/boot/kernel/kernel] in 7 =
seconds...=20

Type '?' for a list of commands, 'help' for more detailed help.
loader> boot -v
=1B[37m=1B[44mBooting...=1B[m
\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/boot/kernel/board.dtb =
size=3D0x580
Loaded DTB from file 'board.dtb'.
/=08-=08\=08|=08/=08Kernel entry at 0x0x1201000...
Kernel args: -v
KDB: debugger backends: ddb
KDB: current backend: ddb
No CPU data, limiting to 1 core
Copyright (c) 1992-2015 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 11.0-CURRENT #11 r292424M: Fri Dec 18 01:16:09 PST 2015
    skibo@ashbury:/usr/obj/arm64.aarch64/usr/src/sys/EP108 arm64
FreeBSD clang version 3.7.0 (tags/RELEASE_370/final 246257) 20150906
WARNING: WITNESS option enabled, expect reduced performance.
Preloaded elf kernel "/boot/kernel/kernel" at 0xffffff8000a61000.
Preloaded dtb "/boot/kernel/board.dtb" at 0xffffff8000a61a28.
CPU(0): ARM Cortex-A53 r0p4
CPU0 affinity: 0.0.0.0
FreeBSD/SMP: Multiprocessor System Detected: 1 CPUs
ULE: setup cpu 0
random: entropy device external interface
null: <full device, null device, zero device>
openfirm: <Open Firmware control device>
mem: <memory>
nfslock: pseudo-device
crypto: <crypto core>
random: harvesting attach, 8 bytes (4 bits) from nexus0
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
random: harvesting attach, 8 bytes (4 bits) from simplebus0
simplebus1: <Flattened device tree simple bus> on ofwbus0
random: harvesting attach, 8 bytes (4 bits) from simplebus1
random: harvesting attach, 8 bytes (4 bits) from ofwbus0
gic0: <ARM Generic Interrupt Controller> mem =
0xf9010000-0xf901ffff,0xf902f000-0xf9030fff,0xf9040000-0xf905ffff,0xf906f0=
00-0xf9070fff on simplebus0
gic0: pn 0x0, arch 0x0, rev 0x0, implementer 0x0 irqs 192
random: harvesting attach, 8 bytes (4 bits) from gic0
uart0: <Cadence UART> mem 0xff000000-0xff000fff irq 53 on simplebus1
uart0: console (115200,n,8,1)
uart0: fast interrupt
uart0: PPS capture mode 2 (DCD)
random: harvesting attach, 8 bytes (4 bits) from uart0
uart1: <Cadence UART> mem 0xff010000-0xff010fff irq 54 on simplebus1
uart1: fast interrupt
uart1: PPS capture mode 2 (DCD)
random: harvesting attach, 8 bytes (4 bits) from uart1
simplebus1: <ethernet@ff0b0000> mem 0xff0b0000-0xff0b0fff irq 89,89 =
compat cadence,gem (no driver attached)
cryptosoft0: <software crypto>
crypto: assign cryptosoft0 driver id 0, flags 100663296
crypto: cryptosoft0 registers alg 1 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 2 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 3 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 4 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 5 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 16 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 6 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 7 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 18 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 19 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 20 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 8 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 15 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 9 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 10 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 13 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 14 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 11 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 22 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 23 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 25 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 24 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 26 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 27 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 28 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 21 flags 0 maxoplen 0
crypto: cryptosoft0 registers alg 17 flags 0 maxoplen 0
random: harvesting attach, 8 bytes (4 bits) from cryptosoft0
Device configuration finished.
procfs registered
panic: No usable event timer found!
cpuid =3D 0
KDB: stack backtrace:
db_trace_self() at db_trace_self_wrapper+0x28
	 pc =3D 0xffffff80004460b4  lr =3D 0xffffff800004eaf8
	 sp =3D 0xffffff800000b8e0  fp =3D 0xffffff800000ba00

db_trace_self_wrapper() at vpanic+0x170
	 pc =3D 0xffffff800004eaf8  lr =3D 0xffffff80001c9088
	 sp =3D 0xffffff800000ba10  fp =3D 0xffffff800000ba90

vpanic() at panic+0x4c
	 pc =3D 0xffffff80001c9088  lr =3D 0xffffff80001c9118
	 sp =3D 0xffffff800000baa0  fp =3D 0xffffff800000bb20

panic() at cpu_initclocks_bsp+0x3b4
	 pc =3D 0xffffff80001c9118  lr =3D 0xffffff800045bff8
	 sp =3D 0xffffff800000bb30  fp =3D 0xffffff800000bb80

cpu_initclocks_bsp() at initclocks+0x28
	 pc =3D 0xffffff800045bff8  lr =3D 0xffffff8000171994
	 sp =3D 0xffffff800000bb90  fp =3D 0xffffff800000bb90

initclocks() at mi_startup+0x11c
	 pc =3D 0xffffff8000171994  lr =3D 0xffffff800016ea90
	 sp =3D 0xffffff800000bba0  fp =3D 0xffffff800000bbd0

mi_startup() at virtdone+0x5c
	 pc =3D 0xffffff800016ea90  lr =3D 0xffffff800000108c
	 sp =3D 0xffffff800000bbe0  fp =3D 0x0000000000000000

KDB: enter: panic
[ thread pid 0 tid 100000 ]
Stopped at      kdb_enter+0x40:
db>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5695944F-A052-4959-8F9A-ACD4CD3413D6>