Forum Discussion
Altera_Forum
Honored Contributor
10 years ago --- Quote Start --- I would not roll-back your kernel. That seems like too much effort ;) There are a few changes one can make to get this to work in 14.04LTS Trusty Ubuntu. So far I've had no problems but I do need to test more. Firstly, the aocl install command wont work. You need to go manual navigate to altera/15.0/hld/board/terasic/de5net/linux64/driver Modify the file aclpci_cmd.c removing any of the __ macros before the function declarations. Also comment out lines 442 to 434 if (dev->aer_firmware_first) { return -EIO; } install the headers for your current kernel (apt-get install linux-kernel-headers) change the make_all.sh file so the path points to your new kernel headers directory (something like /usr/src/linux-headers-3.16.0-50-generic) run make_all.sh - this will result in the file aclpci_drv.ko Copy this file to /lib/modules/3.16.0-50-generic/misc (replacing 3.16.0-50-generic with your current kernel) Run modprobe aclpci_drv and then check dmesg for any problems. Job done! So far this works for me in terms of checking for programs that are flashed to the memory. I need to perform more testing which I will --- Quote End --- Hi oni, Thank you so much for you reply! I have followed every step and then run make_all.sh, but I got the following error messages and didn't result in the file ecliptic_drv.ko: Using kernel source files from /usr/src/linux-headers-3.16.0-30-generic make: Entering directory `/usr/src/linux-headers-3.16.0-30-generic' CC [M] /home/storm/altera/15.0/hld/board/de5net_network/linux64/driver/aclpci.o /home/storm/altera/15.0/hld/board/de5net_network/linux64/driver/aclpci.c:61:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘probe’ static int __devinit probe(struct pci_dev *dev, const struct pci_device_id *id); ^ /home/storm/altera/15.0/hld/board/de5net_network/linux64/driver/aclpci.c:62:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘init_chrdev’ static int __devinit init_chrdev (struct aclpci_dev *aclpci); ^ /home/storm/altera/15.0/hld/board/de5net_network/linux64/driver/aclpci.c:63:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘remove’ static void __devexit remove(struct pci_dev *dev); ^ /home/storm/altera/15.0/hld/board/de5net_network/linux64/driver/aclpci.c:65:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘scan_bars’ static int __devinit scan_bars(struct aclpci_dev *aclpci, struct pci_dev *dev); ^ /home/storm/altera/15.0/hld/board/de5net_network/linux64/driver/aclpci.c:66:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘map_bars’ static int __devinit map_bars(struct aclpci_dev *aclpci, struct pci_dev *dev); ^ /home/storm/altera/15.0/hld/board/de5net_network/linux64/driver/aclpci.c:82:12: error: ‘probe’ undeclared here (not in a function) .probe = probe, ^ /home/storm/altera/15.0/hld/board/de5net_network/linux64/driver/aclpci.c:83:13: error: ‘remove’ undeclared here (not in a function) .remove = remove, ^ /home/storm/altera/15.0/hld/board/de5net_network/linux64/driver/aclpci.c:115:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘init_chrdev’ static int __devinit init_chrdev (struct aclpci_dev *aclpci) { ^ /home/storm/altera/15.0/hld/board/de5net_network/linux64/driver/aclpci.c:489:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘probe’ static int __devinit probe(struct pci_dev *dev, const struct pci_device_id *id) { ^ /home/storm/altera/15.0/hld/board/de5net_network/linux64/driver/aclpci.c:571:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘scan_bars’ static int __devinit scan_bars(struct aclpci_dev *aclpci, struct pci_dev *dev) ^ /home/storm/altera/15.0/hld/board/de5net_network/linux64/driver/aclpci.c:592:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘map_bars’ static int __devinit map_bars(struct aclpci_dev *aclpci, struct pci_dev *dev) ^ /home/storm/altera/15.0/hld/board/de5net_network/linux64/driver/aclpci.c:640:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘remove’ static void __devexit remove(struct pci_dev *dev) { ^ /home/storm/altera/15.0/hld/board/de5net_network/linux64/driver/aclpci.c:628:13: warning: ‘free_bars’ defined but not used [-Wunused-function] static void free_bars(struct aclpci_dev *aclpci, struct pci_dev *dev) { ^ /home/storm/altera/15.0/hld/board/de5net_network/linux64/driver/aclpci.c:103:21: warning: ‘aclpci_get_free’ defined but not used [-Wunused-function] static unsigned int aclpci_get_free(void) ^ /home/storm/altera/15.0/hld/board/de5net_network/linux64/driver/aclpci.c:449:24: warning: ‘find_upstream_dev’ defined but not used [-Wunused-function] static struct pci_dev* find_upstream_dev (struct pci_dev *dev) { ^ make[1]: *** [/home/storm/altera/15.0/hld/board/de5net_network/linux64/driver/aclpci.o] Error 1 make: *** [_module_/home/storm/altera/15.0/hld/board/de5net_network/linux64/driver] Error 2 make: Leaving directory `/usr/src/linux-headers-3.16.0-30-generic' I hope I could get your reply and deal with this problem. Thanks, Jiawen