From patchwork Mon Dec 20 19:00:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stijn Tintel X-Patchwork-Id: 1571200 X-Patchwork-Delegate: stijn@linux-ipv6.be Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=wk62xJO5; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux-ipv6.be header.i=@linux-ipv6.be header.a=rsa-sha256 header.s=502B7754-045F-11E5-BBC5-64595FD46BE8 header.b=asNZwAbD; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JHpvl15LZz9sCD for ; Tue, 21 Dec 2021 06:05:55 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UrzTmyFJm8UBhyp2fMmVnL29L4ZtEt1HMIHjAgLQRe4=; b=wk62xJO5SvxGx7 p42yPHYBDiesYbm60xiAEZzSGoJV0hYdhrBf5CO/yoaOPau99Gfei1j5wMt6PuNKVCiGbfhAox3+b exd3EOEvDyqUlWHMErF+1CFqlxORB8TGt94HlMgL9AoZtnxy5/+tHIV2VJR/N0xEi3QXs/upuoHt/ pq9YdvpBROM32ZgJTSNJ/xDmGfj2/RZ0TpEGwBrWWgx81plGPmhWfvEQAV2U8fvl1sbRdPROoSCV0 rV1BY0GeJWtax2gMl+WQ9L2O0Btq01FR7Z8rB3g8QbiNp6HPX3pyH1IQm6ZuxPz/iMbDbrDiqhRBL gV6NKop6mo+F0H8TEFuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzNvD-003xwf-78; Mon, 20 Dec 2021 19:02:07 +0000 Received: from mail.tintel.eu ([51.83.127.189]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzNuV-003xmo-GK for openwrt-devel@lists.openwrt.org; Mon, 20 Dec 2021 19:01:26 +0000 Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id 119404476601; Mon, 20 Dec 2021 20:01:13 +0100 (CET) Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id oNEYp0cAa-xC; Mon, 20 Dec 2021 20:01:12 +0100 (CET) Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id C2DD544765FE; Mon, 20 Dec 2021 20:01:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.tintel.eu C2DD544765FE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-ipv6.be; s=502B7754-045F-11E5-BBC5-64595FD46BE8; t=1640026872; bh=dZ6RkATCeSQpTGwmS9ZKRGnmVxPigkK0yT0Nh3HU47Y=; h=From:To:Date:Message-Id:MIME-Version; b=asNZwAbDefRJI29Ms5yLtX6u6koq0BlezIJhszU/mYklqaGtkYeXOcK6NrH1Y2Mrb L+FMgmNwqQsPy4zb5bSVhTbRLi4LDWaxB8Pv6U6PqnQwW8VvODi3uWk3jmdA778oUl U9zRV2qEfUVQ5QVku3+ExAcy/hxPsHWWENWCSPog= X-Virus-Scanned: amavisd-new at mail.tintel.eu Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id zyiuXN7HTTGZ; Mon, 20 Dec 2021 20:01:12 +0100 (CET) Received: from taz.sof.bg.adlevio.net (unknown [IPv6:2001:67c:21bc:20::10]) by mail.tintel.eu (Postfix) with ESMTPS id 1E51144765FD; Mon, 20 Dec 2021 20:01:11 +0100 (CET) From: Stijn Tintel To: openwrt-devel@lists.openwrt.org Cc: mail@adrianschmutzler.de, hauke@hauke-m.de, bobafetthotmail@gmail.com, rsalvaterra@gmail.com, hurricos@gmail.com, scappylappy@gmail.com, bgonyer@gmail.com Subject: [PATCH v2 1/8] build: add e5500 CPU_TYPE Date: Mon, 20 Dec 2021 21:00:57 +0200 Message-Id: <20211220190104.1964098-2-stijn@linux-ipv6.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211220190104.1964098-1-stijn@linux-ipv6.be> References: <20211220190104.1964098-1-stijn@linux-ipv6.be> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: IP_WHITELIST X-Rspamd-Queue-Id: 1E51144765FD X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: IP_WHITELIST X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:200533, ipnet:2001:67c:21bc::/48, country:BG]; IP_WHITELIST(0.00)[2001:67c:21bc:20::10] X-Rspamd-Server: skulls X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211220_110123_716738_485DB69C X-CRM114-Status: UNSURE ( 5.67 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This CPU type is compatible with NXP's PPC based QorIQ processors, and will be used by the upcoming new qoriq target. Signed-off-by: Stijn Tintel --- include/target.mk | 1 + 1 file changed, 1 insertion(+) Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This CPU type is compatible with NXP's PPC based QorIQ processors, and will be used by the upcoming new qoriq target. Signed-off-by: Stijn Tintel Reviewed-by: Rui Salvaterra --- include/target.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/include/target.mk b/include/target.mk index 60760bf602..fb57553f7d 100644 --- a/include/target.mk +++ b/include/target.mk @@ -234,6 +234,7 @@ ifeq ($(DUMP),1) endif ifeq ($(ARCH),powerpc64) CPU_TYPE ?= powerpc64 + CPU_CFLAGS_e5500:=-mcpu=e5500 CPU_CFLAGS_powerpc64:=-mcpu=powerpc64 endif ifeq ($(ARCH),sparc) From patchwork Mon Dec 20 19:00:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stijn Tintel X-Patchwork-Id: 1571201 X-Patchwork-Delegate: stijn@linux-ipv6.be Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Uc6Ly9Bp; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux-ipv6.be header.i=@linux-ipv6.be header.a=rsa-sha256 header.s=502B7754-045F-11E5-BBC5-64595FD46BE8 header.b=n2F0hxCW; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JHpw55RZFz9sCD for ; Tue, 21 Dec 2021 06:06:13 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=u2FlhUbMFwt6PAjeibYzNbVES+tLcGeg7jnRXmorJgg=; b=Uc6Ly9Bp+Ik7ZU gjx7UMNLi3jkRHQZTcNdcqNNMDwyKJMFL6ksH8MhtvRn1p7958R5R4+SZtBH0W+DXwnLxTL5Qnmrf zM8O8DW1faxVWwtkFu5pATog9UXFeBBQoDyaXyMeKxB5sKIM5IFaOai6XYcpXDPDrNBdIi1d3MvIr L/nCGP3R97b8wXPfed05P8lCX/1PEhCLXTluWydeJWaGKF7gCckPCutmkDYC7NaR6usy4y0QYkzGx tmdIf/RU4+GckKGLIcGaqMeX531XeEKNV96uYMNxhnTfupx7kMokvLp5pL9A4BIjzi8DiC57rcMK1 QtROVe2M+kzAoF4RqmrQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzNwB-003y9A-4K; Mon, 20 Dec 2021 19:03:07 +0000 Received: from mail.tintel.eu ([51.83.127.189]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzNuW-003xng-Vo for openwrt-devel@lists.openwrt.org; Mon, 20 Dec 2021 19:01:26 +0000 Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id E9DE744765FD; Mon, 20 Dec 2021 20:01:15 +0100 (CET) Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id lmyNFncrzXeZ; Mon, 20 Dec 2021 20:01:15 +0100 (CET) Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id 7ACDA4476603; Mon, 20 Dec 2021 20:01:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.tintel.eu 7ACDA4476603 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-ipv6.be; s=502B7754-045F-11E5-BBC5-64595FD46BE8; t=1640026875; bh=Ius9V+l2ERj207vUyTBj7wurkcN3eS9pxb74APG22zk=; h=From:To:Date:Message-Id:MIME-Version; b=n2F0hxCWZLeeyv7rcBBN0XzYUKHMsor1u/ft8Rv+9ChthDFd5khn3H4YQfNuGx5MW j+woq6qzLi8ogI1AupisNUf25WS3iCFN09dKnlmuWgCi4GXabwZg6NieUAO9HCEat/ igfJTTxhwGqW2O5My9HBGN291pnNtfa6lYUbFQ5E= X-Virus-Scanned: amavisd-new at mail.tintel.eu Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id 3-zp4DrXvD7G; Mon, 20 Dec 2021 20:01:15 +0100 (CET) Received: from taz.sof.bg.adlevio.net (unknown [IPv6:2001:67c:21bc:20::10]) by mail.tintel.eu (Postfix) with ESMTPS id C4DA444765FD; Mon, 20 Dec 2021 20:01:14 +0100 (CET) From: Stijn Tintel To: openwrt-devel@lists.openwrt.org Cc: mail@adrianschmutzler.de, hauke@hauke-m.de, bobafetthotmail@gmail.com, rsalvaterra@gmail.com, hurricos@gmail.com, scappylappy@gmail.com, bgonyer@gmail.com Subject: [PATCH v2 2/8] toolchain/musl: ppc64: check for AltiVec in setjmp/longjmp Date: Mon, 20 Dec 2021 21:00:58 +0200 Message-Id: <20211220190104.1964098-3-stijn@linux-ipv6.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211220190104.1964098-1-stijn@linux-ipv6.be> References: <20211220190104.1964098-1-stijn@linux-ipv6.be> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: IP_WHITELIST X-Rspamd-Queue-Id: C4DA444765FD X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: IP_WHITELIST X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:200533, ipnet:2001:67c:21bc::/48, country:BG]; IP_WHITELIST(0.00)[2001:67c:21bc:20::10] X-Rspamd-Server: skulls X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211220_110125_202122_0CD0E5DE X-CRM114-Status: UNSURE ( 9.17 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Signed-off-by: Stijn Tintel --- ...-check-for-AltiVec-in-setjmp-longjmp.patch | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 toolchain/musl/patches/ [...] Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Signed-off-by: Stijn Tintel --- ...-check-for-AltiVec-in-setjmp-longjmp.patch | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 toolchain/musl/patches/100-ppc64-check-for-AltiVec-in-setjmp-longjmp.patch diff --git a/toolchain/musl/patches/100-ppc64-check-for-AltiVec-in-setjmp-longjmp.patch b/toolchain/musl/patches/100-ppc64-check-for-AltiVec-in-setjmp-longjmp.patch new file mode 100644 index 0000000000..8b27819022 --- /dev/null +++ b/toolchain/musl/patches/100-ppc64-check-for-AltiVec-in-setjmp-longjmp.patch @@ -0,0 +1,82 @@ +From 0b6f90a930fcda6df287065d39e6b865428e3c69 Mon Sep 17 00:00:00 2001 +From: Stijn Tintel +Date: Sat, 27 Nov 2021 04:58:50 +0200 +Subject: [PATCH] ppc64: check for AltiVec in setjmp/longjmp + +On machines without AltiVec, the lvx and stvx instructions are not +supported. Use __hwcap to test if AltiVec is supported. + +Fixes SIGILL on PowerPC 64 processors without AltiVec support. +Runtime-tested on e5500 and e6500. + +Signed-off-by: Stijn Tintel +--- + src/setjmp/powerpc64/longjmp.s | 13 ++++++++++++- + src/setjmp/powerpc64/setjmp.s | 13 ++++++++++++- + 2 files changed, 24 insertions(+), 2 deletions(-) + +diff --git a/src/setjmp/powerpc64/longjmp.s b/src/setjmp/powerpc64/longjmp.s +index 81d45ff6..da7172af 100644 +--- a/src/setjmp/powerpc64/longjmp.s ++++ b/src/setjmp/powerpc64/longjmp.s +@@ -56,7 +56,17 @@ longjmp: + lfd 30, 38*8(3) + lfd 31, 39*8(3) + +- # 6) restore vector registers v20-v31 ++ # 6) restore vector registers v20-v31 if hardware supports AltiVec ++ mflr 0 ++ bl 1f ++ .hidden __hwcap ++ .long __hwcap-. ++1: mflr 4 ++ lwz 5, 0(4) ++ add 4, 4, 5 ++ ld 4, 0(4) ++ andis. 4, 4, 0x1000 ++ beq 1f + addi 3, 3, 40*8 + lvx 20, 0, 3 ; addi 3, 3, 16 + lvx 21, 0, 3 ; addi 3, 3, 16 +@@ -70,6 +80,7 @@ longjmp: + lvx 29, 0, 3 ; addi 3, 3, 16 + lvx 30, 0, 3 ; addi 3, 3, 16 + lvx 31, 0, 3 ++1: mtlr 0 + + # 7) return r4 ? r4 : 1 + mr 3, 4 +diff --git a/src/setjmp/powerpc64/setjmp.s b/src/setjmp/powerpc64/setjmp.s +index 37683fda..32853693 100644 +--- a/src/setjmp/powerpc64/setjmp.s ++++ b/src/setjmp/powerpc64/setjmp.s +@@ -69,7 +69,17 @@ __setjmp_toc: + stfd 30, 38*8(3) + stfd 31, 39*8(3) + +- # 5) store vector registers v20-v31 ++ # 5) store vector registers v20-v31 if hardware supports AltiVec ++ mflr 0 ++ bl 1f ++ .hidden __hwcap ++ .long __hwcap-. ++1: mflr 4 ++ lwz 5, 0(4) ++ add 4, 4, 5 ++ ld 4, 0(4) ++ andis. 4, 4, 0x1000 ++ beq 1f + addi 3, 3, 40*8 + stvx 20, 0, 3 ; addi 3, 3, 16 + stvx 21, 0, 3 ; addi 3, 3, 16 +@@ -83,6 +93,7 @@ __setjmp_toc: + stvx 29, 0, 3 ; addi 3, 3, 16 + stvx 30, 0, 3 ; addi 3, 3, 16 + stvx 31, 0, 3 ++1: mtlr 0 + + # 6) return 0 + li 3, 0 +-- +2.32.0 + From patchwork Mon Dec 20 19:00:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stijn Tintel X-Patchwork-Id: 1571198 X-Patchwork-Delegate: stijn@linux-ipv6.be Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=4aUPAmQO; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux-ipv6.be header.i=@linux-ipv6.be header.a=rsa-sha256 header.s=502B7754-045F-11E5-BBC5-64595FD46BE8 header.b=YcXVa4VI; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JHptw3C1Qz9t2p for ; Tue, 21 Dec 2021 06:05:12 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ed/hKgUAiQHNPzFz3ZlFA3fatx3SSBl0O+CPOHXqQwU=; b=4aUPAmQO1Kk+zQ u1aon/xaZXJp962ZktrnutpeOrpj6JRL+ze0mIWVGJYeXfidaCy9mWFOBxU14iz6WSzhBtMYbIPbF ZiTxLhWbS2tkJI2JlWzjue2TSM+wn06uWF3+Pd6Q2GBJQqu3u3SuXCRWA20k1xv7SveFf+SaK/zqd kkOeN0edEHWJJ+CUafpQuAr0nNh3Vapd79PGfheN0yNxIdc0GFI/cFqW18+TSz73uf1zVSsod/Ysj eNvIM4q/FX5NhDxYerjBPEJr6ebhIYkzyhCVxVmuEC3E89uB8XLcFzxdYKHlLb9sVwFkooJigBEVP krpJ/g/pVEgfJOF/XAlg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzNuZ-003xnn-AZ; Mon, 20 Dec 2021 19:01:27 +0000 Received: from mail.tintel.eu ([51.83.127.189]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzNuS-003xlf-O3 for openwrt-devel@lists.openwrt.org; Mon, 20 Dec 2021 19:01:23 +0000 Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id 81E274476604; Mon, 20 Dec 2021 20:01:18 +0100 (CET) Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id ojQDOLUgfH-J; Mon, 20 Dec 2021 20:01:18 +0100 (CET) Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id 1DDFB4476603; Mon, 20 Dec 2021 20:01:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.tintel.eu 1DDFB4476603 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-ipv6.be; s=502B7754-045F-11E5-BBC5-64595FD46BE8; t=1640026878; bh=g+1q7WKBLrg/vj+SpT3kyyo2huP1hPRMmSJqH09rRYo=; h=From:To:Date:Message-Id:MIME-Version; b=YcXVa4VIssMbAWckwrWkjDwXQXlANyNdaggofKOYooAfcIKs3HbwwfNqOI9rQWF3h f7T6u6HOJLAJp1XiigNpLb1M0dDdfjtvSFgNnDWy5l4Kb/XEVXNFXVPBPVFazIDhw6 nEmRFd0tbB3UYXZNvB8vyHr1NNMrJN7EnDkfI+OQ= X-Virus-Scanned: amavisd-new at mail.tintel.eu Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id qcJR9aH2xvb5; Mon, 20 Dec 2021 20:01:18 +0100 (CET) Received: from taz.sof.bg.adlevio.net (unknown [IPv6:2001:67c:21bc:20::10]) by mail.tintel.eu (Postfix) with ESMTPS id 69BCA4476602; Mon, 20 Dec 2021 20:01:17 +0100 (CET) From: Stijn Tintel To: openwrt-devel@lists.openwrt.org Cc: mail@adrianschmutzler.de, hauke@hauke-m.de, bobafetthotmail@gmail.com, rsalvaterra@gmail.com, hurricos@gmail.com, scappylappy@gmail.com, bgonyer@gmail.com Subject: [PATCH v2 3/8] toolchain/gcc: use ELFv2 ABI on ppc64 with musl Date: Mon, 20 Dec 2021 21:00:59 +0200 Message-Id: <20211220190104.1964098-4-stijn@linux-ipv6.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211220190104.1964098-1-stijn@linux-ipv6.be> References: <20211220190104.1964098-1-stijn@linux-ipv6.be> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: IP_WHITELIST X-Rspamd-Queue-Id: 69BCA4476602 X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: IP_WHITELIST X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:200533, ipnet:2001:67c:21bc::/48, country:BG]; IP_WHITELIST(0.00)[2001:67c:21bc:20::10] X-Rspamd-Server: skulls X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211220_110120_962367_48EF215E X-CRM114-Status: UNSURE ( 6.26 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: At configuration time, gcc assumes that ppc64be targets use the ELFv1 ABI, and ppc64le targets use the ELFv2 ABI. However, musl libc does not support the ELFv1 ABI on ppc64 at all, regardless of the e [...] Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org At configuration time, gcc assumes that ppc64be targets use the ELFv1 ABI, and ppc64le targets use the ELFv2 ABI. However, musl libc does not support the ELFv1 ABI on ppc64 at all, regardless of the endianness. Therefore, when building for a ppc64 arch and with musl libc, instruct gcc to use the ELFv2 ABI. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93157 for more info. Signed-off-by: Stijn Tintel Reviewed-by: Rui Salvaterra --- toolchain/gcc/common.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index a195002888..bef4fa37f8 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -108,6 +108,7 @@ GCC_CONFIGURE:= \ $(if $(CONFIG_mips64)$(CONFIG_mips64el),--with-arch=mips64 \ --with-abi=$(call qstrip,$(CONFIG_MIPS64_ABI))) \ $(if $(CONFIG_arc),--with-cpu=$(CONFIG_CPU_TYPE)) \ + $(if $(CONFIG_powerpc64), $(if $(CONFIG_USE_MUSL),--with-abi=elfv2)) \ --with-gmp=$(TOPDIR)/staging_dir/host \ --with-mpfr=$(TOPDIR)/staging_dir/host \ --with-mpc=$(TOPDIR)/staging_dir/host \ From patchwork Mon Dec 20 19:01:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stijn Tintel X-Patchwork-Id: 1571199 X-Patchwork-Delegate: stijn@linux-ipv6.be Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=kpYSQPfh; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux-ipv6.be header.i=@linux-ipv6.be header.a=rsa-sha256 header.s=502B7754-045F-11E5-BBC5-64595FD46BE8 header.b=JATzvDjk; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JHptw1lQmz9sCD for ; Tue, 21 Dec 2021 06:05:11 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iF1D+Co6dqRDCdFPAidCNE8l0G4zU3ICZJyG+DpQ8eQ=; b=kpYSQPfhNpczr6 A7zpJg6ncExtDMg0ASyhDk0nW0Ln+fAfdFPm3xCvL4J5ZMp7Zj5vpc4Bp+Am5PLzjw/LpgSm44zyO /BVDbSyOqZhyBr4SRGQQIoccOLtrLqwVjtEkGuNofWMIqVc/T//X7nUKxSVVP27GY9puT4ahdzjyX cznlPmTW1caiFn+bq6n9ituc3W3fsi/oIisN3kuf+iInrPCIf4c+Jr9x22iJAFkuRaMRJ0OYEYZd5 Xxtv+56IVwLiLRWEaE7lZKcWz2Lvc+Srbgpr63Ho1Z8jaPJ/XJp6xHU3LV1qy5HHEqRf1IeEIEfSs SYuTPyOLRn7BL/EY1RyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzNuu-003xtc-Gw; Mon, 20 Dec 2021 19:01:48 +0000 Received: from mail.tintel.eu ([51.83.127.189]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzNuU-003xmZ-QK for openwrt-devel@lists.openwrt.org; Mon, 20 Dec 2021 19:01:25 +0000 Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id 5A93B4476602; Mon, 20 Dec 2021 20:01:21 +0100 (CET) Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id DiqU7_Zjy1hU; Mon, 20 Dec 2021 20:01:20 +0100 (CET) Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id D9EC94476603; Mon, 20 Dec 2021 20:01:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.tintel.eu D9EC94476603 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-ipv6.be; s=502B7754-045F-11E5-BBC5-64595FD46BE8; t=1640026880; bh=Bjns8OWDEdvqLDuwD2qu7b59EgVjIqqPlVrRUJMuNkc=; h=From:To:Date:Message-Id:MIME-Version; b=JATzvDjkHwGfJi8WkouENWd5xBwo6CwM2CukkYgKxkFvJew5oubkn2fodbxwOFNms A8zry+G6S8iDRFFvzNzU5LJ3IsWl9Fpy9exHOlTZuMeBzXxZebU69a+XhM/bybElnO gLgVXwhwcoGh0T276ct7zPlxyGut8c3zv+UvCYgU= X-Virus-Scanned: amavisd-new at mail.tintel.eu Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id Re8C9o3FujKc; Mon, 20 Dec 2021 20:01:20 +0100 (CET) Received: from taz.sof.bg.adlevio.net (unknown [IPv6:2001:67c:21bc:20::10]) by mail.tintel.eu (Postfix) with ESMTPS id 3529E4476602; Mon, 20 Dec 2021 20:01:20 +0100 (CET) From: Stijn Tintel To: openwrt-devel@lists.openwrt.org Cc: mail@adrianschmutzler.de, hauke@hauke-m.de, bobafetthotmail@gmail.com, rsalvaterra@gmail.com, hurricos@gmail.com, scappylappy@gmail.com, bgonyer@gmail.com Subject: [PATCH v2 4/8] openssl: add ppc64 support Date: Mon, 20 Dec 2021 21:01:00 +0200 Message-Id: <20211220190104.1964098-5-stijn@linux-ipv6.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211220190104.1964098-1-stijn@linux-ipv6.be> References: <20211220190104.1964098-1-stijn@linux-ipv6.be> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: IP_WHITELIST X-Rspamd-Queue-Id: 3529E4476602 X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: IP_WHITELIST X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:200533, ipnet:2001:67c:21bc::/48, country:BG]; IP_WHITELIST(0.00)[2001:67c:21bc:20::10] X-Rspamd-Server: skulls X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211220_110123_192174_E51601E6 X-CRM114-Status: GOOD ( 16.06 ) X-Spam-Score: 0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Backport an upstream patch that adds support for ELFv2 ABI on big endian ppc64. As musl only supports ELFv2 ABI on ppc64 regardless of endianness, this is required to be able to build OpenSSL for ppc6 [...] Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Backport an upstream patch that adds support for ELFv2 ABI on big endian ppc64. As musl only supports ELFv2 ABI on ppc64 regardless of endianness, this is required to be able to build OpenSSL for ppc64be. Modify our targets patch to add linux-powerpc64-openwrt, which will use the linux64v2 perlasm scheme. This will probably break the combination ppc64 with glibc, but as we really only want to support musl, this shouldn't be a problem. Signed-off-by: Stijn Tintel --- package/libs/openssl/Makefile | 2 +- ...m-ppc-xlate.pl-add-linux64v2-flavour.patch | 63 +++++++++++++++++++ .../openssl/patches/110-openwrt_targets.patch | 6 +- 3 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 package/libs/openssl/patches/001-crypto-perlasm-ppc-xlate.pl-add-linux64v2-flavour.patch diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index 3f5fe90d9c..0512abdc48 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -11,7 +11,7 @@ PKG_NAME:=openssl PKG_BASE:=1.1.1 PKG_BUGFIX:=l PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_USE_MIPS16:=0 ENGINES_DIR=engines-1.1 diff --git a/package/libs/openssl/patches/001-crypto-perlasm-ppc-xlate.pl-add-linux64v2-flavour.patch b/package/libs/openssl/patches/001-crypto-perlasm-ppc-xlate.pl-add-linux64v2-flavour.patch new file mode 100644 index 0000000000..bdc0509f8c --- /dev/null +++ b/package/libs/openssl/patches/001-crypto-perlasm-ppc-xlate.pl-add-linux64v2-flavour.patch @@ -0,0 +1,63 @@ +From 34ab13b7d8e3e723adb60be8142e38b7c9cd382a Mon Sep 17 00:00:00 2001 +From: Andy Polyakov +Date: Sun, 5 May 2019 18:25:50 +0200 +Subject: [PATCH] crypto/perlasm/ppc-xlate.pl: add linux64v2 flavour +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This is a big endian ELFv2 configuration. ELFv2 was already being +used for little endian, and big endian was traditionally ELFv1 +but there are practical configurations that use ELFv2 with big +endian nowadays (Adélie Linux, Void Linux, possibly Gentoo, etc.) + +Reviewed-by: Paul Dale +Reviewed-by: Richard Levitte +(Merged from https://github.com/openssl/openssl/pull/8883) +--- + crypto/perlasm/ppc-xlate.pl | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/crypto/perlasm/ppc-xlate.pl b/crypto/perlasm/ppc-xlate.pl +index e52f2f6ea6..5fcd0526df 100755 +--- a/crypto/perlasm/ppc-xlate.pl ++++ b/crypto/perlasm/ppc-xlate.pl +@@ -49,7 +49,7 @@ my $globl = sub { + /osx/ && do { $name = "_$name"; + last; + }; +- /linux.*(32|64le)/ ++ /linux.*(32|64(le|v2))/ + && do { $ret .= ".globl $name"; + if (!$$type) { + $ret .= "\n.type $name,\@function"; +@@ -80,7 +80,7 @@ my $globl = sub { + }; + my $text = sub { + my $ret = ($flavour =~ /aix/) ? ".csect\t.text[PR],7" : ".text"; +- $ret = ".abiversion 2\n".$ret if ($flavour =~ /linux.*64le/); ++ $ret = ".abiversion 2\n".$ret if ($flavour =~ /linux.*64(le|v2)/); + $ret; + }; + my $machine = sub { +@@ -186,7 +186,7 @@ my $vmr = sub { + + # Some ABIs specify vrsave, special-purpose register #256, as reserved + # for system use. +-my $no_vrsave = ($flavour =~ /aix|linux64le/); ++my $no_vrsave = ($flavour =~ /aix|linux64(le|v2)/); + my $mtspr = sub { + my ($f,$idx,$ra) = @_; + if ($idx == 256 && $no_vrsave) { +@@ -320,7 +320,7 @@ while($line=<>) { + if ($label) { + my $xlated = ($GLOBALS{$label} or $label); + print "$xlated:"; +- if ($flavour =~ /linux.*64le/) { ++ if ($flavour =~ /linux.*64(le|v2)/) { + if ($TYPES{$label} =~ /function/) { + printf "\n.localentry %s,0\n",$xlated; + } +-- +2.31.1 + diff --git a/package/libs/openssl/patches/110-openwrt_targets.patch b/package/libs/openssl/patches/110-openwrt_targets.patch index d0530b4661..828c14d21d 100644 --- a/package/libs/openssl/patches/110-openwrt_targets.patch +++ b/package/libs/openssl/patches/110-openwrt_targets.patch @@ -12,7 +12,7 @@ new file mode 100644 index 0000000000..86a86d31e4 --- /dev/null +++ b/Configurations/25-openwrt.conf -@@ -0,0 +1,48 @@ +@@ -0,0 +1,52 @@ +## Openwrt "CONFIG_ARCH" matching targets. + +# The targets need to end in '-openwrt' for the AFALG patch to work @@ -52,6 +52,10 @@ index 0000000000..86a86d31e4 + "linux-powerpc-openwrt" => { + inherit_from => [ "linux-ppc", "openwrt" ], + }, ++ "linux-powerpc64-openwrt" => { ++ inherit_from => [ "linux-ppc64", "openwrt" ], ++ perlasm_scheme => "linux64v2", ++ }, + "linux-x86_64-openwrt" => { + inherit_from => [ "linux-x86_64", "openwrt" ], + }, From patchwork Mon Dec 20 19:01:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stijn Tintel X-Patchwork-Id: 1571203 X-Patchwork-Delegate: stijn@linux-ipv6.be Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=bDAzgd+h; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux-ipv6.be header.i=@linux-ipv6.be header.a=rsa-sha256 header.s=502B7754-045F-11E5-BBC5-64595FD46BE8 header.b=dBCUpDf9; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JHpxw6FgXz9sCD for ; Tue, 21 Dec 2021 06:07:48 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uerZjbZPTUbe8MJpgNNAdbTJOADFvGCw+svh99MYx3g=; b=bDAzgd+h3J4Fhz C2k7Z77IbwhO29rFfBur+b4xW6rLJm4ht75Kqby2JAEjYqdq5qrDR9yGRqL7MR+z55BZ3QHfUMZhc 7vPcat0Knqjt+d7ecxODWf3ld4LOpTjXsdkGp9QkeKroOvyybnO9+8Mp9wYLfTV+wG9TwlTXemcA+ kGgD7HxBKqOAL0nuYmYdF6j2GBRv9JmcpWsTpQ8NZmf2zk3suxFXR+M5BStO85k+D6EM0snD/iqCW TF05WncIMSpChbApngVlMuL5YSZGDzedOeIwG5lKTGTnlVRfudYO4GDG/AgJdDxTHLmLprkLO+WJq xesZOGmbx8zuATQVcb3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzNwo-003yKG-F7; Mon, 20 Dec 2021 19:03:46 +0000 Received: from mail.tintel.eu ([51.83.127.189]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzNuX-003xnk-Ka for openwrt-devel@lists.openwrt.org; Mon, 20 Dec 2021 19:01:27 +0000 Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id 29ABC4476603; Mon, 20 Dec 2021 20:01:24 +0100 (CET) Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id KX7ZwlyriBuS; Mon, 20 Dec 2021 20:01:23 +0100 (CET) Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id 97C044476606; Mon, 20 Dec 2021 20:01:23 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.tintel.eu 97C044476606 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-ipv6.be; s=502B7754-045F-11E5-BBC5-64595FD46BE8; t=1640026883; bh=GPzJWAAy1telqbfy9WsZDP1Tha38hg7ebLrxkfFUYSo=; h=From:To:Date:Message-Id:MIME-Version; b=dBCUpDf9SNR0vVp81PlIxX8lLNy6Q6EAsHmXGwg8VdX/5fxR9h7I+B3qw/b/+vHOh N1B2sREwyn7iBVWdQJ0OngxU5Ze77J4uv19nfBRhsBBMmIr5pbaF53MK3DJHSmXXqX Cno8xvJl//vDxm/8i1z0u9VTv3qxBsYKSHzP9Bao= X-Virus-Scanned: amavisd-new at mail.tintel.eu Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id LXGpiKQC0hzs; Mon, 20 Dec 2021 20:01:23 +0100 (CET) Received: from taz.sof.bg.adlevio.net (unknown [IPv6:2001:67c:21bc:20::10]) by mail.tintel.eu (Postfix) with ESMTPS id E75FA4476603; Mon, 20 Dec 2021 20:01:22 +0100 (CET) From: Stijn Tintel To: openwrt-devel@lists.openwrt.org Cc: mail@adrianschmutzler.de, hauke@hauke-m.de, bobafetthotmail@gmail.com, rsalvaterra@gmail.com, hurricos@gmail.com, scappylappy@gmail.com, bgonyer@gmail.com Subject: [PATCH v2 5/8] nettle: disable assembler on ppc64 Date: Mon, 20 Dec 2021 21:01:01 +0200 Message-Id: <20211220190104.1964098-6-stijn@linux-ipv6.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211220190104.1964098-1-stijn@linux-ipv6.be> References: <20211220190104.1964098-1-stijn@linux-ipv6.be> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: IP_WHITELIST X-Rspamd-Queue-Id: E75FA4476603 X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: IP_WHITELIST X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:200533, ipnet:2001:67c:21bc::/48, country:BG]; IP_WHITELIST(0.00)[2001:67c:21bc:20::10] X-Rspamd-Server: skulls X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211220_110125_873675_7DC49CC1 X-CRM114-Status: UNSURE ( 6.38 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: As of version 3.7, Nettle added PowerPC64 assembly for several algorithms. Unfortunately, they cause build to fail due to ABI mismatch: gcm-hash.o: ABI version 1 is not compatible with ABI version 2 output Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org As of version 3.7, Nettle added PowerPC64 assembly for several algorithms. Unfortunately, they cause build to fail due to ABI mismatch: gcm-hash.o: ABI version 1 is not compatible with ABI version 2 output Disable assembler when ppc64 and musl are used for now. Signed-off-by: Stijn Tintel --- package/libs/nettle/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/libs/nettle/Makefile b/package/libs/nettle/Makefile index 3b4bd9d053..87853baa82 100644 --- a/package/libs/nettle/Makefile +++ b/package/libs/nettle/Makefile @@ -44,7 +44,8 @@ CONFIGURE_ARGS += \ --enable-fat \ --disable-openssl \ --disable-documentation \ - --enable-static + --enable-static \ + $(if $(CONFIG_powerpc64), $(if $(CONFIG_USE_MUSL),--disable-assembler)) ifeq ($(CONFIG_LIBNETTLE_MINI),y) CONFIGURE_ARGS += --enable-mini-gmp From patchwork Mon Dec 20 19:01:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stijn Tintel X-Patchwork-Id: 1571204 X-Patchwork-Delegate: stijn@linux-ipv6.be Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=sZEwMQ0j; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux-ipv6.be header.i=@linux-ipv6.be header.a=rsa-sha256 header.s=502B7754-045F-11E5-BBC5-64595FD46BE8 header.b=s1JNKn1J; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JHpyB3zd9z9sCD for ; Tue, 21 Dec 2021 06:08:02 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Y4nvVLsX0jopGw9JOZt6HuHLhKlGUyP893o3kPRM34E=; b=sZEwMQ0jJSgOdN UYw/mdUZz1aHw2tBPFkhk/RcqZgw8PbAHJPChNL6DPUHUCfwwQl1ylsU8Nzz9RZRSwasWFp243Dwn HLOjQKjIhEVJZ5R6mfF4WFh0UEVO2pZEIJ/SktjSev8L1RhTJpYuLCCqIQCGEBI8WvoRlfXKisBXt Ij7c/qYZsUbcPGxm3ChKEuXdXWqjs4s5byZ4Fb+aek5s+5fvB8r62zyUkBelYCD7QW2Iz6RH9V6wQ YnvrqnRfqsqOnVIIFkRryUrCa6ntEYsXHkvPMnUiGBHoCMS+rJwMBhBmFT6HjCaBs3tu7R6fyuC2p zLFt2PHF+VzkE1e+D7Vg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzNxn-003ydV-U3; Mon, 20 Dec 2021 19:04:48 +0000 Received: from mail.tintel.eu ([51.83.127.189]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzNuZ-003xoi-Op for openwrt-devel@lists.openwrt.org; Mon, 20 Dec 2021 19:01:29 +0000 Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id 8AFA94476600; Mon, 20 Dec 2021 20:01:26 +0100 (CET) Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id ums1U0wclzZu; Mon, 20 Dec 2021 20:01:26 +0100 (CET) Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id 2540B4476606; Mon, 20 Dec 2021 20:01:26 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.tintel.eu 2540B4476606 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-ipv6.be; s=502B7754-045F-11E5-BBC5-64595FD46BE8; t=1640026886; bh=ntY6HQG18EK7Iz0Vx9JDXH2Pbv1YLewABdqQonQnNzA=; h=From:To:Date:Message-Id:MIME-Version; b=s1JNKn1J1sYRYaZiMFNKd6mvnTZKwrFn5/8bYVkflJfw2FvVwDsvfU5Sz17PslOG4 UtdvPSWwSGA3/P/QAjEi2XsEKvRLruc+f9ikbFml1AiRObQglA2KJFGnzhAj5+BU0K liNASUN2AZoLhUMaXGNdm2sM6K4PMhDcx3tbvzI8= X-Virus-Scanned: amavisd-new at mail.tintel.eu Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id IbDNBCGWV3Qx; Mon, 20 Dec 2021 20:01:26 +0100 (CET) Received: from taz.sof.bg.adlevio.net (unknown [IPv6:2001:67c:21bc:20::10]) by mail.tintel.eu (Postfix) with ESMTPS id 7B8CD4476605; Mon, 20 Dec 2021 20:01:25 +0100 (CET) From: Stijn Tintel To: openwrt-devel@lists.openwrt.org Cc: mail@adrianschmutzler.de, hauke@hauke-m.de, bobafetthotmail@gmail.com, rsalvaterra@gmail.com, hurricos@gmail.com, scappylappy@gmail.com, bgonyer@gmail.com Subject: [PATCH v2 6/8] libunwind: add ppc64 support Date: Mon, 20 Dec 2021 21:01:02 +0200 Message-Id: <20211220190104.1964098-7-stijn@linux-ipv6.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211220190104.1964098-1-stijn@linux-ipv6.be> References: <20211220190104.1964098-1-stijn@linux-ipv6.be> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: IP_WHITELIST X-Rspamd-Queue-Id: 7B8CD4476605 X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: IP_WHITELIST X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:200533, ipnet:2001:67c:21bc::/48, country:BG]; IP_WHITELIST(0.00)[2001:67c:21bc:20::10] X-Rspamd-Server: skulls X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211220_110127_988067_907EBCD2 X-CRM114-Status: GOOD ( 10.42 ) X-Spam-Score: 0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Backport an upstream patch to make libunwind build on ppc64, and add powerpc64 to the dependencies. Signed-off-by: Stijn Tintel --- package/libs/libunwind/Makefile | 4 +-- ...ce-exec_prefix-lib64-libdir-on-ppc64.patch | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+), [...] Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Backport an upstream patch to make libunwind build on ppc64, and add powerpc64 to the dependencies. Signed-off-by: Stijn Tintel --- package/libs/libunwind/Makefile | 4 +-- ...ce-exec_prefix-lib64-libdir-on-ppc64.patch | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 package/libs/libunwind/patches/001-Don-t-force-exec_prefix-lib64-libdir-on-ppc64.patch diff --git a/package/libs/libunwind/Makefile b/package/libs/libunwind/Makefile index 7f79996d25..f129dafcbf 100644 --- a/package/libs/libunwind/Makefile +++ b/package/libs/libunwind/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libunwind PKG_VERSION:=1.5.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME) @@ -32,7 +32,7 @@ define Package/libunwind CATEGORY:=Libraries TITLE:=The libunwind project URL:=http://www.nongnu.org/libunwind/ - DEPENDS:=@((mips||mipsel||mips64||x86_64||arm||aarch64)||(USE_GLIBC&&(powerpc||i386))) +zlib + DEPENDS:=@((mips||mipsel||mips64||powerpc64||x86_64||arm||aarch64)||(USE_GLIBC&&(powerpc||i386))) +zlib ABI_VERSION:=8 endef diff --git a/package/libs/libunwind/patches/001-Don-t-force-exec_prefix-lib64-libdir-on-ppc64.patch b/package/libs/libunwind/patches/001-Don-t-force-exec_prefix-lib64-libdir-on-ppc64.patch new file mode 100644 index 0000000000..d6010ec0ae --- /dev/null +++ b/package/libs/libunwind/patches/001-Don-t-force-exec_prefix-lib64-libdir-on-ppc64.patch @@ -0,0 +1,29 @@ +From 0af7e7a53480ce8e1cf6cfb4e9fe071c1185ef31 Mon Sep 17 00:00:00 2001 +From: Matthias Diener +Date: Fri, 2 Jul 2021 12:36:10 -0500 +Subject: [PATCH] Don't force {exec_prefix}/lib64 libdir on ppc64 + +--- + configure.ac | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 9fadc163..0dec4ca6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -215,12 +215,6 @@ fi + AM_CONDITIONAL(USE_DWARF, [test x$use_dwarf = xyes]) + AC_MSG_RESULT([$use_dwarf]) + +-if test x$target_arch = xppc64; then +- libdir='${exec_prefix}/lib64' +- AC_MSG_NOTICE([PowerPC64 detected, lib will be installed ${libdir}]); +- AC_SUBST([libdir]) +-fi +- + AC_MSG_CHECKING([whether to restrict build to remote support]) + if test x$target_arch != x$host_arch; then + CPPFLAGS="${CPPFLAGS} -DUNW_REMOTE_ONLY" +-- +2.32.0 + From patchwork Mon Dec 20 19:01:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stijn Tintel X-Patchwork-Id: 1571210 X-Patchwork-Delegate: stijn@linux-ipv6.be Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=EwDf8W7X; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux-ipv6.be header.i=@linux-ipv6.be header.a=rsa-sha256 header.s=502B7754-045F-11E5-BBC5-64595FD46BE8 header.b=U4xUtvsY; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JHq0Z6JZdz9sCD for ; Tue, 21 Dec 2021 06:10:06 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hNkh+yY3+xN/NLnprDIWVPTRniaWcan/WbY/3vJ8Q0M=; b=EwDf8W7XInos5m msVVpLBhLqRzgEFYh+CSFXZzMOnAWqnHDP3NldgQz0DT5kEccnBmvIy0uMR6J3AjjvVwnPc5I4C13 hx9BbVqByPk3B8j352tu8lGLPI0lG90dcwnsDbDfJMp8RsHsI+Zs1LQQ5DoixL5fn3Dw2qZk/9k1C b/a8WUVFlve8NWSTjHGHHRBbjnkPvrMtBPnLbdKevti3vvXvxz9KpOowqWgQD6gPjSXqNB8TZdZd2 MVKABZcIkdOiooOEQT6Xi5waU0rPVea4V1a1ntwCDkToNRuBy/w62xWleBc5q9rqtmoTy5kSL6Fd8 u6odqmaCAlByy31RvYuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzO0n-003zhM-57; Mon, 20 Dec 2021 19:07:54 +0000 Received: from mail.tintel.eu ([51.83.127.189]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzNuh-003xqP-3F for openwrt-devel@lists.openwrt.org; Mon, 20 Dec 2021 19:01:37 +0000 Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id D83034476605; Mon, 20 Dec 2021 20:01:29 +0100 (CET) Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id 5ZLrLbtnYorh; Mon, 20 Dec 2021 20:01:29 +0100 (CET) Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id EB88C4476607; Mon, 20 Dec 2021 20:01:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.tintel.eu EB88C4476607 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-ipv6.be; s=502B7754-045F-11E5-BBC5-64595FD46BE8; t=1640026889; bh=2U33KTCp9LnzzClTghJL7CxNHfrk0vpHF5aZ5m55//g=; h=From:To:Date:Message-Id:MIME-Version; b=U4xUtvsYJaRpgeTiQw1GeA2fPVL08z3xmnKUyR2y0JpCN3Ibyvoa7S/A1SIkku135 bOQNJsRlBtoxNbv8Tl9ZQUQ3rM6/RDXmUxEJl48V3rQ5Px35qbb9FQXAMdP9f/ySK3 HGQfI2wryZQU6W0eNBS0X2vRznDgwrwh7YETGlik= X-Virus-Scanned: amavisd-new at mail.tintel.eu Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id vt7x7CDppRPc; Mon, 20 Dec 2021 20:01:28 +0100 (CET) Received: from taz.sof.bg.adlevio.net (unknown [IPv6:2001:67c:21bc:20::10]) by mail.tintel.eu (Postfix) with ESMTPS id 43D7E4476605; Mon, 20 Dec 2021 20:01:28 +0100 (CET) From: Stijn Tintel To: openwrt-devel@lists.openwrt.org Cc: mail@adrianschmutzler.de, hauke@hauke-m.de, bobafetthotmail@gmail.com, rsalvaterra@gmail.com, hurricos@gmail.com, scappylappy@gmail.com, bgonyer@gmail.com Subject: [PATCH v2 7/8] qoriq: new target Date: Mon, 20 Dec 2021 21:01:03 +0200 Message-Id: <20211220190104.1964098-8-stijn@linux-ipv6.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211220190104.1964098-1-stijn@linux-ipv6.be> References: <20211220190104.1964098-1-stijn@linux-ipv6.be> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: IP_WHITELIST X-Rspamd-Queue-Id: 43D7E4476605 X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: IP_WHITELIST X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:200533, ipnet:2001:67c:21bc::/48, country:BG]; IP_WHITELIST(0.00)[2001:67c:21bc:20::10] X-Rspamd-Server: skulls X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211220_110135_446571_0FEE28C5 X-CRM114-Status: GOOD ( 12.38 ) X-Spam-Score: 1.0 (+) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Add a new target named "qoriq", that will support boards using PowerPC processors from NXP's QorIQ brand. This doesn't actually add support for any board yet, so that installation instructions can go in the commit message of the commit that adds actual support for a board. Content analysis details: (1.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid 0.8 UPPERCASE_50_75 message body is 50-75% uppercase X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Add a new target named "qoriq", that will support boards using PowerPC processors from NXP's QorIQ brand. This doesn't actually add support for any board yet, so that installation instructions can go in the commit message of the commit that adds actual support for a board. Signed-off-by: Stijn Tintel --- package/kernel/linux/modules/other.mk | 2 +- target/linux/qoriq/Makefile | 23 ++ target/linux/qoriq/config-5.10 | 384 ++++++++++++++++++++++++++ target/linux/qoriq/generic/target.mk | 3 + target/linux/qoriq/image/Makefile | 36 +++ target/linux/qoriq/image/generic.mk | 0 6 files changed, 447 insertions(+), 1 deletion(-) create mode 100644 target/linux/qoriq/Makefile create mode 100644 target/linux/qoriq/config-5.10 create mode 100644 target/linux/qoriq/generic/target.mk create mode 100644 target/linux/qoriq/image/Makefile create mode 100644 target/linux/qoriq/image/generic.mk diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index fdcc089025..f712c95c8e 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -992,7 +992,7 @@ $(eval $(call KernelPackage,ptp)) define KernelPackage/ptp-qoriq SUBMENU:=$(OTHER_MENU) TITLE:=Freescale QorIQ PTP support - DEPENDS:=@TARGET_mpc85xx +kmod-ptp + DEPENDS:=@(TARGET_mpc85xx||TARGET_qoriq) +kmod-ptp KCONFIG:=CONFIG_PTP_1588_CLOCK_QORIQ FILES:=$(LINUX_DIR)/drivers/ptp/ptp-qoriq.ko AUTOLOAD:=$(call AutoProbe,ptp-qoriq) diff --git a/target/linux/qoriq/Makefile b/target/linux/qoriq/Makefile new file mode 100644 index 0000000000..960ab32c98 --- /dev/null +++ b/target/linux/qoriq/Makefile @@ -0,0 +1,23 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2021 Stijn Tintel + +include $(TOPDIR)/rules.mk + +ARCH:=powerpc64 +BOARD:=qoriq +BOARDNAME:=NXP QorIQ (PowerPC) +CPU_TYPE:=e5500 +FEATURES:=boot-part ext4 fpu legacy-sdcard powerpc64 ramdisk root-part rtc source-only +SUBTARGETS:=generic + +KERNEL_PATCHVER:=5.10 +KERNEL_TESTING_PATCHVER:=5.10 + +KERNELNAME:=zImage + +include $(INCLUDE_DIR)/target.mk + +DEFAULT_PACKAGES += e2fsprogs uboot-envtools + +$(eval $(call BuildTarget)) diff --git a/target/linux/qoriq/config-5.10 b/target/linux/qoriq/config-5.10 new file mode 100644 index 0000000000..6984e60475 --- /dev/null +++ b/target/linux/qoriq/config-5.10 @@ -0,0 +1,384 @@ +CONFIG_64BIT=y +CONFIG_ALTIVEC=y +CONFIG_ARCH_DMA_ADDR_T_64BIT=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_KEEP_MEMBLOCK=y +CONFIG_ARCH_MAY_HAVE_PC_FDC=y +CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y +CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y +CONFIG_ARCH_MMAP_RND_BITS=18 +CONFIG_ARCH_MMAP_RND_BITS_MAX=32 +CONFIG_ARCH_MMAP_RND_BITS_MIN=18 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS=11 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=17 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11 +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_WEAK_RELEASE_ACQUIRE=y +CONFIG_ASN1=y +CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH=y +CONFIG_AUDIT_ARCH=y +CONFIG_BLK_DEV_SD=y +CONFIG_BLK_MQ_PCI=y +CONFIG_BLK_PM=y +CONFIG_BLK_SCSI_REQUEST=y +CONFIG_BLOCK_COMPAT=y +CONFIG_BOOKE=y +CONFIG_CLKDEV_LOOKUP=y +CONFIG_CLK_QORIQ=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_CLZ_TAB=y +CONFIG_COMMON_CLK=y +CONFIG_COMPAT=y +CONFIG_COMPAT_32BIT_TIME=y +CONFIG_COMPAT_BINFMT_ELF=y +CONFIG_COMPAT_NETLINK_MESSAGES=y +CONFIG_COMPAT_OLD_SIGACTION=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_CORENET_GENERIC=y +# CONFIG_CPUFREQ_DT is not set +CONFIG_CPU_BIG_ENDIAN=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set +# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_GOV_USERSPACE is not set +# CONFIG_CPU_FREQ_STAT is not set +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_GOV_LADDER=y +CONFIG_CPU_IDLE_GOV_TEO=y +CONFIG_CPU_ISOLATION=y +CONFIG_CPU_RMAP=y +CONFIG_CRC16=y +CONFIG_CRYPTO_AUTHENC=y +CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_CRC32C_VPMSUM is not set +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_DEV_FSL_CAAM=y +CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y +CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC=y +CONFIG_CRYPTO_DEV_FSL_CAAM_COMMON=y +CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y +CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC=y +CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_QI=y +# CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG is not set +# CONFIG_CRYPTO_DEV_FSL_CAAM_INTC is not set +CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y +CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y +CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9 +CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y +# CONFIG_CRYPTO_DEV_NX is not set +CONFIG_CRYPTO_ECB=y +CONFIG_CRYPTO_ENGINE=y +CONFIG_CRYPTO_GF128MUL=y +CONFIG_CRYPTO_HW=y +CONFIG_CRYPTO_LIB_DES=y +CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1 +# CONFIG_CRYPTO_MD5_PPC is not set +CONFIG_CRYPTO_NULL2=y +CONFIG_CRYPTO_RNG=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_RSA=y +# CONFIG_CRYPTO_SHA1_PPC is not set +CONFIG_CRYPTO_XTS=y +CONFIG_DATA_SHIFT=12 +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF4=y +CONFIG_DEFAULT_UIMAGE=y +CONFIG_DMADEVICES=y +CONFIG_DMA_ENGINE=y +CONFIG_DMA_OF=y +CONFIG_DMA_OPS=y +CONFIG_DMA_OPS_BYPASS=y +CONFIG_DTC=y +CONFIG_DUMMY_CONSOLE=y +CONFIG_DYNAMIC_DEBUG=y +CONFIG_E500=y +# CONFIG_E5500_CPU is not set +CONFIG_E6500_CPU=y +CONFIG_EARLY_PRINTK=y +CONFIG_EDAC=y +CONFIG_EDAC_ATOMIC_SCRUB=y +# CONFIG_EDAC_CPC925 is not set +# CONFIG_EDAC_DEBUG is not set +CONFIG_EDAC_LEGACY_SYSFS=y +CONFIG_EDAC_MPC85XX=y +CONFIG_EDAC_SUPPORT=y +CONFIG_EPAPR_PARAVIRT=y +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_FIXED_PHY=y +CONFIG_FORCE_MAX_ZONEORDER=13 +# CONFIG_FSL_BMAN_TEST is not set +CONFIG_FSL_CORENET_CF=y +CONFIG_FSL_CORENET_RCPM=y +CONFIG_FSL_DMA=y +CONFIG_FSL_DPAA=y +# CONFIG_FSL_DPAA_CHECKING is not set +CONFIG_FSL_DPAA_ETH=y +CONFIG_FSL_EMB_PERFMON=y +CONFIG_FSL_FMAN=y +CONFIG_FSL_GUTS=y +CONFIG_FSL_IFC=y +CONFIG_FSL_LBC=y +CONFIG_FSL_MPIC_TIMER_WAKEUP=y +CONFIG_FSL_PAMU=y +CONFIG_FSL_PCI=y +# CONFIG_FSL_QMAN_TEST is not set +CONFIG_FSL_SOC=y +CONFIG_FSL_SOC_BOOKE=y +CONFIG_FSL_XGMAC_MDIO=y +CONFIG_FS_IOMAP=y +CONFIG_FS_MBCACHE=y +CONFIG_FS_POSIX_ACL=y +CONFIG_FTL=y +CONFIG_FUNCTION_ERROR_INJECTION=y +CONFIG_FW_LOADER_PAGED_BUF=y +CONFIG_GDB_SCRIPTS=y +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_GENERIC_BUG=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y +CONFIG_GENERIC_CMOS_UPDATE=y +# CONFIG_GENERIC_CPU is not set +CONFIG_GENERIC_CPU_AUTOPROBE=y +CONFIG_GENERIC_CPU_VULNERABILITIES=y +CONFIG_GENERIC_EARLY_IOREMAP=y +CONFIG_GENERIC_IRQ_MIGRATION=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_MSI_IRQ=y +CONFIG_GENERIC_MSI_IRQ_DOMAIN=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_PHY=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GENERIC_TIME_VSYSCALL=y +# CONFIG_GEN_RTC is not set +# CONFIG_GIANFAR is not set +CONFIG_GLOB=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_GENERIC=y +CONFIG_GPIO_MPC8XXX=y +CONFIG_GRO_CELLS=y +# CONFIG_HANGCHECK_TIMER is not set +# CONFIG_HARDENED_USERCOPY is not set +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT_MAP=y +CONFIG_HWMON=y +CONFIG_HW_CONSOLE=y +CONFIG_HW_RANDOM=y +CONFIG_HZ_PERIODIC=y +CONFIG_ILLEGAL_POINTER_VALUE=0x5deadbeef0000000 +CONFIG_INITRAMFS_SOURCE="" +CONFIG_INPUT=y +CONFIG_IOMMU_API=y +# CONFIG_IOMMU_DEBUGFS is not set +# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set +CONFIG_IOMMU_HELPER=y +CONFIG_IOMMU_SUPPORT=y +CONFIG_IRQCHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_DOMAIN_HIERARCHY=y +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_IRQ_WORK=y +CONFIG_ISA_DMA_API=y +CONFIG_JBD2=y +CONFIG_KALLSYMS=y +CONFIG_KERNEL_GZIP=y +CONFIG_KERNEL_START=0xc000000000000000 +CONFIG_KPROBES=y +CONFIG_KRETPROBES=y +# CONFIG_LD_HEAD_STUB_CATCH is not set +CONFIG_LIBFDT=y +CONFIG_LLD_VERSION=0 +CONFIG_LOCK_DEBUGGING_SUPPORT=y +CONFIG_LOCK_SPIN_ON_OWNER=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_MATH_EMULATION=y +# CONFIG_MATH_EMULATION_FULL is not set +CONFIG_MATH_EMULATION_HW_UNIMPLEMENTED=y +CONFIG_MDIO_BUS=y +CONFIG_MDIO_DEVICE=y +CONFIG_MDIO_DEVRES=y +CONFIG_MEMFD_CREATE=y +CONFIG_MEMORY=y +CONFIG_MIGRATION=y +CONFIG_MMC=y +CONFIG_MMC_BLOCK=y +CONFIG_MMC_DEBUG=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_IO_ACCESSORS=y +CONFIG_MMC_SDHCI_OF_ESDHC=y +# CONFIG_MMC_SDHCI_PCI is not set +CONFIG_MMC_SDHCI_PLTFM=y +# CONFIG_MMC_WBSD is not set +CONFIG_MMIOWB=y +CONFIG_MMU_GATHER_PAGE_SIZE=y +CONFIG_MODULES_USE_ELF_RELA=y +CONFIG_MPIC=y +CONFIG_MPIC_MSGR=y +CONFIG_MPIC_TIMER=y +CONFIG_MPILIB=y +CONFIG_MTD_NAND_CORE=y +CONFIG_MTD_NAND_ECC=y +CONFIG_MTD_NAND_ECC_SW_HAMMING=y +CONFIG_MTD_NAND_FSL_IFC=y +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_RAW_NAND=y +CONFIG_MUTEX_SPIN_ON_OWNER=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y +CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y +CONFIG_NEED_SG_DMA_LENGTH=y +CONFIG_NET_DEVLINK=y +CONFIG_NET_DSA=y +# CONFIG_NET_DSA_MSCC_FELIX is not set +CONFIG_NET_DSA_MV88E6XXX=y +CONFIG_NET_DSA_MV88E6XXX_GLOBAL2=y +CONFIG_NET_DSA_TAG_DSA=y +CONFIG_NET_DSA_TAG_EDSA=y +CONFIG_NET_DSA_TAG_OCELOT=y +CONFIG_NET_DSA_TAG_TRAILER=y +CONFIG_NET_FLOW_LIMIT=y +CONFIG_NET_SWITCHDEV=y +CONFIG_NLS=y +CONFIG_NR_CPUS=24 +CONFIG_NR_IRQS=512 +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_DMA_DEFAULT_COHERENT=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IOMMU=y +CONFIG_OF_IRQ=y +CONFIG_OF_KOBJ=y +CONFIG_OF_MDIO=y +CONFIG_OF_NET=y +CONFIG_OLD_SIGSUSPEND=y +CONFIG_OPTPROBES=y +CONFIG_PACKING=y +CONFIG_PADATA=y +CONFIG_PAGE_OFFSET=0xc000000000000000 +CONFIG_PCI=y +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_MSI=y +CONFIG_PCI_MSI_ARCH_FALLBACKS=y +CONFIG_PCI_MSI_IRQ_DOMAIN=y +CONFIG_PGTABLE_LEVELS=4 +CONFIG_PHYLIB=y +CONFIG_PHYLINK=y +CONFIG_PHYSICAL_START=0x00000000 +CONFIG_PHYS_64BIT=y +CONFIG_PHYS_ADDR_T_64BIT=y +CONFIG_PM=y +# CONFIG_PMU_SYSFS is not set +CONFIG_PM_CLK=y +CONFIG_PPC=y +CONFIG_PPC64=y +CONFIG_PPC_ADV_DEBUG_DACS=2 +CONFIG_PPC_ADV_DEBUG_DVCS=0 +CONFIG_PPC_ADV_DEBUG_IACS=2 +CONFIG_PPC_ADV_DEBUG_REGS=y +CONFIG_PPC_BARRIER_NOSPEC=y +CONFIG_PPC_BOOK3E=y +CONFIG_PPC_BOOK3E_64=y +CONFIG_PPC_BOOK3E_MMU=y +# CONFIG_PPC_BOOK3S_64 is not set +CONFIG_PPC_DAWR=y +CONFIG_PPC_DOORBELL=y +CONFIG_PPC_E500MC=y +# CONFIG_PPC_EARLY_DEBUG is not set +CONFIG_PPC_EPAPR_HV_PIC=y +CONFIG_PPC_FPU=y +CONFIG_PPC_FSL_BOOK3E=y +CONFIG_PPC_INDIRECT_PCI=y +# CONFIG_PPC_IRQ_SOFT_MASK_DEBUG is not set +CONFIG_PPC_MMU_NOHASH=y +CONFIG_PPC_MSI_BITMAP=y +CONFIG_PPC_OF_BOOT_TRAMPOLINE=y +CONFIG_PPC_PAGE_SHIFT=12 +# CONFIG_PPC_PTDUMP is not set +# CONFIG_PPC_QEMU_E500 is not set +CONFIG_PPC_QUEUED_SPINLOCKS=y +CONFIG_PPC_SMP_MUXED_IPI=y +CONFIG_PPC_UDBG_16550=y +CONFIG_PPC_WERROR=y +CONFIG_PPS=y +CONFIG_PTE_64BIT=y +CONFIG_QORIQ_CPUFREQ=y +CONFIG_QORIQ_THERMAL=y +CONFIG_QUEUED_RWLOCKS=y +CONFIG_QUEUED_SPINLOCKS=y +CONFIG_RAS=y +CONFIG_RATIONAL=y +# CONFIG_RAVE_SP_CORE is not set +CONFIG_REGMAP=y +CONFIG_REGMAP_MMIO=y +CONFIG_RFS_ACCEL=y +CONFIG_RPS=y +CONFIG_RWSEM_SPIN_ON_OWNER=y +# CONFIG_SCOM_DEBUGFS is not set +CONFIG_SCSI=y +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_FSL=y +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_DEV_BUS=y +CONFIG_SERIAL_DEV_CTRL_TTYPORT=y +CONFIG_SERIAL_FSL_LINFLEXUART=y +CONFIG_SERIAL_FSL_LINFLEXUART_CONSOLE=y +CONFIG_SERIAL_FSL_LPUART=y +CONFIG_SERIAL_FSL_LPUART_CONSOLE=y +CONFIG_SERIAL_MCTRL_GPIO=y +CONFIG_SG_POOL=y +CONFIG_SLUB_DEBUG=y +CONFIG_SMP=y +CONFIG_SOC_BUS=y +CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y +CONFIG_SPARSE_IRQ=y +CONFIG_SPI=y +CONFIG_SPI_FSL_ESPI=y +CONFIG_SPI_MASTER=y +CONFIG_SRCU=y +CONFIG_SWIOTLB=y +CONFIG_SWPHY=y +CONFIG_SYSCTL_EXCEPTION_TRACE=y +CONFIG_SYSVIPC_COMPAT=y +CONFIG_SYS_SUPPORTS_HUGETLBFS=y +CONFIG_TARGET_CPU_BOOL=y +CONFIG_THERMAL=y +CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y +CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 +CONFIG_THERMAL_GOV_STEP_WISE=y +CONFIG_THERMAL_OF=y +CONFIG_THREAD_INFO_IN_TASK=y +CONFIG_THREAD_SHIFT=14 +CONFIG_TREE_RCU=y +CONFIG_TREE_SRCU=y +# CONFIG_UACCE is not set +CONFIG_USB=y +CONFIG_USB_COMMON=y +CONFIG_USB_EHCI_FSL=y +CONFIG_USB_EHCI_HCD=y +# CONFIG_USB_EHCI_HCD_PLATFORM is not set +CONFIG_USB_STORAGE=y +CONFIG_USB_SUPPORT=y +CONFIG_USB_UAS=y +CONFIG_VDSO32=y +CONFIG_VGA_CONSOLE=y +CONFIG_VIRT_CPU_ACCOUNTING=y +CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +# CONFIG_VT_HW_CONSOLE_BINDING is not set +# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set +CONFIG_XPS=y +CONFIG_ZLIB_DEFLATE=y diff --git a/target/linux/qoriq/generic/target.mk b/target/linux/qoriq/generic/target.mk new file mode 100644 index 0000000000..b3bdb405f7 --- /dev/null +++ b/target/linux/qoriq/generic/target.mk @@ -0,0 +1,3 @@ +define Target/Description + Build firmware images for NXP QorIQ boards in the AMP series. +endef diff --git a/target/linux/qoriq/image/Makefile b/target/linux/qoriq/image/Makefile new file mode 100644 index 0000000000..a3c8dd38c2 --- /dev/null +++ b/target/linux/qoriq/image/Makefile @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: GPL-2.0-only + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/image.mk + +SQUASHFSCOMP := xz $(LZMA_XZ_OPTIONS) + +define Build/sdcard-img + rm -fR $@.boot + mkdir -p $@.boot + $(CP) $(KDIR)/$(DEVICE_NAME)-kernel.bin $@.boot + $(if $(DEVICE_DTS),\ + $(foreach dtb,$(DEVICE_DTS),$(CP) $(KDIR)/image-$(dtb).dtb $@.boot), \ + $(CP) $(KDIR)/image-/*.dtb $@.boot) + + $(SCRIPT_DIR)/gen_image_generic.sh \ + $@ \ + $(CONFIG_TARGET_KERNEL_PARTSIZE) $@.boot \ + $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(IMAGE_ROOTFS) \ + 2048 + + $(if $(UBOOT),dd if=$(STAGING_DIR_IMAGE)/$(UBOOT).img of=$@ bs=512 skip=1 seek=1 conv=notrunc) +endef + +define Device/Default + PROFILES := Default + DEVICE_DTS := $(subst _,-,$(1)) + KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts) + KERNEL_ENTRY := 0x00000000 + KERNEL_LOADADDR := 0x00000000 + KERNEL := kernel-bin +endef + +include $(SUBTARGET).mk + +$(eval $(call BuildImage)) diff --git a/target/linux/qoriq/image/generic.mk b/target/linux/qoriq/image/generic.mk new file mode 100644 index 0000000000..e69de29bb2 From patchwork Mon Dec 20 19:01:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stijn Tintel X-Patchwork-Id: 1571207 X-Patchwork-Delegate: stijn@linux-ipv6.be Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=lTdF+Ij5; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux-ipv6.be header.i=@linux-ipv6.be header.a=rsa-sha256 header.s=502B7754-045F-11E5-BBC5-64595FD46BE8 header.b=rWaXzlRJ; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JHpym4GTTz9sCD for ; Tue, 21 Dec 2021 06:08:32 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yQHxCp6uvVMsTAMEnr3cCyiOV5CNeCf3pha5YMgNPNA=; b=lTdF+Ij5EQp2fu zYQjBpXM+qIu5mmM1Wtgk++ubjZaaoP446HDdRmI+zVRogVFV2VPJsS0KSNaEo9CL3XaHR1zjkx4z uvrDqZe3JILTVlqQQHFi4TArCWOKs2bGOyAqcvMrJy3LTE27NBB/mHRjNLSM4Swx3lt3iJm8T4vhP UQyGtBagMa/6GAu+7MamTNVe0kzDh9CFQ/JlTJi0/jFBl3MXNteh3jXbuUaQQ4ZPvqxhjg+HGAzMV xLs3NodwA8KQAc/tawZzpODAiRamGJ2/74LU/FPcQPwmvRhddXEC6CUu24jH2orCNigH5K+jclWug hTaHeRuupLIW9Whr9RHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzNzP-003zBr-84; Mon, 20 Dec 2021 19:06:27 +0000 Received: from mail.tintel.eu ([51.83.127.189]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzNug-003xqF-Aw for openwrt-devel@lists.openwrt.org; Mon, 20 Dec 2021 19:01:36 +0000 Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id CF90C4476606; Mon, 20 Dec 2021 20:01:32 +0100 (CET) Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id upFkHqIIgh-M; Mon, 20 Dec 2021 20:01:32 +0100 (CET) Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id DBBFC4476607; Mon, 20 Dec 2021 20:01:31 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.tintel.eu DBBFC4476607 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-ipv6.be; s=502B7754-045F-11E5-BBC5-64595FD46BE8; t=1640026891; bh=Cf6+yD8rsxJP1gvOfaUFZXyfA29ZacvCODRJ/PI/m4w=; h=From:To:Date:Message-Id:MIME-Version; b=rWaXzlRJtvPx+ktUsmgTUFkGKfV9p4QNn7i+UFdbu+Lw5ofMa2aeEVfr/2b0FMoRf eztYtIYLji/WjQ8rzrc/t7sqWmh2L8bjL5HjNOtfkrh+DKir2YRQ9mQ/IJBO69eJ1I lyQdkG7+wIqn97nZH0EFjz6v34wz7c6wC2Umh4nA= X-Virus-Scanned: amavisd-new at mail.tintel.eu Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id wxqle9BhKF9H; Mon, 20 Dec 2021 20:01:31 +0100 (CET) Received: from taz.sof.bg.adlevio.net (unknown [IPv6:2001:67c:21bc:20::10]) by mail.tintel.eu (Postfix) with ESMTPS id 363374476604; Mon, 20 Dec 2021 20:01:31 +0100 (CET) From: Stijn Tintel To: openwrt-devel@lists.openwrt.org Cc: mail@adrianschmutzler.de, hauke@hauke-m.de, bobafetthotmail@gmail.com, rsalvaterra@gmail.com, hurricos@gmail.com, scappylappy@gmail.com, bgonyer@gmail.com Subject: [PATCH v2 8/8] qoriq: add support for WatchGuard Firebox M300 Date: Mon, 20 Dec 2021 21:01:04 +0200 Message-Id: <20211220190104.1964098-9-stijn@linux-ipv6.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211220190104.1964098-1-stijn@linux-ipv6.be> References: <20211220190104.1964098-1-stijn@linux-ipv6.be> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: IP_WHITELIST X-Rspamd-Queue-Id: 363374476604 X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: IP_WHITELIST X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:200533, ipnet:2001:67c:21bc::/48, country:BG]; IP_WHITELIST(0.00)[2001:67c:21bc:20::10] X-Rspamd-Server: skulls X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211220_110134_713314_D9D6B3CD X-CRM114-Status: GOOD ( 15.20 ) X-Spam-Score: 0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This device is based on NXP's QorIQ T2081QDS board, with a quad-core dual-threaded 1.5 GHz ppc64 CPU and 4GB ECC RAM. The board has 5 ethernet interfaces, of which 3 are connected to the ethernet port [...] Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This device is based on NXP's QorIQ T2081QDS board, with a quad-core dual-threaded 1.5 GHz ppc64 CPU and 4GB ECC RAM. The board has 5 ethernet interfaces, of which 3 are connected to the ethernet ports on the front panel. The other 2 are internally connected to a Marvell 88E6171 switch; the other 5 ports of this switch are also connected to the ethernet ports on the front panel. Installation: write the sdcard image to an SD card. Stock U-Boot will not boot, wait for it to fail then run these commands: setenv OpenWrt_fdt image-watchguard-firebox-m300.dtb setenv OpenWrt_kernel watchguard_firebox-m300-kernel.bin setenv wgBootSysA 'setenv bootargs root=/dev/mmcblk0p2 rw rootdelay=2 console=$consoledev,$baudrate fsl_dpaa_fman.fsl_fm_max_frm=1530; ext2load mmc 0:1 $fdtaddr $OpenWrt_fdt; ext2load mmc 0:1 $loadaddr $OpenWrt_kernel; bootm $loadaddr - $fdtaddr' saveenv reset The default U-Boot boot entry will now boot OpenWrt from the SD card. Signed-off-by: Stijn Tintel --- package/boot/uboot-envtools/files/qoriq | 19 + .../qoriq/base-files/etc/board.d/02_network | 38 ++ .../base-files/lib/preinit/79_move_config | 17 + .../qoriq/base-files/lib/upgrade/platform.sh | 36 ++ .../boot/dts/fsl/watchguard-firebox-m300.dts | 328 ++++++++++++++++++ target/linux/qoriq/image/generic.mk | 13 + 6 files changed, 451 insertions(+) create mode 100644 package/boot/uboot-envtools/files/qoriq create mode 100644 target/linux/qoriq/base-files/etc/board.d/02_network create mode 100644 target/linux/qoriq/base-files/lib/preinit/79_move_config create mode 100755 target/linux/qoriq/base-files/lib/upgrade/platform.sh create mode 100644 target/linux/qoriq/files/arch/powerpc/boot/dts/fsl/watchguard-firebox-m300.dts diff --git a/package/boot/uboot-envtools/files/qoriq b/package/boot/uboot-envtools/files/qoriq new file mode 100644 index 0000000000..df99103203 --- /dev/null +++ b/package/boot/uboot-envtools/files/qoriq @@ -0,0 +1,19 @@ +[ -e /etc/config/ubootenv ] && exit 0 + +touch /etc/config/ubootenv + +. /lib/uboot-envtools.sh +. /lib/functions.sh + +board=$(board_name) + +case "$board" in +watchguard,firebox-m300) + ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" + ;; +esac + +config_load ubootenv +config_foreach ubootenv_add_app_config ubootenv + +exit 0 diff --git a/target/linux/qoriq/base-files/etc/board.d/02_network b/target/linux/qoriq/base-files/etc/board.d/02_network new file mode 100644 index 0000000000..35b7ce9f32 --- /dev/null +++ b/target/linux/qoriq/base-files/etc/board.d/02_network @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +. /lib/functions/uci-defaults.sh +. /lib/functions.sh +. /lib/functions/system.sh + +board_config_update +board=$(board_name) + +wg_set_opt_interface() { + local device="$1" + local offset="$2" + + ucidef_set_interface "$device" device "$device" protocol static ipaddr "10.0.${offset}.1" netmask 255.255.255.0 +} + +case "$board" in +watchguard,firebox-m300) + ucidef_set_interfaces_lan_wan "eth1" "eth0" + wg_set_opt_interface "eth2" "2" + + sweth_mac_offset=0x186d + + for sweth in /sys/class/net/sweth*; do + device="$(basename "$sweth")" + mac="$(mtd_get_mac_text wg_cfg0 "$sweth_mac_offset")" + switchports="$switchports $device" + ucidef_set_network_device_mac "$device" "$mac" + wg_set_opt_interface "$device" "${device#sweth}" + sweth_mac_offset=$(printf "0x%X\n" $(( $sweth_mac_offset + 0x14))) + done + + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/qoriq/base-files/lib/preinit/79_move_config b/target/linux/qoriq/base-files/lib/preinit/79_move_config new file mode 100644 index 0000000000..54dd579660 --- /dev/null +++ b/target/linux/qoriq/base-files/lib/preinit/79_move_config @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +. /lib/functions.sh +. /lib/upgrade/common.sh + +move_config() { + local partdev + + if export_bootdevice && export_partdevice partdev 1; then + mkdir -p /boot + mount -o rw,noatime "/dev/$partdev" /boot + [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" / + umount /boot + fi +} + +boot_hook_add preinit_mount_root move_config diff --git a/target/linux/qoriq/base-files/lib/upgrade/platform.sh b/target/linux/qoriq/base-files/lib/upgrade/platform.sh new file mode 100755 index 0000000000..1392d5eb22 --- /dev/null +++ b/target/linux/qoriq/base-files/lib/upgrade/platform.sh @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +PART_NAME=firmware +REQUIRE_IMAGE_METADATA=1 + +platform_check_image() { + case "$(board_name)" in + watchguard,firebox-m300) + legacy_sdcard_check_image "$1" + ;; + *) + return 0 + ;; + esac +} + +platform_copy_config() { + case "$(board_name)" in + watchguard,firebox-m300) + legacy_sdcard_copy_config "$1" + ;; + *) + return 0 + esac +} + +platform_do_upgrade() { + case "$(board_name)" in + watchguard,firebox-m300) + legacy_sdcard_do_upgrade "$1" + ;; + *) + default_do_upgrade "$1" + ;; + esac +} diff --git a/target/linux/qoriq/files/arch/powerpc/boot/dts/fsl/watchguard-firebox-m300.dts b/target/linux/qoriq/files/arch/powerpc/boot/dts/fsl/watchguard-firebox-m300.dts new file mode 100644 index 0000000000..54f7e06bc5 --- /dev/null +++ b/target/linux/qoriq/files/arch/powerpc/boot/dts/fsl/watchguard-firebox-m300.dts @@ -0,0 +1,328 @@ +// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later +/* + * WatchGuard Firebox M300 Device Tree Source + * Based on t2081qds.dts from Linux 5.10 + * + * Copyright 2013 - 2015 Freescale Semiconductor Inc. + * Copyright 2020 - 2021 Stijn Tintel + */ + +/include/ "t208xsi-pre.dtsi" +/include/ "t208xqds.dtsi" + +/ { + model = "WatchGuard Firebox M300"; + compatible = "watchguard,firebox-m300", "fsl,T2081QDS"; + + interrupt-parent = <&mpic>; + + aliases { + /delete-property/ ethernet0; + /delete-property/ ethernet1; + /delete-property/ ethernet2; + /delete-property/ ethernet3; + /delete-property/ ethernet4; + /delete-property/ ethernet5; + /delete-property/ ethernet6; + /delete-property/ ethernet7; + + ethernet0 = &enet7; + ethernet1 = &enet0; + ethernet2 = &enet1; + ethernet3 = &enet2; + ethernet4 = &enet3; + }; +}; + +&soc { +// Include first to make this the first interface +/include/ "qoriq-fman3-0-10g-1.dtsi" +}; + +// mdio-mux under &boardctrl + its aliases removed. causes crash: +// Oops: Machine check, sig: 7 [#1] + +/include/ "t2081si-post.dtsi" + +// add stuff below the include to make sure we override whatever is there + +&enet0 { + phy-connection-type = "sgmii"; + phy-handle = <&phy1>; +}; + +&enet1 { + phy-connection-type = "sgmii"; + phy-handle = <&phy2>; +}; + +&enet2 { + phy-connection-type = "rgmii"; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&enet3 { + phy-connection-type = "rgmii"; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&enet4 { + status = "disabled"; +}; + +&enet5 { + status = "disabled"; +}; + +&enet6 { + status = "disabled"; +}; + +&enet7 { + phy-connection-type = "sgmii"; + phy-handle = <&phy0>; +}; + +&ifc { + ranges = <0x00 0x00 0x0f 0xefc00000 0x400000>; + + nor@0,0 { + reg = <0x00 0x00 0x400000>; + + partition@0{ + reg = <0x0 0x10000>; + label = "qoriq-rcw"; + read-only; + }; + + partition@10000 { + reg = <0x10000 0x20000>; + label = "wg_cfg0"; + read-only; + }; + + partition@30000 { + reg = <0x30000 0x10000>; + label = "wg_cfg1"; + read-only; + }; + + partition@40000 { + reg = <0x40000 0x10000>; + label = "wg_mfg_data"; + read-only; + }; + + partition@50000 { + reg = <0x50000 0xb0000>; + label = "wg_bootopt_data_and_reserved"; + read-only; + }; + + partition@100000 { + reg = <0x100000 0xb0000>; + label = "wg_extra_reserved_1"; + read-only; + }; + + partition@1B0000 { + reg = <0x1b0000 0xb0000>; + label = "wg_extra_reserved_2"; + read-only; + }; + + partition@260000 { + reg = <0x260000 0xc0000>; + label = "wg_u-boot_failsafe"; + read-only; + }; + + partition@320000 { + reg = <0x320000 0x10000>; + label = "qoriq-fman"; + read-only; + }; + + partition@330000 { + reg = <0x330000 0x10000>; + label = "u-boot-env"; + }; + + partition@340000 { + reg = <0x340000 0xc0000>; + label = "u-boot"; + read-only; + }; + }; + + nand@2,0 { + status = "disabled"; + }; +}; + +&mdio0 { + // m300 ethernet port 0 + phy0: ethernet-phy@0 { + reg = <0x00>; + }; + + // m300 ethernet port 1 + phy1: ethernet-phy@1 { + reg = <0x01>; + }; + + phy2: ethernet-phy@2 { + reg = <0x02>; + }; + + phy3: ethernet-phy@3 { + reg = <0x03>; + }; + + switch0: switch@10 { + compatible = "marvell,mv88e6085"; + reg = <0x10>; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + switch0phy0: switch0phy0@0 { + reg = <0x00>; + interrupt-parent = <&switch0>; + }; + + switch0phy1: switch0phy1@1 { + reg = <0x01>; + interrupt-parent = <&switch0>; + }; + + switch0phy2: switch0phy2@2 { + reg = <0x02>; + interrupt-parent = <&switch0>; + }; + + switch0phy3: switch0phy3@3 { + reg = <0x03>; + interrupt-parent = <&switch0>; + }; + + switch0phy4: switch0phy4@4 { + reg = <0x04>; + interrupt-parent = <&switch0>; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "sweth3"; + phy-handle = <&switch0phy0>; + }; + + port@1 { + reg = <1>; + label = "sweth4"; + phy-handle = <&switch0phy1>; + }; + + port@2 { + reg = <2>; + label = "sweth5"; + phy-handle = <&switch0phy2>; + }; + + port@3 { + reg = <3>; + label = "sweth6"; + phy-handle = <&switch0phy3>; + }; + + port@4 { + reg = <4>; + label = "sweth7"; + phy-handle = <&switch0phy4>; + }; + + // OEM bootlog suggests multiple ports are attached to switch + // Keep this until OEM supplies GPL sources + port@5 { + status = "disabled"; + + reg = "<5>"; + label = "cpu"; + ethernet = <&enet2>; + phy-mode = "rgmii-id"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + port@6 { + reg = <6>; + label = "cpu"; + ethernet = <&enet3>; + phy-mode = "rgmii-id"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; +}; + +&soc { + i2c@118000 { + tpm@29 { + compatible = "tpm,tpm_i2c_atmel"; + reg = <0x29>; + }; + hwmon@2c { + compatible = "winbond,w83793"; + reg = <0x2c>; + }; + hwmon@2d { + compatible = "winbond,w83793"; + reg = <0x2d>; + }; + rtc@32 { + compatible = "ricoh,rs5c372a"; + reg = <0x32>; + }; + pca9547@77 { + status = "disabled"; + }; + }; + + spi@110000 { + // DTS decompiled from OEM DTB contains flash@0 but doesn't work + // spi-nor spi0.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff + // disable for now + flash@0 { + status = "disabled"; + }; + + flash@1 { + status = "disabled"; + }; + + flash@2 { + status = "disabled"; + }; + }; +}; diff --git a/target/linux/qoriq/image/generic.mk b/target/linux/qoriq/image/generic.mk index e69de29bb2..fec971b5c9 100644 --- a/target/linux/qoriq/image/generic.mk +++ b/target/linux/qoriq/image/generic.mk @@ -0,0 +1,13 @@ +define Device/watchguard_firebox-m300 + DEVICE_VENDOR := WatchGuard + DEVICE_MODEL := Firebox M300 + DEVICE_DTS_DIR := $(DTS_DIR)/fsl + DEVICE_PACKAGES := \ + kmod-hwmon-w83793 kmod-ptp-qoriq kmod-rtc-rs5c372a kmod-tpm-i2c-atmel + BLOCKSIZE := 128k + KERNEL := kernel-bin | gzip | uImage gzip + IMAGES := sdcard.img.gz sysupgrade.img.gz + IMAGE/sysupgrade.img.gz := sdcard-img | gzip | append-metadata + IMAGE/sdcard.img.gz := sdcard-img | gzip +endef +TARGET_DEVICES += watchguard_firebox-m300