-HEAD U-Boot *DOES* work on Raspberry PI2 [[WAS Re: U-boot issues on Banana Pi M2]]
Karl Denninger
karl at denninger.net
Thu Aug 4 18:42:33 UTC 2016
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 at 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 = 989851648 (943 MB)
avail memory = 957444096 (913 MB)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
random: entropy device external interface
kbd0 at kbdmux0
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> mem 0x3f000000-0x3fffffff
on ofwbus0
local_intc0: <BCM2836 Interrupt Controller> mem 0x40000000-0x400000ff on
simplebus0
generic_timer0: <ARMv7 Generic Timer> on ofwbus0
.....
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.
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-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’m 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 at 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 at 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='mmc 0'
> Found U-Boot device: disk
> Checking unit=0 slice=<auto> partition=<auto>... good.
> Booting from disk0s2a:
> /boot/kernel/kernel data=0x65cd64+0x12729c syms=[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=0x6151
> 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 at 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 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 = 1073741824 (1024 MB)
> avail memory = 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 at rcn.com> wrote:
>>
>> I’m 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’s 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: http://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 : [<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 ...
>>
>> resetting ...
>>
> _______________________________________________
> freebsd-arm at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe at freebsd.org"
--
Karl Denninger
karl at denninger.net <mailto:karl at denninger.net>
/The Market Ticker/
/[S/MIME encrypted email preferred]/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2996 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20160804/75954aa1/attachment.bin>
More information about the freebsd-arm
mailing list