01-02-2020, 07:02 AM | #1 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jul 2018
Device: kobo glo-hd
|
About compiling the kernel (actually `g_ether' for now)
Hey guys!
I plan on spending some time tinkering with a spare N905 I have, and would like to be able to telnet or ssh to it through USB. I have upgraded it to the newest firmware available, have gained telnet access, have installed the toolchain (linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf), and have used it to compile and run FBink, so it should work as expected. Because of the module versions problem, I'm gonna need to compile the `g_ether' module, so I headed to kobolabs' hw github repository for the imx508, and I see two folders: `cls' and `nxt'. On both I can see a kernel matching what my `uname' currently reports: `Linux (none) 2.6.35.3-568-g4cf53cf-gb548272-dirty' but what folder is the one I should choose, and what's the meaning for both folders? Whichever it is, I guess it will be a fully working kernel for the device? Not that I plan compiling the whole kernel yet, but would like to know that diff'ing it with a vanilla 2.6.35.3 would result in having the patches Freescale/nxp/kobo made for it to work. This is the output my `/proc/cpuinfo' if it's of any help, as I know there are a couple of versions of N905 ot there: Code:
Processor : ARMv7 Processor rev 5 (v7l) BogoMIPS : 159.90 Features : swp half thumb fastmult vfp edsp neon vfpv3 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x2 CPU part : 0xc08 CPU revision : 5 Hardware : Freescale MX50 ARM2 Board Revision : 50011 Serial : 0000000000000000 Regards, |
01-02-2020, 11:59 AM | #2 |
BLAM!
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
IIRC, one kernel (the earliest) is for the A/B, and the other is for the C.
If they're built the same way as newer devices (i.e., with CONFIG_MODVERSIONS), you'll have to build the full kernel anyway. c.f., http://trac.ak-team.com/trac/browser...mpile.sh#L3991 for my latest notes. If things implode at runtime, double-check (i.e., readelf) which TC is actually used to build your production kernel, as it happens to be completely different than the one used to build Nickel on my two devices ^^. |
Advert | |
|
01-02-2020, 05:58 PM | #3 |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Doesn't a hack already exist to support USB networking? My memory says it is part of KSM, or maybe that it can be added to KSM.
|
01-02-2020, 06:38 PM | #4 |
BLAM!
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
The required modules are certainly there on newer devices, yeah .
I would assume the Touch does too. The one I'm not sure about is the original Freescale wifi. Last edited by NiLuJe; 01-02-2020 at 06:42 PM. |
01-02-2020, 07:13 PM | #5 |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Just checked the 4.19.14123 update package. There is a "g_ether.ko" in "drivers/ntx508/usb/gadget". But not in "drivers/freescale/usb/gadget". Not sure if that means the N905B has it, but the N905 doesn't. Other than the internal storage, I never remember what the differences in these two are.
|
Advert | |
|
01-03-2020, 12:33 PM | #6 | |
Junior Member
Posts: 8
Karma: 10
Join Date: Jul 2018
Device: kobo glo-hd
|
Quote:
Quite helpful. I managed to compile the kernel and g_ether, and even nano and strace, just for fun. Can I ask you what the most comfortable/less cumbersome method would it be to deploy this kernel I have compiled in a non-destructive way? I'd like to try making an image I could use. My touch is the one with internal emmc and an (externally accessible) SD card slot. Answering davidfor's last message (I don't know how to quote a future message), that's exactly the problem I faced. The g_ether module seems to be there for another kernel, the only usable for me was the `arcotg_udc.ko' under the `/drivers/freescale' directory, but without the `g_ether' module it was pretty much useless. Thanks all! |
|
01-03-2020, 02:12 PM | #7 |
BLAM!
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
I think I link to Marek's GitHub page in my notes above, that's probably the best source of info about that, as I don't think anyone else ever actually deployed a custom kernel . I certainly haven't ^^.
|
01-04-2020, 03:48 PM | #8 | |
Junior Member
Posts: 8
Karma: 10
Join Date: Jul 2018
Device: kobo glo-hd
|
Quote:
If somebody seein this happens to know the on-board pinouts of this kobo, please let me know. Very little information on this particular model out there that I've seen so far. All I can see within the board is 7 pins in a row, with (non-populated) resistor terminations. Will check if it's jtag or usart ports or something. Thanks! |
|
01-04-2020, 04:22 PM | #9 | |
cosiñeiro
Posts: 1,271
Karma: 2200049
Join Date: Apr 2014
Device: BQ Cervantes 4
|
Quote:
You can boot using a rootfs on a external sdcard but the kernel should be loaded at that point of time. That's it: we use a key combo to override the arguments passed to the kernel but we don't modify that kernel. It should be possible to modify uboot to load a kernel stored on a ext2 partition (or in raw disk) but isn't recommended on your case, for the following reasons: - uboot has a watchdog that resets the board each few seconds. - uboot has the environment hardcoded and does a CRC32 check of that environment on boot. - messing with uboot (or replacing the kernel) in a device with soldered EMMC is a bad idea because there's no way to recover that. If you have other device with a user-replaceable sdcard then you can go straight and copy the kernel at the same offset. But, in your case, is too dangerous. You can check if stock kernel has kexec support. In that case you can use the trick to boot from external sdcard and use kexec there to load your new kernel. I hope the message is clear. Have fun with your lurking. |
|
01-07-2020, 02:10 PM | #10 | |
Junior Member
Posts: 8
Karma: 10
Join Date: Jul 2018
Device: kobo glo-hd
|
Quote:
I'll nonetheless, take the touch apart enough to be able to discern how many layers the board has, if it has the typical occluding embedded ground plane (If more than two layers), and whether I can access jtag, usart, or if these have already been brougth out on these seven pins the board has. Thanks a lot! |
|
Tags |
g_ether, kernel, module, n905, sources |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compiling the Linux Kernel for the Kindle | yifanlu | Kindle Developer's Corner | 82 | 12-12-2016 09:35 PM |
Compiling 0.9.5 with Qt 5.6.0 | CJMiller | Sigil | 20 | 03-27-2016 03:21 PM |
PRS-T1 How-to: Compiling the kernel and kernel modules | altruizine | Sony Reader Dev Corner | 9 | 09-03-2012 09:12 PM |
Compiling for Lubuntu (regarding compiling instructions) | jgratero | Sigil | 5 | 07-15-2012 07:54 PM |
modprobe g_ether problem | cachou | Kindle Developer's Corner | 4 | 03-14-2010 11:49 PM |