Results 1 to 3 of 3

Thread: Patched 6.6 kernel will not compile

  1. #1
    Join Date
    United Kingdom

    Patched 6.6 kernel will not compile


    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 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.

    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 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
    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 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.

    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 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"

    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[] = {
    + {
    + /* Asus Vivobook E1504GA */
    + .matches = {
    + },
    + },
    + {
    + /* Asus Vivobook E1504GAB */
    + .matches = {
    + },
    + },
    /* LG Electronics 17U70P */
    .matches = {
    Last edited by elyon; 2 Weeks Ago at 20:49. Reason: Suggested by member for better readability

  2. #2
    reading a wall of text is very difficult for most people, Add punctuation and add spaces between thoughts and fix the grammar errors.

    If you can't do this on your own and are running Windows try asking copilot to add and fix all the errors I pointed out above.

  3. #3
    Join Date
    United Kingdom
    Hey there! thank you for your reply. What I posted was spaced and readable but it fell foul of the system; which deleted the spacing and the layout which I had made. I changed my editor settings to the less complicated option and I was pleased to see that the formatting held. In response to your suggestions I added some more formatting to make it easier to read.

    While I was waiting for my post to be reviewed by the admin I was very pleased that suddenly one day my internal keyboard started working. That is the guys eventually released an update which had the kernel patch and now it works just dandy.

    The question is still an important one and if anybody can enlighten me and enlighten this space as to what the issues were then I think that it would be helpful for us.

Similar Threads

  1. Compile kernel for an old Neffos X1 Max
    By ArciducaZagaria in forum Building NetHunter
    Replies: 0
    Last Post: 2022-09-20, 23:10
  2. How to upgrade kernel that has benn patched with KAISER
    By taedori in forum General Archive
    Replies: 1
    Last Post: 2018-01-06, 11:49

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts