<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 29, 2020, 7:44 AM Heinz Junkes <<a href="mailto:junkes@fhi-berlin.mpg.de">junkes@fhi-berlin.mpg.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have now changed to a more modern board: MVME2500<br>
And built rtems6 and libbsd for qoriq_e500.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Since you mention it worked in the spring, does it work with rtems5?</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
Unfortunately the board hangs when loading the image:<br>
<br>
MVME2500=> setenv tfile dhcpcd02_6<br>
MVME2500=> run rtems_myTests<br>
reading mvme2500.dtb<br>
12363 bytes read in 32 ms (377 KiB/s)<br>
Speed: 1000, full duplex<br>
Using eTSEC1 device<br>
TFTP from server 141.14.128.9; our IP address is 141.14.128.89<br>
Filename 'dhcpcd02_6.img'.<br>
Load address: 0x10000000<br>
Loading: #################################################################<br>
####################################################<br>
10.3 MiB/s<br>
done<br>
Bytes transferred = 1709285 (1a14e5 hex)<br>
WARNING: adjusting available memory to 30000000<br>
## Booting kernel from Legacy Image at 10000000 ...<br>
Image Name: dhcpcd02<br>
Created: 2020-10-29 12:38:52 UTC<br>
Image Type: PowerPC Linux Kernel Image (gzip compressed)<br>
Data Size: 1709221 Bytes = 1.6 MiB<br>
Load Address: 00004000<br>
Entry Point: 00004000<br>
Verifying Checksum ... OK<br>
## Flattened Device Tree blob at 20000000<br>
Booting using the fdt blob at 0x20000000<br>
Uncompressing Kernel Image ... OK<br>
Loading Device Tree to 03ff9000, end 03fff04a ... OK<br>
<br>
Hangs ...<br>
<br>
<br>
<br>
With RTEMS5 in spring it looked like this:<br>
<br>
<br>
MVME2500=> setenv tfile dhcpcd02<br>
MVME2500=> run rtems_myTests<br>
reading mvme2500.dtb<br>
12363 bytes read in 32 ms (377 KiB/s)<br>
Speed: 1000, full duplex<br>
Using eTSEC1 device<br>
TFTP from server 141.14.128.9; our IP address is 141.14.128.89<br>
Filename 'dhcpcd02.img'.<br>
Load address: 0x10000000<br>
Loading: #################################################################<br>
###################################<br>
10 MiB/s<br>
done<br>
Bytes transferred = 1455058 (1633d2 hex)<br>
WARNING: adjusting available memory to 30000000<br>
## Booting kernel from Legacy Image at 10000000 ...<br>
Image Name: dhcpcd02<br>
Created: 2020-02-17 13:51:47 UTC<br>
Image Type: PowerPC Linux Kernel Image (gzip compressed)<br>
Data Size: 1454994 Bytes = 1.4 MiB<br>
Load Address: 00004000<br>
Entry Point: 00004000<br>
Verifying Checksum ... OK<br>
## Flattened Device Tree blob at 20000000<br>
Booting using the fdt blob at 0x20000000<br>
Uncompressing Kernel Image ... OK<br>
Loading Device Tree to 03ff9000, end 03fff04a ... OK<br>
*** LIBBSD DHCPCD 2 TEST ***<br>
nexus0: <RTEMS Nexus device><br>
<br>
RTEMS Shell on /dev/console. Useo 'help' to list commands.<br>
SHLL [/] # bus0: <Open Firmware Device Tree> on nexus0<br>
simplebus0: <Flattened device tree simple bus> on ofwbus0<br>
simplebus1: <Flattened device tree simple bus> mem 0xffe05000-0xffe05fff irq 3 on ofwbus0<br>
tsec0: <Enhanced Three-Speed Ethernet Controller> mem 0x24000-0x24fff irq 13,14,18 on simplebus0<br>
miibus0: <MII bus> on tsec0<br>
ukphy0: <Generic IEEE 802.3u media interface> PHY 1 on miibus0<br>
ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto<br>
info: tsec0: Ethernet address: ec:9e:cd:19:3c:61<br>
tsec1: <Enhanced Three-Speed Ethernet Controller> mem 0x25000-0x25fff irq 19,20,24 on simplebus0<br>
miibus1: <MII bus> on tsec1<br>
ukphy1: <Generic IEEE 802.3u media interface> PHY 7 on miibus1<br>
ukphy1: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto<br>
info: tsec1: Ethernet address: ec:9e:cd:19:3c:62<br>
tsec2: <Enhanced Three-Speed Ethernet Controller> mem 0x26000-0x26fff irq 15,16,17 on simplebus0<br>
miibus2: <MII bus> on tsec2<br>
ukphy2: <Generic IEEE 802.3u media interface> PHY 3 on miibus2<br>
ukphy2: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto<br>
info: tsec2: Ethernet address: ec:9e:cd:19:3c:63<br>
[zone: unpcb] kern.ipc.maxsockets limit reached<br>
info: lo0: link state changed to UP<br>
info: version 6.2.1 starting<br>
info: tsec0: link state changed to DOWN<br>
info: tsec1: link state changed to DOWN<br>
info: tsec2: link state changed to DOWN<br>
warning: no interfaces have a carrier<br>
info: tsec0: waiting for carrier<br>
info: tsec1: waiting for carrier<br>
info: tsec2: waiting for carrier<br>
W�������to UP<br>
info: tsec0: carrier acquired<br>
info: DUID 00:01:00:01:e9:6d:a1:84:ec:9e:cd:19:3c:61<br>
info: tsec0: IAID cd:19:3c:61<br>
info: tsec1: link state changed to UP<br>
...<br>
<br>
<br>
<br>
<br>
Viele Grüße<br>
Heinz Junkes<br>
--<br>
Experience directly varies with equipment ruined.<br>
<br>
<br>
<br>
> On 29. Oct 2020, at 12:07, Heinz Junkes <<a href="mailto:junkes@fhi-berlin.mpg.de" target="_blank" rel="noreferrer">junkes@fhi-berlin.mpg.de</a>> wrote:<br>
> <br>
> I can now run the test programs of libbsd. But on the MVME6100<br>
> no network interfaces gets found.<br>
> <br>
> MVME6100> netShut<br>
> /-----------------------------------------<br>
> config addr is 0xf1000cf8<br>
> config data is 0xf1000cfc<br>
> Welcome to RTEMS rtems-6.0.0 (PowerPC/Generic (classic FPU)/beatnik)<br>
> CPU: MPC7457<br>
> Board Type: MVME6100-0163 (S/N E173D27)<br>
> Bus Clock Freq: 133333333 Hz<br>
> CPU Clock Freq: 1266666654 Hz<br>
> Memory: 536870912 bytes<br>
> -----------------------------------------<br>
> Now BSP_mem_size = 0x1fe00000<br>
> Configuration.work_space_size = ed620<br>
> Page table setup finished; will activate it NOW...<br>
> Going to start PCI buses scanning and initialization<br>
> Number of PCI buses found is : 3<br>
> MSR 0x2003032<br>
> Exit from bspstart<br>
> unable to find the universe in pci config space<br>
> Tundra Tsi148 PCI-VME bridge detected at 0x81100000, IRQ 84<br>
> Tsi148 Outbound Ports:<br>
> Port VME-Addr Size PCI-Adrs Mode:<br>
> 0: 0x20000000 0x0e000000 0x90000000 A32, SUP, D32, SCT<br>
> 1: 0x00000000 0x00ff0000 0x9f000000 A24, SUP, D32, SCT<br>
> 2: 0x00000000 0x00010000 0x9fff0000 A16, SUP, D32, SCT<br>
> 7: 0x00000000 0x01000000 0x9e000000 CSR, SUP, D32, SCT<br>
> Tsi148 Inbound Ports:<br>
> Port VME-Addr Size PCI-Adrs Mode:<br>
> 0: 0x90000000 0x1fe00000 0x00000000 A32, PGM, DAT, SUP, USR, MBLT, BLT<br>
> vmeTsi148 IRQ manager: looking for registers on VME...<br>
> Trying to find CSR on VME...<br>
> vmeTsi148 - IRQ manager using VME CSR to flush FIFO<br>
> Registering /dev/console as minor 0 (==/dev/ttyS0)<br>
> <br>
> <br>
> *** BEGIN OF TEST LIBBSD DHCPCD 1 ***<br>
> *** TEST VERSION: 6.0.0.5f4fd63a0c2b4b0657b64abdcfa70c47bee21c52<br>
> *** TEST STATE: EXPECTED_PASS<br>
> *** TEST BUILD: RTEMS_POSIX_API<br>
> *** TEST TOOLS: 10.2.1 20201026 (RTEMS 6, RSB 5f4fd63a0c2b4b0657b64abdcfa70c47bee21c52, Newlib 17b7dfc)<br>
> <br>
> RTEMS Shell on /dev/console. Use 'help' to list commands.<br>
> SHLL [/] # xus0: <RTEMS Nexus device><br>
> [zone: unpcb] kern.ipc.maxsockets limit reached<br>
> info: lo0: link state changed to UP<br>
> info: version 6.2.1 starting<br>
> err: no valid interfaces found<br>
> warning: no interfaces have a carrier<br>
> <br>
> Viele Grüße<br>
> Heinz Junkes<br>
> --<br>
> Experience directly varies with equipment ruined.<br>
> <br>
> <br>
> <br>
>> On 27. Oct 2020, at 18:41, Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank" rel="noreferrer">sebastian.huber@embedded-brains.de</a>> wrote:<br>
>> <br>
>> <br>
>> On 27/10/2020 15:41, Joel Sherrill wrote:<br>
>>> <br>
>>> <br>
>>> On Tue, Oct 27, 2020 at 9:23 AM Heinz Junkes <<a href="mailto:junkes@fhi-berlin.mpg.de" target="_blank" rel="noreferrer">junkes@fhi-berlin.mpg.de</a> <mailto:<a href="mailto:junkes@fhi-berlin.mpg.de" target="_blank" rel="noreferrer">junkes@fhi-berlin.mpg.de</a>>> wrote:<br>
>>> <br>
>>> I am currently trying git rtems6.<br>
>>> <br>
>>> ../source-builder/sb-set-builder --prefix=$HOME/.rtems --log<br>
>>> powerpc_beatnik.log --no-clean --target=powerpc-rtems6<br>
>>> --with-rtems-bsp=beatnik 6/rtems-powerpc 6/rtems-kernel<br>
>>> <br>
>>> works …<br>
>>> <br>
>>> Unfortunately It fails here:<br>
>>> <br>
>>> ../source-builder/sb-set-builder --prefix=$HOME/.rtems --log<br>
>>> libbsd.log --no-clean --target=powerpc-rtems6<br>
>>> --with-rtems-bsp=beatnik --host=powerpc-rtems6 6/rtems-libbsd<br>
>>> <br>
>>> ...<br>
>>> [1562/1948] Compiling freebsd/sbin/nvmecontrol/ns.c<br>
>>> In file included from<br>
>>> /home/ad/.rtems/lib/gcc/powerpc-rtems6/10.2.1/include/c++/cstdlib:75,<br>
>>> from<br>
>>> /home/ad/.rtems/lib/gcc/powerpc-rtems6/10.2.1/include/c++/stdlib.h:36,<br>
>>> from ../../freebsd/sys/sys/libkern.h:216,<br>
>>> from ../../freebsd/sys/sys/systm.h:543,<br>
>>> from ../../freebsd/sys/sys/mbuf.h:42,<br>
>>> from ../../rtemsbsd/rtems/rtems-bsd-cxx.cc:48:<br>
>>> /home/ad/.rtems/powerpc-rtems6/include/stdlib.h:309:6: error:<br>
>>> conflicting declaration of C function 'void qsort_r(void*, size_t,<br>
>>> size_t, int (*)(const void*, const void*, void*<br>
>>> ), void*)'<br>
>>> 309 | void qsort_r (void *__base, size_t __nmemb, size_t __size,<br>
>>> int (*_compar)(const void *, const void *, void *), void *__thunk);<br>
>>> | ^~~~~~~<br>
>>> In file included from ../../freebsd/sys/sys/systm.h:543,<br>
>>> from ../../freebsd/sys/sys/mbuf.h:42,<br>
>>> from ../../rtemsbsd/rtems/rtems-bsd-cxx.cc:48:<br>
>>> ../../freebsd/sys/sys/libkern.h:211:7: note: previous declaration<br>
>>> 'void qsort_r(void*, size_t, size_t, void*, int (*)(void*, const<br>
>>> void*, const void*))'<br>
>>> 211 | void qsort_r(void *base, size_t nmemb, size_t size, void<br>
>>> *thunk,<br>
>>> | ^~~~~~~<br>
>>> <br>
>>> Waf: Leaving directory<br>
>>> `/home/ad/RTEMS_DEV/rtems-source-builder/rtems/build/rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1/rtems-libbsd-d964a6703c705cc9<br>
>>> 2fd053bcefc08bb3b6baa0e2/build/powerpc-rtems6-beatnik-default'<br>
>>> Build failed<br>
>>> -> task in 'bsd' failed with exit status 1 (run with -v to<br>
>>> display more information)<br>
>>> shell cmd failed: /bin/sh -ex<br>
>>> /home/ad/RTEMS_DEV/rtems-source-builder/rtems/build/rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1/do-build<br>
>>> error: building<br>
>>> rtems-libbsd-d964a6703c705cc92fd053bcefc08bb3b6baa0e2-powerpc-rtems6-1<br>
>>> <br>
>>> <br>
>>> I'm not sure why this would not have shown up before but the FreeBSD kernel reuses some standard library method names with different signatures. The file rtemsbsd/include/machine/rtems-bsd-kernel-namespace.h renames a lot of items to put them in a BSD namespace. qsort_r isn't in this list but perhaps should be.<br>
>> <br>
>> I think its is this bug:<br>
>> <br>
>> <a href="https://devel.rtems.org/ticket/4078" rel="noreferrer noreferrer" target="_blank">https://devel.rtems.org/ticket/4078</a><br>
>> <br>
>> I added a workaround to the latest master and 6-freebsd-12 branches.<br>
>> <br>
>> -- <br>
>> Sebastian Huber, embedded brains GmbH<br>
>> <br>
>> Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
>> Phone : +49 89 189 47 41-16<br>
>> Fax : +49 89 189 47 41-09<br>
>> E-Mail : <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank" rel="noreferrer">sebastian.huber@embedded-brains.de</a><br>
>> PGP : Public key available on request.<br>
>> <br>
>> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
>> <br>
> <br>
> _______________________________________________<br>
> devel mailing list<br>
> <a href="mailto:devel@rtems.org" target="_blank" rel="noreferrer">devel@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank" rel="noreferrer">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote></div></div></div>