mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
Start changing docs.
Trying to get dtc to compile correctly, getting errors from things I don't understand. So this happens: [rminnich@q LinuxBIOSv3]$ make CHK /home/rminnich/src/bios/LinuxBIOSv3/include/linuxbios/version.h building lzma building initram make: *** No rule to make target `/home/rminnich/src/bios/LinuxBIOSv3/mainboard/"emulation/qemu-i386"/dts', needed by `/home/rminnich/src/bios/LinuxBIOSv3/dtc.c'. Stop. Until such time as others beside Stefan and I are committing, I am auto-acking. Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@56 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
f2000cd4ad
commit
a65cfa9385
2 changed files with 201 additions and 2 deletions
|
@ -55,7 +55,7 @@ initram:
|
|||
# This needs to be compressed with the default compressor
|
||||
#
|
||||
|
||||
linuxbios_ram:
|
||||
linuxbios_ram: dtc.o
|
||||
$(Q)echo "building linuxbios_ram"
|
||||
|
||||
#
|
||||
|
@ -107,4 +107,17 @@ linuxbios.rom: linuxbios.lar linuxbios.init linuxbios.vpd linuxbios.jump
|
|||
$(objtree)/linuxbios.vpd $(objtree)/linuxbios.jump > \
|
||||
$(objtree)/linuxbios.rom
|
||||
|
||||
# miscellaneous important targets.
|
||||
$(obj)/mainboard.o: $(obj)/dtc.o
|
||||
|
||||
$(obj)/dtc.o: $(obj)/dtc.c
|
||||
$(obj)/dtc.c: $(obj)/mainboard/$(CONFIG_CONFIG_MAINBOARD_NAME)/dts $(src)/dts $(obj)/dtc
|
||||
$(obj)/dtc -O lb $(shell ecoh $(src)/mainboard/$(CONFIG_CONFIG_MAINBOARD_NAME)/dts) >$(obj)/dtc.c
|
||||
|
||||
|
||||
$(obj)/dtc:
|
||||
$(MAKE) -C $(srctree)/util/dtc/
|
||||
cp $(srctree)/util/dtc/dtc $(obj)
|
||||
|
||||
|
||||
.PHONY: linuxbios.rom
|
||||
|
|
|
@ -542,10 +542,113 @@ status collapsed
|
|||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
How DTC will compile the DTS
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Forth has no real tpyes to speak of -- it is a very old language, and the
|
||||
original use did ont really envision types.
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
The DTS, potentially, defines several types.
|
||||
We use the Forth naming conventions and their usage to determine what they
|
||||
are.
|
||||
THe set of types used if very simple, to keep from having to modify the
|
||||
DTS specification.
|
||||
At the same time, we want some type information so we can catch as many
|
||||
errors as possible at compile time.
|
||||
The types that we will generate are as follows:
|
||||
\end_layout
|
||||
|
||||
\begin_layout Itemize
|
||||
char * -- for assignments such as x -=
|
||||
\begin_inset Quotes eld
|
||||
\end_inset
|
||||
|
||||
y
|
||||
\begin_inset Quotes erd
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Itemize
|
||||
unsgiend long [], for assignments such as x = <y z>
|
||||
\end_layout
|
||||
|
||||
\begin_layout Itemize
|
||||
unsigned long, for assignments such as #a = b
|
||||
\end_layout
|
||||
|
||||
\begin_layout Itemize
|
||||
void *, for assignments such as a = <&b>
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Note a problem here: you can't tell the type absent an assignment.
|
||||
Should we add type keywords?
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
Note that we are going to need an unflatten tool to generate the device
|
||||
tree.
|
||||
The steps are as follows:
|
||||
\end_layout
|
||||
|
||||
\begin_layout Itemize
|
||||
Compile time creation of the c structures
|
||||
\end_layout
|
||||
|
||||
\begin_layout Itemize
|
||||
run-time filling in the blanks with data about real hardware
|
||||
\end_layout
|
||||
|
||||
\begin_layout Itemize
|
||||
runtime generation of the OFW device tree
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
The DTS is defined per each mainboard.
|
||||
It uses elements which are actually define elsewhere.
|
||||
-- for examplle, if the user references the intel 440bx northbridge, the
|
||||
DTC must pull in northbidge/intel/440bx/dts to get the full set of definitions.
|
||||
Call the full DTS the base DTS; call the DTS mentioned in the mainboard
|
||||
DTS the instance DTS.
|
||||
Each member of the DTS from the base DTS must be initialized in some manner
|
||||
so we can infter type and default values.
|
||||
The instance can define some,all, or none of the values.
|
||||
The DTC will create a c file iwth structure declarations and initializaions
|
||||
in it.
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
We show how this looks in
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
\begin_inset Float figure
|
||||
wide false
|
||||
sideways false
|
||||
status open
|
||||
|
||||
\begin_layout Caption
|
||||
How we get from the mainboard DTS to C
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Section
|
||||
The major change -- the death of the static tree
|
||||
The major change -- the death of the static tree (we're not doing this after
|
||||
all)
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
|
@ -602,6 +705,89 @@ Traditional linuxbios ram code (LAR, etc.)
|
|||
Load payload and start it
|
||||
\end_layout
|
||||
|
||||
\begin_layout Section
|
||||
Makefile targets
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
lzma
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
This is for creating the linuxbios.lzma file.
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
initram
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
This is for creating initram.
|
||||
The actual files used can be defined in any Makefile that is part of this
|
||||
build.
|
||||
Typcially, the files are defined in the northbridge Makeflie.
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
linuxbios_ram
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
This is the code that runs in RAM.
|
||||
This is almost always hardwaremain().
|
||||
This code is almost always defined by the mainboard Makefile.
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
payload
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
This is what we boot.
|
||||
Almost always this is FILO, Etherboot, Linux kernel, Open FirmWare, and
|
||||
so on.
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
linuxbios.lar
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
This is the
|
||||
\begin_inset Quotes eld
|
||||
\end_inset
|
||||
|
||||
file system
|
||||
\begin_inset Quotes erd
|
||||
\end_inset
|
||||
|
||||
that contains the lzma, initram, linuxbios_ram, and payload targets.
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
jumpvector
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
This is the jumpvector.
|
||||
Jumpvector is entered at power on reset (POR) or hard or soft reset.
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
vpd
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
This contains information that a payload can use to find out about the mainboard.
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Section
|
||||
Conclusions
|
||||
\end_layout
|
||||
|
|
Loading…
Add table
Reference in a new issue