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