7. Tools and Libraries Porting Guide
RUBIK Pi 3 has integrated the commonly used tools and libraries in development. If the tools needed during development are not integrated, refer to the following method of cec-client porting:
7.1 cec-client porting
- First, set up the cross-compilation environment. For detailed steps, refer to "1.11.2. Install cross-compilation tools".
source <your toolchains directory>/environment-setup-armv8-2a-qcom-linux
- Download libcec source code:
git clone https://github.com/Pulse-Eight/libcec
- Go to the cec-client source directory and execute the code:
mkdir build
cmake .. -DCMAKE_INSTALL_PREFIX=../bin
make
After the make
command is run, the following error occurs, indicating that the p8-platform library is not available.
To solve the problem, cross-compile the p8-platform library.
- Download p8-platform source code:
git clone https://github.com/Pulse-Eight/platform
- Go to the platform folder and run the following commands:
mkdir build
cmake .. -DCMAKE_INSTALL_PREFIX=../bin
make
- Go to the bin directory and copy the compilation artifact to the sysroot directory of the cross-compilation toolchain. As shown in the following code, /home/zhy/QCOM/sdk is the installation path of the cross-compilation tool. For details, refer to "1.12.2. Compile code".
cp libp8-platform.a /home/zhy/QCOM/sdk/sysroots/armv8-2a-qcom-linux/usr/lib/
- Go back to the libcec directory and continue compilation:
cd libcec/build
make
- After the compilation, run the following command to export the compilation artifact to the bin directory:
make install
-
Run the following commands to view the compilation artifact. The cec-client tool has been generated, and the libcec library has been integrated into RUBIK Pi 3. Transfer cec-client to RUBIK Pi 3 for execution.
tipTransfer files using the ADB or SCP method.
cd ../bin/bin
ls
file cec-client-6.0.2