toradex imx8mp-verdin-mallow通过uuu烧录的问题

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

toradex imx8mp-verdin-mallow通过uuu烧录的问题

336件の閲覧回数
gaotao
Contributor I

问题:通过uuu烧录toradex imx8mp-verdin时,板卡进入initramfs之后uuu主机通过fbk无法与板卡通信

环境:toradex yocto scarthgap

内核:6.6.74

设备树:imx8mp-verdin-nonwifi-mallow.dts

initramfs:fsl-image-mfgtool-initramfs-verdin-imx8mp.cpio.gz.u-boot(来自toradex yocto)或者fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.zst.u-boot(来自LF_v6.12.3-1.0.0_images_IMX8MPEVK)

目前线索:uuu.pdf-> FBK: Android fastboot protocol, implement at initramfs. See project imx-uuc ,需要在/init中手动挂载以下脚本并获取udc设备手动启动fastboot监听,来源:imx-uuc->linuxrc

mount -t sysfs none /sys
mount -t proc none /proc
mount -t devtmpfs none /dev
mount -t configfs none /sys/kernel/config

UDC_DIR=/sys/class/udc
GADGET_NAME=g1

while true; do
if [ "$(ls -A $UDC_DIR)" ]; then
for udc in $UDC_DIR/*; do
udc_name=$(basename $udc)

# 如果 gadget 目录不存在,创建 gadget
if [ ! -d /sys/kernel/config/usb_gadget/$GADGET_NAME ]; then
mkdir -p /sys/kernel/config/usb_gadget/$GADGET_NAME
cd /sys/kernel/config/usb_gadget/$GADGET_NAME

echo 0x1fc9 > idVendor # NXP Vendor ID
echo 0x0152 > idProduct # Product ID,按需修改

mkdir -p strings/0x409
echo "0123456789" > strings/0x409/serialnumber
echo "NXP" > strings/0x409/manufacturer
echo "FBK Gadget" > strings/0x409/product

mkdir -p configs/c.1
echo 120 > configs/c.1/MaxPower
mkdir -p functions/fastboot.0
ln -s functions/fastboot.0 configs/c.1/

# 绑定 UDC
echo $udc_name > UDC
fi

# gadget 已启动,进入 shell 等待连接
exec /bin/sh
done
else
echo "No UDC found, retry after 5 seconds"
sleep 5
fi
done

细节问题:目前挂载/sys之后还是不能获取到udc设备,在内核中打开了以下设备以及dwc3 platform还是不能找到udc中的设备,设备树暂时还未修改,dmesg报错dwc3未正常启动

Device Drivers
  USB support
    USB gadget support (very last entry)
      Mass storage
      Function filesystem (functionFS
      HID Gadget
    USB Physical Layer drivers
      Freescale MXS USB PHY support

sh-5.2# dmesg
[11.750414] dwc3 38100000.usb: Configuration mismatch, dr mode forced to gadget
[11.766399] platform 38100000.usb:deferred probe pending

0 件の賞賛
返信
6 返答(返信)

302件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport

HI @gaotao!

Thank you for contacting NXP Support!

 

Unfortunately, we do not provide software support for Toradex boards.

 

The software we offer is specifically designed for the iMX8MP-EVK board and is intended to be used only with that hardware.

 

For assistance with Toradex platforms, we recommend reaching out directly to Toradex Support, as they will be best equipped to help with your specific setup.

 

Best regards,
Chavira

0 件の賞賛
返信

287件の閲覧回数
gaotao
Contributor I

你好你好,再次请教一下,在iMX8MP-EVK的板子我应该怎么找到关于firmware相关资料呢?我想自己编译这些内核,设备树以及initramfs,包括里面的启动脚本。目前找到LF_v6.12.3-1.0.0_images_IMX8MPEVK包里面貌似没有可定制的uuu脚本的环境支持,需要支持FBK操作最小文件系统的。

0 件の賞賛
返信

265件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport

HI @gaotao!

 

You can consult all our documentation in the link below:

https://www.nxp.com/design/design-center/software/embedded-software/i-mx-software/embedded-linux-for...



Best Regards,
Chavira

0 件の賞賛
返信

133件の閲覧回数
gaotao
Contributor I
你好,下面的问题还是很希望能得到帮助,非常感谢!
0 件の賞賛
返信

241件の閲覧回数
gaotao
Contributor I

你好你好,感谢你们的回复!
LF_v6.12.3-1.0.0_images_IMX8MPEVK确实有,也使用了里面的fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.zst.u-boot,但是我发现起来之后缺少启动fastboot的脚本?并且我想配置类似mfgtool\Profiles\Linux\OS Firmware\firmware里面的内核和设备树,如何去配置这个内核和设备树以及initramfs的启动脚本才能保证booti之后就能通过uuu的fbk进行通信呢?imx8mp-evk有相关内容的文档帮助吗?我希望用类似以下脚本一键烧录:

uuu_version 1.4.243

SDPS: boot -f imx-boot-recoverytezi
CFG: FB: -vid 0x1b67 -pid 0x4000

FB: ucmd setenv fastboot_buffer 0x48200000
FB: download -f Image-yocto
FB: ucmd setenv fastboot_buffer 0x50200000
FB: download -f imx8mp-verdin-nonwifi-mallow.dtb
FB: ucmd setenv fastboot_buffer 0x52300000
FB: download -f fsl-image-mfgtool-initramfs-verdin-imx8mp.cpio.gz.u-boot
FB: ucmd setenv bootargs console=ttymxc2,115200 root=/dev/ram rw
FB: acmd booti 0x48200000 0x52300000 0x50200000

# 1.  等待进入 shell
FBK: ucmd echo "==== Initramfs started ===="

# 2. 分区脚本准备

# 3. 烧写 U-Boot 到 boot0

# 4. 写入 dtb/kernel/flag/logo(dd 到特定位置)

# 5. 格式化/挂载分区

# 6. 解压根文件系统、应用程序等


或者说evk的板子不需要特殊的配置,uuu的文档中提到了一些,打开一些内核配置并且加上imx-uuc中的linuxrc启动脚本就可以了??evk的板子我还没尝试过,如果是那样的话就确实不需要别的帮助文档了。

gaotao_1-1755221880055.png

 

gaotao_0-1755221835854.png

 

还有再问下,LF_v6.12.3-1.0.0_images_IMX8MPEVK中有初始内核和设备树吗?能给我上面uuu脚本使用的,我不太希望打包成一个文件去烧录,更倾向使用和原来的mfgtool类似的方法


可能说的有点多,简单总结一下:
1、imx8mp-verdin evk的板子要是想使用uuu脚本分开烧录sdps->fb->fbk有什么帮助配置的文档吗?还是不需要特殊配置?(内核配置?设备树配置?initramfs启动脚本?gadget?udc?)
2、原来的mfgtool\Profiles\Linux\OS Firmware\firmware中的初始文件在LF_v6.12.3-1.0.0_images_IMX8MPEVK中有吗?
3、或者我的思路有可能和你们有差异,期待更正指教!!

0 件の賞賛
返信

289件の閲覧回数
gaotao
Contributor I
非常感谢你的回复!
0 件の賞賛
返信