Kernel build - append to version
I am building a new kernel (5.4.0-14-generi) in Ubuntu 20.04 with additional patches by following this guide: https:/
fakeroot debian/rules clean
fakeroot debian/rules binary-headers binary-generic binary-perarch
How can I append an additional string to the kernel version (and to the debian package) to distinguish it from the installed kernel?
Thank you in advance!
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu linux Edit question
- Assignee:
- No assignee Edit question
- Last query:
- 2020-03-19
- Last reply:
- 2020-03-20
This question was reopened
- 2020-03-19 by Zoltan
Zoltan (zoltanbus) said : | #2 |
I do not see a solution in the above post.
Local version can be appended in the config (e.g. in menuconfig: General setup -> Local version).
However, if I do so,
fakeroot debian/rules binary-headers binary-generic binary-perarch
fails with
depmod: ERROR: could not open directory /home/devel/
depmod: FATAL: could not search modules: No such file or directory
mv: cannot stat '/home/
make: *** [debian/
It still expects the original name without LOCALVERSION.
If I do not change LOCALVERSION, then the build produces .deb packages with the same name as the original installed .deb packages. Therefore they cannot be installed because they are in conflict with the original packages.
Bernard Stafford (bernard010) said : | #3 |
Documentation that i found to help:
https:/
#ubuntu IRC channel on FreeNode [Developers] "people here can help you work out where your issue is" ***
https:/
https:/
https:/
https:/
https:/
Look at chapter 4 of this Handbook.
Thank You for your ongoing efforts to improve Ubuntu.
Respectfully,
Bernard
Zoltan (zoltanbus) said : | #4 |
Finally, I have found a solution: dch -lsuffix or dch -i did the magic.
More info: http://
Steps they worked for me:
sudo apt-get install libncurses-dev flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf python-docutils asciidoc default-jdk git build-essential debhelper bc zfs-dkms curl gawk
git clone --depth=1 git://git.
cd focal
git apply ../mypatch.patch
fakeroot debian/rules clean
dch -l-mysuffix
fakeroot debian/rules binary-headers binary-generic binary-perarch
Please improve the documentation. This is an essential use-case.
Thanks!
Zoltan (zoltanbus) said : | #5 |
I am taking back the posted solution.
The package generated by the described steps cannot be installed, it still conflicts with the original package:
Unpacking linux-headers-
dpkg: regarding .../linux-
linux-
linux-
Bernard Stafford (bernard010) said : | #6 |
I have a kernel problem where do I go?
If you have a problem which is related to the kernel you should visit the #ubuntu-kernel IRC channel on FreeNode (See How do I find the kernel team?). [Developers that will help you]
Explain that you are building a kernel, etc.
https:/
I will do some more research on your current situation. You should make the generic kernel your own kernel.
That is in the documentation posted above. That may help.
Bernard Stafford (bernard010) said : | #7 |
As the conflict states: linux-image-
Test in Virtual Box as a patch : on your build system.
The set of 3 package files. image, header, base for your new: linux-image-
fakeroot debian/rules clean
# quicker build:
fakeroot debian/rules binary-headers binary-generic binary-perarch
# if you need linux-tools or lowlatency kernel, run instead:
fakeroot debian/rules binary
To test:
sudo dpkg -i linux*5.4.0-14.17* .deb
sudo reboot
Manfred Hampl (m-hampl) said : | #8 |
Looking at your error message:
linux-
What is the name of all currently installed kernel packages, and what is the name of the packages that you have built?
dpkg -l | grep 5.4.0-14-generic
ls -l linux*5.4.0-14.17* .deb
Can you help with this problem?
Provide an answer of your own, or ask Zoltan for more information if necessary.