lkml.org 
[lkml]   [2021]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] kbuild: deb-pkg: set dependencies for kernel image package
Date
From: Sascha Silbe <x-linux@infra-silbe.de>

When built with module support, we'll need the kmod package to handle
the user space side of kernel module management.

When built with initramfs support but not building an initramfs
directly into the kernel, we'll need initramfs-tools to build the
initramfs that will be loaded.

If a the official kernel package of the distribution was installed
first the dependencies are already installed and it will happen to
work. However on a fresh install base system with just the kernel
package built by deb-pkg installed the dependencies will be missing
and the system will fail to boot.

Signed-off-by: Sascha Silbe <x-linux@infra-silbe.de>
---
scripts/package/mkdebian | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index 60a2a63a5e900..a3becd9d402e1 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -132,6 +132,14 @@ else
echo >&2 "Install lsb-release or set \$KDEB_CHANGELOG_DIST explicitly"
fi

+image_depends=
+if is_enabled MODULES; then
+ image_depends=kmod
+fi
+if is_enabled BLK_DEV_INITRD && ! is_enabled INITRAMFS_SOURCE; then
+ image_depends="${image_depends}${image_depends:+, }initramfs-tools | linux-initramfs-tool"
+fi
+
mkdir -p debian/source/
echo "1.0" > debian/source/format

@@ -180,6 +188,7 @@ Homepage: https://www.kernel.org/

Package: $packagename-$version
Architecture: $debarch
+Depends: $image_depends
Description: Linux kernel, version $version
This package contains the Linux kernel, modules and corresponding other
files, version: $version.
--
2.30.2
\
 
 \ /
  Last update: 2021-10-24 16:09    [W:0.079 / U:2.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site