%global boot_distro fedora # Maintainer: Azkali Manad %global debug_package %{nil} %{!?boot_distro:%global boot_distro fedora} %if "%{boot_distro}" == "mithra" %global boot_suffix -mithra %else %global boot_suffix %{nil} %endif Name: switch-bootfiles%{boot_suffix} Version: 6.0 Release: 16.347 ExclusiveArch: aarch64 License: GPL-3.0-only Summary: Nintendo Switch %{boot_distro} bootstack %if "%{boot_distro}" == "mithra" Provides: switch-bootfiles = %{version}-%{release} Conflicts: switch-bootfiles %endif # Assets and BL33 are assembled by COPR, without a GitLab-built boot ZIP. %global pipeline_commit 35f50eaf27d28cf750dbc0d8f4984b4b3adb876c %global uboot_commit 12d7116345200d8b8bcdb42690256286e73a6e37 Source0: https://gitlab.com/l4t-community/gnu-linux/l4s-pipeline/-/archive/%{pipeline_commit}/l4s-pipeline-%{pipeline_commit}.tar.gz?path=scripts/bootloader/assets#/l4s-boot-assets.tar.gz BuildRequires: switch-uboot >= 2025.2b-5 BuildRequires: uboot-tools %description %{summary}. %prep %setup -q -n l4s-pipeline-%{pipeline_commit}-scripts-bootloader-assets %build # Refuse a payload from a different U-Boot revision, even with a matching name. test "$(cat %{_datadir}/l4s-boot/uboot.commit)" = '%{uboot_commit}' HKT_ID=$(printf '%%s' '%{boot_distro}' | cut -c1-3 | tr '[:lower:]' '[:upper:]') HKT_ID="SWR-$HKT_ID" sed "s/@DISTRO@/%{boot_distro}/g; s/@HKT_ID@/$HKT_ID/g" scripts/bootloader/assets/ini > L4T-%{boot_distro}.ini sed "s/setenv id .*$/setenv id $HKT_ID/" scripts/bootloader/assets/boot.txt > boot.txt grep -q "setenv id $HKT_ID$" boot.txt mkimage -A arm64 -T script -d boot.txt boot.scr %check test -s %{_datadir}/l4s-boot/bl33.bin dumpimage -l boot.scr | grep -q 'AArch64' %install install -d %{buildroot}/.boot/bootloader/ini %{buildroot}/boot/switchroot install -pm0644 L4T-%{boot_distro}.ini %{buildroot}/.boot/bootloader/ini/ install -pm0644 boot.scr scripts/bootloader/assets/bl31.bin %{_datadir}/l4s-boot/bl33.bin %{buildroot}/boot/switchroot/ icons=scripts/bootloader/assets/Hekate-Icons/%{boot_distro} if [ -d "$icons" ]; then install -pm0644 "$icons/logo_%{boot_distro}.bmp" "$icons/icon_%{boot_distro}_hue.bmp" %{buildroot}/boot/switchroot/ else install -pm0644 scripts/bootloader/assets/Hekate-Icons/linux/logo_linux.bmp %{buildroot}/boot/switchroot/logo_%{boot_distro}.bmp install -pm0644 scripts/bootloader/assets/Hekate-Icons/linux/icon_linux_hue.bmp %{buildroot}/boot/switchroot/icon_%{boot_distro}_hue.bmp fi %pre # Offline image installs must not mount the build host's MMC devices. if [ ! -d /run/systemd/system ] || systemd-detect-virt --chroot --quiet; then exit 0 fi [ -b /dev/mmcblk0 ] || exit 0 mkdir -p /boot/switchroot /.boot if ! mountpoint -q /boot/switchroot; then if ! mountpoint -q /.boot; then MMC_BLK="$(cat /proc/cmdline | awk -F 'boot_m=' '{print substr($2,0,1)}' | tr -d '\n')" MMC_PART="$(cat /proc/cmdline | awk -F 'boot_p=' '{print substr($2,0,1)}' | tr -d '\n')" [ -z "${MMC_PART}" ] && MMC_PART=1 if [ -e /dev/mmcblk1 ]; then if [ -n "${MMC_BLK}" ]; then umount /dev/mmcblk"${MMC_BLK}"p"${MMC_PART}" sleep 1 if mount /dev/mmcblk"${MMC_BLK}"p"${MMC_PART}" /.boot/; then BOOT_DEV_FOUND="true"; fi else umount /dev/mmcblk1p1 sleep 1 if mount /dev/mmcblk1p1 /.boot; then BOOT_DEV_FOUND="true"; fi fi else umount /dev/mmcblk0p"${MMC_PART}" sleep 1 if mount /dev/mmcblk0p"${MMC_PART}" /.boot; then BOOT_DEV_FOUND="true"; fi fi if [ "${BOOT_DEV_FOUND}" != "true" ]; then exit 1; fi fi mount --bind /.boot/switchroot/%{boot_distro} /boot/switchroot || exit 1 fi if [ -e "/.boot/bootloader/ini/L4T-%{boot_distro}.ini" ]; then cp /.boot/bootloader/ini/L4T-%{boot_distro}.ini /.boot/bootloader/ini/L4T-%{boot_distro}.ini.bak fi %posttrans if [ -e "/.boot/bootloader/ini/L4T-%{boot_distro}.ini.bak" ]; then cp /.boot/bootloader/ini/L4T-%{boot_distro}.ini.bak /.boot/bootloader/ini/L4T-%{boot_distro}.ini rm -f /.boot/bootloader/ini/L4T-%{boot_distro}.ini.bak fi %files /boot/switchroot/boot.scr /boot/switchroot/logo_%{boot_distro}.bmp /boot/switchroot/icon_%{boot_distro}_hue.bmp /boot/switchroot/bl31.bin /boot/switchroot/bl33.bin /.boot/bootloader/ini/* %changelog * Sat Oct 31 2026 Linux 4 Switch - 6.0-16 - Pin the f44 pipeline with the dock audio and touchswipe cleanup. * Sat Oct 31 2026 Linux 4 Switch - 6.0-15 - Only request the boot splash when fbconsole is disabled. * Sat Oct 24 2026 Linux 4 Switch - 6.0-14 - Set the boot script fallback id from the distro, not SWR-FED. * Sun Oct 18 2026 Linux 4 Switch - 6.0-12 - Assemble pinned assets and the L4S U-Boot payload in COPR.