Skip to contentSkip to conversation

dtc: Accept NOPs in dtb input regardless of version

PATCH Applied David Gibson 2 participants 2 messages Jun 26, 2007

lore
Share & tools
lore
#0 lore raw

Since Milton's patch, dtc will accept (and, correctly, ignore) NOP tags when given dtb input v16 or later. However, although NOPs weren't defined in earlier versions, they're not ambiguous, so should be accepted there as well. This patch does so, printing a mere warning when finding NOPs in a too-early dtb version.

flattree.c +4 -2
Index: dtc/flattree.c
===================================================================
@@ -776,10 +776,12 @@
 			break;
 
 		case OF_DT_NOP:
-			if (flags & FTF_NOPS)
+			if (!(flags & FTF_NOPS))
+				fprintf(stderr, "Warning: NOP tag found in flat tree"
+					" version <16\n");
 				break;
 
-			die("OF_DT_NOP in device tree blob\n");
+			/* Ignore */
 			break;
 
 		default:
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
Applied
#1 lore raw

So, like, the other day David Gibson mumbled:

Quoted 7 lines

Since Milton's patch, dtc will accept (and, correctly, ignore) NOP tags when given dtb input v16 or later. However, although NOPs weren't defined in earlier versions, they're not ambiguous, so should be accepted there as well. This patch does so, printing a mere warning when finding NOPs in a too-early dtb version.

Applied.

Thanks,
jdl