blob: fadc59285866c4b03bef29e0ff74704e96b3615c [file] [log] [blame]
Sachin Saxenac44f0f22018-05-04 16:08:43 +05301# 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
15MACHINE=$(shell uname -m)
16
17dpaa_mtune = cortex-A72
18dpaa_march = "armv8-a+fp+simd+crc+crypto"
19
20ifeq ($(MACHINE),aarch64)
21dpaa_arch = native
22else
23dpaa_arch = aarch64
24dpaa_os = linux-gnu
25dpaa_target = aarch64-fsl-linux
26dpaa_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
31endif
32
33# Re-write Default configuration, if requied
34ifneq ($(CROSS_PREFIX),)
35# like: aarch64-linux-gnu
36dpaa_target = $(CROSS_PREFIX)
37endif
38
39ifneq ($(CPU_MTUNE),)
40# like: cortex-A53
41dpaa_mtune = $(CPU_MTUNE)
42endif
43
44dpaa_native_tools = vppapigen
45dpaa_root_packages = vpp
46
47# DPDK configuration parameters
48dpaa_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.
52ifeq ($(PLATFORM),dpaa)
53ifneq ($(DPDK_PATH),)
54#dpaa_dpdk_shared_lib = yes
55dpaa_uses_external_dpdk = yes
56dpaa_dpdk_inc_dir = $(DPDK_PATH)/include/dpdk
57dpaa_dpdk_lib_dir = $(DPDK_PATH)/lib
58else
59# compile using internal DPDK + NXP DPAA2 Driver patch
60dpaa_dpdk_arch = "armv8a"
61dpaa_dpdk_target = "arm64-dpaa-linuxapp-gcc"
62dpaa_dpdk_make_extra_args = "CONFIG_RTE_KNI_KMOD=n"
63endif
64endif
65
66# Disable the unused plugins in order to decrease the VPP pacakage size.
Sachin Saxenaee6ddce2018-05-10 16:22:09 +053067vpp_configure_args_dpaa = --without-ipv6sr --with-pre-data=128 --without-libnuma
Sachin Saxenac44f0f22018-05-04 16:08:43 +053068
69# Other optional vpp_configure_args
70ifneq ($(VPP_CFG_ARGS),)
71vpp_configure_args_dpaa += $(VPP_CFG_ARGS)
72endif
73
74
Sachin Saxena5914f302018-05-28 09:45:12 +053075dpaa_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -fPIC -fstack-protector-all -DFORTIFY_SOURCE=2 -mtls-dialect=trad \
Sachin Saxenac44f0f22018-05-04 16:08:43 +053076 -march=$(MARCH) -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6 -I$(OPENSSL_PATH)/include
77dpaa_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
Sachin Saxena5914f302018-05-28 09:45:12 +053083dpaa_TAG_CFLAGS = -g -Ofast -fPIC -march=$(MARCH) -mcpu=$(dpaa_mtune) -mtls-dialect=trad \
Sachin Saxenac44f0f22018-05-04 16:08:43 +053084 -mtune=$(dpaa_mtune) -funroll-all-loops -DCLIB_LOG2_CACHE_LINE_BYTES=6 -I$(OPENSSL_PATH)/include
85dpaa_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