#raspOS Bookworm lite #screen support # Enable SPI using raspi-config echo "Enabling SPI interface using raspi-config..." raspi-config nonint do_spi 0 # Update system and install dependencies echo "Updating the system and installing dependencies..." apt update && apt upgrade -y apt install -y cmake git build-essential nano #raspi userland git clone https://github.com/raspberrypi/userland.git cd userland ./buildme cd ~ #fix so libs echo "/opt/vc/lib" >> /etc/ld.so.conf.d/vc.conf sudo ldconfig #build deps and remove raspi features git clone https://github.com/juj/fbcp-ili9341.git cd fbcp-ili9341 mkdir build && cd build #append to fix -DDISPLAY_INVERT_COLORS=ON -DSTATISTICS=0 #stable but slowle #cmake -DUSE_GPU=ON -DSPI_BUS_CLOCK_DIVISOR=12 -DGPIO_TFT_DATA_CONTROL=25 -DGPIO_TFT_RESET_PIN=17 -DILI9488=ON -DUSE_DMA_TRANSFERS=OFF -DDISPLAY_INVERT_COLORS=ON -DSTATISTICS=0 .. #uncoma define RUN_WITH_REALTIME_THREAD_PRIORITY in config.h #use DMA # #define TARGET_FRAME_RATE 24 in display.h cmake -DUSE_GPU=ON -DSPI_BUS_CLOCK_DIVISOR=12 -DGPIO_TFT_DATA_CONTROL=25 -DGPIO_TFT_RESET_PIN=17 -DILI9488=ON -DUSE_DMA_TRANSFERS=ON -DDISPLAY_INVERT_COLORS=ON -DSTATISTICS=1 .. make -j$(nproc) sudo install fbcp-ili9341 /usr/local/bin/ ./config.sh #gpu mem 64mb #make autologin #after this is not fine sudo su mkdir -pv /etc/systemd/system/getty@tty1.service.d #nano /etc/systemd/system/getty@tty1.service.d/autologin.conf cat < /etc/systemd/system/getty@tty1.service.d/autologin.conf [Service] ExecStart= ExecStart=-/sbin/agetty --autologin pipboy --noclear %I $TERM EOT #Xserver and chromium apt install -y --no-install-recommends xserver-xorg x11-xserver-utils xinit chromium-browser cat <> /home/gsd/.bashrc # Автозапуск X сервера при логине в tty1 if [ -z "$DISPLAY" ] && [ $(tty) = /dev/tty1 ]; then startx -- -nocursor fi EOT cat < /home/gsd/.xinitrc #!/bin/sh # Ждем сеть #while ! ping -c1 google.com &>/dev/null; do # sleep 1 #done # Настройки отключения энергосбережения xset s off xset -dpms xset s noblank # Запуск Chromium exec chromium-browser --no-memcheck --noerrdialogs --disable-infobars --disable-background-timer-throttling --disable-renderer-backgrounding --disable-backgrounding-occluded-windows --check-for-update-interval=31536000 --no-first-run --incognito --kiosk http://127.0.0.1 EOT #uart cat <> /boot/firmware/config.txt dtoverlay=disable-bt enable_uart=1 dtoverlay=uart0 EOT #офаем через raspi-config #sudo systemctl stop serial-getty@ttyS0.service #sudo systemctl disable serial-getty@ttyS0.service sudo apt install python3-serial #sound https://withrow.io/simpsons-tv-build-guide-waveshare#parts-list #dtparam=audio=on #dtoverlay=audremap,enable_jack,pins_18_13 #dtparam=audio=off # dtparam=audio=on # закомментируйте или удалите эту строку #dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4 #apt install git build-essential autoconf automake libtool libasound2-dev #rtc sudo nano /boot/firmware/config.txt dtparam=i2c_arm=on dtoverlay=i2c-rtc,ds3231 sudo apt-get install i2c-tools #reboot sudo i2cdetect -y 1 echo "rtc-ds1307" | sudo tee -a /etc/modules echo 'SUBSYSTEM=="i2c-dev", ATTR{name}=="3f804000.i2c", SYMLINK+="i2c-rtc"' | sudo tee /etc/udev/rules.d/10-rtc.rules #append sudo nano /etc/rc.local hwclock -s --utc