Based on STM32MP157 microcontroller
1. Install tftp server
First ensure that ubuntu is successfully connected to the network
1. Installation steps
Function: Complete file transfer between ubuntu and development board
1) Install the installation package of tftp server
sudo apt-get install tftpd-hpa tftp-hpa
tftpd-hpa: server side
tftp-hpa: client
2) In the home directory, create a folder tftpboot and add the highest permissions
cd ~
mkdir tftpboot
chmod 777 tftpboot
3) Configure tftp server
4) Restart the configuration file
source /etc/default/tftpd-hpa
5) Restart the tftp server
sudo service tftpd-hpa restart
6) Test locally whether the tftp server is installed successfully
effect:
2. Install nfs server
1. Installation steps
Function: Mount ubuntu files to the development board
1) Install the installation package of nfs server
sudo apt-get install nfs-kernel-server
2) In the home directory, create a folder nfs and add the highest permissions
cd ~
mkdir nfs
chmod 777 nfs
3) Configure nfs server
Copy rootfs-ok.tar.xz to ubuntu~/nfs
4) Restart the nfs server
sudo service nfs-kernel-server restart
5) Locally test whether the nfs server is installed successfully
6) Function:
3. Burn uboot image file
1. Prepare documents
1. Copy the following files to ubuntu ~/FSMP1A (create the FSMP1A file in the home directory)
1) File: tf-a-stm32mp157a-fsmp1a-trusted.stm32
2) File: u-boot-stm32mp157a-fsmp1a-trusted.stm32
3) File: sdtools.sh
2. Insert the TF card into the card reader
3. Insert the card reader into the computer USB port and connect to Ubuntu
2. Enter ubuntu and execute the following command
ls /dev/sd* -----> Check whether the U disk is recognized by ubuntu (if there is a result, the recognition is successful and the disk partition operation can be ignored)
Notice:
Need to observe whether sdb appears! ! ! If there is no sdb, you need to partition the USB disk.
( sda is ubuntu , sdb is mobile device, the number indicates the partition )
Disk related operationsdisk partition:sudo fdisk /dev/sdbm can prompt help information,ddelete partitionnCreate a new partition and use the default for each step.pPrint partitionw: Write the operation to disk and exitq: Exit directly
mount *
sudo mount /dev/sdb1 ~/udisk| |The disk partition to be mounted and the location to be mounted in Ubuntu / make sure the location existsAfter the mount is successful, operating on the directory in Ubuntu is equivalent to operating on the disk.
Unmount
sudo umount ~/umount -----> Directly add the mount location to be canceledCanceling the mount will not affect previously stored content.
format
sudo mkfs tab key twice can display the file system format /dev/sdb1 usually formatted as ext4/ntfs
3. Enter the ~/FSMP1A directory in ubuntu and execute the following command
4. Disconnect TF from ubuntu
5. Disconnect the TF card and insert it into the development board card slot.
6. Change the DIP switch to TF card startup mode
7. Power on the development board and check the phenomenon in the serial port tool.
4. Networking steps
1. Network preparation
2.Connection method
3. Configure static IP in ubuntu
4 Development board configuration network
Enter the following command on the serial port tool:
5. Is the networking successful?
Enter commands on the serial port tool
ping 192.168.4.250 ------>Check the phenomenon
6 Error message resolution
STM32MP> setenv ethaddr 12:56:78:ff:ff:4e
STM32MP>saveenv