WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: USB gadget kernel module with RPi zero  (Read 33579 times)

Offline bot

  • WikiUser
  • *
  • Posts: 1
Re: USB gadget kernel module with RPi zero
« Reply #30 on: November 01, 2018, 01:25:03 PM »
 can someone summarize the exact steps in the right sequence to enable the OTG serial access please? I'm fighting with this almost couple of hours without any success. It is so easy in Raspbian...
« Last Edit: November 01, 2018, 01:43:07 PM by bot »

Offline ladnar

  • Newbie
  • *
  • Posts: 46
Re: USB gadget kernel module with RPi zero
« Reply #31 on: December 10, 2018, 11:05:52 AM »
Sorry, I am new too. I have no advice to give, but was worried that nobody responded yet? Have you tried the Rpi pages? Some of the threads on this forum reference things like SSH and "headless Pi" and OTG and USB Gadget.

My interest is in Pi Brambles, and, specifically, SD-card unmounted Pi zero Brambles. Here are a few other threads that might help.

http://forum.tinycorelinux.net/index.php/topic,21821.0.html

http://forum.tinycorelinux.net/index.php/topic,22341.0.html

http://forum.tinycorelinux.net/index.php/topic,20195.0.html

I think those threads might help, but I am too new to linux (the sum total of my coding ability is "DOS for idiots", "anatomy of hexadecimal JPEGs" and 6502-assembly language) to offer real advice.

Offline ladnar

  • Newbie
  • *
  • Posts: 46
Re: USB gadget kernel module with RPi zero
« Reply #32 on: December 10, 2018, 11:12:28 AM »
Sorry, one link above is THIS PRESENT POST! You've  obviously been there/here. I meant to post this other one : http://forum.tinycorelinux.net/index.php/topic,22211.0.html

Offline ladnar

  • Newbie
  • *
  • Posts: 46
Re: USB gadget kernel module with RPi zero
« Reply #33 on: December 10, 2018, 12:23:22 PM »
So, I have managed to (1) purchase 3 QTY raspberry Pi's (12 total QTY, envisioned), (2) purchase one SD card and 2 power supplies, (3) Install PiCore9.0.xsomething?, using?, maybe GParted (GUI) to zero the card and format and partition it, and , $dd if=PiCore-9.0.img of=/dev/sdb  to put the image onto the SDcard.

If I remember right, I did not really use GParted to partition; I think just to low-level format. I think the dd command I used is the one that determined the size, and shape, and flavor, and etc. of the partitions, and the "structure" of the file system(s). The vagueness of the above description reveals the extent of my ignorance. In short, so far, much of the process was automatic.

To my surprise, it booted, and I had a command line. The user name and password took a guess or two, because some website I was on told me the wrong info. I think it booted to tc@box:^$    as the username, and I think PiCore was the password. One website told me this was the default, and another said default was no-password? Perhaps the latter was for another version of PiCore and/or tinycore?

Anyhoo, @bot, I am sorry I cannot solve your problem yet, but I might be working on it soon. I will try the Raspbian instructions on my new PiCore machine (Pi Zero) and see if they work. I think I will be trying the Gadget Ethernet, not Gadget Serial, as I do not have the "TTL-USB console wire-thingy", and don't plan on purchasing one just yet.

https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/overview

https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/serial-gadget

https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/ethernet-gadget

https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/ethernet-tweaks

https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/other-modules

@bot, I am, of course, without any ability to offer advice on these pages, as I lack perspective and wisdom in this area.

I am still learning the relevant linux commands, and the one time I had PiCore "fired up", i.e. booted, I couldn't even shut it down or unmount it, for lack of the proper terminology! I think I hacked  some solution that PROBABLY wouldn't corrupt the card on shutdown, but I forget since (my handwritten notes inform me) I was working on this back on 11/26/2018.

A couple more days poking around on various linux websites, and I found the relevant commands; (a) shutdown, (b) kill, (c) reset, (d) exit, (e) umount, (f) umount -l [lazy unmount] , (g) eject, (h) ps or pstree, followed by kill , (i) sudo shutdown -r now, (j) sudo reboot, and et cetra, et cetra ... (Also, perhaps, REISUB; How did I not know REISUB? Too many years on a windows computer, I am a Ctrl+Alt+Del man!).

So, the next steps in my plan, are (4) umount -l /dev/sdx , followed by (5) eject /dev/sdx ( I think sdx might be something more like mmcblkx?) . Hopefully this works without a hitch, but I have a feeling I will have to reference the thread : http://forum.tinycorelinux.net/index.php/topic,21821.0.html   in order to actually get the thing working properly. (I don't yet understand all this business about "loading extensions" and "creating persistence"; I assume that PiCore loads entirely to RAM, lives there while it is on, and disappears from RAM when the power goes off; leaving the SDcard to give a fresh boot next time? Safe assumption, or must I work to achieve this?).

Next step is to (6) fire up the second Raspberry Pi Zero, and boot PiCore9.0.? to it, (7) repeat above steps to remove the SD card, (8) buy a third power cord (or better yet, a multi-USB power hub module, of some kind), (9) Figure out how to Ethernet gadget them all, except the first one, which, like the mighty Sauron, will be "one USB Host, to rule them all, and in the Pi-ness bind them", and finally, (10) buy 9 more Pi-zeros (with appropriate power supplies and micro-USB-to-micro-USB comm. wires)

OK, that's my plan. @ bot, I hope you are not really a bot, as I have, thus, wasted much time speaking to imaginary things, of imaginary things. But my imagination has made a computer that my mind/hands can't quite build, so, perhaps, the writing of this post will organize my thoughts and make it happen?
« Last Edit: December 10, 2018, 12:42:28 PM by ladnar »

Offline ladnar

  • Newbie
  • *
  • Posts: 46
Re: USB gadget kernel module with RPi zero
« Reply #34 on: September 28, 2020, 10:02:04 AM »
So, life intrudes, projects are delayed, but I'm back. This is an extension of my 20 year quest for Strong AI, itself an extension of my investigation of Natural Intelligence, and really only in the last 5 to 8 years have I been trying to organize the "silicon" to get it done right. Previously, I posted some interesting comments on a 6502 forum, back about 2014 or 2015. Those are worth reading, to understand the development of my thought on these topics.

Back in my "retro-6502" days (2014-2015), I was working on my plans for "robot eyes". Those are "still in the works", but, for today, and yesterday, and the next month or two, I will need to start organizing my "robot spinal cord".  Namely, USB gadget-ize, 10 R-Pi zeros, and distribute the boards, physically, onto a titanium skeleton (11+ QTY. , 8 mm. diameter, one-foot sections; 8 for limbs; 3 for spine; + miscellaneous? ; motors, "muscles" and "joints" are "in the works"). Originally I was on a  very shoestring budget and figured "run clean and light" and thus, picore, RAM-resident (saves money on micro-SDs), but I can probably afford the SD cards now. Still, I was glad to stumble on this old post, and to try to update it with my experience.

Also new to this project, is my dedicated, wall-plug power supply, with some 12 USB "ports" (receptacles), all of them dealing 1 Amp or more, up to 3.5 Amps for some "ports" (receptacles). So, plenty of power. Even if I USB gadgetize the 8 peripheral processors, "the limbs", I will leave them booted and powered from this power supply, and just use the USB gadget function to program--through a 10 "port" (receptacle) USB strip--from the master board to the slaves. Eventually, I will do the "Ohm's Law" math, and get it battery or maybe even solar powered.

I was not sure I knew how to do this; how to gadget-ize while leaving the power supply in place, or if there was some extra programming involved? As it might have been the case that plugging one r-pi zero (gadgetized) into another (non-gadget) would force the non-gadget to power the gadget. The master RPI zero cannot run 10 slave RPI zeros through its USB port; not enough amperage supply. But, luckily, this is not the case, as my USB volt-ammeter confirms. With a series of interesting little experiments I have gotten 2 Raspbian slaves to show up on the network of one Raspbian master, and crucially, they remain powered by my external power supply, not the R-PI zero master-board. I should probably try to see if two raspbian slaves will show up under (ifconfig) one picore master? I bet they would? I should try that today.

So, with the equipment above, and just ping, ifconfig, lsusb, lsblk,  and a little bit of knowledge about IPs, I was able to get the 2 boards to show up under ifconfig, as "usb0" and "usb1", with assigned , dynamic IP (IPv4) addresses. I should probably study RNDIS, a bit, as I think that might be the "protocol" that assigns IPs to usb devices? I don't know? I had a few "USB books" by Jan Axelson, but they were too high level to interest me ( I like physics of ones and zeros; bare metal) and too low level to be practical to this project. The advice of johannkraus is JUST RIGHT. Nevermind the books. roll up your sleeves and DO IT!

It probably wouldn't hurt to reassign user-names, hostnames, and passwords, both for my Raspbian SD cards, masters and slaves, and for my piCore masters and slaves. That way IP addresses would be easier? I suppose I could also assign static IP addresses? I know how to do that, but I forgot. Also, with cat /proc/cpuinfo I can take notes on the serial numbers of each device, so that my scientific experiment is more rigorous (meticulous notation!).

Anyhoo, so, last night I stumbled on this post again, and saw--now, with my two years experience in linux CLI--that johannkraus provided excellent instructions; albeit, a bit cross purpose to my own. But his knowledge of rpis and adding modules and of tiny core persistence has helped me, quite a bit, to organize my thoughts and move my programming actions in a positive direction (instead of continued 2 year stagnation).

So last night  I (1) found and downloaded modules, (2) unzipped and placed on a flash drive, { (2b) removed flash drive from laptop; booted rpi zero with not-yet-gadget-ized picore 9.0.? ; and plugged flash drive into the rpi zero } ;(3) navigated the CLI of picore (I have v. 9 and v. 11 picore; but no desktop, as of yet) to place the relevant modules in /lib/.../usb , as johannkraus indicated, (4) ran his depmod -a command, even though I don't know what it does, (5) updated .filetool.lst and ran backup, (6) added /sbin/modprobe dwc2 to the onboot.lst , even though I dont know what that does. Presumably, on boot, something "new" will happen?

And then I got tired and fell asleep.

I see, this morning, that I did forget to get the file modules.dep  . I wonder if it is a necessary one?

I suppose I should just try plugging the microSD into my laptop, edit the cmdline.txt (or was it cmdline.txt ?) to include dtoverlay=dwc2, and then eject, and then go boot a pi or two, to see if one will be master and one slave? See if ifconfig comes up with more than just a loopback address? comes up with a "usb0" readings; and an IPv4 inet address for it? I could ping it, just for fun!

I also ignored johannkraus' steps about g_multi , since I think this is needed for his mass storage device, whereas, I need g_ether, for my device.

I kinda wish I knew what he meant by this :

"For a working ether over usb I just set up the usb0 interface via ifconfig as described elsewhere in this forum for static eth0."

Any ideas? Anybody? Suggestions?

I think I recall somebody posting (above, somewhere?) that the raspbian instructions to add to cmdline.txt  "modules-load=dwc2,g_ether" command doesn't work with picore? hmmm? I'll think about it? Try it?

I have some more steps to figure out this morning, and still have to follow the rest of the thread. Somebody else had trouble getting g_ether to work, but eventual with johannkraus' help--and some perseverence and elbow grease--they got it going.

« Last Edit: September 28, 2020, 10:22:27 AM by ladnar »

Offline ladnar

  • Newbie
  • *
  • Posts: 46
Re: USB gadget kernel module with RPi zero
« Reply #35 on: September 28, 2020, 12:39:25 PM »
Ugh! Failure.

sudo poweroff. Count to five so the electrons can all find their homes. Slide the card out. Put it in the laptop. Un-dtoverlay=dwc2 the config.txt file.

Now, I did try the:

 [RPI0]
dtoverlay=dwc2

version of that line; somebody else mentioned trying that . Maybe I will try it under the [ALL] heading instead? Or erase, or comment-out, the [RPI3] line?

I dunno? Otherwise, I have to dig through all the other modules, maybe try g_multi like johannkraus did? Or see what the other g_ether fella did to get it working?

I dunno? I guess I'll have to learn lsmod, modprobe, depmod, dmesg, and a hundred other things?
« Last Edit: September 28, 2020, 12:40:59 PM by ladnar »

Offline ladnar

  • Newbie
  • *
  • Posts: 46
Re: USB gadget kernel module with RPi zero
« Reply #36 on: September 28, 2020, 01:19:05 PM »
Tried commenting out [RPI3] AND commenting out line below it AND asserting the [RPI0] line AND asserting the proper line below it. No dice.

I think this is not the right direction (though I could try asserting [ALL] AND asserting the proper line below it ; deleting RPI0 line and commenting out RPI3 line).

No, I think I need some more fundamental understanding of what is going on here; how all the "moving parts" work together? RTFM? Yup.

Offline ladnar

  • Newbie
  • *
  • Posts: 46
Re: USB gadget kernel module with RPi zero
« Reply #37 on: September 28, 2020, 02:04:42 PM »
OK, gbaman says:

"g_ether - Using virtual ethernet, you should simply be able to ssh into the address of your Raspberry Pi. To do this, there is a little extra configuration required though. There is a few ways we could set up the point to point networking. The proper way would be to set up a DHCP server on one of the ends. A far simpler way though is just to give the Raspberry Pi a fixed IP address. To do this, you will need to run echo -e "interface usb0 \nstatic ip_address=169.254.64.64" | sudo tee -a /etc/dhcpcd.conf. You can then access the Raspberry Pi Zero by connecting to 169.254.64.64, or by using raspberrypi.local if your computer has Bonjour installed (Mac and most Linux OSs including Raspbian). Note this method does not support adding a fixed address to the cmdline.txt file. For that, you have to use the Ethernet only kernel below."

This, I should try next. Static IP address.

Right after I make certain I know what lsmod and modprobe and depmod does. And install modules.dep? I wonder where to put this file?

OK, I just this second, fixed one issue. My modules.dep file, had mostly HID and net entries; very few or none, for "gadget". So definitely need to update/replace/save a new modules.dep file. Step 1 identified. Step 1 accomplished!
« Last Edit: September 28, 2020, 02:06:27 PM by ladnar »

Offline ladnar

  • Newbie
  • *
  • Posts: 46
Re: USB gadget kernel module with RPi zero
« Reply #38 on: September 28, 2020, 03:11:43 PM »
OK, even worse (better, now I know!). My modules.dep file was insufficient, because I did things wrong. I think I should take the WHOL:E FOLDER for 4.9.22-piCore from the picore scr, unzip it, and replace the WHOLE FOLDER on the picore-slave card. Then modules.dep will point to all the extra modules I could possibly want. (g_ether, g_serial, g_multi, etc.)

Last night, I just grabbed the few that I thought I would want/need. Apparently, I need "the whole structure"? I suppose if I was good with modprobe and depmod, commands, I could figure out a frugal way, but I am fairly certain the extra MB will not be onerous?

OK, maybe I'm smart enough to be frugal, but forgetful about persistence? Forgot to make my modules.dep "update" permanent last time. So I have reinstalled the 1000-2000 lines of modules.dep (vs. 100-200 from standard install, picore modules.dep). Around line 189, g_ether is described as having four dependencies; rndis, udc-core, libcomposite, and u_ether (not exact names; but you get the picture; .ko, object files, I guess?).

So I can probably be frugal if I just am certain to include these four files?


This is the point of depmod, right? to update the modules.dep file?

The "WHOLE FOLDER" (updated, scr, /lib/modules/4.9.22-piCore/) is 50 MB, which, for a normal picore install of 50 to 100 MB, is significant; nearly doubling the size of the operating system? But if that is the only way that I can get it to work, that is what I will do.
« Last Edit: September 28, 2020, 03:17:18 PM by ladnar »

Offline ladnar

  • Newbie
  • *
  • Posts: 46
Re: USB gadget kernel module with RPi zero
« Reply #39 on: September 28, 2020, 03:54:55 PM »
Boy I hate software. My USB books always spoke of Host vs. Device, and sometimes, master vs. slave, but all this "gadget" stuff seems REALLY imprecise? Maybe its just my poor old biologist-brain?

So I have the master-picore booted up, and it LACKS the g_ether modules. Is this OK? I assume the point of updating the slave-picore to have g_ether modules incorporated into its core, is to teach the slave, or "USB-Device", how to not be master, AKA how to not be "USB-host"? So, the master, the USB-host, doesn't need this lesson. It should be able to go on doing its "Host" thing.

There was an error when I booted the two boards up (simultaneously; I throw one big power switch. But I could leave the slave board "USB-info-wire" unplugged until they both get booted up? And THEN, try to plug slave/device to master/host? I will try this next.). The error said something about usb timeout?

I will boot again, with info-wire unplugged. If error messages go away, Hooray! If ifconfig reads a usb0 entry, Hooray! If not, then I will try again to provoke the error message by booting with everything hooked together. Then maybe a dmesg to find out what the error means? or further "internet-sleuthing"?
« Last Edit: September 28, 2020, 03:56:35 PM by ladnar »

Offline ladnar

  • Newbie
  • *
  • Posts: 46
Re: USB gadget kernel module with RPi zero
« Reply #40 on: September 28, 2020, 04:08:05 PM »
So, if piCore can't do the "cmdline.txt", "modules-load=dwc2,g_ether", then, do I have to do something else in its place?

Or is that what I am doing, here, manually, with all the plugging and unplugging and file-shuttling and modprobing and stuff? I am the module loader here, and thus this "normal" step can be skipped?

Obviously not, since I am bad at loading/implementing kernel, modules? I could use some automation!

I hope I don't have to assemble or compile or link the object files? (.ko is an object file, right?) I mean, I read about it in a book once, but never had to perform where it counts?

I'll just fumble around with a few other things until I get desperate enough to try "old school", blob-making, machine code.

I can try using a Raspbian master-board-card with my purported-putative-picore-slave?

Or I can try using my picore (11) master with my two (functioning) Raspbian slaves?

That should suffice for today's work. There is a Star trek TOS marathon (AKA soap commercial delivery vehicle) on today, and I want my HDMI-TV back for "fun stuff".
« Last Edit: September 28, 2020, 04:11:24 PM by ladnar »

Offline ladnar

  • Newbie
  • *
  • Posts: 46
Re: USB gadget kernel module with RPi zero
« Reply #41 on: September 28, 2020, 04:29:03 PM »
OK, I dmesg-ed the picore master-board-card. I didnt grep it or cat it or search it or even pipe | less it.  The last ten or twentey messages indicate that some USB device is trying hard to reach the master.

This device is device 7-14. The errors in getting recognized involve "failed to enumerate device", and "port3 attempt power cycle", and "error -110", and "device not accepting address 7 (thru-14?, etc.)", and "device descriptor read/64".

I was ifconfig-ing it, And I was lsusb-ing it. Perhaps this was creating the errors.  was also plugging and unplugging the slave-board-info-wire from the master-board-10-hub-strip, i.e. info-wire. Both boards are powered from their dedicated USB power jack.

OK, like I said, enough troubleshooting for today. I should read more, or understand more before I try again.
« Last Edit: September 28, 2020, 04:31:03 PM by ladnar »

Offline ladnar

  • Newbie
  • *
  • Posts: 46
Re: USB gadget kernel module with RPi zero
« Reply #42 on: September 29, 2020, 05:39:05 AM »
This is an excerpt of a PM I sent; a plea for help. But I might break out of this zombie thread, and start a new post somewhere; with "half-success" of my bramble-pi, I have experience to share, despite the flounderings my ramblings show, in this post.

"I HAVE been able to get Raspbian to do what I want; one board/SDcard for master, and a different board for slave. Also, I have a USB voltmeter-ammeter to check that both boards draw an independent power supply through their power USB-receptacles; leaving the other USB-data-receptacle to pass master and slave instructions and responses. I was worried that USB gadget mode would force the slave to try to obtain power through the master's "USB-info"-receptacle; but it does not.

(Although I have read some internet "horror stories" of fried boards due to cheap USB hubs and/or "newbies", like me, plugging things in wrong, and some "back-voltage"/"back-flow" occurring. But I don't really know much about this and just cross my fingers that it doesn't happen to me.)

So, what's the problem, you say? I would like to boot 10 "peripheral boards" --slaves--from one micro-SD card; a piCore9.0.3 that has been outfitted with ethernet gadget mode. That way, I can boot each one in sequence, eject and remove the card,  then boot the next one; and in this way use the same card to get the whole array of r-pi zeros up and running. And for the one master-picore board, I could afford a spare, extra SD-card, and just leave that one in while it runs the show.

I have followed many/most of johannkraus' instructions, blindly, in some instances, but still can't get ifconfig to show the picore slave as eth0 or usb0?

I have added modules, but I "picked and chose"? Maybe I needed to add the WHOLE 50 MB of modules? I am using piCore 9.0.3 for the slave board, and I have downloaded the entire 50 MB and unzipped it on my laptop. I then dragged and dropped the files I wanted onto flashdrive, and brought flashdrive over to the booted picore 9.0.3. The modules i dl-ed were for Linux kernel 4.9.22. (I also have the unzipped modules file for picore 11; but have not used them; my picore 11 card is a master, for now).

The master-picore is the latest version. Picore 11.0. But that shouldn't matter.

I have run depmod -a. The modules (folders) that i have added to /lib/modules .../drivers/"et-cetra" , have been added to the opt/.filetool.lst list, and saved, and I have used the backup command. I have ensured that I have the dependencies for the g_ether function; there are four listed in the modules.dep file.

I actually manually transferred the modules.dep file from the 4.9.22-modules package to the picore. I'm pretty sure its added to .filetool.lst and used the backup command after that too.

I have altered the config.txt final line to read dtoverlay=dwc2. I have used # to comment out the line [RPI3] and the line below it.

I have not altered the cmdline.txt file in any way; in contrast to the Rapbian method of ethernet-gadgeting.

So, I get two kinds of behavior in my setup. I can use a picore master and raspbian slave; and a raspbian master and picore slave. Right now, both of these setups show, under dmesg, that the slave board is trying to reach the master (there are several types of error messages; I might detail them below, if I can't figure this out in less than a week). Failled to enumerate. Device is trying to power. error -110. failed with error -16. failed with error -22. etc etc etc.

Now with picore as master and raspbian slave, lsusb registers a USB device is there, but ifconfig does not show any eth0 or usb0.

****ASIDE: (Hmmmm... now that I think of it, this is CURIOUS behavior? A Raspbian slave works fine if the master board is Raspbian too? Which indicates that the piCore11, master-SD card, is the one that can't handle the ethernet-gadget devices? hmmmm? It can register them in lsusb, but not configure them and assignan IP? hmmmm?)***********

With raspbian as master and picore as slave, neither lsusb or ifconfig registers a USB device.

The dmesg USB errors are different for these two different setups. I suppose this will be my next clue.

And, just for completion's sake, I'll describe further, the final two possible setups; with raspbi-master and raspi-slave, the setup works and usb0 and usb1 show up under ifconfig, and are assigned IP addresses. And for picore-master and picore-slave, the thing I am trying to achieve, nothing under ifconfig. (I haven't checked the dmesg ? maybe it will show evidence of the slave trying to get recognized on the bus, and getting errors/failure notices?).

The dmesg messages are definitely related to my plugging and unplugging the slave board to the USB-10-receptacle strip that I have connected to the USB-info-receptacle of the master board. The master board is in charge of this 10-receptacle-strip and dmesg notices when things are plugged and unplugged.

OK, well I hope this enough to adequately help you to troubleshoot with me. It would be VERY helpful. In the meantime, I will do some more research on the particular errors encountered in dmesg. I will write them out longhand and type them up and maybe post my tragedies on the forum post, in the hopes somebody will take pity on me.

A last ditch desperation would be to wipe the picore 9.0.3; start over with picore 11; load ALL the modules, 50 MB worth (Whoah! 800 MB for picore11/Linux-4.19.81 !) ; repeat the steps johannkraus listed about depmod, and persistency. and try again? But I don't really want to start over. I feel like I am close to success."

Offline ladnar

  • Newbie
  • *
  • Posts: 46
Re: USB gadget kernel module with RPi zero
« Reply #43 on: October 01, 2020, 01:21:44 PM »
OK, I  think I have my head screwed on straight here. I put ALL of the drivers from the 4.9.22 modules zip file onto the piCore-9.0.3, soon-to-be-gadgetized micro-SD card.

I checked modules,dep ( in vi editor ), and it has 1559 entries; this is the same as if I opened up that file (taken straight from the 4.9.22 modules zipped file) on my laptop; 1559 lines.

The original modules.dep that comes with the 9.0.3 image is only like 180 lines.

There are 1900+ items in the 4.9.22 modules zip (or tar or xyz or whatever it was) file. Because I was using command line interface (I haven't figured out desktop TCZ stuff yet) I am not certain I left the original modules and structures in tact? I might have just overwritten the old modules with all the 1900+ QTY new modules? Do these 1900+ new modules need a special "implementation" command?

Anybody sensing any problems yet? I would like to think I am done with modprobe and depmod and dependency-searching and LKM-and-.ko "kernel stuff"?

johannkraus mentions
Quote
after adding dwc2 overlay to config.txt and modprobe dwc2 in Raspbian there is another tty in dev -> ttyGS0.
and I stumbled across this link https://linux.die.net/sag/hwutils.html . I haven't digested / cogitated it yet?

I dunno. Lunchtime. Miore later, If I get motivated.
« Last Edit: October 01, 2020, 01:29:43 PM by ladnar »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10432
Re: USB gadget kernel module with RPi zero
« Reply #44 on: October 01, 2020, 01:44:36 PM »
Hi ladnar
There are kernel module extensions available. This is a list of extensions available for piCore 9:
http://tinycorelinux.net/9.x/armv6/tcz/info.lst
You can open the file in a web browser and search for  4.9.22  for the names of the kernel module extensions.

Or you can run these commands to see the names of the 18 extensions:
Code: [Select]
tc@E310:~/zzz$ wget http://tinycorelinux.net/9.x/armv6/tcz/info.lst
--2020-10-01 16:36:03--  http://tinycorelinux.net/9.x/armv6/tcz/info.lst
Resolving tinycorelinux.net... 89.22.99.37
Connecting to tinycorelinux.net|89.22.99.37|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 21994 (21K) [text/plain]
Saving to: 'info.lst'

info.lst                                               100%[==========================================================================================================================>]  21.48K  --.-KB/s    in 0.09s   

2020-10-01 16:36:03 (246 KB/s) - 'info.lst' saved [21994/21994]

tc@E310:~/zzz$ grep 4.9.22 info.lst
alsa-modules-4.9.22-piCore.tcz
ax25-4.9.22-piCore.tcz
bluetooth-4.9.22-piCore.tcz
filesystems-4.9.22-piCore.tcz
graphics-4.9.22-piCore.tcz
ipv6-4.9.22-piCore.tcz
net-bridging-4.9.22-piCore.tcz
netfilter-4.9.22-piCore.tcz
net-sched-4.9.22-piCore.tcz
net-usb-4.9.22-piCore.tcz
ppp-modules-4.9.22-piCore.tcz
raid-dm-4.9.22-piCore.tcz
rtc-4.9.22-piCore.tcz
usbip-4.9.22-piCore.tcz
usb-serial-4.9.22-piCore.tcz
v4l-dvb-4.9.22-piCore.tcz
w1-4.9.22-piCore.tcz
wireless-4.9.22-piCore.tcz
tc@E310:~/zzz$

You might want to check if any of them contain the modules you need.