diff options
author | jogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-11-06 15:21:46 +0000 |
---|---|---|
committer | jogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-11-06 15:21:46 +0000 |
commit | e1696ca671a6637ee951c84d1624095a4203513c (patch) | |
tree | 8929ded95b115c132ce2bfb2222afe709d48c248 /target/linux | |
parent | 1cce3e937d5b456c6b8fe5346be90afb15bd7f4b (diff) |
linux: export bcm963xx_tag.h to userspace
Export bcm963xx_tag.h so mtd can use it without using kernel includes.
Signed-off-by: Catalin Patulea <cat@vv.carleton.ca>
[jonas.gorski@gmail.com: fixup bcm63xx patches, completely remove header
from original location, refresh patches, use a more matching patch
number, port to 3.6]
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34103 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
16 files changed, 454 insertions, 16 deletions
diff --git a/target/linux/brcm63xx/patches-3.3/304-boardid_fixup.patch b/target/linux/brcm63xx/patches-3.3/304-boardid_fixup.patch index 3b9e23ef7..c3dd8e989 100644 --- a/target/linux/brcm63xx/patches-3.3/304-boardid_fixup.patch +++ b/target/linux/brcm63xx/patches-3.3/304-boardid_fixup.patch @@ -4,7 +4,7 @@ #include <bcm63xx_dev_pcmcia.h> #include <bcm63xx_dev_spi.h> #include <board_bcm963xx.h> -+#include <bcm963xx_tag.h> ++#include <linux/bcm963xx_tag.h> #define PFX "board_bcm963xx: " diff --git a/target/linux/brcm63xx/patches-3.3/401-MIPS-BCM63XX-register-ohci-device.patch b/target/linux/brcm63xx/patches-3.3/401-MIPS-BCM63XX-register-ohci-device.patch index 33b1a3935..8218fae44 100644 --- a/target/linux/brcm63xx/patches-3.3/401-MIPS-BCM63XX-register-ohci-device.patch +++ b/target/linux/brcm63xx/patches-3.3/401-MIPS-BCM63XX-register-ohci-device.patch @@ -67,7 +67,7 @@ Subject: [PATCH 24/63] MIPS: BCM63XX: register ohci device. #include <bcm63xx_dev_spi.h> +#include <bcm63xx_dev_usb_ohci.h> #include <board_bcm963xx.h> - #include <bcm963xx_tag.h> + #include <linux/bcm963xx_tag.h> @@ -916,6 +917,9 @@ int __init board_register_devices(void) !board_get_mac_address(board.enet1.mac_addr)) diff --git a/target/linux/brcm63xx/patches-3.3/403-MIPS-BCM63XX-register-ehci-device.patch b/target/linux/brcm63xx/patches-3.3/403-MIPS-BCM63XX-register-ehci-device.patch index d6773d565..8606d4145 100644 --- a/target/linux/brcm63xx/patches-3.3/403-MIPS-BCM63XX-register-ehci-device.patch +++ b/target/linux/brcm63xx/patches-3.3/403-MIPS-BCM63XX-register-ehci-device.patch @@ -49,7 +49,7 @@ Subject: [PATCH 26/63] MIPS: BCM63XX: register ehci device. #include <bcm63xx_dev_usb_ohci.h> +#include <bcm63xx_dev_usb_ehci.h> #include <board_bcm963xx.h> - #include <bcm963xx_tag.h> + #include <linux/bcm963xx_tag.h> @@ -917,6 +918,9 @@ int __init board_register_devices(void) !board_get_mac_address(board.enet1.mac_addr)) diff --git a/target/linux/brcm63xx/patches-3.3/405-bcm963xx_real_rootfs_length.patch b/target/linux/brcm63xx/patches-3.3/405-bcm963xx_real_rootfs_length.patch index 856b9e267..f0e6c4c78 100644 --- a/target/linux/brcm63xx/patches-3.3/405-bcm963xx_real_rootfs_length.patch +++ b/target/linux/brcm63xx/patches-3.3/405-bcm963xx_real_rootfs_length.patch @@ -1,5 +1,5 @@ ---- a/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h +--- a/include/linux/bcm963xx_tag.h ++++ b/include/linux/bcm963xx_tag.h @@ -85,8 +85,10 @@ struct bcm_tag { __u32 rootfs_crc; /* 224-227: CRC32 of kernel partition */ diff --git a/target/linux/brcm63xx/patches-3.3/430-MTD-bcm63xxpart-use-nvram-for-PSI-size.patch b/target/linux/brcm63xx/patches-3.3/430-MTD-bcm63xxpart-use-nvram-for-PSI-size.patch index 5ca6f4797..fd1bfc4b8 100644 --- a/target/linux/brcm63xx/patches-3.3/430-MTD-bcm63xxpart-use-nvram-for-PSI-size.patch +++ b/target/linux/brcm63xx/patches-3.3/430-MTD-bcm63xxpart-use-nvram-for-PSI-size.patch @@ -14,7 +14,7 @@ Subject: [PATCH 62/79] MTD: bcm63xxpart: use nvram for PSI size #include <linux/mtd/partitions.h> +#include <asm/mach-bcm63xx/bcm63xx_nvram.h> - #include <asm/mach-bcm63xx/bcm963xx_tag.h> + #include <linux/bcm963xx_tag.h> #include <asm/mach-bcm63xx/board_bcm963xx.h> @@ -90,7 +91,8 @@ static int bcm63xx_parse_cfe_partitions( diff --git a/target/linux/brcm63xx/patches-3.3/432-BCM63XX-allow-providing-fixup-data-in-board-data.patch b/target/linux/brcm63xx/patches-3.3/432-BCM63XX-allow-providing-fixup-data-in-board-data.patch index e0e4a4738..8f04fa75c 100644 --- a/target/linux/brcm63xx/patches-3.3/432-BCM63XX-allow-providing-fixup-data-in-board-data.patch +++ b/target/linux/brcm63xx/patches-3.3/432-BCM63XX-allow-providing-fixup-data-in-board-data.patch @@ -13,7 +13,7 @@ Subject: [PATCH 67/80] BCM63XX: allow providing fixup data in board data @@ -33,6 +33,7 @@ #include <bcm63xx_dev_usb_ehci.h> #include <board_bcm963xx.h> - #include <bcm963xx_tag.h> + #include <linux/bcm963xx_tag.h> +#include <pci_ath9k_fixup.h> #define PFX "board_bcm963xx: " diff --git a/target/linux/brcm63xx/patches-3.6/304-boardid_fixup.patch b/target/linux/brcm63xx/patches-3.6/304-boardid_fixup.patch index 301c91614..a463fe739 100644 --- a/target/linux/brcm63xx/patches-3.6/304-boardid_fixup.patch +++ b/target/linux/brcm63xx/patches-3.6/304-boardid_fixup.patch @@ -4,7 +4,7 @@ #include <bcm63xx_dev_pcmcia.h> #include <bcm63xx_dev_spi.h> #include <board_bcm963xx.h> -+#include <bcm963xx_tag.h> ++#include <linux/bcm963xx_tag.h> #define PFX "board_bcm963xx: " diff --git a/target/linux/brcm63xx/patches-3.6/401-MIPS-BCM63XX-register-ohci-device.patch b/target/linux/brcm63xx/patches-3.6/401-MIPS-BCM63XX-register-ohci-device.patch index a62539121..28a7e2f1f 100644 --- a/target/linux/brcm63xx/patches-3.6/401-MIPS-BCM63XX-register-ohci-device.patch +++ b/target/linux/brcm63xx/patches-3.6/401-MIPS-BCM63XX-register-ohci-device.patch @@ -67,7 +67,7 @@ Subject: [PATCH 24/63] MIPS: BCM63XX: register ohci device. #include <bcm63xx_dev_spi.h> +#include <bcm63xx_dev_usb_ohci.h> #include <board_bcm963xx.h> - #include <bcm963xx_tag.h> + #include <linux/bcm963xx_tag.h> @@ -961,6 +962,9 @@ int __init board_register_devices(void) !board_get_mac_address(board.enet1.mac_addr)) diff --git a/target/linux/brcm63xx/patches-3.6/403-MIPS-BCM63XX-register-ehci-device.patch b/target/linux/brcm63xx/patches-3.6/403-MIPS-BCM63XX-register-ehci-device.patch index f50be1420..eb27ed96d 100644 --- a/target/linux/brcm63xx/patches-3.6/403-MIPS-BCM63XX-register-ehci-device.patch +++ b/target/linux/brcm63xx/patches-3.6/403-MIPS-BCM63XX-register-ehci-device.patch @@ -49,7 +49,7 @@ Subject: [PATCH 26/63] MIPS: BCM63XX: register ehci device. #include <bcm63xx_dev_usb_ohci.h> +#include <bcm63xx_dev_usb_ehci.h> #include <board_bcm963xx.h> - #include <bcm963xx_tag.h> + #include <linux/bcm963xx_tag.h> @@ -962,6 +963,9 @@ int __init board_register_devices(void) !board_get_mac_address(board.enet1.mac_addr)) diff --git a/target/linux/brcm63xx/patches-3.6/405-bcm963xx_real_rootfs_length.patch b/target/linux/brcm63xx/patches-3.6/405-bcm963xx_real_rootfs_length.patch index 856b9e267..f0e6c4c78 100644 --- a/target/linux/brcm63xx/patches-3.6/405-bcm963xx_real_rootfs_length.patch +++ b/target/linux/brcm63xx/patches-3.6/405-bcm963xx_real_rootfs_length.patch @@ -1,5 +1,5 @@ ---- a/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h +--- a/include/linux/bcm963xx_tag.h ++++ b/include/linux/bcm963xx_tag.h @@ -85,8 +85,10 @@ struct bcm_tag { __u32 rootfs_crc; /* 224-227: CRC32 of kernel partition */ diff --git a/target/linux/brcm63xx/patches-3.6/430-MTD-bcm63xxpart-use-nvram-for-PSI-size.patch b/target/linux/brcm63xx/patches-3.6/430-MTD-bcm63xxpart-use-nvram-for-PSI-size.patch index 5ca6f4797..fd1bfc4b8 100644 --- a/target/linux/brcm63xx/patches-3.6/430-MTD-bcm63xxpart-use-nvram-for-PSI-size.patch +++ b/target/linux/brcm63xx/patches-3.6/430-MTD-bcm63xxpart-use-nvram-for-PSI-size.patch @@ -14,7 +14,7 @@ Subject: [PATCH 62/79] MTD: bcm63xxpart: use nvram for PSI size #include <linux/mtd/partitions.h> +#include <asm/mach-bcm63xx/bcm63xx_nvram.h> - #include <asm/mach-bcm63xx/bcm963xx_tag.h> + #include <linux/bcm963xx_tag.h> #include <asm/mach-bcm63xx/board_bcm963xx.h> @@ -90,7 +91,8 @@ static int bcm63xx_parse_cfe_partitions( diff --git a/target/linux/brcm63xx/patches-3.6/432-BCM63XX-allow-providing-fixup-data-in-board-data.patch b/target/linux/brcm63xx/patches-3.6/432-BCM63XX-allow-providing-fixup-data-in-board-data.patch index cb5374f33..5d35cbfdf 100644 --- a/target/linux/brcm63xx/patches-3.6/432-BCM63XX-allow-providing-fixup-data-in-board-data.patch +++ b/target/linux/brcm63xx/patches-3.6/432-BCM63XX-allow-providing-fixup-data-in-board-data.patch @@ -13,7 +13,7 @@ Subject: [PATCH 67/80] BCM63XX: allow providing fixup data in board data @@ -33,6 +33,7 @@ #include <bcm63xx_dev_usb_ehci.h> #include <board_bcm963xx.h> - #include <bcm963xx_tag.h> + #include <linux/bcm963xx_tag.h> +#include <pci_ath9k_fixup.h> #define PFX "board_bcm963xx: " diff --git a/target/linux/generic/patches-3.3/260-move_bcm963xx_tag.patch b/target/linux/generic/patches-3.3/260-move_bcm963xx_tag.patch new file mode 100644 index 000000000..b281326d6 --- /dev/null +++ b/target/linux/generic/patches-3.3/260-move_bcm963xx_tag.patch @@ -0,0 +1,219 @@ +--- a/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h ++++ /dev/null +@@ -1,96 +0,0 @@ +-#ifndef __BCM963XX_TAG_H +-#define __BCM963XX_TAG_H +- +-#define TAGVER_LEN 4 /* Length of Tag Version */ +-#define TAGLAYOUT_LEN 4 /* Length of FlashLayoutVer */ +-#define SIG1_LEN 20 /* Company Signature 1 Length */ +-#define SIG2_LEN 14 /* Company Signature 2 Length */ +-#define BOARDID_LEN 16 /* Length of BoardId */ +-#define ENDIANFLAG_LEN 2 /* Endian Flag Length */ +-#define CHIPID_LEN 6 /* Chip Id Length */ +-#define IMAGE_LEN 10 /* Length of Length Field */ +-#define ADDRESS_LEN 12 /* Length of Address field */ +-#define DUALFLAG_LEN 2 /* Dual Image flag Length */ +-#define INACTIVEFLAG_LEN 2 /* Inactie Flag Length */ +-#define RSASIG_LEN 20 /* Length of RSA Signature in tag */ +-#define TAGINFO1_LEN 30 /* Length of vendor information field1 in tag */ +-#define FLASHLAYOUTVER_LEN 4 /* Length of Flash Layout Version String tag */ +-#define TAGINFO2_LEN 16 /* Length of vendor information field2 in tag */ +-#define ALTTAGINFO_LEN 54 /* Alternate length for vendor information; Pirelli */ +- +-#define NUM_PIRELLI 2 +-#define IMAGETAG_CRC_START 0xFFFFFFFF +- +-#define PIRELLI_BOARDS { \ +- "AGPF-S0", \ +- "DWV-S0", \ +-} +- +-/* +- * The broadcom firmware assumes the rootfs starts the image, +- * therefore uses the rootfs start (flash_image_address) +- * to determine where to flash the image. Since we have the kernel first +- * we have to give it the kernel address, but the crc uses the length +- * associated with this address (root_length), which is added to the kernel +- * length (kernel_length) to determine the length of image to flash and thus +- * needs to be rootfs + deadcode (jffs2 EOF marker) +-*/ +- +-struct bcm_tag { +- /* 0-3: Version of the image tag */ +- char tag_version[TAGVER_LEN]; +- /* 4-23: Company Line 1 */ +- char sig_1[SIG1_LEN]; +- /* 24-37: Company Line 2 */ +- char sig_2[SIG2_LEN]; +- /* 38-43: Chip this image is for */ +- char chip_id[CHIPID_LEN]; +- /* 44-59: Board name */ +- char board_id[BOARDID_LEN]; +- /* 60-61: Map endianness -- 1 BE 0 LE */ +- char big_endian[ENDIANFLAG_LEN]; +- /* 62-71: Total length of image */ +- char total_length[IMAGE_LEN]; +- /* 72-83: Address in memory of CFE */ +- char cfe__address[ADDRESS_LEN]; +- /* 84-93: Size of CFE */ +- char cfe_length[IMAGE_LEN]; +- /* 94-105: Address in memory of image start +- * (kernel for OpenWRT, rootfs for stock firmware) +- */ +- char flash_image_start[ADDRESS_LEN]; +- /* 106-115: Size of rootfs */ +- char root_length[IMAGE_LEN]; +- /* 116-127: Address in memory of kernel */ +- char kernel_address[ADDRESS_LEN]; +- /* 128-137: Size of kernel */ +- char kernel_length[IMAGE_LEN]; +- /* 138-139: Unused at the moment */ +- char dual_image[DUALFLAG_LEN]; +- /* 140-141: Unused at the moment */ +- char inactive_flag[INACTIVEFLAG_LEN]; +- /* 142-161: RSA Signature (not used; some vendors may use this) */ +- char rsa_signature[RSASIG_LEN]; +- /* 162-191: Compilation and related information (not used in OpenWrt) */ +- char information1[TAGINFO1_LEN]; +- /* 192-195: Version flash layout */ +- char flash_layout_ver[FLASHLAYOUTVER_LEN]; +- /* 196-199: kernel+rootfs CRC32 */ +- __u32 fskernel_crc; +- /* 200-215: Unused except on Alice Gate where is is information */ +- char information2[TAGINFO2_LEN]; +- /* 216-219: CRC32 of image less imagetag (kernel for Alice Gate) */ +- __u32 image_crc; +- /* 220-223: CRC32 of rootfs partition */ +- __u32 rootfs_crc; +- /* 224-227: CRC32 of kernel partition */ +- __u32 kernel_crc; +- /* 228-235: Unused at present */ +- char reserved1[8]; +- /* 236-239: CRC32 of header excluding last 20 bytes */ +- __u32 header_crc; +- /* 240-255: Unused at present */ +- char reserved2[16]; +-}; +- +-#endif /* __BCM63XX_TAG_H */ +--- a/drivers/mtd/bcm63xxpart.c ++++ b/drivers/mtd/bcm63xxpart.c +@@ -32,7 +32,7 @@ + #include <linux/mtd/mtd.h> + #include <linux/mtd/partitions.h> + +-#include <asm/mach-bcm63xx/bcm963xx_tag.h> ++#include <linux/bcm963xx_tag.h> + #include <asm/mach-bcm63xx/board_bcm963xx.h> + + #define BCM63XX_EXTENDED_SIZE 0xBFC00000 /* Extended flash address */ +--- a/include/linux/Kbuild ++++ b/include/linux/Kbuild +@@ -77,6 +77,7 @@ header-y += blk_types.h + header-y += blkpg.h + header-y += blktrace_api.h + header-y += bpqether.h ++header-y += bcm963xx_tag.h + header-y += bsg.h + header-y += can.h + header-y += capability.h +--- /dev/null ++++ b/include/linux/bcm963xx_tag.h +@@ -0,0 +1,96 @@ ++#ifndef __BCM963XX_TAG_H ++#define __BCM963XX_TAG_H ++ ++#define TAGVER_LEN 4 /* Length of Tag Version */ ++#define TAGLAYOUT_LEN 4 /* Length of FlashLayoutVer */ ++#define SIG1_LEN 20 /* Company Signature 1 Length */ ++#define SIG2_LEN 14 /* Company Signature 2 Length */ ++#define BOARDID_LEN 16 /* Length of BoardId */ ++#define ENDIANFLAG_LEN 2 /* Endian Flag Length */ ++#define CHIPID_LEN 6 /* Chip Id Length */ ++#define IMAGE_LEN 10 /* Length of Length Field */ ++#define ADDRESS_LEN 12 /* Length of Address field */ ++#define DUALFLAG_LEN 2 /* Dual Image flag Length */ ++#define INACTIVEFLAG_LEN 2 /* Inactie Flag Length */ ++#define RSASIG_LEN 20 /* Length of RSA Signature in tag */ ++#define TAGINFO1_LEN 30 /* Length of vendor information field1 in tag */ ++#define FLASHLAYOUTVER_LEN 4 /* Length of Flash Layout Version String tag */ ++#define TAGINFO2_LEN 16 /* Length of vendor information field2 in tag */ ++#define ALTTAGINFO_LEN 54 /* Alternate length for vendor information; Pirelli */ ++ ++#define NUM_PIRELLI 2 ++#define IMAGETAG_CRC_START 0xFFFFFFFF ++ ++#define PIRELLI_BOARDS { \ ++ "AGPF-S0", \ ++ "DWV-S0", \ ++} ++ ++/* ++ * The broadcom firmware assumes the rootfs starts the image, ++ * therefore uses the rootfs start (flash_image_address) ++ * to determine where to flash the image. Since we have the kernel first ++ * we have to give it the kernel address, but the crc uses the length ++ * associated with this address (root_length), which is added to the kernel ++ * length (kernel_length) to determine the length of image to flash and thus ++ * needs to be rootfs + deadcode (jffs2 EOF marker) ++*/ ++ ++struct bcm_tag { ++ /* 0-3: Version of the image tag */ ++ char tag_version[TAGVER_LEN]; ++ /* 4-23: Company Line 1 */ ++ char sig_1[SIG1_LEN]; ++ /* 24-37: Company Line 2 */ ++ char sig_2[SIG2_LEN]; ++ /* 38-43: Chip this image is for */ ++ char chip_id[CHIPID_LEN]; ++ /* 44-59: Board name */ ++ char board_id[BOARDID_LEN]; ++ /* 60-61: Map endianness -- 1 BE 0 LE */ ++ char big_endian[ENDIANFLAG_LEN]; ++ /* 62-71: Total length of image */ ++ char total_length[IMAGE_LEN]; ++ /* 72-83: Address in memory of CFE */ ++ char cfe__address[ADDRESS_LEN]; ++ /* 84-93: Size of CFE */ ++ char cfe_length[IMAGE_LEN]; ++ /* 94-105: Address in memory of image start ++ * (kernel for OpenWRT, rootfs for stock firmware) ++ */ ++ char flash_image_start[ADDRESS_LEN]; ++ /* 106-115: Size of rootfs */ ++ char root_length[IMAGE_LEN]; ++ /* 116-127: Address in memory of kernel */ ++ char kernel_address[ADDRESS_LEN]; ++ /* 128-137: Size of kernel */ ++ char kernel_length[IMAGE_LEN]; ++ /* 138-139: Unused at the moment */ ++ char dual_image[DUALFLAG_LEN]; ++ /* 140-141: Unused at the moment */ ++ char inactive_flag[INACTIVEFLAG_LEN]; ++ /* 142-161: RSA Signature (not used; some vendors may use this) */ ++ char rsa_signature[RSASIG_LEN]; ++ /* 162-191: Compilation and related information (not used in OpenWrt) */ ++ char information1[TAGINFO1_LEN]; ++ /* 192-195: Version flash layout */ ++ char flash_layout_ver[FLASHLAYOUTVER_LEN]; ++ /* 196-199: kernel+rootfs CRC32 */ ++ __u32 fskernel_crc; ++ /* 200-215: Unused except on Alice Gate where is is information */ ++ char information2[TAGINFO2_LEN]; ++ /* 216-219: CRC32 of image less imagetag (kernel for Alice Gate) */ ++ __u32 image_crc; ++ /* 220-223: CRC32 of rootfs partition */ ++ __u32 rootfs_crc; ++ /* 224-227: CRC32 of kernel partition */ ++ __u32 kernel_crc; ++ /* 228-235: Unused at present */ ++ char reserved1[8]; ++ /* 236-239: CRC32 of header excluding last 20 bytes */ ++ __u32 header_crc; ++ /* 240-255: Unused at present */ ++ char reserved2[16]; ++}; ++ ++#endif /* __BCM63XX_TAG_H */ diff --git a/target/linux/generic/patches-3.3/850-glamo_headers.patch b/target/linux/generic/patches-3.3/850-glamo_headers.patch index c75e1d62e..d6d49fdf5 100644 --- a/target/linux/generic/patches-3.3/850-glamo_headers.patch +++ b/target/linux/generic/patches-3.3/850-glamo_headers.patch @@ -10,7 +10,7 @@ #define FB_ACCEL_NEOMAGIC_NM2093 92 /* NeoMagic NM2093 */ --- a/include/linux/Kbuild +++ b/include/linux/Kbuild -@@ -144,6 +144,8 @@ header-y += generic_serial.h +@@ -145,6 +145,8 @@ header-y += generic_serial.h header-y += genetlink.h header-y += gfs2_ondisk.h header-y += gigaset_dev.h diff --git a/target/linux/generic/patches-3.6/260-move_bcm963xx_tag.patch b/target/linux/generic/patches-3.6/260-move_bcm963xx_tag.patch new file mode 100644 index 000000000..dd2fbae01 --- /dev/null +++ b/target/linux/generic/patches-3.6/260-move_bcm963xx_tag.patch @@ -0,0 +1,219 @@ +--- a/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h ++++ /dev/null +@@ -1,96 +0,0 @@ +-#ifndef __BCM963XX_TAG_H +-#define __BCM963XX_TAG_H +- +-#define TAGVER_LEN 4 /* Length of Tag Version */ +-#define TAGLAYOUT_LEN 4 /* Length of FlashLayoutVer */ +-#define SIG1_LEN 20 /* Company Signature 1 Length */ +-#define SIG2_LEN 14 /* Company Signature 2 Length */ +-#define BOARDID_LEN 16 /* Length of BoardId */ +-#define ENDIANFLAG_LEN 2 /* Endian Flag Length */ +-#define CHIPID_LEN 6 /* Chip Id Length */ +-#define IMAGE_LEN 10 /* Length of Length Field */ +-#define ADDRESS_LEN 12 /* Length of Address field */ +-#define DUALFLAG_LEN 2 /* Dual Image flag Length */ +-#define INACTIVEFLAG_LEN 2 /* Inactie Flag Length */ +-#define RSASIG_LEN 20 /* Length of RSA Signature in tag */ +-#define TAGINFO1_LEN 30 /* Length of vendor information field1 in tag */ +-#define FLASHLAYOUTVER_LEN 4 /* Length of Flash Layout Version String tag */ +-#define TAGINFO2_LEN 16 /* Length of vendor information field2 in tag */ +-#define ALTTAGINFO_LEN 54 /* Alternate length for vendor information; Pirelli */ +- +-#define NUM_PIRELLI 2 +-#define IMAGETAG_CRC_START 0xFFFFFFFF +- +-#define PIRELLI_BOARDS { \ +- "AGPF-S0", \ +- "DWV-S0", \ +-} +- +-/* +- * The broadcom firmware assumes the rootfs starts the image, +- * therefore uses the rootfs start (flash_image_address) +- * to determine where to flash the image. Since we have the kernel first +- * we have to give it the kernel address, but the crc uses the length +- * associated with this address (root_length), which is added to the kernel +- * length (kernel_length) to determine the length of image to flash and thus +- * needs to be rootfs + deadcode (jffs2 EOF marker) +-*/ +- +-struct bcm_tag { +- /* 0-3: Version of the image tag */ +- char tag_version[TAGVER_LEN]; +- /* 4-23: Company Line 1 */ +- char sig_1[SIG1_LEN]; +- /* 24-37: Company Line 2 */ +- char sig_2[SIG2_LEN]; +- /* 38-43: Chip this image is for */ +- char chip_id[CHIPID_LEN]; +- /* 44-59: Board name */ +- char board_id[BOARDID_LEN]; +- /* 60-61: Map endianness -- 1 BE 0 LE */ +- char big_endian[ENDIANFLAG_LEN]; +- /* 62-71: Total length of image */ +- char total_length[IMAGE_LEN]; +- /* 72-83: Address in memory of CFE */ +- char cfe__address[ADDRESS_LEN]; +- /* 84-93: Size of CFE */ +- char cfe_length[IMAGE_LEN]; +- /* 94-105: Address in memory of image start +- * (kernel for OpenWRT, rootfs for stock firmware) +- */ +- char flash_image_start[ADDRESS_LEN]; +- /* 106-115: Size of rootfs */ +- char root_length[IMAGE_LEN]; +- /* 116-127: Address in memory of kernel */ +- char kernel_address[ADDRESS_LEN]; +- /* 128-137: Size of kernel */ +- char kernel_length[IMAGE_LEN]; +- /* 138-139: Unused at the moment */ +- char dual_image[DUALFLAG_LEN]; +- /* 140-141: Unused at the moment */ +- char inactive_flag[INACTIVEFLAG_LEN]; +- /* 142-161: RSA Signature (not used; some vendors may use this) */ +- char rsa_signature[RSASIG_LEN]; +- /* 162-191: Compilation and related information (not used in OpenWrt) */ +- char information1[TAGINFO1_LEN]; +- /* 192-195: Version flash layout */ +- char flash_layout_ver[FLASHLAYOUTVER_LEN]; +- /* 196-199: kernel+rootfs CRC32 */ +- __u32 fskernel_crc; +- /* 200-215: Unused except on Alice Gate where is is information */ +- char information2[TAGINFO2_LEN]; +- /* 216-219: CRC32 of image less imagetag (kernel for Alice Gate) */ +- __u32 image_crc; +- /* 220-223: CRC32 of rootfs partition */ +- __u32 rootfs_crc; +- /* 224-227: CRC32 of kernel partition */ +- __u32 kernel_crc; +- /* 228-235: Unused at present */ +- char reserved1[8]; +- /* 236-239: CRC32 of header excluding last 20 bytes */ +- __u32 header_crc; +- /* 240-255: Unused at present */ +- char reserved2[16]; +-}; +- +-#endif /* __BCM63XX_TAG_H */ +--- a/drivers/mtd/bcm63xxpart.c ++++ b/drivers/mtd/bcm63xxpart.c +@@ -32,7 +32,7 @@ + #include <linux/mtd/mtd.h> + #include <linux/mtd/partitions.h> + +-#include <asm/mach-bcm63xx/bcm963xx_tag.h> ++#include <linux/bcm963xx_tag.h> + #include <asm/mach-bcm63xx/board_bcm963xx.h> + + #define BCM63XX_EXTENDED_SIZE 0xBFC00000 /* Extended flash address */ +--- a/include/linux/Kbuild ++++ b/include/linux/Kbuild +@@ -78,6 +78,7 @@ header-y += blk_types.h + header-y += blkpg.h + header-y += blktrace_api.h + header-y += bpqether.h ++header-y += bcm963xx_tag.h + header-y += bsg.h + header-y += can.h + header-y += capability.h +--- /dev/null ++++ b/include/linux/bcm963xx_tag.h +@@ -0,0 +1,96 @@ ++#ifndef __BCM963XX_TAG_H ++#define __BCM963XX_TAG_H ++ ++#define TAGVER_LEN 4 /* Length of Tag Version */ ++#define TAGLAYOUT_LEN 4 /* Length of FlashLayoutVer */ ++#define SIG1_LEN 20 /* Company Signature 1 Length */ ++#define SIG2_LEN 14 /* Company Signature 2 Length */ ++#define BOARDID_LEN 16 /* Length of BoardId */ ++#define ENDIANFLAG_LEN 2 /* Endian Flag Length */ ++#define CHIPID_LEN 6 /* Chip Id Length */ ++#define IMAGE_LEN 10 /* Length of Length Field */ ++#define ADDRESS_LEN 12 /* Length of Address field */ ++#define DUALFLAG_LEN 2 /* Dual Image flag Length */ ++#define INACTIVEFLAG_LEN 2 /* Inactie Flag Length */ ++#define RSASIG_LEN 20 /* Length of RSA Signature in tag */ ++#define TAGINFO1_LEN 30 /* Length of vendor information field1 in tag */ ++#define FLASHLAYOUTVER_LEN 4 /* Length of Flash Layout Version String tag */ ++#define TAGINFO2_LEN 16 /* Length of vendor information field2 in tag */ ++#define ALTTAGINFO_LEN 54 /* Alternate length for vendor information; Pirelli */ ++ ++#define NUM_PIRELLI 2 ++#define IMAGETAG_CRC_START 0xFFFFFFFF ++ ++#define PIRELLI_BOARDS { \ ++ "AGPF-S0", \ ++ "DWV-S0", \ ++} ++ ++/* ++ * The broadcom firmware assumes the rootfs starts the image, ++ * therefore uses the rootfs start (flash_image_address) ++ * to determine where to flash the image. Since we have the kernel first ++ * we have to give it the kernel address, but the crc uses the length ++ * associated with this address (root_length), which is added to the kernel ++ * length (kernel_length) to determine the length of image to flash and thus ++ * needs to be rootfs + deadcode (jffs2 EOF marker) ++*/ ++ ++struct bcm_tag { ++ /* 0-3: Version of the image tag */ ++ char tag_version[TAGVER_LEN]; ++ /* 4-23: Company Line 1 */ ++ char sig_1[SIG1_LEN]; ++ /* 24-37: Company Line 2 */ ++ char sig_2[SIG2_LEN]; ++ /* 38-43: Chip this image is for */ ++ char chip_id[CHIPID_LEN]; ++ /* 44-59: Board name */ ++ char board_id[BOARDID_LEN]; ++ /* 60-61: Map endianness -- 1 BE 0 LE */ ++ char big_endian[ENDIANFLAG_LEN]; ++ /* 62-71: Total length of image */ ++ char total_length[IMAGE_LEN]; ++ /* 72-83: Address in memory of CFE */ ++ char cfe__address[ADDRESS_LEN]; ++ /* 84-93: Size of CFE */ ++ char cfe_length[IMAGE_LEN]; ++ /* 94-105: Address in memory of image start ++ * (kernel for OpenWRT, rootfs for stock firmware) ++ */ ++ char flash_image_start[ADDRESS_LEN]; ++ /* 106-115: Size of rootfs */ ++ char root_length[IMAGE_LEN]; ++ /* 116-127: Address in memory of kernel */ ++ char kernel_address[ADDRESS_LEN]; ++ /* 128-137: Size of kernel */ ++ char kernel_length[IMAGE_LEN]; ++ /* 138-139: Unused at the moment */ ++ char dual_image[DUALFLAG_LEN]; ++ /* 140-141: Unused at the moment */ ++ char inactive_flag[INACTIVEFLAG_LEN]; ++ /* 142-161: RSA Signature (not used; some vendors may use this) */ ++ char rsa_signature[RSASIG_LEN]; ++ /* 162-191: Compilation and related information (not used in OpenWrt) */ ++ char information1[TAGINFO1_LEN]; ++ /* 192-195: Version flash layout */ ++ char flash_layout_ver[FLASHLAYOUTVER_LEN]; ++ /* 196-199: kernel+rootfs CRC32 */ ++ __u32 fskernel_crc; ++ /* 200-215: Unused except on Alice Gate where is is information */ ++ char information2[TAGINFO2_LEN]; ++ /* 216-219: CRC32 of image less imagetag (kernel for Alice Gate) */ ++ __u32 image_crc; ++ /* 220-223: CRC32 of rootfs partition */ ++ __u32 rootfs_crc; ++ /* 224-227: CRC32 of kernel partition */ ++ __u32 kernel_crc; ++ /* 228-235: Unused at present */ ++ char reserved1[8]; ++ /* 236-239: CRC32 of header excluding last 20 bytes */ ++ __u32 header_crc; ++ /* 240-255: Unused at present */ ++ char reserved2[16]; ++}; ++ ++#endif /* __BCM63XX_TAG_H */ diff --git a/target/linux/generic/patches-3.6/850-glamo_headers.patch b/target/linux/generic/patches-3.6/850-glamo_headers.patch index c75e1d62e..d6d49fdf5 100644 --- a/target/linux/generic/patches-3.6/850-glamo_headers.patch +++ b/target/linux/generic/patches-3.6/850-glamo_headers.patch @@ -10,7 +10,7 @@ #define FB_ACCEL_NEOMAGIC_NM2093 92 /* NeoMagic NM2093 */ --- a/include/linux/Kbuild +++ b/include/linux/Kbuild -@@ -144,6 +144,8 @@ header-y += generic_serial.h +@@ -145,6 +145,8 @@ header-y += generic_serial.h header-y += genetlink.h header-y += gfs2_ondisk.h header-y += gigaset_dev.h |