mirror of
https://e.coding.net/weidongshan/linux/doc_and_source_for_drivers.git
synced 2025-12-02 12:51:16 +08:00
tmp
This commit is contained in:
63
STM32MP157/doc_pic/09_UART/04_a_先修改STM32MP157的设备树以使用UART8.md
Normal file
63
STM32MP157/doc_pic/09_UART/04_a_先修改STM32MP157的设备树以使用UART8.md
Normal 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. 从头修改设备树文件
|
||||
|
||||
Reference in New Issue
Block a user