1 ## SPDX-License-Identifier: GPL-2.0-only
3 ppc64_flags
= -I
$(src
)/arch
/ppc64
/ -mbig-endian
-mcpu
=power8
-mtune
=power8
7 ################################################################################
9 ################################################################################
10 ifeq ($(CONFIG_ARCH_BOOTBLOCK_PPC64
),y
)
12 bootblock-y
= bootblock_crt0.S
13 bootblock-y
+= arch_timer.c
16 $(top
)/src
/lib
/memchr.c \
17 $(top
)/src
/lib
/memcmp.c \
18 $(top
)/src
/lib
/memcpy.c \
19 $(top
)/src
/lib
/memmove.c \
20 $(top
)/src
/lib
/memset.c
22 bootblock-generic-ccopts
+= $(ppc64_flags
)
24 $(objcbfs
)/bootblock.debug
: $$(bootblock-objs
)
25 @printf
" LINK $(subst $(obj)/,,$(@))\n"
26 $(LD_bootblock
) $(LDFLAGS_bootblock
) -o
$@
-L
$(obj
) \
27 -T
$(call src-to-obj
,bootblock
,$(CONFIG_MEMLAYOUT_LD_FILE
)) --whole-archive
--start-group
$(filter-out %.
ld,$(bootblock-objs
)) \
28 $(LIBGCC_FILE_NAME_bootblock
) --end-group
$(COMPILER_RT_bootblock
)
32 ################################################################################
34 ################################################################################
35 ifeq ($(CONFIG_ARCH_ROMSTAGE_PPC64
),y
)
37 romstage-y
+= arch_timer.c
39 romstage-y
+= stages.c
41 $(top
)/src
/lib
/memchr.c \
42 $(top
)/src
/lib
/memcmp.c \
43 $(top
)/src
/lib
/memcpy.c \
44 $(top
)/src
/lib
/memmove.c \
45 $(top
)/src
/lib
/memset.c
47 romstage-
$(CONFIG_COLLECT_TIMESTAMPS
) += timestamp.c
51 $(objcbfs
)/romstage.debug
: $$(romstage-objs
)
52 @printf
" LINK $(subst $(obj)/,,$(@))\n"
53 $(LD_romstage
) $(LDFLAGS_romstage
) -o
$@
-L
$(obj
) -T
$(call src-to-obj
,romstage
,$(CONFIG_MEMLAYOUT_LD_FILE
)) --whole-archive
--start-group
$(filter-out %.
ld,$(romstage-objs
)) --end-group
$(COMPILER_RT_romstage
)
55 romstage-c-ccopts
+= $(ppc64_flags
)
56 romstage-S-ccopts
+= $(ppc64_asm_flags
)
60 ################################################################################
62 ################################################################################
63 ifeq ($(CONFIG_ARCH_RAMSTAGE_PPC64
),y
)
65 ramstage-y
+= stages.c
66 ramstage-y
+= arch_timer.c
68 ramstage-y
+= tables.c
70 $(top
)/src
/lib
/memchr.c \
71 $(top
)/src
/lib
/memcmp.c \
72 $(top
)/src
/lib
/memcpy.c \
73 $(top
)/src
/lib
/memmove.c \
74 $(top
)/src
/lib
/memset.c
76 $(eval
$(call create_class_compiler
,rmodules
,power8
))
78 ramstage-
$(CONFIG_COLLECT_TIMESTAMPS
) += timestamp.c
80 ramstage-srcs
+= src
/mainboard
/$(MAINBOARDDIR
)/mainboard.c
84 $(objcbfs
)/ramstage.debug
: $$(ramstage-objs
)
85 @printf
" CC $(subst $(obj)/,,$(@))\n"
86 $(LD_ramstage
) $(LDFLAGS_ramstage
) -o
$@
-L
$(obj
) -T
$(call src-to-obj
,ramstage
,$(CONFIG_MEMLAYOUT_LD_FILE
)) --whole-archive
--start-group
$(filter-out %.
ld,$(ramstage-objs
)) --end-group
$(COMPILER_RT_ramstage
)
88 ramstage-c-ccopts
+= $(ppc64_flags
)
89 ramstage-S-ccopts
+= $(ppc64_asm_flags
)