From nobody Thu Jan 1 07:36:10 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B5FCC00A8F for ; Tue, 24 Oct 2023 14:53:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343702AbjJXOxb (ORCPT ); Tue, 24 Oct 2023 10:53:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234594AbjJXOx0 (ORCPT ); Tue, 24 Oct 2023 10:53:26 -0400 Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96DBBD7F for ; Tue, 24 Oct 2023 07:53:23 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:7faa:e55:54a:cff]) by albert.telenet-ops.be with bizsmtp id 1qtK2B00X5Uc89d06qtKeQ; Tue, 24 Oct 2023 16:53:20 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qvImO-007Q3C-T2; Tue, 24 Oct 2023 16:53:19 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qvImV-00BkS1-Nd; Tue, 24 Oct 2023 16:53:19 +0200 From: Geert Uytterhoeven To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Jisheng Zhang , Alexandre Ghiti , Damien Le Moal , Song Shuai Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] riscv: boot: Fix creation of loader.bin Date: Tue, 24 Oct 2023 16:53:18 +0200 Message-Id: <1086025809583809538dfecaa899892218f44e7e.1698159066.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When flashing loader.bin for K210 using kflash: =C2=A0 =C2=A0 [ERROR] This is an ELF file and cannot be programmed to flash= directly: arch/riscv/boot/loader.bin Before, loader.bin relied on "OBJCOPYFLAGS :=3D -O binary" in the main RISC-V Makefile to create a boot image with the right format. With this removed, the image is now created in the wrong (ELF) format. Fix this by adding an explicit rule. Fixes: 505b02957e74f0c5 ("riscv: Remove duplicate objcopy flag") Signed-off-by: Geert Uytterhoeven Reviewed-by: Damien Le Moal --- arch/riscv/boot/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/boot/Makefile b/arch/riscv/boot/Makefile index 22b13947bd131e84..8e7fc0edf21d3ece 100644 --- a/arch/riscv/boot/Makefile +++ b/arch/riscv/boot/Makefile @@ -17,6 +17,7 @@ KCOV_INSTRUMENT :=3D n =20 OBJCOPYFLAGS_Image :=3D-O binary -R .note -R .note.gnu.build-id -R .commen= t -S +OBJCOPYFLAGS_loader.bin :=3D-O binary OBJCOPYFLAGS_xipImage :=3D-O binary -R .note -R .note.gnu.build-id -R .com= ment -S =20 targets :=3D Image Image.* loader loader.o loader.lds loader.bin --=20 2.34.1