Have started C, but as with most other things in life, have been separated from the book that would teach it. I think I still have the pdf somewhere? Thanks Rich. (I already know a fair amount about the process; headers, pre-compile, compile, assembly, object files, linkers, binary blobs, etc. Studied a bit of Barry Brey's textbook on x86, MASM and TASM, circa 2001; and Rodnay Zaks 6502 early 1980s book; and Ritchie and Kernighans "C" classic textbook. tarted to read Two Tennenbaum books, one on distributed systems, the other one was the one Torvalds read before he wrote Linux. Also had nice book on Binary dissasembly; I forget the author? A recent book from stach press, out of Frisco? But you're right. I can't know everything, at least not ALL AT ONCE. So "C" might have to wait You be happy to see, below, that I have maybe figured out my problem --besides my exuberance outstripping my talent. I think the latter caught up to the former, finally.)
First things first. I looked at my old posts (under "doctor anonymous" handle ) and realized, I already half-solved this problem, about 9 months ago! But I was moving apartments then, too, and so I had lost track of my progress. The good doctor was working with usbboot, and got it half-functional.
Now, I think I have figured out this modprobe stuff, and I think I know why it was working with Raspbian and not with piCore. Its the persistence thing. I guess "persistence" is not the thing I need, per se. (A GOOD shell script FIRST, then persistence of that script.).
I tried putting the following thing into onboot.lst ; It will go there, but its useless ! "sudo modprobe g_ether". But the simple shell scripts I made, also placed in my onboot.lst , for "Meyer's Strong AI Standard Directories" (MSSAID), execute fine. So, something like that is needed here. I think I can probably solve user/member bot's problem too, with "serial" mode. (for the moment, please ignore the impertinence of a biologist walking in and telling the experts that LSB/FHS has to be changed (to include MMSAID). I know LSB has a history, but its also come a long way, and has much further to go!)
I don't have time today to look into serial, but will write g_ether script and post it here (if my idea works). Also, depmod -a stymied me a few time, because the chmod permissions for modules.dep are 755 ; I was going to chmod it to 777, and then back again, but then I remembered just to sudo it.
That link (
https://linux.die.net/lkmpg/x44.html ) helped alot to explain modules, and another page I stumbled on with some good example on how to actually use, lsmod, modprobe, depmod, and modules.dep . It wasn't rocket science, and I think a clutter and junk in my brain just reached critical mass.
It was also important to hear about the difference between insmod and modprobe, and the function of the depmode and modules.dep in making modprobe much easier and convenient than insmod.
Anyhoo, I should go write the script. It will basically just load all the modules that I have been typing in one at a time. I'll put the script in the onboot.lst and it will execute on startup (instead of the modules erasing / reverting, when I shut the power off). That's what was happening. I got all the modprobe stuff done, but then would shut it off to switch the wires around and hook it up to the master board. For whatever reason, I figured its better to turn master and slave b oard on simultaneously, so they both "negotiate the bus" at the same time. Maybe not necessary, but I considered it prudent (funny things can happen with USB and power and hubs and etc? Funny, buggy things!). But in this case, shutting off power was undoing the modules.
Also, anyone stumbling on this post who doesn't want to read the previous one hundred (20 or so) should note that I have placed five modules in the appropriate /lib/modules/4.9.22-piCore/ .../ folders, and placed the path of those folders in the /opt/.filetool,lst , and then typed the backup command. This seems to have worked for these five files.
g_ether.ko ; usb_f_rndis.ko ; u_ether.ko ; udc-core.ko and libcomposite.ko
The script will just be this, I think:
#!/bin/sh
sudo modprobe g_ether
exit
I wonder if this could be put in cmdline.txt, because raspbian has that line about "load-modules,g_ether" or whatever? Maybe that command actually works? Maybe all this time, that is all I had to do? I will try it my way first, and if that doesn't work, I will try the raspbain cmdline.txt edit.