[TOC]

Introduction

Linux-kernel is a learning tool for linux kernel and os by starting a VM by qemu with code build kernel and busybox rootfs.

Here are some of the components:

  • qemu the VM creater
  • linux kernel include community and centos kernel
  • busybox the busybox rootfs
  • centos the centos rootfs, created by docker centos image
  • make_ext4fs the tools to make ext4 fs image based directory

You can use the 'sync' script to download these components codes.

  • sync download the codes from github
  • sync_gitee download the codes from gitee

Build

The build_in_docker.sh script could be used to make a one-click build for the components which will only need docker and a normal network for your host.

You can just type to build the qemu, kernel and busybox rootfs:

./build_in_docker.sh

Run

After the build complete, you can start the VM by type make command:

make

To exit the VM, by type "Ctrl + A + X"

Others

Connect the vm

nc -U out/serial.sock