Results 1 to 25 of 25

Thread: Trying to Compile a Kernel for Xiaomi Note 7 (Lavender)

  1. #1
    Join Date
    2016-Oct
    Location
    London
    Posts
    46

    Question Trying to Compile a Kernel for Xiaomi Note 7 (Lavender)

    hello guys

    i am trying to compile a kernel for Xiaomi note 7 (lavender).. Kernel Version 4.4.212
    its throwing a bunch of errors while compiling with kali nethunter configs.
    git hub link for the kernel is : https://github.com/Thiviyan/xiaomi_kernel_lavender -b jasmine-q-oss

    i dont see kernel v 4.4 patches in nethunter kernel build script so i have used v 4.14 patches.
    maybe Mr re4son could fix this.

    here i am attaching a full log file

  2. #2
    Join Date
    2015-Nov
    Location
    Australia
    Posts
    445
    Look under "4.04"
    Had to name it that way to get them listed in ascending order.

    Undeclared identifier? Did you get that after enabling ath9k_htc in the kernel config?

  3. #3
    Join Date
    2015-Nov
    Location
    Australia
    Posts
    445
    Mind adding "kali-nethunter-kernel/local.config" to your repo? Saves me looking for the toolchains you used.
    That's what I usually do:
    https://github.com/Re4son/android_ke...thunter-kernel

    Thanks heaps

  4. #4
    Join Date
    2016-Oct
    Location
    London
    Posts
    46
    Quote Originally Posted by re4son View Post
    Look under "4.04"
    Had to name it that way to get them listed in ascending order.

    Undeclared identifier? Did you get that after enabling ath9k_htc in the kernel config?
    yes its after adding ath9k and other nethunter stuffs into it...

  5. #5
    Join Date
    2016-Oct
    Location
    London
    Posts
    46
    Quote Originally Posted by re4son View Post
    Mind adding "kali-nethunter-kernel/local.config" to your repo? Saves me looking for the toolchains you used.
    That's what I usually do:
    https://github.com/Re4son/android_ke...thunter-kernel

    Thanks heaps
    i have added this and still same errors...

  6. #6
    Join Date
    2015-Nov
    Location
    Australia
    Posts
    445
    Quote Originally Posted by Thiviyan View Post
    i have added this and still same errors...
    Sorry for not being clear. I meant could you please add your own "local.config" to the repository for me to use. It won't help you but it'll help me to continue where you left off

  7. #7
    Join Date
    2016-Oct
    Location
    London
    Posts
    46
    Quote Originally Posted by re4son View Post
    Sorry for not being clear. I meant could you please add your own "local.config" to the repository for me to use. It won't help you but it'll help me to continue where you left off
    have done it and commit all the changes i made and pushed.

  8. #8
    Join Date
    2015-Nov
    Location
    Australia
    Posts
    445
    Quote Originally Posted by Thiviyan View Post
    have done it and commit all the changes i made and pushed.
    Awesome, thanks. Will look into it. Somehow I think I've already written a patch for it but I can't find it.

  9. #9
    Join Date
    2016-Oct
    Location
    London
    Posts
    46
    thats cool dude... try to get it done as soon as possible....

  10. #10
    Join Date
    2015-Nov
    Location
    Australia
    Posts
    445
    Quote Originally Posted by Thiviyan View Post
    thats cool dude... try to get it done as soon as possible....
    That kernel looks like a mess to me. Half of it consist of CAF commits that don't talk to the other half.
    Not sure we'll ever get mac80211 to work with that. Looking around for a cleaner base now.

  11. #11
    Join Date
    2016-Oct
    Location
    London
    Posts
    46
    Quote Originally Posted by re4son View Post
    That kernel looks like a mess to me. Half of it consist of CAF commits that don't talk to the other half.
    Not sure we'll ever get mac80211 to work with that. Looking around for a cleaner base now.
    i tried the official kernel too and its giving the same errors.

  12. #12
    Join Date
    2020-May
    Posts
    4
    @re4son did you managed to patch the kernel?

  13. #13
    Join Date
    2016-Oct
    Location
    London
    Posts
    46
    Quote Originally Posted by Anoncross View Post
    @re4son did you managed to patch the kernel?
    i have patched the kernel and its compiling but its stuck on fast boot. i think it has to do something with toolchain..

  14. #14
    Join Date
    2020-May
    Posts
    4
    Whice toolchain version did you used?

  15. #15
    Join Date
    2016-Oct
    Location
    London
    Posts
    46
    for those who wanna test this kernel
    Download and use https://github.com/Thiviyan/android_...tag/S133PY-RC1

    @re4son here is the source link and clang included inside and look for the build script in .circleci folder.
    i am not able to enable CONFIG_USB_CONFIGFS_RNDIS its give a lots of errors while compiling..
    and i had to comment out some lines in
    https://github.com/Thiviyan/android_...iaomi_lavender -b Nethuner
    drivers/net/wireless/ath/regd.c
    //for (chan_num = 0;
    // chan_num < wiphy->bands[IEEE80211_BAND_2GHZ]->n_channels;
    //chan_num++) {
    //chan = &wiphy->bands[IEEE80211_BAND_2GHZ]->channels[chan_num];
    //if (chan->flags & IEEE80211_CHAN_NO_20MHZ)
    //chan->flags |= IEEE80211_CHAN_DISABLED;
    //}
    and
    net/mac80211/tx.c
    //case NUM_NL80211_BANDS:
    //WARN_ON(1);
    //break;
    }
    still injection and monitor mode works..

    Please take a look at this

  16. #16
    Join Date
    2020-May
    Posts
    4
    Did you enable hid?

  17. #17
    Join Date
    2016-Oct
    Location
    London
    Posts
    46
    tested everything with Linage OS and almost everything works. except CONFIG_USB_CONFIGFS_RNDIS not activated.

  18. #18
    Join Date
    2016-Oct
    Location
    London
    Posts
    46
    monitor mode on wlan0 works..

  19. #19
    Join Date
    2015-Nov
    Location
    Australia
    Posts
    445
    Wow, awesome stuff
    Let me look into that RNDIS issue.

  20. #20
    Join Date
    2016-Oct
    Location
    London
    Posts
    46
    Quote Originally Posted by re4son View Post
    Wow, awesome stuff
    Let me look into that RNDIS issue.
    any luck with rndis?

  21. #21
    Join Date
    2016-Oct
    Location
    London
    Posts
    46
    I have this issue with some other model of xiaomi too. So it will be awesome if you get it fixed.

  22. #22
    Join Date
    2020-Jun
    Posts
    2
    Hi, i have the same device (lavender), so is the kernel finished oder is it giving errors?

  23. #23
    Join Date
    2020-Jun
    Posts
    2
    Hey i have the samd device, is the kernel finished?

  24. #24
    Join Date
    2016-Oct
    Location
    London
    Posts
    46
    fixed everything and Kernel works better now... will make a pull request sooner for all those 3 kernels i compiled...

  25. #25
    Join Date
    2015-Nov
    Location
    Australia
    Posts
    445
    Wow. You're a legend! Thanks heaps

Similar Threads

  1. Kernel kali nethunter and xiaomi Mi9t
    By Noromec in forum Installing NetHunter
    Replies: 2
    Last Post: 2021-01-30, 18:43
  2. Replies: 0
    Last Post: 2020-11-27, 11:51
  3. Kernel for Xiaomi Redmi note 8 Pro
    By hellebore_noire in forum NetHunter Development
    Replies: 1
    Last Post: 2020-11-04, 10:48
  4. NetHunter Xiaomi Redmi Note 7
    By RyKu17 in forum Installing NetHunter
    Replies: 2
    Last Post: 2020-06-21, 11:59
  5. Building kernel for xiaomi redmi note 3 (kenzo) issue
    By getuwer in forum Building NetHunter
    Replies: 0
    Last Post: 2019-04-15, 14:25

Posting Permissions

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