文章目录
1. 修改默认的sh
默认为dash,修改为bash
sudo dpkg-reconfigure dash
选择NO
2. 修改源
system settings->software & updates->ubuntu software选择ailiyun
3. 更新包
sudo apt-get update
sudo apt-get upgrade
4. 安装vim
sudo apt-get install vim
5. 修改主机名称
默认主机名称ubuntu
sudo vi /etc/hostname
sudo vi /etc/hosts
6. 使用root账号登录
6.1 创建root账户密码
sudo password root
6.2 设置登录时可以选择用户登录
sudo vi /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
增加如下内容:
user-session=ubuntu
greeter-show-manual-login=true
all-guest=false
reboot重启系统,登录界面选择login,使用root账号和密码登录,提示加载/root/.profile错误,点击确定按钮,进入系统
vi /root/.profile
找到mesg n,修改为tty -s && mesg n
tty -s && mesg n
再次reboot重启系统,使用root账号和密码登录
7. 安装VMware Tools
在虚拟机选项中选择安装VMware Tools,安装完成后拷贝安装tgz包
cp VMwareTools-10.2.0-7259539.tar.gz /home/jerry
cd /home/jerry
tar zxf VMwareTools-10.2.0-7259539.tar.gz
cd vmware-tools-distrib
sudo ./vmware-install.pl
8. mtd-tools安装
apt-get install mtd-tools
9. samba搭建
sudo apt install samba smbclient
sudo vi /etc/samba/smb.conf
添加如下内容:
[jerry]
path = /home/jerry/work
available = yes
public = yes
browseable = yes
writable = yes
valid users = jerry
设置密码,重启服务
sudo smbpasswd -a jerry
// input password
sudo /etc/init.d/samba restart
10. nfs搭建
sudo apt install nfs-kernel-server
sudo vi /etc/exports
添加如下内容:
/home/jerry/work *(rw,sync,no_root_squash)
重启服务
sudo service nfs-kernel-server restart
11. telnet服务搭建
安装客户端
apt-get install telnet
安装服务端
apt-get install telnetd
安装网络守护进程
apt-get install openbsd-inetd
安装xinetd
apt-get install xinetd
重启telnet服务
sudo /etc/init.d/xinetd restart
查看服务,显示服务器正在监听
netstat -a | grep telnet
12. VMware虚拟机挂载宿主机共享文件夹
使用/etc/fstab自动挂载
sudo vi /etc/fstab
添加如下内容:
.host:/ /mnt/hgfs fuse.vmhgfs-fuse allow_other,defaults 0 0
13. sshd安装
sudo apt-get install openssh-server
允许远程使用root账号ssh连接本机
vi /etc/ssh/sshd_config
修改如下:
#PermitRootLogin prohibit-password
PermitRootLogin yes
需要重启系统或者sshd服务
sudo /etc/init.d/ssh stop
sudo /etc/init.d/ssh start
sudo service ssh restart
安装ssh服务后,系统默认开启系统sshd,查看sshd状态如果不是默认启动,修改服务为enable
sudo systemctl enable ssh
使用命令sudo ps -e |grep ssh查看sshd是否启动,如果没有,输入sudo service ssh start启动服务。
14. 64位兼容32gcc的库
sudo apt install lib32ncurses5 lib32z1 lib32stdc++6 libncurses5-dev libncursesw5-dev
15. vscode安装(deb包)
点击下载code_1.44.2-1587059832_amd64.deb
sudo dpkg -i code_1.44.2-1587059832_amd64.deb
code
// ctrl+~ 打开vscode的shell
16. gitkraken装(deb包)
sudo dpkg -i gitkraken-amd64.deb
gitkraken
17. git安装
sudo apt install git
git config --global user.name "xxx" //用户名
git config --global user.email "xxx"//邮箱地址
ssh-keygen -t rsa -C "xxx"//邮箱地址
cat ~/.ssh/id_rsa.pub
// 拷贝公钥内容到coding
git clone xxx//ssh地址
18. subversion安装
sudo apt install subversion
19. cmake安装
sudo apt install cmake
20. python环境安装
sudo apt-get install python3 python3-pip
sudo pip3 install opencv-python
21. SDK交叉编译安装
tar zxf Hi3519V101_SDK_V1.0.4.0.tgz
./sdk.unpack
cd osdrv/opensource/toolchain/arm-hisiv500-linux/
chmod 777 arm-hisiv500-linux.install
sudo ./arm-hisiv500-linux.install
cd osdrv/opensource/toolchain/arm-hisiv600-linux/
chmod 777 arm-hisiv600-linux.install
sudo ./arm-hisiv600-linux.install
source /etc/profile
注意:修改/opt/hisi-linux/x86-arm/arm-hisiv500-linux/arm-hisiv500-linux-uclibcgnueabi/lib/libstdc++.la中的libdir为/opt/hisi-linux/x86-arm/arm-hisiv500-linux/arm-hisiv500-linux-uclibcgnueabi/lib
22. uboot编译
make ARCH=arm CROSS_COMPILE=arm-hisiv500-linux- hi3519v101_config
make ARCH=arm CROSS_COMPILE=arm-hisiv500-linux-
cp u-boot.bin ../../../tools/pc/uboot_tools/
cd ../../../tools/pc/uboot_tools/
./mkboot.sh reg_info_hi3519v101.bin u-boot_new.bin
u-boot_new.bin为最终的uboot
23. kernel编译
cp arch/arm/configs/hi3519v101_big_little_defconfig .config
make ARCH=arm CROSS_COMPILE=arm-hisiv500-linux- menuconfig
make ARCH=arm CROSS_COMPILE=arm-hisiv500-linux- uImage
注意:如果编译报错"mkimage" command not found - U-Boot images will not be built,直接使用命令sudo apt-get install u-boot-tools安装即可,SDK里面也有mkimage工具。
24. 根文件系统
SDK里面已经有制作好的镜像文件,package/image_big-little/rootfs_uclibc_big-little.tgz解压即可得到根文件系统的目录文件,制作jffs2格式命令如下:
./mkfs.jffs2 -d rootfs_uclibc_big-little -l -e 0x40000 -o rootfs_uclibc_256k.jffs2
注意:需要先编译mkfs.jffs2工具,如果osdrv/tools/pc/jffs2_tool编译报错缺少zlib.h,需要先编译zlib,命令如下:
cd osdrv/tools/pc/zlib/zlib-1.2.8
./configure
make
转载请注明出处,如有错漏之处,敬请指正。