summaryrefslogtreecommitdiff
path: root/util/pgtblgen/Makefile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'util/pgtblgen/Makefile.inc')
-rw-r--r--util/pgtblgen/Makefile.inc19
1 files changed, 19 insertions, 0 deletions
diff --git a/util/pgtblgen/Makefile.inc b/util/pgtblgen/Makefile.inc
new file mode 100644
index 0000000000..c4f3ef37b6
--- /dev/null
+++ b/util/pgtblgen/Makefile.inc
@@ -0,0 +1,19 @@
+ifeq ($(CONFIG_ARCH_BOOTBLOCK_X86_64),y)
+
+PGTBLGEN:= $(obj)/pgtblgen
+
+cbfs-files-y += pagetables
+pagetables-file := $(obj)/mainboard/$(MAINBOARDDIR)/pagetables
+pagetables-type := raw
+pagetables-compression := none
+pagetables-COREBOOT-position := $(CONFIG_ARCH_X86_64_PGTBL_LOC)
+
+$(obj)/mainboard/$(MAINBOARDDIR)/pagetables: $(PGTBLGEN) $(obj)/config.h
+ printf " TOOL Creating page tables\n"
+ $(PGTBLGEN) -b $(CONFIG_ARCH_X86_64_PGTBL_LOC) -a x86_64 -o $@
+
+$(PGTBLGEN): util/pgtblgen/pgtblgen.c
+ printf " MAKE Creating PGTBLGEN tool\n"
+ $(HOSTCC) $< -I$(obj) -o $@
+
+endif