Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/CI_github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ jobs:
image: dynamicdevices/yocto-ci-build:latest
options: --privileged --platform linux/amd64 -v /dev/net/tun:/dev/net/tun -v /dev/kvm:/dev/kvm
strategy:
max-parallel: 1
matrix:
dotnet_version: [8.0.303, 6.0.424]
dotnet_version: [10.0.100, 8.0.303, 6.0.424]
mono_version: [6.12.0.206]
branch: [scarthgap]
arch: [x86-64, arm, arm64]
Expand Down Expand Up @@ -83,7 +84,7 @@ jobs:
- name: Cleaning
run: |
. ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build
bitbake -c cleanall test-image-mono dotnet dotnet-native
bitbake -c cleanall test-image-mono dotnet dotnet-helloworld dotnet-native
- name: Building
run: |
. ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ meta-mono is an OpenEmbedded layer that builds dotNet, the mono runtime and mono

NOTE: 24/01/22 - This [patch](https://patchwork.openembedded.org/patch/171349/) is needed to Poky for branch morty, sumo (and perhaps others) to fix a gcc version build error.

## Limitations

### pythonnet

The `python3-pythonnet` package currently does not support .NET 10.

## Layer Dependencies

This layer depends on:
Expand Down
7 changes: 6 additions & 1 deletion recipes-mono/dotnet-helloworld/dotnet-helloworld_1.0.bb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ PRIORITY = "optional"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

DEPENDS:append = " dotnet-native"
inherit linuxloader

DEPENDS:append = " dotnet-native patchelf-native"

RDEPENDS:${PN}:append = " \
icu \
Expand Down Expand Up @@ -33,6 +35,9 @@ do_compile () {
dotnet new console --force -o ${S} --name ${PN}
dotnet build ${S}/${PN}.csproj --output ${B}/${PN} --configuration release --runtime linux-${SRC_ARCH}

# The interpreter points to a path on the build host by default; fix it to use the correct path for the target
patchelf --set-interpreter "${@get_linuxloader(d)}" ${B}/${PN}/${PN}

#FIXME: remove the following line. if the lttng-ust conflict is solved
#FIXME: dotnet 8 doesn't produce libcoreclrtraceptprovider.so for the helloworld applications
# When dotnet 6 and 7 reach end of life remove the following line.
Expand Down
9 changes: 7 additions & 2 deletions recipes-mono/dotnet/dotnet.inc
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@ DEPENDS = "patchelf-native"
RDEPENDS:${PN}:class-target = "icu zlib libgssapi-krb5"
RDEPENDS:${PN}:class-native = "icu zlib"
RDEPENDS:${PN}:class-nativesdk = "icu zlib"
RDEPENDS:${PN}-dev = "zlib"

PR = "r0"

SRC_ARCH:aarch64 = "arm64"
SRC_ARCH:arm = "arm"
SRC_ARCH:x86-64 = "x64"

SRC_URI[vardeps] += "SRC_FETCH_ID SRC_ARCH"
SRC_URI[vardeps] += "SRC_ARCH"
SRC_URI[sha512sum] = "${SRC_SHA512SUM}"

SRC_URI = "https://download.visualstudio.microsoft.com/download/pr/${SRC_FETCH_ID}/dotnet-sdk-${PV}-linux-${SRC_ARCH}.tar.gz;subdir=dotnet-${PV}"
SRC_URI = "https://builds.dotnet.microsoft.com/dotnet/Sdk/${PV}/dotnet-sdk-${PV}-linux-${SRC_ARCH}.tar.gz;subdir=dotnet-${PV}"

do_configure[noexec] = "1"
do_compile[noexec] = "1"
Expand All @@ -41,6 +42,7 @@ do_install() {
install -d ${D}${datadir}/dotnet/host/fxr
cp -r --no-preserve=ownership ${S}/host/fxr/${DOTNET_RUNTIME_VERSION} ${D}${datadir}/dotnet/host/fxr

cp -r --no-preserve=ownership ${S}/packs ${D}${datadir}/dotnet/
cp -r --no-preserve=ownership ${S}/sdk ${D}${datadir}/dotnet/
cp -r --no-preserve=ownership ${S}/sdk-manifests ${D}${datadir}/dotnet/

Expand All @@ -52,6 +54,7 @@ do_install() {

# Hack to fix liblttng-ust dependency issues
patchelf --remove-needed liblttng-ust.so.0 ${D}${datadir}/dotnet/shared/Microsoft.NETCore.App/${DOTNET_RUNTIME_VERSION}/libcoreclrtraceptprovider.so
patchelf --remove-needed liblttng-ust.so.1 ${D}${datadir}/dotnet/shared/Microsoft.NETCore.App/${DOTNET_RUNTIME_VERSION}/libcoreclrtraceptprovider.so

install -d ${D}${libdir}
ln -rs ${D}${datadir}/dotnet/host/fxr/${DOTNET_RUNTIME_VERSION}/libhostfxr.so ${D}${libdir}/libhostfxr.so
Expand All @@ -71,6 +74,7 @@ FILES:${PN} += "\
"

FILES:${PN}-dev = "\
${datadir}/dotnet/packs \
${datadir}/dotnet/sdk \
${datadir}/dotnet/sdk-manifests \
${datadir}/dotnet/templates \
Expand All @@ -83,6 +87,7 @@ FILES:${PN}-dbg = "\
RRECOMMENDS:dotnet-dev[nodeprrecs] = "1"

INSANE_SKIP:${PN} = "already-stripped libdir staticdev textrel dev-so"
INSANE_SKIP:${PN}-dev = "libdir staticdev dev-elf"
INSANE_SKIP:${PN}-dbg = "libdir"

BBCLASSEXTEND = "native nativesdk"
7 changes: 7 additions & 0 deletions recipes-mono/dotnet/dotnet_10.0.100.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require dotnet.inc

DOTNET_RUNTIME_VERSION = "10.0.0"

SRC_SHA512SUM:aarch64 = "24fc2b105ab8484c34213ef57ac4e6a36a6593241f0ebc6cf0a40ec2f5fea2d76de85c4b87b2a53814d194e32ec1288dd5053cd6f52768d79cd0ac948cbf84ea"
SRC_SHA512SUM:arm = "45f2d7fd05670a5a14fa480889e45920782277575dba0da44c259997d059d64070b40ac7aae9f0c3a3076d9fed5b787854a8abdc2dfdb4783b449c05c1c9b49c"
SRC_SHA512SUM:x86-64 = "f78dbac30c9af2230d67ff5c224de3a5dbf63f8a78d1c206594dedb80e6909d2cc8a9d865d5105c72c2fd2aa266fc0c6c77dedac60408cbccf272b116bd11b07"
5 changes: 0 additions & 5 deletions recipes-mono/dotnet/dotnet_6.0.424.bb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ require dotnet.inc

DOTNET_RUNTIME_VERSION = "6.0.32"

SRC_FETCH_ID:aarch64 = "5f4b8e71-b03a-45cb-9a81-3cfcb51ef346/eb9509f0a061be1106689c1fbf5d5169"
SRC_SHA512SUM:aarch64 = "6a24dcad251016aa82ea11d3c665b250d5f86e7f8a82a6ec0f01d250e9cd671fd0746812757c023f28d4929248d326b2a5dc13ede8d5b5486671ea1452954aed"

SRC_FETCH_ID:arm = "500addd2-cfbf-49b4-b09f-e497f93331a4/e096ebc13bba6a9f6890588c5f617cae"
SRC_SHA512SUM:arm = "671c39af0b0fa658b2c55b32923b90122074e0cff3070588134d50625ac0dc52c9abb93e5c872b7c84231128d5ef8aa213133df7fba552bd9aefb8e83f93e778"

SRC_FETCH_ID:x86-64 = "e94bb674-1fb1-4966-b2f0-bc9055ea33fc/428b37dee8ffb641fd1e45b401b2994c"
SRC_SHA512SUM:x86-64 = "e9823aa2ad261199f8289fde8721931c1e4d47357b4973b8c7d34c12abd440bb932064ac151b0e0d7b3d5b72a5dfe3f20d5dafa19e6f56f1a61ad54b7de5e584"
5 changes: 0 additions & 5 deletions recipes-mono/dotnet/dotnet_8.0.303.bb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ require dotnet.inc

DOTNET_RUNTIME_VERSION = "8.0.7"

SRC_FETCH_ID:aarch64 = "4bfdbe1a-e1f9-4535-8da6-6e1e7ea0994c/b110641d008b36dded561ff2bdb0f793"
SRC_SHA512SUM:aarch64 = "09cb6b12770febe186e36971afdbcea6e8bf5fb34b7701cd8c416f597d3b7e930d05e51ccef1985e5598291540ef2d721187904587469300bb39772317e2be5c"

SRC_FETCH_ID:arm = "9e0bdcde-1878-4351-883a-c0adbb570bba/156df738634f710dad131e993fc0f48a"
SRC_SHA512SUM:arm = "03b3730d1fd5e1955b8a23e69695c975e88e781513b1f47027ce4ed96a8743ba2560ca87ae2e937ebd89ef69a3aa05c4ca2f39eede5a27bd937775f372b9feba"

SRC_FETCH_ID:x86-64 = "60218cc4-13eb-41d5-aa0b-5fd5a3fb03b8/6c42bee7c3651b1317b709a27a741362"
SRC_SHA512SUM:x86-64 = "814ff07ccdfc8160c4a24adfda6c815e7feace88c59722f827a5a27041719067538754911fc15cb46978e16566fe0938695891723d182055190e876131faedda"
1 change: 0 additions & 1 deletion recipes-mono/images/test-image-mono.bb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ DEFAULT_TEST_SUITES:pn-${PN}:prepend = "dotnet "
IMAGE_INSTALL += "msbuild \
dotnet \
dotnet-helloworld \
python3-pythonnet \
"

IMAGE_BASENAME = "${PN}"
Expand Down
Loading