Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Kernel: how to customize?

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
giocitta
Posts: 5
Joined: 2018-09-24 19:03

Kernel: how to customize?

#1 Post by giocitta »

Hi all, I'm very happy of my decision to join this Debian Community, and I thank all the friends who will help me in resolving the problems arising whille moving from Gentoo/CRUX to Debian.
I chose Debian Buster, and I like it very much. Everything works fine, but, but... I don't succeed to customize the kernel introducing new functions (i.e, a better configuration of drivers as i915 and amdgpu for the Topaz XT graphic card).
I'm sufficiently able (owing to the Gentoo and CRUX experience) to use "make menuconfig" and select the right items, but independently of the linux-source (i.e, 4,18.9) on which to work through the Debian or the tradizional way, I always get this final error:
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
make[1]: *** [scripts/package/Makefile:75: deb-pkg] Error 2
make: *** [Makefile:1341: deb-pkg] Error 2

This happens notwithstanding the fact that I follow with attention the Debian Guides on Kernel building and installing, and both when I work from ~/kernel directory or directly from /usr/src/linux-4.18.
I understand that the problem lies in an incorrect use of debian/rules, but I don't know what to change in this file, or where to read something about the meaning of these rules.
What to do? This is my debian/rules:

#!/usr/bin/make -f
build:
$(MAKE) KERNELRELEASE=4.18.9 ARCH=x86 KBUILD_SRC=
binary-arch:
$(MAKE) KERNELRELEASE=4.18.9 ARCH=x86 KBUILD_SRC= intdeb-pkg
clean:
rm -rf debian/*tmp debian/files
$(MAKE) clean
binary: binary-arch

Thanks for your suggestions and help.
Giorgio Cittadini from Gavi (AL, Italy)

day
Posts: 56
Joined: 2015-03-03 00:00

Re: Kernel: how to customize?

#2 Post by day »

Build vanilla kernel with command:

Code: Select all

 make bindeb-pkg -j<jobs>

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Kernel: how to customize?

#3 Post by stevepusser »

What configuration are you changing for the graphics drivers from what you'd get in the Debian 4.18 kernel now in Buster?
MX Linux packager and developer

giocitta
Posts: 5
Joined: 2018-09-24 19:03

Re: Kernel: how to customize?

#4 Post by giocitta »

stevepusser wrote:What configuration are you changing for the graphics drivers from what you'd get in the Debian 4.18 kernel now in Buster?
Hi stevepusser,
in Device Drivers >>> Generic Driver Options >>> Firmware loader >>> under Firmware loading facility, I enter the string value:

(i915/kbl_dmc_ver1_01.bin amdgpu/topaz_mc.bin amdgpu/topaz_pfp.bin amdgpu/topaz_me.bin amdgpu/topaz_ce.bin amdgpu/topaz_rlc.bin amdgpu/topaz_mec.bin amdgpu/topaz_sdma.bin amdgpu/topaz_sdma1.bin amdgpu/topaz_smc.bin rtl_bt/rtl8822b_config.bin rtl_bt/rtl8822b_fw.bin rtl_nic/rtl8168h-2.fw)

so to have a fully working Topaz XT and bluetooth.
I tried the 4.18.9 vanilla kernel just to have the latest stable kernel, but the same error appears if I try with Debian 4.18 source now in Buster.

giocitta
Posts: 5
Joined: 2018-09-24 19:03

Re: Kernel: how to customize?

#5 Post by giocitta »

day wrote:Build vanilla kernel with command:

Code: Select all

 make bindeb-pkg -j<jobs>
Hi day, thanks for your suggestion.
I tried with make bindeb-pkg -j5 (my CPU is an i5), but nothing changes;

make[2]: *** [debian/rules:4: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
make[1]: *** [scripts/package/Makefile:80: bindeb-pkg] Error 2

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Kernel: how to customize?

#6 Post by stevepusser »

giocitta wrote:
stevepusser wrote:What configuration are you changing for the graphics drivers from what you'd get in the Debian 4.18 kernel now in Buster?
Hi stevepusser,
in Device Drivers >>> Generic Driver Options >>> Firmware loader >>> under Firmware loading facility, I enter the string value:

(i915/kbl_dmc_ver1_01.bin amdgpu/topaz_mc.bin amdgpu/topaz_pfp.bin amdgpu/topaz_me.bin amdgpu/topaz_ce.bin amdgpu/topaz_rlc.bin amdgpu/topaz_mec.bin amdgpu/topaz_sdma.bin amdgpu/topaz_sdma1.bin amdgpu/topaz_smc.bin rtl_bt/rtl8822b_config.bin rtl_bt/rtl8822b_fw.bin rtl_nic/rtl8168h-2.fw)

so to have a fully working Topaz XT and bluetooth.
I tried the 4.18.9 vanilla kernel just to have the latest stable kernel, but the same error appears if I try with Debian 4.18 source now in Buster.
As far as I can tell, all those files can be installed with the firmware-misc-nonfree, firmware-amd-graphics, and firmware-realtek packages in the non-free section of the repository. The standard Debian install does not include those because of Debian's free software commitment, but there are literally thousands of answered questions on these forums about missing firmware and how to install those packages.

Please search the Debian wiki about firmware and how to get it before going to all the trouble of rebuilding a kernel to solve this classic "XY" problem.
MX Linux packager and developer

giocitta
Posts: 5
Joined: 2018-09-24 19:03

Re: Kernel: how to customize?

#7 Post by giocitta »

stevepusser wrote:
giocitta wrote:
stevepusser wrote:What configuration are you changing for the graphics drivers from what you'd get in the Debian 4.18 kernel now in Buster?
Hi stevepusser,
in Device Drivers >>> Generic Driver Options >>> Firmware loader >>> under Firmware loading facility, I enter the string value:

(i915/kbl_dmc_ver1_01.bin amdgpu/topaz_mc.bin amdgpu/topaz_pfp.bin amdgpu/topaz_me.bin amdgpu/topaz_ce.bin amdgpu/topaz_rlc.bin amdgpu/topaz_mec.bin amdgpu/topaz_sdma.bin amdgpu/topaz_sdma1.bin amdgpu/topaz_smc.bin rtl_bt/rtl8822b_config.bin rtl_bt/rtl8822b_fw.bin rtl_nic/rtl8168h-2.fw)

so to have a fully working Topaz XT and bluetooth.
I tried the 4.18.9 vanilla kernel just to have the latest stable kernel, but the same error appears if I try with Debian 4.18 source now in Buster.
As far as I can tell, all those files can be installed with the firmware-misc-nonfree, firmware-amd-graphics, and firmware-realtek packages in the non-free section of the repository. The standard Debian install does not include those because of Debian's free software commitment, but there are literally thousands of answered questions on these forums about missing firmware and how to install those packages.

Please search the Debian wiki about firmware and how to get it before going to all the trouble of rebuilding a kernel to solve this classic "XY" problem.
Hi stevepusser,
thank you for the suggestions. I followed your way removing from kernel .config i915... topaz... and rtl..., and installing the non-free stuff.
Full success: kernel compiled!

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Kernel: how to customize?

#8 Post by stevepusser »

Debian strips the non-free firmware out of the kernel and puts in separate packages so the kernel can be fully free software and meet the Debian Free Software Guidelines. This is somewhat more inconvenient for those that really need that firmware, like you or me, but does allow one to have a fully DFSG-compliant system if the hardware allows.
MX Linux packager and developer

giocitta
Posts: 5
Joined: 2018-09-24 19:03

Re: Kernel: how to customize?

#9 Post by giocitta »

stevepusser wrote:Debian strips the non-free firmware out of the kernel and puts in separate packages so the kernel can be fully free software and meet the Debian Free Software Guidelines. This is somewhat more inconvenient for those that really need that firmware, like you or me, but does allow one to have a fully DFSG-compliant system if the hardware allows.
OK! This first approach to Debian reached the level of a good policy lesson (thanking you...), and marks a neat way where to pass through to walk freely towards the Debian inner structure. Thanks again for your kind help.
Giorgio Cittadini

Post Reply