Building kernel packages for an Ubuntu flavour fails

Ralf Mardorf kde.lists at yahoo.com
Thu Apr 6 06:57:40 UTC 2023


Hi,

building packages for linux 6.2.9 by following
https://www.maketecheasier.com/build-custom-kernel-ubuntu/ failed.

Since I'm using a new CPU on a new Gigabyte B760M DS3H DDR4, HDMI audio
doesn't work. Audio works with kernels 6+ on Arch Linux. The output of
"aplay -l" shows another amount of devices for the Intel card.
This is the reason to build Xubuntu kernel packages.

System Information:
###################

$ hwinfo --cpu | grep Model | sort -u
  Model: 6.191.5 "13th Gen Intel(R) Core(TM) i3-13100"

$ uname -r
5.4.0-42-generic

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.6 LTS
Release:	20.04
Codename:	focal

Modifications:
##############

# apt-mark showhold
grub-common
grub-efi-amd64-bin
grub-efi-amd64-signed
grub-pc
grub-pc-bin
grub2-common
linux-generic
linux-headers-generic
linux-image-generic

$ cat /etc/initramfs-tools/conf.d/resume 
RESUME=UUID=bc0419de-6a38-4907-bb46-d2e0398228f6

A module build by a vendor's script, to gain Internet access:

$ lsmod | grep r8
r8125                 184320  0

I tested using Linux HWE, but those failed to boot:
###################################################

# apt update && apt full-upgrade; apt install --install-recommends linux-lowlatency-hwe-20.04 linux-generic-hwe-20.04 meld; apt autoremove; apt clean

I removed the HWE kernels.

Trying to build the linux 6.2.9 packages:
#########################################

I hope I didn't make a mistake by coping the commands from
.bash_history, but I don't think so.

# apt update && apt install wget build-essential bison flex libncurses-dev libssl-dev libelf-dev
# apt update && apt full-upgrade; apt autoremove; apt clean
$ wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.2.9.tar{.xz,.sign}
$ gpg --locate-keys torvalds at kernel.org gregkh at kernel.org
$ unxz linux-6.2.9.tar.xz
$ gpg --verify linux-6.2.9.tar.sign
$ tar xf linux-6.2.9.tar
$ cd linux-6.2.9/
$ cp /boot/config-`uname -r` .config
$ make olddefconfig
$ make clean
$ date; make -j `getconf _NPROCESSORS_ONLN`; date; make deb-pkg LOCALVERSION=-custom; date
[snip]
  CLEAN   init
  CLEAN   kernel/debug/kdb
  CLEAN   kernel
  CLEAN   lib/raid6
  CLEAN   lib
  CLEAN   net/bpfilter
  CLEAN   net/wireless
  CLEAN   security/apparmor
  CLEAN   security/selinux
  CLEAN   security/tomoyo
  CLEAN   usr
  CLEAN   .
  CLEAN   modules.builtin modules.builtin.modinfo .vmlinux.export.c
sh ./scripts/package/mkdebian
  TAR     linux-upstream.tar.gz
origversion=$(dpkg-parsechangelog -SVersion |sed 's/-[^-]*$//');\
	mv linux-upstream.tar.gz ../linux-upstream_${origversion}.orig.tar.gz
dpkg-buildpackage -r"fakeroot -u" -a$(cat debian/arch)  -i.git -us -uc
dpkg-buildpackage: info: source package linux-upstream
dpkg-buildpackage: info: source version 6.2.9-custom-2
dpkg-buildpackage: info: source distribution focal
dpkg-buildpackage: info: source changed by weremouse <weremouse at xubu>
dpkg-buildpackage: info: host architecture amd64
 dpkg-source -i.git --before-build .
 debian/rules clean
rm -rf debian/files debian/linux-*
make clean
 dpkg-source -i.git -b .
dpkg-source: info: using source format '1.0'
dpkg-source: warning: source directory 'linux-6.2.9' is not <sourcepackage>-<upstreamversion> 'linux-upstream-6.2.9-custom'
dpkg-source: warning: .orig directory name linux-6.2.9.orig is not <package>-<upstreamversion> (wanted linux-upstream-6.2.9-custom.orig)
dpkg-source: info: building linux-upstream using existing linux-upstream_6.2.9-custom.orig.tar.gz
dpkg-source: info: building linux-upstream in linux-upstream_6.2.9-custom-2.diff.gz
dpkg-source: error: cannot represent change to vmlinux-gdb.py:
dpkg-source: error:   new version is symlink to /media/weremouse/m1.archlinux/xubu-kernel/linux-6.2.9/scripts/gdb/vmlinux-gdb.py
dpkg-source: error:   old version is nonexistent
dpkg-source: warning: ignoring deletion of file .scmversion
dpkg-source: warning: the diff modifies the following upstream files: 
 .clang-format
 .cocciconfig
 .config.old
 .get_maintainer.ignore
 .mailmap
 .rustfmt.toml
 .version
 CREDITS
 MAINTAINERS
 Module.symvers
 README
dpkg-source: info: use the '3.0 (quilt)' format to have separate and documented changes to upstream files, see dpkg-source(1)
dpkg-source: error: unrepresentable changes to source
dpkg-buildpackage: error: dpkg-source -i.git -b . subprocess returned exit status 1
make[1]: *** [scripts/Makefile.package:90: deb-pkg] Error 1
make: *** [Makefile:1665: deb-pkg] Error 2

Any hints are welcome!

I googeled for

  dpkg-source: error: cannot represent change to vmlinux-gdb.py

but couldn't find a solution.

Regards,
Ralf



More information about the ubuntu-users mailing list