3ccabefec99258c2d1786795884fdd24880f1714
[vpp.git] / build-data / platforms / dpaa.mk
1 # Copyright 2018 NXP
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 # Configuration for NXP DPAA1/DPAA2 ARM64 based platform
15 MACHINE=$(shell uname -m)
16
17 dpaa_mtune = cortex-A72
18 dpaa_march = "armv8-a+fp+simd+crc+crypto"
19
20 ifeq ($(MACHINE),aarch64)
21 dpaa_arch = native
22 else
23 dpaa_arch = aarch64
24 dpaa_os = linux-gnu
25 dpaa_target = aarch64-fsl-linux
26 dpaa_cross_ldflags = \
27         -Wl,--dynamic-linker=/lib/ld-linux-aarch64.so.1 \
28         -Wl,-rpath=/usr/lib64 \
29         -Wl,-rpath=./.libs \
30         -Wl,-rpath=$(OPENSSL_PATH)/lib
31 endif
32
33 # Re-write Default configuration, if requied
34 ifneq ($(CROSS_PREFIX),)
35 # like: aarch64-linux-gnu
36 dpaa_target = $(CROSS_PREFIX)
37 endif
38
39 ifneq ($(CPU_MTUNE),)
40 # like: cortex-A53
41 dpaa_mtune = $(CPU_MTUNE)
42 endif
43
44 dpaa_native_tools = vppapigen
45 dpaa_root_packages = vpp
46
47 # DPDK configuration parameters
48 dpaa_uses_dpdk = yes
49
50 # Compile with external DPDK only if "DPDK_PATH" variable is defined where we have
51 # installed DPDK libraries and headers.
52 ifeq ($(PLATFORM),dpaa)
53 ifneq ($(DPDK_PATH),)
54 #dpaa_dpdk_shared_lib = yes
55 dpaa_uses_external_dpdk = yes
56 dpaa_dpdk_inc_dir = $(DPDK_PATH)/include/dpdk
57 dpaa_dpdk_lib_dir = $(DPDK_PATH)/lib
58 else
59 # compile using internal DPDK + NXP DPAA2 Driver patch
60 dpaa_dpdk_arch = "armv8a"
61 dpaa_dpdk_target = "arm64-dpaa-linuxapp-gcc"
62 dpaa_dpdk_make_extra_args = "CONFIG_RTE_KNI_KMOD=n"
63 endif
64 endif
65
66 # Disable the unused plugins in order to decrease the VPP pacakage size.
67 vpp_configure_args_dpaa = --without-ipv6sr --with-pre-data=128
68
69 # Other optional vpp_configure_args
70 ifneq ($(VPP_CFG_ARGS),)
71 vpp_configure_args_dpaa += $(VPP_CFG_ARGS)
72 endif
73
74
75 dpaa_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -fPIC -fstack-protector-all -DFORTIFY_SOURCE=2 \
76                         -march=$(MARCH) -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6 -I$(OPENSSL_PATH)/include
77 dpaa_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -fstack-protector-all -DFORTIFY_SOURCE=2 \
78                         -march=$(MARCH) -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6 -L$(OPENSSL_PATH)/lib
79
80
81 # Use -rdynamic is for stack tracing, O0 for debugging....default is O2
82 # Use -DCLIB_LOG2_CACHE_LINE_BYTES to change cache line size
83 dpaa_TAG_CFLAGS = -g -Ofast -fPIC -march=$(MARCH) -mcpu=$(dpaa_mtune) \
84                 -mtune=$(dpaa_mtune) -funroll-all-loops -DCLIB_LOG2_CACHE_LINE_BYTES=6 -I$(OPENSSL_PATH)/include
85 dpaa_TAG_LDFLAGS = -g -Ofast -fPIC -march=$(MARCH) -mcpu=$(dpaa_mtune) \
86                 -mtune=$(dpaa_mtune) -funroll-all-loops -DCLIB_LOG2_CACHE_LINE_BYTES=6 -L$(OPENSSL_PATH)/lib
87