{"id":809829,"url":"http://patchwork.ozlabs.org/api/1.0/patches/809829/?format=json","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/1.0/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null},"msgid":"<1504555943-12893-7-git-send-email-pantelis.antoniou@konsulko.com>","date":"2017-09-04T20:12:15","name":"[U-Boot,v3,06/14] fit: Do not throw away extra configuration on fit_image_load()","commit_ref":"7c3dc776b91a683b2f7dd40ed91361124a3a91c0","pull_url":null,"state":"accepted","archived":false,"hash":"0fd1281773bf81c138e98dda37bcb6e03e5fc6f8","submitter":{"id":64098,"url":"http://patchwork.ozlabs.org/api/1.0/people/64098/?format=json","name":"Pantelis Antoniou","email":"pantelis.antoniou@konsulko.com"},"delegate":{"id":3184,"url":"http://patchwork.ozlabs.org/api/1.0/users/3184/?format=json","username":"sjg","first_name":"Simon","last_name":"Glass","email":"sjg@chromium.org"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/1504555943-12893-7-git-send-email-pantelis.antoniou@konsulko.com/mbox/","series":[{"id":1453,"url":"http://patchwork.ozlabs.org/api/1.0/series/1453/?format=json","date":"2017-09-04T20:12:09","name":"uboot overlays, FIT image & unittest","version":3,"mbox":"http://patchwork.ozlabs.org/series/1453/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/809829/checks/","tags":{},"headers":{"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;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=konsulko.com header.i=@konsulko.com\n\theader.b=\"Sn9yRHia\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xmLk35p0tz9t2R\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 06:17:31 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 84EFCC21F29; Mon,  4 Sep 2017 20:13:47 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 54E89C21E52;\n\tMon,  4 Sep 2017 20:13:15 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 72C7AC21EEC; Mon,  4 Sep 2017 20:13:07 +0000 (UTC)","from mail-wm0-f53.google.com (mail-wm0-f53.google.com\n\t[74.125.82.53])\n\tby lists.denx.de (Postfix) with ESMTPS id 3387CC21F12\n\tfor <u-boot@lists.denx.de>; Mon,  4 Sep 2017 20:13:03 +0000 (UTC)","by mail-wm0-f53.google.com with SMTP id 187so8638499wmn.1\n\tfor <u-boot@lists.denx.de>; Mon, 04 Sep 2017 13:13:03 -0700 (PDT)","from localhost.localdomain ([195.97.110.117])\n\tby smtp.gmail.com with ESMTPSA id\n\tu8sm3720435wrc.92.2017.09.04.13.13.01\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tMon, 04 Sep 2017 13:13:02 -0700 (PDT)"],"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=RCVD_IN_DNSWL_NONE,\n\tRCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID autolearn=unavailable\n\tautolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=mvRNxsnik3lUCFAdGOOkgNqvl01RIMt/dBuIE83a+rY=;\n\tb=Sn9yRHiadLeprEYnzBXOVjhBN6ZQFTsYEO5xJUga/kODSqxg1vMdaQ+UJ3lGZSfXyt\n\t8PWFqsTqo2SuyGLSsIdAHGc0KHEEpJgm/fFFQxUq7SVFTLfCjR3JzWo3DDNzfPqUq3jq\n\t+DSinsxQV9k45x2ikNLM6Euz4zxJ106/qB+nE=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=mvRNxsnik3lUCFAdGOOkgNqvl01RIMt/dBuIE83a+rY=;\n\tb=GQ+NXRhx4zdR4tR+nkB4b028tYjN68aW03khIeC+74mLgcay1dleYWpWbv45lJSSi/\n\tlkWf3ywGKlTQBWqzFP/dcI407lO8Dsmw0l1PC0B9R1FIhs3a/aM0OO8dVgj9xBhiOnDV\n\t5vlimQPvAnGstlfjtuVz+PttIKsYEwUzUC+m1TFtEJH5srGfsudqEH906Iy6ozxfR2dB\n\th5FyPLLurPF+DnpqErm05a1XiOLJWJh1rPtgCAeWw7xTePjj+MRvr5PiKR+8GjjjKXbE\n\tZmbOneBgyV8derQraTZ40s+JbrfbjyUS6gnpe4rK65FD2t/BYh9L8tVzI7dehphtFeQE\n\t/Ofg==","X-Gm-Message-State":"AHPjjUipQbaUCDIvTuEFY+Q/wZzaypG8eDLMxHX942MB1g/HN3rd82Ae\n\taWMKOTGzoj8FyTin","X-Google-Smtp-Source":"ADKCNb5PRrTPJUATFTSoDJ4I9bSfGgAplEPsT1laMbl5oN26xVI6Rh1OitVmNn0bZTvNzF/yK8tMFg==","X-Received":"by 10.28.69.15 with SMTP id s15mr815581wma.118.1504555982882;\n\tMon, 04 Sep 2017 13:13:02 -0700 (PDT)","From":"Pantelis Antoniou <pantelis.antoniou@konsulko.com>","To":"Tom Rini <trini@konsulko.com>","Date":"Mon,  4 Sep 2017 23:12:15 +0300","Message-Id":"<1504555943-12893-7-git-send-email-pantelis.antoniou@konsulko.com>","X-Mailer":"git-send-email 2.1.4","In-Reply-To":"<1504555943-12893-1-git-send-email-pantelis.antoniou@konsulko.com>","References":"<1504555943-12893-1-git-send-email-pantelis.antoniou@konsulko.com>","Cc":"Marek Vasut <marex@denx.de>,\n\tPantelis Antoniou <pantelis.antoniou@konsulko.com>,\n\tTero Kristo <t-kristo@ti.com>, u-boot@lists.denx.de,\n\tMaxime Ripard <maxime.ripard@free-electrons.com>,\n\tStefan Roese <sr@denx.de>, Alan Ott <alan@signal11.us>","Subject":"[U-Boot] [PATCH v3 06/14] fit: Do not throw away extra\n\tconfiguration on fit_image_load()","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>,\n\t<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>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","MIME-Version":"1.0","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>"},"content":"fit_image_load() threw away the extra configuration parts when\nloading. We need them around for applying extra overlays for\nbuilding the boot fdt.\n\nSigned-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>\n---\n common/image-fit.c | 11 +++++++----\n 1 file changed, 7 insertions(+), 4 deletions(-)","diff":"diff --git a/common/image-fit.c b/common/image-fit.c\nindex 74e5557..e75cb64 100644\n--- a/common/image-fit.c\n+++ b/common/image-fit.c\n@@ -1653,6 +1653,7 @@ int fit_image_load(bootm_headers_t *images, ulong addr,\n \tint cfg_noffset, noffset;\n \tconst char *fit_uname;\n \tconst char *fit_uname_config;\n+\tconst char *fit_base_uname_config;\n \tconst void *fit;\n \tconst void *buf;\n \tsize_t size;\n@@ -1668,6 +1669,7 @@ int fit_image_load(bootm_headers_t *images, ulong addr,\n \tfit = map_sysmem(addr, 0);\n \tfit_uname = fit_unamep ? *fit_unamep : NULL;\n \tfit_uname_config = fit_uname_configp ? *fit_uname_configp : NULL;\n+\tfit_base_uname_config = NULL;\n \tprop_name = fit_get_image_type_property(image_type);\n \tprintf(\"## Loading %s from FIT Image at %08lx ...\\n\", prop_name, addr);\n \n@@ -1701,11 +1703,11 @@ int fit_image_load(bootm_headers_t *images, ulong addr,\n \t\t\t\t\tBOOTSTAGE_SUB_NO_UNIT_NAME);\n \t\t\treturn -ENOENT;\n \t\t}\n-\t\tfit_uname_config = fdt_get_name(fit, cfg_noffset, NULL);\n-\t\tprintf(\"   Using '%s' configuration\\n\", fit_uname_config);\n+\t\tfit_base_uname_config = fdt_get_name(fit, cfg_noffset, NULL);\n+\t\tprintf(\"   Using '%s' configuration\\n\", fit_base_uname_config);\n \t\tif (image_type == IH_TYPE_KERNEL) {\n \t\t\t/* Remember (and possibly verify) this config */\n-\t\t\timages->fit_uname_cfg = fit_uname_config;\n+\t\t\timages->fit_uname_cfg = fit_base_uname_config;\n \t\t\tif (IMAGE_ENABLE_VERIFY && images->verify) {\n \t\t\t\tputs(\"   Verifying Hash Integrity ... \");\n \t\t\t\tif (fit_config_verify(fit, cfg_noffset)) {\n@@ -1861,7 +1863,8 @@ int fit_image_load(bootm_headers_t *images, ulong addr,\n \tif (fit_unamep)\n \t\t*fit_unamep = (char *)fit_uname;\n \tif (fit_uname_configp)\n-\t\t*fit_uname_configp = (char *)fit_uname_config;\n+\t\t*fit_uname_configp = (char *)(fit_uname_config ? :\n+\t\t\t\t\t      fit_base_uname_config);\n \n \treturn noffset;\n }\n","prefixes":["U-Boot","v3","06/14"]}