Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: Izeau on February 16, 2018, 07:10:45 AM
-
Hello!
I’m trying to use my Raspberry Pi Zero W as gadget USB device but getting stuck. Here's what I did so far:
- dd the piCore 9.0.3 image to the SD card
- mount the SD card
- update config.txt to add the dtoverlay=dwc2 line in the [ALL] section
- update commandline.txt to add the modules-load=dwc2,g_ether bit (not sure if this does anything)
- create a tcz file with the gadget files and dependencies inside (see below for the list)
- add modprobe dwc2 and modprobe g_ether in bootlocal.sh
- add my tcz in onboot.lst
- save mydata.tgz
Now dwc2 loads just fine but I can't get g_ether, g_multi or any other module to load. Dependencies load fine (e.g. for g_ether I can see libcomposite, u_ether, usb_f_rndis in lsmod) but not the modules themselves.
Included modules:
lib
└── modules
└── 4.9.22-piCore
└── kernel
└── drivers
├── media
│ ├── media.ko
│ └── v4l2-core
│ ├── videobuf2-core.ko
│ ├── videobuf2-memops.ko
│ ├── videobuf2-v4l2.ko
│ ├── videobuf2-vmalloc.ko
│ └── videodev.ko
└── usb
├── dwc2
│ └── dwc2.ko
├── gadget
│ ├── function
│ │ ├── u_ether.ko
│ │ ├── usb_f_hid.ko
│ │ ├── usb_f_mass_storage.ko
│ │ ├── usb_f_rndis.ko
│ │ └── usb_f_uvc.ko
│ ├── legacy
│ │ ├── g_acm_ms.ko
│ │ ├── g_audio.ko
│ │ ├── g_cdc.ko
│ │ ├── g_ether.ko
│ │ ├── g_hid.ko
│ │ ├── g_mass_storage.ko
│ │ ├── g_midi.ko
│ │ ├── g_multi.ko
│ │ ├── g_printer.ko
│ │ ├── g_serial.ko
│ │ ├── g_webcam.ko
│ │ └── g_zero.ko
│ ├── libcomposite.ko
│ └── udc
│ └── udc-core.ko
└── usbip
├── usbip-core.ko
├── usbip-host.ko
└── vhci-hcd.ko
The error unknown symbol in module, or unknown parameter pops up, and dmesg gives the error code -2 (ENOENT?)
I’ve tried about everything from these three threads, to no avail:
- http://forum.tinycorelinux.net/index.php/topic,20195.0.html
- http://forum.tinycorelinux.net/index.php/topic,21530.msg134804.html
- http://forum.tinycorelinux.net/index.php/topic,21095.msg133026.html
Can anyone point me in the right direction? Many thanks
-
What does "modinfo g_ether" give?
-
I'm in my dev VM right now, so don't mind the filename (which is /lib/modules/4.9.22-piCore/kernel/drivers/usb/gadget/legacy/g_ether.ko on the Pi)
filename: /tmp/4.9.22-piCore-usb-gadgets/lib/modules/4.9.22-piCore/kernel/drivers/usb/gadget/legacy/./g_ether.ko
license: GPL
author: David Brownell, Benedikt Spanger
description: RNDIS/Ethernet Gadget
srcversion: E982E948F6BC8C5A476FB72
depends: libcomposite,u_ether,usb_f_rndis
intree: Y
vermagic: 4.9.22-piCore mod_unload modversions ARMv6 p2v8
parm: idVendor:USB Vendor ID (ushort)
parm: idProduct:USB Product ID (ushort)
parm: bcdDevice:USB Device version (BCD) (ushort)
parm: iSerialNumber:SerialNumber string (charp)
parm: iManufacturer:USB Manufacturer string (charp)
parm: iProduct:USB Product string (charp)
parm: qmult:queue length multiplier at high/super speed (uint)
parm: dev_addr:Device Ethernet Address (charp)
parm: host_addr:Host Ethernet Address (charp)
parm: use_eem:use CDC EEM mode (bool)
(I tried setting all the parameters but the result is the same)
-
Are all the modules on the “depends” line (recursively) present?
-
Yes they are (and their dependencies too). I can even see them listed in lsmod.
-
Hey, still no success. Does anyone have a working config?
-
Take a look at this thread
http://forum.tinycorelinux.net/index.php/topic,20195.0.html
-
And found this youtube tut.
https://www.youtube.com/watch?v=aL1pWI2K60w