LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   cross compile in 64 bit machine for 32 bit arm (http://www.linuxquestions.org/questions/linux-newbie-8/cross-compile-in-64-bit-machine-for-32-bit-arm-845001/)

sattulinux 11-18-2010 01:24 AM

cross compile in 64 bit machine for 32 bit arm
 
hi,
i have fedora 11(64 bit).i want to do the cross compilation for 32 bit arm processor.i install all required thing but any of the make command(make,make mrproper,defconfig) is not working.so plz help me what to do.

thanks.

theNbomr 11-18-2010 08:40 PM

Way too little detail for such a complex operation. 'i install all required thing' leaves us wondering exactly what version and origin of the 'required thing' you are using. And then there is the famous fault report: 'not working'. In how many of the 6 gzillion possible ways does it not work? And what exactly did you do that could have evoked such recalcitrant behavior?

Really, unless we're there looking over your shoulder, you need to be much more explicit about exactly what you're doing, exactly what went wrong (copy + paste error messages), and quite some detail about the products you're trying to use.
--- rod.

sattulinux 11-18-2010 10:48 PM

sorry for no description.
i use the arm-2008-11-24.
i went for the eldk installation as below:

..................


edit the bashrc file in the home directory,
[go to home directory vi .bashrc to view the bash rc file.. in that u need to edit the env variables.. (. means hidden file)
fi
export ARCH=arm
export CROSS_COMPILE=arm-linux-
export DEPMOD=/opt/ELDK/usr/bin/depmod.pl
export PATH=/opt/ELDK/usr/bin:/opt/ELDK/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games]

copy arm-2008-11-24.iso, and qt-4.6.. (for embedded linux) .. in /opt folder... & workspace tar file in the home directory.. extract tar files in respective folders & continue with following steps for arm iso]
linuxhost > ...means ... /opt folder

problem with 32/64 bit ... reffer URL [http://www.denx.de/wiki/view/DULG/EL...itEnvironment]
(
14.1.7. Using the ELDK on a 64 bit platform
As the ELDK is compiled for 32-bit host systems, a compatibility layer is required on 64-bit systems. This package is usually called ia32-libs. So on a Debian or Ubuntu system a
sudo apt-get install ia32-libs
should be enough to make the ELDK work.
On the U-Boot mailing list, it was reported that for a 64 bit Fedora 11 the following should be enough:
sudo yum -y install glibc.i586 zlib.i586
)
/**/
linuxhost > mkdir eldk
linuxhost > mkdir install_mount [....to mount the .iso]
linuxhost > cd eldk/
linuxhost/eldk > su
linuxhost/eldk # mount -o loop,exec ../arm-2007-01-21.iso ../install_mount/
linuxhost/eldk # exit


linuxhost/eldk > ls install_mount/[to check in install_mount...
. arm ELDK_FIXOWNER etc install RPMS tools
.. common ELDK_MAKEDEV icons README.html sys version.. will be there]


linuxhost/eldk > ../install_mount/install arm
linuxhost/eldk > chmod u+x eldk_init

now unmount the ISO image as root *** not required

linuxhost/eldk > ./eldk_init arm
export these variable to environment,or include them as part of .bashrc file. [in the home directory.. for every user.]
ARCH=arm
CROSS_COMPILE=arm-linux-
DEPMOD=host/eldk/usr/bin/depmod.pl
PATH=host/eldk/usr/bin:host/eldk/bin
/**/

.........


then when i went for make command :


.........

[Bibhu@localhost ~]$ cd /home/suriya/satya/linux-2.6.30.4/


[Bibhu@localhost linux-2.6.30.4]$ make clean
CLEAN include/asm-arm/mach-types.h
[Bibhu@localhost linux-2.6.30.4]$
[Bibhu@localhost linux-2.6.30.4]$
[Bibhu@localhost linux-2.6.30.4]$ make
CHK include/linux/version.h
Generating include/asm-arm/mach-types.h
CHK include/linux/utsrelease.h
ERROR: include/asm is a directory but a symlink was expected
make: *** [include/asm] Error 1

[Bibhu@localhost linux-2.6.30.4]$
[Bibhu@localhost linux-2.6.30.4]$
[Bibhu@localhost linux-2.6.30.4]$
[Bibhu@localhost linux-2.6.30.4]$ make clean
CLEAN include/asm-arm/mach-types.h

[Bibhu@localhost linux-2.6.30.4]$
[Bibhu@localhost linux-2.6.30.4]$
[Bibhu@localhost linux-2.6.30.4]$ make mrproper
CLEAN scripts/basic
CLEAN scripts/kconfig
CLEAN include/config
CLEAN .config include/asm include/linux/autoconf.h include/linux/version.h include/linux/utsrelease.h
rm: cannot remove `include/asm': Is a directory
make: *** [mrproper] Error 1

[Bibhu@localhost linux-2.6.30.4]$


..........

sattulinux 11-19-2010 12:16 AM

hi
I am using the tool chain arm-2008-11-24.iso.It is working for 32 bit machine.But now i am using 64 bit.According to the guide i installed glibc.i686 zlib.i586 package.But i am not able to compile.

theNbomr 11-19-2010 09:33 AM

Okay, so it isn't obvious whether the problem is in the toolchain you're using or the sources that you're building. To narrow it down, I suggest using the toolchain to build some other source package, and/or use some other toolchain to build your kernel sources. I don't see anywhere that you've created a config for the kernel sources. Have you done that already, or did your kernel sources come with a pre-built config?

May I suggest using a native 64-bit toolchain, instead of wedging in shims to make a non-native compiler work? I use toolchains for Arm target CPUs built with crosstool-ng.

--- rod.

sattulinux 11-20-2010 12:16 AM

hi
I changed the tool chain for the same package. But it did not work.I got the same error.

[Bibhu@localhost linux-2.6.30.4]$ make clean
[Bibhu@localhost linux-2.6.30.4]$ make
CHK include/linux/version.h
Generating include/asm-arm/mach-types.h
CHK include/linux/utsrelease.h
ERROR: include/asm is a directory but a symlink was expected
make: *** [include/asm] Error 1
[Bibhu@localhost linux-2.6.30.4]$


Actually this package and tool chain is working for ubuntu 64 bit machine.
I also changed the path for the new tool chain.Previously i used the eldk tool chain which i mention before.Now i used the EABI_4.3.3_EmbedSky_20090812.tar.bz2 tool chain.

Is there any library i have to install for this ?

theNbomr 11-20-2010 01:02 AM

I don't know. That's why I recommend creating a native toolchain. Since the same error occurred with different toolchains, I would suspect that your source tree may be faulty. Again, where did you configure the kernel source tree?

--- rod.

sattulinux 11-20-2010 01:18 AM

oh sorry. I am using make menuconfig.Is there any other command for configure ?

theNbomr 11-20-2010 09:09 AM

Yes, but menuconfig should be fine.
Does your source tree build with a native compiler? It isn't a really good test, because it is likely that any asm components are architecture specific, and are probably not used in all builds, but if it does fail, it points strongly to the source tree as the faulty part.

--- rod.


All times are GMT -5. The time now is 12:21 AM.