You are not logged in.
Pages: 1
Hi,
I have some problems with Devuan on my Raspberry Pi (1 B)
and i assume that the broadcom driver /boot/bcm2708-rpi-b.dtb is not loaded correctly.
How can i check and maybe edit the boot command to make sure it is included?
The reason why i think it has to do with /boot/bcm2708-rpi-b.dtb, is because i tried to build https://github.com/pimylifeup/fm_transmitter
and it failed with this error: transmitter.cpp:36:10: fatal error: bcm_host.h: No such file or directory
and also the driverers from Adafruit_DHT (for DHT22 humidity sensor)
fail with this: RuntimeError: Error accessing GPIO.
maybe i have to edit /boot/cmdline.txt , but how to include that bcm file?
Last edited by alphalpha (2020-11-08 22:44:36)
Offline
How can i check
Try
cat /proc/cmdline
Disclaimer: I don't use Devuan on a Raspberry Pi.
Brianna Ghey — Rest In Power
Offline
Hi,
I have some problems with Devuan on my Raspberry Pi (1 B)
and i assume that the broadcom driver /boot/bcm2708-rpi-b.dtb is not loaded correctly.
How can i check and maybe edit the boot command to make sure it is included?
hello alphalpha,
The references to cpu -> Soc:
BCM2708( armv6+fp cpu ) - > BCM2835( Soc, including Ram, etc )
BCM2709( armv7-a cpu ) - > BCM2836( Soc, including Ram, etc )
BCM2710( armv8-a+simd+crypto+crc cpu ) - > BCM2837( Soc, including Ram, etc )
You have rpi1B( v1.0 or v1.1? ) - > BCM2835
v1.0 - 256MB Ram
v1.1 - 512MB Ram
I assume no more differences between both..
The DTS file for rpi1 is 'bcm2835-rpi-b.dtb'
To edit the bootargs..
I usually use uboot + a boot script for headless systems..
You can check the content of the boot script I use, here
So, in that case, 'setenv bootargs earlyprintk=serial,ttyAMA0,115200n8 console=ttyAMA0,115200n8 console=tty0 root=/dev/mmcblk0p2 rw rootfstype=ext4 elevator=noop fsck.repair=yes rootwait smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 selinux=0 noinitrd'
to change it, you need to create a new boot script..
and after compile it to binary..its explained in that post
The reason why i think it has to do with /boot/bcm2708-rpi-b.dtb, is because i tried to build https://github.com/pimylifeup/fm_transmitter
and it failed with this error: transmitter.cpp:36:10: fatal error: bcm_host.h: No such file or directory
that has to do with the fact that the header file 'bcm_host.h' was not found( it could be present but the compilation process doesn't find it.. )
For what I see you will need 'bcm_host.h', because it is requested in 'transmitter.cpp:36'
36: #include <bcm_host.h>
this files are supossed to be copied to '/usr/include/'
I don't know were to find them, they are not Devuan related, but instead RaspberryPi related..
Maybe @C0rnelious can give you a hand on this?
and also the driverers from Adafruit_DHT (for DHT22 humidity sensor)
fail with this: RuntimeError: Error accessing GPIO.maybe i have to edit /boot/cmdline.txt , but how to include that bcm file?
the 'bcm_host.h', and maybe others are not available in Devuan( at least that I am aware of it.. ), they are RaspBerryPI Development Related..
I don't think you will manage to solve the problem via bootargs..
For the Humidity sensors, maybe you need a kernel module for them,
In the image available here, you only have a kernel module for 'DHT11'( maybe the kernel driver is the same?? ):
CONFIG_DHT11=m
It's a 5.4.37 mainline kernel..
EDIT: For what I saw here:
https://duckduckgo.com/?t=ffnt&q=bcm_host.h&ia=web
you will need the 'libraspberrypi-dev' package, which contains 'bcm_host.h' and others , probably needed too..
Last edited by tuxd3v (2020-11-07 21:01:03)
Best Regards,
tux
Offline
Thanks a lot for your answer tux !!
it looks like libraspberrypi-dev is not in the devuan repo
i will try get it from raspbian
Offline
i installed raspbian on another sd-card and did
sudo apt download libraspberrypi-dev
and got libraspberrypi-dev_1.20200819-1_armhf.deb
now when i try to install this on the devuan sd-card with
sudo dpkg -i libraspberrypi-dev_1.20200819-1_armhf.deb
it fails because dpkg: error processing archive libraspberrypi-dev_1.20200819-1_armhf.deb (--install):
package architecture (armhf) does not match system (armel)
which i find very strange, it was the same hardware, why has raspbian another architecture
also while i was on raspbian i tried the dht22 humidity sensor and it worked no problem
i debugged it with print statements and found out that it was detecting that im on a pi 3 instead of pi 1, so i had to install it from git with the --force-pi option intead of installing it with pip
so at least that is working now
Offline
i installed raspbian on another sd-card and did
sudo apt download libraspberrypi-dev
and got libraspberrypi-dev_1.20200819-1_armhf.deb
now when i try to install this on the devuan sd-card withsudo dpkg -i libraspberrypi-dev_1.20200819-1_armhf.deb
it fails because dpkg: error processing archive libraspberrypi-dev_1.20200819-1_armhf.deb (--install):
package architecture (armhf) does not match system (armel)
which i find very strange, it was the same hardware, why has raspbian another architecturealso while i was on raspbian i tried the dht22 humidity sensor and it worked no problem
i debugged it with print statements and found out that it was detecting that im on a pi 3 instead of pi 1, so i had to install it from git with the --force-pi option intead of installing it with pip
so at least that is working now
hello, you welcome,
in relation to the error that apears to you..
Its for historical reazons.. devuan/debian supports armv5T and armv6, for armel...
So armel doesn't have hardfloat support..
But the packages built for Raspberry PI 1B, have hardfloat support in the cpu( the cpu is the arm1176jzf-s, found in the first iphone too.. and it has hardfloat support, if memory doesn't fail me, vfpv2 ).
So long story short,
You need to install them with a "--force" flag, I believe --force-architecture
You got libraspberrypi-dev, but it has at least one dependency:
do the following:
apt-cache depends libraspberrypi-dev
Get the dependencies for it, and then install them with the "--force" flag above.
For the Humidity/Temperature sensor, do a 'lsmod',
and check which kernel module is loaded, it would be nice for us to know
Last edited by tuxd3v (2020-11-08 21:06:32)
Best Regards,
tux
Offline
For the Humidity/Temperature sensor, do a 'lsmod',
and check which kernel module is loaded, it would be nice for us to know
i dont see any related kernel module, it is not dht11
sudo lsmod 22:09
Module Size Used by
w1_therm 6775 0
nfnetlink 7093 0
bnep 11917 2
bluetooth 366232 7 bnep
ecdh_generic 18216 1 bluetooth
rfkill 21483 2 bluetooth
ipv6 401666 0
snd_bcm2835 22908 0
snd_pcm 89576 1 snd_bcm2835
snd_timer 22354 1 snd_pcm
snd 60288 3 snd_timer,snd_bcm2835,snd_pcm
w1_gpio 4534 0
wire 31321 2 w1_gpio,w1_therm
cn 5655 1 wire
hwmon 10460 1 wire
uio_pdrv_genirq 3686 0
uio 10016 1 uio_pdrv_genirq
fixed 3001 0
maybe it is w1_gpio, but im not sure since i have another temperature sensor for which i loaded this
Offline
hello,
yeah it shouldn't be that, I believe that is for 1wire protocol( DS18B20 and such.. )..
The DHT22, and the DHT11 I believe both use the same protocol
so maybe you can use it with that driver( dht11 )..
Of-course you can always go via gpio are request information on the data pin, without any driver( probably what you have )..
Some sort of BitBanging the protocol via software..
its a 1 Wire protocol, it just isn't the "1Wire protocol" we know from Dallas..its different..
Does you succeed getting the 2 packages from raspbian?
Best Regards,
tux
Offline
not really, they are installed but unconfigured
libraspberrypi-dev was depended on libraspberrypi0 and that depended on raspberrypi-bootloader
and i didnt want to install that bootloader
however i have now that /opt/vc/lib/libbcm_host.so file
but now i get more errors from make
make 23:18
g++ -L/opt/vc/lib -lm -lpthread -lbcm_host -o fm_transmitter main.o mailbox.o sample.o wave_reader.o transmitter.o
/usr/bin/ld: warning: libvchiq_arm.so, needed by /opt/vc/lib/libbcm_host.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libvcos.so, needed by /opt/vc/lib/libbcm_host.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vcos_log_impl'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vchi_msg_queuev'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vcos_generic_mem_calloc'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vcos_init'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vchi_service_use'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vcos_pthreads_map_errno'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vchi_bulk_queue_transmit'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vchi_service_open'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vchi_msg_dequeue'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vcos_once'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vchi_service_close'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vchiq_initialise'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vchi_msg_queue'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vchiq_queue_message'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vcos_log_register'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vcos_thread_join'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vcos_log_get_default_category'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vchi_connect'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vchi_service_release'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vcos_thread_create'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vchiq_connect'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vchi_create_connection'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vcos_generic_mem_free'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vcos_thread_attr_init'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vcos_generic_mem_alloc_aligned'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vchi_initialise'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vchi_bulk_queue_receive'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `single_get_func_table'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vchiq_release_message'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vchi_mphi_message_driver_func_table'
/usr/bin/ld: /opt/vc/lib/libbcm_host.so: undefined reference to `vchiq_open_service'
i tried to copy the /opt/vc/lib folder from https://github.com/raspberrypi/firmware … opt/vc/lib but that didn't do the trick
now i compiled the fm_transmitter on raspbian and copied it over to devuan but i can't run it
the file is there and is executable but
./fm_transmitter
returns 'no such file or directory: ./fm_transmitter'
Offline
not really, they are installed but unconfigured
libraspberrypi-dev was depended on libraspberrypi0 and that depended on raspberrypi-bootloader
and i didnt want to install that bootloaderbut now i get more errors from make
make 23:18 g++ -L/opt/vc/lib -lm -lpthread -lbcm_host -o fm_transmitter main.o mailbox.o sample.o wave_reader.o transmitter.o /usr/bin/ld: warning: libvchiq_arm.so, needed by /opt/vc/lib/libbcm_host.so, not found (try using -rpath or -rpath-link) /usr/bin/ld: warning: libvcos.so, needed by /opt/vc/lib/libbcm_host.so, not found (try using -rpath or -rpath-link)
i tried to copy the /opt/vc/lib folder from https://github.com/raspberrypi/firmware … opt/vc/lib but that didn't do the trick
hello,
yeah it needed libraspberrypi-dev,libraspberrypi0..
and that depended on raspberrypi-bootloader
well.. that could be a problem..
You need to make the Dynamic Linker aware of 'libbcm_host.so':
echo "/opt/vc/lib" >> /etc/ld.so.conf
ldconfig -vv
try to find all dependencies of 'libbcm_host.so':
ldd /opt/vc/lib/libbcm_host.so
see what is missing..
and then find what packages this files are in..
apt-get install apt-file
apt-file update
For what I saw above you have already 2 unresolved dependencies( 'libvchiq_arm.so', 'libvcos.so' )..
apt-file search libvchiq_arm.so
apt-file search libvcos.so
See the packages were those file are.. and try to install them, if you find its safe..
now i compiled the fm_transmitter on raspbian and copied it over to devuan but i can't run it
the file is there and is executable but./fm_transmitter
returns 'no such file or directory: ./fm_transmitter'
that is another situation..
Once you get the binary compiled and running in raspbian..
You will need to copy him, and all the dependencies that are not in devuan...
I mean all those shared libraries '*.so' to devuan
and then update devuan dynamic linker so that he knows how to link your 'fm_transmitter' to those libraries( when you execute the binary )..
echo "/opt/vc/lib" >> /etc/ld.so.conf
echo "/other/path/to/so/dependency" >> /etc/ld.so.conf
ldconfig -vv
after that, you can test the binary dynamic resolution with:
ldd ./fm_transmitter
and see if all references to shared objects are all recognized..
if they are, the binary should execute
what says the command bellow?
file ./fm_transmitter
Last edited by tuxd3v (2020-11-09 02:02:25)
Best Regards,
tux
Offline
Yes, it is working
turned out that copying that /opt/vc/lib folder from https://github.com/raspberrypi/firmware … opt/vc/lib was a really bad idea
'apt install --fix-broken' would always complain about the 2 armhf packages and fail removing them and sudo ldconfig would always throw a segmentation fault
luckily a made a backup before i did this
i uninstalled the armhf files from raspbian and then did this
git clone https://github.com/raspberrypi/userland.git
cd userland
sudo ./buildme
that gave me /opt/vc/lib/libbcm_host.so and all the other needed files
sudo echo "/opt/vc/lib" >> /etc/ld.so.conf
sudo ldconfig -vv
as tuxd3v mentioned
and finally
git clone https://github.com/markondej/fm_transmitter.git
cd fm_transmitter
make
thanks
Last edited by alphalpha (2020-11-09 17:44:46)
Offline
Yes, it is working
hello alphalpha,you welcome!
Glad you succeed, kudos for you!
EDIT: I saw your image for x86,
And it seems nice!
Could we see that graphical environment, and great work from you in the SBC world?
thanks
Last edited by tuxd3v (2020-11-09 23:59:14)
Best Regards,
tux
Offline
[EDIT: I saw your image for x86,
And it seems nice!
Could we see that graphical environment, and great work from you in the SBC world?
Thanks,
that raspberry pi is running headless, i connect only via ssh and tmux, so there is no point for me to have a graphical environment installed
and now that everything is set up and deployed, i wont touch it in the near future
thanks again, i would not have been able to do this without your help
Offline
Pages: 1