arch/cortex-[a|r]/Make.defs: unify arch common source include

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an
2022-04-30 12:41:25 +08:00
committed by Xiang Xiao
parent 5677fe2153
commit 8951b0135b
7 changed files with 105 additions and 328 deletions
-64
View File
@@ -20,70 +20,6 @@
include armv7-a/Make.defs
# The vector table is the "head" object, i.e., the one that must forced into
# the link in order to draw in all of the other components
HEAD_ASRC = arm_vectortab.S
ifeq ($(CONFIG_BUILD_KERNEL),y)
crt0$(OBJEXT): crt0.c
$(CC) $(CFLAGS) -c armv7-a$(DELIM)crt0.c -o crt0$(OBJEXT)
STARTUP_OBJS = crt0$(OBJEXT)
endif
# Force the start-up logic to be at the beginning of the .text to simplify
# debug.
ifeq ($(CONFIG_PAGING),y)
CMN_ASRCS += arm_pghead.S
else
CMN_ASRCS += arm_head.S
endif
# Common assembly language files
CMN_ASRCS += arm_vectors.S arm_vectoraddrexcptn.S arm_fpuconfig.S
CMN_ASRCS += cp15_coherent_dcache.S cp15_invalidate_dcache.S
CMN_ASRCS += cp15_clean_dcache.S cp15_flush_dcache.S cp15_invalidate_dcache_all.S
CMN_ASRCS += cp15_clean_dcache_all.S cp15_flush_dcache_all.S cp15_cache_size.S
# Common C source files
CMN_CSRCS += arm_dataabort.c arm_doirq.c arm_initialstate.c arm_mmu.c
CMN_CSRCS += arm_prefetchabort.c arm_schedulesigaction.c
CMN_CSRCS += arm_sigdeliver.c arm_syscall.c arm_undefinedinsn.c
CMN_CSRCS += arm_cache.c arm_tcbinfo.c
ifeq ($(CONFIG_PAGING),y)
CMN_CSRCS += arm_allocpage.c arm_checkmapping.c arm_pginitialize.c
CMN_CSRCS += arm_va2pte.c
endif
ifeq ($(CONFIG_ARCH_ADDRENV),y)
CMN_CSRCS += arm_addrenv.c arm_addrenv_utils.c arm_pgalloc.c
ifeq ($(CONFIG_ARCH_STACK_DYNAMIC),y)
CMN_CSRCS += arm_addrenv_ustack.c
endif
ifeq ($(CONFIG_ARCH_KERNEL_STACK),y)
CMN_CSRCS += arm_addrenv_kstack.c
endif
ifeq ($(CONFIG_MM_SHM),y)
CMN_CSRCS += arm_addrenv_shm.c
endif
endif
ifeq ($(CONFIG_MM_PGALLOC),y)
CMN_CSRCS += arm_physpgaddr.c
ifeq ($(CONFIG_ARCH_PGPOOL_MAPPING),y)
CMN_CSRCS += arm_virtpgaddr.c
endif
endif
ifeq ($(CONFIG_ARCH_FPU),y)
CMN_CSRCS += arm_fpucmp.c
endif
# A1x-specific C source files
CHIP_CSRCS = a1x_boot.c a1x_irq.c a1x_pio.c a1x_lowputc.c a1x_serial.c
-66
View File
@@ -20,72 +20,6 @@
include armv7-a/Make.defs
# The vector table is the "head" object, i.e., the one that must forced into
# the link in order to draw in all of the other components
HEAD_ASRC = arm_vectortab.S
ifeq ($(CONFIG_BUILD_KERNEL),y)
crt0$(OBJEXT): crt0.c
$(CC) $(CFLAGS) -c armv7-a$(DELIM)crt0.c -o crt0$(OBJEXT)
STARTUP_OBJS = crt0$(OBJEXT)
endif
# Force the start-up logic to be at the beginning of the .text to simplify
# debug.
ifeq ($(CONFIG_PAGING),y)
CMN_ASRCS += arm_pghead.S
else
CMN_ASRCS += arm_head.S
endif
# Common assembly language files
CMN_ASRCS += arm_vectors.S arm_vectoraddrexcptn.S arm_fpuconfig.S
CMN_ASRCS += cp15_coherent_dcache.S cp15_invalidate_dcache.S
CMN_ASRCS += cp15_clean_dcache.S cp15_flush_dcache.S cp15_invalidate_dcache_all.S
CMN_ASRCS += cp15_clean_dcache_all.S cp15_flush_dcache_all.S cp15_cache_size.S
# Common C source files
CMN_CSRCS += arm_doirq.c arm_initialstate.c arm_mmu.c arm_prefetchabort.c
CMN_CSRCS += arm_schedulesigaction.c arm_dataabort.c
CMN_CSRCS += arm_sigdeliver.c arm_syscall.c arm_undefinedinsn.c
CMN_CSRCS += arm_cache.c arm_tcbinfo.c
# Configuration dependent C and assembly language files
ifeq ($(CONFIG_PAGING),y)
CMN_CSRCS += arm_allocpage.c arm_checkmapping.c arm_pginitialize.c
CMN_CSRCS += arm_va2pte.c
endif
ifeq ($(CONFIG_ARCH_ADDRENV),y)
CMN_CSRCS += arm_addrenv.c arm_addrenv_utils.c arm_pgalloc.c
ifeq ($(CONFIG_ARCH_STACK_DYNAMIC),y)
CMN_CSRCS += arm_addrenv_ustack.c
endif
ifeq ($(CONFIG_ARCH_KERNEL_STACK),y)
CMN_CSRCS += arm_addrenv_kstack.c
endif
ifeq ($(CONFIG_MM_SHM),y)
CMN_CSRCS += arm_addrenv_shm.c
endif
endif
ifeq ($(CONFIG_MM_PGALLOC),y)
CMN_CSRCS += arm_physpgaddr.c
ifeq ($(CONFIG_ARCH_PGPOOL_MAPPING),y)
CMN_CSRCS += arm_virtpgaddr.c
endif
endif
ifeq ($(CONFIG_ARCH_FPU),y)
CMN_CSRCS += arm_fpucmp.c
endif
# AM335x-specific C source files
CHIP_CSRCS = am335x_boot.c am335x_clockconfig.c am335x_pinmux.c am335x_irq.c
+70
View File
@@ -21,3 +21,73 @@
# Common ARM files
include common/Make.defs
# The vector table is the "head" object, i.e., the one that must forced into
# the link in order to draw in all of the other components
HEAD_ASRC += arm_vectortab.S
ifeq ($(CONFIG_BUILD_KERNEL),y)
crt0$(OBJEXT): crt0.c
$(CC) $(CFLAGS) -c armv7-a$(DELIM)crt0.c -o crt0$(OBJEXT)
STARTUP_OBJS = crt0$(OBJEXT)
endif
# Common assembly language files
CMN_ASRCS += arm_cpuhead.S arm_fpuconfig.S arm_vectoraddrexcptn.S
CMN_ASRCS += arm_vectors.S cp15_cache_size.S cp15_clean_dcache_all.S
CMN_ASRCS += cp15_clean_dcache.S cp15_coherent_dcache.S
CMN_ASRCS += cp15_flush_dcache_all.S cp15_flush_dcache.S
CMN_ASRCS += cp15_invalidate_dcache_all.S cp15_invalidate_dcache.S
# Common C source files
CMN_CSRCS += arm_cache.c arm_dataabort.c
CMN_CSRCS += arm_doirq.c arm_gicv2.c arm_gicv2_dump.c
CMN_CSRCS += arm_initialstate.c arm_mmu.c arm_prefetchabort.c
CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c
CMN_CSRCS += arm_syscall.c arm_tcbinfo.c arm_undefinedinsn.c
ifeq ($(CONFIG_ARMV7A_L2CC_PL310),y)
CMN_CSRCS += arm_l2cc_pl310.c
endif
ifeq ($(CONFIG_PAGING),y)
CMN_CSRCS += arm_allocpage.c arm_checkmapping.c arm_pginitialize.c
CMN_CSRCS += arm_va2pte.c
CMN_ASRCS += arm_pghead.S
else
CMN_ASRCS += arm_head.S
endif
ifeq ($(CONFIG_ARCH_ADDRENV),y)
CMN_CSRCS += arm_addrenv.c arm_addrenv_utils.c arm_pgalloc.c
ifeq ($(CONFIG_ARCH_STACK_DYNAMIC),y)
CMN_CSRCS += arm_addrenv_ustack.c
endif
ifeq ($(CONFIG_ARCH_KERNEL_STACK),y)
CMN_CSRCS += arm_addrenv_kstack.c
endif
ifeq ($(CONFIG_MM_SHM),y)
CMN_CSRCS += arm_addrenv_shm.c
endif
endif
ifeq ($(CONFIG_MM_PGALLOC),y)
CMN_CSRCS += arm_physpgaddr.c
ifeq ($(CONFIG_ARCH_PGPOOL_MAPPING),y)
CMN_CSRCS += arm_virtpgaddr.c
endif
endif
ifeq ($(CONFIG_ARCH_FPU),y)
CMN_CSRCS += arm_fpucmp.c
endif
ifeq ($(CONFIG_SMP),y)
CMN_CSRCS += arm_cpuindex.c arm_cpustart.c arm_cpupause.c arm_cpuidlestack.c
CMN_CSRCS += arm_scu.c
endif
+35
View File
@@ -21,3 +21,38 @@
# Common ARM files
include common/Make.defs
# The vector table is the "head" object, i.e., the one that must forced into
# the link in order to draw in all of the other components
HEAD_ASRC += arm_vectortab.S
# Common assembly language files
CMN_CSRCS += arm_cache.c arm_dataabort.c arm_doirq.c arm_gicv2.c
CMN_CSRCS += arm_initialstate.c arm_prefetchabort.c
CMN_CSRCS += arm_schedulesigaction.c arm_sigdeliver.c
CMN_CSRCS += arm_syscall.c arm_tcbinfo.c arm_undefinedinsn.c
# Common C source files
CMN_ASRCS += arm_fpuconfig.S arm_head.S arm_vectoraddrexcptn.S
CMN_ASRCS += arm_vectors.S arm_vectortab.S cp15_cache_size.S
CMN_ASRCS += cp15_clean_dcache_all.S cp15_clean_dcache.S
CMN_ASRCS += cp15_coherent_dcache.S cp15_flush_dcache_all.S
CMN_ASRCS += cp15_flush_dcache.S cp15_invalidate_dcache_all.S
CMN_ASRCS += cp15_invalidate_dcache.S
ifeq ($(CONFIG_BUILD_PROTECTED),y)
CMN_CSRCS += arm_mpu.c
endif
ifeq ($(CONFIG_ARMV7R_L2CC_PL310),y)
CMN_CSRCS += arm_l2cc_pl310.c
endif
ifeq ($(CONFIG_ARCH_FPU),y)
CMN_CSRCS += arm_fpucmp.c
CMN_ASRCS += arm_fpuconfig.S
endif
-87
View File
@@ -20,93 +20,6 @@
include armv7-a/Make.defs
# The vector table is the "head" object, i.e., the one that must forced into
# the link in order to draw in all of the other components
HEAD_ASRC = arm_vectortab.S
ifeq ($(CONFIG_BUILD_KERNEL),y)
crt0$(OBJEXT): crt0.c
$(CC) $(CFLAGS) -c armv7-a$(DELIM)crt0.c -o crt0$(OBJEXT)
STARTUP_OBJS = crt0$(OBJEXT)
endif
# Force the start-up logic to be at the beginning of the .text to simplify
# debug.
ifeq ($(CONFIG_PAGING),y)
CMN_ASRCS += arm_pghead.S
else
CMN_ASRCS += arm_head.S
ifeq ($(CONFIG_SMP),y)
CMN_ASRCS += arm_cpuhead.S
endif
endif
# Common assembly language files
CMN_ASRCS += arm_vectors.S arm_fpuconfig.S
CMN_ASRCS += arm_vectoraddrexcptn.S
CMN_ASRCS += cp15_coherent_dcache.S cp15_invalidate_dcache.S
CMN_ASRCS += cp15_clean_dcache.S cp15_flush_dcache.S cp15_invalidate_dcache_all.S
CMN_ASRCS += cp15_clean_dcache_all.S cp15_flush_dcache_all.S cp15_cache_size.S
# Common C source files
CMN_CSRCS += arm_dataabort.c arm_doirq.c arm_gicv2.c arm_initialstate.c
CMN_CSRCS += arm_mmu.c arm_prefetchabort.c arm_schedulesigaction.c
CMN_CSRCS += arm_sigdeliver.c arm_syscall.c arm_undefinedinsn.c
CMN_CSRCS += arm_cache.c arm_tcbinfo.c
ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
CMN_CSRCS += imx_idle.c
endif
ifeq ($(CONFIG_SMP),y)
CMN_CSRCS += arm_cpuindex.c arm_cpustart.c arm_cpupause.c arm_cpuidlestack.c
CMN_CSRCS += arm_scu.c
endif
ifeq ($(CONFIG_DEBUG_IRQ_INFO),y)
CMN_CSRCS += arm_gicv2_dump.c
endif
# Configuration dependent C and assembly language files
ifeq ($(CONFIG_PAGING),y)
CMN_CSRCS += arm_allocpage.c arm_checkmapping.c arm_pginitialize.c
CMN_CSRCS += arm_va2pte.c
endif
ifeq ($(CONFIG_ARCH_ADDRENV),y)
CMN_CSRCS += arm_addrenv.c arm_addrenv_utils.c arm_pgalloc.c
ifeq ($(CONFIG_ARCH_STACK_DYNAMIC),y)
CMN_CSRCS += arm_addrenv_ustack.c
endif
ifeq ($(CONFIG_ARCH_KERNEL_STACK),y)
CMN_CSRCS += arm_addrenv_kstack.c
endif
ifeq ($(CONFIG_MM_SHM),y)
CMN_CSRCS += arm_addrenv_shm.c
endif
endif
ifeq ($(CONFIG_MM_PGALLOC),y)
CMN_CSRCS += arm_physpgaddr.c
ifeq ($(CONFIG_ARCH_PGPOOL_MAPPING),y)
CMN_CSRCS += arm_virtpgaddr.c
endif
endif
ifeq ($(CONFIG_ARCH_L2CACHE),y)
CMN_CSRCS += arm_l2cc_pl310.c
endif
ifeq ($(CONFIG_ARCH_FPU),y)
CMN_CSRCS += arm_fpucmp.c
endif
# i.MX6-specific C source files
CHIP_CSRCS = imx_boot.c imx_memorymap.c imx_clockconfig.c imx_irq.c
-71
View File
@@ -20,77 +20,6 @@
include armv7-a/Make.defs
# The vector table is the "head" object, i.e., the one that must forced into
# the link in order to draw in all of the other components
HEAD_ASRC = arm_vectortab.S
ifeq ($(CONFIG_BUILD_KERNEL),y)
crt0$(OBJEXT): crt0.c
$(CC) $(CFLAGS) -c armv7-a$(DELIM)crt0.c -o crt0$(OBJEXT)
STARTUP_OBJS = crt0$(OBJEXT)
endif
# Force the start-up logic to be at the beginning of the .text to simplify
# debug.
ifeq ($(CONFIG_PAGING),y)
CMN_ASRCS += arm_pghead.S
else
CMN_ASRCS += arm_head.S
endif
# Common assembly language files
CMN_ASRCS += arm_vectors.S arm_fpuconfig.S arm_vectoraddrexcptn.S
CMN_ASRCS += cp15_coherent_dcache.S cp15_invalidate_dcache.S
CMN_ASRCS += cp15_clean_dcache.S cp15_flush_dcache.S cp15_invalidate_dcache_all.S
CMN_ASRCS += cp15_clean_dcache_all.S cp15_flush_dcache_all.S cp15_cache_size.S
# Configuration dependent assembly language files
# Common C source files
CMN_CSRCS += arm_dataabort.c arm_doirq.c arm_initialstate.c arm_mmu.c
CMN_CSRCS += arm_prefetchabort.c arm_cache.c arm_schedulesigaction.c
CMN_CSRCS += arm_sigdeliver.c arm_syscall.c arm_undefinedinsn.c arm_tcbinfo.c
# Configuration dependent C files
ifeq ($(CONFIG_ARMV7A_L2CC_PL310),y)
CMN_CSRCS += arm_l2cc_pl310.c
endif
ifeq ($(CONFIG_PAGING),y)
CMN_CSRCS += arm_allocpage.c arm_checkmapping.c arm_pginitialize.c
CMN_CSRCS += arm_va2pte.c
endif
ifeq ($(CONFIG_ARCH_ADDRENV),y)
CMN_CSRCS += arm_addrenv.c arm_addrenv_utils.c arm_pgalloc.c
ifeq ($(CONFIG_ARCH_STACK_DYNAMIC),y)
CMN_CSRCS += arm_addrenv_ustack.c
endif
ifeq ($(CONFIG_ARCH_KERNEL_STACK),y)
CMN_CSRCS += arm_addrenv_kstack.c
endif
ifeq ($(CONFIG_MM_SHM),y)
CMN_CSRCS += arm_addrenv_shm.c
endif
endif
ifeq ($(CONFIG_MM_PGALLOC),y)
CMN_CSRCS += arm_physpgaddr.c
ifeq ($(CONFIG_ARCH_PGPOOL_MAPPING),y)
CMN_CSRCS += arm_virtpgaddr.c
endif
endif
ifeq ($(CONFIG_ARCH_FPU),y)
CMN_CSRCS += arm_fpucmp.c
endif
# SAMA5-specific C source files
CHIP_CSRCS = sam_allocateheap.c sam_boot.c sam_clockconfig.c sam_irq.c
-40
View File
@@ -20,46 +20,6 @@
include armv7-r/Make.defs
# The vector table is the "head" object, i.e., the one that must forced into
# the link in order to draw in all of the other components
HEAD_ASRC += arm_vectortab.S
# Common assembly language files
CMN_ASRCS += arm_vectortab.S arm_vectors.S arm_head.S
CMN_ASRCS += arm_vectoraddrexcptn.S
CMN_ASRCS += cp15_coherent_dcache.S cp15_invalidate_dcache.S
CMN_ASRCS += cp15_clean_dcache.S cp15_flush_dcache.S
CMN_ASRCS += cp15_clean_dcache_all.S cp15_flush_dcache_all.S
CMN_ASRCS += cp15_invalidate_dcache_all.S cp15_cache_size.S arm_tcbinfo.c
# Configuration dependent assembly language files
ifeq ($(CONFIG_ARCH_FPU),y)
CMN_ASRCS += arm_fpuconfig.S
endif
# Common C source files
CMN_CSRCS += arm_dataabort.c arm_doirq.c arm_initialstate.c
CMN_CSRCS += arm_prefetchabort.c arm_schedulesigaction.c arm_sigdeliver.c
CMN_CSRCS += arm_syscall.c arm_undefinedinsn.c arm_cache.c
# Configuration dependent C files
ifeq ($(CONFIG_BUILD_PROTECTED),y)
CMN_CSRCS += arm_mpu.c
endif
ifeq ($(CONFIG_ARMV7R_L2CC_PL310),y)
CMN_CSRCS += arm_l2cc_pl310.c
endif
ifeq ($(CONFIG_ARCH_FPU),y)
CMN_CSRCS += arm_fpucmp.c
endif
# SAMA5-specific C source files
CHIP_CSRCS = tms570_boot.c tms570_clockconfig.c tms570_esm.c tms570_gio.c