Port-hpcsh archive

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

Re: Miniroot



On Wed, Jan 04, 2006 at 01:42:50AM +0300, Valeriy E. Ushakov wrote:
> On Tue, Jan 03, 2006 at 22:10:20 +0100, Christer O. Andersson wrote:
> 
> > options         MEMORY_DISK_HOOKS
> > options         MEMORY_DISK_IS_ROOT     # force root on memory disk
> > options         MEMORY_DISK_SERVER=0    # no userspace memory disk support
> > #options        MEMORY_DISK_IMAGE
> > #options        MEMORY_DISK_DYNAMIC     # fs image don't exist in data 
> > section.
> > options         MEMORY_DISK_ROOT_SIZE=2048      # size of memory disk, in 
> > blocks
> > 
> > I think I had MEMORY_DISK_DYNAMIC active and MEMORY_DISK_ROOT_SIZE=2048
> > commented while trying a detached miniroot.
> > 
> > So, next time I'll try commenting MEMORY_DISK_IS_ROOT.


I tried this:

options         MEMORY_DISK_HOOKS
#options        MEMORY_DISK_IS_ROOT     # force root on memory disk
options         MEMORY_DISK_SERVER=0    # no userspace memory disk support
#options        MEMORY_DISK_IMAGE
options         MEMORY_DISK_DYNAMIC     # fs image don't exist in data section.
#options        MEMORY_DISK_ROOT_SIZE=2048      # size of memory disk, in blocks


 
> >From a cursory look at md_root.c and hpcsh machdep.c and autoconf.c I
> think that enabling MEMORY_DISK_DYNAMIC and disabling
> MEMORY_DISK_IS_ROOT should result in a kernel that would boot from the
> detached miniroot if one is supplied and only then, but I haven't
> tried it.


md0: internal 0 image area
rn_init: radix functions require max_keylen be set
boot device: <unknown>
root device: md0a
dump device (default md0b): 
file system (default generic): ffs
root on md0a dumps on md0b
cannot mount root, error = 22
root device (default md0a): 
dump device (default md0b): 
file system (default ffs): mfs
use one of: generic ffs msdos halt reboot
file system (default ffs): 


> The idea is that hpcboot copies the miniroot image, and tells the
> kernel it has one.  The kernel then should pick it up with
> md_root_setconf in machdep.c.
 

I think there is something not quite working here; md0: internal
0 image area? Shouldn't that be a size? My guess is that mfs_initminiroot
in mfs_vfsops.c doesn't recognize whats there. It takes more time
to load if you use a detached miniroot, so I think something gets
loaded. (Although it could be somewhere else than expected, of
course.)



On a more positive note; it works with http loading of kernel and
miniroot over ppp. (This also confirmes that the miniroot gets
loaded, see above. I can see that in the httpd access_log.) I set
the location to http://192.168.1.9 and the kernel to /netbsd.gz
and the rootfs to miniroot.fs.gz. They both end up in ram and sort
of boots anyway. For some reason I can't get my serial console. I
do remember to turn off ppp, and when I connect cu winCE thinks I
am connecting again (due to a change in a modem signal, I believe).
But no output whatsoever. I tried with setting SCICONSOLE in the
config, but no joy. I use 115200 on the serial line, but that works
if I keep my kernel on the cf.

Still, this ought to mean that it is possible to boot netbsd on a
hpcsh with only a standard serial line. Not even a cf would be
necessary. Hpcboot can be loaded to ram from winCE with internet
explorer. Not that it is a very usable system with just a miniroot,
but it is possible to boot anyway, without nothing else than what
comes with your hpcsh in the original box. (I haven't tried this.)

-- 
Christer O. Andersson
Odensbacken



Home | Main Index | Thread Index | Old Index