嵌入式linux开发环境的构建

 

1、开发步骤:

1)在主机上编译bootloader,然后通过jtag烧写到单板。

2)在主机上编译嵌入式linux内核,通过bootloader烧写到单板。

3)在主机上编译各类应用程序,单板启动内核后nfs运行他们,经过验证后再烧写到单板。

嵌入式linux开发环境的构建_第1张图片

2、主机要求:

嵌入式linux开发环境的构建_第2张图片

3、目标板要求:

s3c2440:

嵌入式linux开发环境的构建_第3张图片

 

4、虚拟机和ubantu安装:

具体见上博客linux学习笔记--虚拟机安装与设置。

 

4、ftp、ssh、nfs

 

 

5、安装、配置、启动ftp、ssh或nfs服务

1)准备apt-get工具

ubantu14无没有这一步。

2)安装配置启动服务

嵌入式linux开发环境的构建_第4张图片

root@linux-compiler:/# apt-get install vsftpd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
vsftpd is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 420 not upgraded.
嵌入式linux开发环境的构建_第5张图片


root@linux-compiler:/# apt-get install openssh-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
openssh-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 418 not upgraded.

 

嵌入式linux开发环境的构建_第6张图片

嵌入式linux开发环境的构建_第7张图片

ubuntu14.04的操作如下:

   1)终端,执行一些命令,安装即可自动执行

        apt-get install nfs-kernel-server portmap

     2)修改配置文件 /etc/exports(sudo进入否则权限不够),添加以下内容

       /home/yvon/nfs_root    *(rw,sync,no_root_squash)

     或:

       /home/NFS *(rw,sync,no_root_squash,no_subtree_check)

 

   3)重启NFS服务

     sudo  /etc/init.d/nfs-kernel-server 

 

root@linux-compiler:/# apt-get install nfs-kernel-server portmap
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'rpcbind' instead of 'portmap'
rpcbind is already the newest version.
rpcbind set to manually installed.
nfs-kernel-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 418 not upgraded.
 

6、安装基本的开发环境:

1)Ubuntu中build-essential软件包
 

Ubuntu缺省情况下,并没有提供C/C++的编译环境,因此还需要手动安装。但是如果单独安装gcc以及g++比较麻烦,幸运的是,Ubuntu提供了一个build-essential软件包。查看该软件包的依赖关系:

cxy@ubuntu:~$ apt-cache depends build-essential
build-essential
 |Depends: libc6-dev
  Depends:
    libc6-dev
  Depends: gcc
  Depends: g++
  Depends: make
    make-guile
  Depends: dpkg-dev


也就是说,安装了该软件包,编译c/c++所需要的软件包也都会被安装。因此如果想在Ubuntu中编译c/c++程序,只需要安装该软件包就可以了。

安装方法如下:

$sudo apt-get install build-essential

 

root@linux-compiler:/# apt-get install build-essential
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 418 not upgraded.
 

2)

root@linux-compiler:/# apt-get install bison flex
Reading package lists... Done
Building dependency tree       
Reading state information... Done
bison is already the newest version.
flex is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 418 not upgraded.
 

3)

root@linux-compiler:/# apt-get install manpages-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
manpages-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 418 not upgraded.
 

 

 

 

 

 

 

 

 

 

 

 

 

你可能感兴趣的:(嵌入式-linux)