Hello,
Following the Fabian Arrotin recommendation, I open here the request to include the 'raspberrypi-vc' package into the CentOS 7 EPEL repository, or in the main tree.
This package includes a command called 'vcgencmd' which offers a set of interesting values of the Raspberry Pi board; e.g. its temperature. Check here http://www.elinux.org/RPI_vcgencmd_usage for more information.
I've downloaded the SRPM package from here http://www.squeezecommunity.org/repo/fedora/24/pi/SRPMS/raspberrypi-vc-20160705-501.git0b8c195.fc24.src.rpm, and I realized that it was pretty easy to build on a full-updated CentOS 7 (kernel 4.4.14-v7).
The following are the small modifications I made on the .spec file to accomplish it:
--- raspberrypi-vc.spec 2016-07-05 23:23:13.000000000 +0200 +++ raspberrypi-vc.spec.ok 2016-07-13 12:14:39.494059817 +0200 @@ -21,12 +21,12 @@ Patch1: raspberrypi-vc-EGL-dep.patch
# dtoverlay -BuildRequires: libfdt-devel >= 1.4.1-501.gitbeef80b%{?dist} +##BuildRequires: libfdt-devel >= 1.4.1-501.gitbeef80b%{?dist} Requires: libfdt >= 1.4.1-501.gitbeef80b%{?dist}
BuildRequires: cmake, gcc-c++
-ExclusiveArch: armv6hl armv7hnl +ExclusiveArch: armv7hl
%description Libraries, utilities and demos for the Raspberry Pi BCM2835/6 SOC GPU @@ -34,7 +34,7 @@
%package libs Summary: Libraries for accessing the Raspberry Pi GPU -Requires: %{name}-firmware >= 20150212git47bd0f0-501 +##Requires: %{name}-firmware >= 20150212git47bd0f0-501
#Provides: libEGL.so #Provides: libGLESv1_CM.so
The build generated successfully the following packages:
[root@rpi3 rpmbuild]# l -R RPMS/ RPMS/: total 8 drwxr-xr-x 2 root root 4096 Jul 26 15:59 armv7hl drwxr-xr-x 2 root root 4096 Jul 13 12:23 noarch
RPMS/armv7hl: total 1352 -rw-r--r-- 1 root root 552156 Jul 13 12:22 raspberrypi-vc-libs-20160705-501.git0b8c195.el7.centos.armv7hl.rpm -rw-r--r-- 1 root root 340184 Jul 13 12:22 raspberrypi-vc-libs-devel-20160705-501.git0b8c195.el7.centos.armv7hl.rpm -rw-r--r-- 1 root root 244960 Jul 13 12:23 raspberrypi-vc-static-20160705-501.git0b8c195.el7.centos.armv7hl.rpm -rw-r--r-- 1 root root 241332 Jul 13 12:23 raspberrypi-vc-utils-20160705-501.git0b8c195.el7.centos.armv7hl.rpm
RPMS/noarch: total 30688 -rw-r--r-- 1 root root 31420584 Jul 13 12:23 raspberrypi-vc-demo-source-20160705-501.git0b8c195.el7.centos.noarch.rpm
The installation worked finely:
# [root@rpi3 armv7hl]# rpm -ivh raspberrypi-vc-utils-20160705-501.git0b8c195.el7.centos.armv7hl.rpm raspberrypi-vc-libs-20160705-501.git0b8c195.el7.centos.armv7hl.rpm Preparing... ################################# [100%] Updating / installing... 1:raspberrypi-vc-libs-20160705-501.################################# [ 50%] 2:raspberrypi-vc-utils-20160705-501################################# [100%]
Then a simple command to get the temperature:
[root@rpi3 ~]# vcgencmd measure_temp temp=47.2'C
Thanks.
W dniu 26.07.2016 o 16:36, Jordi Sanfeliu pisze:
Following the Fabian Arrotin recommendation, I open here the request to include the 'raspberrypi-vc' package into the CentOS 7 EPEL repository, or in the main tree.
The following are the small modifications I made on the .spec file to accomplish it:
So basically you killed build dependencies, then runtime dependencies (but not fully) and hope that someone would add such random hack into repository?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 26/07/16 19:18, Marcin Juszkiewicz wrote:
W dniu 26.07.2016 o 16:36, Jordi Sanfeliu pisze:
Following the Fabian Arrotin recommendation, I open here the request to include the 'raspberrypi-vc' package into the CentOS 7 EPEL repository, or in the main tree.
The following are the small modifications I made on the .spec file to accomplish it:
So basically you killed build dependencies, then runtime dependencies (but not fully) and hope that someone would add such random hack into repository?
Do we need to lose those ?
- -- Karanbir Singh, Project Lead, The CentOS Project +44-207-0999389 | http://www.centos.org/ | twitter.com/CentOS GnuPG Key : http://www.karan.org/publickey.asc
On 07/26/2016 08:18 PM, Marcin Juszkiewicz wrote:
W dniu 26.07.2016 o 16:36, Jordi Sanfeliu pisze:
Following the Fabian Arrotin recommendation, I open here the request to include the 'raspberrypi-vc' package into the CentOS 7 EPEL repository, or in the main tree.
The following are the small modifications I made on the .spec file to accomplish it:
So basically you killed build dependencies, then runtime dependencies (but not fully) and hope that someone would add such random hack into repository?
Well, I just wanted to see if the original .spec file was enough to build the package on a CentOS 7, but it failed due the version in a dependency that I was unable to satisfy. As a matter of test, I realized that after commenting that line it built fairly well, so I thought that it would be relatively easy to include that package into the CentOS 7 repository (or in EPEL).
Of course, I'm not saying that the modified .spec file must be the definitive, it indeed will need some changes to accommodate better to the CentOS 7 package guidelines, but that's a work for an expertise hand. ;)
Regards.
On 26/07/16 16:36, Jordi Sanfeliu wrote:
Hello,
Following the Fabian Arrotin recommendation, I open here the request to include the 'raspberrypi-vc' package into the CentOS 7 EPEL repository, or in the main tree.
This package includes a command called 'vcgencmd' which offers a set of interesting values of the Raspberry Pi board; e.g. its temperature. Check here http://www.elinux.org/RPI_vcgencmd_usage for more information.
I've downloaded the SRPM package from here http://www.squeezecommunity.org/repo/fedora/24/pi/SRPMS/raspberrypi-vc-20160705-501.git0b8c195.fc24.src.rpm, and I realized that it was pretty easy to build on a full-updated CentOS 7 (kernel 4.4.14-v7).
The following are the small modifications I made on the .spec file to accomplish it:
--- raspberrypi-vc.spec 2016-07-05 23:23:13.000000000 +0200 +++ raspberrypi-vc.spec.ok 2016-07-13 12:14:39.494059817 +0200 @@ -21,12 +21,12 @@ Patch1: raspberrypi-vc-EGL-dep.patch
# dtoverlay -BuildRequires: libfdt-devel >= 1.4.1-501.gitbeef80b%{?dist} +##BuildRequires: libfdt-devel >= 1.4.1-501.gitbeef80b%{?dist} Requires: libfdt >= 1.4.1-501.gitbeef80b%{?dist}
BuildRequires: cmake, gcc-c++
-ExclusiveArch: armv6hl armv7hnl +ExclusiveArch: armv7hl
%description Libraries, utilities and demos for the Raspberry Pi BCM2835/6 SOC GPU @@ -34,7 +34,7 @@
%package libs Summary: Libraries for accessing the Raspberry Pi GPU -Requires: %{name}-firmware >= 20150212git47bd0f0-501 +##Requires: %{name}-firmware >= 20150212git47bd0f0-501
#Provides: libEGL.so #Provides: libGLESv1_CM.so
The build generated successfully the following packages:
[root@rpi3 rpmbuild]# l -R RPMS/ RPMS/: total 8 drwxr-xr-x 2 root root 4096 Jul 26 15:59 armv7hl drwxr-xr-x 2 root root 4096 Jul 13 12:23 noarch
RPMS/armv7hl: total 1352 -rw-r--r-- 1 root root 552156 Jul 13 12:22 raspberrypi-vc-libs-20160705-501.git0b8c195.el7.centos.armv7hl.rpm -rw-r--r-- 1 root root 340184 Jul 13 12:22 raspberrypi-vc-libs-devel-20160705-501.git0b8c195.el7.centos.armv7hl.rpm -rw-r--r-- 1 root root 244960 Jul 13 12:23 raspberrypi-vc-static-20160705-501.git0b8c195.el7.centos.armv7hl.rpm -rw-r--r-- 1 root root 241332 Jul 13 12:23 raspberrypi-vc-utils-20160705-501.git0b8c195.el7.centos.armv7hl.rpm
RPMS/noarch: total 30688 -rw-r--r-- 1 root root 31420584 Jul 13 12:23 raspberrypi-vc-demo-source-20160705-501.git0b8c195.el7.centos.noarch.rpm
The installation worked finely:
# [root@rpi3 armv7hl]# rpm -ivh raspberrypi-vc-utils-20160705-501.git0b8c195.el7.centos.armv7hl.rpm raspberrypi-vc-libs-20160705-501.git0b8c195.el7.centos.armv7hl.rpm Preparing... ################################# [100%] Updating / installing... 1:raspberrypi-vc-libs-20160705-501.################################# [ 50%] 2:raspberrypi-vc-utils-20160705-501################################# [100%]
Then a simple command to get the temperature:
[root@rpi3 ~]# vcgencmd measure_temp temp=47.2'C
Thanks.
I know the original post in this thread is a little bit "old" but I remembered seeing a dep on newer dtc, that landed in git.centos.org for centos 7.4.1708. So I first rebuilt dtc and then tested a rebuild of that raspberrypi-vc pkg, which built fine
So if you want to test this, both landed in https://armv7.dev.centos.org/repodir/c7-extras-1/ repo (unsigned, etc)
Depending on feedback and also reviews, we can push that pkg soon in official centos 7 armhfp repositories
Fabian,
I've added such new repo and installed the 'raspberrypi-vc-utils' and 'raspberrypi-vc-libs' packages successfully.
The command 'vcgencmd' seems working fine. It shows the temperature and other values of my Raspberry Pi v3:
[root@rpi3 ~]# vcgencmd measure_temp temp=51.0'C
[root@rpi3 ~]# for src in arm core h264 isp v3d uart pwm emmc pixel vec hdmi dpi ; do echo -e "$src:\t$(vcgencmd measure_clock $src)" ; done arm: frequency(45)=600000000 core: frequency(1)=250000000 h264: frequency(28)=250000000 isp: frequency(42)=250000000 v3d: frequency(43)=250000000 uart: frequency(22)=48000000 pwm: frequency(25)=0 emmc: frequency(47)=250000000 pixel: frequency(29)=65000000 vec: frequency(10)=0 hdmi: frequency(9)=163683000 dpi: frequency(4)=0
[root@rpi3 ~]# for id in core sdram_c sdram_i sdram_p ; do echo -e "$id:\t$(vcgencmd measure_volts $id)" ; done core: volt=1.2000V sdram_c: volt=1.2000V sdram_i: volt=1.2000V sdram_p: volt=1.2250V
[root@rpi3 ~]# for codec in H264 MPG2 WVC1 MPG4 MJPG WMV9 ; do echo -e "$codec:\t$(vcgencmd codec_enabled $codec)" ; done H264: H264=enabled MPG2: MPG2=disabled WVC1: WVC1=disabled MPG4: MPG4=enabled MJPG: MJPG=enabled WMV9: WMV9=disabled
... and more.
Please refer here http://www.elinux.org/RPI_vcgencmd_usage for a list of possible commands.
Thanks for building that package! Regards.
On 09/12/2017 05:57 PM, Fabian Arrotin wrote: [...]
So if you want to test this, both landed in https://armv7.dev.centos.org/repodir/c7-extras-1/ repo (unsigned, etc)
Depending on feedback and also reviews, we can push that pkg soon in official centos 7 armhfp repositories