fix typos
This commit is contained in:
parent
b36a53ca71
commit
aa3e4b5d1f
214
docs/base.md
214
docs/base.md
|
@ -1,107 +1,107 @@
|
||||||
# Base Firmware Setup
|
# 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.
|
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
|
# 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.
|
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
|
# 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.
|
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. 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. 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. 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. Login to the Ubuntu envrionment
|
||||||
1. Open a terminal
|
1. Open a terminal
|
||||||
1. Run ```sudo -sHu root``` to elevate your privileges
|
1. Run ```sudo -sHu root``` to elevate your privileges
|
||||||
|
|
||||||
# Prep / install arch linux on micro sd card
|
# Prep / install arch linux on micro sd card
|
||||||
|
|
||||||
## Inspiration and Further Reading
|
## 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://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)
|
- [https://github.com/phortx/Raspberry-Pi-Setup-Guide](https://github.com/phortx/Raspberry-Pi-Setup-Guide)
|
||||||
|
|
||||||
## Arch Linux Disk Setup
|
## 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.
|
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
|
``` sh
|
||||||
|
|
||||||
parted /dev/sda
|
parted /dev/sda
|
||||||
mklabel msdos
|
mklabel msdos
|
||||||
mkpart
|
mkpart
|
||||||
p
|
p
|
||||||
[enter]
|
[enter]
|
||||||
1
|
1
|
||||||
100M
|
100M
|
||||||
mkpart
|
mkpart
|
||||||
p
|
p
|
||||||
[enter]
|
[enter]
|
||||||
100M
|
100M
|
||||||
-1
|
-1
|
||||||
set 1 boot on
|
set 1 boot on
|
||||||
set 1 lba on
|
set 1 lba on
|
||||||
q
|
q
|
||||||
|
|
||||||
mkfs.vat /dev/sda1
|
mkfs.fat /dev/sda1
|
||||||
mkfs.btrfs /dev/sda2
|
mkfs.btrfs /dev/sda2
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Arch Linux Bootstrap
|
## Arch Linux Bootstrap
|
||||||
|
|
||||||
Run the following commands to bootstrap (initialize) a fundamental Arch Linux installation.
|
Run the following commands to bootstrap (initialize) a fundamental Arch Linux installation.
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
|
|
||||||
mkdir /mnt/arch
|
mkdir /mnt/arch
|
||||||
mount -o nodiratime,noatime,compress /dev/sda2 /mnt/arch
|
mount -o nodiratime,noatime,compress /dev/sda2 /mnt/arch
|
||||||
mkdir /mnt/arch/boot
|
mkdir /mnt/arch/boot
|
||||||
mount /dev/sda1 /mnt/arch/boot
|
mount /dev/sda1 /mnt/arch/boot
|
||||||
cd /mnt/arch
|
cd /mnt/arch
|
||||||
wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-4-latest.tar.gz
|
wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-4-latest.tar.gz
|
||||||
tar -xpf ArchLinuxARM-rpi-4-latest.tar.gz
|
tar -xpf ArchLinuxARM-rpi-4-latest.tar.gz
|
||||||
rm ArchLinuxARM-rpi-4-latest.tar.gz
|
rm ArchLinuxARM-rpi-4-latest.tar.gz
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Tweak Bootstrapped System
|
## 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.
|
The following commands will tweak the base Arch Linux distro to facilitate the needs of a photo frame as well as tune some of the debugging that's present in the default setup.
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
|
|
||||||
cat > /mnt/arch/boot/config.txt <<EOF
|
cat > /mnt/arch/boot/config.txt <<EOF
|
||||||
# KmN: Borrowed some stuff from majaro
|
# KmN: Borrowed some stuff from majaro
|
||||||
# See /boot/overlays/README for all available options
|
# See /boot/overlays/README for all available options
|
||||||
|
|
||||||
gpu_mem=512
|
gpu_mem=512
|
||||||
dtoverlay=miniuart-bt
|
dtoverlay=miniuart-bt
|
||||||
initramfs initramfs-linux.img followkernel
|
initramfs initramfs-linux.img followkernel
|
||||||
disable_overscan=1
|
disable_overscan=1
|
||||||
|
|
||||||
#enable vc4
|
#enable vc4
|
||||||
dtoverlay=vc4-fkms-v3d
|
dtoverlay=vc4-fkms-v3d
|
||||||
max_framebuffers=1
|
max_framebuffers=1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
nano -w /mnt/arch/boot/cmdline.txt
|
nano -w /mnt/arch/boot/cmdline.txt
|
||||||
root=mmcblk0p2 rootflags=nodiratime,noatime,compress rw rootwait
|
root=mmcblk0p2 rootflags=nodiratime,noatime,compress rw rootwait
|
||||||
remove kgdboc=ttyAMA0,115200
|
remove kgdboc=ttyAMA0,115200
|
||||||
|
|
||||||
|
|
||||||
parted /dev/sda
|
parted /dev/sda
|
||||||
set 1 boot on
|
set 1 boot on
|
||||||
set 1 lba on
|
set 1 lba on
|
||||||
set 2 lba on
|
set 2 lba on
|
||||||
|
q
|
||||||
```
|
```
|
||||||
|
|
||||||
## Boot Arch Linux
|
## Boot Arch Linux
|
||||||
|
|
||||||
That should do it for the bootstrapping process. You can now shutdown the Ubuntu environment via ```systemctl poweroff```, swap the micro sd cards and boot into the Arch Linux environment.
|
That should do it for the bootstrapping process. You can now shutdown the Ubuntu environment via ```systemctl poweroff```, swap the micro sd cards and boot into the Arch Linux environment.
|
||||||
|
|
||||||
You should not need the Ubuntu micro sd card at this point unless you need to recover or fix a broken Arch Linux installation.
|
You should not need the Ubuntu micro sd card at this point unless you need to recover or fix a broken Arch Linux installation.
|
||||||
|
|
Loading…
Reference in a new issue