diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..496ee2c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..6cccee3 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +#Beepberry \ No newline at end of file diff --git a/gomuks b/gomuks new file mode 100644 index 0000000..395ca49 Binary files /dev/null and b/gomuks differ diff --git a/raspberrypi/README.md b/raspberrypi/README.md new file mode 100644 index 0000000..7ddcc12 --- /dev/null +++ b/raspberrypi/README.md @@ -0,0 +1,23 @@ +## Getting Started + +1. Use the [Raspberry Pi Imager tool](https://www.raspberrypi.com/software/) to flash an SD card with the latest image + - Choose the ***Raspberry Pi OS Lite (32-bit) image*** + - Click the gear icon to also setup WiFi and SSH + +2. SSH into the pi and update the kernel and reboot +``` +sudo apt-get update && sudo apt-get install raspberrypi-kernel +``` +``` +sudo shutdown -r now +``` + +3. Run the setup script +``` +curl -s https://raw.githubusercontent.com/beeper/beepberry/main/raspberrypi/setup.sh | bash +``` + +## Details +- In ```/boot/cmdline.txt```, edit ```fbcon=font:VGA8x8``` to change the font/size. See [fbcon](https://www.kernel.org/doc/Documentation/fb/fbcon.txt) for more details +- Long holding the "End Call" key (~3 seconds) will trigger KEY_POWER and safely shutdown the pi +- Holding the "End Call" button during power up will put the keyboard into bootloader mode; it will now appear as a USB storage device and you can drag'n'drop the new firmware (\*.uf2) into the drive and it will reboot with the new firmware diff --git a/raspberrypi/optimize_boot.sh b/raspberrypi/optimize_boot.sh new file mode 100755 index 0000000..2018022 --- /dev/null +++ b/raspberrypi/optimize_boot.sh @@ -0,0 +1,27 @@ +#!/bin/sh +#This script reduces boot times from 60s to 19s on the RPi0w + +if [ "$(id -u)" -ne 0 ]; then + echo "This script must be run as root" + exit 1 +fi + +echo ' +[all] +initial_turbo=30 +disable_splash=1 +dtoverlay=disable-bt +boot_delay=0 +' >> /boot/config.txt + +sed -i '1s/$/ loglevel=3 quiet logo.nologo consoleblank=0 fastboot/' /boot/cmdline.txt + +systemctl disable triggerhappy +systemctl disable systemd-timesyncd +systemctl disable polkit +systemctl disable ModemManager +systemctl disable avahi-daemon +systemctl disable dphys-swapfile +systemctl disable keyboard-setup +systemctl disable apt-daily +systemctl disable raspi-config diff --git a/raspberrypi/setup.sh b/raspberrypi/setup.sh new file mode 100755 index 0000000..561972a --- /dev/null +++ b/raspberrypi/setup.sh @@ -0,0 +1,32 @@ +#!/bin/bash +set -e + +echo "Enabling I2C, SPI, and Console Auto login..." +sudo raspi-config nonint do_i2c 0 || { echo "Error: Failed to enable I2C."; exit 1; } +sudo raspi-config nonint do_spi 0 || { echo "Error: Failed to enable SPI."; exit 1; } +sudo raspi-config nonint do_boot_behaviour B2 || { echo "Error: Failed to enable Console Auto login."; exit 1; } + +echo "Updating and installing dependencies..." +sudo apt-get -y install git raspberrypi-kernel-headers < "/dev/null" || { echo "Error: Failed to install dependencies."; exit 1; } + +echo "Compiling and installing display driver..." +cd ~/ +git clone https://github.com/w4ilun/Sharp-Memory-LCD-Kernel-Driver.git || { echo "Error: Failed to clone display driver repository."; exit 1; } +cd ~/Sharp-Memory-LCD-Kernel-Driver +make || { echo "Error: Failed to compile display driver."; exit 1; } +sudo make modules_install || { echo "Error: Failed to install display driver."; exit 1; } +sudo depmod -A || { echo "Error: Failed to update module dependencies."; exit 1; } +echo 'sharp' | sudo tee -a /etc/modules +dtc -@ -I dts -O dtb -o sharp.dtbo sharp.dts || { echo "Error: Failed to compile device tree."; exit 1; } +sudo cp sharp.dtbo /boot/overlays +echo -e "framebuffer_width=400\nframebuffer_height=240\ndtoverlay=sharp" | sudo tee -a /boot/config.txt +sudo sed -i ' 1 s/.*/& fbcon=map:10 fbcon=font:VGA8x16/' /boot/cmdline.txt || { echo "Error: Failed to modify cmdline.txt."; exit 1; } + +echo "Compiling and installing keyboard device driver..." +cd ~/ +git clone https://github.com/w4ilun/bbqX0kbd_driver.git || { echo "Error: Failed to clone keyboard driver repository."; exit 1; } +cd ~/bbqX0kbd_driver +./installer.sh --BBQ20KBD_TRACKPAD_USE BBQ20KBD_TRACKPAD_AS_KEYS --BBQX0KBD_INT BBQX0KBD_USE_INT || { echo "Error: Failed to install keyboard device driver."; exit 1; } + +echo "Rebooting..." +sudo shutdown -r now || { echo "Error: Failed to reboot."; exit 1; }