From a85cf55f293681d0a9e1219be195e22c2267005c Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Mon, 2 Oct 2017 14:47:46 -0700 Subject: [PATCH 1/3] Use kvm kernel flavor for minimized cloud image, not virtual --- live-build/auto/config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/live-build/auto/config b/live-build/auto/config index afeca134..a5b18cee 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -531,14 +531,15 @@ case $PROJECT in if [ "${SUBPROJECT:-}" = minimized ]; then add_task install cloud-image add_package install sudo + KERNEL_FLAVOURS=kvm else add_task install minimal standard cloud-image add_package install ubuntu-minimal + KERNEL_FLAVOURS=virtual fi BINARY_REMOVE_LINUX=false OPTS="${OPTS:+$OPTS }--initramfs=none" - KERNEL_FLAVOURS=virtual case $ARCH in armhf) KERNEL_FLAVOURS=generic-lpae From fffec4782fc1ceb1ba2339850ad2ea8105d46961 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Mon, 2 Oct 2017 15:17:23 -0700 Subject: [PATCH 2/3] skip installation of kernel headers for all minimal images --- live-build/auto/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-build/auto/config b/live-build/auto/config index a5b18cee..835da17d 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -239,7 +239,7 @@ esac SIGNED_KERNEL_PACKAGE="linux-signed-generic" if [ "${SUBPROJECT:-}" = minimized ]; then - OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal" + OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal --linux-packages=linux-image" fi case $PROJECT in From 4204faa4849b25364ec267a97710a4a58c321153 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 4 Oct 2017 10:13:13 -0700 Subject: [PATCH 3/3] If we're not on xenial and don't have extra ppas, don't try to use the kvm flavor for minimal images since it's not currently available. --- live-build/auto/config | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/live-build/auto/config b/live-build/auto/config index 835da17d..23880265 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -531,7 +531,20 @@ case $PROJECT in if [ "${SUBPROJECT:-}" = minimized ]; then add_task install cloud-image add_package install sudo - KERNEL_FLAVOURS=kvm + # linux-kvm currently only exists in xenial, not in + # non-LTS suites. Fall back to virtual flavor, which + # may or may not boot initramfsless but enables us to + # test building and possibly build derivative images + # using other kernel flavors. + # If you enable an extra ppa, it is assumed that + # linux-kvm is available since you control the + # archive and can provide this metapackage as + # necessary. + if [ -z "$EXTRA_PPAS" ] && [ "$SUITE" != xenial ]; then + KERNEL_FLAVOURS=virtual + else + KERNEL_FLAVOURS=kvm + fi else add_task install minimal standard cloud-image add_package install ubuntu-minimal