0

during the execution of th MLO I create a variable, whose value I want to make accessible to user space applications in Android. How can this be achieved?

One way would be to write the contents of the variable to external memory and let it read by the user space process. However, I would need to make sure that during boot no other process is overwriting the address.

Do you know of any other ways, ATAGs? If ATAGs can be used, how would one do this? Is it necessary to develop a kernel module?

Cheers

user1192748
  • 945
  • 3
  • 15
  • 26

1 Answers1

0

From linux userspace, you can get info from U-Boot environment variables using "fw_printenv" application. During U-Boot execution you would "setenv variablename value", then saveenv.

Your U-Boot MLO would need CONFIG options set to enable the env commands. MLO usually wants (and needs) small code footprint, env commands will make bigger code footprint, that could be an obstacle.

At the linux side, you would need "fw_printenv" configured for your particular target's memory. That can be done at runtime, see fw_env.config. You can get the target executable built in u-boot/tools/env/. This assumes that android carries over the linux mechanisms in this area; I am not familiar with android platform details.

Joe Kul
  • 2,454
  • 16
  • 16
  • This would be a better answer if you pointed out reasons why the OP's two proposed methods are not viable. – sawdust Feb 03 '15 at 19:14