Running .NET Core 3.0 on Raspberry Pi 4: True 64-bit!

Introduction

Recently, I wrote an article titled “Installing .NET Core 3.0 Runtime and SDK on Raspberry Pi 4”, followed by subsequent articles on “Auto-starting .NET Core 3.0 Environment on Raspberry Pi”, “Nginx Configuration for Internal Access to Raspberry Pi 4 ASP.NET Core 3.0 Website”, and “Tianpai Magic | .NET Core 3.0 + Azure Remotely Turning On a Light on Raspberry Pi”. However, back then the official Raspberry Pi OS, Raspbian, did not have a 64-bit version, so I could only run the ARM32 version of .NET Core 3.0. But now, the situation has changed, and today I successfully ran the ARM64 version of .NET Core 3.0 on Raspberry Pi 4.

Gentoo

Due to the desolation of Windows 10 IoT Core (and the UWP apps above), I have been forced to survive using Linux. Recently, I discovered a Linux system called Gentoo, which supports the 64-bit CPU of Raspberry Pi 4. Project address:

https://github.com/sakaki-/gentoo-on-rpi-64bit

Moreover, the author is a female!

Running .NET Core 3.0 on Raspberry Pi 4: True 64-bit!

I won’t elaborate on the system download and installation process, as it is completely consistent with installing other systems on Raspberry Pi. After installation, you can download the .NET Core 3.0 SDK, ARM64 version:

wget https://download.visualstudio.microsoft.com/download/pr/cbc83a0e-895c-4959-99d9-21cd11596e64/b0e59c2ba2bd3ef0f592acbeae7ab27d/dotnet-sdk-3.0.100-linux-arm64.tar.gz

wget https://download.visualstudio.microsoft.com/download/pr/5cbf9f66-7945-43e2-9b7c-351f900e9893/2fcd48f3d4db99283ebdb46daf9bacec/aspnetcore-runtime-3.0.0-linux-arm64.tar.gz

mkdir dotnet-arm64

tar zxf aspnetcore-runtime-3.0.0-linux-arm64.tar.gz -C $HOME/dotnet-arm64

tar zxf dotnet-sdk-3.0.100-linux-arm64.tar.gz -C $HOME/dotnet-arm64

export DOTNET_ROOT=$HOME/dotnet-arm64

export PATH=$PATH:$HOME/dotnet-arm64

Running .NET Core 3.0 on Raspberry Pi 4: True 64-bit!

The remaining .NET Core operations are the same as what I wrote in previous articles; you can also play with ASP.NET Core.

Ubuntu 19.10

Ubuntu recently released version 19.10, claiming to support Raspberry Pi 4. The download and installation documentation for the 64-bit image for Raspberry Pi 4 is here:

https://ubuntu.com/download/iot/raspberry-pi

Running .NET Core 3.0 on Raspberry Pi 4: True 64-bit!

Unfortunately, I have never been able to successfully boot this version of Ubuntu on Raspberry Pi 4. A thing called cloud-init successfully hangs every boot, so I cannot experiment with whether Ubuntu can run ARM64 .NET Core on Raspberry Pi 4.

Official Raspbian 64-bit Version

On the official Raspberry Pi forum, an official developer of Raspbian, dom, posted a thread:

Pi4 64-bit raspbian kernel for testing – Focus on Pi4

https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=250730&hilit=64+bit

This is a very volatile testing version that has not yet been officially released. I also tried it, and found that although the system kernel is 64-bit, it seems that due to the userland being 32-bit, .NET Core 3.0 ARM64 was not recognized successfully.

Conclusion

Impressive, or the girl is impressive!

Running .NET Core 3.0 on Raspberry Pi 4: True 64-bit!

Leave a Comment