Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1942440rda; Tue, 24 Oct 2023 07:53:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IERhKRxm/weWuClzsZ1P4IlvyQtPzzZHHVduqohg9SBYJQA0QW3Y1qa1gPNvwUZwEuKguhg X-Received: by 2002:a05:6359:2f83:b0:168:cfea:2d41 with SMTP id rs3-20020a0563592f8300b00168cfea2d41mr8170189rwb.14.1698159213370; Tue, 24 Oct 2023 07:53:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698159213; cv=none; d=google.com; s=arc-20160816; b=hCqLtYrax0cp4E2/wqs8pSwxiyLjLQaOw+UGOFLLFcsRDNHxeJC2/uvP3y84ycIpk9 t1oIQO0so5NibOzrBR72sVrWBA9geyMH1o5Ya+52FnCX+KfKp1PnOUlZwOvl41T9Okvg /3Hj0O+sOLbIkuMDIw0o3xNPx3YQ78hswtdCtErMe0vVUDwPSogY1kgSfL9qQ50koKN7 GLRBXoX+/EJ9+yRn2+o7KXcNsDLEopL2PmKjfnmCNdZZiETm/otK9khFbluk0nD9HfO0 cyIA9bpy/SPlq3prcumvqQ6S51QGrUX0FPL9azmc+gJWruEyHzyBOtoebvbcqZvAElYu OMkQ== 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; bh=Y8jItcQHqnBt/k327J0GXFX5V97ppVxwsUOJnUt+4T0=; fh=M1lNyqxHbRksgYYZnhzM7Vvh9sy+42L6qqju1xoB8Ww=; b=R5quTMpbaShPTK22EoIys8rEFOsvVhyVD6CSfE28hPw9yPgDBqWxIgFYVAg0r3m98T 85zgIE/A530WxF+FR2kWL5KwGikOnvkjZIPIXcaIOnCpeflbpuz2gxWWPnVCE1qmbucF ePa48dpX9l84/8+z32TePt1LNGaLsNMjkrv9ZsnRWlE6o7LBhH4DeOIO6UKk8n8xCiJS uKS6cGZmiyKiYLfT30CU/bZJSZuzeWtK+cnu0q+lugJnGyjkrNShv/9M2j28nuuAFs9L nIRdN89yJjax2/kwrknGY9HKNFgcGMs17dauJckiaRCkBwrBS+wE/xI7pWbNl9N+U8Fw RkMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id 14-20020a63184e000000b005b88fc22307si5960767pgy.312.2023.10.24.07.53.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 07:53:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 30284802C7FD; Tue, 24 Oct 2023 07:53:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343692AbjJXOx3 (ORCPT + 99 others); Tue, 24 Oct 2023 10:53:29 -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: 8bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 24 Oct 2023 07:53:32 -0700 (PDT) When flashing loader.bin for K210 using kflash:     [ERROR] This is an ELF file and cannot be programmed to flash directly: arch/riscv/boot/loader.bin Before, loader.bin relied on "OBJCOPYFLAGS := -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 --- 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 := n OBJCOPYFLAGS_Image :=-O binary -R .note -R .note.gnu.build-id -R .comment -S +OBJCOPYFLAGS_loader.bin :=-O binary OBJCOPYFLAGS_xipImage :=-O binary -R .note -R .note.gnu.build-id -R .comment -S targets := Image Image.* loader loader.o loader.lds loader.bin -- 2.34.1