From mboxrd@z Thu Jan 1 00:00:00 1970 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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A68EFC32772 for ; Fri, 19 Aug 2022 15:25:12 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D880C84B68; Fri, 19 Aug 2022 17:25:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="U8zRONRy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 27AD084AD8; Fri, 19 Aug 2022 17:25:09 +0200 (CEST) Received: from mail-yw1-x112e.google.com (mail-yw1-x112e.google.com [IPv6:2607:f8b0:4864:20::112e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 120CC84AD8 for ; Fri, 19 Aug 2022 17:25:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-3246910dac3so129578577b3.12 for ; Fri, 19 Aug 2022 08:25:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=AQr6v5X4sbGT0NdomfeNMMhQcRqp4S++BdiLKKvDb28=; b=U8zRONRyG3UCokfCTVQMZmTqWxlzn1jXAKVUIOWjrSnU2OzNKhv+y6e4EWVsfF3AnT dTb1RmuRkiXW6OAWm2zqk1Ss8023VrcAeREcYxc7C50znv4ClZXlG1rwCM7GKiTqf0st eoGxQBymntgKdS+y4zplN/14PxAAjyOjgRjHE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=AQr6v5X4sbGT0NdomfeNMMhQcRqp4S++BdiLKKvDb28=; b=hHfpQ7/slKw4h/siFvq8iBtYFkY+piasHpB+e65jDRMp/jM4uhxbjTyqIqKllKVRzi Zjnd4hkt3AWXVERpVYNeO5rnUgci/rXKDN5osxlTEkwt7ojYVo8+4l6RzNBFRcEG8y/3 mERvwvsX2GDmTmZ2QUUjxeVv3hBD/DIcMk9/OONoIfR5ca2lakFQb59fKodynry20kx/ ZxyeX2rhy1Ua8lYjmbsTKEk3lwuzXY3JKyXbKyUM63NgpYUyy4nx6uRXmDXddpMEkXua HS51r2PjCoV2+0UwxYKEPNFzs5uKJ2uTs/54bcqldwCmZlSDuYDOAxLnwr959UODPucT QnpA== X-Gm-Message-State: ACgBeo3/f+r0dk0UnrNIpTYIdkL2V+R3IUaAsyej1aP+y0mcwvQ+17vp +AzDLdtPAgq8IOa8HlasVa5WFRqSvgIy2Rm6wuNWMzIE67K/vA== X-Google-Smtp-Source: AA6agR6tSSHP/+t9idzHjTgEw+Y5Ie+lM9zD1mHQSO4AvcIUdBFyUMaZHaFBGNu++wPgpYn/N+dJXikzZ8NkPc5+O8k= X-Received: by 2002:a25:44d6:0:b0:685:59ab:bb4f with SMTP id r205-20020a2544d6000000b0068559abbb4fmr8451235yba.132.1660922704579; Fri, 19 Aug 2022 08:25:04 -0700 (PDT) MIME-Version: 1.0 References: <20220527133049.GK25375@bill-the-cat> <20220530150554.GP25375@bill-the-cat> In-Reply-To: From: Simon Glass Date: Fri, 19 Aug 2022 09:24:53 -0600 Message-ID: Subject: Re: [PATCH] riscv: fix compitible with binutils 2.38 To: Leo Liang Cc: Tom Rini , U-Boot Mailing List , rick Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Hi Leo, On Fri, 19 Aug 2022 at 03:09, Leo Liang wrote: > > On Thu, Aug 11, 2022 at 10:23:02PM +0000, Leo Liang wrote: > > On Mon, May 30, 2022 at 11:05:54AM -0400, Tom Rini wrote: > > > On Sat, May 28, 2022 at 09:02:09AM +0000, Leo Liang wrote: > > > > On Fri, May 27, 2022 at 09:30:49AM -0400, Tom Rini wrote: > > > > > On Fri, May 27, 2022 at 02:36:29AM +0000, Leo Liang wrote: > > > > > > > > > > > Hi Tom, > > > > > > > > > > > > The following changes since commit 7e0edcadb09d55d5319fdc862041fd1b874476f5: > > > > > > > > > > > > Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi (2022-05-24 23:29:00 -0400) > > > > > > > > > > > > are available in the Git repository at: > > > > > > > > > > > > https://source.denx.de/u-boot/custodians/u-boot-riscv.git > > > > > > > > > > > > for you to fetch changes up to c544b281cd3e549a4fcbf4ba9a05a5d72c9557dd: > > > > > > > > > > > > riscv: qemu: Set kernel_comp_addr_r for compressed kernel (2022-05-26 18:42:34 +0800) > > > > > > > > > > > > CI result shows no issue: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/12131 > > > > > > > > > > First, I've applied this to u-boot/master now. Second, will > > > > > https://patchwork.ozlabs.org/project/uboot/patch/PH7PR14MB5594FD11D1BE74284F554BEBCED49@PH7PR14MB5594.namprd14.prod.outlook.com/ > > > > > be coming soon? Thanks! > > > > > > > > Hi Tom, > > > > > > > > This patch you mentioned will not pass CI, and the reason for that > > > > is the toolchain used for RISC-V in CI does not have corresponding > > > > settings for zifencei and zicsr. > > > > (detailed disscussion: https://patchwork.ozlabs.org/project/uboot/patch/20220128134713.2322800-1-alexandre.ghiti@canonical.com/) > > > > (CI result: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/jobs/440735) > > > > > > > > The patch looks valid, but will fail CI on 32-bit configs. > > > > If we use 32-bit toolchain to test 32-bit configs, then > > > > problems solved. > > > > > > > > Do you have any comments? > > > > > > I guess I'm OK with saying we should use a 32bit toolchain for 32bit > > > riscv, if that's how things should be handled moving forward for > > > everyone else. > > > > > > -- > > > Tom > > > > Hi Tom, > > > > Sorry for taking such a long time to reply. > > > > Recap: > > All the "riscv: fix compitible with binutils 2.38" patches that > > try to support new RISC-V ISA extension will cause U-Boot CI to fail > > because the toolchain used in U-Boot CI do not support the new multilib settings. > > (original discussion: > > https://patchwork.ozlabs.org/project/uboot/patch/20220128134713.2322800-1-alexandre.ghiti@canonical.com/) > > > > We found that current RISC-V toolchains from kernel.org do not > > support zifencei and zicsr extensions' multilib settings, > > regardless of the toolchain version. > > (Both gcc 11.1.0, 12.1.0 do not support the needed settings. > > https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/11.1.0/ > > https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.1.0/) > > > > But we also found that if we use recent upstream riscv-gnu-toolchain, > > we could build an gcc-12.1.0 toolchain that does support multilib > > settings and could fix this issue. > > > > We have provided a Dockerfile as a reference build script[1] and > > a prebuilt toolchain[2] for U-Boot CI to use. > > > > We have also verified the CI process could execute successfully > > with your base image and the provided riscv64-linux toolchain[3]. > > > > I guess the coming update of the toolchain in kernel.org should > > contain the new multilib settings, so I was wondering if we could > > replace the riscv64-linux toolchain from kernel.org with this prebuilt > > toolchain we've provided on github[2] temporarily? > > > > After studying a bit of the buildman tool, the earlier idea that > > "use different toolchains for different board configs" would require > > an amount of modification, thus we think its best to replace the toolchain > > temporarily to fix this issue, then the patch could be applied without CI failure. > > > > [1] https://github.com/ycliang-andes/riscv-toolchain/blob/master/Dockerfile > > [2] https://github.com/ycliang-andes/riscv-toolchain/releases/download/v1.0/x86_64-gcc-12.1.0-nolibc-riscv64-linux.tar.xz > > [3] https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/13129 > > Hi Tom, > > A gentle ping. > Do you have any concern on changing the toolchain source for now? It is easy enough for people to download the toolchain and update the .buildman file to point to it. It would also be possible to patch 'buildman fetch-arch riscv64' to add a toolchain-prefix to the .buildman file, as a temporary measure. This would need a later buildman patch to remove the line. I'm not sure if this sort of thing is a good idea though, when we can just tell people to download the toolchain and update the .buildman file. Regards, Simon