From owner-freebsd-arm@freebsd.org Thu Aug 4 18:42:33 2016 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 5A29CBAED94 for ; Thu, 4 Aug 2016 18:42:33 +0000 (UTC) (envelope-from karl@denninger.net) Received: from mail.denninger.net (denninger.net [70.169.168.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18F9617DB for ; Thu, 4 Aug 2016 18:42:32 +0000 (UTC) (envelope-from karl@denninger.net) Received: from [192.168.1.40] (Karl-Desktop.Denninger.net [192.168.1.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.denninger.net (Postfix) with ESMTPSA id E69592039C8 for ; Thu, 4 Aug 2016 13:42:30 -0500 (CDT) Subject: -HEAD U-Boot *DOES* work on Raspberry PI2 [[WAS Re: U-boot issues on Banana Pi M2]] To: freebsd-arm@freebsd.org References: <0403B533-40BC-4674-84CC-2CC3F732B45E@rcn.com> From: Karl Denninger Message-ID: <551e8983-e529-b3c3-86f5-73d68c4b7fd2@denninger.net> Date: Thu, 4 Aug 2016 13:42:28 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-512; boundary="------------ms060507060801060700020200" X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Aug 2016 18:42:33 -0000 This is a cryptographically signed message in MIME format. --------------ms060507060801060700020200 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Heh lookie here: I just checked out the new u-boot code, patched it (manually, since some paths and names internally have changed) with the RPI2 patch set, and....= KDB: debugger backends: ddb KDB: current backend: ddb 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-BETA1 #0 r302412: Fri Jul 8 14:08:42 UTC 2016 root@releng2.nyi.freebsd.org:/usr/obj/arm.armv6/usr/src/sys/RPI2 arm FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0) VT: init without driver. sema_sysinit CPU: Cortex A7 rev 5 (Cortex-A core) Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext WB enabled LABT branch prediction disabled LoUU:2 LoC:3 LoUIS:2 Cache level 1: 32KB/64B 4-way data cache WB Read-Alloc Write-Alloc 32KB/32B 2-way instruction cache Read-Alloc Cache level 2: 512KB/64B 8-way unified cache WB Read-Alloc Write-Alloc real memory =3D 989851648 (943 MB) avail memory =3D 957444096 (913 MB) FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs random: entropy device external interface kbd0 at kbdmux0 ofwbus0: simplebus0: mem 0x3f000000-0x3fffffff on ofwbus0 local_intc0: mem 0x40000000-0x400000ff on simplebus0 generic_timer0: on ofwbus0 =2E.... It works. But I thought we were told it didn't due to changes in the API component? Note that this version supports a USB keyboard.... I can break into the boot with it; I get a complaint about an interrupt timeout on the console that repeats every few seconds during the time I've done so (once I do so) but it doesn't impact being able to get commands to the system and see the outcome. The only thing I needed to do was hard-code one buffer size to the minimum passed from the realloc call since the variable was undefined.=20 Other than that -- it works. Now about rolling forward our u-boot version..... not sure what has to be done in that regard but the actual patching against HEAD in the u-boot git tree only took me about 15 minutes, and if we DID have a current u-boot we'd have a USB keyboard for the Raspberry Pi2s (at least, and possibly others in the series) all the way through the boot sequence. On 8/3/2016 21:44, Erik Moe wrote: > I spent some time looking into this issue. I believe that the u-boot-b= ananapim2 port is broken because the underlining u-boot code is broken, a= t least for the BPI M2. I built u-boot directly from source trying both = the v2016.07 and v2016.09-rc1 releases and saw the same failure: "Net: = data abort". I built u-boot from HEAD as of 26fb8db since there were a n= umber of commits for sunxi. I=E2=80=99m not sure which one resolved the i= ssue, but by checking out the latest sources and applying the freebsd pat= ches I was able to get my BPI M2 to boot: > > U-Boot SPL 2016.09-rc1-00211-g26fb8db-dirty (Aug 02 2016 - 04:43:10) > DRAM: 1024 MiB > Trying to boot from MMC1 > > > U-Boot 2016.09-rc1-00211-g26fb8db-dirty (Aug 02 2016 - 04:43:10 -0500) = Allwinner Technology > > CPU: Allwinner A31s (SUN6I) > Model: Sinovoip BPI-M2 > DRAM: 1 GiB > WARNING: Caches not enabled > MMC: SUNXI SD/MMC: 0 > reading u-boot.env > > ** Unable to read "u-boot.env" from mmc0:1 ** > Using default environment > > In: serial > Out: serial > Err: serial > Net: eth0: ethernet@01c30000 > starting USB... > USB0: USB EHCI 1.00 > USB1: USB OHCI 1.0 > scanning bus 0 for devices... 2 USB Device(s) found > Hit any key to stop autoboot: 0 > Booting from: mmc 0 ubldr.bin > reading ubldr.bin > 224660 bytes read in 51 ms (4.2 MiB/s) > ## No elf image at address 0x42000000 > ## Starting application at 0x42000000 ... > Consoles: U-Boot console > Compatible U-Boot API signature found @0x7af3f4e8 > > FreeBSD/armv6 U-Boot loader, Revision 1.2 > (root@dora, Sat Jul 16 04:11:42 CDT 2016) > > DRAM: 1024MB > MMC Device 1 not found > Number of U-Boot devices: 1 > U-Boot env: loaderdev=3D'mmc 0' > Found U-Boot device: disk > Checking unit=3D0 slice=3D partition=3D... good. > Booting from disk0s2a: > /boot/kernel/kernel data=3D0x65cd64+0x12729c syms=3D[0x4+0x8e630+0x4+0x= a3375] > > Hit [Enter] to boot immediately, or any other key for command prompt. > Booting [/boot/kernel/kernel]... > /boot/dtb/bananapim2.dtb size=3D0x6151 > Loaded DTB from file 'bananapim2.dtb'. > Kernel entry at 0x42200100... > Kernel args: (null) > KDB: debugger backends: ddb > KDB: current backend: ddb > Copyright (c) 1992-2016 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 199= 4 > The Regents of the University of California. All rights reserve= d. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 12.0-CURRENT #0 24eff34(master): Sat Jul 16 04:23:13 CDT 2016 > root@dora:/usr/home/emoe/Projects/ARM/bannapi-m2/obj/arm.armv6/usr/= home/emoe/Projects/ARM/src/sys/ALLWINNER arm > FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on L= LVM 3.8.0) > WARNING: WITNESS option enabled, expect reduced performance. > VT: init without driver. > CPU: Cortex A7 rev 3 (Cortex-A core) > Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext > WB enabled LABT branch prediction disabled > LoUU:2 LoC:3 LoUIS:2 > Cache level 1: > 32KB/64B 4-way data cache WB Read-Alloc Write-Alloc > 32KB/32B 2-way instruction cache Read-Alloc > Cache level 2: > 1024KB/64B 8-way unified cache WB Read-Alloc Write-Alloc > real memory =3D 1073741824 (1024 MB) > avail memory =3D 1035898880 (987 MB) > FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs > random: entropy device external interface > kbd0 at kbdmux0 > ofwbus0: > aw_ccu0: on ofwbus0 > . > . > . > > Thanks, > Erik > >> On Jul 28, 2016, at 6:49 PM, Erik Moe wrote: >> >> I=E2=80=99m having some issues with the u-boot-bananapim2 in ports. I= t looks like a data abort exception. Does anybody else have a BPI M2 tha= t this port is working for them? If I read this right it=E2=80=99s dying= in the following function: >> >> 4a00218c g F .text 00000038 sunxi_gpio_set_cfgpin >> >> I think someone reported a similar but not the same issue upstream: h= ttp://lists.denx.de/pipermail/u-boot/2016-June/258837.html >> >> Thanks, >> Erik >> >> >> U-Boot SPL 2016.07 (Jul 16 2016 - 02:40:04) >> DRAM: 1024 MiB >> Trying to boot from MMC1 >> >> >> U-Boot 2016.07 (Jul 16 2016 - 02:40:04 -0500) Allwinner Technology >> >> CPU: Allwinner A31s (SUN6I) >> Model: Sinovoip BPI-M2 >> DRAM: 1 GiB >> WARNING: Caches not enabled >> MMC: SUNXI SD/MMC: 0 >> reading u-boot.env >> >> ** Unable to read "u-boot.env" from mmc0:1 ** >> Using default environment >> >> In: serial >> Out: serial >> Err: serial >> Net: data abort >> pc : [<7ef5f180>] lr : [<00000000>] >> reloc pc : [<4a002180>] lr : [] >> sp : 7af35f84 ip : 7efab502 fp : 00000017 >> r10: 7efaaefe r9 : 7af3cee8 r8 : 000040a0 >> r7 : 7ef9ee14 r6 : 00000000 r5 : 00000001 r4 : 00000000 >> r3 : 0000000f r2 : 00000001 r1 : 00000000 r0 : ea00000e >> Flags: nzCv IRQs off FIQs off Mode SVC_32 >> Resetting CPU ... >> >> resetting ... >> > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" --=20 Karl Denninger karl@denninger.net /The Market Ticker/ /[S/MIME encrypted email preferred]/ --------------ms060507060801060700020200 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0BBwEAAKCC Bl8wggZbMIIEQ6ADAgECAgEpMA0GCSqGSIb3DQEBCwUAMIGQMQswCQYDVQQGEwJVUzEQMA4G A1UECBMHRmxvcmlkYTESMBAGA1UEBxMJTmljZXZpbGxlMRkwFwYDVQQKExBDdWRhIFN5c3Rl bXMgTExDMRwwGgYDVQQDExNDdWRhIFN5c3RlbXMgTExDIENBMSIwIAYJKoZIhvcN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