mirror of
https://github.com/xcat2/xcat-dep.git
synced 2024-11-21 17:11:45 +00:00
-Update to qemu kvm with a feature enhancement to allow us more flexibility
in network boot roms
This commit is contained in:
parent
fc99b134ab
commit
7a5f0cd4d4
BIN
kvm/qemu-kvm-0.10.5.tar.gz
Normal file
BIN
kvm/qemu-kvm-0.10.5.tar.gz
Normal file
Binary file not shown.
72
kvm/qemu-kvm.spec
Normal file
72
kvm/qemu-kvm.spec
Normal file
@ -0,0 +1,72 @@
|
||||
Name: qemu-kvm
|
||||
Version: 0.10.5
|
||||
Release: 1
|
||||
Summary: Kernel Virtual Machine virtualization environment
|
||||
|
||||
Group: System Environment/Kernel
|
||||
License: GPL
|
||||
URL: http://www.qumranet.com
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
|
||||
|
||||
ExclusiveArch: i386 x86_64 ia64
|
||||
|
||||
Requires: kvm-kmod bridge-utils
|
||||
|
||||
%define Distribution %(rpm -q -qf /etc/redhat-release --qf '%%{name}' | cut -d"-" -f 1)
|
||||
|
||||
BuildRequires: zlib-devel
|
||||
|
||||
Source0: qemu-kvm-0.10.5.tar.gz
|
||||
Patch: qemu-option-rom-expansion.patch
|
||||
|
||||
%description
|
||||
The Kernel Virtual Machine provides a virtualization enviroment for processors
|
||||
with hardware support for virtualization: Intel's VT-x&VT-i and AMD's AMD-V.
|
||||
|
||||
%prep
|
||||
|
||||
%setup
|
||||
%patch -p1
|
||||
|
||||
%build
|
||||
rm -rf %{buildroot}
|
||||
|
||||
./configure --prefix=/usr --disable-sdl --disable-gfx-check
|
||||
make
|
||||
%ifarch i386 x86_64
|
||||
make -C kvm/extboot
|
||||
%endif
|
||||
|
||||
%install
|
||||
|
||||
make DESTDIR=%{buildroot} install
|
||||
cp kvm/extboot/extboot.bin %{buildroot}/usr/share/qemu/
|
||||
ln -sf qemu-system-x86_64 %{buildroot}/usr/bin/kvm
|
||||
rm %{buildroot}/usr/share/qemu/pxe-e1000.bin
|
||||
|
||||
%define bindir /usr/bin
|
||||
%define bin %{bindir}/kvm
|
||||
%define initdir /etc/init.d
|
||||
%define confdir /etc/kvm
|
||||
%define utilsdir /etc/kvm/utils
|
||||
|
||||
%post
|
||||
#/sbin/chkconfig --add kvm
|
||||
#/sbin/chkconfig --level 2345 kvm on
|
||||
#/sbin/chkconfig --level 16 kvm off
|
||||
/usr/sbin/groupadd -fg 444 kvm
|
||||
|
||||
%preun
|
||||
if [ "$1" != 0 ]; then
|
||||
/sbin/service kvm stop
|
||||
/sbin/chkconfig --level 2345 kvm off
|
||||
/sbin/chkconfig --del kvm
|
||||
fi
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
%files
|
||||
/usr/bin/kvm
|
||||
/usr
|
||||
%changelog
|
91
kvm/qemu-option-rom-expansion.patch
Normal file
91
kvm/qemu-option-rom-expansion.patch
Normal file
@ -0,0 +1,91 @@
|
||||
diff -urN qemu-kvm-0.10.5/hw/pc.c qemu-kvm-0.10.5-extoptrom//hw/pc.c
|
||||
--- qemu-kvm-0.10.5/hw/pc.c 2009-05-21 05:05:19.000000000 -0400
|
||||
+++ qemu-kvm-0.10.5-extoptrom//hw/pc.c 2009-06-23 09:32:02.000000000 -0400
|
||||
@@ -818,7 +818,7 @@
|
||||
{
|
||||
char buf[1024];
|
||||
int ret, linux_boot, i;
|
||||
- ram_addr_t ram_addr, vga_ram_addr, bios_offset, vga_bios_offset;
|
||||
+ ram_addr_t ram_addr, vga_ram_addr, bios_offset, vga_bios_offset, option_rom_start = 0;
|
||||
ram_addr_t below_4g_mem_size, above_4g_mem_size = 0;
|
||||
int bios_size, isa_bios_size, vga_bios_size;
|
||||
int pci_option_rom_offset;
|
||||
@@ -830,6 +830,9 @@
|
||||
int index;
|
||||
BlockDriverState *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
|
||||
BlockDriverState *fd[MAX_FD];
|
||||
+ int using_vga = cirrus_vga_enabled || std_vga_enabled || vmsvga_enabled;
|
||||
+
|
||||
+
|
||||
|
||||
if (ram_size >= 0xe0000000 ) {
|
||||
above_4g_mem_size = ram_size - 0xe0000000;
|
||||
@@ -905,7 +908,7 @@
|
||||
exit(1);
|
||||
}
|
||||
|
||||
- if (cirrus_vga_enabled || std_vga_enabled || vmsvga_enabled) {
|
||||
+ if (using_vga) {
|
||||
/* VGA BIOS load */
|
||||
if (cirrus_vga_enabled) {
|
||||
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, VGABIOS_CIRRUS_FILENAME);
|
||||
@@ -923,11 +926,21 @@
|
||||
fprintf(stderr, "qemu: could not load VGA BIOS '%s'\n", buf);
|
||||
exit(1);
|
||||
}
|
||||
+ /* Round up vga bios size to the next 2k boundary */
|
||||
+ vga_bios_size = (vga_bios_size + 2047) & ~2047;
|
||||
+ option_rom_start = 0xc0000 + vga_bios_size;
|
||||
+
|
||||
|
||||
/* setup basic memory access */
|
||||
- cpu_register_physical_memory(0xc0000, 0x10000,
|
||||
+ cpu_register_physical_memory(0xc0000, vga_bios_size,
|
||||
vga_bios_offset | IO_MEM_ROM);
|
||||
}
|
||||
+ /* No point in placing option roms before this address, since bochs bios
|
||||
+ * will only start looking for it at 0xc8000 */
|
||||
+ if (option_rom_start < 0xc8000)
|
||||
+ option_rom_start = 0xc8000;
|
||||
+
|
||||
+
|
||||
|
||||
/* map the last 128KB of the BIOS in ISA space */
|
||||
isa_bios_size = bios_size;
|
||||
@@ -949,14 +962,15 @@
|
||||
ram_addr_t option_rom_offset;
|
||||
int size, offset;
|
||||
|
||||
- offset = 0;
|
||||
+ offset = option_rom_start;
|
||||
+
|
||||
if (linux_boot) {
|
||||
option_rom_offset = qemu_ram_alloc(TARGET_PAGE_SIZE);
|
||||
- cpu_register_physical_memory(0xd0000, TARGET_PAGE_SIZE,
|
||||
+ cpu_register_physical_memory(option_rom_start, TARGET_PAGE_SIZE,
|
||||
option_rom_offset);
|
||||
load_linux(0xd0000,
|
||||
kernel_filename, initrd_filename, kernel_cmdline, below_4g_mem_size);
|
||||
- offset = TARGET_PAGE_SIZE;
|
||||
+ offset += TARGET_PAGE_SIZE;
|
||||
}
|
||||
|
||||
for (i = 0; i < nb_option_roms; i++) {
|
||||
@@ -966,7 +980,7 @@
|
||||
option_rom[i]);
|
||||
exit(1);
|
||||
}
|
||||
- if (size > (0x10000 - offset))
|
||||
+ if (size > (0xe0000 - offset))
|
||||
goto option_rom_error;
|
||||
option_rom_offset = qemu_ram_alloc(size);
|
||||
ret = load_image(option_rom[i], phys_ram_base + option_rom_offset);
|
||||
@@ -980,7 +994,7 @@
|
||||
initialization, and (optionally) marked readonly by the BIOS
|
||||
before INT 19h. See the PNPBIOS specification, appendix B.
|
||||
DDIM support is mandatory for proper PCI expansion ROM support. */
|
||||
- cpu_register_physical_memory(0xd0000 + offset,
|
||||
+ cpu_register_physical_memory(offset,
|
||||
size, option_rom_offset /* | IO_MEM_ROM */);
|
||||
option_rom_setup_reset(0xd0000 + offset, size);
|
||||
offset += size;
|
Loading…
Reference in New Issue
Block a user