lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 18 Mar 2015 20:41:27 -0700
From:	Frank Rowand <frowand.list@...il.com>
To:	frowand.list@...il.com, Rob Herring <robh+dt@...nel.org>,
	Grant Likely <grant.likely@...aro.org>,
	Russell King <linux@....linux.org.uk>,
	Michal Marek <mmarek@...e.cz>
CC:	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Leif Lindholm <leif.lindholm@...aro.org>,
	Mark Rutland <mark.rutland@....com>,
	Pawel Moll <pawel.moll@....com>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	linux-kbuild@...r.kernel.org,
	Linux Kernel list <linux-kernel@...r.kernel.org>
Subject: [patch 7/7] dt: dtb version: report dtb info

From: Frank Rowand <frank.rowand@...ymobile.com>

Report the /chosen/dtb-info properties on boot.

Signed-off-by: Frank Rowand <frank.rowand@...ymobile.com>
---

The beginning of the context for hunk 2 includes a line from
2fa645cb2703d9b3786d850db815414dfeefa51d, which is in 4.0-rc4.  The
author of that commit has submitted a request to revert the commit:
http://lkml.iu.edu/hypermail/linux/kernel/1503.2/02134.html


 drivers/of/base.c |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

Index: b/drivers/of/base.c
===================================================================
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1880,6 +1880,7 @@ static void of_alias_add(struct alias_pr
 void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
 {
 	struct property *pp;
+	struct device_node *dtb_info = NULL;
 
 	of_aliases = of_find_node_by_path("/aliases");
 	of_chosen = of_find_node_by_path("/chosen");
@@ -1899,6 +1900,47 @@ void of_alias_scan(void * (*dt_alloc)(u6
 		}
 	}
 
+	dtb_info = of_find_node_by_path("/chosen/dtb-info");
+	if (dtb_info == NULL)
+		dtb_info = of_find_node_by_path("/chosen@...tb-info");
+
+	if (dtb_info) {
+		const char *string;
+		int len;
+
+		string = of_get_property(dtb_info, "version", &len);
+		if (string) {
+			pr_notice("DTB version ");
+			for ( ; len > 0;
+				len -= (strlen(string) + 1),
+				string += (strlen(string) + 1)) {
+				pr_cont("%s", string);
+			}
+			pr_cont("\n");
+		}
+
+		string = of_get_property(dtb_info, "version-linux", &len);
+		if (string) {
+			pr_notice("DTB linux version ");
+			for ( ; len > 0;
+				len -= (strlen(string) + 1),
+				string += (strlen(string) + 1)) {
+				pr_cont("%s", string);
+			}
+			pr_cont("\n");
+		}
+
+		string = of_get_property(dtb_info, "dts-path", &len);
+		if (string)
+			pr_notice("DTB source %s\n", string);
+
+		string = of_get_property(dtb_info, "dtb-path", &len);
+		if (string)
+			pr_notice("DTB blob %s\n", string);
+
+		of_node_put(dtb_info);
+	}
+
 	if (!of_aliases)
 		return;
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ