Jump to content

Compiling RTL8189es driver


phelum
Go to solution Solved by phelum,

Recommended Posts

Hi,

I'm compiling a kernel (using 5.8.16-sunxi) for an H3 board that has the RTL8189es chip onboard.  But the make fails due to a missing include file.

It turns out that the makefile for this driver expects a "src" variable to be loaded with the path for the makefile.  But I can't find any defining reference to this variable or any mention in the make documentation that it is an internal function.

I've managed to fix this by setting src to srctree and the sub-path for this driver.  But this seems very clumsy to me.

Can somebody explain how "src" is meant to be loaded and why it's not happening for me ?

 

Thanks,

Steven

Link to comment
Share on other sites

No for multiple reasons.

- Lacking proper information (console output on building)

- Lacking information where the drivers came from. If 3rd party -> unsupported.

- outdated kernel which are unsupported and for which sources/headers may not be available anymore

 

Link to comment
Share on other sites

Hi Werner,

Is the source to the 5.10 kernel (with sunxi extras) available ? I've looked on github/armbian but couldn't find it.  I'd much rather get the Armbian fork rather than the base version.  With 5.8 for instance it had some nice improvements for my A20 cards.


Thanks,

Steven

Link to comment
Share on other sites

11 minutes ago, phelum said:

Is the source to the 5.10 kernel (with sunxi extras) available ?

 

armbian-config -> software -> source_install ... and it downloads + unpack + add config which was used ... ready to compile. Only deb packing part is not solved yet. 

 

Older kernels sources are only in our offline archives. tl;dr; We recently had some repository crash and after big waste of time solving nothing ... I restarted with minimal repository containing only last packages. Which was successfully build.

Link to comment
Share on other sites

Hi Igor,

My problem is that making a kernel with your kernel (linux-source-current-sunxi_21.05.1_all.deb) is that the make fails when I make the RTL8189es driver.  In the makefile for this driver there is the following line:

 

EXTRA_CFLAGS += -I$(src)/include

The "src" variable should be loaded with the path for the driver but instead it is being loaded with the base path for the kernel.  The incorrect value means that the compiles fail because the driver specific include files aren't found.  The same problem occurs with all the extra Realtek drivers you've added to the standard kernel.

My clumsy solution here is to modify the makefiles to correctly load the "src" variable.  But I'm thinking a better solution will be to make the driver separately after I've built the kernel and then add the driver module to it.

 

Thanks for including these extra drivers in your kernels.  A nice addition.

 

Cheers,

Steven

Link to comment
Share on other sites

  • Solution

My slightly less clumsy solution is to modify the Makefile for each of these RTL drivers so the "src" variable is loaded correctly.

 

The patch line is: export src := $(abspath $(srctree)/$(src))

This line must precede the "EXTRA_CFLAGS += -I$(src)/include" line near the start of each Makefile.

 

Cheers,

Steven

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines