From patchwork Mon Aug 16 03:48:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 497631 Delivered-To: patch@linaro.org Received: by 2002:a02:cf8a:0:0:0:0:0 with SMTP id w10csp1500614jar; Sun, 15 Aug 2021 20:14:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxO+IOmhSypSnwvHt70sqUpnaUw7yxVt8tk52QF/Gg+8ptCAjW3C0EMiIWRLdv3/LUnsFgS X-Received: by 2002:a17:906:1412:: with SMTP id p18mr13738245ejc.545.1629083667135; Sun, 15 Aug 2021 20:14:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1629083667; cv=pass; d=google.com; s=arc-20160816; b=c0EXkZWtDxqYr3KXdn6vayK+taWehveB/V4UZSe/UmyV3cqywHssGfHeIt6KEHc3Sb uJLci+L/OdkXkir6B65rntmOWOgCRrTdVkHiafDDD/aq/V08cMmk2B8LkWCuW0wC5C/2 /9H5OcRZ6C1p3j9W3ad2OASxZxZD7ilT12nT7hYqgtL+jvLvcxwXsbI+TbDEqeOLwe7R LFbtQL2c+j+2smXaTBAil+i/S5tGbAMT+77vbrQX2wUxhJiE00EM1zQ1v4jxcB24Aeoe D5mt00wUPnAoAPHrrB2QI3UCp6Xdvzueo7XOH2+RMSO3YCowsiJBKczMKhgyvu9el3BD BH4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:message-id:date:subject:cc:to:from :dkim-signature; bh=4zLc15YMomADS+XF7kjYA1RmlkXo4hCKFVubOcvhebU=; b=rQaza2vSxJJOLrUAant5PZv3OoCca23X2CrzpnLHkZn9Hya7+g8Hhs7Ak2g2xktMCl uqmMTNJGa+NEL29YJftd//KayeHQP9IJ3aRRKeJAfVDHuuwvfNLHdEBLCwrrEyZYavH5 RAbtjA32QBTWgz4M+DF1zSy8NBLDXHKR1JsO0Mct5HcHZ5P5cct6Y85d2LB+qkTi/RIr t0LbaZBfMuzsqRCTTE8UX9Paz+BFGQY8UO7PJACoi0ErV5cC5tZTMcA04skWzUhJQvQT tNFPR/kT4EMtbDnJiuKbSJMCupKwJ3PzhJFs7GmrN31lclrumU3TxQu9XKTzet1wUoga 5dYQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=Z7yikkRN; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id z66si10342234ede.4.2021.08.15.20.14.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Aug 2021 20:14:27 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=Z7yikkRN; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 19C0582EA8; Mon, 16 Aug 2021 05:14:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=oss.nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="Z7yikkRN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D1AF482ECD; Mon, 16 Aug 2021 05:14:18 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER,SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0624.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe1f::624]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 003A382EA1 for ; Mon, 16 Aug 2021 05:14:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=oss.nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=peng.fan@oss.nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=al8eBjuaLJERu2hQIQk5ZK+RMFfgtE9SWCoFCon1+XOpwkpY1X58AzL2h9EmzaanEoyuqbmiJ5EcTPz++oTF4GhIGeHQjkQWStVJZJFr5zHXQzvadNohCWFNDQHF1DK5pvxr6D8G8iTkwZhbAE3dIep/GS8D5vgVaf8jWBUNsKmb4zrz0UubWV8jHxfYlxTqSvar3+BZJfW2O1iQ8BLuyKHeOoM9mTy+q940y6afbgaXRxTGUQaNSslm4Wf62h0S6eTfXC3qCJAzOnY9ARJK/o9Y9pHn4p6Vd5YcPVd/is0wWeDWrqF+sRYH8z9vNt6mHYsy4hMa0iPN4RIZSfn6RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4zLc15YMomADS+XF7kjYA1RmlkXo4hCKFVubOcvhebU=; b=D2CqBMh4rQSEF/1qYKUldJI6bAkNuJafVhTZ9kTwWiWwSGteqfXh+BhSEo42q1kuoQFq3F/zmcj8PW75SEwFRwVltyVQ+utj7WjnSZORn36xmc8yu6gGydq9pOGTuM47dQTdy1S774RGDwlpiB8Penq7oiFVwhowwC5kVXmYu0Z3rqA8gT/Yf/DL7iznnczZzsMEMAOI7yOk2uwQjjPceEn153eY9lxHUCbntX/rr/dGwazUnGHVdgWq8CuKV80iAEapP9FL/rRlDbu6JZbe0b4Ox7kKpF5bPv7m4lZgDXc6IqjSPH/Yv+vpeLF4WrN6BsKfn6+sWwGJEDZ3FSdoqw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4zLc15YMomADS+XF7kjYA1RmlkXo4hCKFVubOcvhebU=; b=Z7yikkRNpaGwXEbujXk5Ml+pgcUQ+YqgxIe+8MjT0K3QufbWaD4YEM2FoDaJVCCpeayjf6daIZGHN3h6k70AR2uwY7FmYSo8M1DadDcrgUg6uIAyFJufF+hqWU3iqA7ekBeIAifF+gPdURsscgenFC4cs5r9TGNUo9bk/2Eumss= Authentication-Results: denx.de; dkim=none (message not signed) header.d=none; denx.de; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB6PR04MB3125.eurprd04.prod.outlook.com (2603:10a6:6:11::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.16; Mon, 16 Aug 2021 03:14:07 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c445:d742:eb76:86dd]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c445:d742:eb76:86dd%9]) with mapi id 15.20.4415.023; Mon, 16 Aug 2021 03:14:01 +0000 From: "Peng Fan (OSS)" To: sbabic@denx.de, festevam@gmail.com Cc: u-boot@lists.denx.de, uboot-imx@nxp.com, Peng Fan Subject: [PATCH 1/7] tools: imx8mimage: not abort when mmap fail Date: Mon, 16 Aug 2021 11:48:41 +0800 Message-Id: <20210816034847.22767-1-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 X-ClientProxiedBy: SG2PR01CA0095.apcprd01.prod.exchangelabs.com (2603:1096:3:15::21) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SG2PR01CA0095.apcprd01.prod.exchangelabs.com (2603:1096:3:15::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.14 via Frontend Transport; Mon, 16 Aug 2021 03:13:59 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e4a052f9-3b77-4ca7-beef-08d96063e54d X-MS-TrafficTypeDiagnostic: DB6PR04MB3125: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:138; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ImUkjxrl/XLRmp2k/P+bPchUJeYwIcmms5S/duqXy4t7V5OggPRHdqIXqJUspXFt1D4W8x0nXpIeIu4rEAPwRHyPTfIsOPCzkWlhe0dnZJuoix7cOPcx1V/gNMNhmp/VE8SfZkCPiKIwYdLaGZ9Z/t/HLrP14Af9KjIVk0CHj+ApWZcOVY2TrV1auJWu0JEOJ6JK7zsMRlL+vYcl5NPREP8blDUi9X5KWnqArCRciARov2J0FWsagOZ+qVAp2iFXmVeWXOada1mh0hQL9HPab/a+nUQFvkEgBP0c1KrKVz7BrLYeglRvjrF4S29bP7KBeubE/ZiKzfUG3K053EGYLy85xYlbGEhBpQmh+s6uGPCPhfU6khQO9A9lzXFhwN+0EVuV/uqQGZ4TGtgcfv2+TYMQehOc+tUx7eD3kubj0glCIjqq8FcJFI22KS5YST7gUFD2klJ0qX9+ICMyPC9IqMOiX7HeQquVdMxYF6tVQBb73Wjy2SusUt+zQtUNoStZe5W33CVXdCoScwDl1c9md7wOLRieetIKEJf4+WFPsZAoyFP4eDEHA1ady5GdYZv5AMjf69wvdiOlQ5B2LsYU6FuiNuXv+WohE/n9wlPuUp+xShDdGoyy0bitTbUS6zYPhEhBsrvfi1XiuiEfipnsjup0+LrIkH2bf+4Mw03Euc1L1oKoTOT0oUY19OVsJD7V5n/1oW0KlGw/vVedlvq3TBs/w23cUiK+rBiT7zsM1hw= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(6486002)(186003)(4326008)(26005)(956004)(2616005)(5660300002)(316002)(6666004)(52116002)(2906002)(66946007)(86362001)(83380400001)(8936002)(508600001)(38100700002)(38350700002)(66556008)(6512007)(8676002)(6506007)(1076003)(66476007)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Th6bxdarj2P93UGN59dwa45ThcsfCT0n0wAfFasDVI+GzggBuCSj++DhLBpx9lF+OjQVTx3qrSbTZwZQ5Vc/KGG0w1sVqu6R8PlFLf3j66276g52bSn6H9cKsDFgyo9Ky6xqc7NKfuwLGjMkCqVTpCSr8BxV7fEzZRXlKuou1FfPl7zPI3X8O1tTBI0tAYWXWL2bJNmojk9J3II8IYvTGJ5AsQM+PfXgfPsdrux50PqikZP1rCkQSUZeZYDPn4aYsLAj1c3PDLngvwgE98ex50wVFQr3i3aRe6/XVun6x8QcpC7yy7iUwYpR4yuUIuG1NHrHMIQrqG8P6icUcnBZZgCzh5TfsV0sWIcOPRaZyjgG55niIvMRULWteyN+alEJtEWalcOerJgjO2Iylm8sFTzLBM954HEKbNV/GE7llNo/9zzkLGRc5QDLe0VM/sHK57H/2MTJqk/eliqGy9x8z2l27TEi3XONnWH2iL5MYuIcKUwjoK3oUuUJ00WX9o4d8dl9zidC6l4HEeD0D2R7t3KQQxkV9o5YKDRrwd6evt8yhnJf3BenplVgSshQPNTMJ+sJ6HaNvdzAlwVTIhVQSefyMyINhULhTz0NMCnW/sfLrdN5ab9HVx/sNU0fQBvLrHDopNbegDOv8K0J3gCHfFmoftmUYBxoUfsXafxJZlLOnt0EF6WLMqCuHMAqCbnre6OHl213O0v59XWvT9sgsosZfMf9HyR8pz4RcUwuNh3RrYdLeLr5SxB0mcjqF7ePiooqG5JKmDTsg/9hjRP5/I8cKRzFthXLMnCdphEVuSdCGYjhym2Lkuknb0lnq2f1z9/hW8B3gN3fm6AccMSXBiC0d27kbtXyjAn+dZ9fLpJdwX60+CQyLwR1gX6OV/VmIc4Wt67PhJmF338/y3Mwjuy/uGcsRVfpEmMswOCxixirdHoWlN0Nt99TlEtjTk8a4SIFRmgeV4NxwggE8G2tc/qEJv1wd8sHR+rEyAMpl8+VoD3BHb6ivg9Dze3uVfl8Uly6dT1dTb21MNPTzkX5QIlHyHrAGcVoXsKzpMtV4tX8XC7gePExe3E9dwYYrfjhKvuG64bN3ZNoPuOqWMm3EodO0D+PRKeRHCEl+R6CjP2RD09lIIlalpuzRNBUv0T/12AObTCaylelLuJZZUtzjX3VnZxRasWWPDEnJ6QtStEFYFFBOhXg6cg5vUtyiUq7W/+pJgzeRl8nDv0fKv6EEjb5sGEGQbMR9u8JZqUPUEnyR6UBm0BO4XKlqAhM1wFNHZ2gQbIROkcFChpU76PWLZkUrzgI1F81gkcU84sdfNcyfj6DlR41WrYqslsOCwZ3 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e4a052f9-3b77-4ca7-beef-08d96063e54d X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2021 03:14:01.8190 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6rUC2mANgLcJoh6Tf/5V5CylThHb5h9kGPHgY/1xNxBcznfWfT8jn/XNNjicRT/NUCv+ARy6xzwOgbitX2+bsg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR04MB3125 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean From: Peng Fan When creating flash.bin, the hdmi firmware might not be copied to U-Boot source tree. Then mkimage will fail. However we are switching to binman, binman will show the message if the file not there, and create empty file per i.MX8MQ binman node. So we not fail mkimage here othersize CI will fail if hdmi firmware not copied here. Signed-off-by: Peng Fan --- tools/imx8mimage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.30.0 diff --git a/tools/imx8mimage.c b/tools/imx8mimage.c index 11e40ccd94..4eed683396 100644 --- a/tools/imx8mimage.c +++ b/tools/imx8mimage.c @@ -271,7 +271,7 @@ static void copy_file(int ifd, const char *datafile, int pad, int offset, if (ptr == MAP_FAILED) { fprintf(stderr, "Can't read %s: %s\n", datafile, strerror(errno)); - exit(EXIT_FAILURE); + goto err_mmap; } size = sbuf.st_size - datafile_offset; @@ -311,6 +311,7 @@ static void copy_file(int ifd, const char *datafile, int pad, int offset, } munmap((void *)ptr, sbuf.st_size); +err_mmap: close(dfd); }