PCB论坛网

 找回密码
 注册
查看: 716|回复: 0

嵌入式-ubuntu系统配置与开发环境搭建

[复制链接]
发表于 2013-10-17 16:00:29 | 显示全部楼层 |阅读模式


软件安装:
新安装了ubuntu系统后,通常需要安装许多软件才能使用
apt-get update (同步本地软件列表与APT站点)
apt-get upgrade (升级现有到包)
apt-get install *** (安装软件包)
ubuntu虚拟机连接板子选择桥接方式;
连接网络选测NAT方式,且/etc/network/interfaces里面不能有eth0的配置信息,删除配置信息后要重新打开网卡设备才能生效

一、ROOT登录
ubuntu默认无法以root身份登录,对于习惯来rh的用户来说,使用sudo显得很麻烦
下面介绍如何通过修改配置文件,使得可以自动使用root身份登录ubuntu系统
vim /etc/lightdm/lightdm.conf
编辑内容如下:
[SeatDefaults]
autologin-guest=false
autologin-user=root
autologin-user-timeout=0
autologin-session=lightdm-autologin
greeter-session=unity-greeter
user-session=ubuntu
greeter-show-manual-login=true
allow-guest=false
重启生效^v^


二、ubuntu嵌入式开发环境搭建:
1.安装必须软件
apt-get update              (获取软件列表)
apt-get install minicom*    (串口工具)
apt-get install tftpd-hpa   (tftp服务器)
apt-get install tftp-hpa    (tftp客户端)
apt-get install xinetd      (tftp客户端)
apt-get install nfs-kernel-server (nfs服务器)
apt-get install ncurses-* (支持perl,menuconfig界面)
apt-get remove ufw          (删除防火墙,--->ufw默认关闭,但好像只有卸载掉后,网络才能联通)
2.配置相关服务
(1) minicom -s
配置minicom

(2) 配置tftp服务
<1>
vim /etc/xinetd.conf
确认此文件存在且内容如下:
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/
defaults
{
# Please note that you need a log_type line to be able to use log_on_success
# and log_on_failure. The default is the following :
# log_type = SYSLOG daemon info
}
includedir /etc/xinetd.d
<2>
vim /etc/default/tftpd-hpa
确认此文件存在且内容如下:
# /etc/default/tftpd-hpa
TFTP_USERNAME=\"tftp\"
TFTP_DIRECTORY=\"/tftpboot\"
TFTP_ADDRESS=\"0.0.0.0:69\"
TFTP_OPTIONS=\"-l -c -s\"
<3>
vim /etc/xinetd.d/tftp
确认此文件存在且内容如下:
service tftp
    {
        socket_type = dgram
        wait = yes
        disable = no
        user = root
        protocol = udp
        server = /usr/sbin/in.tftpd
        server_args = -s /tftpboot
        #log_on_success += PID HOST DURATION
        #log_on_failure += HOST
        per_source = 11
        cps =100 2
        flags =IPv4
    }
<4>重启相关服务
/etc/init.d/tftpd-hpa restart
/etc/init.d/xinetd restart

(3) 配置nfs服务
vim /etc/exports
增加一行:
/opt/s3c2440/root_nfs *(rw,sync,no_root_squash)
重启nfs服务:
service nfs-kernel-server restart
(4) 配置网卡
vim /etc/network/interfaces
修改为:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.0.101
gateway 192.168.0.1
netmask 255.255.255.0
关闭并重新打开eth0生效
专业嵌入式技术实训扣扣754634522


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|手机版|PCB设计论坛|EDA论坛|PCB论坛网 ( 沪ICP备05006956号-1 )

GMT+8, 2025-5-15 16:03 , Processed in 0.130661 second(s), 21 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表