[EXPERIMENTAL,1/3] helper: platform: dpdk: build on ARM64

Message ID 1470323563-32164-1-git-send-email-zoltan.kiss@linaro.org
State New
Headers show

Commit Message

Zoltan Kiss Aug. 4, 2016, 3:12 p.m.
This is just a FYI patch, this is how I did it when I was experimenting with
it. Could be useful base to start implementing it properly.

Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
---
 helper/platform/dpdk | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/helper/platform/dpdk b/helper/platform/dpdk
index 18bee22..209105e 100644
--- a/helper/platform/dpdk
+++ b/helper/platform/dpdk
@@ -14,7 +14,7 @@  dpdk_usage(){
 dpdk_prepare(){
     export DPDK_DIR=$ROOT_DIR_DPDK/dpdk/build
     export CONFIGURE_FLAGS="${CONFIGURE_FLAGS} \
-    --with-sdk-install-path=${ROOT_DIR_DPDK}/x86_64-native-linuxapp-gcc"
+    --with-sdk-install-path=${ROOT_DIR_DPDK}/arm64-armv8a-linuxapp-gcc"
     export GIT_URL="${GIT_URL:-git://git.linaro.org/lng/odp-dpdk.git}"
 }
 
@@ -34,11 +34,16 @@  dpdk_get(){
 dpdk_build() {
     #build DPDK so that ODP can see the incudes and get the lib to link to
     pushd $ROOT_DIR_DPDK >/dev/null
-    dpdk_target=x86_64-native-linuxapp-gcc
+    dpdk_target=arm64-armv8a-linuxapp-gcc
+    export CROSS="aarch64-linux-gnu-"
     make -j ${NUM_CPUS} config T="${dpdk_target}" O="${dpdk_target}"
     sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' "${dpdk_target}"/.config
     sed -ri 's,(CONFIG_RTE_BUILD_SHARED_LIB=).*,\1y,' "${dpdk_target}"/.config
     sed -ri 's,(CONFIG_RTE_MAX_MEMSEG=).*,\11024,' "${dpdk_target}"/.config
+# I had some issue with cxgbe compilation on ARM, might have been fixed now
+#    sed -ri 's,(CONFIG_RTE_LIBRTE_CXGBE_PMD=).*,\1n,' "${dpdk_target}"/.config
+# You'll probably need to specify the kernel sources for the kernel modules
+#    export RTE_KERNELDIR="/usr/src/linux-headers-3.19.0-33-generic/"
     make -j ${NUM_CPUS} build T="${dpdk_target}" O="${dpdk_target}" EXTRA_CFLAGS="-fPIC -g -O3"
     RETVAL=$?
     popd >/dev/null