This commit is contained in:
weidongshan
2021-07-19 07:33:07 +08:00
parent 9a2727c67e
commit f5e121829f
4 changed files with 1071 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
## 先修改STM32MP157的设备树以使用UART8
### 1. 只关注APP开发的话
把GIT仓库中这个dtb文件复制到开发板上去就可以
```shell
doc_and_source_for_drivers\STM32MP157\source\A7\09_UART\00_stm32mp157_devicetree_for_uart8\dtb
stm32mp157c-100ask-512d-lcd-v1.dtb
```
操作方法:
* Ubuntu上复制dtb文件到NFS目录
```shell
$ cp stm32mp157c-100ask-512d-lcd-v1.dtb ~/nfs_rootfs/
```
* 开发板上挂载NFS文件系统
* vmware使用NAT(假设windowsIP为192.168.1.100)
```shell
[root@100ask:~]# mount -t nfs -o nolock,vers=3,port=2049,mountport=9999
192.168.1.100:/home/book/nfs_rootfs /mnt
```
* vmware使用桥接或者不使用vmware而是直接使用服务器假设Ubuntu IP为192.168.1.137
```shell
[root@100ask:~]# mount -t nfs -o nolock,vers=3 192.168.1.137:/home/book/nfs_rootfs /mnt
```
* 更新设备树
```shell
[root@100ask:~]# mount /dev/mmcblk2p2 /boot
[root@100ask:~]# cp /mnt/stm32mp157c-100ask-512d-lcd-v1.dtb /boot
[root@100ask:~]# sync
```
* 重启开发板
* 在串口可以看到以下设备节点
```shell
ls /dev/ttySTM*
/dev/ttySTM0
/dev/ttySTM1
/dev/ttySTM3
```
### 2. 从头修改设备树文件