Makers Blog Archive

Install the .NET Core runtime 3.0.0 on the AXC F 2152

Bjoern PLCnext Team 17 October 2019 min. read
438 views 0 comments

Abstract

This guide explains how to install the dotnet core runtime version 3.0.0 on the PLCnext controller AXC F 2152. The controller need at least the firmware 2019.6.3 installed.

Installation

Download the dotnet runtime binaries for Linux ARM32.

wget https://download.visualstudio.microsoft.com/download/pr/0c5e013b-fa57-44dc-85bf-746885181278/58647e532fcc3a45209c13cdfbf30c74/dotnet-runtime-3.0.0-linux-arm.tar.gz

Copy the archive to the controller.

scp dotnet-runtime-3.0.0-linux-arm.tar.gz admin@192.168.1.10:/opt/plcnext/

Connect with ssh to the controller and open a root login shell. This needs an enabled root account on the controller.

ssh admin@192.168.1.10
su - root

Extract the archive.

mkdir /opt/dotnet-runtime-3.0.0-linux-arm
tar xvf /opt/plcnext/dotnet-runtime-3.0.0-linux-arm.tar.gz -C /opt/dotnet-runtime-3.0.0-linux-arm
rm /opt/plcnext/dotnet-runtime-3.0.0-linux-arm.tar.gz

Environment setup

Create a profile script to setup the environment for dotnet.

cat <<"EOF" > /etc/profile.d/dotnet.sh
#!/bin/sh
export DOTNET_ROOT=/opt/dotnet-runtime-3.0.0-linux-arm
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
export COMPlus_LTTng=0
export PATH="$PATH:/opt/dotnet-runtime-3.0.0-linux-arm"
EOF
chmod +x /etc/profile.d/dotnet.sh

Background information

The environment variable DOTNET_SYSTEM_GLOBALIZATION_INVARIANT has to be set due to a missing ICU installation on the controller. See the Globalization invariant documentation in the corefx GitHub repository.

The COMPlus_LTTng environment variable has to be set due to an old lttng installation on the controller. This prevents the tracing library to be loaded at runtime from dotnet core. See the issue #15693 in the coreclr GitHub repository for more information, especially this comment. The environment variable was introduced with the pull request #24733.

Note:

The Makers Blog shows applications and user stories of community members that are not tested or reviewed by Phoenix Contact. Use them at your own risk.

Discussion

Please login/register to comment

Login/Register

Leave a Reply

Newsletter
Never miss a new article
Sign up for the newsletter
Never miss news about PLCnext Technology
Get interesting content via newsletter four times a year
Receive exclusive information before all other users