aboutsummaryrefslogtreecommitdiffstats
path: root/tools/b43-tools
diff options
context:
space:
mode:
authorJames <>2013-03-17 12:16:37 +0000
committerJames <>2013-03-17 12:16:37 +0000
commit27b76ab0671089c47506615a796a261e993896a7 (patch)
tree61213d67e7fa87b20356b23798558e2c4212c42f /tools/b43-tools
downloadtrunk-36060-27b76ab0671089c47506615a796a261e993896a7.tar.gz
trunk-36060-27b76ab0671089c47506615a796a261e993896a7.tar.bz2
trunk-36060-27b76ab0671089c47506615a796a261e993896a7.zip
Diffstat (limited to 'tools/b43-tools')
-rw-r--r--tools/b43-tools/.svn/entries68
-rw-r--r--tools/b43-tools/.svn/text-base/Makefile.svn-base51
-rw-r--r--tools/b43-tools/Makefile51
-rw-r--r--tools/b43-tools/files/.svn/entries62
-rw-r--r--tools/b43-tools/files/.svn/prop-base/b43-fwsquash.py.svn-base5
-rw-r--r--tools/b43-tools/files/.svn/text-base/b43-fwsquash.py.svn-base122
-rwxr-xr-xtools/b43-tools/files/b43-fwsquash.py122
-rw-r--r--tools/b43-tools/patches/.svn/entries130
-rw-r--r--tools/b43-tools/patches/.svn/text-base/001-fw-dirname.patch.svn-base16
-rw-r--r--tools/b43-tools/patches/.svn/text-base/002-no_libfl.patch.svn-base14
-rw-r--r--tools/b43-tools/patches/.svn/text-base/100-b43-asm-fix-compile-error-undefined-reference-to-yyd.patch.svn-base27
-rw-r--r--tools/b43-tools/patches/001-fw-dirname.patch16
-rw-r--r--tools/b43-tools/patches/002-no_libfl.patch14
-rw-r--r--tools/b43-tools/patches/100-b43-asm-fix-compile-error-undefined-reference-to-yyd.patch27
14 files changed, 725 insertions, 0 deletions
diff --git a/tools/b43-tools/.svn/entries b/tools/b43-tools/.svn/entries
new file mode 100644
index 0000000..a0de33d
--- /dev/null
+++ b/tools/b43-tools/.svn/entries
@@ -0,0 +1,68 @@
+10
+
+dir
+36060
+svn://svn.openwrt.org/openwrt/trunk/tools/b43-tools
+svn://svn.openwrt.org/openwrt
+
+
+
+2013-02-28T10:43:02.730422Z
+35830
+hauke
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3c298f89-4303-0410-b956-a3cf2f4a3e73
+
+files
+dir
+
+patches
+dir
+
+Makefile
+file
+
+
+
+
+2013-03-17T12:13:22.000000Z
+883fccb0780093237cf5d5a7150d2ac0
+2012-12-07T18:30:19.257724Z
+34574
+hauke
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1493
+
diff --git a/tools/b43-tools/.svn/text-base/Makefile.svn-base b/tools/b43-tools/.svn/text-base/Makefile.svn-base
new file mode 100644
index 0000000..e25bfc2
--- /dev/null
+++ b/tools/b43-tools/.svn/text-base/Makefile.svn-base
@@ -0,0 +1,51 @@
+#
+# Copyright (C) 2012 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=b43-tools
+PKG_VERSION:=017
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=git://git.bues.ch/b43-tools.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)
+PKG_SOURCE_VERSION:=691cd291afdb3dbfcf6b9624f8f4bd068af153d0
+#PKG_MIRROR_MD5SUM:=50ca3c763ee21ee213addd17cf1c1b86
+HOST_BUILD_DIR=$(BUILD_DIR_HOST)/$(PKG_NAME)
+
+include $(INCLUDE_DIR)/host-build.mk
+
+
+define Host/Compile
+ +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/fwcutter \
+ CFLAGS="$(HOST_CFLAGS) -include endian.h" \
+ $(HOST_MAKE_FLAGS) \
+ $(1) QUIET_SPARSE=:
+ +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/assembler \
+ CFLAGS="$(HOST_CFLAGS) -include endian.h" \
+ $(HOST_MAKE_FLAGS) \
+ LDFLAGS= \
+ $(1) QUIET_SPARSE=:
+endef
+
+define Host/Install
+ $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/fwcutter/b43-fwcutter $(STAGING_DIR_HOST)/bin/
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/assembler/b43-asm $(STAGING_DIR_HOST)/bin/
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/assembler/b43-asm.bin $(STAGING_DIR_HOST)/bin/
+ $(INSTALL_BIN) ./files/b43-fwsquash.py $(STAGING_DIR_HOST)/bin/
+endef
+
+define Host/Clean
+ rm -f $(STAGING_DIR_HOST)/bin/b43-fwcutter
+ rm -f $(STAGING_DIR_HOST)/bin/b43-asm
+ rm -f $(STAGING_DIR_HOST)/bin/b43-asm.bin
+ rm -f $(STAGING_DIR_HOST)/bin/b43-fwsquash.py
+endef
+
+$(eval $(call HostBuild))
diff --git a/tools/b43-tools/Makefile b/tools/b43-tools/Makefile
new file mode 100644
index 0000000..e25bfc2
--- /dev/null
+++ b/tools/b43-tools/Makefile
@@ -0,0 +1,51 @@
+#
+# Copyright (C) 2012 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=b43-tools
+PKG_VERSION:=017
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=git://git.bues.ch/b43-tools.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)
+PKG_SOURCE_VERSION:=691cd291afdb3dbfcf6b9624f8f4bd068af153d0
+#PKG_MIRROR_MD5SUM:=50ca3c763ee21ee213addd17cf1c1b86
+HOST_BUILD_DIR=$(BUILD_DIR_HOST)/$(PKG_NAME)
+
+include $(INCLUDE_DIR)/host-build.mk
+
+
+define Host/Compile
+ +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/fwcutter \
+ CFLAGS="$(HOST_CFLAGS) -include endian.h" \
+ $(HOST_MAKE_FLAGS) \
+ $(1) QUIET_SPARSE=:
+ +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/assembler \
+ CFLAGS="$(HOST_CFLAGS) -include endian.h" \
+ $(HOST_MAKE_FLAGS) \
+ LDFLAGS= \
+ $(1) QUIET_SPARSE=:
+endef
+
+define Host/Install
+ $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/fwcutter/b43-fwcutter $(STAGING_DIR_HOST)/bin/
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/assembler/b43-asm $(STAGING_DIR_HOST)/bin/
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/assembler/b43-asm.bin $(STAGING_DIR_HOST)/bin/
+ $(INSTALL_BIN) ./files/b43-fwsquash.py $(STAGING_DIR_HOST)/bin/
+endef
+
+define Host/Clean
+ rm -f $(STAGING_DIR_HOST)/bin/b43-fwcutter
+ rm -f $(STAGING_DIR_HOST)/bin/b43-asm
+ rm -f $(STAGING_DIR_HOST)/bin/b43-asm.bin
+ rm -f $(STAGING_DIR_HOST)/bin/b43-fwsquash.py
+endef
+
+$(eval $(call HostBuild))
diff --git a/tools/b43-tools/files/.svn/entries b/tools/b43-tools/files/.svn/entries
new file mode 100644
index 0000000..1e936c1
--- /dev/null
+++ b/tools/b43-tools/files/.svn/entries
@@ -0,0 +1,62 @@
+10
+
+dir
+36060
+svn://svn.openwrt.org/openwrt/trunk/tools/b43-tools/files
+svn://svn.openwrt.org/openwrt
+
+
+
+2012-10-08T20:15:42.151953Z
+33668
+hauke
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3c298f89-4303-0410-b956-a3cf2f4a3e73
+
+b43-fwsquash.py
+file
+
+
+
+
+2013-03-17T12:13:22.000000Z
+f7a389b79913bf5d30607d21acd2f3a3
+2012-10-08T20:15:42.151953Z
+33668
+hauke
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3336
+
diff --git a/tools/b43-tools/files/.svn/prop-base/b43-fwsquash.py.svn-base b/tools/b43-tools/files/.svn/prop-base/b43-fwsquash.py.svn-base
new file mode 100644
index 0000000..869ac71
--- /dev/null
+++ b/tools/b43-tools/files/.svn/prop-base/b43-fwsquash.py.svn-base
@@ -0,0 +1,5 @@
+K 14
+svn:executable
+V 1
+*
+END
diff --git a/tools/b43-tools/files/.svn/text-base/b43-fwsquash.py.svn-base b/tools/b43-tools/files/.svn/text-base/b43-fwsquash.py.svn-base
new file mode 100644
index 0000000..cd88181
--- /dev/null
+++ b/tools/b43-tools/files/.svn/text-base/b43-fwsquash.py.svn-base
@@ -0,0 +1,122 @@
+#!/usr/bin/env python
+#
+# b43 firmware file squasher
+# Removes unnecessary firmware files
+#
+# Copyright (c) 2009 Michael Buesch <mb@bu3sch.de>
+#
+# Licensed under the GNU/GPL version 2 or (at your option) any later version.
+#
+
+import sys
+import os
+
+def usage():
+ print("Usage: %s PHYTYPES COREREVS /path/to/extracted/firmware" % sys.argv[0])
+ print("")
+ print("PHYTYPES is a comma separated list of:")
+ print("A => A-PHY")
+ print("AG => Dual A-PHY G-PHY")
+ print("G => G-PHY")
+ print("LP => LP-PHY")
+ print("N => N-PHY")
+ print("HT => HT-PHY")
+ print("LCN => LCN-PHY")
+ print("")
+ print("COREREVS is a comma separated list of core revision numbers.")
+
+if len(sys.argv) != 4:
+ usage()
+ sys.exit(1)
+
+phytypes = sys.argv[1]
+corerevs = sys.argv[2]
+fwpath = sys.argv[3]
+
+phytypes = phytypes.split(',')
+try:
+ corerevs = map(lambda r: int(r), corerevs.split(','))
+except ValueError:
+ print("ERROR: \"%s\" is not a valid COREREVS string\n" % corerevs)
+ usage()
+ sys.exit(1)
+
+
+fwfiles = os.listdir(fwpath)
+fwfiles = filter(lambda str: str.endswith(".fw"), fwfiles)
+if not fwfiles:
+ print("ERROR: No firmware files found in %s" % fwpath)
+ sys.exit(1)
+
+required_fwfiles = []
+
+def revs_match(revs_a, revs_b):
+ for rev in revs_a:
+ if rev in revs_b:
+ return True
+ return False
+
+def phytypes_match(types_a, types_b):
+ for type in types_a:
+ type = type.strip().upper()
+ if type in types_b:
+ return True
+ return False
+
+revmapping = {
+ "ucode2.fw" : (2,3,),
+ "ucode4.fw" : (4,),
+ "ucode5.fw" : (5,6,7,8,9,10,),
+ "ucode11.fw" : (11,12,),
+ "ucode13.fw" : (13,),
+ "ucode14.fw" : (14,),
+ "ucode15.fw" : (15,),
+ "ucode16_mimo.fw" : (16,),
+ "ucode24_mimo.fw" : (24,),
+ "ucode29_mimo.fw" : (29,),
+ "pcm4.fw" : (1,2,3,4,),
+ "pcm5.fw" : (5,6,7,8,9,10,),
+}
+
+initvalmapping = {
+ "a0g1initvals5.fw" : ( (5,6,7,8,9,10,), ("AG",), ),
+ "a0g0initvals5.fw" : ( (5,6,7,8,9,10,), ("A", "AG",), ),
+ "b0g0initvals2.fw" : ( (2,4,), ("G",), ),
+ "b0g0initvals5.fw" : ( (5,6,7,8,9,10,), ("G",), ),
+ "b0g0initvals13.fw" : ( (13,), ("G",), ),
+ "n0initvals11.fw" : ( (11,12,), ("N",), ),
+ "n0initvals16.fw" : ( (16,), ("N",), ),
+ "lp0initvals13.fw" : ( (13,), ("LP",), ),
+ "lp0initvals14.fw" : ( (14,), ("LP",), ),
+ "lp0initvals15.fw" : ( (15,), ("LP",), ),
+ "lcn0initvals24.fw" : ( (24,), ("LCN",), ),
+ "ht0initvals29.fw" : ( (29,), ("HT",), ),
+ "a0g1bsinitvals5.fw" : ( (5,6,7,8,9,10,), ("AG",), ),
+ "a0g0bsinitvals5.fw" : ( (5,6,7,8,9,10,), ("A", "AG"), ),
+ "b0g0bsinitvals5.fw" : ( (5,6,7,8,9,10,), ("G",), ),
+ "n0bsinitvals11.fw" : ( (11,12,), ("N",), ),
+ "n0bsinitvals16.fw" : ( (16,), ("N",), ),
+ "lp0bsinitvals13.fw" : ( (13,), ("LP",), ),
+ "lp0bsinitvals14.fw" : ( (14,), ("LP",), ),
+ "lp0bsinitvals15.fw" : ( (15,), ("LP",), ),
+ "lcn0bsinitvals24.fw" : ( (24,), ("LCN",), ),
+ "ht0bsinitvals29.fw" : ( (29,), ("HT",), ),
+}
+
+for f in fwfiles:
+ if f in revmapping:
+ if revs_match(corerevs, revmapping[f]):
+ required_fwfiles += [f]
+ continue
+ if f in initvalmapping:
+ if revs_match(corerevs, initvalmapping[f][0]) and\
+ phytypes_match(phytypes, initvalmapping[f][1]):
+ required_fwfiles += [f]
+ continue
+ print("WARNING: Firmware file %s not found in the mapping lists" % f)
+
+for f in fwfiles:
+ if f not in required_fwfiles:
+ print("Deleting %s" % f)
+ os.unlink(fwpath + '/' + f)
+
diff --git a/tools/b43-tools/files/b43-fwsquash.py b/tools/b43-tools/files/b43-fwsquash.py
new file mode 100755
index 0000000..cd88181
--- /dev/null
+++ b/tools/b43-tools/files/b43-fwsquash.py
@@ -0,0 +1,122 @@
+#!/usr/bin/env python
+#
+# b43 firmware file squasher
+# Removes unnecessary firmware files
+#
+# Copyright (c) 2009 Michael Buesch <mb@bu3sch.de>
+#
+# Licensed under the GNU/GPL version 2 or (at your option) any later version.
+#
+
+import sys
+import os
+
+def usage():
+ print("Usage: %s PHYTYPES COREREVS /path/to/extracted/firmware" % sys.argv[0])
+ print("")
+ print("PHYTYPES is a comma separated list of:")
+ print("A => A-PHY")
+ print("AG => Dual A-PHY G-PHY")
+ print("G => G-PHY")
+ print("LP => LP-PHY")
+ print("N => N-PHY")
+ print("HT => HT-PHY")
+ print("LCN => LCN-PHY")
+ print("")
+ print("COREREVS is a comma separated list of core revision numbers.")
+
+if len(sys.argv) != 4:
+ usage()
+ sys.exit(1)
+
+phytypes = sys.argv[1]
+corerevs = sys.argv[2]
+fwpath = sys.argv[3]
+
+phytypes = phytypes.split(',')
+try:
+ corerevs = map(lambda r: int(r), corerevs.split(','))
+except ValueError:
+ print("ERROR: \"%s\" is not a valid COREREVS string\n" % corerevs)
+ usage()
+ sys.exit(1)
+
+
+fwfiles = os.listdir(fwpath)
+fwfiles = filter(lambda str: str.endswith(".fw"), fwfiles)
+if not fwfiles:
+ print("ERROR: No firmware files found in %s" % fwpath)
+ sys.exit(1)
+
+required_fwfiles = []
+
+def revs_match(revs_a, revs_b):
+ for rev in revs_a:
+ if rev in revs_b:
+ return True
+ return False
+
+def phytypes_match(types_a, types_b):
+ for type in types_a:
+ type = type.strip().upper()
+ if type in types_b:
+ return True
+ return False
+
+revmapping = {
+ "ucode2.fw" : (2,3,),
+ "ucode4.fw" : (4,),
+ "ucode5.fw" : (5,6,7,8,9,10,),
+ "ucode11.fw" : (11,12,),
+ "ucode13.fw" : (13,),
+ "ucode14.fw" : (14,),
+ "ucode15.fw" : (15,),
+ "ucode16_mimo.fw" : (16,),
+ "ucode24_mimo.fw" : (24,),
+ "ucode29_mimo.fw" : (29,),
+ "pcm4.fw" : (1,2,3,4,),
+ "pcm5.fw" : (5,6,7,8,9,10,),
+}
+
+initvalmapping = {
+ "a0g1initvals5.fw" : ( (5,6,7,8,9,10,), ("AG",), ),
+ "a0g0initvals5.fw" : ( (5,6,7,8,9,10,), ("A", "AG",), ),
+ "b0g0initvals2.fw" : ( (2,4,), ("G",), ),
+ "b0g0initvals5.fw" : ( (5,6,7,8,9,10,), ("G",), ),
+ "b0g0initvals13.fw" : ( (13,), ("G",), ),
+ "n0initvals11.fw" : ( (11,12,), ("N",), ),
+ "n0initvals16.fw" : ( (16,), ("N",), ),
+ "lp0initvals13.fw" : ( (13,), ("LP",), ),
+ "lp0initvals14.fw" : ( (14,), ("LP",), ),
+ "lp0initvals15.fw" : ( (15,), ("LP",), ),
+ "lcn0initvals24.fw" : ( (24,), ("LCN",), ),
+ "ht0initvals29.fw" : ( (29,), ("HT",), ),
+ "a0g1bsinitvals5.fw" : ( (5,6,7,8,9,10,), ("AG",), ),
+ "a0g0bsinitvals5.fw" : ( (5,6,7,8,9,10,), ("A", "AG"), ),
+ "b0g0bsinitvals5.fw" : ( (5,6,7,8,9,10,), ("G",), ),
+ "n0bsinitvals11.fw" : ( (11,12,), ("N",), ),
+ "n0bsinitvals16.fw" : ( (16,), ("N",), ),
+ "lp0bsinitvals13.fw" : ( (13,), ("LP",), ),
+ "lp0bsinitvals14.fw" : ( (14,), ("LP",), ),
+ "lp0bsinitvals15.fw" : ( (15,), ("LP",), ),
+ "lcn0bsinitvals24.fw" : ( (24,), ("LCN",), ),
+ "ht0bsinitvals29.fw" : ( (29,), ("HT",), ),
+}
+
+for f in fwfiles:
+ if f in revmapping:
+ if revs_match(corerevs, revmapping[f]):
+ required_fwfiles += [f]
+ continue
+ if f in initvalmapping:
+ if revs_match(corerevs, initvalmapping[f][0]) and\
+ phytypes_match(phytypes, initvalmapping[f][1]):
+ required_fwfiles += [f]
+ continue
+ print("WARNING: Firmware file %s not found in the mapping lists" % f)
+
+for f in fwfiles:
+ if f not in required_fwfiles:
+ print("Deleting %s" % f)
+ os.unlink(fwpath + '/' + f)
+
diff --git a/tools/b43-tools/patches/.svn/entries b/tools/b43-tools/patches/.svn/entries
new file mode 100644
index 0000000..d2d454a
--- /dev/null
+++ b/tools/b43-tools/patches/.svn/entries
@@ -0,0 +1,130 @@
+10
+
+dir
+36060
+svn://svn.openwrt.org/openwrt/trunk/tools/b43-tools/patches
+svn://svn.openwrt.org/openwrt
+
+
+
+2013-02-28T10:43:02.730422Z
+35830
+hauke
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3c298f89-4303-0410-b956-a3cf2f4a3e73
+
+002-no_libfl.patch
+file
+
+
+
+
+2013-03-17T12:13:22.000000Z
+80715d12b1af61c7679168155f97d4aa
+2012-10-25T16:39:38.826580Z
+33934
+nbd
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+219
+
+100-b43-asm-fix-compile-error-undefined-reference-to-yyd.patch
+file
+
+
+
+
+2013-03-17T12:13:22.000000Z
+e4f61db6959bd82fb13ea3a9ec0c22ba
+2013-02-28T10:43:02.730422Z
+35830
+hauke
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+778
+
+001-fw-dirname.patch
+file
+
+
+
+
+2013-03-17T12:13:22.000000Z
+9d956bcfa5498419bfb7c08e27f69821
+2012-10-08T20:15:42.151953Z
+33668
+hauke
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+352
+
diff --git a/tools/b43-tools/patches/.svn/text-base/001-fw-dirname.patch.svn-base b/tools/b43-tools/patches/.svn/text-base/001-fw-dirname.patch.svn-base
new file mode 100644
index 0000000..e9bd032
--- /dev/null
+++ b/tools/b43-tools/patches/.svn/text-base/001-fw-dirname.patch.svn-base
@@ -0,0 +1,16 @@
+--- a/fwcutter/fwcutter.c
++++ b/fwcutter/fwcutter.c
+@@ -48,13 +48,8 @@
+ #include "fwcutter.h"
+ #include "fwcutter_list.h"
+
+-#if defined(__DragonFly__) || defined(__FreeBSD__)
+-#define V3_FW_DIRNAME "v3"
+-#define V4_FW_DIRNAME "v4"
+-#else
+ #define V3_FW_DIRNAME "b43legacy"
+ #define V4_FW_DIRNAME "b43"
+-#endif
+
+ static struct cmdline_args cmdargs;
+
diff --git a/tools/b43-tools/patches/.svn/text-base/002-no_libfl.patch.svn-base b/tools/b43-tools/patches/.svn/text-base/002-no_libfl.patch.svn-base
new file mode 100644
index 0000000..2e55b08
--- /dev/null
+++ b/tools/b43-tools/patches/.svn/text-base/002-no_libfl.patch.svn-base
@@ -0,0 +1,14 @@
+--- a/assembler/main.c
++++ b/assembler/main.c
+@@ -1268,6 +1268,11 @@ static void initialize(void)
+ #endif /* YYDEBUG */
+ }
+
++int yywrap(void)
++{
++ return 1;
++}
++
+ int main(int argc, char **argv)
+ {
+ int err, res = 1;
diff --git a/tools/b43-tools/patches/.svn/text-base/100-b43-asm-fix-compile-error-undefined-reference-to-yyd.patch.svn-base b/tools/b43-tools/patches/.svn/text-base/100-b43-asm-fix-compile-error-undefined-reference-to-yyd.patch.svn-base
new file mode 100644
index 0000000..fc0553d
--- /dev/null
+++ b/tools/b43-tools/patches/.svn/text-base/100-b43-asm-fix-compile-error-undefined-reference-to-yyd.patch.svn-base
@@ -0,0 +1,27 @@
+--- a/assembler/Makefile
++++ b/assembler/Makefile
+@@ -30,7 +30,7 @@ BIN = b43-asm.bin
+ SRCS = parser.c scanner.c main.c initvals.c util.c args.c
+
+ # YACC related CFLAGS
+-CFLAGS += -DYYSTYPE="void *" -DYYERROR_VERBOSE -DYYDEBUG -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Wno-unused
++CFLAGS += -DYYSTYPE="void *" -DYYERROR_VERBOSE -DYYDEBUG=1 -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Wno-unused
+
+ .SUFFIXES:
+ .PHONY: all install clean distclean
+diff --git a/assembler/main.c b/assembler/main.c
+index afca996..a62a15e 100644
+--- a/assembler/main.c
++++ b/assembler/main.c
+@@ -1260,7 +1260,7 @@ static void initialize(void)
+ {
+ INIT_LIST_HEAD(&infile.sl);
+ INIT_LIST_HEAD(&infile.ivals);
+-#ifdef YYDEBUG
++#if YYDEBUG
+ if (IS_INSANE_DEBUG)
+ yydebug = 1;
+ else
+--
+1.7.10.4
+
diff --git a/tools/b43-tools/patches/001-fw-dirname.patch b/tools/b43-tools/patches/001-fw-dirname.patch
new file mode 100644
index 0000000..e9bd032
--- /dev/null
+++ b/tools/b43-tools/patches/001-fw-dirname.patch
@@ -0,0 +1,16 @@
+--- a/fwcutter/fwcutter.c
++++ b/fwcutter/fwcutter.c
+@@ -48,13 +48,8 @@
+ #include "fwcutter.h"
+ #include "fwcutter_list.h"
+
+-#if defined(__DragonFly__) || defined(__FreeBSD__)
+-#define V3_FW_DIRNAME "v3"
+-#define V4_FW_DIRNAME "v4"
+-#else
+ #define V3_FW_DIRNAME "b43legacy"
+ #define V4_FW_DIRNAME "b43"
+-#endif
+
+ static struct cmdline_args cmdargs;
+
diff --git a/tools/b43-tools/patches/002-no_libfl.patch b/tools/b43-tools/patches/002-no_libfl.patch
new file mode 100644
index 0000000..2e55b08
--- /dev/null
+++ b/tools/b43-tools/patches/002-no_libfl.patch
@@ -0,0 +1,14 @@
+--- a/assembler/main.c
++++ b/assembler/main.c
+@@ -1268,6 +1268,11 @@ static void initialize(void)
+ #endif /* YYDEBUG */
+ }
+
++int yywrap(void)
++{
++ return 1;
++}
++
+ int main(int argc, char **argv)
+ {
+ int err, res = 1;
diff --git a/tools/b43-tools/patches/100-b43-asm-fix-compile-error-undefined-reference-to-yyd.patch b/tools/b43-tools/patches/100-b43-asm-fix-compile-error-undefined-reference-to-yyd.patch
new file mode 100644
index 0000000..fc0553d
--- /dev/null
+++ b/tools/b43-tools/patches/100-b43-asm-fix-compile-error-undefined-reference-to-yyd.patch
@@ -0,0 +1,27 @@
+--- a/assembler/Makefile
++++ b/assembler/Makefile
+@@ -30,7 +30,7 @@ BIN = b43-asm.bin
+ SRCS = parser.c scanner.c main.c initvals.c util.c args.c
+
+ # YACC related CFLAGS
+-CFLAGS += -DYYSTYPE="void *" -DYYERROR_VERBOSE -DYYDEBUG -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Wno-unused
++CFLAGS += -DYYSTYPE="void *" -DYYERROR_VERBOSE -DYYDEBUG=1 -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Wno-unused
+
+ .SUFFIXES:
+ .PHONY: all install clean distclean
+diff --git a/assembler/main.c b/assembler/main.c
+index afca996..a62a15e 100644
+--- a/assembler/main.c
++++ b/assembler/main.c
+@@ -1260,7 +1260,7 @@ static void initialize(void)
+ {
+ INIT_LIST_HEAD(&infile.sl);
+ INIT_LIST_HEAD(&infile.ivals);
+-#ifdef YYDEBUG
++#if YYDEBUG
+ if (IS_INSANE_DEBUG)
+ yydebug = 1;
+ else
+--
+1.7.10.4
+