0ec627a48efaf0d28f4d1ff82e6c752da8299530
[vpp.git] / build-data / platforms / dpaa2.mk
1 # Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved.
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 DPAA2 ARM64 based platform
15 dpaa2_arch = aarch64
16 dpaa2_os = linux-gnu
17 dpaa2_target = aarch64-linux-gnu
18 dpaa2_mtune = cortex-A57
19 dpaa2_march = "armv8-a+fp+simd+crc+crypto"
20 dpaa2_cross_ldflags = \
21         -Wl,--dynamic-linker=/lib/ld-linux-aarch64.so.1 \
22         -Wl,-rpath=/usr/lib64
23
24 dpaa2_native_tools = vppapigen
25 dpaa2_root_packages = vpp vlib vlib-api vnet svm vpp-api-test
26
27 # DPDK configuration parameters
28 dpaa2_uses_dpdk = yes
29 # Compile with external DPDK only if "DPDK_PATH" variable is defined where we have
30 # installed DPDK libraries and headers.
31 ifeq ($(PLATFORM),dpaa2)
32 ifneq ($(DPDK_PATH),)
33 dpaa2_uses_dpdk = yes
34 dpaa2_uses_external_dpdk = yes
35 dpaa2_dpdk_inc_dir = $(DPDK_PATH)/include/dpdk
36 dpaa2_dpdk_lib_dir = $(DPDK_PATH)/lib
37 else
38 # compile using internal DPDK + NXP DPAA2 Driver patch
39 dpaa2_dpdk_arch = "armv8a"
40 dpaa2_dpdk_target = "arm64-dpaa2-linuxapp-gcc"
41 dpaa2_dpdk_make_extra_args = "CROSS=$(dpaa2_target)- DPDK_PKTMBUF_HEADROOM=256"
42 endif
43 endif
44
45 vpp_configure_args_dpaa2 = --with-dpdk --without-ipsec \
46         --without-ipv6sr --with-sysroot=$(SYSROOT)
47 vnet_configure_args_dpaa2 = --with-dpdk --without-ipsec \
48         --without-ipv6sr --with-sysroot=$(SYSROOT)
49
50 # Set these parameters carefully. The vlib_buffer_t is 256 bytes, i.e.
51 vlib_configure_args_dpaa2 = --with-pre-data=256
52
53
54 dpaa2_debug_TAG_CFLAGS = -g -O2 -DCLIB_DEBUG -fPIC -fstack-protector-all \
55                         -march=$(MARCH) -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6
56 dpaa2_debug_TAG_LDFLAGS = -g -O2 -DCLIB_DEBUG -fstack-protector-all \
57                         -march=$(MARCH) -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6
58
59 # Use -rdynamic is for stack tracing, O0 for debugging....default is O2
60 # Use -DCLIB_LOG2_CACHE_LINE_BYTES to change cache line size
61 dpaa2_TAG_CFLAGS = -g -O2 -fPIC -march=$(MARCH) -mcpu=$(dpaa2_mtune) \
62                 -mtune=$(dpaa2_mtune) -funroll-all-loops -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6
63 dpaa2_TAG_LDFLAGS = -g -O2 -fPIC -march=$(MARCH) -mcpu=$(dpaa2_mtune) \
64                 -mtune=$(dpaa2_mtune) -funroll-all-loops -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6
65
66