View Single Post
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#25
Originally Posted by reinob View Post
@pali,

I have a question about getbootstate, in particular regarding bootmode and bootreason:

AFAIK the Fremantle version reads bootreason from /proc/bootreason and bootmode from /proc/component_version. The Harmattan version (again, AFAIK) takes these two values from the kernel commandline (bootreason=X, bootmode=Y).
You are right.

Originally Posted by reinob View Post
I remember having read a getbootstate.c where both methods were attempted (first Harmattan, then Maemo), but it was not clear if that was the stock Fremantle getbootstate, or what.
Closed fremantle version read only from /proc. Harmannan version read only from cmdline. In my previous open source version there was implementation of both methods. But I decided to drop harmattan method to have same functionality in new open source version.

Originally Posted by reinob View Post
So the first question is:
* do you know if stock getbootstate checks the cmdline first?
No

Originally Posted by reinob View Post
And the first "request" is:
* can you make it that way on the open-source version of getbootstate?

This way one could, e.g. make a U-boot entry for booting Maemo with a chosen bootmode/bootreason (e.g. always "pwr_key" and "normal"), in case something goes bad.
Not needed. Last u-boot version has option to force bootreason and bootmode via env variables. I will write documentation for rx51 uboot port when I will have time. (BTW, rx51 port without bootmenu is in upstream now :-))

Originally Posted by reinob View Post
It would be also *very* nice if we could include in the kernel commandline a kind of "bypass" for the whole getbootstate, e.g. "init=... bootstate=USER ..."
This is possible now too. Just enable R&D mode (which is designed for above problematic situations) nad getbootstate (both closed and my new open) will set USER bootstate if you are booting from power off.

Originally Posted by reinob View Post
This way getbootstate would check if that parameter was included in the command line and immediately return it, without checking anything else (no BSI, no boot count, no thing).

This would provide an additional back-up in case something goes horribly wrong.

I don't think anyone will have anything against the proposal here. After all, as long as you don't touch the kernel commandline everything will work as normal.

If I find the time I will try to do it myself (I have now installed gcc and libcal-dev in my spare-N900s so I could do this while on the train but obviously it would be good if you did that for my benefit (oh, and for the rest of the community, natürlich

Cheers.
 

The Following 2 Users Say Thank You to pali For This Useful Post: