Commit 349101da authored by Martin Habets's avatar Martin Habets Committed by David S. Miller

sparc: Add target for a stripped kernel

Add a target for a stripped kernel. This is used for the various
packaging targets (*-pkg).
Signed-off-by: default avatarMartin Habets <errandir_news@mph.eclipse.co.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a39f2f46
...@@ -52,20 +52,24 @@ endif ...@@ -52,20 +52,24 @@ endif
export INIT_Y CORE_Y DRIVERS_Y NET_Y LIBS_Y HEAD_Y kallsyms.o export INIT_Y CORE_Y DRIVERS_Y NET_Y LIBS_Y HEAD_Y kallsyms.o
# Default target # Default target
all: image all: zImage
boot := arch/sparc/boot boot := arch/sparc/boot
image tftpboot.img: vmlinux image zImage tftpboot.img: vmlinux
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
archclean: archclean:
$(Q)$(MAKE) $(clean)=$(boot) $(Q)$(MAKE) $(clean)=$(boot)
# This is the image used for packaging
KBUILD_IMAGE := $(boot)/zImage
CLEAN_FILES += arch/$(ARCH)/boot/System.map CLEAN_FILES += arch/$(ARCH)/boot/System.map
# Don't use tabs in echo arguments. # Don't use tabs in echo arguments.
define archhelp define archhelp
echo '* image - kernel image ($(boot)/image)' echo '* image - kernel image ($(boot)/image)'
echo '* zImage - stripped kernel image ($(boot)/zImage)'
echo ' tftpboot.img - image prepared for tftp' echo ' tftpboot.img - image prepared for tftp'
endef endef
...@@ -19,6 +19,9 @@ quiet_cmd_sysmap = SYSMAP $(obj)/System.map ...@@ -19,6 +19,9 @@ quiet_cmd_sysmap = SYSMAP $(obj)/System.map
cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap
quiet_cmd_image = LD $@ quiet_cmd_image = LD $@
cmd_image = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) -o $@ cmd_image = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) -o $@
quiet_cmd_strip = STRIP $@
cmd_strip = $(STRIP) -R .comment -R .note -K sun4u_init -K _end -K _start $(obj)/image -o $@
define rule_image define rule_image
$(if $($(quiet)cmd_image), \ $(if $($(quiet)cmd_image), \
...@@ -49,6 +52,9 @@ LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds $(BTOBJS) \ ...@@ -49,6 +52,9 @@ LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds $(BTOBJS) \
$(obj)/image: $(obj)/btfix.o FORCE $(obj)/image: $(obj)/btfix.o FORCE
$(call if_changed_rule,image) $(call if_changed_rule,image)
$(obj)/zImage: $(obj)/image
$(call if_changed,strip)
$(obj)/tftpboot.img: $(obj)/piggyback $(obj)/System.map $(obj)/image FORCE $(obj)/tftpboot.img: $(obj)/piggyback $(obj)/System.map $(obj)/image FORCE
$(call if_changed,elftoaout) $(call if_changed,elftoaout)
$(call if_changed,piggy) $(call if_changed,piggy)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment