简体   繁体   中英

Basic linux kernel development and testing environment using qemu

I want to learn about the linux kernel and this is why I wanted a simple but powerful enough way test kernel changes that I do.

I used the info on this page https://mgalgs.github.io/2015/05/16/how-to-build-a-custom-linux-kernel-for-qemu-2015-edition.html to start.

So now I can start a qemu session with the kernel I choose and also have busybox utilities.

The part I cannot understand is how do I transfer a kernel module .ko on this virtual machine as to load it in my modified kernel ? I tried also transfering ac program by incorporating it in the initramfs but when I try to run the program I receive the following error message: "/bin/sh: ./proc1: not found" . Should I use a virtual hdd image ? If so how do I create and use one ? How do I transfer files from host os to the virtual hdd ?

Thnaks in advance.

The created virtual hdd was not discovered because I didn't use mdev -s in the init file. After that I could mount the sda in qemu session.

The c program that could not be ran I solved by compiling it with the -static flag.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM