Skip to content

Commit c565d28

Browse files
committed
dotnet: Add dotnet 10
This switches from the Visual Studio URLs to the .NET URLs, as per upstream [1]. [1] dotnet/core#9869
1 parent b05f077 commit c565d28

8 files changed

Lines changed: 34 additions & 21 deletions

File tree

.github/workflows/CI_github.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ jobs:
1515
image: dynamicdevices/yocto-ci-build:latest
1616
options: --privileged --platform linux/amd64 -v /dev/net/tun:/dev/net/tun -v /dev/kvm:/dev/kvm
1717
strategy:
18+
max-parallel: 1
1819
matrix:
19-
dotnet_version: [8.0.406, 6.0.428]
20+
dotnet_version: [10.0.100, 8.0.406, 6.0.428]
2021
mono_version: [6.12.0.206]
2122
branch: [styhead]
2223
arch: [x86-64, arm, arm64]
@@ -82,10 +83,10 @@ jobs:
8283
8384
echo "BB_NUMBER_THREADS ?= \"\${@oe.utils.cpu_count()}\"" >> conf/local.conf
8485
echo "PARALLEL_MAKE ?= \"-j \${@oe.utils.cpu_count()} -l \${@oe.utils.cpu_count()*2}\"" >> conf/local.conf
85-
# - name: Cleaning
86-
# run: |
87-
# . ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build
88-
# bitbake -c cleanall test-image-mono dotnet dotnet-native
86+
- name: Cleaning
87+
run: |
88+
. ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build
89+
bitbake -c cleanall test-image-mono dotnet dotnet-helloworld dotnet-native
8990
- name: Building Mono Test Image
9091
run: |
9192
. ./${BRANCH}/poky/oe-init-build-env ${BRANCH}/build

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,16 @@ meta-mono is an OpenEmbedded layer that builds dotNet, the mono runtime and mono
1313

1414
*support status as of 21/03/25, follows main Yocto release support schedule [here](https://wiki.yoctoproject.org/wiki/Releases)
1515

16-
## Removal of support for ARM32
16+
## Limitations
17+
18+
### Removal of support for ARM32
1719

1820
Currently (21/10/2024) `styhead` is failing to build GCC for ARM32. As such we've removed the CI tests for the interim. For discussion see [here](https://github.com/DynamicDevices/meta-mono/discussions/234). At such time as GCC is building again for ARM32 the intention is to add the CI build back in at which time we intend to continue to support ARM32. #HelpWanted
1921

22+
### pythonnet
23+
24+
The `python3-pythonnet` package currently does not support .NET 10.
25+
2026
## Layer Dependencies
2127

2228
This layer depends on:
@@ -69,7 +75,7 @@ On the target:
6975

7076
So far, Windows Forms applications have been tested under Sato.
7177
Mono does not require Sato, it does require X if you want to run
72-
Windows Forms applications.
78+
Windows Forms applications.
7379

7480
## Testing Mono builds
7581

recipes-mono/dotnet-helloworld/dotnet-helloworld_1.0.bb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ PRIORITY = "optional"
55
LICENSE = "MIT"
66
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
77

8-
DEPENDS:append = " dotnet-native"
8+
inherit linuxloader
9+
10+
DEPENDS:append = " dotnet-native patchelf-native"
911

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

38+
# The interpreter points to a path on the build host by default; fix it to use the correct path for the target
39+
patchelf --set-interpreter "${@get_linuxloader(d)}" ${B}/${PN}/${PN}
40+
3641
#FIXME: remove the following line. if the lttng-ust conflict is solved
3742
#FIXME: dotnet 8 doesn't produce libcoreclrtraceptprovider.so for the helloworld applications
3843
# When dotnet 6 and 7 reach end of life remove the following line.

recipes-mono/dotnet/dotnet.inc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,18 @@ DEPENDS = "patchelf-native"
1111
RDEPENDS:${PN}:class-target = "icu zlib libgssapi-krb5"
1212
RDEPENDS:${PN}:class-native = "icu zlib"
1313
RDEPENDS:${PN}:class-nativesdk = "icu zlib"
14+
RDEPENDS:${PN}-dev = "zlib"
1415

1516
PR = "r0"
1617

1718
SRC_ARCH:aarch64 = "arm64"
1819
SRC_ARCH:arm = "arm"
1920
SRC_ARCH:x86-64 = "x64"
2021

21-
SRC_URI[vardeps] += "SRC_FETCH_ID SRC_ARCH"
22+
SRC_URI[vardeps] += "SRC_ARCH"
2223
SRC_URI[sha512sum] = "${SRC_SHA512SUM}"
2324

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

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

45+
cp -r --no-preserve=ownership ${S}/packs ${D}${datadir}/dotnet/
4446
cp -r --no-preserve=ownership ${S}/sdk ${D}${datadir}/dotnet/
4547
cp -r --no-preserve=ownership ${S}/sdk-manifests ${D}${datadir}/dotnet/
4648

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

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

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

7376
FILES:${PN}-dev = "\
77+
${datadir}/dotnet/packs \
7478
${datadir}/dotnet/sdk \
7579
${datadir}/dotnet/sdk-manifests \
7680
${datadir}/dotnet/templates \
@@ -83,6 +87,7 @@ FILES:${PN}-dbg = "\
8387
RRECOMMENDS:dotnet-dev[nodeprrecs] = "1"
8488

8589
INSANE_SKIP:${PN} = "already-stripped libdir staticdev textrel dev-so"
90+
INSANE_SKIP:${PN}-dev = "libdir staticdev dev-elf"
8691
INSANE_SKIP:${PN}-dbg = "libdir"
8792

8893
BBCLASSEXTEND = "native nativesdk"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
require dotnet.inc
2+
3+
DOTNET_RUNTIME_VERSION = "10.0.0"
4+
5+
SRC_SHA512SUM:aarch64 = "24fc2b105ab8484c34213ef57ac4e6a36a6593241f0ebc6cf0a40ec2f5fea2d76de85c4b87b2a53814d194e32ec1288dd5053cd6f52768d79cd0ac948cbf84ea"
6+
SRC_SHA512SUM:arm = "45f2d7fd05670a5a14fa480889e45920782277575dba0da44c259997d059d64070b40ac7aae9f0c3a3076d9fed5b787854a8abdc2dfdb4783b449c05c1c9b49c"
7+
SRC_SHA512SUM:x86-64 = "f78dbac30c9af2230d67ff5c224de3a5dbf63f8a78d1c206594dedb80e6909d2cc8a9d865d5105c72c2fd2aa266fc0c6c77dedac60408cbccf272b116bd11b07"

recipes-mono/dotnet/dotnet_6.0.428.bb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ require dotnet.inc
22

33
DOTNET_RUNTIME_VERSION = "6.0.36"
44

5-
SRC_FETCH_ID:aarch64 = "63915342-f75e-45b9-87c6-26191463df72/60c45022a869da1ad03b8522b0c6a7bd"
65
SRC_SHA512SUM:aarch64 = "cb8454865ecb99ce557bd0a5741d3dc84657a45ea00f9b2a0f0593e94e4e661e898a5690df90cf0175bf5982973c19985a168998aaa975b7ac7a3bef2ecd05d2"
7-
8-
SRC_FETCH_ID:arm = "e1f1b444-2b24-4ba6-a1a2-f669f6710127/45371782a57b927e6dcccdb02b04d763"
96
SRC_SHA512SUM:arm = "c751881dd27ef098428e616b99a9c16e8bf82526484f76987dac1efcb5177534749c8f943f6d9daacc3a91bb086c9cb9c8d535c9881c0be3dc19c647065968fe"
10-
11-
SRC_FETCH_ID:x86-64 = "35b1b4d1-b8f4-4b5c-9ddf-e64a846ee50b/93cc198f1c48fe5c4853bd937226f570"
127
SRC_SHA512SUM:x86-64 = "04395f991ab50e4755ce1ae53e23592a7420b71b82160883bae3194dd1dfd5dcaed78743e4e0b4dd51ea43c49ec84b5643630707b3854f1471265dc98490d2f9"

recipes-mono/dotnet/dotnet_8.0.406.bb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ require dotnet.inc
22

33
DOTNET_RUNTIME_VERSION = "8.0.13"
44

5-
SRC_FETCH_ID:aarch64 = "50bfbf66-b057-4bec-a9cc-69a43d4b32b2/489a1c7042dd654df0a71bcb9813067f"
65
SRC_SHA512SUM:aarch64 = "9b939f09fbda8a080b1266914ca02c4d60a95e85fa6a1344c378d394697de6935eb7d941dd9a3aeb977ada3aab561c614a5fe9b973824899cb02aa74e9c09988"
7-
8-
SRC_FETCH_ID:arm = "18b5dd5a-24cb-4e2b-a440-1089c67d112d/dace5ece95d3ba00c984c41c52ae2e4f"
96
SRC_SHA512SUM:arm = "18a2bf575a6d895ce0671b22e4f0853003920f0b7f2f33ff45afc51d34453bfd6b87b2aa5e53349d0c6ae9f6c37f6663d37f87a2ee544c89a7f5ba88d6f65408"
10-
11-
SRC_FETCH_ID:x86-64 = "d2abdb4c-a96e-4123-9351-e4dd2ea20905/e8010ae2688786ffc1ebca4ebb52f41b"
127
SRC_SHA512SUM:x86-64 = "d6fdcfebd0df46959f7857cfb3beac7de6c8843515ece28b24802765fd9cfb6c7e9701b320134cb4907322937ab89cae914ddc21bf48b9b6313e9a9af5c1f24a"

recipes-mono/images/test-image-mono.bb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ DEFAULT_TEST_SUITES:pn-${PN}:prepend = "dotnet "
88
IMAGE_INSTALL += "msbuild \
99
dotnet \
1010
dotnet-helloworld \
11-
python3-pythonnet \
1211
"
1312

1413
IMAGE_BASENAME = "${PN}"

0 commit comments

Comments
 (0)