Commit 059edde4 authored by Sam Ravnborg's avatar Sam Ravnborg Committed by David S. Miller

[SPARC64]: Use kbuild more consistently, add archhelp target.

parent 344fb053
......@@ -33,7 +33,7 @@ AS := $(AS) -64
LDFLAGS := -m elf64_sparc
LDFLAGS_BLOB := --format binary --oformat elf64-sparc
endif
ELFTOAOUT = elftoaout
ifneq ($(UNDECLARED_REGS),y)
CC_UNDECL =
else
......@@ -63,13 +63,11 @@ core-$(CONFIG_SOLARIS_EMUL) += arch/sparc64/solaris/
core-y += arch/sparc64/math-emu/
libs-y += arch/sparc64/prom/ arch/sparc64/lib/
vmlinux.aout: vmlinux
$(ELFTOAOUT) -o $(TOPDIR)/vmlinux.aout $(TOPDIR)/vmlinux
makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/sparc64/boot $(1)
archclean:
rm -f $(TOPDIR)/vmlinux.aout
tftpboot.img vmlinux.aout:
$(call makeboot,arch/sparc64/boot/$@)
archmrproper:
archclean:
tftpboot.img:
$(MAKE) -C arch/sparc64/boot tftpboot.img
......@@ -4,17 +4,27 @@
# Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
# Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
ROOT_IMG =/usr/src/root.img
ELFTOAOUT =elftoaout
ROOT_IMG := /usr/src/root.img
ELFTOAOUT := elftoaout
all: boot
host-progs := piggyback
EXTRA_TARGETS := tftpboot.img vmlinux.aout
boot:
@echo "Nothing special to be done for 'boot' on Linux/UltraSPARC."
quiet_cmd_elftoaout = ELT2AOUT $@
cmd_elftoaout = $(ELFTOAOUT) vmlinux -o $@
quiet_cmd_piggy = PIGGY $@
cmd_piggy = $(obj)/piggyback $@ System.map $(ROOT_IMG)
tftpboot.img: piggyback $(TOPDIR)/vmlinux $(ROOT_IMG)
$(ELFTOAOUT) $(TOPDIR)/vmlinux -o tftpboot.img
./piggyback tftpboot.img $(TOPDIR)/System.map $(ROOT_IMG)
$(obj)/tftpboot.img: $(obj)/piggyback System.map vmlinux $(ROOT_IMG) FORCE
$(call if_changed,elftoaout)
$(call if_changed,piggy)
@echo ' kernel: $@ is ready'
piggyback: piggyback.c
$(HOSTCC) $(HOSTCFLAGS) -o piggyback piggyback.c
$(obj)/vmlinux.aout: vmlinux FORCE
$(call if_changed,elftoaout)
@echo ' kernel: $@ is ready'
archhelp:
@echo '* vmlinux - Standard sparc64 kernel'
@echo ' vmlinux.aout - a.out kernel for sparc64'
@echo ' tftpboot.img - Image prepared for tftp'
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