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

Re: [PATCH] Install target for sparc (was: Kernel compiling)



I don't mind having to manually copy the boot file into place and such -
but it still raises the question of why wasn't the bzImage file created
during 'make' like the readme said? Will this patch correct that problem?

<EOL>
Tib

On Sat, 16 Jul 2005, Martin Habets wrote:

> On Sat, Jul 16, 2005 at 06:58:10AM -0500, Tib wrote:
> > make O=/kernel-build modules_install install
> >
> > It all runs smoothly until that last line. The modules get compiled just
> > fine, and then it bombs out saying:
> > make[1]: *** No rule to make target `install'.  Stop.
> > make: *** [install] Error 2
>
> Not all architectures support the "install" target. If you run "make help"
> it won't show up for sparc.
>
> The patch below adds an "install" target for the SPARC architecture.
> I've been using it for a while because I build several different
> architectures (and would like a consist build procedure).
> I added silo support to the official installkernel package, which is included
> in versions 2.9 of that tool.
>
> Martin
>
> 	Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>
> ---
>
> --- 2.6.8/arch/sparc/boot/install.sh.orig	2004-09-06 12:27:24.136715368 +0100
> +++ 2.6.8/arch/sparc/boot/install.sh	2004-09-04 22:44:40.000000000 +0100
> @@ -0,0 +1,45 @@
> +#!/bin/sh
> +#
> +# arch/sparc/boot/install.sh
> +#
> +# This file is subject to the terms and conditions of the GNU General Public
> +# License.  See the file "COPYING" in the main directory of this archive
> +# for more details.
> +#
> +# Copyright (C) 1995 by Linus Torvalds
> +#
> +# Blatantly stolen from in arch/i386/boot/install.sh by Martin Habets
> +#
> +# "make install" script for sparc architecture
> +#
> +# Arguments:
> +#   $1 - kernel version
> +#   $2 - kernel image file
> +#   $3 - kernel map file
> +#   $4 - default install path (blank if root directory)
> +#
> +
> +# User may have a custom install script
> +
> +if [ -x ~/bin/installkernel ]; then exec ~/bin/installkernel "$@"; fi
> +if [ -x /sbin/installkernel ]; then exec /sbin/installkernel "$@"; fi
> +
> +# Default install
> +
> +# Figure out if this is a compressed image or not.
> +target=vmlinux
> +if [ -n "`file $2 | grep -i compressed`" ];
> +then
> +	target=vmlinuz;
> +fi
> +
> +if [ -f $4/$target ]; then
> +	mv $4/$target $4/$target.old
> +fi
> +
> +if [ -f $4/System.map ]; then
> +	mv $4/System.map $4/System.old
> +fi
> +
> +cat $2 > $4/$target
> +cp $3 $4/System.map
> --- 2.6.6/arch/sparc/boot/Makefile.orig	2004-06-16 15:53:21.000000000 +0100
> +++ 2.6.6/arch/sparc/boot/Makefile	2004-06-16 19:38:49.000000000 +0100
> @@ -32,3 +32,6 @@
>
>  $(obj)/btfix.s: $(obj)/btfixupprep vmlinux FORCE
>  	$(call if_changed,btfix)
> +
> +$(obj)/install: $(obj)/image
> +	sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"
> --- 2.6.6/arch/sparc/Makefile.orig	2004-06-16 16:03:04.000000000 +0100
> +++ 2.6.6/arch/sparc/Makefile	2004-06-17 18:57:22.000000000 +0100
> @@ -52,9 +52,14 @@
>
>  boot := arch/sparc/boot
>
> -image tftpboot.img: vmlinux
> +image tftpboot.img install: vmlinux
>  	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
>
> +# This makes install trigger the modules as well.
> +ifdef CONFIG_MODULES
> +install: modules_install
> +endif
> +
>  archclean:
>  	$(Q)$(MAKE) $(clean)=$(boot)
>
> @@ -74,4 +79,8 @@
>  define archhelp
>    echo  '* image        - kernel image ($(boot)/image)'
>    echo  '  tftpboot.img - image prepared for tftp'
> +  echo  '  install      - Install kernel using'
> +  echo  '                 (your) ~/bin/installkernel or'
> +  echo  '                 (distribution) /sbin/installkernel or'
> +  echo  '                 install to $$(INSTALL_PATH)'
>  endef
>



Reply to: