2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2026-10-12 08:12:34 +00:00

chore(xcat-dep): remove the unused gPXE and 2010 iPXE source trees (#83)

No build script, manifest or test uses gpxe/, the gPXE 0.9.7 to 1.0.1
sources and patches, or ipxe/, an iPXE snapshot from 2010. No published
package comes from them. The xNBA builds take their source from xnba/,
and ipxe-xcat repackages the iPXE release from ipxe-xcat/.
This commit is contained in:
Vinícius Ferrão
2026-10-05 23:49:57 -03:00
committed by GitHub
parent c7a219843e
commit cce94c1a18
1094 changed files with 0 additions and 362876 deletions
-6
View File
@@ -1,6 +0,0 @@
gpxe for Debian
---------------
<possible notes regarding this package - if none, delete this file>
-- root <root@unknown> Fri, 29 Oct 2010 18:22:52 +0100
-9
View File
@@ -1,9 +0,0 @@
gpxe for Debian
---------------
<this file describes information about the source package, see Debian policy
manual section 4.14. You WILL either need to modify or delete this file>
-11
View File
@@ -1,11 +0,0 @@
xnba-undi (1.0.1-2) unstable; urgency=low
* Initial Debian build
-- Mark Hamzy <hamzy@us.ibm.com> Mon, 02 May 2011 13:05:49 -0500
xnba-undi (1.0.1-1) unstable; urgency=low
* Initial release
-- OCF xCAT <xcat@ocf.co.uk> Fri, 29 Oct 2010 18:22:52 +0100
-1
View File
@@ -1 +0,0 @@
7
-17
View File
@@ -1,17 +0,0 @@
Source: xnba-undi
Section: admin
Priority: extra
Maintainer: Arif Ali <aali@ocf.co.uk>
Build-Depends: debhelper (>= 7.0.50~)
Standards-Version: 3.8.4
#Homepage: <insert the upstream URL, if relevant>
#Vcs-Git: git://git.debian.org/collab-maint/gpxe.git
#Vcs-Browser: http://git.debian.org/?p=collab-maint/gpxe.git;a=summary
Package: xnba-undi
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: xCAT Network Boot Agent for x86 PXE hosts
The xCAT Network Boot Agent is a slightly modified version of gPXE.
It provides enhanced boot features for any UNDI compliant x86 host.
This includes iSCSI, http/ftp downloads, and gPXE script based booting.
-621
View File
@@ -1,621 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
-1
View File
@@ -1 +0,0 @@
tftpboot/xcat
-1
View File
@@ -1 +0,0 @@
README
-1
View File
@@ -1 +0,0 @@
tftpboot/xcat/xnba.kpxe
@@ -1,14 +0,0 @@
diff -urN gpxe-0.9.7/src/config/general.h gpxe-0.9.7-branded/src/config/general.h
--- gpxe-0.9.7/src/config/general.h 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-branded/src/config/general.h 2009-06-23 06:24:54.000000000 -0400
@@ -22,8 +22,8 @@
* "gPXE".
*
*/
-#define PRODUCT_NAME ""
-#define PRODUCT_SHORT_NAME "gPXE"
+#define PRODUCT_NAME "xCAT Network Boot Agent"
+#define PRODUCT_SHORT_NAME "xCAT NBA"
/*
* Timer configuration
@@ -1,48 +0,0 @@
diff -urN gpxe-0.9.7/src/net/arp.c gpxe-0.9.7-ignorepackets/src/net/arp.c
--- gpxe-0.9.7/src/net/arp.c 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-ignorepackets/src/net/arp.c 2009-07-02 13:58:19.000000000 -0400
@@ -238,7 +238,7 @@
goto done;
/* Create new ARP table entry if necessary */
- if ( ! merge ) {
+ if ( ( arphdr->ar_op == htons ( ARPOP_REPLY ) ) && ( ! merge ) ) {
arp = &arp_table[next_new_arp_entry++ % NUM_ARP_ENTRIES];
arp->ll_protocol = ll_protocol;
arp->net_protocol = net_protocol;
diff -urN gpxe-0.9.7/src/net/icmp.c gpxe-0.9.7-ignorepackets/src/net/icmp.c
--- gpxe-0.9.7/src/net/icmp.c 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-ignorepackets/src/net/icmp.c 2009-07-02 14:04:53.000000000 -0400
@@ -67,11 +67,14 @@
}
/* We respond only to pings */
- if ( icmp->type != ICMP_ECHO_REQUEST ) {
+ /* Always discard, responding to pings is more than most systems do in this state and
+ * gPXE is in a relatively precarious position, resource management wise, and thus it is
+ * easier just to disable this function. */
+ /* if ( icmp->type != ICMP_ECHO_REQUEST ) { */
DBG ( "ICMP ignoring type %d\n", icmp->type );
rc = 0;
goto done;
- }
+ /* } */
DBG ( "ICMP responding to ping\n" );
diff -urN gpxe-0.9.7/src/net/tcp.c gpxe-0.9.7-ignorepackets/src/net/tcp.c
--- gpxe-0.9.7/src/net/tcp.c 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-ignorepackets/src/net/tcp.c 2009-07-02 14:00:46.000000000 -0400
@@ -904,7 +904,11 @@
/* If no connection was found, send RST */
if ( ! tcp ) {
- tcp_xmit_reset ( tcp, st_src, tcphdr );
+ /* We simply drop unrecognized TCP connections. Hopefully, this is no worse than I typically set up a firewall.
+ * If we try to even remotely respond to random TCP streams, it can exhaust gPXE resources easily in a very large
+ * environment */
+ /* tcp_xmit_reset ( tcp, st_src, tcphdr ); Don't consume precious outbound resource for irrelevant communication. */
+
rc = -ENOTCONN;
goto discard;
}
@@ -1,13 +0,0 @@
diff -urN gpxe-0.9.7/src/arch/i386/prefix/romprefix.S gpxe-0.9.7-kvm/src/arch/i386/prefix/romprefix.S
--- gpxe-0.9.7/src/arch/i386/prefix/romprefix.S 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-kvm/src/arch/i386/prefix/romprefix.S 2009-04-24 04:54:03.000000000 -0400
@@ -715,7 +715,9 @@
movl %fs:(0x6c), %eax
1: pushf
sti
+ nop
hlt
+ nop
popf
cmpl %fs:(0x6c), %eax
je 1b
@@ -1,12 +0,0 @@
diff -urN gpxe-0.9.7/src/arch/i386/drivers/net/undinet.c gpxe-0.9.7-undinet/src/arch/i386/drivers/net/undinet.c
--- gpxe-0.9.7/src/arch/i386/drivers/net/undinet.c 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-undinet/src/arch/i386/drivers/net/undinet.c 2010-01-26 10:06:31.000000000 -0500
@@ -427,7 +427,7 @@
"nop\n\t"
"nop\n\t"
"cli\n\t" ) : : );
- return;
+ //return;
}
/* Start ISR processing */
@@ -1,11 +0,0 @@
diff -urN gpxe-1.0.0/src/arch/i386/include/bzimage.h gpxe-1.0.0-cmdlinefix/src/arch/i386/include/bzimage.h
--- gpxe-1.0.0/src/arch/i386/include/bzimage.h 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-cmdlinefix/src/arch/i386/include/bzimage.h 2010-03-04 13:52:13.000000000 -0500
@@ -137,6 +137,6 @@
#define BZI_STACK_SIZE 0x1000
/** Maximum size of command line */
-#define BZI_CMDLINE_SIZE 0x100
+#define BZI_CMDLINE_SIZE 0x7FF
#endif /* _BZIMAGE_H */
@@ -1,91 +0,0 @@
diff -urN gpxe-1.0.0/src/config/general.h gpxe-1.0.0-xnbaconfig/src/config/general.h
--- gpxe-1.0.0/src/config/general.h 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-xnbaconfig/src/config/general.h 2010-02-06 11:54:02.000000000 -0500
@@ -56,7 +56,7 @@
#define DOWNLOAD_PROTO_TFTP /* Trivial File Transfer Protocol */
#define DOWNLOAD_PROTO_HTTP /* Hypertext Transfer Protocol */
#undef DOWNLOAD_PROTO_HTTPS /* Secure Hypertext Transfer Protocol */
-#undef DOWNLOAD_PROTO_FTP /* File Transfer Protocol */
+#define DOWNLOAD_PROTO_FTP /* File Transfer Protocol */
#undef DOWNLOAD_PROTO_TFTM /* Multicast Trivial File Transfer Protocol */
#undef DOWNLOAD_PROTO_SLAM /* Scalable Local Area Multicast */
@@ -65,7 +65,7 @@
*
*/
-//#undef SANBOOT_PROTO_ISCSI /* iSCSI protocol */
+#define SANBOOT_PROTO_ISCSI /* iSCSI protocol */
-//#undef SANBOOT_PROTO_AOE /* AoE protocol */
+#undef SANBOOT_PROTO_AOE /* AoE protocol */
//#undef SANBOOT_PROTO_IB_SRP /* Infiniband SCSI RDMA protocol */
@@ -73,9 +73,9 @@
* 802.11 cryptosystems and handshaking protocols
*
*/
-#define CRYPTO_80211_WEP /* WEP encryption (deprecated and insecure!) */
-#define CRYPTO_80211_WPA /* WPA Personal, authenticating with passphrase */
-#define CRYPTO_80211_WPA2 /* Add support for stronger WPA cryptography */
+#undef CRYPTO_80211_WEP /* WEP encryption (deprecated and insecure!) */
+#undef CRYPTO_80211_WPA /* WPA Personal, authenticating with passphrase */
+#undef CRYPTO_80211_WPA2 /* Add support for stronger WPA cryptography */
/*
* Name resolution modules
@@ -91,35 +91,35 @@
* you want to use.
*
*/
-//#define IMAGE_NBI /* NBI image support */
-//#define IMAGE_ELF /* ELF image support */
-//#define IMAGE_FREEBSD /* FreeBSD kernel image support */
-//#define IMAGE_MULTIBOOT /* MultiBoot image support */
-//#define IMAGE_AOUT /* a.out image support */
-//#define IMAGE_WINCE /* WinCE image support */
-//#define IMAGE_PXE /* PXE image support */
-//#define IMAGE_SCRIPT /* gPXE script image support */
-//#define IMAGE_BZIMAGE /* Linux bzImage image support */
-//#define IMAGE_COMBOOT /* SYSLINUX COMBOOT image support */
-//#define IMAGE_EFI /* EFI image support */
+#undef IMAGE_NBI /* NBI image support */
+#undef IMAGE_ELF /* ELF image support */
+#undef IMAGE_FREEBSD /* FreeBSD kernel image support */
+#undef IMAGE_MULTIBOOT /* MultiBoot image support */
+#undef IMAGE_AOUT /* a.out image support */
+#undef IMAGE_WINCE /* WinCE image support */
+#define IMAGE_PXE /* PXE image support */
+#define IMAGE_SCRIPT /* gPXE script image support */
+#define IMAGE_BZIMAGE /* Linux bzImage image support */
+#undef IMAGE_COMBOOT /* SYSLINUX COMBOOT image support */
+#undef IMAGE_EFI /* EFI image support */
/*
* Command-line commands to include
*
*/
-#define AUTOBOOT_CMD /* Automatic booting */
+#undef AUTOBOOT_CMD /* Automatic booting */
#define NVO_CMD /* Non-volatile option storage commands */
-#define CONFIG_CMD /* Option configuration console */
-#define IFMGMT_CMD /* Interface management commands */
-#define IWMGMT_CMD /* Wireless interface management commands */
-#define ROUTE_CMD /* Routing table management commands */
+#undef CONFIG_CMD /* Option configuration console */
+#undef IFMGMT_CMD /* Interface management commands */
+#undef IWMGMT_CMD /* Wireless interface management commands */
+#undef ROUTE_CMD /* Routing table management commands */
#define IMAGE_CMD /* Image management commands */
-#define DHCP_CMD /* DHCP management commands */
-#define SANBOOT_CMD /* SAN boot commands */
-#define LOGIN_CMD /* Login command */
+#undef DHCP_CMD /* DHCP management commands */
+#undef SANBOOT_CMD /* SAN boot commands */
+#undef LOGIN_CMD /* Login command */
#undef TIME_CMD /* Time commands */
#undef DIGEST_CMD /* Image crypto digest commands */
-//#undef PXE_CMD /* PXE commands */
+#undef PXE_CMD /* PXE commands */
/*
* Error message tables to include
@@ -1,32 +0,0 @@
diff -urN gpxe-1.0.0/src/core/exec.c gpxe-1.0.0-expandfilename/src/core/exec.c
--- gpxe-1.0.0/src/core/exec.c 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-expandfilename/src/core/exec.c 2010-05-20 21:28:43.000000000 -0400
@@ -94,7 +94,7 @@
* The expanded command line is allocated with malloc() and the caller
* must eventually free() it.
*/
-static char * expand_command ( const char *command ) {
+char * expand_command ( const char *command ) {
char *expcmd;
char *start;
char *end;
diff -urN gpxe-1.0.0/src/usr/autoboot.c gpxe-1.0.0-expandfilename/src/usr/autoboot.c
--- gpxe-1.0.0/src/usr/autoboot.c 2010-05-20 20:56:32.000000000 -0400
+++ gpxe-1.0.0-expandfilename/src/usr/autoboot.c 2010-05-20 21:31:49.000000000 -0400
@@ -32,6 +32,7 @@
#include <usr/dhcpmgmt.h>
#include <usr/imgmgmt.h>
#include <usr/autoboot.h>
+char * expand_command ( const char *command );
/** @file
*
@@ -85,6 +86,8 @@
uri_encode ( filename, buf + strlen ( buf ),
sizeof ( buf ) - strlen ( buf ), URI_PATH );
filename = buf;
+ } else { /* only support variable expansion in absolute paths to avoid stepping on buf size */
+ filename = expand_command(filename);
}
image = alloc_image();
@@ -1,60 +0,0 @@
diff -urN gpxe-1.0.0/src/config/config.c gpxe-1.0.0-hdboot/src/config/config.c
--- gpxe-1.0.0/src/config/config.c 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-hdboot/src/config/config.c 2010-02-06 12:10:51.000000000 -0500
@@ -222,6 +222,9 @@
#ifdef SANBOOT_CMD
REQUIRE_OBJECT ( sanboot_cmd );
#endif
+#ifdef HDBOOT_CMD
+REQUIRE_OBJECT ( hdboot_cmd );
+#endif
#ifdef LOGIN_CMD
REQUIRE_OBJECT ( login_cmd );
#endif
diff -urN gpxe-1.0.0/src/config/general.h gpxe-1.0.0-hdboot/src/config/general.h
--- gpxe-1.0.0/src/config/general.h 2010-02-06 12:07:39.000000000 -0500
+++ gpxe-1.0.0-hdboot/src/config/general.h 2010-02-06 12:11:10.000000000 -0500
@@ -116,6 +116,7 @@
#define IMAGE_CMD /* Image management commands */
#undef DHCP_CMD /* DHCP management commands */
#undef SANBOOT_CMD /* SAN boot commands */
+#define HDBOOT_CMD /* HD boot commands */
#undef LOGIN_CMD /* Login command */
#undef TIME_CMD /* Time commands */
#undef DIGEST_CMD /* Image crypto digest commands */
diff -urN gpxe-1.0.0/src/hci/commands/hdboot_cmd.c gpxe-1.0.0-hdboot/src/hci/commands/hdboot_cmd.c
--- gpxe-1.0.0/src/hci/commands/hdboot_cmd.c 1969-12-31 19:00:00.000000000 -0500
+++ gpxe-1.0.0-hdboot/src/hci/commands/hdboot_cmd.c 2010-02-06 12:10:51.000000000 -0500
@@ -0,0 +1,32 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <getopt.h>
+#include <int13.h>
+#include <gpxe/command.h>
+#include <usr/autoboot.h>
+
+/**
+ * The "hdboot" command
+ *
+ * @v argc Argument count
+ * @v argv Argument list
+ * @ret rc Exit code
+ */
+static int hdboot_exec ( int argc, char **argv ) {
+ if (argc != 1) {
+ printf ( "Usage:\n"
+ " %s\n"
+ "\n"
+ "Boot from the first HD\n",
+ argv[0] );
+ return 1;
+ }
+ int13_boot ( 0x80 );
+ return 1;
+}
+
+struct command hdboot_command __command = {
+ .name = "hdboot",
+ .exec = hdboot_exec,
+};
@@ -1,141 +0,0 @@
diff -urN gpxe-1.0.0/src/core/settings.c gpxe-1.0.0-hyphenatedmachyp/src/core/settings.c
--- gpxe-1.0.0/src/core/settings.c 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-hyphenatedmachyp/src/core/settings.c 2010-06-02 14:15:26.000000000 -0400
@@ -1314,6 +1314,72 @@
}
/**
+ * Parse and store value of hex string setting, hyphen delimited
+ *
+ * @v settings Settings block
+ * @v setting Setting to store
+ * @v value Formatted setting data
+ * @ret rc Return status code
+ */
+static int storef_hexhyp ( struct settings *settings, struct setting *setting,
+ const char *value ) {
+ char *ptr = ( char * ) value;
+ uint8_t bytes[ strlen ( value ) ]; /* cannot exceed strlen(value) */
+ unsigned int len = 0;
+
+ while ( 1 ) {
+ bytes[len++] = strtoul ( ptr, &ptr, 16 );
+ switch ( *ptr ) {
+ case '\0' :
+ return store_setting ( settings, setting, bytes, len );
+ case '-' :
+ ptr++;
+ break;
+ default :
+ return -EINVAL;
+ }
+ }
+}
+/**
+ * Fetch and format value of hex string setting with hypphen delimiter
+ *
+ * @v settings Settings block, or NULL to search all blocks
+ * @v setting Setting to fetch
+ * @v buf Buffer to contain formatted value
+ * @v len Length of buffer
+ * @ret len Length of formatted value, or negative error
+ */
+static int fetchf_hexhyp ( struct settings *settings, struct setting *setting,
+ char *buf, size_t len ) {
+ int raw_len;
+ int check_len;
+ int used = 0;
+ int i;
+
+ raw_len = fetch_setting_len ( settings, setting );
+ if ( raw_len < 0 )
+ return raw_len;
+
+ {
+ uint8_t raw[raw_len];
+
+ check_len = fetch_setting ( settings, setting, raw,
+ sizeof ( raw ) );
+ if ( check_len < 0 )
+ return check_len;
+ assert ( check_len == raw_len );
+
+ if ( len )
+ buf[0] = 0; /* Ensure that a terminating NUL exists */
+ for ( i = 0 ; i < raw_len ; i++ ) {
+ used += ssnprintf ( ( buf + used ), ( len - used ),
+ "%s%02x", ( used ? "-" : "" ),
+ raw[i] );
+ }
+ return used;
+ }
+}
+/**
* Fetch and format value of hex string setting
*
* @v settings Settings block, or NULL to search all blocks
@@ -1359,6 +1425,12 @@
.storef = storef_hex,
.fetchf = fetchf_hex,
};
+/** A hex-string setting, hyphen delimited */
+struct setting_type setting_type_hexhyp __setting_type = {
+ .name = "hexhyp",
+ .storef = storef_hexhyp,
+ .fetchf = fetchf_hexhyp,
+};
/**
* Parse and store value of UUID setting
diff -urN gpxe-1.0.0/src/include/gpxe/settings.h gpxe-1.0.0-hyphenatedmachyp/src/include/gpxe/settings.h
--- gpxe-1.0.0/src/include/gpxe/settings.h 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-hyphenatedmachyp/src/include/gpxe/settings.h 2010-06-02 14:15:26.000000000 -0400
@@ -226,6 +226,7 @@
extern struct setting_type setting_type_uint16 __setting_type;
extern struct setting_type setting_type_uint32 __setting_type;
extern struct setting_type setting_type_hex __setting_type;
+extern struct setting_type setting_type_hexhyp __setting_type;
extern struct setting_type setting_type_uuid __setting_type;
extern struct setting ip_setting __setting;
@@ -242,6 +243,7 @@
extern struct setting uuid_setting __setting;
extern struct setting next_server_setting __setting;
extern struct setting mac_setting __setting;
+extern struct setting machyp_setting __setting;
extern struct setting busid_setting __setting;
extern struct setting user_class_setting __setting;
diff -urN gpxe-1.0.0/src/net/netdev_settings.c gpxe-1.0.0-hyphenatedmachyp/src/net/netdev_settings.c
--- gpxe-1.0.0/src/net/netdev_settings.c 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-hyphenatedmachyp/src/net/netdev_settings.c 2010-06-02 14:17:09.000000000 -0400
@@ -38,6 +38,11 @@
.description = "MAC address",
.type = &setting_type_hex,
};
+struct setting machyp_setting __setting = {
+ .name = "machyp",
+ .description = "MAC address",
+ .type = &setting_type_hexhyp,
+};
struct setting busid_setting __setting = {
.name = "busid",
.description = "Bus ID",
@@ -58,7 +63,7 @@
struct net_device *netdev = container_of ( settings, struct net_device,
settings.settings );
- if ( setting_cmp ( setting, &mac_setting ) == 0 ) {
+ if (( setting_cmp ( setting, &mac_setting ) == 0 ) || ( setting_cmp ( setting, &machyp_setting ) == 0 )) {
if ( len != netdev->ll_protocol->ll_addr_len )
return -EINVAL;
memcpy ( netdev->ll_addr, data, len );
@@ -84,7 +89,7 @@
struct device_description *desc = &netdev->dev->desc;
struct dhcp_netdev_desc dhcp_desc;
- if ( setting_cmp ( setting, &mac_setting ) == 0 ) {
+ if (( setting_cmp ( setting, &mac_setting ) == 0 ) || ( setting_cmp ( setting, &machyp_setting ) == 0 )) {
if ( len > netdev->ll_protocol->ll_addr_len )
len = netdev->ll_protocol->ll_addr_len;
memcpy ( data, netdev->ll_addr, len );
@@ -1,126 +0,0 @@
diff -urN gpxe-1.0.0/src/arch/i386/interface/pcbios/iscsiboot.c gpxe-1.0.0-iscsireg/src/arch/i386/interface/pcbios/iscsiboot.c
--- gpxe-1.0.0/src/arch/i386/interface/pcbios/iscsiboot.c 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-iscsireg/src/arch/i386/interface/pcbios/iscsiboot.c 2010-03-11 14:19:05.000000000 -0500
@@ -11,6 +11,56 @@
FILE_LICENCE ( GPL2_OR_LATER );
+static int iscsireg ( const char *root_path ) {
+ struct scsi_device *scsi;
+ struct int13_drive *drive;
+ int rc;
+
+ scsi = zalloc ( sizeof ( *scsi ) );
+ if ( ! scsi ) {
+ rc = -ENOMEM;
+ goto regerr_alloc_scsi;
+ }
+ drive = zalloc ( sizeof ( *drive ) );
+ if ( ! drive ) {
+ rc = -ENOMEM;
+ goto regerr_alloc_drive;
+ }
+
+ printf ( "Configuring iSCSI at %s\n", root_path );
+
+ if ( ( rc = iscsi_attach ( scsi, root_path ) ) != 0 ) {
+ printf ( "Could not attach iSCSI device: %s\n",
+ strerror ( rc ) );
+ goto regerr_attach;
+ }
+ if ( ( rc = init_scsidev ( scsi ) ) != 0 ) {
+ printf ( "Could not initialise iSCSI device: %s\n",
+ strerror ( rc ) );
+ goto regerr_init;
+ }
+
+ drive->blockdev = &scsi->blockdev;
+
+ /* FIXME: ugly, ugly hack */
+ struct net_device *netdev = last_opened_netdev();
+ struct iscsi_session *iscsi =
+ container_of ( scsi->backend, struct iscsi_session, refcnt );
+ ibft_fill_data ( netdev, iscsi );
+
+ register_int13_drive ( drive );
+ printf ( "Registered as BIOS drive %#02x\n", drive->drive );
+ return 0;
+ regerr_init:
+ iscsi_detach ( scsi );
+ regerr_attach:
+ free ( drive );
+ regerr_alloc_drive:
+ free ( scsi );
+ regerr_alloc_scsi:
+ return rc;
+}
+
static int iscsiboot ( const char *root_path ) {
struct scsi_device *scsi;
struct int13_drive *drive;
@@ -72,4 +122,5 @@
struct sanboot_protocol iscsi_sanboot_protocol __sanboot_protocol = {
.prefix = "iscsi:",
.boot = iscsiboot,
+ .reg = iscsireg,
};
diff -urN gpxe-1.0.0/src/include/gpxe/sanboot.h gpxe-1.0.0-iscsireg/src/include/gpxe/sanboot.h
--- gpxe-1.0.0/src/include/gpxe/sanboot.h 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-iscsireg/src/include/gpxe/sanboot.h 2010-03-11 14:19:05.000000000 -0500
@@ -8,6 +8,7 @@
struct sanboot_protocol {
const char *prefix;
int ( * boot ) ( const char *root_path );
+ int ( * reg ) ( const char *root_path );
};
#define SANBOOT_PROTOCOLS \
diff -urN gpxe-1.0.0/src/usr/autoboot.c gpxe-1.0.0-iscsireg/src/usr/autoboot.c
--- gpxe-1.0.0/src/usr/autoboot.c 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-iscsireg/src/usr/autoboot.c 2010-03-11 14:19:36.000000000 -0500
@@ -103,6 +103,25 @@
}
/**
+ * Register a drive in BIOS, but don't boot
+ *
+ * @v root_path Root path
+ * @ret rc Return status code
+ */
+int reg_root_path ( const char *root_path ) {
+ struct sanboot_protocol *sanboot;
+
+ /* Quick hack */
+ for_each_table_entry ( sanboot, SANBOOT_PROTOCOLS ) {
+ if ( strncmp ( root_path, sanboot->prefix,
+ strlen ( sanboot->prefix ) ) == 0 ) {
+ return sanboot->reg ( root_path );
+ }
+ }
+
+ return -ENOTSUP;
+}
+/**
* Boot using root path
*
* @v root_path Root path
@@ -136,6 +155,7 @@
struct setting pxe_boot_menu_setting
= { .tag = DHCP_PXE_BOOT_MENU };
char buf[256];
+ char ruf[256];
struct in_addr next_server;
unsigned int pxe_discovery_control;
int rc;
@@ -167,6 +187,11 @@
fetch_ipv4_setting ( NULL, &next_server_setting, &next_server );
fetch_string_setting ( NULL, &filename_setting, buf, sizeof ( buf ) );
if ( buf[0] ) {
+ /* Going to PXE, but set up iBFT if applicable first */
+ fetch_string_setting(NULL, &root_path_setting,ruf,sizeof(ruf));
+ if (ruf[0]) {
+ reg_root_path ( ruf );
+ }
printf ( "Booting from filename \"%s\"\n", buf );
if ( ( rc = boot_next_server_and_filename ( next_server,
buf ) ) != 0 ) {
@@ -1,12 +0,0 @@
diff -urN gpxe-1.0.1/src/net/udp/dhcp.c gpxe-1.0.1-xnbauserclass/src/net/udp/dhcp.c
--- gpxe-1.0.1/src/net/udp/dhcp.c 2010-06-29 15:31:33.000000000 -0400
+++ gpxe-1.0.1-xnbauserclass/src/net/udp/dhcp.c 2010-07-29 16:12:58.000000000 -0400
@@ -78,7 +78,7 @@
DHCP_CLIENT_ARCHITECTURE, DHCP_ARCH_CLIENT_ARCHITECTURE,
DHCP_CLIENT_NDI, DHCP_ARCH_CLIENT_NDI,
DHCP_VENDOR_CLASS_ID, DHCP_ARCH_VENDOR_CLASS_ID,
- DHCP_USER_CLASS_ID, DHCP_STRING ( 'g', 'P', 'X', 'E' ),
+ DHCP_USER_CLASS_ID, DHCP_STRING ( 'x', 'N', 'B', 'A' ),
DHCP_PARAMETER_REQUEST_LIST,
DHCP_OPTION ( DHCP_SUBNET_MASK, DHCP_ROUTERS, DHCP_DNS_SERVERS,
DHCP_LOG_SERVERS, DHCP_HOST_NAME, DHCP_DOMAIN_NAME,
-12
View File
@@ -1,12 +0,0 @@
gpxe-0.9.7-branding.patch
gpxe-1.0.0-registeriscsionpxe.patch
gpxe-1.0.0-config.patch
gpxe-0.9.7-ignorepackets.patch
gpxe-0.9.7-kvmworkaround.patch
gpxe-1.0.0-hdboot.patch
gpxe-1.0.1-xnbauserclass.patch
gpxe-0.9.7-undinet.patch
gpxe-1.0.0-cmdlinesize.patch
gpxe-1.0.0-expandfilename.patch
gpxe-1.0.0-hyphenatedmachyp.patch
-39
View File
@@ -1,39 +0,0 @@
#!/bin/sh
# postinst script for gpxe
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
-37
View File
@@ -1,37 +0,0 @@
#!/bin/sh
# postrm script for gpxe
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
-35
View File
@@ -1,35 +0,0 @@
#!/bin/sh
# preinst script for gpxe
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
install|upgrade)
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
-38
View File
@@ -1,38 +0,0 @@
#!/bin/sh
# prerm script for gpxe
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
remove|upgrade|deconfigure)
;;
failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
-82
View File
@@ -1,82 +0,0 @@
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# This file is public domain software, originally written by Joey Hess.
#
# This version is for packages that are architecture dependent.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
build: build-stamp
build-stamp:
dh_testdir
dh_quilt_patch
# Add here commands to compile the package.
$(MAKE) -C src bin/undionly.kpxe
touch build-stamp
clean:
dh_testdir
dh_testroot
# Add here commands to clean up after the build process.
$(MAKE) -C src clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
# Add here commands to install the package into debian/<packagename>
cp src/bin/undionly.kpxe `pwd`/debian/`dh_listpackages`/tftpboot/xcat/xnba.kpxe
#dh_movefiles
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_install
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installcatalogs
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installcron
# dh_installinfo
# dh_installwm
# dh_installudev
# dh_lintian
# dh_bugfiles
# dh_undocumented
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
-12
View File
@@ -1,12 +0,0 @@
diff -urN gpxe-0.9.7/src/arch/i386/interface/pxe/pxe_undi.c gpxe-0.9.7-8021ifacetype/src/arch/i386/interface/pxe/pxe_undi.c
--- gpxe-0.9.7/src/arch/i386/interface/pxe/pxe_undi.c 2009-08-21 20:54:12.000000000 -0400
+++ gpxe-0.9.7-8021ifacetype/src/arch/i386/interface/pxe/pxe_undi.c 2009-08-21 20:53:53.000000000 -0400
@@ -517,7 +517,7 @@
* Most PXE stacks seem to take this approach.
*/
snprintf ( ( char * ) undi_get_iface_info->IfaceType,
- sizeof ( undi_get_iface_info->IfaceType ), "gPXE" );
+ sizeof ( undi_get_iface_info->IfaceType ), "DIX+802.3" );
undi_get_iface_info->LinkSpeed = 10000000; /* 10 Mbps */
undi_get_iface_info->ServiceFlags =
( SUPPORTED_BROADCAST | SUPPORTED_MULTICAST |
-21
View File
@@ -1,21 +0,0 @@
diff -urN gpxe-0.9.7/src/arch/i386/interface/pxe/pxe_undi.c gpxe-0.9.7-avoidspuriousirq/src/arch/i386/interface/pxe/pxe_undi.c
--- gpxe-0.9.7/src/arch/i386/interface/pxe/pxe_undi.c 2009-08-21 21:00:26.000000000 -0400
+++ gpxe-0.9.7-avoidspuriousirq/src/arch/i386/interface/pxe/pxe_undi.c 2009-08-21 20:59:51.000000000 -0400
@@ -277,14 +277,15 @@
}
}
+ /* Flag transmission as in-progress */
+ undi_tx_count++;
/* Transmit packet */
if ( ( rc = netdev_tx ( pxe_netdev, iobuf ) ) != 0 ) {
+ undi_tx_count--;
undi_transmit->Status = PXENV_STATUS ( rc );
return PXENV_EXIT_FAILURE;
}
- /* Flag transmission as in-progress */
- undi_tx_count++;
undi_transmit->Status = PXENV_STATUS_SUCCESS;
return PXENV_EXIT_SUCCESS;
-33
View File
@@ -1,33 +0,0 @@
diff -urN gpxe-0.9.7/src/net/dhcppkt.c gpxe-0.9.7-bootptodhcpfailover/src/net/dhcppkt.c
--- gpxe-0.9.7/src/net/dhcppkt.c 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-bootptodhcpfailover/src/net/dhcppkt.c 2009-08-21 21:49:52.000000000 -0400
@@ -155,6 +155,8 @@
memset ( field_data, 0, field->len );
memcpy ( dhcp_packet_field ( dhcppkt->dhcphdr, field ),
data, len );
+ /* Erase any equivalent option from the options block */
+ dhcpopt_store ( &dhcppkt->options, tag, NULL, 0 );
return 0;
}
@@ -181,14 +183,16 @@
void *data, size_t len ) {
struct dhcp_packet_field *field;
void *field_data;
- size_t field_len;
+ size_t field_len = 0;
- /* If this is a special field, return it */
+ /* Identify special field, if any */
if ( ( field = find_dhcp_packet_field ( tag ) ) != NULL ) {
field_data = dhcp_packet_field ( dhcppkt->dhcphdr, field );
field_len = field->used_len ( field_data, field->len );
- if ( ! field_len )
- return -ENOENT;
+ }
+
+ /* Return special field, if it exists and is populated */
+ if ( field_len ) {
if ( len > field_len )
len = field_len;
memcpy ( data, field_data, len );
-14
View File
@@ -1,14 +0,0 @@
diff -urN gpxe-0.9.7/src/config/general.h gpxe-0.9.7-branded/src/config/general.h
--- gpxe-0.9.7/src/config/general.h 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-branded/src/config/general.h 2009-06-23 06:24:54.000000000 -0400
@@ -22,8 +22,8 @@
* "gPXE".
*
*/
-#define PRODUCT_NAME ""
-#define PRODUCT_SHORT_NAME "gPXE"
+#define PRODUCT_NAME "xCAT Network Boot Agent"
+#define PRODUCT_SHORT_NAME "xCAT NBA"
/*
* Timer configuration
-66
View File
@@ -1,66 +0,0 @@
diff -urN gpxe-0.9.7/src/config/general.h gpxe-0.9.7-config/src/config/general.h
--- gpxe-0.9.7/src/config/general.h 2009-07-09 10:15:27.000000000 -0400
+++ gpxe-0.9.7-config/src/config/general.h 2009-07-09 10:19:39.000000000 -0400
@@ -48,7 +48,7 @@
#undef DOWNLOAD_PROTO_NFS /* Network File System */
#define DOWNLOAD_PROTO_HTTP /* Hypertext Transfer Protocol */
#undef DOWNLOAD_PROTO_HTTPS /* Secure Hypertext Transfer Protocol */
-#undef DOWNLOAD_PROTO_FTP /* File Transfer Protocol */
+#define DOWNLOAD_PROTO_FTP /* File Transfer Protocol */
#undef DOWNLOAD_PROTO_TFTM /* Multicast Trivial File Transfer Protocol */
#undef DOWNLOAD_PROTO_SLAM /* Scalable Local Area Multicast */
#undef DOWNLOAD_PROTO_FSP /* FSP? */
@@ -59,7 +59,7 @@
*/
//#undef SANBOOT_PROTO_ISCSI /* iSCSI protocol */
-//#undef SANBOOT_PROTO_AOE /* AoE protocol */
+#undef SANBOOT_PROTO_AOE /* AoE protocol */
/*
* Name resolution modules
@@ -76,17 +76,17 @@
* you want to use.
*
*/
-//#define IMAGE_NBI /* NBI image support */
-//#define IMAGE_ELF /* ELF image support */
-//#define IMAGE_FREEBSD /* FreeBSD kernel image support */
-//#define IMAGE_MULTIBOOT /* MultiBoot image support */
-//#define IMAGE_AOUT /* a.out image support */
-//#define IMAGE_WINCE /* WinCE image support */
-//#define IMAGE_PXE /* PXE image support */
-//#define IMAGE_SCRIPT /* gPXE script image support */
-//#define IMAGE_BZIMAGE /* Linux bzImage image support */
-//#define IMAGE_COMBOOT /* SYSLINUX COMBOOT image support */
-//#define IMAGE_EFI /* EFI image support */
+#define IMAGE_NBI /* NBI image support */
+#define IMAGE_ELF /* ELF image support */
+#define IMAGE_FREEBSD /* FreeBSD kernel image support */
+#undef IMAGE_MULTIBOOT /* MultiBoot image support */
+#undef IMAGE_AOUT /* a.out image support */
+#undef IMAGE_WINCE /* WinCE image support */
+#define IMAGE_PXE /* PXE image support */
+#define IMAGE_SCRIPT /* gPXE script image support */
+#define IMAGE_BZIMAGE /* Linux bzImage image support */
+#undef IMAGE_COMBOOT /* SYSLINUX COMBOOT image support */
+#undef IMAGE_EFI /* EFI image support */
/*
* Command-line commands to include
@@ -94,13 +94,13 @@
*/
#define AUTOBOOT_CMD /* Automatic booting */
#define NVO_CMD /* Non-volatile option storage commands */
-#define CONFIG_CMD /* Option configuration console */
+#undef CONFIG_CMD /* Option configuration console */
#define IFMGMT_CMD /* Interface management commands */
#define ROUTE_CMD /* Routing table management commands */
#define IMAGE_CMD /* Image management commands */
#define DHCP_CMD /* DHCP management commands */
#define SANBOOT_CMD /* SAN boot commands */
-#define LOGIN_CMD /* Login command */
+#undef LOGIN_CMD /* Login command */
/*
* Obscure configuration options
-11
View File
@@ -1,11 +0,0 @@
diff -urN gpxe-0.9.7/src/drivers/net/e1000/e1000.c gpxe-0.9.7-e1000fix/src/drivers/net/e1000/e1000.c
--- gpxe-0.9.7/src/drivers/net/e1000/e1000.c 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-e1000fix/src/drivers/net/e1000/e1000.c 2009-08-21 21:13:59.000000000 -0400
@@ -586,6 +586,7 @@
/* Write new tail to NIC, making packet available for transmit
*/
+ wmb();
E1000_WRITE_REG ( hw, TDT, adapter->tx_tail );
return 0;
-126
View File
@@ -1,126 +0,0 @@
diff -urN gpxe-0.9.7/src/arch/i386/prefix/pxeprefix.S gpxe-0.9.7-etherbootworkaround/src/arch/i386/prefix/pxeprefix.S
--- gpxe-0.9.7/src/arch/i386/prefix/pxeprefix.S 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-etherbootworkaround/src/arch/i386/prefix/pxeprefix.S 2009-08-21 20:36:55.000000000 -0400
@@ -1,8 +1,11 @@
#define PXENV_UNDI_SHUTDOWN 0x0005
#define PXENV_UNDI_GET_NIC_TYPE 0x0012
+#define PXENV_UNDI_GET_IFACE_INFO 0x0013
#define PXENV_STOP_UNDI 0x0015
#define PXENV_UNLOAD_STACK 0x0070
+#define PXE_HACK_EB54 0x0001
+
.text
.arch i386
.org 0
@@ -11,6 +14,8 @@
#include <undi.h>
#define STACK_MAGIC ( 'L' + ( 'R' << 8 ) + ( 'E' << 16 ) + ( 'T' << 24 ) )
+#define EB_MAGIC_1 ( 'E' + ( 't' << 8 ) + ( 'h' << 16 ) + ( 'e' << 24 ) )
+#define EB_MAGIC_2 ( 'r' + ( 'b' << 8 ) + ( 'o' << 16 ) + ( 'o' << 24 ) )
/*****************************************************************************
* Entry point: set operating context, print welcome message
@@ -309,8 +314,6 @@
movw $10f, %si
call print_message
call print_pci_busdevfn
- movb $0x0a, %al
- call print_character
jmp 99f
.section ".prefix.data", "aw", @progbits
10: .asciz " UNDI device is PCI "
@@ -321,12 +324,47 @@
movw $10f, %si
call print_message
.section ".prefix.data", "aw", @progbits
-10: .asciz " Unable to determine UNDI physical device\n"
+10: .asciz " Unable to determine UNDI physical device"
.previous
99:
/*****************************************************************************
+ * Determine interface type
+ *****************************************************************************
+ */
+get_iface_type:
+ /* Issue PXENV_UNDI_GET_IFACE_INFO */
+ movw $PXENV_UNDI_GET_IFACE_INFO, %bx
+ call pxe_call
+ jnc 1f
+ call print_pxe_error
+ jmp 99f
+1: /* Print interface type */
+ movw $10f, %si
+ call print_message
+ leaw ( pxe_parameter_structure + 0x02 ), %si
+ call print_message
+ .section ".prefix.data", "aw", @progbits
+10: .asciz ", type "
+ .previous
+ /* Check for "Etherboot" interface type */
+ cmpl $EB_MAGIC_1, ( pxe_parameter_structure + 0x02 )
+ jne 99f
+ cmpl $EB_MAGIC_2, ( pxe_parameter_structure + 0x06 )
+ jne 99f
+ movw $10f, %si
+ call print_message
+ .section ".prefix.data", "aw", @progbits
+10: .asciz " (workaround enabled)"
+ .previous
+ /* Flag Etherboot workarounds as required */
+ orw $PXE_HACK_EB54, pxe_hacks
+
+99: movb $0x0a, %al
+ call print_character
+
+/*****************************************************************************
* Leave NIC in a safe state
*****************************************************************************
*/
@@ -339,6 +377,14 @@
call print_pxe_error
1:
unload_base_code:
+ /* Etherboot treats PXENV_UNLOAD_STACK as PXENV_STOP_UNDI, so
+ * we must not issue this call if the underlying stack is
+ * Etherboot and we were not intending to issue a PXENV_STOP_UNDI.
+ */
+#ifdef PXELOADER_KEEP_UNDI
+ testw $PXE_HACK_EB54, pxe_hacks
+ jnz 99f
+#endif /* PXELOADER_KEEP_UNDI */
/* Issue PXENV_UNLOAD_STACK */
movw $PXENV_UNLOAD_STACK, %bx
call pxe_call
@@ -551,7 +597,9 @@
testw %ax, %ax
jz 1f
stc
-1: /* Restore registers and return */
+1: /* Clear direction flag, for the sake of sanity */
+ cld
+ /* Restore registers and return */
popw %es
popw %di
ret
@@ -595,7 +643,7 @@
pxe_esp: .long 0
pxe_ss: .word 0
-pxe_parameter_structure: .fill 20
+pxe_parameter_structure: .fill 64
undi_code_segoff:
undi_code_size: .word 0
@@ -605,6 +653,8 @@
undi_data_size: .word 0
undi_data_segment: .word 0
+pxe_hacks: .word 0
+
/* The following fields are part of a struct undi_device */
undi_device:
-60
View File
@@ -1,60 +0,0 @@
diff -urN gpxe-0.9.7/src/config/general.h gpxe-0.9.7-hdboot/src/config/general.h
--- gpxe-0.9.7/src/config/general.h 2009-07-20 09:44:50.000000000 -0400
+++ gpxe-0.9.7-hdboot/src/config/general.h 2009-07-20 09:45:33.000000000 -0400
@@ -100,6 +100,7 @@
#define IMAGE_CMD /* Image management commands */
#undef DHCP_CMD /* DHCP management commands */
#undef SANBOOT_CMD /* SAN boot commands */
+#define HDBOOT_CMD /* SAN boot commands */
#undef LOGIN_CMD /* Login command */
/*
diff -urN gpxe-0.9.7/src/core/config.c gpxe-0.9.7-hdboot/src/core/config.c
--- gpxe-0.9.7/src/core/config.c 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-hdboot/src/core/config.c 2009-07-20 09:45:56.000000000 -0400
@@ -193,6 +193,9 @@
#ifdef SANBOOT_CMD
REQUIRE_OBJECT ( sanboot_cmd );
#endif
+#ifdef HDBOOT_CMD
+REQUIRE_OBJECT ( hdboot_cmd );
+#endif
#ifdef LOGIN_CMD
REQUIRE_OBJECT ( login_cmd );
#endif
diff -urN gpxe-0.9.7/src/hci/commands/hdboot_cmd.c gpxe-0.9.7-hdboot/src/hci/commands/hdboot_cmd.c
--- gpxe-0.9.7/src/hci/commands/hdboot_cmd.c 1969-12-31 19:00:00.000000000 -0500
+++ gpxe-0.9.7-hdboot/src/hci/commands/hdboot_cmd.c 2009-07-20 09:46:25.000000000 -0400
@@ -0,0 +1,32 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <getopt.h>
+#include <int13.h>
+#include <gpxe/command.h>
+#include <usr/autoboot.h>
+
+/**
+ * The "hdboot" command
+ *
+ * @v argc Argument count
+ * @v argv Argument list
+ * @ret rc Exit code
+ */
+static int hdboot_exec ( int argc, char **argv ) {
+ if (argc != 1) {
+ printf ( "Usage:\n"
+ " %s\n"
+ "\n"
+ "Boot from the first HD\n",
+ argv[0] );
+ return 1;
+ }
+ int13_boot ( 0x80 );
+ return 1;
+}
+
+struct command hdboot_command __command = {
+ .name = "hdboot",
+ .exec = hdboot_exec,
+};
-48
View File
@@ -1,48 +0,0 @@
diff -urN gpxe-0.9.7/src/net/arp.c gpxe-0.9.7-ignorepackets/src/net/arp.c
--- gpxe-0.9.7/src/net/arp.c 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-ignorepackets/src/net/arp.c 2009-07-02 13:58:19.000000000 -0400
@@ -238,7 +238,7 @@
goto done;
/* Create new ARP table entry if necessary */
- if ( ! merge ) {
+ if ( ( arphdr->ar_op == htons ( ARPOP_REPLY ) ) && ( ! merge ) ) {
arp = &arp_table[next_new_arp_entry++ % NUM_ARP_ENTRIES];
arp->ll_protocol = ll_protocol;
arp->net_protocol = net_protocol;
diff -urN gpxe-0.9.7/src/net/icmp.c gpxe-0.9.7-ignorepackets/src/net/icmp.c
--- gpxe-0.9.7/src/net/icmp.c 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-ignorepackets/src/net/icmp.c 2009-07-02 14:04:53.000000000 -0400
@@ -67,11 +67,14 @@
}
/* We respond only to pings */
- if ( icmp->type != ICMP_ECHO_REQUEST ) {
+ /* Always discard, responding to pings is more than most systems do in this state and
+ * gPXE is in a relatively precarious position, resource management wise, and thus it is
+ * easier just to disable this function. */
+ /* if ( icmp->type != ICMP_ECHO_REQUEST ) { */
DBG ( "ICMP ignoring type %d\n", icmp->type );
rc = 0;
goto done;
- }
+ /* } */
DBG ( "ICMP responding to ping\n" );
diff -urN gpxe-0.9.7/src/net/tcp.c gpxe-0.9.7-ignorepackets/src/net/tcp.c
--- gpxe-0.9.7/src/net/tcp.c 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-ignorepackets/src/net/tcp.c 2009-07-02 14:00:46.000000000 -0400
@@ -904,7 +904,11 @@
/* If no connection was found, send RST */
if ( ! tcp ) {
- tcp_xmit_reset ( tcp, st_src, tcphdr );
+ /* We simply drop unrecognized TCP connections. Hopefully, this is no worse than I typically set up a firewall.
+ * If we try to even remotely respond to random TCP streams, it can exhaust gPXE resources easily in a very large
+ * environment */
+ /* tcp_xmit_reset ( tcp, st_src, tcphdr ); Don't consume precious outbound resource for irrelevant communication. */
+
rc = -ENOTCONN;
goto discard;
}
-111
View File
@@ -1,111 +0,0 @@
diff -urN gpxe-0.9.7/src/arch/i386/firmware/pcbios/e820mangler.S gpxe-0.9.7-iretfixes/src/arch/i386/firmware/pcbios/e820mangler.S
--- gpxe-0.9.7/src/arch/i386/firmware/pcbios/e820mangler.S 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-iretfixes/src/arch/i386/firmware/pcbios/e820mangler.S 2009-08-21 21:28:41.000000000 -0400
@@ -490,6 +490,18 @@
.size get_mangled_e820, . - get_mangled_e820
/****************************************************************************
+ * Set/clear CF on the stack as appropriate, assumes stack is as it should
+ * be immediately before IRET
+ ****************************************************************************
+ */
+patch_cf:
+ pushw %bp
+ movw %sp, %bp
+ setc 8(%bp) /* Set/reset CF; clears PF, AF, ZF, SF */
+ popw %bp
+ ret
+
+/****************************************************************************
* INT 15,e820 handler
****************************************************************************
*/
@@ -500,7 +512,8 @@
popw %ds
call get_mangled_e820
popw %ds
- lret $2
+ call patch_cf
+ iret
.size int15_e820, . - int15_e820
/****************************************************************************
@@ -512,7 +525,7 @@
/* Call previous handler */
pushfw
lcall *%cs:int15_vector
- pushfw
+ call patch_cf
/* Edit result */
pushw %ds
pushw %cs:rm_ds
@@ -524,9 +537,7 @@
xchgw %ax, %cx
xchgw %bx, %dx
popw %ds
- /* Restore flags returned by previous handler and return */
- popfw
- lret $2
+ iret
.size int15_e801, . - int15_e801
/****************************************************************************
@@ -538,16 +549,14 @@
/* Call previous handler */
pushfw
lcall *%cs:int15_vector
- pushfw
+ call patch_cf
/* Edit result */
pushw %ds
pushw %cs:rm_ds
popw %ds
call patch_1m
popw %ds
- /* Restore flags returned by previous handler and return */
- popfw
- lret $2
+ iret
.size int15_88, . - int15_88
/****************************************************************************
diff -urN gpxe-0.9.7/src/arch/i386/firmware/pcbios/fakee820.c gpxe-0.9.7-iretfixes/src/arch/i386/firmware/pcbios/fakee820.c
--- gpxe-0.9.7/src/arch/i386/firmware/pcbios/fakee820.c 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-iretfixes/src/arch/i386/firmware/pcbios/fakee820.c 2009-08-21 21:28:41.000000000 -0400
@@ -63,6 +63,8 @@
"cmpl $0x534d4150, %%edx\n\t"
"jne 99f\n\t"
"pushaw\n\t"
+ "movw %%sp, %%bp\n\t"
+ "andb $~0x01, 22(%%bp)\n\t" /* Clear return CF */
"leaw e820map(%%bx), %%si\n\t"
"cs rep movsb\n\t"
"popaw\n\t"
@@ -73,8 +75,7 @@
"xorl %%ebx,%%ebx\n\t"
"\n1:\n\t"
"popfw\n\t"
- "clc\n\t"
- "lret $2\n\t"
+ "iret\n\t"
"\n99:\n\t"
"popfw\n\t"
"ljmp *%%cs:real_int15_vector\n\t" )
diff -urN gpxe-0.9.7/src/arch/i386/interface/pxe/pxe_entry.S gpxe-0.9.7-iretfixes/src/arch/i386/interface/pxe/pxe_entry.S
--- gpxe-0.9.7/src/arch/i386/interface/pxe/pxe_entry.S 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-iretfixes/src/arch/i386/interface/pxe/pxe_entry.S 2009-08-21 21:28:41.000000000 -0400
@@ -199,9 +199,12 @@
shll $4, %edx
addl $pxenv, %edx
movw $0x564e, %ax
+ pushw %bp
+ movw %sp, %bp
+ andb $~0x01, 8(%bp) /* Clear CF on return */
+ popw %bp
popfw
- clc
- lret $2
+ iret
1: /* INT 1A,other - pass through */
popfw
ljmp *%cs:pxe_int_1a_vector
-13
View File
@@ -1,13 +0,0 @@
diff -urN gpxe-0.9.7/src/arch/i386/prefix/romprefix.S gpxe-0.9.7-kvm/src/arch/i386/prefix/romprefix.S
--- gpxe-0.9.7/src/arch/i386/prefix/romprefix.S 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-kvm/src/arch/i386/prefix/romprefix.S 2009-04-24 04:54:03.000000000 -0400
@@ -715,7 +715,9 @@
movl %fs:(0x6c), %eax
1: pushf
sti
+ nop
hlt
+ nop
popf
cmpl %fs:(0x6c), %eax
je 1b
-36
View File
@@ -1,36 +0,0 @@
diff -urN gpxe-0.9.7/src/arch/i386/interface/pxe/pxe_undi.c gpxe-0.9.7-noopenworkaround/src/arch/i386/interface/pxe/pxe_undi.c
--- gpxe-0.9.7/src/arch/i386/interface/pxe/pxe_undi.c 2009-08-21 21:05:12.000000000 -0400
+++ gpxe-0.9.7-noopenworkaround/src/arch/i386/interface/pxe/pxe_undi.c 2009-08-21 21:04:39.000000000 -0400
@@ -209,6 +209,12 @@
DBG ( "PXENV_UNDI_TRANSMIT" );
+ /* Forcibly enable interrupts at this point, to work around
+ * callers that never call PXENV_UNDI_OPEN before attempting
+ * to use the UNDI API.
+ */
+ netdev_irq ( pxe_netdev, 1 );
+
/* Identify network-layer protocol */
switch ( undi_transmit->Protocol ) {
case P_IP: net_protocol = &ipv4_protocol; break;
@@ -340,10 +346,17 @@
PXENV_EXIT_t
pxenv_undi_set_packet_filter ( struct s_PXENV_UNDI_SET_PACKET_FILTER
*undi_set_packet_filter ) {
+
DBG ( "PXENV_UNDI_SET_PACKET_FILTER" );
- undi_set_packet_filter->Status = PXENV_STATUS_UNSUPPORTED;
- return PXENV_EXIT_FAILURE;
+ /* Pretend that we succeeded, otherwise the 3Com DOS UNDI
+ * driver refuses to load. (We ignore the filter value in the
+ * PXENV_UNDI_OPEN call anyway.)
+ */
+ DBG ( " %02x", undi_set_packet_filter->filter );
+ undi_set_packet_filter->Status = PXENV_STATUS_SUCCESS;
+
+ return PXENV_EXIT_SUCCESS;
}
/* PXENV_UNDI_GET_INFORMATION
-65
View File
@@ -1,65 +0,0 @@
diff -urN gpxe-0.9.7/src/net/udp/tftp.c gpxe-0.9.7-oackfix/src/net/udp/tftp.c
--- gpxe-0.9.7/src/net/udp/tftp.c 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-oackfix/src/net/udp/tftp.c 2009-08-21 20:45:10.000000000 -0400
@@ -670,6 +670,7 @@
char *end = buf + len;
char *name;
char *value;
+ char *next;
int rc = 0;
/* Sanity check */
@@ -679,26 +680,41 @@
rc = -EINVAL;
goto done;
}
- if ( end[-1] != '\0' ) {
- DBGC ( tftp, "TFTP %p received OACK missing final NUL\n",
- tftp );
- rc = -EINVAL;
- goto done;
- }
/* Process each option in turn */
- name = oack->data;
- while ( name < end ) {
- value = ( name + strlen ( name ) + 1 );
+ for ( name = oack->data ; name < end ; name = next ) {
+
+ /* Parse option name and value
+ *
+ * We treat parsing errors as non-fatal, because there
+ * exists at least one TFTP server (IBM Tivoli PXE
+ * Server 5.1.0.3) that has been observed to send
+ * malformed OACKs containing trailing garbage bytes.
+ */
+ value = ( name + strnlen ( name, ( end - name ) ) + 1 );
+ if ( value > end ) {
+ DBGC ( tftp, "TFTP %p received OACK with malformed "
+ "option name:\n", tftp );
+ DBGC_HD ( tftp, oack, len );
+ break;
+ }
if ( value == end ) {
DBGC ( tftp, "TFTP %p received OACK missing value "
"for option \"%s\"\n", tftp, name );
- rc = -EINVAL;
- goto done;
+ DBGC_HD ( tftp, oack, len );
+ break;
}
+ next = ( value + strnlen ( value, ( end - value ) ) + 1 );
+ if ( next > end ) {
+ DBGC ( tftp, "TFTP %p received OACK with malformed "
+ "value for option \"%s\":\n", tftp, name );
+ DBGC_HD ( tftp, oack, len );
+ break;
+ }
+
+ /* Process option */
if ( ( rc = tftp_process_option ( tftp, name, value ) ) != 0 )
goto done;
- name = ( value + strlen ( value ) + 1 );
}
/* Process tsize information, if available */
-39
View File
@@ -1,39 +0,0 @@
diff -urN gpxe-0.9.7/src/net/udp/dhcp.c gpxe-0.9.7-pdhcp67/src/net/udp/dhcp.c
--- gpxe-0.9.7/src/net/udp/dhcp.c 2009-08-21 21:33:52.000000000 -0400
+++ gpxe-0.9.7-pdhcp67/src/net/udp/dhcp.c 2009-08-21 21:33:13.000000000 -0400
@@ -668,8 +668,13 @@
struct dhcp_pxe_boot_menu_item menu_item = { 0, 0 };
int rc;
+ /* Set server address */
+ peer->sin_addr = *(dhcp->pxe_attempt);
+ peer->sin_port = ( ( peer->sin_addr.s_addr == INADDR_BROADCAST ) ?
+ htons ( BOOTPS_PORT ) : htons ( PXE_PORT ) );
+
DBGC ( dhcp, "DHCP %p PXEBS REQUEST to %s:%d for type %d\n",
- dhcp, inet_ntoa ( *(dhcp->pxe_attempt) ), PXE_PORT,
+ dhcp, inet_ntoa ( peer->sin_addr ), ntohs ( peer->sin_port ),
ntohs ( dhcp->pxe_type ) );
/* Set boot menu item */
@@ -678,10 +683,6 @@
&menu_item, sizeof ( menu_item ) ) ) != 0 )
return rc;
- /* Set server address */
- peer->sin_addr = *(dhcp->pxe_attempt);
- peer->sin_port = htons ( PXE_PORT );
-
return 0;
}
@@ -741,7 +742,8 @@
DBGC ( dhcp, "\n" );
/* Filter out unacceptable responses */
- if ( peer->sin_port != htons ( PXE_PORT ) )
+ if ( ( peer->sin_port != htons ( BOOTPS_PORT ) ) &&
+ ( peer->sin_port != htons ( PXE_PORT ) ) )
return;
if ( msgtype != DHCPACK )
return;
-127
View File
@@ -1,127 +0,0 @@
diff -urN gpxe-0.9.7/src/arch/i386/interface/pcbios/iscsiboot.c gpxe-0.9.7-registeriscsionpxe/src/arch/i386/interface/pcbios/iscsiboot.c
--- gpxe-0.9.7/src/arch/i386/interface/pcbios/iscsiboot.c 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-registeriscsionpxe/src/arch/i386/interface/pcbios/iscsiboot.c 2009-03-13 14:01:42.000000000 -0400
@@ -20,6 +20,55 @@
.type = &setting_type_int8,
};
+static int iscsireg ( const char *root_path ) {
+ struct scsi_device *scsi;
+ struct int13_drive *drive;
+ int rc;
+
+ scsi = zalloc ( sizeof ( *scsi ) );
+ if ( ! scsi ) {
+ rc = -ENOMEM;
+ goto regerr_alloc_scsi;
+ }
+ drive = zalloc ( sizeof ( *drive ) );
+ if ( ! drive ) {
+ rc = -ENOMEM;
+ goto regerr_alloc_drive;
+ }
+
+ printf ( "Configuring iSCSI at %s\n", root_path );
+
+ if ( ( rc = iscsi_attach ( scsi, root_path ) ) != 0 ) {
+ printf ( "Could not attach iSCSI device: %s\n",
+ strerror ( rc ) );
+ goto regerr_attach;
+ }
+ if ( ( rc = init_scsidev ( scsi ) ) != 0 ) {
+ printf ( "Could not initialise iSCSI device: %s\n",
+ strerror ( rc ) );
+ goto regerr_init;
+ }
+
+ drive->blockdev = &scsi->blockdev;
+
+ /* FIXME: ugly, ugly hack */
+ struct net_device *netdev = last_opened_netdev();
+ struct iscsi_session *iscsi =
+ container_of ( scsi->backend, struct iscsi_session, refcnt );
+ ibft_fill_data ( netdev, iscsi );
+
+ register_int13_drive ( drive );
+ printf ( "Registered as BIOS drive %#02x\n", drive->drive );
+ return 0;
+ regerr_init:
+ iscsi_detach ( scsi );
+ regerr_attach:
+ free ( drive );
+ regerr_alloc_drive:
+ free ( scsi );
+ regerr_alloc_scsi:
+ return rc;
+}
static int iscsiboot ( const char *root_path ) {
struct scsi_device *scsi;
struct int13_drive *drive;
@@ -85,7 +134,9 @@
return rc;
}
+
struct sanboot_protocol iscsi_sanboot_protocol __sanboot_protocol = {
.prefix = "iscsi:",
.boot = iscsiboot,
+ .reg = iscsireg,
};
diff -urN gpxe-0.9.7/src/include/gpxe/sanboot.h gpxe-0.9.7-registeriscsionpxe/src/include/gpxe/sanboot.h
--- gpxe-0.9.7/src/include/gpxe/sanboot.h 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-registeriscsionpxe/src/include/gpxe/sanboot.h 2009-03-13 13:57:04.000000000 -0400
@@ -6,6 +6,7 @@
struct sanboot_protocol {
const char *prefix;
int ( * boot ) ( const char *root_path );
+ int ( * reg ) ( const char *root_path );
};
#define __sanboot_protocol \
diff -urN gpxe-0.9.7/src/usr/autoboot.c gpxe-0.9.7-registeriscsionpxe/src/usr/autoboot.c
--- gpxe-0.9.7/src/usr/autoboot.c 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-registeriscsionpxe/src/usr/autoboot.c 2009-03-13 13:58:43.000000000 -0400
@@ -115,6 +115,23 @@
}
/**
+ * Register a drive in BIOS, but don't boot from it
+ *
+ * @v root_path Root path
+ * * @ret rc Return status code
+ */
+int reg_root_path ( const char *root_path ) {
+ struct sanboot_protocol *sanboot;
+ for ( sanboot = sanboot_protocols ;
+ sanboot < sanboot_protocols_end ; sanboot++ ) {
+ if ( strncmp ( root_path, sanboot->prefix,
+ strlen ( sanboot->prefix ) ) == 0 ) {
+ return sanboot->reg ( root_path );
+ }
+ }
+ return -ENOTSUP;
+}
+/**
* Boot using root path
*
* @v root_path Root path
@@ -149,6 +166,7 @@
struct setting pxe_boot_menu_setting
= { .tag = DHCP_PXE_BOOT_MENU };
char buf[256];
+ char ruf[256];
struct in_addr next_server;
unsigned int pxe_discovery_control;
int rc;
@@ -188,6 +206,11 @@
fetch_ipv4_setting ( NULL, &next_server_setting, &next_server );
fetch_string_setting ( NULL, &filename_setting, buf, sizeof ( buf ) );
if ( buf[0] ) {
+ /* Going to PXE, but set up iBFT if applicable first */
+ fetch_string_setting(NULL, &root_path_setting,ruf,sizeof(ruf));
+ if (ruf[0]) {
+ reg_root_path ( ruf );
+ }
printf ( "Booting from filename \"%s\"\n", buf );
return boot_next_server_and_filename ( next_server, buf );
}
-84
View File
@@ -1,84 +0,0 @@
diff -urN gpxe-0.9.7/src/config/general.h gpxe-0.9.7-strip/src/config/general.h
--- gpxe-0.9.7/src/config/general.h 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-strip/src/config/general.h 2009-04-12 09:32:49.000000000 -0400
@@ -29,7 +29,7 @@
* Timer configuration
*
*/
-#define BANNER_TIMEOUT 20 /* Tenths of a second for which the shell
+#define BANNER_TIMEOUT 5 /* Tenths of a second for which the shell
banner should appear */
/*
@@ -46,9 +46,9 @@
#define DOWNLOAD_PROTO_TFTP /* Trivial File Transfer Protocol */
#undef DOWNLOAD_PROTO_NFS /* Network File System */
-#define DOWNLOAD_PROTO_HTTP /* Hypertext Transfer Protocol */
+#undef DOWNLOAD_PROTO_HTTP /* Hypertext Transfer Protocol */
#undef DOWNLOAD_PROTO_HTTPS /* Secure Hypertext Transfer Protocol */
-#undef DOWNLOAD_PROTO_FTP /* File Transfer Protocol */
+#define DOWNLOAD_PROTO_FTP /* File Transfer Protocol */
#undef DOWNLOAD_PROTO_TFTM /* Multicast Trivial File Transfer Protocol */
#undef DOWNLOAD_PROTO_SLAM /* Scalable Local Area Multicast */
#undef DOWNLOAD_PROTO_FSP /* FSP? */
@@ -59,7 +59,7 @@
*/
//#undef SANBOOT_PROTO_ISCSI /* iSCSI protocol */
-//#undef SANBOOT_PROTO_AOE /* AoE protocol */
+#undef SANBOOT_PROTO_AOE /* AoE protocol */
/*
* Name resolution modules
@@ -76,31 +76,31 @@
* you want to use.
*
*/
-//#define IMAGE_NBI /* NBI image support */
-//#define IMAGE_ELF /* ELF image support */
-//#define IMAGE_FREEBSD /* FreeBSD kernel image support */
-//#define IMAGE_MULTIBOOT /* MultiBoot image support */
-//#define IMAGE_AOUT /* a.out image support */
-//#define IMAGE_WINCE /* WinCE image support */
-//#define IMAGE_PXE /* PXE image support */
-//#define IMAGE_SCRIPT /* gPXE script image support */
-//#define IMAGE_BZIMAGE /* Linux bzImage image support */
-//#define IMAGE_COMBOOT /* SYSLINUX COMBOOT image support */
-//#define IMAGE_EFI /* EFI image support */
+#undef IMAGE_NBI /* NBI image support */
+#undef IMAGE_ELF /* ELF image support */
+#undef IMAGE_FREEBSD /* FreeBSD kernel image support */
+#undef IMAGE_MULTIBOOT /* MultiBoot image support */
+#undef IMAGE_AOUT /* a.out image support */
+#undef IMAGE_WINCE /* WinCE image support */
+#define IMAGE_PXE /* PXE image support */
+#define IMAGE_SCRIPT /* gPXE script image support */
+#define IMAGE_BZIMAGE /* Linux bzImage image support */
+#undef IMAGE_COMBOOT /* SYSLINUX COMBOOT image support */
+#undef IMAGE_EFI /* EFI image support */
/*
* Command-line commands to include
*
*/
-#define AUTOBOOT_CMD /* Automatic booting */
-#define NVO_CMD /* Non-volatile option storage commands */
-#define CONFIG_CMD /* Option configuration console */
-#define IFMGMT_CMD /* Interface management commands */
-#define ROUTE_CMD /* Routing table management commands */
+#undef AUTOBOOT_CMD /* Automatic booting */
+#undef NVO_CMD /* Non-volatile option storage commands */
+#undef CONFIG_CMD /* Option configuration console */
+#undef IFMGMT_CMD /* Interface management commands */
+#undef ROUTE_CMD /* Routing table management commands */
#define IMAGE_CMD /* Image management commands */
-#define DHCP_CMD /* DHCP management commands */
-#define SANBOOT_CMD /* SAN boot commands */
-#define LOGIN_CMD /* Login command */
+#undef DHCP_CMD /* DHCP management commands */
+#undef SANBOOT_CMD /* SAN boot commands */
+#undef LOGIN_CMD /* Login command */
/*
* Obscure configuration options
-66
View File
@@ -1,66 +0,0 @@
diff -urN gpxe-0.9.7/src/config/general.h gpxe-0.9.7-config/src/config/general.h
--- gpxe-0.9.7/src/config/general.h 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-config/src/config/general.h 2009-06-23 12:49:23.000000000 -0400
@@ -48,7 +48,7 @@
#undef DOWNLOAD_PROTO_NFS /* Network File System */
#define DOWNLOAD_PROTO_HTTP /* Hypertext Transfer Protocol */
#undef DOWNLOAD_PROTO_HTTPS /* Secure Hypertext Transfer Protocol */
-#undef DOWNLOAD_PROTO_FTP /* File Transfer Protocol */
+#define DOWNLOAD_PROTO_FTP /* File Transfer Protocol */
#undef DOWNLOAD_PROTO_TFTM /* Multicast Trivial File Transfer Protocol */
#undef DOWNLOAD_PROTO_SLAM /* Scalable Local Area Multicast */
#undef DOWNLOAD_PROTO_FSP /* FSP? */
@@ -59,7 +59,7 @@
*/
//#undef SANBOOT_PROTO_ISCSI /* iSCSI protocol */
-//#undef SANBOOT_PROTO_AOE /* AoE protocol */
+#undef SANBOOT_PROTO_AOE /* AoE protocol */
/*
* Name resolution modules
@@ -76,16 +76,16 @@
* you want to use.
*
*/
-//#define IMAGE_NBI /* NBI image support */
-//#define IMAGE_ELF /* ELF image support */
-//#define IMAGE_FREEBSD /* FreeBSD kernel image support */
-//#define IMAGE_MULTIBOOT /* MultiBoot image support */
-//#define IMAGE_AOUT /* a.out image support */
-//#define IMAGE_WINCE /* WinCE image support */
-//#define IMAGE_PXE /* PXE image support */
-//#define IMAGE_SCRIPT /* gPXE script image support */
-//#define IMAGE_BZIMAGE /* Linux bzImage image support */
-//#define IMAGE_COMBOOT /* SYSLINUX COMBOOT image support */
+#define IMAGE_NBI /* NBI image support */
+#define IMAGE_ELF /* ELF image support */
+#define IMAGE_FREEBSD /* FreeBSD kernel image support */
+#define IMAGE_MULTIBOOT /* MultiBoot image support */
+#undef IMAGE_AOUT /* a.out image support */
+#undef IMAGE_WINCE /* WinCE image support */
+#define IMAGE_PXE /* PXE image support */
+#define IMAGE_SCRIPT /* gPXE script image support */
+#define IMAGE_BZIMAGE /* Linux bzImage image support */
+#undef IMAGE_COMBOOT /* SYSLINUX COMBOOT image support */
//#define IMAGE_EFI /* EFI image support */
/*
@@ -93,14 +93,14 @@
*
*/
#define AUTOBOOT_CMD /* Automatic booting */
-#define NVO_CMD /* Non-volatile option storage commands */
-#define CONFIG_CMD /* Option configuration console */
+#undef NVO_CMD /* Non-volatile option storage commands */
+#undef CONFIG_CMD /* Option configuration console */
#define IFMGMT_CMD /* Interface management commands */
#define ROUTE_CMD /* Routing table management commands */
#define IMAGE_CMD /* Image management commands */
#define DHCP_CMD /* DHCP management commands */
#define SANBOOT_CMD /* SAN boot commands */
-#define LOGIN_CMD /* Login command */
+#undef LOGIN_CMD /* Login command */
/*
* Obscure configuration options
-12
View File
@@ -1,12 +0,0 @@
diff -urN gpxe-0.9.7/src/arch/i386/drivers/net/undinet.c gpxe-0.9.7-undinet/src/arch/i386/drivers/net/undinet.c
--- gpxe-0.9.7/src/arch/i386/drivers/net/undinet.c 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-undinet/src/arch/i386/drivers/net/undinet.c 2010-01-26 10:06:31.000000000 -0500
@@ -427,7 +427,7 @@
"nop\n\t"
"nop\n\t"
"cli\n\t" ) : : );
- return;
+ //return;
}
/* Start ISR processing */
-44
View File
@@ -1,44 +0,0 @@
diff -urN gpxe-0.9.7/src/arch/i386/include/pxe_api.h gpxe-0.9.7-undiserviceflags/src/arch/i386/include/pxe_api.h
--- gpxe-0.9.7/src/arch/i386/include/pxe_api.h 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-undiserviceflags/src/arch/i386/include/pxe_api.h 2009-08-21 20:49:41.000000000 -0400
@@ -1415,6 +1415,25 @@
/** PXE API function code for pxenv_undi_get_iface_info() */
#define PXENV_UNDI_GET_IFACE_INFO 0x0013
+/** Broadcast supported */
+#define SUPPORTED_BROADCAST 0x0001
+/** Multicast supported */
+#define SUPPORTED_MULTICAST 0x0002
+/** Functional/group addressing supported */
+#define SUPPORTED_GROUP 0x0004
+/** Promiscuous mode supported */
+#define SUPPORTED_PROMISCUOUS 0x0008
+/** Software settable station address */
+#define SUPPORTED_SET_STATION_ADDRESS 0x0010
+/** InitiateDiagnostics supported */
+#define SUPPORTED_DIAGNOSTICS 0x0040
+/** Reset MAC supported */
+#define SUPPORTED_RESET 0x0400
+/** Open / Close Adapter supported */
+#define SUPPORTED_OPEN_CLOSE 0x0800
+/** Interrupt Request supported */
+#define SUPPORTED_IRQ 0x1000
+
/** Parameter block for pxenv_undi_get_iface_info() */
struct s_PXENV_UNDI_GET_IFACE_INFO {
PXENV_STATUS_t Status; /**< PXE status code */
diff -urN gpxe-0.9.7/src/arch/i386/interface/pxe/pxe_undi.c gpxe-0.9.7-undiserviceflags/src/arch/i386/interface/pxe/pxe_undi.c
--- gpxe-0.9.7/src/arch/i386/interface/pxe/pxe_undi.c 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-undiserviceflags/src/arch/i386/interface/pxe/pxe_undi.c 2009-08-21 20:49:41.000000000 -0400
@@ -519,7 +519,10 @@
snprintf ( ( char * ) undi_get_iface_info->IfaceType,
sizeof ( undi_get_iface_info->IfaceType ), "gPXE" );
undi_get_iface_info->LinkSpeed = 10000000; /* 10 Mbps */
- undi_get_iface_info->ServiceFlags = 0;
+ undi_get_iface_info->ServiceFlags =
+ ( SUPPORTED_BROADCAST | SUPPORTED_MULTICAST |
+ SUPPORTED_SET_STATION_ADDRESS | SUPPORTED_RESET |
+ SUPPORTED_OPEN_CLOSE | SUPPORTED_IRQ );
memset ( undi_get_iface_info->Reserved, 0,
sizeof(undi_get_iface_info->Reserved) );
-12
View File
@@ -1,12 +0,0 @@
diff -urN gpxe-0.9.7/src/net/udp/dhcp.c gpxe-0.9.7-xnbauserclass/src/net/udp/dhcp.c
--- gpxe-0.9.7/src/net/udp/dhcp.c 2009-03-01 21:23:42.000000000 -0500
+++ gpxe-0.9.7-xnbauserclass/src/net/udp/dhcp.c 2009-08-21 11:23:09.000000000 -0400
@@ -78,7 +78,7 @@
'A', 'r', 'c', 'h', ':', '0', '0', '0', '0', '0', ':',
'U', 'N', 'D', 'I', ':', '0', '0', '2', '0', '0', '1' ),
DHCP_USER_CLASS_ID,
- DHCP_STRING ( 'g', 'P', 'X', 'E' ),
+ DHCP_STRING ( 'x', 'N', 'B', 'A' ),
DHCP_PARAMETER_REQUEST_LIST,
DHCP_OPTION ( DHCP_SUBNET_MASK, DHCP_ROUTERS, DHCP_DNS_SERVERS,
DHCP_LOG_SERVERS, DHCP_HOST_NAME, DHCP_DOMAIN_NAME,
Binary file not shown.
-29
View File
@@ -1,29 +0,0 @@
From: Joshua Oreman <oremanj@rwcr.net>
Date: Tue, 3 Nov 2009 18:31:12 +0000 (-0500)
Subject: [dhcp] Accept ProxyDHCP replies of type DHCPOFFER
X-Git-Url: http://git.etherboot.org/?p=gpxe.git;a=commitdiff_plain;h=04e4a4f69520422d7ff7f02ba0f6d9a9dd084ee2
[dhcp] Accept ProxyDHCP replies of type DHCPOFFER
The PXE standard provides examples of ProxyDHCP responses being encoded both
as type DHCPOFFER and DHCPACK, but currently we only accept DHCPACKs. Since
there are PXE servers in existence that respond to ProxyDHCPREQUESTs with
DHCPOFFERs, modify gPXE's ProxyDHCP pruning logic to treat both types of
responses equally.
Signed-off-by: Marty Connor <mdc@etherboot.org>
---
diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c
index b0dd952..ac4f82c 100644
--- a/src/net/udp/dhcp.c
+++ b/src/net/udp/dhcp.c
@@ -627,7 +627,7 @@ static void dhcp_proxy_rx ( struct dhcp_session *dhcp,
/* Filter out unacceptable responses */
if ( peer->sin_port != dhcp->proxy_port )
return;
- if ( msgtype != DHCPACK )
+ if ( ( msgtype != DHCPOFFER ) && ( msgtype != DHCPACK ) )
return;
if ( server_id.s_addr /* Linux PXE server omits server ID */ &&
( server_id.s_addr != dhcp->proxy_server.s_addr ) )
-71
View File
@@ -1,71 +0,0 @@
diff -urN gpxe-0.9.9/src/config/general.h gpxe-0.9.9-kvmconfig/src/config/general.h
--- gpxe-0.9.9/src/config/general.h 2009-10-21 15:05:47.000000000 -0400
+++ gpxe-0.9.9-kvmconfig/src/config/general.h 2010-01-26 15:21:58.000000000 -0500
@@ -60,9 +60,9 @@
*
*/
-//#undef SANBOOT_PROTO_ISCSI /* iSCSI protocol */
-//#undef SANBOOT_PROTO_AOE /* AoE protocol */
-//#undef SANBOOT_PROTO_IB_SRP /* Infiniband SCSI RDMA protocol */
+#undef SANBOOT_PROTO_ISCSI /* iSCSI protocol */
+#undef SANBOOT_PROTO_AOE /* AoE protocol */
+#undef SANBOOT_PROTO_IB_SRP /* Infiniband SCSI RDMA protocol */
/*
* Name resolution modules
@@ -79,34 +79,34 @@
* you want to use.
*
*/
-//#define IMAGE_NBI /* NBI image support */
-//#define IMAGE_ELF /* ELF image support */
-//#define IMAGE_FREEBSD /* FreeBSD kernel image support */
-//#define IMAGE_MULTIBOOT /* MultiBoot image support */
-//#define IMAGE_AOUT /* a.out image support */
-//#define IMAGE_WINCE /* WinCE image support */
-//#define IMAGE_PXE /* PXE image support */
-//#define IMAGE_SCRIPT /* gPXE script image support */
-//#define IMAGE_BZIMAGE /* Linux bzImage image support */
-//#define IMAGE_COMBOOT /* SYSLINUX COMBOOT image support */
-//#define IMAGE_EFI /* EFI image support */
+#undef IMAGE_NBI /* NBI image support */
+#undef IMAGE_ELF /* ELF image support */
+#undef IMAGE_FREEBSD /* FreeBSD kernel image support */
+#undef IMAGE_MULTIBOOT /* MultiBoot image support */
+#undef IMAGE_AOUT /* a.out image support */
+#undef IMAGE_WINCE /* WinCE image support */
+#define IMAGE_PXE /* PXE image support */
+#define IMAGE_SCRIPT /* gPXE script image support */
+#define IMAGE_BZIMAGE /* Linux bzImage image support */
+#undef IMAGE_COMBOOT /* SYSLINUX COMBOOT image support */
+#undef IMAGE_EFI /* EFI image support */
/*
* Command-line commands to include
*
*/
-#define AUTOBOOT_CMD /* Automatic booting */
+#undef AUTOBOOT_CMD /* Automatic booting */
#define NVO_CMD /* Non-volatile option storage commands */
-#define CONFIG_CMD /* Option configuration console */
-#define IFMGMT_CMD /* Interface management commands */
-#define ROUTE_CMD /* Routing table management commands */
-#define IMAGE_CMD /* Image management commands */
-#define DHCP_CMD /* DHCP management commands */
-#define SANBOOT_CMD /* SAN boot commands */
-#define LOGIN_CMD /* Login command */
+#undef CONFIG_CMD /* Option configuration console */
+#undef IFMGMT_CMD /* Interface management commands */
+#undef ROUTE_CMD /* Routing table management commands */
+#define IMAGE_CMD /* Image management commands */
+#undef DHCP_CMD /* DHCP management commands */
+#undef SANBOOT_CMD /* SAN boot commands */
+#undef LOGIN_CMD /* Login command */
#undef TIME_CMD /* Time commands */
#undef DIGEST_CMD /* Image crypto digest commands */
-//#undef PXE_CMD /* PXE commands */
+#undef PXE_CMD /* PXE commands */
/*
* Obscure configuration options
-28
View File
@@ -1,28 +0,0 @@
From: Michael Brown <mcb30@etherboot.org>
Date: Sat, 14 Nov 2009 03:02:16 +0000 (+0000)
Subject: [ipv4] Ignore non-open net devices when performing routing
X-Git-Url: http://git.etherboot.org/?p=gpxe.git;a=commitdiff_plain;h=4933ccbf654c27e3260e71bae7ade8286f69193a
[ipv4] Ignore non-open net devices when performing routing
We do not discard routing table entries when closing an interface. It
is plausible that multiple interfaces may be on the same physical
network; if so, then we may end up in a situation whereby outbound
packets attempt to route via a closed interface.
Fix by ignoring non-open net devices in ipv4_route().
---
diff --git a/src/net/ipv4.c b/src/net/ipv4.c
index 6b78ad7..4c1393f 100644
--- a/src/net/ipv4.c
+++ b/src/net/ipv4.c
@@ -118,6 +118,8 @@ static struct ipv4_miniroute * ipv4_route ( struct in_addr *dest ) {
/* Find first usable route in routing table */
list_for_each_entry ( miniroute, &ipv4_miniroutes, list ) {
+ if ( ! ( miniroute->netdev->state & NETDEV_OPEN ) )
+ continue;
local = ( ( ( dest->s_addr ^ miniroute->address.s_addr )
& miniroute->netmask.s_addr ) == 0 );
has_gw = ( miniroute->gateway.s_addr );
-34
View File
@@ -1,34 +0,0 @@
From: Joshua Oreman <oremanj@rwcr.net>
Date: Tue, 3 Nov 2009 18:37:57 +0000 (-0500)
Subject: [dhcp] Assume PXE options are in DHCPOFFER only if boot menu is included
X-Git-Url: http://git.etherboot.org/?p=gpxe.git;a=commitdiff_plain;h=734061e9c60103439e13d72c68e50ee362f3ba91
[dhcp] Assume PXE options are in DHCPOFFER only if boot menu is included
IBM's Tivoli Provisioning Manager for OS Deployment, when acting as a
ProxyDHCP server, sends an initial offer with a vendor class of "PXEClient"
and vendor-encapsulated options that have nothing to do with PXE. To
differentiate between this case and the case of a ProxyDHCP server that
sends all PXE options in its initial offer, modify gPXE to check for
the presence of an encapsulated PXE boot menu option (43.9) instead of
simply checking for the existence of any encapsulated options at all.
This is the same check used by the Intel vendor PXE ROM.
Signed-off-by: Marty Connor <mdc@etherboot.org>
---
diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c
index ac4f82c..aba9000 100644
--- a/src/net/udp/dhcp.c
+++ b/src/net/udp/dhcp.c
@@ -361,8 +361,8 @@ static void dhcp_discovery_rx ( struct dhcp_session *dhcp,
has_pxeclient = ( ( vci_len >= ( int ) sizeof ( vci ) ) &&
( strncmp ( "PXEClient", vci, sizeof (vci) ) == 0 ));
- /* Identify presence of vendor-specific options */
- pxeopts_len = dhcppkt_fetch ( dhcppkt, DHCP_VENDOR_ENCAP, NULL, 0 );
+ /* Identify presence of PXE-specific options */
+ pxeopts_len = dhcppkt_fetch ( dhcppkt, DHCP_PXE_BOOT_MENU, NULL, 0 );
has_pxeopts = ( pxeopts_len >= 0 );
if ( has_pxeclient )
DBGC ( dhcp, "%s", ( has_pxeopts ? " pxe" : " proxy" ) );
-128
View File
@@ -1,128 +0,0 @@
--- gpxe_src/src/arch/i386/prefix/romprefix.S 2010-01-18 21:06:58.000000000 -0500
+++ gpxe_src.int18/src/arch/i386/prefix/romprefix.S 2010-01-20 11:19:31.000000000 -0500
@@ -145,7 +145,7 @@
* Determine whether or not this is a PnP system via a signature
* check. If it is PnP, return to the PnP BIOS indicating that we are
* a boot-capable device; the BIOS will call our boot execution vector
- * if it wants to boot us. If it is not PnP, hook INT 19.
+ * if it wants to boot us. If it is not PnP, hook INT 18.
*/
init:
/* Preserve registers, clear direction flag, set %ds=%cs */
@@ -273,19 +273,17 @@
testw %ax, %ax
je got_bbs
no_pnp: /* Not PnP-compliant - therefore cannot be BBS-compliant */
-no_bbs: /* Not BBS-compliant - must hook INT 19 */
- movw $init_message_int19, %si
+no_bbs: /* Not BBS-compliant - hooking INT 18 */
+ movw $init_message_int18, %si
xorw %di, %di
call print_message
xorw %ax, %ax
movw %ax, %es
- pushl %es:( 0x19 * 4 )
- popl orig_int19
pushw %gs /* %gs contains runtime %cs */
- pushw $int19_entry
- popl %es:( 0x19 * 4 )
+ pushw $int18_entry
+ popl %es:( 0x18 * 4 )
jmp bbs_done
-got_bbs: /* BBS compliant - no need to hook INT 19 */
+got_bbs: /* BBS compliant - no need to hook INT 18 */
movw $init_message_bbs, %si
xorw %di, %di
call print_message
@@ -470,9 +468,9 @@
init_message_pmm:
.asciz " PMM"
.size init_message_pmm, . - init_message_pmm
-init_message_int19:
- .asciz " INT19"
- .size init_message_int19, . - init_message_int19
+init_message_int18:
+ .asciz " INT18"
+ .size init_message_int18, . - init_message_int18
init_message_prompt:
.asciz "\nPress Ctrl-B to configure "
.size init_message_prompt, . - init_message_prompt
@@ -517,59 +515,30 @@
lret
.size bev_entry, . - bev_entry
-/* INT19 entry point
+/* INT18 entry point
*
- * Called via the hooked INT 19 if we detected a non-PnP BIOS. We
- * attempt to return via the original INT 19 vector (if we were able
- * to store it).
+ * Called via the hooked INT 18 if we detected a non-PnP BIOS.
+ * Use iret to return to firmware
*/
-int19_entry:
- pushw %cs
- popw %ds
- /* Prompt user to press B to boot */
- movw $int19_message_prompt, %si
- xorw %di, %di
- call print_message
- movw $prodstr, %si
- call print_message
- movw $int19_message_dots, %si
- call print_message
- movw $0xdf4e, %bx
- call wait_for_key
- pushf
- xorw %di, %di
- call print_kill_line
- movw $int19_message_done, %si
- call print_message
- popf
- jz 1f
- /* Leave keypress in buffer and start gPXE. The keypress will
- * cause the usual initial Ctrl-B prompt to be skipped.
- */
+int18_entry:
+ pushfl
+ pushal
+ pushw %gs
+ pushw %fs
+ pushw %es
+ pushw %ds
+
pushw %cs
call exec
-1: /* Try to call original INT 19 vector */
- movl %cs:orig_int19, %eax
- testl %eax, %eax
- je 2f
- ljmp *%cs:orig_int19
-2: /* No chained vector: issue INT 18 as a last resort */
- int $0x18
- .size int19_entry, . - int19_entry
-orig_int19:
- .long 0
- .size orig_int19, . - orig_int19
-int19_message_prompt:
- .asciz "Press N to skip booting from "
- .size int19_message_prompt, . - int19_message_prompt
-int19_message_dots:
- .asciz "..."
- .size int19_message_dots, . - int19_message_dots
-int19_message_done:
- .asciz "\n\n"
- .size int19_message_done, . - int19_message_done
-
+ popw %ds
+ popw %es
+ popw %fs
+ popw %gs
+ popal
+ popfl
+ iret
+
/* Execute as a boot device
*
*/
-135
View File
@@ -1,135 +0,0 @@
diff -urN gpxe-0.9.9/src/arch/i386/interface/pcbios/iscsiboot.c gpxe-0.9.9-iscsiregisteronpxe/src/arch/i386/interface/pcbios/iscsiboot.c
--- gpxe-0.9.9/src/arch/i386/interface/pcbios/iscsiboot.c 2009-10-21 15:05:47.000000000 -0400
+++ gpxe-0.9.9-iscsiregisteronpxe/src/arch/i386/interface/pcbios/iscsiboot.c 2010-01-26 14:56:26.000000000 -0500
@@ -22,6 +22,56 @@
.type = &setting_type_int8,
};
+static int iscsireg ( const char *root_path ) {
+ struct scsi_device *scsi;
+ struct int13_drive *drive;
+ int rc;
+
+ scsi = zalloc ( sizeof ( *scsi ) );
+ if ( ! scsi ) {
+ rc = -ENOMEM;
+ goto regerr_alloc_scsi;
+ }
+ drive = zalloc ( sizeof ( *drive ) );
+ if ( ! drive ) {
+ rc = -ENOMEM;
+ goto regerr_alloc_drive;
+ }
+
+ printf ( "Configuring iSCSI at %s\n", root_path );
+
+ if ( ( rc = iscsi_attach ( scsi, root_path ) ) != 0 ) {
+ printf ( "Could not attach iSCSI device: %s\n",
+ strerror ( rc ) );
+ goto regerr_attach;
+ }
+ if ( ( rc = init_scsidev ( scsi ) ) != 0 ) {
+ printf ( "Could not initialise iSCSI device: %s\n",
+ strerror ( rc ) );
+ goto regerr_init;
+ }
+
+ drive->blockdev = &scsi->blockdev;
+
+ /* FIXME: ugly, ugly hack */
+ struct net_device *netdev = last_opened_netdev();
+ struct iscsi_session *iscsi =
+ container_of ( scsi->backend, struct iscsi_session, refcnt );
+ ibft_fill_data ( netdev, iscsi );
+
+ register_int13_drive ( drive );
+ printf ( "Registered as BIOS drive %#02x\n", drive->drive );
+ return 0;
+ regerr_init:
+ iscsi_detach ( scsi );
+ regerr_attach:
+ free ( drive );
+ regerr_alloc_drive:
+ free ( scsi );
+ regerr_alloc_scsi:
+ return rc;
+}
+
static int iscsiboot ( const char *root_path ) {
struct scsi_device *scsi;
struct int13_drive *drive;
@@ -90,4 +140,5 @@
struct sanboot_protocol iscsi_sanboot_protocol __sanboot_protocol = {
.prefix = "iscsi:",
.boot = iscsiboot,
+ .reg = iscsireg,
};
diff -urN gpxe-0.9.9/src/include/gpxe/sanboot.h gpxe-0.9.9-iscsiregisteronpxe/src/include/gpxe/sanboot.h
--- gpxe-0.9.9/src/include/gpxe/sanboot.h 2009-10-21 15:05:47.000000000 -0400
+++ gpxe-0.9.9-iscsiregisteronpxe/src/include/gpxe/sanboot.h 2010-01-26 14:56:04.000000000 -0500
@@ -8,6 +8,7 @@
struct sanboot_protocol {
const char *prefix;
int ( * boot ) ( const char *root_path );
+ int ( * reg ) ( const char *root_path );
};
#define SANBOOT_PROTOCOLS \
diff -urN gpxe-0.9.9/src/usr/autoboot.c gpxe-0.9.9-iscsiregisteronpxe/src/usr/autoboot.c
--- gpxe-0.9.9/src/usr/autoboot.c 2009-10-21 15:05:47.000000000 -0400
+++ gpxe-0.9.9-iscsiregisteronpxe/src/usr/autoboot.c 2010-01-26 15:01:42.000000000 -0500
@@ -108,7 +108,7 @@
}
/**
- * Boot using root path
+ * Register a drive in BIOS, but don't boot
*
* @v root_path Root path
* @ret rc Return status code
@@ -120,6 +120,25 @@
for_each_table_entry ( sanboot, SANBOOT_PROTOCOLS ) {
if ( strncmp ( root_path, sanboot->prefix,
strlen ( sanboot->prefix ) ) == 0 ) {
+ return sanboot->reg ( root_path );
+ }
+ }
+
+ return -ENOTSUP;
+}
+/**
+ * Boot using root path
+ *
+ * @v root_path Root path
+ * @ret rc Return status code
+ */
+int reg_root_path ( const char *root_path ) {
+ struct sanboot_protocol *sanboot;
+
+ /* Quick hack */
+ for_each_table_entry ( sanboot, SANBOOT_PROTOCOLS ) {
+ if ( strncmp ( root_path, sanboot->prefix,
+ strlen ( sanboot->prefix ) ) == 0 ) {
return sanboot->boot ( root_path );
}
}
@@ -141,6 +160,7 @@
struct setting pxe_boot_menu_setting
= { .tag = DHCP_PXE_BOOT_MENU };
char buf[256];
+ char ruf[256];
struct in_addr next_server;
unsigned int pxe_discovery_control;
int rc;
@@ -172,6 +192,11 @@
fetch_ipv4_setting ( NULL, &next_server_setting, &next_server );
fetch_string_setting ( NULL, &filename_setting, buf, sizeof ( buf ) );
if ( buf[0] ) {
+ /* Going to PXE, but set up iBFT if applicable first */
+ fetch_string_setting(NULL, &root_path_setting,ruf,sizeof(ruf));
+ if (ruf[0]) {
+ reg_root_path ( ruf );
+ }
printf ( "Booting from filename \"%s\"\n", buf );
return boot_next_server_and_filename ( next_server, buf );
}
@@ -1,42 +0,0 @@
From: Bernhard Kohl <bernhard.kohl@nsn.com>
Date: Thu, 21 Jan 2010 23:13:48 +0000 (-0500)
Subject: [pci] Save and restore PCI command register
X-Git-Url: http://git.etherboot.org/?p=gpxe.git;a=commitdiff_plain;h=466d8fc234cf32cb63d9d773e2f92f51860165f9
[pci] Save and restore PCI command register
This seems to be necessary for some types of PCI devices. We had
problems when using gPXE in KVM virtual machines with direct
PCI device access.
Signed-off-by: Bernhard Kohl <bernhard.kohl@nsn.com>
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Modified-by: Marty Connor <mdc@etherboot.org>
Signed-off-by: Marty Connor <mdc@etherboot.org>
---
diff --git a/src/drivers/bus/pciextra.c b/src/drivers/bus/pciextra.c
index 1dd63ee..74c4099 100644
--- a/src/drivers/bus/pciextra.c
+++ b/src/drivers/bus/pciextra.c
@@ -60,8 +60,11 @@ int pci_find_capability ( struct pci_device *pci, int cap ) {
* function.
*/
unsigned long pci_bar_size ( struct pci_device *pci, unsigned int reg ) {
+ uint16_t cmd;
uint32_t start, size;
+ /* Save the original command register */
+ pci_read_config_word ( pci, PCI_COMMAND, &cmd );
/* Save the original bar */
pci_read_config_dword ( pci, reg, &start );
/* Compute which bits can be set */
@@ -70,6 +73,8 @@ unsigned long pci_bar_size ( struct pci_device *pci, unsigned int reg ) {
/* Restore the original size */
pci_write_config_dword ( pci, reg, start );
/* Find the significant bits */
+ /* Restore the original command register. This reenables decoding. */
+ pci_write_config_word ( pci, PCI_COMMAND, cmd );
if ( start & PCI_BASE_ADDRESS_SPACE_IO ) {
size &= PCI_BASE_ADDRESS_IO_MASK;
} else {
-48
View File
@@ -1,48 +0,0 @@
From: Stefan Hajnoczi <stefanha@gmail.com>
Date: Sun, 10 Jan 2010 19:05:17 +0000 (+0000)
Subject: [tftp] Allow fetching larger files by wrapping block number
X-Git-Url: http://git.etherboot.org/?p=gpxe.git;a=commitdiff_plain;h=dd99ee95cb513384a13c2be486f684e4a1606ea9
[tftp] Allow fetching larger files by wrapping block number
This patch adds TFTP support for files larger than 65535 blocks by
wrapping the 16-bit block number.
Reported-by: Mark Johnson <johnson.nh@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
---
diff --git a/src/net/udp/tftp.c b/src/net/udp/tftp.c
index bb031ec..82055fc 100644
--- a/src/net/udp/tftp.c
+++ b/src/net/udp/tftp.c
@@ -747,7 +747,7 @@ static int tftp_rx_data ( struct tftp_request *tftp,
struct io_buffer *iobuf ) {
struct tftp_data *data = iobuf->data;
struct xfer_metadata meta;
- int block;
+ unsigned int block;
off_t offset;
size_t data_len;
int rc;
@@ -759,14 +759,17 @@ static int tftp_rx_data ( struct tftp_request *tftp,
rc = -EINVAL;
goto done;
}
- if ( data->block == 0 ) {
+
+ /* Calculate block number */
+ block = ( ( bitmap_first_gap ( &tftp->bitmap ) + 1 ) & ~0xffff );
+ if ( data->block == 0 && block == 0 ) {
DBGC ( tftp, "TFTP %p received data block 0\n", tftp );
rc = -EINVAL;
goto done;
}
+ block += ( ntohs ( data->block ) - 1 );
/* Extract data */
- block = ( ntohs ( data->block ) - 1 );
offset = ( block * tftp->blksize );
iob_pull ( iobuf, sizeof ( *data ) );
data_len = iob_len ( iobuf );
Binary file not shown.
-11
View File
@@ -1,11 +0,0 @@
diff -urN gpxe-1.0.0/src/arch/i386/include/bzimage.h gpxe-1.0.0-cmdlinefix/src/arch/i386/include/bzimage.h
--- gpxe-1.0.0/src/arch/i386/include/bzimage.h 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-cmdlinefix/src/arch/i386/include/bzimage.h 2010-03-04 13:52:13.000000000 -0500
@@ -137,6 +137,6 @@
#define BZI_STACK_SIZE 0x1000
/** Maximum size of command line */
-#define BZI_CMDLINE_SIZE 0x100
+#define BZI_CMDLINE_SIZE 0x7FF
#endif /* _BZIMAGE_H */
-91
View File
@@ -1,91 +0,0 @@
diff -urN gpxe-1.0.0/src/config/general.h gpxe-1.0.0-xnbaconfig/src/config/general.h
--- gpxe-1.0.0/src/config/general.h 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-xnbaconfig/src/config/general.h 2010-02-06 11:54:02.000000000 -0500
@@ -56,7 +56,7 @@
#define DOWNLOAD_PROTO_TFTP /* Trivial File Transfer Protocol */
#define DOWNLOAD_PROTO_HTTP /* Hypertext Transfer Protocol */
#undef DOWNLOAD_PROTO_HTTPS /* Secure Hypertext Transfer Protocol */
-#undef DOWNLOAD_PROTO_FTP /* File Transfer Protocol */
+#define DOWNLOAD_PROTO_FTP /* File Transfer Protocol */
#undef DOWNLOAD_PROTO_TFTM /* Multicast Trivial File Transfer Protocol */
#undef DOWNLOAD_PROTO_SLAM /* Scalable Local Area Multicast */
@@ -65,7 +65,7 @@
*
*/
-//#undef SANBOOT_PROTO_ISCSI /* iSCSI protocol */
+#define SANBOOT_PROTO_ISCSI /* iSCSI protocol */
-//#undef SANBOOT_PROTO_AOE /* AoE protocol */
+#undef SANBOOT_PROTO_AOE /* AoE protocol */
//#undef SANBOOT_PROTO_IB_SRP /* Infiniband SCSI RDMA protocol */
@@ -73,9 +73,9 @@
* 802.11 cryptosystems and handshaking protocols
*
*/
-#define CRYPTO_80211_WEP /* WEP encryption (deprecated and insecure!) */
-#define CRYPTO_80211_WPA /* WPA Personal, authenticating with passphrase */
-#define CRYPTO_80211_WPA2 /* Add support for stronger WPA cryptography */
+#undef CRYPTO_80211_WEP /* WEP encryption (deprecated and insecure!) */
+#undef CRYPTO_80211_WPA /* WPA Personal, authenticating with passphrase */
+#undef CRYPTO_80211_WPA2 /* Add support for stronger WPA cryptography */
/*
* Name resolution modules
@@ -91,35 +91,35 @@
* you want to use.
*
*/
-//#define IMAGE_NBI /* NBI image support */
-//#define IMAGE_ELF /* ELF image support */
-//#define IMAGE_FREEBSD /* FreeBSD kernel image support */
-//#define IMAGE_MULTIBOOT /* MultiBoot image support */
-//#define IMAGE_AOUT /* a.out image support */
-//#define IMAGE_WINCE /* WinCE image support */
-//#define IMAGE_PXE /* PXE image support */
-//#define IMAGE_SCRIPT /* gPXE script image support */
-//#define IMAGE_BZIMAGE /* Linux bzImage image support */
-//#define IMAGE_COMBOOT /* SYSLINUX COMBOOT image support */
-//#define IMAGE_EFI /* EFI image support */
+#undef IMAGE_NBI /* NBI image support */
+#undef IMAGE_ELF /* ELF image support */
+#undef IMAGE_FREEBSD /* FreeBSD kernel image support */
+#undef IMAGE_MULTIBOOT /* MultiBoot image support */
+#undef IMAGE_AOUT /* a.out image support */
+#undef IMAGE_WINCE /* WinCE image support */
+#define IMAGE_PXE /* PXE image support */
+#define IMAGE_SCRIPT /* gPXE script image support */
+#define IMAGE_BZIMAGE /* Linux bzImage image support */
+#undef IMAGE_COMBOOT /* SYSLINUX COMBOOT image support */
+#undef IMAGE_EFI /* EFI image support */
/*
* Command-line commands to include
*
*/
-#define AUTOBOOT_CMD /* Automatic booting */
+#undef AUTOBOOT_CMD /* Automatic booting */
#define NVO_CMD /* Non-volatile option storage commands */
-#define CONFIG_CMD /* Option configuration console */
-#define IFMGMT_CMD /* Interface management commands */
-#define IWMGMT_CMD /* Wireless interface management commands */
-#define ROUTE_CMD /* Routing table management commands */
+#undef CONFIG_CMD /* Option configuration console */
+#undef IFMGMT_CMD /* Interface management commands */
+#undef IWMGMT_CMD /* Wireless interface management commands */
+#undef ROUTE_CMD /* Routing table management commands */
#define IMAGE_CMD /* Image management commands */
-#define DHCP_CMD /* DHCP management commands */
-#define SANBOOT_CMD /* SAN boot commands */
-#define LOGIN_CMD /* Login command */
+#undef DHCP_CMD /* DHCP management commands */
+#undef SANBOOT_CMD /* SAN boot commands */
+#undef LOGIN_CMD /* Login command */
#undef TIME_CMD /* Time commands */
#undef DIGEST_CMD /* Image crypto digest commands */
-//#undef PXE_CMD /* PXE commands */
+#undef PXE_CMD /* PXE commands */
/*
* Error message tables to include
-26
View File
@@ -1,26 +0,0 @@
diff -urN gpxe-1.0.0/src/hci/commands/hdboot_cmd.c gpxe-1.0.0-exittohd/src/hci/commands/hdboot_cmd.c
--- gpxe-1.0.0/src/hci/commands/hdboot_cmd.c 2010-02-06 14:29:55.000000000 -0500
+++ gpxe-1.0.0-exittohd/src/hci/commands/hdboot_cmd.c 2010-02-06 14:32:07.000000000 -0500
@@ -30,3 +30,7 @@
.name = "hdboot",
.exec = hdboot_exec,
};
+struct command exit_command __command = {
+ .name = "exit",
+ .exec = hdboot_exec,
+};
diff -urN gpxe-1.0.0/src/hci/shell.c gpxe-1.0.0-exittohd/src/hci/shell.c
--- gpxe-1.0.0/src/hci/shell.c 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-exittohd/src/hci/shell.c 2010-02-06 14:31:41.000000000 -0500
@@ -51,8 +51,8 @@
}
/** "exit" command definition */
-struct command exit_command __command = {
- .name = "exit",
+struct command xit_command __command = {
+ .name = "xit",
.exec = exit_exec,
};
Binary files gpxe-1.0.0/src/hci/.shell.c.swp and gpxe-1.0.0-exittohd/src/hci/.shell.c.swp differ
-32
View File
@@ -1,32 +0,0 @@
diff -urN gpxe-1.0.0/src/core/exec.c gpxe-1.0.0-expandfilename/src/core/exec.c
--- gpxe-1.0.0/src/core/exec.c 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-expandfilename/src/core/exec.c 2010-05-20 21:28:43.000000000 -0400
@@ -94,7 +94,7 @@
* The expanded command line is allocated with malloc() and the caller
* must eventually free() it.
*/
-static char * expand_command ( const char *command ) {
+char * expand_command ( const char *command ) {
char *expcmd;
char *start;
char *end;
diff -urN gpxe-1.0.0/src/usr/autoboot.c gpxe-1.0.0-expandfilename/src/usr/autoboot.c
--- gpxe-1.0.0/src/usr/autoboot.c 2010-05-20 20:56:32.000000000 -0400
+++ gpxe-1.0.0-expandfilename/src/usr/autoboot.c 2010-05-20 21:31:49.000000000 -0400
@@ -32,6 +32,7 @@
#include <usr/dhcpmgmt.h>
#include <usr/imgmgmt.h>
#include <usr/autoboot.h>
+char * expand_command ( const char *command );
/** @file
*
@@ -85,6 +86,8 @@
uri_encode ( filename, buf + strlen ( buf ),
sizeof ( buf ) - strlen ( buf ), URI_PATH );
filename = buf;
+ } else { /* only support variable expansion in absolute paths to avoid stepping on buf size */
+ filename = expand_command(filename);
}
image = alloc_image();
-60
View File
@@ -1,60 +0,0 @@
diff -urN gpxe-1.0.0/src/config/config.c gpxe-1.0.0-hdboot/src/config/config.c
--- gpxe-1.0.0/src/config/config.c 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-hdboot/src/config/config.c 2010-02-06 12:10:51.000000000 -0500
@@ -222,6 +222,9 @@
#ifdef SANBOOT_CMD
REQUIRE_OBJECT ( sanboot_cmd );
#endif
+#ifdef HDBOOT_CMD
+REQUIRE_OBJECT ( hdboot_cmd );
+#endif
#ifdef LOGIN_CMD
REQUIRE_OBJECT ( login_cmd );
#endif
diff -urN gpxe-1.0.0/src/config/general.h gpxe-1.0.0-hdboot/src/config/general.h
--- gpxe-1.0.0/src/config/general.h 2010-02-06 12:07:39.000000000 -0500
+++ gpxe-1.0.0-hdboot/src/config/general.h 2010-02-06 12:11:10.000000000 -0500
@@ -116,6 +116,7 @@
#define IMAGE_CMD /* Image management commands */
#undef DHCP_CMD /* DHCP management commands */
#undef SANBOOT_CMD /* SAN boot commands */
+#define HDBOOT_CMD /* HD boot commands */
#undef LOGIN_CMD /* Login command */
#undef TIME_CMD /* Time commands */
#undef DIGEST_CMD /* Image crypto digest commands */
diff -urN gpxe-1.0.0/src/hci/commands/hdboot_cmd.c gpxe-1.0.0-hdboot/src/hci/commands/hdboot_cmd.c
--- gpxe-1.0.0/src/hci/commands/hdboot_cmd.c 1969-12-31 19:00:00.000000000 -0500
+++ gpxe-1.0.0-hdboot/src/hci/commands/hdboot_cmd.c 2010-02-06 12:10:51.000000000 -0500
@@ -0,0 +1,32 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <getopt.h>
+#include <int13.h>
+#include <gpxe/command.h>
+#include <usr/autoboot.h>
+
+/**
+ * The "hdboot" command
+ *
+ * @v argc Argument count
+ * @v argv Argument list
+ * @ret rc Exit code
+ */
+static int hdboot_exec ( int argc, char **argv ) {
+ if (argc != 1) {
+ printf ( "Usage:\n"
+ " %s\n"
+ "\n"
+ "Boot from the first HD\n",
+ argv[0] );
+ return 1;
+ }
+ int13_boot ( 0x80 );
+ return 1;
+}
+
+struct command hdboot_command __command = {
+ .name = "hdboot",
+ .exec = hdboot_exec,
+};
-141
View File
@@ -1,141 +0,0 @@
diff -urN gpxe-1.0.0/src/core/settings.c gpxe-1.0.0-hyphenatedmachyp/src/core/settings.c
--- gpxe-1.0.0/src/core/settings.c 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-hyphenatedmachyp/src/core/settings.c 2010-06-02 14:15:26.000000000 -0400
@@ -1314,6 +1314,72 @@
}
/**
+ * Parse and store value of hex string setting, hyphen delimited
+ *
+ * @v settings Settings block
+ * @v setting Setting to store
+ * @v value Formatted setting data
+ * @ret rc Return status code
+ */
+static int storef_hexhyp ( struct settings *settings, struct setting *setting,
+ const char *value ) {
+ char *ptr = ( char * ) value;
+ uint8_t bytes[ strlen ( value ) ]; /* cannot exceed strlen(value) */
+ unsigned int len = 0;
+
+ while ( 1 ) {
+ bytes[len++] = strtoul ( ptr, &ptr, 16 );
+ switch ( *ptr ) {
+ case '\0' :
+ return store_setting ( settings, setting, bytes, len );
+ case '-' :
+ ptr++;
+ break;
+ default :
+ return -EINVAL;
+ }
+ }
+}
+/**
+ * Fetch and format value of hex string setting with hypphen delimiter
+ *
+ * @v settings Settings block, or NULL to search all blocks
+ * @v setting Setting to fetch
+ * @v buf Buffer to contain formatted value
+ * @v len Length of buffer
+ * @ret len Length of formatted value, or negative error
+ */
+static int fetchf_hexhyp ( struct settings *settings, struct setting *setting,
+ char *buf, size_t len ) {
+ int raw_len;
+ int check_len;
+ int used = 0;
+ int i;
+
+ raw_len = fetch_setting_len ( settings, setting );
+ if ( raw_len < 0 )
+ return raw_len;
+
+ {
+ uint8_t raw[raw_len];
+
+ check_len = fetch_setting ( settings, setting, raw,
+ sizeof ( raw ) );
+ if ( check_len < 0 )
+ return check_len;
+ assert ( check_len == raw_len );
+
+ if ( len )
+ buf[0] = 0; /* Ensure that a terminating NUL exists */
+ for ( i = 0 ; i < raw_len ; i++ ) {
+ used += ssnprintf ( ( buf + used ), ( len - used ),
+ "%s%02x", ( used ? "-" : "" ),
+ raw[i] );
+ }
+ return used;
+ }
+}
+/**
* Fetch and format value of hex string setting
*
* @v settings Settings block, or NULL to search all blocks
@@ -1359,6 +1425,12 @@
.storef = storef_hex,
.fetchf = fetchf_hex,
};
+/** A hex-string setting, hyphen delimited */
+struct setting_type setting_type_hexhyp __setting_type = {
+ .name = "hexhyp",
+ .storef = storef_hexhyp,
+ .fetchf = fetchf_hexhyp,
+};
/**
* Parse and store value of UUID setting
diff -urN gpxe-1.0.0/src/include/gpxe/settings.h gpxe-1.0.0-hyphenatedmachyp/src/include/gpxe/settings.h
--- gpxe-1.0.0/src/include/gpxe/settings.h 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-hyphenatedmachyp/src/include/gpxe/settings.h 2010-06-02 14:15:26.000000000 -0400
@@ -226,6 +226,7 @@
extern struct setting_type setting_type_uint16 __setting_type;
extern struct setting_type setting_type_uint32 __setting_type;
extern struct setting_type setting_type_hex __setting_type;
+extern struct setting_type setting_type_hexhyp __setting_type;
extern struct setting_type setting_type_uuid __setting_type;
extern struct setting ip_setting __setting;
@@ -242,6 +243,7 @@
extern struct setting uuid_setting __setting;
extern struct setting next_server_setting __setting;
extern struct setting mac_setting __setting;
+extern struct setting machyp_setting __setting;
extern struct setting busid_setting __setting;
extern struct setting user_class_setting __setting;
diff -urN gpxe-1.0.0/src/net/netdev_settings.c gpxe-1.0.0-hyphenatedmachyp/src/net/netdev_settings.c
--- gpxe-1.0.0/src/net/netdev_settings.c 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-hyphenatedmachyp/src/net/netdev_settings.c 2010-06-02 14:17:09.000000000 -0400
@@ -38,6 +38,11 @@
.description = "MAC address",
.type = &setting_type_hex,
};
+struct setting machyp_setting __setting = {
+ .name = "machyp",
+ .description = "MAC address",
+ .type = &setting_type_hexhyp,
+};
struct setting busid_setting __setting = {
.name = "busid",
.description = "Bus ID",
@@ -58,7 +63,7 @@
struct net_device *netdev = container_of ( settings, struct net_device,
settings.settings );
- if ( setting_cmp ( setting, &mac_setting ) == 0 ) {
+ if (( setting_cmp ( setting, &mac_setting ) == 0 ) || ( setting_cmp ( setting, &machyp_setting ) == 0 )) {
if ( len != netdev->ll_protocol->ll_addr_len )
return -EINVAL;
memcpy ( netdev->ll_addr, data, len );
@@ -84,7 +89,7 @@
struct device_description *desc = &netdev->dev->desc;
struct dhcp_netdev_desc dhcp_desc;
- if ( setting_cmp ( setting, &mac_setting ) == 0 ) {
+ if (( setting_cmp ( setting, &mac_setting ) == 0 ) || ( setting_cmp ( setting, &machyp_setting ) == 0 )) {
if ( len > netdev->ll_protocol->ll_addr_len )
len = netdev->ll_protocol->ll_addr_len;
memcpy ( data, netdev->ll_addr, len );
-124
View File
@@ -1,124 +0,0 @@
diff -urN gpxe-1.0.0/src/arch/i386/prefix/romprefix.S gpxe-1.0.0-int18boot/src/arch/i386/prefix/romprefix.S
--- gpxe-1.0.0/src/arch/i386/prefix/romprefix.S 2010-02-06 14:20:06.000000000 -0500
+++ gpxe-1.0.0-int18boot/src/arch/i386/prefix/romprefix.S 2010-02-06 14:19:39.000000000 -0500
@@ -169,7 +169,7 @@
* Determine whether or not this is a PnP system via a signature
* check. If it is PnP, return to the PnP BIOS indicating that we are
* a boot-capable device; the BIOS will call our boot execution vector
- * if it wants to boot us. If it is not PnP, hook INT 19.
+ * if it wants to boot us. If it is not PnP, hook INT 18.
*/
init:
/* Preserve registers, clear direction flag, set %ds=%cs */
@@ -301,17 +301,15 @@
testw %ax, %ax
je got_bbs
no_pnp: /* Not PnP-compliant - therefore cannot be BBS-compliant */
-no_bbs: /* Not BBS-compliant - must hook INT 19 */
- movw $init_message_int19, %si
+no_bbs: /* Not BBS-compliant - must hook INT 18 */
+ movw $init_message_int18, %si
xorw %di, %di
call print_message
xorw %ax, %ax
movw %ax, %es
- pushl %es:( 0x19 * 4 )
- popl orig_int19
pushw %gs /* %gs contains runtime %cs */
- pushw $int19_entry
- popl %es:( 0x19 * 4 )
+ pushw $int18_entry
+ popl %es:( 0x18 * 4 )
jmp bbs_done
got_bbs: /* BBS compliant - no need to hook INT 19 */
movw $init_message_bbs, %si
@@ -535,9 +533,9 @@
.asciz "\nPMM required but not present!\n"
.size init_message_no_pmm, . - init_message_no_pmm
#endif
-init_message_int19:
- .asciz " INT19"
- .size init_message_int19, . - init_message_int19
+init_message_int18:
+ .asciz " INT18"
+ .size init_message_int18, . - init_message_int18
init_message_prompt:
.asciz "\nPress Ctrl-B to configure "
.size init_message_prompt, . - init_message_prompt
@@ -887,58 +885,29 @@
#endif /* LOAD_ROM_FROM_PCI */
-/* INT19 entry point
+/* INT18 entry point
*
- * Called via the hooked INT 19 if we detected a non-PnP BIOS. We
- * attempt to return via the original INT 19 vector (if we were able
- * to store it).
+ * Called via the hooked INT 18 if we detected a non-PnP BIOS. We
+ * use iret to return.
*/
-int19_entry:
- pushw %cs
- popw %ds
- /* Prompt user to press B to boot */
- movw $int19_message_prompt, %si
- xorw %di, %di
- call print_message
- movw $prodstr, %si
- call print_message
- movw $int19_message_dots, %si
- call print_message
- movw $0xdf4e, %bx
- call wait_for_key
- pushf
- xorw %di, %di
- call print_kill_line
- movw $int19_message_done, %si
- call print_message
- popf
- jz 1f
- /* Leave keypress in buffer and start gPXE. The keypress will
- * cause the usual initial Ctrl-B prompt to be skipped.
- */
+int18_entry:
+ pushfl
+ pushal
+ pushw %gs
+ pushw %fs
+ pushw %es
+ pushw %ds
pushw %cs
call exec
-1: /* Try to call original INT 19 vector */
- movl %cs:orig_int19, %eax
- testl %eax, %eax
- je 2f
- ljmp *%cs:orig_int19
-2: /* No chained vector: issue INT 18 as a last resort */
- int $0x18
- .size int19_entry, . - int19_entry
-orig_int19:
- .long 0
- .size orig_int19, . - orig_int19
+ popw %ds
+ popw %es
+ popw %fs
+ popw %gs
+ popal
+ popfl
+ iret
+
-int19_message_prompt:
- .asciz "Press N to skip booting from "
- .size int19_message_prompt, . - int19_message_prompt
-int19_message_dots:
- .asciz "..."
- .size int19_message_dots, . - int19_message_dots
-int19_message_done:
- .asciz "\n\n"
- .size int19_message_done, . - int19_message_done
/* Execute as a boot device
*
-126
View File
@@ -1,126 +0,0 @@
diff -urN gpxe-1.0.0/src/arch/i386/interface/pcbios/iscsiboot.c gpxe-1.0.0-iscsireg/src/arch/i386/interface/pcbios/iscsiboot.c
--- gpxe-1.0.0/src/arch/i386/interface/pcbios/iscsiboot.c 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-iscsireg/src/arch/i386/interface/pcbios/iscsiboot.c 2010-03-11 14:19:05.000000000 -0500
@@ -11,6 +11,56 @@
FILE_LICENCE ( GPL2_OR_LATER );
+static int iscsireg ( const char *root_path ) {
+ struct scsi_device *scsi;
+ struct int13_drive *drive;
+ int rc;
+
+ scsi = zalloc ( sizeof ( *scsi ) );
+ if ( ! scsi ) {
+ rc = -ENOMEM;
+ goto regerr_alloc_scsi;
+ }
+ drive = zalloc ( sizeof ( *drive ) );
+ if ( ! drive ) {
+ rc = -ENOMEM;
+ goto regerr_alloc_drive;
+ }
+
+ printf ( "Configuring iSCSI at %s\n", root_path );
+
+ if ( ( rc = iscsi_attach ( scsi, root_path ) ) != 0 ) {
+ printf ( "Could not attach iSCSI device: %s\n",
+ strerror ( rc ) );
+ goto regerr_attach;
+ }
+ if ( ( rc = init_scsidev ( scsi ) ) != 0 ) {
+ printf ( "Could not initialise iSCSI device: %s\n",
+ strerror ( rc ) );
+ goto regerr_init;
+ }
+
+ drive->blockdev = &scsi->blockdev;
+
+ /* FIXME: ugly, ugly hack */
+ struct net_device *netdev = last_opened_netdev();
+ struct iscsi_session *iscsi =
+ container_of ( scsi->backend, struct iscsi_session, refcnt );
+ ibft_fill_data ( netdev, iscsi );
+
+ register_int13_drive ( drive );
+ printf ( "Registered as BIOS drive %#02x\n", drive->drive );
+ return 0;
+ regerr_init:
+ iscsi_detach ( scsi );
+ regerr_attach:
+ free ( drive );
+ regerr_alloc_drive:
+ free ( scsi );
+ regerr_alloc_scsi:
+ return rc;
+}
+
static int iscsiboot ( const char *root_path ) {
struct scsi_device *scsi;
struct int13_drive *drive;
@@ -72,4 +122,5 @@
struct sanboot_protocol iscsi_sanboot_protocol __sanboot_protocol = {
.prefix = "iscsi:",
.boot = iscsiboot,
+ .reg = iscsireg,
};
diff -urN gpxe-1.0.0/src/include/gpxe/sanboot.h gpxe-1.0.0-iscsireg/src/include/gpxe/sanboot.h
--- gpxe-1.0.0/src/include/gpxe/sanboot.h 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-iscsireg/src/include/gpxe/sanboot.h 2010-03-11 14:19:05.000000000 -0500
@@ -8,6 +8,7 @@
struct sanboot_protocol {
const char *prefix;
int ( * boot ) ( const char *root_path );
+ int ( * reg ) ( const char *root_path );
};
#define SANBOOT_PROTOCOLS \
diff -urN gpxe-1.0.0/src/usr/autoboot.c gpxe-1.0.0-iscsireg/src/usr/autoboot.c
--- gpxe-1.0.0/src/usr/autoboot.c 2010-02-02 11:12:44.000000000 -0500
+++ gpxe-1.0.0-iscsireg/src/usr/autoboot.c 2010-03-11 14:19:36.000000000 -0500
@@ -103,6 +103,25 @@
}
/**
+ * Register a drive in BIOS, but don't boot
+ *
+ * @v root_path Root path
+ * @ret rc Return status code
+ */
+int reg_root_path ( const char *root_path ) {
+ struct sanboot_protocol *sanboot;
+
+ /* Quick hack */
+ for_each_table_entry ( sanboot, SANBOOT_PROTOCOLS ) {
+ if ( strncmp ( root_path, sanboot->prefix,
+ strlen ( sanboot->prefix ) ) == 0 ) {
+ return sanboot->reg ( root_path );
+ }
+ }
+
+ return -ENOTSUP;
+}
+/**
* Boot using root path
*
* @v root_path Root path
@@ -136,6 +155,7 @@
struct setting pxe_boot_menu_setting
= { .tag = DHCP_PXE_BOOT_MENU };
char buf[256];
+ char ruf[256];
struct in_addr next_server;
unsigned int pxe_discovery_control;
int rc;
@@ -167,6 +187,11 @@
fetch_ipv4_setting ( NULL, &next_server_setting, &next_server );
fetch_string_setting ( NULL, &filename_setting, buf, sizeof ( buf ) );
if ( buf[0] ) {
+ /* Going to PXE, but set up iBFT if applicable first */
+ fetch_string_setting(NULL, &root_path_setting,ruf,sizeof(ruf));
+ if (ruf[0]) {
+ reg_root_path ( ruf );
+ }
printf ( "Booting from filename \"%s\"\n", buf );
if ( ( rc = boot_next_server_and_filename ( next_server,
buf ) ) != 0 ) {
Binary file not shown.
-12
View File
@@ -1,12 +0,0 @@
diff -urN gpxe-1.0.1/src/net/udp/dhcp.c gpxe-1.0.1-xnbauserclass/src/net/udp/dhcp.c
--- gpxe-1.0.1/src/net/udp/dhcp.c 2010-06-29 15:31:33.000000000 -0400
+++ gpxe-1.0.1-xnbauserclass/src/net/udp/dhcp.c 2010-07-29 16:12:58.000000000 -0400
@@ -78,7 +78,7 @@
DHCP_CLIENT_ARCHITECTURE, DHCP_ARCH_CLIENT_ARCHITECTURE,
DHCP_CLIENT_NDI, DHCP_ARCH_CLIENT_NDI,
DHCP_VENDOR_CLASS_ID, DHCP_ARCH_VENDOR_CLASS_ID,
- DHCP_USER_CLASS_ID, DHCP_STRING ( 'g', 'P', 'X', 'E' ),
+ DHCP_USER_CLASS_ID, DHCP_STRING ( 'x', 'N', 'B', 'A' ),
DHCP_PARAMETER_REQUEST_LIST,
DHCP_OPTION ( DHCP_SUBNET_MASK, DHCP_ROUTERS, DHCP_DNS_SERVERS,
DHCP_LOG_SERVERS, DHCP_HOST_NAME, DHCP_DOMAIN_NAME,
Binary file not shown.
-40
View File
@@ -1,40 +0,0 @@
Name: gpxe-xcat
Summary: gPXE - UNDI package
Group: System Environment/Daemons
Version: 0.9.5
Release: 1
License: GPL
BuildRoot: %{_tmppath}/%{pkg}-buildroot
BuildArch: noarch
Source: gpxe-0.9.5.tar.bz2
Patch: register-iscsi-on-tftp.patch
Packager: Jarrod Johnson <jbj-xd@ura.dnsalias.org>
%description
A network bootloader supporting several different protocols. xCAT uses it to provide RFC4173 capability for any PXE compliant x86 system.
%prep
%setup -n gpxe-0.9.5
%patch -p1
%build
make -C src bin/undionly.kpxe
%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != '/' ] && rm -rf $RPM_BUILD_ROOT
mkdir -p "$RPM_BUILD_ROOT"/tftpboot
cp src/bin/undionly.kpxe "$RPM_BUILD_ROOT"/tftpboot/
%files
/tftpboot/undionly.kpxe
%clean
%changelog
* Sat Nov 01 2008 Jarrod Johnson <jbj-xd@ura.dnsalias.org>
- Initial packaging
-8
View File
@@ -1,8 +0,0 @@
#!/bin/bash
tar xvfj gpxe-1.0.1.tar.bz2
cd gpxe-1.0.1
cp -rL ../debian .
dpkg-buildpackage
cd -
rm -rf gpxe-1.0.1
-114
View File
@@ -1,114 +0,0 @@
diff -urN gpxe-0.9.5/src/include/usr/iscsiboot.h gpxe-0.9.5-regroot/src/include/usr/iscsiboot.h
--- gpxe-0.9.5/src/include/usr/iscsiboot.h 2008-10-01 13:30:45.000000000 -0400
+++ gpxe-0.9.5-regroot/src/include/usr/iscsiboot.h 2008-10-30 13:19:41.000000000 -0400
@@ -2,5 +2,6 @@
#define _USR_ISCSIBOOT_H
extern int iscsiboot ( const char *root_path );
+extern int iscsireg ( const char *root_path );
#endif /* _USR_ISCSIBOOT_H */
diff -urN gpxe-0.9.5/src/usr/autoboot.c gpxe-0.9.5-regroot/src/usr/autoboot.c
--- gpxe-0.9.5/src/usr/autoboot.c 2008-10-01 13:30:44.000000000 -0400
+++ gpxe-0.9.5-regroot/src/usr/autoboot.c 2008-10-30 13:19:41.000000000 -0400
@@ -135,6 +135,19 @@
}
/**
+ * Register a drive in BIOS (i.e. iSCSI), but don't boot from it
+ *
+ * @v root_path Root path
+ * @ret rc Return status code
+ */
+int reg_root_path ( const char *root_path ) {
+ /* Quick hack */
+ if ( strncmp ( root_path, "iscsi:", 6 ) == 0 ) {
+ return iscsireg ( root_path );
+ } /* TODO: aoereg */
+ return -ENOTSUP;
+}
+/**
* Boot using root path
*
* @v root_path Root path
@@ -160,6 +173,7 @@
*/
static int netboot ( struct net_device *netdev ) {
char buf[256];
+ char ruf[256];
struct in_addr next_server;
int rc;
@@ -190,6 +204,12 @@
fetch_ipv4_setting ( NULL, &next_server_setting, &next_server );
fetch_string_setting ( NULL, &filename_setting, buf, sizeof ( buf ) );
if ( buf[0] ) {
+ /* Going to tftp, but first setup root path hinted BIOS drive if applicable */
+ fetch_string_setting ( NULL, &root_path_setting, ruf, sizeof ( ruf ) );
+ if ( ruf[0] ) {
+ printf("Attempting to register BIOS drive per root path \"%s\"\n",ruf);
+ reg_root_path ( ruf );
+ }
printf ( "Booting from filename \"%s\"\n", buf );
return boot_next_server_and_filename ( next_server, buf );
}
diff -urN gpxe-0.9.5/src/usr/iscsiboot.c gpxe-0.9.5-regroot/src/usr/iscsiboot.c
--- gpxe-0.9.5/src/usr/iscsiboot.c 2008-10-01 13:30:44.000000000 -0400
+++ gpxe-0.9.5-regroot/src/usr/iscsiboot.c 2008-10-30 13:19:57.000000000 -0400
@@ -36,6 +36,56 @@
return NULL;
}
+int iscsireg ( const char *root_path ) {
+ struct scsi_device *scsi;
+ struct int13_drive *drive;
+ int rc;
+
+ scsi = zalloc ( sizeof ( *scsi ) );
+ if ( ! scsi ) {
+ rc = -ENOMEM;
+ goto err_alloc_scsi;
+ }
+ drive = zalloc ( sizeof ( *drive ) );
+ if ( ! drive ) {
+ rc = -ENOMEM;
+ goto err_alloc_drive;
+ }
+
+ printf ( "Configuring iSCSI per %s\n", root_path );
+
+ if ( ( rc = iscsi_attach ( scsi, root_path ) ) != 0 ) {
+ printf ( "Could not attach iSCSI device: %s\n",
+ strerror ( rc ) );
+ goto err_attach;
+ }
+ if ( ( rc = init_scsidev ( scsi ) ) != 0 ) {
+ printf ( "Could not initialise iSCSI device: %s\n",
+ strerror ( rc ) );
+ goto err_init;
+ }
+
+ drive->blockdev = &scsi->blockdev;
+
+ /* FIXME: ugly, ugly hack */
+ struct net_device *netdev = guess_boot_netdev();
+ struct iscsi_session *iscsi =
+ container_of ( scsi->backend, struct iscsi_session, refcnt );
+ ibft_fill_data ( netdev, iscsi );
+
+ register_int13_drive ( drive );
+ printf ( "Registered as BIOS drive %#02x\n", drive->drive );
+ return 0;
+ err_init:
+ iscsi_detach ( scsi );
+ err_attach:
+ free ( drive );
+ err_alloc_drive:
+ free ( scsi );
+ err_alloc_scsi:
+ return rc;
+}
+
int iscsiboot ( const char *root_path ) {
struct scsi_device *scsi;
struct int13_drive *drive;
-101
View File
@@ -1,101 +0,0 @@
Name: xnba-kvm
Version: 1.0.1
Release: 2
Summary: xNBA loader for virtual guests
Obsoletes: etherboot-zroms-kvm
Provides: etherboot-zroms-kvm
Obsoletes: gpxe-roms-qemu
Provides: gpxe-roms-qemu
Group: System Environment/Kernel
License: GPL
URL: http://etherboot.org/wiki/index.php
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
Obsoletes: gpxe-kvm
ExclusiveArch: i386 x86_64
%define Distribution %(rpm -q -qf /etc/redhat-release --qf '%%{name}' | cut -d"-" -f 1)
%define os_version %(rpm -q --qf '%%{version}' %{Distribution}-release)
%define os_release %(rpm -q --qf '%%{release}' %{Distribution}-release | cut -d"." -f 1)
Source0: gpxe-%{version}.tar.bz2
Patch0: gpxe-0.9.7-branding.patch
Patch1: gpxe-1.0.0-registeriscsionpxe.patch
Patch2: gpxe-1.0.0-config.patch
Patch3: gpxe-0.9.7-ignorepackets.patch
Patch4: gpxe-0.9.7-kvmworkaround.patch
Patch5: gpxe-1.0.0-hdboot.patch
Patch6: gpxe-1.0.1-xnbauserclass.patch
Patch7: gpxe-0.9.7-undinet.patch
Patch8: gpxe-1.0.0-int18boot.patch
#Patch9: gpxe-1.0.0-exittohd.patch
Patch10: gpxe-1.0.0-cmdlinesize.patch
Patch11: gpxe-1.0.0-expandfilename.patch
%description
The xNBA network bootloader provides network boot capability for virtual machines with e1000 and virtio network devices. This includes iSCSI and PXE with tftp or ftp image download capability. It is a modified variant of gPXE
%prep
%setup -n gpxe-%{version}
%patch -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
#%patch9 -p1
%patch10 -p1
%patch11 -p1
%build
rm -rf %{buildroot}
cd src
make bin/8086100e.rom
make bin/virtio-net.rom
make bin/rtl8139.rom
make bin/pcnet32.rom
make bin/ne.rom
make bin/rtl8029.rom
%install
mkdir -p %{buildroot}/usr/share/qemu/
mkdir -p %{buildroot}/usr/share/gpxe
mkdir -p %{buildroot}/usr/share/etherboot
cp src/bin/8086100e.rom %{buildroot}/usr/share/etherboot/e1000-82542.zrom
cp src/bin/pcnet32.rom %{buildroot}/usr/share/etherboot/pcnet32.zrom
cp src/bin/ne.rom %{buildroot}/usr/share/etherboot/ne.zrom
cp src/bin/rtl8139.rom %{buildroot}/usr/share/etherboot/rtl8139.zrom
cp src/bin/rtl8029.rom %{buildroot}/usr/share/etherboot/rtl8029.zrom
cp src/bin/virtio-net.rom %{buildroot}/usr/share/etherboot/virtio-net.zrom
ln -sf ../etherboot/e1000-82542.zrom %{buildroot}/usr/share/qemu/pxe-e1000.bin
ln -sf ../etherboot/virtio-net.zrom %{buildroot}/usr/share/qemu/pxe-virtio.bin
ln -sf ../etherboot/ne.zrom %{buildroot}/usr/share/qemu/pxe-ne2k_pci.bin
ln -sf ../etherboot/pcnet32.zrom %{buildroot}/usr/share/qemu/pxe-pcnet.bin
ln -sf ../etherboot/rtl8139.zrom %{buildroot}/usr/share/qemu/pxe-rtl8139.bin
ln -sf ../etherboot/e1000-82542.zrom %{buildroot}/usr/share/gpxe/e1000-0x100e.rom
ln -sf ../etherboot/virtio-net.zrom %{buildroot}/usr/share/gpxe/virtio-net.rom
ln -sf ../etherboot/pcnet32.zrom %{buildroot}/usr/share/gpxe/pcnet32.rom
ln -sf ../etherboot/rtl8139.zrom %{buildroot}/usr/share/gpxe/rtl8139.rom
ln -sf ../etherboot/rtl8029.zrom %{buildroot}/usr/share/gpxe/rtl8029.rom
%post
%preun
%clean
%{__rm} -rf %{buildroot}
%files
/usr
%changelog
-73
View File
@@ -1,73 +0,0 @@
Name: xnba-undi
Version: 1.0.1
Release: 2
Summary: xCAT Network Boot Agent for x86 PXE hosts
Obsoletes: gpxe-undi
Group: System Environment/Kernel
License: GPL
URL: http://etherboot.org/wiki/index.php
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
BuildArch: noarch
%define Distribution %(rpm -q -qf /etc/redhat-release --qf '%%{name}' | cut -d"-" -f 1)
%define os_version %(rpm -q --qf '%%{version}' %{Distribution}-release)
%define os_release %(rpm -q --qf '%%{release}' %{Distribution}-release | cut -d"." -f 1)
Source0: gpxe-%{version}.tar.bz2
Patch0: gpxe-0.9.7-branding.patch
Patch1: gpxe-1.0.0-registeriscsionpxe.patch
Patch2: gpxe-1.0.0-config.patch
Patch3: gpxe-0.9.7-ignorepackets.patch
Patch4: gpxe-0.9.7-kvmworkaround.patch
Patch5: gpxe-1.0.0-hdboot.patch
Patch6: gpxe-1.0.1-xnbauserclass.patch
Patch7: gpxe-0.9.7-undinet.patch
Patch8: gpxe-1.0.0-cmdlinesize.patch
Patch9: gpxe-1.0.0-expandfilename.patch
Patch10: gpxe-1.0.0-hyphenatedmachyp.patch
%description
The xCAT Network Boot Agent is a slightly modified version of gPXE. It provides enhanced boot features for any UNDI compliant x86 host. This includes iSCSI, http/ftp downloads, and gPXE script based booting.
%prep
%setup -n gpxe-%{version}
%patch -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%build
rm -rf %{buildroot}
cd src
make bin/undionly.kkpxe
%install
mkdir -p %{buildroot}/tftpboot/xcat
#Rename to avoid conflicting with potential vanilla undionly.kpxe that user may be using
cp src/bin/undionly.kkpxe %{buildroot}/tftpboot/xcat/xnba.kpxe
%post
%preun
%clean
%{__rm} -rf %{buildroot}
%files
/tftpboot/xcat/xnba.kpxe
%changelog
-339
View File
@@ -1,339 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
-12
View File
@@ -1,12 +0,0 @@
In general iPXE files are licensed under the GPL. For historical
reasons, individual files may contain their own licence declarations.
Most builds of iPXE do not contain all iPXE code (in particular, most
builds will include only one driver), and so the overall licence can
vary depending on what target you are building.
The resultant applicable licence(s) for any particular build can be
determined by using "make bin/xxxxxxx.yyy.licence"; for example:
make bin/rtl8139.rom.licence
to determine the resultant licence(s) for the build bin/rtl8139.rom
-3
View File
@@ -1,3 +0,0 @@
This iPXE source is no longer used.
See README file under xcat-dep/xnba on how to extract ipxe source from git.ipxe.org
-9
View File
@@ -1,9 +0,0 @@
Most of the content that was previously in this directory has been
moved to a separate git repository:
http://git.etherboot.org/?p=contrib.git;a=summary
or the Etherboot Project wiki:
http://etherboot.org/
-1
View File
@@ -1 +0,0 @@
errors.db
-108
View File
@@ -1,108 +0,0 @@
#!/usr/bin/perl -w
=head1 NAME
errdb.pl
=head1 SYNOPSIS
errdb.pl [options] ../../src/bin/errors
Options:
-d,--database=db Specify path to errors.db
-h,--help Display brief help message
-v,--verbose Increase verbosity
-q,--quiet Decrease verbosity
=cut
use Getopt::Long;
use Pod::Usage;
use DBI;
use strict;
use warnings;
# Parse command-line options
my $verbosity = 0;
my $errdb = "errors.db";
Getopt::Long::Configure ( 'bundling', 'auto_abbrev' );
GetOptions (
'database|d=s' => sub { shift; $errdb = shift; },
'verbose|v+' => sub { $verbosity++; },
'quiet|q+' => sub { $verbosity--; },
'help|h' => sub { pod2usage ( 1 ); },
) or die "Could not parse command-line options\n";
pod2usage ( 1 ) unless @ARGV >= 1;
# Open database
my $dbh = DBI->connect ( "dbi:SQLite:dbname=".$errdb, "", "",
{ RaiseError => 1, PrintError => 0 } );
$dbh->begin_work();
# Create errors table if necessary
eval {
$dbh->selectall_arrayref ( "SELECT * FROM errors LIMIT 1" );
};
if ( $@ ) {
print "Creating errors table\n" if $verbosity >= 1;
$dbh->do ( "CREATE TABLE errors (".
" errno char(8) NOT NULL,".
" description text NOT NULL,".
" PRIMARY KEY ( errno ) )" );
}
# Create xrefs table if necessary
eval {
$dbh->selectall_arrayref ( "SELECT * FROM xrefs LIMIT 1" );
};
if ( $@ ) {
print "Creating xrefs table\n" if $verbosity >= 1;
$dbh->do ( "CREATE TABLE xrefs (".
" errno char(8) NOT NULL,".
" filename text NOT NULL,".
" line integer NOT NULL,".
" UNIQUE ( errno, filename, line ),".
" FOREIGN KEY ( errno ) REFERENCES errors ( errno ) )" );
$dbh->do ( "CREATE INDEX xrefs_errno ON xrefs ( errno )" );
}
# Parse input file(s)
my $errors = {};
my $xrefs = {};
while ( <> ) {
chomp;
( my $errno, my $filename, my $line, my $description ) = split ( /\t/ );
$errors->{$errno} = $description;
$xrefs->{$errno} ||= {};
$xrefs->{$errno}->{$filename} ||= {};
$xrefs->{$errno}->{$filename}->{$line} ||= 1;
}
# Ensure all errors are present in database
my $error_update =
$dbh->prepare ( "UPDATE errors SET description = ? WHERE errno = ?" );
my $error_insert = $dbh->prepare ( "INSERT INTO errors VALUES ( ?, ? )" );
while ( ( my $errno, my $description ) = each %$errors ) {
print "Error ".$errno." is \"".$description."\"\n" if $verbosity >= 2;
if ( $error_update->execute ( $description, $errno ) == 0 ) {
$error_insert->execute ( $errno, $description );
}
}
# Replace xrefs in database
$dbh->do ( "DELETE FROM xrefs" );
my $xref_insert = $dbh->prepare ( "INSERT INTO xrefs VALUES ( ?, ?, ? )" );
while ( ( my $errno, my $xref_errno ) = each %$xrefs ) {
while ( ( my $filename, my $xref_filename ) = each %$xref_errno ) {
foreach my $line ( keys %$xref_filename ) {
print "Error ".$errno." is used at ".$filename." line ".$line."\n"
if $verbosity >= 2;
$xref_insert->execute ( $errno, $filename, $line );
}
}
}
# Close database
$dbh->commit();
$dbh->disconnect();
-62
View File
@@ -1,62 +0,0 @@
ROM-o-matic web interface for building iPXE ROMs
------------------------------------------------
This web application generates iPXE images and sends them to a web
browser.
Available as part of the iPXE source code distribution, which can be
downlaoded from http://etherboot.org/
Author: Marty Connor <mdc@etherboot.org>
License: GPLv2
Support: http://etherboot.org/mailman/listinfo/ipxe
Please send support questions to the iPXE mailing list
System Requirements
-------------------
- Apache web server
- PHP 4+
- Tools required to build iPXE installed on the server
- gcc, mtools, syslinux, perl, etc.
Setup
-----
As distributed, it is expected that the rom-o-matic source code
directory is in the contrib directory of a iPXE source distribution.
The easiest way to do this is to simply put a iPXE source distribution
in a web server accessible directory.
If this is not the case, you will need to either edit the file
"globals.php"
or create a file called
"local-config.php"
containing the following lines:
<?php
$src_dir = "../../src";
?>
Then change the line beginning "$src_dir = " to the path of your iPXE
source code tree.
To make build times shorter, before you run rom-o-matic for the first time
you should cd to the ipxe "src" directory and enter the following
commands:
$ make
$ make bin/NIC
This will pro-compile most object files and will make your rom-o-matic
builds much faster.
Running rom-o-matic from a web browser
--------------------------------------
Enter a URL like:
http://example.com/ipxe-1.x.x/contrib/rom-o-matic
-62
View File
@@ -1,62 +0,0 @@
<?
/**
* Copyright (C) 2009 Marty Connor <mdc@etherboot.org>.
* Copyright (C) 2009 Entity Cyber, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
?>
<hr>
<h4>
Resources:
</h4>
<ul>
<li>
Source code for iPXE images is available at
<a href="http://etherboot.org/wiki/download" target="_blank">
http://etherboot.org/wiki/download</a>
<br><br>
</li>
<li>
For general information about using iPXE, please visit the
<a href="http://www.etherboot.org/" target="_blank">
Etherboot Project Home Page</a>
<br><br>
</li>
<li>
For Email-based support for iPXE please join
<a href="http://etherboot.org/wiki/mailinglists" target="_blank">
Etherboot Project mailing lists.</a>
<br><br>
</li>
<li>
For real-time online iPXE support via IRC please visit the
<a href="irc://irc.freenode.net/%23etherboot"> #etherboot channel
of irc.freenode.net</a>.
<br><br>
</li>
</ul>
<hr>
<font size="-1">
<br>
Please email <a href="mailto:<? echo "${webmaster_email}" ?>"><? echo "${webmaster_email}"?></a>
with questions or comments about this website.
</font>
<br><br>
<hr>
</body>
</html>
-306
View File
@@ -1,306 +0,0 @@
<?php // -*- Mode: PHP; -*-
/**
* Copyright (C) 2009 Marty Connor <mdc@etherboot.org>.
* Copyright (C) 2009 Entity Cyber, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
// Get utility functions and set globals
require_once "utils.php";
// Make sure at least $A (action) was supplied
if ( ! isset ( $_POST['A'] ) ) {
// Present user with form to customize build options
require_once "customize-flags.php";
exit ();
// If user chose "Customize" option on form
} else if ( $_POST['A'] == "Customize" ) {
// Present user with form to customize build options
require_once "customize-flags.php";
exit ();
// The following conditional includes all other cases except "Get Image"
// particularly the explicit ($A == "Start Over") case
} else if ( $_POST['A'] != "Get Image" ) {
// Note that this method of redirections discards all the
// configuration flags, which is intentional in this case.
$dest = curDirURL ();
header ( "Location: $dest" );
// This next "echo" should normally not be seen, because
// the "header" statement above should cause immediate
// redirection but just in case...
echo "Try this link: <a href=\"$dest\">$dest</a>";
exit ();
}
// OK, we're going to try to use whatever options have been set
// to build an image.
// Make sure at least $nic was supplied
if ( ! isset ( $_POST['nic'] ) ) {
die ( "No NIC supplied!" );
}
if ( isset ( $nics[$_POST['nic']] ) ) {
$nic = $nics[$_POST['nic']];
} else {
die ( "Invalid NIC \"${_POST['nic']}\" supplied!" );
}
// Fetch flags
$flags = get_flags ();
// Get requested format
$ofmt = isset ( $_POST['ofmt'] ) ? $_POST['ofmt'] : "";
$fmt_extension = isset ( $ofmts[$ofmt] ) ? $ofmts[$ofmt] : 'dsk';
// Handle some special cases
$pci_vendor_code = "";
$pci_device_code = "";
if ( $nic == 'undionly' && $fmt_extension == "pxe" ) {
// undionly.pxe can't work because it unloads the PXE stack
// that it needs to communicate with, so we set the extension
// to .kpxe, which has a chance of working. The extension
// .kkpxe is another option.
$fmt_extension = "kpxe";
} else if ( $fmt_extension == "rom" ) {
if ( ! isset ( $_POST['pci_vendor_code'] )
|| ! isset ( $_POST['pci_device_code'] ) ) {
die ( "rom output format selected but PCI code(s) missing!" );
}
$pci_vendor_code = $_POST['pci_vendor_code'];
$pci_device_code = $_POST['pci_device_code'];
if ( $pci_vendor_code == ""
|| $pci_device_code == "" ) {
die ( "rom output format selected but PCI code(s) missing!" );
}
// Try to be forgiving of 0xAAAA format
if ( strtolower ( substr ( $pci_vendor_code, 0, 2 ) ) == "0x"
&& strlen ( $pci_vendor_code ) == 6 ) {
$pci_vendor_code = substr ( $pci_vendor_code, 2, 4 );
}
if ( strtolower ( substr ( $pci_device_code, 0, 2 ) ) == "0x"
&& strlen ( $pci_device_code ) == 6 ) {
$pci_device_code = substr ( $pci_device_code, 2, 4 );
}
// concatenate the pci codes to get the $nic part of the
// Make target
$pci_codes = strtolower ( $pci_vendor_code . $pci_device_code );
$nic = $pci_codes;
if ( ! isset ( $roms[$pci_codes] ) ) {
die ( "Sorry, no network driver supports PCI codes<br>"
. "${_POST['pci_vendor_code']}:"
. "${_POST['pci_device_code']}" );
}
} else if ( $fmt_extension != "rom"
&& ( $pci_vendor_code != "" || $pci_device_code != "" ) ) {
die ( "'$fmt_extension' format was selected but PCI IDs were"
. " also entered.<br>Did you mean to select 'rom' output format"
. " instead?" );
}
/**
* remove temporary build directory
*
* @return bool true if removal is successful, false otherwise
*/
function rm_build_dir ()
{
global $build_dir;
global $keep_build_dir;
if ( $keep_build_dir !== true ) {
rm_file_or_dir ( $build_dir );
}
}
// Arrange for the build directory to always be removed on exit.
$build_dir = "";
$keep_build_dir = false;
register_shutdown_function ( 'rm_build_dir' );
// Make temporary copy of src directory
$build_dir = mktempcopy ( "$src_dir", "/tmp", "MDCROM" );
$config_dir = $build_dir . "/config";
// Write config files with supplied flags
write_ipxe_config_files ( $config_dir, $flags );
// Handle a possible embedded script
$emb_script_cmd = "";
$embedded_script = isset ( $_POST['embedded_script'] ) ? $_POST['embedded_script'] : "";
if ( $embedded_script != "" ) {
$emb_script_path = "$build_dir" . "/script0.ipxe";
if ( substr ( $embedded_script, 0, 5 ) != "#!ipxe" ) {
$embedded_script = "#!ipxe\n" . $embedded_script;
}
// iPXE 0.9.7 doesn't like '\r\n" in the shebang...
$embedded_script = str_replace ( "\r\n", "\n", $embedded_script );
write_file_from_string ( $emb_script_path, $embedded_script );
$emb_script_cmd = "EMBEDDED_IMAGE=${emb_script_path}";
}
// Make the requested image. $status is set to 0 on success
$make_target = "bin/${nic}.${fmt_extension}";
$make_cmd = "make -C '$build_dir' '$make_target' $emb_script_cmd $2>&1";
exec ( $make_cmd, $maketxt, $status );
// Uncomment the following section for debugging
/**
echo "<h2>build.php:</h2>";
echo "<h3>Begin debugging output</h3>";
//echo "<h3>\$_POST variables</h3>";
//echo "<pre>"; var_dump ( $_POST ); echo "</pre>";
echo "<h3>Build options:</h3>";
echo "<strong>Build directory is:</strong> $build_dir" . "<br><br>";
echo "\$_POST['ofmt'] = " . "\"${_POST['ofmt']}\"" . "<br>";
echo "\$_POST['nic'] = " . "\"${_POST['nic']}\"" . "<br>";
echo "\$_POST['pci_vendor_code'] = " . "\"${_POST['pci_vendor_code']}\"" . "<br>";
echo "\$_POST['pci_device_code'] = " . "\"${_POST['pci_device_code']}\"" . "<br>";
echo "<h3>Flags:</h3>";
show_flags ( $flags );
if ( $embedded_script != "" ) {
echo "<h3>Embedded script:</h3>";
echo "<blockquote>"."<pre>";
echo $embedded_script;
echo "</pre>"."</blockquote>";
}
echo "<h3>Make output:</h3>";
echo "Make command: " . $make_cmd . "<br>";
echo "Build status = <? echo $status ?>" . "<br>";
echo "<blockquote>"."<pre>";
echo htmlentities ( implode ("\n", $maketxt ) );
echo "</pre>"."</blockquote>";
// Uncomment the next line if you want to keep the
// build directory around for inspection after building.
$keep_build_dir = true;
die ( "<h3>End debugging output</h3>" );
**/ // End debugging section
// Send ROM to browser (with extreme prejudice)
if ( $status == 0 ) {
$fp = fopen("${build_dir}/${make_target}", "rb" );
if ( $fp > 0 ) {
$len = filesize ( "${build_dir}/${make_target}" );
if ( $len > 0 ) {
$buf = fread ( $fp, $len );
fclose ( $fp );
// Delete build directory as soon as it is not needed
rm_build_dir ();
$output_filename = "ipxe-${version}-${nic}.${fmt_extension}";
// Try to force IE to handle downloading right.
Header ( "Cache-control: private");
Header ( "Content-Type: application/x-octet-stream; " .
"name=$output_filename");
Header ( "Content-Disposition: attachment; " .
"Filename=$output_filename");
Header ( "Content-Location: $output_filename");
Header ( "Content-Length: $len");
echo $buf;
exit ();
}
}
}
/*
* If we reach this point, the build has failed, and we provide
* debugging information for a potential bug report
*
*/
// Remove build directory
rm_build_dir ();
// Announce failure if $status from make was non-zero
echo "<h2>Build failed. Status = " . $status . "</h2>";
echo "<h2>build.php:</h2>";
echo "<h3>Build options:</h3>";
echo "<strong>Build directory is:</strong> $build_dir" . "<br><br>";
echo "\$_POST['ofmt'] = " . "\"${_POST['ofmt']}\"" . "<br>";
echo "\$_POST['nic'] = " . "\"${_POST['nic']}\"" . "<br>";
echo "\$_POST['pci_vendor_code'] = " . "\"${_POST['pci_vendor_code']}\"" . "<br>";
echo "\$_POST['pci_device_code'] = " . "\"${_POST['pci_device_code']}\"" . "<br>";
echo "<h3>Flags:</h3>";
show_flags ( $flags );
if ( $embedded_script != "" ) {
echo "<h3>Embedded script:</h3>";
echo "<blockquote>"."<pre>";
echo $embedded_script;
echo "</pre>"."</blockquote>";
}
echo "<h3>Make output:</h3>";
echo "Make command: " . $make_cmd . "<br>";
echo "<blockquote>"."<pre>";
echo htmlentities ( implode ("\n", $maketxt ) );
echo "</pre>"."</blockquote>";
echo "Please let us know that this happened, and paste the above output into your email message.<br>";
include_once $bottom_inc;
// For emacs:
// Local variables:
// c-basic-offset: 4
// c-indent-level: 4
// tab-width: 4
// End:
?>
@@ -1,69 +0,0 @@
<?php // -*- Mode: PHP; -*-
/**
* Copyright (C) 2009 Marty Connor <mdc@etherboot.org>.
* Copyright (C) 2009 Entity Cyber, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
// Get utility functions and set globals
require_once "utils.php";
// Prepare settable compile options for presentation to user
$flags = default_flags ();
$build = "<input type=\"submit\" name=\"A\" value=\"Get Image\">";
$restart = "<input type=\"submit\" name=\"A\" value=\"Start Over\">";
// Begin html output
include_once $top_inc;
?>
<form action="build.php" method=POST>
<input type="hidden" name="version" value = "<? echo $version ?>">
<input type="hidden" name="use_flags" value="1">
<h3>
Make changes below and press <? echo $build ?> to create an image, <br>
Or press <? echo $restart ?> to return to the main page.
</h3>
<hr>
<ul>
<? require ( "directions.php" ); ?>
</ul>
<hr>
<? echo_flags( $flags ); ?>
<hr>
<h3>Embedded Script:</h3>
<? echo textarea ( "embedded_script", "", "10", "50" ); ?>
<br><br>
<hr>
<center><table width="35%"><tr>
<td align="left"> <? echo $build; ?> </td>
<td align="right"> <? echo $restart ?></td>
</tr></table></center>
</form>
<? include_once $bottom_inc; ?>
<?
// For emacs:
//
// Local variables:
// c-basic-offset: 4
// c-indent-level: 4
// tab-width: 4
// End:
?>
-63
View File
@@ -1,63 +0,0 @@
<?
/**
* Copyright (C) 2009 Marty Connor <mdc@etherboot.org>.
* Copyright (C) 2009 Entity Cyber, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
?>
<li>
Choose an output format: <? echo keys_menubox ( "ofmt", $ofmts,
isset ( $_POST['ofmt'] ) ? $_POST['ofmt'] : "") ?>
<br><br>
</li>
<li>
Choose a NIC type: <? echo keys_menubox ( "nic", $nics,
isset ( $_POST['nic'] ) ? $_POST['nic'] : "" ) ?>
<br><br>
</li>
<li>
<strong>( optional &mdash; for binary ROM image format only )</strong> <br><br>
If you choose <em>Binary ROM image</em> as your output format, you must<br>
enter <strong>4 hex digits</strong> below for
<em>PCI VENDOR CODE</em> and <em>PCI DEVICE CODE</em> <br>
that match the NIC device for which you are making this image.<br><br>
Information on how to determine NIC PCI IDs may be found
<a href="http://etherboot.org/wiki/romburning"
target="_blank">here</a>.
<br><br>
PCI VENDOR CODE: <? echo textbox ( "pci_vendor_code",
isset ( $_POST['pci_vendor_code'] ) ? $_POST['pci_vendor_code']
: "", 6 ); ?>
&nbsp;&nbsp;
PCI DEVICE CODE: <? echo textbox ( "pci_device_code",
isset ( $_POST['pci_device_code'] ) ? $_POST['pci_device_code']
: "", 6 ); ?>
<h4>Please note for ROM images:</h4>
<ul>
<li>
If you enter PCI IDs, we will attempt to determine the correct<br>
driver to support them, and will ignore any NIC type entered
above.<br><br>
</li>
<li>
iPXE does not support all possible PCI IDs for supported
NICs.
<br><br>
</li>
</ul>
</li>
@@ -1 +0,0 @@
Automatic booting
@@ -1 +0,0 @@
Tenths of a second for which the shell banner should appear
@@ -1,3 +0,0 @@
Serial Console I/O port address. Common addresses are:<br>
COM1 => 0x3f8, COM2 => 0x2f8, COM3 => 0x3e8, COM4 => 0x2e8
@@ -1 +0,0 @@
Serial Console Data bits
@@ -1 +0,0 @@
Serial Console Parity: 0=None, 1=Odd, 2=Even
@@ -1 +0,0 @@
Keep settings from a previous user of the serial port
@@ -1 +0,0 @@
Serial Console Baud rate
@@ -1 +0,0 @@
Serial Console Stop bits
@@ -1 +0,0 @@
Option configuration console
@@ -1 +0,0 @@
Enable Default BIOS console
@@ -1 +0,0 @@
Enable Serial port console
@@ -1 +0,0 @@
Wireless WEP encryption support
@@ -1 +0,0 @@
Wireless WPA encryption support
@@ -1 +0,0 @@
Wireless WPA2 encryption support
@@ -1 +0,0 @@
DHCP management commands
@@ -1 +0,0 @@
DNS resolver
@@ -1 +0,0 @@
File Transfer Protocol

Some files were not shown because too many files have changed in this diff Show More