* [PATCH] Support UML and make O= when building Debian packages
@ 2005-07-16 5:51 Ryan Anderson
2005-07-16 9:39 ` Sam Ravnborg
0 siblings, 1 reply; 2+ messages in thread
From: Ryan Anderson @ 2005-07-16 5:51 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Linux Kernel
Support UML builds and make O= when building Debian packages.
Sam, I'm pretty sure I've sent this before, but it seems to have been
dropped. I've been using this for a while to build my personal kernels,
and haven't had any problems. This is a combination of old patches.
Signed-Off-By: Ryan Anderson <ryan@michonline.com>
Index: linux-git/scripts/package/builddeb
===================================================================
--- linux-git.orig/scripts/package/builddeb 2005-07-16 01:35:52.000000000 -0400
+++ linux-git/scripts/package/builddeb 2005-07-16 01:38:22.000000000 -0400
@@ -14,18 +14,37 @@ set -e
# Some variables and settings used throughout the script
version=$KERNELRELEASE
tmpdir="$objtree/debian/tmp"
+packagename=linux-$version
+
+if [ "$ARCH" == "um" ] ; then
+ packagename=user-mode-linux-$version
+fi
# Setup the directory structure
rm -rf "$tmpdir"
mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot"
+if [ "$ARCH" == "um" ] ; then
+ mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/share/doc/$packagename" "$tmpdir/usr/bin"
+fi
# Build and install the kernel
-cp System.map "$tmpdir/boot/System.map-$version"
-cp .config "$tmpdir/boot/config-$version"
-cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"
+if [ "$ARCH" == "um" ] ; then
+ cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map"
+ cp .config "$tmpdir/usr/share/doc/$packagename/config"
+ gzip "$tmpdir/usr/share/doc/$packagename/config"
+ cp $KBUILD_IMAGE "$tmpdir/usr/bin/linux-$version"
+else
+ cp System.map "$tmpdir/boot/System.map-$version"
+ cp .config "$tmpdir/boot/config-$version"
+ cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"
+fi
if grep -q '^CONFIG_MODULES=y' .config ; then
- INSTALL_MOD_PATH="$tmpdir" make modules_install
+ INSTALL_MOD_PATH="$tmpdir" make KBUILD_SRC= modules_install
+ if [ "$ARCH" == "um" ] ; then
+ mv "$tmpdir/lib/modules/$version"/* "$tmpdir/usr/lib/uml/modules/$version/"
+ rmdir "$tmpdir/lib/modules/$version"
+ fi
fi
# Install the maintainer scripts
@@ -53,6 +72,8 @@ linux ($version) unstable; urgency=low
EOF
# Generate a control file
+if [ "$ARCH" == "um" ]; then
+
cat <<EOF > debian/control
Source: linux
Section: base
@@ -60,12 +81,34 @@ Priority: optional
Maintainer: $name
Standards-Version: 3.6.1
-Package: linux-$version
+Package: $packagename
+Architecture: any
+Description: User Mode Linux kernel, version $version
+ User-mode Linux is a port of the Linux kernel to its own system call
+ interface. It provides a kind of virtual machine, which runs Linux
+ as a user process under another Linux kernel. This is useful for
+ kernel development, sandboxes, jails, experimentation, and
+ many other things.
+ .
+ This package contains the Linux kernel, modules and corresponding other
+ files version $version
+EOF
+
+else
+cat <<EOF > debian/control
+Source: linux
+Section: base
+Priority: optional
+Maintainer: $name
+Standards-Version: 3.6.1
+
+Package: $packagename
Architecture: any
Description: Linux kernel, version $version
This package contains the Linux kernel, modules and corresponding other
- files version $version.
+ files version $version
EOF
+fi
# Fix some ownership and permissions
chown -R root:root "$tmpdir"
Index: linux-git/scripts/package/Makefile
===================================================================
--- linux-git.orig/scripts/package/Makefile 2005-07-16 01:35:52.000000000 -0400
+++ linux-git/scripts/package/Makefile 2005-07-16 01:38:22.000000000 -0400
@@ -59,7 +59,7 @@ $(objtree)/binkernel.spec: $(MKSPEC) $(s
$(CONFIG_SHELL) $(MKSPEC) prebuilt > $@
binrpm-pkg: $(objtree)/binkernel.spec
- $(MAKE)
+ $(MAKE) KBUILD_SRC=
set -e; \
$(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
set -e; \
@@ -74,7 +74,7 @@ clean-files += $(objtree)/binkernel.spec
#
.PHONY: deb-pkg
deb-pkg:
- $(MAKE)
+ $(MAKE) KBUILD_SRC=
$(CONFIG_SHELL) $(srctree)/scripts/package/builddeb
clean-dirs += $(objtree)/debian/
--
Ryan Anderson
sometimes Pug Majere
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Support UML and make O= when building Debian packages
2005-07-16 5:51 [PATCH] Support UML and make O= when building Debian packages Ryan Anderson
@ 2005-07-16 9:39 ` Sam Ravnborg
0 siblings, 0 replies; 2+ messages in thread
From: Sam Ravnborg @ 2005-07-16 9:39 UTC (permalink / raw)
To: Ryan Anderson; +Cc: Linux Kernel
On Sat, Jul 16, 2005 at 01:51:51AM -0400, Ryan Anderson wrote:
> Support UML builds and make O= when building Debian packages.
>
> Sam, I'm pretty sure I've sent this before, but it seems to have been
> dropped. I've been using this for a while to build my personal kernels,
> and haven't had any problems. This is a combination of old patches.
I have just recently got my setup functional again - and your old
patches has been included in my kbuild.git repository at kernel.org.
Andrew Morton sucks it into -mm and it should include your changes.
I plan to push upstream only when Linus has released his next kernel (not
-rc).
Sam
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-07-16 8:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-16 5:51 [PATCH] Support UML and make O= when building Debian packages Ryan Anderson
2005-07-16 9:39 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®