From patchwork Wed Nov 25 18:30:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Roumegue X-Patchwork-Id: 1406202 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=bzzP/MIh; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Ch8cB3mXPz9sRK for ; Thu, 26 Nov 2020 05:31:38 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1234686D19; Wed, 25 Nov 2020 18:31:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OlKfCs-xN_tW; Wed, 25 Nov 2020 18:31:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1D5B386B7A; Wed, 25 Nov 2020 18:31:35 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 901051BF32E for ; Wed, 25 Nov 2020 18:31:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8CDF187615 for ; Wed, 25 Nov 2020 18:31:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4TkKWct2KNEE for ; Wed, 25 Nov 2020 18:31:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by hemlock.osuosl.org (Postfix) with ESMTPS id C88EF8750D for ; Wed, 25 Nov 2020 18:31:23 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id h21so3059714wmb.2 for ; Wed, 25 Nov 2020 10:31:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=m8onwRojDGwNOTZi00h/pIOf1ywIGlnnn6uYdmH/5eg=; b=bzzP/MIhs667Zhx9JyoRijadohTB7pJSNCSn1oVvkukryy+RCxAQBqRSjgYb6+2iiV DEZj5+0zhwEnUwtOPCgfyehqvxvZ5NmOeQwGwpMnZrP0sC9RnnpuDAnKKsbEWvP5kGn5 j6E/SvFSQNgT/x4Z3CzcVAwQYMJJC8DdiCv6zo1dKq2qdWHXH+szvh8rHUEmEevsJ591 moN/vnd0s7I0x9/o5LCA5PGlLBjPQeetPt5KSbdFuQzgucNfISh2v6YDd8a+p/52bzDg 0i0evQVCGRwh6RlmL5T2LkkuWX2QwToFisd4RyFES8D47foCdo3fw92t5aqlZ3nRvscN D4oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=m8onwRojDGwNOTZi00h/pIOf1ywIGlnnn6uYdmH/5eg=; b=Rg0ChfSskozK1+HlDnBO6KROprkuyaGujqBIhy1pvFmUIIyZtUMMomjfRAdmlg24Bj 018Ha6X7AlL6W6ldsULZvBbXk94420/8bhsTE1QwOnR75DUxI1wQZZwPJ4RrW6+z3bLa mnCAggwF/Hu+7R6B8GzFOaclEI5ZfC1/oJwkg8UVhdkRVD6SdsHLc0gl0U/o/NotdyFx QwsEyUS1SkO9AaAa8cUwpy4mByyJodnpQw0J7OpM/bbZRiYhOKfQhAIIWkI7RxUAQRSy HzZP5ONVffEWHf1EhagjHFA48MQDpDVv+khYyi2l6Kmxg4fRTS16EXZACg+v1qGzC5z2 M74A== X-Gm-Message-State: AOAM533OWvnHEc5IvGNF+lWcigLoP+1Q0zEY4V0L0ETquxSrMmhAIq6k 2G6c3BMLIr+WE3zGATaBy1+7x2isE9shiPN2 X-Google-Smtp-Source: ABdhPJw6KDwwFbtvMnd+kbIrm+cDDinjrwp1PlpIBsC5OUVsiGWhT98i6l5HaN4b/JrHTyrIGLBDpA== X-Received: by 2002:a1c:8145:: with SMTP id c66mr5267688wmd.71.1606329081815; Wed, 25 Nov 2020 10:31:21 -0800 (PST) Received: from frodon.home ([2a01:cb1d:3f5:3900:2e4d:54ff:fe9c:6f7a]) by smtp.gmail.com with ESMTPSA id j6sm5646275wrq.38.2020.11.25.10.31.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Nov 2020 10:31:21 -0800 (PST) From: Xavier Roumegue To: buildroot@buildroot.org, Thomas Petazzoni Date: Wed, 25 Nov 2020 19:30:11 +0100 Message-Id: <20201125183017.15585-3-xroumegue@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109142309.1135596-2-xroumegue@gmail.com> References: <20201109142309.1135596-2-xroumegue@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 2/8] boot/uboot: Add option to install fw files list to uboot build directory X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gary Bisson , Xavier Roumegue , Fabio Estevam , Gilles Talis , Refik Tuzakli , Julien Olivain , Stephane Viau Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This copies a list of fw files, which have to be installed by others packages to BINARIES_DIR to uboot build directory. Some platforms, such as imx8, require firmware files located in the build directory to generate a bootable image. Signed-off-by: Xavier Roumegue Tested-by: Heiko Thiery --- Changes v3 -> v4: - Fix indentation issue (detected by Stephane Viau) --- boot/uboot/Config.in | 15 +++++++++++++++ boot/uboot/uboot.mk | 9 +++++++++ 2 files changed, 24 insertions(+) diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in index e4a0f48deb..f2faff826b 100644 --- a/boot/uboot/Config.in +++ b/boot/uboot/Config.in @@ -229,6 +229,21 @@ config BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF endchoice +config BR2_TARGET_UBOOT_NEEDS_FW + bool "U-Boot needs FW files" + help + Some platforms (such as iMX8) requires subsystem firmware + files encapsulated within the u-boot payload such as this + configure properly the memory subystem or those later + require authentication from boot ROM. + +config BR2_TARGET_UBOOT_FW_FILES + string "Firmware files list" + depends on BR2_TARGET_UBOOT_NEEDS_FW + help + Specify the list of files to be copied in the u-boot + build directory from the binary folder. + menu "U-Boot binary format" config BR2_TARGET_UBOOT_FORMAT_AIS diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index d2b4e8dc60..44fefe2843 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -428,6 +428,15 @@ define UBOOT_KCONFIG_FIXUP_CMDS $(UBOOT_ZYNQMP_KCONFIG_PSU_INIT) endef +ifeq ($(BR2_TARGET_UBOOT_NEEDS_FW),y) +define UBOOT_COPY_TARGET_FW + $(foreach f,$(BR2_TARGET_UBOOT_FW_FILES), \ + cp -f $(BINARIES_DIR)/$(call qstrip,$(f)) $(@D)/ + ) +endef +UBOOT_PRE_BUILD_HOOKS += UBOOT_COPY_TARGET_FW +endif + ifeq ($(BR2_TARGET_UBOOT)$(BR_BUILDING),yy) #