# 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>>.

##### 27.7.1.2. Build and install the interpreter

Buildroot has a Python package that can be added to the guest image:

    ./build-buildroot --config 'BR2_PACKAGE_PYTHON3=y'

Usage from guest in full system:

    ./run

and then from there get an interactive shell with:

    python3

or run an example with:

    python3 python/hello.py

or:

    ./python/hello.py

User mode simulation interactive usage:

    ./run --userland "$(./getvar buildroot_target_dir)/usr/bin/python3"

Non-interactive usage:

    ./run --userland "$(./getvar buildroot_target_dir)/usr/bin/python3" --cli-args rootfs_overlay/lkmc/python/hello.py