displaylink driver build error

I am going to build a driver to use displaylink in tegra tx2.
I tried native compile on tx2 ubuntu.

I have worked with the following links.
https://kubosj.wordpress.com/2017/09/22/displaylink-drivers-on-ubuntu-17-10/

I did not need to modify the code, so I skipped step 4 ~ 8.

In step 9, build error accurred.
“9. Install driver using ./displaylink-driver-1.3.54/displaylink-installer.sh install”

displaylink-driver-1.3.54# ./displaylink-installer.sh install
DisplayLink Linux Software 1.3.54 install script called: install
Distribution discovered: Ubuntu 16.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/1.3.54. Consult /var/lib/dkms/evdi/1.3.54/build/make.log for details..

/var/lib/dkms/evdi/1.3.54/build/make.log

DKMS make.log for evdi-1.3.54 for kernel 4.4.38-tegra (aarch64)
Wed Sep 27 01:50:52 UTC 2017
make KBUILD_VERBOSE=1 SUBDIRS=/var/lib/dkms/evdi/1.3.54/build SRCROOT=/var/lib/dkms/evdi/1.3.54/build CONFIG_MODULE_SIG= -C /lib/modules/4.4.38-tegra/build modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.38-tegra'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (                \
echo >&2;                                                       \
echo >&2 "  ERROR: Kernel configuration is invalid.";           \
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";      \
echo >&2 ;                                                      \
/bin/false)

I have verified that there is an autoconf.h and auto.conf files.

root@tegra-ubuntu:/usr/src/linux-headers-4.4.38-tegra# test -e include/generated/autoconf.h -a -e include/config/auto.conf
root@tegra-ubuntu:/usr/src/linux-headers-4.4.38-tegra# echo $?
0
root@tegra-ubuntu:/usr/src/linux-headers-4.4.38-tegra# ll include/generated/autoconf.h 
-rw-r--r-- 1 root root 46976 Sep 27 00:26 include/generated/autoconf.h
root@tegra-ubuntu:/usr/src/linux-headers-4.4.38-tegra# ll include/config/auto.conf
-rw-r--r-- 1 root root 34510 Sep 27 00:26 include/config/auto.conf

The log says

Run 'make oldconfig && make prepare' on kernel src to fix it."

[b] I wonder where I should run it.

And, I wonder if there is another way to build the driver.[/b]

Please give me the solution!!
Thanks

Hi ludishur,

What is this driver used for?

displaylink homepage

They say

"
What is DisplayLink?

DisplayLink is a company with a unique graphics transport technology, which means expanding your visual workspace has never been easier or more affordable. Our technology makes it really easy to connect any display to any computer with USB or WiFi. It also provides a universal docking solution to any platform, enabling multiple displays, audio, Ethernet and other USB peripherals to be connected to PCs, Macs and tablets through the USB-A, USB-C port or wireless.
"

I want to send the screen through usb.

In fact, tegra uses different driver with x86 PC. Tegra has it own display controller (tegradc) for display probing, so this displaylink driver may have some problems…

OK, Thank you for your quick reply.
I understand that there seems to be a structural problem with display behavior.
But, I want to check if it works as expected.

Please give me some information about the build problem.

Again, thank you very much.

I get the same error on my pc, but it still builds without problems.

make KBUILD_VERBOSE=1 SUBDIRS=/var/lib/dkms/evdi/1.3.54/build SRCROOT=/var/lib/dkms/evdi/1.3.54/build CONFIG_MODULE_SIG= -C /lib/modules/4.10.0-35-generic/build modules
make[1]: Entering directory '/usr/src/linux-headers-4.10.0-35-generic'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (                \
echo >&2;                                                       \
echo >&2 "  ERROR: Kernel configuration is invalid.";           \
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";      \
echo >&2 ;                                                      \
/bin/false)

I think “autoconf.h and auto.conf” is not a point.

Looking at the rest of the build logs in native compile on tx2 ubuntu, I see the following message:

gcc -Wp,-MD,/var/lib/dkms/evdi/1.3.54/build/.evdi_modeset.o.d  -nostdinc -isystem /usr/lib/gcc/aarch64-linux-gnu/5/include -I./arch/arm64/include -Iarch/arm64/include/generated/uapi -Iarch/arm64/include/generated  -Iinclude -I./arch/arm64/include/uapi -Iarch/arm64/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Iarch/arm/mach-tegra/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -mgeneral-regs-only -DCONFIG_AS_LSE=1 -fno-pic -mpc-relative-literal-loads -fno-delete-null-pointer-checks -Wno-maybe-uninitialized -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fno-stack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -g -I./../t18x/include -I./../nvhost/include -I./../display/include -I./../nvmap/include -I./../nvgpu/include -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -DCC_HAVE_ASM_GOTO -Iinclude/drm  -DMODULE -mcmodel=large  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(evdi_modeset)"  -D"KBUILD_MODNAME=KBUILD_STR(evdi)" -c -o /var/lib/dkms/evdi/1.3.54/build/evdi_modeset.o /var/lib/dkms/evdi/1.3.54/build/evdi_modeset.c
/var/lib/dkms/evdi/1.3.54/build/evdi_modeset.c: In function ‘evdi_sched_page_flip’:
/var/lib/dkms/evdi/1.3.54/build/evdi_modeset.c:154:3: error: implicit declaration of function ‘drm_send_vblank_event’ [-Werror=implicit-function-declaration]
   drm_send_vblank_event(dev, 0, event);
   ^
/var/lib/dkms/evdi/1.3.54/build/evdi_modeset.c: At top level:
/var/lib/dkms/evdi/1.3.54/build/evdi_modeset.c:376:15: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
  .fb_create = evdi_fb_user_fb_create,
               ^
/var/lib/dkms/evdi/1.3.54/build/evdi_modeset.c:376:15: note: (near initialization for ‘evdi_mode_funcs.fb_create’)
/var/lib/dkms/evdi/1.3.54/build/evdi_modeset.c: In function ‘evdi_modeset_init’:
/var/lib/dkms/evdi/1.3.54/build/evdi_modeset.c:407:2: error: implicit declaration of function ‘drm_dev_set_unique’ [-Werror=implicit-function-declaration]
  drm_dev_set_unique(dev, "%s", dev_name(dev->dev));
  ^
cc1: some warnings being treated as errors

And pc build log message in the same file, there is no error.

gcc -Wp,-MD,/var/lib/dkms/evdi/1.3.54/build/.evdi_modeset.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/6/include  -I./arch/x86/include -I./arch/x86/include/generated/uapi -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -Iubuntu/include  -D__KERNEL__ -fno-pie -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -fno-pie -no-pie -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Wno-frame-address -O2 --param=allow-store-data-races=0 -DCC_HAVE_ASM_GOTO -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Iinclude/drm  -DMODULE  -DKBUILD_BASENAME='"evdi_modeset"'  -DKBUILD_MODNAME='"evdi"' -c -o /var/lib/dkms/evdi/1.3.54/build/evdi_modeset.o /var/lib/dkms/evdi/1.3.54/build/evdi_modeset.c

It seems that the “drm_dev_set_unique” and “drm_dev_set_unique” functions of the kernel code have been modified.

I will check that…
If you have any information or guide, please let me know.

Thank you.

Is it still an issue -to get DisplayLink driver at jetson tx2?

I cannot guarantee… Maybe you could try to build it and see if it’s compatible.
It seems they have 16.04+k4.4 supported.

http://www.displaylink.com/downloads/file?id=1261