Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 1 | ################################################################################ |
| 2 | ## |
| 3 | ## This file is part of the coreboot project. |
| 4 | ## |
| 5 | ## Copyright (C) 2014 Google Inc. |
| 6 | ## Copyright (C) 2012-2013 The ChromiumOS Authors |
| 7 | ## Copyright (C) 2012 Alexandru Gagniuc <mr.nuke.me@gmail.com> |
| 8 | ## Copyright (C) 2009-2010 coresystems GmbH |
| 9 | ## Copyright (C) 2009 Ronald G. Minnich |
| 10 | ## |
| 11 | ## This program is free software; you can redistribute it and/or modify |
| 12 | ## it under the terms of the GNU General Public License as published by |
| 13 | ## the Free Software Foundation; version 2 of the License. |
| 14 | ## |
| 15 | ## This program is distributed in the hope that it will be useful, |
| 16 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | ## GNU General Public License for more details. |
| 19 | ## |
| 20 | ## You should have received a copy of the GNU General Public License |
| 21 | ## along with this program; if not, write to the Free Software |
| 22 | ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 23 | ## |
| 24 | ################################################################################ |
| 25 | |
| 26 | ################################################################################ |
| 27 | # Take care of subdirectories |
| 28 | ################################################################################ |
| 29 | |
| 30 | subdirs-y += armv8/ |
| 31 | |
| 32 | ################################################################################ |
| 33 | # ARM specific options |
| 34 | ################################################################################ |
| 35 | |
| 36 | ifeq ($(CONFIG_ARCH_ROMSTAGE_ARM64),y) |
| 37 | CBFSTOOL_PRE1_OPTS = -m arm64 -b $(CONFIG_BOOTBLOCK_ROM_OFFSET) -H $(CONFIG_CBFS_HEADER_ROM_OFFSET) -o $(CONFIG_CBFS_ROM_OFFSET) |
| 38 | endif |
| 39 | |
| 40 | ################################################################################ |
| 41 | # bootblock |
| 42 | ################################################################################ |
| 43 | |
| 44 | ifeq ($(CONFIG_ARCH_BOOTBLOCK_ARM64),y) |
| 45 | |
| 46 | bootblock-y += div0.c |
| 47 | bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += early_console.c |
| 48 | |
| 49 | bootblock-y += id.S |
| 50 | $(obj)/arch/arm64/id.bootblock.o: $(obj)/build.h |
| 51 | |
| 52 | bootblock-y += stages.c |
| 53 | bootblock-y += eabi_compat.c |
| 54 | |
| 55 | bootblock-y += memset.S |
| 56 | bootblock-y += memcpy.S |
| 57 | bootblock-y += memmove.S |
| 58 | |
| 59 | # Build the bootblock |
| 60 | |
| 61 | $(objcbfs)/bootblock.debug: $(src)/arch/arm64/bootblock.ld $(obj)/ldoptions $$(bootblock-objs) $(obj)/config.h |
| 62 | @printf " LINK $(subst $(obj)/,,$(@))\n" |
Patrick Georgi | 4f75af9 | 2014-11-29 11:41:35 +0100 | [diff] [blame] | 63 | $(LD_bootblock) -nostdlib --gc-sections -static -o $@ -L$(obj) --start-group $(bootblock-objs) --end-group -T $(src)/arch/arm64/bootblock.ld |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 64 | |
| 65 | endif # CONFIG_ARCH_BOOTBLOCK_ARM64 |
| 66 | |
| 67 | ################################################################################ |
| 68 | # romstage |
| 69 | ################################################################################ |
| 70 | |
| 71 | ifeq ($(CONFIG_ARCH_ROMSTAGE_ARM64),y) |
| 72 | |
| 73 | romstage-y += stages.c |
| 74 | romstage-y += div0.c |
| 75 | romstage-y += early_console.c |
| 76 | romstage-y += eabi_compat.c |
| 77 | romstage-y += memset.S |
| 78 | romstage-y += memcpy.S |
| 79 | romstage-y += memmove.S |
| 80 | romstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c |
| 81 | |
| 82 | # Build the romstage |
| 83 | |
| 84 | $(objcbfs)/romstage.debug: $$(romstage-objs) $(src)/arch/arm64/romstage.ld $(obj)/ldoptions |
| 85 | @printf " LINK $(subst $(obj)/,,$(@))\n" |
Patrick Georgi | 4f75af9 | 2014-11-29 11:41:35 +0100 | [diff] [blame] | 86 | $(LD_romstage) -nostdlib --gc-sections -static -o $@ -L$(obj) --start-group $(romstage-objs) --end-group -T $(src)/arch/arm64/romstage.ld |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 87 | |
| 88 | endif # CONFIG_ARCH_ROMSTAGE_ARM64 |
| 89 | |
| 90 | ################################################################################ |
| 91 | # ramstage |
| 92 | ################################################################################ |
| 93 | |
| 94 | ifeq ($(CONFIG_ARCH_RAMSTAGE_ARM64),y) |
| 95 | |
| 96 | ramstage-y += stages.c |
| 97 | ramstage-y += div0.c |
| 98 | ramstage-y += cpu.c |
| 99 | ramstage-y += eabi_compat.c |
| 100 | ramstage-y += boot.c |
| 101 | ramstage-y += tables.c |
| 102 | ramstage-y += memset.S |
| 103 | ramstage-y += memcpy.S |
| 104 | ramstage-y += memmove.S |
| 105 | |
| 106 | rmodules_$(ARCH-ramstage-y) += memset.S |
| 107 | rmodules_$(ARCH-ramstage-y) += memcpy.S |
| 108 | rmodules_$(ARCH-ramstage-y) += memmove.S |
| 109 | rmodules_$(ARCH-ramstage-y) += eabi_compat.c |
| 110 | |
| 111 | VBOOT_STUB_DEPS += $(obj)/arch/arm64/eabi_compat.rmodules.o |
| 112 | |
| 113 | $(eval $(call create_class_compiler,rmodules,arm64)) |
| 114 | |
| 115 | ramstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c |
| 116 | |
| 117 | ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/mainboard.c |
| 118 | |
| 119 | # Build the ramstage |
| 120 | |
| 121 | $(objcbfs)/ramstage.debug: $$(ramstage-objs) $(src)/arch/arm64/ramstage.ld $(obj)/ldoptions |
| 122 | @printf " CC $(subst $(obj)/,,$(@))\n" |
Patrick Georgi | 4f75af9 | 2014-11-29 11:41:35 +0100 | [diff] [blame] | 123 | $(LD_ramstage) -nostdlib --gc-sections -o $@ --start-group $(ramstage-objs) --end-group -T $(src)/arch/arm64/ramstage.ld |
Furquan Shaikh | 2af76f4 | 2014-04-28 16:39:40 -0700 | [diff] [blame] | 124 | |
| 125 | endif # CONFIG_ARCH_RAMSTAGE_ARM64 |