Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/818800/?format=api
{ "id": 818800, "url": "http://patchwork.ozlabs.org/api/patches/818800/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20170926192142.42308-9-sjg@chromium.org/", "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": "<20170926192142.42308-9-sjg@chromium.org>", "list_archive_url": null, "date": "2017-09-26T19:21:36", "name": "[U-Boot,v2,08/14] log: Add a console driver", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "83aa8ca272e69eb0110d11cae04f6fdba6cc9858", "submitter": { "id": 6170, "url": "http://patchwork.ozlabs.org/api/people/6170/?format=api", "name": "Simon Glass", "email": "sjg@chromium.org" }, "delegate": { "id": 3184, "url": "http://patchwork.ozlabs.org/api/users/3184/?format=api", "username": "sjg", "first_name": "Simon", "last_name": "Glass", "email": "sjg@chromium.org" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20170926192142.42308-9-sjg@chromium.org/mbox/", "series": [ { "id": 5217, "url": "http://patchwork.ozlabs.org/api/series/5217/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=5217", "date": "2017-09-26T19:21:28", "name": "log: Add a new logging feature", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/5217/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/818800/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/818800/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>)", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"E9oNQKxY\"; dkim-atps=neutral" ], "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3y1rdq4Pmmz9t4X\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 27 Sep 2017 05:30:38 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid 41AC3C21F3C; Tue, 26 Sep 2017 19:26:05 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id C6AA6C21F7F;\n\tTue, 26 Sep 2017 19:23:27 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid B7A61C21E24; Tue, 26 Sep 2017 19:22:25 +0000 (UTC)", "from mail-oi0-f54.google.com (mail-oi0-f54.google.com\n\t[209.85.218.54])\n\tby lists.denx.de (Postfix) with ESMTPS id 822B9C21F41\n\tfor <u-boot@lists.denx.de>; Tue, 26 Sep 2017 19:22:21 +0000 (UTC)", "by mail-oi0-f54.google.com with SMTP id b1so13498560oih.4\n\tfor <u-boot@lists.denx.de>; Tue, 26 Sep 2017 12:22:21 -0700 (PDT)", "from kiwi.bld.corp.google.com ([2620:0:10f2:0:c194:3fa6:8abc:2569])\n\tby smtp.gmail.com with ESMTPSA id\n\t89sm1436447otd.32.2017.09.26.12.22.18\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 26 Sep 2017 12:22:19 -0700 (PDT)", "by kiwi.bld.corp.google.com (Postfix, from userid 121222)\n\tid EB960140573; Tue, 26 Sep 2017 13:22:17 -0600 (MDT)" ], "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=google.com;\n\ts=20161025; \n\th=sender:from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=iW6zFm5EsqF9cxwiDGmBNUc2Eoh2n2q7OxlRz7g1IYA=;\n\tb=E9oNQKxYAJMrQ9EdffvM8zRKAjvK5xwLVHm0nYGAnK2jU/iwtaV5MOF5KBnOXnDpwT\n\tWcFBg1J8030aYHEs14BNYtKalYc5SDhcGipz5A8nEvHkpSvf9OO76ESU4k/5H1H1/4/y\n\tmBjfEjm9zwQQVLkbu/buTqleCdNSW41qWC5Gmni6jTfdZlywBMojGp+htcJwYZzzedD/\n\t40dSx0X2qz3to+2X5xdkUgYvBo+E+Nh0JGeGj+Ozwu5VG83tBmxH2yBPwoCP3BL7S+kW\n\ta6CPY/V+8+by9q8Y8NbGCXU55//SW4evsg2B+dHsgIetj9hnCHSuwhauyUPeXcgOwfyp\n\tBMWA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id\n\t:in-reply-to:references;\n\tbh=iW6zFm5EsqF9cxwiDGmBNUc2Eoh2n2q7OxlRz7g1IYA=;\n\tb=gpcsA5FtGbWn7F2YUO4I5MVopGSMSw8DucGrKJ8DdJgjZ5Bxi8xwFbuhhBvq+KH+IY\n\tk8OKm6GaEOHraq6pkbjWfIEAPGG3qiDxUHp3N2e9W5t3Ch7qr2xPE19QNI+O0JjdV138\n\tocbUgZOlkXWN3nZ5H4EehJoqc8Pkg3hEkrdr5enKl/5MCQt+HeOrwJzvqavsvsRRMxaX\n\tAFSFNsOBD+0+GGVi6DY/GdEVEwb6gy9Hg6p1+ja/7f+WG41GiJhLMb8uZla63RQLAOCX\n\tCk6ziz/1i+zx9SyNg8hh4lbOeJLkV0M9qVxTTn4KhYhfC6tTGqnSpFOvTeGrXz+V+FSa\n\theqw==", "X-Gm-Message-State": "AHPjjUhAvp7XeAI7LklWFKjrU0gE957ZS68mzqpCcqFQIg7T+b6hnX6S\n\tqwQsR19McDvDzvJU5i6rOeS5Fg==", "X-Google-Smtp-Source": "AOwi7QDQbOws0JoW6ql4ER3FNQP3O/TcOXDM18f6xYsBUG6kQIc/78E/WlzqZ3R0kxqwLoB5+DA4aw==", "X-Received": "by 10.202.5.129 with SMTP id 123mr1097470oif.408.1506453740023; \n\tTue, 26 Sep 2017 12:22:20 -0700 (PDT)", "From": "Simon Glass <sjg@chromium.org>", "To": "U-Boot Mailing List <u-boot@lists.denx.de>", "Date": "Tue, 26 Sep 2017 13:21:36 -0600", "Message-Id": "<20170926192142.42308-9-sjg@chromium.org>", "X-Mailer": "git-send-email 2.14.1.992.g2c7b836f3a-goog", "In-Reply-To": "<20170926192142.42308-1-sjg@chromium.org>", "References": "<20170926192142.42308-1-sjg@chromium.org>", "Cc": "Tom Rini <trini@konsulko.com>", "Subject": "[U-Boot] [PATCH v2 08/14] log: Add a console driver", "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": "It is useful to display log messages on the console. Add a simple driver\nto handle this.\n\nNote that this driver outputs to the console, which may be serial or\nvideo. It does not specifically select serial output.\n\nSigned-off-by: Simon Glass <sjg@chromium.org>\nReviewed-by: Bin Meng <bmeng.cn@gmail.com>\n---\n\nChanges in v2:\n- Update commit message to explain that this is not just for serial output\n\n common/Kconfig | 20 ++++++++++++++++++++\n common/Makefile | 1 +\n common/log_console.c | 23 +++++++++++++++++++++++\n 3 files changed, 44 insertions(+)\n create mode 100644 common/log_console.c", "diff": "diff --git a/common/Kconfig b/common/Kconfig\nindex ca4a0f7f9b..7fed04a5fb 100644\n--- a/common/Kconfig\n+++ b/common/Kconfig\n@@ -436,6 +436,26 @@ config SPL_LOG_MAX_LEVEL\n \t 6 - detail\n \t 7 - debug\n \n+config LOG_CONSOLE\n+\tbool \"Allow log output to the console\"\n+\tdepends on LOG\n+\tdefault y\n+\thelp\n+\t Enables a log driver which writes log records to the console.\n+\t Generally the console is the serial port or LCD display. Only the\n+\t log message is shown - other details like level, category, file and\n+\t line number are omitted.\n+\n+config LOG_SPL_CONSOLE\n+\tbool \"Allow log output to the console in SPL\"\n+\tdepends on LOG_SPL\n+\tdefault y\n+\thelp\n+\t Enables a log driver which writes log records to the console.\n+\t Generally the console is the serial port or LCD display. Only the\n+\t log message is shown - other details like level, category, file and\n+\t line number are omitted.\n+\n endmenu\n \n config DTB_RESELECT\ndiff --git a/common/Makefile b/common/Makefile\nindex 9d52c9623c..6405a4c299 100644\n--- a/common/Makefile\n+++ b/common/Makefile\n@@ -129,5 +129,6 @@ obj-$(CONFIG_FSL_DDR_INTERACTIVE) += cli_simple.o cli_readline.o\n obj-$(CONFIG_CMD_DFU) += dfu.o\n obj-y += command.o\n obj-$(CONFIG_$(SPL_)LOG) += log.o\n+obj-$(CONFIG_$(SPL_)LOG_CONSOLE) += log_console.o\n obj-y += s_record.o\n obj-y += xyzModem.o\ndiff --git a/common/log_console.c b/common/log_console.c\nnew file mode 100644\nindex 0000000000..5af73bd8be\n--- /dev/null\n+++ b/common/log_console.c\n@@ -0,0 +1,23 @@\n+/*\n+ * Logging support\n+ *\n+ * Copyright (c) 2017 Google, Inc\n+ * Written by Simon Glass <sjg@chromium.org>\n+ *\n+ * SPDX-License-Identifier:\tGPL-2.0+\n+ */\n+\n+#include <common.h>\n+#include <log.h>\n+\n+static int log_console_emit(struct log_device *ldev, struct log_rec *rec)\n+{\n+\tputs(rec->msg);\n+\n+\treturn 0;\n+}\n+\n+LOG_DRIVER(console) = {\n+\t.name\t= \"console\",\n+\t.emit\t= log_console_emit,\n+};\n", "prefixes": [ "U-Boot", "v2", "08/14" ] }