Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/801711/?format=api
{ "id": 801711, "url": "http://patchwork.ozlabs.org/api/patches/801711/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1502820885-10346-5-git-send-email-york.sun@nxp.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "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, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1502820885-10346-5-git-send-email-york.sun@nxp.com>", "list_archive_url": null, "date": "2017-08-15T18:14:44", "name": "[U-Boot,v3,4/5] spl: fit: Support both external and embedded data", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "c9c3adb2bfc49d0a3238a6899751c87353ae14b2", "submitter": { "id": 67822, "url": "http://patchwork.ozlabs.org/api/people/67822/?format=api", "name": "York Sun", "email": "york.sun@nxp.com" }, "delegate": { "id": 2666, "url": "http://patchwork.ozlabs.org/api/users/2666/?format=api", "username": "yorksun", "first_name": "York", "last_name": "Sun", "email": "yorksun@freescale.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1502820885-10346-5-git-send-email-york.sun@nxp.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/801711/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/801711/checks/", "tags": {}, "related": [], "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>)", "spf=fail (sender IP is 192.88.158.2)\n\tsmtp.mailfrom=nxp.com; ti.com; dkim=none (message not signed)\n\theader.d=none;ti.com; dmarc=fail action=none header.from=nxp.com;" ], "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xX10n0ml3z9s7h\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 16 Aug 2017 04:17:28 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid C280CC21DE8; Tue, 15 Aug 2017 18:16:52 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id A7E52C21DA0;\n\tTue, 15 Aug 2017 18:16:49 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid 5D956C21DEB; Tue, 15 Aug 2017 18:15:33 +0000 (UTC)", "from NAM03-BY2-obe.outbound.protection.outlook.com\n\t(mail-by2nam03on0042.outbound.protection.outlook.com [104.47.42.42])\n\tby lists.denx.de (Postfix) with ESMTPS id 2A4B7C21E01\n\tfor <u-boot@lists.denx.de>; Tue, 15 Aug 2017 18:15:28 +0000 (UTC)", "from CY4PR03CA0092.namprd03.prod.outlook.com (10.171.242.161) by\n\tMWHPR03MB3328.namprd03.prod.outlook.com (10.174.249.146) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id\n\t15.1.1341.21; Tue, 15 Aug 2017 18:15:25 +0000", "from BY2FFO11FD022.protection.gbl (2a01:111:f400:7c0c::133) by\n\tCY4PR03CA0092.outlook.office365.com (2603:10b6:910:4d::33) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1341.21\n\tvia Frontend Transport; Tue, 15 Aug 2017 18:15:25 +0000", "from az84smr01.freescale.net (192.88.158.2) by\n\tBY2FFO11FD022.mail.protection.outlook.com (10.1.15.211) with\n\tMicrosoft SMTP Server (version=TLS1_0,\n\tcipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1304.16\n\tvia Frontend Transport; Tue, 15 Aug 2017 18:15:21 +0000", "from oslab-l16.am.freescale.net ([10.214.86.70])\n\tby az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id\n\tv7FIEnNY015332; Tue, 15 Aug 2017 11:15:18 -0700" ], "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=BAD_ENC_HEADER,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,\n\tSPF_HELO_PASS autolearn=unavailable\n\tautolearn_force=no version=3.4.0", "Received-SPF": "Fail (protection.outlook.com: domain of nxp.com does not\n\tdesignate 192.88.158.2 as permitted sender)\n\treceiver=protection.outlook.com; \n\tclient-ip=192.88.158.2; helo=az84smr01.freescale.net;", "From": "York Sun <york.sun@nxp.com>", "To": "U-Boot Mailing List <u-boot@lists.denx.de>", "Date": "Tue, 15 Aug 2017 11:14:44 -0700", "Message-ID": "<1502820885-10346-5-git-send-email-york.sun@nxp.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1502820885-10346-1-git-send-email-york.sun@nxp.com>", "References": "<1502820885-10346-1-git-send-email-york.sun@nxp.com>", "X-EOPAttributedMessage": "0", "X-Matching-Connectors": "131472945246876460;\n\t(91ab9b29-cfa4-454e-5278-08d120cd25b8); ()", "X-Forefront-Antispam-Report": "CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI;\n\tSFV:NSPM;\n\tSFS:(10009020)(6009001)(336005)(39380400002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(36756003)(48376002)(356003)(110136004)(189998001)(104016004)(2906002)(77096006)(76176999)(50986999)(97736004)(8656003)(5003940100001)(47776003)(53936002)(54906002)(5660300001)(50226002)(68736007)(81156014)(81166006)(8936002)(105606002)(626005)(498600001)(4326008)(8676002)(305945005)(2950100002)(50466002)(6666003)(86362001)(6916009)(85426001)(69596002)(106466001)(33646002);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB3328;\n\tH:az84smr01.freescale.net; FPR:; \n\tSPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; ", "X-Microsoft-Exchange-Diagnostics": [ "1; BY2FFO11FD022;\n\t1:zqM5EiQ9+oddCxNBxOUlo5gPS+HKnI028ydYRQPoDIiZzXbrHSo4J1UeIxzjueN+HuBEaXBjMGPNoZQqZKlIh1w9X8VtKhqyf51PHk+LSTHGsM0Au9jaZ8yBUmXwlBVNbii3tEnmAXqqFltKGs2KGEdRvtE3YZbG0EW+tiQEfSlqOMvcPQKzY/znkQS+vzVY/SsWQxGNThdt13XrFK0uaJS0Ntfi+rAuE35cdZxLzMKaWey5Rp2OHrhEyn6nBxD38IMVKJP8EzrPhSwlw3ZfmCExTE/q0GL/U51vXODiT1Jm/r/UbZj+1NaV85RlymIxtpT0yIio8Y3enzVmcc+tGAmo5NCB9hNbR3+FRLoZG98j0UipAMOuduoeiKsidmlkfKxlUy3XNblbbTYkkUtrC3YpbIaSazztjVGqEmzccZwptvSDHyxJN2iOsdY7V/b1E3j8lVwyaMH01jDVy7bR5oNwOGqLcbkOzMj/eHvZi5dk0ooCIBdIkK1rYV60FObxi34tEfhyXg3QEgYjpIm/KJv3y1wZjYNDoINVoxCv/vJjcPV7EISgpruU5WnCAhghtW1yAend5DtCZ6EaxVfAdVPG5hZ61pdYd9983G+4wTB9Po4eyLXwDFkgcD3t6uaf+wjwAEp+tAWDMlDl1RlbnTwxFWambUf66Y8nR9Bi4b2Uhhe+bCO6FD8DLzmGNU8D67/fByA3CLHHtDqndfh5Kd4mpk3JpWlAZvfx2T0VmUOO/443ql0fLuCYwWxGRJ0xCNIlHXozW3iFebngxbCd2xlPZVu+zFy2LLFj05NEEO0iUW7K4wlBRkGVCTymVK94GsVmmjUZydKL+U6TQWe4LGnXlIVfj0B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IjzLGxHuCOygbJ/hjjOr150oFfGCt3oTSpopJ3sSzZIdf5A/+uJeG0A8tNsNo6xM6sQZRfiPdtvD+Mw/MbznEGiFz9e61bzaQGusoUnjidIevFz/PioxbncKw1GbMteJKU17xxsNiFPWg==;\n\t24:l8h5V5NGcmOef1lWM89BxssIQq5qEZp6P4IhmwgPIzIebVnzj4lIiYpzEaq+7u3Txiry1ZYcOJBJYWyk4nOGDM/Oy0baP5fyF4HFPUxniUw=;\n\t7:OVYMCw+A5gOpzaAZrA8qo3sLdxzu9SLdH1iljOEMviTvvTW7afw5t+EMFsg2Sn4BOH64RbmegtF5Elq4aypXfqYK8hgQwJ3caPUymeuKctvrkbab+o4Vf9QcpojDqkTbQzuxroQMwp7f/cnNmPBufjB7pn9k14a2kkmYVrmm2Ut/f7B/z2rtGUCr0p5vR5oGNkf4Sf8wwMI6jwx/XCYoscc7vl0tgF82VHmzoPKi2hU=" ], "MIME-Version": "1.0", "X-MS-PublicTrafficType": "Email", "X-MS-Office365-Filtering-Correlation-Id": "7e340d6d-d449-44ed-b32c-08d4e409997a", "X-Microsoft-Antispam": "UriScan:; BCL:0; PCL:0;\n\tRULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603031)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);\n\tSRVR:MWHPR03MB3328; ", "X-MS-TrafficTypeDiagnostic": "MWHPR03MB3328:", "X-Exchange-Antispam-Report-Test": "UriScan:(185117386973197);", "X-Microsoft-Antispam-PRVS": "<MWHPR03MB3328E61F7F25036FA79532F79A8D0@MWHPR03MB3328.namprd03.prod.outlook.com>", "X-Exchange-Antispam-Report-CFA-Test": "BCL:0; PCL:0;\n\tRULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(8121501046)(5005006)(13016025)(13018025)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6096035)(20161123556025)(20161123563025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123561025)(20161123565025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);\n\tSRVR:MWHPR03MB3328; BCL:0; PCL:0;\n\tRULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);\n\tSRVR:MWHPR03MB3328; ", "X-Forefront-PRVS": "04004D94E2", "SpamDiagnosticOutput": "1:99", "SpamDiagnosticMetadata": "NSPM", "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "15 Aug 2017 18:15:21.4584\n\t(UTC)", "X-MS-Exchange-CrossTenant-Id": "5afe0b00-7697-4969-b663-5eab37d5f47e", "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;\n\tIp=[192.88.158.2]; \n\tHelo=[az84smr01.freescale.net]", "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "MWHPR03MB3328", "Cc": "Andre Przywara <andre.przywara@arm.com>, Lokesh Vutla <lokeshvuta@ti.com>,\n\t\"Cooper Jr. Franklin\" <fcooper@ti.com>", "Subject": "[U-Boot] [PATCH v3 4/5] spl: fit: Support both external and\n\tembedded data", "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>", "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": "SPL supports U-Boot image in FIT format which has data outside of\nFIT structure. This adds support for embedded data for normal FIT\nimages.\n\nSigned-off-by: York Sun <york.sun@nxp.com>\nReviewed-by: Tom Rini <trini@konsulko.com>\n\n---\n\nChanges in v3:\nUpdate doc/uImage.FIT/source_file_format.txt with embedded and external data\n\nChanges in v2:\nRebase on top of \"SPL: FIT: factor out spl_load_fit_image()\" by Andre Przywara\n\n common/spl/spl_fit.c | 52 ++++++++++++++++++++++-------------\n doc/uImage.FIT/source_file_format.txt | 4 +++\n 2 files changed, 37 insertions(+), 19 deletions(-)", "diff": "diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c\nindex fe41ce0..9449a22 100644\n--- a/common/spl/spl_fit.c\n+++ b/common/spl/spl_fit.c\n@@ -132,14 +132,16 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector,\n \t\t\t void *fit, ulong base_offset, int node,\n \t\t\t struct spl_image_info *image_info)\n {\n-\tulong offset;\n+\tint offset;\n \tsize_t length;\n+\tint len;\n \tulong load_addr, load_ptr;\n \tvoid *src;\n \tulong overhead;\n \tint nr_sectors;\n \tint align_len = ARCH_DMA_MINALIGN - 1;\n \tuint8_t image_comp = -1, type = -1;\n+\tconst void *data;\n \n \tif (IS_ENABLED(CONFIG_SPL_OS_BOOT) && IS_ENABLED(CONFIG_SPL_GZIP)) {\n \t\tif (fit_image_get_comp(fit, node, &image_comp))\n@@ -153,28 +155,40 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector,\n \t\t\tdebug(\"%s \", genimg_get_type_name(type));\n \t}\n \n-\toffset = fdt_getprop_u32(fit, node, \"data-offset\");\n-\tif (offset == FDT_ERROR)\n-\t\treturn -ENOENT;\n-\toffset += base_offset;\n-\tlength = fdt_getprop_u32(fit, node, \"data-size\");\n-\tif (length == FDT_ERROR)\n-\t\treturn -ENOENT;\n-\tload_addr = fdt_getprop_u32(fit, node, \"load\");\n-\tif (load_addr == FDT_ERROR && image_info)\n+\tif (fit_image_get_load(fit, node, &load_addr))\n \t\tload_addr = image_info->load_addr;\n-\tload_ptr = (load_addr + align_len) & ~align_len;\n \n-\toverhead = get_aligned_image_overhead(info, offset);\n-\tnr_sectors = get_aligned_image_size(info, length, offset);\n+\tif (!fit_image_get_data_offset(fit, node, &offset)) {\n+\t\t/* External data */\n+\t\toffset += base_offset;\n+\t\tif (fit_image_get_data_size(fit, node, &len))\n+\t\t\treturn -ENOENT;\n \n-\tif (info->read(info, sector + get_aligned_image_offset(info, offset),\n-\t\t nr_sectors, (void*)load_ptr) != nr_sectors)\n-\t\treturn -EIO;\n-\tdebug(\"image dst=%lx, offset=%lx, size=%lx\\n\", load_ptr, offset,\n-\t (unsigned long)length);\n+\t\tload_ptr = (load_addr + align_len) & ~align_len;\n+\t\tlength = len;\n+\n+\t\toverhead = get_aligned_image_overhead(info, offset);\n+\t\tnr_sectors = get_aligned_image_size(info, length, offset);\n+\n+\t\tif (info->read(info,\n+\t\t\t sector + get_aligned_image_offset(info, offset),\n+\t\t\t nr_sectors, (void *)load_ptr) != nr_sectors)\n+\t\t\treturn -EIO;\n+\n+\t\tdebug(\"External data: dst=%lx, offset=%x, size=%lx\\n\",\n+\t\t load_ptr, offset, (unsigned long)length);\n+\t\tsrc = (void *)load_ptr + overhead;\n+\t} else {\n+\t\t/* Embedded data */\n+\t\tif (fit_image_get_data(fit, node, &data, &length)) {\n+\t\t\tputs(\"Cannot get image data/size\\n\");\n+\t\t\treturn -ENOENT;\n+\t\t}\n+\t\tdebug(\"Embedded data: dst=%lx, size=%lx\\n\", load_addr,\n+\t\t (unsigned long)length);\n+\t\tsrc = (void *)data;\n+\t}\n \n-\tsrc = (void *)load_ptr + overhead;\n #ifdef CONFIG_SPL_FIT_IMAGE_POST_PROCESS\n \tboard_fit_image_post_process(&src, &length);\n #endif\ndiff --git a/doc/uImage.FIT/source_file_format.txt b/doc/uImage.FIT/source_file_format.txt\nindex 136d3d7..3ce47ed 100644\n--- a/doc/uImage.FIT/source_file_format.txt\n+++ b/doc/uImage.FIT/source_file_format.txt\n@@ -288,6 +288,10 @@ The 'data-offset' property can be substituted with 'data-position', which\n defines an absolute position or address as the offset. This is helpful when\n booting U-Boot proper before performing relocation.\n \n+Normal kernel FIT image has data embedded within FIT structure. Normal U-Boot\n+image has external data. Existence of 'data-offset' can be used to identify\n+which format is used.\n+\n 9) Examples\n -----------\n \n", "prefixes": [ "U-Boot", "v3", "4/5" ] }