Code Monkey home page Code Monkey logo

meta-dotnet's Introduction

meta-dotnet

Yocto meta-layer for dotnet core 8.0.100 for armv7/aarch64/x86

Compatibility

Branch Compatible Layers Supported Arch dotnet version
trunk Kirkstone, Scarthgap x86_64, armv7, aarch64 8.0.303
kirkstone Kirkstone x86_64, armv7, aarch64 8.0.303
dunfell dunfell, zeus x86_64, armv7, aarch64 8.0.303
pyro N/A x86_64, armv7 3.1.101

Usage

Add this meta layer to your project (refer to yocto user manual)

You may need to add following lines to you local.conf file (enabling access to NuGet.org in configure and compile steps):

You may not need this in local.conf it could just be in the recipe for your project in the bb recipe...

do_configure[network] = "1"
do_compile[network] = "1"

Create a new dotnet core application and include it in your yocto build as follows...

DESCRIPTION = "My dot net core 3.1 app"
LICENSE = "CLOSED"

SRC_URI = "file://hello-world.cs \
           file://hello-world.csproj \
"

inherit dotnet

This does a few things, when you inherit dotnet meta-layer class, it will does the following...

  • Automatically download the host dotnet sdk for linux x64 as a native build tool dotnet-sdk-native (In the future this could become mac and windows compatible, but I only yocto on linux)
  • Performs the required build steps dotnet restore and dotnet build -c Release ...

Deployment

The resultant application is a self-contained, compressed, trimmed package. No dotnet runtime is required on the target rootfs

Installation path and artifacts path can be configured from the package recipe

  • INSTALL_DIR can be used to change the default /opt/dotnet/${PN} installation directory
  • ENABLE_READYTORUN can be used to enable/disable AOT (default false)
  • ENABLE_TRIMMING can be used to enable/disable Trimming (default true)

meta-dotnet's People

Contributors

angeloc avatar casambi-jeikki avatar fdlg avatar jeremy-prater avatar loloactemium avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

meta-dotnet's Issues

deploy aarch64 artifacts to rootfs fails

Hi Jeremy,

Your solution to compile a dotnet c# application from source with a bitbake recipe works very well. But working with aarch64 and adding the dotnet-hello-world application to the image, it fails because of DNF check during rootfs generation. This is also described here: Dependency for binary package. However this is not an issue with x86_64.

Ok, there is an "ugly" workaround hack for this, to add the recipe artifacts after rootfs generation to the rootfs, but actually i just wanted to call out if you have already dealed with this and if you know a better solution?

Your answer is very much appreciated.

dotnet restore error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json.

It seems that dotnet_do_configure is unable to reach NuGet repository to restore project dependencies. It is not about the api.nuget.org endpoint since I'm not even able to curl google.com in the dotnet_do_configure function.

Dotnet restore and internet overall works just fine outside of bitbake. Feels like bitbake has somehow restricted internet access in the scope of dotnet_do_configure function. Any ideas?

Scarthgap

Hi,

I am using this library to build my dotnet app. Are you planning to release it for Scarthgap?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.