From patchwork Thu Mar 19 10:46:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suniel Mahesh X-Patchwork-Id: 1258107 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.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=OK7qaNlh; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48jkBy3Dg7z9sPk for ; Thu, 19 Mar 2020 21:47:54 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id F20B487CEC; Thu, 19 Mar 2020 10:47:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5K0mHc40uLiM; Thu, 19 Mar 2020 10:47:47 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id EAF2E87DA6; Thu, 19 Mar 2020 10:47:46 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 392311BF2EF for ; Thu, 19 Mar 2020 10:47:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 363E886B82 for ; Thu, 19 Mar 2020 10:47:45 +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 s8qyzhdsANzM for ; Thu, 19 Mar 2020 10:47:43 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by fraxinus.osuosl.org (Postfix) with ESMTPS id D467B86B65 for ; Thu, 19 Mar 2020 10:47:43 +0000 (UTC) Received: by mail-pf1-f194.google.com with SMTP id z65so1217789pfz.8 for ; Thu, 19 Mar 2020 03:47:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=js0nGi00Mne0iJkhSNQhl1DrqvX0QzsAm8/XOCqE/Wo=; b=OK7qaNlh42Lo6vFv+REOWcDP9BNTaLPTmoNL+R138GaIGfI+lbQrtY/YB+HKg6+W+v qbRSGEuJeEexlhcoPTbU47YAU5mLv+hnTk0rmO+nTJBOTf0iNQI7+VLXuPA5wwh3084O eyBRQbYKJPuU0Rz1gUy0wxjbSSjTyMHNiI8BQ= 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=js0nGi00Mne0iJkhSNQhl1DrqvX0QzsAm8/XOCqE/Wo=; b=Q7tHxm62wP7vz6BpOeG/HPlgf1cmV8dGyN6rvBOWDOpBv11KHGuv880y1WTny2bAcg FiHH5Pi6N5Eq/xzmNmd4csO07Mmnwkjb2FBhjL63WlYPE7fmL4nK6cw+NDyRQ4A3BXlC gfetYr2We0tP5TbtVD9HgnexS89HPO0SDe4CFUXXKa2qK8WTeoEicaWg1sDJ+HvVVqvP r6hiEV5n/dMESP+t4Lg5qxy2wpP7+x4hEzNfbyQkcrYOZgZM6CAnObFQT+8mhHGmIXV7 maUt7kVNq9h4hFBONBlUPNIKWFewuz+TnImG7dzdF6moC5DSiiCVNqByOmkdXehwdWrR VkRQ== X-Gm-Message-State: ANhLgQ31Z6KmxDmHZuFn9+NwArmOTy7hGxiyMHblPP4uvLlOZdH9d/fd EwAVKL8e6KTohBjgaCFuc0s9dkYo/1U= X-Google-Smtp-Source: ADFU+vtCMP0PRcSxyzzA8zLyGVYQrPXClkVeCEu/ZBGtYEGiLdKDTy4DJOlE1AeTscIDrN2y/Aw/cQ== X-Received: by 2002:aa7:8191:: with SMTP id g17mr3261291pfi.70.1584614862610; Thu, 19 Mar 2020 03:47:42 -0700 (PDT) Received: from localhost.localdomain ([183.83.203.61]) by smtp.gmail.com with ESMTPSA id jz19sm1681443pjb.48.2020.03.19.03.47.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Mar 2020 03:47:42 -0700 (PDT) From: sunil@amarulasolutions.com To: buildroot@buildroot.org Date: Thu, 19 Mar 2020 16:16:49 +0530 Message-Id: <1584614812-20061-2-git-send-email-sunil@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584614812-20061-1-git-send-email-sunil@amarulasolutions.com> References: <20200318215216.187d07bd@windsurf.home> <1584614812-20061-1-git-send-email-sunil@amarulasolutions.com> Subject: [Buildroot] [PATCH v4 1/4] boot/arm-trusted-firmware: Disable bin copy for rk3399 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: peter@korsgaard.com, jagan@amarulasolutions.com, thomas.petazzoni@bootlin.com, Suniel Mahesh , heiko.thiery@gmail.com, linux-amarula@amarulasolutions.com MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Jagan Teki Unlike other SoC platforms, rockchip platforms doesn't require a binary generation on TF-A project. This is due to rockchip platforms have non-continuous memory areas in the linker script with a huge gap between them, so generating the binary would require addition padding which indeed increases the size of the binary. Interestingly this binary generation is disabled in v2.2 of TF-A on below commit: commit <33218d2a8143> "rockchip: Disable binary generation for all SoCs." Buildroot generally looks for a *.bin in the TF-A build directory but v2.2 is not creating any bin since rk3399 (or rockchip) doesn't need bins, because of which build fails. This changeset checks for a *.bin in the respective TF-A build directory, if available it copies to the output directory, otherwise skips copy. This fixes the atf build on rk3399 with v2.2 and above. Note: the same can be applied to rest of rockchip platforms if they use v2.2 TF-A and above. Cc: linux-amarula@amarulasolutions.com Signed-off-by: Suniel Mahesh Signed-off-by: Jagan Teki --- Changes for v4: - no changes Changes for v3: - Based on suggestions from sergey and thomas, instead of encoding platform-specific stuff in config files, made changes in .mk files based on the build flow. - Tested on roc-rk3399-pc, a rk3399 based target. Compile tested for orangepi Changes for v2: - added Cc tag. boot/arm-trusted-firmware/arm-trusted-firmware.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk index 3473701..7722954 100644 --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk @@ -150,9 +150,11 @@ define ARM_TRUSTED_FIRMWARE_BUILD_CMDS endef define ARM_TRUSTED_FIRMWARE_INSTALL_IMAGES_CMDS +if [ -e $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/*.bin ]; then \ $(foreach f,$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES)), \ - cp -dpf $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/$(f) $(BINARIES_DIR)/ - ) + cp -dpf $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/$(f) $(BINARIES_DIR)/ \ + ) ; \ +fi $(ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL) $(ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL_ELF) endef