kernel_img_HEADERS += boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
- list.h handler.h command.h i18n.h env_private.h libgcc.h mm_private.h
- list.h command.h i18n.h env_private.h libgcc.h
++ list.h command.h i18n.h env_private.h libgcc.h mm_private.h
ifneq ($(platform), emu)
-kernel_img_HEADERS += machine/memory.h machine/loader.h
+kernel_img_HEADERS += machine/memory.h
endif
symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
+ # For cmostest.mod
+ pkglib_MODULES += cmostest.mod
+ cmostest_mod_SOURCES = commands/i386/cmostest.c
+ cmostest_mod_CFLAGS = $(COMMON_CFLAGS)
+ cmostest_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+pkglib_MODULES += efiemu.mod
+efiemu_mod_SOURCES = efiemu/main.c efiemu/i386/loadcore32.c \
+ efiemu/i386/loadcore64.c efiemu/i386/pc/cfgtables.c \
+ efiemu/mm.c efiemu/loadcore_common.c efiemu/symbols.c \
+ efiemu/loadcore32.c efiemu/loadcore64.c \
+ efiemu/prepare32.c efiemu/prepare64.c efiemu/pnvram.c \
+ efiemu/i386/coredetect.c
+efiemu_mod_CFLAGS = $(COMMON_CFLAGS)
+efiemu_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+# For acpi.mod.
+pkglib_MODULES += acpi.mod
+acpi_mod_SOURCES = commands/acpi.c commands/i386/pc/acpi.c
+acpi_mod_CFLAGS = $(COMMON_CFLAGS)
+acpi_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+BOOTTARGET=coreboot
+QEMU32=qemu-system-i386
+
include $(srcdir)/conf/i386.mk
include $(srcdir)/conf/common.mk
hdparm_mod_SOURCES = commands/hdparm.c lib/hexdump.c
hdparm_mod_CFLAGS = $(COMMON_CFLAGS)
hdparm_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+ # For cmostest.mod
+ pkglib_MODULES += cmostest.mod
+ cmostest_mod_SOURCES = commands/i386/cmostest.c
+ cmostest_mod_CFLAGS = $(COMMON_CFLAGS)
+ cmostest_mod_LDFLAGS = $(COMMON_LDFLAGS)
-ifeq ($(enable_efiemu), yes)
-
-efiemu32.o: efiemu/runtime/efiemu.c $(TARGET_OBJ2ELF)
- -rm -f $@
-ifeq ($(TARGET_APPLE_CC), 1)
- -rm -f $@.bin
- $(TARGET_CC) -c -m32 -DELF32 -DAPPLE_CC -o $@.bin -Wall -Werror $< -nostdlib -O2 -I$(srcdir)/efiemu/runtime -I$(srcdir)/include -Iinclude
- $(OBJCONV) -felf32 -nu -nd $@.bin $@
- -rm -f $@.bin
-else
- $(TARGET_CC) -c -m32 -DELF32 -o $@ -Wall -Werror $< -nostdlib -O2 -I$(srcdir)/efiemu/runtime -I$(srcdir)/include -Iinclude
- if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
-endif
-
-efiemu64_c.o: efiemu/runtime/efiemu.c
-ifeq ($(TARGET_APPLE_CC), 1)
- $(TARGET_CC) -c -m64 -DAPPLE_CC=1 -DELF64 -o $@ -Wall -Werror $< -nostdlib -mno-red-zone -O2 -I$(srcdir)/efiemu/runtime -I$(srcdir)/include -Iinclude
-else
- $(TARGET_CC) -c -m64 -DELF64 -o $@ -Wall -Werror $< -nostdlib -mcmodel=large -mno-red-zone -O2 -I$(srcdir)/efiemu/runtime -I$(srcdir)/include -Iinclude
-endif
-
-efiemu64_s.o: efiemu/runtime/efiemu.S
- -rm -f $@
-ifeq ($(TARGET_APPLE_CC), 1)
- $(TARGET_CC) -c -m64 -DAPPLE_CC=1 -DELF64 -o $@ -Wall -Werror $< -nostdlib -mno-red-zone -O2 -I$(srcdir)/efiemu/runtime -I$(srcdir)/include -Iinclude
-else
- $(TARGET_CC) -c -m64 -DELF64 -o $@ -Wall -Werror $< -nostdlib -mcmodel=large -mno-red-zone -O2 -I$(srcdir)/efiemu/runtime -I$(srcdir)/include -Iinclude
-endif
-
-efiemu64.o: efiemu64_c.o efiemu64_s.o $(TARGET_OBJ2ELF)
- -rm -f $@
-ifeq ($(TARGET_APPLE_CC), 1)
- -rm -f $@.bin
- $(TARGET_CC) -m64 -o $@.bin -Wl,-r $^ -nostdlib
- $(OBJCONV) -felf64 -nu -nd $@.bin $@
- -rm -f $@.bin
-else
- $(TARGET_CC) -m64 -o $@ -Wl,-r $^ -nostdlib
- if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
-endif
-
-CLEANFILES += efiemu32.o efiemu64.o efiemu64_c.o efiemu64_s.o
-pkglib_DATA += efiemu32.o efiemu64.o
-
-endif
+BOOTTARGET=cd
+QEMU32=qemu-system-i386
+
+bootcheck-linux16-i386: linux-initramfs.i386 $(GRUB_PAYLOADS_DIR)/linux.i386 $(srcdir)/tests/boot/linux.cfg grub-shell
+ timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu-opts="$(GRUB_QEMU_OPTS)" --boot=$(BOOTTARGET) --qemu=$(QEMU32) --files=/initrd=linux-initramfs.i386 --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.i386 $(srcdir)/tests/boot/linux16.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
+
+bootcheck-linux16-x86_64: linux-initramfs.x86_64 $(GRUB_PAYLOADS_DIR)/linux.x86_64 $(srcdir)/tests/boot/linux.cfg grub-shell
+ timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu-opts="$(GRUB_QEMU_OPTS)" --boot=$(BOOTTARGET) --qemu=qemu-system-x86_64 --files=/initrd=linux-initramfs.x86_64 --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.x86_64 $(srcdir)/tests/boot/linux16.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
+
+BOOTCHECKS += bootcheck-linux16-i386 bootcheck-linux16-x86_64
include $(srcdir)/conf/i386.mk
include $(srcdir)/conf/common.mk
kern/generic/rtc_get_time_ms.c \
kern/generic/millisleep.c \
kern/env.c \
- term/i386/pc/vga_text.c term/i386/vga_common.c \
+ term/i386/pc/vga_text.c term/i386/vga_common.c bus/pci.c \
symlist.c
- kernel_img_HEADERS += i386/pit.h
-kernel_img_HEADERS += pci.h
++kernel_img_HEADERS += pci.h i386/pit.h
kernel_img_CFLAGS = $(COMMON_CFLAGS) -DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)
kernel_img_ASFLAGS = $(COMMON_ASFLAGS) -DGRUB_KERNEL_MACHINE_LINK_ADDR=$(GRUB_KERNEL_MACHINE_LINK_ADDR)
kernel_img_LDFLAGS += $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)$(GRUB_KERNEL_MACHINE_LINK_ADDR)
vga_text_mod_SOURCES = term/i386/pc/vga_text.c term/i386/vga_common.c
vga_text_mod_CFLAGS = $(COMMON_CFLAGS)
vga_text_mod_LDFLAGS = $(COMMON_LDFLAGS)
+endif
+ pkglib_MODULES += video_cirrus.mod
+ video_cirrus_mod_SOURCES = video/cirrus.c
+ video_cirrus_mod_CFLAGS = $(COMMON_CFLAGS)
+ video_cirrus_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+ pkglib_MODULES += video_bochs.mod
+ video_bochs_mod_SOURCES = video/bochs.c
+ video_bochs_mod_CFLAGS = $(COMMON_CFLAGS)
+ video_bochs_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
pkglib_MODULES += relocator.mod
-relocator_mod_SOURCES = lib/i386/relocator.c lib/i386/relocator_asm.S lib/i386/relocator_backward.S
+ifeq ($(platform), ieee1275)
+relocator_mod_SOURCES = lib/relocator.c lib/i386/relocator32.S \
+ lib/i386/relocator64.S lib/i386/relocator16.S \
+ lib/$(target_cpu)/relocator_asm.S lib/i386/relocator.c \
+ lib/ieee1275/relocator.c
+else
+ifeq ($(platform), efi)
+relocator_mod_SOURCES = lib/relocator.c lib/i386/relocator32.S \
+ lib/i386/relocator64.S lib/i386/relocator16.S \
+ lib/$(target_cpu)/relocator_asm.S lib/i386/relocator.c \
+ lib/efi/relocator.c
+else
+relocator_mod_SOURCES = lib/relocator.c lib/i386/relocator32.S \
+ lib/i386/relocator64.S lib/i386/relocator16.S \
+ lib/$(target_cpu)/relocator_asm.S lib/i386/relocator.c
+endif
+endif
relocator_mod_CFLAGS = $(COMMON_CFLAGS)
relocator_mod_ASFLAGS = $(COMMON_ASFLAGS)
relocator_mod_LDFLAGS = $(COMMON_LDFLAGS)
return grub_error (GRUB_ERR_IO, "couldn't retrieve video parameters");
if (grub_xnu_bitmap)
+ {
+ if (grub_xnu_bitmap_mode == GRUB_XNU_BITMAP_STRETCH)
+ err = grub_video_bitmap_create_scaled (&bitmap,
+ mode_info.width,
+ mode_info.height,
+ grub_xnu_bitmap,
+ GRUB_VIDEO_BITMAP_SCALE_METHOD_BEST);
+ else
+ bitmap = grub_xnu_bitmap;
+ }
+
++ if (bitmap)
+ {
+ if (grub_xnu_bitmap_mode == GRUB_XNU_BITMAP_STRETCH)
+ err = grub_video_bitmap_create_scaled (&bitmap,
+ mode_info.width,
+ mode_info.height,
+ grub_xnu_bitmap,
+ GRUB_VIDEO_BITMAP_SCALE_METHOD_BEST);
+ else
+ bitmap = grub_xnu_bitmap;
+ }
+
if (bitmap)
{
int x, y;