pupa-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PUPA disk questions


From: Yoshinori K. Okuji
Subject: Re: PUPA disk questions
Date: Sat, 25 Oct 2003 15:14:11 +0200
User-agent: KMail/1.5

On Saturday 25 October 2003 14:16, Marco Gerards wrote:
> GRUB works perfectly, but PUPA doesn't.  If you have no idea where I
> should look I have to debug all this.

Sorry, I have no idea. To investigate this problem, I'd recommend looking at 
disk/i386/pc/biosdisk.c. The code is mostly the same as stage2/bios.c in 
GRUB.

> > 2. Add code to check media changes into the "open" function of each disk
> > driver.
>
> I think it makes sense but we need to be sure all architectures can
> detect such change.  Otherwise we need to invalidate the cache for a
> device when it is opened (or better, when it is closed).

I think it is okay. If you don't like invalidating caches all the time, you 
could define a minimum life time of caches (e.g. one second), as nobody can 
exchange a media so quickly.

> I've tested my ext2fs code on another box yesterday and it didn't
> compile because of the way I've used the union.  This was on gcc 2.95
> (IIRC) but it works perfectly on gcc 3.0 (and newer).  What is the
> goal of PUPA?  Does it have to work on all compilers and should it
> work on every POSIX system?

Could you elaborate on how you used union?

I think it is generally a good thing to make software portable. So if you have 
no specific reason, it is better to make PUPA usable with any version of a C 
compiler.

However, you can use GNU extensions as you want. GRUB is GNU Software, and GCC 
and other build tools are quite portable, so I don't care about non-GNU build 
tools.

> > * Get rid of magic, like the command "install" in GRUB. Instead, extend
> > other intelligent commands, such as "setup".
>
> How will setup work?  Will it be interactive?  IIRC install was really
> confusing.

I'd like to hear your idea. I myself don't see why an interactive setup 
command could be useful.

> Will it be possible to have multiple user interfaces?  For example a
> mouse controlled gui or an alternative menu.  I would like some
> modularity here so it is possible to add some "user friendly" GUIs.
> AFAIK some non-free bootloaders have that so I think it would be nice
> if PUPA has such features too.  Of course this is long term thinking.

Yes, it is nice.

Do you know there are two different interfaces even in GRUB? Recent versions 
of GRUB use horizontal scrolls for long lines, while older versions used line 
folding in one screen. This change was to support dumb terminals. For a dumb 
terminal, readline also does the same thing.

This change was good for those who used serial terminals with poor 
functionality, but not very good for ordinary users. However, to make the 
size of GRUB smaller, it was necessary to choose one of them instead of both 
of them, so I chose the dumb interface, as it also works for fancy terminals.

In PUPA, we don't need to take care of the size so much, because we can make 
one module for one interface, and the user can choose which module he/she 
uses.

I think it is easy to have multiple interfaces to co-exist. What needs to be 
done are (1) to add an interface list, (2) to add functions to register and 
unregister an interface, and (3) to add a command to choose an interface. 
Then, the user would be able to specify which interface he/she uses in a 
configuration file, like:

interface gui
 
Okuji




reply via email to

[Prev in Thread] Current Thread [Next in Thread]