Skip to contentSkip to conversation

How to pass information from the bootloader to the kernel ?

DISCUSSION Laurent Pinchart 3 participants 3 messages Apr 10, 2008

lore
Share & tools
lore
#0 lore raw

Hi everybody,

I need to pass a limited amount of information from the boot loader to the Linux kernel, such as the boot mode chosen by the user or the last boot reason (power up, reset, watchdog, ...).

What is the best way to pass that kind of information from the boot loader to the kernel ? Should I use the device tree ?

I thought about populating the chosen node with the data I need. This could make sense for the boot mode, but I feel like I would abuse the chosen node if I used it to pass other "non user chosen" information.

Best regards,

Signature · 9 lines
Laurent Pinchart
CSE Semaphore Belgium

Chaussee de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75
#1 lore raw
Quoted 6 lines · Laurent Pinchart

Hi everybody,

I need to pass a limited amount of information from the boot loader to the Linux kernel, such as the boot mode chosen by the user or the last boot reason (power up, reset, watchdog, ...).

Quoted 6 lines

What is the best way to pass that kind of information from the boot loader to the kernel ? Should I use the device tree ?

I thought about populating the chosen node with the data I need. This could make sense for the boot mode, but I feel like I would abuse the chosen node if I used it to pass other "non user chosen" information.

Using the chosen node should be fine. Just prefix your new properties with your company name or something so that you don't get namespace collisions. However, whatever you do; document it first and post your documentation to the mailing list for review.

Cheers,
g.

Quoted 19 lines

Best regards,

--
Laurent Pinchart
CSE Semaphore Belgium

Chaussee de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#2 lore raw
In reply to Laurent Pinchart
Quoted 6 lines · Laurent Pinchart

Hi everybody,

I need to pass a limited amount of information from the boot loader to the Linux kernel, such as the boot mode chosen by the user or the last boot reason (power up, reset, watchdog, ...).

Quoted 6 lines

What is the best way to pass that kind of information from the boot loader to the kernel ? Should I use the device tree ?

I thought about populating the chosen node with the data I need. This could make sense for the boot mode, but I feel like I would abuse the chosen node if I used it to pass other "non user chosen" information.

using chosen is fine, just remember to prefix properties with some vendor prefix.

- k