{"id":776513,"url":"http://patchwork.ozlabs.org/api/patches/776513/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/20170616000510.27262-1-paul.burton@imgtec.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170616000510.27262-1-paul.burton@imgtec.com>","list_archive_url":null,"date":"2017-06-16T00:05:09","name":"[U-Boot,1/2] Makefile: Allow arch post-link hook","commit_ref":"09bebb8397f72340812de577a2d00612c7b7ed75","pull_url":null,"state":"accepted","archived":false,"hash":"e26f47f5ad1c0cb440856fc227c55dd668b37965","submitter":{"id":33698,"url":"http://patchwork.ozlabs.org/api/people/33698/?format=json","name":"Paul Burton","email":"paul.burton@imgtec.com"},"delegate":{"id":4307,"url":"http://patchwork.ozlabs.org/api/users/4307/?format=json","username":"danielschwierzeck","first_name":"Daniel","last_name":"Schwierzeck","email":"daniel.schwierzeck@googlemail.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/20170616000510.27262-1-paul.burton@imgtec.com/mbox/","series":[],"comments":"http://patchwork.ozlabs.org/api/patches/776513/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/776513/checks/","tags":{},"related":[],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3wpgcz4WnFz9s4q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 16 Jun 2017 10:05:54 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 3DF9EC21C66; Fri, 16 Jun 2017 00:05:48 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id D84C3C21C3E;\n\tFri, 16 Jun 2017 00:05:45 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid B615AC21C3E; Fri, 16 Jun 2017 00:05:44 +0000 (UTC)","from mailapp01.imgtec.com (mailapp01.imgtec.com [195.59.15.196])\n\tby lists.denx.de (Postfix) with ESMTP id EBDA0C21C2D\n\tfor <u-boot@lists.denx.de>; Fri, 16 Jun 2017 00:05:43 +0000 (UTC)","from HHMAIL01.hh.imgtec.org (unknown [10.100.10.19])\n\tby Forcepoint Email with ESMTPS id EE46E15501631;\n\tFri, 16 Jun 2017 01:05:37 +0100 (IST)","from localhost (10.20.1.33) by HHMAIL01.hh.imgtec.org\n\t(10.100.10.21) with Microsoft SMTP Server (TLS) id 14.3.294.0;\n\tFri, 16 Jun 2017 01:05:41 +0100"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE\n\tautolearn=unavailable autolearn_force=no version=3.4.0","From":"Paul Burton <paul.burton@imgtec.com>","To":"<u-boot@lists.denx.de>","Date":"Thu, 15 Jun 2017 17:05:09 -0700","Message-ID":"<20170616000510.27262-1-paul.burton@imgtec.com>","X-Mailer":"git-send-email 2.13.1","MIME-Version":"1.0","X-Originating-IP":"[10.20.1.33]","Subject":"[U-Boot] [PATCH 1/2] Makefile: Allow arch post-link hook","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"},"content":"This commit allows an architecture to provide a Makefile.postlink whose\nu-boot target gets invoked after the u-boot ELF is linked. This will be\nof use for MIPS in a following commit.\n\nThis mirrors Linux commit fbe6e37dab97 (\"kbuild: add arch specific\npost-link Makefile\").\n\nSigned-off-by: Paul Burton <paul.burton@imgtec.com>\nCc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>\nCc: Masahiro Yamada <yamada.masahiro@socionext.com>\nCc: Simon Glass <sjg@chromium.org>\nCc: u-boot@lists.denx.de\n---\n\n Makefile | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)","diff":"diff --git a/Makefile b/Makefile\nindex 62d0482bcf..3c3bbc5109 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1215,13 +1215,16 @@ u-boot.elf: u-boot.bin\n \t$(Q)$(OBJCOPY) -I binary $(PLATFORM_ELFFLAGS) $< u-boot-elf.o\n \t$(call if_changed,u-boot-elf)\n \n+ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(ARCH)/Makefile.postlink)\n+\n # Rule to link u-boot\n # May be overridden by arch/$(ARCH)/config.mk\n quiet_cmd_u-boot__ ?= LD      $@\n       cmd_u-boot__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_u-boot) -o $@ \\\n       -T u-boot.lds $(u-boot-init)                             \\\n       --start-group $(u-boot-main) --end-group                 \\\n-      $(PLATFORM_LIBS) -Map u-boot.map\n+      $(PLATFORM_LIBS) -Map u-boot.map;                        \\\n+      $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)\n \n quiet_cmd_smap = GEN     common/system_map.o\n cmd_smap = \\\n@@ -1231,7 +1234,7 @@ cmd_smap = \\\n \t\t-c $(srctree)/common/system_map.c -o common/system_map.o\n \n u-boot:\t$(u-boot-init) $(u-boot-main) u-boot.lds FORCE\n-\t$(call if_changed,u-boot__)\n+\t+$(call if_changed,u-boot__)\n ifeq ($(CONFIG_KALLSYMS),y)\n \t$(call cmd,smap)\n \t$(call cmd,u-boot__) common/system_map.o\n","prefixes":["U-Boot","1/2"]}