NetBSD-Bugs archive

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

Re: kern/46732: setroot(9) is called twice after "MI root onwedges"changes



The following reply was made to PR kern/46732; it has been noted by GNATS.

From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
To: mlelstv%serpens.de@localhost
Cc: gnats-bugs%NetBSD.org@localhost, mlelstv%NetBSD.org@localhost, 
tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: kern/46732: setroot(9) is called twice after "MI root 
onwedges"changes
Date: Wed, 25 Jul 2012 20:56:55 +0900

 mlelstv@ wrote:
 
 > On Mon, Jul 23, 2012 at 11:55:46PM +0900, Izumi Tsutsui wrote:
 > > How about:
 > > 
 > > - call MD cpu_rootconf() from main() (where currently it calls MI 
 > > rootconf())
 > > - change MD cpu_rootconf() to set booted_foo variables as the above
 > > - also make MD cpu_rootconf() call MI rootconf() (for wedge)
 > >   instead of setroot()
 > > 
 > > so that we could have post setroot() MD ops as before.
 > 
 > That doesn't really work because the MD code then has to interpret
 > whatever root device (including wedges) is selected and transform
 > that back into something it or the boot code understands.
 > 
 > And as my idea for rootconf() was to also clean up the root-on-raidframe
 > hack later, things would be even more complicated.
 
 What won't actually work are you claiming?
 Just root on wedge (or raidframe) case?
 
 hp300/autoconf.c:setbootdev() passes necessary info to bootloader
 if the deteremined root device is rd(4) (HPIB disk), sd(4), or le(4),
 and its bootloader doesn't support wedge or raid anyway.
 
 > I guess the only reason for hp300 to use root_device to guess the
 > boot device is that it wants to honor the users choice in the RB_ASKNAME
 > case.
 
 Not RB_ASKNAME case, but "bootloader is loaded via network,
 but a kernel needs to be loaded from harddisk (or viceversa)."
 
 In that case, a user has to specify a kernel loadpath (including
 device name) on the bootloader's prompt at the first boot, but
 no need to specify it on the bootloader prompt after reboot.
 
 > No other port does this.
 
 Indeed, but isn't it better to allow MD post-setroot()-hooks
 if it's trivial?
 
 > > BTW, I wonder if booted_device == NULL check in rootconf() is appropriate.
 > > Shouldn't setroot() be called for RB_ASKNAME even in that case?
 > 
 > The patched code now always calls setroot(). Only the wedge lookup
 > is now restricted to booted_device != NULL.
 
 Ah, it's my fault. I have only checked MD diffs.
 
 ---
 Izumi Tsutsui
 


Home | Main Index | Thread Index | Old Index