繁体   English   中英

在 Buildroot 中安装 Dotnet Core SDK 3.1?

[英]Install Dotnet Core SDK 3.1 in Buildroot?

我已经搜索了很长时间,但在整个 WorldWideWeb 中没有找到任何说明或帮助,如何在 64 位系统的 buildroot 上安装 DotNet Core SDK 3.1。

不幸的是,菜单配置条目中没有 DotNet,因此您必须手动安装和使用它。

是否有人已经在 buildroot 上安装了 DotNet Core,并且可以告诉我如何手动将 package 添加到 buildroot? 提前致谢。

我刚刚为您正在寻找的 Buildroot 制作了 package。 请查看我在 Buildroot 邮件列表中的帖子以了解更多详细信息和警告: http://lists.busybox.net/pipermail/buildroot/2020-August/289140.html

基本上,您需要创建新目录 package/dotnet-runtime 并在其中放置三个文件:Config.in、dotnet-runtime.hash 和 dotnet-runtime.mk(我正在使用此处描述的外部树: https://buildroot。 org/downloads/manual/manual.html#outside-br-custom )。 这些是小文本文件,所以我将内容复制到这里。

  • 配置文件:
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(仅一行)
sha512 a586ed88cebbef298cda04c94e1809017800abea50668e18bcf27c3aa1ca114bb16963bcdcc4fd535288838120cba52966d594ef395bb8fac11693f64c97ccc1 dotnet-runtime-3.1.7-linux-arm.tar.gz
  • 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)) 

选择所有依赖项后,package 应该在 menuconfig 中可见。 这个 package 不是 100% 通用的(仅适用于 32 位 ARM),但应该很容易适应其他用例。 只需将下载链接和 hash 更改为 64 位版本。 有关详细信息,请参阅我上面提到的邮件列表帖子。

暂无
暂无

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

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