# Linux Kernel Module Cheat
The perfect emulation setup to study and develop the <<linux-kernel>> v5.9.2, kernel modules, <<qemu-buildroot-setup,QEMU>>, <<gem5-buildroot-setup,gem5>> and x86_64, ARMv7 and ARMv8 <<userland-assembly,userland>> and <<baremetal-setup,baremetal>> assembly, <<c,ANSI C>>, <<cpp,C++>> and <<posix,POSIX>>. <<gdb>> and <<kgdb>> just work. Powered by <<about-the-qemu-buildroot-setup,Buildroot>> and <<about-the-baremetal-setup,crosstool-NG>>. Highly automated. Thoroughly documented. Automated <<test-this-repo,tests>>.

## 6. CPU architecture

The portability of the kernel and toolchains is amazing: change an option and most things magically work on completely different hardware.

To use `arm` instead of x86 for example:

    ./build-buildroot --arch arm
    ./run --arch arm

Debug:

    ./run --arch arm --gdb-wait
    # On another terminal.
    ./run-gdb --arch arm

We also have one letter shorthand names for the architectures and `--arch` option:

    # aarch64
    ./run -a A
    # arm
    ./run -a a
    # x86_64
    ./run -a x

Known quirks of the supported architectures are documented in this section.

- x86_64

- arm

- MIPS

- Other architectures