From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 03 Dec 2021 17:55:54 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mtBqk-0006BS-06 for lore@lore.pengutronix.de; Fri, 03 Dec 2021 17:55:54 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mtBqj-0000cS-ES; Fri, 03 Dec 2021 17:55:53 +0100 Received: from mail-am6eur05on20623.outbound.protection.outlook.com ([2a01:111:f400:7e1b::623] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mtBpr-0008ML-FQ for ptxdist@pengutronix.de; Fri, 03 Dec 2021 17:55:00 +0100 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V4YUIXKO3kQrNPva/XI/Sjy5CZHgUvri8oJSJxibq74UAmuNPaEJjEhX2Fe60ouHZzKxuGlA6+GtMMhjwngsANh/tYEn3OWv84eoCaQ7bKcv3OvCVi4smmJAXBf3Uj+wSe0kcl/jnOEeN4xad4xWrCICp8EUvgcp30F+O1DrMrAQAPLLheKZ0sZKJWXLWUMqMjrr6L3/lHv3UfijfumSWNdCkleWFD4xWS3Zhqbybgn9YM5cYtU8YJ8VIJPmvXka1UfIA4V7v/EhCn36PBZZwzKAsA/fj5f1VZnRWmrmMW03WO/IHDJTLl4ebtRDeCTRx+tAExoh/WhOd76HBTbslw== 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=ZUs+ZMK4uiofJ5jlNfSLlubZ25d5W9YfYy7oINk8Aq0=; b=aMzTvu/O52RXnJ9lyWXrv1bclD/CPth/XqeNKbBCin/ZTdDK5PiAdVGf1wGIF5h0jzOAWMCY7js+2CE3TpRP7euSSTGbqWBFx2RuV/oRkinHwxpgsqTYJ5KryWLq3as/xYQE8j68DCztlvnE4hOk/AgR00+bQA9pbfnrOJX4OAbETj6Yorik+SvmQBoAEr2jgHslG9ZgC9OiHmXrDjqt4XFYhMOeuuaLaDNtlDhw7J+9IVw2KuANssyiGl60oGZymhaYLYWA0q1R86sMICNSHxKqDlqSMreBt5M04wxNulEkCjQWXbPfQLtWf9q+do2aZSRF3CJV9dpdD5Jyuh+B7g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZUs+ZMK4uiofJ5jlNfSLlubZ25d5W9YfYy7oINk8Aq0=; b=0fPHTbFinMgzLMX0Ap52307P1479+1ocEoo8KU4y+DPAPnryK8ji8sCxQqnfe7ZYpRWR+s0l9/2tgqrTDVCPKuvFqz2Yn/KG1w5d8JC5DhXazGX7IcJohiWFd/ofTgVGG3PJk6K2wlAyDeYKRR8ILcAX58BA2KNdwchzowkHrIQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from DBBPR08MB4523.eurprd08.prod.outlook.com (2603:10a6:10:c8::19) by DBAPR08MB5703.eurprd08.prod.outlook.com (2603:10a6:10:1ad::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.24; Fri, 3 Dec 2021 16:54:58 +0000 Received: from DBBPR08MB4523.eurprd08.prod.outlook.com ([fe80::81d1:d448:4016:1956]) by DBBPR08MB4523.eurprd08.prod.outlook.com ([fe80::81d1:d448:4016:1956%3]) with mapi id 15.20.4734.028; Fri, 3 Dec 2021 16:54:59 +0000 From: Michael Riesch To: ptxdist@pengutronix.de Date: Fri, 3 Dec 2021 17:54:40 +0100 Message-Id: <20211203165440.1180588-4-michael.riesch@wolfvision.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211203165440.1180588-1-michael.riesch@wolfvision.net> References: <20211203165440.1180588-1-michael.riesch@wolfvision.net> X-ClientProxiedBy: ZRAP278CA0007.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:10::17) To DBBPR08MB4523.eurprd08.prod.outlook.com (2603:10a6:10:c8::19) MIME-Version: 1.0 Received: from charlie.fritz.box (2a05:1141:1c9:7c00:2971:328c:3026:3149) by ZRAP278CA0007.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:10::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.14 via Frontend Transport; Fri, 3 Dec 2021 16:54:58 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4fcd8641-be67-4488-dff3-08d9b67da424 X-MS-TrafficTypeDiagnostic: DBAPR08MB5703: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:862; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ulBCd8iSCUhE9BMxLfReNg/P6l64cD1i+i915AcgHFsSSuqGmMj8DaoMJtZEcxMbw/Nbt6B57X8Nn03KesqcUA/p16aUn4LeYD6cbSGwcw2nCGPh9wza9KQv/g87kTFBDUrw2o/sRb1iA942EsdGfM+TLy2VP333Fy8BuuKmroXbrF5DOrFz40mYCHRBVRk6ZV+GChYG/TRfBlvvicV5WzEy09WH81nApETqOwcEOK4bDr2ygZeIrzskUmRuXMQ+o+8eV4tAYPEgmPOAM0prFgPb/mWih/Cbj2kjosjNFaOSENCW2V6pvnpsxDsg5VYLfvOyrnSyf/y/I0Hd804/KdC3aMNWUuNlftwzEnqjdI3dGM2e55VjvGgBgG6UQjvKGVl0MlNFVOZJzVf+ZOEkVredS2I5wO4T8St/Jkt4nCGGs4mquapczQYvaRaotsJkx3W9TFc+L7tEy94ANfNKbTMaSjIM6Qgydsdogm9zo9N6W6FopTOhSjU6rkmYCEfyu9lbZWS18tKzGrzQN8vBeO2XgrLlOAoDjGyzFDd7lweDuXKP0ooiTxlsnOIjqZxYS6qC6NvC8bOKLpir+ERS+Yu08GV0JaV18MhN7H4jq3vfMfucETQEhjqr20JUZNbrmPl55we1sV/9zyiM5ztgcw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBBPR08MB4523.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(39840400004)(396003)(376002)(366004)(136003)(6486002)(36756003)(52116002)(5660300002)(44832011)(6666004)(66946007)(66476007)(38100700002)(66556008)(508600001)(8936002)(4326008)(6916009)(316002)(2616005)(6512007)(86362001)(107886003)(450100002)(6506007)(8676002)(1076003)(2906002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?kn0U8V5XSNmBj5BT1P3M6viMKgAc8PSFlP7tyNFQS4XFgq9i3/z+mgRQuuUJ?= =?us-ascii?Q?vZmAuvV3TcTm8WOeJj4lEqqJ2q8Cj0Jy9wytHJ9vC7OjLSFT0VAVWj7Vumzp?= =?us-ascii?Q?+DbuAoQ1Z9jYxzhXqUMYbPRQlbj4MJE1LvTDMG0yMwQOyfn4OSHNo/mQ5z5u?= =?us-ascii?Q?aHBzBiELdcdmoKPImhXB8plv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-ascii?Q?f5h3w8eHI4SghTfR/QkQUv9j7c4TP026enGoNtdibQQ27YZQUHmqj8c5uOYm?= =?us-ascii?Q?FPZTxMPFFvXPL1kHAxkHRDwK5rDzMI5CuBksM8uxl4tUpiTPcCLcyx3QB6+A?= =?us-ascii?Q?fcjeMriSDZGtvB85mksg72WpZIhoCk9Z4esjhlYIZ4ih8Dgw165M9K20I+so?= =?us-ascii?Q?evJMmxyVomEkLa/Ww8QVsrUs/GmwFR531UNoAKI0HMahV4IVqwGt5RnTVe9j?= =?us-ascii?Q?rCOHx0ShdyTrJo4qBL6V0hBWFnSJo0zqwYH2ZB57TmIW+Vs6zfrqQ/qWS8kV?= =?us-ascii?Q?19oEm+dVfi0y9z9SX0sbXUzyNIM7rymNPm9wteuymT2APJ32sXQ9wivviQ29?= =?us-ascii?Q?G4uzZmisqww06yOqRrzv4OJa2TNhwEK7hJxJdqK6/bFEGQZRDQzJikzHheKf?= =?us-ascii?Q?3NsfyP9O4FwkOIMbYAWkUJkFHBv3IEOsWQ20PKWdJP2ONjZ9vH3dRD9Rx6ow?= =?us-ascii?Q?gZDyVIuKJCvJEO0xwx9HJNq8TrFe6pthzQLB8S59ideBZy+r4FJWb7K45HrH?= =?us-ascii?Q?uS8VnAth3wGlwH1sy0hp1T4AL1lb7kA2CUlCrp2B0UbA0HHUcvqY+XMYvfKl?= =?us-ascii?Q?98w8H2tDqNTI8HvOb6tYIM/yYrCYKkgJvznJpVjf57gNT11kkV3aFk1KvmT6?= =?us-ascii?Q?Qj+s2Xge5g=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 4fcd8641-be67-4488-dff3-08d9b67da424 X-MS-Exchange-CrossTenant-AuthSource: DBBPR08MB4523.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2021 16:54:59.1792 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: n/KSjkmqMN75Aax3SvzEjXdHlMU0fweIUfM1Pb+31i1I3/5J1hc44f5pt5H/BK3H9gEB6QZFKy0Kv3bs6bbH/Rgbt4kUEb3zcshOVgAVz4k= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR08MB5703 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-3.2 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: [ptxdist] [RFC PATCH 3/3] barebox: add integration of firmware blobs X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: michael.tretter@pengutronix.de, Michael Riesch Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false In some cases barebox requires firmware blobs, which may be provided in binary form by the vendor or compiled in a preceding step. Add the possibility to specify files which are injected in the barebox source directory during preparation. Signed-off-by: Michael Riesch --- platforms/barebox.in | 23 +++++++++++++++++++++++ rules/barebox.make | 6 ++++++ rules/post/ptxd_make_world_inject.make | 19 +++++++++++++++++++ scripts/lib/ptxd_make_world_inject.sh | 21 +++++++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 rules/post/ptxd_make_world_inject.make create mode 100644 scripts/lib/ptxd_make_world_inject.sh diff --git a/platforms/barebox.in b/platforms/barebox.in index d35d16501..422897a66 100644 --- a/platforms/barebox.in +++ b/platforms/barebox.in @@ -55,6 +55,29 @@ config BAREBOX_CONFIG This entry specifies the .config file used to compile barebox. +menuconfig BAREBOX_FIRMWARE + bool + prompt "integrate firmware blobs " + +if BAREBOX_FIRMWARE + +config BAREBOX_FIRMWARE_PATH + string "path(s) to firmware blobs" + default "${PTXDIST_SYSROOT_TARGET}/usr/lib/firmware" + help + Define path to the firmware blob(s). Multiple directories can + be specified separated by ':'. + +config BAREBOX_FIRMWARE_FILES + string "firmware blob file(s)" + default ".bin" + help + Select the firmware blob to use integrated into the barebox + source before compilation. Multiple dts files can be + specified, separated by spaces. + +endif + config BAREBOX_EXTRA_ENV prompt "extend the builtin barebox environment" bool diff --git a/rules/barebox.make b/rules/barebox.make index bea9f3adc..a81fc86b3 100644 --- a/rules/barebox.make +++ b/rules/barebox.make @@ -26,6 +26,8 @@ BAREBOX_BUILD_DIR := $(BAREBOX_DIR)-build BAREBOX_LICENSE := GPL-2.0-only BAREBOX_DEVPKG := NO BAREBOX_BUILD_OOT := KEEP +BAREBOX_INJECT_PATH :=$(call remove_quotes,$(PTXCONF_BAREBOX_FIRMWARE_PATH)) +BAREBOX_INJECT_FILES :=$(call remove_quotes,$(PTXCONF_BAREBOX_FIRMWARE_FILES)) BAREBOX_CONFIG := $(call ptx/in-platformconfigdir, \ $(call remove_quotes, $(PTXCONF_BAREBOX_CONFIG))) @@ -94,6 +96,10 @@ ifdef PTXCONF_BAREBOX_EXTRA_ENV @rm -rf $(BAREBOX_BUILD_DIR)/defaultenv/barebox_default_env endif +ifdef PTXCONF_BAREBOX_FIRMWARE + @$(call world/inject, BAREBOX) +endif + @$(call touch) # ---------------------------------------------------------------------------- diff --git a/rules/post/ptxd_make_world_inject.make b/rules/post/ptxd_make_world_inject.make new file mode 100644 index 000000000..b7d28e92f --- /dev/null +++ b/rules/post/ptxd_make_world_inject.make @@ -0,0 +1,19 @@ +# -*-makefile-*- +# +# Copyright (C) 2021 by Michael Riesch +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +world/inject/env = \ + $(call world/env, $(1)) \ + pkg_inject_path="$($(1)_INJECT_PATH)" \ + pkg_inject_files="$($(1)_INJECT_FILES)" \ + pkg_source="$($(1)_DIR)" + +world/inject = \ + $(call world/inject/env,$(strip $(1))) \ + ptxd_make_world_inject + +# vim: syntax=make diff --git a/scripts/lib/ptxd_make_world_inject.sh b/scripts/lib/ptxd_make_world_inject.sh new file mode 100644 index 000000000..ac3134498 --- /dev/null +++ b/scripts/lib/ptxd_make_world_inject.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Copyright (C) 2021 by Michael Riesch +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +ptxd_make_world_inject() { + for pair in ${pkg_inject_files}; do + # TODO implement lookup + + source=$pkg_inject_path/$(echo $pair | cut -d ":" -f 1) + target=$pkg_source/$(echo $pair | cut -d ":" -f 2) + + echo -e "\nInject file $source into $target..." + cp $source $target + + done +} +export -f ptxd_make_world_inject -- 2.30.2 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de