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

Re: Kernel compilation



Hi,
Manoj Srivastava <srivasta@datasync.com> wrote:
>      v) Several other kernel module packages are hooked into
>         kernel-package, so one can seamlessly compile, say, pcmcia
>         modules at the same time as one compiles a kernel, and be
>         assured that the modules so compiled are compatible.

>>"MS" == masoto@uniandes.edu.co write:
MS> Hmmmm...  Probably I haven't done my homework correctly and so I'm not aware
MS> of the most recent innovations in Debian technology, but, could you please
MS> explain me (or point me to the explanation of) how to hook my own kernel
MS> module package to make-kpkg?

>From the make-kpkg man page: (talking about legal targets)
______________________________________________________________________
       modules
              This target allows you to build all add-on  modules
              and packages that are very dependent on the precise
              kernel version they are compiled for  at  the  same
              time  you  build  your  kernel  image.  This target
              expects to  find  the  modules  or  packages  under
              /usr/src/modules,  and,  for  all such directories,
              changes to /usr/src/modules/x, and runs  the  kdist
              rule  in  the  local debian.rules file. This target
              should create the Debian module package(s), and may
              also  produce  a  compressed  tar  file, and a com­
              pressed diff  file,  with  md5sums  recorded  in  a
              changes  file  using  dpkg-genchanges.  The file is
              signed by the same identity that would be  used  to
              sign the kernel packages.

       modules_config
              This  target  allows  you to configure all packages
              under /usr/src/modules.

       modules_image
              This target allows you to build all packages  under
              /usr/src/modules, but does not create the source or
              diff files, and does not create and sign a  changes
              file.

______________________________________________________________________

	From the README file:
______________________________________________________________________

        At the moment, the user modifiable variables supported are:
maintainer:     Local kernel-* package maintainer
email:          The email address of that person.
pgp:            Name to search for in the pgp database _iff_ separate
                modules (like pcmcia etc) are being built in
                /usr/src/modules/*. Can be set from environment
                variable PGP_SIGNATURE. Defaults to maintainer.
______________________________________________________________________

>From the /usr/lib/kernel-package/rules file:
______________________________________________________________________
	[...]
MODULE_LOC := /usr/src/modules
	[...]
# define MODULES_ENABLED if appropriate
ifneq ($(strip $(shell egrep ^[^\#]*CONFIG_MODULES $(CONFIG_FILE))),)
MODULES_ENABLED = yes
endif

	[...]
# Include any site specific overrides here.
-include $(CONFLOC)

# Over ride the config file from the environment/command line
ifneq ($(strip $(KPKG_MAINTAINER)),)
maintainer=$(KPKG_MAINTAINER)
endif

ifneq ($(strip $(KPKG_EMAIL)),)
email=$(KPKG_EMAIL)
endif

ifneq ($(strip $(PGP_SIGNATURE)),)
pgp=$(PGP_SIGNATURE)
endif

	[...]

# only generate module image packages
modules-image modules_image: configure
ifndef MODULES_ENABLED
        @echo Modules not configured, so not making modules_image
else
        -for module in $(MODULE_LOC)/* ; do \
            (cd $$module; \
              ./debian/rules KVERS="$(version)" KSRC="$(SRCTOP)" \
                             KMAINT="$(pgp)" kdist_image; ); \
        done
endif

# generate the modules packages and sign them with dchanges
modules: configure
ifndef MODULES_ENABLED
        @echo Modules not configured, so not making modules
else
        -for module in $(MODULE_LOC)/* ; do \
            (cd $$module; \
              ./debian/rules KVERS="$(version)" KSRC="$(SRCTOP)" \
                             KMAINT="$(pgp)" kdist; ); \
        done
endif

modules-config modules_config: configure
ifndef MODULES_ENABLED
        @echo Modules not configured, so not making modules_config
else
        -for module in $(MODULE_LOC)/* ; do \
            (cd $$module; \
              ./debian/rules KVERS="$(version)" KSRC="$(SRCTOP)" \
                             KMAINT="$(pgp)" kdist_configure; ); \
        done
endif

	[...]
______________________________________________________________________


MS> I'm the maintainer of the ultra package, a kernel module for the well known
MS> Gravis Ultrasound family of sound cards.  I've been having a hard time these
MS> days trying to develop a simple means for people to compile the ultra kernel
MS> module for whatever kernel version they have.  I'm not very satisfied with
MS> what I have achieved so far, so, if I just could hook something into
MS> kernel-package... well, that would really make thinks a lot easier for me!

	Hope that helped.

	manoj

--
 "Civilisation is the art of living in towns of such size that
 everyone does not know everyone else." Julian Jaynes
Manoj Srivastava  <srivasta@acm.org> <http://www.datasync.com/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E

--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org .
Trouble?  e-mail to templin@bucknell.edu .


Reply to: