简体   繁体   English

在 Buildroot 中安装 Dotnet Core SDK 3.1?

[英]Install Dotnet Core SDK 3.1 in Buildroot?

I have searched for a long time but have not found any instructions or help in the whole WorldWideWeb how to install the DotNet Core SDK 3.1 on a buildroot for 64Bit systems.我已经搜索了很长时间,但在整个 WorldWideWeb 中没有找到任何说明或帮助,如何在 64 位系统的 buildroot 上安装 DotNet Core SDK 3.1。

Unfortunately DotNet is not available in the menuconfig entry, so you have to install and use it manually.不幸的是,菜单配置条目中没有 DotNet,因此您必须手动安装和使用它。

Does anyone already have DotNet Core installed on a buildroot and can show me how to add the package manually to buildroot?是否有人已经在 buildroot 上安装了 DotNet Core,并且可以告诉我如何手动将 package 添加到 buildroot? Thanks in advance.提前致谢。

I have just made a package for Buildroot you are looking for.我刚刚为您正在寻找的 Buildroot 制作了 package。 Please take a look at my post to Buildroot's mail list fore more details and caveats: http://lists.busybox.net/pipermail/buildroot/2020-August/289140.html请查看我在 Buildroot 邮件列表中的帖子以了解更多详细信息和警告: http://lists.busybox.net/pipermail/buildroot/2020-August/289140.html

Basically, you need to create new directory package/dotnet-runtime and place three files there: Config.in, dotnet-runtime.hash and dotnet-runtime.mk (I am using external tree as described here: https://buildroot.org/downloads/manual/manual.html#outside-br-custom ).基本上,您需要创建新目录 package/dotnet-runtime 并在其中放置三个文件:Config.in、dotnet-runtime.hash 和 dotnet-runtime.mk(我正在使用此处描述的外部树: https://buildroot。 org/downloads/manual/manual.html#outside-br-custom )。 These are small text files, so I copy the content here.这些是小文本文件,所以我将内容复制到这里。

  • Config.in:配置文件:
comment "dotnet-runtime needs a toolchain w/ glibc and threads"
        depends on !BR2_TOOLCHAIN_USES_GLIBC

config BR2_PACKAGE_DOTNET_RUNTIME
    bool "dotnet-runtime"
    depends on BR2_TOOLCHAIN_USES_GLIBC
    depends on BR2_TOOLCHAIN_HAS_THREADS
    depends on BR2_PACKAGE_LIBZLIB
    depends on BR2_PACKAGE_OPENSSL
    depends on BR2_PACKAGE_LIBCURL
    depends on BR2_PACKAGE_ICU
    help
      .NET Core 3.1 Runtime (v3.1.7) - Linux ARM32 binaries

      https://dotnet.microsoft.com/download/dotnet-core/3.1 
  • dotnet-runtime.hash (just one line) dotnet-runtime.hash(仅一行)
sha512 a586ed88cebbef298cda04c94e1809017800abea50668e18bcf27c3aa1ca114bb16963bcdcc4fd535288838120cba52966d594ef395bb8fac11693f64c97ccc1 dotnet-runtime-3.1.7-linux-arm.tar.gz
  • dotnet-runtime.mk dotnet-runtime.mk
################################################################################
#
# dotnet-runtime
#
################################################################################
DOTNET_RUNTIME_VERSION = 3.1.7
DOTNET_RUNTIME_SITE = https://download.visualstudio.microsoft.com/download/pr/69984653-402e-442c-9588-eb92560d0fce/5ad7995a09334dd2ee56f00fb6dc0521
DOTNET_RUNTIME_SOURCE = dotnet-runtime-$(DOTNET_RUNTIME_VERSION)-linux-arm.tar.gz
DOTNET_RUNTIME_LICENSE = MIT
DOTNET_RUNTIME_LICENSE_FILES = LICENSE.txt

# Runtime could be installed in the global location [/usr/share/dotnet] and
# will be picked up automatically.
# As alternative, it is possible to use the DOTNET_ROOT environment variable
# to specify the runtime location or register the runtime location in
# [/etc/dotnet/install_location] 
# This script will install runtime to
# /usr/share/dotnet-runtime-$(DOTNET_RUNTIME_VERSION)
define DOTNET_RUNTIME_INSTALL_TARGET_CMDS
    cp -R $(@D) $(TARGET_DIR)/usr/share/
endef

$(eval $(generic-package)) 

After selecting all dependencies, the package should be visible in menuconfig.选择所有依赖项后,package 应该在 menuconfig 中可见。 This package is not 100% universal (only for 32-bit ARM) but should be easy to adapt for other use-cases.这个 package 不是 100% 通用的(仅适用于 32 位 ARM),但应该很容易适应其他用例。 Just change download links and hash for 64-bit version.只需将下载链接和 hash 更改为 64 位版本。 Please refer to the mailing list post I mentioned above for more details.有关详细信息,请参阅我上面提到的邮件列表帖子。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM