您尚未登录。

#1 Re: 全志 SOC » UBOOT 下的 RNDIS 功能工作异常 » 2024-05-21 14:59:59

host 端的一段更详细的log 如下,

May 17 12:47:47 officehp kernel: usb 1-10.3: USB disconnect, device number 65
May 17 12:47:50 officehp kernel: usb 1-10.2: USB disconnect, device number 64
May 17 12:48:51 officehp kernel: usb 1-10.2: new high-speed USB device number 66 using xhci_hcd
May 17 12:48:51 officehp kernel: usb 1-10.2: config 1 has 0 interfaces, different from the descriptor's value: 1
May 17 12:48:51 officehp kernel: usb 1-10.2: New USB device found, idVendor=1f3a, idProduct=1010, bcdDevice= 3.15
May 17 12:48:51 officehp kernel: usb 1-10.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
May 17 12:48:51 officehp kernel: usb 1-10.2: Product: RNDIS/Ethernet Gadget
May 17 12:48:51 officehp kernel: usb 1-10.2: Manufacturer: Allwinner Technology
May 17 12:48:51 officehp networkd-dispatcher[673]: WARNING:Unknown index 18 seen, reloading interface list
May 17 12:48:51 officehp kernel: rndis_host 1-10.2:2.0 usb0: register 'rndis_host' at usb-0000:00:14.0-10.2, RNDIS device, de:ad:be:ef:00:00
May 17 12:48:51 officehp NetworkManager[663]: <info>  [1715921331.4973] manager: (usb0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/18)
May 17 12:48:51 officehp mtp-probe[56505]: checking bus 1, device 66: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10.2"
May 17 12:48:51 officehp mtp-probe[56505]: bus: 1, device: 66 was not an MTP device
May 17 12:48:51 officehp systemd-udevd[56503]: Using default interface naming scheme 'v249'.
May 17 12:48:51 officehp kernel: rndis_host 1-10.2:2.0 enxdeadbeef0000: renamed from usb0
May 17 12:48:51 officehp NetworkManager[663]: <info>  [1715921331.5153] device (usb0): interface index 18 renamed iface from 'usb0' to 'enxdeadbeef0000'
May 17 12:48:51 officehp systemd-networkd[585]: usb0: Interface name change detected, renamed to enxdeadbeef0000.
May 17 12:48:51 officehp NetworkManager[663]: <info>  [1715921331.5246] device (enxdeadbeef0000): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
May 17 12:48:51 officehp NetworkManager[663]: <info>  [1715921331.5251] device (enxdeadbeef0000): carrier: link connected
May 17 12:48:51 officehp NetworkManager[663]: <info>  [1715921331.5261] settings: (enxdeadbeef0000): created default wired connection 'Wired connection 2'
May 17 12:48:51 officehp NetworkManager[663]: <info>  [1715921331.5264] device (enxdeadbeef0000): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')
May 17 12:48:51 officehp systemd-networkd[585]: enxdeadbeef0000: Link UP
May 17 12:48:51 officehp systemd-networkd[585]: enxdeadbeef0000: Gained carrier
May 17 12:48:51 officehp NetworkManager[663]: <info>  [1715921331.5280] policy: auto-activating connection 'Wired connection 2' (7f021469-60a3-30b2-86e3-778fadf57401)
May 17 12:48:51 officehp NetworkManager[663]: <info>  [1715921331.5307] device (enxdeadbeef0000): Activation: starting connection 'Wired connection 2' (7f021469-60a3-30b2-86e3-778fadf57401)
May 17 12:48:51 officehp NetworkManager[663]: <info>  [1715921331.5308] device (enxdeadbeef0000): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
May 17 12:48:51 officehp NetworkManager[663]: <info>  [1715921331.5311] device (enxdeadbeef0000): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
May 17 12:48:51 officehp NetworkManager[663]: <info>  [1715921331.5314] device (enxdeadbeef0000): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
May 17 12:48:51 officehp mtp-probe[56519]: checking bus 1, device 66: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10.2"
May 17 12:48:51 officehp mtp-probe[56519]: bus: 1, device: 66 was not an MTP device
May 17 12:48:51 officehp NetworkManager[663]: <info>  [1715921331.5365] dhcp4 (enxdeadbeef0000): activation: beginning transaction (timeout in 45 seconds)
May 17 12:48:51 officehp avahi-daemon[660]: Joining mDNS multicast group on interface enxdeadbeef0000.IPv6 with address fe80::b649:fe99:87af:133a.
May 17 12:48:51 officehp avahi-daemon[660]: New relevant interface enxdeadbeef0000.IPv6 for mDNS.
May 17 12:48:51 officehp avahi-daemon[660]: Registering new address record for fe80::b649:fe99:87af:133a on enxdeadbeef0000.*.
May 17 12:48:51 officehp systemd-udevd[56507]: Using default interface naming scheme 'v249'.
May 17 12:48:52 officehp systemd-networkd[585]: enxdeadbeef0000: Gained IPv6LL
May 17 12:48:54 officehp ModemManager[866]: <info>  [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10.2': not supported by any plugin
May 17 12:49:11 officehp systemd-networkd[585]: enxdeadbeef0000: Link DOWN
May 17 12:49:11 officehp avahi-daemon[660]: Interface enxdeadbeef0000.IPv6 no longer relevant for mDNS.
May 17 12:49:11 officehp systemd-networkd[585]: enxdeadbeef0000: Lost carrier
May 17 12:49:11 officehp kernel: usb 1-10.2: USB disconnect, device number 66
May 17 12:49:11 officehp kernel: rndis_host 1-10.2:2.0 enxdeadbeef0000: unregister 'rndis_host' usb-0000:00:14.0-10.2, RNDIS device
May 17 12:49:11 officehp avahi-daemon[660]: Leaving mDNS multicast group on interface enxdeadbeef0000.IPv6 with address fe80::b649:fe99:87af:133a.
May 17 12:49:11 officehp avahi-daemon[660]: Withdrawing address record for fe80::b649:fe99:87af:133a on enxdeadbeef0000.
May 17 12:49:11 officehp NetworkManager[663]: <info>  [1715921351.7017] device (enxdeadbeef0000): state change: ip-config -> unmanaged (reason 'removed', sys-iface-state: 'removed')
May 17 12:49:11 officehp NetworkManager[663]: <info>  [1715921351.7189] dhcp4 (enxdeadbeef0000): canceled DHCP transaction
May 17 12:49:23 officehp kernel: usb 1-10.2: new high-speed USB device number 67 using xhci_hcd
May 17 12:49:23 officehp kernel: usb 1-10.2: device descriptor read/64, error -71
May 17 12:49:24 officehp kernel: usb 1-10.2: device descriptor read/64, error -71
May 17 12:49:24 officehp kernel: usb 1-10.2: new high-speed USB device number 68 using xhci_hcd
May 17 12:49:24 officehp kernel: usb 1-10.2: device descriptor read/64, error -71
May 17 12:49:24 officehp kernel: usb 1-10.2: device descriptor read/64, error -71
May 17 12:49:24 officehp kernel: usb 1-10-port2: attempt power cycle
May 17 12:49:25 officehp kernel: usb 1-10.2: new high-speed USB device number 69 using xhci_hcd

感觉行为如下:

开始使用 -> 接口 UP --> 使用 --> 接口 down --> 再次尝试使用,尝试 up 接口 失败。

----------

各位没有用过这个功能吗?

用 sunxi-fel 比用 usb 网络这个要慢。

#2 全志 SOC » UBOOT 下的 RNDIS 功能工作异常 » 2024-05-20 09:51:11

gerryqd
回复: 1

(如下 log 获取自 orangepi_one, 基于H61X 的 orangepi zero3, zero2w 也有一样的问题)
我在最新的uboot 上,尝试使用 RNDIS 功能,
uboot 中做了如下设置,

setenv ethact usb_ether
setenv ipaddr 192.168.2.100
setenv serverip 192.168.2.1

然后尝试使用 tftpboot zImage 来获取文件, 工作正常

=> tftpboot zImage
sun8i_emac_eth_start: Timeout
musb-hdrc: peripheral reset irq lost!
high speed config #2: 2 mA, Ethernet Gadget, using RNDIS
USB RNDIS network up!
Using usb_ether device
TFTP from server 192.168.2.1; our IP address is 192.168.2.100
Filename 'zImage'.
Load address: 0x42000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         ########################################################
         7.5 MiB/s
done
Bytes transferred = 4624880 (4691f0 hex)

相应的 host 上的 kernel log 如下,

May 19 18:43:07 home-hp kernel: [165318.600356] usb 1-4.4: new high-speed USB device number 96 using xhci_hcd 
May 19 18:43:07 home-hp kernel: [165318.800933] usb 1-4.4: config 1 has 0 interfaces, different from the descriptor's value: 1
May 19 18:43:07 home-hp kernel: [165318.801104] usb 1-4.4: New USB device found, idVendor=1f3a, idProduct=1010, bcdDevice= 3.15
May 19 18:43:07 home-hp kernel: [165318.801113] usb 1-4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
May 19 18:43:07 home-hp kernel: [165318.801118] usb 1-4.4: Product: RNDIS/Ethernet Gadget
May 19 18:43:07 home-hp kernel: [165318.801123] usb 1-4.4: Manufacturer: Allwinner Technology
May 19 18:43:07 home-hp kernel: [165318.808655] rndis_host 1-4.4:2.0 eth0: register 'rndis_host' at usb-0000:00:14.0-4.4, RNDIS device, f8:dc:7a:00:00:01  

但是, 如果我再一次尝试下载文件, 就会出现如下问题,

=> tftpboot zImage
The remote end did not respond in time.sun8i_emac_eth_start: Timeout
=>

相应的 host 上的 kernel log 如下,

May 19 18:43:14 home-hp kernel: [165326.024807] usb 1-4.4: new high-speed USB device number 97 using xhci_hcd
May 19 18:43:14 home-hp kernel: [165326.205127] usb 1-4.4: device descriptor read/64, error -71
May 19 18:43:15 home-hp kernel: [165326.493131] usb 1-4.4: device descriptor read/64, error -71
May 19 18:43:15 home-hp kernel: [165326.780864] usb 1-4.4: new high-speed USB device number 98 using xhci_hcd
May 19 18:43:15 home-hp kernel: [165326.961192] usb 1-4.4: device descriptor read/64, error -71
May 19 18:43:15 home-hp kernel: [165327.248946] usb 1-4.4: device descriptor read/64, error -71
May 19 18:43:15 home-hp kernel: [165327.357290] usb 1-4-port4: attempt power cycle
May 19 18:43:16 home-hp kernel: [165328.061235] usb 1-4.4: new high-speed USB device number 99 using xhci_hcd
May 19 18:43:16 home-hp kernel: [165328.061391] usb 1-4.4: Device not responding to setup address.
May 19 18:43:16 home-hp kernel: [165328.269369] usb 1-4.4: Device not responding to setup address.
May 19 18:43:17 home-hp kernel: [165328.477045] usb 1-4.4: device not accepting address 99, error -71

以后再次尝试也无法恢复, 除非重启

在网上找了很久,没有线索,是不是和 auto suspend 有关?
各位有遇到这种情况的吗?
------------------------
先发到了 https://bbs.aw-ol.com/topic/5413/uboot-%E4%B8%8B%E7%9A%84-rndis-%E5%8A%9F%E8%83%BD%E5%B7%A5%E4%BD%9C%E5%BC%82%E5%B8%B8, 借一下这里的人气:)

#4 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 【github项目】给大家介绍一个非常不错的GUI ---- littlevgl » 2022-03-22 21:41:02

@落雁
请教下大佬,有关基于 RFB 的移植。
官方的例子是基于 Linux Framebuffer 的。
我现在通过 VNC 连接远程机器。 远程机器上没有 Framebuffer 设备,无法打开 /dev/fbx 设备。

VNC 是基于 RFB (Remote frame buffer ) 的, 请问这种情况下, 你是如何移植的呢?
麻烦大致说下思路。

多谢了!

#5 Re: 全志 SOC » 全志D1芯片之终极探索 » 2022-01-05 23:43:29

@xboot

对于 spi nand 的支持,有点疑问,麻烦老大解释下。

目前的烧写支持不支持坏块?如果在烧写过程中发现有坏块,可以标记出坏块吗?

#6 Re: ESP32/ESP8266 » 突然发现esp32有mmu, 有没有用到的大神? » 2021-12-25 21:47:18

yangshishu 说:

有mmu 物理地址映射虚拟地址,理论可以跑操作系统了

你说的操作系统是指 Linux ?

其实 mmu 和能不能跑Linux 没有直接关系。
话说 buidlroot 中直接有 stm32f429 discovery 的默认配置, 可以直接编出来一个玩玩了。

#7 Re: 全志 SOC » ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序 » 2021-12-19 17:12:50

一个疑问:
加载到 0x81700000 是因为配置中有,

CONFIG_SYS_TEXT_BASE=0x81700000

如果我想验证 SPL 或者是 SPL + UBOOT (u-boot-sunxi-with-spl.bin), 这个可以通过 xfel 实现吗?
(类似于 sunxi-fel uboot ...的功能)

#8 Re: Openwrt/LEDE/AR9331/MT7688/RT5350 » NUC980 板折腾笔记 » 2021-12-18 13:42:35

5. 自废武功

=> nand info

Device 0: nand0, sector size 128 KiB
  Page size       2048 b
  OOB size          64 b
  Erase size    131072 b
  subpagesize     2048 b
  options     0x40000008
  bbt options 0x    8000
=> nand bad

Device 0 bad blocks:
=> nand scrub.chip

NAND scrub.chip: device 0 whole chip
Warning: scrub option will erase all factory set bad blocks!
         There is no reliable way to recover them.
         Use this command only for testing purposes if you
         are sure of what you are doing!

Really scrub this NAND flash? <y/N>
y
Erasing at 0x7fe0000 -- 100% complete.
OK
=> 

重新上电

NUC980 IBR 20180813
Boot from NAND
No image in NAND, USB boot

NUC980 IBR 20180813
Boot from NAND
No image in NAND, USB boot

貌似只有 SPL ? 烧写在了 SPI Nor ?

#9 Re: Openwrt/LEDE/AR9331/MT7688/RT5350 » NUC980 板折腾笔记 » 2021-12-18 13:36:46

4. Setup buildroot

https://github.com/OpenNuvoton/NUC970_Buildroot.git

选个配置,进行编译

nuvoton_nuc980_iot_defconfig
make

编译完成后,获取到 uImage, 放到 tftpd64 的目录, 在 uboot 端执行

tftpboot 7fc0 uImage
bootm 7fc0

执行成功, 正常起来。 不过好像中间有个地方停留了很久,没有仔细看。

#10 Openwrt/LEDE/AR9331/MT7688/RT5350 » NUC980 板折腾笔记 » 2021-12-18 11:29:18

gerryqd
回复: 3

多谢 晕哥 搞得活动。

第一印象

板子很大, 串口很多, 接口丰富


第二印象

资料很少

上电

1. 虽然很多个串口, 但是, 看 log 的话,一般是从第1个串口, 参考 https://whycan.com/t_7492.html 焊接上串口。
上电, 启动。 可以看到 log。 用户名密码 直接挡住。

2. 重新上电, 进入 uboot,printenv 可以。 发现网络也可以。

=> printenv 
baudrate=115200
bootargs=noinitrd ubi.mtd=2 root=ubi0:rootfs rw rootfstype=ubifs console=ttyS0,115200n8 rdinit=/sbin/init mem=64M mtdparts=nand0:0x200000@0x0(u-boot),0x1400000@0x200000(kernel),-(rootfs)
bootcmd=run img_get;bootm 0x7FC0
bootdelay=2
ethact=emac
img_get=nand read 0x7FC0 0x200000 0x760000
ipaddr=192.168.11.10
serverip=192.168.11.100
stderr=serial
stdin=serial
stdout=serial

Environment size: 412/65532 bytes

3. 折腾网络

PC 设定为 192.168.11.100, 用 tftpd64 设定服务器

尝试执行

tftpboot 7fc0 uImage

出错(当然文件不存在), 至少工作了。

待续

#11 Re: 全志 SOC » 兄弟们,MangoPi-麻雀MQ已成功量产 » 2021-12-13 20:33:35

已经收到板子, 只是有个疑问,
mangopi-d1s.png

图中送的小排针做什么用的?

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn