coreboot/Makefile
Ronald G. Minnich 4a6a5313bf The real change here is that paths can now be part of the node label
in dts. This gets rid of the ugly pcipath etc. properties. 

So, instead of

  somedevice {pcipath="1,0";};

We say pci@1,0{ etc. etc. };

As per my agreement I agree to document this in the design doc. 
The alix1c compiles but is untested, and will probably need some work. 
I will do these additional tasks on friday.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by:  Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

M    include/device/path.h
Add LPC path type, replacing SUPERIO path type, since SUPERIO is only
one type of LPC. Clean up tabbing in parts of the file (cosmetic).

M    mainboard/emulation/qemu-x86/dts
Modify this dts for the new path naming scheme.

M    device/pci_device.c
Change what used to be a BIOS_ERR (but is no longer) to a BIOS_NOTICE. 
The change is that the device tree includes more than just PCI devices, 
so finding a non-PCI device is no longer fatal; a notice is useful. 

M    device/device_util.c
Add string creation for PCI_BUS nad LPC.

M    northbridge/intel/i440bxemulation/dts
Add ID info for the chip. 

M    northbridge/intel/i440bxemulation/i440bx.c
Change initialization so it is explicitly for the .ops struct member. 

M    util/dtc/flattree.c
Add support for the new path naming scheme. 
I'm in the middle of this commit so I'll fix the hard-coded lengths 
next commit. 
Also delete dead code between #if 0 and /* and //

M    util/x86emu/vm86.c
comment out unused variables. these may someday be use, not ready
to delete them yet. 

M    Makefile
Change -O2 to -g. We need debugging on LAR far more than we need performance. 



git-svn-id: svn://coreboot.org/repository/coreboot-v3@593 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-02-13 21:00:20 +00:00

166 lines
5.3 KiB
Makefile

##
## This file is part of the coreboot project.
##
## coreboot build system Lbuild
##
## Copyright (C) 2007 coresystems GmbH
## (Written by Stefan Reinauer <stepan@coresystems.de> for coresystems GmbH)
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
##
VERSION = 3
PATCHLEVEL = 0
SUBLEVEL = 0
have_dotconfig := $(wildcard .config)
src := $(shell pwd)
obj := $(shell pwd)/build
export src obj
# Do not print "Entering directory ...".
MAKEFLAGS += --no-print-directory
CC := gcc
CFLAGS := -Os -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-Werror-implicit-function-declaration -Wstrict-aliasing \
-fno-common -ffreestanding -fno-builtin -fomit-frame-pointer \
-mpreferred-stack-boundary=2 -mregparm=3 -pipe
# FIXME: Does stack boundary or regparm break the code on real hardware?
HOSTCC := gcc
HOSTCXX := g++
HOSTCFLAGS := -Wall -Wstrict-prototypes -g -fomit-frame-pointer \
-Wno-unused -Wno-sign-compare
LEX := flex
LYX := lyx
DOXYGEN := doxygen
DOXYGEN_OUTPUT_DIR := doxygen
# Make is silent per default, but 'make V=1' will show all compiler calls.
ifneq ($(V),1)
Q := @
endif
KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)
export KERNELVERSION
include $(shell $(src)/util/xcompile/xcompile > $(src)/.xcompile || \
{ echo "complete\\ toolchain" && rm -f $(src)/.xcompile && exit 1; }; echo $(src)/.xcompile)
ifeq ($(strip $(have_dotconfig)),)
all:
$(Q)printf "Please run make menuconfig, xconfig or config first.\n"
else
include $(src)/.config
ifneq ($(CONFIG_LOCALVERSION),"")
COREBOOT_EXTRA_VERSION := -$(shell echo $(CONFIG_LOCALVERSION))
endif
all: prepare prepare2 $(obj)/coreboot.rom
$(Q)printf " DONE\n"
ARCH:=$(shell echo $(CONFIG_ARCH))
MAINBOARDDIR=$(shell echo $(CONFIG_MAINBOARD_NAME))
export MAINBOARDDIR
COREBOOTINCLUDE := -I$(src) -Iinclude \
-I$(src)/include \
-I$(src)/include/arch/$(ARCH)/ \
-include $(obj)/config.h \
-include $(obj)/build.h
CC := $(CC_$(ARCH))
AS := $(AS_$(ARCH))
LD := $(LD_$(ARCH))
NM := $(NM_$(ARCH))
OBJCOPY := $(OBJCOPY_$(ARCH))
AR := $(AR_$(ARCH))
CFLAGS += $(CFLAGS_$(ARCH))
CPPFLAGS := $(COREBOOTINCLUDE)
CFLAGS += $(COREBOOTINCLUDE)
# Note: This _must_ come after 'CC' is set for the second time in this
# Makefile (see above), otherwise the build would break if 'gcc' isn't
# the compiler actually used for the build (e.g. on cross compiler setups).
CFLAGS += -nostdinc -isystem `$(CC) -print-file-name=include`
include lib/Makefile
include device/Makefile
include mainboard/$(MAINBOARDDIR)/Makefile
include Rules.make
include northbridge/*/*/Makefile
include southbridge/*/*/Makefile
include superio/*/*/Makefile
include arch/$(ARCH)/Makefile
endif
include util/Makefile
doc:
$(Q)$(LYX) -e pdf doc/design/newboot.lyx
doxy: doxygen
doxygen:
$(Q)$(DOXYGEN) util/doxygen/Doxyfile.coreboot
prepare:
$(Q)mkdir -p $(obj)
# FIXME: If .config changed, a rebuild is required.
prepare2:
$(Q)printf " CP $(subst $(shell pwd)/,,$(obj)/config.h)\n"
$(Q)cp $(src)/.tmpconfig.h $(obj)/config.h
$(Q)printf " GEN $(subst $(shell pwd)/,,$(obj)/build.h)\n"
$(Q)printf "#define COREBOOT_VERSION \"$(KERNELVERSION)\"\n" > $(obj)/build.h
$(Q)printf "#define COREBOOT_EXTRA_VERSION \"$(COREBOOT_EXTRA_VERSION)\"\n" >> $(obj)/build.h
$(Q)printf "#define COREBOOT_BUILD \"`LANG= date`\"\n" >> $(obj)/build.h
$(Q)printf "\n" >> $(obj)/build.h
$(Q)printf "#define COREBOOT_COMPILER \"$(shell LANG= $(CC) --version | head -n1)\"\n" >> $(obj)/build.h
$(Q)printf "#define COREBOOT_ASSEMBLER \"$(shell LANG= $(AS) --version | head -n1)\"\n" >> $(obj)/build.h
$(Q)printf "#define COREBOOT_LINKER \"$(shell LANG= $(LD) --version | head -n1)\"\n" >> $(obj)/build.h
$(Q)printf "#define COREBOOT_COMPILE_TIME \"`LANG= date +%T`\"\n" >> $(obj)/build.h
$(Q)printf "#define COREBOOT_COMPILE_BY \"$(shell PATH=$$PATH:/usr/ucb whoami)\"\n" >> $(obj)/build.h
$(Q)printf "#define COREBOOT_COMPILE_HOST \"$(shell hostname)\"\n" >> $(obj)/build.h
$(Q)printf "#define COREBOOT_COMPILE_DOMAIN \"$(shell test `uname -s` = "Linux" && dnsdomainname || domainname)\"\n" >> $(obj)/build.h
clean:
$(Q)printf " CLEAN $(subst $(shell pwd)/,,$(obj))\n"
$(Q)rm -rf $(obj)
$(Q)printf " CLEAN $(subst $(shell pwd)/,,$(DOXYGEN_OUTPUT_DIR))\n"
$(Q)rm -rf $(DOXYGEN_OUTPUT_DIR)
$(Q)printf " CLEAN doc/design/newboot.pdf\n"
$(Q)rm -f doc/design/newboot.pdf
distclean: clean
$(Q)printf " CLEAN .kconfig.d .config .tmpconfig.h .config.old .xcompile\n"
$(Q)rm -f .kconfig.d .config .tmpconfig.h .config.old .xcompile
%.o: %.c
$(Q)printf " CC $(subst $(shell pwd)/,,$(@))\n"
$(Q)$(CC) $(CFLAGS) -o $@ -c $<
.PHONY: doc doxygen depends prepare prepare2 clean distclean