mirror of
https://github.com/niellun/FastCarPlay.git
synced 2026-06-11 02:47:47 +02:00
Story and formatting
+26
-1
@@ -11,7 +11,7 @@ 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, move /home to own partition](#2-partitioning)
|
||||
2. [Custom partition scheme: mount partitions, first boot, move /home to own partition](#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)
|
||||
@@ -35,28 +35,44 @@ This guide is build on following hardware:
|
||||
|
||||
> [!IMPORTANT]
|
||||
> - 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.
|
||||
From there I started to investigate other options to use the dongle with Linux and found [electric-monk's pycarplay](https://github.com/electric-monk/pycarplay) implementation. Also i decided to get really minimalistic and try to run everything on Raspberry Pi Zero 2W that I have already successfully connected to my car with RCA. But the problem came that all of the implementations were not using hardware decoding or required other frameworks that was not possible to run on 512 MB or RPI Zero 2W. So after several failed attempts to get smooth Carplay on RPI and digging into sources I decided to write own piece of software with something compilable to binary that will be CPU and Memory efficient and use HW decoding.
|
||||
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.
|
||||
|
||||

|
||||
|
||||
Choose **Raspberry Pi OS (other)** and select **Raspberry Pi OS Lite (32-bit)**. This provides a minimal Debian-based system with lower memory footprint.
|
||||
|
||||

|
||||
|
||||
Select the target micro-SD card you have inserted.
|
||||
|
||||

|
||||
|
||||
> [!NOTE]
|
||||
> There was a bug with **Customisation** step at the version 2.0.0 that do not create user properly. If customisation is working, set up hostname and locale as needed. Define the username and password. We will connect RPI directly to screen and keyboard and configure networking manually later, so leave the **Wi-Fi** section empty settings empty.
|
||||
> SSH also can be enabled so you can connect to the device later. Password authentication is sufficient for basic use and avoids managing key files, though public key authentication provides stronger security. In this setup the system won’t be connected to the internet except when manually managed or updated, so password authentication is sufficient.
|
||||
|
||||
Skip customisation step to set up accounts and locales on first boot.
|
||||
|
||||

|
||||
|
||||
Review the configuration and write the image to the SD card. Wait for the process to finish.
|
||||
|
||||

|
||||
|
||||
# 2 Partitioning
|
||||
> [!NOTE]
|
||||
>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.
|
||||
|
||||
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.
|
||||
|
||||
## 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
|
||||
@@ -68,15 +84,24 @@ You need to perform partitioning after flashing the image to the SD card. On the
|
||||
Plug your SD card in, or attach it to the virtual machine. Open **gparted** and select the SD card. You should see the **bootfs** and **rootfs** partitions, followed by free space.
|
||||
|
||||
**bootfs** contains the bootloader and firmware files needed for the system to start. **rootfs** holds the main filesystem with the OS and applications.
|
||||
|
||||

|
||||
|
||||
First, increase the size of **rootfs**. Open *Partition* → *Resize/Move* and set the new partition size. About 8 GB is sufficient for a minimal setup.
|
||||
|
||||

|
||||
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**.
|
||||
|
||||

|
||||
|
||||
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**.
|
||||
|
||||

|
||||
|
||||
Review the changes and apply them
|
||||
|
||||

|
||||
|
||||
## First boot
|
||||
|
||||
## Mount partitions
|
||||
|
||||
Reference in New Issue
Block a user