# Linux Kernel Module Cheat

### 26.1. Introduction to Buildroot

Buildroot is a set of Make scripts that download and compile from source compatible versions of:

- GCC

- Linux kernel

- C standard library: Buildroot supports several implementations, see: Section 26.10, “libc choice”

- BusyBox: provides the shell and basic command line utilities

It therefore produces a pristine, blob-less, debuggable setup, where all moving parts are configured to work perfectly together.

Perhaps the awesomeness of Buildroot only sinks in once you notice that all it takes is 4 commands as explained at Section 26.11, “Buildroot hello world”.

The downsides of Buildroot are:

- the first build takes a while compared to downloading prebuilts, but it is well worth it

- the selection of software packages is relatively limited if compared to Debian.

  In theory, any software can be packaged, and the Buildroot side is easy.

  The hard part is dealing with crappy third party build systems and huge dependency chains.

- it is written in Make and Bash rather than Python like LKMC

This repo basically wraps around that, and tries to make everything even more awesome for kernel developers by adding the capability of seamlessly running the stuff you’ve built on emulators usually via `./run`.

This runnable part of selecting the command line options for different emulators and setups is to a large extent what Libvirt does. But we feel that having both build and run on the same repository is the key.

As this repo develops however, we’ve started taking some of the build out of Buildroot, e.g. notably the Linux kernel to have more build flexibility and faster build startup times.

Therefore, more and more, this repo wants to take over everything that Buildroot does, and one day completely replace it to achieve emulation Nirvana, see e.g.:

- https://github.com/cirosantilli/linux-kernel-module-cheat/issues/116

- https://github.com/cirosantilli/linux-kernel-module-cheat/issues/117