From patchwork Fri Oct 22 17:40:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12578325 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFA7CC433EF for ; Fri, 22 Oct 2021 17:41:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CBFE361052 for ; Fri, 22 Oct 2021 17:41:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234022AbhJVRnR (ORCPT ); Fri, 22 Oct 2021 13:43:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233993AbhJVRnQ (ORCPT ); Fri, 22 Oct 2021 13:43:16 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 669E9C061766; Fri, 22 Oct 2021 10:40:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=/MGNeuPyHl0IXPoyQepAboyZU12EGOersDYOkILGjLY=; b=ae1fAQnTBarw016K8apVXCqEpY 8NqKIzm5OVXq5ALhxtx6sAOwfJc9B7I4KhFRDCZSEmCYnAF7SZX8+tDeUaGYDGjOfWgox7JAQxAZ0 DlGYDDu/DFw42YFydCo0cx/Ye9MrNKFozjasY59cEIQIgEW+As+enH3biU+yqdakm2DYwj/a7RZyg ojURCUbno75QgK1XG/iWlXTFVCTu91gnK6d/6QEBI3Bl70sz6rzh0JkWAEYpZ5ROXVEGcah6+yjpE nhI83gETEyk6XbGt+sjw9nDL+1NnNg9PT/xCrM5ttEfTOi3F66Ec83RYVoSyL/8C18AzAP3qW5Jhq yCC5yiqw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdyX6-00BeR6-Ln; Fri, 22 Oct 2021 17:40:44 +0000 From: Luis Chamberlain To: gregkh@linuxfoundation.org Cc: bp@suse.de, akpm@linux-foundation.org, josh@joshtriplett.org, rishabhb@codeaurora.org, kubakici@wp.pl, maco@android.com, david.brown@linaro.org, bjorn.andersson@linaro.org, linux-wireless@vger.kernel.org, keescook@chromium.org, shuah@kernel.org, mfuzzey@parkeon.com, zohar@linux.vnet.ibm.com, dhowells@redhat.com, pali.rohar@gmail.com, tiwai@suse.de, arend.vanspriel@broadcom.com, zajec5@gmail.com, nbroeking@me.com, broonie@kernel.org, dmitry.torokhov@gmail.com, dwmw2@infradead.org, torvalds@linux-foundation.org, Abhay_Salunke@dell.com, jewalt@lgsinnovations.com, cantabile.desu@gmail.com, ast@fb.com, andresx7@gmail.com, brendanhiggins@google.com, yzaikin@google.com, sfr@canb.auug.org.au, rdunlap@infradead.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Luis Chamberlain Subject: [PATCH v3 1/4] firmware_loader: rename EXTRA_FIRMWARE and EXTRA_FIRMWARE_DIR Date: Fri, 22 Oct 2021 10:40:38 -0700 Message-Id: <20211022174041.2776969-2-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211022174041.2776969-1-mcgrof@kernel.org> References: <20211022174041.2776969-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Now that we've tied loose ends on the built-in firmware API, rename the kconfig symbols for it to reflect more that they are associated to the firmware_loader and to make it easier to understand what they are for. Signed-off-by: Luis Chamberlain --- .../driver-api/firmware/built-in-fw.rst | 6 ++-- Documentation/x86/microcode.rst | 8 ++--- arch/x86/Kconfig | 4 +-- drivers/base/firmware_loader/Kconfig | 29 ++++++++++++------- drivers/base/firmware_loader/builtin/Makefile | 6 ++-- drivers/staging/media/av7110/Kconfig | 4 +-- 6 files changed, 33 insertions(+), 24 deletions(-) diff --git a/Documentation/driver-api/firmware/built-in-fw.rst b/Documentation/driver-api/firmware/built-in-fw.rst index bc1c961bace1..a9a0ab8c9512 100644 --- a/Documentation/driver-api/firmware/built-in-fw.rst +++ b/Documentation/driver-api/firmware/built-in-fw.rst @@ -8,11 +8,11 @@ the filesystem. Instead, firmware can be looked for inside the kernel directly. You can enable built-in firmware using the kernel configuration options: - * CONFIG_EXTRA_FIRMWARE - * CONFIG_EXTRA_FIRMWARE_DIR + * CONFIG_FW_LOADER_BUILTIN_FILES + * CONFIG_FW_LOADER_BUILTIN_DIR There are a few reasons why you might want to consider building your firmware -into the kernel with CONFIG_EXTRA_FIRMWARE: +into the kernel with CONFIG_FW_LOADER_BUILTIN_FILES: * Speed * Firmware is needed for accessing the boot device, and the user doesn't diff --git a/Documentation/x86/microcode.rst b/Documentation/x86/microcode.rst index a320d37982ed..6a5e36bd16bb 100644 --- a/Documentation/x86/microcode.rst +++ b/Documentation/x86/microcode.rst @@ -114,13 +114,13 @@ Builtin microcode ================= The loader supports also loading of a builtin microcode supplied through -the regular builtin firmware method CONFIG_EXTRA_FIRMWARE. Only 64-bit is -currently supported. +the regular builtin firmware method using CONFIG_FW_LOADER_BUILTIN_FILES. +Only 64-bit is currently supported. Here's an example:: - CONFIG_EXTRA_FIRMWARE="intel-ucode/06-3a-09 amd-ucode/microcode_amd_fam15h.bin" - CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware" + CONFIG_FW_LOADER_BUILTIN_FILES="intel-ucode/06-3a-09 amd-ucode/microcode_amd_fam15h.bin" + CONFIG_FW_LOADER_BUILTIN_DIR="/lib/firmware" This basically means, you have the following tree structure locally:: diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index d9830e7e1060..149e4c2a0379 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1305,8 +1305,8 @@ config MICROCODE initrd for microcode blobs. In addition, you can build the microcode into the kernel. For that you - need to add the vendor-supplied microcode to the CONFIG_EXTRA_FIRMWARE - config option. + need to add the vendor-supplied microcode to the configuration option + CONFIG_FW_LOADER_BUILTIN_FILES config MICROCODE_INTEL bool "Intel microcode loading support" diff --git a/drivers/base/firmware_loader/Kconfig b/drivers/base/firmware_loader/Kconfig index 5b24f3959255..2dc3e137d903 100644 --- a/drivers/base/firmware_loader/Kconfig +++ b/drivers/base/firmware_loader/Kconfig @@ -22,14 +22,14 @@ config FW_LOADER You typically want this built-in (=y) but you can also enable this as a module, in which case the firmware_class module will be built. You also want to be sure to enable this built-in if you are going to - enable built-in firmware (CONFIG_EXTRA_FIRMWARE). + enable built-in firmware (CONFIG_FW_LOADER_BUILTIN_FILES). if FW_LOADER config FW_LOADER_PAGED_BUF bool -config EXTRA_FIRMWARE +config FW_LOADER_BUILTIN_FILES string "Build named firmware blobs into the kernel binary" help Device drivers which require firmware can typically deal with @@ -43,14 +43,21 @@ config EXTRA_FIRMWARE in boot and cannot rely on the firmware being placed in an initrd or initramfs. - This option is a string and takes the (space-separated) names of the + Support for built-in firmware is not supported if you are using + the firmware loader as a module. + + This option is a string and takes the space-separated names of the firmware files -- the same names that appear in MODULE_FIRMWARE() and request_firmware() in the source. These files should exist under - the directory specified by the EXTRA_FIRMWARE_DIR option, which is + the directory specified by the FW_LOADER_BUILTIN_DIR option, which is /lib/firmware by default. - For example, you might set CONFIG_EXTRA_FIRMWARE="usb8388.bin", copy - the usb8388.bin file into /lib/firmware, and build the kernel. Then + For example, you might have set: + + CONFIG_FW_LOADER_BUILTIN_FILES="usb8388.bin" + + After this you would copy the usb8388.bin file into directory + specified by FW_LOADER_BUILTIN_DIR and build the kernel. Then any request_firmware("usb8388.bin") will be satisfied internally inside the kernel without ever looking at your filesystem at runtime. @@ -60,13 +67,15 @@ config EXTRA_FIRMWARE image since it combines both GPL and non-GPL work. You should consult a lawyer of your own before distributing such an image. -config EXTRA_FIRMWARE_DIR - string "Firmware blobs root directory" +config FW_LOADER_BUILTIN_DIR + string "Directory with firmware to be built-in to the kernel" depends on EXTRA_FIRMWARE != "" default "/lib/firmware" help - This option controls the directory in which the kernel build system - looks for the firmware files listed in the EXTRA_FIRMWARE option. + This option specifies the directory which the kernel build system + will use to look for the firmware files which are going to be + built into the kernel using the space-separated + FW_LOADER_BUILTIN_FILES entries. config FW_LOADER_USER_HELPER bool "Enable the firmware sysfs fallback mechanism" diff --git a/drivers/base/firmware_loader/builtin/Makefile b/drivers/base/firmware_loader/builtin/Makefile index eb4be452062a..7cdd0b5c7384 100644 --- a/drivers/base/firmware_loader/builtin/Makefile +++ b/drivers/base/firmware_loader/builtin/Makefile @@ -1,12 +1,12 @@ # SPDX-License-Identifier: GPL-2.0 obj-y += main.o -# Create $(fwdir) from $(CONFIG_EXTRA_FIRMWARE_DIR) -- if it doesn't have a +# Create $(fwdir) from $(CONFIG_FW_LOADER_BUILTIN_DIR) -- if it doesn't have a # leading /, it's relative to $(srctree). -fwdir := $(subst $(quote),,$(CONFIG_EXTRA_FIRMWARE_DIR)) +fwdir := $(subst $(quote),,$(CONFIG_FW_LOADER_BUILTIN_DIR)) fwdir := $(addprefix $(srctree)/,$(filter-out /%,$(fwdir)))$(filter /%,$(fwdir)) -firmware := $(addsuffix .gen.o, $(subst $(quote),,$(CONFIG_EXTRA_FIRMWARE))) +firmware := $(addsuffix .gen.o, $(subst $(quote),,$(CONFIG_FW_LOADER_BUILTIN_FILES))) obj-y += $(firmware) FWNAME = $(patsubst $(obj)/%.gen.S,%,$@) diff --git a/drivers/staging/media/av7110/Kconfig b/drivers/staging/media/av7110/Kconfig index 9faf9d2d4001..87c7702f72f6 100644 --- a/drivers/staging/media/av7110/Kconfig +++ b/drivers/staging/media/av7110/Kconfig @@ -31,8 +31,8 @@ config DVB_AV7110 or /lib/firmware (depending on configuration of firmware hotplug). Alternatively, you can download the file and use the kernel's - EXTRA_FIRMWARE configuration option to build it into your - kernel image by adding the filename to the EXTRA_FIRMWARE + FW_LOADER_BUILTIN_FILES configuration option to build it into your + kernel image by adding the filename to the FW_LOADER_BUILTIN_FILES configuration option string. Say Y if you own such a card and want to use it. From patchwork Fri Oct 22 17:40:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12578327 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDDFCC433FE for ; Fri, 22 Oct 2021 17:41:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B3EF76108B for ; Fri, 22 Oct 2021 17:41:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234058AbhJVRnZ (ORCPT ); Fri, 22 Oct 2021 13:43:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233992AbhJVRnS (ORCPT ); Fri, 22 Oct 2021 13:43:18 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE293C061764; Fri, 22 Oct 2021 10:41:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=vv/KmcqWJK/oFV2TawxBudXMWzXGYV14w9h1+x9j/Xk=; b=4bCE495yXilm7MSgyuKxSR2CG7 SveJNa+OWSNtIfZ8r1/Vmaonz8kGiRXfzu6dsh7EDj4xeaACDi8SIGmDC0a6MMJ1LuzkKodCIjSMs metO5VPB/whe2keXvA1lXLuKtf1ab4umo/j/3cHiQDFEdol1G99/yrSiqTAzOf66liLzKRx4LakVN rlf6mSJ+uWXnjigUjR0TKg05oH/f+0KotRamROVUyLtsrDNd4w2m0ZX0H7mGTXgm+c6YHta+3Cubr 50aEhw9wLgORr41wg5xTMx8KDH7N6diznGqbvSfOJLDUMT8JZPKBbsrn8RsRCSaDGYycTz0ccCL/1 6A8PzdNw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdyX6-00BeR8-NC; Fri, 22 Oct 2021 17:40:44 +0000 From: Luis Chamberlain To: gregkh@linuxfoundation.org Cc: bp@suse.de, akpm@linux-foundation.org, josh@joshtriplett.org, rishabhb@codeaurora.org, kubakici@wp.pl, maco@android.com, david.brown@linaro.org, bjorn.andersson@linaro.org, linux-wireless@vger.kernel.org, keescook@chromium.org, shuah@kernel.org, mfuzzey@parkeon.com, zohar@linux.vnet.ibm.com, dhowells@redhat.com, pali.rohar@gmail.com, tiwai@suse.de, arend.vanspriel@broadcom.com, zajec5@gmail.com, nbroeking@me.com, broonie@kernel.org, dmitry.torokhov@gmail.com, dwmw2@infradead.org, torvalds@linux-foundation.org, Abhay_Salunke@dell.com, jewalt@lgsinnovations.com, cantabile.desu@gmail.com, ast@fb.com, andresx7@gmail.com, brendanhiggins@google.com, yzaikin@google.com, sfr@canb.auug.org.au, rdunlap@infradead.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Luis Chamberlain Subject: [PATCH v3 2/4] firmware_loader: move builtin build helper to shared library Date: Fri, 22 Oct 2021 10:40:39 -0700 Message-Id: <20211022174041.2776969-3-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211022174041.2776969-1-mcgrof@kernel.org> References: <20211022174041.2776969-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org If we wanted to use a different directory for building target builtin firmware it is easier if we just have a shared library Makefile, and each target directory can then just include it and populate the respective needed variables. This reduces clutter, makes things easier to read, and also most importantly allows us to not have to try to magically adjust only one target kconfig symbol for built-in firmware files. Trying to do this can easily end up causing odd build issues if the user is not careful. As an example issue, if we are going to try to extend the FW_LOADER_BUILTIN_FILES list and FW_LOADER_BUILTIN_DIR in case of a new test firmware builtin support currently our only option would be modify the defaults of each of these in case test firmware builtin support was enabled. Defaults however won't augment a prior setting, and so if FW_LOADER_BUILTIN_DIR="/lib/firmware" and you and want this to be changed to something like FW_LOADER_BUILTIN_DIR="drivers/base/firmware_loader/test-builtin" the change will not take effect as a prior build already had it set, and the build would fail. Trying to augment / append the variables in the Makefile just makes this very difficult to read. Using a library let's us split up possible built-in targets so that the user does not have to be involved. This will be used in a subsequent patch which will add another user to this built-in firmware library Makefile and demo how to use it outside of the default FW_LOADER_BUILTIN_DIR and FW_LOADER_BUILTIN_FILES. Signed-off-by: Luis Chamberlain --- drivers/base/firmware_loader/builtin/Makefile | 34 ++----------------- .../base/firmware_loader/builtin/lib.Makefile | 32 +++++++++++++++++ 2 files changed, 34 insertions(+), 32 deletions(-) create mode 100644 drivers/base/firmware_loader/builtin/lib.Makefile diff --git a/drivers/base/firmware_loader/builtin/Makefile b/drivers/base/firmware_loader/builtin/Makefile index 7cdd0b5c7384..9b0dc193f6c7 100644 --- a/drivers/base/firmware_loader/builtin/Makefile +++ b/drivers/base/firmware_loader/builtin/Makefile @@ -1,4 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 +include $(srctree)/drivers/base/firmware_loader/builtin/lib.Makefile + obj-y += main.o # Create $(fwdir) from $(CONFIG_FW_LOADER_BUILTIN_DIR) -- if it doesn't have a @@ -8,35 +10,3 @@ fwdir := $(addprefix $(srctree)/,$(filter-out /%,$(fwdir)))$(filter /%,$(fwdir)) firmware := $(addsuffix .gen.o, $(subst $(quote),,$(CONFIG_FW_LOADER_BUILTIN_FILES))) obj-y += $(firmware) - -FWNAME = $(patsubst $(obj)/%.gen.S,%,$@) -FWSTR = $(subst $(comma),_,$(subst /,_,$(subst .,_,$(subst -,_,$(FWNAME))))) -ASM_WORD = $(if $(CONFIG_64BIT),.quad,.long) -ASM_ALIGN = $(if $(CONFIG_64BIT),3,2) -PROGBITS = $(if $(CONFIG_ARM),%,@)progbits - -filechk_fwbin = \ - echo "/* Generated by $(src)/Makefile */" ;\ - echo " .section .rodata" ;\ - echo " .p2align 4" ;\ - echo "_fw_$(FWSTR)_bin:" ;\ - echo " .incbin \"$(fwdir)/$(FWNAME)\"" ;\ - echo "_fw_end:" ;\ - echo " .section .rodata.str,\"aMS\",$(PROGBITS),1" ;\ - echo " .p2align $(ASM_ALIGN)" ;\ - echo "_fw_$(FWSTR)_name:" ;\ - echo " .string \"$(FWNAME)\"" ;\ - echo " .section .builtin_fw,\"a\",$(PROGBITS)" ;\ - echo " .p2align $(ASM_ALIGN)" ;\ - echo " $(ASM_WORD) _fw_$(FWSTR)_name" ;\ - echo " $(ASM_WORD) _fw_$(FWSTR)_bin" ;\ - echo " $(ASM_WORD) _fw_end - _fw_$(FWSTR)_bin" - -$(obj)/%.gen.S: FORCE - $(call filechk,fwbin) - -# The .o files depend on the binaries directly; the .S files don't. -$(addprefix $(obj)/, $(firmware)): $(obj)/%.gen.o: $(fwdir)/% - -targets := $(patsubst $(obj)/%,%, \ - $(shell find $(obj) -name \*.gen.S 2>/dev/null)) diff --git a/drivers/base/firmware_loader/builtin/lib.Makefile b/drivers/base/firmware_loader/builtin/lib.Makefile new file mode 100644 index 000000000000..e979a67acfa7 --- /dev/null +++ b/drivers/base/firmware_loader/builtin/lib.Makefile @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: GPL-2.0 +FWNAME = $(patsubst $(obj)/%.gen.S,%,$@) +FWSTR = $(subst $(comma),_,$(subst /,_,$(subst .,_,$(subst -,_,$(FWNAME))))) +ASM_WORD = $(if $(CONFIG_64BIT),.quad,.long) +ASM_ALIGN = $(if $(CONFIG_64BIT),3,2) +PROGBITS = $(if $(CONFIG_ARM),%,@)progbits + +filechk_fwbin = \ + echo "/* Generated by $(src)/Makefile */" ;\ + echo " .section .rodata" ;\ + echo " .p2align 4" ;\ + echo "_fw_$(FWSTR)_bin:" ;\ + echo " .incbin \"$(fwdir)/$(FWNAME)\"" ;\ + echo "_fw_end:" ;\ + echo " .section .rodata.str,\"aMS\",$(PROGBITS),1" ;\ + echo " .p2align $(ASM_ALIGN)" ;\ + echo "_fw_$(FWSTR)_name:" ;\ + echo " .string \"$(FWNAME)\"" ;\ + echo " .section .builtin_fw,\"a\",$(PROGBITS)" ;\ + echo " .p2align $(ASM_ALIGN)" ;\ + echo " $(ASM_WORD) _fw_$(FWSTR)_name" ;\ + echo " $(ASM_WORD) _fw_$(FWSTR)_bin" ;\ + echo " $(ASM_WORD) _fw_end - _fw_$(FWSTR)_bin" + +$(obj)/%.gen.S: FORCE + $(call filechk,fwbin) + +# The .o files depend on the binaries directly; the .S files don't. +$(addprefix $(obj)/, $(firmware)): $(obj)/%.gen.o: $(fwdir)/% + +targets := $(patsubst $(obj)/%,%, \ + $(shell find $(obj) -name \*.gen.S 2>/dev/null)) From patchwork Fri Oct 22 17:40:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12578323 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DF48C433F5 for ; Fri, 22 Oct 2021 17:41:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6BB1F61246 for ; Fri, 22 Oct 2021 17:41:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234004AbhJVRnQ (ORCPT ); Fri, 22 Oct 2021 13:43:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233992AbhJVRnP (ORCPT ); Fri, 22 Oct 2021 13:43:15 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 448DBC061764; Fri, 22 Oct 2021 10:40:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=fPmW6CeNvBg7X8lOpBtuhlx54rJc5y4u9O0LQCgMTXc=; b=bVXvRuj2k88m0EiBE8p9wKh8H2 nJ286e0PV2jgQrRPtEItWDYy9g8urljtn0uBqWHEer5iygC1OA5rP9UChVuexOB+6sGTm3DiSLO1z ceIga4FhyQvGGXZfRpgLUJDu18XlSbLkLQ2QgD6OObS4+5r8f1l+A172QAHZ3Qs0nZMeFi9P5+HDX flnepxIhZmw9/oLPN+5K1o+kPXjWjJcwWzGyR4K8Ip4mpZ1OGf4K+AUNKPpBGq+Dgic0pfhr0qxTW D6BDjlVJQA2sjBua7Pg+2KJg2d/0ZlZke9tDBRH2dJ0FUZ4hyE2QWQdyHwAc0DbKMFePhpGnhD1PB 3sEfGQTg==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdyX6-00BeRA-OU; Fri, 22 Oct 2021 17:40:44 +0000 From: Luis Chamberlain To: gregkh@linuxfoundation.org Cc: bp@suse.de, akpm@linux-foundation.org, josh@joshtriplett.org, rishabhb@codeaurora.org, kubakici@wp.pl, maco@android.com, david.brown@linaro.org, bjorn.andersson@linaro.org, linux-wireless@vger.kernel.org, keescook@chromium.org, shuah@kernel.org, mfuzzey@parkeon.com, zohar@linux.vnet.ibm.com, dhowells@redhat.com, pali.rohar@gmail.com, tiwai@suse.de, arend.vanspriel@broadcom.com, zajec5@gmail.com, nbroeking@me.com, broonie@kernel.org, dmitry.torokhov@gmail.com, dwmw2@infradead.org, torvalds@linux-foundation.org, Abhay_Salunke@dell.com, jewalt@lgsinnovations.com, cantabile.desu@gmail.com, ast@fb.com, andresx7@gmail.com, brendanhiggins@google.com, yzaikin@google.com, sfr@canb.auug.org.au, rdunlap@infradead.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Luis Chamberlain Subject: [PATCH v3 3/4] test_firmware: move a few test knobs out to its library Date: Fri, 22 Oct 2021 10:40:40 -0700 Message-Id: <20211022174041.2776969-4-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211022174041.2776969-1-mcgrof@kernel.org> References: <20211022174041.2776969-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org These will be used by other tests cases in other files so move them to the library. Signed-off-by: Luis Chamberlain --- .../testing/selftests/firmware/fw_filesystem.sh | 16 ---------------- tools/testing/selftests/firmware/fw_lib.sh | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/tools/testing/selftests/firmware/fw_filesystem.sh b/tools/testing/selftests/firmware/fw_filesystem.sh index c2a2a100114b..7d763b303057 100755 --- a/tools/testing/selftests/firmware/fw_filesystem.sh +++ b/tools/testing/selftests/firmware/fw_filesystem.sh @@ -118,27 +118,11 @@ test_config_present() fi } -# Defaults : -# -# send_uevent: 1 -# sync_direct: 0 -# name: test-firmware.bin -# num_requests: 4 -config_reset() -{ - echo 1 > $DIR/reset -} - release_all_firmware() { echo 1 > $DIR/release_all_firmware } -config_set_name() -{ - echo -n $1 > $DIR/config_name -} - config_set_into_buf() { echo 1 > $DIR/config_into_buf diff --git a/tools/testing/selftests/firmware/fw_lib.sh b/tools/testing/selftests/firmware/fw_lib.sh index 5b8c0fedee76..31b71fe11dc5 100755 --- a/tools/testing/selftests/firmware/fw_lib.sh +++ b/tools/testing/selftests/firmware/fw_lib.sh @@ -221,3 +221,20 @@ kconfig_has() fi fi } + +# Defaults : +# +# send_uevent: 1 +# sync_direct: 0 +# name: test-firmware.bin +# num_requests: 4 +config_reset() +{ + echo 1 > $DIR/reset +} + + +config_set_name() +{ + echo -n $1 > $DIR/config_name +} From patchwork Fri Oct 22 17:40:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 12578331 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F10F5C43217 for ; Fri, 22 Oct 2021 17:41:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D407961052 for ; Fri, 22 Oct 2021 17:41:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234026AbhJVRn0 (ORCPT ); Fri, 22 Oct 2021 13:43:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234023AbhJVRnS (ORCPT ); Fri, 22 Oct 2021 13:43:18 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE640C061766; Fri, 22 Oct 2021 10:41:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=9GqDG/El8bcYMuy+cgNCxlz1s/GT5w1368ggGTEmH7k=; b=xAQ9K3ml9iKzq2DRODC1vRTgJR 6G+H3xvw/xIhAYAJbfMjoi6NYNzdTju31CpykrzU6pwSJp8mvrDiaIpnOYw+AISAxCSa4OnfAdPUP 4siy+Dha27wMihPTLLvIs8Ww2dljKeoBWocwprlut9K9cID/tkF6fDksK3Eq2ygofQrrfnuADFW13 9WaP+6ZX+GZ93sq5+NbcbSjGK+8ckVvn7z/EZnDeuzatFrBrZ4b/ntmfn+Yxjhhr/FZWp6sQvXGOR ZKsA0oIpU+JpspekokTRPqi2wWCJPa5zLRljpe2l6IqD2M4CmGwJ3oAbMGm9N+uO6BG0mG8haUM0A eb3fXtvQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdyX6-00BeRC-Pt; Fri, 22 Oct 2021 17:40:44 +0000 From: Luis Chamberlain To: gregkh@linuxfoundation.org Cc: bp@suse.de, akpm@linux-foundation.org, josh@joshtriplett.org, rishabhb@codeaurora.org, kubakici@wp.pl, maco@android.com, david.brown@linaro.org, bjorn.andersson@linaro.org, linux-wireless@vger.kernel.org, keescook@chromium.org, shuah@kernel.org, mfuzzey@parkeon.com, zohar@linux.vnet.ibm.com, dhowells@redhat.com, pali.rohar@gmail.com, tiwai@suse.de, arend.vanspriel@broadcom.com, zajec5@gmail.com, nbroeking@me.com, broonie@kernel.org, dmitry.torokhov@gmail.com, dwmw2@infradead.org, torvalds@linux-foundation.org, Abhay_Salunke@dell.com, jewalt@lgsinnovations.com, cantabile.desu@gmail.com, ast@fb.com, andresx7@gmail.com, brendanhiggins@google.com, yzaikin@google.com, sfr@canb.auug.org.au, rdunlap@infradead.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Luis Chamberlain Subject: [PATCH v3 4/4] test_firmware: add support for testing built-in firmware Date: Fri, 22 Oct 2021 10:40:41 -0700 Message-Id: <20211022174041.2776969-5-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211022174041.2776969-1-mcgrof@kernel.org> References: <20211022174041.2776969-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This adds some basic knobs to let us test built-in firmware support. We test to ensure built-in firmware is indeed used, and that it matches the contents we expect. Likewise we test that a file that should not be built-in was not present. For older kernels with older test_firmware drivers (yes some folks do test selftests this way and we support it), the new built-in test will simply bail out early. Reviewed-by: Borislav Petkov Signed-off-by: Luis Chamberlain --- drivers/base/firmware_loader/Makefile | 1 + drivers/base/firmware_loader/builtin/Makefile | 1 + .../firmware_loader/test-builtin/.gitignore | 3 + .../firmware_loader/test-builtin/Makefile | 18 +++++ lib/Kconfig.debug | 33 +++++++++ lib/test_firmware.c | 52 +++++++++++++- .../testing/selftests/firmware/fw_builtin.sh | 69 +++++++++++++++++++ tools/testing/selftests/firmware/fw_lib.sh | 7 ++ .../selftests/firmware/fw_run_tests.sh | 2 + 9 files changed, 185 insertions(+), 1 deletion(-) create mode 100644 drivers/base/firmware_loader/test-builtin/.gitignore create mode 100644 drivers/base/firmware_loader/test-builtin/Makefile create mode 100755 tools/testing/selftests/firmware/fw_builtin.sh diff --git a/drivers/base/firmware_loader/Makefile b/drivers/base/firmware_loader/Makefile index e87843408fe6..dbeba0fa315d 100644 --- a/drivers/base/firmware_loader/Makefile +++ b/drivers/base/firmware_loader/Makefile @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 # Makefile for the Linux firmware loader +obj-$(CONFIG_TEST_FIRMWARE_BUILTIN) += test-builtin/ obj-$(CONFIG_FW_LOADER_USER_HELPER) += fallback_table.o obj-$(CONFIG_FW_LOADER) += firmware_class.o firmware_class-objs := main.o diff --git a/drivers/base/firmware_loader/builtin/Makefile b/drivers/base/firmware_loader/builtin/Makefile index 9b0dc193f6c7..baad7777974b 100644 --- a/drivers/base/firmware_loader/builtin/Makefile +++ b/drivers/base/firmware_loader/builtin/Makefile @@ -2,6 +2,7 @@ include $(srctree)/drivers/base/firmware_loader/builtin/lib.Makefile obj-y += main.o +obj-$(CONFIG_TEST_BUILTIN_FIRMWARE) += test-builtin-firmware.bin.gen.o # Create $(fwdir) from $(CONFIG_FW_LOADER_BUILTIN_DIR) -- if it doesn't have a # leading /, it's relative to $(srctree). diff --git a/drivers/base/firmware_loader/test-builtin/.gitignore b/drivers/base/firmware_loader/test-builtin/.gitignore new file mode 100644 index 000000000000..1d46553f50a0 --- /dev/null +++ b/drivers/base/firmware_loader/test-builtin/.gitignore @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0 +*.gen.S +*.bin diff --git a/drivers/base/firmware_loader/test-builtin/Makefile b/drivers/base/firmware_loader/test-builtin/Makefile new file mode 100644 index 000000000000..04204ad7ede1 --- /dev/null +++ b/drivers/base/firmware_loader/test-builtin/Makefile @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: GPL-2.0 +include $(srctree)/drivers/base/firmware_loader/builtin/lib.Makefile + +extra-y := test-builtin-firmware.bin +$(obj)/test-builtin-firmware.bin: FORCE + @$(kecho) " GEN $@" + @(set -e; \ + ( \ + echo 'ABCD0123'; \ + ) > $@) + +# Create $(fwdir) from $(CONFIG_TEST_FIRMWARE_BUILTIN_DIR) -- if it doesn't +# have a leading /, it's relative to $(srctree). +fwdir := $(subst $(quote),,$(CONFIG_TEST_FIRMWARE_BUILTIN_DIR)) +fwdir := $(addprefix $(srctree)/,$(filter-out /%,$(fwdir)))$(filter /%,$(fwdir)) + +firmware := $(addsuffix .gen.o, $(subst $(quote),,$(CONFIG_TEST_FIRMWARE_BUILTIN_FILES))) +obj-y += $(firmware) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 2a9b6dcdac4f..91aea0aba2b1 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -2327,6 +2327,39 @@ config TEST_FIRMWARE If unsure, say N. +config TEST_FIRMWARE_BUILTIN + bool "Allow building built-in test firmware" + depends on TEST_FIRMWARE + help + If enabled, firmware will be built into to the kernel so that + loading it with the test_firmware driver can be tested. Disabling + this will just mean the test firmware scripts won't find any + built-in firmware. Enabling this will make the kernel generate the + file test-builtin-firmware.bin inside local directory + drivers/base/firmware_loader/test-builtin. This file will then + be available whenever the request firmware API is used. + + Enabling this functionlity essentially overrides the location where + you specify to find built-in firmware, and so should only be enabled + if you don't need to build firmware into your kernel for full + funcionality. + + This should be disabled on production kernels as otherwise you'll + end up with a test firmware stuck into your final kernel image and + with default built-in firmware support. + + If unsure, say N. + +config TEST_FIRMWARE_BUILTIN_FILES + string + depends on TEST_FIRMWARE_BUILTIN + default "test-builtin-firmware.bin" + +config TEST_FIRMWARE_BUILTIN_DIR + string + depends on TEST_FIRMWARE_BUILTIN + default "drivers/base/firmware_loader/test-builtin" + config TEST_SYSCTL tristate "sysctl test driver" depends on PROC_SYSCTL diff --git a/lib/test_firmware.c b/lib/test_firmware.c index 1bccd6cd5f48..134f8c78d2d4 100644 --- a/lib/test_firmware.c +++ b/lib/test_firmware.c @@ -34,6 +34,7 @@ MODULE_IMPORT_NS(TEST_FIRMWARE); static DEFINE_MUTEX(test_fw_mutex); static const struct firmware *test_firmware; +static struct firmware builtin_test_firmware; struct test_batched_req { u8 idx; @@ -58,6 +59,10 @@ struct test_batched_req { * @sync_direct: when the sync trigger is used if this is true * request_firmware_direct() will be used instead. * @send_uevent: whether or not to send a uevent for async requests + * @is_builtin: used only internally to determine if the firmware was found + * to be built-in to the kernel using only the API call + * firmware_request_builtin(). We treat this specially as we are + * responsible for the firmware struct. * @num_requests: number of requests to try per test case. This is trigger * specific. * @reqs: stores all requests information @@ -99,6 +104,7 @@ struct test_config { bool partial; bool sync_direct; bool send_uevent; + bool is_builtin; u8 num_requests; u8 read_fw_idx; @@ -120,7 +126,11 @@ static ssize_t test_fw_misc_read(struct file *f, char __user *buf, ssize_t rc = 0; mutex_lock(&test_fw_mutex); - if (test_firmware) + if (test_fw_config->is_builtin) + rc = simple_read_from_buffer(buf, size, offset, + builtin_test_firmware.data, + builtin_test_firmware.size); + else if (test_firmware) rc = simple_read_from_buffer(buf, size, offset, test_firmware->data, test_firmware->size); @@ -194,6 +204,7 @@ static int __test_firmware_config_init(void) test_fw_config->buf_size = TEST_FIRMWARE_BUF_SIZE; test_fw_config->file_offset = 0; test_fw_config->partial = false; + test_fw_config->is_builtin = false; test_fw_config->sync_direct = false; test_fw_config->req_firmware = request_firmware; test_fw_config->test_result = 0; @@ -1051,6 +1062,44 @@ static ssize_t read_firmware_show(struct device *dev, } static DEVICE_ATTR_RO(read_firmware); +/* + * In order to test this, set CONFIG_FW_LOADER_BUILTIN_FILES to a firmware file + * which will be built into the kernel image. Then echo the name into the + * "trigger_request_builtin" sysfs file of this module. + */ +static ssize_t trigger_request_builtin_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + int rc = -ENOENT; + + if (!test_fw_config->name) { + pr_warn("unconfigured firmware settings\n"); + return rc; + } + + pr_info("loading builtin '%s'\n", test_fw_config->name); + + mutex_lock(&test_fw_mutex); + + if (firmware_request_builtin(&builtin_test_firmware, + test_fw_config->name)) { + /* This let's us diff against the firmware */ + test_fw_config->is_builtin = true; + pr_info("loaded: %zu\n", builtin_test_firmware.size); + rc = count; + goto out; + } + + pr_info("load of '%s' failed\n", test_fw_config->name); + +out: + mutex_unlock(&test_fw_mutex); + + return rc; +} +static DEVICE_ATTR_WO(trigger_request_builtin); + #define TEST_FW_DEV_ATTR(name) &dev_attr_##name.attr static struct attribute *test_dev_attrs[] = { @@ -1082,6 +1131,7 @@ static struct attribute *test_dev_attrs[] = { TEST_FW_DEV_ATTR(release_all_firmware), TEST_FW_DEV_ATTR(test_result), TEST_FW_DEV_ATTR(read_firmware), + TEST_FW_DEV_ATTR(trigger_request_builtin), NULL, }; diff --git a/tools/testing/selftests/firmware/fw_builtin.sh b/tools/testing/selftests/firmware/fw_builtin.sh new file mode 100755 index 000000000000..44e4198ed88f --- /dev/null +++ b/tools/testing/selftests/firmware/fw_builtin.sh @@ -0,0 +1,69 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Test loading built-in firmware +set -e + +TEST_REQS_FW_SYSFS_FALLBACK="no" +TEST_REQS_FW_SET_CUSTOM_PATH="yes" +TEST_DIR=$(dirname $0) +source $TEST_DIR/fw_lib.sh + +check_mods +check_setup +verify_reqs +setup_tmp_file + +trap "test_finish" EXIT + +if [ "$HAS_FW_LOADER_USER_HELPER" = "yes" ]; then + # Turn down the timeout so failures don't take so long. + echo 1 >/sys/class/firmware/timeout +fi + +# built-in firmware support can be optional to test +if [[ "$HAS_FW_LOADER_BUILTIN" != "yes" || "$HAS_TEST_FIRMWARE_BUILTIN" != "yes" ]]; then + exit $ksft_skip +fi + +echo "Testing builtin firmware API ... " + +config_trigger_builtin() +{ + echo -n 1 > $DIR/trigger_request_builtin +} + +test_builtin_firmware() +{ + echo -n "Testing firmware_request_builtin() ... " + config_reset + config_set_name $TEST_FIRMWARE_BUILTIN_FILENAME + config_trigger_builtin + echo OK + # Verify the contents are what we expect. + echo -n "Verifying file integrity ..." + if ! diff -q "$FW" /dev/test_firmware >/dev/null ; then + echo "$0: firmware loaded content differs" >&2 + exit 1 + else + echo "firmware content matches what we expect - OK" + fi +} + +test_builtin_firmware_nofile() +{ + echo -n "Testing firmware_request_builtin() with fake file... " + config_reset + config_set_name fake-${TEST_FIRMWARE_BUILTIN_FILENAME} + if config_trigger_builtin 2> /dev/null; then + echo "$0: firmware shouldn't have loaded" >&2 + fi + echo "OK" +} + +test_builtin_firmware +test_builtin_firmware_nofile + +# Ensure test_fw_config->is_builtin is set back to false +# otherwise we won't be able to diff against the right target +# firmware for other tests. +config_reset diff --git a/tools/testing/selftests/firmware/fw_lib.sh b/tools/testing/selftests/firmware/fw_lib.sh index 31b71fe11dc5..bbae33d9f5ed 100755 --- a/tools/testing/selftests/firmware/fw_lib.sh +++ b/tools/testing/selftests/firmware/fw_lib.sh @@ -15,6 +15,10 @@ TEST_DIR=$(dirname $0) # To reproduce rename this to test-firmware.bin TEST_FIRMWARE_INTO_BUF_FILENAME=test-firmware-into-buf.bin +# We should use a different filename for built-in firmware otherwise +# we'd always have the file present. +TEST_FIRMWARE_BUILTIN_FILENAME=test-builtin-firmware.bin + # Kselftest framework requirement - SKIP code is 4. ksft_skip=4 @@ -63,6 +67,9 @@ check_setup() HAS_FW_LOADER_USER_HELPER="$(kconfig_has CONFIG_FW_LOADER_USER_HELPER=y)" HAS_FW_LOADER_USER_HELPER_FALLBACK="$(kconfig_has CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y)" HAS_FW_LOADER_COMPRESS="$(kconfig_has CONFIG_FW_LOADER_COMPRESS=y)" + HAS_FW_LOADER_USER_HELPER="$(kconfig_has CONFIG_FW_LOADER_USER_HELPER=y)" + HAS_FW_LOADER_BUILTIN="$(kconfig_has CONFIG_FW_LOADER=y)" + HAS_TEST_FIRMWARE_BUILTIN="$(kconfig_has CONFIG_TEST_FIRMWARE_BUILTIN=y)" PROC_FW_IGNORE_SYSFS_FALLBACK="0" PROC_FW_FORCE_SYSFS_FALLBACK="0" diff --git a/tools/testing/selftests/firmware/fw_run_tests.sh b/tools/testing/selftests/firmware/fw_run_tests.sh index 777377078d5e..08a9bf043333 100755 --- a/tools/testing/selftests/firmware/fw_run_tests.sh +++ b/tools/testing/selftests/firmware/fw_run_tests.sh @@ -65,6 +65,8 @@ echo "Running namespace test: " $TEST_DIR/fw_namespace $DIR/trigger_request echo "OK" +$TEST_DIR/fw_builtin.sh + if [ -f $FW_FORCE_SYSFS_FALLBACK ]; then run_test_config_0001 run_test_config_0002