Get Wake-On-Lan to work

  • Hello!
    I am trying to get Wake-On-Lan to work on my setup:
    Dual boot of LibreELEC 7.0.3 and Ubuntu 16.04
    In Ubuntu I am using the standard kernel version 4.4.0 and to get Wake-On-Lan to work I had to recompile a patched version of the alx driver and load it with dkms as shown in this bugreport (comments #40 and #55). Now it is working as a charm (only in Ubuntu though).
    In LibreELEC it is not working out of the box as showed by this command output (there is no Supports Wake-on line)

    What I am asking is if I need to recompile the module also for LibreELEC (and in case which one and how?) or if there is some other way to get WOL to work.
    Thank you a lot in advance for any help!
    Giorgio from Italy

    Edited once, last by LastStarDust (March 6, 2017 at 6:16 PM).

  • I went ahead and I am trying to patch the kernel with this patch: Enable ALX WoL for/since 4.9.
    Here what I have done:

    • I can compile and install the devel version (without my patch) successfully.


    • If I take (from the build folder) the files to be patched, copy them on the Desktop and apply the patch it applies correctly.


    • Then I copied the patch file in the packages/linux/patches folder


    • I gave once again the command
      Code
      PROJECT=Generic ARCH=x86_64 make image


      

    • It compiled correctly but still no WOL support as if the patch wasn't applied during compiling.

    Maybe I am putting the patch in the wrong folder or the patch is in the wrong format ... could you tell?
    Thanks
    [hr]
    Ok I got it to work. I only had to place the patch file in the project/Generic/patches/linux directory. Hope to save someone's hours of time with this hint.
    I know that this project is still young and the forum is not so much frequented, so I imagine this is the reason for the "silence" in this thread ...

    Edited once, last by LastStarDust (March 9, 2017 at 10:43 AM).

    • Then I copied the patch file in the packages/linux/patches folder


    • It compiled correctly but still no WOL support as if the patch wasn't applied during compiling.

    Maybe I am putting the patch in the wrong folder or the patch is in the wrong format ... could you tell?

    The build system is surprisingly pedantic in patch file naming in some cases. For the main kernel patch directory the mask is linux-*.patch


  • The build system is surprisingly pedantic in patch file naming in some cases. For the main kernel patch directory the mask is linux-*.patch

    Thank you for the hint. Infact I was already suspecting that and I renamed the patch file accordingly.
    [hr]
    Here the script that I used to compile (successfully) the system. Maybe it will be useful to someone.

    My rig:
    Motherboard: ASRock FM2A88X-ITX+
    Network chip: Qualcomm Atheros AR8171
    Dual boot: Ubuntu 16.04 - LibreELEC 8.0.0

    Edited once, last by LastStarDust (March 14, 2017 at 5:56 PM).

  • Thanks a lot.

    Work fine more than 2 years after with :

    Qualcomm Atheros AR8161

    LibreElec 9.2.0

    Build on Debian 10.2

    and minor adaptation (new patch for 5.x kernel is here, use 000-enable-alx-wol-4.18.patch as explain above).

    Is it a way to compile only kernel and not the whole image ?