summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2014-07-31 09:28:55 -0700
committerAaron Durbin <adurbin@google.com>2014-08-11 15:42:20 +0200
commit133096b6dc31163f59f658e15f2eb342a0de2ac6 (patch)
tree39740746063a22fda57ebc1d69da812cdb031fba /src/arch
parent9d2cb7c11e7498d0fd56571edd03158fc0c96225 (diff)
coreboot classes: Add dynamic classes to coreboot
Provide functionality to create dynamic classes based on program name and architecture for which the program needs to be compiled/linked. define_class takes program_name and arch as its arguments and adds the program_name to classes-y to create dynamic class. Also, compiler toolset is created for the specified arch. All the files for this program can then be added to program_name-y += .. Ensure that define_class is called before any files are added to the class. Check subdirs-y for order of directory inclusion. One such example of dynamic class is rmodules. Multiple rmodules can be used which need to be compiled for different architectures. With dynamic classes, this is possible. Change-Id: Ie143ed6f79ced5f58c200394cff89b006bc9b342 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: http://review.coreboot.org/6426 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/Makefile.inc3
-rw-r--r--src/arch/x86/lib/Makefile.inc6
2 files changed, 4 insertions, 5 deletions
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 90a697cdeb..036dc1a7a0 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -308,10 +308,9 @@ endif
ramstage-libs ?=
-$(eval $(call create_class_compiler,rmodules,x86_32))
ifeq ($(CONFIG_RELOCATABLE_RAMSTAGE),y)
-$(eval $(call rmodule_link,$(objcbfs)/ramstage.debug, $(objgenerated)/ramstage.o, $(CONFIG_HEAP_SIZE)))
+$(eval $(call rmodule_link,$(objcbfs)/ramstage.debug, $(objgenerated)/ramstage.o, $(CONFIG_HEAP_SIZE),x86_32))
# The rmodule_link defintion creates an elf file with .rmod extension.
$(objcbfs)/ramstage.elf: $(objcbfs)/ramstage.debug.rmod
diff --git a/src/arch/x86/lib/Makefile.inc b/src/arch/x86/lib/Makefile.inc
index 0a3a5757c9..22306f1874 100644
--- a/src/arch/x86/lib/Makefile.inc
+++ b/src/arch/x86/lib/Makefile.inc
@@ -30,8 +30,8 @@ smm-y += memcpy.c
smm-y += memmove.c
smm-y += rom_media.c
-rmodules-y += memset.c
-rmodules-y += memcpy.c
-rmodules-y += memmove.c
+rmodules_x86_32-y += memset.c
+rmodules_x86_32-y += memcpy.c
+rmodules_x86_32-y += memmove.c
endif # CONFIG_ARCH_RAMSTAGE_X86_32 \ No newline at end of file