From patchwork Mon Mar 18 23:21:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 1058137 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="tzKtY7jp"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44NXJR1kSYz9s70 for ; Tue, 19 Mar 2019 10:21:59 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CDCD687AA1; Mon, 18 Mar 2019 23:21:54 +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 PV+RXaVh4W-v; Mon, 18 Mar 2019 23:21:54 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 297F6879A6; Mon, 18 Mar 2019 23:21:54 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id D41731BF281 for ; Mon, 18 Mar 2019 23:21:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id D219F21538 for ; Mon, 18 Mar 2019 23:21:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oHK3WARzGg02 for ; Mon, 18 Mar 2019 23:21:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by silver.osuosl.org (Postfix) with ESMTPS id 4891021517 for ; Mon, 18 Mar 2019 23:21:50 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id w1so13030103wrp.2 for ; Mon, 18 Mar 2019 16:21:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yXc/IfD+Cm4lcbW+ykrrEox+Q/61eAWaQZoQ2zIn+Uo=; b=tzKtY7jpUZADBAiP7UMIjbVdapxNj7LnYz4/t04LF0D4mWG3hLu1Y3f8tykfT7V7pX hyPcMiujEHeyxz0+/a/feSnFpR+zM4GQM/l0VfvvZ15N/7cpaKw6EsIWyw2miGaZ6DMB cEHaPzMgW2B1ZJYAK7xYM5t2bXL4crAZnwpW0CyIobby1kr4J4lwUTleD4lep2S0atIO oMMXMW9yqjMa0v4R1XZ9eTFXhknDdbxEYznLicj5BLS6WzynXIHKfhGyfgdZpNWn3gGU NuAHhiP3bh52Rln7UJ9nk5RZf2o8m4JhrTnDZdl+fHDd4PxMG+y3Wegq8n1oTzW4TrO1 0ErQ== 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; bh=yXc/IfD+Cm4lcbW+ykrrEox+Q/61eAWaQZoQ2zIn+Uo=; b=cOQeKNfsPTVx/hE37lj1q1CQywOQtk2ujlo2fFTipKLeMTVVnDsBcqb7Rk9DioD5qY aDNK2q8Owze2IrAsmlLIFaXjT8kI7oraRx0iTg8jgV+iL7W7Uh/xECP86qYAiSXfUY+L dwfxhQKCp6uP8GZ/hBDcEkIPWQl5S1A8+vk4f29VH6FZiltXKGmTNdo1d0+VfuwhlW+f BNxcClrOVTizIqfi4X4GYkJKuvJyVqWV3i18mxlms21NzosOhltV3LeIJJPjNuPZ8Hcj DADhigTwg2LqqUKP5Mj6RZY20DF8HoJxeXi80Bg/ig0PtCNxzrPAL+569gSG2r+Rd47W WaLA== X-Gm-Message-State: APjAAAUQ7uqc2yCs/gDDC/qfHptbCPq0bBjgGDPjMpqnvi14zkwjXVoz ky5Dt/CA2hHF5Fsaw5myZZOylMxwHmTLiw== X-Google-Smtp-Source: APXvYqzABH16OuNYKlmD21EaFV9SLy08fd0ChnqXUDDeU9/LnWL5xLmVC3aFumfvOhFa0U76odizpw== X-Received: by 2002:adf:dc08:: with SMTP id t8mr14814296wri.103.1552951308718; Mon, 18 Mar 2019 16:21:48 -0700 (PDT) Received: from lmenx29q.home (lfbn-1-4937-18.w90-104.abo.wanadoo.fr. [90.104.163.18]) by smtp.gmail.com with ESMTPSA id e193sm1687016wmg.18.2019.03.18.16.21.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Mar 2019 16:21:48 -0700 (PDT) From: Etienne Carriere To: buildroot@buildroot.org Date: Tue, 19 Mar 2019 00:21:05 +0100 Message-Id: <1552951269-16967-4-git-send-email-etienne.carriere@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1552951269-16967-1-git-send-email-etienne.carriere@linaro.org> References: <1552951269-16967-1-git-send-email-etienne.carriere@linaro.org> Subject: [Buildroot] [PATCH v2 4/8] boot/arm-trusted-firmware: support alternate image files 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: Etienne Carriere , Ricardo Martincoski , Sergey Matyukevich MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Some platform may generate specific boot image files instead of the generic files *.bin when building TF-A package. This change introduces new configuration directive for the arm-trusted-firmware boot package. BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_IMAGE_NAMES is boolean. When disabled, install boot image files are .../*.bin. When enabled, BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL_IMAGE_NAMES shall lists the names of the generated boot image files. Signed-off-by: Etienne Carriere --- Changes v1 -> v2: - No change --- boot/arm-trusted-firmware/Config.in | 20 ++++++++++++++++++++ boot/arm-trusted-firmware/arm-trusted-firmware.mk | 14 +++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in index 9a152b9..bb88760 100644 --- a/boot/arm-trusted-firmware/Config.in +++ b/boot/arm-trusted-firmware/Config.in @@ -121,6 +121,26 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_OPTEE_AS_BL32 endchoice +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_IMAGE_NAMES + bool "Use custom binary boot image filenames" + help + If not set, build generates the boot image files with the + generic filename that is images with .bin extension. These + are copied to the output images/ directory. + + If enabled, use BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL_IMAGES + to list the generated file names. + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL_IMAGE_NAMES + string "Binary boot image filenames" + depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_IMAGE_NAMES + help + This is used when TF-A platform generates boot image files + with custom file names. When so, this should list the path + of the generated files location relatively to the package + build root directory. These files are copied to the output + images/ directory. + config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33 bool "Use U-Boot as BL33" depends on BR2_TARGET_UBOOT diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk index 68be00d..45c2311 100644 --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk @@ -135,6 +135,18 @@ define ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL_ELF endef endif +ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_IMAGE_NAMES),y) +define ARM_TRUSTED_FIRMWARE_BL_IMAGES_INSTALL + $(foreach f,$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL_IMAGE_NAMES)), \ + cp -dpf $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/$(f) $(BINARIES_DIR)/ \ + ) +endef +else +define ARM_TRUSTED_FIRMWARE_BL_IMAGES_INSTALL + cp -dpf $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/*.bin $(BINARIES_DIR)/ +endef +endif + define ARM_TRUSTED_FIRMWARE_BUILD_CMDS $(ARM_TRUSTED_FIRMWARE_BUILD_FIPTOOL) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(ARM_TRUSTED_FIRMWARE_MAKE_OPTS) \ @@ -143,7 +155,7 @@ define ARM_TRUSTED_FIRMWARE_BUILD_CMDS endef define ARM_TRUSTED_FIRMWARE_INSTALL_IMAGES_CMDS - cp -dpf $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/*.bin $(BINARIES_DIR)/ + $(ARM_TRUSTED_FIRMWARE_BL_IMAGES_INSTALL) $(ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL) $(ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL_ELF) endef