<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
em
{mso-style-name:"Emphasis\,Code";
mso-style-priority:20;
font-family:Consolas;
font-style:normal;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle22
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle23
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-NZ link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>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.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Thomas Bitsky Jr [mailto:tbj@automateddesign.com] <br><b>Sent:</b> Saturday, 29 June 2013 10:36<br><b>To:</b> Gavin Lambert; etherlab-users@etherlab.org<br><b>Subject:</b> RE: [etherlab-users] Cross Compile for ARM<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>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.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>This is everything I’ve done so far:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'>export PROJECT=openctl</span></em><em><span style='font-size:9.0pt'><o:p></o:p></span></em></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'>export PRJROOT=/home/tbj/srcroot/${PROJECT} <o:p></o:p></span></em></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'>export PRJAT91=${PRJROOT}/at91<o:p></o:p></span></em></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'>export PRJAT91_KERNEL=${PRJAT91}/kernel/3.2.46-rt67<o:p></o:p></span></em></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'>export PRJAT91FS=${PRJAT91}/rootfs<o:p></o:p></span></em></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'><o:p> </o:p></span></em></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'>echo Setup the compiler for cross-compilation<o:p></o:p></span></em></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'>unset ARCH <o:p></o:p></span></em></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'>ARCH=arm<o:p></o:p></span></em></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'>export GYP_DEFINES="target_arch=arm"<o:p></o:p></span></em></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'>export CC=arm-linux-gcc<o:p></o:p></span></em></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'>export CXX=arm-linux-g++<o:p></o:p></span></em></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'>export AR=arm-linux-ar<o:p></o:p></span></em></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'>export CC_host=gcc<o:p></o:p></span></em></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'>export CXX_host=g++<o:p></o:p></span></em></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><em><span style='font-size:9.0pt'><o:p> </o:p></span></em></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'>./configure --prefix=$PRJAT91FS/opt --with-linux-dir=$PRJAT91_KERNEL/headers --enable-generic=yes --enable-8139too=no --host=i386 --target=arm-none-linux-gnueabi-<o:p></o:p></span></em></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'><o:p> </o:p></span></em></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'>make clean<o:p></o:p></span></em></p><pre style='line-height:14.25pt;background:white'><em><span lang=EN-US style='font-size:9.0pt'>make DESTDIR=$PRGAT91FS ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-<o:p></o:p></span></em></pre><pre style='line-height:14.25pt;background:white'><em><span lang=EN-US style='font-size:9.0pt'>make modules DESTDIR=$PRGAT91FS ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-<o:p></o:p></span></em></pre><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'>make install ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- DESTDIR=$PRGAT91FS</span></em><em><span style='font-size:9.0pt'><o:p></o:p></span></em></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'><o:p> </o:p></span></em></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'>No problems until:<o:p></o:p></span></em></p><p class=MsoNormal><em><span lang=EN-US style='font-size:9.0pt'>Make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- DESTDIR=$PRGAT91FS INSTALL_MOD_PATH=$PRGAT91FS modules_install</span></em><em><span style='font-size:9.0pt'><o:p></o:p></span></em></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>…<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>An endless list of warnings….<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>… <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>FATAL: Could not open /lib/modules/3.2.46-rt67/modules.dep.temp for writing: Permission denied<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>make[1]: *** [_emodinst_post] Error 1<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>make[1]: Leaving directory `/home/tbj/srcroot/openctl/at91/kernel/3.2.46-rt67/headers'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Can anyone see what I’m doing wrong?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div><p class=MsoNormal><span lang=EN-US style='font-size:12.0pt;font-family:"Arial","sans-serif";color:black'>Thomas C. Bitsky Jr. | Lead Developer</span><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:12.0pt;font-family:"Arial","sans-serif";color:#660000'>ADC | <a href="http://automateddesign.com/" target="_blank"><span style='color:blue'>automateddesign.com</span></a></span><span lang=EN-US style='font-size:12.0pt;font-family:"Arial","sans-serif";color:black'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:12.0pt;font-family:"Arial","sans-serif";color:black'>P: 630-783-1150 F: 630-783-1159 M: 630-632-6679<o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> Gavin Lambert [<a href="mailto:gavinl@compacsort.com">mailto:gavinl@compacsort.com</a>] <br><b>Sent:</b> Thursday, June 27, 2013 5:34 PM<br><b>To:</b> Thomas Bitsky Jr; <a href="mailto:etherlab-users@etherlab.org">etherlab-users@etherlab.org</a><br><b>Subject:</b> RE: [etherlab-users] Cross Compile for ARM<o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>IIRC, the --with-linux-dir option cannot cope with relative paths nor ~ prefixed paths. Specify the absolute path from / instead.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:etherlab-users-bounces@etherlab.org">etherlab-users-bounces@etherlab.org</a> [<a href="mailto:etherlab-users-bounces@etherlab.org">mailto:etherlab-users-bounces@etherlab.org</a>] <b>On Behalf Of </b>Thomas Bitsky Jr<br><b>Sent:</b> Thursday, 27 June 2013 13:41<br><b>To:</b> <a href="mailto:etherlab-users@etherlab.org">etherlab-users@etherlab.org</a><br><b>Subject:</b> [etherlab-users] Cross Compile for ARM<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>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<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I moved into the EtherLAB directory and issued:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>./configure --host=arm-linux --enable-generic --with-linux-dir=~/srcroot/linux/linux-3.2.46<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>The result is:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>No configured Linux kernel sources in ~/srcroot/linux/linux-3.2.46/<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>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?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Thanks in advance,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Tome</span><span lang=EN-US style='font-size:12.0pt;font-family:"Arial","sans-serif";color:black'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></div></div></body></html>