Modifying device-tree: /chosen

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I haven't found a (good) way to modify the kernel device tree before booting
when using the bootchooser in combination with blspec.  What seems to be done
quite often is registering fixup functions (of_register_fixup) in board-specific
code.

I'd prefer not patch board-specific code, because my use case is rather specific
(passing the device serial number, the bootloader version, and a few other
things to the kernel). So the question is, if this use case is common enough to
provide a more generic way.

My proposal is providing a command like this:

of_fixup_chosen [PROPERTY] [VALUE]

I guess it would suffice to only store strings in /chosen.

Example:
of_fixup_chosen bootloader-version $global.version 
of_fixup_chosen reset-reason $global.system.reset
of_fixup_chosen serial $serial_number


I'm open for other suggestions, as this could also be implementend in a more
generic (and also more complex) way by allowing to fix up random nodes and
properties throughout the device tree.


Best Regards
Florian
_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux