您尚未登录。

#1 Re: 全志 SOC » F1C100S melis编译成功后烧录运行异常 » 2020-07-01 09:33:54

xrff_z 说:

改下配置文件sys_config.fex 试试

搜索PE00
原来的可以找到
[twi2_para]
twi2_used       = 1
twi2_scl        = port:PE00<4><default><default><default>
twi2_sda        = port:PE01<4><default><default><default>

这个地方用了PE0和PE1 与uart0的冲突了,需要注释掉或者改成 twi2_used       = 0 或者全部删掉
也可能是其他端口用了PE0和PE1,搜索下同样注释掉或修改掉


谢谢,按照你得方法确实可以跑更深度的东西了

#2 全志 SOC » F1C100S melis编译成功后烧录运行异常 » 2020-06-28 10:25:52

lanjackg2003
回复: 4

参考链接https://whycan.cn/t_2182.html
正常编译出ePDKv100.img烧录镜像
通过烧录工具成功烧录到开发板上
但是传打印如下log之后就没有输出了

[10:24:33.993]收←◆BOOT0 is starting
DBG: init jtag OK
init dram , base        is 0x80000000
init dram , clk         is 152
init dram , access_mode is 1
init dram , cs_num      is 0x00000001
init dram , ddr8_remap  is 0
init dram , sdr_ddr     is 1
init dram , bwidth      is 16
init dram , col_width   is 10
init dram , row_width   is 13
init dram , bank_size   is 4
init dram , cas         is 3
init dram , size        is 0
before dram write delay enble
dram init successed,size is 64
DBG: init heap OK, base address is 0x80000000, size is 0x00100000
DBG: load boot1 from spinor
DBG: init spinor OK
DBG: the size of BOOT1 is 71168
DBG: src_sum = 0x0x24b0ab89
DBG: sum = 0x0x24b0ab89
succeed in loading BOOT1
jump to BOOT1
DBG: boot1 starting!
DBG: init heap OK, base address is 0x80800000, size is 0x00100000
begin to init file system
DBG: init block device OK
DBG: init mini file system OK
DBG: mount c partition OK
0

[10:24:35.204]收←◆jump to kernal
EPOS_MEM_DBG OFF
\0

请问一下,这个EPOS_MEM_DBG  是什么意思?
要从哪里着手解决这个问题.

#3 Re: 全志 SOC » 荔枝派nano F1C100S运行melis过程记录 » 2020-06-27 23:02:31

yushikong 说:

感谢解答,出现问题的具体原因暂时还位找到,  但是我发现同样的固件烧录到一块F1C200S的开发板中,奇迹竟然产生了。它。。。。。跑了。。。。,见下图

https://whycan.cn/files/members/394/F1C200S.png


猜想的原因最可能是荔枝派开发板的某些硬件和编译出的软件的某些设置不匹配,另外补充一下,我用的是mdk5.0进行编译的,经过比对很可能是内存配置出了问题

[22:59:28.447]收←◆BOOT0 is starting
DBG: init jtag OK
init dram , base        is 0x80000000
init dram , clk         is 152
init dram , access_mode is 1
init dram , cs_num      is 0x00000001
init dram , ddr8_remap  is 0
init dram , sdr_ddr     is 1
init dram , bwidth      is 16
init dram , col_width   is 10
init dram , row_width   is 13
init dram , bank_size   is 4
init dram , cas         is 3
init dram , size        is 0
before dram write delay enble
dram init successed,size is 64
DBG: init heap OK, base address is 0x80000000, size is 0x00100000
DBG: load boot1 from spinor
DBG: init spinor OK
DBG: the size of BOOT1 is 71168
DBG: src_sum = 0x0x24b0ab65
DBG: sum = 0x0x24b0ab65
succeed in loading BOOT1
jump to BOOT1
DBG: boot1 starting!
DBG: init heap OK, base address is 0x80800000, size is 0x00100000
begin to init file system
DBG: init block device OK
DBG: init mini file system OK
DBG: mount c partition OK
0

[22:59:29.663]收←◆jump to kernal
EPOS_MEM_DBG OFF
\0

我使用melis成功编译并烧录后,运行到了这里就没有任何输出了
请问楼上,你运行正常吗。

#5 Re: 全志 SOC » LicheePi Nano 开机显示异常 » 2019-10-30 22:50:11

lanjackg2003 说:

https://whycan.cn/t_3108.html#p26227

我重新调整分辨率,发现花屏的问题没有了
但是具体原因还不清楚


这方法不正确,请忽略

#7 Re: 全志 SOC » LicheePi Nano 运行lvgl只有半截,无全屏 » 2019-10-30 22:45:11

xm1994 说:

确实是lvgl的linux项目工程通过io读取的屏幕分辨率及位深

lvgl是从framebuffer读取的分辨率,而framebuffer汇报的分辨率是从内核使用的dts中panel项设置的


好的谢谢

这个问题解决了,是我的一个失误导致的

#define LV_HOR_RES_MAX (800)
#define LV_VER_RES_MAX (480)
被我写成
#define LV_HOR_RES (800)
#define LV_VER_RES (480)

然后lv_conf_checker.h文件的代码中会有如下处理

#ifndef LV_HOR_RES_MAX
#define LV_HOR_RES_MAX          (480)
#endif
#ifndef LV_VER_RES_MAX
#define LV_VER_RES_MAX          (320)
#endif

因此,每次开机都是480*320的分辨率

#8 Re: 全志 SOC » LicheePi Nano 运行lvgl只有半截,无全屏 » 2019-10-30 21:41:08

xm1994 说:

设备分辨率都是手动指定的,不存在自动检测这一说。所以请查阅面板的spec并正确设置分辨率。

我在Uboot里面设置了1024*600 或者800*480 都是可以开机

但是运行lvgl的时候,确实是lvgl的linux项目工程通过io读取的屏幕分辨率及位深

不知道你说指定设备分辨率是否指的是uboot设置屏幕分辨率?

#9 Re: 全志 SOC » LicheePi Nano 运行lvgl只有半截,无全屏 » 2019-10-30 21:39:10

firstman 说:

屏幕的Ui界面仍然是非全屏 是怎样的?你屏幕分辨率是多少?

我用的是荔枝派淘宝店铺标配的 5寸电容屏 应该是800*480

#10 Re: 全志 SOC » LicheePi Nano 开机显示异常 » 2019-10-30 00:24:20

rayfoxjx 说:

分辨率或者颜色位数不对吧

请问一下kernel下的分辨率如何跟uboot的分辨率设置成一致
目前,碰到在linux下显示的分辨率跟uboot打印的分辨率不一样
https://whycan.cn/t_3108.html#p26227

#11 Re: 全志 SOC » LicheePi Nano 开机显示异常 » 2019-10-30 00:00:31

xbgzy 说:

你好,你的花屏问题解决没?

https://whycan.cn/t_3108.html#p26227

我重新调整分辨率,发现花屏的问题没有了
但是具体原因还不清楚

#12 Re: 全志 SOC » LicheePi Nano 运行lvgl只有半截,无全屏 » 2019-10-29 23:59:09

通过将UBoot分辨率修改为1024*600,发现我的之前的开机闪花屏的问题 https://whycan.cn/t_2932.html 没有了
具体log如下

U-Boot 2018.01-05680-gee09b52-dirty (Oct 29 2019 - 22:58:39 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Setting up a 1024x600 lcd console (overscan 0x0)
In:    serial@1c25000
Out:   serial@1c25000
Err:   serial@1c25000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x100000, size 0x4000
SF: 16384 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 80e5f000, end 80e63f36 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc8-licheepi-nano+ (root@59a7f169bc59) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #17 Tue Oct 29 23:01:56 CST 2019
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Nano
[    0.000000] Memory policy: Data cache writeback
[    0.000000] random: fast init done
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 22672K/32768K available (6144K kernel code, 240K rwdata, 1420K rodata, 1024K init, 246K bss, 10096K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc2800000 - 0xff800000   ( 976 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7136 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 241 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 247 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000054] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000125] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000858] Console: colour dummy device 80x30
[    0.000968] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070250] pid_max: default: 32768 minimum: 301
[    0.070592] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070648] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.072384] CPU: Testing write buffer coherency: ok
[    0.074421] Setting up static identity map for 0x80100000 - 0x80100058
[    0.077248] devtmpfs: initialized
[    0.084261] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.084327] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.084582] pinctrl core: initialized pinctrl subsystem
[    0.087046] NET: Registered protocol family 16
[    0.089574] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.091841] cpuidle: using governor menu
[    0.120509] SCSI subsystem initialized
[    0.120909] usbcore: registered new interface driver usbfs
[    0.121114] usbcore: registered new interface driver hub
[    0.121347] usbcore: registered new device driver usb
[    0.121860] pps_core: LinuxPPS API ver. 1 registered
[    0.121888] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.121961] PTP clock support registered
[    0.122519] Advanced Linux Sound Architecture Driver Initialized.
[    0.124260] clocksource: Switched to clocksource timer
[    0.155245] NET: Registered protocol family 2
[    0.156949] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.157037] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.157102] TCP: Hash tables configured (established 1024 bind 1024)
[    0.157541] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.157623] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.158202] NET: Registered protocol family 1
[    0.159650] RPC: Registered named UNIX socket transport module.
[    0.159694] RPC: Registered udp transport module.
[    0.159711] RPC: Registered tcp transport module.
[    0.159726] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.162061] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.164139] Initialise system trusted keyrings
[    0.164894] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.184022] NFS: Registering the id_resolver key type
[    0.184132] Key type id_resolver registered
[    0.184156] Key type id_legacy registered
[    0.184442] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.200474] Key type asymmetric registered
[    0.200519] Asymmetric key parser 'x509' registered
[    0.200763] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.200803] io scheduler noop registered
[    0.200821] io scheduler deadline registered
[    0.201711] io scheduler cfq registered (default)
[    0.201746] io scheduler mq-deadline registered
[    0.201766] io scheduler kyber registered
[    0.202983] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.213514] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.411693] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.419585] console [ttyS0] disabled
[    0.439876] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[    0.914900] console [ttyS0] enabled
[    0.925932] panel-simple panel: panel supply power not found, using dummy regulator
[    0.935536] SCSI Media Changer driver v0.25
[    0.943794] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.948720] 4 ofpart partitions found on MTD device spi0.0
[    0.954208] Creating 4 MTD partitions on "spi0.0":
[    0.959093] 0x000000000000-0x000000100000 : "u-boot"
[    0.967107] 0x000000100000-0x000000110000 : "dtb"
[    0.974859] 0x000000110000-0x000000510000 : "kernel"
[    0.982562] 0x000000510000-0x000001000000 : "rootfs"
[    0.991238] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.997907] ehci-platform: EHCI generic platform driver
[    1.003444] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.009768] ohci-platform: OHCI generic platform driver
[    1.015508] usbcore: registered new interface driver usb-storage
[    1.022814] i2c /dev entries driver
[    1.084398] sunxi-mmc 1c0f000.mmc: base:0x26b51b13 irq:19
[    1.091949] usbcore: registered new interface driver usbhid
[    1.097672] usbhid: USB HID core driver
[    1.121343] NET: Registered protocol family 17
[    1.126263] Key type dns_resolver registered
[    1.133291] Loading compiled-in X.509 certificates
[    1.152011] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0739e58)
[    1.161005] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc073913c)
[    1.168809] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.175484] [drm] No driver support for vblank timestamp query.
[    1.313927] Console: switching to colour frame buffer device 100x30
[    1.353630] sun4i-drm display-engine: fb0:  frame buffer device
[    1.360796] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.370029] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.382001] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.387973] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.398197] hub 1-0:1.0: USB hub found
[    1.402131] hub 1-0:1.0: 1 port detected
[    1.408687] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.426705] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.433467] vcc3v3: disabling
[    1.436557] ALSA device list:
[    1.439532]   #0: Loopback 1
[    1.443367] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.452089] cfg80211: failed to load regulatory.db
[    1.561036] random: crng init done
[    2.740261] jffs2: notice: (1) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    2.760968] VFS: Mounted root (jffs2 filesystem) on device 31:3.
[    2.769670] devtmpfs: mounted
[    2.779054] Freeing unused kernel memory: 1024K
Starting syslogd: OK
Starting klogd: OK
Initializing random number generator... done.
Starting network: OK

但是lvgl运行时候,任然检测到系统是800*480的分辨率,屏幕的Ui界面仍然是非全屏

#13 全志 SOC » LicheePi Nano 运行lvgl只有半截,无全屏 » 2019-10-29 22:12:43

lanjackg2003
回复: 11


如视频所示,在我的平台上面运行lvgl只有半截
我的设备分辨率是800*480(从设备开机的log可以看到)
none_20191029-2207.png

在linux下的dts配置如下

// SPDX-License-Identifier: (GPL-2.0+ OR X11)
/*
 * Copyright 2018 Icenowy Zheng <icenowy@aosc.io>
 */

/dts-v1/;
#include "suniv-f1c100s.dtsi"

#include <dt-bindings/gpio/gpio.h>

/ {
	model = "Lichee Pi Nano";
	compatible = "licheepi,licheepi-nano", "allwinner,suniv-f1c100s",
		     "allwinner,suniv";

	aliases {
		serial0 = &uart0;
		spi0 = &spi0;
	};

	chosen {
		stdout-path = "serial0:115200n8";
	};

	panel: panel {
		compatible = "lg,lb070wv8", "simple-panel";
		#address-cells = <1>;
		#size-cells = <0>;
		enable-gpios = <&pio 4 6 GPIO_ACTIVE_HIGH>;

		port@0 {
			reg = <0>;
			#address-cells = <1>;
			#size-cells = <0>;

			panel_input: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&tcon0_out_lcd>;
			};
		};
	};

	reg_vcc3v3: vcc3v3 {
		compatible = "regulator-fixed";
		regulator-name = "vcc3v3";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
	};
};

&de {
	status = "okay";
};

&mmc0 {
	vmmc-supply = <&reg_vcc3v3>;
	bus-width = <4>;
	broken-cd;
	status = "okay";
};

&otg_sram {
	status = "okay";
};


&spi0 {
    pinctrl-names = "default";
    pinctrl-0 = <&spi0_pins_a>;
    status = "okay";
    spi-max-frequency = <50000000>;
    flash: w25q128@0 {
        #address-cells = <1>;
        #size-cells = <1>;
        compatible = "winbond,w25q128", "jedec,spi-nor";
        reg = <0>;
        spi-max-frequency = <50000000>;
        partitions {
            compatible = "fixed-partitions";
            #address-cells = <1>;
            #size-cells = <1>;

            partition@0 {
                label = "u-boot";
                reg = <0x000000 0x100000>;
                read-only;
            };

            partition@100000 {
                label = "dtb";
                reg = <0x100000 0x10000>;
                read-only;
            };

            partition@110000 {
                label = "kernel";
                reg = <0x110000 0x400000>;
                read-only;
            };

            partition@510000 {
                label = "rootfs";
                reg = <0x510000 0xAF0000>;
            };
        };
    };
};

&tcon0 {
	pinctrl-names = "default";
	pinctrl-0 = <&lcd_rgb666_pins>;
	status = "okay";
};

&tcon0_out {
	tcon0_out_lcd: endpoint@0 {
		reg = <0>;
		remote-endpoint = <&panel_input>;
	};
};

&uart0 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart0_pins_a>;
	status = "okay";
};

&usb_otg {
	dr_mode = "otg";
	status = "okay";
};

&usbphy {
	usb0_id_det-gpio = <&pio 4 2 GPIO_ACTIVE_HIGH>; /* PE2 */
	status = "okay";
};

与LCD屏幕相关是参考荔枝派Nano官网设置的

	panel: panel {
		compatible = "lg,lb070wv8", "simple-panel";
		#address-cells = <1>;
		#size-cells = <0>;
		enable-gpios = <&pio 4 6 GPIO_ACTIVE_HIGH>;

		port@0 {
			reg = <0>;
			#address-cells = <1>;
			#size-cells = <0>;

			panel_input: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&tcon0_out_lcd>;
			};
		};
	};

lvgl里面也配置成800*480(程序运行起来的时候也能够打印)
2019-10-29_22-11-23.png

请问这个问题应该如何解

#15 Re: 全志 SOC » LicheePi Nano 开机显示异常 » 2019-09-28 18:51:23

luckymist 说:

我也遇到同样的花屏,有解吗?

应该有解,不过还没有弄懂怎么下手

#16 Re: 全志 SOC » LicheePi Nano 开机显示异常 » 2019-09-28 18:49:51

rayfoxjx 说:

分辨率或者颜色位数不对吧

不是这个这个原因

应该是boot跳转到kernel的时候有问题

#17 Re: 全志 SOC » LicheePi Nano 开机显示异常 » 2019-09-25 10:21:11

xyzijk 说:

关闭背光是一种处理方式,并没有解决问题,     完全处理是需要像@路漫漫的的方式,在uboot申请高位地址内存做显示缓存区,然后将地址传递给内核,不再初始化,直接延用显示

谢谢
具体方法是参考你发的链接吗
https://blog.csdn.net/spark550/article/details/79727655

是的话,我稍后试试

#19 Re: 全志 SOC » LicheePi Nano 开机显示异常 » 2019-09-24 22:07:47

晕哥 说:

用 25 楼的这个呢: https://whycan.cn/t_2689.html#p23147

用这个固件,开机很正常,没有出现花屏现象

#20 Re: 全志 SOC » LicheePi Nano 开机显示异常 » 2019-09-24 21:46:12

晕哥 说:

试一试这个固件: https://whycan.cn/t_2689.html

看看花不花

晕哥,用你的固件,也是有中间花屏的现象

12212.jpeg

#21 Re: 全志 SOC » LicheePi Nano 开机显示异常 » 2019-09-24 21:33:19

4.png
通过这边编译重新修改dts文件,可以解决屏幕中间白条的问题

但是花屏问题,还是没有解决

#22 全志 SOC » LicheePi Nano 开机显示异常 » 2019-09-24 20:24:46

lanjackg2003
回复: 22


    如视频所示,在开机的试试Uboot阶段显示屏显示的LOGO挺好的,
    1.png
    但是进入Kernel阶段,首先底下会出现花屏
    2.jpeg
   接着中间会出现一条线。
   3.png

   请问是不是在Kernel阶段要配置一些参数?

#23 Re: 全志 SOC » LicheePi Nano Usb复合设备RNDIS功能问题 » 2019-09-22 09:34:01

lanjackg2003 说:
晕哥 说:

https://blog.csdn.net/sinat_19447667/article/details/78562568

  *     removable               Default false, boolean for removable media
  *     luns=N                  Default N = number of filenames, number of
  *                                     LUNs to support
+ *     stall                   Default determined according to the type ofdevice controller (usually true),
+ *                                     boolean to permit the driver to halt
+ *                                     bulk endpoints
  *     transport=XXX           Default BBB, transport name (CB, CBI, or BBB)
  *     protocol=YYY            Default SCSI, protocol name (RBC, 8020 or
  *                                     ATAPI, QIC, UFI, 8070, or SCSI;
@@ -91,14 +95,10 @@
  *     buflen=N                Default N=16384, buffer size used (will be
  *                                     rounded down to a multiple of
  *                                     PAGE_CACHE_SIZE)
- *     stall                   Default determined according to the type of
- *                                     USB device controller (usually true),
- *                                     boolean to permit the driver to halt
- *                                     bulk endpoints

通用命令: modprobe g_multi file=/dev/mmcblk1p1,/mnt/p1/static.img,/dev/mmcblk0p1 luns=3 ro=0,1,1 stall=0,0,0 removable=1,1,1 iSerialNumber=3000111 iProduct=zhdgnss iManufactuy=zhd_survey

这里表示的是将linux设备的3个块设备进行PC映射显示,具体的属性设置可看上面的说明;


g_multi 完成的功能应该是一次可以挂几个文件。

谢谢,晕哥。按照你的指导方法,已经成功使用上了serial + RNDIS
博客文章已经总结完毕,待审核通过后,补上链接

https://blog.csdn.net/lan120576664/article/details/101081608
补 Serial + RNDIS的实现 博文

#24 Re: 全志 SOC » LicheePi Nano Usb复合设备RNDIS功能问题 » 2019-09-20 22:37:04

晕哥 说:

https://blog.csdn.net/sinat_19447667/article/details/78562568

  *     removable               Default false, boolean for removable media
  *     luns=N                  Default N = number of filenames, number of
  *                                     LUNs to support
+ *     stall                   Default determined according to the type ofdevice controller (usually true),
+ *                                     boolean to permit the driver to halt
+ *                                     bulk endpoints
  *     transport=XXX           Default BBB, transport name (CB, CBI, or BBB)
  *     protocol=YYY            Default SCSI, protocol name (RBC, 8020 or
  *                                     ATAPI, QIC, UFI, 8070, or SCSI;
@@ -91,14 +95,10 @@
  *     buflen=N                Default N=16384, buffer size used (will be
  *                                     rounded down to a multiple of
  *                                     PAGE_CACHE_SIZE)
- *     stall                   Default determined according to the type of
- *                                     USB device controller (usually true),
- *                                     boolean to permit the driver to halt
- *                                     bulk endpoints

通用命令: modprobe g_multi file=/dev/mmcblk1p1,/mnt/p1/static.img,/dev/mmcblk0p1 luns=3 ro=0,1,1 stall=0,0,0 removable=1,1,1 iSerialNumber=3000111 iProduct=zhdgnss iManufactuy=zhd_survey

这里表示的是将linux设备的3个块设备进行PC映射显示,具体的属性设置可看上面的说明;


g_multi 完成的功能应该是一次可以挂几个文件。

谢谢,晕哥。按照你的指导方法,已经成功使用上了serial + RNDIS
博客文章已经总结完毕,待审核通过后,补上链接

#25 Re: 全志 SOC » LicheePi Nano Usb复合设备RNDIS功能问题 » 2019-09-20 10:32:51

晕哥 说:

不错, 感谢分享!

modprobe g_multi  的问题搞定了吗?

没有呢
还需要晕哥再指导一下

#26 Re: 全志 SOC » LicheePi Nano Usb复合设备RNDIS功能问题 » 2019-09-20 10:11:32

昨天将单独的USB转串口以及USB的RNDIS的开启方法,整理出来写成文章,放到我的CSDN博客,有需要的可以过去看看
https://blog.csdn.net/lan120576664/article/details/101037170
https://blog.csdn.net/lan120576664/article/details/101039293

下一步待Serial + RNDIS 研究成功后,也重新总结一下方法

#27 Re: 全志 SOC » LicheePi Nano Usb复合设备RNDIS功能问题 » 2019-09-19 23:38:16

晕哥 说:

另外有一个 serial + ethernet 的 usb gadget 复合驱动

我尝试加载g_multi.ko 但是报了如下无效参数的错误

#
# modprobe g_multi.ko
[  110.008847] using random self ethernet address
[  110.013464] using random host ethernet address
[  110.023788] Mass Storage Function, version: 2009/09/11
[  110.028952] LUN: removable file: (no medium)
[  110.033420] no file given for LUN0
[  110.045133] console [ttyGS-1] disabled
[  110.049026] g_multi musb-hdrc.1.auto: failed to start g_multi: -22
[  110.066121] using random self ethernet address
[  110.070736] using random host ethernet address
[  110.079196] Mass Storage Function, version: 2009/09/11
[  110.084502] LUN: removable file: (no medium)
[  110.088833] no file given for LUN0
[  110.100390] console [ttyGS-1] disabled
[  110.104295] g_multi musb-hdrc.1.auto: failed to start g_multi: -22
modprobe: can't load module g_multi.ko (kernel/drivers/usb/gadget/legacy/g_multi.ko): Invalid argument

请问 modprobe g_multi.ko 后面还要带什么参数吗

另外附上设备上的驱动内容

  INSTALL crypto/echainiv.ko
  INSTALL drivers/input/touchscreen/goodix.ko
  INSTALL drivers/net/mii.ko
  INSTALL drivers/net/usb/rtl8150.ko
  INSTALL drivers/staging/rtl8723bs/r8723bs.ko
  INSTALL drivers/usb/gadget/function/usb_f_mass_storage.ko
  INSTALL drivers/usb/gadget/legacy/g_cdc.ko
  INSTALL drivers/usb/gadget/legacy/g_ether.ko
  INSTALL drivers/usb/gadget/legacy/g_multi.ko
  INSTALL drivers/usb/gadget/legacy/g_ncm.ko
  INSTALL drivers/usb/gadget/legacy/g_serial.ko
  INSTALL drivers/usb/mon/usbmon.ko
  INSTALL drivers/video/backlight/lcd.ko
  DEPMOD  4.15.0-rc8-licheepi-nano+

#28 Re: 全志 SOC » LicheePi Nano Usb复合设备RNDIS功能问题 » 2019-09-19 10:33:52

晕哥 说:

另外有一个 serial + ethernet 的 usb gadget 复合驱动


晕哥,请问这个serial + ethernet 的 usb gadget 复合驱动是哪个

#29 Re: 全志 SOC » LicheePi Nano Usb复合设备RNDIS功能问题 » 2019-09-19 00:04:15

通过以下命令加载驱动

# modprobe g_ether
# /usr/bin/myusbgadget
[   37.326944] using random self ethernet address
[   37.331582] using random host ethernet address
# ifconfig usb0 192.168.1.66
ifconfig: SIOCSIFADDR: No such device
#

Win10的设备管理器,没有看到任何新的设备。

RDNIS驱动应该加载那个驱动呢?

g_acm_ms.ko        g_ether.ko         g_midi.ko          g_serial.ko
g_audio.ko         g_ffs.ko           g_multi.ko         g_zero.ko
g_cdc.ko           g_hid.ko           g_ncm.ko           gadgetfs.ko
g_dbgp.ko          g_mass_storage.ko  g_printer.ko
#

或者应该如何才能够支持RDNIS?


另附上我的内核启动日志

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc8-licheepi-nano+ (root@3f250398f810) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #7 Wed Sep 18 23:37:49 CST 2019
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Nano
[    0.000000] Memory policy: Data cache writeback
[    0.000000] random: fast init done
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 22668K/32768K available (6144K kernel code, 244K rwdata, 1432K rodata, 1024K init, 246K bss, 10100K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc2800000 - 0xff800000   ( 976 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7136 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 245 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 247 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000049] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000122] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000762] Console: colour dummy device 80x30
[    0.000848] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070249] pid_max: default: 32768 minimum: 301
[    0.070585] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070635] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.072228] CPU: Testing write buffer coherency: ok
[    0.074130] Setting up static identity map for 0x80100000 - 0x80100058
[    0.076714] devtmpfs: initialized
[    0.083494] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.083571] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.083858] pinctrl core: initialized pinctrl subsystem
[    0.086162] NET: Registered protocol family 16
[    0.088141] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.089910] cpuidle: using governor menu
[    0.116670] SCSI subsystem initialized
[    0.117044] usbcore: registered new interface driver usbfs
[    0.117231] usbcore: registered new interface driver hub
[    0.117462] usbcore: registered new device driver usb
[    0.117934] pps_core: LinuxPPS API ver. 1 registered
[    0.117964] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.118033] PTP clock support registered
[    0.118577] Advanced Linux Sound Architecture Driver Initialized.
[    0.120059] clocksource: Switched to clocksource timer
[    0.148723] NET: Registered protocol family 2
[    0.150304] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.150394] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.150445] TCP: Hash tables configured (established 1024 bind 1024)
[    0.150826] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.150890] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.151429] NET: Registered protocol family 1
[    0.152779] RPC: Registered named UNIX socket transport module.
[    0.152827] RPC: Registered udp transport module.
[    0.152844] RPC: Registered tcp transport module.
[    0.152860] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.155173] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.157153] Initialise system trusted keyrings
[    0.157769] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.176052] NFS: Registering the id_resolver key type
[    0.176151] Key type id_resolver registered
[    0.176174] Key type id_legacy registered
[    0.176296] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.191672] Key type asymmetric registered
[    0.191720] Asymmetric key parser 'x509' registered
[    0.191952] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.191991] io scheduler noop registered
[    0.192009] io scheduler deadline registered
[    0.192832] io scheduler cfq registered (default)
[    0.192865] io scheduler mq-deadline registered
[    0.192885] io scheduler kyber registered
[    0.193953] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.204266] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.387506] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.394930] console [ttyS0] disabled
[    0.415188] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[    0.890160] console [ttyS0] enabled
[    0.901038] panel-simple panel: panel supply power not found, using dummy regulator
[    0.910627] SCSI Media Changer driver v0.25
[    0.918446] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.923360] 4 ofpart partitions found on MTD device spi0.0
[    0.928849] Creating 4 MTD partitions on "spi0.0":
[    0.933732] 0x000000000000-0x000000100000 : "u-boot"
[    0.941739] 0x000000100000-0x000000110000 : "dtb"
[    0.949107] 0x000000110000-0x000000510000 : "kernel"
[    0.956905] 0x000000510000-0x000001000000 : "rootfs"
[    0.965336] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.972016] ehci-platform: EHCI generic platform driver
[    0.977556] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.983875] ohci-platform: OHCI generic platform driver
[    0.989512] usbcore: registered new interface driver usb-storage
[    0.996928] i2c /dev entries driver
[    1.060205] sunxi-mmc 1c0f000.mmc: base:0xca4ab8fe irq:19
[    1.067828] usbcore: registered new interface driver usbhid
[    1.073548] usbhid: USB HID core driver
[    1.096230] NET: Registered protocol family 17
[    1.101110] Key type dns_resolver registered
[    1.107921] Loading compiled-in X.509 certificates
[    1.124698] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0739e58)
[    1.133622] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc073913c)
[    1.141426] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.148037] [drm] No driver support for vblank timestamp query.
[    1.202230] Console: switching to colour frame buffer device 60x34
[    1.225453] sun4i-drm display-engine: fb0:  frame buffer device
[    1.232628] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.241788] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.253697] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.259530] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.269679] hub 1-0:1.0: USB hub found
[    1.273735] hub 1-0:1.0: 1 port detected
[    1.279982] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.297594] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.304451] vcc3v3: disabling
[    1.307435] ALSA device list:
[    1.310481]   #0: Loopback 1
[    1.314281] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.322996] cfg80211: failed to load regulatory.db
[    1.433533] random: crng init done
[    3.624540] jffs2: notice: (1) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    3.644878] VFS: Mounted root (jffs2 filesystem) on device 31:3.
[    3.653603] devtmpfs: mounted
[    3.661349] Freeing unused kernel memory: 1024K
Starting syslogd: OK
Starting klogd: OK
Populating /dev using udev: [    9.768901] udevd[77]: starting version 3.2.7
[   10.058329] udevd[77]: specified group 'kvm' unknown
[   10.263945] udevd[78]: starting eudev-3.2.7
done
[   15.916618] g_serial gadget: Gadget Serial v2.4
[   15.921310] g_serial gadget: g_serial ready
[   16.003844] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers
Initializing random number generator... done.
[   16.324182] g_serial gadget: high-speed config #2: CDC ACM config
[   16.330369] gs_console_connect: port num [0] is not support console
Starting network: OK

Welcome to Buildroot

#31 Re: 全志 SOC » LicheePi Nano Usb复合设备RNDIS功能问题 » 2019-09-18 22:52:58

晕哥 说:

不完整, 缺 modules.dep.bin, modules.dep


删除 lib/modules/4.15.0-rc8-licheepi-nano+/ 目录:

rm lib/modules/4.15.0-rc8-licheepi-nano+/ -rf

重新执行前面的 modules_install

现在modules.dep.bin, modules.dep 可以正常生成了,但是没有办法加载起来

# modprobe u_serial
modprobe: module u_serial not found in modules.dep
# modprobe g_serial
modprobe: module g_serial not found in modules.dep
# ttyGS0::respawn:/bin/getty -L ttyGS0 57600 vt100
-sh: ttyGS0::respawn:/bin/getty: not found
#

#32 Re: 全志 SOC » LicheePi Nano Usb复合设备RNDIS功能问题 » 2019-09-18 22:39:27

lanjackg2003 说:
晕哥 说:

不完整, 缺 modules.dep.bin, modules.dep


删除 lib/modules/4.15.0-rc8-licheepi-nano+/ 目录:

rm lib/modules/4.15.0-rc8-licheepi-nano+/ -rf

重新执行前面的 modules_install

https://whycan.cn/files/members/1741/2019-09-18_21-12-44.png
重新安装也仍然没有生成 modules.dep.bin, modules.dep 这两个文件

参考链接
http://blog.chinaunix.net/uid-10386087-id-2959091.html
https://whycan.cn/files/members/1741/QQ20190918222909.png

如文章说的那样情况,查看了我的编译环境,发现确实没有 depmod 这个命令
通过如下命令安装

sudo apt-get install module-init-tools

然后再重新执行

ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- INSTALL_MOD_PATH=/opt/lichee/buildroot/output/target/  make modules_install

可以看到现在能够正常生成 modules.dep.bin, modules.dep 文件了
https://whycan.cn/files/members/1741/2019-09-18_22-33-24.png

#33 Re: 全志 SOC » LicheePi Nano Usb复合设备RNDIS功能问题 » 2019-09-18 21:13:45

晕哥 说:

不完整, 缺 modules.dep.bin, modules.dep


删除 lib/modules/4.15.0-rc8-licheepi-nano+/ 目录:

rm lib/modules/4.15.0-rc8-licheepi-nano+/ -rf

重新执行前面的 modules_install

https://whycan.cn/files/members/1741/2019-09-18_21-12-44.png
重新安装也仍然没有生成 modules.dep.bin, modules.dep 这两个文件

#34 Re: 全志 SOC » LicheePi Nano Usb复合设备RNDIS功能问题 » 2019-09-18 21:01:52

晕哥 说:

/lib/modules/4.15.0-rc8-licheepi-nano+/ 这下面有问题吗?

du -sh /lib/modules/4.15.0-rc8-licheepi-nano+/

find /lib/modules/4.15.0-rc8-licheepi-nano+/ |grep \\.ko$


https://whycan.cn/files/members/1741/2019-09-18_21-01-01_20190918-2102.png

这个是执行之后的打印信息

#36 Re: 全志 SOC » LicheePi Nano Usb复合设备RNDIS功能问题 » 2019-09-18 20:44:10

晕哥 说:

can't open /dev/ttyGS0: No such file or directory

modprobe: can't open 'modules.dep': No such file or directory

是这个问题吗?

这个问题是因为你的modules没有安装正确:

ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- INSTALL_MOD_PATH=/opt/buildroot-2019.08-hf/output/target/  make modules_install

是的,我按照这样子弄
在 /lib/modules/4.15.0-rc8-licheepi-nano+/ 会产生这个些文件
https://whycan.cn/files/members/1741/2019-09-18_20-42-56.png

但是没有问题还是那样子

#37 Re: 全志 SOC » LicheePi Nano Usb复合设备RNDIS功能问题 » 2019-09-18 20:12:04

xm1994 说:

Device Drivers  ---> USB support  --->    USB Gadget Support  --->
enable  USB Gadget functions configurable through configfs 
disable  USB Gadget precomposed configurations

https://whycan.cn/files/members/1741/2019-09-18_20-09-37.png

查看 .config 文件,如图片所示,相关的配置也是对的

#38 Re: 全志 SOC » LicheePi Nano Usb复合设备RNDIS功能问题 » 2019-09-18 11:21:57

xm1994 说:

Device Drivers  ---> USB support  --->    USB Gadget Support  --->
enable  USB Gadget functions configurable through configfs 
disable  USB Gadget precomposed configurations

是的,目前这个log的打印信息,就是已在linux的内核里面配置了
enable  USB Gadget functions configurable through configfs 
disable  USB Gadget precomposed configurations

#39 Re: 全志 SOC » LicheePi Nano Usb复合设备RNDIS功能问题 » 2019-09-17 23:27:10

晕哥 说:

https://github.com/gentoo/eudev/blob/master/src/udev/udevadm.c
https://github.com/systemd/systemd/blob/master/src/udev/udevadm.c

找到了这两个, 在 buildroot里面开启 eudev 或 systemd, 应该都可以生成 udevadm 命令,重新打包文件系统即可.


按照你的方法,在buildroot开启了eudev方式,可以支持udevadm了
但是在 /etc/inittab 文件中添加

ttyGS0::respawn:/bin/getty -L ttyGS0 57600 vt100

重新开机后,此时一直提示

can't open /dev/ttyGS0: No such file or directory

具体的log打印如下

U-Boot SPL 2018.01-05679-g013ca45-dirty (Sep 14 2019 - 09:15:39)
DRAM: 32 MiB
Trying to boot from MMC1
Card did not respond to voltage select!
mmc_init: -95, time 22
spl: mmc init failed with error: -95
Trying to boot from sunxi SPI


U-Boot 2018.01-05679-g013ca45-dirty (Sep 14 2019 - 09:15:39 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
In:    serial@1c25000
Out:   serial@1c25000
Err:   serial@1c25000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x100000, size 0x4000
SF: 16384 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 80e5f000, end 80e63f3e ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc8-licheepi-nano+ (root@8f872d65ac02) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #3 Tue Sep 17 20:54:11 CST 2019
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Nano
[    0.000000] Memory policy: Data cache writeback
[    0.000000] random: fast init done
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 22672K/32768K available (6144K kernel code, 238K rwdata, 1420K rodata, 1024K init, 246K bss, 10096K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc2800000 - 0xff800000   ( 976 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7136 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 239 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 247 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000053] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000121] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000742] Console: colour dummy device 80x30
[    0.000834] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070248] pid_max: default: 32768 minimum: 301
[    0.070579] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070626] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.072196] CPU: Testing write buffer coherency: ok
[    0.074092] Setting up static identity map for 0x80100000 - 0x80100058
[    0.076801] devtmpfs: initialized
[    0.083611] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.083689] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.083984] pinctrl core: initialized pinctrl subsystem
[    0.086296] NET: Registered protocol family 16
[    0.088275] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.090427] cpuidle: using governor menu
[    0.117755] SCSI subsystem initialized
[    0.118119] usbcore: registered new interface driver usbfs
[    0.118313] usbcore: registered new interface driver hub
[    0.118544] usbcore: registered new device driver usb
[    0.119030] pps_core: LinuxPPS API ver. 1 registered
[    0.119058] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.119133] PTP clock support registered
[    0.119653] Advanced Linux Sound Architecture Driver Initialized.
[    0.121472] clocksource: Switched to clocksource timer
[    0.150908] NET: Registered protocol family 2
[    0.152644] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.152734] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.152796] TCP: Hash tables configured (established 1024 bind 1024)
[    0.153161] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.153235] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.153763] NET: Registered protocol family 1
[    0.155101] RPC: Registered named UNIX socket transport module.
[    0.155145] RPC: Registered udp transport module.
[    0.155162] RPC: Registered tcp transport module.
[    0.155178] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.157376] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.159434] Initialise system trusted keyrings
[    0.160056] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.178458] NFS: Registering the id_resolver key type
[    0.178547] Key type id_resolver registered
[    0.178569] Key type id_legacy registered
[    0.178694] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.194515] Key type asymmetric registered
[    0.194562] Asymmetric key parser 'x509' registered
[    0.194795] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.194832] io scheduler noop registered
[    0.194851] io scheduler deadline registered
[    0.195723] io scheduler cfq registered (default)
[    0.195755] io scheduler mq-deadline registered
[    0.195774] io scheduler kyber registered
[    0.196951] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.207245] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.395674] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.403119] console [ttyS0] disabled
[    0.423394] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[    0.898437] console [ttyS0] enabled
[    0.909281] panel-simple panel: panel supply power not found, using dummy regulator
[    0.918927] SCSI Media Changer driver v0.25
[    0.926990] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.931906] 4 ofpart partitions found on MTD device spi0.0
[    0.937398] Creating 4 MTD partitions on "spi0.0":
[    0.942283] 0x000000000000-0x000000100000 : "u-boot"
[    0.950163] 0x000000100000-0x000000110000 : "dtb"
[    0.957745] 0x000000110000-0x000000510000 : "kernel"
[    0.965585] 0x000000510000-0x000001000000 : "rootfs"
[    0.974053] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.980594] ehci-platform: EHCI generic platform driver
[    0.986258] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.992584] ohci-platform: OHCI generic platform driver
[    0.998237] usbcore: registered new interface driver usb-storage
[    1.005630] i2c /dev entries driver
[    1.071589] sunxi-mmc 1c0f000.mmc: base:0xe00f6a2d irq:19
[    1.079275] usbcore: registered new interface driver usbhid
[    1.084983] usbhid: USB HID core driver
[    1.107926] NET: Registered protocol family 17
[    1.112799] Key type dns_resolver registered
[    1.119638] Loading compiled-in X.509 certificates
[    1.136194] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0739e58)
[    1.145137] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc073913c)
[    1.152941] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.159548] [drm] No driver support for vblank timestamp query.
[    1.213724] Console: switching to colour frame buffer device 60x34
[    1.236954] sun4i-drm display-engine: fb0:  frame buffer device
[    1.244152] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.253326] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.265194] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.271028] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.281190] hub 1-0:1.0: USB hub found
[    1.285240] hub 1-0:1.0: 1 port detected
[    1.291656] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.309222] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.316077] vcc3v3: disabling
[    1.319063] ALSA device list:
[    1.322107]   #0: Loopback 1
[    1.325907] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.334624] cfg80211: failed to load regulatory.db
[    1.445369] random: crng init done
[    3.602614] jffs2: notice: (1) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    3.622793] VFS: Mounted root (jffs2 filesystem) on device 31:3.
[    3.631267] devtmpfs: mounted
[    3.639025] Freeing unused kernel memory: 1024K
Starting syslogd: OK
Starting klogd: OK
Populating /dev using udev: [    9.556114] udevd[77]: starting version 3.2.7
[    9.790446] udevd[77]: specified group 'kvm' unknown
[    9.993605] udevd[78]: starting eudev-3.2.7
done
Initializing random number generator... done.
Starting network: OK
can't open /dev/ttyGS0: No such file or directory

Welcome to Buildroot
can't open /dev/ttyGS0: No such file or directory
can't open /dev/ttyGS0: No such file or directory
can't open /dev/ttyGS0: No such file or directory
can't open /dev/ttyGS0: No such file or directory
can't open /dev/ttyGS0: No such file or directory
can't open /dev/ttyGS0: No such file or directory
can't open /dev/ttyGS0: No such file or directory
can't open /dev/ttyGS0: No such file or directory
can't open /dev/ttyGS0: No such file or directory
can't open /dev/ttyGS0: No such file or directory
can't open /dev/ttyGS0: No such file or directory

尝试参考链接
https://whycan.cn/t_2401.html
想使用命令

modprobe g_serial

加载起来,但发现返回错误

modprobe: can't open 'modules.dep': No such file or directory

感觉是驱动没有加载,请问要如何解决这个问题?
目前是usb的串口跟RNDIS都无法工作

#40 全志 SOC » LicheePi Nano Usb复合设备RNDIS功能问题 » 2019-09-15 22:01:35

lanjackg2003
回复: 51

在做USB复合设备的时候,参考了晕哥之前的文章
   https://www.lotlab.org/2018/07/29/record-of-using-licheepi-part-2-using-linux-gadget
   目前,usb的串口功能可以正常与板子进行交互,但是RNDIS的功能却没有成功
   开机启动的时候,在加载脚本的时候出现 /usr/bin/myusbgadget: line 41: udevadm: not found
   如图片所示
   失败图片

   我查了系统,确实没有udevadm这个程序。
   请问一下,要如何解决这个错误,让系统支持RNDIS功能
   请大家赐教,谢谢

   另外附上myusbgadget脚本的内容
   

#!/bin/sh -e
mount -t configfs none /sys/kernel/config

#modprobe libcomposite

cd /sys/kernel/config/usb_gadget/
mkdir g && cd g

echo 0x1d6b > idVendor  # Linux Foundation
echo 0x0104 > idProduct # Multifunction Composite Gadget
echo 0x0100 > bcdDevice # v1.0.0
echo 0x0200 > bcdUSB    # USB 2.0

echo 0xEF > bDeviceClass
echo 0x02 > bDeviceSubClass
echo 0x01 > bDeviceProtocol

mkdir -p strings/0x409
echo "deadbeef00115599" > strings/0x409/serialnumber
echo "irq5 labs"        > strings/0x409/manufacturer
echo "Pi Zero Gadget"   > strings/0x409/product

mkdir -p functions/acm.usb0    # serial
mkdir -p functions/rndis.usb0  # network

mkdir -p configs/c.1
echo 250 > configs/c.1/MaxPower
ln -s functions/rndis.usb0 configs/c.1/
ln -s functions/acm.usb0   configs/c.1/

# OS descriptors
echo 1       > os_desc/use
echo 0xcd    > os_desc/b_vendor_code
echo MSFT100 > os_desc/qw_sign

echo RNDIS   > functions/rndis.usb0/os_desc/interface.rndis/compatible_id
echo 5162001 > functions/rndis.usb0/os_desc/interface.rndis/sub_compatible_id

ln -s configs/c.1 os_desc

udevadm settle -t 5 || :
ls /sys/class/udc/ > UDC

#41 全志 SOC » F1C100s如何在uboot触发芯片进入usb otg烧录模式 » 2019-06-12 12:07:46

lanjackg2003
回复: 8

如题所示,发现如果要重新烧录固件的时候,每次都要用工具短路SPI的1、4引脚,再开机
所以想请问一下,在uboot有没有一个命令可以让F1C100s重新进入usb otg的烧录模式。

#42 Re: 全志 SOC » 在F1C100s Nano上使用wifi模块 » 2019-06-12 12:04:44

按照官方的提示使用linux分支编译生成的固件
然后尝试商家编译的esp8089.ko
无法使用ismod加载该模块,提示这个ko文件版本跟我的编译分支不正确
不知道这块的模组的源代码如何跟我的编译分支搭起来

页脚

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

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