Access u-boot variable from userspace

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Access u-boot variable from userspace

900 Views
just_piash
Contributor I

Hello,

I was trying to get a u-boot variable from logo.c(/drivers/video/logo/logo.c). Please let me know how can I access the variable from logo.c file. I want to get the value of console. If I use "fw_printenv console" command, the output is console=ttys0. I want to get the output ("fw_printenv console") value of the u-boot variable from logo.c.

Thanks!

u-boot env‌ yocto-project

Best regards

Ali

0 Kudos
2 Replies

667 Views
just_piash
Contributor I

Thanks for your suggestion. Could you please let me know which log or how can I see the output if I use"printk(fw_printenv console | cut -d= -f2)" in logo.c(/drivers/video/logo/logo.c). I was trying to see the output.I have logged in to the device while turning on, but it only shows the kernel messages.

0 Kudos

667 Views
b36401
NXP Employee
NXP Employee

You can use something like this:
# fw_printenv console | cut -d= -f2
to get the part of the output after "=".

0 Kudos