cross compile opencontrail

Asked by Abhishek Jain

Hi Team

I'm able to compile vrouter.ko in x86_64 ubuntu and now I need to cross compile vrouter.ko on ubuntu for ARM using the below link..

http://juniper.github.io/contrail-vnc/README.html

The SConstruct file is as below..

#####################################################################################################################################

# -*- mode: python; -*-

#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#

# repository root directory
import os
import sys

sys.path.append('tools/build')

import rules
conf = Configure(DefaultEnvironment(ENV = os.environ))
env = rules.SetupBuildEnvironment(conf)

SConscript(dirs=['controller', 'vrouter', 'tools/sandesh'])

SConscript('openstack/nova_contrail_vif/SConscript',
           variant_dir='build/noarch/nova_contrail_vif')

if os.path.exists("openstack/contrail-nova-extensions/contrail_network_api/SConscript"):
    SConscript('openstack/contrail-nova-extensions/contrail_network_api/SConscript',
               variant_dir='build/noarch/contrail_nova_networkapi')

SConscript('openstack/neutron_plugin/SConscript',
           variant_dir='build/noarch/neutron_plugin')

if os.path.exists("openstack/ceilometer_plugin/SConscript"):
    SConscript('openstack/ceilometer_plugin/SConscript',
               variant_dir='build/noarch/ceilometer_plugin')

if os.path.exists("contrail-f5/SConscript"):
    SConscript('contrail-f5/SConscript',
               variant_dir='build/noarch/contrail-f5')

##################################################################################################################################

I have exported all the cross compiler toolchain and whenver I'm trying to cross compile using command scons vrouter,it is using gcc configuration instead of cross compiler environment.I want to know the steps which I need to follow to croos compile vrouter.ko for ARM.

The cross compiler are placed at path /home/ubuntu/jain/LS2085A-SDK-20160304-yocto/build_ls2085ardb_release/tmp/sysroots/x86_64-linux/usr/bin/aarch64-fsl-linux.

Question information

Language:
English Edit question
Status:
Solved
For:
OpenContrail Edit question
Assignee:
No assignee Edit question
Solved by:
Abhishek Jain
Solved:
Last query:
Last reply:
Revision history for this message
Abhishek Jain (ashujain9727) said :
#1

CROSS_COMPILE=/home/ubuntu/jain/LS2085A-SDK-20160304-yocto/build_ls2085ardb_release/tmp/sysroots/x86_64-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux- scons --kernel-dir=/home/ubuntu/jain/LS2085A-SDK-20160304-yocto/build_ls2085ardb_release/tmp/work/ls2085ardb-fsl-linux/linux-ls2-sdk/4.1-r0/build --target=aarch64 vrouter

The above comand did it for me.