[Pkg-mol-commits] r20 - in mol/trunk/debian: . patches

Gaudenz Steinlin gaudenz at costa.debian.org
Sat Aug 19 21:02:45 UTC 2006


Author: gaudenz
Date: 2006-08-19 21:02:44 +0000 (Sat, 19 Aug 2006)
New Revision: 20

Added:
   mol/trunk/debian/patches/Makefile_kmod.dpatch
Modified:
   mol/trunk/debian/Makefile.mol-modules-source
   mol/trunk/debian/patches/00list
   mol/trunk/debian/rules
Log:

- fix src/kmod/Linux/Makefile to not try to write /tmp-offset.h
- use plain kbuild to build the kernel moules in the mol-modules-source package
  instead of parts of the mol build system
- prepare the build directories for the kmod and netdriver during the mol build
- adapt Makefile.mol-modules-source to use kbuild


Modified: mol/trunk/debian/Makefile.mol-modules-source
===================================================================
--- mol/trunk/debian/Makefile.mol-modules-source	2006-08-19 20:55:39 UTC (rev 19)
+++ mol/trunk/debian/Makefile.mol-modules-source	2006-08-19 21:02:44 UTC (rev 20)
@@ -8,6 +8,9 @@
 # package mol-modules-source to allow users to build modules for
 # custom kernels, while using a binary package for the rest of the
 # emulator.
+#
+# rewritten by Gaudenz Steinlin <gaudenz at debian.org> for the changed 
+# mol build system.
 
 # Sun, 19 Oct 2003
 
@@ -19,36 +22,30 @@
 export KVERS KSRC
 
 INSTALL	?= install
-MODDIR	?= $(DESTDIR)/lib/modules/$(KVERS)/misc
-export INSTALL MODDIR
+export INSTALL 
 
-# upstream Makefiles and scripts expect the kernel tree here
-KERNEL_SOURCE=$(KSRC)
-export KERNEL_SOURCE
-
 # module source directories
-SUBDIRS	= src/kmod src/netdriver
+SUBDIRS	= kmod netdriver
 
-# intermediate module install directory
-MOLLIB	= mollib
+# build sheep driver by default as module
+BUILD_SHEEP = m
+export BUILD_SHEEP
 
 # descend into subdirectories and build modules
 .PHONY:	$(SUBDIRS)
 build:	$(SUBDIRS)
 $(SUBDIRS):
-	-$(MAKE) -C $@
+	-$(MAKE) -C $(KSRC) M=`pwd`/$@
 
-# install the modules
-install:
-	$(INSTALL) -d -m 755 -o 0 $(MODDIR)
-	for file in `find $(MOLLIB) -type f`; do \
-		$(INSTALL) -m 644 -o 0 $$file $(MODDIR); \
-	done
+# descend into subdirectories and install the modules
+.PHONY: $(SUBDIRS:=-install)
+install: build $(SUBDIRS:=-install)
+$(SUBDIRS:=-install): 
+	-$(MAKE) -C $(KSRC) M=`pwd`/$@ modules_install
 
 # descend into subdirectories and clean up
 .PHONY:	$(SUBDIRS:=-clean)
 clean:	$(SUBDIRS:=-clean)
-	rm -rf $(MOLLIB)
 $(SUBDIRS:=-clean):
-	$(MAKE) -C $(subst -clean,,$@) clean
+	$(MAKE) -C $(KSRC) M=`pwd`/$@ clean
 

Modified: mol/trunk/debian/patches/00list
===================================================================
--- mol/trunk/debian/patches/00list	2006-08-19 20:55:39 UTC (rev 19)
+++ mol/trunk/debian/patches/00list	2006-08-19 21:02:44 UTC (rev 20)
@@ -2,3 +2,4 @@
 Makefile
 modload
 if-tap
+Makefile_kmod

Added: mol/trunk/debian/patches/Makefile_kmod.dpatch
===================================================================
--- mol/trunk/debian/patches/Makefile_kmod.dpatch	2006-08-19 20:55:39 UTC (rev 19)
+++ mol/trunk/debian/patches/Makefile_kmod.dpatch	2006-08-19 21:02:44 UTC (rev 20)
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## Makefile-kmod.dpatch by  <gaudenz at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Define variable T in kmod Makefile if not defined
+
+ at DPATCH@
+diff -urNad mol-0.9.71~pre8~/src/kmod/Linux/Makefile.26 mol-0.9.71~pre8/src/kmod/Linux/Makefile.26
+--- mol-0.9.71~pre8~/src/kmod/Linux/Makefile.26	2005-10-10 03:22:50.000000000 +0200
++++ mol-0.9.71~pre8/src/kmod/Linux/Makefile.26	2006-08-19 17:56:49.000000000 +0200
+@@ -11,6 +11,7 @@
+ PERFOBJS	= $(addprefix $(obj)/, $(PERFOBJS_))
+ MOL_ASMFLAGS	= $(CPPFLAGS) $(ASMFLAGS) $(INCLUDES) -D__ASSEMBLY__
+ 
++T ?= /tmp
+ 
+ $(obj)/_traps.o:	$(src)/asm_offsets.h $(src)/traps.S $(src)/*.S $(src)/*.h
+ 


Property changes on: mol/trunk/debian/patches/Makefile_kmod.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Modified: mol/trunk/debian/rules
===================================================================
--- mol/trunk/debian/rules	2006-08-19 20:55:39 UTC (rev 19)
+++ mol/trunk/debian/rules	2006-08-19 21:02:44 UTC (rev 20)
@@ -35,6 +35,10 @@
 # build the package
 	$(MAKE) BUILD_MODS=n NETDRIVER=n $(DEBIANFLAGS)
 
+# setup the build structure for the kernel modules
+	KERNEL_SOURCE=/lib/modules/`uname -r`/build  $(MAKE) -C src/kmod/Linux/ setup-common
+	$(MAKE) -C src/netdriver/ setup-tree-common
+
 	touch build-stamp
 
 clean: clean-patched unpatch
@@ -57,6 +61,7 @@
 #	cd config/kconfig; rm -rf zconf-y.c zconf-y.h zconf-l.c .autoinclude
 
 # remove the modules source directory and tarball
+# written by Jens Schmalzing <jensen at debian.org> for the Debian
 	rm -rf modules
 	rm -f mol-modules.tar.gz
 
@@ -81,11 +86,9 @@
 	convert -depth 8 -size 100x122 -frame 14x3 -mattecolor '#ffffce' -scale 25% rgb:`pwd`/mollib/graphics/bootlogo.raw `pwd`/debian/mol/usr/share/pixmaps/mol.xpm
 
 # put together the mol-modules-source package by copying the relevant code
-	mkdir -p modules/mol/src modules/mol/scripts
-	cp -pr src/kmod src/netdriver src/shared src/include modules/mol/src
-	cp -pr scripts/kernelsrc scripts/mol_uname modules/mol/scripts
-	cp -pr config modules/mol
-#	cp -pr .config .inc-ppc modules/mol
+	mkdir -p modules/mol/kmod modules/mol/netdriver
+	-cp -L obj-ppc/build/src/kmod/* modules/mol/kmod
+	-cp -L obj-ppc/build/src/netdriver/* modules/mol/netdriver
 
 # add the Debian directory and the top-level Makefile
 	cp -pr debian/debian.mol-modules-source modules/mol/debian




More information about the Pkg-mol-commits mailing list