mirror of
https://github.com/Relintai/pi_player.git
synced 2024-11-12 08:45:35 +01:00
Added a small utility script and scripts to clone and install fbcp-ili. I preconfigured it for the adafruit pitft 2.2 for now. Eventually it will probably be generalized.
This commit is contained in:
parent
51c48b58fa
commit
1caf94daa2
4
.gitignore
vendored
4
.gitignore
vendored
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
repos/*
|
||||||
|
repos/**
|
3
01_small_utils.sh
Executable file
3
01_small_utils.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
sudo apt install -y vim screen mc
|
29
03_1_fbcp_ili_setup.sh
Executable file
29
03_1_fbcp_ili_setup.sh
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
if [ ! -d "repos" ]; then
|
||||||
|
mkdir repos
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd repos
|
||||||
|
|
||||||
|
if [ ! -d "fbcp_ili" ]; then
|
||||||
|
git clone https://github.com/juj/fbcp-ili9341.git fbcp_ili
|
||||||
|
|
||||||
|
#install dependencies
|
||||||
|
sudo apt install -y cmake
|
||||||
|
else
|
||||||
|
cd fbcp_ili
|
||||||
|
|
||||||
|
git reset
|
||||||
|
git reset --hard
|
||||||
|
git pull origin master
|
||||||
|
git reset
|
||||||
|
git reset --hard
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
|
17
03_2_fbcp_build.sh
Executable file
17
03_2_fbcp_build.sh
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
cd repos
|
||||||
|
|
||||||
|
cd fbcp_ili
|
||||||
|
|
||||||
|
if [ ! -d "build" ]; then
|
||||||
|
mkdir build
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd build
|
||||||
|
|
||||||
|
cmake -DBACKLIGHT_CONTROL=1 -DSTATISTICS=0 -DADAFRUIT_ILI9341_PITFT=ON -DSPI_BUS_CLOCK_DIVISOR=10 ..
|
||||||
|
make
|
||||||
|
|
||||||
|
|
11
03_3_fbcp_install.sh
Executable file
11
03_3_fbcp_install.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
cd repos
|
||||||
|
cd fbcp_ili
|
||||||
|
cd build
|
||||||
|
|
||||||
|
sudo killall fbcp
|
||||||
|
sudo cp fbcp-ili9341 /usr/local/bin/fbcp
|
||||||
|
|
||||||
|
|
13
03_4_fbcp_install_service.sh
Executable file
13
03_4_fbcp_install_service.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
if [ ! -f "/etc/systemd/system/fbcp.service" ]; then
|
||||||
|
sudo cp ./files/fbcp.service /etc/systemd/system/fbcp.service
|
||||||
|
|
||||||
|
sudo systemctl enable fbcp
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo killall fbcp
|
||||||
|
sudo systemctl start fbcp
|
||||||
|
|
||||||
|
|
22
04_setup_adafruit_pitft_22_config.sh
Executable file
22
04_setup_adafruit_pitft_22_config.sh
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
cp /boot/config.txt /boot/config.txt.bak
|
||||||
|
|
||||||
|
echo "" >> /boot/config.txt
|
||||||
|
echo "" >> /boot/config.txt
|
||||||
|
|
||||||
|
echo "--- Added by pi_player start ---" >> /boot/config.txt
|
||||||
|
|
||||||
|
echo "" >> /boot/config.txt
|
||||||
|
echo "" >> /boot/config.txt
|
||||||
|
echo "hdmi_group=2" >> /boot/config.txt
|
||||||
|
echo "hdmi_mode=87" >> /boot/config.txt
|
||||||
|
echo "hdmi_cvt=320 240 60 1 0 0 0" >> /boot/config.txt
|
||||||
|
echo "hdmi_force_hotplug=1" >> /boot/config.txt
|
||||||
|
|
||||||
|
|
||||||
|
echo "" >> /boot/config.txt
|
||||||
|
echo "" >> /boot/config.txt
|
||||||
|
echo "--- Added by pi_player end ---" >> /boot/config.txt
|
||||||
|
|
||||||
|
echo "" >> /boot/config.txt
|
||||||
|
|
11
files/fbcp.service
Normal file
11
files/fbcp.service
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Framebuffer copy utility for PiTFT
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStartPre=/bin/sleep 10
|
||||||
|
ExecStart=/usr/local/bin/fbcp
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user