fix: Ignore Valve Steam Deck hardware due to using EFI but having no keys enrolled by default and add extra boot parameters (#33)
* fix: Ignore Valve Steam Deck hardware due to using EFI but having no keys enrolled by default. * fix: add extra boot parameters to fix steam deck resolution issue --------- Co-authored-by: Noel Miller <noelmiller@protonmail.com>
This commit is contained in:
		
							parent
							
								
									bdbcfde826
								
							
						
					
					
						commit
						ff58b2d122
					
				
							
								
								
									
										15
									
								
								Makefile
								
								
								
								
							
							
						
						
									
										15
									
								
								Makefile
								
								
								
								
							|  | @ -5,6 +5,7 @@ VERSION = 39 | |||
| IMAGE_REPO = ghcr.io/ublue-os | ||||
| IMAGE_NAME = base-main | ||||
| IMAGE_TAG = $(VERSION) | ||||
| EXTRA_BOOT_PARAMS = | ||||
| VARIANT = Kinoite | ||||
| WEB_UI = false | ||||
| 
 | ||||
|  | @ -48,11 +49,25 @@ lorax_templates/%.tmpl: lorax_templates/%.tmpl.in | |||
| # Step 2: Build boot.iso using Lorax
 | ||||
| boot.iso: lorax_templates/set_installer.tmpl lorax_templates/configure_upgrades.tmpl | ||||
| 	rm -Rf $(_BASE_DIR)/results | ||||
| 
 | ||||
| 	# Remove the "Test this media & install" menu entry | ||||
| 	sed -i '/menuentry '\''Test this media & install @PRODUCT@ @VERSION@'\'' --class fedora --class gnu-linux --class gnu --class os {/,/}/d' /usr/share/lorax/templates.d/99-generic/config_files/x86/grub2-bios.cfg | ||||
| 	sed -i '/menuentry '\''Test this media & install @PRODUCT@ @VERSION@'\'' --class fedora --class gnu-linux --class gnu --class os {/,/}/d' /usr/share/lorax/templates.d/99-generic/config_files/x86/grub2-efi.cfg | ||||
| 
 | ||||
| 	# Set the default menu entry to the first one | ||||
| 	sed -i 's/set default="1"/set default="0"/' /usr/share/lorax/templates.d/99-generic/config_files/x86/grub2-bios.cfg | ||||
| 	sed -i 's/set default="1"/set default="0"/' /usr/share/lorax/templates.d/99-generic/config_files/x86/grub2-efi.cfg | ||||
| 
 | ||||
| 	# Add Extra Boot Parameters to all menu entries | ||||
| 	sed -i 's/linux @KERNELPATH@ @ROOT@ quiet/linux @KERNELPATH@ @ROOT@ quiet $(EXTRA_BOOT_PARAMS)/g' /usr/share/lorax/templates.d/99-generic/config_files/x86/grub2-bios.cfg | ||||
| 	sed -i 's/linuxefi @KERNELPATH@ @ROOT@ quiet/linuxefi @KERNELPATH@ @ROOT@ quiet $(EXTRA_BOOT_PARAMS)/g' /usr/share/lorax/templates.d/99-generic/config_files/x86/grub2-efi.cfg | ||||
| 
 | ||||
| 	sed -i 's/linux @KERNELPATH@ @ROOT@ nomodeset quiet/linux @KERNELPATH@ @ROOT@ nomodeset quiet $(EXTRA_BOOT_PARAMS)/g' /usr/share/lorax/templates.d/99-generic/config_files/x86/grub2-bios.cfg | ||||
| 	sed -i 's/linuxefi @KERNELPATH@ @ROOT@ nomodeset quiet/linuxefi @KERNELPATH@ @ROOT@ nomodeset quiet $(EXTRA_BOOT_PARAMS)/g' /usr/share/lorax/templates.d/99-generic/config_files/x86/grub2-efi.cfg | ||||
| 
 | ||||
| 	sed -i 's/linux @KERNELPATH@ @ROOT@ inst.rescue quiet/linux @KERNELPATH@ @ROOT@ inst.rescue quiet $(EXTRA_BOOT_PARAMS)/g' /usr/share/lorax/templates.d/99-generic/config_files/x86/grub2-bios.cfg | ||||
| 	sed -i 's/linuxefi @KERNELPATH@ @ROOT@ inst.rescue quiet/linuxefi @KERNELPATH@ @ROOT@ inst.rescue quiet $(EXTRA_BOOT_PARAMS)/g' /usr/share/lorax/templates.d/99-generic/config_files/x86/grub2-efi.cfg | ||||
| 
 | ||||
| 	lorax -p $(IMAGE_NAME) -v $(VERSION) -r $(VERSION) -t $(VARIANT) \
 | ||||
|           --isfinal --buildarch=$(ARCH) --volid=$(_VOLID) \
 | ||||
|           $(_LORAX_ARGS) \
 | ||||
|  |  | |||
|  | @ -25,6 +25,9 @@ inputs: | |||
|   IMAGE_TAG: | ||||
|     description: Tag of the source container image | ||||
|     required: false | ||||
|   EXTRA_BOOT_PARAMS: | ||||
|     description: Extra params used by grub to boot the anaconda installer | ||||
|     required: false | ||||
|   WEB_UI: | ||||
|     description: Enable Anaconda WebUI | ||||
|     required: true | ||||
|  | @ -104,6 +107,7 @@ runs: | |||
|           VARIANT=${{ inputs.VARIANT }} \ | ||||
|           VERSION=${{ inputs.VERSION }} \ | ||||
|           WEB_UI=${{ inputs.WEB_UI }} | ||||
|           EXTRA_BOOT_PARAMS=${{ inputs.EXTRA_BOOT_PARAMS }} | ||||
| 
 | ||||
|     - name: Create deploy.iso and generate sha256 checksum | ||||
|       shell: bash | ||||
|  |  | |||
|  | @ -5,6 +5,12 @@ set -oue pipefail | |||
| readonly SECUREBOOT_KEY="/run/install/repo/ublue-os-akmods-public-key.der" | ||||
| readonly ENROLLMENT_PASSWORD="ublue-os" | ||||
| 
 | ||||
| SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)" | ||||
| if [[ ":Jupiter:Galileo:" =~ ":$SYS_ID:" ]]; then | ||||
| 	echo "Steam Deck hardware detected. Skipping key enrollment." | ||||
| 	exit 0 | ||||
| fi | ||||
| 
 | ||||
| if [[ ! -d "/sys/firmware/efi" ]]; then | ||||
| 	echo "EFI mode not detected. Skipping key enrollment." | ||||
| 	exit 0 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Kyle Gospodnetich
						Kyle Gospodnetich