现在的位置: 首页 > 操作系统 > 正文

[mini2440] ARM-linux-gcc环境搭建

2017年02月08日 操作系统 ⁄ 共 2618字 ⁄ 字号 评论关闭
30元程序员衣装优惠券,仅剩3天!点击领取

//ARM mini2440 资料光盘 /linux 目录下找到,解压到\tmp,然后sudo mv ,到\usr目录下

网上资料·首先你得懂得,arm-linux-gcc4.4.3.tar.gz是一个交叉编译器。

第一步:在文件系统目录下解压: tar zxvf arm-linux-gcc-4.4.3.tar.gz -c
第二步:配置环境变量:在/etc/profile文件最末尾添加一行:
export set PATH=/opt/FriendlyARM/toolschain/4.4.3/bin:$PATH
第三步:ctrl+alt+backspace 注销后重新登录

测试:
第一步:检查命令:which arm-linux-gcc
第二步:arm-linux-gcc hello.c -o hello
file hello (hello要自己编写哦)

亲自尝试:

用网线连路由,DHCP默认,自动分配IP【不用改就行了】

【如果改了可能遇到的问题】【mini2440】LAN2:the file /etc/pcmcia/network.opts does not exist.please restore this file

忽略,进网络设置-ok-succes

[ubuntu 12.04]

·准备传hello 到2440里面运行

zhangkun@zhangkun-H24X:~/桌面$ ftp 192.168.1.230
Connected to 192.168.1.230.
220 FriendlyARM FTP server (Version 6.4/OpenBSD/Linux-ftpd-0.17) ready.
Name (192.168.1.230:zhangkun): plg
331 Password required for plg.
Password:
230 User plg logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> bin
200 Type set to I.
ftp> put hello
local: hello remote: hello
200 PORT command successful.
150 Opening BINARY mode data connection for 'hello'.
226 Transfer complete.
7860 bytes sent in 0.00 secs (134662.8 kB/s)
ftp> bye
221 Goodbye.

-----然后,mini2440->/home/plg/刚刚传送的文件

terminal># ls

#cd /home/plg

#./ hello

:permission denied【您可能不是计算机的管理员用户或有相应权限】

然后 chmod u+x hello
# ./hello
完美解决

更新源:摘

1、首先备份Ubuntu12.04源列表

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup (备份下当前的源列表)

 

2、修改更新源

sudo gedit /etc/apt/sources.list (打开Ubuntu 12.04源列表文件)

 

3、把里面的列表替换成下面的列表

163源

deb http://mirrors.163.com/ubuntu/ precise main restricted
deb-src http://mirrors.163.com/ubuntu/ precise main restricted
deb http://mirrors.163.com/ubuntu/ precise-updates main restricted
deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted
deb http://mirrors.163.com/ubuntu/ precise universe
deb-src http://mirrors.163.com/ubuntu/ precise universe
deb http://mirrors.163.com/ubuntu/ precise-updates universe
deb-src http://mirrors.163.com/ubuntu/ precise-updates universe
deb http://mirrors.163.com/ubuntu/ precise multiverse
deb-src http://mirrors.163.com/ubuntu/ precise multiverse
deb http://mirrors.163.com/ubuntu/ precise-updates multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-updates multiverse
deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-security main restricted
deb-src http://mirrors.163.com/ubuntu/ precise-security main restricted
deb http://mirrors.163.com/ubuntu/ precise-security universe
deb-src http://mirrors.163.com/ubuntu/ precise-security universe
deb http://mirrors.163.com/ubuntu/ precise-security multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-security multiverse
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main



30元程>序员衣装优惠券,仅剩3天!点击领取

抱歉!评论已关闭.