Fedora20-32bit cross-compiling arm-linux-gcc4.3.2

Source: Internet
Author: User

Directory

0 Preface

1 Installing arm-linux-gcc-4.3.2

2 Configuring Server for NFS

0 Preface

Previously, cross-compiling was established on Fedora 64bit, but since the 4.4.3 version required another GDB tool for Gdb-server debugging, and it took a long time, multiple GDB versions were error-filled. or a 32bit system.

The arm-linux-gcc4.4.2 of the friendly arm has been integrated with GDB without the need to reinstall GDB

1 Install arm-linux-gcc-4.3.21.1 put arm-linux-gcc-4.3.2.tgz in Home/hy/arm directory

1.2 Unzip the file, note that the-C is uppercase, change the meaning of the extracted directory, C, followed by a space, plus a root directory symbol/
[Email protected] arm]$ tar xvzf arm-linux-gcc-4.3.2.tgz-c/

1.3 Add the system environment variable, because you want to modify the file under/etc, you need root
[email protected] arm]$ su Password: [[email protected] arm]# Vi/etc/profile

Add a path to the last line of the profile and save the exit:

# #hy Add 3.22export path= $PATH:/usr/local/arm/4.3.2/bin#
1.4 Make the file effective immediately without restarting Fedora:
[Email protected] arm]# Source/etc/profile

Note: When switching back to a normal user, such as HY users, you may need to re-make the file effective source/etc/profile.

1.5 Check the version, the following instructions are installed successfully
[[email protected] arm]# arm-linux-gcc-vusing built-in specs. Target:arm-none-linux-gnueabiconfigured with:/scratch/julian/lite-respin/linux/src/gcc-4.3/configure--build= I686-pc-linux-gnu--host=i686-pc-linux-gnu--target=arm-none-linux-gnueabi--enable-threads--disable-libmudflap-- DISABLE-LIBSSP--disable-libstdcxx-pch--with-gnu-as--with-gnu-ld--enable-languages=c,c++--enable-shared-- Enable-symvers=gnu--enable-__cxa_atexit--with-pkgversion= ' sourcery g++ Lite 2008q3-72 '--with-bugurl=https:// support.codesourcery.com/gnutoolchain/--disable-nls--prefix=/opt/codesourcery--with-sysroot=/opt/codesourcery/ ARM-NONE-LINUX-GNUEABI/LIBC--with-build-sysroot=/scratch/julian/lite-respin/linux/install/ ARM-NONE-LINUX-GNUEABI/LIBC--with-gmp=/scratch/julian/lite-respin/linux/obj/ HOST-LIBS-2008Q3-72-ARM-NONE-LINUX-GNUEABI-I686-PC-LINUX-GNU/USR--with-mpfr=/scratch/julian/lite-respin/linux/ OBJ/HOST-LIBS-2008Q3-72-ARM-NONE-LINUX-GNUEABI-I686-PC-LINUX-GNU/USR--disable-libgomp--enablE-poison-system-directories--with-build-time-tools=/scratch/julian/lite-respin/linux/install/ Arm-none-linux-gnueabi/bin--with-build-time-tools=/scratch/julian/lite-respin/linux/install/  Arm-none-linux-gnueabi/binthread MODEL:POSIXGCC version 4.3.2 (sourcery g++ Lite 2008q3-72)

Check Arm-linux-gdb-v

[[email protected] arm]# arm-linux-gdb-vgnu gdb (sourcery g++ Lite 2008q3-72) 6.8.50.20080821-cvscopyright (C) Software Foundation, Inc.license gplv3+: GNU GPL version 3 or later 
1.6 Compile the Hello program, as below, compile through, if it is a 64-bit system fedora, there will be an error.
[[email protected] pjhello]$ arm-linux-gcc-o Hello hello.c[[email protected] pjhello]$ Lshello  hello.c
2 Configuring Server for NFS

Virtual machine share files to target machine, set up VMware setting->network-> bridged

The IP settings for the host and Target are on the same network segment.

2.1 Create a shared folder and set permissions
[Email protected] ~]$ mkdir/home/hy/nfsshare[[email protected] ~]$ chmod 777-r nfsshare/
2.2 Adding shares
[Email protected] hy]# Vim/etc/exports
/home/hy/nfsshare * (Sync,rw,no_root_squash)

To view shared folders

[[email protected] hy]# showmount-eexport list for Localhost.localdomain:/home/hy/nfsshare *

When the list of shared files appears, the NFS configuration of the host is correct. If it is an error, check the NFS status and firewall.

Check the Status of NFS

[Email protected] ~]$ systemctl status Nfs.service

Turn on NFS Services

[[Email protected] hy]# Service NFS startredirecting to/bin/systemctl start  nfs.service

Stop, start the firewall

[[email protected] init.d]# systemctl stop firewalld.service[[email protected] init.d]# systemctl start Firewalld.service

Disable the firewall,

[Email protected] init.d]# systemctl disable Firewalld.service
2.3 Target Machine Mount shared folder

The target Mount command is as follows, note that IP is the IP address of the host and is in the same network segment:

[Email protected]/]# mount-t nfs-o nolock 192.168.1.8:/home/hy/nfsshare//mntmount:rpc:unable to receive; errno = No route to host

Mount The Times wrong, then check the host's Firewall and NFS status.

After the Mount succeeds, the shared file can be seen in the/mnt/directory of the target machine

Reference
Http://www.linuxidc.com/Linux/2011-02/32733.htm

Fedora20-32bit cross-compiling arm-linux-gcc4.3.2

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.