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

modprobe pru_speak fails #9

Open
Huyston opened this issue Jun 23, 2017 · 1 comment
Open

modprobe pru_speak fails #9

Huyston opened this issue Jun 23, 2017 · 1 comment

Comments

@Huyston
Copy link

Huyston commented Jun 23, 2017

I'm running the latest debian image on the beaglebone black. Following the procedure in the README fails with:
modprobe: FATAL: Module pru_speak not found.

This happens, firstly because plat/mailbox.h isn't found. It is in config/mailbox.h.
Changing that, the compilation proceeds but with some errors and the module fails to compile.

Errors are below.

if [ ! -d "/lib/modules/4.4.54-ti-r93/build" ]; then apt-get install linux-headers-4.4.54-ti-r93; fi
make -C /lib/modules/4.4.54-ti-r93/build M=/opt/cloud9/pruspeak/src/driver modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.54-ti-r93'
  CC [M]  /opt/cloud9/pruspeak/src/driver/pru_speak.o
/opt/cloud9/pruspeak/src/driver/pru_speak.c:109:7: error: conflicting types for ‘rproc_da_to_va’
 void *rproc_da_to_va(struct rproc *rproc, u64 da, int len);
       ^
In file included from /opt/cloud9/pruspeak/src/driver/pru_speak.c:15:0:
include/linux/remoteproc.h:547:7: note: previous declaration of ‘rproc_da_to_va’ was here
 void *rproc_da_to_va(struct rproc *rproc, u64 da, int len, u32 flags);
       ^
/opt/cloud9/pruspeak/src/driver/pru_speak.c:208:0: warning: "BIN_ATTR" redefined
 #define BIN_ATTR(_name,_mode,_size,_read,_write,_mmap) { \
 ^
In file included from include/linux/kobject.h:21:0,
                 from include/linux/module.h:17,
                 from /opt/cloud9/pruspeak/src/driver/pru_speak.c:12:
include/linux/sysfs.h:199:0: note: this is the location of the previous definition
 #define BIN_ATTR(_name, _mode, _read, _write, _size)   \
 ^
/opt/cloud9/pruspeak/src/driver/pru_speak.c:1275:2: error: unknown field ‘alloc_vring’ specified in initializer
  .alloc_vring = pruproc_alloc_vring,
  ^
/opt/cloud9/pruspeak/src/driver/pru_speak.c:1275:2: warning: initialization from incompatible pointer type
/opt/cloud9/pruspeak/src/driver/pru_speak.c:1275:2: warning: (near initialization for ‘pruproc_ops.da_to_va’)
/opt/cloud9/pruspeak/src/driver/pru_speak.c:1276:2: error: unknown field ‘free_vring’ specified in initializer
  .free_vring = pruproc_free_vring,
  ^
/opt/cloud9/pruspeak/src/driver/pru_speak.c:1276:2: warning: initialization from incompatible pointer type
/opt/cloud9/pruspeak/src/driver/pru_speak.c:1276:2: warning: (near initialization for ‘pruproc_ops.handle_custom_rsc’)
/opt/cloud9/pruspeak/src/driver/pru_speak.c: In function ‘pruproc_probe’:
/opt/cloud9/pruspeak/src/driver/pru_speak.c:3221:3: error: implicit declaration of function ‘devm_request_irq’ [-Werror=implicit-function-declaration]
   err = devm_request_irq(dev, irq, pru_handler, 0,
   ^
cc1: some warnings being treated as errors
scripts/Makefile.build:264: recipe for target '/opt/cloud9/pruspeak/src/driver/pru_speak.o' failed
make[2]: *** [/opt/cloud9/pruspeak/src/driver/pru_speak.o] Error 1
Makefile:1404: recipe for target '_module_/opt/cloud9/pruspeak/src/driver' failed
make[1]: *** [_module_/opt/cloud9/pruspeak/src/driver] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.4.54-ti-r93'
Makefile:5: recipe for target 'all' failed
make: *** [all] Error 2
make -C /lib/modules/4.4.54-ti-r93/build M=/opt/cloud9/pruspeak/src/driver modules_install
make[1]: Entering directory '/usr/src/linux-headers-4.4.54-ti-r93'
  DEPMOD  4.4.54-ti-r93
make[1]: Leaving directory '/usr/src/linux-headers-4.4.54-ti-r93'
make: Nothing to be done for 'all'.
install -m 444 pru0_firmware /lib/firmware
install -m 444 pru1_firmware /lib/firmware
dtc -O dtb -o BB-PRUSPEAK-00A0.dtbo -b 0 -@ BB-PRUSPEAK-00A0.dts 
BB-PRUSPEAK-00A0.dtbo: Warning (unit_address_vs_reg): Node /fragment@0 has a unit name, but no reg property
BB-PRUSPEAK-00A0.dtbo: Warning (unit_address_vs_reg): Node /fragment@2 has a unit name, but no reg property
BB-PRUSPEAK-00A0.dtbo: Warning (unit_address_vs_reg): Node /fragment@2/__overlay__/prurproc has a reg or ranges property, but no unit name
install -m 644 BB-PRUSPEAK-00A0.dtbo /lib/firmware
python setup.py build
running build
running build_py
python setup.py build
running build
running build_py
python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to pru_speak.egg-info/requires.txt
writing pru_speak.egg-info/PKG-INFO
writing top-level names to pru_speak.egg-info/top_level.txt
writing dependency_links to pru_speak.egg-info/dependency_links.txt
reading manifest file 'pru_speak.egg-info/SOURCES.txt'
writing manifest file 'pru_speak.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv7l/egg
running install_lib
running build_py
creating build/bdist.linux-armv7l/egg
creating build/bdist.linux-armv7l/egg/pru_speak
copying build/lib.linux-armv7l-2.7/pru_speak/__init__.py -> build/bdist.linux-armv7l/egg/pru_speak
copying build/lib.linux-armv7l-2.7/pru_speak/pruspeak.py -> build/bdist.linux-armv7l/egg/pru_speak
copying build/lib.linux-armv7l-2.7/pru_speak/node.py -> build/bdist.linux-armv7l/egg/pru_speak
copying build/lib.linux-armv7l-2.7/pru_speak/bs_lex.py -> build/bdist.linux-armv7l/egg/pru_speak
copying build/lib.linux-armv7l-2.7/pru_speak/bs_parse.py -> build/bdist.linux-armv7l/egg/pru_speak
copying build/lib.linux-armv7l-2.7/pru_speak/kernel_lib.py -> build/bdist.linux-armv7l/egg/pru_speak
byte-compiling build/bdist.linux-armv7l/egg/pru_speak/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-armv7l/egg/pru_speak/pruspeak.py to pruspeak.pyc
byte-compiling build/bdist.linux-armv7l/egg/pru_speak/node.py to node.pyc
byte-compiling build/bdist.linux-armv7l/egg/pru_speak/bs_lex.py to bs_lex.pyc
byte-compiling build/bdist.linux-armv7l/egg/pru_speak/bs_parse.py to bs_parse.pyc
byte-compiling build/bdist.linux-armv7l/egg/pru_speak/kernel_lib.py to kernel_lib.pyc
creating build/bdist.linux-armv7l/egg/EGG-INFO
copying pru_speak.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG-INFO
copying pru_speak.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying pru_speak.egg-info/dependency_links.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying pru_speak.egg-info/requires.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying pru_speak.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/pru_speak-0.0-py2.7.egg' and adding 'build/bdist.linux-armv7l/egg' to it
removing 'build/bdist.linux-armv7l/egg' (and everything under it)
Processing pru_speak-0.0-py2.7.egg
Removing /usr/local/lib/python2.7/dist-packages/pru_speak-0.0-py2.7.egg
Copying pru_speak-0.0-py2.7.egg to /usr/local/lib/python2.7/dist-packages
pru-speak 0.0 is already the active version in easy-install.pth

Installed /usr/local/lib/python2.7/dist-packages/pru_speak-0.0-py2.7.egg
Processing dependencies for pru-speak==0.0
Searching for ply==3.4
Best match: ply 3.4
ply 3.4 is already the active version in easy-install.pth

Using /usr/lib/python2.7/dist-packages
Finished processing dependencies for pru-speak==0.0
install -m 755 bs_tcp_server.py /usr/bin
install -m 755 bs_shell.py /usr/bin```

Any idea on how to fix this? Thanks.
@deepakkarki
Copy link
Owner

Hey @Huyston

The last I tested it was a couple of years ago - since then haven't been able to dedicate time towards the project. So I'm afraid I can't be of any help. You should probably look for other libraries that give you easy access to the PRUs.
Just ask around the IRC channels, I sure someone can point you to an actively maintained code base.

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

No branches or pull requests

2 participants