iDigitalFlame / RaspberryPi

ArchLinux ARM/AArch64 Build/Config/Install scripts for the RaspberryPi (https://www.raspberrypi.org)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RaspberryPi Builder

This repo is dedicated to my build, install and configuration scripts for the RaspberryPi.

You can use the install.sh script to install and configure an ArchLinux install that contains:

  • Auto DHCP for eth0
  • Read-only Root
  • BTRFS Cache partition
  • Local Console via UART

The install script requires a valid ArchLinuxARM tar blob, which one of the following can be used:

  • ARM7 (Pi1-Pi4/PiZero(W)/PiZero2)
    • With curl: curl -Lo ArchLinuxARM-rpi-armv7-latest.tar.gz http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-armv7-latest.tar.gz
    • With wget: wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-armv7-latest.tar.gz
  • ARM7 (Pi3-Pi4/PiZero2)
    • With curl: curl -Lo ArchLinuxARM-rpi-aarch64-latest.tar.gz http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-aarch64-latest.tar.gz
    • With wget: wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-aarch64-latest.tar.gz

Command Line Arguments

sudo bash install.sh <tar> <disk> [source script]

An example that should work "Out-Of-The-Box" would be:

ARM7

sudo bash install.sh ArchLinuxARM-rpi-armv7-latest.tar.gz /dev/mmcblk0

AArch64

sudo bash install.sh ArchLinuxARM-rpi-aarch64-latest.tar.gz /dev/mmcblk0

This example assumes the SD card you'd be using is at /dev/mmcblk0.

The last command line argument [source script] is a path to a script file that is executed in the Context of the PI (ARM7/AARCH64) before completion which allows you to install other programs, enable systemd units, etc. This optional argument is ignored if the path suggested does not exist, or is not a file.

Install Requirements

(on the computer you're using to install from):

  • qemu-arm-static from "qemu-user-static" (ARM chroot)
  • lsof from "lsof" (Process monitoring)
  • bsdtar from "libarchive" (Extraction)
  • mkfs.ext4 from "e2fsprogs" (Formatting)
  • mkfs.vfat from "dosfstools" (Formatting)
  • mkfs.btrfs from "btrfs-progs" (Formatting)

Building "config.sh"

The contents of "Config" directory are built using the build-config.py file with the arguments:

python build-config.py ./Config ./config.sh

This will generate the configuration script from any changes made in the Config folder. (Requires python3)

Default Login Credentials

The default login credentials are root:root. This works over SSH and local console. YOU SHOULD CHANGE THESE!

AArch64 Notes

If you are installing for the Pi3-Pi4 or PiZero2, you may use the AArch64 install. This script will detect if the install is AARCH64 and will update the filesystem accordingly. You are still required to used the correct tar image file.

About

ArchLinux ARM/AArch64 Build/Config/Install scripts for the RaspberryPi (https://www.raspberrypi.org)

License:Apache License 2.0


Languages

Language:Shell 93.6%Language:Python 6.4%