ISSUE: COMPILATION ERRORS
INSTALLATION:
Hi guys I am a kernel newbie. I have an asus vivobook E1504GAB with a i3-N305 octa core. It is running standard installation of Kali Linux from the latest stable ISO release on the Kali Website (2024.2). I have tried to resolve my problem by searching the Kali documentation online and by googling extensively but I am unable to find the answer. If anybody can help me to figure this out it would be greatly apppreciated.
BUG #21658:The current Kali installer release has a kernel bug which was patched in mainstream linux as bug #21658. see https://patchwork.kernel.org/project....com/#25661892. It hasn't made its way to the stable release but I checked and it is set to be included in the upcoming 6.8 release. The bug prevents use of the internal keyboard.
KERNEL PATCH:
I wanted to patch the kernel to have my internal keyboard working. I followed these steps:
1. I installed these dependencies: build-essential libncurses5-dev fakeroot xz-utils.
2. I downloaded the latest stable kali kernel sourcecode from the main repo at 'deb http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware'.
3. I added it to /usr/src/ directory on my system using the command 'sudo apt install linux-source-6.6'.
4. I unpacked the tarball inside a folder which I made at ~/kernel following the advice in https://www.kali.org/docs/developmen...ild-the-kernel.
5. I then copied my existing Kali /boot/config file to .config in the unpacked source and applied the necessary patch in the source folder with: "sudo patch -p1 < ../acpi-drivers-add-DMI-exception-for-ASUS-Vivobook-E1504GA-and-E1504GAB-to-resource.c.diff" Please see end of this post for the diff file text.
THE RESULT:
The message from the console was "patching file drivers/acpi/resource.c Hunk #1 succeeded at 510 with fuzz 1 (offset 28 lines)." The patch applied successfully but the kernel refuses to be compiled.
COMPILATION ERRORS:
In the unpacked source folder I executed: "sudo make deb-pkg olddefconfig -j8 LOCALVERSION=-customk" The compilation proceeded for quite a long time and I selected default configuration options when prompted. However the compilation failed giving me several Makefile errors. The errors output to the zshell are shown below. I have attempted the process several times on two different systems both running the same version of Kali natively. It consistently failed with the same errors. The first error occurring on the terminal says that a git repo is needed. This was my first attempt at compiling a linux kernel from source and although I have followed a couple of online guides I do not know which git repo is required. Can anybody help?
THE ERRORS:
The errors are as follows:
"error: creating source package requires git repository make[3]: *** [scripts/Makefile.package:17: check-git] Error 1 make[3]: *** Waiting for unfinished jobs.... warning: Not a git repository. Use --no-index to compare two paths outside a working tree and make[2]: *** [Makefile:1568: deb-pkg] Error 2 make[1]: *** [/home/user/kernel/linux-source-6.8/Makefile:368: __build_one_by_one] Error 2 make: *** [Makefile:252: __sub-make] Error 2"
THE PATCH CODE:
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
index 9bd9f79cd409..eb34d201b65f 100644
--- a/drivers/acpi/resource.c
+++ b/drivers/acpi/resource.c
@@ -482,6 +482,20 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = {
DMI_MATCH(DMI_BOARD_NAME, "B2502CBA"),
},
},
+ {
+ /* Asus Vivobook E1504GA */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_BOARD_NAME, "E1504GA"),
+ },
+ },
+ {
+ /* Asus Vivobook E1504GAB */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_BOARD_NAME, "E1504GAB"),
+ },
+ },
{
/* LG Electronics 17U70P */
.matches = {