Açıklama Yok
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Yann Weber 6c971a658e First version of scripts 1 ay önce
scripts First version of scripts 3 hafta önce
.gitignore Initial commit 1 ay önce
Makefile First version of scripts 3 hafta önce
README First version of scripts 3 hafta önce
config.mk.inc First version of scripts 3 hafta önce

README

Linux VZ5 :
===========

Compile test & install kernel image for vz5's VM.

Dependencies :
==============

- expect
- qemu/kvm
- `apt build-dep linux-image-amd64`
- `apt install linux-source`

Optionnal dependencies :
------------------------
- virsh
- debvm

Install & config :
==================

Copy sample config `cp config.mk.inc config.mk`
Edit configuration file to meet your needs `editor config.mk`

Then you will need kernel sources & kernel configuration.

Kernel sources :
-----------------

* Automatic method (debian based) :

Run `make upgrade`
Will fetch the last kernel source in /usr/src

* Manual method :

Decompress kernel sources and create a symlink `linux-source` pointing to it.

Kernel config :
---------------

Kernel configuration are versionned in a separetd git repository in kernel-config/ directory.
In order to seed config file with yours run (see Notes about kernel config) :
```
mkdir kernel-config
git -C kernel-config/ init
cp /path/to/.config kernel-config/kernel.config
git -C kernel-config add kernel.config
git -C kernel-config commit -m 'Initial kernel config'
```

Usage :
=======

Get current status with `make`

Compile a kernel `make kernel`

Test a kernel on virsh vm `make test`
If make test is run with root, we will try to start TEST_VM_NAME with virsh
If make test is run without privileges, a disk image will be built using debvm
and the tests will be run using qemu.
NOTE : the user needs access to /dev/kvm (adduser username kvm)

Install kernel `make install`

Commit tested kernel config `make commit-config`

Notes :
=======

All scripts & tests are designed for monolitic kernel without initrd.

Kernel config should contains :
```
# CONFIG_BLK_DEV_INITRD is not set
# CONFIG_MODULES is not set
```

KVM has a documentation about kernel tuning for guest that can be found here :
https://www.linux-kvm.org/page/Tuning_Kernel#Kernel_for_guest_with_paravirtualization

The script `./scripts/checkconfig.sh` check that kernel config fits basic needs.

You can use the script to generate a config file with most mandatory options set
`./scripts/checkconfig.sh -g > linux-source/.config`
and then run
`make menuconfig`
or to prompt for a y/n choice for each config
`make -C linux-source config`