From owner-freebsd-arm@freebsd.org Fri Jan 6 04:09:19 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27D78CA0D6A for ; Fri, 6 Jan 2017 04:09:19 +0000 (UTC) (envelope-from thomasskibo@yahoo.com) Received: from nm10.bullet.mail.gq1.yahoo.com (nm10.bullet.mail.gq1.yahoo.com [98.136.218.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00CFA1E70 for ; Fri, 6 Jan 2017 04:09:18 +0000 (UTC) (envelope-from thomasskibo@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1483675626; bh=ieZ/DhCAXQEAMR81QynRshl0rjolbZIgSWCrWD9LG9Y=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=kOq8ksAuiuL4WjDDGqw/a2ykUedwsx/bffBxzr4Cy8Sv9ceysxK3FXGxQSfTgbBWhejUAz/hXId+blmsfbdgM4Xl466qkkmfF6WcLI3jNYmBmzQTw71feTXjOgcnuO3goDfD97JcE+phhRrHpwgs60kL0tADHLwG5p4c6GKIvq2wwVbUT+kXGoErgvr8zpZRY1PQmVfpfm4chi3BrRG0JqiphXVi16pi6fJ2px+l9OuejxMmhRWWQ896e8D/63Y0x6QVyhyVihbL4d9HLw5x5puB6j0lwEZ7SFavDglDp1Zpxznba9a92qJJ+gab+1F8eovNUnXLHOu4jempmyQLrQ== Received: from [98.137.12.189] by nm10.bullet.mail.gq1.yahoo.com with NNFMP; 06 Jan 2017 04:07:06 -0000 Received: from [98.136.164.70] by tm10.bullet.mail.gq1.yahoo.com with NNFMP; 06 Jan 2017 04:07:05 -0000 Received: from [127.0.0.1] by smtp232.mail.gq1.yahoo.com with NNFMP; 06 Jan 2017 04:07:05 -0000 X-Yahoo-Newman-Id: 985444.95332.bm@smtp232.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: ZUGy3aMVM1nvJdbsmxQzz6UAplhtCvidq6i4cdpvZMh5E1i uNkwxgG54OKULhlnbNZ_ISJ32JSqibL5Kv6lUFikuHCCF.tl.a8x0P92q8B3 BbtaG5LMpe5EWbiYeqxgOM8k_6sfYi9B_oc3nRykZ29D4DN6rNbd6qRXyoky BFuDRppUYyyxihNRJ6j8ulxSkzmQDNbjR8WEm2qkh_yRGQ3.LYEDZ37FIYMs Fq31KsoqrHB691Dj.eRsdQp7VLd33VmgFsZvvDFdQbQzlnbOCqV2ChiR29XB ufJdBwsDYsLy8GrdoERmxeL9EF5YoRGrzCJL8ygbYPQQbX0RLfvowzLHC4n0 qqKaU6pFg2cSinqK3lE6MfryfzEX6D151uU9fRxTmRPZrYvtYKEO5Y9aaWa7 s2wrrPDd_bzwCYS4kLPoISOaguMIoPr.aJUGnfIVFYe4G0XU4lcFdkBiAuvF nT3bMkX14f0Ni750w4VxQiLkw60ILSsL5TTHIMCOHxXVblpKzV7tojdOABxb Co7I7JwHwIzO9KIqColcRzQO6g3WAPQBF13JbB0rjCU4p3OaIkOFxq4xeHNt XN717unPpViI3tTc- X-Yahoo-SMTP: .8Dytk6swBAeTUTcf.ezO8BKaYfn.mUV Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Finally bringing FreeBSD to Parallella From: Thomas Skibo In-Reply-To: Date: Thu, 5 Jan 2017 20:07:05 -0800 Cc: Adrian Chadd , "freebsd-arm@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <5540717C-E184-421B-8E85-A1C17BB2A854@yahoo.com> References: <2CAC521E-AB65-453F-B1CC-DE025DA43596@yahoo.com> <4B0F21E0-D0FD-409D-81A5-C0DBBFF26251@yahoo.com> <4CA92CCC-79C3-4E86-9B7F-3FAA80D1CF5E@yahoo.com> To: meloun.michal@gmail.com X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 04:09:19 -0000 > On Jan 4, 2017, at 10:57 PM, Michal Meloun = 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 /tegra/sys/JETSON-TK1/kernel path>/tegra/sys/JETSON-TK1/uImage >=20 > and from u-boot: >=20 > bootp 0x80200000 :/tegra/sys/JETSON-TK1/uImage > bootp 0x80100000 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: simplebus0: on ofwbus0 simplebus1: on ofwbus0 l2cache0: 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: mem = 0xf01000-0xf01fff,0xf00100-0xf001ff on simplebus0 gic0: pn 0x390, arch 0x1, rev 0x2, implementer 0x43b irqs 96 mp_tmr0: mem 0xf00200-0xf002ff,0xf00600-0xf0061f on = simplebus0 Timecounter "MPCore" frequency 333333333 Hz quality 800 Event timer "MPCore" frequency 333333333 Hz quality 1000 zy7_slcr0: mem 0-0xfff on simplebus0 zy7_devcfg0: mem 0x7000-0x7fff on simplebus0 uart0: mem 0x1000-0x1fff on simplebus1 uart0: console (-1,n,8,1) ehci0: mem 0x2000-0x2fff on = simplebus1 usbus0: EHCI version 1.0 usbus0: stop timeout usbus0 on ehci0 gpio0: mem 0xa000-0xafff on simplebus1 gpiobus0: on gpio0 gpioc0: on gpio0 cgem0: mem 0xb000-0xbfff on = simplebus1 miibus0: on cgem0 ukphy0: 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: mem = 0x100000-0x100fff on simplebus1 sdhci_fdt0: 1 slot(s) allocated mmc0: on sdhci_fdt0 cryptosoft0: Timecounters tick every 10.000 msec usbus0: 480Mbps High Speed USB v2.0 ugen0.1: at usbus0 uhub0: on = usbus0 mmcsd0: 16GB 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