View Single Post
Old 07-23-2010, 04:11 PM   #34
dima_tr
Groupie
dima_tr has learned how to read e-booksdima_tr has learned how to read e-booksdima_tr has learned how to read e-booksdima_tr has learned how to read e-booksdima_tr has learned how to read e-booksdima_tr has learned how to read e-booksdima_tr has learned how to read e-books
 
Posts: 175
Karma: 863
Join Date: Oct 2009
Location: Germany, Karlsruhe
Device: Iliad v2, DR800S (inlove)
During the last two days I learnt smth very known: RTFM. I'm very much grateful iRex guys for opening the sources.

Basically, all the needed code has been available since long time ago. Namely, sysd/system.c : do_poweroff(), prepare_standby() and on_standby() (first half of the latter).

I've customized the sysd project to produce the "poweroff" binary. The compiled executables are located in poweroff.zip. Unpack them to Programs/ folder and enjoy the old-new functionality (even with splash screen!! ). Working fine on my DR800S. Shutdown takes about 20-30 seconds. Please check during the testing if new bookmarks etc. are not lost (they should not). Looking forward to your impressions.


The most important source is poweroff-src/src/main.c . This is an extraction of system.c to perform only one operation, but doing it properly. GregorRichards has started this direction, I've been following it.

To compile the code execute build_all_from_scratch.sh, then rename src/sysd to poweroff and (optionally) strip it with arm-poky-linux-gnueabi-strip.

Sure, the source can be much simplified. The main task to do is to start with main.c and add the needed methods. And I'd be happy to have a build file like GregorRichards's one .. Ok, later. Or maybe someone has an inspiration - most welcome to participate

P.S. The icon is there waiting for lua script
Attached Files
File Type: zip poweroff.zip (49.0 KB, 589 views)
File Type: zip poweroff-src.zip (340.7 KB, 497 views)
dima_tr is offline   Reply With Quote