Okay, using modprobe is a good idea.  I have a new patch to modutils; it
includes modprobe and is attached. 

Thanks,

-David

Mon, Jan 29, 2001 at 07:47:38PM +0100 wrote:
> Previously David Whedon wrote:
> > We're really strapped for space trying to fit all on a single floppy.  We
> > have to carefully consider the 10k that using modprobe will cost us.  Is it
> > possible for you to elaborate on why you don't want us to use insmod.  We
> > really only need it to insmod a nic module, and after that we can grab
> > anything else that we want off the net (modprobei. for example).
> 
> modprobe resolves dependencies, insmod does not. For some network
> modules that is really need: you can't load the wd driver for example
> before you load the 8130 module. modprobe will do that for, insmod does not.
> 
> Wichert.
> 
> -- 
>    ________________________________________________________________
>  / Generally uninteresting signature - ignore at your convenience  \
> | [EMAIL PROTECTED]                  http://www.liacs.nl/~wichert/ |
> | 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0  2805 3CB8 9250 2FA3 BC2D |
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
diff -ur orig/modutils-2.4.1/Makefile.common.in modutils-2.4.1/Makefile.common.in
--- orig/modutils-2.4.1/Makefile.common.in      Thu Jan  4 17:45:19 2001
+++ modutils-2.4.1/Makefile.common.in   Thu Jan 25 21:10:49 2001
@@ -9,7 +9,7 @@
 AR             = @AR@
 ARCH           = @ARCH@
 CC             = @CC@
-CFLAGS         = @CFLAGS@
+CFLAGS         = @CFLAGS@ $(UDEB_CFLAGS)
 BUILDCC                = @BUILDCC@
 BUILDCFLAGS    = @BUILDCFLAGS@
 INSTALL                = @INSTALL_LOCAL@
diff -ur orig/modutils-2.4.1/debian/control modutils-2.4.1/debian/control
--- orig/modutils-2.4.1/debian/control  Mon Jan 29 11:30:16 2001
+++ modutils-2.4.1/debian/control       Thu Jan 25 23:02:28 2001
@@ -2,6 +2,7 @@
 Section: base
 Priority: required
 Maintainer: Wichert Akkerman <[EMAIL PROTECTED]>
+Build-Depends: dpkg-dev (>= 1.7.0)
 Standards-Version: 3.2.0
 Bugs: debbugs://bugs.debian.org/
 Origin: debian
@@ -15,3 +16,11 @@
  These utilities are intended to make a Linux modular kernel
  manageable for all users, administrators and distribution
  maintainers.
+
+Package: modutils-udeb
+Section: debian-installer
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Linux module utilities for debian-installer.
+ modutils-udeb is a minimal package used by debian-installer.
+ This package contains only the binary 'insmod'.
diff -ur orig/modutils-2.4.1/debian/rules modutils-2.4.1/debian/rules
--- orig/modutils-2.4.1/debian/rules    Mon Jan 29 11:30:16 2001
+++ modutils-2.4.1/debian/rules Sat Jan 27 20:44:09 2001
@@ -4,6 +4,11 @@
 package                := modutils
 docdir         := /usr/share/doc/$(package)
 tmpdir         := $(shell pwd)/debian/tmp/
+udebtmpdir     := $(shell pwd)/debian/modutils-udeb/
+version                :=$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 
+2)
+arch           :=$(shell dpkg --print-architecture)
+priority       :=$(shell grep ^Priority: debian/control | cut -d ' ' -f 2)
+udebfilename   :=$(package)-udeb_$(version)_$(arch).udeb 
 
 stamp-config:
        mkdir -p debian/build
@@ -12,20 +17,31 @@
                --mandir='$${prefix}'/share/man
        touch stamp-config
 
+stamp-config-udeb:
+       mkdir -p debian/build-udeb
+       cd debian/build-udeb ; ../../configure --disable-root-check \
+               --disable-combined --enable-combined-modprobe
+       touch stamp-config-udeb
+
 stamp-build build: stamp-config
        cd debian/build ; $(MAKE)
        touch stamp-build
 
+stamp-build-udeb build-udeb: stamp-config-udeb
+       cd debian/build-udeb ; $(MAKE) UDEB_CFLAGS="-Os -fomit-frame-pointer"
+       touch stamp-build
+
 clean:
        test -d debian
-       rm -rf debian/build debian/tmp
+       rm -rf debian/build debian/tmp debian/build-udeb debian/modutils-udeb
        -rm -rf debian/files* debian/substvars
-       -rm -f stamp-config stamp-build
+       -rm -f stamp-config stamp-build stamp-config-udeb \
+               stamp-build-udeb debian/files~
 
 binary-indep:
        @echo Nothing to do
 
-binary-arch: checkroot stamp-build
+binary-arch: checkroot stamp-build stamp-build-udeb
        test -d debian
        -rm -rf debian/tmp
        install -d -m 755 -o root -g root debian/tmp
@@ -44,6 +60,21 @@
 
        rm -f $(tmpdir)/usr/share/man/man8/kdstat.8
 
+# Install udeb binary
+       cd debian/build-udeb ; $(MAKE) exec_prefix=$(udebtmpdir) install
+
+# Remove all the udeb doesn't need
+       rm -rf $(udebtmpdir)/usr/
+       rm -f $(udebtmpdir)/sbin/depmod \
+               $(udebtmpdir)/sbin/genksyms \
+               $(udebtmpdir)/sbin/insmod_ksymoops_clean \
+               $(udebtmpdir)/sbin/kallsyms \
+               $(udebtmpdir)/sbin/kernelversion \
+               $(udebtmpdir)/sbin/ksyms \
+               $(udebtmpdir)/sbin/lsmod \
+               $(udebtmpdir)/sbin/modinfo \
+               $(udebtmpdir)/sbin/rmmod
+
 # Do some changes for Debian
        -strip debian/tmp/sbin/*
        chmod 644 debian/tmp/usr/share/man/*/*
@@ -107,15 +138,33 @@
        install -p -m 755 -o root -g root debian/prerm debian/tmp/DEBIAN
        install -p -m 755 -o root -g root debian/postrm debian/tmp/DEBIAN
 
+# Install Debian system files for udeb
+       install -d -m 755 -o root -g root $(udebtmpdir)/DEBIAN
+       install -p -m 644 -o root -g root debian/control $(udebtmpdir)/DEBIAN
+
 # Some left-over stuff
        install -d -m 755 -o root -g root debian/tmp/usr/bin
        ln -s /sbin/genksyms debian/tmp/usr/bin/genksyms
 
+# generate modutils package
        dpkg-shlibdeps debian/tmp/sbin/*
-       dpkg-gencontrol -isp
+       dpkg-gencontrol -isp -pmodutils 
        chown -R root.root debian/tmp
        chmod -R go=rX debian/tmp
        dpkg --build debian/tmp ..
+
+# generate modutils-udeb package
+       dpkg-shlibdeps debian/modutils-udeb/sbin/*
+
+       # dpkg doesn't understand this will be a udeb, prevent it from
+       # writing an incorrent entry to debian/files
+       dpkg-gencontrol -pmodutils-udeb -Pdebian/modutils-udeb -fdebian/files~
+       
+       # register the udeb manually
+       dpkg-distaddfile $(udebfilename) \
+               debian-installer $(priority)
+       
+       dpkg --build debian/modutils-udeb ../$(udebfilename)  
 
 # Below here is fairly generic really
 

Reply via email to