csysimg.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. *
  3. * Copyright (C) 2007,2009 Gabor Juhos <juhosg@openwrt.org>
  4. *
  5. * This program was based on the code found in various Linux
  6. * source tarballs released by Edimax for it's devices.
  7. * Original author: David Hsu <davidhsu@realtek.com.tw>
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation; either version 2
  12. * of the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the
  21. * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  22. * Boston, MA 02110-1301, USA.
  23. */
  24. #define SIG_LEN 4
  25. #define ADM_CODE_ADDR 0x80500000
  26. #define ADM_WEBP_ADDR 0x10000
  27. #define ADM_WEBP_SIZE 0x10000
  28. #define ADM_BOOT_SIZE 0x8000
  29. #define ADM_CONF_SIZE 0x8000
  30. #define ADM_BOOT_SIG "\x00\x60\x1A\x40"
  31. /*
  32. * Generic signatures
  33. */
  34. #define SIG_CSYS "CSYS"
  35. #define SIG_CONF "HS\x00\x00"
  36. #define SIG_BOOT_RTL "\x00\x00\x40\x21"
  37. /*
  38. * Web page signatures
  39. */
  40. #define SIG_BR6104K "WB4K"
  41. #define SIG_BR6104KP "WBKP"
  42. #define SIG_BR6104Wg "WBGW"
  43. #define SIG_BR6104IPC "WBIP"
  44. #define SIG_BR6114WG SIG_BR6104IPC
  45. #define SIG_BR6524K "2-K-"
  46. #define SIG_BR6524KP "2-KP" /* FIXME: valid? */
  47. #define SIG_BR6524N "WNRA"
  48. #define SIG_BR6524WG "2-WG" /* FIXME: valid? */
  49. #define SIG_BR6524WP "2-WP" /* FIXME: valid? */
  50. #define SIG_BR6541K "4--K"
  51. #define SIG_BR6541KP "4-KP" /* FIXME: valid? */
  52. #define SIG_BR6541WP "4-WP" /* FIXME: valid? */
  53. #define SIG_C54BSR4 SIG_BR6104IPC
  54. #define SIG_EW7207APg "EWAS"
  55. #define SIG_PS1205UWg "4000"
  56. #define SIG_PS3205U "5010"
  57. #define SIG_PS3205UWg "5011"
  58. #define SIG_RALINK "RNRA"
  59. #define SIG_5GXI "5GXI" /* fake signature */
  60. #define SIG_H2BR4 SIG_BR6524K
  61. #define SIG_H2WR54G SIG_BR6524WG
  62. #define SIG_XRT401D SIG_BR6104K
  63. #define SIG_XRT402D SIG_BR6524K
  64. /*
  65. * CSYS image file header
  66. */
  67. struct csys_header {
  68. unsigned char sig[SIG_LEN];
  69. uint32_t addr;
  70. uint32_t size;
  71. };