Help - Search - Members - Calendar
Full Version: Fixed Bug In Kopi-apm
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > pdaXrom
ToneBlind
I was troubleshooting an issue that I found that prevented kopi suspended alarms from causing a wakeup from kopi-apm, and found (and fixed) the bug in the script. If there is any interest in this let me know. I'm thinking about packing this in an ipk just for fun (to learn how to do that) and release it as a bugfix.
climber
Sure I'm interested in. If you could package this it would be easier for others to apply this patch :-)

Many thanks in advance!

climber
ToneBlind
QUOTE(climber @ Jul 14 2009, 12:13 AM) *
Sure I'm interested in. If you could package this it would be easier for others to apply this patch :-)

Many thanks in advance!

climber

Climber,

I will be doing that in a couple of days. I just learned how to compile natively, and my first release is going to be Fluxbox 1.0.0, and I will be starting a thread for that probably later today (just dealing with a minimal issue at the moment.)

I don't know if there is any place to upload new ipk releases or not, but we'll deal with that when the time comes. wink.gif

I'm having a lot of fun setting things up and learning how to do new things, I hope my efforts can benefit other people as well!
2dBH
QUOTE(ToneBlind @ Jul 14 2009, 07:18 AM) *
QUOTE(climber @ Jul 14 2009, 12:13 AM) *
Sure I'm interested in. If you could package this it would be easier for others to apply this patch :-)

Many thanks in advance!

climber

Climber,

I will be doing that in a couple of days. I just learned how to compile natively, and my first release is going to be Fluxbox 1.0.0, and I will be starting a thread for that probably later today (just dealing with a minimal issue at the moment.)

I don't know if there is any place to upload new ipk releases or not, but we'll deal with that when the time comes. wink.gif

I'm having a lot of fun setting things up and learning how to do new things, I hope my efforts can benefit other people as well!


definitely looking forward to the release. I have been using the kopi without an alarm...
ToneBlind
I note your interest, and I will guys let you know when I have an IPK ready. This will be for a 2.4 kernel, by the way (I will be using pdaXii13 to compile this, but fortunately I think there are no binaries in this package, so it should be actually compatible with any kernel wink.gif ) I am working on finishing the Fluxbox 1.0.0 package (tracking how to provide for auto-rotate at the moment,) and when I get done with that I'll look into IPK control file syntax, because this package will replace some startup scripts in the system.

As a form of informal documentation, I'm going to provide a little overview on this issue, which has a couple of different facets:
Naturally, KO/PI needs to rely on the OS itself to wake up the device before KO/PI can issue an alarm. Originally (and I'm talking in the Sharp ROM versions,) I believe KO/PI used the atd/at infrastructure, and that worked perfectly fine. In pdaXrom I'm not aware of the original situation, but at some point one of the users in the forum (caitlin, I believe) provided a solution using apm instead. This solution was a step in the right direction, but due to some bugs pertaining to apm (namely, the inability of apm to schedule wakeups wrapping around midnight) it showed some problems. Then, another user (I think zumi) came up with a solution using atd/at, and that worked mostly to perfection.

I say mostly, because there was a conflict with one of the suspend scripts that Meanie had implemented in order to preserve the integrity of the system clock on suspend/resume. That script needed to use hwclock, and because hwclock can't run while atd is running, it thus shut down atd when the Zaurus was suspended, and woke it up again on resume. This obviously made atd incapable of waking up the Zaurus to respond to the KOPI alarm. Not only that, but due to some implementation details, it caused the Zaurus to not be able to wake up in some situations, which made it necessary to perform a hard reset. I have solved this problem by stopping atd just before invoking hwclock, and waking it up right after that, both in the suspend and resume scripts.

The other issue that I found (which I referred to in this thread) has to do with a bug in the script that decides which of the KO/PI alarms to use (the pending alarm or the suspended alarm.) When the Zaurus is going into a suspend, a script looks into both of these alarms, and due to a bug in the script, suspended alarms were not being chosen if there existed a pending alarm, even if the pending alarm had expired.

Sorry if I have gotten any names or details wrong, but this is a basic outline of the problem.

My solution is quite simple (about 3 lines added/modified in a few different scripts.) But I will release an IPK, because it's good practice to do so, plus it will give me a good chance to look into how the control script in IPKs is coded.
ToneBlind
QUOTE(climber @ Jul 13 2009, 11:13 PM) *
Sure I'm interested in. If you could package this it would be easier for others to apply this patch :-)

Many thanks in advance!

climber

Sorry for the long wait.

http://www.oesf.org/forum/index.php?showtopic=26913
ToneBlind
QUOTE(2dBH @ Jul 14 2009, 12:18 PM) *
QUOTE(ToneBlind @ Jul 14 2009, 07:18 AM) *
QUOTE(climber @ Jul 14 2009, 12:13 AM) *
Sure I'm interested in. If you could package this it would be easier for others to apply this patch :-)

Many thanks in advance!

climber

Climber,

I will be doing that in a couple of days. I just learned how to compile natively, and my first release is going to be Fluxbox 1.0.0, and I will be starting a thread for that probably later today (just dealing with a minimal issue at the moment.)

I don't know if there is any place to upload new ipk releases or not, but we'll deal with that when the time comes. wink.gif

I'm having a lot of fun setting things up and learning how to do new things, I hope my efforts can benefit other people as well!


definitely looking forward to the release. I have been using the kopi without an alarm...

I apologize for the long wait.

http://www.oesf.org/forum/index.php?showtopic=26913
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.