Subject: Re: Tips on making kernel smaller?
To: ian <cobalt@minimal.cx>
From: Matthew Luckie <kluckie@ihug.co.nz>
List: port-cobalt
Date: 11/29/2002 08:56:53
> If it helps, this is my diff which lets me use ipf and IPSEC at the
> expense of less verbose PCI and SCSI messages (the latter is less
> important as I've also dropped SCSI support).  I've also killed NFS
> but I must admit I'd like that back again - I just haven't the need
> until after xmas, so haven't tried to fit it in again.  The extra
> changes at the top do increase the image size, but let PostgreSQL
> 9from the ports tree) run without any mods.

lkm support can also be removed from the default kernel configuration. 
if lkm worked on the cobalt arch then we might be able to load the likes 
of nfs.

i read that lkm support was added for the MIPs in NetBSD many months 
ago, but it doesn't appear to have made it to the qube as there is no 
/dev/lkm node built by MAKEDEV in 1.6-R

i had a look a the kernel source to find out what major number lkm uses 
and built the node:

#!/bin/sh
cd /dev
/sbin/mknod lkm c 17 0
/usr/bin/chgrp kmem lkm
/bin/chmod 640 lkm

----

[mjl@polyprop bin]$ modstat
Type    Id  Off Loadaddr Size Info     Rev Module Name
[mjl@polyprop bin]$ sudo modload /usr/lkm/nullfs.o
ld: /usr/lkm/nullfs: Not enough room for program headers (allocated 3, 
need 4)
ld: final link failed: Bad value
modload: can't prelink `/usr/lkm/nullfs.o' creating `/usr/lkm/nullfs'

----

i'd love to see lkm support on the cobalt, but i'm not sure if i have 
the clue to finish the job.  what is LKM support like on the other MIPs 
based architectures?