From patchwork Wed Jan 6 09:56:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 357550 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp730238jai; Wed, 6 Jan 2021 01:57:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJyNQEoslUSE8sCYvpbLa3A0dCCOlUUCFMjy+PcJi+nVSLwIt+OrLL8FKjZBkePw1S82bWOm X-Received: by 2002:a05:6402:2377:: with SMTP id a23mr3412033eda.34.1609927039325; Wed, 06 Jan 2021 01:57:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609927039; cv=none; d=google.com; s=arc-20160816; b=pXwWkEDskj4c8FLUbvQIX7A4n+R8l7VO9if9W90oKwp+9jnT4UXmmFbk9iIAuL+h+N ZrL6f+afrmhXInVu5/V043qaiyRFxvB0Lqk+cAF7VFwh/RGfRmfxzOpzcYECCkCZSNEx gJZ3wUxyqFi3KH8O2qtvxHi4vPCAIRwJQK/Vjiy7C6QPJxOPil4m7mVIF0ltSN4OqI9t Nndw7O0Rxm5HCeCKGxXjwhPiQSvDGZgsP7vjSmujHpSskm9F0eKy/7ikSvGuOp5BdVeT oJl9JwbaznWLZW0+ghcXZ1aN4TAHnZXEId8ws/ktX3q//LEtxddmqTkMZI9Z5xS6laFn FJZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=rDsopHKKF607Xe9UdumCtEOjuD6D8IDJARDfhwx961A=; b=ADp/6J6jJfyzOtYBv+sGq2bnRn7eX3PhsjTBurSaDzRzgWuTWtufCj4VpGnfWiYE78 Ba+fDSDUaeTnM/ZzOI6HUR3AzepJEccOInCpzco1qiRRx5Br10nnE5HmcqgN6zf38pAq FIfV2FR2cxQrxiKNRqzW60ZKcUdHF3yLLt9W86pgD8lDNNsTJq22pyZVbuB6YIpvVKDy IjXvTe5DTCaYGesNCGZ/sQRXl3KC6DPJjuXn+EmUA8mvuQ85ttGiYFmXP/QqyRGK/Fy9 eXP/26YA6K1bwHjEfrAox5sdaH+O3X1tT8+Wi9xqiQRC+O94vGHqMR/UfrCStx7v8qVl q/FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UjuHEcbW; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d17si700976eja.318.2021.01.06.01.57.19; Wed, 06 Jan 2021 01:57:19 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UjuHEcbW; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726379AbhAFJ4x (ORCPT + 6 others); Wed, 6 Jan 2021 04:56:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726362AbhAFJ4w (ORCPT ); Wed, 6 Jan 2021 04:56:52 -0500 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6043C06134D for ; Wed, 6 Jan 2021 01:56:12 -0800 (PST) Received: by mail-pg1-x532.google.com with SMTP id z21so1892471pgj.4 for ; Wed, 06 Jan 2021 01:56:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rDsopHKKF607Xe9UdumCtEOjuD6D8IDJARDfhwx961A=; b=UjuHEcbWMscc6ZSzJ7TDd9JJCm9n4VnkUlStwKAOguAfU/sdlDko1X3O+Il4eCep64 FNMBnXnaqWF67HUYimnCpXImAWJEkzwV+MWbkc17EMYL/ea/G0B7hQKxtdi0sFF/Tj9z x1s3BUdje4Kfc+9MTTJJ78IS/4DaKLqeElEJmfF7jxQl0iH1ydnzMOtNc5BcXAx/Jh93 6LbgWt66T3Y4Rhhp7pHYyArPqqYNwV8Dnqo+HhnJR2q01PGJt0ODj9fZl6aY/jhAOHy+ ndgOm1QUNwCgNMmYCzipR+WychdTi4aVTigrqsMZlXe77hrmyz0iwJUgvV99SwM9m2gb OSsA== 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:mime-version :content-transfer-encoding; bh=rDsopHKKF607Xe9UdumCtEOjuD6D8IDJARDfhwx961A=; b=F56j1AdMXk1EwoBKYm1LIqXOOLv/KVsRJEhlw7mr3cB3k6cebYcS/LscEgDFDyKZCJ z4loM65sJ3yU4NMiBI6gf0aolNh86ZrT7GMEvAL4r14MCfqo8Bv4OJvBhRFE6YXEZwKf hyaSrtP8aKEmfMnjyN7oKVxAjySTQebypsYuT/6SYeOrmfy9iZgvi154Zrxu0ZAferE+ 6BN5x4zzZeSBenXfi2q5FrxDWrFfkY4kHg6LLxQ/4E8rGhhpx4FbxNt6JHcsju7Ueqte NCbFd/elNtVSAM3dWMVQM/JCnV13sX/SL0pgx9RmIZ5Sfx0uK77QoUDmhApTP8FCDybn dVrA== X-Gm-Message-State: AOAM532RcAMvmp/d3XZ4xkZbRRqynTM6GfDbEzfmsDshOBcGx5DqOcTO TPvl9peg8h+2nUzzjDUiIFLWcA== X-Received: by 2002:a65:5244:: with SMTP id q4mr3762581pgp.50.1609926972231; Wed, 06 Jan 2021 01:56:12 -0800 (PST) Received: from localhost ([122.172.20.109]) by smtp.gmail.com with ESMTPSA id e5sm1963171pfc.76.2021.01.06.01.56.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Jan 2021 01:56:11 -0800 (PST) From: Viresh Kumar To: devicetree-compiler@vger.kernel.org, David Gibson Cc: Viresh Kumar , Pantelis Antoniou , Frank Rowand , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot , Bill Mills , anmar.oueja@linaro.org Subject: [PATCH] dtc: Allow overlays to have .dtbo extension Date: Wed, 6 Jan 2021 15:26:08 +0530 Message-Id: <30fd0e5f2156665c713cf191c5fea9a5548360c0.1609926856.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Allow the overlays to have .dtbo extension instead of just .dtb. This allows them to be identified easily by tools as well as humans. Allow the dtbo outform in dtc.c for the same. Signed-off-by: Viresh Kumar --- Hello, This was earlier posted for the Linux Kernel and here is the thread where Rob gave his feedback: https://lore.kernel.org/lkml/CAL_Jsq+0dL=LHo8r9mY_weBP_bQ97UOBnt596J3JoVHwGNinHA@mail.gmail.com/ --- dtc.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.25.0.rc1.19.g042ed3e048af diff --git a/dtc.c b/dtc.c index bdb3f5945699..838c5df96c00 100644 --- a/dtc.c +++ b/dtc.c @@ -122,6 +122,8 @@ static const char *guess_type_by_name(const char *fname, const char *fallback) return "dts"; if (!strcasecmp(s, ".yaml")) return "yaml"; + if (!strcasecmp(s, ".dtbo")) + return "dtb"; if (!strcasecmp(s, ".dtb")) return "dtb"; return fallback; @@ -357,6 +359,8 @@ int main(int argc, char *argv[]) #endif } else if (streq(outform, "dtb")) { dt_to_blob(outf, dti, outversion); + } else if (streq(outform, "dtbo")) { + dt_to_blob(outf, dti, outversion); } else if (streq(outform, "asm")) { dt_to_asm(outf, dti, outversion); } else if (streq(outform, "null")) {