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 01-31-2013, 08:34 AM   #46
giorgio130
Time Waster
giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.
 
Posts: 415
Karma: 289158
Join Date: May 2011
Device: Kobo Glo and Aura HD
Quote:
Originally Posted by ah- View Post
Ok, with devcap-daemon working the framework seems to start.

The screen stays black, and strace says it waits for a futex, so I guess it requires some other service to start up properly. But I'll investigate that later.

Edit:
After a bit more poking around and especially executing /etc/upstart/firstboot and prereg.conf manually as well as unpacking more cramfs.img from /etc/loopbacktab and setting the framebuffer to 8bit thanks to your framebuffer_configure it now really starts , still with tons of errors but I get a white window and touching the screen results in messages in the log. I see exceptions about missing images, but I haven't found out yet which images are missing and why.

Starting the onscreen keyboard (/usr/bin/kb) leads to the same error and is a lot less complex, so probably investigating that is easier.

Edit 2:
So it seems that this is just what you hinted at in the first posts, the screen update is different. I'm still looking at it, but I suspect awesome (the window manager) to be somehow responsible for it. Starting it pretty much corrupts the display, but upon a closer look the onboard keyboard letters are there in between the corruption.

Edit 3:
And it somewhat works
HEY you are AWESOME!
Great progress in no time! I'd like to help you out but I really have little free time in this period
about this: ipcrm -M 0x00008fb5
how did you find out the correct address? Probably the offset on the Glo could be different. Also, since you're on a touch, maybe it would make more sense to base yourself on the 5.3.2 update for the kindle touch rather than the one for the paperwhite, but maybe you're using it already
giorgio130 is offline   Reply With Quote
Old 01-31-2013, 12:32 PM   #47
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 728
Karma: 2314258
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by giorgio130 View Post
Also, since you're on a touch, maybe it would make more sense to base yourself on the 5.3.2 update for the kindle touch rather than the one for the paperwhite
It makes sense, but (unfortunately for the sake of porting) Kindle Touch updates are differential or incremental updates, not the full rootfs image updates.
eureka is offline   Reply With Quote
Old 01-31-2013, 12:46 PM   #48
ah-
Connoisseur
ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.
 
Posts: 64
Karma: 3062
Join Date: Jan 2012
Device: Kobo Touch
Quote:
Originally Posted by giorgio130 View Post
HEY you are AWESOME!
Great progress in no time! I'd like to help you out but I really have little free time in this period
about this: ipcrm -M 0x00008fb5
how did you find out the correct address? Probably the offset on the Glo could be different. Also, since you're on a touch, maybe it would make more sense to base yourself on the 5.3.2 update for the kindle touch rather than the one for the paperwhite, but maybe you're using it already
Yeah I'm using the Paperwhite image, once I get everything to work reasonably well I'm going to start over and document etc., if I can find a good Kindle Touch image I'll try to use it. But until now there weren't that many board-specific changes, so the Paperwhite image works fine.

I got the the shared memory key through strace, but "ipcs" should work as well.

Also, I guess it's time to find a clean way to boot the kindle chroot. At the moment I'm just executing the init files manually, but that's not exactly robust. And unfortunately you can't just start upstart and let it do its thing, it seems to work only as PID 1. So I'm a bit stuck on that issue.
ah- is offline   Reply With Quote
Old 01-31-2013, 01:52 PM   #49
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 728
Karma: 2314258
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by ah- View Post
if I can find a good Kindle Touch image I'll try to use it.
Kindle Touch images could be found here (mmcblk0p1 is the rootfs partition).
eureka is offline   Reply With Quote
Old 02-02-2013, 05:07 AM   #50
giorgio130
Time Waster
giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.
 
Posts: 415
Karma: 289158
Join Date: May 2011
Device: Kobo Glo and Aura HD
Quote:
Originally Posted by ah- View Post
Also, I guess it's time to find a clean way to boot the kindle chroot. At the moment I'm just executing the init files manually, but that's not exactly robust. And unfortunately you can't just start upstart and let it do its thing, it seems to work only as PID 1. So I'm a bit stuck on that issue.
maybe it would work to run a script during init of the official software. I wouldn't know though how to remove it after testing... it would surely help to have serial access, in order to put together an image that only boots the kindle os.
Right now if I try to start another telnet session while in chroot, connection is refused; probably fixing this would permit to automatically chroot and running upstart at boot, and in case of problems removing that script through ftp/telnet/ssh.
giorgio130 is offline   Reply With Quote
Old 02-02-2013, 01:35 PM   #51
ah-
Connoisseur
ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.ah- could sell banana peel slippers to a Deveel.
 
Posts: 64
Karma: 3062
Join Date: Jan 2012
Device: Kobo Touch
I found a way to hand over to upstart thanks to a nice person in the upstart irc channel, we can just use the Kobo distribution as a kind of initrd, and use pivot_root plus chroot to make the Kindle fs / and start upstart.

Unfortunately I don't have much if any free time after tomorrow, so I'll just post everything I have working up to now.

I got both the 5.1.2 image for the Touch and the 5.3.3 for the Glo somewhat working. The Glo image needed some more tweaks (like manually searching and adding 800x600 images for blanket, plus for the keyboard, and extracting several cramfs images) and doesn't automatically boot into the GUI yet.

Fakeproc.tar.bz2 is a LD_PRELOAD library that can redirect some accesses to /proc/board_id etc. to /fake/proc/board_id if copied to the Kindle fs and put into /etc/ld.so.preload, but it doesn't work with busybox and therefore cat since busybox is statically linked.

The fb_config stuff is used for configuring the framebuffer, run framebuffer_configure once before chrooting to the Kindle fs and fast_update or fast_update_rot to update the screen. I think update_fb is broken, so just ignore that. It depends on the Xorg configuration wether you need the _rot version or not, if you use the wrong one you'll see errors in dmesg.

I modified /etc/init.d/rcS to boot into the Kindle fs when the SD card is inserted during boot or to boot nickel as usual if not. This plus pivot.sh plus the modified Kindle /sbin/init script implements the handover from busybox init to upstart.

The handover kills all running processes, including ssh/telnet. So if you want to connect again, look at the kindle /sbin/init. It might be useful to remove a & at the end of one of the netcat lines to stop the Kobo from rebooting because init died.

There's also a readme.txt i started writing, it's totally incomplete but I don't want this to just sit around and I won't have the time to finish this in the next few weeks.

Be careful about changing mmcblk0 to mmcblk1 everywhere, that's really important. The kindle init scripts like to create new filesystems.

I hope I included everything else I did in the attachment, diff it with against the 5.3.3 initscripts to see what changed.

Random things that might be useful: Use devcap-encrypt to edit /etc/deviceConfig.conf, there's several reboots that have to be uncommented to get it to not reboot after a few seconds, use initctl list/start/stop to talk with upstart, upstart scripts die if there is even one line that doesn't execute successfully (like echo something > /proc/does/not/exist), use tail -f /var/log/messages to get debug output, if the framework doesn't start try executing everything from prereg.conf/firstboot manually in a terminal, use strace on everything that doesn't work as expected, often files/folders are missing and just have to be created with mkdir/touch etc.

What's left to do: Getting it to boot automatically all the way through. Right now it starts only the most basic things, and then requires manual tweaking until it maybe starts X and framework.

Getting things like Wifi to work, maybe writing a wrapper for the eink refresh calls to replace the fb_update scripts, getting the buttons to work and a ton more.

Maybe someone is interested in continuing this, I hope it's at least a bit interesting to look through. With some more work I'm certain that it's possible to get basic reading functionality in a dualboot setup without having to change the Kobo kernel.

Also, I would recommend to start out with an almost empty /etc/upstart and readd things one by one. Really just syslogd, system and dropbear in the beginning and then readd single things while making sure every step works. Else you just get tons of error messages in the logs and have no idea what's going wrong.
Attached Files
File Type: bz2 fakeproc.tar.bz2 (4.3 KB, 61 views)
File Type: bz2 kobostuff.tar.bz2 (304.5 KB, 77 views)

Last edited by ah-; 02-02-2013 at 01:47 PM.
ah- is offline   Reply With Quote
Old 04-12-2013, 08:12 PM   #52
mastnacek
Enthusiast
mastnacek has learned how to read e-booksmastnacek has learned how to read e-booksmastnacek has learned how to read e-booksmastnacek has learned how to read e-booksmastnacek has learned how to read e-booksmastnacek has learned how to read e-booksmastnacek has learned how to read e-booksmastnacek has learned how to read e-books
 
Posts: 33
Karma: 946
Join Date: Mar 2013
Device: Kobo Mini
Kobo Mini

Hello, is working kindle os in Kobo Mini? And how can i use this in dualboot?
mastnacek is offline   Reply With Quote
Old 05-09-2013, 08:08 PM   #53
KevinShort
Addict
KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.
 
KevinShort's Avatar
 
Posts: 342
Karma: 165069
Join Date: Jan 2012
Location: Virginia, US
Device: Kobo Wifi, Kobo Glo
I've been having a go at getting this working on my Glo. To get Xorg to start I had to copy the /usr/share/X11/xkb/rules directory from ah-'s debian chroot image to the kindle filesystem. Then X starts just fine after running "initctl start dbus".

When starting /etc/upstart/framework, it first choked on not finding the file /var/local/java/cvm.aot. After I created that file with "touch", the framework gets farther before it spits out this error: "[fake_21d13522] fake_21d13522_ioctl() : unsupported cmd (0x4048462e)" I also get this error when using to initctl to start pillow, splash, and lab126_gui.

I can see a mouse cursor that moves when I touch the screen, and I'm able to get the "kindle tree" splash screen to show. There's a loading bar on the bottom that got a little past halfway loading before it stopped. Have you made any more progress, Giorgio?
KevinShort is offline   Reply With Quote
Old 05-27-2013, 10:07 PM   #54
a3nm
Member
a3nm doesn't littera3nm doesn't littera3nm doesn't litter
 
Posts: 11
Karma: 204
Join Date: May 2013
Device: Kobo Glo
Filling the whole screen on Glo?

Quote:
Originally Posted by KevinShort View Post
Awesome, it works! It doesn't fill the whole screen on my Glo, but that can be fixed. Thanks for the little how-to, ah-!
Does anyone know how to fix this? I think the binaries in /fb_update/ would need to be updated to the Kobo Glo's larger screen size, but I couldn't find source code for those anywhere.

(For context: I'm running the Debian image from http://andreas.heider.io, I'm not trying to run any Kindle software, just trying to get the X server to display properly.)

Thanks in advance!

Last edited by a3nm; 05-27-2013 at 10:09 PM. Reason: context
a3nm is offline   Reply With Quote
Old 05-28-2013, 12:04 PM   #55
KevinShort
Addict
KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.
 
KevinShort's Avatar
 
Posts: 342
Karma: 165069
Join Date: Jan 2012
Location: Virginia, US
Device: Kobo Wifi, Kobo Glo
You're correct, the binaries just need to be updated for the larger screen size. I've attached the source code and binaries below.
Attached Files
File Type: zip gloScreen.zip (13.1 KB, 129 views)
KevinShort is offline   Reply With Quote
Old 05-28-2013, 07:06 PM   #56
a3nm
Member
a3nm doesn't littera3nm doesn't littera3nm doesn't litter
 
Posts: 11
Karma: 204
Join Date: May 2013
Device: Kobo Glo
This worked, thanks a lot!
a3nm 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
Kindlet F-Zero 4K, code ported, now it needs dumbing down. WIP... twobob Kindle Developer's Corner 2 09-06-2012 11:12 AM
Android [WIP] Overclocking the PE plasticarmyman enTourage eDGe 16 06-11-2012 08:08 PM
Seriously thoughtful I always knew Windows was a WIP GeoffC Lounge 4 02-06-2010 03:20 AM
Thirty - WIP - comments wanted ravenlife Writers' Corner 20 08-16-2009 01:10 PM
Opinions needed on a WIP ebook Nate the great Workshop 5 07-15-2009 12:38 PM


All times are GMT -4. The time now is 10:03 PM.


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