Linux Kernel Development

From Marss86

Disk images used to simulate various benchmarks contains default Linux Kernel that is installed by OS distribution. Disk images that are provided on MARSS wiki contains Ubuntu OS with default unmodified Linux kernel installed. If you are interested in modifying Linux Kernel and simulate your changes in MARSS then you can use following instructions to make your life little easier.

Installing Modified Kernel in Disk

First option is to compile the kernel either on the disk image or on your host machine. If you are compiling kernel on the host machine then please grab the kernel config file from the disk image first. To compile the kernel you can follow steps from old-fashioned Debian way to create a .deb package and install the package with 'dpkg' tool.

Use Modified Kernel without Installation

It gets frustrating when you have to run "make-kpkg" and "dpkg" to install kernel image after every big/small changes while you'r developing/debugging. QEMU provides command line options to override kernel image and initrd image of disk with ones provided in command line as shown below:

$ qemu/qemu-system-x86_64 -m MEM_SIZE -drive file=DISK_IMAGE -kernel KERNEL_BZ_IMG -initrd INITRD_IMG -append "root=/dev/hda1" <OTHER_QEMU_OPTIONS>

As shown above you can use "-append" option to specify kernel command line options. If you have any trouble using initrd image created on your host machine, then users have mentioned that you should create initrd disk image inside the disk so it will contain all the necessary lib modules for successful boot-up.

Personal tools