简体   繁体   中英

Make for objtool in Ubuntu 20.04 fails because of missing Build.include file?

I'm trying to build and install the DisplayLink driver on a recently upgraded Ubuntu 20.04 laptop, so that I can make use of a Dell D3100 docking station to drive two external monitors via DisplayPorts. I had previously installed this driver successfully on the same laptop when it was running Ubuntu 18.04, and was able to detect and use the additional monitors (albeit with the occasional black screen).

I've downloaded the latest 5.2.14 driver installer from the download page , but this time when I run as sudo it fails due to some sort of misconfiguration or missing file/build folder, with the following showing up in the make log file:

/usr/src/linux-headers-5.4.0-24-lowlatency/tools/build/Makefile.build:37: /usr/src/linux-headers-5.4.0-24-lowlatency/tools/build/Build.include: No such file or directory

There is indeed no /usr/src/linux-headers-/tools/build/Build.include file, but I'm not sure why, and whether I'm missing a package I need?

Output from running the installer:

bric@home:~/System/DisplayLink$ sudo ./displaylink-driver-5.2.14.run 
Verifying archive integrity...  100%   All good.
Uncompressing DisplayLink Linux Driver 5.2.14  100%  
DisplayLink Linux Software 5.2.14 install script called: install
Distribution discovered: Ubuntu 20.04 LTS
Installing
Configuring EVDI DKMS module
Registering EVDI kernel module with DKMS
Building EVDI kernel module with DKMS
ERROR (code 3): Failed to build evdi/5.2.14. Consult /var/lib/dkms/evdi/5.2.14/build/make.log for details..

Directory shows there is no Build.include:

$ ls -la /usr/src/linux-headers-5.4.0-24-lowlatency/tools/build/
total 40
drwxr-xr-x  4 root root 4096 Apr 18 06:27 .
drwxr-xr-x 33 root root 4096 Apr 18 06:27 ..
drwxr-xr-x  2 root root 4096 Apr 18 06:27 feature
-rw-r--r--  1 root root 1066 Nov 25 11:32 Makefile
-rw-r--r--  1 root root 3998 Nov 25 11:32 Makefile.build
-rw-r--r--  1 root root 8295 Nov 25 11:32 Makefile.feature
-rw-r--r--  1 root root  257 Nov 25 11:32 Makefile.include
drwxr-xr-x  3 root root 4096 Apr 18 06:27 tests

The make.log file is attached below, let me know if anything else is helpful.

Make.log

Any suggestions for what I am missing? Any help would be greatly appreciated!

So it seems that the problem was being caused by invalid directory instructions in the Makefile of the DisplayLink driver, as I eventually found here (though this refers to an rpm release of the driver).

It looks as though when I've upgraded to the 5.4 kernel, this also changed the way that Makefiles are parsed, such that any SUBDIRS= parameters are ignored, leaving the instructions attempting to run make in the linux-headers/tools/build folder instead of the kernel module folder.

As the discussion thread linked above describes, the solution is to replace SUBDIRS=blah with M=blah in the Makefile, in addition to applying another patch to update source files that refer to <linux/reservation.h> to instead refer to the newer <linux/dma-resv.h> .

When I updated the DisplayLink driver 5.2 source with these patches, I was able to successfully build the evdi kernel module and connect my other monitors through the DisplayPorts on the dock. Hopefully this helps anyone else, until the next DisplayLink driver is released!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM