diff --git a/Makefile b/Makefile index 140ef175e5..4019a41ae8 100644 --- a/Makefile +++ b/Makefile @@ -459,6 +459,10 @@ include .config # To avoid any implicit rule to kick in, define an empty command .config .kconfig.d: ; +MAINBOARDDIR=$(shell echo $(CONFIG_MAINBOARD_NAME)) + +include mainboard/$(MAINBOARDDIR)/Makefile.target + # If .config is newer than include/linuxbios/autoconf.h, someone tinkered # with it and forgot to run make oldconfig. # If kconfig.d is missing then we are probarly in a cleaned tree so @@ -977,7 +981,7 @@ clean: archclean $(clean-dirs) # mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS)) mrproper: rm-files := $(wildcard $(MRPROPER_FILES)) -mrproper-dirs := $(addprefix _mrproper_,Documentation/DocBook scripts) +mrproper-dirs := $(addprefix _mrproper_,doc scripts) .PHONY: $(mrproper-dirs) mrproper archmrproper $(mrproper-dirs): @@ -1000,19 +1004,6 @@ distclean: mrproper -type f -print | xargs rm -f -# Packaging of the kernel to various formats -# --------------------------------------------------------------------------- -# rpm target kept for backward compatibility -package-dir := $(srctree)/scripts/package - -.PHONY: %-pkg rpm - -%pkg: FORCE - $(Q)$(MAKE) -f $(package-dir)/Makefile $@ -rpm: FORCE - $(Q)$(MAKE) -f $(package-dir)/Makefile $@ - - # Brief documentation of the typical targets used # --------------------------------------------------------------------------- @@ -1035,7 +1026,6 @@ help: @echo ' dir/ - Build all files in dir and below' @echo ' dir/file.[ois] - Build specified target only' @echo ' dir/file.ko - Build module including final link' - @echo ' rpm - Build a kernel as an RPM package' @echo ' tags/TAGS - Generate tags file for editors' @echo ' cscope - Generate cscope index' @echo ' kernelrelease - Output the release version string' @@ -1047,11 +1037,8 @@ help: @echo ' checkstack - Generate a list of stack hogs' @echo ' namespacecheck - Name space analysis on compiled kernel' @echo '' - @echo 'Kernel packaging:' - @$(MAKE) -f $(package-dir)/Makefile help - @echo '' @echo 'Documentation targets:' - @$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp + @$(MAKE) -f $(srctree)/doc/Makefile dochelp @echo '' @echo 'Architecture specific targets ($(ARCH)):' @$(if $(archhelp),$(archhelp),\ @@ -1074,7 +1061,7 @@ help: # Documentation targets # --------------------------------------------------------------------------- %docs: scripts_basic FORCE - $(Q)$(MAKE) $(build)=Documentation/DocBook $@ + $(Q)$(MAKE) $(build)=doc $@ else # KBUILD_EXTMOD diff --git a/arch/x86/Makefile.target b/arch/x86/Makefile.target index b0c31605a2..cfa2125bb4 100644 --- a/arch/x86/Makefile.target +++ b/arch/x86/Makefile.target @@ -113,9 +113,8 @@ $(objtree)/mainboard.o: $(objtree)/statictree.o $(objtree)/statictree.o: $(objtree)/statictree.c $(CC) $(CFLAGS) $(LINUXBIOSINCLUDE) -c -o $(objtree)/statictree.o $(objtree)/statictree.c -$(objtree)/statictree.c: $(shell echo $(srctree)/mainboard/$(CONFIG_MAINBOARD_NAME)/dts) $(objtree)/dtc - $(objtree)/dtc -O lb $(shell echo $(srctree)/mainboard/$(CONFIG_MAINBOARD_NAME)/dts) >$(objtree)/statictree.c - +$(objtree)/statictree.c: mainboard/$(MAINBOARDDIR)/dts $(objtree)/dtc + $(objtree)/dtc -O lb mainboard/$(MAINBOARDDIR)/dts >$(objtree)/statictree.c $(objtree)/dtc: $(MAKE) -C $(srctree)/util/dtc/ diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000000..23a01fdd28 --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,11 @@ +# +# Documentation Makefile +# + + +dochelp: + @echo ' LinuxBIOS internal documentation in different formats:' + @echo ' pdfdocs (PDF)' + +pdfdocs: + @echo ' Not implemented yet. Please use lyx for now.' diff --git a/mainboard/emulation/qemu-i386/Makefile.target b/mainboard/emulation/qemu-i386/Makefile.target new file mode 100644 index 0000000000..7f51adb739 --- /dev/null +++ b/mainboard/emulation/qemu-i386/Makefile.target @@ -0,0 +1,12 @@ + +# +# This is duplicate in arch/x86/ where it does not belong. +# How can we cross reference? +# + +linuxbios.vpd: + $(Q)printf "Building dummy VPD ..." + $(Q)dd if=/dev/zero of=$(objtree)/linuxbios.vpd bs=240 count=1 + $(Q)printf "ok.\n" + + diff --git a/mainboard/emulation/qemu-i386/config.h b/mainboard/emulation/qemu-i386/config.h new file mode 100644 index 0000000000..4fcbd560bf --- /dev/null +++ b/mainboard/emulation/qemu-i386/config.h @@ -0,0 +1,5 @@ + +struct mainboard_emulation_qemu_i386_config { + int nothing; +}; +