EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: unknown type name 'DBLINK'
From: Heinz Junkes via Core-talk <core-talk at aps.anl.gov>
To: Andrew Johnson <anj at anl.gov>
Cc: core-talk at aps.anl.gov
Date: Mon, 21 Mar 2022 11:47:20 +0100
Hello Andrew,

yes, of course I will do that. There are very few changes (to the config files) needed to the existing ones.

The show stopper at the moment is that nfs does not work with libbsd. I am waiting for a feedback from Chris Jones.

Changes to the config files:

rtems@rtems-dev:~/EPICS_TST/epics-base$ git diff
diff --git a/configure/CONFIG_SITE b/configure/CONFIG_SITE
index 03ec6d114..d1d23cc29 100644
--- a/configure/CONFIG_SITE
+++ b/configure/CONFIG_SITE
@@ -96,7 +96,7 @@
 # Which target architectures to cross-compile for.
 #  Definitions in configure/os/CONFIG_SITE.<host>.Common
 #  may override this setting.
-CROSS_COMPILER_TARGET_ARCHS=
+CROSS_COMPILER_TARGET_ARCHS=RTEMS-beatnik

 # If only some of your host architectures can compile the
 #  above CROSS_COMPILER_TARGET_ARCHS specify those host
diff --git a/configure/os/CONFIG.Common.RTEMS b/configure/os/CONFIG.Common.RTEMS
index c8729f933..6853eb159 100644
--- a/configure/os/CONFIG.Common.RTEMS
+++ b/configure/os/CONFIG.Common.RTEMS
@@ -37,6 +37,9 @@ GNU_TARGET ?= $(RTEMS_TARGET_CPU)-rtems
 include $(RTEMS_BASE)/$(GNU_TARGET)$(RTEMS_VERSION)/$(RTEMS_BSP)/Makefile.inc
 include $(RTEMS_CUSTOM)
 include $(CONFIG.CC)
+#not set in RTEMS_BSD.cfg until now
+RTEMS_HAS_NETWORKING = no
+RTEMS_HAS_POSIX_API = yes

 #-------------------------------------------------------
 # RTEMS cross-development tools
@@ -115,7 +118,9 @@ OP_SYS_LDLIBS_score_NET_yes = -lnfs
 OP_SYS_LDLIBS_score_NET_no = -lnfs
 OP_SYS_LDLIBS += -lrtemsCom -lCom
 OP_SYS_LDLIBS += $(OP_SYS_LDLIBS_$(OS_API)_NET_$(RTEMS_HAS_NETWORKING))
+ifneq ($(RTEMS_VERSION),6)
 OP_SYS_LDLIBS += -lrtemscpu -lc -lm
+endif

 OP_SYS_LDFLAGS_posix = -u POSIX_Init
 OP_SYS_LDFLAGS_score = -u Init \
diff --git a/configure/os/CONFIG.Common.RTEMS-beatnik b/configure/os/CONFIG.Common.RTEMS-beatnik
index b133fd489..26a6810dc 100644
--- a/configure/os/CONFIG.Common.RTEMS-beatnik
+++ b/configure/os/CONFIG.Common.RTEMS-beatnik
@@ -16,6 +16,15 @@ ARCH_DEP_CFLAGS += -DHAVE_MOTLOAD
 ARCH_DEP_CFLAGS += -DRTEMS_NETWORK_CONFIG_MBUF_SPACE=2048
 ARCH_DEP_CFLAGS += -DRTEMS_NETWORK_CONFIG_CLUSTER_SPACE=5120

+include $(CONFIG)/os/CONFIG.Common.RTEMS
+# This check must appear after the above include
+ifeq ($(RTEMS_VERSION),6)
+#ABI Flags etc, I have tried to read in the stuff via pkgconfig into
+# CONFIG.Common.RTEMS, but have not been able to do it due to lack of gMake knowledge.
+ARCH_DEP_CFLAGS += -mcpu=7400
+ARCH_DEP_LDFLAGS += -B$(RTEMS_TOOLS)/powerpc-rtems6/beatnik/lib -qrtems -Wl,--gc-sections
+endif
+
 MUNCH_SUFFIX = .boot
 MUNCHNAME = $(PRODNAME:%$(EXE)=%$(MUNCH_SUFFIX))
 define MUNCH_CMD
diff --git a/configure/os/CONFIG_SITE.Common.RTEMS b/configure/os/CONFIG_SITE.Common.RTEMS
index 6857dc9a9..85c123790 100644
--- a/configure/os/CONFIG_SITE.Common.RTEMS
+++ b/configure/os/CONFIG_SITE.Common.RTEMS
@@ -13,8 +13,8 @@
 #

 # FHI:
-#RTEMS_VERSION = 5
-#RTEMS_BASE = /home/h1/DBG/rtems
+RTEMS_VERSION = 6
+RTEMS_BASE = /home/rtems/MVME6100_WORK/rtems/$(RTEMS_VERSION)
 #RTEMS_BASE = /home/ad/MVME6100/rtems/$(RTEMS_VERSION)
 #RTEMS_BASE = /opt/RTEMS/qoriq/rtems/$(RTEMS_VERSION)


Viele Grüße
Heinz Junkes
--
Experience directly varies with equipment ruined.



> On 14. Mar 2022, at 18:07, Andrew Johnson via Core-talk <core-talk at aps.anl.gov> wrote:
> 
> Hello Heinz,
> 
> That looks like great news. Will you be submitting a PR for any EPICS changes needed to build against RTEMS-6?
> 
> While we're adding support for these OS versions and BSPs we should document for each RTEMS BSP exactly how to configure the board to load and boot the OS, along with any specific instructions for configuring the build. Exactly where that information is published isn't particularly important as long as we make it easy to find.
> 
> Thanks,
> 
> - Andrew
> 
> 
> On 3/12/22 2:32 PM, Heinz Junkes via Core-talk wrote:
>> ;-)
>> 
>> MVME6100> tftpGet -a04000000 -c141.14.139.12 -s141.14.131.192 -m255.255.240.0 -g141.14.128.128 -flibComTestHarness.boot
>> Network Loading from: /dev/enet0
>> Loading File: libComTestHarness.boot
>> Load Address: 04000000
>> Download Buffer Size = User Defined
>> 
>> Client IP Address      = 141.14.139.12
>> Server IP Address      = 141.14.131.192
>> Gateway IP Address     = 141.14.128.128
>> Subnet IP Address Mask = 255.255.240.0
>> 
>> Network File Load in Progress...
>> 
>> Bytes Received =&6617180, Bytes Loaded =&6617180
>> Bytes/Second   =&3308590, Elapsed Time =2 Second(s)
>> MVME6100> waitProbe
>> System I/O Probe Complete
>> MVME6100> netShut
>> /dev/-----------------------------------------
>> config addr is 0xf1000cf8
>> config data is 0xf1000cfc
>> Welcome to RTEMS rtems-6.0.0 (PowerPC/Generic (classic FPU)/beatnik)
>> CPU: MPC7457
>> Board Type: MVME6100-0163 (S/N D00967A)
>> Bus Clock Freq:   133333333 Hz
>> CPU Clock Freq:  1266666654 Hz
>> Memory:           536870912 bytes
>> -----------------------------------------
>> Now BSP_mem_size = 0x1fe00000
>> Configuration.work_space_size = 2033c50
>> Page table setup finished; will activate it NOW...
>> Going to start PCI buses scanning and initialization
>> Number of PCI buses found is : 3
>> MSR 0x2003032
>> Exit from bspstart
>> unable to find the universe in pci config space
>> Tundra Tsi148 PCI-VME bridge detected at 0x81100000, IRQ 84
>> Tsi148 Outbound Ports:
>> Port  VME-Addr   Size       PCI-Adrs   Mode:
>> 0:    0x20000000 0x0e000000 0x90000000 A32, SUP, D32, SCT
>> 1:    0x00000000 0x00ff0000 0x9f000000 A24, SUP, D32, SCT
>> 2:    0x00000000 0x00010000 0x9fff0000 A16, SUP, D32, SCT
>> 7:    0x00000000 0x01000000 0x9e000000 CSR, SUP, D32, SCT
>> Tsi148 Inbound Ports:
>> Port  VME-Addr   Size       PCI-Adrs   Mode:
>> 0:    0x90000000 0x1fe00000 0x00000000 A32, PGM, DAT, SUP, USR, MBLT, BLT
>> vmeTsi148 IRQ manager: looking for registers on VME...
>> Trying to find CSR on VME...
>> vmeTsi148 - IRQ manager using VME CSR to flush FIFO
>> Registering /dev/console as minor 0 (==/dev/ttyS0)
>> WARNING: OS Clock time was read before being set.
>> Using 1990-01-
>> 0 2i n0i0t:C0o0n:s0o0l.e0 0-0-0-0 0I nUfToC
>> ---
>> stdin: fileno: 0, ttyname: /dev/console
>> stdout: fileno: 1, ttyname: /dev/console
>> stderr: fileno: 2, ttyname: /dev/console
>> time set to : 04/14/14 07:30:06.000001229 UTC
>> Startup.
>> epicsThreadSetPriority called by non epics thread
>> 
>> ***** RTEMS Version: rtems-6.0.0 (PowerPC/Generic (classic FPU)/beatnik) *****
>> 
>> ***** Initializing network (libbsd, dhcpcd) *****
>> nexus0: <RTEMS Nexus device>
>> mve0 on nexus0
>> miibus0: <MII bus> on mve0
>> ukphy0: <Generic IEEE 802.3u media interface> PHY 0 on miibus0
>> ukphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
>> info: mve0: Ethernet address: ec:9e:cd:23:c8:41
>> 
>> ***** ifconfig lo0 *****
>> info: lo0: link state changed to UP
>> 
>> ***** add dhcpcd hook *****
>> 
>> ***** Start default network dhcpcd *****
>> 
>> --Info (hpj)-- bsd task prio IRQS: 96  -----
>> i
>> --Info (hpj)-- bsd task prio TIME: 98  -----
>> n
>>  ---- Waiting for DHCP ...
>> fo: version 6.2.1 starting
>> info: mve0: link state changed to DOWN
>> debug: mve0: executing `ioc boot' PREINIT
>> 
>> dhcpcd ---> 'interface=mve0'
>>   'interface' = 'mve0'
>> dhcpcd ---> 'reason=PREINIT'
>>   'reason' = 'PREINIT'
>> dhcpcd ---> 'pid=1'
>> dhcpcd ---> 'ifmetric=201'
>> dhcpcd ---> 'ifwireless=0’
>> 
>> ...
>> 
>> 
>>    EPICS Test Harness Results
>>     ==========================
>> 
>> All tests successful.
>> Programs=38, Tests=3128, 355 wallclock secs
>> 
>> 
>> 
>> 
>>> On 12. Mar 2022, at 20:45, Michael Davidsaver <mdavidsaver at gmail.com>
>>>  wrote:
>>> 
>>> On 3/12/22 11:24, Heinz Junkes wrote:
>>> 
>>>> Bull's eye
>>>> I could have thought of it myself ;-(
>>>> more ./rtems/6/powerpc-rtems6/beatnik/lib/include/link.h
>>>> 
>>> Ok.  So the first '-I'
>>> 
>>> 
>>>> .../powerpc-rtems6-gcc  -fasm  -I/home/rtems/MVME6100_WORK/rtems/6/powerpc-rtems6/beatnik/lib/include ...
>>>> 
>>> needs to be shifted to the end, or included with '-isystem /...'.
>>> 
>>> 
>>> https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html
> 
> -- 
> Complexity comes for free, Simplicity you have to work for.
> 


References:
unknown type name 'DBLINK' Heinz Junkes via Core-talk
Re: unknown type name 'DBLINK' Michael Davidsaver via Core-talk
Re: unknown type name 'DBLINK' Heinz Junkes via Core-talk
Re: unknown type name 'DBLINK' Michael Davidsaver via Core-talk
Re: unknown type name 'DBLINK' Heinz Junkes via Core-talk
Re: unknown type name 'DBLINK' Andrew Johnson via Core-talk

Navigate by Date:
Prev: Re: unknown type name 'DBLINK' Andrew Johnson via Core-talk
Next: Build completed: epics-base base-7.0-49 AppVeyor via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024 
Navigate by Thread:
Prev: Re: unknown type name 'DBLINK' Andrew Johnson via Core-talk
Next: Build failed: EPICS Base 7 base-7.0-483 AppVeyor via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·