User Tools

Site Tools


project:kernel-autobuild:new-kernel-release

New Kernel Release HOWTO

What to do if kernel-autobuild has to be prepared for a new kernel release.

New template directory for meta package (2016-10-23 / 3.18)

#cd /usr/share/kernel-autobuild
cd ushare/kernel-autobuild

cp -ax linux-image-3.14-vserver-amd64 linux-image-3.18-vserver-amd64
cd linux-image-3.18-vserver-amd64
vi Makefile
    APPNAME=linux-image-3.18-vserver-amd64
    VERSION=3.18.1

vi debian/README
    The Debian Package linux-image-3.18

vi debian/README.Debian
    linux-image-3.18 for Debian

vi debian/changelog
    linux-image-3.18-vserver-amd64 (3.18.1) unstable; urgency=low

vi debian/control
    Source: linux-image-3.18-vserver-amd64
    Depends: linux-firmware-image (=3.18.9-vs2.3.6.6+lihas1-1), linux-image-3.18.9-vs2.3.6.6+lihas1 (=3.18.9-vs2.3.6.6+lihas1-1)
    Description: Linux 3.18 for 64-bit PCs (meta-package), Linux-VServer support

New working directory (2016-04-19 / 3.13)

REL=3.13

mkdir /var/lib/kernel-autobuild/${REL}
VG=$( vgs --noheadings | awk '{print $1}' )
lvcreate ${VG} -n kernbuild${REL//./} -L 100G
mkfs -t ext4 /dev/${VG}/kernbuild${REL//./}
vo -o /etc/fstab
echo /dev/${VG}/kernbuild${REL//./} /var/lib/kernel-autobuild/${REL} ext4 noatime,nodiratime 0 0 > /etc/fstab
vo -i /etc/fstab
mount /var/lib/kernel-autobuild/${REL}
mkdir  /var/lib/kernel-autobuild/${REL}/00-resources

# prepare config template
CFGFILE=/etc/kernel-autobuild.xml
C=$(
xmlstarlet sel -t -v 'count(/applicationconfig/application[@name="kernel-autobuild"]/templates/template)' $CFGFILE
)
N=$(
xmlstarlet ed \
    -a '/applicationconfig/application[@name="kernel-autobuild"]/templates/template['$C']' -t elem -n template -v "" \
    -a '/applicationconfig/application[@name="kernel-autobuild"]/templates/template['$((C+1))']' -t attr -n name -v "$REL" \
    -s '/applicationconfig/application[@name="kernel-autobuild"]/templates/template['$((C+1))']' -t elem -n opt -v "" \
    -a '/applicationconfig/application[@name="kernel-autobuild"]/templates/template['$((C+1))']/opt' -t attr -n name -v "--kernel-base-version" \
    -a '/applicationconfig/application[@name="kernel-autobuild"]/templates/template['$((C+1))']/opt' -t attr -n v -v "$REL" \
$CFGFILE
)
vo -o $CFGFILE
echo "$N" > $CFGFILE
rcsdiff -Bb $CFGFILE
vo -i $CFGFILE

cd /var/lib/kernel-autobuild/${REL}
script -c "kernel-autobuild --kernel-base-version ${REL} --identify-sources" 1st

which results in

  KSRCURL    http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.13.1.tar.xz
  PURL       http://vserver.13thfloor.at/Experimental/patch-3.13.1-vs2.3.6.10.diff
  LASTCONFIG /boot/config-3.10.11-vs2.3.6.6+lihas1
  • if KSRCURL is not set: major error - either your system can't reach kernel.org or the format of the web page has changed
  • if PURL is not set: either your system can't reach linux-vserver.org or the format of the web page has changed
  • if LASTCONFIG is not set: you have to provide one by yourself, e.g. copying one into /var/lib/kernel-autobuild/${REL}/00-resources and using –config /path/config

so:

    script -c "kernel-autobuild --kernel-base-version ${REL} " typescript3131

/!\ But … the new kernel fails here :-( /!\

kvm start fails:

[    0.463523] List of all partitions:
[    0.464843] No filesystem could mount root, tried:
[    0.466592] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

addendum 2016-10-23: * similar looking problem with 3.18. Then, no initrd was built during package installation because the dpkg hooks silently failed to do so. Fixed by using a debian 7 / wheezy test image

prequel:

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-5-amd64
Found initrd image: /boot/initrd.img-2.6.32-5-amd64
done
Selecting previously deselected package linux-firmware-image-3.13.1-vs2.3.6.10+lihas1.
Selecting previously deselected package linux-headers-3.13.1-vs2.3.6.10+lihas1.
Selecting previously deselected package linux-image-3.13.1-vs2.3.6.10+lihas1-dbg.
Selecting previously deselected package linux-image-3.13.1-vs2.3.6.10+lihas1.
...
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.13.1-vs2.3.6.10+lihas1
Found linux image: /boot/vmlinuz-2.6.32-5-amd64
Found initrd image: /boot/initrd.img-2.6.32-5-amd64
done
...
## initrd is missing ##
...
[    0.000000] Linux version 3.13.1-vs2.3.6.10+lihas1 (root@wiese) (gcc version 4.7.2 (Debian 4.7.2-5) ) #1 SMP Mon Feb 3 17:24:22 CET 2014
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.13.1-vs2.3.6.10+lihas1 root=/dev/sda1 ro console=tty0 console=ttyS0
...
[    0.463523] List of all partitions:
[    0.464843] No filesystem could mount root, tried:
[    0.466592] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

TODO: fix these errors

TODO: run vserver's testme

New template for meta package linux-image-X.Y-vserver-amd64

cd ushare
cp -ax linux-image-3.10-vserver-amd64 linux-image-4.1-vserver-amd64
# change things:
diff -r linux-image-3.10-vserver-amd64 linux-image-4.1-vserver-amd64
    diff -r /usr/share/kernel-autobuild/linux-image-3.14-vserver-amd64/Makefile /usr/share/kernel-autobuild/linux-image-4.1-vserver-amd64/Makefile
    6,7c6,7
    < APPNAME=linux-image-3.10-vserver-amd64
    < VERSION=3.10.9
    ---
    > APPNAME=linux-image-4.1-vserver-amd64
    > VERSION=4.1
    diff -r /usr/share/kernel-autobuild/linux-image-3.14-vserver-amd64/debian/README /usr/share/kernel-autobuild/linux-image-4.1-vserver-amd64/debian/README
    1c1
    < The Debian Package linux-image-3.10
    ---
    > The Debian Package linux-image-4.1
    6c6
    <  -- LiHAS Stuttgart <support@lihas.de>  Mon, 26 Aug 2013 18:15:17 +0200
    ---
    >  -- LiHAS Stuttgart <support@lihas.de>  Mon, 18 Apr 2016 18:18:46 +0200
    diff -r /usr/share/kernel-autobuild/linux-image-3.14-vserver-amd64/debian/README.Debian /usr/share/kernel-autobuild/linux-image-4.1-vserver-amd64/debian/README.Debian
    1c1
    < linux-image-3.10 for Debian
    ---
    > linux-image-4.1 for Debian
    6c6
    <  -- LiHAS Stuttgart <support@lihas.de>  Mon, 26 Aug 2013 18:15:57 +0200
    ---
    >  -- LiHAS Stuttgart <support@lihas.de>  Mon, 18 Apr 2016 18:18:46 +0200
    diff -r /usr/share/kernel-autobuild/linux-image-3.14-vserver-amd64/debian/changelog /usr/share/kernel-autobuild/linux-image-4.1-vserver-amd64/debian/changelog
    1c1
    < linux-image-3.10-vserver-amd64 (3.10.9) unstable; urgency=low
    ---
    > linux-image-4.1-vserver-amd64 (4.1) unstable; urgency=low
    5c5
    <  -- LiHAS Stuttgart <support@lihas.de>  Mon, 26 Aug 2013 18:16:59 +0200
    ---
    >  -- LiHAS Stuttgart <support@lihas.de>  Mon, 18 Apr 2016 18:18:46 +0200
    diff -r /usr/share/kernel-autobuild/linux-image-3.14-vserver-amd64/debian/control /usr/share/kernel-autobuild/linux-image-4.1-vserver-amd64/debian/control
    1c1
    < Source: linux-image-3.10-vserver-amd64
    ---
    > Source: linux-image-4.1-vserver-amd64
    9c9
    < Package: linux-image-3.10-vserver-amd64
    ---
    > Package: linux-image-4.1-vserver-amd64
    11,12c11,12
    < Depends: linux-firmware-image (=3.10.9-vs2.3.6.6+lihas1-1), linux-image-3.10.9-vs2.3.6.6+lihas1 (=3.10.9-vs2.3.6.6+lihas1-1)
    < Description: Linux 3.10 for 64-bit PCs (meta-package), Linux-VServer support
    ---
    > Depends: linux-firmware-image (=4.1-vs2.3.6.6+lihas1-1), linux-image-4.1-vs2.3.6.6+lihas1 (=4.1-vs2.3.6.6+lihas1-1)
    > Description: Linux 4.1 for 64-bit PCs (meta-package), Linux-VServer support
    diff -r /usr/share/kernel-autobuild/linux-image-3.14-vserver-amd64/debian/copyright /usr/share/kernel-autobuild/linux-image-4.1-vserver-amd64/debian/copyright
    39c39
    <     Copyright (C) 2012 LiHAS Stuttgart <support@lihas.de>
    ---
    >     Copyright (C) 2016 LiHAS Stuttgart <support@lihas.de>
project/kernel-autobuild/new-kernel-release.txt · Last modified: 2016/10/24 11:45 by 37.209.107.175