Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4754221pxu; Mon, 21 Dec 2020 23:10:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJy32gP7BbTpj3pu+OkfZAHIlPgduBqcYDecLS9wSJh/whHuroBSeWsT8pBEkdw1qYoOgapV X-Received: by 2002:a50:f089:: with SMTP id v9mr19609785edl.353.1608621000853; Mon, 21 Dec 2020 23:10:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608621000; cv=none; d=google.com; s=arc-20160816; b=fpGx0KNkOuKtZLijgzIkT+7m7ix8rX0uVrW76FQBUwUm/XrzxroNj6CcrLS1gENiMo pMV6cCDCO+/3bDHj1vy6kFWXGxVaIMazAcTTVYfeoC0YJ0k3iXRCkkTYF0pSFyX3IiSw FfxWkyxfIPnaTvM/E/tyuvzZNkoacbnPw4xdmk/472ii3qmoS/Po5ItzEfBIhU7cduDm zsPDW5QxWXY7VATtNY/QEYK23gKYNnbGSPdxOxu9ga0ztqDH5Yj2tPpUu4sJSBO1n1HU qVVY7fNUiFF4YBsFc8HGH//q1y+st3A2n25wY6s/L6k/EUGnbW7e+F34PxL7pEn/lCRz 6AUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=hk2cDE8u0WfTEuYjrU1tOKMdy/DIwU50dg41KTTX1vY=; b=YmVJqFzWzm3zgvPOPzrTkKtIt9wi1vSsY1fPbhZO0yeOufEIDWNIF9cST+A3XJwBcB GEQzngSkNuaRr4sHh4wUi9PFozNeuzl4UtQ9ZJwJAcTYhEqzPFoYG8rFDJ3FanS7HzvM YMx0n5/Vy5bRHpOj2KGpIhfv5SgrOe26C+88tTUksAHpGsAQTNvGEWoqgZbHzvCBpsYI 27AjHEenETkvMr7+PmkFiQpuwy4Zclgrl/puN1gyan9NZrN7Nrjhw3ZJ0RvdR/mYQU/g 3Lu5yiCwW4T8ZNgX8USYZJTQUtnLM3ui/jRvRCQokVMMFro83jE6M2UoGaRhztxZKwff DOVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TAX0WHuF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i24si11712465edg.295.2020.12.21.23.09.38; Mon, 21 Dec 2020 23:10:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TAX0WHuF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726636AbgLVHIW (ORCPT + 99 others); Tue, 22 Dec 2020 02:08:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726632AbgLVHIV (ORCPT ); Tue, 22 Dec 2020 02:08:21 -0500 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 186EEC0613D3 for ; Mon, 21 Dec 2020 23:07:41 -0800 (PST) Received: by mail-pg1-x52d.google.com with SMTP id x1so2221494pgh.12 for ; Mon, 21 Dec 2020 23:07:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hk2cDE8u0WfTEuYjrU1tOKMdy/DIwU50dg41KTTX1vY=; b=TAX0WHuFrRIwxQK4VQQ7VfGtPivg6Taa0iYXDqthot+WKDJLmzAdowHd6jrSfxjT/P +XROVegmFV68XbQauNVV5RChR56iTTU+VIHWw4AWqL/BNIEHw1qEPCjvsL40TXaXOxRR rHKObdhOFZCXdL/qz4TtVK7DXGQDPge+FRnf031tOO+HP0WFZ4wNW2UyEftSBkAX9DTe R+mWHB7JTL2qLnNGknudhY/FAjBkd0kl8dd9mUnSQs4IpjXKOww07fuuxLPzY8dVOgn8 Cbz224auC07X6ItxDVJ1pK2w6lhGlSrn2n/qAMdf6dMiAA4WA3ErVuQebfvOjYMe4Bat OkEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=hk2cDE8u0WfTEuYjrU1tOKMdy/DIwU50dg41KTTX1vY=; b=o/w57gzv8Cz6PAs5Wyiui/axcB3/yaJq32M9oyPLEXO4gdk0yYEzYLGHF4suntMhR0 ZjRwbCnk2P8Sr2QEEzZ+oD1xymT5FjcRv4lka3jmV7fhzK8rkx1K85rJWN7d/ZsRpVBX Z/np3PwbfCItVgf6rCUPXE8Ri272pyU5bO+Ub5hKoUyxkzJyqJqsbUvCGBpn/GO4u0Oj X6Xl2fDiVuKNGP1hOHMBy36FhMAAWotXl7gHFB3haOk8WqFoLl0cYlLiO4/FcaA0q4MU uvOZsCztOu+Qs1sw/zTrI+7PNvmpxtbB7pEMzG8wHEDqQUjWcK5dC9DpvsAef2/jk+3j otgA== X-Gm-Message-State: AOAM532Zyg6EykjSHBJmx4GqLZMGJlyCkJn8g1oPU2upMjx5R4DDwhp/ eiihzZRx32GNLr/3f/xXNHCx999PN9jLQQ== X-Received: by 2002:a62:1ad0:0:b029:197:e389:fb26 with SMTP id a199-20020a621ad00000b0290197e389fb26mr18703472pfa.20.1608620860445; Mon, 21 Dec 2020 23:07:40 -0800 (PST) Received: from localhost.localdomain ([45.124.203.19]) by smtp.gmail.com with ESMTPSA id q16sm19232872pfg.139.2020.12.21.23.07.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 23:07:39 -0800 (PST) Sender: "joel.stan@gmail.com" From: Joel Stanley To: Jonas Bonn , Stefan Kristiansson , Stafford Horne Cc: openrisc@lists.librecores.org, linux-kernel@vger.kernel.org, Mateusz Holenko , Karol Gugala , Masahiro Yamada Subject: [PATCH v2] openrisc: Add vmlinux.bin target Date: Tue, 22 Dec 2020 17:37:31 +1030 Message-Id: <20201222070731.491076-1-joel@jms.id.au> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Build it by default. This is commonly used by fpga targets. Signed-off-by: Joel Stanley --- v2: Address review from Masahiro - Add vmlinux.bin to phony target - simplfy vmlinux.bin rule - add cleanup rule - add vmlinux.bin to targets - Add gitignore --- arch/openrisc/Makefile | 12 ++++++++++++ arch/openrisc/boot/.gitignore | 2 ++ arch/openrisc/boot/Makefile | 10 ++++++++++ 3 files changed, 24 insertions(+) create mode 100644 arch/openrisc/boot/.gitignore create mode 100644 arch/openrisc/boot/Makefile diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile index bf10141c7426..b13404f1f8bd 100644 --- a/arch/openrisc/Makefile +++ b/arch/openrisc/Makefile @@ -24,6 +24,10 @@ LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) KBUILD_CFLAGS += -pipe -ffixed-r10 -D__linux__ +all: vmlinux.bin + +boot := arch/$(ARCH)/boot + ifeq ($(CONFIG_OPENRISC_HAVE_INST_MUL),y) KBUILD_CFLAGS += $(call cc-option,-mhard-mul) else @@ -49,3 +53,11 @@ else BUILTIN_DTB := n endif core-$(BUILTIN_DTB) += arch/openrisc/boot/dts/ + +PHONY += vmlinux.bin + +vmlinux.bin: vmlinux + $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ + +archclean: + $(Q)$(MAKE) $(clean)=$(boot) diff --git a/arch/openrisc/boot/.gitignore b/arch/openrisc/boot/.gitignore new file mode 100644 index 000000000000..007d6fea3145 --- /dev/null +++ b/arch/openrisc/boot/.gitignore @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 +vmlinux.bin diff --git a/arch/openrisc/boot/Makefile b/arch/openrisc/boot/Makefile new file mode 100644 index 000000000000..5b28538f4dd1 --- /dev/null +++ b/arch/openrisc/boot/Makefile @@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Makefile for bootable kernel images +# + +targets += vmlinux.bin + +OBJCOPYFLAGS_vmlinux.bin := -O binary +$(obj)/vmlinux.bin: vmlinux FORCE + $(call if_changed,objcopy) -- 2.29.2