Procházet zdrojové kódy

Add vmware photon (#1117)

* Add vmware photon
Antony Messerli před 3 roky
rodič
revize
df61129e35

+ 2 - 0
CHANGELOG.md

@@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file.
 ## [Unreleased]
 
 ## [2.0.59] - 0000-00-00
+#### Added
+- VMware Photon 4.0
 
 ## [2.0.58] - 2022-04-22
 #### Added

+ 1 - 0
README.md

@@ -180,6 +180,7 @@ In addition to being able to host netboot.xyz locally, you can also create your
 | Tiny Core Linux | https://tinycorelinux.net | Yes | Yes |
 | Ubuntu | https://www.ubuntu.com | Yes | Yes |
 | VMware | https://www.vmware.com | User supplied media | No |
+| VMware Photon | https://vmware.github.io/photon/ | Yes | No |
 | Voyager | https://voyagerlive.org | No | Yes |
 | VyOS | https://vyos.io | Yes | No |
 | Zen Installer | https://sourceforge.net/projects/revenge-installer | Yes | No |

+ 4 - 0
roles/netbootxyz/defaults/main.yml

@@ -388,6 +388,10 @@ releases:
     paths:
       7: /repo/OracleLinux/OL7/latest/x86_64
       8: /repo/OracleLinux/OL8/baseos/latest/x86_64
+  photon:
+    enabled: true
+    menu: linux
+    name: VMware Photon
   proxmox:
     enabled: true
     menu: linux

+ 1 - 0
roles/netbootxyz/templates/menu/linux-arm.ipxe.j2

@@ -15,6 +15,7 @@ item fedora ${space} Fedora
 item rhel ${space} Red Hat Enterprise Linux
 item rockylinux ${space} Rocky Linux
 item ubuntu ${space} Ubuntu
+item photon ${space} VMware Photon
 choose menu || goto linux_exit
 echo ${cls}
 goto ${menu} ||

+ 53 - 0
roles/netbootxyz/templates/menu/photon.ipxe.j2

@@ -0,0 +1,53 @@
+#!ipxe
+
+# VMware Photon
+# https://vmware.github.io/photon/
+
+goto ${menu} ||
+
+:photon
+set os {{ releases.photon.name }}
+set os_arch ${arch}
+iseq ${os_arch} x86_64 && set os_arch x86_64 ||
+iseq ${os_arch} arm64 && set os_arch aarch64 ||
+clear photon_choice
+menu ${os}
+{% for key, value in endpoints.items() | sort %}
+{% if value.os == "vmware-photon" and value.arch == "x86_64" %}
+item --gap ${os} Installers
+item photon_install ${space} ${os} {{ value.version }} Installer
+{% endif %}
+{% endfor %}
+choose photon_choice || goto photon_exit
+goto ${photon_choice}
+
+:photon_install
+iseq ${os_arch} x86_64 && goto x86_64 ||
+iseq ${os_arch} aarch64 && goto aarch64 ||
+:x86_64
+{% for key, value in endpoints.items() | sort %}
+{% if value.os == "vmware-photon" and value.arch == "x86_64" %}
+set kernel_url ${live_endpoint}{{ value.path }}
+set photon_version {{ value.version }}
+{% endif %}
+{% endfor %}
+goto photon_boot
+:aarch64
+{% for key, value in endpoints.items() | sort %}
+{% if value.os == "vmware-photon" and value.arch == "aarch64" %}
+set kernel_url ${live_endpoint}{{ value.path }}
+set photon_version {{ value.version }}
+{% endif %}
+{% endfor %}
+goto photon_boot
+
+:photon_boot
+imgfree
+kernel ${kernel_url}vmlinuz root=/dev/ram0 loglevel=3 repo=https://packages.vmware.com/photon/${photon_version}/photon_release_${photon_version}_${os_arch} {{ kernel_params }}
+initrd ${kernel_url}initrd.img
+boot
+goto photon
+
+:photon_exit
+exit 0
+