changeset 1:75fc872f4fdb

old source apply new version elilo.
author taiki
date Tue, 26 Nov 2013 03:58:48 -0500
parents 18e09cdea3ae
children 62b6c885f8b3
files Make.defaults Make.rules Makefile disk/disk.qcow2 ovmf/BUILD_INFO ovmf/CirrusLogic5446.rom ovmf/LICENSE ovmf/OVMF.fd ovmf/README x86_64/rmswitch.h
diffstat 10 files changed, 246 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Make.defaults	Tue May 14 07:43:04 2013 +0900
+++ b/Make.defaults	Tue Nov 26 03:58:48 2013 -0500
@@ -55,16 +55,17 @@
 # They are installed as part of the GNU-EFI package installation
 #
 EFIINC	   = /usr/include/efi
-GNUEFILIB  = /usr/lib
-EFILIB	   = /usr/lib
-EFICRT0	   = /usr/lib
+GNUEFILIB  = /usr/lib64
+EFILIB	   = /usr/lib64
+EFICRT0	   = /usr/lib64/gnuefi
 
 CDIR    := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
 TOPDIR  =
 ALLSUBDIRS = ia32 ia64 x86_64 fs choosers devschemes tools
 
-HOSTARCH   = $(shell dpkg-architecture -qDEB_BUILD_ARCH | sed s,i[3456789]86,ia32, | sed s,amd64,x86_64, )
-ARCH	   := $(shell dpkg-architecture -qDEB_BUILD_ARCH | sed s,i[3456789]86,ia32, | sed s,amd64,x86_64, )
+#HOSTARCH   = $(shell dpkg-architecture -qDEB_BUILD_ARCH | sed s,i[3456789]86,ia32, | sed s,amd64,x86_64, )
+#ARCH	   = $(shell dpkg-architecture -qDEB_BUILD_ARCH | sed s,i[3456789]86,ia32, | sed s,amd64,x86_64, )
+ARCH	= $(shell uname -m | sed s,i[3456789]86,ia32,)
 INCDIR	   = -I. -I$(TOPDIR) -I$(EFIINC) -I$(EFIINC)/$(ARCH) -I$(EFIINC)/protocol -I$(TOPDIR)/efi110
 CPPFLAGS   = -DCONFIG_$(ARCH) 
 
--- a/Make.rules	Tue May 14 07:43:04 2013 +0900
+++ b/Make.rules	Tue Nov 26 03:58:48 2013 -0500
@@ -26,6 +26,14 @@
 %.efi: %.so 
 	$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
 		   -j .rela -j .reloc --target=$(FORMAT) $*.so $@
+	cp $(TARGETS) bootx64.efi
+	modprobe nbd
+	qemu-nbd -c /dev/nbd0 disk/disk.qcow2
+	mount /dev/nbd0 /mnt/nbd
+	cp bootx64.efi /mnt/nbd/EFI/BOOT/
+	umount /mnt/nbd
+	qemu-nbd -d /dev/nbd0
+	rmmod nbd
 
 %.so: %.o 
 	$(LD) $(LDFLAGS) $^ -o $@ $(LOADLIBES)
--- a/Makefile	Tue May 14 07:43:04 2013 +0900
+++ b/Makefile	Tue Nov 26 03:58:48 2013 -0500
@@ -99,6 +99,12 @@
 clean:
 	@set -e ; for d in $(ALLSUBDIRS) ; do $(MAKE) -C $$d $@ ; done
 	rm -f $(TARGETS) *~ *.so $(FILES)
+	umount /mnt/nbd
+	qemu-nbd -d /dev/nbd0
+	rmmod nbd
+
+exec:
+	qemu-kvm -s -L ovmf -bios ovmf/OVMF.fd -hdb disk/disk.qcow2
 
 .PRECIOUS: elilo.so
 
Binary file disk/disk.qcow2 has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ovmf/BUILD_INFO	Tue Nov 26 03:58:48 2013 -0500
@@ -0,0 +1,5 @@
+edk2:     r11337
+compiler: GCC 4.4.5
+binutils: 2.20.51-system.20100908
+iasl:     20090521 [Jun 30 2009]
+system:   Ubuntu 10.10 x86-64
Binary file ovmf/CirrusLogic5446.rom has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ovmf/LICENSE	Tue Nov 26 03:58:48 2013 -0500
@@ -0,0 +1,84 @@
+This OVMF binary release is built from source code licensed under
+the BSD open source license.  The BSD license is documented at
+http://opensource.org/licenses/bsd-license.php, and a copy is
+shown below.
+
+One sub-component of the OVMF project is a FAT filesystem driver.  The FAT
+filesystem driver code is also BSD licensed, but the code license contains
+one additional term.  This license can be found at
+http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Edk2-fat-driver,
+and a copy is shown below (following the normal BSD license).
+
+=== BSD license: START ===
+
+Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+* Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in
+  the documentation and/or other materials provided with the
+  distribution.
+* Neither the name of the Intel Corporation nor the names of its
+  contributors may be used to endorse or promote products derived
+  from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+=== BSD license: END ===
+
+=== FAT filesystem driver license: START ===
+
+Copyright (c) 2004, Intel Corporation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+* Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in
+  the documentation and/or other materials provided with the
+  distribution.
+* Neither the name of Intel nor the names of its
+  contributors may be used to endorse or promote products derived
+  from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+Additional terms:
+In addition to the forgoing, redistribution and use of the code is
+conditioned upon the FAT 32 File System Driver and all derivative
+works thereof being used for and designed only to read and/or write
+to a file system that is directly managed by an Extensible Firmware
+Interface (EFI) implementation or by an emulator of an EFI
+implementation.
+
+=== FAT filesystem driver license: END ===
Binary file ovmf/OVMF.fd has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ovmf/README	Tue Nov 26 03:58:48 2013 -0500
@@ -0,0 +1,118 @@
+
+=== OVMF OVERVIEW ===
+
+The Open Virtual Machine Firmware (OVMF) project aims
+to support firmware for Virtual Machines using the edk2
+code base.  More information can be found at:
+
+http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=OVMF
+
+=== STATUS ===
+
+Current status: Alpha
+
+Current capabilities:
+* IA32 and X64 architectures
+* QEMU (0.9.1 or later)
+  - Video, keyboard, IDE, CD-ROM, serial
+  - Runs UEFI shell
+  - Optional NIC support.  Requires QEMU (0.12.2 or later)
+* UEFI Linux has booted (but is not stable)
+
+=== FUTURE PLANS ===
+
+* Stabilize UEFI Linux boot
+* Test/Stabilize UEFI Self-Certification Tests (SCT) results
+
+=== BUILDING OVMF ===
+
+Pre-requisites:
+* Build environment capable of build the edk2 MdeModulePkg.
+* A properly configured ASL compiler:
+  - Intel ASL compiler: Available from http://www.acpica.org
+  - Microsoft ASL compiler: Available from http://www.acpi.info
+
+Update Conf/target.txt ACTIVE_PLATFORM for OVMF:
+                             PEI arch   DXE arch   UEFI interfaces
+* OvmfPkg/OvmfPkgIa32.dsc      IA32       IA32           IA32
+* OvmfPkg/OvmfPkgIa32X64.dsc   IA32       X64            X64
+* OvmfPkg/OvmfPkgX64.dsc       X64        X64            X64
+
+Update Conf/target.txt TARGET_ARCH based on the .dsc file:
+                             TARGET_ARCH
+* OvmfPkg/OvmfPkgIa32.dsc     IA32
+* OvmfPkg/OvmfPkgIa32X64.dsc  IA32 X64
+* OvmfPkg/OvmfPkgX64.dsc      X64
+
+Following the edk2 build process, you will find the OVMF binaries
+under the $WORKSPACE/Build/*/*/FV directory.  The actual path will
+depend on how your build is configured.  You can expect to find
+these binary outputs:
+* OVMF.FD
+  - Please note!  This filename has changed.  Older releases used OVMF.Fv.
+* CirrusLogic5446.rom
+
+More information on building OVMF can be found at:
+
+http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=How_to_build_OVMF
+
+=== RUNNING OVMF on QEMU ===
+
+* QEMU 0.9.1 or later is required.
+* Either copy, rename or symlink OVMF.FD => bios.bin
+* Either copy, rename or symlink CirrusLogic5446.rom => vgabios-cirrus.bin
+* Be sure to use qemu-system-x86_64, if you are using and X64 firmware.
+  (qemu-system-x86_64 works for the IA32 firmware as well, of course.)
+* Use the QEMU -L parameter to specify the directory where the bios.bin
+  and vgabios-cirrus.bin files are located.
+* Optionally you can use the QEMU -serial command to capture the
+  OVMF debug messages.  For example: -serial file:serial.log
+* The EFI shell is built into OVMF builds at this time, so it should
+  run automatically if a UEFI boot application is not found on the
+  removable media.
+* On Linux, newer version of QEMU may enable KVM feature, and this might
+  cause OVMF to fail to boot.  The QEMU '-no-kvm' may allow OVMF to boot.
+
+=== Build Scripts ===
+
+On systems with the bash shell you can use OvmfPkg/build.sh to simplify
+building and running OVMF.
+
+So, for example, to build + run OVMF X64:
+$ OvmfPkg/build.sh -a X64
+$ OvmfPkg/build.sh -a X64 qemu
+
+And to run a 64-bit UEFI bootable ISO image:
+$ OvmfPkg/build.sh -a X64 qemu -cdrom /path/to/disk-image.iso
+
+To build a 32-bit OVMF without debug serial messages using GCC 4.5:
+$ OvmfPkg/build.sh -a IA32 -b RELEASE -t GCC45
+
+=== Network Support ===
+
+To add network drivers to OVMF:
+
+* Download UEFI drivers for the e1000 NIC
+  - http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=17515&lang=eng
+  - Install the drivers into a directory called Intel3.5 in your WORKSPACE
+
+* Include the drivers in OVMF during the build:
+  - Add '-D NETWORK_ENABLE' to your build command
+  - For example: build -D NETWORK_ENABLE
+
+* Use the QEMU -net parameter to enable NIC support.
+  - QEMU does not support UEFI DHCP or UEFI PXE Boot, so long timeouts will
+    occur when NICs are enabled.  The long timeouts can be avoided by
+    interrupts the boot sequence by pressing a key when the logo appears.
+  - Example: Enable e1000 NIC with a DHCP server and restrict packet
+    forwarding:
+    -net nic,model=e1000 -net user,restrict=yes -net user,dhcpstart=10.0.2.10
+  - Example: Enable e1000 NIC with a DHCP server, restrict packet forwarding,
+    and generate PCAP file:
+    -net nic,model=e1000 -net user,restrict=yes -net user,dhcpstart=10.0.2.10
+    -net dump,file=a.pcap
+  - Example: Enable 2 e1000 NICs with a DHCP server and restrict
+    packet forwarding:
+    -net nic,model=e1000,addr=3 -net nic,model=e1000,addr=4
+    -net user,restrict=yes -net user,dhcpstart=10.0.2.10
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/x86_64/rmswitch.h	Tue Nov 26 03:58:48 2013 -0500
@@ -0,0 +1,19 @@
+UINT8 rmswitch_image[] = {
+0x2e, 0x0f, 0x01, 0x15, 0x6f, 0x7c, 0x00, 0x00,
+0x2e, 0x0f, 0x01, 0x1d, 0x75, 0x7c, 0x00, 0x00,
+0x0f, 0x20, 0xc0, 0x25, 0xff, 0xff, 0xff, 0x7f,
+0x0f, 0x22, 0xc0, 0x31, 0xc0, 0x0f, 0x22, 0xd8,
+0xea, 0x27, 0x7b, 0x00, 0x00, 0x10, 0x00, 0xb8,
+0x18, 0x00, 0x8e, 0xd8, 0x8e, 0xc0, 0x8e, 0xe0,
+0x8e, 0xe8, 0x8e, 0xd0, 0x0f, 0x20, 0xc0, 0x66,
+0x83, 0xe0, 0xfe, 0x0f, 0x22, 0xc0, 0xea, 0x43,
+0x7c, 0x00, 0x00, 0x31, 0xc0, 0x8e, 0xd0, 0xbc,
+0xfe, 0x7b, 0xea, 0x00, 0x00, 0x20, 0x90, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+0xff, 0x00, 0x01, 0x00, 0x9a, 0x00, 0x00, 0xff,
+0xff, 0x80, 0x01, 0x00, 0x92, 0x00, 0x00, 0x00,
+0x20, 0x4f, 0x7c, 0x00, 0x00, 0x00, 0x04, 0x00,
+0x00, 0x00, 0x00, 
+};
+UINTN rmswitch_size = sizeof rmswitch_image;