diff options
author | Matt Redfearn <matt.redfearn@imgtec.com> | 2016-11-10 10:02:13 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2017-01-03 16:34:37 +0100 |
commit | 44079d3509aee89c58f3e4fd929fa53ab2299019 (patch) | |
tree | 8ab4c5c497f6568b0729889e24005bad459145e6 /arch/mips/Makefile.postlink | |
parent | 096a0de427ea333f56f0ee00328cff2a2731bcf1 (diff) | |
download | blackbird-obmc-linux-44079d3509aee89c58f3e4fd929fa53ab2299019.tar.gz blackbird-obmc-linux-44079d3509aee89c58f3e4fd929fa53ab2299019.zip |
MIPS: Use Makefile.postlink to insert relocations into vmlinux
When relocatable support for MIPS was merged, there was no support for
an architecture to add a postlink step for vmlinux. This meant that only
invoking a target within the boot directory, such as uImage, caused the
relocations to be inserted into vmlinux. Building just the vmlinux
target would result in a relocatable kernel with no relocation
information present.
Commit fbe6e37dab97 ("kbuild: add arch specific post-link Makefile")
recified this situation, so MIPS can now define a postlink step to add
relocation information into vmlinux, and remove the additional steps
tacked onto boot targets.
Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Tested-by: Steven J. Hill <steven.hill@cavium.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14554/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/Makefile.postlink')
-rw-r--r-- | arch/mips/Makefile.postlink | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/mips/Makefile.postlink b/arch/mips/Makefile.postlink new file mode 100644 index 000000000000..b0ddf0701a31 --- /dev/null +++ b/arch/mips/Makefile.postlink @@ -0,0 +1,35 @@ +# =========================================================================== +# Post-link MIPS pass +# =========================================================================== +# +# 1. Insert relocations into vmlinux + +PHONY := __archpost +__archpost: + +include include/config/auto.conf +include scripts/Kbuild.include + +CMD_RELOCS = arch/mips/boot/tools/relocs +quiet_cmd_relocs = RELOCS $@ + cmd_relocs = $(CMD_RELOCS) $@ + +# `@true` prevents complaint when there is nothing to be done + +vmlinux: FORCE + @true +ifeq ($(CONFIG_RELOCATABLE),y) + $(call if_changed,relocs) +endif + +%.ko: FORCE + @true + +clean: + @true + +PHONY += FORCE clean + +FORCE: + +.PHONY: $(PHONY) |