Update rootfs
In the debugging phase, we often need to update rootfs, such as adding a tool (only need to copy the corresponding executable file, library and configuration file). In this case, it is not necessary to update the entire rootfs partition. You can use U disk or SD card to copy the relevant files of the tool and put them in the corresponding directory of rootfs. However, the use of U disk or SD card operation is more cumbersome, can be replaced by SSH to transmit.
First, we need to install SSH through builderroot:
And according to the content of Chapter 6, replace rootfs.tar Generated for builderroot, and burn the rootfs to the board. After the system starts:View password validity
# cat /etc/shadow
The third field is the valid period of the password, which is related to the system time. First set the system time, and then modify the password# date -s "2021-03-02 12:12:12"
configure SSH
# adduser sshd
# passwd root
# vi /etc/ssh/sshd_config
# /etc/init.d/S50sshd restart
If you have the following prompt, you cannot create the /var/empty directory. (we can create this directory in the file system, or we can start to create a directory)
# mkdir -p /var/empty
Turn on SSH again, and SSH will do
# ifconfig eth0 up
# udhcpc
Then, install the software wincp on windows, and open the connection board. The password is the password of root set just now
After the connection is successful, you can copy the file