[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211024135838.647689-2-x-linux@se-silbe.de>
Date: Sun, 24 Oct 2021 15:58:37 +0200
From: Sascha Silbe <x-linux@...silbe.de>
To: Masahiro Yamada <masahiroy@...nel.org>,
Michal Marek <michal.lkml@...kovi.net>,
Nick Desaulniers <ndesaulniers@...gle.com>
Cc: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] kbuild: deb-pkg: set dependencies for kernel image package
From: Sascha Silbe <x-linux@...ra-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@...ra-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
Powered by blists - more mailing lists