]>
Commit | Line | Data |
---|---|---|
8c411768 | 1 | AUTOMAKE_OPTIONS = subdir-objects |
8c411768 | 2 | |
019be613 | 3 | DEPDIR = .deps-util |
8c411768 BC |
4 | SUBDIRS = . grub-core po docs |
5 | ||
a5a3bccd BC |
6 | include $(top_srcdir)/conf/Makefile.common |
7 | include $(top_srcdir)/conf/Makefile.extra-dist | |
c49e5dff | 8 | |
a5a3bccd BC |
9 | AM_CFLAGS = $(HOST_CFLAGS) |
10 | AM_LDFLAGS = $(HOST_LDFLAGS) | |
11 | AM_CPPFLAGS = $(HOST_CPPFLAGS) $(CPPFLAGS_DEFAULT) | |
12 | AM_CCASFLAGS = $(HOST_CCASFLAGS) $(CCASFLAGS_DEFAULT) | |
c49e5dff | 13 | |
a5a3bccd BC |
14 | CFLAGS_PROGRAM += $(CFLAGS_GNULIB) |
15 | LDFLAGS_PROGRAM += $(LDFLAGS_GNULIB) | |
16 | CPPFLAGS_PROGRAM += $(CPPFLAGS_GNULIB) | |
17 | CCASFLAGS_PROGRAM += $(CCASFLAGS_GNULIB) | |
8c411768 | 18 | |
3d9d3542 | 19 | include $(srcdir)/Makefile.util.am |
2e33ae0d | 20 | |
8c411768 | 21 | # XXX Use Automake's LEX & YACC support |
02c9030a | 22 | grub_script.tab.h: $(top_srcdir)/grub-core/script/parser.y |
8c411768 | 23 | $(YACC) -d -p grub_script_yy -b grub_script $(top_srcdir)/grub-core/script/parser.y |
02c9030a | 24 | grub_script.tab.c: grub_script.tab.h |
8c411768 BC |
25 | CLEANFILES += grub_script.tab.c grub_script.tab.h |
26 | ||
27 | # For the lexer. | |
02c9030a | 28 | grub_script.yy.h: $(top_srcdir)/grub-core/script/yylex.l |
8c411768 | 29 | $(LEX) -o grub_script.yy.c --header-file=grub_script.yy.h $(top_srcdir)/grub-core/script/yylex.l |
02c9030a | 30 | grub_script.yy.c: grub_script.yy.h |
8c411768 BC |
31 | CLEANFILES += grub_script.yy.c grub_script.yy.h |
32 | ||
d5c3b7ce BC |
33 | # For libgrub.a |
34 | libgrub.pp: grub_script.tab.h grub_script.yy.h $(libgrub_a_SOURCES) | |
35 | $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgrub_a_CPPFLAGS) $(CPPFLAGS) \ | |
a60f6ee1 | 36 | -D'GRUB_MOD_INIT(x)=@MARKER@x@' $^ > $@ || (rm -f $@; exit 1) |
d5c3b7ce | 37 | CLEANFILES += libgrub.pp |
a60f6ee1 | 38 | |
d5c3b7ce | 39 | libgrub_a_init.lst: libgrub.pp |
a60f6ee1 | 40 | cat $< | grep '@MARKER@' | sed 's/@MARKER@\(.*\)@/\1/g' | sort -u > $@ || (rm -f $@; exit 1) |
d5c3b7ce | 41 | CLEANFILES += libgrub_a_init.lst |
8c411768 | 42 | |
d5c3b7ce | 43 | libgrub_a_init.c: libgrub_a_init.lst $(top_srcdir)/geninit.sh |
a60f6ee1 | 44 | sh $(top_srcdir)/geninit.sh `cat $<` > $@ || (rm -f $@; exit 1) |
d5c3b7ce | 45 | CLEANFILES += libgrub_a_init.c |
8c411768 BC |
46 | |
47 | if COND_GRUB_MKFONT | |
48 | if COND_HAVE_FONT_SOURCE | |
f7711f5e | 49 | grubdata_DATA = unicode.pf2 ascii.pf2 ascii.h widthspec.h |
8c411768 BC |
50 | endif |
51 | endif | |
52 | ||
53 | unicode.pf2: $(FONT_SOURCE) grub-mkfont | |
54 | $(builddir)/grub-mkfont -o $@ $(FONT_SOURCE) | |
55 | CLEANFILES += unicode.pf2 | |
56 | ||
57 | # Arrows and lines are needed to draw the menu, so always include them | |
58 | UNICODE_ARROWS=0x2190-0x2193 | |
59 | UNICODE_LINES=0x2501-0x251B | |
60 | ||
61 | ascii.pf2: $(FONT_SOURCE) grub-mkfont | |
62 | $(builddir)/grub-mkfont -o $@ $(FONT_SOURCE) -r 0x0-0x7f,$(UNICODE_ARROWS),$(UNICODE_LINES) | |
63 | CLEANFILES += ascii.pf2 | |
64 | ||
65 | ascii.bitmaps: $(FONT_SOURCE) grub-mkfont | |
66 | $(builddir)/grub-mkfont --ascii-bitmaps -o $@ $(FONT_SOURCE) | |
67 | CLEANFILES += ascii.bitmaps | |
68 | ||
69 | ascii.h: ascii.bitmaps grub-bin2h | |
70 | $(builddir)/grub-bin2h ascii_bitmaps < $< > $@ | |
8c411768 BC |
71 | CLEANFILES += ascii.h $(top_builddir)/grub-core/include/ascii.h |
72 | ||
297f0c2b BC |
73 | widthspec.bin: $(FONT_SOURCE) grub-mkfont |
74 | $(builddir)/grub-mkfont --width-spec -o $@ $(FONT_SOURCE) | |
75 | CLEANFILES += widthspec.bin | |
76 | ||
77 | widthspec.h: widthspec.bin grub-bin2h | |
78 | $(builddir)/grub-bin2h widthspec < $< > $@ | |
79 | CLEANFILES += widthspec.h | |
80 | ||
610c1efd | 81 | # Install config.h into platformdir |
8c411768 | 82 | platform_HEADERS = config.h |
3d9d3542 | 83 | |
f7711f5e | 84 | pkglib_DATA += grub-mkconfig_lib |
5ad6967b VS |
85 | pkglib_DATA += update-grub_lib |
86 | ||
87 | ||
88 | if COND_i386_coreboot | |
89 | BOOTTARGET=coreboot | |
90 | QEMU32=qemu-system-i386 | |
91 | endif | |
92 | ||
93 | if COND_i386_multiboot | |
94 | BOOTTARGET=cd | |
95 | QEMU32=qemu-system-i386 | |
96 | endif | |
97 | ||
98 | if COND_i386_ieee1275 | |
99 | BOOTTARGET=cd | |
100 | QEMU32=qemu-system-i386 | |
101 | endif | |
102 | ||
103 | if COND_i386_qemu | |
104 | BOOTTARGET=qemu | |
105 | QEMU32=qemu-system-i386 | |
106 | endif | |
107 | ||
108 | if COND_i386_pc | |
109 | BOOTTARGET=cd | |
110 | QEMU32=qemu-system-i386 | |
111 | endif | |
112 | ||
113 | if COND_i386_efi | |
114 | QEMU32=qemu-system-i386 | |
115 | BOOTTARGET=cd | |
116 | endif | |
117 | ||
118 | if COND_x86_64_efi | |
119 | QEMU32=qemu-system-x86_64 | |
120 | BOOTTARGET=cd | |
121 | endif | |
122 | ||
123 | linux.init.x86_64: $(srcdir)/grub-core/tests/boot/linux.init-x86_64.S | |
124 | $(TARGET_CC) -o $@ $< -m64 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" | |
125 | ||
126 | linux.init.i386: $(srcdir)/grub-core/tests/boot/linux.init-i386.S | |
127 | $(TARGET_CC) -o $@ $< -m32 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" | |
128 | ||
9b1cb542 | 129 | multiboot.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S |
9bd44ab2 VS |
130 | $(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -DTARGET_MULTIBOOT=1 -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include |
131 | ||
9b1cb542 | 132 | kfreebsd.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S |
1e82303f VS |
133 | $(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include |
134 | ||
9bd44ab2 VS |
135 | kfreebsd.aout: kfreebsd.elf |
136 | $(OBJCOPY) -O a.out-i386-linux $< $@ -R .note.gnu.build-id | |
137 | ||
9b1cb542 | 138 | pc-chainloader.elf: $(srcdir)/grub-core/tests/boot/kernel-8086.S |
0101a723 | 139 | $(TARGET_CC) -o $@ $< -DTARGET_CHAINLOADER=1 -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,-N -Wl,-Ttext,0x7c00 -m32 |
e8ea4b84 VS |
140 | |
141 | pc-chainloader.bin: pc-chainloader.elf | |
142 | $(OBJCOPY) -O binary --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; | |
143 | ||
9b1cb542 | 144 | ntldr.elf: $(srcdir)/grub-core/tests/boot/kernel-8086.S |
0101a723 VS |
145 | $(TARGET_CC) -o $@ $< -DTARGET_NTLDR=1 -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,-N -Wl,-Ttext,0 -m32 |
146 | ||
147 | ntldr.bin: ntldr.elf | |
148 | $(OBJCOPY) -O binary --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; | |
149 | ||
9b1cb542 | 150 | multiboot2.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S |
9bd44ab2 | 151 | $(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include -DTARGET_MULTIBOOT2=1 |
1e82303f | 152 | |
5ad6967b VS |
153 | kfreebsd.init.x86_64: $(srcdir)/grub-core/tests/boot/kfreebsd.init-x86_64.S |
154 | $(TARGET_CC) -o $@ $< -m64 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" && freebsd-brandelf -t FreeBSD $@ | |
155 | ||
156 | kfreebsd.init.i386: $(srcdir)/grub-core/tests/boot/kfreebsd.init-i386.S | |
157 | $(TARGET_CC) -o $@ $< -m32 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" && freebsd-brandelf -t FreeBSD $@ | |
158 | ||
0f6a963e VS |
159 | knetbsd.init.i386: $(srcdir)/grub-core/tests/boot/kbsd.init-i386.S |
160 | $(TARGET_CC) -o $@ $< -m32 -nostdlib -nostdinc -DTARGET_NETBSD=1 -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" | |
161 | ||
162 | kopenbsd.init.i386: $(srcdir)/grub-core/tests/boot/kbsd.init-i386.S | |
163 | $(TARGET_CC) -o $@ $< -m32 -nostdlib -nostdinc -DTARGET_OPENBSD=1 -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" | |
5ad6967b | 164 | |
8e4ac346 VS |
165 | knetbsd.init.x86_64: $(srcdir)/grub-core/tests/boot/kbsd.init-x86_64.S |
166 | $(TARGET_CC) -o $@ $< -m64 -DTARGET_NETBSD=1 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" | |
167 | ||
168 | kopenbsd.init.x86_64: $(srcdir)/grub-core/tests/boot/kbsd.init-x86_64.S | |
169 | $(TARGET_CC) -o $@ $< -m64 -DTARGET_OPENBSD=1 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" | |
5ad6967b VS |
170 | |
171 | linux-initramfs.i386: linux.init.i386 Makefile | |
172 | TDIR=`mktemp -d`; cp $< $$TDIR/init; (cd $$TDIR; echo ./init | cpio --quiet --dereference -o -H newc) | gzip > $@; rm -rf $$TDIR | |
173 | ||
174 | linux-initramfs.x86_64: linux.init.x86_64 Makefile | |
175 | TDIR=`mktemp -d`; cp $< $$TDIR/init; (cd $$TDIR; echo ./init | cpio --quiet --dereference -o -H newc) | gzip > $@; rm -rf $$TDIR | |
176 | ||
177 | kfreebsd-mfsroot.i386.img: kfreebsd.init.i386 Makefile | |
178 | 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 | |
179 | ||
dc1bff76 VS |
180 | knetbsd.image.i386: knetbsd.init.i386 $(srcdir)/grub-core/tests/boot/kbsd.spec.txt |
181 | TDIR=`mktemp -d` && mkdir $$TDIR/dev && mkdir $$TDIR/sbin && cp $< $$TDIR/sbin/init && makefs -F $(srcdir)/grub-core/tests/boot/kbsd.spec.txt -t ffs -s 64k -f 10 -o minfree=0,version=1 $@ $$TDIR && rm -rf $$TDIR | |
182 | ||
0f6a963e VS |
183 | kopenbsd.image.i386: kopenbsd.init.i386 $(srcdir)/grub-core/tests/boot/kopenbsdlabel.txt |
184 | TDIR=`mktemp -d` && mkdir $$TDIR/dev && mkdir $$TDIR/sbin && cp $< $$TDIR/sbin/init && makefs -F $(srcdir)/grub-core/tests/boot/kbsd.spec.txt -t ffs -s 128k -f 10 -o minfree=0,version=1 $@ $$TDIR && bsdlabel -f -R $@ $(srcdir)/grub-core/tests/boot/kopenbsdlabel.txt && rm -rf $$TDIR || rm -f $@ | |
5ad6967b | 185 | |
8e4ac346 VS |
186 | kopenbsd.image.x86_64: kopenbsd.init.x86_64 $(srcdir)/grub-core/tests/boot/kopenbsdlabel.txt |
187 | TDIR=`mktemp -d` && mkdir $$TDIR/dev && mkdir $$TDIR/sbin && cp $< $$TDIR/sbin/init && makefs -F $(srcdir)/grub-core/tests/boot/kbsd.spec.txt -t ffs -s 128k -f 10 -o minfree=0,version=1 $@ $$TDIR && bsdlabel -f -R $@ $(srcdir)/grub-core/tests/boot/kopenbsdlabel.txt && rm -rf $$TDIR || rm -f $@ | |
188 | ||
5ad6967b VS |
189 | knetbsd.miniroot-image.i386.img: knetbsd.image.i386 $(GRUB_PAYLOADS_DIR)/knetbsd.miniroot.i386 |
190 | $(OBJCOPY) --add-section=miniroot=$< $(GRUB_PAYLOADS_DIR)/knetbsd.miniroot.i386 $@ | |
191 | ||
192 | kfreebsd-mfsroot.x86_64.img: kfreebsd.init.x86_64 Makefile | |
193 | 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 | |
194 | ||
dc1bff76 VS |
195 | knetbsd.image.x86_64: knetbsd.init.x86_64 $(srcdir)/grub-core/tests/boot/kbsd.spec.txt |
196 | TDIR=`mktemp -d` && mkdir $$TDIR/dev && mkdir $$TDIR/sbin && cp $< $$TDIR/sbin/init && makefs -F $(srcdir)/grub-core/tests/boot/kbsd.spec.txt -t ffs -s 64k -f 10 -o minfree=0,version=1 $@ $$TDIR && rm -rf $$TDIR | |
5ad6967b VS |
197 | |
198 | knetbsd.miniroot-image.x86_64.img: knetbsd.image.x86_64 $(GRUB_PAYLOADS_DIR)/knetbsd.miniroot.x86_64 | |
199 | $(OBJCOPY) --add-section=miniroot=$< $(GRUB_PAYLOADS_DIR)/knetbsd.miniroot.x86_64 $@ | |
200 | ||
201 | CLEANFILES += linux.init.i386 kfreebsd.init.i386 linux.init.x86_64 linux-initramfs.i386 linux-initramfs.x86_64 | |
202 | ||
203 | kfreebsd-mfsroot.i386.gz: kfreebsd-mfsroot.i386.img | |
204 | gzip < $< > $@ | |
205 | ||
206 | bootcheck-kfreebsd-i386: kfreebsd-mfsroot.i386.gz $(GRUB_PAYLOADS_DIR)/kfreebsd.i386 $(GRUB_PAYLOADS_DIR)/kfreebsd_env.i386 $(srcdir)/grub-core/tests/boot/kfreebsd.cfg grub-shell | |
207 | timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu-opts="$(GRUB_QEMU_OPTS)" --boot=$(BOOTTARGET) --qemu=$(QEMU32) --files=/mfsroot.gz=kfreebsd-mfsroot.i386.gz --files=/kfreebsd=$(GRUB_PAYLOADS_DIR)/kfreebsd.i386 --files=/kfreebsd_env=$(GRUB_PAYLOADS_DIR)/kfreebsd_env.i386 $(srcdir)/grub-core/tests/boot/kfreebsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null | |
208 | ||
209 | kfreebsd-mfsroot.x86_64.gz: kfreebsd-mfsroot.x86_64.img | |
210 | gzip < $< > $@ | |
211 | ||
212 | bootcheck-kfreebsd-x86_64: kfreebsd-mfsroot.x86_64.gz $(GRUB_PAYLOADS_DIR)/kfreebsd.x86_64 $(GRUB_PAYLOADS_DIR)/kfreebsd_env.x86_64 $(srcdir)/grub-core/tests/boot/kfreebsd.cfg grub-shell | |
213 | timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu-opts="$(GRUB_QEMU_OPTS)" --boot=$(BOOTTARGET) --qemu=qemu-system-x86_64 --files=/mfsroot.gz=kfreebsd-mfsroot.x86_64.gz --files=/kfreebsd=$(GRUB_PAYLOADS_DIR)/kfreebsd.x86_64 --files=/kfreebsd_env=$(GRUB_PAYLOADS_DIR)/kfreebsd_env.x86_64 $(srcdir)/grub-core/tests/boot/kfreebsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null | |
214 | ||
215 | knetbsd.miniroot-image.i386.gz: knetbsd.miniroot-image.i386.img | |
216 | gzip < $< > $@ | |
217 | ||
218 | bootcheck-knetbsd-i386: knetbsd.miniroot-image.i386.gz $(GRUB_PAYLOADS_DIR)/knetbsd.i386 $(srcdir)/grub-core/tests/boot/knetbsd.cfg grub-shell | |
0f6a963e VS |
219 | timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu-opts="$(GRUB_QEMU_OPTS)" --boot=$(BOOTTARGET) --qemu=$(QEMU32) --files=/miniroot.gz=knetbsd.miniroot-image.i386.gz --files=/knetbsd=$(GRUB_PAYLOADS_DIR)/knetbsd.i386 $(srcdir)/grub-core/tests/boot/knetbsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null |
220 | ||
221 | bootcheck-kopenbsd-i386: kopenbsd.image.i386 $(GRUB_PAYLOADS_DIR)/kopenbsd.i386 $(srcdir)/grub-core/tests/boot/kopenbsd.cfg grub-shell | |
222 | timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu-opts="$(GRUB_QEMU_OPTS)" --boot=$(BOOTTARGET) --qemu=$(QEMU32) --files=/ramdisk=kopenbsd.image.i386 --files=/kopenbsd=$(GRUB_PAYLOADS_DIR)/kopenbsd.i386 $(srcdir)/grub-core/tests/boot/kopenbsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null | |
5ad6967b | 223 | |
8e4ac346 VS |
224 | bootcheck-kopenbsd-x86_64: kopenbsd.image.x86_64 $(GRUB_PAYLOADS_DIR)/kopenbsd.x86_64 $(srcdir)/grub-core/tests/boot/kopenbsd.cfg grub-shell |
225 | timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu-opts="$(GRUB_QEMU_OPTS)" --boot=$(BOOTTARGET) --qemu=qemu-system-x86_64 --files=/ramdisk=kopenbsd.image.x86_64 --files=/kopenbsd=$(GRUB_PAYLOADS_DIR)/kopenbsd.x86_64 $(srcdir)/grub-core/tests/boot/kopenbsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null | |
226 | ||
5ad6967b VS |
227 | knetbsd.miniroot-image.x86_64.gz: knetbsd.miniroot-image.x86_64.img |
228 | gzip < $< > $@ | |
229 | ||
230 | bootcheck-knetbsd-x86_64: knetbsd.miniroot-image.x86_64.gz $(GRUB_PAYLOADS_DIR)/knetbsd.x86_64 $(srcdir)/grub-core/tests/boot/knetbsd.cfg grub-shell | |
231 | timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu-opts="$(GRUB_QEMU_OPTS)" --boot=$(BOOTTARGET) --qemu=qemu-system-x86_64 --files=/miniroot.gz=knetbsd.miniroot-image.x86_64.gz --files=/knetbsd=$(GRUB_PAYLOADS_DIR)/knetbsd.x86_64 $(srcdir)/grub-core/tests/boot/knetbsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null | |
232 | ||
233 | bootcheck-linux-i386: linux-initramfs.i386 $(GRUB_PAYLOADS_DIR)/linux.i386 $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell | |
234 | 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)/grub-core/tests/boot/linux.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null | |
235 | ||
236 | bootcheck-linux-x86_64: linux-initramfs.x86_64 $(GRUB_PAYLOADS_DIR)/linux.x86_64 $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell | |
237 | 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)/grub-core/tests/boot/linux.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null | |
238 | ||
239 | bootcheck-linux16-i386: linux-initramfs.i386 $(GRUB_PAYLOADS_DIR)/linux.i386 $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell | |
240 | 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)/grub-core/tests/boot/linux16.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null | |
241 | ||
242 | bootcheck-linux16-x86_64: linux-initramfs.x86_64 $(GRUB_PAYLOADS_DIR)/linux.x86_64 $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell | |
243 | 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)/grub-core/tests/boot/linux16.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null | |
244 | ||
1e82303f VS |
245 | bootcheck-multiboot: multiboot.elf $(srcdir)/grub-core/tests/boot/multiboot.cfg grub-shell |
246 | timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu-opts="$(GRUB_QEMU_OPTS)" --boot=$(BOOTTARGET) --qemu=$(QEMU32) --files=/multiboot.elf=multiboot.elf $(srcdir)/grub-core/tests/boot/multiboot.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null | |
247 | ||
248 | bootcheck-multiboot2: multiboot2.elf $(srcdir)/grub-core/tests/boot/multiboot2.cfg grub-shell | |
249 | timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu-opts="$(GRUB_QEMU_OPTS)" --boot=$(BOOTTARGET) --qemu=$(QEMU32) --files=/multiboot2.elf=multiboot2.elf $(srcdir)/grub-core/tests/boot/multiboot2.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null | |
250 | ||
9bd44ab2 VS |
251 | bootcheck-kfreebsd-aout: kfreebsd.aout $(srcdir)/grub-core/tests/boot/kfreebsd-aout.cfg grub-shell |
252 | timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu-opts="$(GRUB_QEMU_OPTS)" --boot=$(BOOTTARGET) --qemu=$(QEMU32) --files=/kfreebsd.aout=kfreebsd.aout $(srcdir)/grub-core/tests/boot/kfreebsd-aout.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null | |
253 | ||
e8ea4b84 VS |
254 | bootcheck-pc-chainloader: pc-chainloader.bin $(srcdir)/grub-core/tests/boot/pc-chainloader.cfg grub-shell |
255 | timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu-opts="$(GRUB_QEMU_OPTS)" --boot=$(BOOTTARGET) --qemu=$(QEMU32) --files=/pc-chainloader.bin=pc-chainloader.bin $(srcdir)/grub-core/tests/boot/pc-chainloader.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null | |
256 | ||
0101a723 VS |
257 | bootcheck-ntldr: ntldr.bin $(srcdir)/grub-core/tests/boot/ntldr.cfg grub-shell |
258 | timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu-opts="$(GRUB_QEMU_OPTS)" --boot=$(BOOTTARGET) --qemu=$(QEMU32) --files=/ntldr.bin=ntldr.bin $(srcdir)/grub-core/tests/boot/ntldr.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null | |
259 | ||
5ad6967b VS |
260 | BOOTCHECKS= |
261 | ||
e8ea4b84 | 262 | if COND_i386_pc |
02a16ba9 VS |
263 | #pc chainloader by definition is only for i386-pc |
264 | BOOTCHECKS += bootcheck-pc-chainloader | |
265 | #ntldr and bootmgr require BIOS. | |
266 | BOOTCHECKS += bootcheck-ntldr | |
267 | #legacy protocol makes early BIOS calls. | |
268 | BOOTCHECKS += bootcheck-linux16-i386 bootcheck-linux16-x86_64 | |
269 | # Crashes early on non-BIOS | |
270 | BOOTCHECKS += bootcheck-knetbsd-i386 | |
271 | endif | |
272 | ||
273 | if !COND_i386_coreboot | |
274 | # Crashes because memory at 0-0x1000 is occupied | |
02a16ba9 VS |
275 | BOOTCHECKS += bootcheck-knetbsd-x86_64 |
276 | ||
303f5995 VS |
277 | # Likewise and require ACPI. |
278 | if !COND_i386_multiboot | |
279 | if !COND_i386_qemu | |
280 | BOOTCHECKS += bootcheck-kfreebsd-x86_64 | |
02a16ba9 | 281 | BOOTCHECKS += bootcheck-kfreebsd-i386 |
e8ea4b84 | 282 | endif |
303f5995 VS |
283 | endif |
284 | endif | |
e8ea4b84 | 285 | |
9bd44ab2 VS |
286 | BOOTCHECKS += bootcheck-kfreebsd-aout |
287 | ||
8e4ac346 VS |
288 | BOOTCHECKS += bootcheck-kopenbsd-i386 bootcheck-kopenbsd-x86_64 |
289 | ||
1e82303f VS |
290 | BOOTCHECKS += bootcheck-multiboot bootcheck-multiboot2 |
291 | ||
1e82303f | 292 | BOOTCHECKS += bootcheck-linux-i386 bootcheck-linux-x86_64 |
5ad6967b | 293 | |
5ad6967b VS |
294 | |
295 | .PHONY: bootcheck-linux-i386 bootcheck-linux-x86_64 \ | |
296 | bootcheck-kfreebsd-i386 bootcheck-kfreebsd-x86_64 \ | |
297 | bootcheck-knetbsd-i386 bootcheck-knetbsd-x86_64 | |
298 | ||
299 | # Randomly generated | |
300 | SUCCESSFUL_BOOT_STRING=3e49994fd5d82b7c9298d672d774080d | |
301 | # tianocore cd access is very slow | |
302 | BOOTCHECK_TIMEOUT=180 | |
303 | ||
304 | bootcheck: $(BOOTCHECKS) |