当前位置:网站首页>NXP imx8mp学习记录

NXP imx8mp学习记录

2022-06-22 03:01:00 JanKin_BY

1.带有系统的imx8mp测试

将8mp micro USB与宿主机连接到一起,连接第二个串口/dev/ttyUSB2,boot mood 选择 0 0 1 0,115200 8  N 1 ,建议用Minicom,显示为终端,root 密码直接回车。

https://www.nxp.com/docs/en/user-guide/IMX_YOCTO_PROJECT_USERS_GUIDE.pdf i.MX 8M Plus | Cortex-A53/M7 | NXP Semiconductors

依赖:

sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 xterm rsync curl
mkdir ~/imx-yocto-bsp
cd imx-yocto-bsp
mkdir  bin 
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/imx-yocto-bsp/bin/repo #下载repo
chmod a+x ~/imx-yocto-bsp/bin/repo #给repo权限
export PATH=~/imx-yocto-bsp/bin:$PATH #设置访问
cd ~/imx-yocto-bsp
git config --global user.name "Your Name"  #名字随意
git config --global user.email "Your Email" #邮箱不限
git config --list
./bin/repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-hardknott -m imx-5.10.35-2.0.0.xml
./bin/repo sync
######https://source.codeaurora.org/external/imx/imx-manifest
######https://source.codeaurora.org/external/imx/imx-manifest/tree/?h=imx-linux-hardknott 打开网址查看是否有添加的系统

DISTRO=fsl-imx-wayland MACHINE=imx8mp-lpddr4-evk source imx-setup-release.sh -b standalone

如果 repo sync 过程过长

修改repo文件
打开~/bin/repo文件并修改google地址
# vi ~/bin/repo
From
REPO_URL = 'https://gerrit.googlesource.com/git-repo'
To
REPO_URL = 'https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'

2.yocto工程创建

uuu下载image

sudo ~/Desktop/uuu -b emmc_all imx-boot imx-image-full-imx8mp-lpddr4-evk.wic.bz2

yocto交叉编译工具使用

yocto交叉編譯工具連

./fsl-imx-xwayland-glibc-x86_64-imx-image-full-cortexa53-crypto-imx8mp-lpddr4-evk-toolchain-5.10-hardknott.sh
 . /opt/fsl-imx-xwayland/5.10-hardknott/environment-setup-cortexa53-crypto-poky-linux

CC rs-hello-realsense.cpp  -o rs-realsense -O1 -lstdc++ -lpthread -lm -ldl -lrt -lrealsense2

yocto工程創建:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
知乎imx8m plus yocto project compile with realsense D455教程鏈接:
https://zhuanlan.zhihu.com/p/402846961
下驅動:
chmod a+x uuu //安裝uuu https://github.com/NXPmicro/mfgtools/releases/tag/uuu_1.4.149
將板子上的boot按鈕設置成USB Serial Download Mode 0 0 0 1
同 執行lsusb 將看到一個帶有NXP的串口
sudo ~/Desktop/uuu -b emmc_all imx-boot imx-image-full-imx8mp-lpddr4-evk.wic.bz2  //yocto工程編譯鏡像
sudo ./uuu LF_v5.10_2.0.0_images_IMX8MPEVK.zip //官方鏡像https://www.nxp.com.cn/document/guide/getting-started-with-the-i-mx-8m-plus-evk:GS-iMX-8M-Plus-EVK
NXP8MP聯接WIFI:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
在主目錄下運行
modprobe moal mod_para=nxp/wifi_mod_para.conf
ifconfig mlan0 up
ifconfig uap0 up
/usr/sbin/wpa_supplicant -B -i mlan0 -c /etc/wpa_supplicant.conf -Dwext
# 搜索可见wifi
wpa_cli -i mlan0 scan
# 获取搜索结果
wpa_cli -i mlan0 scan_result
# 设置wifi的ssid
# ssid需要添加双引号,双引号还要加斜杠或者单引号
wpa_cli -i mlan0 set_network 0 ssid \"BY\"
# 设置加密方式,WPA-PSK代表:WPA-PSK/WPA2-PSK
wpa_cli -i mlan0 set_network 0 key_mgmt WPA-PSK
# 设置wifi密码,和账号一样需要双引号
wpa_cli -i mlan0 set_network 0 psk \"123456789\"
# 新配置的wifi默认是禁用的,启用,启用后如果没有连接wifi,新增wifi可见就会自动连接的
wpa_cli -i mlan0 enable_network 0
# 再次查看状态,查看是否已经连接网络
# wpa_state=COMPLETED表示完成连接,但是如果signal_level比较小时表示实际没有连接
wpa_cli -i mlan0 status
# 保存wifi配置,最好在启用wifi后再保存,否则保存的wifi是默认禁用的
wpa_cli -i mlan0 save_config
#手动从DHCP中获取IP地址的:
udhcpc -imlan0
設置dns

临时:

vi /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4

永久

sudo gedit /etc/systemd/resolved.conf

# See resolved.conf(5) for details
[Resolve]
DNS=8.8.8.8
#FallbackDNS=
#Domains=
LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#Cache=yes
#DNSStubListener=yes

查看文件真是链接ls imx-boot -l

原网站

版权声明
本文为[JanKin_BY]所创,转载请带上原文链接,感谢
https://blog.csdn.net/JanKin_BY/article/details/119610077