Skip to content

Commit

Permalink
docs: Raspberry Pi OS - libcec build instructions (#47)
Browse files Browse the repository at this point in the history
* readme: Fix typos/syntax of RasPi build instructions

* fix: Invalid syntax: `sudo cd`
* fix: typo `libp8 platform-dev` -> `p8-platform-dev`
* fix: Invalid syntax: `sudo rmdir -rf` -> `sudo rm -rf`

* oops

* readme: Raspberry Pi instructions -> gain superuser privs once

* Update README.md
  • Loading branch information
skraus-dev authored Aug 24, 2023
1 parent 46bde9c commit 07859ab
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,32 @@ If you are using Raspberry Pi OS and want to use the built-in HDMI port CEC, you

Adapted from [libcec documentation](https://github.com/Pulse-Eight/libcec/blob/master/docs/README.raspberrypi.md):

```
```sh
# Become superuser
sudo su

# Remove libcec (since we are going to build it ourselves)
apt-get remove libcec6

# Install libcec build dependencies, but not libcec itself
sudo apt-get install libp8 platform-dev libp8-platform cmake libudev-dev libxrandr-dev python3-dev swig git
apt-get install libp8-platform-dev libp8-platform2 cmake libudev-dev libxrandr-dev python3-dev swig git

# Build libcec 6.0.2 with RPI CEC driver enabled
sudo rmdir -rf /tmp/libcec-build-tmp
sudo mkdir /tmp/libcec-build-tmp
sudo cd /tmp/libcec-build-tmp
sudo git clone --recursive https://github.com/Pulse-Eight/libcec.git
sudo cd libcec
sudo git checkout libcec-6.0.2
sudo mkdir build
sudo cd build
sudo cmake -DRPI_INCLUDE_DIR=/opt/vc/include -DRPI_LIB_DIR=/opt/vc/lib ..
sudo make -j4
sudo make install
sudo ldconfig
rm -rf /tmp/libcec-build-tmp
mkdir /tmp/libcec-build-tmp
cd /tmp/libcec-build-tmp
git clone --recursive https://github.com/Pulse-Eight/libcec.git
cd libcec
git checkout libcec-6.0.2
mkdir build
cd build
cmake -DRPI_INCLUDE_DIR=/opt/vc/include -DRPI_LIB_DIR=/opt/vc/lib ..
make -j4
make install
ldconfig

# Leave superuser context
exit
```

### Windows
Expand Down Expand Up @@ -95,4 +100,4 @@ See [CONTRIBUTING.md](CONTRIBUTING.md).

## Releasing

```cargo release --no-publish --dev-version --execute``` and let the github CD pipeline do the rest.
```cargo release --no-publish --dev-version --execute``` and let the github CD pipeline do the rest.

0 comments on commit 07859ab

Please sign in to comment.