Etherboot for E100 NIC
PATCH 1/1 Etherboot for E100 NIC
Currently, Xen has the etherboot rom for hvm guests, which only supports rtl8139 nic device model.
This patch is intended to support etherboot for e100 nic by:
- adding etherboot rom for e100 nic (provided by rom-o-matic.net).
- making hvmloader scan pci devices, find the first nic device and load the corresponding etherboot rom.
Regards,
-------------------
Yosuke Iwamatsu
NEC Corporation
# HG changeset patch
# User [email protected]
# Date 1201501734 -32400
# Node ID 49e3c23a466fe92d6de9191bdaed89ce5df0d192 # Parent afa521cf82e68cb170ce8b536d8f968e2dc4eba6 Add support for e100 etherboot.
tools/firmware/etherboot/README +10 -4
@@ -1,11 +1,17 @@ -This is an Etherboot option ROM for the rtl8139 NIC. It has a few -non-standard settings, most to do with timeouts and when to give up, +These are Etherboot option ROMs for the e100 and the rtl8139 NIC. They have +a few non-standard settings, most to do with timeouts and when to give up, and for stricter DHCP spec compliance. -Rom-o-matic.net will provide this image at the following URL: +Rom-o-matic.net will provide these images at the following URLs: + +e100: + +http://rom-o-matic.net/5.4.3/build.php?version=5.4.3&F=ignore&nic=eepro100%3Aeepro100+--+%5B0x8086%2C0x1229%5D&ofmt=Binary+ROM+Image%28.zrom%29&arch=i386&ASK_BOOT=-1&BOOT_FIRST=BOOT_NIC&BOOT_SECOND=BOOT_NOTHING&BOOT_THIRD=BOOT_NOTHING&BOOT_INDEX=0&STATIC_CLIENT_IP=&STATIC_SUBNET_MASK=&STATIC_SERVER_IP=&STATIC_GATEWAY_IP=&STATIC_BOOTFILE=&EXIT_ON_FILE_LOAD_ERROR=on&DHCP_CLIENT_ID=&DHCP_CLIENT_ID_LEN=&DHCP_CLIENT_ID_TYPE=&DHCP_USER_CLASS=&DHCP_USER_CLASS_LEN=&ALLOW_ONLY_ENCAPSULATED=on&DEFAULT_BOOTFILE=&CONGESTED=on&BACKOFF_LIMIT=7&TIMEOUT=180&TRY_FLOPPY_FIRST=0&EXIT_IF_NO_OFFER=on&TAGGED_IMAGE=on&ELF_IMAGE=on&PXE_IMAGE=on&DOWNLOAD_PROTO_TFTP=on&COMCONSOLE=0x3F8&CONSPEED=9600&COMPARM=0x03&PXE_EXPORT=on&CONFIG_PCI=on&CONFIG_ISA=on&BUILD_ID=&PCBIOS=on&PXE_DHCP_STRICT=on&A=Get+ROM + +rtl8139: http://rom-o-matic.net/5.4.3/build.php?version=5.4.3&F=ignore&nic=rtl8139%3Artl8139+--+%5B0x10ec%2C0x8139%5D&ofmt=Binary+ROM+Image%28.zrom%29&arch=i386&ASK_BOOT=-1&BOOT_FIRST=BOOT_NIC&BOOT_SECOND=BOOT_NOTHING&BOOT_THIRD=BOOT_NOTHING&BOOT_INDEX=0&STATIC_CLIENT_IP=&STATIC_SUBNET_MASK=&STATIC_SERVER_IP=&STATIC_GATEWAY_IP=&STATIC_BOOTFILE=&EXIT_ON_FILE_LOAD_ERROR=on&DHCP_CLIENT_ID=&DHCP_CLIENT_ID_LEN=&DHCP_CLIENT_ID_TYPE=&DHCP_USER_CLASS=&DHCP_USER_CLASS_LEN=&ALLOW_ONLY_ENCAPSULATED=on&DEFAULT_BOOTFILE=&CONGESTED=on&BACKOFF_LIMIT=7&TIMEOUT=180&TRY_FLOPPY_FIRST=0&EXIT_IF_NO_OFFER=on&TAGGED_IMAGE=on&ELF_IMAGE=on&PXE_IMAGE=on&DOWNLOAD_PROTO_TFTP=on&COMCONSOLE=0x3F8&CONSPEED=9600&COMPARM=0x03&PXE_EXPORT=on&CONFIG_PCI=on&CONFIG_ISA=on&BUILD_ID=&PCBIOS=on&PXE_DHCP_STRICT=on&A=Get+ROM and the mkhex script in tools/firmware/hvmloader will make the header -file from the downloaded image. +files from the downloaded images.
tools/firmware/etherboot/eb-e100.zrom.h new file +2051 -0
2,051 lines not on this page · raw message
tools/firmware/etherboot/eb-rtl8139.zrom.h +1 -1
@@ -1,4 +1,4 @@ unsigned etherboot[] = { -unsigned etherboot[] = { +unsigned etherboot_rtl8139[] = {0xeb40aa55 ,0xbfe96c65 ,0x68744500 ,0x6f627265 ,0x0000746f ,0x00540000 ,0x0034001c ,0x52494350 ,0x813910ec ,0x00180000 ,0x00000200 ,0x00010040 ,
tools/firmware/hvmloader/Makefile +2 -1
@@ -49,11 +49,12 @@ acpi/acpi.a: acpi/acpi.a: $(MAKE) -C acpi -roms.h: ../rombios/BIOS-bochs-latest ../vgabios/VGABIOS-lgpl-latest.bin ../vgabios/VGABIOS-lgpl-latest.cirrus.bin ../vmxassist/vmxassist.bin ../etherboot/eb-rtl8139.zrom.h +roms.h: ../rombios/BIOS-bochs-latest ../vgabios/VGABIOS-lgpl-latest.bin ../vgabios/VGABIOS-lgpl-latest.cirrus.bin ../vmxassist/vmxassist.bin ../etherboot/eb-e100.zrom.h ../etherboot/eb-rtl8139.zrom.h sh ./mkhex rombios ../rombios/BIOS-bochs-latest > roms.h sh ./mkhex vgabios_stdvga ../vgabios/VGABIOS-lgpl-latest.bin >> roms.h sh ./mkhex vgabios_cirrusvga ../vgabios/VGABIOS-lgpl-latest.cirrus.bin >> roms.h sh ./mkhex vmxassist ../vmxassist/vmxassist.bin >> roms.h + cat ../etherboot/eb-e100.zrom.h >> roms.h cat ../etherboot/eb-rtl8139.zrom.h >> roms.h sh ./mkhex extboot ../extboot/extboot.bin >> roms.h
tools/firmware/hvmloader/hvmloader.c +53 -4
75 lines not on this page · raw message
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Yosuke Iwamatsu writes ("[Xen-devel] [PATCH] Etherboot for E100 NIC"):
Quoted 6 lines
Currently, Xen has the etherboot rom for hvm guests, which only supports rtl8139 nic device model.
This patch is intended to support etherboot for e100 nic by:
- adding etherboot rom for e100 nic (provided by rom-o-matic.net).
- making hvmloader scan pci devices, find the first nic device and load the corresponding etherboot rom.
Thanks. We'd prefer not to include a binary where we don't have the source code in the tree and also don't have any of the scripts which generate the rom from the upstream.
So I will look into alternative ways of providing a suitable e100 etherboot.
Ian.
PATCH 1/1 Etherboot for E100 NIC
Quoted 8 lines · Ian Jackson
Yosuke Iwamatsu writes ("[Xen-devel] [PATCH] Etherboot for E100 NIC"):
Quoted 6 lines
Currently, Xen has the etherboot rom for hvm guests, which only supports rtl8139 nic device model.
This patch is intended to support etherboot for e100 nic by:
- adding etherboot rom for e100 nic (provided by rom-o-matic.net).
- making hvmloader scan pci devices, find the first nic device and load the corresponding etherboot rom.
Quoted 8 lines
Thanks. We'd prefer not to include a binary where we don't have the source code in the tree and also don't have any of the scripts which generate the rom from the upstream.
So I will look into alternative ways of providing a suitable e100 etherboot.
Ian.
Do you mean you are going to take the etherboot source code in xen's tree and generate rtl8139/e100 roms at compile time, or thinking any other way?
Thanks,
---------
Yosuke Iwamatsu
Yosuke Iwamatsu writes ("[Xen-devel] [PATCH] Etherboot for E100 NIC"):
Quoted 3 lines
Do you mean you are going to take the etherboot source code in xen's tree and generate rtl8139/e100 roms at compile time, or thinking any other way?
Yes, I'm going to try to do that and see how the result looks. Probably by putting a tarball of the etherboot source in the xen tree.
Ian.
Yosuke Iwamatsu writes ("[Xen-devel] [PATCH] Etherboot for E100 NIC"):
Quoted 6 lines
Currently, Xen has the etherboot rom for hvm guests, which only supports rtl8139 nic device model.
This patch is intended to support etherboot for e100 nic by:
- adding etherboot rom for e100 nic (provided by rom-o-matic.net).
- making hvmloader scan pci devices, find the first nic device and load the corresponding etherboot rom.
Following on from the changes recently made to build etherboot ourselves from source, I've adapted Yosuke Iwamatsu's idea to work in this context.
The result is below and appears to work. The set of supported NICs can be adjusted by changing the setting of NICS in tools/firmware/etherboot/Makefile.
The added file tools/firmware/etherboot/make-eb-rom-list needs to have chmod +x run on it before committing.
.hgignore +2 -0
@@ -105,6 +105,8 @@ ^tools/firmware/.*\.bin$ ^tools/firmware/.*\.sym$ ^tools/firmware/.*bios/.*bios.*\.txt$ +^tools/firmware/etherboot/eb-roms\.h$ +^tools/firmware/etherboot/eb-rom-list\.h$ ^tools/firmware/etherboot/etherboot-5 ^tools/firmware/etherboot/etherboot-build ^tools/firmware/etherboot/.*\.zrom\.h$
tools/firmware/etherboot/Makefile +16 -3
@@ -9,14 +9,24 @@ T=etherboot-$(EB_VERSION).tar.gz T=etherboot-$(EB_VERSION).tar.gz E=etherboot-build -TARGETS=eb-rtl8139.zrom.h +NICS = rtl8139 eepro100 + +TARGETS= eb-rom-list.h eb-roms.h $(ROM_ZHS) + +ROM_ZHS= $(addprefix eb-, $(addsuffix .zrom.h, $(NICS))) all: $(TARGETS) eb-%.zrom.h: $E/src/Config $(MAKE) -C $E/src bin/$*.zrom - ../hvmloader/mkhex etherboot <$E/src/bin/$*.zrom >[email protected] + ../hvmloader/mkhex etherboot_$* <$E/src/bin/$*.zrom >[email protected] mv -f [email protected] $@ + +eb-rom-list.h: make-eb-rom-list $E/src/bin/Roms + ./$^ $(NICS) >[email protected] && mv -f [email protected] $@ + +eb-roms.h: eb-rom-list.h $(ROM_ZHS) + cat $^ >[email protected] && mv -f [email protected] $@ $E/src/Config: $T Config rm -rf $D $E
@@ -44,7 +54,10 @@ eb-%.zrom.h: $E/src/Config mv Config.new Config mv $D $E +$E/src/bin/Roms: $E/src/Config + $(MAKE) -C $E/src bin/Roms + clean: - rm -rf $D $E *.zrom.h *~ + rm -rf $D $E *.zrom.h $(TARGETS) *~ .PHONY: all clean
tools/firmware/hvmloader/Makefile +1 -1
@@ -55,7 +55,7 @@ roms.h: ../rombios/BIOS-bochs-latest ../ sh ./mkhex vgabios_stdvga ../vgabios/VGABIOS-lgpl-latest.bin >> roms.h sh ./mkhex vgabios_cirrusvga ../vgabios/VGABIOS-lgpl-latest.cirrus.bin >> roms.h sh ./mkhex vmxassist ../vmxassist/vmxassist.bin >> roms.h - cat ../etherboot/eb-rtl8139.zrom.h >> roms.h + cat ../etherboot/eb-roms.h >> roms.h sh ./mkhex extboot ../extboot/extboot.bin >> roms.h .PHONY: clean
tools/firmware/hvmloader/hvmloader.c +53 -3
68 lines not on this page · raw message
tools/firmware/etherboot/make-eb-rom-list new file +11 -0
@@ -0,0 +1,11 @@ +#!/bin/sh +set -e +roms=$1; shift +echo "/* autogenerated - do not edit */" +echo "#define ETHERBOOT_ROM_LIST \\" +for nic in "$@"; do + makerom=`grep "^MAKEROM_ID_$nic *= *-p *" <$roms` + echo " ETHERBOOT_ROM($nic,${makerom#*-p}) \\" +done +echo +echo "/*end.*/"
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
PATCH 1/1 Etherboot for E100 NIC
Quoted 10 lines · Ian Jackson
Following on from the changes recently made to build etherboot ourselves from source, I've adapted Yosuke Iwamatsu's idea to work in this context.
The result is below and appears to work. The set of supported NICs can be adjusted by changing the setting of NICS in
tools/firmware/etherboot/Makefile.The added file
tools/firmware/etherboot/make-eb-rom-listneeds to have chmod +x run on it before committing.
Thanks for your work.
I tried the latest staging tree and got etherboot work fine.
The attached patch (applied to cs16963) was needed to build etherboot in my test environment.
I also found that build failed with "debug=y" specified, though I don't know how to fix it yet.
Yosuke.
----------------------
tools/firmware/etherboot/Config +2 -0
@@ -10,4 +10,6 @@ CFLAGS+= -UPXE_DHCP_STRICT CFLAGS+= -UPXE_DHCP_STRICT CFLAGS+= -DPXE_DHCP_STRICT +CFLAGS+= -fno-stack-protector + # Also, the Makefile arranges for us to use GCC 3
Quoted 7 lines · Yosuke Iwamatsu
Thanks for your work.
I tried the latest staging tree and got etherboot work fine.The attached patch (applied to cs16963) was needed to build etherboot in my test environment.
I also found that build failed with "debug=y" specified, though I don't know how to fix it yet.
I've yielded and checked in a pre-built eb-roms.h file. Making etherboot properly portable is not worth the effort. If you want to build your own eb-roms.h file you'll have to accept that some tweaking of Config may be required.
-- Keir
Keir Fraser writes ("Re: [Xen-devel] [PATCH] Etherboot for E100 NIC"):
Quoted 4 lines
I've yielded and checked in a pre-built
eb-roms.hfile. Making etherboot properly portable is not worth the effort. If you want to build your owneb-roms.hfile you'll have to accept that some tweaking of Config may be required.
For the avoidance of doubt, I think this is fine. (We should make sure we rebuild this, and anything else like it, when we make a release.)
Ian.