From 07859ab7676e79fbe196040f950cce54e2945af1 Mon Sep 17 00:00:00 2001 From: Sebastian Kraus <88542475+skraus-dev@users.noreply.github.com> Date: Thu, 24 Aug 2023 17:44:21 +0200 Subject: [PATCH] docs: Raspberry Pi OS - libcec build instructions (#47) * 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 --- README.md | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 1a24be6f..e7cbf877 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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. \ No newline at end of file +```cargo release --no-publish --dev-version --execute``` and let the github CD pipeline do the rest.