Skip to content

Commit

Permalink
Fix HyperBian build (thanks @Lord-Grey)
Browse files Browse the repository at this point in the history
  • Loading branch information
Paulchen-Panther committed Nov 19, 2023
1 parent 73aa912 commit 623f5ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions config
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ TARGET_HOSTNAME='HyperBian'
DISABLE_FIRST_BOOT_USER_RENAME=1
FIRST_USER_NAME='hyperion'
FIRST_USER_PASS='ambientlight'
SUDO_USER='hyperion'
12 changes: 7 additions & 5 deletions stage-hyperbian/00-install-hyperion/00-run.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#!/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/config.txt
sed -i "s/^#hdmi_force_hotplug=1.*/hdmi_force_hotplug=1/" ${ROOTFS_DIR}/boot/config.txt

# Determine Hyperion Version
HYPERION_VERSION=$(curl -sL "https://github.com/hyperion-project/hyperion.ng/raw/master/.version")

# Modify /usr/lib/os-release
echo '---> Customize HyperBian'
sed -i "s/Raspbian/HyperBian/gI" ${ROOTFS_DIR}/usr/lib/os-release
sed -i "s/^NAME=.*$/NAME=\"HyperBian ${HYPERION_VERSION}\"/g" ${ROOTFS_DIR}/usr/lib/os-release
sed -i "s/^VERSION=.*$/VERSION=\"${HYPERION_VERSION}\"/g" ${ROOTFS_DIR}/usr/lib/os-release
Expand All @@ -16,8 +18,8 @@ sed -i "s/^SUPPORT_URL=.*$/SUPPORT_URL=\"https:\/\/hyperion-project.org\/\"/g" $
sed -i "s/^BUG_REPORT_URL=.*$/BUG_REPORT_URL=\"https:\/\/hyperion-project.org\/\"/g" ${ROOTFS_DIR}/usr/lib/os-release

# Custom motd
rm "${ROOTFS_DIR}"/etc/motd
rm "${ROOTFS_DIR}"/etc/update-motd.d/10-uname
rm -f "${ROOTFS_DIR}"/etc/motd
rm -f "${ROOTFS_DIR}"/etc/update-motd.d/10-uname
install -m 755 files/motd-hyperbian "${ROOTFS_DIR}"/etc/update-motd.d/10-hyperbian

# DEB822 source file
Expand All @@ -27,10 +29,10 @@ install -m 644 files/hyperion.sources ${ROOTFS_DIR}/etc/apt/sources.list.d/
sed -i "s/^#PrintLastLog yes.*/PrintLastLog no/" ${ROOTFS_DIR}/etc/ssh/sshd_config

on_chroot << EOF
echo '---> Import the public GPG key from the Repository Server into HyperBian'
echo '---> Import public repository key into HyperBian'
wget -qO- https://releases.hyperion-project.org/hyperion.pub.key | gpg --dearmor -o /usr/share/keyrings/hyperion.pub.gpg
echo '---> Update the APT sources and installing Hyperion'
echo '---> Update and installing Hyperion'
apt-get update && apt-get -y install hyperion
echo 'Registering Hyperion'
echo '---> Registering Hyperion'
systemctl -q enable hyperion"@hyperion".service
EOF

0 comments on commit 623f5ce

Please sign in to comment.