Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > PocketBook > PocketBook Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 06-28-2021, 04:47 AM   #1
Entwickler
Junior Member
Entwickler began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jun 2021
Device: Pocketbook Inkpad 3 Pro
Compile kernel module for Pocketbook 740

I am trying to compile a kernel module for my Pocketbook 740 (Inkpad 3 Pro).
The device announces following kernel

Code:
Linux version 3.10.65+ (jenkins@bsp-builder) (gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09) ) #2 SMP
I have tried two kernel sources:
I compiled them with
  • gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf
  • gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux

using following commands:
Code:
#!/bin/sh
export KCFLAGS="-mcpu=cortex-a8 -march=armv7-a -mfpu=neon -mfloat-abi=softfp"
CROSS_PREFIX=/workspace/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-
NCPUS=8
make ARCH=arm CROSS_COMPILE="${CROSS_PREFIX}" -j ${NCPUS} $1
Right now I am trying to insert the block device module loop.ko just to see if my build works. I seem to always get
Code:
$ insmod /mnt/ext1/loop.ko
insmod: can't insert '/mnt/ext1/loop.ko': invalid module format
When I consult file my module and the modules on the device look the same:
Code:
drivers/block/loop.ko: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), BuildID[sha1]=487b84d6a004392e0fe384329cb7ea2ffb87d38c, not stripped

epdc.ko: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), BuildID[sha1]=8c110ead8aa1506eee362cee022ba27f81394d0e, not stripped
Any help greatly appreciated.
Entwickler is offline   Reply With Quote
Old 06-30-2021, 06:37 AM   #2
wold
Zealot
wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.
 
Posts: 119
Karma: 87007
Join Date: Apr 2021
Device: Lux 5, Libra 2, PRS-T2N
Out of curiosity, where/how do you run insmod? Rooted SSH, or using chroot?
wold is offline   Reply With Quote
Advert
Old 06-30-2021, 07:00 AM   #3
Entwickler
Junior Member
Entwickler began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jun 2021
Device: Pocketbook Inkpad 3 Pro
Quote:
Originally Posted by wold View Post
Out of curiosity, where/how do you run insmod? Rooted SSH, or using chroot?
Yes, rooted the device and sshed to root.
Entwickler is offline   Reply With Quote
Old 06-30-2021, 07:16 AM   #4
rantanplan
Guru
rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.rantanplan ought to be getting tired of karma fortunes by now.
 
Posts: 605
Karma: 8589150
Join Date: Nov 2019
Location: Wuppertal, Germany
Device: Paperwhite (2021), Boox Note Air 2+, Kobo Clara 2E, Tolino Vision 6
Out of curiosity: Newer kerrnels won't work on the device?
rantanplan is offline   Reply With Quote
Old 06-30-2021, 08:13 AM   #5
Entwickler
Junior Member
Entwickler began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jun 2021
Device: Pocketbook Inkpad 3 Pro
Quote:
Originally Posted by rantanplan View Post
Out of curiosity: Newer kerrnels won't work on the device?
As far as I know you can not simply replace the kernel. The module for the eInk panel is closed source. So no point in trying that.
Entwickler is offline   Reply With Quote
Advert
Old 06-30-2021, 01:42 PM   #6
wold
Zealot
wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.
 
Posts: 119
Karma: 87007
Join Date: Apr 2021
Device: Lux 5, Libra 2, PRS-T2N
Can dmsg provide more info?

Would this help? (if CROSS_COMPILE does not equal -C)
https://unix.stackexchange.com/quest...e-format-error
wold is offline   Reply With Quote
Old 06-30-2021, 04:43 PM   #7
Entwickler
Junior Member
Entwickler began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jun 2021
Device: Pocketbook Inkpad 3 Pro
Quote:
Originally Posted by wold View Post
Can dmsg provide more info?

Would this help? (if CROSS_COMPILE does not equal -C)
https://unix.stackexchange.com/quest...e-format-error
Unfortunately dmsg is empty. I guess this is because of old and stripped down version of insmod? Will have a look at your link, thx.
Entwickler is offline   Reply With Quote
Old 07-01-2021, 01:14 PM   #8
wold
Zealot
wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.wold knows better than to ask about the Gravitic Imploder Lance.
 
Posts: 119
Karma: 87007
Join Date: Apr 2021
Device: Lux 5, Libra 2, PRS-T2N
Quote:
Originally Posted by Entwickler View Post
Unfortunately dmsg is empty. I guess this is because of old and stripped down version of insmod?
Possibly. Or --level requires adjustment (consult dmesg --help + man pages). Or the buffer was cleared.

Else try:
echo Some message > /dev/kmsg
and check with dmesg. Assuming kmsg is available.

Last edited by wold; 07-01-2021 at 01:18 PM.
wold is offline   Reply With Quote
Old 07-04-2021, 04:21 PM   #9
Entwickler
Junior Member
Entwickler began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jun 2021
Device: Pocketbook Inkpad 3 Pro
Quote:
Originally Posted by wold View Post
Possibly. Or --level requires adjustment (consult dmesg --help + man pages). Or the buffer was cleared.

Else try:
echo Some message > /dev/kmsg
and check with dmesg. Assuming kmsg is available.
I did everything from scratch and followed your advice and got some error output after all. Now the module is working. thx a million
Entwickler is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compile a working kernel NiMa Kobo Developer's Corner 8 02-02-2021 12:17 PM
Aura H2O Compile and run own kernel sahbi Kobo Developer's Corner 3 04-08-2017 07:41 AM
Compile lab126 kernel pepijndevos Kindle Developer's Corner 24 10-24-2012 04:33 PM
usbvision.ko kernel module for PE ConteMascetti enTourage eDGe 6 12-01-2011 04:40 PM
iLiad Kernel module compilation howto? drazvan iRex Developer's Corner 2 04-23-2007 07:43 PM


All times are GMT -4. The time now is 03:12 AM.


MobileRead.com is a privately owned, operated and funded community.