sparc: fix tftpboot.img for sparc64 on little-endian host
piggyback_32 adapted to support sparc64: - locating "HdrS" differs for sparc and sparc64 - sparc64 updates a_text, a_data + a_bss in the final a.out header Updated Makefile to use piggyback_32 for sparc64. Deleted the now unused piggyback_64.c piggyback_32.c is host endian neutral and works on both little-endian and big-endian hosts. This fixes a long standing bug where sparc64 could not generate tftpboot.img on a x86 host. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

orang tua
a020bb17b7
melakukan
1075c4ef70
@@ -6,7 +6,7 @@
|
||||
ROOT_IMG := /usr/src/root.img
|
||||
ELFTOAOUT := elftoaout
|
||||
|
||||
hostprogs-y := piggyback_32 piggyback_64 btfixupprep
|
||||
hostprogs-y := piggyback_32 btfixupprep
|
||||
targets := tftpboot.img btfix.o btfix.S image zImage vmlinux.aout
|
||||
clean-files := System.map
|
||||
|
||||
@@ -69,7 +69,7 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_SPARC64),y)
|
||||
quiet_cmd_piggy = PIGGY $@
|
||||
cmd_piggy = $(obj)/piggyback_64 $@ System.map $(ROOT_IMG)
|
||||
cmd_piggy = $(obj)/piggyback_32 $(BITS) $@ System.map $(ROOT_IMG)
|
||||
quiet_cmd_strip = STRIP $@
|
||||
cmd_strip = $(STRIP) -R .comment -R .note -K sun4u_init -K _end -K _start vmlinux -o $@
|
||||
|
||||
@@ -82,7 +82,7 @@ $(obj)/image: vmlinux FORCE
|
||||
$(obj)/zImage: $(obj)/image
|
||||
$(call if_changed,gzip)
|
||||
|
||||
$(obj)/tftpboot.img: $(obj)/image $(obj)/piggyback_64 System.map $(ROOT_IMG) FORCE
|
||||
$(obj)/tftpboot.img: $(obj)/image $(obj)/piggyback_32 System.map $(ROOT_IMG) FORCE
|
||||
$(call if_changed,elftoaout)
|
||||
$(call if_changed,piggy)
|
||||
@echo ' kernel: $@ is ready'
|
||||
|
Reference in New Issue
Block a user