From patchwork Fri Sep 20 15:28:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Jacques Hiblot X-Patchwork-Id: 1165280 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="cAUaGpms"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46Zd5Y2KPGz9s4Y for ; Sat, 21 Sep 2019 01:33:05 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id B1C33C21C51; Fri, 20 Sep 2019 15:30:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id BA7AEC21E7F; Fri, 20 Sep 2019 15:29:26 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D9882C21E6A; Fri, 20 Sep 2019 15:28:55 +0000 (UTC) Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lists.denx.de (Postfix) with ESMTPS id CFCA9C21E2F for ; Fri, 20 Sep 2019 15:28:51 +0000 (UTC) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8KFSita121008; Fri, 20 Sep 2019 10:28:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568993324; bh=M9180F/j7mWpbeD8ASjC7Sm3egnNRHj4k1h7Qheau10=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=cAUaGpmsAHfOjt/GrmzmBZckT4aE9l5STKcWzEiv4L+SrZcr2Nz8nNVPGLK+MkPdi 1Z8t6U1f8Hknhh+DysuoLpq4ilq+fwnw8DJiVKBTeeNViZsJADxNzgevuU3kaC0/1B V3a4WAipcmiQm3ulHRO0viI9blgNgYWOytLg9G4g= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8KFSipF100483 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 20 Sep 2019 10:28:44 -0500 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 20 Sep 2019 10:28:44 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Fri, 20 Sep 2019 10:28:40 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8KFSh0T116660; Fri, 20 Sep 2019 10:28:44 -0500 From: Jean-Jacques Hiblot To: , , Date: Fri, 20 Sep 2019 17:28:14 +0200 Message-ID: <20190920152824.18958-7-jjhiblot@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190920152824.18958-1-jjhiblot@ti.com> References: <20190920152824.18958-1-jjhiblot@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: Marek Vasut , u-boot@lists.denx.de Subject: [U-Boot] [PATCH v5 06/15] spl: fit: be more verbose when an error occurs when applying the overlays X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" There are many ways the overlay application can fail. 2 of them are probably the most common: - the application itself failed. Usually this is comes from an unresolved reference - DTBO not available in FIT (could be because of a typo) In both case it is good to be more explicit about the error and at least show which overlay is failing. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Simon Glass --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None common/spl/spl_fit.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 187dd5ab3f..cdbba3705d 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -113,7 +113,7 @@ static int spl_fit_get_image_node(const void *fit, int images, node = fdt_subnode_offset(fit, images, str); if (node < 0) { - debug("cannot find image node '%s': %d\n", str, node); + pr_err("cannot find image node '%s': %d\n", str, node); return -EINVAL; } @@ -359,8 +359,11 @@ static int spl_fit_append_fdt(struct spl_image_info *spl_image, ret = fdt_overlay_apply_verbose(spl_image->fdt_addr, (void *)image_info.load_addr); - if (ret) + if (ret) { + pr_err("failed to apply DT overlay %s\n", + fit_get_name(fit, node, NULL)); break; + } debug("%s: DT overlay %s applied\n", __func__, fit_get_name(fit, node, NULL));