Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building for Linux 5.0 and newer #44

Merged
merged 2 commits into from
Feb 27, 2020

Conversation

X-Ryl669
Copy link

As the title says.

Mainly, there's now a wrapper for simple wait queue interface and access_ok macro that evolved in 4.19 and 5.0 respectively.

@byzantic
Copy link

That would be great, but it doesn't look as though there is anyone at Xilinx who checks this repository; so it doubt it will ever get merged.

Maybe raise a query on the forum?

@lesjokolat
Copy link

I will try it later tonight. Thanks for looking into this.

@lesjokolat
Copy link

Hi ok i tried again. so a few things.

I got this error:

Building modules, stage 2.
/home/xxx/Downloads/dma_ip_drivers-fixLinux5/XDMA/linux-kernel/xdma/Makefile:10: XVC_FLAGS: .
MODPOST 1 modules
CC /home/xxx/Downloads/dma_ip_drivers-fixLinux5/XDMA/linux-kernel/xdma/xdma.mod.o
LD [M] /home/xxx/Downloads/dma_ip_drivers-fixLinux5/XDMA/linux-kernel/xdma/xdma.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.3.0-26-generic'
make -C /lib/modules/5.3.0-26-generic/build M=/home/xxx/Downloads/dma_ip_drivers-fixLinux5/XDMA/linux-kernel/xdma modules_install
make[1]: Entering directory '/usr/src/linux-headers-5.3.0-26-generic'
INSTALL /home/xxx/Downloads/dma_ip_drivers-fixLinux5/XDMA/linux-kernel/xdma/xdma.ko
At main.c:160:

  • SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:72
  • SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:79
    sign-file: certs/signing_key.pem: No such file or directory
    DEPMOD 5.3.0-26-generic
    Warning: modules_install: missing 'System.map' file. Skipping depmod.
    make[1]: Leaving directory '/usr/src/linux-headers-5.3.0-26-generic'

I fixed it with this tip below.
SSL error when compile xdma #39

I then tried to reinstall.

Makefile:10: XVC_FLAGS: .
make -C /lib/modules/5.3.0-26-generic/build M=/home/xxx/Downloads/dma_ip_drivers-fixLinux5/XDMA/linux-kernel/xdma modules
make[1]: Entering directory '/usr/src/linux-headers-5.3.0-26-generic'
/home/pablo/Downloads/dma_ip_drivers-fixLinux5/XDMA/linux-kernel/xdma/Makefile:10: XVC_FLAGS: .
Building modules, stage 2.
/home/xxx/Downloads/dma_ip_drivers-fixLinux5/XDMA/linux-kernel/xdma/Makefile:10: XVC_FLAGS: .
MODPOST 1 modules
make[1]: Leaving directory '/usr/src/linux-headers-5.3.0-26-generic'
make -C /lib/modules/5.3.0-26-generic/build M=/home/xxx/Downloads/dma_ip_drivers-fixLinux5/XDMA/linux-kernel/xdma modules_install
make[1]: Entering directory '/usr/src/linux-headers-5.3.0-26-generic'
INSTALL /home/xxx/Downloads/dma_ip_drivers-fixLinux5/XDMA/linux-kernel/xdma/xdma.ko
DEPMOD 5.3.0-26-generic
Warning: modules_install: missing 'System.map' file. Skipping depmod.
make[1]: Leaving directory '/usr/src/linux-headers-5.3.0-26-generic'

@X-Ryl669
Copy link
Author

IMHO, this is unrelated to this PR since any module building requires this if you have kernel signing required (not just Xilinx's driver, I mean).

@byzantic
Copy link

Yes, I agree, Kernel signing is a whole other world of pain ..

The fixes themselves compiled fine on Ubuntu 18.04, with kernel 5.3.0-26-generic, then I did a manual sign and install rather than make install.

Just going to see whether @lesjokolat 's tip of using #39 will help - thanks for the tip!

@lesjokolat
Copy link

The SSL signing I agree is a universal problem. I think the system map one might be fixed by making it not fail but warn users and allow a continuation of make.

See comment here.

https://gitlab.freedesktop.org/tomeu/linux/commit/f0b0d88a825149ef3b06656886bc211c71dcb852

I assume the script being tweaked to warn vs error would solve teh problem I had after SSL signing.

regards

@byzantic
Copy link

I also found this stackexchange issue useful ..

@lesjokolat
Copy link

Thanks for link. I tried various versions of trying to install just cant get it to bypass the "system.map" error.

@lesjokolat
Copy link

Good news I think I found a bug in the make file for this.
https://github.com/Xilinx/dma_ip_drivers/blob/master/XDMA/linux-kernel/xdma/Makefile

change this:
all :
$(MAKE) -C $(BUILDSYSTEM_DIR) M=$(PWD) modules

clean:
$(MAKE) -C $(BUILDSYSTEM_DIR) M=$(PWD) clean

install: all
$(MAKE) -C $(BUILDSYSTEM_DIR) M=$(PWD) modules_install

endif

To:
all :
$(MAKE) -C $(BUILDSYSTEM_DIR) M=$(PWD) modules

install: all
$(MAKE) -C $(BUILDSYSTEM_DIR) M=$(PWD) modules_install
depmod -a
clean:
$(MAKE) -C $(BUILDSYSTEM_DIR) M=$(PWD) clean

endif

I think it was just a case of clean trying to happen before install functions were allowed. Now no erorrs and I have a 5.0.x kernel running the 2019 XDMA driver! If someone can fix the git should make other versions work too.

@hmaarrfk
Copy link

Has anybody cross posted this issue on their forum? They really don't care about monitoring this (or someone in upper management told them they couldn't use github for communicating with users)

@hmaarrfk
Copy link

And they are often helpful if prompted, albeit on a "month" timeline kind of thing.

@lesjokolat
Copy link

Yes i did

https://forums.xilinx.com/t5/PCIe-and-CPM/XDMA-and-kernel-5-x-build/m-p/1065810

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants