parseConfig.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. //-------------------------------------------------------------------------------
  2. // parse mergeImage Config & program argument
  3. //-------------------------------------------------------------------------------
  4. #ifndef _PARSECONFIG_H_
  5. #define _PARSECONFIG_H_
  6. //-------------------------------------------------------------------------------
  7. #include "mergeImage.h"
  8. //-------------------------------------------------------------------------------
  9. //-------------------------------------------------------------------------------
  10. typedef struct _NorFlashModuleInfo
  11. {
  12. bool isValid; /* fileName is valid ? */
  13. bool isProtected; /* Protect in saveinfo ? */
  14. bool isInitModuleNameByUser; /* #define fileName by cfg ? */
  15. bool isInitProtectedByUser; /* #define protect by cfg ? */
  16. u32 flashAddr1;
  17. u32 flashSize1;
  18. u32 flashAddr2;
  19. u32 flashSize2;
  20. u32 max_module_size;
  21. char moduleName[32]; //"ShellROM"=SHELLROM/SHELL.bin
  22. char fileName[FILENAME_SIZE];
  23. char tmpBinName[FILENAME_SIZE];
  24. #ifdef CONFIG_APPEND_NAME_TO_CIKEY_HDCPKEY
  25. char eachfileName[FILENAME_SIZE];
  26. #endif
  27. }NorFlashModuleInfo;
  28. typedef struct _NorFlashModulePathInfo
  29. {
  30. char moduleName[32];
  31. char pathName[FILENAME_SIZE];
  32. }NorFlashModulePathInfo;
  33. typedef struct _NVMData
  34. {
  35. u32 id;
  36. char pathName[FILENAME_SIZE];
  37. }NVMData;
  38. #define PATHINFO_MAX 2
  39. #define ACTION_MAX 8
  40. extern NorFlashModuleInfo flashModuleInfo[MODULE_MAX];
  41. extern NorFlashModulePathInfo flashModulePathInfo[PATHINFO_MAX];
  42. extern NVMData gNVMData[MODULE_MAX];
  43. extern u32 gNVMData_count;
  44. //-------------------------------------------------------------------------------
  45. bool loadNorFlashModuleInfo();
  46. NorFlashModuleInfo* searchModuleInfo( const char *moduleName );
  47. NorFlashModulePathInfo* searchModulePathInfo( const char *moduleName );
  48. char* fgetLine( char *s, int size, FILE *fpIn );
  49. bool parseProgArg( int argc, char *argv[] );
  50. //-------------------------------------------------------------------------------
  51. #endif
  52. char module_extend1[12];
  53. char module_extend2[12];
  54. char module_extend3[12];
  55. char module_extend4[12];
  56. char module_extend5[12];
  57. char module_extend6[12];
  58. char module_extend7[12];