74 lines
3.8 KiB
Makefile
74 lines
3.8 KiB
Makefile
# -*- makefile -*-
|
|
|
|
pkglib_MODULES += cpuid.mod
|
|
cpuid_mod_SOURCES = commands/i386/cpuid.c
|
|
cpuid_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
cpuid_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
pkglib_MODULES += at_keyboard.mod
|
|
at_keyboard_mod_SOURCES = term/i386/pc/at_keyboard.c
|
|
at_keyboard_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
at_keyboard_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
pkglib_MODULES += vga_text.mod
|
|
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)
|
|
|
|
pkglib_MODULES += relocator.mod
|
|
relocator_mod_SOURCES = lib/i386/relocator.c lib/i386/relocator_asm.S lib/i386/relocator_backward.S
|
|
relocator_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
relocator_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
|
relocator_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
pkglib_MODULES += ata.mod
|
|
ata_mod_SOURCES = disk/ata.c
|
|
ata_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
ata_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
pkglib_MODULES += multiboot.mod
|
|
multiboot_mod_SOURCES = loader/i386/multiboot.c \
|
|
loader/i386/multiboot_mbi.c \
|
|
loader/multiboot_loader.c
|
|
multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
multiboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
multiboot_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
|
|
|
pkglib_MODULES += multiboot2.mod
|
|
multiboot2_mod_SOURCES = loader/i386/multiboot.c \
|
|
loader/i386/multiboot_mbi.c \
|
|
loader/multiboot_loader.c
|
|
multiboot2_mod_CFLAGS = $(COMMON_CFLAGS) -DGRUB_USE_MULTIBOOT2
|
|
multiboot2_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
multiboot2_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
|
|
|
linuxinit.x86_64: $(srcdir)/tests/boot/linuxinit-x86_64.S
|
|
$(TARGET_CC) -o $@ $< -m64 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\"
|
|
|
|
linux.init.i386: $(srcdir)/tests/boot/linux.init-i386.S
|
|
$(TARGET_CC) -o $@ $< -m32 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\"
|
|
|
|
kfreebsd.init.i386: $(srcdir)/tests/boot/kfreebsd.init-i386.S
|
|
$(TARGET_CC) -o $@ $< -m32 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" && freebsd-brandelf -t FreeBSD $@
|
|
|
|
linux-initramfs.%: linux.init.% Makefile
|
|
TDIR=`mktemp -d`; cp $< $$TDIR/init; (cd $$TDIR; echo ./init | cpio --quiet --dereference -o -H newc) | gzip > $@; rm -rf $$TDIR
|
|
|
|
kfreebsd-mfsroot.%: kfreebsd.init.% Makefile
|
|
TDIR=`mktemp -d`; mkdir $$TDIR/dev; mkdir $$TDIR/sbin; cp $< $$TDIR/sbin/init; makefs -t ffs -s 30m -f 1000 -o minfree=0,version=1 $@ $$TDIR; rm -rf $$TDIR
|
|
|
|
CLEANFILES += linux.init.i386 kfreebsd.init.i386 linux.init.x86_64 linux-initramfs.i386 linux-initramfs.x86_64
|
|
|
|
bootcheck-kfreebsd-i386: kfreebsd-mfsroot.i386 $(GRUB_PAYLOADS_DIR)/kfreebsd.i386 $(GRUB_PAYLOADS_DIR)/kfreebsd_env.i386 $(srcdir)/tests/boot/kfreebsd.cfg grub-shell
|
|
timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --boot=$(BOOTTARGET) --qemu=qemu-system-i386 --files=/mfsroot=kfreebsd-mfsroot.i386 --files=/kfreebsd=$(GRUB_PAYLOADS_DIR)/kfreebsd.i386 --files=/kfreebsd_env=$(GRUB_PAYLOADS_DIR)/kfreebsd_env.i386 $(srcdir)/tests/boot/kfreebsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
|
|
|
|
|
bootcheck-linux-i386: linux-initramfs.i386 $(GRUB_PAYLOADS_DIR)/linux.i386 $(srcdir)/tests/boot/linux.cfg grub-shell
|
|
timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --boot=$(BOOTTARGET) --qemu=qemu-system-i386 --files=/initrd=linux-initramfs.i386 --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.i386 $(srcdir)/tests/boot/linux.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
|
|
|
bootcheck-linux-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 --boot=$(BOOTTARGET) --qemu=qemu-system-x86_64 --files=/initrd=linux-initramfs.x86_64 --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.x86_64 $(srcdir)/tests/boot/linux.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
|
|
|
BOOTCHECKS+=bootcheck-linux-i386 bootcheck-linux-x86_64 bootcheck-kfreebsd-i386
|
|
|
|
.PHONY: bootcheck-linux-i386 bootcheck-linux-x86_64 bootcheck-kfreebsd-i386
|