summaryrefslogtreecommitdiff
path: root/scripts/package/builddeb
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-03-22 00:41:00 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2024-03-22 00:41:00 +0300
commit1d35aae78ffe739bf46c2bf9dea7b51a4eebfbe0 (patch)
tree04c30ae83e5d76abe1284846921f1447f20aed38 /scripts/package/builddeb
parent88d92fb1c034922572bab93482ac9cc61d4ba43c (diff)
parentf2fd2aad1908554fbc4ad6e8ef23bad3086bebd1 (diff)
downloadlinux-1d35aae78ffe739bf46c2bf9dea7b51a4eebfbe0.tar.xz
Merge tag 'kbuild-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild updates from Masahiro Yamada: - Generate a list of built DTB files (arch/*/boot/dts/dtbs-list) - Use more threads when building Debian packages in parallel - Fix warnings shown during the RPM kernel package uninstallation - Change OBJECT_FILES_NON_STANDARD_*.o etc. to take a relative path to Makefile - Support GCC's -fmin-function-alignment flag - Fix a null pointer dereference bug in modpost - Add the DTB support to the RPM package - Various fixes and cleanups in Kconfig * tag 'kbuild-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (67 commits) kconfig: tests: test dependency after shuffling choices kconfig: tests: add a test for randconfig with dependent choices kconfig: tests: support KCONFIG_SEED for the randconfig runner kbuild: rpm-pkg: add dtb files in kernel rpm kconfig: remove unneeded menu_is_visible() call in conf_write_defconfig() kconfig: check prompt for choice while parsing kconfig: lxdialog: remove unused dialog colors kconfig: lxdialog: fix button color for blackbg theme modpost: fix null pointer dereference kbuild: remove GCC's default -Wpacked-bitfield-compat flag kbuild: unexport abs_srctree and abs_objtree kbuild: Move -Wenum-{compare-conditional,enum-conversion} into W=1 kconfig: remove named choice support kconfig: use linked list in get_symbol_str() to iterate over menus kconfig: link menus to a symbol kbuild: fix inconsistent indentation in top Makefile kbuild: Use -fmin-function-alignment when available alpha: merge two entries for CONFIG_ALPHA_GAMMA alpha: merge two entries for CONFIG_ALPHA_EV4 kbuild: change DTC_FLAGS_<basetarget>.o to take the path relative to $(obj) ...
Diffstat (limited to 'scripts/package/builddeb')
-rwxr-xr-xscripts/package/builddeb50
1 files changed, 12 insertions, 38 deletions
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index bf96a3c24608..e797ad360f7a 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -24,24 +24,10 @@ if_enabled_echo() {
fi
}
-create_package() {
- export DH_OPTIONS="-p${1}"
-
- dh_installdocs
- dh_installchangelogs
- dh_compress
- dh_fixperms
- dh_gencontrol
- dh_md5sums
- dh_builddeb -- ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS}
-}
-
install_linux_image () {
pname=$1
pdir=debian/$1
- rm -rf ${pdir}
-
# Only some architectures with OF support have this target
if is_enabled CONFIG_OF_EARLY_FLATTREE && [ -d "${srctree}/arch/${SRCARCH}/boot/dts" ]; then
${MAKE} -f ${srctree}/Makefile INSTALL_DTBS_PATH="${pdir}/usr/lib/linux-image-${KERNELRELEASE}" dtbs_install
@@ -109,8 +95,6 @@ install_linux_image () {
install_linux_image_dbg () {
pdir=debian/$1
- rm -rf ${pdir}
-
# Parse modules.order directly because 'make modules_install' may sign,
# compress modules, and then run unneeded depmod.
while read -r mod; do
@@ -140,8 +124,6 @@ install_kernel_headers () {
pdir=debian/$1
version=${1#linux-headers-}
- rm -rf $pdir
-
"${srctree}/scripts/package/install-extmod-build" "${pdir}/usr/src/linux-headers-${version}"
mkdir -p $pdir/lib/modules/$version/
@@ -151,8 +133,6 @@ install_kernel_headers () {
install_libc_headers () {
pdir=debian/$1
- rm -rf $pdir
-
$MAKE -f $srctree/Makefile headers_install INSTALL_HDR_PATH=$pdir/usr
# move asm headers to /usr/include/<libc-machine>/asm to match the structure
@@ -161,21 +141,15 @@ install_libc_headers () {
mv "$pdir/usr/include/asm" "$pdir/usr/include/${DEB_HOST_MULTIARCH}"
}
-rm -f debian/files
-
-packages_enabled=$(dh_listpackages)
-
-for package in ${packages_enabled}
-do
- case ${package} in
- *-dbg)
- install_linux_image_dbg "${package}";;
- linux-image-*|user-mode-linux-*)
- install_linux_image "${package}";;
- linux-libc-dev)
- install_libc_headers "${package}";;
- linux-headers-*)
- install_kernel_headers "${package}";;
- esac
- create_package "${package}"
-done
+package=$1
+
+case "${package}" in
+*-dbg)
+ install_linux_image_dbg "${package}";;
+linux-image-*|user-mode-linux-*)
+ install_linux_image "${package}";;
+linux-libc-dev)
+ install_libc_headers "${package}";;
+linux-headers-*)
+ install_kernel_headers "${package}";;
+esac