linux .net内核可以在ARM Cortex-A7上运行吗?

mpgws1up  于 2022-12-18  发布在  Linux
关注(0)|答案(1)|浏览(246)

I created a small console app for testing it with an ARM Cortex-A7 device. I tried to use couple of runtimes

  • linux-arm
  • linux-arm64
  • linux-musle-arm
  • linux-musle-arm64

but without success. If I'm using a 32bit runtime, the executable will not found. If I'm using a 64bit runtime, it fails with the following output:
root@MC100:~# /root/publish/openwrttest /root/publish/openwrttest: line 1: can't open @▒@8: no such file /root/publish/openwrttest: line 1:ELF▒: not found /root/publish/openwrttest: line 2: @!@@@0ppp1▒1▒▒▒▒▒▒8 T 8▒8▒8▒p▒▒▒DDP▒td▒▒Q▒td▒▒▒▒R▒td▒▒▒▒▒▒H/lib/ld-linux-aarch64.so.1GNUGNU▒▒׽S▒Ym▒ a▒x|▒#p]| ▒ ▒ ▒▒▒▒▒: not found /root/publish/openwrttest: PuTTYline 2: L▒▒: not found /root/publish/openwrttest: line 4: syntax error: unterminated quoted string
So my question is, does it work with this cpu? Does anyone have already expirence with that or any idea where is my mistake?

UPDATE LDD trace gives the following info:

root@MC100:~# ldd /root/publish/openwrttest /lib/ld-linux-armhf.so.3 (0x76ee0000) libpthread.so.0 => /lib/ld-linux-armhf.so.3 (0x76ee0000) libdl.so.2 => /lib/ld-linux-armhf.so.3 (0x76ee0000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x76dc2000) libm.so.6 => /lib/ld-linux-armhf.so.3 (0x76ee0000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x76da7000) libc.so.6 => /lib/ld-linux-armhf.so.3 (0x76ee0000) Error loading shared library ld-linux-armhf.so.3: No such file or directory (needed by /root/publish/openwrttest)

oknwwptz

oknwwptz1#

据Microsoft称,.NET Core 3.0现已过时,不再受支持:* 此版本已到生命周期结束日期,这意味着不再支持它。我们建议迁移到支持的版本,如.NET 7.0*。
话虽如此,.NET 7.0在Cortex-A7上运行得非常好,例如使用dotnet-sdk-7.0.101-linux-musl-arm(您可以从here下载)。
我在运行Alpine Linux 3.17.0的四芯Cortex-A7 nanopi 2-m1上测试了它-参见微软安装说明here
程序:

wget https://download.visualstudio.microsoft.com/download/pr/bde0b4e5-2b2c-4046-a74f-6618bfa8ab8a/3170cd4312552c2eba2a0de3acd85337/dotnet-sdk-7.0.101-linux-musl-arm.tar.gz
mkdir -p $HOME/dotnet && tar zxf dotnet-sdk-7.0.101-linux-musl-arm.tar.gz -C $HOME/dotnet
export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet

# Verify dotnet is working.  
dotnet

Usage: dotnet [options]
Usage: dotnet [path-to-application]

Options:
  -h|--help         Display help.
  --info            Display .NET information.
  --list-sdks       Display the installed SDKs.
  --list-runtimes   Display the installed runtimes.

path-to-application:
  The path to an application .dll file to execute.
  
# Create HelloWorld application.
dotnet new console -o HelloWorld  -f net7.0

cd HelloWorld/
dotnet run
Hello, World!

相关问题