嵌入式linux基本环境配置

来源:互联网 发布:面试算法题 编辑:程序博客网 时间:2024/05/16 18:49

1.      更新到最新的软件包

Open up System -> Administration -> Update Manager

Click on Settings

Open the Updates Tab

Set 'Release upgrade' to 'Never'. That makes the option to upgrade to Karmic go away.

Close the settings dialog box.

Click on 'Check' to check for upgraded packages. It will look for packages that are upgraded from the version that is installed on your box.

Choose to install the upgrades. This will take a while on a freshly installed box.

2.      安装代码编辑工具

sudo apt-get install vim-gtk

3.      安装网络工具

TFTP服务器

1.    安装TFTP服务器及客户端(tftp-hpa是客户端,tftpd-hpa是服务器端)

sudo apt-get install tftp-hpa tftpd-hpa

2.    配制TFTP服务器,编辑/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.    创建TFTP目录并重启TFTP服务

sudo mkdir /tftpboot

sudo chmod 777 /tftpboot

sudo service tftpd-hpa restart

4.    测试

$tftp tftp服务器地址

>get 文件名(取文件)

>put 文件名(发送文件)

>quit (退出)

5.    U-boot参数
set bootcmd tftpboot $loadkernaddr image_dir/zImage\; bootm loadkernaddr

例子:set bootcmd tftpboot c0008000 192.168.1.10:kernel.img\; bootm c0008000

NFS服务器

1.  安装NFS服务器
sudo apt-get install nfs-kernel-server

2.  配制/etc/exports
/rootfs *(rw,sync,no_root_squash)

3.  重启NFS服务
sudo /etc/init.d/portmap restart
sudo /etc/ini.d/nfs-kernel-server restart

4.  显示NFS共享目录
showmount –e
挂载和卸载NFS目录
sudo mount -t nfs NFS服务器地址:/rootfs /mnt
sudo umount /mnt

5.  U-boot参数
setenv bootargs "root=/dev/nfs rw nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off init=/init console=ttySAC2,115200"
例:
setenv bootargs "root=/dev/nfs rw nfsroot=192.168.1.10:/nfsboot/rootfs ip=192.168.1.199:192.168.1.10:192.168.1.1:255.255.255.0::eth0:off init=/linuxrc console=ttySAC1,115200"

SAMBA服务器

1:安装SAMBA服务器及客户端
sudo apt-get install samba
sudo apt-get install smbfs 
sudo apt-get install system-config-samba

2:修改配制文件
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bck
sudo vim /etc/samba/smb.conf
只留下[global]

3:打开配制工具
sudo system-config-samba

配制samba用户和共享目录

4:重启SAMBA

sudo /etc/init.d/smbd restart

5:windows下 \\samba服务器地址

SSH

sudo apt-get install openssh-server openssh-client

修改主机名

sudo vim /etc/hostname

 

0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 苹果6升级卡死怎么办 随行付换手机了怎么办 融e联账号冻结怎么办 58同城高危账户怎么办 网购迟迟不发货怎么办 优酷不能投屏了怎么办 爱尚街借款不还怎么办 小米商城买东西没收到货怎么办 微信投票地区限制怎么办 微信退款未到账怎么办 微信钱包锁忘了怎么办 xp系统管理员密码忘了怎么办 沃尔沃menu键没反应怎么办 微信转账受限制怎么办 被米虎网骗了手里还有合同怎么办 学校要求上传论文pdf格式怎么办 备份的Wifi密码查看乱码怎么办 u盘密码忘了怎么办 京东会员号被黑怎么办 淘宝企业店铺三证不合一怎么办 淘宝企业店铺营业执照注销了怎么办 不想开淘宝企业店铺了怎么办 id图片跨页排版怎么办 合约机不想要了怎么办? 移动A3手机老卡怎么办 中国移动手机a3很卡怎么办 移动手机a4好卡怎么办 红米手机卡顿反应慢怎么办 红米3s网速慢怎么办 红米4a内存不足怎么办 红米3s手机发热怎么办 魅蓝s6信号差怎么办 oppo手机媒体音量没声音怎么办 红米note3反应慢怎么办 红米4g信号差怎么办 红米4g网速慢怎么办 红米24g信号不好怎么办 红米54g信号不稳定怎么办 红米4a玩游戏卡怎么办 红米4x卡顿怎么办 红米主板烧了怎么办