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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-28-2010, 10:02 AM   #1
paskino
Junior Member
paskino began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jul 2009
Device: iLiad
Achieving "zero" boot time

Dear all,

I've got an idea on how to achieve a virtual zero boot time on the iliad (if you use it for reading).

Once I run out of battery and the last page that I was displaying just remained printed on the screen. So I thought that instead of the initial boot screen and of the shutdown screens we could implement that the last page remains painted. Maybe we could let a progress bar (like the default one) to signify that the iliad is booting or switching off.

In this way, when you switch off your iliad the last page you were reading keeps being displayed and when you reopen your iliad, in the mean time that you restart reading the device boots and gets operational again; achieving a virtual zero boot time.

Now, I've got the idea but I have no clue on how to make it work... any of you knows if it is possible?

Regards

paskino
paskino is offline   Reply With Quote
Old 01-28-2010, 10:41 AM   #2
Antartica
Evangelist
Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.
 
Antartica's Avatar
 
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
Quote:
Originally Posted by paskino View Post
Now, I've got the idea but I have no clue on how to make it work... any of you knows if it is possible?
Unfortunately, it is not possible with our current understanding of the iliad: the bootloader is the one responsible of drawing boot splash image, and the bootloader is off-limits for us :-(.

The best we would do is having the kernel redrawing the last page viewed somewhere in the kernel initialization sequence, but that is rather convoluted.

It would be better to change the shutdown scripts to "save" the framebuffer and modify the startup scripts to display it before launching contentLister...

I can assist in this one last thing (providing binaries to save the framebuffer and to display an image into the framebuffer), if you are interested in investigating it .
Antartica is offline   Reply With Quote
Old 01-28-2010, 06:54 PM   #3
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by Antartica View Post

It would be better to change the shutdown scripts to "save" the framebuffer and modify the startup scripts to display it before launching contentLister...
Hi,
I have one question. Even if the last framebuffer image is displayed before CL, when CL is launched, that image will be overwritten. Will it?
ericshliao is offline   Reply With Quote
Old 01-29-2010, 05:31 AM   #4
herve
Enthusiast
herve began at the beginning.
 
Posts: 49
Karma: 10
Join Date: Jul 2006
Location: Paris
Device: TungstenC / hopefully iLi
Quote:
Originally Posted by ericshliao View Post
Hi,
I have one question. Even if the last framebuffer image is displayed before CL, when CL is launched, that image will be overwritten. Will it?
Yes, it would also require that the last document opened is reopened instead.

But all in all, it's a pretty good idea.
herve is offline   Reply With Quote
Old 01-29-2010, 07:10 AM   #5
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
If I've understood correctly, it should not be too hard for .pdf files.

Locate the images files in filesystem used in boot and shutdown processes.
Change the shutdown process with a script that 1. change those images with a
screenshot of the page currently reading, and 2. do a shutdown

Page number could be extracted from the manifest.

This is a sample python code that creates an image of a pdf file page.
It shouldn't be difficult to translate to C or lua.

Code:
import gtk
import gtk.gdk
import poppler

def build_cover_pdf_poppler(f):
    """poppler method. Needs X"""
    dst = mkstemp()[1]
    try:
        doc = poppler.document_new_from_file('file://' + f, None)
    except:
        os.unlink(dst)
        return
    pag = doc.get_page(0)
    w, h = map(int, pag.get_size())
    pb = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, 8, w, h)
    pag.render_to_pixbuf(0, 0, w, h, 1, 0, pb)
    pb_scaled = pb.scale_simple(TN_W, TN_H, gtk.gdk.INTERP_BILINEAR)
    pb_scaled.save(dst, 'jpeg', {'quality': TN_QUALITY})
Iņigo
Iņigo is offline   Reply With Quote
Old 01-29-2010, 01:04 PM   #6
Antartica
Evangelist
Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.
 
Antartica's Avatar
 
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
Quote:
Originally Posted by herve View Post
Yes, it would also require that the last document opened is reopened instead.
...which is the default behaviour if you have configured your iliad to "on boot: open last document"

Quote:
Originally Posted by Iņigo
Locate the images files in filesystem used in boot and shutdown processes.
Change the shutdown process with a script that 1. change those images with a
screenshot of the page currently reading, and 2. do a shutdown
The problem is that the boot splash image is not a file in the filesystem. The bootloader loads it from somewhere but we don't know where it is.

Alternatively to re-rendering the last opened page, a screenshot can be made by accessing /dev/fb0, and then it's only a matter of saving that screenshot to a known loaction on disk.
Antartica is offline   Reply With Quote
Old 02-04-2010, 03:18 AM   #7
paskino
Junior Member
paskino began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jul 2009
Device: iLiad
Hi,

thanks for the response, I've been cut out of internet for a few days. Now, as far as I understand we could:

1) save the framebuffer of the last displayed page
2) display the framebuffer "when we want"

It would be important to display the last page in 2 moments:
1) just before powering down
2) right after the screen is repainted with the boot splash screen.

Can we do this?

paskino
paskino 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
Wispernet 5 Bars: "Your Kindle is unable to connect at this time" Richie Amazon Kindle 4 04-14-2009 03:11 PM
VistaNews asks "Has eBooks time finally come?" Answers "No" Donnageddon News 7 02-19-2009 02:21 AM
Custom boot logo, "freezing" the screen guylhem Sony Reader Dev Corner 1 11-09-2008 11:45 AM
"Wheel of Time" author Robert Jordan passed away TadW Reading Recommendations 38 12-31-2007 11:25 AM


All times are GMT -4. The time now is 08:14 PM.


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