Re: Multiple kernel boot in linuxboot.cfg

David Pye <[email protected]>
Newsgroups gmane.linux.ports.xbox.devel
Message-ID <[email protected]>
On Wednesday 22 September 2004 22:11, DaveXXX wrote:
> David,
>
> the CVS version I got from CVS does not have a "dynamic" icon menu. At
> least not that I can tell.
> Here's a snip from the IconMenu.c file:
>
> void IconMenuDraw(int nXOffset, int nYOffset) {
>         ICON *iconPtr = firstVisibleIcon;
>         int iconcount;
>         //There are max four 'bays' for displaying icons in - we only draw
> the four.
>         for (iconcount=0; iconcount<4; iconcount++) {
>                 if (iconPtr==0l) {
>                         //No more icons to draw
>                         return;
>

Yes, the code you're pasting is the 'dynamic one'.

It only draws four icons, but if you have 6, or 8, or 10, you can use 
AddIcon(icon*) to add them, and the event loop will take care of scrolling 
them in and out of view as needed. There are only four 'positions' onscreen 
the icons can be drawn ie max 4 onscreen at any one time.

> Also, the BootIconMenu function goes like this:
>
>         //Add the icons we want.
>         if (nFATXPresent) {
>                 //Need to check linuxboot.cfg presence, not just fatx.
>
>                 //FATX icon
>                 ICON *icon1 = (ICON *)malloc(sizeof(ICON));
>                 icon1->iconSlot = ICON_SOURCE_SLOT4;
>                 icon1->szCaption = "FatX (E:)";
>                 icon1->functionPtr = BootFromFATX;
>                 AddIcon(icon1);
>         }

Again, these icons are being added at runtime. Before, there was an evil 
struct/enum combo.

You can key your parser in upstream of this, and add the icons as appropriate, 
in the order (L->R) you want them to appear.

The ICON_SOURCE_SLOTx #defines refer to the icon that will be used to signify 
the menu entry (see pics/background.jpeg for the ACTUAL icons).

David
.
>
> Am I looking at the correct source ? This is Cromwell from the sourceforge
> CVS
>
> DaveXXX

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d- s-: a-- C++ UL++++ P L+++ E--- W++ N+ o+ K- w---
O M V- PS+ PE+ Y+ PGP t 5- X+ R- tv+ b+ DI++ D+
G+ e++ h--- r++ y++
------END GEEK CODE BLOCK------


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.