hello,we use our custom carrier board , and we have no network over our usb0.so i find when i use the l4t_initrd_flash.sh to flash my nvme it can not boot up ,always Waiting for target to boot-up…and then timeout,here is our serial port log ,can we use the l4t_initrd_flash.sh to flash the nvme device without the --network usb0 way?how can i do that…Thanks.
COM36 (USB-SERIAL CH340 (COM36))_2024-07-23-104229.log (133.0 KB)
how about the --direct usb0?
Flashing with ethernet cable is also supported, but you need to know the IP address in advance, and the ethernet cable is only effective after the device boots into initrd, and you still need a USB cable for the flashing process prior to it.
Cropped from Linux_for_Tegra/tools/kernel_flash/README_initrd_flash.txt
- Use --network <netargs> if you want the flash process to happen through Ethernet protocol
instead of USB protocol. Ethernet protocol is more reliable than USB protocol
for external devices like USB.
<netargs> can be "usb0" when flashing using ethernet protocol through the usb
flashing cable or "eth0:<target-ip>/<subnet>:<host-ip>" when flashing using
ethernet protocol through the RJ45 cable.
- Use --network if you want the flash process to happen through Ethernet protocol
instead of USB protocol. Ethernet protocol is more reliable than USB protocol
for external devices like USB.
1.Does it means i can use the USB protocol ? how i can do that even it will be slower than use the ethernet.i try without --network usb0 but it can not work.
2.how can i know the IP address in advance ,so can i set the IP manunally when it login the initrd as same as the IP i give to l4t_initrd_flash.sh before? when it start to Waiting for target to boot-up…,i try it ,but it can not flash. here is the log.
flash_3-2_0_20240723-133134.log (6.1 KB)
tmp.2wdqSBoMrM.txt (2.3 KB)
i try to ping the device through my virtual machine it’s ok.i can log in the device use sshpass -p root ssh root@192.168.137.105 using the vmware.
When you tried --network usb0, you are already under usb protocol. If it failed on your board, it is just because it is custom board and default device tree does not recognize your board…
你前面用–network usb0的時候就已經是用usb protocol. 因為你的板子是custom board, 預設的DT跟你板子上的USB設定對不上, 所以usb0才失敗…
so can i change my usb DT in order to match my custom board and i can use usb0?and how
This document has the info to porting device tree to match your board design.
Hi, WayneWWW,thank you for your answer.
1.it means after i match my design i still can use --network usb0 to flash my nvme?
2.how about the --network eth0: ,can i doing something for that .
already mentioned here. Not sure which part you don’t understand.
Hi,WayneWWW, i have check the design with our hardware engineer, we use the 2.0 usb2-0 and usb3-0 the same as the Official suite for recovery mode , i see usb2-0 mode is otg ,but i am not sure if i need to change it to device , but flash the emmc using flash.sh work well,Does it mean our usb device config is right?
請問你的design有用Cypress PD controller嗎?
没,没有用,现在是串口看到已经进入了initrd,但是虚拟机里面一直在等待boot-up.虚拟机也发现不了usb设备。
可能用中文解釋比較快一點
-
we use the 2.0 usb2-0 and usb3-0 the same as the Official suite for recovery mode
你沒有用Cypress PD做USB type C port的話就已經代表你的設計跟Devkit不一樣了 其他東西都不重要. Device tree一定要改.
-
flash the emmc using flash.sh work well,Does it mean our usb device config is right?
這個也沒證明什麼, flash.sh的燒錄沒有在管device tree. 只要你能進recovery mode就能燒
recovery mode只是recovery pin觸發的硬體event. 他不等於你的usb port能正常工作. 比方說可能開進kernel之後你的usb就壞了. 現在的狀況就是這樣
那进入recovery mode后用flash.sh 烧写emmc成功应该也是用的usb做device吧,至少说明数据传输正常?但是进入kernel在initrd下就不正常,说明recovery模式下设备树配置正确,kernel设备树不正确?PD是USB充电功能么我们硬件说,对了那这个有影响么。怎么确认修改呢我的设备树
- 現在你沒搞懂的是flash的流程. 我這裡解釋一下
flash.sh只有用簡單的usb device功能. 而且這個usb device 功能是用recovery pin觸發的.
正常來說你的usb device mode要取決於Vbus-DET/ID pin去決定出來的.
Recovery mode完全不管這些, 所以這個流程會動也不能代表你的usb能正確執行.
UEFI跟kernel還有dtb都是flash.sh燒進去的. flash.sh是用Bootrom在執行, 沒有在管UEFI/Kernel/dtb. (不然就變成flash.sh要靠自己燒進去的東西才能動, 這是不合理的…)
Initrd flash的流程其實是flash.sh先跑一段之後再開進initrd 幫你燒nvme. 進去initrd這一段之後已經等同開進Linux kernel. Linux kernel driver會看device tree的設定決定usb的功能, 你現在是這一段壞了沒辦法跑.
- 我們基本上一條topic就只處理一個問題. 你想要在這裡問usb device tree的東西就請你eth0 燒錄的問題開一條新的. 如果你想問eth0就請你開一條新的給usb device tree.
好的,eth0的我重新再开一个话题,没有用PD这种有影响的话设备树哪些需要变动呢,有通俗点的例子么,说明文档看了没研究透。
這個東西沒有什麼直接的答案. 因為完全取決於你的硬體設計
做type C或是micro USB port的寫法就不一樣了.
甚至你做成type A的話從usb spec來說就根本不能進device mode.
我們的文件對於三種port的例子都有說明. 如果你看不懂可能要請你的硬體人員一起跟你討論.
好的,十分感谢,还想请教一下同一个type C口引出来的支持2.0和3.0两种,我看2.0是收发两个信号,3.0是收发差分各两个,是不是只要2.0或者3.0一个在kernel下可以用就会有usb设备节点出来?l4t_initrd_flash.sh有没有限制必须2.0或者3.0这种。
usb3.0照spec一定得有usb2.0做搭配, 所以沒有所謂 "單獨usb3.0"這種設計
所以單獨usb2.0信號可以動是合理的, 但沒有單獨usb3.0這種.
另外, 你現在在做的事情不是l4t_initrd_flash.sh的限制. 你就是在做Linux kernel的USB device tree設定.
比方說你今天已經開進emmc之後你要把usb port功能弄到好也是在做一樣的事情. 這種狀況下根本沒有l4t_initrd_flash.sh參與.
明白了,非常感谢您的支持,我先仔细研究下文档和原理图,有问题再请教您。