From patchwork Sun Apr 28 09:09:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 310 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A4C9B3F08F for ; Sun, 28 Apr 2019 11:09:46 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id d12sf5329064pfn.9 for ; Sun, 28 Apr 2019 02:09:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1556442585; cv=pass; d=google.com; s=arc-20160816; b=RPcWt23XYzBXUE1lq9aLZ4u/3/XV90F8Rs2zWNudpDxhTH39PGPqidD4gLOzyskXMv h0oWbxJvwMxv5Ld/ac7qzjD1pNM/WrwCVGSwogchlk+Izb4Lone5htKXYTnxvZjCT39v AzKNb+1bNou27H1J7giAZnaeYXQhOv8igsX6nNzskzmQ++PqVx2h1XEs9ooLltQ/+YWg GoToC04ypLQU1+SbCvwayiAnEYT2wam2ETVgWqxEa8s+3yri9YsZQzSKDMjwLLpGkxsD Clh8FUjVWeTP32xM88JcVFPqU7J7Mf24rs4MeoUi+I6dPsNqum1NI5Wes9RegmgcL3km szog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Sg8Vm3WfMcxDyXou3Jgc1YgunnO4oqICifJRdcX3kIo=; b=0UK/Ibjd+1/GRUAMAHDh2dHj4IoJvBzH4kONJhHc5qTVV6IgfgO6ODEPVMKXMConMv oKc/DapTew4+jghSoSWWs39p+HbKER6yrtpZ3WkmEOT3pLOxF7As3HVvBdxRkoz6R6wK h/UAv6e0d2VIGcv1sxQt3IszPyz7eS/wN8ti5rzIOcOlVeTWN5Nb3c7HoI5lAJ8jAtPr YBSW75CksRRVkZVleFA6olojYx3Kzxdzb0TsJOZDU/obzulgeI8Gd9q8TtSPPuXGUqEy 88eQUVjmkwLS5ZZ7tAhsoOAZv65Tra5tyuLIoCVvELL6Qw8/2EMPZ2RzkiZvAe9IhkNy qi6Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PYlanwSa; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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 :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Sg8Vm3WfMcxDyXou3Jgc1YgunnO4oqICifJRdcX3kIo=; b=EpZDT69ZxCQeQ2bM/97TTLRSsPth6u63VZBix8czBsWMojb4yYyQGyqvFbIjkzGE/G BsnwZC5I5iz8T2e/4C7Y+m2GHwLXNjXJZytJHtzx5yyALl8l1jqR/sLg49ctc+DbNXss YVgYneb0azgBJ3RsuuGboy79Ef7cYCXYcbwMw= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=Sg8Vm3WfMcxDyXou3Jgc1YgunnO4oqICifJRdcX3kIo=; b=t7nN5OVKcLzv4Ix4HGPSC0tEkHEiVyFUQNa0FPx/gl0CiCvLMYydE1JuKruLV8OA/F RFL73Hu4PKNiIs70J/flmwXbxuqTuOQfUDvAfU4XdRhHMBs/hEEKNP3P1cTQhLYriFWa dAfEwPyCWGiUugrVDkzExRdTM+1vvxQSIeKoPgH374s4vz+YwHwom5rniHG0q6XE/whL UiW9hkUR2tY9ZtcW9kQuqGT6BA1FEvY1bJiYztSaCDUwvk0vnWZztOkVYNTEYJ0w2glZ 1X+ntahbH57B388gEsbIeBAEaLkCrP5j8YrY4VaK3AQd80FpP71tTzF33ssE0rLSYvDw PWIQ== X-Gm-Message-State: APjAAAX6wtOK4M91/ZJjDVtcUOLoXCH3ByyLw5uEQimdL36K7gqcYDkM mer2E9YVhTK5zJHCpXolExQ4ILa6 X-Google-Smtp-Source: APXvYqzUWwwX0/ev00oPa6kDcsMnydMY/P+Wrw2xtQrSGSuNcHr7kLxMZD8alE8AMG6y0djB516HbA== X-Received: by 2002:a62:a513:: with SMTP id v19mr56105040pfm.212.1556442585467; Sun, 28 Apr 2019 02:09:45 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:6f8a:: with SMTP id k132ls154478pfc.3.gmail; Sun, 28 Apr 2019 02:09:45 -0700 (PDT) X-Received: by 2002:a63:ff04:: with SMTP id k4mr38615852pgi.117.1556442585116; Sun, 28 Apr 2019 02:09:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556442585; cv=none; d=google.com; s=arc-20160816; b=zSiZxj4mX/qH2LbqO2EsIoAK6IE6G03WVWn2YzZ34oo9yvZ/FV8nJbDcddRx+DO+kt za6M+qncojcbw5dqm2QTwtE5qtH/opoRumSsSwFllf1trqRZFbmCvwAHtuerlUfP87wC a7ieAF7kTH4xx/P3J+QGO6yFn6Q4lusGpVycC4eGzUA0Wk44QImOQdFh45WTqwL1ymkM v4gN60k2EWK+qWI1995A/Pq6amJaE9RHPyXQQfnQl3BY7TLBVRFztikJEQb3K/v02mrN QjbAb3mdlYnh2ATAUkN0LtgKrjInk3H6UHZYoyVB2P8+MWQoRldW1yJST6J/+c0YweK4 mE0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Ksp0RJAO0k4pfRprgoggQ+F3/fOSrjeMTlEOTKA44MY=; b=Q0aDfRxqKhS5uvdFzj1ikyx4lTIWNv0MmgOVbArbZ59JAtDVzAM6Iie+fqsiZemshT lFKV8nEHdExkBVX7rfhus5nJeRPgPeKWhBTGAMt11mDhS/pDrdBkoAi4PQOXQdxf9iaR 8MLHop6i3SKrvF5WLeWPYw6zxBnlH/NgS+vXTd8amuARiA9R4vEu3Zwiq7uMhnwlVLYS Datwgt15CMdiOGMAfG6arKXg43vzmMnuBwKR86Y06NmwPZHLUZ4rDGE+bpd0edGJ0uS7 juZzOLocfwYhMHqBBd35h7s6WwUJsx1DMnESZ/yZuD2vYIzLDWzmzlh4/1QqFF12wDpL KSQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PYlanwSa; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id l9sor5459650pgq.46.2019.04.28.02.09.45 for (Google Transport Security); Sun, 28 Apr 2019 02:09:45 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a63:e004:: with SMTP id e4mr53483625pgh.344.1556442584814; Sun, 28 Apr 2019 02:09:44 -0700 (PDT) Received: from localhost.localdomain ([115.97.185.144]) by smtp.gmail.com with ESMTPSA id k7sm3040338pfk.93.2019.04.28.02.09.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Apr 2019 02:09:44 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , Akash Gajjar , Tom Rini , Manivannan Sadhasivam Cc: Paul Kocialkowski , linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, u-boot@lists.denx.de, Jagan Teki , Emmanuel Vadot Subject: [PATCH v2 4/9] rockchip: rk3399: Get bl31.elf via BL31 Date: Sun, 28 Apr 2019 14:39:08 +0530 Message-Id: <20190428090913.10568-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190428090913.10568-1-jagan@amarulasolutions.com> References: <20190428090913.10568-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PYlanwSa; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Right now rockchip platform need to copy bl31.elf into u-boot source directory to make use of building u-boot.itb. So, add environment variable BL31 like Allwinner SoC so-that the bl31.elf would available via BL31. If the builds are not exporting BL31 env, the make_fit_atf.py explicitly create dummy bl31.elf in u-boot root directory to satisfy travis builds and it will show the warning on console as WARNING: BL31 file bl31.elf NOT found, resulting binary is non-functional WARNING: Please read Building section in doc/README.rockchip Note, that the dummy bl31 files were created during not exporting BL31 case would be removed via clean target in Makefile. Cc: Emmanuel Vadot Signed-off-by: Jagan Teki --- Makefile | 2 +- arch/arm/mach-rockchip/make_fit_atf.py | 11 ++++++++++- doc/README.rockchip | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ba0cce9f33..2471340c71 100644 --- a/Makefile +++ b/Makefile @@ -1782,7 +1782,7 @@ clean: $(clean-dirs) -o -name 'dsdt.aml' -o -name 'dsdt.asl.tmp' -o -name 'dsdt.c' \ -o -name '*.efi' -o -name '*.gcno' -o -name '*.so' \) \ -type f -print | xargs rm -f \ - bl31_*.bin image.map + bl31.c bl31.elf bl31_*.bin image.map # mrproper - Delete all generated files, including .config # diff --git a/arch/arm/mach-rockchip/make_fit_atf.py b/arch/arm/mach-rockchip/make_fit_atf.py index d1faff1957..327875d87b 100755 --- a/arch/arm/mach-rockchip/make_fit_atf.py +++ b/arch/arm/mach-rockchip/make_fit_atf.py @@ -10,6 +10,7 @@ usage: $0 [ [ bl31.c") + os.system("${CROSS_COMPILE}gcc -c bl31.c -o bl31.elf") + bl31_elf="./bl31.elf" + logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG) + logging.warning(' BL31 file bl31.elf NOT found, resulting binary is non-functional') + logging.warning(' Please read Building section in doc/README.rockchip') opts, args = getopt.getopt(sys.argv[1:], "o:u:b:h") for opt, val in opts: diff --git a/doc/README.rockchip b/doc/README.rockchip index ca4d6473b0..98a3824e2c 100644 --- a/doc/README.rockchip +++ b/doc/README.rockchip @@ -149,8 +149,8 @@ For example: => make realclean => make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 - (copy bl31.elf into U-Boot root dir) - => cp build/rk3399/release/bl31/bl31.elf /path/to/u-boot + (export bl31.elf) + => export BL31=/path/to/arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf - Compile PMU M0 firmware