Skip to content

Linux kernel loader

License

Apache-2.0, BSD-3-Clause licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
BSD-3-Clause
LICENSE-BSD-3-Clause
Notifications You must be signed in to change notification settings

aljimenezb/linux-loader

 
 

Linux-loader

Short-description

  • Parsing and loading vmlinux (raw ELF image), bzImage and PE images
  • Linux command line parsing and generation
  • Loading device tree blobs
  • Definitions and helpers for the Linux boot protocol

How to build

cd linux-loader
cargo build

Tests

Our Continuous Integration (CI) pipeline is implemented on top of Buildkite. For the complete list of tests, check our CI pipeline.

Each individual test runs in a container. To reproduce a test locally, you can use the dev-container on both x86 and arm64.

container_version=5
docker run -it \
           --security-opt seccomp=unconfined \
           --volume $(pwd):/linux-loader \
           rustvmm/dev:v${container_version}
cd linux-loader/
cargo test

bzImage test

As we don't want to distribute an entire kernel bzImage, the load_bzImage test is ignored by default. In order to test the bzImage support, one needs to locally build a bzImage, copy it to the src/loader directory and run cargo test:

# Assuming your linux-loader and linux-stable are both under ${LINUX_LOADER}:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ${LINUX_LOADER}/linux-stable
cd linux-stable
make bzImage
cp linux-stable/arch/x86/boot/bzImage ${LINUX_LOADER}/linux-loader/src/loader/
cd ${LINUX_LOADER}/linux-loader
container_version=5
docker run -it \
           --security-opt seccomp=unconfined \
           --volume $(pwd):/linux-loader \
           rustvmm/dev:v${container_version}
cd linux-loader/
cargo test

About

Linux kernel loader

Resources

License

Apache-2.0, BSD-3-Clause licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
BSD-3-Clause
LICENSE-BSD-3-Clause

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 99.8%
  • Shell 0.2%