Date: Wed, 3 Aug 2016 21:44:09 -0500 From: Erik Moe <e.moe@rcn.com> To: freebsd-arm <freebsd-arm@freebsd.org> Cc: manu@FreeBSD.org Subject: Re: U-boot issues on Banana Pi M2 Message-ID: <DCDF4E6D-8F92-4C05-A128-75D544C4EC39@rcn.com> In-Reply-To: <0403B533-40BC-4674-84CC-2CC3F732B45E@rcn.com> References: <0403B533-40BC-4674-84CC-2CC3F732B45E@rcn.com>
next in thread | previous in thread | raw e-mail | index | archive | help
I spent some time looking into this issue. I believe that the = u-boot-bananapim2 port is broken because the underlining u-boot code is = broken, at 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 number of commits for sunxi. I=E2=80=99m not sure = which one resolved the issue, but by checking out the latest sources and = applying the freebsd patches 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<auto> partition=3D<auto>... good. Booting from disk0s2a: /boot/kernel/kernel data=3D0x65cd64+0x12729c = syms=3D[0x4+0x8e630+0x4+0xa3375] 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, 1994 The Regents of the University of California. All rights = reserved. 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/em= oe/Projects/ARM/src/sys/ALLWINNER arm FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on = LLVM 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: <Open Firmware Device Tree> aw_ccu0: <Allwinner Clock Control Unit> on ofwbus0 . . . Thanks, Erik > On Jul 28, 2016, at 6:49 PM, Erik Moe <e.moe@rcn.com> wrote: >=20 > I=E2=80=99m having some issues with the u-boot-bananapim2 in ports. = It looks like a data abort exception. Does anybody else have a BPI M2 = that this port is working for them? If I read this right it=E2=80=99s = dying in the following function: >=20 > 4a00218c g F .text 00000038 sunxi_gpio_set_cfgpin >=20 > I think someone reported a similar but not the same issue upstream: = http://lists.denx.de/pipermail/u-boot/2016-June/258837.html >=20 > Thanks, > Erik >=20 >=20 > U-Boot SPL 2016.07 (Jul 16 2016 - 02:40:04) > DRAM: 1024 MiB > Trying to boot from MMC1 >=20 >=20 > U-Boot 2016.07 (Jul 16 2016 - 02:40:04 -0500) Allwinner Technology >=20 > CPU: Allwinner A31s (SUN6I) > Model: Sinovoip BPI-M2 > DRAM: 1 GiB > WARNING: Caches not enabled > MMC: SUNXI SD/MMC: 0 > reading u-boot.env >=20 > ** Unable to read "u-boot.env" from mmc0:1 ** > Using default environment >=20 > In: serial > Out: serial > Err: serial > Net: data abort > pc : [<7ef5f180>] lr : [<00000000>] > reloc pc : [<4a002180>] lr : [<cb0a3000>] > 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 ... >=20 > resetting ... >=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DCDF4E6D-8F92-4C05-A128-75D544C4EC39>