# # 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 # Based on work from: Jens Schmalzing # 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,37 @@ $(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 + mkdir -p $(INSTALL_MKVMLINUZ)/boot + install -m 644 ld.script $(INSTALL_MKVMLINUZ)/boot + if [ -e openfirmware/note ]; then \ + install -m 644 openfirmware/note $(INSTALL_MKVMLINUZ)/boot; \ + fi + + mkdir -p $(INSTALL_MKVMLINUZ)/lib + install -m 644 ../../../lib/lib.a $(INSTALL_MKVMLINUZ)/lib + install -m 644 lib/lib.a $(INSTALL_MKVMLINUZ)/lib/ppc.a + install -m 644 common/lib.a $(INSTALL_MKVMLINUZ)/lib/common.a + if [ -e of1275/lib.a ]; then \ + install -m 644 of1275/lib.a $(INSTALL_MKVMLINUZ)/lib/of.a; \ + fi + + if [ -e openfirmware/common.o ]; then \ + mkdir -p $(INSTALL_MKVMLINUZ)/obj/openfirmware; \ + install -m 644 openfirmware/*.o $(INSTALL_MKVMLINUZ)/obj/openfirmware; \ + rm -f $(INSTALL_MKVMLINUZ)/obj/openfirmware/image*; \ + fi + + mkdir -p $(INSTALL_MKVMLINUZ)/obj/simple + install -m 644 simple/*.o $(INSTALL_MKVMLINUZ)/obj/simple + rm -f $(INSTALL_MKVMLINUZ)/obj/simple/image*.o + + mkdir -p $(INSTALL_MKVMLINUZ)/utils + install -m 755 utils/addnote $(INSTALL_MKVMLINUZ)/utils + install -m 755 utils/hack-coff $(INSTALL_MKVMLINUZ)/utils + install -m 755 utils/mkbugboot $(INSTALL_MKVMLINUZ)/utils + install -m 755 utils/mknote $(INSTALL_MKVMLINUZ)/utils + install -m 755 utils/mkprep $(INSTALL_MKVMLINUZ)/utils + install -m 755 utils/mktree $(INSTALL_MKVMLINUZ)/utils