Message ID | 20190720182416.183626-38-sjg@chromium.org |
---|---|
State | Accepted |
Commit | 89d66907b37b2578b0e998faf3ba8ef66c6a7606 |
Delegated to: | Simon Glass |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> 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=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ltBG6zHq"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45rcBR1Bpxz9s4Y for <incoming@patchwork.ozlabs.org>; Sun, 21 Jul 2019 04:40:30 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 9EEE5C21C4A; Sat, 20 Jul 2019 18:34:34 +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 D33C1C21DF9; Sat, 20 Jul 2019 18:26:21 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C087BC21EB4; Sat, 20 Jul 2019 18:25:29 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id 217C0C21E12 for <u-boot@lists.denx.de>; Sat, 20 Jul 2019 18:25:22 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id k20so65214493ios.10 for <u-boot@lists.denx.de>; Sat, 20 Jul 2019 11:25:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cP+TB7OtA3RpjJJVXhhWY/ic4wF8wRW+wyAstbp5ApY=; b=ltBG6zHq1A3irhkqf6Dl4yRWIxPnvKC80IqpG1fKe5ZgD52vQt6FBzQJcqhG5btgI3 AvHDt1udU7CRAwl9UDQlAmm2EJLgKfcs+ZJy3cPKzgjjcJuUQm5//OoMYq+AkVP8pron jK/LfPArp4EeTlh82wl1aceN++JGRzpyZo/OM= 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:content-transfer-encoding; bh=cP+TB7OtA3RpjJJVXhhWY/ic4wF8wRW+wyAstbp5ApY=; b=ByMbha951sHeFpxewQcpdrvOTtkV6pi94a/LtVgZGWXdwG3Ii6amZiZaCnxFaAqUMm lr7zemOjGGHXwPTVA5Qe2iknSGTLPcAV5olDR8BUe4ed/vwCqBNcyZzLL3mNpzDS7A6u NpyjJi68MqA9bp4sjNSMPSTqT0P4PqrXsgIs0MNvpiwr13lLChlnGkO9rZtdo0L/dWCP tIkF3ToCXbVQa+jW1n1pmh9KVLzUe1dM9mCvamxDDUpFA6J2IvYfJQ8PZbxCYdnBlQGt mQItaGkvpFC9lIBwZ2xiZbcrPYvRlOokhjQnF1J0tnpaa6Rv2WEbdylaqdlK2OW1xNAg H4dA== X-Gm-Message-State: APjAAAVaSgng3RFX1luRj+577nO2b0hS7JmQeeNt5+PeUDQ5Np0BkGC8 dX7XyNVtD7FpW9ICFHedkBJ/DOimEqs= X-Google-Smtp-Source: APXvYqwyC0RcMErtXh8AIgjpYSqwBIaHFk22pLyTKvlFDLXNTsfThzHIYroy5oKUlp+H175awZzirw== X-Received: by 2002:a05:6602:1d6:: with SMTP id w22mr11251129iot.87.1563647120966; Sat, 20 Jul 2019 11:25:20 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id z17sm49778933iol.73.2019.07.20.11.25.20 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 20 Jul 2019 11:25:20 -0700 (PDT) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Date: Sat, 20 Jul 2019 12:23:59 -0600 Message-Id: <20190720182416.183626-38-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.657.g960e92d24f-goog In-Reply-To: <20190720182416.183626-1-sjg@chromium.org> References: <20190720182416.183626-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Devicetree Compiler <devicetree-compiler@vger.kernel.org> Subject: [U-Boot] [PATCH 37/53] libfdt: Copy the struct region in fdt_resize() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
Series |
binman: Support replacing entries in an existing image
|
expand
|
At present this function appears to copy only the data before the struct
region and the data in the string region. It does not seem to copy the
struct region itself.
From the arguments of this function it seems that it should support fdt
and buf being different. This patch attempts to fix this problem.
Upstream commit: c72fa77 libfdt: Copy the struct region in fdt_resize()
Signed-off-by: Simon Glass <sjg@chromium.org>
---
scripts/dtc/libfdt/fdt_sw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Applied to u-boot-dm, thanks!
diff --git a/scripts/dtc/libfdt/fdt_sw.c b/scripts/dtc/libfdt/fdt_sw.c index 6d33cc29d02..d8ef748a721 100644 --- a/scripts/dtc/libfdt/fdt_sw.c +++ b/scripts/dtc/libfdt/fdt_sw.c @@ -114,7 +114,7 @@ int fdt_resize(void *fdt, void *buf, int bufsize) FDT_SW_CHECK_HEADER(fdt); - headsize = fdt_off_dt_struct(fdt); + headsize = fdt_off_dt_struct(fdt) + fdt_size_dt_struct(fdt); tailsize = fdt_size_dt_strings(fdt); if ((headsize + tailsize) > bufsize)
At present this function appears to copy only the data before the struct region and the data in the string region. It does not seem to copy the struct region itself. From the arguments of this function it seems that it should support fdt and buf being different. This patch attempts to fix this problem. Upstream commit: c72fa77 libfdt: Copy the struct region in fdt_resize() Signed-off-by: Simon Glass <sjg@chromium.org> --- scripts/dtc/libfdt/fdt_sw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)