summaryrefslogtreecommitdiff
path: root/target/linux/brcm63xx
diff options
context:
space:
mode:
authorDaniel Dickinson <crazycshore@gmail.com>2011-04-15 12:18:25 +0000
committerDaniel Dickinson <crazycshore@gmail.com>2011-04-15 12:18:25 +0000
commitf83c5938d2ddc50aec789eed49b70eb642889ef0 (patch)
treec35a4464fed588160db35f3aeb813b1618ebc41c /target/linux/brcm63xx
parentff1bc5c29d59db7246a362c4b93b61b72fe8e4e6 (diff)
downloadmtk-20170518-f83c5938d2ddc50aec789eed49b70eb642889ef0.zip
mtk-20170518-f83c5938d2ddc50aec789eed49b70eb642889ef0.tar.gz
mtk-20170518-f83c5938d2ddc50aec789eed49b70eb642889ef0.tar.bz2
bcm63xx: Move the OpenWrt rootfs length field
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
Diffstat (limited to 'target/linux/brcm63xx')
-rw-r--r--target/linux/brcm63xx/files/arch/mips/include/asm/mach-bcm63xx/bcm_tag.h4
-rw-r--r--target/linux/brcm63xx/patches-2.6.37/041-bcm963xx_real_rootfs_length.patch6
2 files changed, 5 insertions, 5 deletions
diff --git a/target/linux/brcm63xx/files/arch/mips/include/asm/mach-bcm63xx/bcm_tag.h b/target/linux/brcm63xx/files/arch/mips/include/asm/mach-bcm63xx/bcm_tag.h
index 89650d1..2730edc 100644
--- a/target/linux/brcm63xx/files/arch/mips/include/asm/mach-bcm63xx/bcm_tag.h
+++ b/target/linux/brcm63xx/files/arch/mips/include/asm/mach-bcm63xx/bcm_tag.h
@@ -61,8 +61,8 @@ struct bcm_tag {
char imageCRC[CRC_LEN]; // 216-219: CRC32 of image less imagetag (kernel for Alice Gate)
char rootfsCRC[CRC_LEN]; // 220-223: CRC32 of rootfs partition
char kernelCRC[CRC_LEN]; // 224-227: CRC32 of kernel partition
- char rootLength[4]; // 228-231: steal from reserved1 to keep the real root length so we can use in the flash map even after we have change the rootLength to 0 to satisfy devices that check CRC on every boot
- char reserved1[4]; // 232-235: Unused at present
+ char imageSequence[4]; // 228-231: Image sequence number
+ char rootLength[4]; // 232-235: steal from reserved1 to keep the real root length so we can use in the flash map even after we have change the rootLength to 0 to satisfy devices that check CRC on every boot
char headerCRC[CRC_LEN]; // 236-239: CRC32 of header excluding tagVersion
char reserved2[16]; // 240-255: Unused at present
};
diff --git a/target/linux/brcm63xx/patches-2.6.37/041-bcm963xx_real_rootfs_length.patch b/target/linux/brcm63xx/patches-2.6.37/041-bcm963xx_real_rootfs_length.patch
index cde2b92..dccd36f 100644
--- a/target/linux/brcm63xx/patches-2.6.37/041-bcm963xx_real_rootfs_length.patch
+++ b/target/linux/brcm63xx/patches-2.6.37/041-bcm963xx_real_rootfs_length.patch
@@ -6,10 +6,10 @@
char kernel_crc[CRC_LEN];
- /* 228-235: Unused at present */
- char reserved1[8];
-+ /* 228-231: OpenWrt: real rootfs length */
++ /* 228-231: Image sequence number */
++ char image_sequence[4];
++ /* 222-235: Openwrt: real rootfs length */
+ char real_rootfs_length[4];
-+ /* 222-235: Unused at present */
-+ char reserved1[4];
/* 236-239: CRC32 of header excluding tagVersion */
char header_crc[CRC_LEN];
/* 240-255: Unused at present */