summaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src/imagetag.c
Commit message (Collapse)AuthorAgeFilesLines
* brcm63xx: work around boot failures with squashfs on BCM6368Jonas Gorski2015-11-041-0/+2
| | | | | | | | | | | Due to the LWL/LWR SMP issue on BCM6368, booting with squash might fail if the rootfs is not word aligned. As a quick fix, work around it by ensuring this condition is always true. Reported-by: Álvaro Fernández Rojas <noltari@gmail.com> Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 47380
* tools: firmware-utils: fix compiler warningsHauke Mehrtens2015-10-111-2/+3
| | | | | | | | This just fixes a lot of compiler warnings. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 47181
* brcm63xx: do not align squashfs rootfs startJonas Gorski2015-02-271-6/+13
| | | | | | | | | | | | | We do not need to align the start of read only rootfs's to erase blocks. This allows us to write the squashfs rootfs directly behind the kernel, potentially freeing up one erase block. We still need to align for jffs2, so add a flag for imagetag to optionally align the rootfs start. Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 44556
* firmware-utils: imagetag: use cyg_crc32 instead of duplicating codeJonas Gorski2015-02-271-46/+4
| | | | | | Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 44554
* tools: imagetag: add parameter for padding imagesJonas Gorski2012-05-271-1/+23
| | | | | | | Allow images to be padded to a certain size. This prevents CFE from flashing them to the second image offset. SVN-Revision: 31875
* bcm63xx: Move the OpenWrt rootfs length fieldDaniel Dickinson2011-04-151-4/+0
| | | | | | | | | | | | | | | | 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> SVN-Revision: 26680
* Added OpenWRT-specific field to imagetag so that we can record the real root ↵Daniel Dickinson2010-12-261-2/+3
| | | | | | | | 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> SVN-Revision: 24838
* imagetag: Significantly updated brcm63xx imagetag writing tool. * Rewrote ↵Daniel Dickinson2010-11-161-217/+300
| | | | | | 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
* brcm63xx: imagetag: Fixed occaisonal wrong CRC in image due to using strncpy ↵Daniel Dickinson2010-11-151-2/+2
| | | | | | to copy the CRC into the imagetag. strncpy stops copying after a 00 byte, memcpy doesn't. SVN-Revision: 24000
* remove whitespaces in imagetag toolFlorian Fainelli2010-06-201-7/+7
| | | | SVN-Revision: 21848
* flashmap and image generation: reduced union bcm_tag to a single struct ↵Florian Fainelli2010-04-011-246/+80
| | | | | | 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. SVN-Revision: 20652
* add support for the Pirelli AG226G board (#5337)Florian Fainelli2009-08-091-0/+4
| | | | SVN-Revision: 17190
* add imagetag support for BT Voyager 2500V, patch from Daniel Dickinson (#5364)Florian Fainelli2009-06-181-3/+4
| | | | SVN-Revision: 16506
* The attached patch adds building of firmware images for more routers based ↵Florian Fainelli2009-06-101-28/+34
| | | | | | | | on the brcm63xx chipset. Signed-Off By: Daniel Dickinson <crazycshore@gmail.com> SVN-Revision: 16396
* rework imagetag firmware generator and MTD partition parser to accomodate ↵Florian Fainelli2009-06-091-94/+257
| | | | | | with all known imagetag versions from Broadcom and vendors, patch from Daniel Dickinson (fixes #4987). SVN-Revision: 16393
* fix crc calculation with the new padding (#5143)Florian Fainelli2009-05-221-1/+1
| | | | SVN-Revision: 15977
* fix padding between end of the kernel and beginning of the rootfs in ↵Florian Fainelli2009-05-121-2/+3
| | | | | | imagetag (#5108) SVN-Revision: 15801
* make images that can be flashed using the stock firmware web interface, ↵Florian Fainelli2009-04-191-32/+100
| | | | | | thanks to Anselmo Luginbuhl and Daniel Dickinson (#4909, #4943) SVN-Revision: 15253
* revert changeset 15081 seems to break Alice box devicesFlorian Fainelli2009-04-071-1/+1
| | | | SVN-Revision: 15140
* compute rootfs crc32 required for brcm63xx web upgradesFlorian Fainelli2009-04-021-4/+1
| | | | SVN-Revision: 15081
* cleanup imagetagFlorian Fainelli2009-03-181-2/+2
| | | | SVN-Revision: 14941
* fix a bug which prevented imagetag from correctly initializing the version ↵Florian Fainelli2009-03-171-3/+3
| | | | | | and magic2, use the broadcom default magics, which allows uploading through web interfaces SVN-Revision: 14925
* add support for AGPF-S0 (Pirelli Alice Gate VoIP 2 Plus Wi-Fi) #4366Florian Fainelli2009-03-121-12/+46
| | | | SVN-Revision: 14850
* allow flash start address and firmware offset to be set on the command line ↵Florian Fainelli2009-03-101-11/+24
| | | | | | (#4666) SVN-Revision: 14832
* Fix small typo #4148Florian Fainelli2008-11-081-1/+1
| | | | SVN-Revision: 13142
* bcm963xx: add cfe image tagging utilityFelix Fietkau2008-05-181-0/+301
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> SVN-Revision: 11170