This document defines the new configuration language for LinuxBIOS.
\section{Goals}
-The goals of the new language are these:
+The goals of the new language are these:
\begin{itemize}
\item Simplified Makefiles so people can see what is set
\item Move from the regular-expression-based language to something
\item make the specification easier for people to use and understand
\item allow unique register-set-specifiers for each chip
\item allow generic register-set-specifiers for each chip
-\item generate static initialization code, as needed, for the
-specifiers.
+\item generate static initialization code, as needed, for the
+specifiers.
\end{itemize}
\section{Language}
Here is the new language. It is very similar to the old one, differing
-in only a few respects. It borrows heavily from Greg Watson's suggestions.
+in only a few respects. It borrows heavily from Greg Watson's suggestions.
-I am presenting it in a pseudo-BNF in the hopes it will be easier. Things
-in '' are keywords; things in ``'' are strings in the actual text.
+I am presenting it in a pseudo-BNF in the hopes it will be easier. Things
+in '' are keywords; things in ``'' are strings in the actual text.
\begin{verbatim}
#exprs are composed of factor or factor + factor etc.
expr ::= factor ( ``+'' factor | ``-'' factor | )*
#factors are term or term * term or term / term or ...
factor ::= term ( ``*'' term | ``/'' term | ... )*
-#
+#
unary-op ::= ``!'' ID
# term is a number, hexnumber, ID, unary-op, or a full-blown expression
term ::= NUM | XNUM | ID | unary-op | ``(`` expr ``)''
# Option command. Can be an expression or quote-string.
# Options are used in the config tool itself (in expressions and 'if')
# and are also passed to the C compiler when building linuxbios.
-# It is an error to have two option commands in a file.
+# It is an error to have two option commands in a file.
# It is an error to have an option command after the ID has been used
# in an expression (i.e. 'set after used' is an error)
option ::= 'option' ID '=' (``value'' | term)
# Default command. The ID is set to this value if no option command
-# is scanned.
-# Multiple defaults for an ID will produce warning, but not errors.
+# is scanned.
+# Multiple defaults for an ID will produce warning, but not errors.
# It is OK to scan a default command after use of an ID.
# Options always over-ride defaults.
default ::= 'default' ID '=' (``value'' | term)
# the mainboard, southbridge, northbridge commands
# cause sourcing of Config.lb files as in the old config tool
-# as parts are sourced, a device tree is built. The structure
+# as parts are sourced, a device tree is built. The structure
# of the tree is determined by the structure of the components
# as they are specified. To attach a superio to a southbridge, for
# example, one would do this:
-# southbridge acer/5432
-# superio NSC/123
-# end
+# southbridge acer/5432
+# superio nsc/123
+# end
# end
# the tool generates static initializers for this hierarchy.
mainboard ::= 'mainboard' PATH (statements)* 'end'
# standard linuxbios commands
-southbridge ::= 'southbridge' PATH (statemnts)* 'end'
-northbridge ::= 'northbridge' PATH (statemnts)* 'end'
-superio ::= 'superio PATH (statemnts)* 'end'
-cpu ::= 'cpu' PATH (statemnts)* 'end'
-arch ::= 'arch' PATH (statemnts)* 'end'
+southbridge ::= 'southbridge' PATH (statemnts)* 'end'
+northbridge ::= 'northbridge' PATH (statemnts)* 'end'
+superio ::= 'superio PATH (statemnts)* 'end'
+cpu ::= 'cpu' PATH (statemnts)* 'end'
+arch ::= 'arch' PATH (statemnts)* 'end'
# files for building linuxbios
-# include a file in crt0.S
-mainboardinit ::= 'mainboardinit' PATH
+# include a file in crt0.S
+mainboardinit ::= 'mainboardinit' PATH
-# object file
+# object file
object ::= 'object' PATH
# driver objects are just built into the image in a different way
driver ::= 'driver' PATH
addaction ::= 'addaction' PATH ``ACTION''
# statements
-statement ::=
+statement ::=
option
| default
| cpu
target x
# over-ride the default rom size in the mainboard file
-option ROM_SIZE=0x100000
+option CONFIG_ROM_SIZE=1024*1024
mainboard amd/solo
end
arch i386 end
cpu k8 end
#
-option DEBUG=1
-default USE_FALLBACK_IMAGE=1
+option CONFIG_DEBUG=1
+default CONFIG_USE_FALLBACK_IMAGE=1
option A=(1+2)
option B=0xa
#
###
### Build our reset vector (This is where linuxBIOS is entered)
###
-if USE_FALLBACK_IMAGE
- mainboardinit cpu/i386/reset16.inc
- ldscript cpu/i386/reset16.lds
+if CONFIG_USE_FALLBACK_IMAGE
+ mainboardinit cpu/i386/reset16.inc
+ ldscript cpu/i386/reset16.lds
else
- mainboardinit cpu/i386/reset32.inc
- ldscript cpu/i386/reset32.lds
+ mainboardinit cpu/i386/reset32.inc
+ ldscript cpu/i386/reset32.lds
end
.
.
.
-if USE_FALLBACK_IMAGE mainboardinit arch/i386/lib/noop_failover.inc end
+if CONFIG_USE_FALLBACK_IMAGE mainboardinit arch/i386/lib/noop_failover.inc end
#
###
### Romcc output
###
-#makerule ./failover.E dep "$(MAINBOARD)/failover.c" act "$(CPP) -I$(TOP)/src $(CPPFLAGS) $(MAINBOARD)/failover.c > ./failever.E"
+#makerule ./failover.E dep "$(CONFIG_MAINBOARD)/failover.c" act "$(CPP) -I$(TOP)/src $(CPPFLAGS) $(CONFIG_MAINBOARD)/failover.c > ./failever.E"
#makerule ./failover.inc dep "./romcc ./failover.E" act "./romcc -O ./failover.E > failover.inc"
#mainboardinit ./failover.inc
-makerule ./auto.E dep "$(MAINBOARD)/auto.c" act "$(CPP) -I$(TOP)/src -$(ROMCCPPFLAGS) $(CPPFLAGS) $(MAINBOARD)/auto.c > ./auto.E"
+makerule ./auto.E dep "$(CONFIG_MAINBOARD)/auto.c" act "$(CPP) -I$(TOP)/src -$(ROMCCPPFLAGS) $(CPPFLAGS) $(CONFIG_MAINBOARD)/auto.c > ./auto.E"
makerule ./auto.inc dep "./romcc ./auto.E" act "./romcc -O ./auto.E > auto.inc"
mainboardinit ./auto.inc
#
###
-### Include the secondary Configuration files
+### Include the secondary Configuration files
###
northbridge amd/amdk8
end
southbridge amd/amd8111
end
#mainboardinit arch/i386/smp/secondary.inc
-superio NSC/pc87360
+superio nsc/pc87360
register "com1={1} com2={0} floppy=1 lpt=1 keyboard=1"
end
dir /pc80
##object mainboard.o
driver mainboard.o
object static_devices.o
-if HAVE_MP_TABLE object mptable.o end
-if HAVE_PIRQ_TABLE object irq_tables.o end
+if CONFIG_HAVE_MP_TABLE object mptable.o end
+if CONFIG_HAVE_PIRQ_TABLE object irq_tables.o end
### Location of the DIMM EEPROMS on the SMBUS
### This is fixed into a narrow range by the DIMM package standard.
###
#
### The linuxBIOS bootloader.
###
-option PAYLOAD_SIZE = (ROM_SECTION_SIZE - ROM_IMAGE_SIZE)
-option CONFIG_ROM_STREAM_START = (0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1)
+option CONFIG_PAYLOAD_SIZE = (CONFIG_ROM_SECTION_SIZE - CONFIG_ROM_IMAGE_SIZE)
+option CONFIG_ROM_PAYLOAD_START = (0xffffffff - CONFIG_ROM_SIZE + CONFIG_ROM_SECTION_OFFSET + 1)
#
\end{verbatim}
\begin{verbatim}
TOP:=/home/rminnich/src/yapps2/freebios2
TARGET_DIR:=x
-export MAINBOARD:=/home/rminnich/src/yapps2/freebios2/src/mainboard/amd/solo
-export ARCH:=i386
-export _RAMBASE:=0x4000
-export ROM_IMAGE_SIZE:=65535
-export PAYLOAD_SIZE:=131073
+export CONFIG_MAINBOARD:=/home/rminnich/src/yapps2/freebios2/src/mainboard/amd/solo
+export CONFIG_ARCH:=i386
+export CONFIG_RAMBASE:=0x4000
+export CONFIG_ROM_IMAGE_SIZE:=65535
+export CONFIG_PAYLOAD_SIZE:=131073
export CONFIG_MAX_CPUS:=1
-export HEAP_SIZE:=8192
-export STACK_SIZE:=8192
-export MEMORY_HOLE:=0
-export LINUXBIOS_VERSION:=1.1.0
-export CC:=$(CROSS_COMPILE)gcc
+export CONFIG_HEAP_SIZE:=8192
+export CONFIG_STACK_SIZE:=8192
+export CONFIG_MEMORY_HOLE:=0
+export COREBOOT_VERSION:=1.1.0
+export CC:=$(CONFIG_CROSS_COMPILE)gcc
\end{verbatim}
-In other words, instead of expressions, we see the values. It's easier to
-deal with.
+In other words, instead of expressions, we see the values. It's easier to
+deal with.