Welcome 微信登录

首页 / 操作系统 / Linux / Ubuntu下S5PV210开发板嵌入式开发环境搭建

本教程所使用的开发板是GEC210开发板,核心板资源概述:CPU:S5PV210,SDRAM:512MB,Flash:8MB,NandFlash:256MB。本教程搭建的环境可以用于uboot移植、Linux移植,即使开发板只有uboot也能轻松实现内核驱动程序开发。U-Boot源代码下载地址 http://www.linuxidc.com/Linux/2011-07/38897.htmu-boot Makefile完全解读 http://www.linuxidc.com/Linux/2013-04/83529.htmU-Boot中的date命令 http://www.linuxidc.com/Linux/2013-07/87614.htmU-Boot源代码下载地址 http://www.linuxidc.com/Linux/2011-07/38897.htmU-Boot下的两个重要数据:bd_t和gd_t http://www.linuxidc.com/Linux/2013-05/83993.htmU-Boot中的version命令 http://www.linuxidc.com/Linux/2013-05/83990.htmU-Boot中的usb命令 http://www.linuxidc.com/Linux/2013-05/83991.htm接下来,直接进入正题:1、交叉编译器1.1 因为我们编写的程序是要运行在开发板上的,而Ubuntu自带的编译器编译的程序只能在X86架构下运行。解压编译器:$ tar -jxvf arm-2009q3.tar.bz2 -C /usr/local/arm/(arm-2009q3.tar.bz2是适用于S5PV210平台的编译器)。
1.2  设置环境变量#vim ~/.bashrc
在文件尾端加入
export PATH=/usr/local/arm/arm-2009q3/bin:$PATH
使环境变量生效
#. ~/.bashrc
验证环境变量设置
#arm-linux-gcc -v2、配置串口工具--minicom2.1 安装串口工具sudo apt-get install minicom2.2  配置#minicom -s选择第三项 Serial port setup 进行配置2.3  串口通讯参数配置波特率: 115200 8N1
硬件控制流: 无
端口配置: Serial Device: /dev/ttyS0(台式机使用COM1)3、搭建tftp服务器3.1 安装 tftp 工具apt-get --force-yes -y install tftpd-hpa tftp-hpa xinetd3.2 建立 tftp 服务器目录mkdir /tftpboot
chmod 777 /tftpboot3.3 配置 tftp 服务vim /etc/default/tftpd-hpa
修改配置文件为
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="-l -c -s"
开启 tftp 服务
sudo /etc/init.d/xinetd restart
sudo service tftpd-hpa restart测试
touch /tftpboot/aaa
tftp localhost
get aaa
如果没有任何错误,然后按 q 退出看当前目录下有没有 aaa 文件,如果有证明 tftp 服务配置成功Ubuntu下tftp服务搭建 http://www.linuxidc.com/Linux/2012-08/67933.htmTFTP服务器配置 http://www.linuxidc.com/Linux/2012-07/64785.htmUbuntu Linux配置TFTP下载服务器 http://www.linuxidc.com/Linux/2010-12/30394.htmUbuntu 11.10 配置tftp Server http://www.linuxidc.com/Linux/2012-05/60808.htmUbuntu 12.04 搭建TFTP服务 http://www.linuxidc.com/Linux/2014-04/100144.htmUbuntu 12.04 搭建tftp服务器的安装、设置、调试 http://www.linuxidc.com/Linux/2014-04/100114.htm4. 搭建 NFS 服务器4.1 安装 NFS 工具apt-get --force-yes -y install nfs-kernel-server nfs-client nfs-common portmap4.2 建立 NFS 共享目录mkdir -p /nfs
chmod 755 /nfs -R4.3 配置 NFS 服务vim /etc/exports增加下面一行
/nfs *(rw,sync,no_root_squash)4.4 开启 NFS 服务service portmap restart
/etc/init.d/nfs-kernel-server restart4.5 测试showmount -e localhost
Note:在开发板 ping 一下,如果没有通,关闭防火墙更多Ubuntu相关信息见Ubuntu 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=2本文永久更新链接地址