OpenCN detailed documentation

Hi Guys,

My name is Nadim Khan,

I have been working in Industrial Automation for last 10 years. My experience is working on PLC, HMI, Servo motion controls, Robotics etc.

Presently from last 1 year or so I have been more curious to learn and handson more about realtime operating systems. I tried freertos untill now.

I came across OpenCN and wanted to learn more but cannot find detailed documentation. For a new joiner like me who has little exposure to this OS world its difficult.

If you guys agree then I am willing to contribute to making and updating the documentation in English with more pictures and so on. So that a new person like me can get along easily.

For preparing document, I will try handson on the openCN, understand its working and prepare document with a step by step procedure there by doing handson as well.

My idea is to update the document such that it becomes easier for new comers like me to try out.

Better and updated the document will make this more popular.

1 Like

Hi Nadim,

Thanks you for your interest in OpenCN !

The documentation is still a work in progress and we try to update it as much as we can as soon as we have some free time. Thanks you very much to propose your help on this subject !

I think it would be very nice to have someone exterior to help us update the documentation, since we tend to make documentation ā€œby debā€/ā€œfor devā€ and we definitely need a better userguide .

I guess you already found the sphinx documentation : ā€” OpenCN 2021.2.0 documentation
A good starting point to run OpenCN is here : 8. User guide ā€” OpenCN 2021.2.0 documentation
And if you want to help with the documentation, you can take a look at :
8. User guide ā€” OpenCN 2021.2.0 documentation
13. Development flow ā€” OpenCN 2021.2.0 documentation

I think it is not properly specified in the documentation, but the only bus we support for now is EtherCAT. Iā€™m quit curious to know what kind of hardware you have at your disposal !

Also, I think you have to be registered as a ā€œdevelopperā€ to contribute, itā€™s holiday time here but please reach out to @rossierd with your gitlab account so we can put you in the loop.

Of course, feel free to ask us anything, I would happily try to help you in the process !

Soltner Xavier

Hi @Xavier ,

Thanks for the reply. I am very much excited for this journey.

Let me give a brief about what I have.

  • I am planning to contribute 10 hours in a week to this initially and can do more once I get along
  • First and foremost thing I have is a desire to learn and contribute to community project related to RTOS or motion
  • I have experience writing programs in IEC 61131-3 languages and ā€˜Cā€™ for PLC and motion control programming
  • I have basic knowledge of G codes for motion and robots
  • I have some hands on building embedded Linux from yocto and open embedded layers
  • I am learning python and c language at advance level to grow more.

From hardware point of view. I have below hardwares which I procured for assisting my learning :slight_smile:

  • I have access to windows PC (obviously capable of running linux)
  • I have STM32 microcontroller
  • I have raspberry pi 4 hardware
  • I have other Single board computersā€™ evaluation Kit from Toradex which can also run embedded linux.

I would like to know from you that are there any specific skill I need to learn to work upon to do testing and documentation?

Regards
Nadim

Hi @NRK,

To my knowledge you have all the basic skill to properly contribute to the project !

Regarding the hardware, OpenCN support 3 physical and 2 virtual plateform : 4. Environment ā€” OpenCN 2021.2.0 documentation

I advise that you make yourself a dual-boot with a linux to compile/run OpenCN. (kubuntu distro is nice if you are familiar with Windows for shortcut etcā€¦)
You can already try to run OpenCN in simulation mode and build/run the GUI (x86-qemu is faster than virt64).
By default, the Micro5 HAL configuration start at boot. (5 axis micro milling machine we have at HEIG)
FYI : From our experience, if you aim to develop component in OpenCN, it is always better to test it on a real hardware, especially when improving anything regarding the motor/spindle command.

Regarding your PLC/C programming skills : Nice ! For now we only have a PLC running C code : 5.9. Machine Logic (PLC) ā€” OpenCN 2021.2.0 documentation

About more technical stuff :
Iā€™ve recently recompiled OpenCN from scratch with a fresh distro (Kubuntu v22.04 LTS) and had some trouble when following our user-guide. Iā€™ve updated the package needs on branch #178 (only tested by myself, need to be checked by someone) : doc/src/user_guide.rst Ā· 178-e2c-opencn-m5-validation-bug-list Ā· mecatronYx / OpenCNC / opencn Ā· GitLab

Have fun !

Xavier

Hi Xavier,
I setup my PC and tried to build first image following below link
https://mecatronyx.gitlab.io/opencnc/opencn/user_guide.html
I followed the procedure to build openCN image for qemu x86. but in the middle i face an error as below.

In file included from /home/nadim/opencn/agency/usr/build/common/opencn_interface/opencn_interface.capnp.c++:4:
/home/nadim/opencn/agency/usr/build/common/opencn_interface/opencn_interface.capnp.h:13:2: error: #error ā€œVersion mismatch between generated code and library headers. You must use the same version of the Capā€™n Proto compiler and library.ā€
#error ā€œVersion mismatch between generated code and library headers. You must use the same version of the Capā€™n Proto compiler and library.ā€
^~~~~
[ 8%] Linking C static library libopencn.a
[ 8%] Built target opencn
[ 8%] Building CXX object common/tcp_server/CMakeFiles/tcp_server.dir/tcp_server.cpp.o
In file included from /home/nadim/opencn/agency/usr/build/common/opencn_interface/opencn_interface.capnp.c++:4:
/home/nadim/opencn/agency/usr/build/common/opencn_interface/opencn_interface.capnp.h:2502:32: error: ā€˜DispatchCallResultā€™ in ā€˜class capnp::Capability::Serverā€™ does not name a type
::capnp::Capability::Server::DispatchCallResult dispatchCall(
^~~~~~~~~~~~~~~~~~
/home/nadim/opencn/agency/usr/build/common/opencn_interface/opencn_interface.capnp.h:2530:32: error: ā€˜DispatchCallResultā€™ in ā€˜class capnp::Capability::Serverā€™ does not name a type
::capnp::Capability::Server::DispatchCallResult dispatchCallInternal(
^~~~~~~~~~~~~~~~~~
/home/nadim/opencn/agency/usr/build/common/opencn_interface/opencn_interface.capnp.h:3784:32: error: ā€˜DispatchCallResultā€™ in ā€˜class capnp::Capability::Serverā€™ does not name a type
::capnp::Capability::Server::DispatchCallResult dispatchCall(
^~~~~~~~~~~~~~~~~~
/home/nadim/opencn/agency/usr/build/common/opencn_interface/opencn_interface.capnp.h:4024:32: error: ā€˜DispatchCallResultā€™ in ā€˜class capnp::Capability::Serverā€™ does not name a type
::capnp::Capability::Server::DispatchCallResult dispatchCallInternal(
^~~~~~~~~~~~~~~~~~
/home/nadim/opencn/agency/usr/build/common/opencn_interface/opencn_interface.capnp.c++:8069:30: error: ā€˜DispatchCallResultā€™ in ā€˜class capnp::Capability::Serverā€™ does not name a type
::capnp::Capability::Server::DispatchCallResult CMCtlPins::Server::dispatchCall(
^~~~~~~~~~~~~~~~~~
/home/nadim/opencn/agency/usr/build/common/opencn_interface/opencn_interface.capnp.c++:8079:30: error: ā€˜DispatchCallResultā€™ in ā€˜class capnp::Capability::Serverā€™ does not name a type
::capnp::Capability::Server::DispatchCallResult CMCtlPins::Server::dispatchCallInternal(
^~~~~~~~~~~~~~~~~~
/home/nadim/opencn/agency/usr/build/common/opencn_interface/opencn_interface.capnp.c++:8797:30: error: ā€˜DispatchCallResultā€™ in ā€˜class capnp::Capability::Serverā€™ does not name a type
::capnp::Capability::Server::DispatchCallResult OpenCNServerInterface::Server::dispatchCall(
^~~~~~~~~~~~~~~~~~
/home/nadim/opencn/agency/usr/build/common/opencn_interface/opencn_interface.capnp.c++:8809:30: error: ā€˜DispatchCallResultā€™ in ā€˜class capnp::Capability::Serverā€™ does not name a type
::capnp::Capability::Server::DispatchCallResult OpenCNServerInterface::Server::dispatchCallInternal(
^~~~~~~~~~~~~~~~~~
[ 8%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandCStruct.cpp.o
make[2]: *** [common/opencn_interface/CMakeFiles/opencn-interface.dir/build.make:76: common/opencn_interface/CMakeFiles/opencn-interface.dir/opencn_interface.capnp.c++.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:583: common/opencn_interface/CMakeFiles/opencn-interface.dir/all] Error 2
make[1]: *** Waiting for unfinished jobsā€¦
[ 9%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandConfig.cpp.o
[ 9%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandData.cpp.o
[ 9%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandDebug.cpp.o
[ 9%] Linking CXX static library libtcp_server.a
[ 9%] Built target tcp_server
[ 9%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandDomains.cpp.o
[ 10%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandDownload.cpp.o
[ 10%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandFoeRead.cpp.o
[ 10%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandFoeWrite.cpp.o
[ 11%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandGraph.cpp.o
[ 11%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandMaster.cpp.o
[ 11%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandPdos.cpp.o
[ 12%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandRegRead.cpp.o
[ 12%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandRegWrite.cpp.o
[ 12%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandRescan.cpp.o
[ 12%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandSdos.cpp.o
[ 13%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandSiiRead.cpp.o
[ 13%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandSiiWrite.cpp.o
[ 13%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandSlaves.cpp.o
[ 14%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandSoeRead.cpp.o
[ 14%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandSoeWrite.cpp.o
[ 14%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandStates.cpp.o
[ 15%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandUpload.cpp.o
[ 15%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandVersion.cpp.o
[ 15%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/CommandXml.cpp.o
[ 15%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/DataTypeHandler.cpp.o
[ 16%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/FoeCommand.cpp.o
[ 16%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/MasterDevice.cpp.o
[ 16%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/NumberListParser.cpp.o
[ 17%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/SdoCommand.cpp.o
[ 17%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/SoeCommand.cpp.o
[ 17%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/main.cpp.o
[ 18%] Building CXX object target/ethercat_tool/CMakeFiles/ethercat.dir/sii_crc.cpp.o
[ 18%] Linking CXX executable ethercat
[ 18%] Built target ethercat
make: *** [Makefile:91: all] Error 2
/home/nadim/opencn/agency

This error is related to version mismatch of library.
Is it something faced before? Am i missing some steps or doing something wrong?
I first want to build and run an image so that i can know better and move ahead.

Hi Nadim,

Thanks again in your interest in OpenCN.

First the installation procedure was made for Ubuntu 20.04.

The build error is related to Capā€™n Proto: you should install version 0.7.0
Here is the build procedure. It came from Capā€™n Proto web site adapted to 0.7.0 version:

Please first remove the current installed version of this tool.

curl -O https://capnproto.org/capnproto-c++-0.7.0.tar.gz
tar zxf capnproto-c++-0.7.0.tar.gz
cd capnproto-c++-0.7.0
./configure
make -j6 check
sudo make install

Hope this helps.
J-P

Oh, In your previous post you suggested Kubuntu so i went ahead with Kubuntu.

I will try the procedure Ubuntu again.

Once I sucessfully build and run openCN on qemux86 then I will mention all the steps that i followed and all versions in my document that I am preparing.

Regards
Nadim

Hi Nadim,

sorry, I was not clear. Kubuntu is a good choice. I just want to inform that the documentation is made for Ubuntu 20.04 and there is some point that has to be adapted with newer version.
You can keep the Kubuntu, no problems.

Based on the log you shared, if you update Capā€™n Proto, it should fix the issue you reported.

Hope this helps
J-P

opencn/agency/usr/target/components/ocno/
the above path contains a file named ocno.cpp, on line 162, there was a " ` " due to which my compailation threw error. I removed that and rebuilt the image.
Compilation completed 100%.

Now when i try to run using using below commands
$ cd <OPENCN_HOME>/agency
$ ./st

I get error

nadim@nadim-pc:~/opencn/agency$ ./st
./st: line 1: #!/bin/bash: No such file or directory
qemu-system-x86_64: -hda /home/nadim/opencn/agency/filesystem/sdcard.img.x86-qemu: Could not open ā€˜/home/nadim/opencn/agency/filesystem/sdcard.img.x86-qemuā€™: No such file or directory

Am i still missing something? I cannot see any sdcard.img.x86-qemu at the given location.

Thanks and Regards

Great if you were able to compile the framework ! (I will fix the compilation error).

Once the compilation is completed, the next step is to deploy it.
the steps are, from agency folder:

  1. ./deploy -f It formats the SD card or create it in emulation case
  2. ./deploy -a It deploys all components (kernel, rootfs, apps) in the SD card

You can get the help of this tool: ./deploy -h

Hope this helps
J-P

1 Like

I will try this step.
I thought that the deploy steps are for real devices only so i skipped this step and tried to start qemu emulation directly.

I will try and update you.

Qemu booted: below log of boot.

nadim@nadim-pc:~/opencn/agency$ ./deploy.sh -f
Formating SD Card on ā€˜ā€™ (platform: x86-qemu)ā€¦
Creating sdcard.img.x86-qemu ā€¦

Welcome to fdisk (util-linux 2.37.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x631f4c44.

Command (m for help): Created a new DOS disklabel with disk identifier 0x82b38413.
[ 0.000000] Linux version 5.4.44 (nadim@nadim-pc) (gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)) #1 SMP Mon Aug 14 20:19:21 IST 2023
[ 0.000000] Command line: root=/dev/ram console=ttyS0 earlyprintk=pciserial
[ 0.000000] x86/fpu: x87 FPU will use FXSAVE
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000003ffdefff] usable
[ 0.000000] BIOS-e820: [mem 0x000000003ffdf000-0x000000003fffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
[ 0.000000] printk: bootconsole [earlyser0] enabled
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] SMBIOS 2.8 present.
[ 0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
[ 0.000000] tsc: Fast TSC calibration using PIT
[ 0.000000] tsc: Detected 1190.834 MHz processor
[ 0.396167] last_pfn = 0x3ffdf max_arch_pfn = 0x400000000
[ 0.397283] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT
[ 0.408216] found SMP MP-table at [mem 0x000f5a70-0x000f5a7f]
[ 0.410854] check: Scanning 1 areas for low memory corruption
[ 0.414310] ACPI: Early table checksum verification disabled
[ 0.414833] ACPI: RSDP 0x00000000000F5A30 000014 (v00 BOCHS )
[ 0.415224] ACPI: RSDT 0x000000003FFE13E7 000034 (v01 BOCHS BXPCRSDT 00000001 BXPC 00000001)
[ 0.416137] ACPI: FACP 0x000000003FFE1283 000074 (v01 BOCHS BXPCFACP 00000001 BXPC 00000001)
[ 0.416841] ACPI: DSDT 0x000000003FFDFDC0 0014C3 (v01 BOCHS BXPCDSDT 00000001 BXPC 00000001)
[ 0.417192] ACPI: FACS 0x000000003FFDFD80 000040
[ 0.417393] ACPI: APIC 0x000000003FFE12F7 000090 (v01 BOCHS BXPCAPIC 00000001 BXPC 00000001)
[ 0.417667] ACPI: HPET 0x000000003FFE1387 000038 (v01 BOCHS BXPCHPET 00000001 BXPC 00000001)
[ 0.417954] ACPI: WAET 0x000000003FFE13BF 000028 (v01 BOCHS BXPCWAET 00000001 BXPC 00000001)
[ 0.421340] Zone ranges:
[ 0.421467] DMA [mem 0x0000000000001000-0x0000000000ffffff]
[ 0.421684] DMA32 [mem 0x0000000001000000-0x000000003ffdefff]
[ 0.421869] Normal empty
[ 0.421976] Movable zone start for each node
[ 0.422151] Early memory node ranges
[ 0.422295] node 0: [mem 0x0000000000001000-0x000000000009efff]
[ 0.422635] node 0: [mem 0x0000000000100000-0x000000003ffdefff]
[ 0.424036] Zeroed struct page in unavailable ranges: 131 pages
[ 0.424241] Initmem setup node 0 [mem 0x0000000000001000-0x000000003ffdefff]
[ 0.445256] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
[ 0.445818] IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-23
[ 0.446166] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.446632] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
[ 0.446875] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.447271] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
[ 0.447495] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
[ 0.447935] Using ACPI (MADT) for SMP configuration information
[ 0.448201] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[ 0.448694] smpboot: Allowing 4 CPUs, 0 hotplug CPUs
[ 0.449673] [mem 0x40000000-0xfffbffff] available for PCI devices
[ 0.450248] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns
[ 0.450934] setup_percpu: NR_CPUS:4 nr_cpumask_bits:4 nr_cpu_ids:4 nr_node_ids:1
[ 0.458648] percpu: Embedded 52 pages/cpu s173096 r8192 d31704 u524288
[ 0.460681] Built 1 zonelists, mobility grouping on. Total pages: 257896
[ 0.461005] Kernel command line: root=/dev/ram root=/dev/ram console=ttyS0 earlyprintk=pciserial
[ 0.502943] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.504355] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[ 0.506372] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.512663] Memory: 1006612K/1048052K available (10243K kernel code, 865K rwdata, 2388K rodata, 3408K init, 1796K bss, 41440K reserved, 0K cma-reserved)
[ 0.516892] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.532280] rcu: Hierarchical RCU implementation.
[ 0.532882] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.
[ 0.535893] NR_IRQS: 4352, nr_irqs: 456, preallocated irqs: 16
[ 0.546251] random: get_random_bytes called from start_kernel+0x306/0x4a6 with crng_init=0
[ 0.554055] Console: colour VGA+ 80x25
[ 0.555972] printk: console [ttyS0] enabled
[ 0.555972] printk: console [ttyS0] enabled
[ 0.556555] printk: bootconsole [earlyser0] disabled
[ 0.556555] printk: bootconsole [earlyser0] disabled
[ 0.557149] ACPI: Core revision 20190816
[ 0.562346] APIC: Switch to symmetric I/O mode setup
[ 0.568011] ā€¦TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[ 0.573095] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x112a48f5f74, max_idle_ns: 440795263567 ns
[ 0.574298] Calibrating delay loop (skipped), value calculated using timer frequencyā€¦ 2381.66 BogoMIPS (lpj=1190834)
[ 0.575207] pid_max: default: 32768 minimum: 301
[ 0.576447] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.576723] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.592902] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
[ 0.593105] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0
[ 0.593701] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
[ 0.594372] Spectre V2 : Mitigation: Full generic retpoline
[ 0.594617] Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch
[ 0.594922] Speculative Store Bypass: Vulnerable
[ 0.595327] MDS: Vulnerable: Clear CPU buffers attempted, no microcode
[ 0.601432] Freeing SMP alternatives memory: 28K
[ 0.816087] smpboot: CPU0: Intel Core i7 9xx (Nehalem Class Core i7) (family: 0x6, model: 0x1a, stepping: 0x3)
[ 0.819721] Performance Events: unsupported p6 CPU model 26 no PMU driver, software events only.
[ 0.821387] rcu: Hierarchical SRCU implementation.
[ 0.824021] smp: Bringing up secondary CPUs ā€¦

BOOting CPU 1

[ 0.825733] x86: Booting SMP configuration:
smpboot: CPU 1 Converting physical 0 to logical die 1
start_secondary: waiting on CPU 1 for starting Xenomai initialization ā€¦
Agency RT CPU is CPU #1
[Xeno** Agmai] scheduling class idle registeencrey RT CPU gets invisible for Linuxā€¦
d.
[Xenomai] scheduling class rt registered.

BOOting CPU 2

Cobalt vSOO-1.1 (SOO-xenocobalt)
[ 0.825920] ā€¦ node #0, CPUs: #1 #2
[ 0.020906] smpboot: CPU 2 Converting physical 0 to logical die 2
[ 0.020906] calibrate_delay_direct() dropping max bogoMips estimate 0 = 1410921

BOOting CPU 3

[ 0.966456] #3
[ 0.020906] smpboot: CPU 3 Converting physical 0 to logical die 3
[ 1.027320] smp: Brought up 1 node, 3 CPUs
[ 1.027350] smpboot: Max logical packages: 4
[ 1.027517] smpboot: Total of 3 processors activated (7203.90 BogoMIPS)
[ 1.039078] devtmpfs: initialized
[ 1.055010] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[ 1.055271] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 1.065603] NET: Registered protocol family 16
xenomai_pre_init: waiting on CPU 0 for Xenomai/Cobalt fully initializedā€¦
[ 1.088164] cpuidle: using governor menu
vbus_init: initializing vbstoreā€¦
ā€¦ vbstore SOO Agency setting upā€¦
vbs_store_mkdir: creating backend entry for /backend virtual driverā€¦
vbs_store_mkdir: creating backend entry for /device virtual driverā€¦
vbs_store_mkdir: creating backend entry for /domain virtual driverā€¦
vbs_store_mkdir: creating backend entry for /domain/gnttab virtual driverā€¦
vbs_store_mkdir: creating backend entry for /domain/gnttab/0 virtual driverā€¦
vbs_store_mkdir: creating backend entry for /domain/gnttab/1 virtual driverā€¦
vbs_store_mkdir: creating backend entry for /domain/gnttab/2 virtual driverā€¦
vbs_store_mkdir: creating backend entry for /domain/gnttab/3 virtual driverā€¦
vbs_store_mkdir: creating backend entry for /domain/gnttab/4 virtual driverā€¦
vbs_store_mkdir: creating backend entry for /domain/gnttab/5 virtual driverā€¦
vbs_store_mkdir: creating backend entry for /domain/gnttab/6 virtual driverā€¦
vbs_store_mkdir: creating backend entry for /soo virtual driverā€¦
vbs_store_mkdir: creating backend entry for /soo/directcomm virtual driverā€¦
vbs_store_mkdir: creating backend entry for /soo/directcomm/0 virtual driverā€¦
vbs_store_mkdir: creating backend entry for /soo/directcomm/1 virtual driverā€¦
vbs_store_mkdir: creating backend entry for /soo/directcomm/2 virtual driverā€¦
vbs_store_mkdir: creating backend entry for /soo/directcomm/3 virtual driverā€¦
vbs_store_mkdir: creating backend entry for /soo/directcomm/4 virtual driverā€¦
vbs_store_mkdir: creating backend entry for /soo/directcomm/5 virtual driverā€¦
vbs_store_mkdir: creating backend entry for /soo/directcomm/6 virtual driverā€¦
vbus_vbstore_init: done.
[ 1.100916] ACPI: bus type PCI registered
[ 1.103046] PCI: Using configuration type 1 for base access
[ 1.104866] mtrr: your CPUs had inconsistent fixed MTRR settings
[ 1.105087] mtrr: your CPUs had inconsistent variable MTRR settings
[ 1.105087] mtrr: your CPUs had inconsistent MTRRdefType settings
[ 1.105087] mtrr: probably your BIOS does not setup all CPUs.
[ 1.105121] mtrr: corrected configuration.
[ 1.162052] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
OpenCN: core subsystem initialization.
RTAPI: Init
RTAPI: Init complete
[ 1.191955] OpenCN: halcmd_init streamer subsystem initialization.
[ 1.193889] ACPI: Added _OSI(Module Device)
[ 1.194154] ACPI: Added _OSI(Processor Device)
[ 1.194446] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 1.194676] ACPI: Added _OSI(Processor Aggregator Device)
[ 1.195308] ACPI: Added _OSI(Linux-Dell-Video)
[ 1.195539] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[ 1.195802] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
[ 1.213847] ACPI: 1 ACPI AML tables successfully acquired and loaded
[ 1.232649] ACPI: Interpreter enabled
[ 1.233472] ACPI: (supports S0 S5)
[ 1.233667] ACPI: Using IOAPIC for interrupt routing
[ 1.234495] PCI: Using host bridge windows from ACPI; if necessary, use ā€œpci=nocrsā€ and report a bug
[ 1.236678] ACPI: Enabled 2 GPEs in block 00 to 0F
[ 1.270006] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[ 1.270603] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI HPX-Type3]
[ 1.273582] PCI host bridge to bus 0000:00
[ 1.274006] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window]
[ 1.274142] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window]
[ 1.274440] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[ 1.274702] pci_bus 0000:00: root bus resource [mem 0x40000000-0xfebfffff window]
[ 1.275008] pci_bus 0000:00: root bus resource [mem 0x100000000-0x17fffffff window]
[ 1.275519] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 1.276671] pci 0000:00:00.0: [8086:1237] type 00 class 0x060000
[ 1.279899] pci 0000:00:01.0: [8086:7000] type 00 class 0x060100
[ 1.280087] pci 0000:00:01.1: [8086:7010] type 00 class 0x010180
[ 1.284750] pci 0000:00:01.1: reg 0x20: [io 0xc020-0xc02f]
[ 1.285197] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7]
[ 1.285478] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6]
[ 1.286156] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177]
[ 1.286415] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376]
[ 1.287705] pci 0000:00:01.3: [8086:7113] type 00 class 0x068000
[ 1.288484] pci 0000:00:01.3: quirk: [io 0x0600-0x063f] claimed by PIIX4 ACPI
[ 1.288760] pci 0000:00:01.3: quirk: [io 0x0700-0x070f] claimed by PIIX4 SMB
[ 1.289660] pci 0000:00:02.0: [1234:1111] type 00 class 0x030000
[ 1.291873] pci 0000:00:02.0: reg 0x10: [mem 0xfd000000-0xfdffffff pref]
[ 1.294148] pci 0000:00:02.0: reg 0x18: [mem 0xfebd4000-0xfebd4fff]
[ 1.296811] pci 0000:00:02.0: reg 0x30: [mem 0xfebc0000-0xfebcffff pref]
[ 1.298823] pci 0000:00:03.0: [8086:10d3] type 00 class 0x020000
[ 1.300087] pci 0000:00:03.0: reg 0x10: [mem 0xfeb80000-0xfeb9ffff]
[ 1.301840] pci 0000:00:03.0: reg 0x14: [mem 0xfeba0000-0xfebbffff]
[ 1.303826] pci 0000:00:03.0: reg 0x18: [io 0xc000-0xc01f]
[ 1.306921] pci 0000:00:03.0: reg 0x1c: [mem 0xfebd0000-0xfebd3fff]
[ 1.312087] pci 0000:00:03.0: reg 0x30: [mem 0xfeb40000-0xfeb7ffff pref]
[ 1.319390] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
[ 1.320471] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
[ 1.321190] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
[ 1.321779] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
[ 1.322415] ACPI: PCI Interrupt Link [LNKS] (IRQs *9)
[ 1.345031] pci 0000:00:02.0: vgaarb: setting as boot VGA device
[ 1.345087] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
[ 1.345209] pci 0000:00:02.0: vgaarb: bridge control possible
[ 1.345892] vgaarb: loaded
[ 1.348339] SCSI subsystem initialized
[ 1.350863] ACPI: bus type USB registered
[ 1.351653] usbcore: registered new interface driver usbfs
[ 1.352248] usbcore: registered new interface driver hub
[ 1.352578] usbcore: registered new device driver usb
[ 1.353164] pps_core: LinuxPPS API ver. 1 registered
[ 1.353394] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it
[ 1.353765] PTP clock support registered
[ 1.354174] EDAC MC: Ver: 3.0.0
[ 1.358202] PCI: Using ACPI for IRQ routing
EtherCAT: Master driver 1.5.2 REV
EtherCAT: 1 master waiting for devices.
[ 1.370024] clocksource: Switched to clocksource tsc-early
[ 1.428346] pnp: PnP ACPI init
[ 1.432351] pnp: PnP ACPI: found 6 devices
[ 1.465377] thermal_sys: Registered thermal governor ā€˜step_wiseā€™
[ 1.465452] thermal_sys: Registered thermal governor ā€˜user_spaceā€™
[ 1.466450] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7 window]
[ 1.466983] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff window]
[ 1.467218] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
[ 1.467468] pci_bus 0000:00: resource 7 [mem 0x40000000-0xfebfffff window]
[ 1.467703] pci_bus 0000:00: resource 8 [mem 0x100000000-0x17fffffff window]
[ 1.469181] NET: Registered protocol family 2
[ 1.476031] tcp_listen_portaddr_hash hash table entries: 512 (order: 2, 20480 bytes, linear)
[ 1.476373] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 1.476904] TCP bind hash table entries: 8192 (order: 6, 262144 bytes, linear)
[ 1.477406] TCP: Hash tables configured (established 8192 bind 8192)
[ 1.478981] UDP hash table entries: 512 (order: 3, 49152 bytes, linear)
[ 1.479441] UDP-Lite hash table entries: 512 (order: 3, 49152 bytes, linear)
[ 1.480966] NET: Registered protocol family 1
[ 1.481483] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[ 1.481892] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[ 1.482181] pci 0000:00:01.0: Activating ISA DMA hang workarounds
[ 1.482992] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
[ 1.483427] PCI: CLS 0 bytes, default 64
[ 1.594390] check: Scanning for low memory corruption every 60 seconds
[ 1.598898] workingset: timestamp_bits=62 max_order=18 bucket_order=0
[ 1.690480] Key type asymmetric registered
[ 1.690821] Asymmetric key parser ā€˜x509ā€™ registered
[ 1.691177] io scheduler mq-deadline registered
[ 1.691380] io scheduler kyber registered
HAL_LIB: loading kernel lib
RTAPI: initing comp HAL_LIB
RTAPI: comp ā€˜HAL_LIBā€™ loaded, ID: 1
RTAPI: shmem 01 created by comp 01, key: 0x48414c32, size: 348160
HAL_LIB: kernel lib installed successfully
[ 1.697080] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 1.719807] 00:04: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[ 1.726331] Non-volatile memory driver v1.3
[ 1.726527] Linux agpgart interface v0.103
[ 1.729592] bochs-drm 0000:00:02.0: remove_conflicting_pci_framebuffers: bar 0: 0xfd000000 ā†’ 0xfdffffff
[ 1.730042] bochs-drm 0000:00:02.0: remove_conflicting_pci_framebuffers: bar 2: 0xfebd4000 ā†’ 0xfebd4fff
[ 1.730468] bochs-drm 0000:00:02.0: vgaarb: deactivate vga console
[ 1.731899] Console: switching to colour dummy device 80x25
[ 1.736111] [drm] Found bochs VGA, ID 0xb0c0.
[ 1.736135] [drm] Framebuffer size 16384 kB @ 0xfd000000, mmio @ 0xfebd4000.
[ 1.738334] [TTM] Zone kernel: Available graphics memory: 503320 KiB
[ 1.738773] [TTM] Initializing pool allocator
[ 1.739219] [TTM] Initializing DMA pool allocator
[ 1.741783] [drm] Found EDID data blob.
[ 1.747551] [drm] Initialized bochs-drm 1.0.0 20130925 for 0000:00:02.0 on minor 0
[ 1.766838] fbcon: bochs-drmdrmfb (fb0) is primary device
[ 1.790862] Console: switching to colour frame buffer device 128x48
[ 1.799870] bochs-drm 0000:00:02.0: fb0: bochs-drmdrmfb frame buffer device
[ 1.831059] loop: module loaded
[ 1.841115] scsi host0: ata_piix
[ 1.843204] scsi host1: ata_piix
[ 1.844097] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc020 irq 14
[ 1.844407] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc028 irq 15
[ 1.845723] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 1.846488] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 2.007186] PCI Interrupt Link [LNKC] enabled at IRQ 11
[ 2.008955] e1000e 0000:00:03.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
[ 2.059287] e1000e 0000:00:03.0 0000:00:03.0 (uninitialized): registered PHC clock
[ 2.111118] e1000e 0000:00:03.0 eth0: (PCI Express:2.5GT/s:Width x1) 00:01:29:53:97:ba
[ 2.111900] e1000e 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection
[ 2.112677] e1000e 0000:00:03.0 eth0: MAC: 3, PHY: 8, PBA No: 000000-000
[ 2.116639] ehci_hcd: USB 2.0 ā€˜Enhancedā€™ Host Controller (EHCI) Driver
[ 2.116984] ehci-pci: EHCI PCI platform driver
[ 2.117347] ohci_hcd: USB 1.1 ā€˜Openā€™ Host Controller (OHCI) Driver
[ 2.117685] ohci-pci: OHCI PCI platform driver
[ 2.118001] uhci_hcd: USB Universal Host Controller Interface driver
[ 2.118414] usbcore: registered new interface driver usblp
[ 2.120610] usbcore: registered new interface driver usb-storage
[ 2.121603] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
[ 2.126316] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 2.126771] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 2.128999] mousedev: PS/2 mouse device common for all mice
[ 2.129853] rtc_cmos 00:05: RTC can wake from S4
[ 2.135367] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
[ 2.140361] rtc_cmos 00:05: registered as rtc0
[ 2.141265] rtc_cmos 00:05: alarms up to one day, y3k, 242 bytes nvram
[ 2.145163] device-mapper: ioctl: 4.41.0-ioctl (2019-09-16) initialised: dm-devel@redhat.com
[ 2.145680] hidraw: raw HID events driver (C) Jiri Kosina
[ 2.146987] usbcore: registered new interface driver usbhid
[ 2.147226] usbhid: USB HID core driver
[ 2.153567] IPVS: Registered protocols ()
[ 2.157330] IPVS: Connection hash table configured (size=4096, memory=64Kbytes)
[ 2.162471] IPVS: ipvs loaded.
[ 2.168285] NET: Registered protocol family 10
[ 2.175749] Segment Routing with IPv6
[ 2.176385] NET: Registered protocol family 17
[ 2.177393] Bridge firewalling registered
[ 2.185437] ata1.00: ATA-7: QEMU HARDDISK, 2.5+, max UDMA/100
[ 2.185812] ata1.00: 16777216 sectors, multi 16: LBA48
[ 2.187461] ata2.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100
[ 2.196296] scsi 0:0:0:0: Direct-Access ATA QEMU HARDDISK 2.5+ PQ: 0 ANSI: 5
[ 2.206287] sd 0:0:0:0: [sda] 16777216 512-byte logical blocks: (8.59 GB/8.00 GiB)
[ 2.207691] sd 0:0:0:0: [sda] Write Protect is off
[ 2.208472] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesnā€™t support DPO or FUA
[ 2.213608] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 2.215852] scsi 1:0:0:0: CD-ROM QEMU QEMU DVD-ROM 2.5+ PQ: 0 ANSI: 5
[ 2.232898] sda: sda1
[ 2.241382] sr 1:0:0:0: [sr0] scsi3-mmc drive: 4x/4x cd/rw xa/form2 tray
[ 2.241944] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 2.245717] sr 1:0:0:0: Attached scsi generic sg1 type 5
[ 2.247224] IPI shorthand broadcast: enabled
[ 2.247754] sched_clock: Marking stable (2227605589, 19906340)->(2330327890, -82815961)
[ 2.253198] OpenCN: loopback subsystem initialization.
[ 2.253523] OpenCN: streamer subsystem initialization.
[ 2.253807] OpenCN: sampler subsystem initialization.
[ 2.254002] OpenCN: threads subsystem initialization.
[ 2.254214] OpenCN: lcec subsystem initialization.
[ 2.254453] OpenCN: lcct subsystem initialization.
[ 2.254751] OpenCN: lcct subsystem initialized
[ 2.254949] OpenCN: feedopt subsystem initialization.
[ 2.255174] OpenCN: plc subsystem initialization.
[ 2.260351] sd 0:0:0:0: [sda] Attached SCSI disk
[ 2.261413] OpenCN: simple_pg subsystem initialization.
[ 2.262284] OpenCN: mux subsystem initialization.
[ 2.263347] OpenCN: kinematic subsystem initialization.
[ 2.264311] OpenCN: ocno subsystem initialization.
[ 2.328537] Freeing unused kernel image memory: 3408K
[ 2.328779] This architecture does not have kernel memory protection.
[ 2.329291] Run /init as init process
SOO Agency last initialization part processing nowā€¦
sooenv_init: starting SOO environmentā€¦
RT Agency ready
[ 2.338671] Low frequency threadā€¦
OpenCN initrd filesystem - now executing init from initramfs
[ 2.862565] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x112a48f5f74, max_idle_ns: 440795263567 ns
[ 2.863447] clocksource: Switched to clocksource tsc
[ 4.795842] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[ 5.039728] EXT4-fs (sda1): re-mounted. Opts: (null)
/etc/init.d/rcS: line 23: /etc/init.d/S01logging: Permission denied
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Initializing random number generatorā€¦ [ 5.793621] random: dd: uninitialized urandom read (512 bytes read)
done.
Starting network: OK
[ 6.445352] random: avahi-daemon: uninitialized urandom read (4 bytes read)
[ 6.476843] random: avahi-daemon: uninitialized urandom read (4 bytes read)
Creating OpenCN devā€¦ mkdir: canā€™t create directory ā€˜/dev/opencnā€™: File exists
OK
Logging into file (opencn debug)ā€¦ ā€“ logfile utility ā€“

Enabling RT logging in the file /root/opencn.log

OpenCN logging iOpenCN: enabling in-kernel loggingā€¦
nto /root/opencn.log ā€¦
starting OpenCNā€¦ Enabling RT logging echo
ā€“ logfile utility ā€“

Enabling RT logging in the file /root/opencn.log

OpenCN logging shutdown
OpenCN logging: moving /var/log/opencn.log to /root/opencn.log
Loading OpenCN configurationā€¦
Loading OpenCN configurationā€¦
HAL: creating pin ā€˜hal.rtapi_msg.enableā€™
hal_systemv: waiting for child ./lcec
Starting lcec component
[ 7.273831] general protection fault: 0000 [#1] SMP
[ 7.274149] CPU: 0 PID: 973 Comm: lcec Not tainted 5.4.44 #1
[ 7.274405] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
[ 7.274915] RIP: 0010:strcpy+0x5/0x20
[ 7.275121] Code: 20 41 f6 80 80 d8 cb 81 01 0f b6 d2 0f 45 ca 48 83 c7 01 39 c8 75 04 85 c0 75 bf 29 c8 c3 0f 1f 80 00 00 00 00 48 89 f8 31 d2 <0f> b6 0c 16 88 0c 10 48 83 c2 01 84 c9 75 f1 c3 66 66 2e 0f 1f 84
[ 7.276326] RSP: 0018:ffffc900001ebdb8 EFLAGS: 00000246
[ 7.276709] RAX: ffffffff824c6c40 RBX: 00007ffcc75aea00 RCX: 00007ffcc75aea00
[ 7.277005] RDX: 0000000000000000 RSI: ff00000000000000 RDI: ffffffff824c6c40
[ 7.277264] RBP: ffffc900001ebe18 R08: 0000000000000000 R09: 0000000000000000
[ 7.277521] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000006900000
[ 7.277779] R13: ffff88803c81a140 R14: ffff88803d85dd80 R15: 00007ffcc75aea00
[ 7.278097] FS: 00007f3a415ee740(0000) GS:ffff88803ea00000(0000) knlGS:0000000000000000
[ 7.278383] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 7.278581] CR2: 00000000004102d8 CR3: 000000003dfb6000 CR4: 00000000000006f0
[ 7.278889] Call Trace:
[ 7.279461] ? lcec_ioctl+0xe0/0x215
[ 7.279681] do_vfs_ioctl+0x39a/0x650
[ 7.279929] ? putname+0x47/0x70
[ 7.280049] __x64_sys_ioctl+0x3e/0x70
[ 7.280184] do_syscall_64+0x5f/0x250
[ 7.280316] ? __do_page_fault+0x40/0x50
[ 7.280571] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 7.280915] RIP: 0033:0x7f3a416dea67
[ 7.281057] Code: c0 75 b5 48 8d 3c 2b e8 17 ff ff ff 85 c0 78 b6 48 89 d8 5b 5d 41 5c c3 66 2e 0f 1f 84 00 00 00 00 00 90 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d d1 93 0c 00 f7 d8 64 89 01 48
[ 7.281793] RSP: 002b:00007ffcc75ae9c8 EFLAGS: 00000202 ORIG_RAX: 0000000000000010
[ 7.282099] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f3a416dea67
[ 7.282364] RDX: 00007ffcc75aea00 RSI: 0000000040010000 RDI: 0000000000000004
[ 7.282613] RBP: 00007ffcc75aeb60 R08: 0000000000408048 R09: 0000000000000001
[ 7.282873] R10: 0000000000000004 R11: 0000000000000202 R12: 0000000000000001
[ 7.283112] R13: 00007ffcc75aff33 R14: 00007ffcc75aeb60 R15: 00007ffcc75aff51
[ 7.283498] Modules linked in:
[ 7.284089] ā€”[ end trace 1bb3c7d0e6819189 ]ā€”
[ 7.284394] RIP: 0010:strcpy+0x5/0x20
[ 7.284548] Code: 20 41 f6 80 80 d8 cb 81 01 0f b6 d2 0f 45 ca 48 83 c7 01 39 c8 75 04 85 c0 75 bf 29 c8 c3 0f 1f 80 00 00 00 00 48 89 f8 31 d2 <0f> b6 0c 16 88 0c 10 48 83 c2 01 84 c9 75 f1 c3 66 66 2e 0f 1f 84
[ 7.285173] RSP: 0018:ffffc900001ebdb8 EFLAGS: 00000246
[ 7.285425] RAX: ffffffff824c6c40 RBX: 00007ffcc75aea00 RCX: 00007ffcc75aea00
[ 7.285659] RDX: 0000000000000000 RSI: ff00000000000000 RDI: ffffffff824c6c40
[ 7.285898] RBP: ffffc900001ebe18 R08: 0000000000000000 R09: 0000000000000000
[ 7.286134] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000006900000
[ 7.286425] R13: ffff88803c81a140 R14: ffff88803d85dd80 R15: 00007ffcc75aea00
[ 7.286662] FS: 00007f3a415ee740(0000) GS:ffff88803ea00000(0000) knlGS:0000000000000000
[ 7.286920] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 7.287108] CR2: 00000000004102d8 CR3: 000000003dfb6000 CR4: 00000000000006f0
[ 8.278569] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
[ 8.285007] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

system waits here.
My quick doubts are

  • Will qemuā€™s ip is 127.0.0.1 localhost ip address or i can find exact ip somewhere else? Once I have IP then i can move ahead with SSH and other explorations.
  • To run host application, can i run it on same pc on which qemu is running?

When trying to build host application i get below errors :blush:

nadim@nadim-pc:~/opencn/agency/usr$ ./build-host.sh -h
./build-host.sh [OPTIONS]
-c Clean
-d Debug build
-h Print this help
nadim@nadim-pc:~/opencn/agency/usr$ ./build-host.sh -c
Cleaning /home/nadim/opencn/agency/usr/build-host
nadim@nadim-pc:~/opencn/agency/usr$ ./build-host.sh -d
Starting Debug build
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ā€¦ suffix to tell
CMake that the project does not need compatibility with older versions.

ā€“ The C compiler identification is GNU 11.4.0
ā€“ The CXX compiler identification is GNU 11.4.0
ā€“ Detecting C compiler ABI info
ā€“ Detecting C compiler ABI info - done
ā€“ Check for working C compiler: /usr/bin/cc - skipped
ā€“ Detecting C compile features
ā€“ Detecting C compile features - done
ā€“ Detecting CXX compiler ABI info
ā€“ Detecting CXX compiler ABI info - done
ā€“ Check for working CXX compiler: /usr/bin/c++ - skipped
ā€“ Detecting CXX compile features
ā€“ Detecting CXX compile features - done
buildingcommonlibraries
== Build Host applications
ā€“ pybind11 v2.6.2
CMake Warning (dev) at /usr/share/cmake-3.22/Modules/CMakeDependentOption.cmake:84 (message):
Policy CMP0127 is not set: cmake_dependent_option() supports full Condition
Syntax. Run ā€œcmake --help-policy CMP0127ā€ for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
host/cmctl_client/python_module/pybind11/CMakeLists.txt:98 (cmake_dependent_option)
This warning is for project developers. Use -Wno-dev to suppress it.

ā€“ Found PythonInterp: /usr/bin/python3.10 (found version ā€œ3.10.12ā€)
ā€“ Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.10.so
ā€“ Performing Test HAS_FLTO
ā€“ Performing Test HAS_FLTO - Success
CMake Error at host/user_gui/CMakeLists.txt:9 (find_package):
By not providing ā€œFindQt5.cmakeā€ in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by ā€œQt5ā€, but
CMake did not find one.

Could not find a package configuration file provided by ā€œQt5ā€ (requested
version 5.9) with any of the following names:

Qt5Config.cmake
qt5-config.cmake

Add the installation prefix of ā€œQt5ā€ to CMAKE_PREFIX_PATH or set ā€œQt5_DIRā€
to a directory containing one of the above files. If ā€œQt5ā€ provides a
separate development package or SDK, be sure it has been installed.

ā€“ Configuring incomplete, errors occurred!
See also ā€œ/home/nadim/opencn/agency/usr/build-host/CMakeFiles/CMakeOutput.logā€.
make: *** No targets specified and no makefile found. Stop.
/home/nadim/opencn/agency/usr
Copy host/tooledit/tooledit.sh
nadim@nadim-pc:~/opencn/agency/usr$

  • Can you please also guide me whether i need to export any environment variable like we do in standard embedded Linux build or I can directly open a new terminal and build the host application?

Hi Nadim,

Something when wrong at the end of the boot process. Iā€™ve to check what is going on here.
To let you continue investigating OpenCN framework, you can do the following:

  • Comment all lines in agency/rootfs/board/common/rootfs_overlay/root/start_opencn.sh
  • Rebuild rootfs. From agency folder do ./build.sh -r
  • Deploy rootfs and apps: ./deploy -ru`
  • Start again OpenCN ā†’ You should arrive up to the opencn prompt

Hope this helps
J-P

1 Like

Regarding the error during the build of the host apps: It seems your system is missing QT5.

Here are the package you should installed: sudo apt install qtbase5-dev

Hope this helps
J-P

Continuing the discussion from OpenCN detailed documentation:

This solution worked.
Below is the first login and ifconfig command on qemu:

opencn ~ # ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:29:53:97:BA
inet addr:192.168.53.15 Bcast:192.168.53.255 Mask:255.255.255.0
inet6 addr: fe80::201:29ff:fe53:97ba/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:15417 (15.0 KiB)
Interrupt:11 Memory:feb80000-feba0000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:18 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3047 (2.9 KiB) TX bytes:3047 (2.9 KiB)

Below are the directory contents of openCN.

opencn ~ # ls
SetPoints_fast.txt lcct* one-drive.xml
cmctl-server* lcec* opencn-m5-server*
cmd.hal logfile* opencn-server*
cmd_float.hal loopback* plc*
cmds/ micro3.hal rate.hal
el3702_example.hal micro3.xml sampler*
el3702_example.xml micro5/ setpoints/
ethercat* mux* simple_pg*
example/ ocno* start_opencn.sh*
feedopt* ocno_dbg.hal streamer*
gcode/ ocno_test.sh* test_input.txt
halcmd* one-drive-feedopt.hal threads*
header.txt one-drive-sampler.hal timing_tests*
kinematic* one-drive.hal

I will redo the whole procedure on Ubuntu version because its what i use for other work also. I will redo and then get in touch with you for documentation discussion of what i did till now. My plan is to make such a document under guidance of you guys which is more interactive with pictures so that any new user can build openCN framework for all platforms and have a feel of what it is.

Great that the boot went well !

Can you share the content of micro5/micro5.hal ?

  • the boot issue seem related to it

Thanks
J-P

iI am very sorry to say I am using vi editor and its not able to paste contents out of editor so i am unable to copy the contents. can you tell me the path where all qemu files are stored host pc?

Below are the contents of root.

m5_kin_param.txt micro5_initcmds_tsdZS.xml
micro5.hal micro5_setup1.hal
micro5.ini micro5_setup1_with_plc.hal
micro5_ec_topology.xml micro5_startup.sh*
micro5_initcmds_tsdXB.xml micro5_test.txt
micro5_initcmds_tsdYC.xml tool.tbl

Iā€™d like to see the file present on the target.

Once you started OpenCN with the st command, you can type the following command from the prompt: cat micro5/micro5.hal