GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ljskernel/kernel-scripts: Handy kernel development scripts.

BranchesTags
Open more actions menu

Latest commit

 

History

253 Commits
253 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
idemptables
idemptables
 
 
kerndev-build
kerndev-build
 
 
kerndev-check
kerndev-check
 
 
kerndev-check-all
kerndev-check-all
 
 
kerndev-config
kerndev-config
 
 
kerndev-create
kerndev-create
 
 
kerndev-create-foreign
kerndev-create-foreign
 
 
kerndev-create-foreign.chroot.sh
kerndev-create-foreign.chroot.sh
 
 
kerndev-create.chroot.sh
kerndev-create.chroot.sh
 
 
kerndev-debug
kerndev-debug
 
 
kerndev-defaults.sh
kerndev-defaults.sh
 
 
kerndev-functions.sh
kerndev-functions.sh
 
 
kerndev-install
kerndev-install
 
 
kerndev-module-headers
kerndev-module-headers
 
 
kerndev-nat-launch-subnet.sh
kerndev-nat-launch-subnet.sh
 
 
kerndev-nat-launch.sh
kerndev-nat-launch.sh
 
 
kerndev-qemu-tap-helper.sh
kerndev-qemu-tap-helper.sh
 
 
kerndev-rebuild
kerndev-rebuild
 
 
kerndev-run
kerndev-run
 
 
kerndev-shared.sh
kerndev-shared.sh
 
 
kerndev-update
kerndev-update
 
 
kerndev-whose
kerndev-whose
 
 

Repository files navigation

Kernel Development Scripts

IMPORTANT: I recently discovered https://github.com/arighi/virtme-ng which provides a lot more functionality than these scripts do, I recommend using this over the scripts.

These are my kernel development scripts. Some are specific to my setup, others are more generic. I'm working on making them more generic over time.

Generally I assume the distro I'm using (Arch Linux.) Additionally you will need to install appropriate packages, again at some point I will try to document the required packages.

The scripts have been expanded to include some rudimentary support for the aarch64 architecture. To use this functionality, run kerndev-create aarch64 (or kerndev-create-aarch64) and kerndev-run aarch64.

WARNING: This does things as sudo, messes with dnsmasq settings and I generally take no responsibility if this nukes your system. I've never had issues arising from it but caveat emptor.

Acknowledgements

The qemu networking code is based on Jakub Klinkovský's scripts, qemu-launcher.sh is a good starting point for this. His code in turn uses xyne's work.

The following scripts use this 3rd-party code:-

  • kerndev-qemu-tap-helper.sh
  • kerndev-nat-launch.sh
  • kerndev-nat-launch-subnet.sh

Scripts

NOTE: These scripts are interdependent and assume that the they are all on the $PATH.

NOTE: By convention, files that end in .sh are not designed to be user-runnable, but are instead ran from other scripts.

Maintaining

  • kerndev-update - Updates a list of linux trees in specific directories and on specific branches. This is configured to my personal setup, so you will need to edit this script to fit your set up. The list of directories and branches are clearly separated from the actual code that updates so this is a quick task.

Generating

  • kerndev-create - Creates a qemu kernel development environment. The image is an Arch Linux system.
  • kerndev-build - Configures and builds the kernel, optionally placing header and module files into the dev env image. It accepts a single optional argument which, if provided, specifies a cross-compile target architecture.
  • kerndev-config - Sets kernel configuration options for the development environment.
  • kerndev-rebuild - Same as kerndev-build but runs make mrproper first.
  • kerndev-install - Installs header and module files into the dev env image. This is invoked by kerndev-build unless explicitly disabled.
  • kerndev-module-headers - Generates a stripped version of the kernel source for building external modules.

Running

  • kerndev-run - Runs the kernel development environment with virtio networking.
  • kerndev-debug - Connects gdb to a running dev env. Debugging config options are enabled by kerndev-build by default. When you run kerndev-debug it runs gdb which automatically connects to the qemu instance.

IMPORTANT: gdb has a big issue with the CPU changing architecture on startup, so you ought to run kerndev-run before kerndev-debug. If you encounter Remote 'g' packet reply is too long errors you have triggered this issue and specifying arch afterwards doesn't seem to fix anything. If you need to debug early boot code, you'll need to investigate how to work around this issue :(

Code

  • kerndev-check - Runs checkpatch.pl against the specified files, ignoring line length.
  • kerndev-check-all - Runs checkpatch.pl against the specified files.

Required packages

bridge-utils
dnsmasq
arch-install-scripts
qemu-system-*

About

Handy kernel development scripts.

Resources

Readme
MIT license
Activity

Stars

52 stars

Watchers

3 watching

Forks

11 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.