@cube_work
大佬,我想问一下如何在设备树中使能上电,在dev下看到ttyUSB*
Best posts made by wanglang
-
Reply: 各位大佬,问一个问题,5G模组的设备节点是ttyUSB0、ttyUSB1、ttyUSB2、ttyUSB3,但是开发板上使用了一个FTDI232的USB转串口的方案,它的对应的设备节点是ttyUSB0,怎们能够避免这个问题
Latest posts made by wanglang
-
V851S 小容量 nor flash 32M使用 misc-upgrade 进行 ota升级,无法进入recovery系统升级
使用misc-upgrace按照小容量升级流程,写入extend分区后,会重启。
但是重启过程中,出现以下日志提示,并卡住,使得板子变板砖。
Hit any key to stop autoboot: 0 input addr exceed dram scope data abort pc : [<43f34168>] lr : [<43f75cd1>] reloc pc : [<42001168>] lr : [<42042cd1>] sp : 42acf9ac ip : 00000003 fp : 00000004 r10: 43faba18 r9 : 42b12e68 r8 : ffffffe6 r7 : 42acfa4c r6 : 00800040 r5 : 00800040 r4 : 00800040 r3 : 00010000 r2 : 0080003c r1 : 32f777fc r0 : 00800040 Flags: nzCv IRQs on FIQs off Mode SVC_32 Code: f011dbd5 d08e0c03 0103f021 0f02f1bc (eb04f851)
完整的升级日志:
Sat Mar 30 08:51:08 UTC 2024 start to prepare -->>> /mnt/extsd/misc-upgrade/w4.1.0.zip <<<-- Sat Mar 30 08:51:08 UTC 2024 unpack image start... Sat Mar 30 08:51:08 UTC 2024 /mnt/extsd/misc-upgrade/w4.1.0.zip md5 check success! Sat Mar 30 08:51:08 UTC 2024 unpack image finish... Archive: /mnt/extsd/misc-upgrade/w4.1.0.zip inflating: boot.img inflating: boot.img.md5 inflating: boot_initramfs.img inflating: boot_initramfs.img.md5 inflating: rootfs.img inflating: rootfs.img.md5 inflating: usr.img inflating: usr.img.md5 Sat Mar 30 08:51:35 UTC 2024 start to prepare -->>> /mnt/UDISK/misc-upgrade/boot_initramfs.img <<<-- Sat Mar 30 08:51:35 UTC 2024 unpack image start... Sat Mar 30 08:51:36 UTC 2024 /mnt/UDISK/misc-upgrade/boot_initramfs.img md5 check success! Sat Mar 30 08:51:36 UTC 2024 unpack image finish... Sat Mar 30 08:51:36 UTC 2024 start to prepare -->>> /mnt/UDISK/misc-upgrade/boot.img <<<-- Sat Mar 30 08:51:36 UTC 2024 unpack image start... Sat Mar 30 08:51:36 UTC 2024 /mnt/UDISK/misc-upgrade/boot.img md5 check success! Sat Mar 30 08:51:36 UTC 2024 unpack image finish... Sat Mar 30 08:51:36 UTC 2024 start to prepare -->>> /mnt/UDISK/misc-upgrade/rootfs.img <<<-- Sat Mar 30 08:51:36 UTC 2024 unpack image start... Sat Mar 30 08:51:37 UTC 2024 /mnt/UDISK/misc-upgrade/rootfs.img md5 check success! Sat Mar 30 08:51:37 UTC 2024 unpack image finish... Sat Mar 30 08:51:37 UTC 2024 start to prepare -->>> /mnt/UDISK/misc-upgrade/usr.img <<<-- Sat Mar 30 08:51:37 UTC 2024 unpack image start... Sat Mar 30 08:51:37 UTC 2024 /mnt/UDISK/misc-upgrade/usr.img md5 check success! Sat Mar 30 08:51:37 UTC 2024 unpack image finish... Sat Mar 30 08:51:37 UTC 2024 start to upgrade do_upgrade_image ...... Sat Mar 30 08:51:37 UTC 2024 set system flag : upgrade_pre Sat Mar 30 08:51:37 UTC 2024 write_nor_partition /tmp/upgrade/boot_initramfs.img > extend mtd3: 00600000 00010000 "extend" 11696+1 records in 11696+1 records out Sat Mar 30 08:52:29 UTC 2024 set system flag : boot-recovery [ 563.298855] sunxi-mmc sdc0: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B [ 563.310464] [alarmtimer] have no shutdown alarm! alarmtimer_shutdown 322 [ 563.318452] [VIN_WARN]video3 device have been closed! [ 563.324223] [VIN_WARN]video2 device have been closed! [ 563.329900] [VIN_WARN]video1 device have been closed! [ 563.335592] [VIN_WARN]video0 device have been closed! [ 563.341500] reboot: Restarting system [ 563.345733] [ 563.347398] Restarting Linux version 4.9.191 (wanglang@CodeWL) (gcc version 6.4.1 (OpenWrt/Linaro GCC 6.4-2017.11 2017-11) ) #429 PREEMPT Sat Mar 30 08:31:26 UTC 2024 [ 563.347398] [10]HELLO! BOOT0 is starting! [13]BOOT0 commit : 5841e68a26 [98][pmu]: bus read error [100]set pll start [102]periph0 has been enabled [105]set pll end [107]board init ok [109]rtc[0] value = 0x80000001 [112]DRAM use internal ZQ!! [114]ZQ value = 0x30 [117]chip id check OK [119]POWER SETTING ERROR! [121]DRAM BOOT DRIVE INFO: V0.16 [124]DRAM CLK = 528 MHz [126]DRAM Type = 2 (2:DDR2,3:DDR3) [130]DRAMC read ODT off. [132]DRAM ODT off. [135]DRAM SIZE =64 M [137]dram_tpr4:0x0 [143]DRAM simple test OK. [146]rtc standby flag is 0x0, super standby flag is 0x0 [151]dram size =64 [154]audio:avcc calibration [159]spi sample_mode:0 sample_delay:27 [163]spinor id is: c2 20 19, read cmd: 6c [167]Succeed in reading toc file head. [170]The size of toc is b8000. [204]Entry_name = optee [207]Entry_name = u-boot [213]Entry_name = dtb [217]Jump to second Boot. M/TC: OP-TEE version: 15ee1539b (gcc version 5.3.1 20160412 (Linaro GCC 5.3-2016.05)) #1 Tue Mar 29 06:48:41 UTC 2022 arm E/TC:0 0 platform_standby_fdt_parse:133 no pmu node E/TC:0 0 sunxi_twi_parse_from_dt:121 no pmu node U-Boot 2018.07-g949e36b-dirty (Dec 25 2023 - 11:38:54 +0000) Allwinner Technology [00.295]CPU: Allwinner Family [00.298]Model: sun8iw21 I2C: [I2C-ERROR]:twi_send_clk_9pulse() 147 SDA is still Stuck Low, failed. ready [00.358]DRAM: 64 MiB [00.362]Relocation Offset is: 01f33000 [00.384]secure enable bit: 0 E/TC:0 tee_read_fdt:433 fine node /firmware/optee failed with FDT_ERR_NOTFOUND [00.399]smc_tee_inform_fdt failed with: ffff0000 [I2C-ERROR]:twi_stop() 339 STOP can't sendout! [00.408]pmu_axp2101_probe pmic_bus_read fail [I2C-ERROR]:twi_stop() 339 STOP can't sendout! [00.416]bmu_axp2101_probe pmic_bus_read fail [00.420]CPU=900 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=24Mhz MBus=300Mhz [00.426]gic: sec monitor mode sunxi flash map init SPI ALL: ready [00.434]line:724 init_clocks [00.437]flash init start [00.439]workmode = 0,storage type = 3 [00.445]spi sample_mode:0 sample_delay:27 [00.450]spi sunxi_slave->max_hz:100000000 SF: Detected mx25l25635e( ) with page size 256 Bytes, erase size 64 KiB, total 32 MiB [00.462]sunxi flash init ok [00.464]drv_disp_init [00.471]handle_num : 4 partno erro : can't find partition bootloader partno erro : can't find partition boot-resource Get bootloader and boot-resource partition number fail! [00.495]drv_disp_init finish [00.498]Loading Environment from SUNXI_FLASH... OK [00.509]boot_gui_init:start partno erro : can't find partition Reserve0 [00.515]Get Reserve0 partition number fail! [00.520]set disp.fb0_rot_used fail. using defval=0 [00.524]set disp.fb0_rot_degree fail. using defval=0 [00.531]boot_gui_init:finish partno erro : can't find partition bootloader partno erro : can't find partition boot-resource [00.542]Get bootloader and boot-resource partition number fail! root_partition is rootfs set root to /dev/mtdblock2 [00.552]update part info CACHE: Misaligned operation at range [42acfd18, 42ad0518] CACHE: Misaligned operation at range [42acfd18, 42ad0518] CACHE: Misaligned operation at range [42acfd18, 42ad0518] 42acfd18: 746f6f62 6365722d 7265766f 00000079 boot-recovery... 42acfd28: 00000000 00000000 00000000 00000000 ................ 42acfd38: ffffffff ffffffff ffffffff ffffffff ................ 42acfd48: ffffffff ffffffff ffffffff ffffffff ................ 42acfd58: 61647075 705f6574 616b6361 ff006567 update_package.. 42acfd68: ffffffff ffffffff ffffffff ffffffff ................ 42acfd78: ffffffff ffffffff ffffffff ffffffff ................ 42acfd88: ffffffff ffffffff ffffffff ffffffff ................ 42acfd98: ffffffff ffffffff ffffffff ffffffff ................ 42acfda8: ffffffff ffffffff ffffffff ffffffff ................ 42acfdb8: ffffffff ffffffff ffffffff ffffffff ................ 42acfdc8: ffffffff ffffffff ffffffff ffffffff ................ 42acfdd8: ffffffff ffffffff ffffffff ffffffff ................ 42acfde8: ffffffff ffffffff ffffffff ffffffff ................ 42acfdf8: ffffffff ffffffff ffffffff ffffffff ................ 42acfe08: ffffffff ffffffff ffffffff ffffffff ................ 42acfe18: ffffffff ffffffff ffffffff ffffffff ................ 42acfe28: ffffffff ffffffff ffffffff ffffffff ................ 42acfe38: ffffffff ffffffff ffffffff ffffffff ................ 42acfe48: ffffffff ffffffff ffffffff ffffffff ................ [00.686]bootmode[3]:0x5c [00.688]update bootcmd [00.690]change working_fdt 0x42af2e68 to 0x42ad2e68 [00.702]## error: update_fdt_dram_para : FDT_ERR_NOTFOUND partno erro : can't find partition bootloader partno erro : can't find partition boot-resource Get bootloader and boot-resource partition number fail! partno erro : can't find partition bootloader partno erro : can't find partition boot-resource Get bootloader and boot-resource partition number fail! partno erro : can't find partition bootloader partno erro : can't find partition boot-resource Get bootloader and boot-resource partition number fail! [00.752]update dts phy_mode=rmii, phy_interface=6 gmac: *** using ephy_clk *** request pwm success, pwm11:pwm11:0x2000c00. FDT ERROR:fdt_get_all_pin:get property handle pinctrl-0 error:FDT_ERR_INTERNAL sunxi_pwm_pin_set_state, fdt_set_all_pin, ret=-1 eth0 Warning: eth0 (eth0) using random MAC address - 9e:3e:8d:b4:cf:83 Hit any key to stop autoboot: 0 input addr exceed dram scope data abort pc : [<43f34168>] lr : [<43f75cd1>] reloc pc : [<42001168>] lr : [<42042cd1>] sp : 42acf9ac ip : 00000003 fp : 00000004 r10: 43faba18 r9 : 42b12e68 r8 : ffffffe6 r7 : 42acfa4c r6 : 00800040 r5 : 00800040 r4 : 00800040 r3 : 00010000 r2 : 0080003c r1 : 32f777fc r0 : 00800040 Flags: nzCv IRQs on FIQs off Mode SVC_32 Code: f011dbd5 d08e0c03 0103f021 0f02f1bc (eb04f851)
-
请问编译镜像固件如何做版本维护?
比如使用V853方案编译的镜像烧录之后,如何携带版本号呢?
我们知道Linux内核版本可以通过uname -a查看。root@(none):/# uname -a Linux (none) 4.9.191 #383 PREEMPT Wed Mar 13 09:56:09 UTC 2024 armv7l GNU/Linux
但是烧录固件的版本如何设置和查看呢?
比如我第一次烧录镜像,希望烧录之后 固件本版:1.0.1(V3R2)。
然后我第二烧录,设置版本为 1.0.2(V4R1)。或者通过OTA升级为该版本。
请问这种版本号可以从哪里管理,从哪里读取呢? -
Reply: 多网卡网络如何管理?
@dream @smbzd @fuzhikun @Alb702 @camperzzz 感谢各位。
是的,本质上是修改路由表和DNS,这里采用了一种简单方法。- 判断当前的网络工作状态。如果是wifi wlan0网口工作, 判断 ping ip -I wlan0 当网口不通时候,刷新 usb0的网口 udhcpc -i usb0 ,会刷新route路由表和 usb0的DNS文件/etc/resolve.conf,使得usb0工作,并设置工作状态为4g usb0。
- wifi_deman中设置wifi会自动重连,当wifi连接成功(账号连接或者断开重连)后。再进行一次wlan0的路由刷新和DNS刷新。切换为WIFI工作。
顺便,再route路由表中
虽然两个优先级Metric都是0,但是由于udhcpc刷新了route和DNS,所以只有排在前面的一个网口以及对应网关gateway到DNS中的一个网口会工作。
-
多网卡网络如何管理?
在arm开发版中,有两张网卡,其中一张WIFI无线wlan0网卡,一张4G移动usb0网卡,两个网卡均可单独连接网络上网。但是同一时间只有一张卡能生效,且为最后一张udhcp启动的网卡。比如先启动了usb0网卡后,有网络。在启动wlan0有网络。使用的就是wlan0,当wlan0 wifi 断开之后,不会自动使用usb0网络,usb0网络也不通。
wifi使用SDK内置wifi_deman开启的,4g网络使用usb设备连接的。
如何像手机一样,有WIFI时候自动连接WIFI网络,WIFI网络端口后自动使用4G网络,且优先使用WIFI网络。网卡如下
root@(none):/mnt# ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) usb0 Link encap:Ethernet HWaddr AE:0C:29:A3:9B:6D inet addr:192.168.43.100 Bcast:192.168.43.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:286 errors:0 dropped:0 overruns:0 frame:0 TX packets:339 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:31441 (30.7 KiB) TX bytes:28159 (27.4 KiB) wlan0 Link encap:Ethernet HWaddr C4:3C:B0:E8:FA:22 inet addr:192.168.1.103 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:2546 errors:0 dropped:0 overruns:0 frame:0 TX packets:236 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:517319 (505.1 KiB) TX bytes:23986 (23.4 KiB)
路由表如下
root@(none):/mnt# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0 default 192.168.43.1 0.0.0.0 UG 0 0 0 usb0 192.168.1.0 * 255.255.255.0 U 0 0 0 wlan0 192.168.43.0 * 255.255.255.0 U 0 0 0 usb0
DNS如下,为WIFI的DNS
root@(none):/mnt# cat /etc/resolv.conf nameserver 10.1.1.10 nameserver 10.1.1.8
-
Reply: T113 修改打印日志口
@cwj1986521 请问修改了哪些配置?我也遇到修改为uart3后,烧录只打印boot0, 到不打印剩下日志的到card ok的烧录日志。
-
Reply: D1哪吒Debian系统内核驱动模块编译和使用(以CP210x USB to Serial 为例)
@bayche 在 D1哪吒Debian系统内核驱动模块编译和使用(以CP210x USB to Serial 为例) 中说:
云的工具链压缩包文件。解压工
您好,大佬,我想请问驱动有了,指导对应的pwn和rst引脚,如何在设备树中给设备节点使能上电呢?
-
Reply: 各位大佬,问一个问题,5G模组的设备节点是ttyUSB0、ttyUSB1、ttyUSB2、ttyUSB3,但是开发板上使用了一个FTDI232的USB转串口的方案,它的对应的设备节点是ttyUSB0,怎们能够避免这个问题
@cube_work
大佬,我想问一下如何在设备树中使能上电,在dev下看到ttyUSB* -
接入ec20 4g模块,设备树如何使能?
我目前接入了移远EC20模块做4g通信。目前硬件已经调通,可能进入系统后通过手动导出GPIO和拉高拉低GPIO给ec20供电。
我是否可以将这个调整到board.dts设备树中呢?
需要先将gpio_pwn拉高一秒后复位。或者将gpio_rst拉高后复位。我对于设备树不是很了解,新增gpio设备应该遵循什么规则呢?