From dae76937031f667c60f77ba377c2d2f88d2943ca Mon Sep 17 00:00:00 2001 From: jogo Date: Fri, 4 Jan 2013 14:47:43 +0000 Subject: bcm63xx: remove 3.3 support 3.6 is tested enough to be considered stable. Signed-off-by: Jonas Gorski git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35009 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...m63xxpart-handle-Broadcom-partition-order.patch | 101 --------------------- 1 file changed, 101 deletions(-) delete mode 100644 target/linux/brcm63xx/patches-3.3/012-mtd-bcm63xxpart-handle-Broadcom-partition-order.patch (limited to 'target/linux/brcm63xx/patches-3.3/012-mtd-bcm63xxpart-handle-Broadcom-partition-order.patch') diff --git a/target/linux/brcm63xx/patches-3.3/012-mtd-bcm63xxpart-handle-Broadcom-partition-order.patch b/target/linux/brcm63xx/patches-3.3/012-mtd-bcm63xxpart-handle-Broadcom-partition-order.patch deleted file mode 100644 index b12aed6b9..000000000 --- a/target/linux/brcm63xx/patches-3.3/012-mtd-bcm63xxpart-handle-Broadcom-partition-order.patch +++ /dev/null @@ -1,101 +0,0 @@ -From a73c2d9dc7ea0d14fbf48db48e783d123162f5c3 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Thu, 19 Apr 2012 13:15:57 +0200 -Subject: [PATCH] mtd: bcm63xxpart: handle Broadcom partition order - -The original Broadcom partition order has the root fs in front of the -kernel, which resulted in miscalculated partition sizes. -Detect when such an image is on the flash and also reorder the partitions -accordingly. - -Signed-off-by: Jonas Gorski -Acked-by: Florian Fainelli -Signed-off-by: Artem Bityutskiy ---- - drivers/mtd/bcm63xxpart.c | 41 ++++++++++++++++++++++++++++++----------- - 1 file changed, 30 insertions(+), 11 deletions(-) - ---- a/drivers/mtd/bcm63xxpart.c -+++ b/drivers/mtd/bcm63xxpart.c -@@ -4,7 +4,7 @@ - * Copyright © 2006-2008 Florian Fainelli - * Mike Albon - * Copyright © 2009-2010 Daniel Dickinson -- * Copyright © 2011 Jonas Gorski -+ * Copyright © 2011-2012 Jonas Gorski - * - * 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 -@@ -82,6 +82,7 @@ static int bcm63xx_parse_cfe_partitions( - int namelen = 0; - int i; - u32 computed_crc; -+ bool rootfs_first = false; - - if (bcm63xx_detect_cfe(master)) - return -EINVAL; -@@ -109,6 +110,7 @@ static int bcm63xx_parse_cfe_partitions( - char *boardid = &(buf->board_id[0]); - char *tagversion = &(buf->tag_version[0]); - -+ sscanf(buf->flash_image_start, "%u", &rootfsaddr); - sscanf(buf->kernel_address, "%u", &kerneladdr); - sscanf(buf->kernel_length, "%u", &kernellen); - sscanf(buf->total_length, "%u", &totallen); -@@ -117,10 +119,19 @@ static int bcm63xx_parse_cfe_partitions( - tagversion, boardid); - - kerneladdr = kerneladdr - BCM63XX_EXTENDED_SIZE; -- rootfsaddr = kerneladdr + kernellen; -+ rootfsaddr = rootfsaddr - BCM63XX_EXTENDED_SIZE; - spareaddr = roundup(totallen, master->erasesize) + cfelen; - sparelen = master->size - spareaddr - nvramlen; -- rootfslen = spareaddr - rootfsaddr; -+ -+ if (rootfsaddr < kerneladdr) { -+ /* default Broadcom layout */ -+ rootfslen = kerneladdr - rootfsaddr; -+ rootfs_first = true; -+ } else { -+ /* OpenWrt layout */ -+ rootfsaddr = kerneladdr + kernellen; -+ rootfslen = spareaddr - rootfsaddr; -+ } - } else { - pr_warn("CFE boot tag CRC invalid (expected %08x, actual %08x)\n", - buf->header_crc, computed_crc); -@@ -156,18 +167,26 @@ static int bcm63xx_parse_cfe_partitions( - curpart++; - - if (kernellen > 0) { -- parts[curpart].name = "kernel"; -- parts[curpart].offset = kerneladdr; -- parts[curpart].size = kernellen; -+ int kernelpart = curpart; -+ -+ if (rootfslen > 0 && rootfs_first) -+ kernelpart++; -+ parts[kernelpart].name = "kernel"; -+ parts[kernelpart].offset = kerneladdr; -+ parts[kernelpart].size = kernellen; - curpart++; - } - - if (rootfslen > 0) { -- parts[curpart].name = "rootfs"; -- parts[curpart].offset = rootfsaddr; -- parts[curpart].size = rootfslen; -- if (sparelen > 0) -- parts[curpart].size += sparelen; -+ int rootfspart = curpart; -+ -+ if (kernellen > 0 && rootfs_first) -+ rootfspart--; -+ parts[rootfspart].name = "rootfs"; -+ parts[rootfspart].offset = rootfsaddr; -+ parts[rootfspart].size = rootfslen; -+ if (sparelen > 0 && !rootfs_first) -+ parts[rootfspart].size += sparelen; - curpart++; - } - -- cgit v1.2.3