i think the ipxe building stuff is done

This commit is contained in:
brent s. 2020-06-22 20:58:47 -04:00
parent e70294dcfd
commit bb73c05a6f
Signed by: bts
GPG Key ID: 8C004C2F93481F6B
4 changed files with 172 additions and 15 deletions

View File

@ -5,6 +5,13 @@

<xs:include schemaLocation="../types/unix.xsd"/>
<xs:include schemaLocation="../types/ipxe.xsd"/>
<xs:include schemaLocation="../types/git.xsd"/>

<xs:complexType name="e_ipxe_extratargets">
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="target" type="t_ipxe_extratarget" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="e_ipxe_opts">
<xs:choice minOccurs="1" maxOccurs="2">
@ -32,12 +39,24 @@
</xs:sequence>
<xs:attribute name="subDir" type="t_unix_reldirpath" use="optional"/>
</xs:complexType>
<xs:complexType name="e_ipxe_patch">

<xs:complexType name="e_ipxe_scripts">
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="patchFile" minOccurs="1" maxOccurs="unbounded" type="t_unix_relfilepath"/>
<xs:element name="script" minOccurs="1" maxOccurs="unbounded" type="t_ipxe_script"/>
</xs:sequence>
<xs:attribute name="srcDir" type="t_unix_anydir" use="optional"/>
</xs:complexType>

<xs:complexType name="e_ipxe_upstream">
<xs:sequence>
<xs:choice minOccurs="1" maxOccurs="2">
<xs:element name="dest" minOccurs="1" maxOccurs="1" type="t_unix_dirpath"/>
<xs:choice minOccurs="1" maxOccurs="1">
<xs:element name="git" minOccurs="0" type="t_git_remote"/>
<xs:element name="tarball" minOccurs="0" type="t_ipxe_tarball"/>
</xs:choice>
</xs:choice>
</xs:sequence>
<xs:attribute name="patchDir" type="t_unix_anydir" use="optional"/>
</xs:complexType>

</xs:schema>

53
schema/lib/types/git.xsd Normal file
View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified">

<xs:simpleType name="t_git_commit">
<xs:restriction base="xs:token">
<xs:pattern value="[A-Fa-f0-9]{4,40}"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="t_git_ref">
<xs:union memberTypes="xs:token t_git_commit"/>
</xs:simpleType>

<xs:simpleType name="t_git_reftypes">
<xs:restriction base="xs:token">
<xs:enumeration value="branch"/><!-- a.k.a. "head" -->
<xs:enumeration value="head"/><!-- a.k.a. "branch" -->
<xs:enumeration value="tag"/>
<xs:enumeration value="commit"/><!-- a.k.a. "rev" -->
<xs:enumeration value="rev"/><!-- a.k.a. "commit" -->
</xs:restriction>
</xs:simpleType>

<!--
<xs:complexType name="t_git_remote">
<xs:simpleContent>
<xs:extension base="t_git_uri">
<xs:attribute name="refType" use="optional" default="branch" type="t_git_reftypes"/>
<xs:attribute name="ref" use="optional" default="master" type="t_git_reftypes"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
-->
<xs:complexType name="t_git_remote">
<xs:sequence minOccurs="1" maxOccurs="1">
<xs:choice minOccurs="1" maxOccurs="3">
<xs:element name="refType" minOccurs="0" maxOccurs="1" type="t_git_reftypes" default="branch"/>
<xs:element name="ref" minOccurs="0" maxOccurs="1" type="t_git_ref" default="master"/>
<xs:element name="uri" minOccurs="1" maxOccurs="1" type="t_git_uri"/>
</xs:choice>
</xs:sequence>
</xs:complexType>

<xs:simpleType name="t_git_uri">
<xs:restriction base="xs:anyURI">
<xs:pattern value="(https?|git|file)://.*"/>
</xs:restriction>
</xs:simpleType>

</xs:schema>

View File

@ -5,11 +5,77 @@

<xs:include schemaLocation="../types/unix.xsd"/>

<xs:complexType name="t_ipxe_extratarget">
<xs:simpleContent>
<xs:extension base="t_unix_reldirpath">
<xs:attribute name="subDir" use="optional" default="." type="t_unix_reldirpath"/>
<xs:attribute name="baseName" use="optional" type="t_unix_portablePosixFilename"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>

<xs:complexType name="t_ipxe_patch">
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="patchFile" minOccurs="1" maxOccurs="unbounded" type="t_unix_relfilepath"/>
</xs:sequence>
<xs:attribute name="patchDir" type="t_unix_anydir" use="optional"/>
</xs:complexType>

<xs:simpleType name="t_ipxe_patchopt">
<xs:restriction base="xs:token">
<xs:pattern value="[A-Z0-9_]+"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="t_ipxe_rom_firmware">
<xs:restriction base="xs:token">
<!-- iPXE Makefile, target "ALL" -->
<xs:enumeration value="rtl8139"/>
<xs:enumeration value="8086100e"/>
<xs:enumeration value="80861209"/>
<xs:enumeration value="10500940"/>
<xs:enumeration value="10222000"/>
<xs:enumeration value="10ec8139"/>
<xs:enumeration value="1af41000"/>
<xs:enumeration value="8086100f"/>
<xs:enumeration value="808610d3"/>
<xs:enumeration value="15ad07b0"/>
</xs:restriction>
</xs:simpleType>

<xs:complexType name="t_ipxe_rom_type">
<xs:sequence minOccurs="1" maxOccurs="2">
<xs:element name="romType" minOccurs="1"/>
</xs:sequence>
</xs:complexType>

<xs:simpleType name="t_ipxe_rom_type_types">
<xs:restriction base="xs:token">
<!-- iPXE Makefile, target "ALL" -->
<xs:enumeration value="rom"/>
<xs:enumeration value="mrom"/>
</xs:restriction>
</xs:simpleType>

<xs:complexType name="t_ipxe_roms">
<xs:sequence minOccurs="1">
<xs:element name="rom" type="t_ipxe_rom_firmware" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="t_ipxe_script">
<xs:simpleContent>
<xs:extension base="t_unix_portablePosixFilename">
<xs:attribute name="prefix" type="xs:token" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>

<xs:simpleType name="t_ipxe_tarball">
<xs:restriction base="xs:anyURI">
<xs:pattern value="https?://.*\.(tar\.((x|g)?z|bz2)?|zip)"/>
</xs:restriction>
</xs:simpleType>

</xs:schema>

View File

@ -16,20 +16,39 @@
<xs:element name="source">
<xs:complexType>
<xs:sequence minOccurs="0">
<xs:element name="patchSet" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="2">
<xs:element name="switchOpts" maxOccurs="1" type="e_ipxe_optswitch"/>
<xs:element name="patch" maxOccurs="1" type="e_ipxe_patch"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:choice minOccurs="1" maxOccurs="unbounded">
<xs:element name="patchSet" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="2">
<xs:element name="switchOpts" maxOccurs="1" type="e_ipxe_optswitch"/>
<xs:element name="patch" maxOccurs="1" type="t_ipxe_patch"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="upstream" minOccurs="1" maxOccurs="1" type="e_ipxe_upstream"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="srcDir" type="t_unix_dirpath" use="required"/>
<xs:attribute name="upstream" type="xs:anyURI" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="build"/>
<xs:element name="build">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="3">
<xs:choice minOccurs="1" maxOccurs="3">
<xs:element name="dest" minOccurs="1" maxOccurs="1" type="t_unix_dirpath"/>
<xs:element name="scripts" minOccurs="1" maxOccurs="1" type="e_ipxe_scripts"/>
<xs:element name="roms" minOccurs="1" maxOccurs="1" type="t_ipxe_roms"/>
<xs:element name="extraTargets" minOccurs="0" maxOccurs="1" type="e_ipxe_extratargets"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="iso" type="xs:boolean" use="optional" default="false"/>
<xs:attribute name="usb" type="xs:boolean" use="optional" default="false"/>
<xs:attribute name="floppy" type="xs:boolean" use="optional" default="false"/>
<xs:attribute name="mbr" type="xs:boolean" use="optional" default="false"/>
<xs:attribute name="pxe" type="xs:boolean" use="optional" default="false"/>
<xs:attribute name="undi" type="xs:boolean" use="optional" default="false"/>
</xs:complexType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>