diff --git a/Raspbery-Pi-Setup.md b/Raspbery-Pi-Setup.md index a1e317c..d7eda26 100644 --- a/Raspbery-Pi-Setup.md +++ b/Raspbery-Pi-Setup.md @@ -1,4 +1,5 @@ # Introduction + These are detailed instructions for converting a Raspberry Pi Zero 2W + Carlinkit device into a fully functional CarPlay/Android Auto system. This also serves as documentation of a long journey that I have gone with this setup, including lessons learned along the way. The guide may also benefit beginners working on other Raspberry Pi projects, as it covers several general setup procedures commonly needed elsewhere. @@ -11,17 +12,14 @@ Further will be all sequential steps required to get the set up. You should foll ## Steps 0. [The story](#0-story) 1. [Flashing Raspberry Pi OS Lite](#1-flashing) -2. [Custom partition scheme: mount partitions, first boot, move /home to own partition](#2-partitioning) +2. [Custom partitions: move /home to own partition, mount, first boot](#2-partitioning) 3. [Connect to WIFI using wpa_supplicant and systemd-networkd](#3-wpa-supplicant) -4. [Optimise RPI boot: remove unnecessary services, overclock sd card, zram](#4-optimise-boot) -5. [Set up JWM minimal desktop with autologin](#5-minimal-desktop) -6. [Install ST (Simple Terminal) with scrollback support](#6-st-terminal) -7. [Set up sound (PWM or I2S) with pulseaudio](#7-audio) -8. [RPI AUX (TV) output](#8-tv-out) -9. [Set up FastCarPlay: Carplay and Android Auto receiver](#9-fastcarplay) -10. [Wifi connection and hotspot scripts, integrating them into JWM](#10-wifi-scripts) -11. Tweaking RPi cmd line and boot config -12. Overlay file system +4. [Set up FastCarPlay Carplay and Android Auto receiver: get, compile and configure](#4-fastcarplay) +5. [Optimise RPI boot: remove unnecessary services, overclock sd card, boot configuration](#5-optimise-boot) +6. [Wifi connection and hotspot scripts](#6-wifi-scripts) +7. [Overlay file system](#7-Overlay- FS) +8. [Additional hardware: AUX TV Output, I2S Audio](#8-Additional-hardware) +9. [Extra: Set up minimal desktop environment with JVM and ST](#9-Minimal-desktop) ## Prerequisites This guide is build on following hardware: @@ -37,6 +35,7 @@ This guide is build on following hardware: > - Throughout this guide, the username **carplay** will be used for the Raspberry Pi user account. You need to adjust commands if you are using different one. # 0 Story + The idea of this project came when I was looking in a way to get apple car play for my old car. I have a special video input that allows to connect external media with RCA, but generally this can be used on any car that have some source of RCA input. In most cases reverse camera are connected as same RCA video input. So with a little bit of creativity this can be implemented on wide area of cases. I wanted to have something minimalistic and fast, that I can seamlessly integrate as a ready made module. My research bring me to the Autobox dongle that promised to get Carplay for any Android device. At that point of time I had Orange PI at hand that can run Android OS, so my plans were just to plug and play. But things doesn't went quite smooth and I found a problems with connection RCA to Orange PI as well as I didn't want to have the whole Android system to boot for only one application. @@ -46,6 +45,7 @@ From there I started to investigate other options to use the dongle with Linux a After some coding, protocol digging and learning new thing I have ended up with this project. Also I decided to document all the steps that will allow you to get from 0 to full kiosk mode Carplay solution, cause in attempts to build a solid minimalistic system that I want, I figure out that there are no good guidance on setting up a lot of things that for me looks essential. Or if the steps are described a lot of "details" what settings are doing and why they needed are missing. So I hope that this guide will help not only people who are building FastCarPlay but it will also allow others to learn how to set up simple and effective kiosk single app solutions with RPI with minimal CPU/Memory usage. # 1 Flashing + Download and install [Raspberry Pi Imager](https://www.raspberrypi.com/software/). Open it and choose your Raspberry Pi model. ![Flashing 1](pictures/rpi-flash1.png) @@ -70,11 +70,12 @@ Review the configuration and write the image to the SD card. Wait for the proces # 2 Partitioning > [!TIP] ->This optional step prepares the system for an overlay filesystem, allowing the core system to run in read-only mode while keeping the user directory writable. It also creates a Linux swap partition. If you don’t need an overlay setup, you can skip this and boot the Pi normally. The SD card partitions will be expanded automatically on first boot. +>This optional step prepares the system for an overlay filesystem, allowing the core system to run in read-only mode while keeping the user directory writable. If you don’t need an overlay setup, you can skip this and boot the Pi normally. The SD card partitions will be expanded automatically on first boot. -In this step we create additional SD-card partitions for **swap** and the **home folder**. This allows the OS partition to run in read-only mode using an **overlay filesystem**, reducing write operations and improving stability and protection. At the same time, data can still be written to **/home** without disabling the overlay for persistent files or frequent updates. +In this step we create additional SD-card partition for the **home folder**. This allows the OS partition to run in read-only mode using an **overlay filesystem**, reducing write operations and improving stability and protection. At the same time, data can still be written to **/home** without disabling the overlay for persistent files or frequent updates. Also it will be possible to put **swap** file under **/home** folder. ## Partitioning with gparted + You will need a Linux machine or a virtual machine running any Linux distribution. Install **gparted** on your system (use apt on Debian-based systems): ``` shell sudo apt install gparted @@ -92,32 +93,28 @@ First, increase the size of **rootfs**. Open *Partition* → *Resize/Move* and s ![Partitioning 2](pictures/rpi-partition2.png) -Next, create a partition for **/home**. Choose *Partition* → *New* and set *Free space following* for swap (at least 512 MB on an RPI Zero 2W). Set the filesystem to **ext4**, enter a label such as **home**. +Next, create a partition for **/home**. Choose *Partition* → *New* and set *Free space following* for swap (at least 512 MB on an RPI Zero 2W). Set the filesystem to **ext4**, enter a label such as **homefs**. ![Partitioning 3](pictures/rpi-partition3.png) -Finally, create the swap partition using the remaining unallocated space. Use *Partition* → *New*, choose the **linux-swap** filesystem type and enter a label such as **swap**. - -![Partitioning 4](pictures/rpi-partition4.png) - Review the changes and apply them -![Partitioning 5](pictures/rpi-partition5.png) +![Partitioning 4](pictures/rpi-partition4.png) ## First boot Insert the SD card into the Raspberry Pi, connect the HDMI cable and keyboard, then apply power. If everything is correct, the rainbow screen will appear and the Pi will begin booting, followed by the setup process. Choose the keyboard layout and create a username and password. After a short time, a login prompt will appear. Enter the username and password you created to access the terminal. ## Mount partitions -Next, we need to configure the system to mount our new partitions as **home** and **swap**. First identify the partitions: +Next, we need to configure the system to mount our new **homefs** partition as **home**. First identify the partitions: ``` shell blkid ``` ![Lsblk output](pictures/rpi-mount1.png) -In the output, locate the partitions with labels `LABEL="swap"` and `LABEL="home"`. Note their **PARTUUID** and **/dev/device**. +In the output, locate the partition with label `LABEL="homefs"`. Note its **PARTUUID** and **/dev/device**. -We need to copy existing **home** directory to a new partition. Mount the **home** partition using */dev/device* name: +We need to copy existing */home* directory to a new partition. Mount the **homefs** partition using */dev/device* name: ``` shell sudo mkdir /mnt/home sudo mount /dev/mmcblk0p3 /mnt/home @@ -133,10 +130,9 @@ Edit the fstab file to configure automatic mounting of the new partitions: ``` shell sudo nano /etc/fstab ``` -At the end of the file, add an entry for the swap partition and home partition using its **PARTUUID** +At the end of the file, add an entry for the **homefs** partition using its **PARTUUID** ``` shell PARTUUID=your-home-partuuid /home ext4 defaults,noatime 0 2 -PARTUUID=your-swap-partuuid none swap sw 0 0 ``` ![Lsblk output](pictures/rpi-mount2.png) @@ -148,16 +144,17 @@ sudo mkdir /home sudo reboot ``` -Check that partitions are mounted correctly with lsblk: +Check that partitions are mounted correctly with lsblk and remove mount point: ``` shell lsblk +sudo rm -r /mnt/home/ ``` ![Lsblk output](pictures/rpi-mount3.png) # 3 WPA-Supplicant > [!TIP] -> To connect to the internet, we will use **wpa-supplicant**. It is lighter than NetworkManager and will also be used later for scripting. You can use other methods of connection but this will be needed for Wifi scripts (step 10) +> To connect to the internet, we will use **wpa-supplicant**. It is lighter than NetworkManager and will also be used later for scripting. You can use other methods of connection but this will be needed for Wifi scripts (step 10). First, set the Wi-Fi country in the Raspberry Pi configuration: ``` shell @@ -239,7 +236,7 @@ sudo systemctl enable wpa_supplicant@wlan0.service sudo systemctl start wpa_supplicant@wlan0.service sudo systemctl enable systemd-networkd.service -sudo systemctl start systemd-networkd +sudo systemctl start systemd-networkd.service sudo systemctl disable wpa_supplicant.service sudo systemctl stop wpa_supplicant.service @@ -252,14 +249,14 @@ sudo ip link set wlan0 up Check the status of the wireless interface: ``` shell -sudo iwconfig -sudo ifconfig +iwconfig +ifconfig ``` If the wireless connection is working, update the system and then reboot: ``` shell sudo apt update -sudo apt upgrade -y +sudo apt upgrade sudo reboot ``` @@ -267,28 +264,155 @@ Now you can connect to your raspberry pi with ssh, replace 10.0.0.10 with ip of ``` shell ssh carplay@10.0.0.10 ``` -# 4 Optimise boot -> [!TIP] -> We want the system to start as quickly as possible and minimize running services to conserve limited RAM. To achieve this, we can disable services that are not needed for our setup. -Check which services are taking the longest to start and check enabled service: +# 4 FastCarPlay +> [!TIP] +> In this section we are going to set up FastCarPlay and configure it to use in KIOSK mode with automatic start on system boot + +Iinstall the libraries for building FastCarPlay: ``` +sudo apt install --no-install-recommends build-essential git xxd libsdl2-dev libsdl2-ttf-dev libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libusb-1.0-0-dev libssl-dev +``` + +Install libraries for running FastCarPlay: +``` +sudo apt install --no-install-recommends ffmpeg libsdl2-2.0-0 libsdl2-ttf-2.0-0 libusb-1.0-0 libssl3 +``` + +Clone repository and build FastCarPlay: +``` +git clone https://github.com/niellun/FastCarPlay.git +cd ./FastCarPlay +make clean +make release -j2 +``` +- Use -j2 flag to tell compiler to use 2 parallel threads for building. Remove this if you running out of memory. + +## Configure USB access + +We need to allow USB access to CPC200-CCPM Carlinkit Autobox dongle. Connect the dongle to a USB port and list the connected USB devices: +``` +lsusb +``` + +Identify the line that corresponds to your dongle. For example, mine appears as: +``` +Bus 003 Device 066: ID 1314:1520 Magic Communication Tec. Auto Box +``` +You need the Vendor ID and Product ID, which appear after the **ID** field in the format `:`. In the example, the vendor is **1314** and the product is **1520**, and both values are in hexadecimal form. + +Create the udev rule so the system applies the correct permissions to the dongle. Otherwise application will not be able to communicate with it. Replace the `ATTRS{idVendor}==` and `ATTRS{idProduct}==` values with the IDs from `lsusb`: +``` +echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="1314", ATTRS{idProduct}=="1520", GROUP="plugdev", MODE="0660"' | sudo tee /etc/udev/rules.d/50-carlinkit.rules +``` + +Add the target user to the _plugdev_ group so that user can access the device without elevated permissions. Reload and trigger udev so the new rule takes effect immediately: +``` +sudo usermod -aG plugdev carplay +sudo udevadm control --reload-rules +sudo udevadm trigger +``` + +## Configure FastCarPlay + +Create a copy of the settings in `/conf` directory so it will persist through updates and edit it: +``` +mkdir ./conf +cp ./settings.txt ./conf +nano ./conf/settings.txt +``` + +Configure settings according to your needs, remember to uncomment lines that you are changing. Set up vendor-id and product-id according to vendor id and product id from from `lsusb`. You need to convert value from hexidecimal to decimal. For example 0x1314:0x1520 will be 4884:5408. Modify other settings according your preferences. You can test how it works directly from console: +``` +./out/app ./conf/settings.txt +``` +Press **Q** to exit the program and **CTRL+ALT+F1** to return to console. + +If everything works as expected, make FastCarPlay start up with the system with automatic login and starting session on terminal 7 (default terminal used for X11). Create systemd unit: +``` +sudo nano /etc/systemd/system/carplay.service +``` + +Put following unit configuration. Remember to replace user name and paths: +``` +[Unit] +Description=Auto-start FastCarPlay on system boot +DefaultDependencies=no +After=home.mount +Requires=home.mount + +[Service] +Type=simple +User=carplay +WorkingDirectory=/home/carplay +PAMName=login +Environment=XDG_SESSION_TYPE=x11 +TTYPath=/dev/tty7 +StandardInput=tty +UnsetEnvironment=TERM +UtmpIdentifier=tty7 +UtmpMode=user +StandardOutput=journal +StandardError=journal + +ExecStartPre=/usr/bin/chvt 7 +ExecStart=/home/carplay/FastCarPlay/out/app /home/carplay/FastCarPlay/conf/settings.txt +Restart=on-failure +RestartSec=2s + +[Install] +WantedBy=multi-user.target +``` + +Enable the service and test it with start: +``` +sudo systemctl enable carplay.service +sudo systemctl start carplay.service +``` + +Now FastCarPlay should automatically start after system boot. You need to press **Q** and **CTRL+ALT+F1** to close it and return to console. + +## Optional multichannel audio + +By default, the system uses ALSA as the audio manager. The limitation of ALSA is that it can only handle one audio output at a time. This means that if you are playing music and want navigation prompts or other system sounds to play simultaneously, only one of the audio streams will be heard, while the other will be blocked. + +To overcome this limitation, you need a more advanced sound system that can mix multiple audio streams together. One such option is PulseAudio, which acts as a sound server capable of handling multiple simultaneous audio outputs, routing audio to different devices, and providing better overall control of audio streams. + +Install PulseAudio with the following command: +``` +sudo apt install --no-install-recommends pulseaudio +``` + +## Enable Libliftoff Hardware Overlays + +To improve graphical performance on the Raspberry Pi, you can enable **libliftoff hardware overlays**. It allows the GPU to handle composition and hardware overlays efficiently. By enabling it, graphical elements, video playback, and user interfaces are rendered directly by the GPU instead of relying on software rendering. This reduces CPU load, prevents screen tearing, and improves overall responsiveness. This can be done via raspi-config: +``` +sudo raspi-config +``` +Navigate to: **Advanced Options → Libliftoff →Enable libliftoff hardware overlays**. + +# 5 Optimise boot +> [!TIP] +> Now when we have system running we want the system to start as quickly as possible and minimise running services to conserve limited RAM. Also we want to hide boot process from screen. + +## Disabling services + +The system starts up a lot of services that we do not need in our set up. You can check which services are taking the longest to start by systemd-analyze and check list of enabled services: +``` +systemd-analyze systemd-analyze blame systemctl list-unit-files --type=service ``` -> [!IMPORTANT] -> This is a list of services I disabled on my Raspberry Pi. Adjust it according to your own needs, and add or remove services based on your system, usage, and observed boot times. +We want to disable all not needed services to get more RAM and to reduce the time from power up to showing FastCarPlay application GUI. Here is list of services I disabled on my Raspberry Pi. Adjust it according to your own needs, and add or remove services based on your system, usage, and observed boot times. -## Disabling services - -**Network wait service** (delays boot until network is fully online): +**Network wait service** delays boot until network is fully online, disable and mask it because system is going to run without internet: ``` sudo systemctl disable systemd-networkd-wait-online.service sudo systemctl mask systemd-networkd-wait-online.service ``` -Raspberry Pi bootstrap and cloud services (not needed after first boot if we do not use cloud management): +Disable Raspberry Pi bootstrap and cloud services, they are not needed after first boot and we will not use cloud management: ``` sudo systemctl disable cloud-config.service sudo systemctl disable cloud-final.service @@ -297,79 +421,105 @@ sudo systemctl disable cloud-init-main.service sudo systemctl disable cloud-init-network.service ``` -**ModemManager** (if you don’t use a cellular modem): +Disable other services that are not needed: ``` sudo systemctl disable ModemManager.service -``` - -**Avahi Daemon** (used for mDNS/Bonjour, unnecessary in headless setups): -``` -sudo systemctl disable avahi-daemon.service -``` - -**Polkit** (authorization framework, often unnecessary in CLI-only setups): -``` -systemctl mask polkit.service -``` - -**Bluetooth service** (manages Bluetooth hardware; unnecessary if you don’t use Bluetooth): -``` sudo systemctl disable bluetooth.service -``` - -**Regenerate_ssh_host_keys** (used to generate new SSH host keys, usually on first boot or after re-imaging). Disabling it prevents automatic regeneration of SSH host keys at boot. It’s safe to disable once the initial keys are generated: -``` +sudo systemctl disable avahi-daemon.service +systemctl mask polkit.service sudo systemctl disable regenerate_ssh_host_keys.service -``` - -**Rpi-eeprom-update** (checks for and applies Raspberry Pi firmware/bootloader updates at boot): -``` sudo systemctl disable rpi-eeprom-update.service -``` - -**E2scrub_reap** (performs LVM/ext4 metadata scrubs; mostly unnecessary on SD cards): -``` sudo systemctl disable e2scrub_reap.service -``` - -**Sshswitch** (manages automatic switching of SSH access modes on Raspberry Pi OS). Disabling it stops the system from automatically enabling or switching SSH access at boot. This is safe on systems where SSH configuration is static or manually managed: -``` sudo systemctl disable sshswitch.service -``` +sudo systemctl disable keyboard-setup.service +sudo systemctl mask systemd-hostnamed.service +sudo systemctl mask systemd-binfmt.service +sudo systemctl mask systemd-ask-password-console.path +sudo systemctl mask systemd-ask-password-wall.path -**Keyboard-setup** (configures keyboard layout at boot, not needed on headless): -``` -systemctl disable keyboard-setup.service ``` + - **ModemManager** - if you don’t use a cellular modem. + - **Bluetooth service** - unnecessary if you don’t use Bluetooth. + - **Avahi Daemon** - mDNS/Bonjour, unnecessary in headless setups. + - **Polkit** - authorization framework, often unnecessary in CLI-only setups. + - **Regenerate_ssh_host_keys** - used to generate new SSH host keys, usually on first boot. Disabling it prevents automatic regeneration of SSH host keys at boot. It’s safe to disable once the initial keys are generated. + - **Rpi-eeprom-update** - checks and applies Raspberry Pi firmware/bootloader updates at boot. + - **E2scrub_reap** - performs LVM/ext4 metadata scrubs, mostly unnecessary on SD cards. + - **Sshswitch** - manages automatic switching of SSH access modes on Raspberry Pi OS. Disabling it stops the system from automatically enabling or switching SSH access at boot. This is safe on systems where SSH configuration is static or manually managed. + - **Keyboard-setup** - configures keyboard layout at boot, not needed on headless or if you use default US keyboard layout. + - **Hostname daemon** - host naming service. This service manages the system’s hostname and related network identity. We are not using host names and networking. + - **BinFmt** - binary format support for running foreign binaries (like non-native executables). FastCarPlay only runs native ARM binaries, so this service is not needed. + - **Password console** - prompts for passwords on the console during boot or service startup. We do not require user interaction for encrypted volumes or services, so these prompts can safely be disabled. + - **Ask Password Wall** - prevents password prompts broadcasted to all logged-in users. We do not have multiuser in our system. ## Additional tweaks -Since we are running a fixed set of software and already configured a swap file on the SD card, we can remove ZRam swap to speed up boot: +Since we are running a fixed set of software and already, we can remove ZRam swap to speed up boot: ``` sudo apt purge rpi-swap -sudo apt autoremove +sudo apt autoremove --purge ``` -Disable boot messages on the screen. This is not just reduce boot time a bit but also needed for system to start nicely without revealing everything underline. Edit cmdline.txt: +For boot tweaks and configurations for edit cmdline.txt: ``` sudo nano /boot/firmware/cmdline.txt ``` -Add the following to the end: + +Add following to the end of the line ``` -quiet splash fastboot +quiet loglevel=0 rd.udev.log_priority=3 vt.global_cursor_default=0 mitigations=off maxcpus=2 +``` +We want to disable boot messages on the screen. This is not just reduce boot time a bit but also needed for system to start nicely without revealing everything underline: +- **quiet** - reduces the amount of boot messages displayed on the screen. This hides unnecessary logs to make boot cleaner and faster. +- **loglevel** - sets the kernel log verbosity. `0` shows only critical messages (panic or emergency), suppressing less important logs. This further reduces console clutter during boot. +- **rd.udev.log_priority** - controls the logging level of the udev device manager during the initramfs stage. `3` corresponds to “error” level, so only udev errors are shown. +- **vt.global_cursor_default** - hides the virtual terminal cursor. + +Other options are: +- **mitigations** - disables CPU security mitigations (like Spectre/Meltdown patches). This improves performance at the cost of exposing vulnerabilities, which is acceptable in a controlled system without untrusted code. Reduce kernel boot time and improve performance. +- **maxcpus** - limits the number of CPU cores in use. This reduce power consumption and thermal load. 2 cores should be enough to running the system. + +Customize Raspberry Pi hardware behavior. Open the firmware configuration file for editing: +``` +sudo nano /boot/firmware/config.txt ``` -# 5 Minimal desktop +Change following settings to 0: +``` +camera_auto_detect=0 +auto_initramfs=0 +``` +- **camera_auto_detect** - disables automatic detection of the camera module. Speeds up boot by skipping camera initialisation. +- **auto_initramfs** - disables automatic searching for a matching initramfs, reducing boot time with default kernels. -# 6 ST terminal +Add additional tweaks: +``` +# Set GPU memory +gpu_mem=64 -# 7 Audio +# Disable bluetooth +dtoverlay=disable-bt -# 8 TV Output +# Disable the rainbow splash screen +disable_splash=1 -# 9 FastCarPlay +# Set the bootloader delay to 0 seconds. The default is 1s if not specified. +boot_delay=0 -# 10 Wifi scripts +# Disable PoE HAT fan control via I²C (reduce boot time) +disable_poe_fan=1 + +# Prevent reading HAT EEPROM on boot +force_eeprom_read=0 + +# Overclock the SD card interface by 100 MHz +dtparam=sd_overclock=100 + +# Enable turbo mode (max CPU/GPU frequency) for first 30 seconds after boot +initial_turbo=30 +``` + +# 6 Wifi scripts > [!TIP] > Our setup does not require a constant Wi-Fi connection, so we will manually enable Wi-Fi only when needed to install updates or create a hotspot to access the Pi for logs or control without internet. > To achieve this, we will create two scripts: @@ -385,8 +535,7 @@ sudo mkdir /opt/scripts ## WIFI hotspot with DHCP We will use **hostapd** to configure the hotspot and **dnsmasq** to provide DHCP addresses to connected clients. First, install both packages: ``` shell -sudo apt install dnsmasq -sudo apt install hostapd +sudo apt install --no-install-recommends dnsmasq hostapd ``` Since we will run these services manually, disable **dnsmasq** from starting automatically and stop it: ``` shell @@ -451,6 +600,9 @@ sudo ip link set wlan0 up echo "> Starting dnsmasq" sudo dnsmasq --interface=wlan0 --bind-interfaces --dhcp-range=10.0.10.2,10.0.10.20,255.255.255.0,12h & +echo "> Starting network services" +sudo systemctl start ssh.service + echo "> Starting hostapd" sudo hostapd /etc/hostapd/hostapd.conf & ``` @@ -482,20 +634,29 @@ sudo ip link set wlan0 up echo "> Starting wpa_supplicant" sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant-wlan0.conf + +echo "> Starting network services" +sudo systemctl start systemd-networkd.service sudo systemctl start systemd-timesyncd.service +sudo systemctl start ssh.service ``` > [!NOTE] > Replace wlan0 with your wireless interface, replace wpa_supplicant-wlan0.conf with wpa supplicant configuration created on step 3 -Finally we need to make script executable and disable automatic start of wpa_supplicant and timesync services cause we will run them manually now +Finally we need to make script executable and disable automatic start of wpa_supplicant, timesync, networkd and ssh services cause we will run them manually now ``` shell sudo chmod +x /opt/scripts/connect_wifi.sh sudo systemctl disable systemd-timesyncd.service sudo systemctl disable wpa_supplicant.service sudo systemctl disable wpa_supplicant@wlan0.service +sudo systemctl disable systemd-networkd.service +sudo systemctl disable systemd-networkd.socket +sudo systemctl disable ssh.service +sudo systemctl disable systemd-rfkill.service +sudo systemctl mask systemd-rfkill.service ``` ## Enable SUDO in scripts -Our scripts are using SUDO which require elevate permissions. Thats require to enter password, but we want to run scripts from menu. So we need to configure our user to run sudo commands without password. There is a way to configure certain commands only, but simple (and less secure) way is to enable everything. +Our scripts are using SUDO which require elevate permissions. Thats require to enter password, but we want to run scripts from non-console. So we need to configure our user to run sudo commands without password. There is a way to configure certain commands only, but simple (and less secure) way is to enable everything. > [!WARNING] > This might be already enabled on Raspberry Pi OS, so check if you can run those scripts without password @@ -505,19 +666,21 @@ sudo nano /etc/sudoers.d/010_pi-nopasswd ``` Put this into the file. Enable your user to execute all sudo commands without password ``` -raspberry ALL=(ALL) NOPASSWD: ALL +carplay ALL=(ALL) NOPASSWD: ALL ``` -## Add wifi scripts to JWM -Now we can add wifi scripts to JWM click menu. Edit main configurations -``` shell -sudo nano /etc/jwm/system.jwmrc -``` -Under \ add following lines. You can also add \ to make it into own section. -``` xml -/opt/scripts/enable_ap.sh -/opt/scripts/connect_wifi.sh -``` -Now you can restart JWM from mouse menu to check that scripts are there. After reboot you will need to activate one of those scripts to connect to wifi. -# 11 Tweaks -# 12 Overlay FS +# 7 Overlay FS + +# 8 Additional hardware + +## TV Output + +## I2S Audio + +# 9 Minimal desktop + +## ST terminal + +## Add wifi scripts to JWM + + diff --git a/pictures/rpi-mount1.png b/pictures/rpi-mount1.png index a1d4de0..93aeb68 100644 Binary files a/pictures/rpi-mount1.png and b/pictures/rpi-mount1.png differ diff --git a/pictures/rpi-mount2.png b/pictures/rpi-mount2.png index e88ff23..a955c4e 100644 Binary files a/pictures/rpi-mount2.png and b/pictures/rpi-mount2.png differ diff --git a/pictures/rpi-mount3.png b/pictures/rpi-mount3.png index 4ef83f4..401132f 100644 Binary files a/pictures/rpi-mount3.png and b/pictures/rpi-mount3.png differ diff --git a/pictures/rpi-partition1.png b/pictures/rpi-partition1.png index bbd8f05..873bfcb 100644 Binary files a/pictures/rpi-partition1.png and b/pictures/rpi-partition1.png differ diff --git a/pictures/rpi-partition2.png b/pictures/rpi-partition2.png index 5f11524..48f45f8 100644 Binary files a/pictures/rpi-partition2.png and b/pictures/rpi-partition2.png differ diff --git a/pictures/rpi-partition3.png b/pictures/rpi-partition3.png index 607a972..5ead7af 100644 Binary files a/pictures/rpi-partition3.png and b/pictures/rpi-partition3.png differ diff --git a/pictures/rpi-partition4.png b/pictures/rpi-partition4.png index 997ca87..45a1c95 100644 Binary files a/pictures/rpi-partition4.png and b/pictures/rpi-partition4.png differ diff --git a/pictures/rpi-partition5.png b/pictures/rpi-partition5.png deleted file mode 100644 index 4ee04e0..0000000 Binary files a/pictures/rpi-partition5.png and /dev/null differ