.NET Core 2.0 running on Dragonboard 410c Debian

Forgive me if this has already been solved and posted but I’d like to share with everyone the steps I followed to install .NET Core 2.0 on my Dragonboard 410c.

First off I’m running an install of Debian provide by 96Boards but I’m not sure of the vintage.
I did perform apt-get update and apt-get upgrade before beginning the process of installing the pieces required for .NET.

First thing that’s required is to configure dpkg to allow installation of armhf architecture packages.
This is required because .NET Core for Linux ARM targets a 32 bit environment, the Debian distribution provided by 96Boards is 64 bit. You’re welcome to convert the entire Debian install to 32 bit (which I seriously considered) but these steps avoid that path.
Issue the following commands to reconfigure dpkg:
$ sudo dpkg –add-architecture armhf
$ sudo apt-get update

Once this step completes it’s time to install the libraries .NET Core requires, here are the commands that do this:
$ sudo apt-get install linux-libc-dev:armhf libc6-dev:armhf uuid-dev:armhf liblttng-ust-dev:armhf
$ sudo apt-get install libunwind8:armhf libunwind8-dev:armhf
$ sudo apt-get install gettext:armhf libicu-dev:armhf libcurl4-openssl-dev:armhf libssl-dev:armhf unzip:armhf libcroco3:armhf libglib2.0-0:armhf libunistring0:armhf libcurl3:armhf libssl1.0.0:armhf libcomerr2:armhf libgssapi-krb5-2:armhf libkrb5-3:armhf libldap-2.4-2:armhf libssh2-1:armhf libgcrypt20:armhf libgpg-error0:armhf

At this point an error was displayed in the package install process and I was forced to rename 2 files before it would continue, issue the following commands to do this
$ sudo mv /usr/share/doc/libffi6/changelog.Debian.gz /usr/share/doc/libffi6/changelog.Debian.gz.sav
$ sudo mv /usr/share/doc/libxml2/changelog.Debian.gz /usr/share/doc/libxml2/changelog.Debian.gz.sav

Now the package manager can be told to “fix” the broken dependencies and continue, issue this command to do this
$ sudo apt-get –f install

*** You may run into additional library dependencies if your set of installed packages differs from mine. Please document them in this thread if you do. ***

Now I all the required library packages are installed, during the process the package manager suggested installing an XML core package, do that with this command, I believe this is optional but I did it anyway.
$ sudo apt-get install xml-core

From this point on the steps describe the installation of .NET Core itself, I basically followed the steps for installing it on a Raspberry Pi but skipped those that describe installing the prerequisite libraries, we just did that.

I followed the steps on this page to install the .NET Core 2.0 run time on my dragon board.
https://blogs.msdn.microsoft.com/david/2017/07/20/setting_up_raspian_and_dotnet_core_2_0_on_a_raspberry_pi

Here are the steps with the Raspberry Pi stuff eliminated:
$ curl -sSL -o dotnet.tar.gz https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-linux-arm.tar.gz
$ sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
$ sudo ln -s /opt/dotnet/dotnet /usr/local/bin

This command should result in display of the dotnet help information, no error indicates a successful install
$ dotnet --help

The .NET Core 2.0 run time is now installed on your Dragonboard.

Due to the fact that the .NET Core SDK is not available on Linux ARM systems yet you have to create and build a test project on a different system.
I downloaded and installed the .NET Core 2.0 SDK, it can be found here:

Next I followed the steps on this page:
** Again, ignore the instructions for installing the .NET Core prerequisites. **

After all this I was able to successfully execute the example C# helloworld program on my Dragonboard 410c in the Debian 64-bit environment.
Keep in mind the “test” program is extremely trivial and I’ve not had an opportunity to do further testing so there is no guarantee everything you want to do will actually work, but this is a good step forward.

Enjoy!!

Wheelman (Ken Wheeler)

I want to provide an update on this.
When I finished with the install I ran the classic “Hello World” program as a test.
This is a trivial program that simply writes a string to the console and exits.

I just ran a more complex test that involved creating a program that connects to a PostgreSQL server on a network accessible workstation. I used the Npgsql library to do it.
The program establishes a connection to the server, queries all the rows from a table, prints the number of rows returned and closes the connection.
All operations worked correctly. The database access operations are not the speediest in the world but this test shows it’s possible to execute .NET applications with significant functionality on the Dragonboard 410c running the Debian Linux distribution.

At some point I may embark on the quest to port libsoc to C# so it’ll be possible to access hardware resources without resorting to using P/Invoke.

Wheelman (Ken Wheeler)

Cheers Ken. Might be giving this a go soon

Great post. I updated for .NET Core 2.1

sudo dpkg --add-architecture armhf
sudo apt-get update
sudo mv /usr/bin/curl-config /usr/bin/curl-config.bak

sudo apt-get install -y linux-libc-dev:armhf libc6-dev:armhf uuid-dev:armhf liblttng-ust-dev:armhf libunwind8:armhf libunwind8-dev:armhf gettext:armhf libicu-dev:armhf libssl-dev:armhf unzip:armhf libcroco3:armhf libunistring0:armhf libcurl3:armhf libcomerr2:armhf libgssapi-krb5-2:armhf libkrb5-3:armhf libldap-2.4-2:armhf libssh2-1:armhf libgcrypt20:armhf libgpg-error0:armhf xml-core libglib2.0-0:armhf libssl1.1:armhf

sudo apt-get install libcurl4-openssl-dev:armhf
sudo apt-get install -f

sudo mkdir /opt/dotnet
sudo curl https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-linux-arm.tar.gz | sudo tar xz -C /opt/dotnet

sudo ln -sf /opt/dotnet/dotnet /usr/local/bin

dotnet --help
dotnet --list-runtimes

You should see
Microsoft.NETCore.App 2.1.0-preview3-26322-01 [/opt/dotnet/shared/Microsoft.NETCore.App]

I tried the SDK, but it gave me the Bus Error