aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src/imagetag.ggo
diff options
context:
space:
mode:
authorDaniel Dickinson <crazycshore@gmail.com>2010-11-16 06:46:53 +0000
committerDaniel Dickinson <crazycshore@gmail.com>2010-11-16 06:46:53 +0000
commiteadb5c84fa7b7b4b90320e554634ddd59e445bd8 (patch)
tree73ac22eb6ad4099837035196c44e7777cf72397d /tools/firmware-utils/src/imagetag.ggo
parente8d482ab00b435a262b956e7bc33597376364066 (diff)
downloadupstream-eadb5c84fa7b7b4b90320e554634ddd59e445bd8.tar.gz
upstream-eadb5c84fa7b7b4b90320e554634ddd59e445bd8.tar.bz2
upstream-eadb5c84fa7b7b4b90320e554634ddd59e445bd8.zip
imagetag: Significantly updated brcm63xx imagetag writing tool. * Rewrote commandline parsing code using gengetopt - We now get long options - We have more options including use of the info section for board information (e.g. to add the same boardid but different GPIOs on different routers) * Added back the ability to write stock images (this is useful, for example, when copying the firmware from the in-memory flash, and then being able to create an image that will let you revert to/test stock firmware * Fixed copying of CRCs to use memcpy instead of strncpy (strncpy stops at 0) * Added ability to use all sections of the imagetag, including custom magic signatures (e.g. for the Telsey router I'm adding soon), info sections, and reserved sections * Added putting the router type (as defined in the image generating Makefile) into the info1 section and the filesystem type in the info2 section. This will be used by mtd (when I add the code) to return the name of image used to flash this router. (As requested by Jo, as well as being useful for same boardid different board scenario described above).
SVN-Revision: 24011
Diffstat (limited to 'tools/firmware-utils/src/imagetag.ggo')
-rw-r--r--tools/firmware-utils/src/imagetag.ggo45
1 files changed, 45 insertions, 0 deletions
diff --git a/tools/firmware-utils/src/imagetag.ggo b/tools/firmware-utils/src/imagetag.ggo
new file mode 100644
index 0000000000..4b9d5d361e
--- /dev/null
+++ b/tools/firmware-utils/src/imagetag.ggo
@@ -0,0 +1,45 @@
+# Command line option parsing generator file for imagetag
+# Supplied-To: gengetopt
+#
+# Copyright 2010 Daniel Dickinson <openwrt@cshore.neomailbox.net>
+#
+# This file is subject to the terms and conditions of the GNU General Public
+# License. See the file "COPYING" in the main directory of this archive
+# for more details.
+#
+
+package "imagetag"
+version "2.0.0"
+purpose "Generate image with CFE imagetag for Broadcom 63xx routers."
+description "Copyright (C) 2008 Axel Gembe
+Copyright (C) 2009-2010 Daniel Dickinson
+Licensed unter the terms of the Gnu General Public License.
+
+Given a root filesystem, a linux kernel, and an optional CFE, generates an image with an imagetag for a Broadcom 63xx-based router. Additional parameters to be specified depend on the specfic brand and model of router."
+args "--file-name=imagetag_cmdline"
+
+option "kernel" i "File with LZMA compressed kernel to include in the image." string typestr="filename" required
+option "rootfs" f "File with RootFS to include in the image." string typestr="filename" required
+option "output" o "Name of output file." string typestr="filename" required
+option "cfe" - "File with CFE to include in the image." string typestr="filename" optional
+option "boardid" b "Board ID to set in the image (must match what router expects, e.g. \"96345GW2\")." string required
+option "chipid" c "Chip ID to set in the image (must match the actual hardware, e.g. \"6345\")." string required
+option "flash-start" s "Flash start address." string typestr="address" optional default="0xBFC00000"
+option "image-offset" n "Offset from start address for the first byte after the CFE (in memory)." string typestr="offset" default="0x10000" optional
+option "tag-version" v "Version number for imagetag format." string default="6" optional
+option "signature" a "Magic string (signature), for boards that need it." string default="Broadcom Corporatio" optional
+option "signature2" m "Second magic string (signature2)." string default="ver. 2.0" optional
+option "block-size" k "Flash erase block size." string optional default="0x10000"
+option "load-addr" l "Kernel load address." string typestr="address" required
+option "entry" e "Address where the kernel entry point will be for booting." string typestr="address" required
+option "layoutver" y "Flash layout version (version 2.2x of the Broadcom code requires this)." string optional
+option "info1" 1 "String for first vendor information section." string optional
+option "altinfo" - "String for vendor information section (alternate/pirelli)." string optional
+option "info2" 2 "String for second vendor information section." string optional
+option "root-first" - "Put the rootfs before the kernel (only for stock images, e.g. captured from the router's flash memory)." flag off
+option "rsa-signature" r "String for RSA Signature section." string optional
+option "second-image-flag" - "Dual Image Flag (2=not-specified)." values="0", "1", "2" default="2" typestr="flag-value" optional
+option "inactive" - "Inactive Flag (2=not-specified)." values="0", "1", "2" default="2" typestr="flag-value" optional
+option "reserved1" - "String for first reserved section." string optional
+option "reserved2" - "String for second reserved section." string optional
+option "kernel-file-has-header" - "Indicates that the kernel file includes the kernel header with correct load address and entry point, so no changes are needed" flag off