vcgencmd on Gentoo


5 posts
by smartpatrol » Wed Oct 24, 2012 3:02 pm
Anyone get vcgencmd to function on Gentoo? i downloaded the binaries from github specifically the /opt directory when executed is complain of file not found which i am assuming has to do with perhaps the libraries or other dependencies being in the path. Just wanted to check if anyone else has gotten this working before i make an attempt.
Posts: 23
Joined: Thu Oct 18, 2012 2:28 am
by jjackowski » Sun Jan 20, 2013 5:02 am
I wasn't getting this before, but now I am. I just put on the 3.6.11 kernel. After seeing that vcgencmd no longer worked, I copied over what I got from the git repository. Since then, I'm getting the same error:
Code: Select all
rpi0 ~ # /opt/vc/bin/vcgencmd
-su: /opt/vc/bin/vcgencmd: No such file or directory
rpi0 ~ # ls -l /opt/vc/bin/vcgencmd
-rwxr-xr-x 1 root root 15011 Jan 18 23:17 /opt/vc/bin/vcgencmd
Somehow, the raspberrypi-userland install from portage avoids the error and a copy doesn't work. That install doesn't yet have the new stuff to work with the 3.6.11 kernel.

How come ls can find the file if it isn't there? Is the reported error a bug with bad information? If not, wouldn't that make this a filesystem bug?

Any clues? Thanks for any help!
Jeff
Posts: 41
Joined: Thu Jan 10, 2013 5:25 am
by lude » Tue Jan 22, 2013 7:54 pm
The ebuild actually has git code factored into it. If you just:

Code: Select all
echo 'PORTDIR_OVERLAY="/usr/local/portage"' >> /etc/make.conf
mkdir -p /usr/local/portage/media-libs
cp -r /usr/portage/media-libs/raspberrypi-userland /usr/local/portage/media-libs
cd /usr/local/portage/media-libs/raspberrypi-userland
cp raspberrypi-userland-0_pre20121024.ebuild raspberrypi-userland-9999.ebuild
ebuild raspberrypi-userland-9999.ebuild digest


You'll have a working ebuild that gets from git, ergo latest userland.

The "no such file or directory" errors are probably from dependencies, check ldd /opt/vc/bin/vcgencmd
Posts: 9
Joined: Sun Jan 06, 2013 4:53 pm
by jjackowski » Wed Jan 23, 2013 5:28 pm
Thanks! Setting up the ebuild to get the latest version fixed the issue. Before I did that, I tried ldd to see what the problem was, but it told me that /opt/vc/bin/vcgencmd didn't exist. ls could still find it. Must be an error message that isn't for the actual problem; an error message that is itself an error.
Posts: 41
Joined: Thu Jan 10, 2013 5:25 am
by jbowler » Sun Jul 13, 2014 8:19 pm
Whenever I've seen 'file not found' from an executable or ldd on Gentoo-ARM it has been because the dynamic linker named in the ELF doesn't exist.

It's easy to debug - just load the executable into your editor of choice and look for /lib/ The string will be in the first few hundred characters. Here's some examples from today (2014.07.13), using the latest firmware in GIT:

opt/vc/bin/vcgencmd: /lib/ld-linux.so.3
hardfp/opt/vc/bin/vcgencmd: /lib/ld-linux-armhf.so.3

I have *both* these on my RPi, despite the fact that it is built with "-mfpu=vfp -mfloat-abi=hard", but I think that at some point I might have had to fix up one or other of them. IRC a GCC update changes, and maybe removes, them. Nevertheless both vcgencmds fail with 'VCHI initialization failed'; it's not a very well written program ;-) [if (geteuid() != 0) somewhere maybe?]

John Bowler
Posts: 6
Joined: Sun Jul 13, 2014 8:02 pm