Coder Social home page Coder Social logo

lxc-kernel-taskfile's Introduction

Linux Kernel - easy build using LXD/LXC

Overview

One simple Taskfile that makes it very easy to build the Linux Kernel for multiple architectures.

By design, this build system maintains separate caches for each architecture making each build fast.

Requirements

  • Install Task -> https://taskfile.dev/
    It is a pretty nice Makefile alternative written in Go.
    We use this a sort of orchestrator/builder for our lxc containers.

  • Install LXD -> https://ubuntu.com/lxd
    Make sure everything works by first testing it out with a test container before going any further.
    lxc launch ubuntu:20.04 ubuntu-container

How it works

The general concept is that the script takes a folder with the linux kernel source and then it maps it inside a container where it rsyncs it into an internal build folder (this makes it real easy to know if anything needs rebuilding at all) and builds with the default config for the architecture chosen.

After the build is finished, the container is stopped automatically (but not deleted).

Cross-compilation for other architectures is possible.

How to use

First you should get a kernel via a tag:

TAG=v6.0-rc2 task getKernel

This will get you the kernel with the v6.0-rc2 tag.

Build for x86

This will build the kernel with the default config:

TAG=v6.0-rc2 task buildKernel

Build for arm64 by crosscompiling inside lxc

CROSS_COMPILE=aarch64-linux-gnu- TAG=v6.0-rc2 task buildKernel

lxc-kernel-taskfile's People

Contributors

smfloris avatar

Stargazers

 avatar

Watchers

 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.