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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-15-2019, 08:09 PM   #16
pazos
cosiñeiro
pazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watchpazos is clearly one to watch
 
Posts: 134
Karma: 10736
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by BloodRagg View Post
Are there any other features missing that one would find in a common default kernel ?

A lot. Desktop kernels ship every driver as a module to support multiple targets. Embedded devices rely on a kernel without initramfs, so everything needed to boot the computer is inside the kernel. These kind of devices have a few kernel modules available to be loaded on demand (ie: kobos have a kernel with mmc and ext support because they run from an ext partition from mmc, butwifi/usb support is built as modules)


Quote:
Originally Posted by BloodRagg View Post

Summary missing features:
  • netfilter - needed for firewall
  • device mapper/crypt support - needed for encryption
  • usb-otg
  • multi-touch
  • kexec - needed to boot other kernels
Most of them are easily fixable within a rebuild, including:

nfs server
cifs client/server
drivers for everything usb

Multitouch would require fiddling with the driver

The lack of USB-OTG is a hardware limitation and cannot be fixed. You need to choose between using usb host (in that case you'll need to supply external power) or usb gadget.
pazos is offline   Reply With Quote
Old 05-15-2019, 08:52 PM   #17
desterly
Member
desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.
 
Posts: 12
Karma: 58342
Join Date: Dec 2016
Device: KV,Kobo Forma
Quote:
Originally Posted by NiLuJe View Post
Yep, i.MX6SLL devices are running on 4.1.15

A Forma on FW 4.14:
Code:
Linux (none) 4.1.15-00280-g3c80cbc #75 SMP PREEMPT Thu Feb 14 09:20:03 CST 2019 armv7l GNU/Linux
This is also the same kernel release used by Amazon on their own i.MX6SLL/i.MX7D devices (PW4, KT3; KOA2). Which probably tells me they're both based on NXP's.
Bonus points if you can suss out where NXP's hiding those sources. A (very) quick search led me to old FreeScale branches, but nothing new...
Think i figured it out.... need to setup a dev environment to test with but sheesh.. this is a mess..

It appears that NXP is really utilizing a combination of FreeScale and the Yocto Project to build these. It's basically a stock Linux kernel (4.1.15 for forma) with the Yocto project patches applied to it. That gets you the baseline source.. then obviously it's any changes that are made on top of that for a specific device.

The closest that I can find from a pure kernel branch though is Code Aurora (203 file changed)

Most of the patches actually seem to be cherry picks from later versions of linux.

NXP actually has a decent setup guide for it once you dig through all the dev documents.

you can also reference this:
Code:
https://www.yoctoproject.org/docs/2.5.1/dev-manual/dev-manual.html#setting-up-the-development-host-to-use-the-yocto-project
or more specifically:
Code:
repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-4.1-krogoth
that's the actual branch being used for the forma (from what i can tell)

Weee!

Last edited by desterly; 05-15-2019 at 08:54 PM.
desterly is offline   Reply With Quote
Old 05-16-2019, 01:57 AM   #18
BloodRagg
Zealot
BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.
 
BloodRagg's Avatar
 
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
Quote:
Originally Posted by davidfor View Post
For my curiosity, why? Does the device not do what it is supposed to do? Are the things you are talking about actually going to make the device better at what it is designed to do? What it is sold to do?
I am only positive about Kobo, they deserve a lot of respect for using Linux as a base. However is see a lot of room for improvement. There is no firewall and the kernel is outdated on most devices, and they are not patching it afaict. The packages are updated in every new FW release which is good.

Its an e-reader designed for displaying books which it does. Can it be better? I think KOReader has proven that it can be.

Does a patched kernel make it a better device ? I think it does when it supports multitouch and has a simple firewall. Encryption will make it slower, and is only feasible for the book partition.

To sum it all up, yeah


Quote:
Originally Posted by pazos View Post
A lot...
Thanks, that was helpful

Quote:
Originally Posted by desterly View Post
Think i figured it out.... need to setup a dev environment to test with but sheesh.. this is a mess.......
Thanks, that was even more helpful

Just out of curiosity, how much work would it be to port the latest kernel ?
Would the effort be worth it ?

Last edited by BloodRagg; 05-16-2019 at 01:59 AM.
BloodRagg is offline   Reply With Quote
Old 05-16-2019, 08:41 AM   #19
desterly
Member
desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.
 
Posts: 12
Karma: 58342
Join Date: Dec 2016
Device: KV,Kobo Forma
Quote:
Originally Posted by BloodRagg View Post
Just out of curiosity, how much work would it be to port the latest kernel ?
Would the effort be worth it ?
Guess it depends on what you are thinking of as "port".

To Bring it up to latest 4.1 wouldn't be too hard. More or less merge in the patches + cleanup.

To rebase it to CAF would be a little tricker but still doable.

To Bring it up to latest 4.x kernel, probably not real easy.

The first one obviously adds security and potentially fixes some memory leaks but probably not much benefit outside of that.

The second one would bring it inline with CAF although I'm not sure if there'd be a lot of benefit to it outside of potential optimizations.

The biggest risk that I see is unless I'm mistaken, there is no recovery partition on these nor is there any fastboot/flash mode in the low level bootloader which means you make one minor mistake and you are looking at JTAG to get back to a working device.
desterly is offline   Reply With Quote
Old 05-16-2019, 10:10 AM   #20
BloodRagg
Zealot
BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.
 
BloodRagg's Avatar
 
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
Quote:
Originally Posted by desterly View Post
Guess it depends on what you are thinking of as "port".

To Bring it up to latest 4.1 wouldn't be too hard. More or less merge in the patches + cleanup.

To rebase it to CAF would be a little tricker but still doable.

To Bring it up to latest 4.x kernel, probably not real easy.

The first one obviously adds security and potentially fixes some memory leaks but probably not much benefit outside of that.

The second one would bring it inline with CAF although I'm not sure if there'd be a lot of benefit to it outside of potential optimizations.

The biggest risk that I see is unless I'm mistaken, there is no recovery partition on these nor is there any fastboot/flash mode in the low level bootloader which means you make one minor mistake and you are looking at JTAG to get back to a working device.
That sounds quite positive

No recovery is bad, which i find to be weird to be honest, but i have not looked at the image yet. Ill ask davidfor he's the image wizard

The best thing imho is to hook into u-boot and enable pxe-boot.

Last edited by BloodRagg; 05-16-2019 at 10:13 AM.
BloodRagg is offline   Reply With Quote
Old 05-16-2019, 10:22 AM   #21
desterly
Member
desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.
 
Posts: 12
Karma: 58342
Join Date: Dec 2016
Device: KV,Kobo Forma
Quote:
Originally Posted by BloodRagg View Post
No recovery is bad, which i find to be weird to be honest, but i have not looked at the image yet. Ill ask davidfor he's the image wizard

The best thing imho is to hook into u-boot and enable pxe-boot.
Yeah I didn't really look into the code for the bootloader... I do know the kernel readme on the Kobo-Reader github has this note:

Code:
Do not install a new kernel unless you are prepared to open your Kobo up and
make a backup disk image of the internal MicroSD card first. If your new kernel
fails for any reason, you will not be able to boot your Kobo even into recovery
mode. If you mess up the install by writing to the wrong offset or too big an
image, just reinstalling the old kernel using a manual `dd' won't work; you'll
need to restore the whole 2GB firmware image.
Edit: Looking through the bootloader code, fastboot support is there however the only way to enter it is from the U-Boot console.... which would require a console connection..

There's a few projects/utilities that seem to indicate the devices "should" be able to enter u-boot commands while up but not sure if the Kobo's have that functionality enabled on the chip.. <shrug>

Last edited by desterly; 05-16-2019 at 04:19 PM.
desterly is offline   Reply With Quote
Old 05-16-2019, 03:59 PM   #22
Frenzie
Guru
Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.
 
Posts: 651
Karma: 115152
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
Originally Posted by lumpynose View Post
I wonder which companies that sell devices based on Linux regularly update their kernels. Android runs on Linux; anyone know if Google updates the kernel? In the business world the old mantra "If it ain't broke, don't fix it" usually applies.
Android devices are by and large stuck with whatever kernel they came with due to binary-only drivers.
Frenzie is offline   Reply With Quote
Old 05-17-2019, 06:09 AM   #23
BloodRagg
Zealot
BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.
 
BloodRagg's Avatar
 
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
Quote:
Originally Posted by desterly View Post
Yeah I didn't really look into the code for the bootloader... I do know the kernel readme on the Kobo-Reader github has this note:

Code:
Do not install a new kernel unless you are prepared to open your Kobo up and
make a backup disk image of the internal MicroSD card first. If your new kernel
fails for any reason, you will not be able to boot your Kobo even into recovery
mode. If you mess up the install by writing to the wrong offset or too big an
image, just reinstalling the old kernel using a manual `dd' won't work; you'll
need to restore the whole 2GB firmware image.
I don't think your Kobo has an sd card inside, its onboard flash memory.
So in your case if the bootimage is broken, your f#cked.

Its easier to just to dd the bootimage, and restore from that, however you need
access to the onboard flash memory which is a tricky situation

Quote:
Originally Posted by desterly View Post
Edit: Looking through the bootloader code, fastboot support is there however the only way to enter it is from the U-Boot console.... which would require a console connection..


There's a few projects/utilities that seem to indicate the devices "should" be able to enter u-boot commands while up but not sure if the Kobo's have that functionality enabled on the chip.. <shrug>
That would seem highly unlikely, but they have to program the chips somehow. My guess it can be done by connecting it by hand according to the datasheet. (soldering involved)

If you want to take a closer look, either enable telnet and manually dump your flash.
Or use this tool I made a while ago: https://www.mobileread.com/forums/sh...43#post3812643

It will dump the Image onto your KOBOeReader/Books partition.
Its about 500/600 mb.

EDIT: Seems davidfor doesn't have the image yet, as he put it, restoring would be a problem.
If you do make a backup, consider uploading it to our Grand Sorcerer/Archivist.

Last edited by BloodRagg; 05-18-2019 at 12:31 PM.
BloodRagg is offline   Reply With Quote
Old 05-17-2019, 08:56 AM   #24
desterly
Member
desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.desterly beat Jules Verne's record by 5 days.
 
Posts: 12
Karma: 58342
Join Date: Dec 2016
Device: KV,Kobo Forma
Quote:
Originally Posted by BloodRagg View Post
I don't think your Kobo has an sd card inside, its onboard flash memory.
So in your case if the bootimage is broken, your f#cked.

Its easier to just to dd the bootimage, and restore from that, however you need
access to the onboard flash memory which is a tricky situation
Correct.. My guess is their reference to "SD Card" (for older devices and newbs) translates to "eMMC" for the rest of us.
Quote:

That would seem highly unlikely, but they have to program the chips somehow. My guess it can be done by connecting it by hand according to the datasheet. (soldering involved)

If you want to take a closer look, either enable telnet and manually dump your flash.
Or use this tool I made a while ago: https://www.mobileread.com/forums/sh...43#post3812643

It will dump the Image onto your KOBOeReader/Books partition.
Its about 500/600 mb.
They could do it a few ways that I see...
* Pre-flash the eMMC from serial a default image (unless there's something device specific that is in there)
* Default U-boot enters fastboot/flash mode and then during the update process they update it w/ the version that doesn't
* Magic
desterly is offline   Reply With Quote
Old 05-25-2019, 08:17 AM   #25
BloodRagg
Zealot
BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.
 
BloodRagg's Avatar
 
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
Any progress on your side ?, I've been a little busy lately.
BloodRagg is offline   Reply With Quote
Old 05-26-2019, 04:35 AM   #26
heyman
Connoisseur
heyman can extract oil from cheeseheyman can extract oil from cheeseheyman can extract oil from cheeseheyman can extract oil from cheeseheyman can extract oil from cheeseheyman can extract oil from cheeseheyman can extract oil from cheeseheyman can extract oil from cheese
 
Posts: 63
Karma: 1000
Join Date: Apr 2019
Device: sony
Quote:
Originally Posted by desterly View Post
Guess it depends on what you are thinking of as "port".

To Bring it up to latest 4.1 wouldn't be too hard. More or less merge in the patches + cleanup.

To rebase it to CAF would be a little tricker but still doable.

To Bring it up to latest 4.x kernel, probably not real easy.

The first one obviously adds security and potentially fixes some memory leaks but probably not much benefit outside of that.

The second one would bring it inline with CAF although I'm not sure if there'd be a lot of benefit to it outside of potential optimizations.

The biggest risk that I see is unless I'm mistaken, there is no recovery partition on these nor is there any fastboot/flash mode in the low level bootloader which means you make one minor mistake and you are looking at JTAG to get back to a working device.
how about 5.1?
heyman is offline   Reply With Quote
Old 05-26-2019, 04:42 AM   #27
heyman
Connoisseur
heyman can extract oil from cheeseheyman can extract oil from cheeseheyman can extract oil from cheeseheyman can extract oil from cheeseheyman can extract oil from cheeseheyman can extract oil from cheeseheyman can extract oil from cheeseheyman can extract oil from cheese
 
Posts: 63
Karma: 1000
Join Date: Apr 2019
Device: sony
btw, here's the super deep analyze about kobo with kernel 4.1.15, super super long


https://libreplanet.org/wiki/Group:H...4.1.15_sources
heyman is offline   Reply With Quote
Old 05-26-2019, 05:04 AM   #28
BloodRagg
Zealot
BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.
 
BloodRagg's Avatar
 
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
Quote:
Originally Posted by heyman View Post
btw, here's the super deep analyze about kobo with kernel 4.1.15, super super long


https://libreplanet.org/wiki/Group:H...4.1.15_sources
This is a really nice find my friend

I wish I would have found it, that would have saved me a lot of work.

EDIT: Might as well release what I have now (click me)

Last edited by BloodRagg; 05-26-2019 at 06:14 AM.
BloodRagg is offline   Reply With Quote
Old 05-26-2019, 08:52 AM   #29
heyman
Connoisseur
heyman can extract oil from cheeseheyman can extract oil from cheeseheyman can extract oil from cheeseheyman can extract oil from cheeseheyman can extract oil from cheeseheyman can extract oil from cheeseheyman can extract oil from cheeseheyman can extract oil from cheese
 
Posts: 63
Karma: 1000
Join Date: Apr 2019
Device: sony
Quote:
Originally Posted by lumpynose View Post
I wonder which companies that sell devices based on Linux regularly update their kernels. Android runs on Linux; anyone know if Google updates the kernel? In the business world the old mantra "If it ain't broke, don't fix it" usually applies.
I did a double check, some cells running Android updates kernels A LOT

some Android Oreo already running 4.9, depends on the cells company if they want to update or not
heyman is offline   Reply With Quote
Old 05-27-2019, 06:02 AM   #30
BloodRagg
Zealot
BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.
 
BloodRagg's Avatar
 
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
These are only security patches, new kernel usually comes with a new release of android.
But afaik it was stuck on kernel 3 like forever. Security patches are my only concern for frequent updating.
BloodRagg 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
Content The Collection features are disabled to not registered Kindle!!! Goodspeed Amazon Kindle 17 09-27-2013 11:41 AM
Missing the luigi kernel installer? twobob Kindle Developer's Corner 21 09-10-2012 03:54 PM
Missing files from kernel tree FDD Onyx Boox 0 06-03-2012 02:05 PM
Kobo Missing Features? mfpreach Kobo Reader 7 05-01-2010 10:37 AM


All times are GMT -4. The time now is 06:14 AM.


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