From patchwork Fri Feb 25 14:57:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe REYNES X-Patchwork-Id: 1597731 X-Patchwork-Delegate: sjg@chromium.org 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; unprotected) header.d=softathome1.onmicrosoft.com header.i=@softathome1.onmicrosoft.com header.a=rsa-sha256 header.s=selector1-softathome1-onmicrosoft-com header.b=otLZ5ZsU; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K4tFt6mL6z9sFs for ; Sat, 26 Feb 2022 01:58:58 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E79D083CF1; Fri, 25 Feb 2022 15:58:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=softathome.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=softathome1.onmicrosoft.com header.i=@softathome1.onmicrosoft.com header.b="otLZ5ZsU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2D60A83CDD; Fri, 25 Feb 2022 15:58:09 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from FRA01-PR2-obe.outbound.protection.outlook.com (mail-pr2fra01on0602.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e18::602]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2F56A834A3 for ; Fri, 25 Feb 2022 15:58:00 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=softathome.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=philippe.reynes@softathome.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZlcAI1jZ7vxU42jJr7kQBGtnBz9XAiuu7m7JG6OzMsBQxsmq2M9yb1AafTM92o3ARaW/0VpqEk8jCmGudErfwlXmzG6EJ77tbsxccVv9D4BomqW85dTWVrSvTHsBHLRc1GphtsneemAxpDxqwopcvgnsiTTZlUMZYBNZL9fqCNp1kPjkWCPJdjLawpunhOhuWNm3/PUgTr7su7t4TNzM1yyRBcV2fiYUeXq+GDksniq7ddG9HyawgJS0XMkXkwOBAXjD2HMkJq31iUn19HDuylwX5dsTW+Ifej2uZQ05pdhWWbbWEtkKlGbSB9R7jH50B8HWPK1tNhhsHMyVs7pyag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nQ4tGUy0Yu6TMS/4a0kvWhg3+chTLAgLr7HGNFbS5OE=; b=ZGijyPrLkIZQQbJZjUPzR9tp59go0s0NARVsSRNG9YWGb4Cb4QGDJGMRYsFXHV6krOU1BBo9S+XLb/MwOjT/UfOACym/SOBvlmfy4368GPrX7b3n3Iw6PBNmPMAS+F/xcbTAo0ET4qUOIuf9kRP3lJOJgxr5Dx/2bP/CSQLtqkds125qO9pyJY0KXSj33K3ohrzZBvXZH5QzcwcyNw4XQGqbYr0FnWYXB4+5huUNNZTfkpggKaZQ+QBVQ7xfbDX8GGBhfAOdVePT5BWEXbW2WH8xA3POyk1jIwNUHEU+t9jI6OXfbCwBM5A/CtomaPCHp9shGXkuClLU8KSEQuucEQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.6.166.170) smtp.rcpttodomain=chromium.org smtp.mailfrom=softathome.com; dmarc=bestguesspass action=none header.from=softathome.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=softathome1.onmicrosoft.com; s=selector1-softathome1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nQ4tGUy0Yu6TMS/4a0kvWhg3+chTLAgLr7HGNFbS5OE=; b=otLZ5ZsUyf25Ezkffo1GQMZzraBa4kfwkWUDqYX7NQDxxD9XDpG9iTASXP8OYbA6vCnw9yzcIItWB1laMhkLdkL/3pzfCLKICQHHqIWrINTu5MsMVzpjETGzFxZe9+ax0OufAKXdCIO021Rf3KkqBfjaib+LNLPivXx2J/fKBD9cfOt4KBuRSfX8b6MoPZLRutU9sm3rbBxCZryYlmf382+Jl8Vdvbz8olgkxGodNLhjLS/AQq0PAXrd70q+mkwUipahJZu7iyWjJjCb0M8o5J5eVfHTuZbM4UWoc9NXGG75gfOoTWL1vshgrvyBMVMXdXgvHEyDfw0QYJiLV+VHEQ== Received: from MR2P264CA0074.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:32::14) by PR0P264MB2218.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:16c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.23; Fri, 25 Feb 2022 14:57:58 +0000 Received: from MR2FRA01FT007.eop-fra01.prod.protection.outlook.com (2603:10a6:500:32:cafe::52) by MR2P264CA0074.outlook.office365.com (2603:10a6:500:32::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.21 via Frontend Transport; Fri, 25 Feb 2022 14:57:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.6.166.170) smtp.mailfrom=softathome.com; dkim=none (message not signed) header.d=none;dmarc=bestguesspass action=none header.from=softathome.com; Received-SPF: Pass (protection.outlook.com: domain of softathome.com designates 149.6.166.170 as permitted sender) receiver=protection.outlook.com; client-ip=149.6.166.170; helo=proxy.softathome.com; Received: from proxy.softathome.com (149.6.166.170) by MR2FRA01FT007.mail.protection.outlook.com (10.152.50.174) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.22 via Frontend Transport; Fri, 25 Feb 2022 14:57:58 +0000 Received: from localhost.localdomain (unknown [192.168.72.32]) by proxy.softathome.com (Postfix) with ESMTPSA id 422C220040; Fri, 25 Feb 2022 15:57:58 +0100 (CET) From: Philippe Reynes To: sjg@chromium.org, rasmus.villemoes@prevas.dk Cc: u-boot@lists.denx.de, Philippe Reynes Subject: [PATCH v6 04/16] lib: allow to build asn1 decoder and oid registry in SPL Date: Fri, 25 Feb 2022 15:57:42 +0100 Message-Id: <20220225145754.30217-5-philippe.reynes@softathome.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220225145754.30217-1-philippe.reynes@softathome.com> References: <20220225145754.30217-1-philippe.reynes@softathome.com> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 885bda79-b790-4005-cf88-08d9f86f364e X-MS-TrafficTypeDiagnostic: PR0P264MB2218:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rTfdmFyJ3ZagL4D7dsXv1pEfrZYTWUFtHVdNAmRyxrkHpCM3tt6YXZtejWz93Rva4dcLOxa+inZOJqa58QL2Qx14AGBjPjEah767ePzTY49WLwUDvyG2f1mFekJDNi+6eho7hWSNSteiSJxKGDKsMuwVQyqkcWcYggHjU960ZRV+2UdDN1LQDiVvLfULPvgUdpr2myvYUqzsbGh+2JJet70W95YftJH01GYM2ps2ayilaBIHNMc7JVy0chWNgIVXPI2C97E/Cfu5rfG3JxhMKxzCPgy6W/UOpgrDXIiI323xsiNbpaxPWpGp/2wfvaeJolLqa6POrrqkvCwFteuKdZtu1Nhj7UXw3vU9vY5ExM3YhTeFu+CzCPpZgHaJ67zpqYfhb8vP4UILr2JlvZnF2YdJGXZeMMw3Q4s0XdhfYJbjE27fIeAdMfsOJ8fBKDkntOxX+CtGEQSLscNNyaM8kzHmEEKAN+CoGbtE+vTA0VmB01+fJXZipqOeirYYbJ1xVfUjMPpPRnIALLfKlRt5M0F/jTXa+osLWZFjbhLZxbu1njcYhMO7NX2nfSWep1c+GaetbMCN8CIoVqZ5rfHBoD8xAZ9epnzk2lonvBPMHaGlD8Hw4OdLUl+zLfKuHXdVWKlSEUaoUhQy2ps7KBJ92yo1HuFh4+PYCO1HWtpx+dJh9bQxUZzgipze+0LT2NTqeS7mIFZfADI5BnUyL+4kYsylKqC6dmDO9ihO0JfXAPQR9E05HDrWDzRhqW8coFavMjUpygNDdcXBmWY8J4OaHASao7H4xp4uT/0buhzBjxf4f0ISrOIUtKav+kzOTyUjxcX4sRkyGPxR2YXtVcNm1g== X-Forefront-Antispam-Report: CIP:149.6.166.170; CTRY:FR; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:proxy.softathome.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230001)(4636009)(40470700004)(36840700001)(46966006)(36860700001)(6966003)(82310400004)(6266002)(83380400001)(186003)(426003)(336012)(1076003)(2616005)(107886003)(26005)(86362001)(47076005)(508600001)(316002)(6666004)(5660300002)(81166007)(8676002)(8936002)(2906002)(82960400001)(44832011)(36756003)(356005)(40460700003)(70586007)(4326008)(70206006)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: softathome.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Feb 2022 14:57:58.5203 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 885bda79-b790-4005-cf88-08d9f86f364e X-MS-Exchange-CrossTenant-Id: aa10e044-e405-4c10-8353-36b4d0cce511 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=aa10e044-e405-4c10-8353-36b4d0cce511; Ip=[149.6.166.170]; Helo=[proxy.softathome.com] X-MS-Exchange-CrossTenant-AuthSource: MR2FRA01FT007.eop-fra01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR0P264MB2218 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean This commit adds the options: - SPL_ASN1_DECODER - SPL_OID_REGISTRY Signed-off-by: Philippe Reynes Reviewed-by: Simon Glass --- lib/Kconfig | 19 +++++++++++++++++++ lib/Makefile | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lib/Kconfig b/lib/Kconfig index e749826f22..effe735365 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -809,6 +809,16 @@ config ASN1_DECODER and especially in cryptography (https://en.wikipedia.org/wiki/ASN.1). This option enables the support of the asn1 decoder. +config SPL_ASN1_DECODER + bool + help + ASN.1 (Abstract Syntax Notation One) is a standard interface + description language for defining data structures that can be + serialized and deserialized in a cross-platform way. It is + broadly used in telecommunications and computer networking, + and especially in cryptography (https://en.wikipedia.org/wiki/ASN.1). + This option enables the support of the asn1 decoder in the SPL. + config OID_REGISTRY bool help @@ -818,6 +828,15 @@ config OID_REGISTRY unambiguous persistent name (https://en.wikipedia.org/wiki/Object_identifier). Enable fast lookup object identifier registry. +config SPL_OID_REGISTRY + bool + help + In computing, object identifiers or OIDs are an identifier mechanism + standardized by the International Telecommunication Union (ITU) and + ISO/IEC for naming any object, concept, or "thing" with a globally + unambiguous persistent name (https://en.wikipedia.org/wiki/Object_identifier). + Enable fast lookup object identifier registry in the SPL. + config SMBIOS_PARSER bool "SMBIOS parser" help diff --git a/lib/Makefile b/lib/Makefile index 11b03d1cbe..13e5d8f7a6 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -17,7 +17,6 @@ obj-$(CONFIG_OF_LIVE) += of_live.o obj-$(CONFIG_CMD_DHRYSTONE) += dhry/ obj-$(CONFIG_ARCH_AT91) += at91/ obj-$(CONFIG_OPTEE_LIB) += optee/ -obj-$(CONFIG_ASN1_DECODER) += asn1_decoder.o obj-y += crypto/ obj-$(CONFIG_AES) += aes.o @@ -74,6 +73,7 @@ obj-$(CONFIG_SHA1) += sha1.o obj-$(CONFIG_SHA256) += sha256.o obj-$(CONFIG_SHA512) += sha512.o obj-$(CONFIG_CRYPT_PW) += crypt/ +obj-$(CONFIG_$(SPL_)ASN1_DECODER) += asn1_decoder.o obj-$(CONFIG_$(SPL_)ZLIB) += zlib/ obj-$(CONFIG_$(SPL_)ZSTD) += zstd/ @@ -135,9 +135,9 @@ obj-$(CONFIG_$(SPL_TPL_)STRTO) += strto.o else # Main U-Boot always uses the full printf support obj-y += vsprintf.o strto.o -obj-$(CONFIG_OID_REGISTRY) += oid_registry.o obj-$(CONFIG_SSCANF) += sscanf.o endif +obj-$(CONFIG_$(SPL_)OID_REGISTRY) += oid_registry.o obj-y += abuf.o obj-y += date.o