summaryrefslogtreecommitdiff
path: root/tools/firmware-utils/src/csysimg.h
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2007-04-02 17:10:48 +0000
committerFlorian Fainelli <florian@openwrt.org>2007-04-02 17:10:48 +0000
commit305d012ea65ef9bdb5d36bcaf5aa7d1a76e621bd (patch)
tree6147964c372d2022701806e304152af29fc24101 /tools/firmware-utils/src/csysimg.h
parent3e8d73d762c0e473bcfa49dbdc488b48ba57e06a (diff)
downloadmtk-20170518-305d012ea65ef9bdb5d36bcaf5aa7d1a76e621bd.zip
mtk-20170518-305d012ea65ef9bdb5d36bcaf5aa7d1a76e621bd.tar.gz
mtk-20170518-305d012ea65ef9bdb5d36bcaf5aa7d1a76e621bd.tar.bz2
Add ADM5120 based edimax image generation utilities
SVN-Revision: 6840
Diffstat (limited to 'tools/firmware-utils/src/csysimg.h')
-rw-r--r--tools/firmware-utils/src/csysimg.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/tools/firmware-utils/src/csysimg.h b/tools/firmware-utils/src/csysimg.h
new file mode 100644
index 0000000..c3d5767
--- /dev/null
+++ b/tools/firmware-utils/src/csysimg.h
@@ -0,0 +1,78 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2007 Gabor Juhos <juhosg@freemail.hu>
+ *
+ * This program was based on the code found in various Linux
+ * source tarballs released by Edimax for it's devices.
+ * Original author: David Hsu <davidhsu@realtek.com.tw>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#define SIG_LEN 4
+
+#define ADM_CODE_ADDR 0x80500000
+#define ADM_WEBP_ADDR 0x10000
+#define ADM_WEBP_SIZE 0x10000
+#define ADM_BOOT_SIZE 0x8000
+#define ADM_CONF_SIZE 0x8000
+#define ADM_BOOT_SIG "\x00\x60\x1A\x40"
+
+
+/*
+ * Generic signatures
+ */
+#define SIG_CSYS "CSYS"
+#define SIG_CONF "HS\x00\x00"
+#define SIG_BOOT_RTL "\x00\x00\x40\x21"
+
+/*
+ * Web page signatures
+ */
+#define SIG_BR6104K "WB4K"
+#define SIG_BR6104KP "WBKP"
+#define SIG_BR6104IPC "WBIP"
+#define SIG_BR6114WG SIG_BR6104IPC
+#define SIG_BR6524K "2-K-"
+#define SIG_BR6524KP "2-KP" /* FIXME: valid? */
+#define SIG_BR6524WG "2-WG" /* FIXME: valid? */
+#define SIG_BR6524WP "2-WP" /* FIXME: valid? */
+#define SIG_BR6541K "4--K"
+#define SIG_BR6541KP "4-KP" /* FIXME: valid? */
+#define SIG_BR6541WP "4-WP" /* FIXME: valid? */
+#define SIG_EW7207APg "EWAS"
+#define SIG_PS1205UWg "4000"
+#define SIG_PS3205U "5010"
+#define SIG_PS3205UWg "5011"
+
+#define SIG_H2BR4 SIG_BR6524K
+#define SIG_H2WR54G SIG_BR6524WG
+
+#define SIG_XRT401D SIG_BR6104K
+#define SIG_XRT402D SIG_BR6524K
+
+/*
+ * CSYS image file header
+ */
+struct csys_header {
+ unsigned char sig[SIG_LEN];
+ uint32_t addr;
+ uint32_t size;
+};
+
+
+