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, 11: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, 11:41 AM   #2
Antartica
Evangelist
Antartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-books
 
Posts: 415
Karma: 754
Join Date: Jun 2006
Location: Madrid, Spain
Device: iliad, onhandpc, newton, zaurus
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
 
Advertisement
Old 01-28-2010, 07: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: 974
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, 06: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, 08: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: 712
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, in love with iRex DR800S. Also a K4NT. Now a Kobo Aura
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, 02:04 PM   #6
Antartica
Evangelist
Antartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-books
 
Posts: 415
Karma: 754
Join Date: Jun 2006
Location: Madrid, Spain
Device: iliad, onhandpc, newton, zaurus
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, 04: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 04:11 PM
VistaNews asks "Has eBooks time finally come?" Answers "No" Donnageddon News 7 02-19-2009 03:21 AM
Custom boot logo, "freezing" the screen guylhem Sony Reader Dev Corner 1 11-09-2008 12:45 PM
"Wheel of Time" author Robert Jordan passed away TadW Reading Recommendations 38 12-31-2007 12:25 PM


All times are GMT -4. The time now is 09:52 AM.


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