[etherlab-users] Cross Compile for ARM

Gavin Lambert gavinl at compacsort.com
Mon Jul 1 00:42:28 CEST 2013


I've always specified INSTALL_MOD_PATH prior to the "make" command name.  I
don't know if this actually makes a difference or not though.

 

From: Thomas Bitsky Jr [mailto:tbj at automateddesign.com] 
Sent: Saturday, 29 June 2013 10:36
To: Gavin Lambert; etherlab-users at etherlab.org
Subject: RE: [etherlab-users] Cross Compile for ARM

 

Following up on my previous email, I think the "make modules_install"
command is trying to install to the host system, not the file system I'm
specifying as the target directory.

 

This is everything I've done so far:

 

export PROJECT=openctl

export PRJROOT=/home/tbj/srcroot/${PROJECT} 

export PRJAT91=${PRJROOT}/at91

export PRJAT91_KERNEL=${PRJAT91}/kernel/3.2.46-rt67

export PRJAT91FS=${PRJAT91}/rootfs

 

echo Setup the compiler for cross-compilation

unset ARCH    

ARCH=arm

export GYP_DEFINES="target_arch=arm"

export CC=arm-linux-gcc

export CXX=arm-linux-g++

export AR=arm-linux-ar

export CC_host=gcc

export CXX_host=g++

 

 

 

./configure --prefix=$PRJAT91FS/opt --with-linux-dir=$PRJAT91_KERNEL/headers
--enable-generic=yes --enable-8139too=no --host=i386
--target=arm-none-linux-gnueabi-

 

make clean

make DESTDIR=$PRGAT91FS ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
make modules DESTDIR=$PRGAT91FS ARCH=arm
CROSS_COMPILE=arm-none-linux-gnueabi-

make install ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
DESTDIR=$PRGAT91FS

 

No problems until:

Make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- DESTDIR=$PRGAT91FS
INSTALL_MOD_PATH=$PRGAT91FS modules_install

 

.

An endless list of warnings..

. 

FATAL: Could not open /lib/modules/3.2.46-rt67/modules.dep.temp for writing:
Permission denied

make[1]: *** [_emodinst_post] Error 1

make[1]: Leaving directory
`/home/tbj/srcroot/openctl/at91/kernel/3.2.46-rt67/headers'

 

Can anyone see what I'm doing wrong?

 

Thomas C. Bitsky Jr. | Lead Developer

ADC |  <http://automateddesign.com/> automateddesign.com

P: 630-783-1150 F: 630-783-1159 M: 630-632-6679

 

From: Gavin Lambert [mailto:gavinl at compacsort.com] 
Sent: Thursday, June 27, 2013 5:34 PM
To: Thomas Bitsky Jr; etherlab-users at etherlab.org
Subject: RE: [etherlab-users] Cross Compile for ARM

 

IIRC, the --with-linux-dir option cannot cope with relative paths nor ~
prefixed paths.  Specify the absolute path from / instead.

 

From: etherlab-users-bounces at etherlab.org
[mailto:etherlab-users-bounces at etherlab.org] On Behalf Of Thomas Bitsky Jr
Sent: Thursday, 27 June 2013 13:41
To: etherlab-users at etherlab.org
Subject: [etherlab-users] Cross Compile for ARM

 

 

I'm trying to cross-compile the EtherCAT master for an ARM board. I
successfully built a Linux RT Prempt kernel for the device.  On my
development machine, the source tree where I built the kernel is at:
~/srcroot/linux/linux-3.2.46

 

I moved into the EtherLAB directory and issued:

 

./configure --host=arm-linux --enable-generic
--with-linux-dir=~/srcroot/linux/linux-3.2.46

 

The result is:

 

No configured Linux kernel sources in ~/srcroot/linux/linux-3.2.46/

 

But I just built a kernel there. Is there something I have to do to the
source tree to get it ready to build the ethercat master?

 

Thanks in advance,

Tome

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20130701/10bc39ea/attachment-0002.htm>


More information about the Etherlab-users mailing list