Subject: Re: Tests of mdsetimage -s
To: Marcin Jessa <lists@yazzy.org>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-embed
Date: 04/02/2005 01:04:32
On Fri, 1 Apr 2005, Marcin Jessa wrote:
> Compiling kernel with MEMORY_DISK_ROOT_SIZE=100000 gives me kernel 51M of size.
> Kernel with MEMORY_DISK_ROOT_SIZE=10000 is 6.9M of size.
...
> # makefs -s 11m custom.img image
> # mdsetimage -v -s netbsd custom.img
> got symbols from netbsd
> mapped netbsd
> mdsetimage: fs image (11534336 bytes) too big for buffer (5120000 bytes)
>
> Looks like -s cannot dynamically change the value of MEMORY_DISK_ROOT_SIZE.
> If the image is bigger than reserved space, it will get rejected.
> I suppose it tells kernel the size of your image if it's smaller than the reserved kernel space.
>
> man mdsetimage
>     If the -s flags is given, mdsetimage will write back the actual disk
>     image size back into kernel.

As far as I understand, this is to reserve a lot of space first 
(MEMORY_DISK_ROOT_SIZE), and then later tell the kernel how much space 
really to allocate. Try embedding your 11MB filesystem in the 51MB kernel.


  - Hubert

-- 
NetBSD - Free AND Open!      (And of course secure, portable, yadda yadda)