Commit 4eb604e7 authored by intrigeri's avatar intrigeri

Upgrade to Linux 4.5.

This is essentially a squashed version of feature/8415-overlayfs, purged
of its overlayfs-specific bits, and that fetches the kernel from
jessie-backports (instead of from sid) to ease compiling out-of-tree and
dkms modules. At this stage, the resulting ISO won't boot since it'll
lack both aufs and overlayfs.

refs: #10298

To achieve that:

* Install the 686 kernel flavour instead of the obsolete 586 one.

* Rename the amd64 kernel via binary_local-hooks.

  lb_binary_syslinux depends on --linux-flavours, but we can't pass
  amd64 in there anymore (due to lack of multiarch support) so we need
  to rename the second (amd64) kernel ourselves.

* APT, dpkg: add amd64 architecture. The amd64 kernel flavour is not
  built anymore for the i386 architecture, so we need to use
  multiarch now.

* Temporary disable dkms modules building.

  Building them for the amd64 kernel requires installing an amd64
  toolchain, that conflicts with the i386 one and with lots of packages
  we need. Let's come back to it later (refs: #9969).
parent ac51c43b
......@@ -77,7 +77,7 @@ $RUN_LB_CONFIG \
--mirror-chroot-security "$DEBIAN_SECURITY_MIRROR" \
--packages-lists="standard" \
--tasks="standard" \
--linux-packages="linux-image-3.16.0-4" \
--linux-packages="linux-image-${KERNEL_VERSION}" \
--syslinux-menu vesamenu \
--syslinux-splash data/splash.png \
--syslinux-timeout 4 \
......@@ -89,7 +89,7 @@ hw_arch="`dpkg --print-architecture`"
if [ "$hw_arch" = i386 -o "$hw_arch" = amd64 ]; then
$RUN_LB_CONFIG \
--architecture i386 \
--linux-flavours "586 amd64" \
--linux-flavours "686" \
${@}
# build powerpc images on powerpc64 as well, include only powerpc kernel
elif [ "$hw_arch" = powerpc -o "$hw_arch" = powerpc64 ]; then
......
......@@ -21,6 +21,9 @@ AMNESIA_ISOHYBRID_OPTS="-h 255 -s 63"
# Minimal upstream version of syslinux-utils we need
REQUIRED_SYSLINUX_UTILS_UPSTREAM_VERSION="6.03~pre20"
# Kernel version
KERNEL_VERSION='4.5.0-0.bpo.2'
### You should not have to change anything below this line ####################
# sanity checks
......
#!/bin/bash
set -e
# Including common functions
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'renaming amd64 kernel')"
HELP=""
USAGE="${PROGRAM}"
# Reading configuration files
Read_conffiles config/all config/common config/binary
Set_defaults
Echo_message "Renaming amd64 kernel"
mv binary/live/vmlinuz-*-amd64 binary/live/vmlinuz2
mv binary/live/initrd.img-*-amd64 binary/live/initrd2.img
APT::Architectures {"i386"; "amd64";};
......@@ -87,6 +87,14 @@ Package: hplip* hpijs-ppds libhpmud* libsane-hpaio printer-driver-hpcups printer
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 999
Package: lib*-mesa*
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 1006
Package: libdrm*
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 999
Package: libdvd-pkg
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 999
......@@ -95,15 +103,71 @@ Package: libnet-dbus-perl
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 999
Package: monkeysphere
Pin: release o=Debian,n=stretch
Package: linux-base
Pin: release o=Debian,n=sid
Pin-Priority: 999
Package: lib*-mesa*
Package: linux-compiler-gcc-*
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 1006
Pin-Priority: 999
Package: libdrm*
Package: linux-compiler-gcc-*:amd64
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 999
Package: linux-headers-686
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 999
Package: linux-headers-686-pae
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 999
Package: linux-headers-amd64:amd64
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 999
Package: linux-headers-4.*-common
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 999
Package: linux-headers-4.*-686
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 999
Package: linux-headers-4.*-686-pae
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 999
Package: linux-headers-4.*-amd64:amd64
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 999
Package: linux-image-686
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 999
Package: linux-image-686-pae
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 999
Package: linux-image-amd64:amd64
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 999
Package: linux-image-4.*-686
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 999
Package: linux-image-4.*-686-pae
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 999
Package: linux-image-4.*-amd64:amd64
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 999
Package: linux-kbuild-4.*
Pin: release o=Debian,n=jessie-backports
Pin-Priority: 999
......
#! /bin/sh
set -e
echo "Configuring dpkg architectures"
dpkg --add-architecture amd64
#!/bin/sh
set -e
echo "Installing amd64 Linux kernel"
apt-get --yes install linux-image-amd64:amd64
#!/bin/sh
set -e
echo "Building VirtualBox guest modules"
hw_arch="`dpkg --print-architecture`"
if [ "$hw_arch" != i386 -a "$hw_arch" != amd64 ]; then
exit 0
fi
gcc_version=4.8
# the -dkms package must be installed *after* dkms to be properly registered
apt-get install --yes build-essential dkms dpatch
apt-get install --yes gcc-${gcc_version}
apt-get install --yes virtualbox-guest-utils virtualbox-guest-dkms virtualbox-guest-x11
# Have the modules built for every installed kernel
for KERNEL in /boot/vmlinuz-* ; do
KERNEL_VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
MODULES_VERSION="$(dpkg-query -W -f='${Version\n}' virtualbox-guest-dkms)"
# Installing the headers should trigger the building of the modules for that kernel
apt-get install --yes linux-headers-$KERNEL_VERSION
# Only build and install if it was not done already
if [ ! "$(dkms status -k $KERNEL_VERSION -m virtualbox-guest -v $MODULES_VERSION)" ]; then
dkms build -k $KERNEL_VERSION -m virtualbox-guest -v $MODULES_VERSION
dkms install -k $KERNEL_VERSION -m virtualbox-guest -v $MODULES_VERSION
fi
done
# clean the build directory
rm -r /var/lib/dkms/virtualbox-guest/
# virtualbox-guest-dkms's postrm script deletes any previously
# built binary module; let's delete it before the package gets purged.
rm /var/lib/dpkg/info/virtualbox-guest-dkms.prerm
# Also copy the udev rules installed by virtualbox-guest-dkms to enable guest
# additions by default.
cp -a /lib/udev/rules.d/60-virtualbox-guest-dkms.rules /etc/udev/rules.d/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment