k***[email protected]
2023-02-21 10:14 deepin
I've solved it myself, and I decided to share it here in case there are someone out there wanting to compile their own kernels for Deepin.
I started out with Deepin 20.8, running kernel 5.18.17-amd64-desktop-community-hwe. This kernel lacked support for both my bluetooth and webcam, so I needed to compile a new kernel after having modified those drivers.
- Download the appropriate kernel source from here https://kernel.org/
For me that meant 'wget https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.18.17.tar.gz' into ~Downloads - Next, I install the correct header files: 'sudo apt install linux-headers-5.18.17-amd64-desktop-community-hwe'
- Unpacking the source with 'tar zxvf inux-5.18.17.tar.gz'
- Then I modified the files in drivers/bluetooth and drivers/media/usb/uvc to enable the devices I was missing
- In linux-5.18.17, run 'make mrproper' to clean the source tree for old configs
- In linux-5.18.17, run 'yes '' | make localmodconfig' to take your current (running)
.config
and turn off any unused modules without asking all the questions - To prevent the new kernel from getting the same name as the running (original) kernel, give it a dedicated local version by editing .config just created in item 6.
Here's my part of the .config:
CONFIG_LOCALVERSION="-amd64-desktop-community-hwe-blix" - Next, start the compilation with 'make -j$(nproc)'
This will use the amount od cores your PC has available to speed up the compilation - After a successful compilation:
'sudo make modules_install'
'sudp make install'
'reboot'
Reply Like 0 View the author
To be able to fully use my Acer Aspire A514-55 with Deepin (20.8) I need to recompile 2 modules for the original running kernel after having modified uvc_driver.c and btusb.c. This is for the webcam (Quanta Computer, Inc. ACER HD User Facing) and bluetooth (Lite-On Technology Corp. Wireless_Device).
In Ubuntu I can run 'apt-get source linux-modules-extra-$(uname -r)' to get the source, but doing this on Deepin I get "E: Unable to find a source package for linux-modules-extra-5.18.17-amd64-desktop-community-hwe".
How can I do this in Deepin?
-Kolbjørn Blix