====== kernel-autobuild - intrinsics ======
===== re-starting kvm for debugging =====
WORKDIR="/var/lib/kernel-autobuild/3.4/3.4.63--vs2.3.3.9--2"
IMGFILE="squeeze-kerneltest-20130930-182510.img"
IMG="$WORKDIR/img/$IMGFILE"
kvm -M pc -net nic,macaddr=66:66:66:66:66:15,model=rtl8139 -net tap,script=/etc/kvm/kvm-ifup "$IMG" -name squeeze-kerneltest -k de -daemonize -pidfile $WORKDIR/logs/kvm.pid -serial file:$WORKDIR/logs/kvm.log-2 -monitor unix:$WORKDIR/logs/kvm-socket,server,nowait -nographic -vnc 127.0.0.1:15
/usr/bin/vncviewer 127.0.0.1:15
ip a l
ssh root@
===== re-running tests inside kvm =====
( /root/internal-tests ) 2>&1 | tee /dev/ttyS0
The redirection accomplishes logging to file:$WORKDIR/logs/kvm.log-2 outside the kvm instance.
===== .config lifecycle (as of kernel-autobuild 0.7-devel6) =====
* ''kernel-autobuild --config some-dotconfig-file --dotconfig-setting DEF=val --dotconfig-setting-file file''
* ''kab_identify_kernel_config_file''
* looks for the latest (time) kernel build tree, sets ''$LASTVERSION''
* if ''$LASTCONFIG'' isn't set (this would be by ''--config'' )
* checks for the latest ''source/config-${LASTVERSION}*'', sets ''$__LAST_VERSIONED_CONFIG''
* if ''$__LAST_VERSIONED_CONFIG'' is a file and exists set ''$LASTVERSION'' to ''$__LAST_VERSIONED_CONFIG''
* elsif ''source/config'' is a file and exists set ''$LASTVERSION'' to ''source/config''
* elsif ''/boot/config-$(uname -r)'' is a file and exists set ''$LASTVERSION'' to ''/boot/config-$(uname -r)''
* else error && abort
* ''kernel-autobuild'' reports ''$LASTCONFIG'' to ''$INFO_DIR/LASTCONFIG''
* ''kab_downloads'' copies ''$LASTCONFIG'' to ''$SRC_DIR/config''
* ''kab_apply_dotconfigsettings'' calls ''kab_modify_dotconfig'' which
* reads ''$SRC_DIR/config''
* applies changes from ''--dotconfig-setting-file'' (if present)
* applies changes from ''--dotconfig-setting'' (if present)
* moves ''$SRC_DIR/config'' to ''$SRC_DIR/config-orig-YYYYMMDD-HHMMDD''
* creates ''$SRC_DIR/config'' with applied changes
* creates ''$SRC_DIR/dotconfig.changelog'' listing applied changes suitable for ''debian/changelog''
* ''kab_compile_and_package''
* backups an existing ''$BUILD_DIR/linux-*/.config'' to ''$SRC_DIR/config-orig''
* copies ''$SRC_DIR/config'' to ''$BUILD_DIR/linux-*/.config''
* runs ''make oldconfig''
* backups ''$BUILD_DIR/linux-*/.config'' to ''$SRC_DIR/config-oldconfig''
* ( build kernel )
* backups ''$BUILD_DIR/linux-*/.config'' to ''$SRC_DIR/config-$KSRCVER--${PVER}-$GLOBAL_DATE''
==== samples ====
**If called without none of ''--dotconfig-setting-file'' or ''--dotconfig-setting'':**
/var/lib/kernel-autobuild/3.10/3.10.40--vs2.3.6.8--1/source# ls -ltrc
total 74184
-rw-r--r-- 1 root root 73247024 May 13 14:03 linux-3.10.40.tar.xz <- kernel source archive as downloaded from kernel.org
-rw-r--r-- 1 root root 748146 May 20 07:06 patch-3.10.40-vs2.3.6.8.diff <- vserver-patch as downloaded from linux-vserver.org
-rw-r--r-- 1 root root 3632 Apr 3 12:46 patch-scripts-package-builddeb-v3.10.35+.diff <- patch to make scripts/package/builddeb suitable
-rw-r--r-- 1 root root 748146 May 20 07:06 patch-3.10.40-vs2.3.6.8.diff-as-downloaded <- vserver-patch as downloaded from linux-vserver.org
-rw-r--r-- 1 root root 748153 Jun 10 14:29 patch-3.10.40-vs2.3.6.8.diff.mod <- vserver-patch modified to match actual kernel version
-rw-r--r-- 1 root root 149009 May 12 17:19 config <- config as inherited from the last build
-rw-r--r-- 1 root root 149009 Jun 10 14:29 config-oldconfig <- result of make oldconfig
-rw-r--r-- 1 root root 149009 Jun 10 14:46 config-3.10.40--vs2.3.6.8-20140610-142847 <- result of make oldconfig
**If called with one or both of ''--dotconfig-setting-file'' or ''--dotconfig-setting'':**
**Note:** ''config-orig-20140610-164228'' takes the place of ''config'' here.
/var/lib/kernel-autobuild/3.10/3.10.40--vs2.3.6.8--1/source# ls -ltrc
total 74324
-rw-r--r-- 1 root root 73247024 Jun 10 16:42 linux-3.10.40.tar.xz <- kernel source archive as downloaded from kernel.org
-rw-r--r-- 1 root root 748146 Jun 10 16:42 patch-3.10.40-vs2.3.6.8.diff <- vserver-patch as downloaded from linux-vserver.org
-rw-r--r-- 1 root root 3632 Jun 10 16:42 patch-scripts-package-builddeb-v3.10.35+.diff <- patch to make scripts/package/builddeb suitable
-rw-r--r-- 1 root root 748146 Jun 10 16:42 patch-3.10.40-vs2.3.6.8.diff-as-downloaded <- vserver-patch as downloaded from linux-vserver.org
-rw-r--r-- 1 root root 748153 Jun 10 16:42 patch-3.10.40-vs2.3.6.8.diff.mod <- vserver-patch modified to match actual kernel version
-rw-r--r-- 1 root root 149009 Jun 10 16:42 config-orig-20140610-164228 <- config as inherited from the last build
-rw-r--r-- 1 root root 149440 Jun 10 16:42 config <- config as modified by --dotconfig-setting(-file)
-rw-r--r-- 1 root root 9845 Jun 10 16:42 dotconfig.changelog <- changelog: what changes were made by --dotconfig-setting(-file) to config
-rw-r--r-- 1 root root 142549 Jun 10 16:42 config-oldconfig <- result of make oldconfig
-rw-r--r-- 1 root root 142549 Jun 10 16:58 config-3.10.40--vs2.3.6.8-20140610-164136 <- result of make oldconfig
===== .config-changes lifecycle (as of kernel-autobuild 0.7-devel6) =====
* ''patch-scripts-package-builddeb-v3.10.35+.diff'' patches ''script/package/builddeb''
* now recognizes ''$KAB_CHANGELOG'' (see below)
* ''kab_apply_dotconfigsettings''
* creates ''$SRC_DIR/dotconfig.changelog'' listing applied changes suitable for ''debian/changelog''
* returns KAB_CHANGELOG variable
* ''kernel-autobuild ''
* assigns ''KAB_CHANGELOG'' to ''kab_compile_and_package''
* ''kab_compile_and_package''
* export ''KAB_CHANGELOG''
* ''make ..'' calls ''script/package/builddeb''
* ''script/package/builddeb'' checks ''$KAB_CHANGELOG''
* ''script/package/builddeb'' creates ''debian/changelog'', including the file indicated by ''$KAB_CHANGELOG''