-
Notifications
You must be signed in to change notification settings - Fork 0
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
Compile CAN kernel module - building fails #1
Comments
For the Ultra96 Board from AVNet (with PYNQ Ultra96 port) there are minor deviations: The config has to be generated via (as referenced here: xilinx kernel build guide):
Now, before preparing the module build, we need to define the extraversion, so the module string matches (as described in the arch wiki):
The string between the third kernel version number and -ARCH is our extraversion, e.g.: Now use modules_prepare like so:
The other steps should be the same. |
In PYNQ version 2.5 this does not work anymore since the kernel tarball got stripped down (last known working PYNQ version is 2.3). One work around is to manually copy the default configs from an older image. The following files are needed:
|
Hello, I followed your instruction for PYNQ-Z2 image V2.7 . Everything work perfectly before
I added manually when I run the make command I receive following errors:
I do appreciate if you can help me to solve this problem and access CAN in my PYNQ-Z2. |
Sorry for the late reply. As of now, I think the way to go is compiling your own SD card image for the PYNQ board incorporating the missing modules. |
I just downloaded an old version of PYNQ image and followed your instruction. It worked. Thank you. |
If we follow the guide in the jupyter notebook (slcan_demo.ipynb) as indicated the build will fail.
I have compiled the modules with the folowing steps:
Start from:
Starting with PYNQ v2.4 the kernel source is shipped as tar.
So from the top directory extract the tar and cd into the directory:
Then invoke the config commands:
The ARCH=arm is not needed since we are compiling on the arm platform.
In menuconfig select the modules as described. BUT: make sure to select them as modules (with M, not Y). This makes sure the modules are compiled as loadable modules and not kernel built-in modules (a built-in module needs to be compiled with the kernel and we don't want to build the whole kernel).
Save and exit. You can check the build flag for the modules in the config:
This should output:
This should read "m" not "y" so that it is built as loadable module.
Now, in order to prepare the headers and configuration files as well as build scripts to build the modules run:
Then build the modules with:
And copy the build modules to the module directory:
The rebuild the module dependency list:
And load the module:
The text was updated successfully, but these errors were encountered: