1 # Copyright © 2023 Nick Bowler
2 # License GPLv3+: GNU General Public License version 3 or any later version.
3 # This is free software: you are free to change and redistribute it.
4 # There is NO WARRANTY, to the extent permitted by law.
8 inherit toolchain-funcs
10 SHA1="2fe10ea6690df9a068cb21cde537236bae784a14"
11 MY_P="b43-tools-$SHA1"
13 DESCRIPTION="b43 wireless firmware (dis)assembler"
14 HOMEPAGE="https://bues.ch/cms/hacking/misc.html#linux_b43_driver_firmware_tools"
15 SRC_URI="https://bues.ch/cgit/b43-tools.git/snapshot/$MY_P.tar.xz"
19 KEYWORDS="~amd64 ~ppc"
23 BDEPEND="sys-devel/bison
28 all: assembler/all disassembler/all
29 install: assembler/install disassembler/install
30 assembler/all disassembler/all: ; $(MAKE) -C $(@D) $(@F)
31 assembler/install disassembler/install: ; $(MAKE) -C $(@D) $(@F)
38 emake -f build.mk V=1 CC="$(tc-getCC)"
43 emake -f build.mk PREFIX=$PWD install
45 # For now, don't install the python scripts under disassembler/ since
46 # that's just extra pain and is not needed to build openfwwf.
53 ebegin "running b43-asm test.asm test.bin"
55 ./b43-asm test.asm test.bin; }
56 ) || { eend $?; die "b43-asm failed"; }
59 ebegin "running selftest.sh"
61 PATH=:../disassembler:$PATH ./selftest.sh test.bin; }
62 ) || { eend $?; die "selftest.sh failed"; }