Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Wrapper for linux kernel builds

NotificationsYou must be signed in to change notification settings

xdch47/kern

Repository files navigation

This is a simple Makefile wrapper around the kernel makefile,which enables the following advantages:

  1. Seperate kernel-sources and kernel-build objects:

    • allowsreuse of source files for different kernel configuration
  2. Fast/painless compile and install process:

    • make ;make install (ormake gentooinstall) is enough
    • nice level and makeflags are supported
    • remote host installation possible -- check theSSH_INSTALL_USER /SSH_HOST_INSTALL variables
  3. optional: build kernel as [portage] user

    • use a root shell uncomment/setKBUILD_USER inMakefile.kern (global) or in yourMakefile for a local config (sudo is necessary)
    • ensure that the user has the permissions to create the build directory

It's especially dedicated to gentoo-users, but should works (with minor adpations) for all others distros as well.However there is agentooinstall target which covers additionally:

  • grub-mkconfig -o /boot/grub/grub
  • emerge -1 @module-rebuild

USAGE

Makefile.kern is kind of the template makefile.For a standard (amd64/x86) compilation the following steps are necessary:

Initial:

  • Create a directory (favored use the name of the host the kernel is used) otherwise setKHOST variable
  • Create a Makefile and adapt special configuration settings likeKSOURCE_PATH,KMAKE_TARGETS etc.
  • Finally include the template makefile by addinginclude ../Makefile.kern
  • (optional) add a intial kernel configuration in adefconfig file (in case the file is missing make defconfig is used)

Compilation:

  • (optional) runmake update_defconfig in order to update your kernel seed from the currently running kernel (access to /proc/config.gz required)
  • (optional) run other kernel tragets likemake menuconfig
  • runmake

Installation:

  • runmake install (ormake gentooinstall)

EXAMPLES

  • amd64: look at theamd64-host-example/ directory
  • amd64 + initramfs: look at theamd64-host-initramfs-example/ directory
  • armv7a: look at thearmv7a-odroidhc1-example/ directory (use crossdev for cross-compilation)

gentoo

Gentoo users have to setKBUILD_OUTPUT in theirmake.conf ("<kern-git-root>/<hostname or configdir>/linux/kbuild")

Thegentoo directory containslarry the cow as logo that can be use for the linux kernelAdditionaly a template for/etc/portage/env/sys-kernel/gentoo-sources is provided which replaces the original linux logo and does same cleanup work after removing a the gentoo-source package.

About

Wrapper for linux kernel builds

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp