Re: Flag day for bootloader + kernel?

Izumi Tsutsui <[email protected]>
Newsgroups gmane.os.netbsd.ports.sgimips
Message-ID <[email protected]>
[email protected] wrote:

> I seem to recall that argv usually just contains flags, while the  
> environment array ($a2, which I think is 'magic' in machdep.c)  
> contains the boot device provided by the PROM environment variables.  
> We do some ugliness in arcemu.c to handle load the kernel from the  
> volume header and return a (hopefully) reasonable OSLoadPartition.

Hmm. A new kernel (with my patch) will try to parse boot device
as the following order:

(1) bootpath in bootinfo (provided by newer bootloaders)
(2) argv[1] passed by old bootloaders (which didn't have bootinfo support)
(3) argv[0], which might be a kernel path loaded directly by ARCBIOS
(4) "OSLoadPartition" environment
(5) each argv[n] which contains "OSLoadPartition=foo" strings

On netbooting on IP32, we have to use (3) to recognize boot device
properly so we have to parse it before (4), and there is no problem
if (2) and (3) won't break anything on IP12.
---
Izumi Tsutsui
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.