diff --git a/src/barebox-state/state.c b/src/barebox-state/state.c index 9c4edb3..fda51db 100644 --- a/src/barebox-state/state.c +++ b/src/barebox-state/state.c @@ -416,6 +416,15 @@ if (node) { /* replace existing node - it will be deleted later */ parent = node->parent; + + /* + * barebox replaces the state node in the device tree it starts the + * kernel with, so a state node that already exists in the device tree + * will be overwritten. Warn about this so people do not wonder why + * changes in the kernels state node do not have any effect. + */ + if (root != of_get_root_node()) + dev_warn(&state->dev, "Warning: Kernel devicetree contains state node, replacing it\n"); } else { char *of_path, *c;