sparc,sparc64: unify boot/
PATCH v2 5/5 sparc,sparc64: unify boot/
From 45bc2bdccf16c27644abefec11a30a22ad001276 Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <[email protected]>
Date: Sun, 30 Nov 2008 21:15:32 +0100
Subject: [PATCH] sparc,sparc64: unify boot/
Simple unification:
o renamed piggyback to *_32.c/*_64.c
o copied content of Makefile from sparc64 to sparc and guard it
o updated sparc/boot/.gitignore
o deleted remaining files in sparc64/boot
--- arch/sparc/Makefile | 9 +-- arch/sparc/boot/.gitignore | 3 + arch/sparc/boot/Makefile | 33 +++++++++- arch/sparc/boot/piggyback.c | 137 ---------------------------------------- arch/sparc/boot/piggyback_32.c | 137 ++++++++++++++++++++++++++++++++++++++++ arch/sparc/boot/piggyback_64.c | 109 +++++++++++++++++++++++++++++++ arch/sparc64/boot/.gitignore | 4 - arch/sparc64/boot/Makefile | 33 ---------- arch/sparc64/boot/piggyback.c | 109 ------------------------------- 9 files changed, 283 insertions(+), 291 deletions(-) delete mode 100644 arch/sparc/boot/piggyback.c create mode 100644 arch/sparc/boot/piggyback_32.c create mode 100644 arch/sparc/boot/piggyback_64.c delete mode 100644 arch/sparc64/boot/.gitignore delete mode 100644 arch/sparc64/boot/Makefile delete mode 100644 arch/sparc64/boot/piggyback.c
arch/sparc/Makefile +4 -5
@@ -89,17 +89,16 @@ ifdef CONFIG_KALLSYMS export kallsyms.o := .tmp_kallsyms2.o endif -boot-y := arch/sparc/boot -boot-$(CONFIG_SPARC64) := arch/sparc64/boot +boot := arch/sparc/boot image zImage tftpboot.img vmlinux.aout: vmlinux - $(Q)$(MAKE) $(build)=$(boot-y) $(boot-y)/$@ + $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ archclean: - $(Q)$(MAKE) $(clean)=$(boot-y) + $(Q)$(MAKE) $(clean)=$(boot) # This is the image used for packaging -KBUILD_IMAGE := $(boot-y)/zImage +KBUILD_IMAGE := $(boot)/zImage # Don't use tabs in echo arguments. ifeq ($(ARCH),sparc)
arch/sparc/boot/.gitignore +3 -0
@@ -2,4 +2,7 @@ btfix.S btfixupprep image zImage +tftpboot.img +vmlinux.aout +piggyback
arch/sparc/boot/Makefile +30 -3
@@ -6,14 +6,16 @@ ROOT_IMG := /usr/src/root.img ELFTOAOUT := elftoaout -hostprogs-y := piggyback btfixupprep -targets := tftpboot.img btfix.o btfix.S image zImage +hostprogs-y := piggyback_32 piggyback_64 btfixupprep +targets := tftpboot.img btfix.o btfix.S image zImage vmlinux.aout clean-files := System.map quiet_cmd_elftoaout = ELFTOAOUT $@ cmd_elftoaout = $(ELFTOAOUT) $(obj)/image -o $@ + +ifeq ($(CONFIG_SPARC32),y) quiet_cmd_piggy = PIGGY $@ - cmd_piggy = $(obj)/piggyback $@ $(obj)/System.map $(ROOT_IMG) + cmd_piggy = $(obj)/piggyback_32 $@ $(obj)/System.map $(ROOT_IMG) quiet_cmd_btfix = BTFIX $@ cmd_btfix = $(OBJDUMP) -x vmlinux | $(obj)/btfixupprep > $@ quiet_cmd_sysmap = SYSMAP $(obj)/System.map
@@ -62,3 +64,28 @@ $(obj)/tftpboot.img: $(obj)/piggyback $(obj)/System.map $(obj)/image FORCE $(obj)/btfix.S: $(obj)/btfixupprep vmlinux FORCE $(call if_changed,btfix) + +endif + +ifeq ($(CONFIG_SPARC64),y) +quiet_cmd_piggy = PIGGY $@ + cmd_piggy = $(obj)/piggyback_64 $@ System.map $(ROOT_IMG) +quiet_cmd_strip = STRIP $@ + cmd_strip = $(STRIP) -R .comment -R .note -K sun4u_init -K _end -K _start vmlinux -o $@ + + +# Actual linking +$(obj)/image: vmlinux FORCE + $(call if_changed,strip) + @echo ' kernel: $@ is ready' + +$(obj)/tftpboot.img: vmlinux $(obj)/piggyback_64 System.map $(ROOT_IMG) FORCE + $(call if_changed,elftoaout) + $(call if_changed,piggy) + @echo ' kernel: $@ is ready' + +$(obj)/vmlinux.aout: vmlinux FORCE + $(call if_changed,elftoaout) + @echo ' kernel: $@ is ready' +endif +
arch/sparc/boot/piggyback.c deleted +0 -137
137 lines not on this page · raw message
arch/sparc/boot/piggyback_32.c new file +137 -0
137 lines not on this page · raw message
arch/sparc/boot/piggyback_64.c new file +109 -0
109 lines not on this page · raw message
arch/sparc64/boot/.gitignore deleted +0 -4
@@ -1,4 +0,0 @@ -image -tftpboot.img -vmlinux.aout -piggyback
arch/sparc64/boot/Makefile deleted +0 -33
@@ -1,33 +0,0 @@ -# Makefile for the Sparc64 boot stuff. -# -# Copyright (C) 1995 David S. Miller ([email protected]) -# Copyright (C) 1997 Jakub Jelinek ([email protected]) - -ROOT_IMG := /usr/src/root.img -ELFTOAOUT := elftoaout - -hostprogs-y := piggyback -targets := image tftpboot.img vmlinux.aout - -quiet_cmd_elftoaout = ELF2AOUT $@ - cmd_elftoaout = $(ELFTOAOUT) vmlinux -o $@ -quiet_cmd_piggy = PIGGY $@ - cmd_piggy = $(obj)/piggyback $@ System.map $(ROOT_IMG) -quiet_cmd_strip = STRIP $@ - cmd_strip = $(STRIP) -R .comment -R .note -K sun4u_init -K _end -K _start vmlinux -o $@ - - -# Actual linking -$(obj)/image: vmlinux FORCE - $(call if_changed,strip) - @echo ' kernel: $@ is ready' - -$(obj)/tftpboot.img: vmlinux $(obj)/piggyback System.map $(ROOT_IMG) FORCE - $(call if_changed,elftoaout) - $(call if_changed,piggy) - @echo ' kernel: $@ is ready' - -$(obj)/vmlinux.aout: vmlinux FORCE - $(call if_changed,elftoaout) - @echo ' kernel: $@ is ready' -
arch/sparc64/boot/piggyback.c deleted +0 -109
109 lines not on this page · raw message
Signature · 1 line
1.5.6.GIT
David Miller
maintainerFrom: Sam Ravnborg <[email protected]>
Date: Wed, 3 Dec 2008 21:00:44 +0100
BTW:
Quoted 11 lines
arch/sparc/boot/Makefile +11
-0+ifeq ($(CONFIG_SPARC64),y) +quiet_cmd_piggy = PIGGY $@ + cmd_piggy = $(obj)/piggyback_64 $@ System.map $(ROOT_IMG) +quiet_cmd_strip = STRIP $@ + cmd_strip = $(STRIP) -R .comment -R .note -K sun4u_init -K _end -K _start vmlinux -o $@ + + +# Actual linking +$(obj)/image: vmlinux FORCE + $(call if_changed,strip) + @echo ' kernel: $@ is ready'
arch/sparc/boot/Makefile $(obj)/tftpboot.img: $(obj)/piggyback $(obj)/System.map $(obj)/image FORCE · line 90
Quoted 10 lines
arch/sparc/boot/Makefile +10
-0+ +$(obj)/tftpboot.img: vmlinux $(obj)/piggyback_64 System.map $(ROOT_IMG) FORCE + $(call if_changed,elftoaout) + $(call if_changed,piggy) + @echo ' kernel: $@ is ready' + +$(obj)/vmlinux.aout: vmlinux FORCE + $(call if_changed,elftoaout) + @echo ' kernel: $@ is ready' +endif
This is one of the things I had to fix up when I applied these patches. Those linking rules need to have initial tabs not spaces before the commands to be run, or else the build breaks.
I guess you didn't do any "make image" testing, or did you? :-)
But don't worry I fixed that up in my tree when I applied these patches and I dealt with the conflict too already.
Quoted 31 lines · David Miller
From: Sam Ravnborg <[email protected]>
Date: Wed, 3 Dec 2008 21:00:44 +0100BTW:
Quoted 11 lines
arch/sparc/boot/Makefile +11
-0+ifeq ($(CONFIG_SPARC64),y) +quiet_cmd_piggy = PIGGY $@ + cmd_piggy = $(obj)/piggyback_64 $@ System.map $(ROOT_IMG) +quiet_cmd_strip = STRIP $@ + cmd_strip = $(STRIP) -R .comment -R .note -K sun4u_init -K _end -K _start vmlinux -o $@ + + +# Actual linking +$(obj)/image: vmlinux FORCE + $(call if_changed,strip) + @echo ' kernel: $@ is ready'arch/sparc/boot/Makefile $(obj)/tftpboot.img: $(obj)/piggyback $(obj)/System.map $(obj)/image FORCE · line 90
Quoted 10 lines
arch/sparc/boot/Makefile +10
-0+ +$(obj)/tftpboot.img: vmlinux $(obj)/piggyback_64 System.map $(ROOT_IMG) FORCE + $(call if_changed,elftoaout) + $(call if_changed,piggy) + @echo ' kernel: $@ is ready' + +$(obj)/vmlinux.aout: vmlinux FORCE + $(call if_changed,elftoaout) + @echo ' kernel: $@ is ready' +endifThis is one of the things I had to fix up when I applied these patches. Those linking rules need to have initial tabs not spaces before the commands to be run, or else the build breaks.
Quoted 1 line
I guess you didn't do any "make image" testing, or did you? :-)
Right - I just did "make".
Quoted 3 lines
But don't worry I fixed that up in my tree when I applied these patches and I dealt with the conflict too already.
Thanks!
Sam