You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Config 5.2KB

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