Re: Cromwell Hibernate

Timothy Fontaine <[email protected]> Tue, 8 Nov 2005 16:42:47 -0500
Newsgroups gmane.linux.ports.xbox.devel
Message-ID <[email protected]>
On 11/8/05, Ben Dash <[email protected]> wrote:
>
> My wife was complaining about how long it took for my
> xBox to boot and I was thinking this morning about
> what it would take to implement hibernation in
> Cromwell.
>
> Has anyone spent any time looking into this already?
>
> I'm no expert on what would be done during the
> hibernate process but the concept sounds simple
> enough. I would imagine that the contents of the RAM
> would be serialized to a file inside hda55 upon
> entering hibernation. When the xBox is rebooted the
> bios could check for the existence of the hibernations
> file. If the file does not exist then it could
> proceed with a normal boot. If the hibernate file did
> exist then it could be restored and so "awaken" the
> xBox and take it to its fully running state almost
> immediately.
>
> As I said, I am not at all sure what would be involved
> for me to implement this, however, I think that it
> would be an interesting project and not beyond the
> realms of possibility.
>
> Any ideas?
>
> Ben


One option is to use a software suspend package like http://www.suspend2.net

Of course another option is to fulfill the potential of your Xbox as a
Console/Set-Top-Box, an area that unfortunately Xbox-Linux hasn't really
tapped into. It is possible for Xbox-Linux to instead of using cromwell as
another boot loader replacement, be a more appropriate firmware for your
Xbox. It is a difficult task, on the outside there is a full meg of storage
for a firmware, and on the inside only 256K, obviously this is problematic
for the task I'm about to propose, though not wholly out of the question.

It is possible that Cromwell could return to its roots (crom) and bundle in
a stripped down kernel (and strip out all the other gui/etherboot stuff).
The kernel would only need to be responsible for handling initialization of
the bare minimum of hardware (i.e. no ethernet, usb, or other initialization
that can happen 'as needed') and from their copy straight into memory an
image located somewhere on the harddrive that at it's largest would be
64megs (ok 128 for those advantageous enough to solder in more) All that's
left is to jump (kexec?) into the environment and start devices on demand.
This would more closely emulate how 'real' Console/Set-Top-Boxes function.

Now, I know most of the arguments against this sort of functionality.
Firstly, it scares off distributions, as it's different from how most
desktops work, but this is a GoodThing(tm) because your Xbox isn't a
Desktop. Secondly, Linus is already little more than squeamish about
including Xbox-Linux patches upstream, let alone after said reorganization.
Thirdly, one already has software suspend options, and can trim down
kernels, init scripts, and splash screens to more quickly get into Linux,
why on earth would we do anyting so drastic? And finally, that sounds great
and all, but who's going to do it? These are all fair points/questions, that
indeed need to be raised.

1) Your Xbox (Despite what the wiki may say, and what I may have said) is
not a PC/Desktop, and you shouldn't treat it as such, it is a low memory
Set-Top-Box for your multimedia disposal, and distributions have had years
now to tie in Xbox-Linux and very few have adopted it, and the ones who
tried did so with very little fanfare/success.

2) This doesn't have to go into the main Xbox-Linux cromwell/kernel tree, it
can be seperate. But also note that Linus isn't likely to accept Xbox-Linux
patches upstream, just something we need to accept.

3) Software Susped, small kernels, less services, and splash screens are
simply not enough to fool most of the users that they are getting the most
out of their Xbox while they wait >1min for everything (including X) to
load. The point is we could/can do it faster.

4) I'll certainly lend a hand to anyone who sincerely makes this effort,
I've been behind such a project since Dash-POC (see cvs) was first dreamt
up. No, my C is not at a level that would enable me to complete this project
on my own. No, my Kernel and embedded systems knowledge is not at a level
that would enable be to complete this project. Does that mean I wouldn't
help? Of course not, this is a project I've been dying to see take of for
some time.

I think this topic/idea is due for some rehashing as the rest of us watch
the 360 come out and yearn for their soon to be anachronistic v1's to be of
use.