qemu, coreboot, multiboot: Change linking address to 0x9000.
[grub.git] / grub-core / Makefile.core.def
1 AutoGen definitions Makefile.tpl;
2
3 transform_data = {
4   installdir = noinst;
5   name = gensyminfo.sh;
6   common = gensyminfo.sh.in;
7 };
8
9 transform_data = {
10   installdir = noinst;
11   name = genmod.sh;
12   common = genmod.sh.in;
13 };
14
15 transform_data = {
16   installdir = noinst;
17   name = modinfo.sh;
18   common = modinfo.sh.in;
19 };
20
21 transform_data = {
22   installdir = platform;
23   name = gmodule.pl;
24   common = gmodule.pl.in;
25 };
26
27 transform_data = {
28   installdir = platform;
29   name = gdb_grub;
30   common = gdb_grub.in;
31 };
32
33 transform_data = {
34   installdir = platform;
35   name = grub.chrp;
36   common = boot/powerpc/grub.chrp.in;
37   enable = powerpc_ieee1275;
38 };
39
40 transform_data = {
41   installdir = platform;
42   name = bootinfo.txt;
43   common = boot/powerpc/bootinfo.txt.in;
44   enable = powerpc_ieee1275;
45 };
46
47 kernel = {
48   name = kernel;
49
50   nostrip = emu;
51
52   emu_ldflags              = '-Wl,-r,-d';
53   i386_efi_ldflags         = '-Wl,-r,-d';
54   i386_efi_stripflags      = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
55   x86_64_efi_ldflags       = '-Wl,-r,-d';
56   x86_64_efi_stripflags    = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
57
58   ia64_efi_cflags = '-fno-builtin -fpic -minline-int-divide-max-throughput';
59   ia64_efi_ldflags = '-Wl,-r,-d';
60   ia64_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
61
62   arm_efi_ldflags          = '-Wl,-r,-d';
63   arm_efi_stripflags       = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
64
65   arm64_efi_ldflags          = '-Wl,-r,-d';
66   arm64_efi_stripflags       = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version -R .eh_frame';
67
68   i386_pc_ldflags          = '$(TARGET_IMG_LDFLAGS)';
69   i386_pc_ldflags          = '$(TARGET_IMG_BASE_LDOPT),0x9000';
70   i386_qemu_ldflags        = '$(TARGET_IMG_LDFLAGS)';
71   i386_qemu_ldflags        = '$(TARGET_IMG_BASE_LDOPT),0x9000';
72   i386_coreboot_ldflags    = '$(TARGET_IMG_LDFLAGS)';
73   i386_coreboot_ldflags    = '$(TARGET_IMG_BASE_LDOPT),0x9000';
74   i386_multiboot_ldflags   = '$(TARGET_IMG_LDFLAGS)';
75   i386_multiboot_ldflags   = '$(TARGET_IMG_BASE_LDOPT),0x9000';
76   i386_ieee1275_ldflags    = '$(TARGET_IMG_LDFLAGS)';
77   i386_ieee1275_ldflags    = '$(TARGET_IMG_BASE_LDOPT),0x10000';
78   i386_xen_ldflags         = '$(TARGET_IMG_LDFLAGS)';
79   i386_xen_ldflags         = '$(TARGET_IMG_BASE_LDOPT),0';
80   x86_64_xen_ldflags       = '$(TARGET_IMG_LDFLAGS)';
81   x86_64_xen_ldflags       = '$(TARGET_IMG_BASE_LDOPT),0';
82
83   mips_loongson_ldflags    = '-Wl,-Ttext,0x80200000';
84   powerpc_ieee1275_ldflags = '-Wl,-Ttext,0x200000';
85   sparc64_ieee1275_ldflags = '-Wl,-Ttext,0x4400';
86   mips_arc_ldflags    = '-Wl,-Ttext,$(TARGET_LINK_ADDR)';
87   mips_qemu_mips_ldflags    = '-Wl,-Ttext,0x80200000';
88
89   mips_arc_cppflags = '-DGRUB_DECOMPRESSOR_LINK_ADDR=$(TARGET_DECOMPRESSOR_LINK_ADDR)';
90   i386_qemu_cppflags     = '-DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)';
91   emu_cflags = '$(CFLAGS_GNULIB)';
92   emu_cppflags = '$(CPPFLAGS_GNULIB)';
93   arm_uboot_ldflags       = '-Wl,-r,-d';
94   arm_uboot_stripflags    = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
95   arm_coreboot_ldflags       = '-Wl,-r,-d';
96   arm_coreboot_stripflags    = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
97
98   i386_pc_startup = kern/i386/pc/startup.S;
99   i386_efi_startup = kern/i386/efi/startup.S;
100   x86_64_efi_startup = kern/x86_64/efi/startup.S;
101   i386_xen_startup = kern/i386/xen/startup.S;
102   x86_64_xen_startup = kern/x86_64/xen/startup.S;
103   i386_qemu_startup = kern/i386/qemu/startup.S;
104   i386_ieee1275_startup = kern/i386/ieee1275/startup.S;
105   i386_coreboot_startup = kern/i386/coreboot/startup.S;
106   i386_multiboot_startup = kern/i386/coreboot/startup.S;
107   mips_startup = kern/mips/startup.S;
108   sparc64_ieee1275_startup = kern/sparc64/ieee1275/crt0.S;
109   powerpc_ieee1275_startup = kern/powerpc/ieee1275/startup.S;
110   arm_uboot_startup = kern/arm/startup.S;
111   arm_coreboot_startup = kern/arm/startup.S;
112   arm_efi_startup = kern/arm/efi/startup.S;
113   arm64_efi_startup = kern/arm64/efi/startup.S;
114
115   common = kern/command.c;
116   common = kern/corecmd.c;
117   common = kern/device.c;
118   common = kern/disk.c;
119   common = kern/dl.c;
120   common = kern/env.c;
121   common = kern/err.c;
122   common = kern/file.c;
123   common = kern/fs.c;
124   common = kern/list.c;
125   common = kern/main.c;
126   common = kern/misc.c;
127   common = kern/parser.c;
128   common = kern/partition.c;
129   common = kern/rescue_parser.c;
130   common = kern/rescue_reader.c;
131   common = kern/term.c;
132
133   noemu = kern/compiler-rt.c;
134   noemu = kern/mm.c;
135   noemu = kern/time.c;
136   noemu = kern/generic/millisleep.c;
137
138   noemu_nodist = symlist.c;
139
140   mips = kern/generic/rtc_get_time_ms.c;
141
142   ieee1275 = disk/ieee1275/ofdisk.c;
143   ieee1275 = kern/ieee1275/cmain.c;
144   ieee1275 = kern/ieee1275/ieee1275.c;
145   ieee1275 = kern/ieee1275/mmap.c;
146   ieee1275 = kern/ieee1275/openfw.c;
147   ieee1275 = term/ieee1275/console.c;
148   ieee1275 = kern/ieee1275/init.c;
149
150   uboot = disk/uboot/ubootdisk.c;
151   uboot = kern/uboot/uboot.c;
152   uboot = kern/uboot/init.c;
153   uboot = kern/uboot/hw.c;
154   uboot = term/uboot/console.c;
155   arm_uboot = kern/arm/uboot/init.c;
156   arm_uboot = kern/arm/uboot/uboot.S;
157
158   arm_coreboot = kern/arm/coreboot/init.c;
159   arm_coreboot = kern/arm/coreboot/timer.c;
160   arm_coreboot = kern/arm/coreboot/coreboot.S;
161   arm_coreboot = lib/fdt.c;
162   arm_coreboot = bus/fdt.c;
163   arm_coreboot = term/ps2.c;
164   arm_coreboot = term/arm/pl050.c;
165   arm_coreboot = term/arm/cros.c;
166   arm_coreboot = term/arm/cros_ec.c;
167   arm_coreboot = bus/spi/rk3288_spi.c;
168   arm_coreboot = commands/keylayouts.c;
169   arm_coreboot = kern/arm/coreboot/dma.c;
170
171   terminfoinkernel = term/terminfo.c;
172   terminfoinkernel = term/tparm.c;
173   terminfoinkernel = commands/extcmd.c;
174   terminfoinkernel = lib/arg.c;
175
176   softdiv = lib/division.c;
177
178   i386 = kern/i386/dl.c;
179   i386_xen = kern/i386/dl.c;
180
181   i386_coreboot = kern/i386/coreboot/init.c;
182   i386_multiboot = kern/i386/coreboot/init.c;
183   i386_qemu = kern/i386/qemu/init.c;
184   i386_coreboot_multiboot_qemu = term/i386/pc/vga_text.c;
185   coreboot = video/coreboot/cbfb.c;
186
187   efi = disk/efi/efidisk.c;
188   efi = kern/efi/efi.c;
189   efi = kern/efi/init.c;
190   efi = kern/efi/mm.c;
191   efi = term/efi/console.c;
192   efi = kern/acpi.c;
193   efi = kern/efi/acpi.c;
194   i386_coreboot = kern/i386/pc/acpi.c;
195   i386_multiboot = kern/i386/pc/acpi.c;
196   i386_coreboot = kern/acpi.c;
197   i386_multiboot = kern/acpi.c;
198
199   x86 = kern/i386/tsc.c;
200   x86 = kern/i386/tsc_pit.c;
201   i386_efi = kern/i386/efi/tsc.c;
202   x86_64_efi = kern/i386/efi/tsc.c;
203   i386_efi = kern/i386/tsc_pmtimer.c;
204   i386_coreboot = kern/i386/tsc_pmtimer.c;
205   x86_64_efi = kern/i386/tsc_pmtimer.c;
206
207   i386_efi = kern/i386/efi/init.c;
208   i386_efi = bus/pci.c;
209
210   x86_64 = kern/x86_64/dl.c;
211   x86_64_xen = kern/x86_64/dl.c;
212   x86_64_efi = kern/x86_64/efi/callwrap.S;
213   x86_64_efi = kern/i386/efi/init.c;
214   x86_64_efi = bus/pci.c;
215
216   xen = kern/i386/tsc.c;
217   xen = kern/i386/xen/tsc.c;
218   x86_64_xen = kern/x86_64/xen/hypercall.S;
219   i386_xen = kern/i386/xen/hypercall.S;
220   xen = kern/xen/init.c;
221   xen = term/xen/console.c;
222   xen = disk/xen/xendisk.c;
223   xen = commands/boot.c;
224
225   ia64_efi = kern/ia64/efi/startup.S;
226   ia64_efi = kern/ia64/efi/init.c;
227   ia64_efi = kern/ia64/dl.c;
228   ia64_efi = kern/ia64/dl_helper.c;
229   ia64_efi = kern/ia64/cache.c;
230
231   arm_efi = kern/arm/efi/init.c;
232   arm_efi = kern/arm/efi/misc.c;
233   arm_efi = kern/efi/fdt.c;
234
235   arm64_efi = kern/arm64/efi/init.c;
236   arm64_efi = kern/efi/fdt.c;
237
238   i386_pc = kern/i386/pc/init.c;
239   i386_pc = kern/i386/pc/mmap.c;
240   i386_pc = term/i386/pc/console.c;
241
242   i386_qemu = bus/pci.c;
243   i386_qemu = kern/vga_init.c;
244   i386_qemu = kern/i386/qemu/mmap.c;
245
246   coreboot = kern/coreboot/mmap.c;
247   i386_coreboot = kern/i386/coreboot/cbtable.c;
248   coreboot = kern/coreboot/cbtable.c;
249   arm_coreboot = kern/arm/coreboot/cbtable.c;
250
251   i386_multiboot = kern/i386/multiboot_mmap.c;
252
253   mips = kern/mips/cache.S;
254   mips = kern/mips/dl.c;
255   mips = kern/mips/init.c;
256
257   mips_qemu_mips = kern/mips/qemu_mips/init.c;
258   mips_qemu_mips = term/ns8250.c;
259   mips_qemu_mips = term/serial.c;
260   mips_qemu_mips = term/at_keyboard.c;
261   mips_qemu_mips = term/ps2.c;
262   mips_qemu_mips = commands/boot.c;
263   mips_qemu_mips = commands/keylayouts.c;
264   mips_qemu_mips = term/i386/pc/vga_text.c;
265   mips_qemu_mips = kern/vga_init.c;
266
267   mips_arc = kern/mips/arc/init.c;
268   mips_arc = term/arc/console.c;
269   mips_arc = disk/arc/arcdisk.c;
270
271   mips_loongson = term/ns8250.c;
272   mips_loongson = bus/bonito.c;
273   mips_loongson = bus/cs5536.c;
274   mips_loongson = bus/pci.c;
275   mips_loongson = kern/mips/loongson/init.c;
276   mips_loongson = term/at_keyboard.c;
277   mips_loongson = term/ps2.c;
278   mips_loongson = commands/boot.c;
279   mips_loongson = term/serial.c;
280   mips_loongson = video/sm712.c;
281   mips_loongson = video/sis315pro.c;
282   mips_loongson = video/radeon_fuloong2e.c;
283   mips_loongson = video/radeon_yeeloong3a.c;
284   extra_dist = video/sm712_init.c;
285   extra_dist = video/sis315_init.c;
286   mips_loongson = commands/keylayouts.c;
287
288   powerpc_ieee1275 = kern/powerpc/cache.S;
289   powerpc_ieee1275 = kern/powerpc/dl.c;
290   powerpc_ieee1275 = kern/powerpc/compiler-rt.S;
291
292   sparc64_ieee1275 = kern/sparc64/cache.S;
293   sparc64_ieee1275 = kern/sparc64/dl.c;
294   sparc64_ieee1275 = kern/sparc64/ieee1275/ieee1275.c;
295
296   arm = kern/arm/dl.c;
297   arm = kern/arm/dl_helper.c;
298   arm = kern/arm/cache_armv6.S;
299   arm = kern/arm/cache_armv7.S;
300   extra_dist = kern/arm/cache.S;
301   arm = kern/arm/cache.c;
302   arm = kern/arm/compiler-rt.S;
303
304   arm64 = kern/arm64/cache.c;
305   arm64 = kern/arm64/cache_flush.S;
306   arm64 = kern/arm64/dl.c;
307   arm64 = kern/arm64/dl_helper.c;
308
309   emu = disk/host.c;
310   emu = kern/emu/cache_s.S;
311   emu = kern/emu/hostdisk.c;
312   emu = osdep/unix/hostdisk.c;
313   emu = osdep/exec.c;
314   extra_dist = osdep/unix/exec.c;
315   emu = osdep/devmapper/hostdisk.c;
316   emu = osdep/hostdisk.c;
317   emu = kern/emu/hostfs.c;
318   emu = kern/emu/main.c;
319   emu = kern/emu/argp_common.c;
320   emu = kern/emu/misc.c;
321   emu = kern/emu/mm.c;
322   emu = kern/emu/time.c;
323   emu = kern/emu/cache.c;
324   emu = osdep/emuconsole.c;
325   extra_dist = osdep/unix/emuconsole.c;
326   extra_dist = osdep/windows/emuconsole.c;
327   emu = osdep/dl.c;
328   extra_dist = osdep/unix/dl.c;
329   extra_dist = osdep/windows/dl.c;
330   emu = osdep/sleep.c;
331   emu = osdep/init.c;
332   emu = osdep/emunet.c;
333   extra_dist = osdep/linux/emunet.c;
334   extra_dist = osdep/basic/emunet.c;
335   emu = osdep/cputime.c;
336   extra_dist = osdep/unix/cputime.c;
337   extra_dist = osdep/windows/cputime.c;
338
339   videoinkernel = term/gfxterm.c;
340   videoinkernel = font/font.c;
341   videoinkernel = font/font_cmd.c;
342   videoinkernel = io/bufio.c;
343   videoinkernel = video/fb/fbblit.c;
344   videoinkernel = video/fb/fbfill.c;
345   videoinkernel = video/fb/fbutil.c;
346   videoinkernel = video/fb/video_fb.c;
347   videoinkernel = video/video.c;
348
349   extra_dist = kern/i386/int.S;
350   extra_dist = kern/i386/realmode.S;
351   extra_dist = boot/i386/pc/lzma_decode.S;
352   extra_dist = kern/mips/cache_flush.S;
353 };
354
355 program = {
356   name = grub-emu;
357   mansection = 1;
358
359   emu = kern/emu/full.c;
360   emu_nodist = grub_emu_init.c;
361
362   ldadd = 'kernel.exec$(EXEEXT)';
363   ldadd = '$(MODULE_FILES)';
364   ldadd = 'gnulib/libgnu.a $(LIBINTL) $(LIBUTIL) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
365
366   enable = emu;
367 };
368
369 program = {
370   name = grub-emu-lite;
371
372   emu = kern/emu/lite.c;
373   emu_nodist = symlist.c;
374
375   ldadd = 'kernel.exec$(EXEEXT)';
376   ldadd = 'gnulib/libgnu.a $(LIBINTL) $(LIBUTIL) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
377
378   enable = emu;
379 };
380
381 image = {
382   name = boot;
383   i386_pc = boot/i386/pc/boot.S;
384   i386_qemu = boot/i386/qemu/boot.S;
385   sparc64_ieee1275 = boot/sparc64/ieee1275/boot.S;
386
387   i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
388   i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x7C00';
389
390   i386_qemu_ldflags = '$(TARGET_IMG_LDFLAGS)';
391   i386_qemu_ldflags = '$(TARGET_IMG_BASE_LDOPT),$(GRUB_BOOT_MACHINE_LINK_ADDR)';
392   i386_qemu_ccasflags = '-DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)';
393
394   sparc64_ieee1275_objcopyflags = '-O a.out-sunos-big';
395   sparc64_ieee1275_ldflags = ' -Wl,-Ttext=0x4000';
396
397   objcopyflags = '-O binary';
398   enable = i386_pc;
399   enable = i386_qemu;
400   enable = sparc64_ieee1275;
401 };
402
403 image = {
404   name = boot_hybrid;
405   i386_pc = boot/i386/pc/boot.S;
406
407   cppflags = '-DHYBRID_BOOT=1';
408   
409   i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
410   i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x7C00';
411
412   objcopyflags = '-O binary';
413   enable = i386_pc;
414 };
415
416 image = {
417   name = cdboot;
418
419   i386_pc = boot/i386/pc/cdboot.S;
420   i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
421   i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x7C00';
422
423   sparc64_ieee1275 = boot/sparc64/ieee1275/boot.S;
424   sparc64_ieee1275_objcopyflags = '-O a.out-sunos-big';
425   sparc64_ieee1275_ldflags = ' -Wl,-Ttext=0x4000';
426   sparc64_ieee1275_cppflags = '-DCDBOOT=1';
427
428   objcopyflags = '-O binary';
429
430   enable = sparc64_ieee1275;
431   enable = i386_pc;
432 };
433
434 image = {
435   name = pxeboot;
436   i386_pc = boot/i386/pc/pxeboot.S;
437
438   i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
439   i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x7C00';
440
441   objcopyflags = '-O binary';
442   enable = i386_pc;
443 };
444
445 image = {
446   name = diskboot;
447   i386_pc = boot/i386/pc/diskboot.S;
448
449   i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
450   i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8000';
451
452   sparc64_ieee1275 = boot/sparc64/ieee1275/diskboot.S;
453   sparc64_ieee1275_ldflags = '-Wl,-Ttext=0x4200';
454
455   objcopyflags = '-O binary';
456
457   enable = i386_pc;
458   enable = sparc64_ieee1275;
459 };
460
461 image = {
462   name = lnxboot;
463   i386_pc = boot/i386/pc/lnxboot.S;
464
465   i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
466   i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x6000';
467
468   objcopyflags = '-O binary';
469   enable = i386_pc;
470 };
471
472 image = {
473   name = xz_decompress;
474   mips = boot/mips/startup_raw.S;
475   common = boot/decompressor/minilib.c;
476   common = boot/decompressor/xz.c;
477   common = lib/xzembed/xz_dec_bcj.c;
478   common = lib/xzembed/xz_dec_lzma2.c;
479   common = lib/xzembed/xz_dec_stream.c;
480   common = kern/compiler-rt.c;
481
482   cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed -DGRUB_EMBED_DECOMPRESSOR=1';
483
484   objcopyflags = '-O binary';
485   mips_ldflags = '-Wl,-Ttext,$(TARGET_DECOMPRESSOR_LINK_ADDR)';
486   cflags = '-Wno-unreachable-code';
487   enable = mips;
488 };
489
490 image = {
491   name = none_decompress;
492   mips = boot/mips/startup_raw.S;
493   common = boot/decompressor/none.c;
494
495   cppflags = '-DGRUB_EMBED_DECOMPRESSOR=1';
496
497   objcopyflags = '-O binary';
498   mips_ldflags = '-Wl,-Ttext,$(TARGET_DECOMPRESSOR_LINK_ADDR)';
499   enable = mips;
500 };
501
502 image = {
503   name = lzma_decompress;
504   i386_pc = boot/i386/pc/startup_raw.S;
505   i386_pc_nodist = rs_decoder.h;
506
507   objcopyflags = '-O binary';
508   ldflags = '$(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT),0x8200';
509   enable = i386_pc;
510 };
511
512 image = {
513   name = fwstart;
514   mips_loongson = boot/mips/loongson/fwstart.S;
515   objcopyflags = '-O binary';
516   ldflags = '-Wl,-N,-S,-Ttext,0xbfc00000,-Bstatic';
517   enable = mips_loongson;
518 };
519
520 image = {
521   name = fwstart_fuloong2f;
522   mips_loongson = boot/mips/loongson/fuloong2f.S;
523   objcopyflags = '-O binary';
524   ldflags = '-Wl,-N,-S,-Ttext,0xbfc00000,-Bstatic';
525   enable = mips_loongson;
526 };
527
528 module = {
529   name = disk;
530   common = lib/disk.c;
531   extra_dist = kern/disk_common.c;
532 };
533
534 module = {
535   name = trig;
536   common_nodist = trigtables.c;
537   extra_dist = gentrigtables.c;
538 };
539
540 module = {
541   name = cs5536;
542   x86 = bus/cs5536.c;
543   enable = x86;
544 };
545
546 module = {
547   name = lsspd;
548   mips_loongson = commands/mips/loongson/lsspd.c;
549   enable = mips_loongson;
550 };
551
552 module = {
553   name = usb;
554   common = bus/usb/usb.c;
555   common = bus/usb/usbtrans.c;
556   common = bus/usb/usbhub.c;
557   enable = usb;
558 };
559
560 module = {
561   name = usbserial_common;
562   common = bus/usb/serial/common.c;
563   enable = usb;
564 };
565
566 module = {
567   name = usbserial_pl2303;
568   common = bus/usb/serial/pl2303.c;
569   enable = usb;
570 };
571
572 module = {
573   name = usbserial_ftdi;
574   common = bus/usb/serial/ftdi.c;
575   enable = usb;
576 };
577
578 module = {
579   name = usbserial_usbdebug;
580   common = bus/usb/serial/usbdebug_late.c;
581   enable = usb;
582 };
583
584 module = {
585   name = uhci;
586   common = bus/usb/uhci.c;
587   enable = pci;
588 };
589
590 module = {
591   name = ohci;
592   common = bus/usb/ohci.c;
593   enable = pci;
594 };
595
596 module = {
597   name = ehci;
598   common = bus/usb/ehci.c;
599   arm_coreboot = bus/usb/ehci-fdt.c;
600   pci = bus/usb/ehci-pci.c;
601   enable = pci;
602   enable = arm_coreboot;
603 };
604
605 module = {
606   name = pci;
607   common = bus/pci.c;
608   i386_ieee1275 = bus/i386/ieee1275/pci.c;
609
610   enable = i386_pc;
611   enable = i386_ieee1275;
612   enable = i386_coreboot;
613   enable = i386_multiboot;
614 };
615
616 module = {
617   name = nativedisk;
618   common = commands/nativedisk.c;
619
620   enable = x86;
621   enable = mips_loongson;
622   enable = mips_qemu_mips;
623 };
624
625 module = {
626   name = emupci;
627   common = bus/emu/pci.c;
628   common = commands/lspci.c;
629
630   enable = emu;
631   condition = COND_GRUB_EMU_PCI;
632 };
633
634 module = {
635   name = lsdev;
636   common = commands/arc/lsdev.c;
637
638   enable = mips_arc;
639 };
640
641 module = {
642   name = lsxen;
643   common = commands/xen/lsxen.c;
644
645   enable = xen;
646 };
647
648 module = {
649   name = cmostest;
650   common = commands/i386/cmostest.c;
651   enable = cmos;
652 };
653
654 module = {
655   name = cmosdump;
656   common = commands/i386/cmosdump.c;
657   enable = cmos;
658 };
659
660 module = {
661   name = iorw;
662   common = commands/iorw.c;
663   enable = x86;
664 };
665
666 module = {
667   name = cbtable;
668   common = kern/i386/coreboot/cbtable.c;
669   common = kern/coreboot/cbtable.c;
670   enable = i386_pc;
671   enable = i386_efi;
672   enable = i386_qemu;
673   enable = i386_multiboot;
674   enable = i386_ieee1275;
675   enable = x86_64_efi;
676 };
677
678 module = {
679   name = cbtime;
680   common = commands/i386/coreboot/cb_timestamps.c;
681   enable = x86;
682 };
683
684 module = {
685   name = cbls;
686   common = commands/i386/coreboot/cbls.c;
687   enable = x86;
688 };
689
690 module = {
691   name = cbmemc;
692   common = term/i386/coreboot/cbmemc.c;
693   enable = x86;
694 };
695
696 module = {
697   name = regexp;
698   common = commands/regexp.c;
699   common = commands/wildcard.c;
700   common = gnulib/regex.c;
701   cflags = '$(CFLAGS_POSIX) $(CFLAGS_GNULIB)';
702   cppflags = '$(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)';
703 };
704
705 module = {
706   name = acpi;
707
708   common = commands/acpi.c;
709   i386_pc = kern/acpi.c;
710   i386_pc = kern/i386/pc/acpi.c;
711
712   enable = efi;
713   enable = i386_pc;
714   enable = i386_coreboot;
715   enable = i386_multiboot;
716 };
717
718 module = {
719   name = lsacpi;
720
721   common = commands/lsacpi.c;
722
723   enable = efi;
724   enable = i386_pc;
725   enable = i386_coreboot;
726   enable = i386_multiboot;
727 };
728
729 module = {
730   name = lsefisystab;
731
732   common = commands/efi/lsefisystab.c;
733
734   enable = efi;
735 };
736
737 module = {
738   name = lssal;
739
740   common = commands/efi/lssal.c;
741
742   enable = efi;
743 };
744
745 module = {
746   name = lsefimmap;
747
748   common = commands/efi/lsefimmap.c;
749
750   enable = efi;
751 };
752
753 module = {
754   name = lsefi;
755   common = commands/efi/lsefi.c;
756   enable = efi;
757 };
758
759 module = {
760   name = efifwsetup;
761   efi = commands/efi/efifwsetup.c;
762   enable = efi;
763 };
764
765 module = {
766   name = blocklist;
767   common = commands/blocklist.c;
768 };
769
770 module = {
771   name = boot;
772   common = commands/boot.c;
773   i386_pc = lib/i386/pc/biosnum.c;
774   enable = x86;
775   enable = emu;
776   enable = sparc64_ieee1275;
777   enable = powerpc_ieee1275;
778   enable = mips_arc;
779   enable = ia64_efi;
780   enable = arm_efi;
781   enable = arm64_efi;
782   enable = arm_uboot;
783   enable = arm_coreboot;
784 };
785
786 module = {
787   name = cat;
788   common = commands/cat.c;
789 };
790
791 module = {
792   name = cmp;
793   common = commands/cmp.c;
794 };
795
796 module = {
797   name = configfile;
798   common = commands/configfile.c;
799 };
800
801 module = {
802   name = cpuid;
803   common = commands/i386/cpuid.c;
804   enable = x86;
805   enable = i386_xen;
806   enable = x86_64_xen;
807 };
808
809 module = {
810   name = date;
811   common = commands/date.c;
812 };
813
814 module = {
815   name = drivemap;
816
817   i386_pc = commands/i386/pc/drivemap.c;
818   i386_pc = commands/i386/pc/drivemap_int13h.S;
819   enable = i386_pc;
820 };
821
822 module = {
823   name = echo;
824   common = commands/echo.c;
825 };
826
827 module = {
828   name = eval;
829   common = commands/eval.c;
830 };
831
832 module = {
833   name = extcmd;
834   common = commands/extcmd.c;
835   common = lib/arg.c;
836   enable = terminfomodule;
837 };
838
839 module = {
840   name = fixvideo;
841   common = commands/efi/fixvideo.c;
842   enable = i386_efi;
843   enable = x86_64_efi;
844 };
845
846 module = {
847   name = gptsync;
848   common = commands/gptsync.c;
849 };
850
851 module = {
852   name = halt;
853   nopc = commands/halt.c;
854   i386_pc = commands/i386/pc/halt.c;
855   i386_pc = commands/acpihalt.c;
856   i386_coreboot = commands/acpihalt.c;
857   i386_multiboot = commands/acpihalt.c;
858   i386_efi = commands/acpihalt.c;
859   x86_64_efi = commands/acpihalt.c;
860   i386_multiboot = lib/i386/halt.c;
861   i386_coreboot = lib/i386/halt.c;
862   i386_qemu = lib/i386/halt.c;
863   xen = lib/xen/halt.c;
864   efi = lib/efi/halt.c;
865   ieee1275 = lib/ieee1275/halt.c;
866   emu = lib/emu/halt.c;
867   uboot = lib/dummy/halt.c;
868   arm_coreboot = lib/dummy/halt.c;
869 };
870
871 module = {
872   name = reboot;
873   i386 = lib/i386/reboot.c;
874   i386 = lib/i386/reboot_trampoline.S;
875   ia64_efi = lib/efi/reboot.c;
876   x86_64_efi = lib/efi/reboot.c;
877   arm_efi = lib/efi/reboot.c;
878   arm64_efi = lib/efi/reboot.c;
879   powerpc_ieee1275 = lib/ieee1275/reboot.c;
880   sparc64_ieee1275 = lib/ieee1275/reboot.c;
881   mips_arc = lib/mips/arc/reboot.c;
882   mips_loongson = lib/mips/loongson/reboot.c;
883   mips_qemu_mips = lib/mips/qemu_mips/reboot.c;
884   xen = lib/xen/reboot.c;
885   uboot = lib/uboot/reboot.c;
886   arm_coreboot = lib/dummy/reboot.c;
887   common = commands/reboot.c;
888 };
889
890 module = {
891   name = hashsum;
892   common = commands/hashsum.c;
893 };
894
895 module = {
896   name = verify;
897   common = commands/verify.c;
898   cflags = '$(CFLAGS_POSIX)';
899   cppflags = '-I$(srcdir)/lib/posix_wrap';
900 };
901
902 module = {
903   name = hdparm;
904   common = commands/hdparm.c;
905   enable = pci;
906   enable = mips_qemu_mips;
907 };
908
909 module = {
910   name = help;
911   common = commands/help.c;
912 };
913
914 module = {
915   name = hexdump;
916   common = commands/hexdump.c;
917   common = lib/hexdump.c;
918 };
919
920 module = {
921   name = keystatus;
922   common = commands/keystatus.c;
923 };
924
925 module = {
926   name = loadbios;
927   common = commands/efi/loadbios.c;
928   enable = i386_efi;
929   enable = x86_64_efi;
930 };
931
932 module = {
933   name = loadenv;
934   common = commands/loadenv.c;
935   common = lib/envblk.c;
936 };
937
938 module = {
939   name = ls;
940   common = commands/ls.c;
941 };
942
943 module = {
944   name = lsmmap;
945   common = commands/lsmmap.c;
946 };
947
948 module = {
949   name = lspci;
950   common = commands/lspci.c;
951
952   enable = pci;
953 };
954
955 module = {
956   name = memrw;
957   common = commands/memrw.c;
958 };
959
960 module = {
961   name = minicmd;
962   common = commands/minicmd.c;
963 };
964
965 module = {
966   name = parttool;
967   common = commands/parttool.c;
968 };
969
970 module = {
971   name = password;
972   common = commands/password.c;
973 };
974
975 module = {
976   name = password_pbkdf2;
977   common = commands/password_pbkdf2.c;
978 };
979
980 module = {
981   name = play;
982   x86 = commands/i386/pc/play.c;
983   enable = x86;
984 };
985
986 module = {
987   name = spkmodem;
988   x86 = term/spkmodem.c;
989   enable = x86;
990 };
991
992 module = {
993   name = morse;
994   x86 = term/morse.c;
995   enable = x86;
996 };
997
998 module = {
999   name = probe;
1000   common = commands/probe.c;
1001 };
1002
1003 module = {
1004   name = read;
1005   common = commands/read.c;
1006 };
1007
1008 module = {
1009   name = search;
1010   common = commands/search_wrap.c;
1011   extra_dist = commands/search.c;
1012 };
1013
1014 module = {
1015   name = search_fs_file;
1016   common = commands/search_file.c;
1017 };
1018
1019 module = {
1020   name = search_fs_uuid;
1021   common = commands/search_uuid.c;
1022 };
1023
1024 module = {
1025   name = search_label;
1026   common = commands/search_label.c;
1027 };
1028
1029 module = {
1030   name = setpci;
1031   common = commands/setpci.c;
1032   enable = pci;
1033 };
1034
1035 module = {
1036   name = pcidump;
1037   common = commands/pcidump.c;
1038   enable = pci;
1039 };
1040
1041 module = {
1042   name = sleep;
1043   common = commands/sleep.c;
1044 };
1045
1046 module = {
1047   name = suspend;
1048   ieee1275 = commands/ieee1275/suspend.c;
1049   enable = i386_ieee1275;
1050   enable = powerpc_ieee1275;
1051 };
1052
1053 module = {
1054   name = escc;
1055   ieee1275 = term/ieee1275/escc.c;
1056   enable = powerpc_ieee1275;
1057 };
1058
1059 module = {
1060   name = terminal;
1061   common = commands/terminal.c;
1062 };
1063
1064 module = {
1065   name = test;
1066   common = commands/test.c;
1067 };
1068
1069 module = {
1070   name = true;
1071   common = commands/true.c;
1072 };
1073
1074 module = {
1075   name = usbtest;
1076   common = commands/usbtest.c;
1077   enable = usb;
1078 };
1079
1080 module = {
1081   name = videoinfo;
1082   common = commands/videoinfo.c;
1083 };
1084
1085 module = {
1086   name = videotest;
1087   common = commands/videotest.c;
1088 };
1089
1090 module = {
1091   name = xnu_uuid;
1092   common = commands/xnu_uuid.c;
1093 };
1094
1095 module = {
1096   name = dm_nv;
1097   common = disk/dmraid_nvidia.c;
1098 };
1099
1100 module = {
1101   name = loopback;
1102   common = disk/loopback.c;
1103 };
1104
1105 module = {
1106   name = cryptodisk;
1107   common = disk/cryptodisk.c;
1108 };
1109
1110 module = {
1111   name = luks;
1112   common = disk/luks.c;
1113   common = disk/AFSplitter.c;
1114 };
1115
1116 module = {
1117   name = geli;
1118   common = disk/geli.c;
1119 };
1120
1121 module = {
1122   name = lvm;
1123   common = disk/lvm.c;
1124 };
1125
1126 module = {
1127   name = ldm;
1128   common = disk/ldm.c;
1129 };
1130
1131 module = {
1132   name = mdraid09;
1133   common = disk/mdraid_linux.c;
1134 };
1135
1136 module = {
1137   name = mdraid09_be;
1138   common = disk/mdraid_linux_be.c;
1139 };
1140
1141 module = {
1142   name = mdraid1x;
1143   common = disk/mdraid1x_linux.c;
1144 };
1145
1146 module = {
1147   name = diskfilter;
1148   common = disk/diskfilter.c;
1149 };
1150
1151 module = {
1152   name = raid5rec;
1153   common = disk/raid5_recover.c;
1154 };
1155
1156 module = {
1157   name = raid6rec;
1158   common = disk/raid6_recover.c;
1159 };
1160
1161 module = {
1162   name = scsi;
1163   common = disk/scsi.c;
1164 };
1165
1166 module = {
1167   name = memdisk;
1168   common = disk/memdisk.c;
1169 };
1170
1171 module = {
1172   name = ata;
1173   common = disk/ata.c;
1174   enable = pci;
1175   enable = mips_qemu_mips;
1176 };
1177
1178 module = {
1179   name = ahci;
1180   common = disk/ahci.c;
1181   enable = pci;
1182 };
1183
1184 module = {
1185   name = pata;
1186   common = disk/pata.c;
1187   enable = pci;
1188   enable = mips_qemu_mips;
1189 };
1190
1191 module = {
1192   name = biosdisk;
1193   i386_pc = disk/i386/pc/biosdisk.c;
1194   enable = i386_pc;
1195 };
1196
1197 module = {
1198   name = usbms;
1199   common = disk/usbms.c;
1200   enable = usb;
1201 };
1202
1203 module = {
1204   name = nand;
1205   ieee1275 = disk/ieee1275/nand.c;
1206   enable = i386_ieee1275;
1207 };
1208
1209 module = {
1210   name = efiemu;
1211   common = efiemu/main.c;
1212   common = efiemu/i386/loadcore32.c;
1213   common = efiemu/i386/loadcore64.c;
1214   i386_pc = efiemu/i386/pc/cfgtables.c;
1215   i386_coreboot = efiemu/i386/pc/cfgtables.c;
1216   i386_multiboot = efiemu/i386/pc/cfgtables.c;
1217   i386_ieee1275 = efiemu/i386/nocfgtables.c;
1218   i386_qemu = efiemu/i386/nocfgtables.c;
1219   common = efiemu/mm.c;
1220   common = efiemu/loadcore_common.c;
1221   common = efiemu/symbols.c;
1222   common = efiemu/loadcore32.c;
1223   common = efiemu/loadcore64.c;
1224   common = efiemu/prepare32.c;
1225   common = efiemu/prepare64.c;
1226   common = efiemu/pnvram.c;
1227   common = efiemu/i386/coredetect.c;
1228
1229   extra_dist = efiemu/prepare.c;
1230   extra_dist = efiemu/loadcore.c;
1231   extra_dist = efiemu/runtime/efiemu.S;
1232   extra_dist = efiemu/runtime/efiemu.c;
1233
1234   enable = i386_pc;
1235   enable = i386_coreboot;
1236   enable = i386_ieee1275;
1237   enable = i386_multiboot;
1238   enable = i386_qemu;
1239 };
1240
1241 module = {
1242   name = font;
1243   common = font/font.c;
1244   common = font/font_cmd.c;
1245   enable = videomodules;
1246 };
1247
1248 module = {
1249   name = procfs;
1250   common = fs/proc.c;
1251 };
1252
1253 module = {
1254   name = affs;
1255   common = fs/affs.c;
1256 };
1257
1258 module = {
1259   name = afs;
1260   common = fs/afs.c;
1261 };
1262
1263 module = {
1264   name = bfs;
1265   common = fs/bfs.c;
1266 };
1267
1268 module = {
1269   name = btrfs;
1270   common = fs/btrfs.c;
1271   common = lib/crc.c;
1272   cflags = '$(CFLAGS_POSIX) -Wno-undef';
1273   cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/minilzo -DMINILZO_HAVE_CONFIG_H';
1274 };
1275
1276 module = {
1277   name = archelp;
1278   common = fs/archelp.c;
1279 };
1280
1281 module = {
1282   name = cbfs;
1283   common = fs/cbfs.c;
1284 };
1285
1286 module = {
1287   name = cpio;
1288   common = fs/cpio.c;
1289 };
1290
1291 module = {
1292   name = cpio_be;
1293   common = fs/cpio_be.c;
1294 };
1295
1296 module = {
1297   name = newc;
1298   common = fs/newc.c;
1299 };
1300
1301 module = {
1302   name = odc;
1303   common = fs/odc.c;
1304 };
1305
1306 module = {
1307   name = ext2;
1308   common = fs/ext2.c;
1309 };
1310
1311 module = {
1312   name = fat;
1313   common = fs/fat.c;
1314 };
1315
1316 module = {
1317   name = exfat;
1318   common = fs/exfat.c;
1319 };
1320
1321 module = {
1322   name = fshelp;
1323   common = fs/fshelp.c;
1324 };
1325
1326 module = {
1327   name = hfs;
1328   common = fs/hfs.c;
1329 };
1330
1331 module = {
1332   name = hfsplus;
1333   common = fs/hfsplus.c;
1334 };
1335
1336 module = {
1337   name = hfspluscomp;
1338   common = fs/hfspluscomp.c;
1339 };
1340
1341 module = {
1342   name = iso9660;
1343   common = fs/iso9660.c;
1344 };
1345
1346 module = {
1347   name = jfs;
1348   common = fs/jfs.c;
1349 };
1350
1351 module = {
1352   name = minix;
1353   common = fs/minix.c;
1354 };
1355
1356 module = {
1357   name = minix2;
1358   common = fs/minix2.c;
1359 };
1360
1361 module = {
1362   name = minix3;
1363   common = fs/minix3.c;
1364 };
1365
1366 module = {
1367   name = minix_be;
1368   common = fs/minix_be.c;
1369 };
1370
1371 module = {
1372   name = minix2_be;
1373   common = fs/minix2_be.c;
1374 };
1375
1376 module = {
1377   name = minix3_be;
1378   common = fs/minix3_be.c;
1379 };
1380
1381 module = {
1382   name = nilfs2;
1383   common = fs/nilfs2.c;
1384 };
1385
1386 module = {
1387   name = ntfs;
1388   common = fs/ntfs.c;
1389 };
1390
1391 module = {
1392   name = ntfscomp;
1393   common = fs/ntfscomp.c;
1394 };
1395
1396 module = {
1397   name = reiserfs;
1398   common = fs/reiserfs.c;
1399 };
1400
1401 module = {
1402   name = romfs;
1403   common = fs/romfs.c;
1404 };
1405
1406 module = {
1407   name = sfs;
1408   common = fs/sfs.c;
1409 };
1410
1411 module = {
1412   name = squash4;
1413   common = fs/squash4.c;
1414   cflags = '$(CFLAGS_POSIX) -Wno-undef';
1415   cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed -I$(srcdir)/lib/minilzo -DMINILZO_HAVE_CONFIG_H';
1416 };
1417
1418 module = {
1419   name = tar;
1420   common = fs/tar.c;
1421 };
1422
1423 module = {
1424   name = udf;
1425   common = fs/udf.c;
1426 };
1427
1428 module = {
1429   name = ufs1;
1430   common = fs/ufs.c;
1431 };
1432
1433 module = {
1434   name = ufs1_be;
1435   common = fs/ufs_be.c;
1436 };
1437
1438 module = {
1439   name = ufs2;
1440   common = fs/ufs2.c;
1441 };
1442
1443 module = {
1444   name = xfs;
1445   common = fs/xfs.c;
1446 };
1447
1448 module = {
1449   name = zfs;
1450   common = fs/zfs/zfs.c;
1451   common = fs/zfs/zfs_lzjb.c;
1452   common = fs/zfs/zfs_lz4.c;
1453   common = fs/zfs/zfs_sha256.c;
1454   common = fs/zfs/zfs_fletcher.c;
1455 };
1456
1457 module = {
1458   name = zfscrypt;
1459   common = fs/zfs/zfscrypt.c;
1460 };
1461
1462 module = {
1463   name = zfsinfo;
1464   common = fs/zfs/zfsinfo.c;
1465 };
1466
1467 module = {
1468   name = macbless;
1469   common = commands/macbless.c;
1470 };
1471
1472 module = {
1473   name = pxe;
1474   i386_pc = net/drivers/i386/pc/pxe.c;
1475   enable = i386_pc;
1476 };
1477
1478 module = {
1479   name = gettext;
1480   common = gettext/gettext.c;
1481 };
1482
1483 module = {
1484   name = gfxmenu;
1485   common = gfxmenu/gfxmenu.c;
1486   common = gfxmenu/view.c;
1487   common = gfxmenu/font.c;
1488   common = gfxmenu/icon_manager.c;
1489   common = gfxmenu/theme_loader.c;
1490   common = gfxmenu/widget-box.c;
1491   common = gfxmenu/gui_canvas.c;
1492   common = gfxmenu/gui_circular_progress.c;
1493   common = gfxmenu/gui_box.c;
1494   common = gfxmenu/gui_label.c;
1495   common = gfxmenu/gui_list.c;
1496   common = gfxmenu/gui_image.c;
1497   common = gfxmenu/gui_progress_bar.c;
1498   common = gfxmenu/gui_util.c;
1499   common = gfxmenu/gui_string_util.c;
1500 };
1501
1502 module = {
1503   name = hello;
1504   common = hello/hello.c;
1505 };
1506
1507 module = {
1508   name = gzio;
1509   common = io/gzio.c;
1510 };
1511
1512 module = {
1513   name = offsetio;
1514   common = io/offset.c;
1515 };
1516
1517 module = {
1518   name = bufio;
1519   common = io/bufio.c;
1520   enable = videomodules;
1521 };
1522
1523 module = {
1524   name = elf;
1525   common = kern/elf.c;
1526
1527   extra_dist = kern/elfXX.c;
1528 };
1529
1530 module = {
1531   name = crypto;
1532   common = lib/crypto.c;
1533
1534   extra_dist = lib/libgcrypt-grub/cipher/crypto.lst;
1535 };
1536
1537 module = {
1538   name = pbkdf2;
1539   common = lib/pbkdf2.c;
1540 };
1541
1542 module = {
1543   name = relocator;
1544   common = lib/relocator.c;
1545   x86 = lib/i386/relocator16.S;
1546   x86 = lib/i386/relocator32.S;
1547   x86 = lib/i386/relocator64.S;
1548   i386 = lib/i386/relocator_asm.S;
1549   x86_64 = lib/x86_64/relocator_asm.S;
1550   i386_xen = lib/i386/relocator_asm.S;
1551   x86_64_xen = lib/x86_64/relocator_asm.S;
1552   x86 = lib/i386/relocator.c;
1553   x86 = lib/i386/relocator_common_c.c;
1554   ieee1275 = lib/ieee1275/relocator.c;
1555   efi = lib/efi/relocator.c;
1556   mips = lib/mips/relocator_asm.S;
1557   mips = lib/mips/relocator.c;
1558   powerpc = lib/powerpc/relocator_asm.S;
1559   powerpc = lib/powerpc/relocator.c;
1560   xen = lib/xen/relocator.c;
1561   i386_xen = lib/i386/xen/relocator.S;
1562   x86_64_xen = lib/x86_64/xen/relocator.S;
1563   xen = lib/i386/relocator_common_c.c;
1564   x86_64_efi = lib/x86_64/efi/relocator.c;
1565
1566   extra_dist = lib/i386/relocator_common.S;
1567   extra_dist = kern/powerpc/cache_flush.S;
1568
1569   enable = mips;
1570   enable = powerpc;
1571   enable = x86;
1572   enable = xen;
1573 };
1574
1575 module = {
1576   name = datetime;
1577   cmos = lib/cmos_datetime.c;
1578   efi = lib/efi/datetime.c;
1579   uboot = lib/dummy/datetime.c;
1580   arm_coreboot = lib/dummy/datetime.c;
1581   sparc64_ieee1275 = lib/ieee1275/datetime.c;
1582   powerpc_ieee1275 = lib/ieee1275/datetime.c;
1583   sparc64_ieee1275 = lib/ieee1275/cmos.c;
1584   powerpc_ieee1275 = lib/ieee1275/cmos.c;
1585   xen = lib/xen/datetime.c;
1586
1587   mips_arc = lib/arc/datetime.c;
1588   enable = noemu;
1589 };
1590
1591 module = {
1592   name = setjmp;
1593   common = lib/setjmp.S;
1594   extra_dist = lib/i386/setjmp.S;
1595   extra_dist = lib/mips/setjmp.S;
1596   extra_dist = lib/x86_64/setjmp.S;
1597   extra_dist = lib/sparc64/setjmp.S;
1598   extra_dist = lib/powerpc/setjmp.S;
1599   extra_dist = lib/ia64/setjmp.S;
1600   extra_dist = lib/ia64/longjmp.S;
1601   extra_dist = lib/arm/setjmp.S;
1602   extra_dist = lib/arm64/setjmp.S;
1603 };
1604
1605 module = {
1606   name = aout;
1607   common = loader/aout.c;
1608   enable = x86;
1609 };
1610
1611 module = {
1612   name = bsd;
1613   x86 = loader/i386/bsd.c;
1614   x86 = loader/i386/bsd32.c;
1615   x86 = loader/i386/bsd64.c;
1616
1617   extra_dist = loader/i386/bsdXX.c;
1618   extra_dist = loader/i386/bsd_pagetable.c;
1619
1620   enable = x86;
1621 };
1622
1623 module = {
1624   name = plan9;
1625   i386_pc = loader/i386/pc/plan9.c;
1626   enable = i386_pc;
1627 };
1628
1629
1630 module = {
1631   name = linux16;
1632   common = loader/i386/pc/linux.c;
1633   enable = x86;
1634 };
1635
1636 module = {
1637   name = ntldr;
1638   i386_pc = loader/i386/pc/ntldr.c;
1639   enable = i386_pc;
1640 };
1641
1642
1643 module = {
1644   name = truecrypt;
1645   i386_pc = loader/i386/pc/truecrypt.c;
1646   enable = i386_pc;
1647 };
1648
1649
1650 module = {
1651   name = freedos;
1652   i386_pc = loader/i386/pc/freedos.c;
1653   enable = i386_pc;
1654 };
1655
1656 module = {
1657   name = pxechain;
1658   i386_pc = loader/i386/pc/pxechainloader.c;
1659   enable = i386_pc;
1660 };
1661
1662 module = {
1663   name = multiboot2;
1664   cppflags = "-DGRUB_USE_MULTIBOOT2";
1665
1666   common = loader/multiboot.c;
1667   common = loader/multiboot_mbi2.c;
1668   enable = x86;
1669   enable = mips;
1670 };
1671
1672 module = {
1673   name = multiboot;
1674   common = loader/multiboot.c;
1675   x86 = loader/i386/multiboot_mbi.c;
1676   extra_dist = loader/multiboot_elfxx.c;
1677   enable = x86;
1678 };
1679
1680 module = {
1681   name = xen_boot;
1682   arm64 = loader/arm64/xen_boot.c;
1683   enable = arm64;
1684 };
1685
1686 module = {
1687   name = linux;
1688   x86 = loader/i386/linux.c;
1689   xen = loader/i386/xen.c;
1690   i386_pc = lib/i386/pc/vesa_modes_table.c;
1691   mips = loader/mips/linux.c;
1692   powerpc_ieee1275 = loader/powerpc/ieee1275/linux.c;
1693   sparc64_ieee1275 = loader/sparc64/ieee1275/linux.c;
1694   ia64_efi = loader/ia64/efi/linux.c;
1695   arm = loader/arm/linux.c;
1696   arm64 = loader/arm64/linux.c;
1697   common = loader/linux.c;
1698   common = lib/cmdline.c;
1699   enable = noemu;
1700 };
1701
1702 module = {
1703   name = fdt;
1704   arm64 = loader/efi/fdt.c;
1705   common = lib/fdt.c;
1706   enable = fdt;
1707 };
1708
1709 module = {
1710   name = xnu;
1711   x86 = loader/xnu_resume.c;
1712   x86 = loader/i386/xnu.c;
1713   x86 = loader/xnu.c;
1714
1715   /* Code is pretty generic but relies on RNG which
1716      is available only on few platforms. It's not a
1717      big deal as xnu needs ACPI anyway and we have
1718      RNG on all platforms with ACPI.
1719    */
1720   enable = i386_multiboot;
1721   enable = i386_coreboot;
1722   enable = i386_pc;
1723   enable = i386_efi;
1724   enable = x86_64_efi;
1725 };
1726
1727 module = {
1728   name = random;
1729   x86 = lib/i386/random.c;
1730   common = lib/random.c;
1731
1732   i386_multiboot = kern/i386/tsc_pmtimer.c;
1733   i386_coreboot = kern/i386/tsc_pmtimer.c;
1734   i386_pc = kern/i386/tsc_pmtimer.c;
1735
1736   enable = i386_multiboot;
1737   enable = i386_coreboot;
1738   enable = i386_pc;
1739   enable = i386_efi;
1740   enable = x86_64_efi;
1741 };
1742
1743 module = {
1744   name = macho;
1745
1746   common = loader/macho.c;
1747   common = loader/macho32.c;
1748   common = loader/macho64.c;
1749   common = loader/lzss.c;
1750   extra_dist = loader/machoXX.c;
1751 };
1752
1753 module = {
1754   name = appleldr;
1755   common = loader/efi/appleloader.c;
1756   enable = i386_efi;
1757   enable = x86_64_efi;
1758 };
1759
1760 module = {
1761   name = chain;
1762   efi = loader/efi/chainloader.c;
1763   i386_pc = loader/i386/pc/chainloader.c;
1764   i386_coreboot = loader/i386/coreboot/chainloader.c;
1765   i386_coreboot = lib/LzmaDec.c;
1766   enable = i386_pc;
1767   enable = i386_coreboot;
1768   enable = efi;
1769 };
1770
1771 module = {
1772   name = mmap;
1773   common = mmap/mmap.c;
1774   x86 = mmap/i386/uppermem.c;
1775   x86 = mmap/i386/mmap.c;
1776
1777   i386_pc = mmap/i386/pc/mmap.c;
1778   i386_pc = mmap/i386/pc/mmap_helper.S;
1779
1780   efi = mmap/efi/mmap.c;
1781
1782   mips = mmap/mips/uppermem.c;
1783
1784   enable = x86;
1785   enable = ia64_efi;
1786   enable = arm_efi;
1787   enable = arm64_efi;
1788   enable = mips;
1789 };
1790
1791 module = {
1792   name = normal;
1793   common = normal/main.c;
1794   common = normal/cmdline.c;
1795   common = normal/dyncmd.c;
1796   common = normal/auth.c;
1797   common = normal/autofs.c;
1798   common = normal/color.c;
1799   common = normal/completion.c;
1800   common = normal/datetime.c;
1801   common = normal/menu.c;
1802   common = normal/menu_entry.c;
1803   common = normal/menu_text.c;
1804   common = normal/misc.c;
1805   common = normal/crypto.c;
1806   common = normal/term.c;
1807   common = normal/context.c;
1808   common = normal/charset.c;
1809   common = lib/getline.c;
1810
1811   common = script/main.c;
1812   common = script/script.c;
1813   common = script/execute.c;
1814   common = script/function.c;
1815   common = script/lexer.c;
1816   common = script/argv.c;
1817
1818   common = commands/menuentry.c;
1819
1820   common = unidata.c;
1821   common_nodist = grub_script.tab.c;
1822   common_nodist = grub_script.yy.c;
1823   common_nodist = grub_script.tab.h;
1824   common_nodist = grub_script.yy.h;
1825
1826   extra_dist = script/yylex.l;
1827   extra_dist = script/parser.y;
1828
1829   cflags = '$(CFLAGS_POSIX) -Wno-redundant-decls';
1830   cppflags = '$(CPPFLAGS_POSIX)';
1831 };
1832
1833 module = {
1834   name = part_acorn;
1835   common = partmap/acorn.c;
1836 };
1837
1838 module = {
1839   name = part_amiga;
1840   common = partmap/amiga.c;
1841 };
1842
1843 module = {
1844   name = part_apple;
1845   common = partmap/apple.c;
1846 };
1847
1848 module = {
1849   name = part_gpt;
1850   common = partmap/gpt.c;
1851 };
1852
1853 module = {
1854   name = part_msdos;
1855   common = partmap/msdos.c;
1856 };
1857
1858 module = {
1859   name = part_sun;
1860   common = partmap/sun.c;
1861 };
1862
1863 module = {
1864   name = part_plan;
1865   common = partmap/plan.c;
1866 };
1867
1868 module = {
1869   name = part_dvh;
1870   common = partmap/dvh.c;
1871 };
1872
1873 module = {
1874   name = part_bsd;
1875   common = partmap/bsdlabel.c;
1876 };
1877
1878 module = {
1879   name = part_sunpc;
1880   common = partmap/sunpc.c;
1881 };
1882
1883 module = {
1884   name = part_dfly;
1885   common = partmap/dfly.c;
1886 };
1887
1888 module = {
1889   name = msdospart;
1890   common = parttool/msdospart.c;
1891 };
1892
1893 module = {
1894   name = at_keyboard;
1895   common = term/at_keyboard.c;
1896   common = term/ps2.c;
1897   enable = x86;
1898 };
1899
1900 module = {
1901   name = gfxterm;
1902   common = term/gfxterm.c;
1903   enable = videomodules;
1904 };
1905
1906 module = {
1907   name = gfxterm_background;
1908   common = term/gfxterm_background.c;
1909 };
1910
1911 module = {
1912   name = serial;
1913   common = term/serial.c;
1914   x86 = term/ns8250.c;
1915   ieee1275 = term/ieee1275/serial.c;
1916   mips_arc = term/arc/serial.c;
1917   efi = term/efi/serial.c;
1918
1919   enable = terminfomodule;
1920   enable = ieee1275;
1921   enable = mips_arc;
1922 };
1923
1924 module = {
1925   name = sendkey;
1926   i386_pc = commands/i386/pc/sendkey.c;
1927   enable = i386_pc;
1928 };
1929
1930 module = {
1931   name = terminfo;
1932   common = term/terminfo.c;
1933   common = term/tparm.c;
1934   enable = terminfomodule;
1935 };
1936
1937 module = {
1938   name = usb_keyboard;
1939   common = term/usb_keyboard.c;
1940   enable = usb;
1941 };
1942
1943 module = {
1944   name = vga;
1945   common = video/i386/pc/vga.c;
1946   enable = i386_pc;
1947 };
1948
1949 module = {
1950   name = vga_text;
1951   common = term/i386/pc/vga_text.c;
1952   enable = i386_pc;
1953 };
1954
1955 module = {
1956   name = mda_text;
1957   common = term/i386/pc/mda_text.c;
1958   enable = i386_pc;
1959   enable = i386_coreboot_multiboot_qemu;
1960 };
1961
1962 module = {
1963   name = video_cirrus;
1964   x86 = video/cirrus.c;
1965   enable = x86;
1966 };
1967
1968 module = {
1969   name = video_bochs;
1970   x86 = video/bochs.c;
1971   enable = x86;
1972 };
1973
1974 module = {
1975   name = functional_test;
1976   common = tests/lib/functional_test.c;
1977   common = tests/lib/test.c;
1978   common = tests/checksums.h;
1979   common = tests/video_checksum.c;
1980   common = tests/fake_input.c;
1981   common = video/capture.c;
1982 };
1983
1984 module = {
1985   name = exfctest;
1986   common = tests/example_functional_test.c;
1987 };
1988
1989 module = {
1990   name = strtoull_test;
1991   common = tests/strtoull_test.c;
1992 };
1993
1994 module = {
1995   name = setjmp_test;
1996   common = tests/setjmp_test.c;
1997 };
1998
1999 module = {
2000   name = signature_test;
2001   common = tests/signature_test.c;
2002   common = tests/signatures.h;
2003 };
2004
2005 module = {
2006   name = sleep_test;
2007   common = tests/sleep_test.c;
2008 };
2009
2010 module = {
2011   name = xnu_uuid_test;
2012   common = tests/xnu_uuid_test.c;
2013 };
2014
2015 module = {
2016   name = pbkdf2_test;
2017   common = tests/pbkdf2_test.c;
2018 };
2019
2020 module = {
2021   name = legacy_password_test;
2022   common = tests/legacy_password_test.c;
2023   enable = i386_pc;
2024   enable = i386_efi;
2025   enable = x86_64_efi;
2026   enable = emu;
2027   enable = xen;
2028 };
2029
2030 module = {
2031   name = div;
2032   common = lib/division.c;
2033   enable = no_softdiv;
2034 };
2035
2036 module = {
2037   name = div_test;
2038   common = tests/div_test.c;
2039 };
2040
2041 module = {
2042   name = mul_test;
2043   common = tests/mul_test.c;
2044 };
2045
2046 module = {
2047   name = shift_test;
2048   common = tests/shift_test.c;
2049 };
2050
2051 module = {
2052   name = cmp_test;
2053   common = tests/cmp_test.c;
2054 };
2055
2056 module = {
2057   name = ctz_test;
2058   common = tests/ctz_test.c;
2059 };
2060
2061 module = {
2062   name = bswap_test;
2063   common = tests/bswap_test.c;
2064 };
2065
2066 module = {
2067   name = videotest_checksum;
2068   common = tests/videotest_checksum.c;
2069 };
2070
2071 module = {
2072   name = gfxterm_menu;
2073   common = tests/gfxterm_menu.c;
2074 };
2075
2076 module = {
2077   name = cmdline_cat_test;
2078   common = tests/cmdline_cat_test.c;
2079 };
2080
2081 module = {
2082   name = bitmap;
2083   common = video/bitmap.c;
2084 };
2085
2086 module = {
2087   name = bitmap_scale;
2088   common = video/bitmap_scale.c;
2089 };
2090
2091 module = {
2092   name = efi_gop;
2093   efi = video/efi_gop.c;
2094   enable = efi;
2095 };
2096
2097 module = {
2098   name = efi_uga;
2099   efi = video/efi_uga.c;
2100   enable = i386_efi;
2101   enable = x86_64_efi;
2102 };
2103
2104 module = {
2105   name = jpeg;
2106   common = video/readers/jpeg.c;
2107 };
2108
2109 module = {
2110   name = png;
2111   common = video/readers/png.c;
2112 };
2113
2114 module = {
2115   name = tga;
2116   common = video/readers/tga.c;
2117 };
2118
2119 module = {
2120   name = vbe;
2121   common = video/i386/pc/vbe.c;
2122   enable = i386_pc;
2123 };
2124
2125 module = {
2126   name = video_fb;
2127   common = video/fb/video_fb.c;
2128   common = video/fb/fbblit.c;
2129   common = video/fb/fbfill.c;
2130   common = video/fb/fbutil.c;
2131   enable = videomodules;
2132 };
2133
2134 module = {
2135   name = video;
2136   common = video/video.c;
2137   enable = videomodules;
2138 };
2139
2140 module = {
2141   name = video_colors;
2142   common = video/colors.c;
2143 };
2144
2145 module = {
2146   name = ieee1275_fb;
2147   ieee1275 = video/ieee1275.c;
2148   enable = powerpc_ieee1275;
2149 };
2150
2151 module = {
2152   name = sdl;
2153   emu = video/emu/sdl.c;
2154   enable = emu;
2155   condition = COND_GRUB_EMU_SDL;
2156 };
2157
2158 module = {
2159   name = datehook;
2160   common = hook/datehook.c;
2161 };
2162
2163 module = {
2164   name = net;
2165   common = net/net.c;
2166   common = net/dns.c;
2167   common = net/bootp.c;
2168   common = net/ip.c;
2169   common = net/udp.c;
2170   common = net/tcp.c;
2171   common = net/icmp.c;
2172   common = net/icmp6.c;
2173   common = net/ethernet.c;
2174   common = net/arp.c;
2175   common = net/netbuff.c;
2176 };
2177
2178 module = {
2179   name = tftp;
2180   common = net/tftp.c;
2181 };
2182
2183 module = {
2184   name = http;
2185   common = net/http.c;
2186 };
2187
2188 module = {
2189   name = ofnet;
2190   common = net/drivers/ieee1275/ofnet.c;
2191   enable = ieee1275;
2192 };
2193
2194 module = {
2195   name = ubootnet;
2196   common = net/drivers/uboot/ubootnet.c;
2197   enable = uboot;
2198 };
2199
2200 module = {
2201   name = efinet;
2202   common = net/drivers/efi/efinet.c;
2203   enable = efi;
2204 };
2205
2206 module = {
2207   name = emunet;
2208   emu = net/drivers/emu/emunet.c;
2209   enable = emu;
2210 };
2211
2212 module = {
2213   name = legacycfg;
2214   common = commands/legacycfg.c;
2215   common = lib/legacy_parse.c;
2216   emu = lib/i386/pc/vesa_modes_table.c;
2217   i386_efi = lib/i386/pc/vesa_modes_table.c;
2218   x86_64_efi = lib/i386/pc/vesa_modes_table.c;
2219   xen = lib/i386/pc/vesa_modes_table.c;
2220
2221   enable = i386_pc;
2222   enable = i386_efi;
2223   enable = x86_64_efi;
2224   enable = emu;
2225   enable = xen;
2226 };
2227
2228 module = {
2229   name = syslinuxcfg;
2230   common = lib/syslinux_parse.c;
2231   common = commands/syslinuxcfg.c;
2232 };
2233
2234 module = {
2235   name = test_blockarg;
2236   common = tests/test_blockarg.c;
2237 };
2238
2239 module = {
2240   name = xzio;
2241   common = io/xzio.c;
2242   common = lib/xzembed/xz_dec_bcj.c;
2243   common = lib/xzembed/xz_dec_lzma2.c;
2244   common = lib/xzembed/xz_dec_stream.c;
2245   cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed';
2246   cflags='-Wno-unreachable-code';
2247 };
2248
2249 module = {
2250   name = lzopio;
2251   common = io/lzopio.c;
2252   common = lib/minilzo/minilzo.c;
2253   cflags = '$(CFLAGS_POSIX) -Wno-undef -Wno-redundant-decls -Wno-error';
2254   cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/minilzo -DMINILZO_HAVE_CONFIG_H';
2255 };
2256
2257 module = {
2258   name = testload;
2259   common = commands/testload.c;
2260 };
2261
2262 module = {
2263   name = backtrace;
2264   x86 = lib/i386/backtrace.c;
2265   i386_xen = lib/i386/backtrace.c;
2266   x86_64_xen = lib/i386/backtrace.c;
2267   common = lib/backtrace.c;
2268   enable = x86;
2269   enable = i386_xen;
2270   enable = x86_64_xen;
2271 };
2272
2273 module = {
2274   name = lsapm;
2275   common = commands/i386/pc/lsapm.c;
2276   enable = i386_pc;
2277 };
2278
2279 module = {
2280   name = keylayouts;
2281   common = commands/keylayouts.c;
2282   enable = x86;
2283 };
2284
2285 module = {
2286   name = priority_queue;
2287   common = lib/priority_queue.c;
2288 };
2289
2290 module = {
2291   name = time;
2292   common = commands/time.c;
2293 };
2294
2295 module = {
2296   name = cacheinfo;
2297   common = commands/cacheinfo.c;
2298   condition = COND_ENABLE_CACHE_STATS;
2299 };
2300
2301 module = {
2302   name = boottime;
2303   common = commands/boottime.c;
2304   condition = COND_ENABLE_BOOT_TIME_STATS;
2305 };
2306
2307 module = {
2308   name = adler32;
2309   common = lib/adler32.c;
2310 };
2311
2312 module = {
2313   name = crc64;
2314   common = lib/crc64.c;
2315 };
2316
2317 module = {
2318   name = mpi;
2319   common = lib/libgcrypt-grub/mpi/mpiutil.c;
2320   common = lib/libgcrypt-grub/mpi/mpi-bit.c;
2321   common = lib/libgcrypt-grub/mpi/mpi-add.c;
2322   common = lib/libgcrypt-grub/mpi/mpi-mul.c;
2323   common = lib/libgcrypt-grub/mpi/mpi-mod.c;
2324   common = lib/libgcrypt-grub/mpi/mpi-gcd.c;
2325   common = lib/libgcrypt-grub/mpi/mpi-div.c;
2326   common = lib/libgcrypt-grub/mpi/mpi-cmp.c;
2327   common = lib/libgcrypt-grub/mpi/mpi-inv.c;
2328   common = lib/libgcrypt-grub/mpi/mpi-pow.c;
2329   common = lib/libgcrypt-grub/mpi/mpi-mpow.c;
2330   common = lib/libgcrypt-grub/mpi/mpih-lshift.c;
2331   common = lib/libgcrypt-grub/mpi/mpih-mul.c;
2332   common = lib/libgcrypt-grub/mpi/mpih-mul1.c;
2333   common = lib/libgcrypt-grub/mpi/mpih-mul2.c;
2334   common = lib/libgcrypt-grub/mpi/mpih-mul3.c;
2335   common = lib/libgcrypt-grub/mpi/mpih-add1.c;
2336   common = lib/libgcrypt-grub/mpi/mpih-sub1.c;
2337   common = lib/libgcrypt-grub/mpi/mpih-div.c;
2338   common = lib/libgcrypt-grub/mpi/mpicoder.c;
2339   common = lib/libgcrypt-grub/mpi/mpih-rshift.c;
2340   common = lib/libgcrypt-grub/mpi/mpi-inline.c;
2341   common = lib/libgcrypt_wrap/mem.c;
2342
2343   cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls -Wno-sign-compare';
2344   cppflags = '$(CPPFLAGS_GCRY)';
2345 };
2346
2347 module = {
2348   name = all_video;
2349   common = lib/fake_module.c;
2350 };
2351
2352 module = {
2353   name = gdb;
2354   common = gdb/cstub.c;
2355   common = gdb/gdb.c;
2356   i386 = gdb/i386/idt.c;
2357   i386 = gdb/i386/machdep.S;
2358   i386 = gdb/i386/signal.c;
2359   enable = i386;
2360 };
2361
2362 module = {
2363   name = testspeed;
2364   common = commands/testspeed.c;
2365 };
2366
2367 module = {
2368   name = tr;
2369   common = commands/tr.c;
2370 };
2371
2372 module = {
2373   name = progress;
2374   common = lib/progress.c;
2375 };
2376
2377 module = {
2378   name = file;
2379   common = commands/file.c;
2380   common = commands/file32.c;
2381   common = commands/file64.c;
2382   extra_dist = commands/fileXX.c;
2383   common = loader/i386/xen_file.c;
2384   common = loader/i386/xen_file32.c;
2385   common = loader/i386/xen_file64.c;
2386   extra_dist = loader/i386/xen_fileXX.c;
2387 };