Skip to content
Snippets Groups Projects
  • Luca Ceresoli's avatar
    4f4b5620
    arm64: zynqmp: add tool to convert PMU config object .c to binary · 4f4b5620
    Luca Ceresoli authored
    
    The recently-added ZYNQMP_SPL_PM_CFG_OBJ_FILE option allows SPL to load a
    PMUFW configuration object from a binary blob. However the configuration
    object is produced by Xilinx proprietary tools as a C source file and no
    tool exists to easily convert it to a binary blob in an embedded Linux
    build system for U-Boot to use.
    
    Add a simple Python script to do the conversion.
    
    It is definitely not a complete C language parser, but it is enough to
    parse the known patterns generated by Xilinx tools, including:
    
     - defines
     - literal integers, optionally with a 'U' suffix
     - bitwise OR between them
    
    Signed-off-by: default avatarLuca Ceresoli <luca@lucaceresoli.net>
    Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
    4f4b5620
    History
    arm64: zynqmp: add tool to convert PMU config object .c to binary
    Luca Ceresoli authored
    
    The recently-added ZYNQMP_SPL_PM_CFG_OBJ_FILE option allows SPL to load a
    PMUFW configuration object from a binary blob. However the configuration
    object is produced by Xilinx proprietary tools as a C source file and no
    tool exists to easily convert it to a binary blob in an embedded Linux
    build system for U-Boot to use.
    
    Add a simple Python script to do the conversion.
    
    It is definitely not a complete C language parser, but it is enough to
    parse the known patterns generated by Xilinx tools, including:
    
     - defines
     - literal integers, optionally with a 'U' suffix
     - bitwise OR between them
    
    Signed-off-by: default avatarLuca Ceresoli <luca@lucaceresoli.net>
    Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>