Giter Site home page Giter Site logo

tjfontaine / libkrunfw Goto Github PK

View Code? Open in Web Editor NEW

This project forked from containers/libkrunfw

1.0 2.0 0.0 4.9 MB

A dynamic library bundling the guest payload consumed by libkrun

License: Other

Shell 2.17% Python 9.35% C 81.34% Makefile 7.14%

libkrunfw's Introduction

libkrunfw

libkrunfw is a library bundling a Linux kernel in a dynamic library in a way that can be easily consumed by libkrun.

By having the kernel bundled in a dynamic library, libkrun can leave to the linker the work of mapping the sections into the process, and then directly inject those mappings into the guest without any kind of additional work nor processing.

Building

Linux (generic variant)

Requirements

  • The toolchain your distribution needs to build a Linux kernel.
  • Python 3
  • pyelftools (package python3-pyelftools in Fedora and Ubuntu)

Building and installing the library

make
sudo make install

Linux (SEV variant)

Requirements

  • The toolchain your distribution needs to build a Linux kernel.
  • Python 3
  • pyelftools (package python3-pyelftools in Fedora and Ubuntu)

Building and installing the library

make SEV=1
sudo make SEV=1 install

macOS

Requirements

Compiling a Linux kernel natively on macOS is not an easy feat. For this reason, the recommended way for building libkrunfw in this platform is by already having installed a binary version of krunvm and its dependencies (libkrun, and libkrunfw itself), such as the one available in the krunvm Homebrew repo, and then executing the build_on_krunvm.sh script found in this repository.

This will create a lightweight Linux VM using krunvm with the current working directory mapped inside it, and build the kernel on it.

Building the library using krunvm

./build_on_krunvm.sh
make

License

This library bundles a Linux kernel but does not execute any code from it, acting as a mere storage format. As a consequence, this library does not constitute a derivative work of the Linux kernel. Thus, the following licenses apply:

  • Linux kernel: GPL-2.0-only

  • Files contained in the patches directory: GPL-2.0-only

  • Library code, including automatically-generated code: LGPL-2.1-only

Therefore, distributions of this library in binary form are required to be accompanied by the source code of the Linux kernel bundled in the binary along with the code of the library itself, but other programs linking against this library are not required to be licensed under the GPL-2.0-only nor the LGPL-2.1-only licenses.

libkrunfw's People

Contributors

slp avatar dfaggioli avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

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.