Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Aug 2016 13:42:28 -0500
From:      Karl Denninger <karl@denninger.net>
To:        freebsd-arm@freebsd.org
Subject:   -HEAD U-Boot *DOES* work on Raspberry PI2 [[WAS Re: U-boot issues on Banana Pi M2]]
Message-ID:  <551e8983-e529-b3c3-86f5-73d68c4b7fd2@denninger.net>
In-Reply-To: <DCDF4E6D-8F92-4C05-A128-75D544C4EC39@rcn.com>
References:  <0403B533-40BC-4674-84CC-2CC3F732B45E@rcn.com> <DCDF4E6D-8F92-4C05-A128-75D544C4EC39@rcn.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
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  = 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@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='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@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@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@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"

-- 
Karl Denninger
karl@denninger.net <mailto:karl@denninger.net>
/The Market Ticker/
/[S/MIME encrypted email preferred]/

[-- Attachment #2 --]
0	*H
010
	`He0	*H
_0[0C)0
	*H
010	UUS10UFlorida10U	Niceville10U
Cuda Systems LLC10UCuda Systems LLC CA1"0 	*H
	Cuda Systems LLC CA0
150421022159Z
200419022159Z0Z10	UUS10UFlorida10U
Cuda Systems LLC10UKarl Denninger (OCSP)0"0
	*H
0
X@vkY
Tq/vE]5#֯MX\8LJ/V?5Da+
sJc*/r{ȼnS+w")ąZ^DtdCOZ ~7Q '@a#ijc۴oZdB&!Ӝ-<	?HN5y
5}F|ef゘"Vلio74zn">a1qWuɖbFeGE&3(KhixG3!#e_XƬϜ/,$+;4y'Bz<qT9_?rRUpn5
Jn&Rx/p Jyel*pN8/#9u/YPEC)TY>~/˘N[vyiDKˉ,^" ?$T8v&K%z8C @?K{9f`+@,|Mbia007++0)0'+0http://cudasystems.net:88880	U00	`HB0U0,	`HB
OpenSSL Generated Certificate0U-h\Ff Y0U#0$q}ݽʒm50U0karl@denninger.net0
	*H
Owbabɺx&Uk[(Oj!%pMQ0I!#QH}.>~2&D}<wm_>V6v]f>=Nn+8;q wfΰ/RLyUG#b}n!Dր_up|_ǰc/%ۥ
nN8:d;-UJd/m1~VނיnN I˾$tF1&}|?q?\đXԑ&\4V<lKۮ3%Am_(q-(cAeGX)f}-˥6cv~Kg8m~v;|9:-iAPқ6ېn-.)<[$KJtt/L4ᖣ^Cmu4vb{+BG$M0c\[MR|0FԸP&78"4p#}DZ9;V9#>Sw"[UP7100010	UUS10UFlorida10U	Niceville10U
Cuda Systems LLC10UCuda Systems LLC CA1"0 	*H
	Cuda Systems LLC CA)0
	`HeM0	*H
	1	*H
0	*H
	1
160804184228Z0O	*H
	1B@wOG8TKs%agY((WAfGB/fz:W!vwn|0l	*H
	1_0]0	`He*0	`He0
*H
0*H
0
*H
@0+0
*H
(0	+710010	UUS10UFlorida10U	Niceville10U
Cuda Systems LLC10UCuda Systems LLC CA1"0 	*H
	Cuda Systems LLC CA)0*H
	1010	UUS10UFlorida10U	Niceville10U
Cuda Systems LLC10UCuda Systems LLC CA1"0 	*H
	Cuda Systems LLC CA)0
	*H
\Ei;`²%wM$`m^*j GS#4,&R9!~_NNwl5n

?c責*p>bqp-NDq@[|'8ULs[ODOc+/l=5[Ћ9kc5R(	~>o񾊍L#D4lMhEF\QƯE-O@f&&JМd9`)45EsLKrԇנ+.!\`HmwÚ栋Oj_bY"9,y@ŠMg`~-F}Ci)nGCA k}kGM!t
&~nɳ0QOze=ZpƕϏlg/
t</|dTͽ6_eHm,9ά^H/%KYsA},qPX&*O$&#jo
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?551e8983-e529-b3c3-86f5-73d68c4b7fd2>