Date: Thu, 5 Jan 2017 20:07:05 -0800 From: Thomas Skibo <thomasskibo@yahoo.com> To: meloun.michal@gmail.com Cc: Adrian Chadd <adrian.chadd@gmail.com>, "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org> Subject: Re: Finally bringing FreeBSD to Parallella Message-ID: <5540717C-E184-421B-8E85-A1C17BB2A854@yahoo.com> In-Reply-To: <ce4771f4-f157-eb11-32d4-89b00d1c4adf@gmail.com> References: <2CAC521E-AB65-453F-B1CC-DE025DA43596@yahoo.com> <CAJ-Vmo=cCBS4-W_q0RKYT4pnkdoKj_kSrk8eem%2BeDOqZt2W-AQ@mail.gmail.com> <4B0F21E0-D0FD-409D-81A5-C0DBBFF26251@yahoo.com> <CAJ-VmondYWRWtE=a68qO3YMzX50=YD1sXPoJL3RtvS4kVTtiAg@mail.gmail.com> <4CA92CCC-79C3-4E86-9B7F-3FAA80D1CF5E@yahoo.com> <ce4771f4-f157-eb11-32d4-89b00d1c4adf@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Jan 4, 2017, at 10:57 PM, Michal Meloun <melounmichal@gmail.com> = wrote: >=20 >=20 > With LINUX_BOOT_ABI option in kernel config file you can boot kernel > directly from uImage and pass right DTB to kernel directly from = u-boot. >=20 > The following example is what I using for Jetson TK1 board (and it = uses > mkubootimage stolen from netbsd). >=20 > mkubootimage -A arm -C none -O linux -T kernel -a 0x80200000 -e > 0x80200100 -n jetson-tk1 <obj path>/tegra/sys/JETSON-TK1/kernel <obj > path>/tegra/sys/JETSON-TK1/uImage >=20 > and from u-boot: >=20 > bootp 0x80200000 <IP addr>:/tegra/sys/JETSON-TK1/uImage > bootp 0x80100000 <IP > addr>:/tegra/sys/JETSON-TK1/tegra124-jetson-tk1-fbsd.dtb > setenv bootargs > = FreeBSD:boot_single=3D1,boot_verbose=3D0,vfs.root.mountfrom=3Dufs:/dev/ada= 0s1afdt > addr 0x80100000 > fdt boardsetup > fdt chosen > bootm 0x80200000 - 0x80100000 >=20 >=20 > Michal Thanks! I think that=92s the ticket. I managed to get this to work on a = Zedboard. I built a Zedboard kernel with LINUX_BOOT_ABI and packaged it in a = uImage using similar options to yours (see below). I put a Zedboard = .DTB file in the boot partition and booted FreeBSD using the exact = u-boot commands that are built in to Parallella. It should be just a = matter of using this same uImage but a .DTB for Parallella (and I think = the example I posted earlier would work). Who wants to test it? It=92s a matter of downloading the Zedboard SD = image and replacing the files in the boot partition. My mkimage options: mkimage -A arm -O linux -T kernel -C none -a 0x100000 -e = 0x100100 -n parallella-freebsd -d kernel uImage =97Thomas U-Boot 2016.01 (Aug 02 2016 - 13:37:53 -0700) Model: Zynq Zed Development Board Board: Xilinx Zynq DRAM: ECC disabled 512 MiB MMC: sdhci@e0100000: 0 SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, = total 32 MiB In: serial@e0001000 Out: serial@e0001000 Err: serial@e0001000 Model: Zynq Zed Development Board Board: Xilinx Zynq Net: ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id eth0: ethernet@e000b000 Hit any key to stop autoboot: 0=20 Zynq> fatload mmc 0 0x3000000 uImage reading uImage 8170816 bytes read in 727 ms (10.7 MiB/s) Zynq> fatload mmc 0 0x2a00000 devicetree.dtb reading devicetree.dtb 3431 bytes read in 14 ms (239.3 KiB/s) Zynq> bootm 0x3000000 - 0x2a00000 ## Booting kernel from Legacy Image at 03000000 ... Image Name: parallella-freebsd Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 8170752 Bytes =3D 7.8 MiB Load Address: 00100000 Entry Point: 00100100 Verifying Checksum ... OK ## Flattened Device Tree blob at 02a00000 Booting using the fdt blob at 0x2a00000 Loading Kernel Image ... OK Loading Device Tree to 1f312000, end 1f315d66 ... OK Starting kernel ... Copyright (c) 1992-2016 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-RELEASE-p1 #0 r306420M: Thu Jan 5 19:29:24 PST 2017 skibo@ashbury:/usr/obj/arm.armv6/usr/src/sys/PARALLELLA arm FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on = LLVM 3.8.0) CPU: Cortex A9-r3 rev 0 (Cortex-A core) Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext WB enabled LABT branch prediction disabled LoUU:2 LoC:2 LoUIS:2=20 Cache level 1:=20 32KB/32B 4-way data cache WB Read-Alloc Write-Alloc 32KB/32B 4-way instruction cache Read-Alloc real memory =3D 536866816 (511 MB) avail memory =3D 516050944 (492 MB) FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs random: entropy device external interface ofwbus0: <Open Firmware Device Tree> simplebus0: <Flattened device tree simple bus> on ofwbus0 simplebus1: <Flattened device tree simple bus> on ofwbus0 l2cache0: <PL310 L2 cache controller> mem 0xf02000-0xf02fff on = simplebus0 l2cache0: cannot allocate IRQ, not using interrupt l2cache0: Part number: 0x3, release: 0x8 l2cache0: L2 Cache enabled: 512KB/32B 8 ways gic0: <ARM Generic Interrupt Controller> mem = 0xf01000-0xf01fff,0xf00100-0xf001ff on simplebus0 gic0: pn 0x390, arch 0x1, rev 0x2, implementer 0x43b irqs 96 mp_tmr0: <ARM MPCore Timers> mem 0xf00200-0xf002ff,0xf00600-0xf0061f on = simplebus0 Timecounter "MPCore" frequency 333333333 Hz quality 800 Event timer "MPCore" frequency 333333333 Hz quality 1000 zy7_slcr0: <Zynq-7000 slcr block> mem 0-0xfff on simplebus0 zy7_devcfg0: <Zynq devcfg block> mem 0x7000-0x7fff on simplebus0 uart0: <Cadence UART> mem 0x1000-0x1fff on simplebus1 uart0: console (-1,n,8,1) ehci0: <Zynq-7000 EHCI USB 2.0 controller> mem 0x2000-0x2fff on = simplebus1 usbus0: EHCI version 1.0 usbus0: stop timeout usbus0 on ehci0 gpio0: <Zynq-7000 GPIO driver> mem 0xa000-0xafff on simplebus1 gpiobus0: <GPIO bus> on gpio0 gpioc0: <GPIO controller> on gpio0 cgem0: <Cadence CGEM Gigabit Ethernet Interface> mem 0xb000-0xbfff on = simplebus1 miibus0: <MII bus> on cgem0 ukphy0: <Generic IEEE 802.3u media interface> PHY 0 on miibus0 ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto cgem0: Ethernet address: 00:01:0a:11:22:33 sdhci_fdt0: <Zynq-7000 generic fdt SDHCI controller> mem = 0x100000-0x100fff on simplebus1 sdhci_fdt0: 1 slot(s) allocated mmc0: <MMC/SD bus> on sdhci_fdt0 cryptosoft0: <software crypto> Timecounters tick every 10.000 msec usbus0: 480Mbps High Speed USB v2.0 ugen0.1: <Xilinx> at usbus0 uhub0: <Xilinx EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on = usbus0 mmcsd0: 16GB <SDHC SU16G 8.0 SN 0B77EC17 MFG 01/2014 by 3 SD> at mmc0 = 48.0MHz/4bit/65535-block Release APs Trying to mount root from ufs:mmcsd0s2a []... warning: no time-of-day clock registered, system time will not be set = accurately uhub0: 1 port with 1 removable, self powered Setting hostuuid: a2af1500-d132-11e6-a27a-00010a112233. Setting hostid: 0xb3d7db19. No suitable dump device was found. Starting file system checks: /dev/mmcsd0s2a: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/mmcsd0s2a: clean, 60742 free (38 frags, 7588 blocks, 0.0% = fragmentation) Mounting local filesystems: =85
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5540717C-E184-421B-8E85-A1C17BB2A854>