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 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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. # -DCONFIG_X86_64
  58. # Compile in support for booting x86_64 64bit binaries.
  59. #
  60. # PXE loader options:
  61. #
  62. # -DPXELOADER_KEEP_ALL
  63. # Prevent PXE loader (prefix) from unloading the
  64. # PXE stack. You will want to use this if, for
  65. # example, you are booting via PXE-on-floppy.
  66. # You may want to use it under certain
  67. # circumstances when using the Etherboot UNDI
  68. # driver; these are complex and best practice is
  69. # not yet established.
  70. #
  71. # Obscure options you probably don't need to touch:
  72. #
  73. # -DIGNORE_E820_MAP
  74. # Ignore the memory map returned by the E820 BIOS
  75. # call. May be necessary on some buggy BIOSes.
  76. # -DT503_AUI
  77. # Use AUI by default on 3c503 cards.
  78. # -DFLATTEN_REAL_MODE
  79. # Use 4GB segment limits when calling out to or
  80. # returning to real-mode code. This is necessary to
  81. # work around some buggy code (e.g. OpenBSD's pxeboot)
  82. # that uses flat real-mode without being sufficiently
  83. # paranoid about the volatility of its segment limits.
  84. #
  85. # @/OptionDescription@
  86. # BIOS select don't change unless you know what you are doing
  87. CFLAGS+= -DPCBIOS
  88. # Compile in k8/hammer support
  89. # CFLAGS+= -DCONFIG_X86_64
  90. # Options to make a version of Etherboot that will work under linuxBIOS.
  91. # CFLAGS+= -DLINUXBIOS -DCONFIG_TSC_CURRTICKS -DCONSOLE_SERIAL -DCOMCONSOLE=0x3f8 -DCOMPRESERVE -DCONFIG_PCI_DIRECT -DELF_IMAGE
  92. # These options affect the loader that is prepended to the Etherboot image
  93. # LCONFIG+= -DBBS_BUT_NOT_PNP_COMPLIANT
  94. # LCONFIG+= -DBOOT_INT18H
  95. # Produce code that will work inside the Bochs emulator. The pnic
  96. # driver is probably the best one to try.
  97. # CFLAGS+= -DCONFIG_PCI_DIRECT
  98. # Produce code that will work with OpenBSD's pxeboot
  99. # CFLAGS+= -DFLATTEN_REAL_MODE
  100. CFLAGS+= -fstrength-reduce -fomit-frame-pointer -march=i386
  101. # Squeeze the code in as little space as possible.
  102. # gcc3 needs a different syntax to gcc2 if you want to avoid spurious warnings.
  103. GCC_VERSION = $(subst ., ,$(shell $(CC) -dumpversion))
  104. GCC_MAJORVERSION = $(firstword $(GCC_VERSION))
  105. ifeq ($(GCC_MAJORVERSION),2)
  106. CFLAGS+= -malign-jumps=1 -malign-loops=1 -malign-functions=1
  107. else
  108. CFLAGS+= -falign-jumps=1 -falign-loops=1 -falign-functions=1
  109. endif
  110. GCC_MINORVERSION = $(word 2, $(GCC_VERSION))
  111. ifneq ($(GCC_MINORVERSION),4)
  112. CFLAGS+= -mcpu=i386
  113. endif
  114. LDFLAGS+= -N
  115. ifeq "$(shell uname -s)" "FreeBSD"
  116. CFLAGS+= -DIMAGE_FREEBSD -DELF_IMAGE -DAOUT_IMAGE
  117. endif
  118. # An alternate location for isolinux.bin can be set here
  119. # ISOLINUX_BIN=/path/to/isolinux.bin
  120. # These seem to have some relevance to compiling on x86_64
  121. # EXTRA_CFLAGS=-m32
  122. # EXTRA_ASFLAGS=--32
  123. # EXTRA_LDFLAGS=-m elf_i386