summaryrefslogtreecommitdiff
path: root/tools/firmware-utils/src/imagetag.c
AgeCommit message (Collapse)Author
2011-04-15bcm63xx: Move the OpenWrt rootfs length fieldcshore
Dual image capable CFEs store an image sequence at the same place as currently OpenWrt stores the actual rootfs length, so it will get overwritten when flashing through such a CFE. To prevent this from happening, move the rootfs length field to the next four bytes, thus completely using the reserved1 field. Since the reserved1 field is now completely in use, it does not make sense to allow it to be set from the imagetag utility, so remove the option. Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26680 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-12-26Added OpenWRT-specific field to imagetag so that we can record the real root ↵cshore
length, so that when the CRC fixup is applied and the root length is recorded as zero we can still calculate the rootfs mtd partition size. Signed-off-by: Daniel Dickinson <daniel@cshore.neomailbox.net> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24838 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-11-16[tools/firmware-utils] imagetag: Significantly updated brcm63xx imagetag ↵cshore
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). git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24011 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-11-15[tools] brcm63xx: imagetag: Fixed occaisonal wrong CRC in image due to using ↵cshore
strncpy to copy the CRC into the imagetag. strncpy stops copying after a 00 byte, memcpy doesn't. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24000 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-20[tools] remove whitespaces in imagetag toolflorian
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21848 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-04-01[brcm63xx] flashmap and image generation: reduced union bcm_tag to a single ↵florian
struct combining the elements so that it is no longer necessary to create an openwrt-only tagid and tagcrc, and elimate the tagid detection and switch statements which made dealing with imagetags overly complicated, especially since the logic would need analogs in all code that touched the imagetag. Patch from cshore. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20652 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-08-09[brcm63xx] add support for the Pirelli AG226G board (#5337)florian
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17190 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-06-18[brcm63xx] add imagetag support for BT Voyager 2500V, patch from Daniel ↵florian
Dickinson (#5364) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16506 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-06-10The attached patch adds building of firmwareflorian
images for more routers based on the brcm63xx chipset. Signed-Off By: Daniel Dickinson <crazycshore@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16396 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-06-09[brcm63xx] rework imagetag firmware generator and MTD partition parser to ↵florian
accomodate with all known imagetag versions from Broadcom and vendors, patch from Daniel Dickinson (fixes #4987). git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16393 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-05-22[tools] fix crc calculation with the new padding (#5143)florian
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15977 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-05-12[tools] fix padding between end of the kernel and beginning of the rootfs in ↵florian
imagetag (#5108) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15801 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-04-19[brcm63xx] make images that can be flashed using the stock firmware web ↵florian
interface, thanks to Anselmo Luginbuhl and Daniel Dickinson (#4909, #4943) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15253 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-04-07[tools] revert changeset 15081 seems to break Alice box devicesflorian
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15140 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-04-02[tools] compute rootfs crc32 required for brcm63xx web upgradesflorian
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15081 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-03-18[tools] cleanup imagetagflorian
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14941 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-03-17[tools] fix a bug which prevented imagetag from correctly initializing the ↵florian
version and magic2, use the broadcom default magics, which allows uploading through web interfaces git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14925 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-03-12[brcm63xx] add support for AGPF-S0 (Pirelli Alice Gate VoIP 2 Plus Wi-Fi) #4366florian
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14850 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-03-10[tools] allow flash start address and firmware offset to be set on the ↵florian
command line (#4666) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14832 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-11-08Fix small typo #4148florian
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13142 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-05-18bcm963xx: add cfe image tagging utilitynbd
This replaces the proprietary bcmImageBuilder program from the Broadcom source drops. It basically adds a 256 bytes header in front of the kernel + rootfs which contains a few text signatures, the locations of the data as well as the checksums of the data and the tag. It also adds a 12 bytes header in front of the LZMA kernel which contains the load address, kernel entry and the size of the compressed LZMA data. Signed-off-by: Axel Gembe <ago@bastart.eu.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11170 3c298f89-4303-0410-b956-a3cf2f4a3e73