Build weidongshan Linux development board learning environment
ToDoList
- Download materials
- Configure Ubunt u development environment
- Configure Windows development environment
- Configure development board development environment
Ref
Ref.1 01_Embedded Linux Application development complete manual_Complete collection of weidongshan series video documents V2.8
1. Construction of Weidong mountain development board development environment
1.1 download of development materials
- Baidu cloud download materials
01_Embedded Linux Application development complete manual_Complete collection of weidongshan series video documents V2.8 02_[Student notes] 100 ask_imx6ull Actual combat record of development board-Miss Yang
- GIT download source code
/*You need to configure the user name and password first*/ book@100ask:~/WeiDongShanLinux$ git clone https://e.coding.net/weidongshan/01_all_series_quickstart.git
1.2 build Ubuntu development environment
VMWARE: VMware-workstation-full-15.1.0-13591040
Ubuntu: ubuntu18.04_x64 (you can use the installed Ubuntu virtual machine in the download)
1.2.1 modify software installation source
- Modify the software source to improve the speed of software installation
sudo gedit /etc/apt/sources.list
/*China University of science and technology*/ deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
/*163 Software source*/ deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
- Configuration effective
sudo apt-get update
- Errors encountered
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarly unavailable)
- terms of settlement
sudo rm /var/lib/dpkg/lock-frontend sudo rm /var/lib/dpkg/lock
- View installation package information
dpkg -l
1.2.2 installation of various servers
- NFS services
Ubuntu / development board, shared file service - FTP service
Ubuntu/Windows, shared file service - SSH service
Remote login to Ubuntu system
Installation command
/*This script will set the original address of software update by default, which can be manually set to 163 software source, which is faster*/ wget --no-check-certificate -O Configuring_ubuntu.sh \ https://weidongshan.coding.net/p/DevelopmentEnvConf/d/DevelopmentEnvConf/git/raw/master/Configuring_ubuntu.sh \ && sudo chmod +x Configuring_ubuntu.sh && sudo ./Configuring_ubuntu.sh
Installation script, Configuring_ubuntu.sh
- An error was encountered
Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
- Solution: delete the process that occupies the file
Display process
ps -A | grep apt
Close process
sudo kill -9 processnumber
1.2.3 SSH service
- Start SSH service
sudo /etc/init.d/ssh start
- View system startup services
/*netstat - atulnp All ports and all corresponding programs will be displayed, and the desired words can be filtered out with grep pipeline*/ sudo netstat -ntlp
1.2.4 NFS service
- Modify mountd port
book@100ask:~$ sudo vi /etc/services
- Add two lines
mountd 9999/tcp mountd 9999/udp
- Modify nfs configuration file / etc/exports
stay Ubuntu Linux In the system,/etc/exports yes nfs Global profile of the server. A line in the configuration file is a configuration item, which is used to indicate "which clients" in the network share "which directory resources". Add the created shared directory to it, followed by*(rw,sync,no_root_squash,no_subtree_check)parameter
- restart
Restart rpcbind service and nfs service. nfs is an RPC program. Before using it, you need to map the port and set it through rpcbind
(1)sudo /etc/init.d/rpcbind restart [ ok ] Restarting rpcbind (via systemctl): rpcbind.service. (2)sudo /etc/init.d/nfs-kernel-server restart [ ok ] Restarting nfs-kernel-server (via systemctl): nfs-kernel-server.service.
If restarting NFS kernel server (via systemctl) appears: NFS kernel server serviceJob for nfs-server. service canceled
There may be a problem with the file modification. Create a new nsf folder under home according to the above.
- test
sudo /etc/init.d/nfs-kernel-server status showmount -e
- Status
book@100ask:~$ sudo /etc/init.d/nfs-kernel-server status nfs-server.service - NFS server and services Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2020-11-26 07:14:31 EST; 7s ago Process: 5249 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS) Process: 5242 ExecStopPost=/usr/sbin/exportfs -au (code=exited, status=0/SUCCESS) Process: 5164 ExecStop=/usr/sbin/rpc.nfsd 0 (code=exited, status=0/SUCCESS) Process: 4972 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS) Process: 5241 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=1/FAILURE) Main PID: 4972 (code=exited, status=0/SUCCESS) Nov 26 07:14:31 100ask systemd[1]: Starting NFS server and services... Nov 26 07:14:31 100ask exportfs[5241]: exportfs: Failed to stat /home/WeiDongShanLinux/test/: No s...ectory Nov 26 07:14:31 100ask systemd[1]: nfs-server.service: Control process exited, code=exited status=1 Nov 26 07:14:31 100ask systemd[1]: nfs-server.service: Failed with result 'exit-code'. Nov 26 07:14:31 100ask systemd[1]: Stopped NFS server and services. Hint: Some lines were ellipsized, use -l to show in full.
1.2.5 compilation tool chain
- Set GIT username password
book@100ask:~/WeiDongShanLinux/100ask_imx6ull-sdk$ git config --global user.email "user@100ask.com" book@100ask:~/WeiDongShanLinux/100ask_imx6ull-sdk$ git config --global user.name "100ask"
- Download cross compilation tool
yingmuubuntu@ubuntu:~/WLinux$ git clone https://e.coding.net/codebug8/repo.git yingmuubuntu@ubuntu:~/WLinux$ mkdir -p 100ask_imx6ull-sdk && cd 100ask_imx6ull-sdk yingmuubuntu@ubuntu:~/WLinux/100ask_imx6ull-sdk$ ../repo/repo init -u \ https://e.coding.net/weidongshan/manifests.git -b linux-sdk -m imx6ull/100ask_imx6ull_linux4.9.88_release.xml --no-repo-verify yingmuubuntu@ubuntu:~/WLinux/100ask_imx6ull-sdk$ ../repo/repo sync -j4
- set up
sudo vim .bashrc
- Add the following to the file
export ARCH=arm export CROSS_COMPILE=arm-linux-gnueabihf- export PATH=$PATH:/home/book/100ask_imx6ull-sdk/ToolChain/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin
- Configuration effective
source .bashrc
1.3 build Windows development environment
1.3.1 VMWare
-
Install VM15 software
- Open the Intel VT in the native BIOS
- Before opening the Ubuntu virtual machine, set the network to NAT mode
-
Configure virtual network editor
Start menu - > virtual network editor
Find the network card address corresponding to the virtual machine and set NAT
-
Set the port
1.3.2 development board serial port driver software
Installing serial driver software: 360 software driver master
Serial driver: cp210x_ Universal_ Windows_ Driver. Zip (similar software)
1.3.3 Filezilla
FTP client tools
1.3.4 MobaXterm
Multiple protocol client tools
2. Usage of tools
2.1 mobaxterm serial port printing information, remote login Ubuntu
2.1.1 login to Ubuntu via Ethernet address
- 127.0.0.1 cannot log in to Ubuntu
terms of settlement
https://blog.csdn.net/qq_39510253/article/details/109107036
2.2 SSH service login development board
2.2.1 COM serial port login development board
2.2.2 SSH service login development board
2.3 filezilla
- Double click to submit the file
3. Development board configuration
3.1 network cable socket
eth: J7 net 2
3.2 enable DHCP
[root@imx6ull:~]# udhcpc udhcpc: started, v1.31.1 udhcpc: sending discover udhcpc: sending select for 192.168.8.112 udhcpc: lease of 192.168.8.112 obtained, lease time 86400 deleting routers adding dns 192.168.8.1
3.3 mount Ubuntu shared network disk
[root@imx6ull:~]# mount -t nfs -o nolock,vers=3,port=2049,mountport=9999 192.168.8.107:/home/book/WeiDongShanLinux/test /mnt
- Mount failed
[root@imx6ull:~]# ls /mnt ls: /mnt: Stale file handle
[root@imx6ull:~]# umount -lf /mnt
- Mount succeeded
[root@imx6ull:~]# mount /dev/root on / type ext4 (rw,relatime,data=ordered) devtmpfs on /dev type devtmpfs (rw,relatime,size=87344k,nr_inodes=21836,mode=755) proc on /proc type proc (rw,relatime) devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=666) tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777) tmpfs on /tmp type tmpfs (rw,relatime) tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755) sysfs on /sys type sysfs (rw,relatime) debugfs on /sys/kernel/debug type debugfs (rw,relatime) 192.168.8.107:/home/book/WeiDongShanLinux/test on /mnt type nfs (rw,relatime,vers=3,rsize=262144,wsize=262144,namlen=255,hard,nolock,proto=tcp,port=2049,timeo=600,retrans=2,sec=sys,mountaddr=192.168.8.107,mountvers=3,mountport=9999,mountproto=tcp,local_lock=all,addr=192.168.8.107)