Skip to content

Commit

Permalink
[makefile] Split config.h out into config/*.h and kill off mkconfig.pl
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Brown committed Oct 8, 2008
1 parent a258854 commit e817a34
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 293 deletions.
1 change: 0 additions & 1 deletion src/Makefile
Expand Up @@ -33,7 +33,6 @@ NM := $(CROSS_COMPILE)nm
OBJDUMP := $(CROSS_COMPILE)objdump
PARSEROM := $(PERL) ./util/parserom.pl
MAKEROM := $(PERL) ./util/makerom.pl
MKCONFIG := $(PERL) ./util/mkconfig.pl
SYMCHECK := $(PERL) ./util/symcheck.pl
SORTOBJDUMP := $(PERL) ./util/sortobjdump.pl
NRV2B := ./util/nrv2b
Expand Down
8 changes: 0 additions & 8 deletions src/Makefile.housekeeping
Expand Up @@ -232,14 +232,6 @@ ifdef ARCH
include arch/$(ARCH)/Makefile
endif

###############################################################################
#
# config/%.h files are generated from config.h using mkconfig.pl
#
config/%.h : config*.h
$(MKCONFIG) config.h
CLEANUP += config/*.h

###############################################################################
#
# Source file handling
Expand Down
1 change: 0 additions & 1 deletion src/config/.gitignore
@@ -1,2 +1 @@
*.h
.buildserial.*
92 changes: 14 additions & 78 deletions src/config.h → src/config/general.h
@@ -1,15 +1,13 @@
/*
* This file defines the configuration for Etherboot.
#ifndef CONFIG_GENERAL_H
#define CONFIG_GENERAL_H

/** @file
*
* The build system splits this file into several individual header
* files of the form config/%.h, so that changing one option doesn't
* necessitate a rebuild of every single object. For this reason, it
* is important to maintain the strict formatting in this file.
* General configuration
*
*/

/* @BEGIN general.h
*
/*
* Console configuration
*
* These options specify the console types that Etherboot will use for
Expand All @@ -23,36 +21,7 @@
#undef CONSOLE_BTEXT /* Who knows what this does? */
#undef CONSOLE_PC_KBD /* Direct access to PC keyboard */

/* @END general.h */

/* @BEGIN serial.h
*
* Serial port configuration
*
* These options affect the operation of the serial console. They
* take effect only if the serial console is included using the
* CONSOLE_SERIAL option.
*
*/

#define COMCONSOLE 0x3f8 /* I/O port address */

/* Keep settings from a previous user of the serial port (e.g. lilo or
* LinuxBIOS), ignoring COMSPEED, COMDATA, COMPARITY and COMSTOP.
*/
#undef COMPRESERVE

#ifndef COMPRESERVE
#define COMSPEED 115200 /* Baud rate */
#define COMDATA 8 /* Data bits */
#define COMPARITY 0 /* Parity: 0=None, 1=Odd, 2=Even */
#define COMSTOP 1 /* Stop bits */
#endif

/* @END serial.h */

/* @BEGIN general.h
*
/*
* Timer configuration
*
*/
Expand All @@ -61,33 +30,14 @@
#define BANNER_TIMEOUT 20 /* Tenths of a second for which the shell
banner should appear */

/* @END general.h */

/* @BEGIN isa.h
*
* ISA probe address configuration
*
* You can override the list of addresses that will be probed by any
* ISA drivers.
*
*/
#undef ISA_PROBE_ADDRS /* e.g. 0x200, 0x300 */
#undef ISA_PROBE_ONLY /* Do not probe any other addresses */

/* @END isa.h */

/* @BEGIN general.h
*
/*
* Network protocols
*
*/

#define NET_PROTO_IPV4 /* IPv4 protocol */

/* @END general.h */

/* @BEGIN general.h
*
/*
* Download protocols
*
*/
Expand All @@ -101,21 +51,15 @@
#undef DOWNLOAD_PROTO_SLAM /* Scalable Local Area Multicast */
#undef DOWNLOAD_PROTO_FSP /* FSP? */

/* @END general.h */

/* @BEGIN general.h
*
/*
* Name resolution modules
*
*/

#define DNS_RESOLVER /* DNS resolver */
#undef NMB_RESOLVER /* NMB resolver */

/* @END general.h */

/* @BEGIN general.h
*
/*
* Image types
*
* Etherboot supports various image formats. Select whichever ones
Expand All @@ -133,10 +77,7 @@
#define IMAGE_BZIMAGE /* Linux bzImage image support */
#define IMAGE_COMBOOT /* SYSLINUX COMBOOT image support */

/* @END general.h */

/* @BEGIN general.h
*
/*
* Command-line commands to include
*
*/
Expand All @@ -149,10 +90,7 @@
#define DHCP_CMD /* DHCP management commands */
#define SANBOOT_CMD /* SAN boot commands */

/* @END general.h */

/* @BEGIN general.h
*
/*
* Obscure configuration options
*
* You probably don't need to touch these.
Expand All @@ -170,6 +108,4 @@
#undef GDBUDP /* Remote GDB debugging over UDP
* (both may be set) */

/* @END general.h */

/* @TRYSOURCE config-local.h */
#endif /* CONFIG_GENERAL_H */
15 changes: 15 additions & 0 deletions src/config/isa.h
@@ -0,0 +1,15 @@
#ifndef CONFIG_ISA_H
#define CONFIG_ISA_H

/** @file
*
* ISA probe address configuration
*
* You can override the list of addresses that will be probed by any
* ISA drivers.
*
*/
#undef ISA_PROBE_ADDRS /* e.g. 0x200, 0x300 */
#undef ISA_PROBE_ONLY /* Do not probe any other addresses */

#endif /* CONFIG_ISA_H */
28 changes: 28 additions & 0 deletions src/config/serial.h
@@ -0,0 +1,28 @@
#ifndef CONFIG_SERIAL_H
#define CONFIG_SERIAL_H

/** @file
*
* Serial port configuration
*
* These options affect the operation of the serial console. They
* take effect only if the serial console is included using the
* CONSOLE_SERIAL option.
*
*/

#define COMCONSOLE 0x3f8 /* I/O port address */

/* Keep settings from a previous user of the serial port (e.g. lilo or
* LinuxBIOS), ignoring COMSPEED, COMDATA, COMPARITY and COMSTOP.
*/
#undef COMPRESERVE

#ifndef COMPRESERVE
#define COMSPEED 115200 /* Baud rate */
#define COMDATA 8 /* Data bits */
#define COMPARITY 0 /* Parity: 0=None, 1=Odd, 2=Even */
#define COMSTOP 1 /* Stop bits */
#endif

#endif /* CONFIG_SERIAL_H */

0 comments on commit e817a34

Please sign in to comment.