* Boot flags in the kernel.
@ 1998-01-26 6:05 Alex deVries
1998-01-26 17:36 ` William J. Earl
1998-01-26 22:47 ` ralf
0 siblings, 2 replies; 5+ messages in thread
From: Alex deVries @ 1998-01-26 6:05 UTC (permalink / raw)
To: SGI Linux
I'm not sure if what I'm trying to do is possible. I'm trying to implement
the same rootflags that are passwd within the kernel image in i386 into
the MIPS kernel.
In i386 there's a portion of the boot image reserved for these flags;
they're things like console type, initial filesystem, initial ramdisk
location, etc.
It's traditionally been more important to have this feature in i386
because there wasn't anything nice like the PROMs on MIPS or Sparcs.
But, there _is a good reason to have it; for install or rescue images it's
nice to be able to boot with compressed initial ramdisk within the same
boot image without having to pass the ramdisk offset on command line
manually.
Where in the kernel would we put this data?
- Alex
--
Alex deVries Run Linux on everything,
System Administrator run everything on Linux.
The EngSoc Project Send spam to spam@engsoc.carleton.ca.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Boot flags in the kernel.
1998-01-26 6:05 Boot flags in the kernel Alex deVries
@ 1998-01-26 17:36 ` William J. Earl
1998-01-26 22:47 ` ralf
1 sibling, 0 replies; 5+ messages in thread
From: William J. Earl @ 1998-01-26 17:36 UTC (permalink / raw)
To: Alex deVries; +Cc: SGI Linux
Alex deVries writes:
>
> I'm not sure if what I'm trying to do is possible. I'm trying to implement
> the same rootflags that are passwd within the kernel image in i386 into
> the MIPS kernel.
>
> In i386 there's a portion of the boot image reserved for these flags;
> they're things like console type, initial filesystem, initial ramdisk
> location, etc.
>
> It's traditionally been more important to have this feature in i386
> because there wasn't anything nice like the PROMs on MIPS or Sparcs.
>
> But, there _is a good reason to have it; for install or rescue images it's
> nice to be able to boot with compressed initial ramdisk within the same
> boot image without having to pass the ramdisk offset on command line
> manually.
>
> Where in the kernel would we put this data?
I am sure where you should put it, but bear in mind that the
command line options and environment are passed to the kernel much as
if it were a user main program (as argc, argv, and envp, in $a0, $a1,
and $a2), by sash or the PROM. You can get things like the console
variable that way (console=g means textport and console=d means
serial console).
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Boot flags in the kernel.
1998-01-26 6:05 Boot flags in the kernel Alex deVries
1998-01-26 17:36 ` William J. Earl
@ 1998-01-26 22:47 ` ralf
1998-01-26 23:49 ` Alex deVries
1 sibling, 1 reply; 5+ messages in thread
From: ralf @ 1998-01-26 22:47 UTC (permalink / raw)
To: Alex deVries; +Cc: SGI Linux
On Mon, Jan 26, 1998 at 01:05:14AM -0500, Alex deVries wrote:
> I'm not sure if what I'm trying to do is possible. I'm trying to implement
> the same rootflags that are passwd within the kernel image in i386 into
> the MIPS kernel.
>
> In i386 there's a portion of the boot image reserved for these flags;
> they're things like console type, initial filesystem, initial ramdisk
> location, etc.
>
> It's traditionally been more important to have this feature in i386
> because there wasn't anything nice like the PROMs on MIPS or Sparcs.
>
> But, there _is a good reason to have it; for install or rescue images it's
> nice to be able to boot with compressed initial ramdisk within the same
> boot image without having to pass the ramdisk offset on command line
> manually.
>
> Where in the kernel would we put this data?
If you _really_ need that you can copy the data into the .data segment
during the initialization. See arch/mips/kernel/setup.c.
Ralf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Boot flags in the kernel.
1998-01-26 22:47 ` ralf
@ 1998-01-26 23:49 ` Alex deVries
1998-01-27 0:08 ` ralf
0 siblings, 1 reply; 5+ messages in thread
From: Alex deVries @ 1998-01-26 23:49 UTC (permalink / raw)
To: ralf; +Cc: SGI Linux
On Mon, 26 Jan 1998 ralf@uni-koblenz.de wrote:
> > Where in the kernel would we put this data?
>
> If you _really_ need that you can copy the data into the .data segment
> during the initialization. See arch/mips/kernel/setup.c.
But where would I copy it from? Where in the image would the symbols go?
Would I just put this in after kernel_entry and kernel_end are written in
mkboot.c (around lines 620-640)?
- A
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Boot flags in the kernel.
1998-01-26 23:49 ` Alex deVries
@ 1998-01-27 0:08 ` ralf
0 siblings, 0 replies; 5+ messages in thread
From: ralf @ 1998-01-27 0:08 UTC (permalink / raw)
To: Alex deVries; +Cc: SGI Linux
On Mon, Jan 26, 1998 at 06:49:57PM -0500, Alex deVries wrote:
> On Mon, 26 Jan 1998 ralf@uni-koblenz.de wrote:
> > > Where in the kernel would we put this data?
> >
> > If you _really_ need that you can copy the data into the .data segment
> > during the initialization. See arch/mips/kernel/setup.c.
>
> But where would I copy it from?
Thinking about it, actually it's _way_ more elegant to write just a couple
of lines brewing the right argument line to pass to the kernel and to
just pass it than patching the command line in the kernel binary ...
Where in the image would the symbols go?
No symbols needed.
> Would I just put this in after kernel_entry and kernel_end are written in
> mkboot.c (around lines 620-640)?
Mkboot isn't being used on SGI boxes because sash can directly boot the
ELF image produced by the kernel.
Ralf
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1998-01-27 0:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-01-26 6:05 Boot flags in the kernel Alex deVries
1998-01-26 17:36 ` William J. Earl
1998-01-26 22:47 ` ralf
1998-01-26 23:49 ` Alex deVries
1998-01-27 0:08 ` ralf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox