From patchwork Thu Jun 30 16:52:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 642703 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3rgQcq2QYTz9s4x for ; Fri, 1 Jul 2016 02:54:35 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b=MSwiFQry; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CA49FA763B; Thu, 30 Jun 2016 18:53:54 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I0S6GrjJh0gG; Thu, 30 Jun 2016 18:53:54 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BE3C4A75FD; Thu, 30 Jun 2016 18:53:19 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5FE98A7530 for ; Thu, 30 Jun 2016 18:52:51 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hJ1g4zgDezEL for ; Thu, 30 Jun 2016 18:52:51 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-io0-f178.google.com (mail-io0-f178.google.com [209.85.223.178]) by theia.denx.de (Postfix) with ESMTPS id 74257A74FB for ; Thu, 30 Jun 2016 18:52:42 +0200 (CEST) Received: by mail-io0-f178.google.com with SMTP id g13so76628990ioj.1 for ; Thu, 30 Jun 2016 09:52:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=sfJre7IHeiX+gv4ts2t3Mxp0quJHx7pzQvzBTr53OKs=; b=MSwiFQry1DiW4gKEodRi4uS0X7lHxVBGl5HufcVt3L0750qez60+Qx1+cXD+3VgRAO OPdSYtM0XbsxQfWS8Iepz8VYlOrp/IhJgAxe2gg2sTePDRwzwsMiYSTkpEUbyCfsE3F7 dVPNb1B+M8ltcy55lDfeqt0KXPTSGqNaSIUPf1qUkrS/ao6f5jmmFhVLHrwPQllO0EHX GJntA/KPudVUGixIO/O5c8yKP+zpFjZE3dW56b/5Vl0JQnibgPCve1RN1FMsIE9YKZdq heVFqDR0kTg8nBSI1BzqP9gdgTK+sZiTIrAvpSHQZnoaDlG4OuLz+8yOh1qk9w+7qIBN u8Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=sfJre7IHeiX+gv4ts2t3Mxp0quJHx7pzQvzBTr53OKs=; b=WrDUIhztXBgh+pFGKrbeQx1Ph+XvMW6s+fiYcmmfpN/Q5jbCo7osxpxWujQFErc/jo xmMjwWxL6blXIlprHIZBnnrMMuBHVDIC99TBkoDvhX6HblJFozI3oSaW4qRoo8VEISoQ URuXKnAyVqW/jSG50SiUn+CxtU4Q0PneDvrxRzlyWIz3JQjKJrx2MieMBuknZBES6X39 Vo5zDvG7Udb0qyygUn96rXcj67gcE91nTWugQkCG78GxB/6Doit/M+NizffL2ge9js/A j4KhEY/a8hznsDUeEssOoeOEmbqDoWGw/KkpQjlKtUG0DfMF7Hw1NVvVg/lnc36JeGKq e8AA== X-Gm-Message-State: ALyK8tKjdXTuAmAGQ3p8luoqelH4xgNqGXLkmu0QBdu/5yH/rPCQSmONLqcrJpW9Pn6YQgyL X-Received: by 10.107.53.98 with SMTP id c95mr15029701ioa.49.1467305560695; Thu, 30 Jun 2016 09:52:40 -0700 (PDT) Received: from kaki.bld.corp.google.com ([100.100.202.57]) by smtp.gmail.com with ESMTPSA id r78sm4264348ioe.15.2016.06.30.09.52.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jun 2016 09:52:40 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 70D7C221308; Thu, 30 Jun 2016 10:52:39 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Thu, 30 Jun 2016 10:52:09 -0600 Message-Id: <1467305540-13607-4-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1467305540-13607-1-git-send-email-sjg@chromium.org> References: <1467305540-13607-1-git-send-email-sjg@chromium.org> Cc: Tom Rini , Vinoth Eswaran , Joe Hershberger Subject: [U-Boot] [PATCH 03/14] mkimage: Require a data file when auto-fit is used X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" When auto-fit is used, it is not valid to create a FIT without an image file. Add a check for this to avoid a very confusing error message later ("Can't open (null): Bad address"). Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- tools/mkimage.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/mkimage.c b/tools/mkimage.c index 66d29ab..a36c031 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -276,6 +276,8 @@ static void process_args(int argc, char **argv) /* For auto_its, datafile is always 'auto' */ if (!params.auto_its) params.datafile = datafile; + else if (!params.datafile) + usage("Missing data file for auto-FIT (use -d)"); } else if (type != IH_TYPE_INVALID) { params.type = type; }