Message ID | 41e2aa9e4299dd35cfeef9fecc2a6a02a7b49d90.1690489039.git.falcon@tinylab.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp6980vqg; Thu, 27 Jul 2023 13:53:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlHWhf4kvQpTPxS7T+3Wh7OlIwGCOOIC/wCcDcgDEBQ/sNLLTK3tUsmMnl3Sph1Jia3T0COw X-Received: by 2002:a17:903:1112:b0:1b8:af85:e959 with SMTP id n18-20020a170903111200b001b8af85e959mr482730plh.53.1690491232110; Thu, 27 Jul 2023 13:53:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690491232; cv=none; d=google.com; s=arc-20160816; b=TG4pqGkb+VP8M1unrWBiBr3vnCw8cBwz/vbh+5sdeAGDgKxRTrQT2z32G1aPKTXDzW 5PZgBRpvrgWoRrA+52bJVzA9IRsKcuL6m/trAInEciRrwCFuhG3VWaXxYW0qRAO4hCFd CEwBip9/76EW68BZDuMzWdB7iRrJsFbZZUUtt+tIabfIvoSf3keYcMbBD1jMA0JptUk9 djCGYLj4gMNcy5mVz0B1eylPkEUHWkLIJXjPhYWIvYuyuf3sd/O7fsR99nnlQbxl4gSC KTcxIXLGigVFgYN4hA8ZYpX5qDd2I2TYB3zPgLyFVvYs3xIjEgCdawE/YvNOtfUotcX1 /Nxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=LRBF+KWDBpGQonVqjmFHEpcpUIAKzetQombUOMN8GCI=; fh=CR7OSt3Y+a8PS+dgzZNHcKmuduX0vKjLX+CD3ki537g=; b=ZclbQewFtT9+KNq37OgB0zn+uYvtqWAi53HXQLkd8RsapXYTxQrl8lpq7+TelpwFDw bPdXxJM6VmNICuyGdoR8ovejziIMyECt3yA0ID3IGEJs2idMTC6qSMORixLejL8Hr5Dr h1g3RwWfosii1mSWXfmmp9nH8jsypg6G7eUB0oQcAe3j0uxUmJPeoiEFhAn+SwnGgwjG bPfvzh9SoD1aGaP3ggRyOvg+YnyGqq/eVotK2oQogpC4PVQh2Ul5KcZ4KXvwBnRahTS0 g7qIO3U9TTQdd5LiBAQCbaJNE9NksKs7Je9y8SxgA/RU+Ln7Zhdw2nFIEGCjbdBWyN4n HESA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p9-20020a170902e74900b001b87bd2f7b0si1886075plf.402.2023.07.27.13.53.37; Thu, 27 Jul 2023 13:53:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229437AbjG0U2d (ORCPT <rfc822;kloczko.tomasz@gmail.com> + 99 others); Thu, 27 Jul 2023 16:28:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230049AbjG0U2b (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Jul 2023 16:28:31 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 861CE30CD; Thu, 27 Jul 2023 13:28:28 -0700 (PDT) X-QQ-mid: bizesmtp77t1690489698t82ph8cm Received: from linux-lab-host.localdomain ( [61.141.78.189]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 28 Jul 2023 04:28:17 +0800 (CST) X-QQ-SSF: 01200000000000D0X000000A0000000 X-QQ-FEAT: dKvkn8qoLrE2yLn96qy5k0fzTpwuyKtkiBSpI4LwdFyOeVirP6jaXvT0wq5IB lyhlNscOT+zA2kHB7tqoZ7sJwvbTr525TCosc7zMPGfENlCjXaycc0d9ITayDt+FcvVnqoa CYH8kqgk62UIvsOM6IRf45fZm/tD16k4QVwCphU4X6zJSbEt3vx4jGjLm2aCkaZ0J3EdBhi 7B+qe6+RI/NJPVFoMTuzy+BKEtxQcWXRqOEGuzqmBtamF70BLvlykk4dHD5nh7usejRRyLB JCBuYBm7V062gzUOMueR6pXzenYc9e5+ti7FqyhKWD/TTxpPm7P7gsGppuRl9ksU7QLJfXx KcL5CCZD+J3JP9LDFEiXmJZhnWcgiXe2saCrF9nZ6UbWxScnTXfUrYeU7FLGvh2Jk8EGX/e X-QQ-GoodBg: 0 X-BIZMAIL-ID: 16216814846800268763 From: Zhangjin Wu <falcon@tinylab.org> To: thomas@t-8ch.de, w@1wt.eu Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v3 06/12] selftests/nolibc: customize CROSS_COMPILE for 32/64-bit powerpc Date: Fri, 28 Jul 2023 04:28:17 +0800 Message-Id: <41e2aa9e4299dd35cfeef9fecc2a6a02a7b49d90.1690489039.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <cover.1690489039.git.falcon@tinylab.org> References: <cover.1690489039.git.falcon@tinylab.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz5a-1 X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772608534111643735 X-GMAIL-MSGID: 1772608534111643735 |
Series |
selftests/nolibc: add minimal kernel config support - part1
|
|
Commit Message
Zhangjin Wu
July 27, 2023, 8:28 p.m. UTC
The little-endian powerpc64le compilers provided by Ubuntu and Fedora
are able to compile big endian kernel and big endian nolibc-test [1].
These default CROSS_COMPILE settings allow to test target architectures
with:
$ cd /path/to/tools/testing/selftests/nolibc/
$ for arch in ppc ppc64 ppc64le; do \
make run-user ARCH=$arch | grep "status: "; \
done
If want to use another cross compiler, please simply pass CROSS_COMPILE
or CC as before.
For example, it is able to build 64-bit nolibc-test with the big endian
powerpc64-linux-gcc crosstool from [2]:
$ wget -c https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-powerpc64-linux.tar.xz
$ tar xvf x86_64-gcc-13.1.0-nolibc-powerpc64-linux.tar.xz
$ export PATH=$PWD/gcc-13.1.0-nolibc/powerpc64-linux/bin/:$PATH
$ export CROSS_COMPILE_ppc64=powerpc64-linux-
$ export CROSS_COMPILE_ppc64le=powerpc64-linux-
$ for arch in ppc64 ppc64le; do \
make run-user ARCH=$arch | grep "status: "; \
done
Or specify CC directly with full path:
$ export CC=$PWD/gcc-13.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc
$ for arch in ppc64 ppc64le; do \
make run-user ARCH=$arch | grep "status: "; \
done
[1]: https://github.com/open-power/skiboot
[2]: https://mirrors.edge.kernel.org/pub/tools/crosstool/
Signed-off-by: Zhangjin Wu <falcon@tinylab.org>
---
tools/testing/selftests/nolibc/Makefile | 3 +++
1 file changed, 3 insertions(+)
Comments
On Fri, Jul 28, 2023 at 04:28:17AM +0800, Zhangjin Wu wrote: > The little-endian powerpc64le compilers provided by Ubuntu and Fedora > are able to compile big endian kernel and big endian nolibc-test [1]. > > These default CROSS_COMPILE settings allow to test target architectures > with: > > $ cd /path/to/tools/testing/selftests/nolibc/ > > $ for arch in ppc ppc64 ppc64le; do \ > make run-user ARCH=$arch | grep "status: "; \ > done > > If want to use another cross compiler, please simply pass CROSS_COMPILE > or CC as before. > > For example, it is able to build 64-bit nolibc-test with the big endian > powerpc64-linux-gcc crosstool from [2]: > > $ wget -c https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-powerpc64-linux.tar.xz > $ tar xvf x86_64-gcc-13.1.0-nolibc-powerpc64-linux.tar.xz > $ export PATH=$PWD/gcc-13.1.0-nolibc/powerpc64-linux/bin/:$PATH > > $ export CROSS_COMPILE_ppc64=powerpc64-linux- > $ export CROSS_COMPILE_ppc64le=powerpc64-linux- > $ for arch in ppc64 ppc64le; do \ > make run-user ARCH=$arch | grep "status: "; \ > done > > Or specify CC directly with full path: > > $ export CC=$PWD/gcc-13.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc > $ for arch in ppc64 ppc64le; do \ > make run-user ARCH=$arch | grep "status: "; \ > done > > [1]: https://github.com/open-power/skiboot > [2]: https://mirrors.edge.kernel.org/pub/tools/crosstool/ > > Signed-off-by: Zhangjin Wu <falcon@tinylab.org> > --- > tools/testing/selftests/nolibc/Makefile | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile > index 3f15c7f7ef76..6385915d16c9 100644 > --- a/tools/testing/selftests/nolibc/Makefile > +++ b/tools/testing/selftests/nolibc/Makefile > @@ -46,6 +46,9 @@ IMAGE = $(IMAGE_$(XARCH)) > IMAGE_NAME = $(notdir $(IMAGE)) > > # CROSS_COMPILE: cross toolchain prefix by architecture > +CROSS_COMPILE_ppc ?= powerpc-linux-gnu- > +CROSS_COMPILE_ppc64 ?= powerpc64le-linux-gnu- > +CROSS_COMPILE_ppc64le ?= powerpc64le-linux-gnu- > CROSS_COMPILE ?= $(CROSS_COMPILE_$(XARCH)) It seems to me that this patch and the previous one were rather for the PPC series as I'm not seeing the relation with the tiny config here. Willy
diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 3f15c7f7ef76..6385915d16c9 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -46,6 +46,9 @@ IMAGE = $(IMAGE_$(XARCH)) IMAGE_NAME = $(notdir $(IMAGE)) # CROSS_COMPILE: cross toolchain prefix by architecture +CROSS_COMPILE_ppc ?= powerpc-linux-gnu- +CROSS_COMPILE_ppc64 ?= powerpc64le-linux-gnu- +CROSS_COMPILE_ppc64le ?= powerpc64le-linux-gnu- CROSS_COMPILE ?= $(CROSS_COMPILE_$(XARCH)) # make sure CC is prefixed with CROSS_COMPILE