Search code examples
u-boot

How to read/write special keys via U-boot prompt?


How to write mac address and other special keys via U-boot prompt? Is there a general purpose command for this?

I know this can not be handled when the system is running as it deals with some security features.


Solution

  • It is somewhat depended on your hardware platform. My board uses keyman and keyunify commands. There can be found in U-boot help. Also the usage of these commands. For example:

    keyman argv:
    init seedNum <dtbAddr>
    read keyname addr <hex/str>
    write keyname size addr
    write keyname hex/str value
    query exist/secure/size keyname
    exit
    

    Another note: You said

    I know this can not be handled when the system is running as it deals with some security features.

    This may not be true. The keys can be accessed via unifykey driver (or something similar for your platform) and thereafter can be read/wrote. Consult you OS provider to find more.