Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add chimeraos graphical installer #60

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
2 changes: 2 additions & 0 deletions build-iso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ mkdir -p "${temp_dir}"
# add AUR packages to the build
AUR_PACKAGES="\
frzr \
gamescope-plus \
gamescope-session-git \
rtl88x2bu-dkms-git \
rtw89-dkms-git \
r8152-dkms \
Expand Down
98 changes: 2 additions & 96 deletions chimeraos/airootfs/root/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,101 +39,7 @@ while ! ( curl -Ls https://github.com | grep '<html' > /dev/null ); do
done
#######################################

MOUNT_PATH=/tmp/frzr_root
gamescope -- ./chimeraos-installer.x86_64

if ! frzr-bootstrap gamer; then
whiptail --msgbox "System bootstrap step failed." 10 50
exit 1
fi

#### Post install steps for system configuration
# Copy over all network configuration from the live session to the system
SYS_CONN_DIR="/etc/NetworkManager/system-connections"
if [ -d ${SYS_CONN_DIR} ] && [ -n "$(ls -A ${SYS_CONN_DIR})" ]; then
mkdir -p -m=700 ${MOUNT_PATH}${SYS_CONN_DIR}
cp ${SYS_CONN_DIR}/* \
${MOUNT_PATH}${SYS_CONN_DIR}/.
fi

# Grab the steam bootstrap for first boot

URL="https://steamdeck-packages.steamos.cloud/archlinux-mirror/jupiter-main/os/x86_64/steam-jupiter-stable-1.0.0.76-1-x86_64.pkg.tar.zst"
TMP_PKG="/tmp/package.pkg.tar.zst"
TMP_FILE="/tmp/bootstraplinux_ubuntu12_32.tar.xz"
DESTINATION="/tmp/frzr_root/etc/first-boot/"
if [[ ! -d "$DESTINATION" ]]; then
mkdir -p /tmp/frzr_root/etc/first-boot
fi

curl -o "$TMP_PKG" "$URL"
tar -I zstd -xvf "$TMP_PKG" usr/lib/steam/bootstraplinux_ubuntu12_32.tar.xz -O > "$TMP_FILE"
mv "$TMP_FILE" "$DESTINATION"
rm "$TMP_PKG"

MENU_SELECT=$(whiptail --menu "Installer Options" 25 75 10 \
"Standard Install" "Install ChimeraOS with default options." \
"Advanced Install" "Install ChimeraOS with advanced options." \
3>&1 1>&2 2>&3)

if [ "$MENU_SELECT" = "Advanced Install" ]; then
OPTIONS=$(whiptail --separate-output --checklist "Choose options" 10 55 4 \
"Use Firmware Overrides" "DSDT/EDID" OFF \
"Unstable Builds" "" OFF 3>&1 1>&2 2>&3)

if echo "$OPTIONS" | grep -q "Use Firmware Overrides"; then
echo "Enabling firmware overrides..."
if [[ ! -d "/tmp/frzr_root/etc/device-quirks/" ]]; then
mkdir -p "/tmp/frzr_root/etc/device-quirks"
# Create device-quirks default config
cat >"/tmp/frzr_root/etc/device-quirks/device-quirks.conf" <<EOL
export USE_FIRMWARE_OVERRIDES=1
export USB_WAKE_ENABLED=1
EOL
# Create dsdt_override.log with default values
cat >"/tmp/frzr_root/etc/device-quirks/dsdt_override.log" <<EOL
LAST_DSDT=None
LAST_BIOS_DATE=None
LAST_BIOS_RELEASE=None
LAST_BIOS_VENDOR=None
LAST_BIOS_VERSION=None
EOL
fi
fi

if echo "$OPTIONS" | grep -q "Unstable Builds"; then
TARGET="unstable"
fi
fi


export SHOW_UI=1

if ( ls -1 /dev/disk/by-label | grep -q FRZR_UPDATE ); then

CHOICE=$(whiptail --menu "How would you like to install ChimeraOS?" 18 50 10 \
"local" "Use local media for installation." \
"online" "Fetch the latest stable image." \
3>&1 1>&2 2>&3)
fi

if [ "${CHOICE}" == "local" ]; then
export local_install=true
frzr-deploy
RESULT=$?
else
frzr-deploy chimeraos/chimeraos:${TARGET}
RESULT=$?
fi

MSG="Installation failed."
if [ "${RESULT}" == "0" ]; then
MSG="Installation successfully completed."
elif [ "${RESULT}" == "29" ]; then
MSG="GitHub API rate limit error encountered. Please retry installation later."
fi

if (whiptail --yesno "${MSG}\n\nWould you like to restart the computer now?" 10 50); then
reboot
fi
bash -i

exit ${RESULT}
2 changes: 1 addition & 1 deletion chimeraos/efiboot/loader/entries/archiso-x86_64-linux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-chimeraos
initrd /%INSTALL_DIR%/boot/intel-ucode.img
initrd /%INSTALL_DIR%/boot/amd-ucode.img
initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-chimeraos.img
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% nomodeset
options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
13 changes: 13 additions & 0 deletions chimeraos/packages.x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,16 @@ wget
zsh
frzr
networkmanager
libva-intel-driver
libva-vdpau-driver
pipewire
pipewire-alsa
pipewire-jack
pipewire-pulse
vulkan-icd-loader
xf86-video-amdgpu
mesa
mesa-vdpau
vulkan-intel
vulkan-radeon
vulkan-tools
1 change: 1 addition & 0 deletions chimeraos/profiledef.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ file_permissions=(
["/root"]="0:0:750"
["/root/install.sh"]="0:0:755"
["/root/.automated_script.sh"]="0:0:755"
["/root/chimeraos-installer.x86_64"]="0:0:755"
["/usr/local/bin/choose-mirror"]="0:0:755"
["/usr/local/bin/Installation_guide"]="0:0:755"
["/usr/local/bin/livecd-sound"]="0:0:755"
Expand Down
2 changes: 1 addition & 1 deletion chimeraos/syslinux/archiso_sys-linux.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ ENDTEXT
MENU LABEL Install ChimeraOS
LINUX /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-chimeraos
INITRD /%INSTALL_DIR%/boot/intel-ucode.img,/%INSTALL_DIR%/boot/amd-ucode.img,/%INSTALL_DIR%/boot/x86_64/initramfs-linux-chimeraos.img
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% nomodeset
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
7 changes: 5 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ FROM archlinux:base-devel
MAINTAINER Wouter Wijsman

#Install archiso
RUN yes | pacman -Syuu archiso lynx
RUN pacman --noconfirm -S --needed git pyalpm python-commonmark python-markdown-it-py python-wheel python-build python-installer python-setuptools python-hatchling
RUN pacman-key --init && \
pacman -Sy --noconfirm archlinux-keyring && \
pacman-key --populate archlinux && \
pacman --noconfirm -Syu
RUN pacman --noconfirm -S --needed archiso lynx git pyalpm python-commonmark python-markdown-it-py python-wheel python-build python-installer python-setuptools python-hatchling
RUN echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
useradd build -G wheel -m
RUN su - build -c "git clone https://aur.archlinux.org/pikaur.git /tmp/pikaur" && \
Expand Down