烧写参考这里:https://whycan.cn/t_2179.html
其中,boot.scr、zImage、xx.dtb放到第一分区(FAT16),解压rootfs.tar到第二分区(ext4)
启动到uboot,执行命令:run distro_bootcmd 加载内核
启动到shell,执行命令:sh run_adbd.sh 运行adbd
最后,插入电脑,会看到一个ADB Interface设备
离线
adbd的移植,buildroot配置adb-tools即可
内核配置文件nano_kernel_config.tgz(不是压缩文件,直接改名.config替换即可)
最近编辑记录 checkout (2019-08-22 22:05:33)
离线
漏了,脚本如下:
#! /bin/sh
modprobe g_ffs idVendor=0x18d1 idProduct=0x4e42 iSerialNumber="buildroot"
mkdir -p /dev/usb-ffs/adb
mount -t functionfs adb /dev/usb-ffs/adb -o uid=2000,gid=2000
adbd &
加了, 但是电脑上仍然没有反应, 看来还是脚本不太对。
最近编辑记录 checkout (2019-08-23 11:01:03)
离线
内核配置USB部分可以看我上面f1c的
checkout 说:adbd的移植,buildroot配置adb-tools即可
内核配置文件nano_kernel_config.tgz(不是压缩文件,直接改名.config替换即可)v3s不知道怎么配置?
离线
选gadgetfs,fuctionfs
https://whycan.cn/files/members/1569/20190829093543.png
v3s 的gadget的配置部分,和楼上的配置不一样。找不到几个选项。
离线
你看看相关的.ko有没有存在
最近编辑记录 checkout (2019-08-29 13:36:58)
离线
insmod试试,或者depmod -a搞搞
你没有用buildroot??
g_serial.ko 是存在的。
最近编辑记录 checkout (2019-08-29 14:02:08)
离线
4.13-y版本完全没问题
启动log:
reading zImage
3911360 bytes read in 219 ms (17 MiB/s)
reading sun8i-v3s-licheepi-zero-dock.dtb
12671 bytes read in 32 ms (385.7 KiB/s)
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 42df9000, end 42dff17e ... OK
Cannot setup simplefb: node not found
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.13.16-licheepi-zero (root@ubuntu) (gcc version 7.3.0 (Buildroot 2018.08.2)) #2 SMP Thu Aug 29 17:16:35 CST 2019
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Lichee Pi Zero with Dock
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] percpu: Embedded 16 pages/cpu @c3f5e000 s33868 r8192 d23476 u65536
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw vt.global_cursor_default=0
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Memory: 55092K/65536K available (6144K kernel code, 215K rwdata, 1432K rodata, 1024K init, 261K bss, 10444K 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 : 0xc4800000 - 0xff800000 ( 944 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0700000 (7136 kB)
[ 0.000000] .init : 0xc0900000 - 0xc0a00000 (1024 kB)
[ 0.000000] .data : 0xc0a00000 - 0xc0a35d00 ( 216 kB)
[ 0.000000] .bss : 0xc0a3c7e4 - 0xc0a7df2c ( 262 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU event tracing is enabled.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000020] Switching to timer-based delay loop, resolution 41ns
[ 0.000185] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000435] Console: colour dummy device 80x30
[ 0.000470] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000484] pid_max: default: 32768 minimum: 301
[ 0.000610] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000627] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001228] CPU: Testing write buffer coherency: ok
[ 0.001601] /cpus/cpu@0 missing clock-frequency property
[ 0.001625] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002082] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.002266] Hierarchical SRCU implementation.
[ 0.002758] smp: Bringing up secondary CPUs ...
[ 0.002772] smp: Brought up 1 node, 1 CPU
[ 0.002781] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.002787] CPU: All CPU(s) started in SVC mode.
[ 0.003548] devtmpfs: initialized
[ 0.006818] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.007113] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.007139] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.007312] pinctrl core: initialized pinctrl subsystem
[ 0.008163] random: get_random_u32 called from bucket_table_alloc+0x110/0x238 with crng_init=0
[ 0.008301] NET: Registered protocol family 16
[ 0.008758] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.009849] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.009866] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.023681] SCSI subsystem initialized
[ 0.024025] usbcore: registered new interface driver usbfs
[ 0.024113] usbcore: registered new interface driver hub
[ 0.024209] usbcore: registered new device driver usb
[ 0.024464] pps_core: LinuxPPS API ver. 1 registered
[ 0.024475] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.024497] PTP clock support registered
[ 0.024737] Advanced Linux Sound Architecture Driver Initialized.
[ 0.026530] clocksource: Switched to clocksource arch_sys_counter
[ 0.037009] NET: Registered protocol family 2
[ 0.037590] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.037625] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.037648] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.037773] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.037821] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.038035] NET: Registered protocol family 1
[ 0.038641] RPC: Registered named UNIX socket transport module.
[ 0.038659] RPC: Registered udp transport module.
[ 0.038664] RPC: Registered tcp transport module.
[ 0.038670] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.040702] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.049736] NFS: Registering the id_resolver key type
[ 0.049790] Key type id_resolver registered
[ 0.049798] Key type id_legacy registered
[ 0.050843] random: fast init done
[ 0.053702] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.053724] io scheduler noop registered
[ 0.053731] io scheduler deadline registered
[ 0.053940] io scheduler cfq registered (default)
[ 0.053951] io scheduler mq-deadline registered
[ 0.053958] io scheduler kyber registered
[ 0.058409] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.058926] pwm-backlight backlight: backlight supply power not found, using dummy regulator
[ 0.127896] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.131069] console [ttyS0] disabled
[ 0.151326] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 37, base_baud = 18750000) is a U6_16550A
[ 0.739345] console [ttyS0] enabled
[ 0.764364] 1c28400.serial: ttyS1 at MMIO 0x1c28400 (irq = 38, base_baud = 18750000) is a U6_16550A
[ 0.794951] 1c28800.serial: ttyS2 at MMIO 0x1c28800 (irq = 39, base_baud = 18750000) is a U6_16550A
[ 0.805261] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE0
[ 0.813066] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE1
[ 0.820771] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE2
[ 0.828459] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE3
[ 0.836132] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE4
[ 0.843816] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE5
[ 0.851499] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE6
[ 0.859180] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE7
[ 0.866862] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE8
[ 0.874533] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE9
[ 0.882215] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE10
[ 0.889983] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE11
[ 0.897752] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE12
[ 0.905510] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE13
[ 0.913278] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE14
[ 0.921046] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE15
[ 0.928815] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE16
[ 0.936583] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE17
[ 0.944342] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE18
[ 0.952110] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE19
[ 0.959877] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE23
[ 0.967646] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE24
[ 0.977185] panel-simple panel: panel supply power not found, using dummy regulator
[ 0.986376] libphy: Fixed MDIO Bus: probed
[ 0.991131] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[ 0.997031] dwmac-sun8i 1c30000.ethernet: No regulator found
[ 1.002762] dwmac-sun8i 1c30000.ethernet: Will use internal PHY
[ 1.008982] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[ 1.014665] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[ 1.021941] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[ 1.027627] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[ 1.034862] dwmac-sun8i 1c30000.ethernet: COE Type 2
[ 1.039847] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[ 1.046835] libphy: stmmac: probed
[ 1.052140] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.058821] ehci-platform: EHCI generic platform driver
[ 1.064361] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 1.070084] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 1.078046] ehci-platform 1c1a000.usb: irq 27, io mem 0x01c1a000
[ 1.106543] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 1.113745] hub 1-0:1.0: USB hub found
[ 1.117710] hub 1-0:1.0: 1 port detected
[ 1.122233] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.128560] ohci-platform: OHCI generic platform driver
[ 1.134147] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 1.140892] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[ 1.148855] ohci-platform 1c1a400.usb: irq 28, io mem 0x01c1a400
[ 1.221686] hub 2-0:1.0: USB hub found
[ 1.225521] hub 2-0:1.0: 1 port detected
[ 1.233791] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[ 1.242869] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[ 1.249795] sun6i-rtc 1c20400.rtc: RTC enabled
[ 1.254379] i2c /dev entries driver
[ 1.259409] input: ns2009_ts as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0048/input/input1
[ 1.268996] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.336765] sunxi-mmc 1c0f000.mmc: base:0xc4985000 irq:24
[ 1.383661] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.393689] mmc0: new high speed SDHC card at address 0001
[ 1.399716] sunxi-mmc 1c10000.mmc: base:0xc4989000 irq:25
[ 1.406121] usbcore: registered new interface driver usbhid
[ 1.411807] usbhid: USB HID core driver
[ 1.416438] mmcblk0: mmc0:0001 SD8GB 7.28 GiB
[ 1.423089] sun4i-codec 1c22c00.codec: ASoC: /soc/codec-analog@01c23000 not registered
[ 1.431165] sun4i-codec 1c22c00.codec: Failed to register our card
[ 1.437687] mmcblk0: p1 p2
[ 1.445759] NET: Registered protocol family 17
[ 1.450490] Key type dns_resolver registered
[ 1.454907] Registering SWP/SWPB emulation handler
[ 1.464905] pwm-backlight backlight: backlight supply power not found, using dummy regulator
[ 1.474515] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE0
[ 1.482366] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE1
[ 1.490085] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE2
[ 1.497775] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE3
[ 1.505446] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE4
[ 1.513131] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE5
[ 1.520813] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE6
[ 1.528495] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE7
[ 1.536166] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE8
[ 1.543846] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE9
[ 1.551529] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE10
[ 1.559297] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE11
[ 1.567066] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE12
[ 1.574824] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE13
[ 1.582594] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE14
[ 1.590364] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE15
[ 1.598133] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE16
[ 1.605891] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE17
[ 1.613661] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE18
[ 1.621431] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE19
[ 1.629200] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE23
[ 1.636969] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE24
[ 1.645098] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.651850] [drm] No driver support for vblank timestamp query.
[ 1.667267] sun4i-drm display-engine: bound 1100000.mixer (ops 0xc073ed78)
[ 1.674668] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc073dbf8)
[ 1.723755] Console: switching to colour frame buffer device 100x30
[ 1.746916] sun4i-drm display-engine: fb0: frame buffer device
[ 1.753480] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[ 1.762008] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.773529] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.779405] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[ 1.788494] hub 3-0:1.0: USB hub found
[ 1.792331] hub 3-0:1.0: 1 port detected
[ 1.799658] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
[ 1.808366] pwm-backlight backlight: backlight supply power not found, using dummy regulator
[ 1.817613] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 00:00:12 UTC (12)
[ 1.825921] vcc5v0: disabling
[ 1.829009] ALSA device list:
[ 1.831989] #0: V3s Audio Codec
[ 1.837727] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.846932] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[ 2.272992] EXT4-fs (mmcblk0p2): recovery complete
[ 2.280017] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 2.288260] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 2.294495] devtmpfs: mounted
[ 2.298789] Freeing unused kernel memory: 1024K
[ 2.478403] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Starting logging: OK
Starting mdev...
Initializing random number generator... done.
Starting system message bus: done
Starting network: OK
Welcome to Buildroot
buildroot login: root
# sh run_adbd.sh
[ 14.138960] file system registered
# install_listener('tcp:5037','*smartsocket*')[ 14.238566] read descriptors
[ 14.244427] read strings
[ 14.247383] g_ffs gadget: g_ffs ready
最近编辑记录 checkout (2019-08-29 18:00:54)
离线
可能有依赖其他模块,用modprobe卸载 @firstman
离线
参考50楼
https://whycan.cn/files/members/2789/usb.jpg
你好,我这样配置有问题吗?启动adbd的时候报错
adbd & [1]- Terminated adbd # install_listener[ 99.342029] read descriptors ('tcp:5037','*sm[ 99.345182] read strings artsocket*') [ 99.349252] udc-core: couldn't find an available UDC - added [g_ffs] to list of pending drivers
离线
这几个选项
离线
你用的是v3s还是f1c?可以把启动log贴上来
lichee zero的内核配置,你可以参考参考
linux-4-13-config.tgz
最近编辑记录 checkout (2020-01-05 18:42:00)
离线
不需要
请问使用https://github.com/Lichee-Pi/linux/tree/nano-4.14-exp这个版本的内核,只需要用你这个配置,不需要patch文件吗?
离线