linux/debian/patches-debian/powerpc-mkvmlinuz-support.p...

55 lines
2.9 KiB
Diff

#
# Mkvmlinuz support patch, called by debian's kernel-package to generate
# the files needed by mkvmlinuz to generate the bootable images from vmlinux.
# Author: Sven Luther <luther@debian.org>
# Based on work from: Jens Schmalzing <jensen@debian.org>
# Original comment from Jens :
# This shell script is intended to be put into the debian subdirectory
# of a Linux kernel tree, where make-kpkg will find and execute it
# while building a kernel-image package. The purpose of this script
# is to add glue (object code, libraries, utilities and so on) from
# the kernel tree to the kernel-image package. Later, the mkvmlinuz
# utility, which is available as a separate Debian package, can use
# this glue to create a bootable compressed kernel from the
# uncompressed kernel in the kernel-image package and optionally a
# ramdisk. This is especially important on PowerPC subarchitectures
# that don't have a boot loader, but also comes handy for rescue
# systems and the like.
# Upstream status: well, this is a debian specific hack, it would be nice
# if it was going upstream, but probably not in this form.
#
--- linux-kernel-2.6.12-2.6.12/arch/ppc/boot/Makefile.orig 2005-07-15 12:46:28.000000000 +0000
+++ linux-kernel-2.6.12-2.6.12/arch/ppc/boot/Makefile 2005-07-15 12:55:56.000000000 +0000
@@ -32,3 +32,31 @@
$(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \
$(addprefix $(obj)/,$(hostprogs-y))
$(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
+
+mkvmlinuz_support_install:
+ # mkvmlinuz support, based on work done originally by Jens Schmalzing <jensen@debian.org>
+ mkdir -p $(INSTALL_MKVMLINUZ)/boot
+ install -m 644 -o root -g root ld.script openfirmware/note $(INSTALL_MKVMLINUZ)/boot
+
+ mkdir -p $(INSTALL_MKVMLINUZ)/lib
+ install -m 644 -o root -g root ../../../lib/lib.a $(INSTALL_MKVMLINUZ)/lib
+ install -m 644 -o root -g root lib/lib.a $(INSTALL_MKVMLINUZ)/lib/ppc.a
+ install -m 644 -o root -g root common/lib.a $(INSTALL_MKVMLINUZ)/lib/common.a
+ install -m 644 -o root -g root of1275/lib.a $(INSTALL_MKVMLINUZ)/lib/of.a
+
+ mkdir -p $(INSTALL_MKVMLINUZ)/obj/openfirmware
+ install -m 644 -o root -g root openfirmware/*.o $(INSTALL_MKVMLINUZ)/obj/openfirmware
+ rm -f $(INSTALL_MKVMLINUZ)/obj/openfirmware/image*
+
+ mkdir -p $(INSTALL_MKVMLINUZ)/obj/simple
+ install -m 644 -o root -g root simple/*.o $(INSTALL_MKVMLINUZ)/obj/simple
+ rm -f $(INSTALL_MKVMLINUZ)/obj/simple/image*.o
+
+ mkdir -p $(INSTALL_MKVMLINUZ)/utils
+ install -m 755 -o root -g root utils/addnote $(INSTALL_MKVMLINUZ)/utils
+ install -m 755 -o root -g root utils/hack-coff $(INSTALL_MKVMLINUZ)/utils
+ install -m 755 -o root -g root utils/mkbugboot $(INSTALL_MKVMLINUZ)/utils
+ install -m 755 -o root -g root utils/mknote $(INSTALL_MKVMLINUZ)/utils
+ install -m 755 -o root -g root utils/mkprep $(INSTALL_MKVMLINUZ)/utils
+ install -m 755 -o root -g root utils/mktree $(INSTALL_MKVMLINUZ)/utils
+