3 ##############################################################################
4 ##############################################################################
8 # The use of this file to set options that affect only single object
9 # files is deprecated, because changing anything in this file results
10 # in a complete rebuild, which is slow. All options are gradually
11 # being migrated to config.h, which does not suffer from this problem.
13 # Only options that affect the entire build (e.g. overriding the $(CC)
14 # Makefile variable) should be placed in here.
16 ##############################################################################
17 ##############################################################################
20 # Config for i386 Etherboot
22 # Do not delete the tag OptionDescription and /OptionDescription
23 # It is used to automatically generate the documentation.
27 # BIOS interface options:
30 # Compile in support for the normal pcbios
32 # Compile in support for LinuxBIOS
33 # -DBBS_BUT_NOT_PNP_COMPLIANT
34 # Some BIOSes claim to be PNP but they don't conform
35 # to the BBS spec which specifies that ES:DI must
36 # point to the string $PnP on entry. This option
37 # works around those. This option must be added to
40 # Take control as soon as BIOS detects the ROM.
41 # Normally hooks onto INT18H or INT19H. Use only if you
42 # have a very non-conformant BIOS as it bypasses
43 # BIOS initialisation of devices. This only works for
44 # legacy ROMs, i.e. PCI_PNP_HEADER not defined.
45 # This option was formerly called NOINT19H.
47 # Etherboot normally hooks onto INT19H for legacy ROMs.
48 # You can choose to hook onto INT18H (BASIC interpreter
49 # entry point) instead. This entry point is used when
50 # all boot devices have been exhausted. This option must
51 # be added to LCONFIG.
53 # Define this for PCI BIOSes that do not implement
54 # BIOS32 or not correctly. Normally not needed.
55 # Only works for BIOSes of a certain era.
56 # -DCONFIG_TSC_CURRTICKS
57 # Uses the processor time stamp counter instead of reading
58 # the BIOS time counter. This allows Etherboot to work
59 # even without a BIOS. This only works on late model
62 # Some systems do not have timer2 implemented.
63 # If you have a RTC this will allow you to roughly calibrate
64 # it using outb instructions.
66 # This option uses the 0x92 method of controlling
67 # A20 instead of the traditional method of using the
68 # keyboard controller. An explanation of A20 is here:
69 # http://www.win.tue.nl/~aeb/linux/kbd/A20.html
70 # This occurs on MCA, EISA and some embedded boards,
71 # and sometimes with the Fast Gate A20 option on some
73 # Enable this only if you are sure of what you are doing.
75 # Extended cpu options
78 # Compile in support for booting x86_64 64bit binaries.
82 # -DPXELOADER_KEEP_ALL
83 # Prevent PXE loader (prefix) from unloading the
84 # PXE stack. You will want to use this if, for
85 # example, you are booting via PXE-on-floppy.
86 # You may want to use it under certain
87 # circumstances when using the Etherboot UNDI
88 # driver; these are complex and best practice is
89 # not yet established.
91 # Obscure options you probably don't need to touch:
94 # Ignore the memory map returned by the E820 BIOS
95 # call. May be necessary on some buggy BIOSes.
97 # Use AUI by default on 3c503 cards.
99 # Use 4GB segment limits when calling out to or
100 # returning to real-mode code. This is necessary to
101 # work around some buggy code (e.g. OpenBSD's pxeboot)
102 # that uses flat real-mode without being sufficiently
103 # paranoid about the volatility of its segment limits.
106 # @/OptionDescription@
108 # BIOS select don't change unless you know what you are doing
111 # Compile in k8/hammer support
112 # CFLAGS+= -DCONFIG_X86_64
114 # Options to make a version of Etherboot that will work under linuxBIOS.
115 # CFLAGS+= -DLINUXBIOS -DCONFIG_TSC_CURRTICKS -DCONSOLE_SERIAL -DCOMCONSOLE=0x3f8 -DCOMPRESERVE -DCONFIG_PCI_DIRECT -DELF_IMAGE
117 # These options affect the loader that is prepended to the Etherboot image
118 # LCONFIG+= -DBBS_BUT_NOT_PNP_COMPLIANT
119 # LCONFIG+= -DBOOT_INT18H
121 # Produce code that will work with OpenBSD's pxeboot
122 # CFLAGS+= -DFLATTEN_REAL_MODE
124 CFLAGS+= -fstrength-reduce -fomit-frame-pointer -march=i386
125 # Squeeze the code in as little space as possible.
126 # gcc3 needs a different syntax to gcc2 if you want to avoid spurious warnings.
127 GCC_VERSION = $(subst ., ,$(shell $(CC) -dumpversion))
128 GCC_MAJORVERSION = $(firstword $(GCC_VERSION))
129 ifeq ($(GCC_MAJORVERSION),2)
130 CFLAGS+= -malign-jumps=1 -malign-loops=1 -malign-functions=1
132 CFLAGS+= -falign-jumps=1 -falign-loops=1 -falign-functions=1
134 GCC_MINORVERSION = $(word 2, $(GCC_VERSION))
135 ifneq ($(GCC_MINORVERSION),4)
141 ifeq "$(shell uname -s)" "FreeBSD"
142 CFLAGS+= -DIMAGE_FREEBSD -DELF_IMAGE -DAOUT_IMAGE
145 # An alternate location for isolinux.bin can be set here
146 # ISOLINUX_BIN=/path/to/isolinux.bin
148 # These seem to have some relevance to compiling on x86_64
151 # EXTRA_LDFLAGS=-m elf_i386