第一部分 Ubuntu虚拟机安装
所需资源:
1、VMware-workstation_full_12.1.1.6932.exe
2、ubuntu-14.04.3-desktop-amd64.iso
3、互联网
建议在i5以上CPU、8G内存、100GB以上空闲分区的台式电脑安装
一、安装虚拟机软件
(略)
二、新建虚拟机
“文件”—“新建虚拟机”—“自定义(高级)”
中间步骤省略,最终配置如下
“自定义硬件”—“新CD/DVD”,加载Ubuntu镜像
启动虚拟机,不能改为中文(Petalinux不支持),开始安装
中间步骤省略,均保持默认设置
设置用户名、密码,开启自动登录。此时“Continue”按钮显示在屏幕外,需使用“TAB”键切换至“Back”按钮后按“→”键再回车
安装完成重启,回车确定
三、优化Ubuntu设置
“System Settings”—“Displays”,修改分辨率为1440×900
“System Settings”—“Brightness Lock”
“虚拟机”—“设置”—“添加”—“网络适配器”—“NAT模式”
“System Settings”—“Software Updates”—Download from—“Other…”—“China”—aliyun.com
四、开启共享文件夹
“虚拟机”—“安装VMware Tools”
sudosu–mount/dev/cdrom/mntcp/mnt/VMwareTools-…….tar.gz.tar–xfVMwareTools-…….tar.gzcdvmware-tools-distrib/./vmware-install.pl
“虚拟机”—“设置”—“选项”—“共享文件夹”。若报错,重启虚拟机后重装VMware Tools
ln-s/mnt/hgfs/share~/Winshare
五、VIM安装
apt-getinstallvim-gtkvim/etc/vim/vimrc
在文件末尾添加:
setnusettabstop=4setautoindent
六、tftp服务器搭建
apt-getinstalltftp-hpatftpd-hpaapt-getinstallxinetdvim/etc/default/tftpd-hpa
修改以下两项:
TFTP_DIRECTORY="/tftpboot"TFTP_OPTIONS="-s-c-l"
cd/mkdirtftpbootchmod777tftpboot/servicexinetdstopservicetftpd-hparestartservicexinetdstart
测试是否搭建成功:(提前在/tftpboot touch aaa,在本地touch 111)
tftplocalhosttftp put111tftp getaaatftp q
七、nfs服务器搭建
apt-getinstallnfs-kernel-serverapt-getinstallnfs-commonvi/etc/exports
在文件末尾添加
/root/rootfs*(rw,sync,no_root_squash,no_subtree_check)
mkdirrootfschmod777rootfs/exportfs-r/etc/init.d/nfs-kernel-serverrestartshowmountlocalhost–e
测试是否成功:
mount-tnfs-onolocklocalhost:/root/rootfs/mnt
第二部分 Petalinux开发平台安装
所需资源:
1、petalinux-v2016.1-final-installer.run
2、互联网
一、依赖工具安装
使用 dpkg –l | grep ‘xxx’ 检查以下各依赖是否安装
apt-getinstalltofrodosapt-getinstalliproute2apt-getinstallgawkapt-getinstallgitapt-getinstallmakeapt-getinstallnet-toolsapt-getinstalllibncurses5-devzlib1g-devlibssl-devapt-getinstallflexbisonapt-getinstalllibselinux1apt-getinstalllib32z1lib32ncurses5lib32bz2-1.0lib32stdc++6
二、修改/bin/sh
dpkg-reconfiguredash
选择 No
三、Petalinux安装
mkdir/opt/pkg./petalinux-v2016.1-final-installer.run/opt/pkg
source/opt/pkg/petalinux-v2016.1-final/settings.shpetalinux-util--webtalkoffcd/opt/pkg/chownroot:rootpetalinux-v2016.1-final/-R
四、优化Petalinux设置
vi~/.bashrc
在末尾添加:
source/opt/pkg/petalinux-v2016.1-final/settings.sh
cdpkg/petalinux-v2016.1-final/tools/linux-i386/gcc-arm-linux-gnueabi/bincp~/Winshare/ln.sh../ln.sh
版权声明:原创作品,如需转载,请与作者联系。否则将追究法律责任 linux 虚拟机 ubuntu别想一下造出大海,必须先由小河川开始。