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