mirror of
https://github.com/xcat2/xcat-dep.git
synced 2024-11-21 09:01:46 +00:00
-Update to gpxe 0.9.9 base and some change
Former-commit-id: 70940d0fbaa6647131240c0eb3b2049b80a1b944
This commit is contained in:
parent
caec87e666
commit
b1433bdef5
29
gpxe/gpxe-0.9.9-acceptproxyoffer.patch
Normal file
29
gpxe/gpxe-0.9.9-acceptproxyoffer.patch
Normal file
@ -0,0 +1,29 @@
|
||||
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 ) )
|
74
gpxe/gpxe-0.9.9-config.patch
Normal file
74
gpxe/gpxe-0.9.9-config.patch
Normal file
@ -0,0 +1,74 @@
|
||||
diff -urN gpxe-0.9.9/src/config/general.h gpxe-0.9.9-configged/src/config/general.h
|
||||
--- gpxe-0.9.9/src/config/general.h 2009-10-21 15:05:47.000000000 -0400
|
||||
+++ gpxe-0.9.9-configged/src/config/general.h 2010-01-26 14:41:48.000000000 -0500
|
||||
@@ -50,7 +50,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? */
|
||||
@@ -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 */
|
||||
+#define SANBOOT_PROTO_ISCSI /* iSCSI protocol */
|
||||
+#undef SANBOOT_PROTO_AOE /* AoE protocol */
|
||||
+#undef SANBOOT_PROTO_IB_SRP /* Infiniband SCSI RDMA protocol */
|
||||
|
||||
/*
|
||||
* Name resolution modules
|
||||
@@ -79,17 +79,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 */
|
||||
+#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
|
||||
@@ -97,16 +97,16 @@
|
||||
*/
|
||||
#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 */
|
||||
#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
gpxe/gpxe-0.9.9-ignorecloseddevs.patch
Normal file
28
gpxe/gpxe-0.9.9-ignorecloseddevs.patch
Normal file
@ -0,0 +1,28 @@
|
||||
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
gpxe/gpxe-0.9.9-ignorenonpxepxe.patch
Normal file
34
gpxe/gpxe-0.9.9-ignorenonpxepxe.patch
Normal file
@ -0,0 +1,34 @@
|
||||
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
gpxe/gpxe-0.9.9-int18boot.patch
Normal file
128
gpxe/gpxe-0.9.9-int18boot.patch
Normal file
@ -0,0 +1,128 @@
|
||||
--- 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
gpxe/gpxe-0.9.9-registeriscsionpxe.patch
Normal file
135
gpxe/gpxe-0.9.9-registeriscsionpxe.patch
Normal file
@ -0,0 +1,135 @@
|
||||
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 );
|
||||
}
|
42
gpxe/gpxe-0.9.9-saverestorepciregister.patch
Normal file
42
gpxe/gpxe-0.9.9-saverestorepciregister.patch
Normal file
@ -0,0 +1,42 @@
|
||||
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
gpxe/gpxe-0.9.9-tftpblockwrap.patch
Normal file
48
gpxe/gpxe-0.9.9-tftpblockwrap.patch
Normal file
@ -0,0 +1,48 @@
|
||||
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 );
|
BIN
gpxe/gpxe-0.9.9.tar.bz2
Normal file
BIN
gpxe/gpxe-0.9.9.tar.bz2
Normal file
Binary file not shown.
@ -1,7 +1,9 @@
|
||||
Name: xnba-kvm
|
||||
Version: 0.9.7
|
||||
Release: 11
|
||||
Summary: gPXE loader for virtual guests
|
||||
Version: 0.9.9
|
||||
Release: 1
|
||||
Summary: xNBA loader for virtual guests
|
||||
Obsoletes: etherboot-zroms-kvm
|
||||
Provides: etherboot-zroms-kvm
|
||||
|
||||
Group: System Environment/Kernel
|
||||
License: GPL
|
||||
@ -17,17 +19,24 @@ ExclusiveArch: i386 x86_64
|
||||
%define os_release %(rpm -q --qf '%%{release}' %{Distribution}-release | cut -d"." -f 1)
|
||||
|
||||
|
||||
Source0: gpxe-0.9.7.tar.gz
|
||||
Source0: gpxe-%{version}.tar.bz2
|
||||
Patch0: gpxe-0.9.7-branding.patch
|
||||
Patch1: gpxe-0.9.7-registeriscsionpxe.patch
|
||||
Patch2: gpxe-0.9.7-config.patch
|
||||
Patch1: gpxe-0.9.9-registeriscsionpxe.patch
|
||||
Patch2: gpxe-0.9.9-config.patch
|
||||
Patch3: gpxe-0.9.7-ignorepackets.patch
|
||||
Patch4: gpxe-0.9.7-kvmworkaround.patch
|
||||
Patch5: gpxe-0.9.7-hdboot.patch
|
||||
Patch6: gpxe-0.9.7-xnbauserclass.patch
|
||||
Patch7: gpxe-0.9.7-undinet.patch
|
||||
Patch8: gpxe-0.9.9-acceptproxyoffer.patch
|
||||
Patch9: gpxe-0.9.9-ignorecloseddevs.patch
|
||||
Patch10: gpxe-0.9.9-ignorenonpxepxe.patch
|
||||
Patch11: gpxe-0.9.9-saverestorepciregister.patch
|
||||
Patch12: gpxe-0.9.9-tftpblockwrap.patch
|
||||
Patch13: gpxe-0.9.9-int18boot.patch
|
||||
|
||||
%description
|
||||
The gPXE 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.
|
||||
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
|
||||
|
||||
@ -39,6 +48,14 @@ The gPXE network bootloader provides network boot capability for virtual machine
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
|
||||
|
||||
%build
|
||||
|
||||
@ -52,9 +69,11 @@ make bin/virtio-net.rom
|
||||
%install
|
||||
|
||||
mkdir -p %{buildroot}/usr/share/qemu/
|
||||
cp src/bin/e1000.rom %{buildroot}/usr/share/qemu/pxe-e1000.bin
|
||||
cp src/bin/virtio-net.rom %{buildroot}/usr/share/qemu/pxe-virtio.bin
|
||||
|
||||
mkdir -p %{buildroot}/usr/share/etherboot
|
||||
cp src/bin/e1000.rom %{buildroot}/usr/share/etherboot/e1000-82542.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
|
||||
|
||||
%post
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: xnba-undi
|
||||
Version: 0.9.7
|
||||
Release: 13
|
||||
Version: 0.9.9
|
||||
Release: 1
|
||||
Summary: xCAT Network Boot Agent for x86 PXE hosts
|
||||
Obsoletes: gpxe-undi
|
||||
|
||||
@ -15,15 +15,20 @@ BuildArch: noarch
|
||||
%define os_release %(rpm -q --qf '%%{release}' %{Distribution}-release | cut -d"." -f 1)
|
||||
|
||||
|
||||
Source0: gpxe-0.9.7.tar.gz
|
||||
Source0: gpxe-%{version}.tar.bz2
|
||||
Patch0: gpxe-0.9.7-branding.patch
|
||||
Patch1: gpxe-0.9.7-registeriscsionpxe.patch
|
||||
Patch2: gpxe-0.9.7-config.patch
|
||||
Patch1: gpxe-0.9.9-registeriscsionpxe.patch
|
||||
Patch2: gpxe-0.9.9-config.patch
|
||||
Patch3: gpxe-0.9.7-ignorepackets.patch
|
||||
Patch4: gpxe-0.9.7-kvmworkaround.patch
|
||||
Patch5: gpxe-0.9.7-hdboot.patch
|
||||
Patch6: gpxe-0.9.7-xnbauserclass.patch
|
||||
Patch7: gpxe-0.9.7-undinet.patch
|
||||
Patch8: gpxe-0.9.9-acceptproxyoffer.patch
|
||||
Patch9: gpxe-0.9.9-ignorecloseddevs.patch
|
||||
Patch10: gpxe-0.9.9-ignorenonpxepxe.patch
|
||||
Patch11: gpxe-0.9.9-saverestorepciregister.patch
|
||||
Patch12: gpxe-0.9.9-tftpblockwrap.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.
|
||||
@ -39,6 +44,11 @@ The xCAT Network Boot Agent is a slightly modified version of gPXE. It provides
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
|
||||
%build
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user