Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/104980/?format=api
{ "id": 104980, "url": "http://patchwork.ozlabs.org/api/patches/104980/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1310831460-14450-3-git-send-email-apr@cn-eng.de/", "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": "<1310831460-14450-3-git-send-email-apr@cn-eng.de>", "list_archive_url": null, "date": "2011-07-16T15:51:00", "name": "[U-Boot,v2,2/2] add command fitupd to run an update from a FIT image", "commit_ref": "7130a579fdba5dd1bf99508fb0b1d13317542109", "pull_url": null, "state": "accepted", "archived": false, "hash": "a1e8d30f94973b2245f2dba574cbd3bd5d2b42fb", "submitter": { "id": 6492, "url": "http://patchwork.ozlabs.org/api/people/6492/?format=api", "name": "Andreas Pretzsch", "email": "apr@cn-eng.de" }, "delegate": { "id": 1689, "url": "http://patchwork.ozlabs.org/api/users/1689/?format=api", "username": "wd", "first_name": "Wolfgang", "last_name": "Denk", "email": "wd@denx.de" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1310831460-14450-3-git-send-email-apr@cn-eng.de/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/104980/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/104980/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", "Received": [ "from theia.denx.de (theia.denx.de [85.214.87.163])\n\tby ozlabs.org (Postfix) with ESMTP id 7E511B6F7B\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 17 Jul 2011 01:52:11 +1000 (EST)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 5659728091;\n\tSat, 16 Jul 2011 17:51:59 +0200 (CEST)", "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id vgwtpbNzQ0T3; Sat, 16 Jul 2011 17:51:59 +0200 (CEST)", "from theia.denx.de (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 124FE280A4;\n\tSat, 16 Jul 2011 17:51:55 +0200 (CEST)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 9A6DA28081\n\tfor <u-boot@lists.denx.de>; Sat, 16 Jul 2011 17:51:50 +0200 (CEST)", "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id hMaiKpJTIYxG for <u-boot@lists.denx.de>;\n\tSat, 16 Jul 2011 17:51:48 +0200 (CEST)", "from mail.mars-solutions.de (mars-solutions.de [213.239.212.107])\n\tby theia.denx.de (Postfix) with ESMTP id 21D762809B\n\tfor <u-boot@lists.denx.de>; Sat, 16 Jul 2011 17:51:46 +0200 (CEST)", "from localhost (localhost [127.0.0.1])\n\tby mail.mars-solutions.de (Postfix) with ESMTP id 1B89FA040E7\n\tfor <u-boot@lists.denx.de>; Sat, 16 Jul 2011 17:50:04 +0200 (CEST)", "from mail.mars-solutions.de ([127.0.0.1])\n\tby localhost (mars-solutions.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id qVKhreiUhuAH for <u-boot@lists.denx.de>;\n\tSat, 16 Jul 2011 17:49:57 +0200 (CEST)", "by mail.mars-solutions.de (Postfix, from userid 1036)\n\tid A31B0A04103; Sat, 16 Jul 2011 17:49:57 +0200 (CEST)", "from ws-apr.office.loc\n\t(HSI-KBW-078-043-059-252.hsi4.kabel-badenwuerttemberg.de\n\t[78.43.59.252])\n\tby mail.mars-solutions.de (Postfix) with ESMTP id 398F6A040D0\n\tfor <u-boot@lists.denx.de>; Sat, 16 Jul 2011 17:49:57 +0200 (CEST)", "by ws-apr.office.loc (Postfix, from userid 1000)\n\tid 5804A276052; Sat, 16 Jul 2011 17:51:39 +0200 (CEST)" ], "X-Virus-Scanned": [ "Debian amavisd-new at theia.denx.de", "Debian amavisd-new at theia.denx.de" ], "X-policyd-weight": "NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5\n\tNOT_IN_BL_NJABL=-1.5 (only DNSBL check requested)", "From": "Andreas Pretzsch <apr@cn-eng.de>", "To": "u-boot@lists.denx.de", "Date": "Sat, 16 Jul 2011 17:51:00 +0200", "Message-Id": "<1310831460-14450-3-git-send-email-apr@cn-eng.de>", "X-Mailer": "git-send-email 1.7.5.4", "In-Reply-To": "<1310831460-14450-1-git-send-email-apr@cn-eng.de>", "References": "<1303246918-19921-1-git-send-email-apr@cn-eng.de>\n\t<1310831460-14450-1-git-send-email-apr@cn-eng.de>", "Cc": "Andreas Pretzsch <apr@cn-eng.de>", "Subject": "[U-Boot] [PATCH v2 2/2] add command fitupd to run an update from a\n\tFIT image", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.9", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<http://lists.denx.de/mailman/listinfo/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": "<http://lists.denx.de/mailman/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "u-boot-bounces@lists.denx.de", "Errors-To": "u-boot-bounces@lists.denx.de" }, "content": "Command calls update_tftp() analogous to automatic update described\nin doc/README.update.\n\nUsage:\nfitupd [addr]\n - run update from FIT image at addr\n or from tftp 'updatefile'\n\nSigned-off-by: Andreas Pretzsch <apr@cn-eng.de>\n---\nChanges for v2:\n - void update_tftp() => int update_tftp(): return success/fail\n---\n common/Makefile | 1 +\n common/cmd_fitupd.c | 36 ++++++++++++++++++++++++++++++++++++\n doc/README.update | 5 +++++\n 3 files changed, 42 insertions(+), 0 deletions(-)\n create mode 100644 common/cmd_fitupd.c", "diff": "diff --git a/common/Makefile b/common/Makefile\nindex 224b7cc..e92ee5b 100644\n--- a/common/Makefile\n+++ b/common/Makefile\n@@ -94,6 +94,7 @@ COBJS-$(CONFIG_CMD_FAT) += cmd_fat.o\n COBJS-$(CONFIG_CMD_FDC)$(CONFIG_CMD_FDOS) += cmd_fdc.o\n COBJS-$(CONFIG_OF_LIBFDT) += cmd_fdt.o fdt_support.o\n COBJS-$(CONFIG_CMD_FDOS) += cmd_fdos.o\n+COBJS-$(CONFIG_CMD_FITUPD) += cmd_fitupd.o\n COBJS-$(CONFIG_CMD_FLASH) += cmd_flash.o\n ifdef CONFIG_FPGA\n COBJS-$(CONFIG_CMD_FPGA) += cmd_fpga.o\ndiff --git a/common/cmd_fitupd.c b/common/cmd_fitupd.c\nnew file mode 100644\nindex 0000000..4d1192b\n--- /dev/null\n+++ b/common/cmd_fitupd.c\n@@ -0,0 +1,36 @@\n+/*\n+ * (C) Copyright 2011\n+ * Andreas Pretzsch, carpe noctem engineering, apr@cn-eng.de\n+ *\n+ * This file is released under the terms of GPL v2 and any later version.\n+ * See the file COPYING in the root directory of the source tree for details.\n+ */\n+\n+#include <common.h>\n+#include <command.h>\n+\n+#if !defined(CONFIG_UPDATE_TFTP)\n+#error \"CONFIG_UPDATE_TFTP required\"\n+#endif\n+\n+extern int update_tftp(ulong addr);\n+\n+static int do_fitupd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])\n+{\n+\tulong addr = 0UL;\n+\n+\tif (argc > 2)\n+\t\treturn cmd_usage(cmdtp);\n+\n+\tif (argc == 2)\n+\t\taddr = simple_strtoul(argv[1], NULL, 16);\n+\n+\treturn update_tftp(addr);\n+}\n+\n+U_BOOT_CMD(fitupd, 2, 0, do_fitupd,\n+\t\"update from FIT image\",\n+\t\"[addr]\\n\"\n+\t\"\\t- run update from FIT image at addr\\n\"\n+\t\"\\t or from tftp 'updatefile'\"\n+);\ndiff --git a/doc/README.update b/doc/README.update\nindex 48f03b7..a7f4d9e 100644\n--- a/doc/README.update\n+++ b/doc/README.update\n@@ -51,6 +51,11 @@ the mkimage tool. dtc tool with support for binary includes, e.g. in version\n to be prepared. Refer to the doc/uImage.FIT/ directory for more details on FIT\n images.\n \n+This mechanism can be also triggered by the commmand \"fitupd\".\n+If an optional, non-zero address is provided as argument, the TFTP transfer\n+is skipped and the image at this address is used.\n+The fitupd command is enabled by CONFIG_CMD_FITUPD.\n+\n \n Example .its files\n ------------------\n", "prefixes": [ "U-Boot", "v2", "2/2" ] }