#!ipxe

# Gentoo Operating System
# http://www.gentoo.org

:gentoo
clear gentoo_version
set os Gentoo
set os_arch ${arch}
iseq ${os_arch} x86_64 && set os_arch amd64 ||
iseq ${os_arch} i386 && set os_arch x86 ||
iseq ${os_arch} arm64 && set os_arch arm64 ||
menu ${os} - Current Arch [ ${os_arch} ]
item --gap ${os} Versions
iseq ${os_arch} amd64 && item 20260913T163055Z_amd64 ${space} ${os} 20260913T163055Z - amd64 ||
iseq ${os_arch} arm64 && item 20261025T234555Z_arm64 ${space} ${os} 20261025T234555Z - arm64 ||
iseq ${os_arch} x86 && item 20261006T170059Z_x86 ${space} ${os} 20261006T170059Z - x86 ||
choose gentoo_version || goto gentoo_exit
goto ${gentoo_version}

:20260913T163055Z_amd64
set url ${live_endpoint}/asset-mirror/releases/download/20260913T163055Z-245180de/
goto boot
:20261025T234555Z_arm64
set url ${live_endpoint}/asset-mirror/releases/download/20261025T234555Z-e9d13c28/
goto boot
:20261006T170059Z_x86
set url ${live_endpoint}/asset-mirror/releases/download/20261006T170059Z-066bbf20/
goto boot

:boot
imgfree
kernel ${url}vmlinuz ip=dhcp root=/dev/ram0 init=/linuxrc loop=/image.squashfs looptype=squashfs cdroot=1 initrd=initrd.magic ${cmdline}
initrd ${url}initrd
initrd ${url}image.squashfs /image.squashfs
boot

:gentoo_exit
clear menu
exit 0
