diff --git a/README.md b/README.md index 4691329..980bdfc 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,16 @@ This is very much a Work In Progress project. Early prototype builds (see [notes Additional tuning, documentation and integrations will be added to the repo over time. +# IMPORTANT CONSIDERATIONS + +## SSL Support + +The PiFrame project does **NOT** use SSL for anything unless it's a default setting for a given service. We have optimized the project to be managed via a trusted LAN and/or VPN solution (for multiple frames). + +Use acme.sh + vhosts + nginx if you really want SSL. There is plenty of great information online how to set up acme.sh + nginx + vhosts + SSL if you want to go this route. + +We will not discuss, entertain or bother debating our decision regarding SSL. It's an additional layer of complexity and not strictly required for the purposes of this project. + # Licensing Unless otherwise stated all source code is licensed under the [Apache 2 License](LICENSE-APACHE-2.0.txt). diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..67eea7d --- /dev/null +++ b/docs/README.md @@ -0,0 +1,5 @@ +# General Documentation + +This folder contains a bunch of general information on how to get the base of a PiFrame deployed. + +* [Base Firmware](base.md) diff --git a/docs/base.md b/docs/base.md new file mode 100644 index 0000000..1434b49 --- /dev/null +++ b/docs/base.md @@ -0,0 +1,107 @@ +# Base Firmware Setup + +The ```PiFrame``` uses Arch Linux at its core. This document will outline a way to setup a micro sd card with Arch Linux. + +# Please Note + +We assume you're going to use the Raspberry Pi itself for setting up an Arch Linux environment. In order to do this properly and safely, you'll need 2 micro sd cards and a USB to micro sd card adapter. + +# Setup an Ubuntu SD Card + +The first step is to setup a basic Ubuntu boot environment for the Raspberry Pi, we will use this to boot strap (initialize) the Arch Linux micro sd card. This Ubuntu micro sd card can also be used to recover a broken Arch Linux system if necessary. + +1. Download Ubuntu from their main [download site](https://ubuntu.com/download/raspberry-pi/thank-you?version=20.04&architecture=arm64+raspi) and flash it to the sd card. There are a lot of guides on how to do this online. +1. Boot the Ubuntu installation +1. Check the ip address with ```ip addr`` and ssh into the environment if desired. This step can be skipped if you have a keyboard/monitor setup. +1. Login to the Ubuntu envrionment +1. Open a terminal +1. Run ```sudo -sHu root``` to elevate your privileges + +# Prep / install arch linux on micro sd card + +## Inspiration and Further Reading + +- [https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-4#installation](https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-4#installation) +- [https://github.com/phortx/Raspberry-Pi-Setup-Guide](https://github.com/phortx/Raspberry-Pi-Setup-Guide) + +## Arch Linux Disk Setup + +Run the following commands to prep the Arch Linux micro sd card. Please note the device nodes like ```/dev/sda``` may be different depending on the usb adapter used. + +``` sh + +parted /dev/sda +mklabel msdos +mkpart + p + [enter] + 1 + 100M +mkpart + p + [enter] + 100M + -1 +set 1 boot on +set 1 lba on +q + +mkfs.vat /dev/sda1 +mkfs.btrfs /dev/sda2 + +``` + +## Arch Linux Bootstrap + +Run the following commands to bootstrap (initialize) a fundamental Arch Linux installation. + +``` sh + +mkdir /mnt/arch +mount -o nodiratime,noatime,compress /dev/sda2 /mnt/arch +mkdir /mnt/arch/boot +mount /dev/sda1 /mnt/arch/boot +cd /mnt/arch +wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-4-latest.tar.gz +tar -xpf ArchLinuxARM-rpi-4-latest.tar.gz +rm ArchLinuxARM-rpi-4-latest.tar.gz + +``` + +## Tweak Bootstrapped System + +The following commands will tweak the base Arch Linux distro to facilitate the needs of a photo fram as well as tune some of the debugging that's present in the default setup. + +``` sh + +cat > /mnt/arch/boot/config.txt <