Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/push_pr_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
types: [ hyperion_push ]

env:
PLATFORM: bookworm
PLATFORM: trixie

jobs:
image-builder:
Expand All @@ -28,8 +28,8 @@ jobs:
fail-fast: false
matrix:
pi-gen: [
{ branch: bookworm, architecture: armhf },
{ branch: bookworm-arm64, architecture: arm64 }
{ branch: master, architecture: armhf },
{ branch: arm64, architecture: arm64 }
]

steps:
Expand All @@ -51,12 +51,13 @@ jobs:
- name: 👷 Build
run: |
touch pi-gen/stage3/SKIP pi-gen/stage4/SKIP pi-gen/stage4/SKIP_IMAGES pi-gen/stage5/SKIP pi-gen/stage5/SKIP_IMAGES
cp -R stage2 pi-gen/
cp -R stage-hyperbian pi-gen/
touch pi-gen/stage-hyperbian/EXPORT_IMAGE
cp config pi-gen/ && cd pi-gen
echo "Suites: ${{ env.PLATFORM }}" >> "./stage-hyperbian/00-install-hyperion/files/hyperion.sources"
echo "Architectures: ${{ matrix.pi-gen.architecture }}" >> "./stage-hyperbian/00-install-hyperion/files/hyperion.sources"
echo "RELEASE='${{ env.PLATFORM }}'" >> "./config"
echo -e "\nRELEASE='${{ env.PLATFORM }}'" >> "./config"
sudo IMG_FILENAME=${{ env.HYPERBIAN }} ARCHIVE_FILENAME=${{ env.HYPERBIAN }} ./build.sh

- name: 📦 Upload
Expand Down
5 changes: 0 additions & 5 deletions config
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
IMG_NAME='HyperBian'
STAGE_LIST='stage0 stage1 stage2 stage-hyperbian'
TARGET_HOSTNAME='HyperBian'
DISABLE_FIRST_BOOT_USER_RENAME=1
SUDO_USER='hyperion'
FIRST_USER_NAME='hyperion'
FIRST_USER_PASS='ambientlight'
5 changes: 2 additions & 3 deletions stage-hyperbian/00-install-hyperion/00-run.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/bash -e

# Enable SPI and force HDMI output
echo '---> Enable SPI and force HDMI output'
sed -i "s/^#dtparam=spi=on.*/dtparam=spi=on/" ${ROOTFS_DIR}/boot/firmware/config.txt
# Force HDMI output
echo '---> Force HDMI output'
sed -i "s/^#hdmi_force_hotplug=1.*/hdmi_force_hotplug=1/" ${ROOTFS_DIR}/boot/firmware/config.txt

# Modify /usr/lib/os-release
Expand Down
2 changes: 1 addition & 1 deletion stage-hyperbian/00-install-hyperion/files/motd-hyperbian
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ printf "| __ | \ / | ___/ | __| | _ / | _ < | | / /\ \ | .
printf "| | | | | | | | | |____ | | \ \ | |_) | | | / ____ \ | |\ |\n"
printf "|_| |_| |_| |_| |______| |_| \_\ |____/ |_| /_/ \_\ |_| \_|\n"

printf "\nTo configure Hyperion browse to ${BLUE}http://${IP}:8090${NC} from another device on your network."
printf "\nTo configure Hyperion browse to ${BOLD}http://${IP}:8090${NC} from another device on your network."
printf "\nAll Hyperion configuration can be completed via the Hyperion Web UI.\n\n"

systemctl is-active hyperion@*.service >/dev/null 2>&1 && printf "Hyperion status: ${GREEN}⬤ Running${NC}\n" || printf "Hyperion status: ${RED}⬤ Stopped${NC}\n"
Expand Down
18 changes: 18 additions & 0 deletions stage2/04-cloud-init/files/meta-data
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This is the meta-data configuration file for cloud-init. Please refer to the
# cloud-init documentation for more information:
#
# https://cloudinit.readthedocs.io/

# Set the datasource mode to "local". This ensures that user-data is acted upon
# prior to bringing up the network (because everything about the datasource is
# assumed to be local). If you wish to use an HTTP datasource instead, you can
# change this to "net" or override it on the kernel cmdline (see README).
dsmode: local

# Specifies the "unique" identifier of the instance. Typically in cloud-init
# this is generated by the owning cloud and is actually unique (to some
# degree). Here our data-source is local, so this is just a fixed string.
# Warning: changing this will cause cloud-init to assume it is running on a
# "new" instance, and to go through first time setup again (the value is
# compared to a cached copy).
instance_id: rpios-image
25 changes: 25 additions & 0 deletions stage2/04-cloud-init/files/network-config
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
####################################################################################
## Configure your initial HyperBian Wifi connectivity to your needs below.
## Uncomment and edit the relevant sections as needed.
##
## If you have additional needs refer to the cloud-init documentation
## and the netplan reference for full details:
##
## https://netplan.io/reference
## https://cloudinit.readthedocs.io/en/latest/topics/network-config.html
## https://cloudinit.readthedocs.io/en/latest/topics/network-config-format-v2.html
####################################################################################

## Uncomment the below to enable the configuration
#network:
# version: 2
# wifis:
# wlan0:
# dhcp4: true
# optional: true
# access-points:
## Replace the elements below with your Wifi SSID and Password
# "YOUR_SSID":
# password: "YOUR_PASSWORD"
## Replace YOUR_COUNTRY_CODE with your 2-letter country code
# regulatory-domain: YOUR_COUNTRY_CODE
86 changes: 86 additions & 0 deletions stage2/04-cloud-init/files/user-data
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
## template: jinja
#cloud-config

# This is the user-data configuration file for cloud-init. By default this sets
# up an initial user called "ubuntu" with password "ubuntu", which must be
# changed at first login. However, many additional actions can be initiated on
# first boot from this file. The cloud-init documentation has more details:
#
# https://cloudinit.readthedocs.io/
#
# Please note that the YAML format employed by this file is sensitive to
# differences in whitespace; if you are editing this file in an editor (like
# Notepad) which uses literal tabs, take care to only use spaces for
# indentation. See the following link for more details:
#
# https://en.wikipedia.org/wiki/YAML
#

##################################################################
## Configure your initial HyperBian system to your needs below ###
## Uncomment and edit the relevant sections as needed. ###
##################################################################

# 1. Define the Hyperion user name (optional)
{% set HYPERION_USER = "hyperion" %}

# 2. Define, if ssh access should be enabled (optional)
{% set ENABLE_SSH = false %}

# 3. Set the system's hostname (optional)
hostname: hyperbian

# 4. Set the timezone for this instance (optional)
# the value of 'timezone' must exist in /usr/share/zoneinfo
# Run: timedatectl list-timezones

## Sample for Berlin timezone
#timezone: Europe/Berlin

# 5. Set the locale to a given locale; default: en_GB.UTF-8 (optional)
# Run: locale -a

## Sample for German locale
#locale: de_DE.UTF-8

# 6. Set up the keyboard layout (optional)
# See localectl(1), in particular the various list-x11-* sub-commands,
# to determine the available models, layouts, variants, and options
# Run: localectl list-x11-keymap-layouts

## Sample for German keyboard layout
#keyboard:
# layout: de

# 7. Enable the SPI interface (optional)
rpi:
interfaces:
spi: true

###############################
### DO NOT CHANGE THE BELOW ###
###############################

users:
- name: {{ HYPERION_USER }}
gecos: Hyperion user
groups: users, dialout, sudo, video, audio, gpio, spi, i2c
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
lock_passwd: false
passwd: $1$5RPVAd$vJeLqLb5KjHn0aqw69Oxq1
shell: /bin/bash

ssh_pwauth: {{ ENABLE_SSH }}

runcmd:
- |
echo "Running setup for Hyperion user: {{ HYPERION_USER }}"
/usr/share/hyperion/scripts/updateHyperionUser.sh -u "{{ HYPERION_USER }}"

{% if ENABLE_SSH %}
- systemctl unmask ssh
- systemctl enable ssh
- systemctl start ssh
{% else %}
- echo "SSH is disabled in config"
{% endif %}