View Single Post
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#24
@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).

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.

So the first question is:
* do you know if stock getbootstate checks the cmdline first?

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.

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 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.