1 | # Config for i386 Etherboot
|
---|
2 | #
|
---|
3 | # Do not delete the tag OptionDescription and /OptionDescription
|
---|
4 | # It is used to automatically generate the documentation.
|
---|
5 | #
|
---|
6 | # @OptionDescrition@
|
---|
7 | #
|
---|
8 | # BIOS interface options:
|
---|
9 | #
|
---|
10 | # -DPCBIOS
|
---|
11 | # Compile in support for the normal pcbios
|
---|
12 | # -DLINUXBIOS
|
---|
13 | # Compile in support for LinuxBIOS
|
---|
14 | # -DBBS_BUT_NOT_PNP_COMPLIANT
|
---|
15 | # Some BIOSes claim to be PNP but they don't conform
|
---|
16 | # to the BBS spec which specifies that ES:DI must
|
---|
17 | # point to the string $PnP on entry. This option
|
---|
18 | # works around those. This option must be added to
|
---|
19 | # LCONFIG.
|
---|
20 | # -DNO_DELAYED_INT
|
---|
21 | # Take control as soon as BIOS detects the ROM.
|
---|
22 | # Normally hooks onto INT18H or INT19H. Use only if you
|
---|
23 | # have a very non-conformant BIOS as it bypasses
|
---|
24 | # BIOS initialisation of devices. This only works for
|
---|
25 | # legacy ROMs, i.e. PCI_PNP_HEADER not defined.
|
---|
26 | # This option was formerly called NOINT19H.
|
---|
27 | # -DBOOT_INT18H
|
---|
28 | # Etherboot normally hooks onto INT19H for legacy ROMs.
|
---|
29 | # You can choose to hook onto INT18H (BASIC interpreter
|
---|
30 | # entry point) instead. This entry point is used when
|
---|
31 | # all boot devices have been exhausted. This option must
|
---|
32 | # be added to LCONFIG.
|
---|
33 | # -DCONFIG_PCI_DIRECT
|
---|
34 | # Define this for PCI BIOSes that do not implement
|
---|
35 | # BIOS32 or not correctly. Normally not needed.
|
---|
36 | # Only works for BIOSes of a certain era.
|
---|
37 | # -DCONFIG_TSC_CURRTICKS
|
---|
38 | # Uses the processor time stamp counter instead of reading
|
---|
39 | # the BIOS time counter. This allows Etherboot to work
|
---|
40 | # even without a BIOS. This only works on late model
|
---|
41 | # 486s and above.
|
---|
42 | # -DCONFIG_NO_TIMER2
|
---|
43 | # Some systems do not have timer2 implemented.
|
---|
44 | # If you have a RTC this will allow you to roughly calibrate
|
---|
45 | # it using outb instructions.
|
---|
46 | # -DIBM_L40
|
---|
47 | # This option uses the 0x92 method of controlling
|
---|
48 | # A20 instead of the traditional method of using the
|
---|
49 | # keyboard controller. An explanation of A20 is here:
|
---|
50 | # http://www.win.tue.nl/~aeb/linux/kbd/A20.html
|
---|
51 | # This occurs on MCA, EISA and some embedded boards,
|
---|
52 | # and sometimes with the Fast Gate A20 option on some
|
---|
53 | # BIOSes.
|
---|
54 | # Enable this only if you are sure of what you are doing.
|
---|
55 | #
|
---|
56 | # Extended cpu options
|
---|
57 |
|
---|
58 | # -DCONFIG_X86_64
|
---|
59 | # Compile in support for booting x86_64 64bit binaries.
|
---|
60 | #
|
---|
61 | # PXE loader options:
|
---|
62 | #
|
---|
63 | # -DPXELOADER_KEEP_ALL
|
---|
64 | # Prevent PXE loader (prefix) from unloading the
|
---|
65 | # PXE stack. You will want to use this if, for
|
---|
66 | # example, you are booting via PXE-on-floppy.
|
---|
67 | # You may want to use it under certain
|
---|
68 | # circumstances when using the Etherboot UNDI
|
---|
69 | # driver; these are complex and best practice is
|
---|
70 | # not yet established.
|
---|
71 | #
|
---|
72 | # Obscure options you probably don't need to touch:
|
---|
73 | #
|
---|
74 | # -DIGNORE_E820_MAP
|
---|
75 | # Ignore the memory map returned by the E820 BIOS
|
---|
76 | # call. May be necessary on some buggy BIOSes.
|
---|
77 | # -DT503_AUI
|
---|
78 | # Use AUI by default on 3c503 cards.
|
---|
79 | # -DFLATTEN_REAL_MODE
|
---|
80 | # Use 4GB segment limits when calling out to or
|
---|
81 | # returning to real-mode code. This is necessary to
|
---|
82 | # work around some buggy code (e.g. OpenBSD's pxeboot)
|
---|
83 | # that uses flat real-mode without being sufficiently
|
---|
84 | # paranoid about the volatility of its segment limits.
|
---|
85 |
|
---|
86 | #
|
---|
87 | # @/OptionDescription@
|
---|
88 |
|
---|
89 | ifeq ($(ENVIRONMENT),VBOX)
|
---|
90 | EB_CFLAGS+= -DPCBIOS
|
---|
91 | EB_CFLAGS+= -fstrength-reduce -fomit-frame-pointer -march=i386
|
---|
92 | EB_CFLAGS+= $(call VBOX_GCC32_CHECK_CC,-falign-jumps=1 -falign-loops=1 -falign-functions=1,\
|
---|
93 | -malign-jumps=1 -malign-loops=1 -malign-functions=1)
|
---|
94 | EB_CFLAGS+= $(call VBOX_GCC32_CHECK_CC,-mtune=i386,-mcpu=i386)
|
---|
95 | EB_LDFLAGS+= -N
|
---|
96 | else # !VBOX
|
---|
97 | # BIOS select don't change unless you know what you are doing
|
---|
98 | CFLAGS+= -DPCBIOS
|
---|
99 |
|
---|
100 | # Compile in k8/hammer support
|
---|
101 | # CFLAGS+= -DCONFIG_X86_64
|
---|
102 |
|
---|
103 | # Options to make a version of Etherboot that will work under linuxBIOS.
|
---|
104 | # CFLAGS+= -DLINUXBIOS -DCONFIG_TSC_CURRTICKS -DCONSOLE_SERIAL -DCOMCONSOLE=0x3f8 -DCOMPRESERVE -DCONFIG_PCI_DIRECT -DELF_IMAGE
|
---|
105 |
|
---|
106 | # These options affect the loader that is prepended to the Etherboot image
|
---|
107 | # LCONFIG+= -DBBS_BUT_NOT_PNP_COMPLIANT
|
---|
108 | # LCONFIG+= -DBOOT_INT18H
|
---|
109 |
|
---|
110 | # Produce code that will work inside the Bochs emulator. The pnic
|
---|
111 | # driver is probably the best one to try.
|
---|
112 | # CFLAGS+= -DCONFIG_PCI_DIRECT
|
---|
113 |
|
---|
114 | # Produce code that will work with OpenBSD's pxeboot
|
---|
115 | # CFLAGS+= -DFLATTEN_REAL_MODE
|
---|
116 |
|
---|
117 | CFLAGS+= -fstrength-reduce -fomit-frame-pointer -march=i386
|
---|
118 | # Squeeze the code in as little space as possible.
|
---|
119 | # gcc3 needs a different syntax to gcc2 if you want to avoid spurious warnings.
|
---|
120 | GCC_VERSION = $(subst ., ,$(shell $(CC) -dumpversion))
|
---|
121 | GCC_MAJORVERSION = $(firstword $(GCC_VERSION))
|
---|
122 | ifeq ($(GCC_MAJORVERSION),2)
|
---|
123 | CFLAGS+= -malign-jumps=1 -malign-loops=1 -malign-functions=1
|
---|
124 | else
|
---|
125 | CFLAGS+= -falign-jumps=1 -falign-loops=1 -falign-functions=1
|
---|
126 | endif
|
---|
127 | GCC_MINORVERSION = $(word 2, $(GCC_VERSION))
|
---|
128 | ifneq ($(GCC_MINORVERSION),4)
|
---|
129 | CFLAGS+= -mcpu=i386
|
---|
130 | endif
|
---|
131 |
|
---|
132 | LDFLAGS+= -N
|
---|
133 |
|
---|
134 | ifeq "$(shell uname -s)" "FreeBSD"
|
---|
135 | CFLAGS+= -DIMAGE_FREEBSD -DELF_IMAGE -DAOUT_IMAGE
|
---|
136 | endif
|
---|
137 |
|
---|
138 | # An alternate location for isolinux.bin can be set here
|
---|
139 | # ISOLINUX_BIN=/path/to/isolinux.bin
|
---|
140 | endif # !VBOX
|
---|