From fa03d441e96eeec0781ccbe757a3641c9dcec785 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Wed, 15 Mar 2017 11:49:14 +0100 Subject: [PATCH] firmware: add custom IPQ wifi board definitions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit On the ath10k-devel ML Michael Kazior stated: "board-2 is a key-value store of actual board files. Some devices, notably qca61x4 hw3+ and qca4019 need distinct board files to be uploaded. Otherwise they fail in various ways." [0]. Later on Rajkumar Manoharan explained: "In QCA4019 platform, only radio specific calibration (pre-cal-data) is stored in flash. Board specific contents are read from board-2.bin. For each radio appropriate board data should be loaded. To fetch correct board data from board-2.bin bundle, pre-cal/radio specific caldata should be loaded first to get proper board id. |My understanding until now was that: | | * pre-cal data + board-2.bin info == actual calibration data Correct." [1]. The standard board-2.bin from the ath10k-firmware-qca4019 barely works on the RT-AC58U. Especially 5GHz clients fail to connect at all and if they do, they have very low throughput even right next to the router. Currently, the solution for this problem is to supply a custom board-2.bin for every device. To implement this feature, this method makes use of: Rafał Miłecki's "base-files: add support for overlaying rootfs content". This comes with a few limitations: 1. Since there can only be one board-2.bin at the right location, there can only one board overwrite installed at any time. (All packages CONFLICT with each other. It's also not possible to "builtin" multiple package.) 2. updating ath10k-firmware-qca4019 will also replace the board-2.bin. For this cases the user needs to manually reinstall the wifi-board package once the ath10k-firmware-qca4019 is updated. To create the individual board-2.bin: Use the ath10k-bdencoder utility from the qca-swiss-army-knife repository: The raw board.bin files have to be extracted from the vendor's source GPL.tar archieves. Signed-off-by: Alexis Green Signed-off-by: Christian Lamparter --- package/firmware/ipq-wifi/Makefile | 53 ++++++++++++++++++ package/firmware/ipq-wifi/board-fritz4040.bin | Bin 0 -> 24276 bytes package/firmware/ipq-wifi/board-nbg6617.bin | Bin 0 -> 24276 bytes package/firmware/ipq-wifi/board-rt-ac58u.bin | Bin 0 -> 24276 bytes 4 files changed, 53 insertions(+) create mode 100644 package/firmware/ipq-wifi/Makefile create mode 100644 package/firmware/ipq-wifi/board-fritz4040.bin create mode 100644 package/firmware/ipq-wifi/board-nbg6617.bin create mode 100644 package/firmware/ipq-wifi/board-rt-ac58u.bin diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile new file mode 100644 index 0000000000..2f1b280bec --- /dev/null +++ b/package/firmware/ipq-wifi/Makefile @@ -0,0 +1,53 @@ +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/version.mk + +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) +endef + +define Build/Compile +endef + +ALLWIFIBOARDS:=rt-ac58u fritz4040 nbg6617 +ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD)) + +define Package/ipq-wifi-default + SUBMENU:=ath10k IPQ4019 Boarddata + SECTION:=firmware + CATEGORY:=Firmware + DEPENDS:=@TARGET_ipq806x +ath10k-firmware-qca4019 + TITLE:=Custom Board +endef + +define generate-ipq-wifi-package + define Package/ipq-wifi-$(1) + $(call Package/ipq-wifi-default) + TITLE:=Board for $(3) + CONFLICTS:=$(PREV_BOARD) + endef + + define Package/ipq-wifi-$(1)/description +This device custom package board-2.bin overwrites the board-2.bin +file which is supplied by the ath10k-firmware-qca4019 package. + +This is package is only necessary for the $(3). +Don't install it for any other device! + endef + + define Package/ipq-wifi-$(1)/install-overlay + $(INSTALL_DIR) $$(1)/lib/firmware/ath10k/QCA4019/hw1.0 + $(INSTALL_DATA) ./$(2) $$(1)/lib/firmware/ath10k/QCA4019/hw1.0/board-2.bin + endef + + PREV_BOARD+=ipq-wifi-$(1) +endef + +$(eval $(call generate-ipq-wifi-package,rt-ac58u,board-rt-ac58u.bin,ASUS RT-AC58U/RT-ACRH13)) +$(eval $(call generate-ipq-wifi-package,fritz4040,board-fritz4040.bin,AVM FRITZBox 4040)) +$(eval $(call generate-ipq-wifi-package,nbg6617,board-nbg6617.bin,ZyXEL NBG6617)) + +$(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE)))) diff --git a/package/firmware/ipq-wifi/board-fritz4040.bin b/package/firmware/ipq-wifi/board-fritz4040.bin new file mode 100644 index 0000000000000000000000000000000000000000..8d17a9f38fd2a0d2931ba2570f0b5af0eef4ec6a GIT binary patch literal 24276 zcmeHPZB!H48NOinP*ItD@Daig5(0^Z0D(e;C?P~PKm?X5LbMhUl>{geln=umITjT$ zA}h)gFoGOZeWTV3n+XpZfl{pX+l>DeFB z_nrIR_r1?dl9{;=`8*>%CVi(WJ}xIlk(XYe1U4y(B@_XyN{`iU-CtfBU0S7$IZ&?E z$7sv8##vjX)%$D8@Me4x?B@Xs7y5ByL;mUE0oI(LCl=zPZ0?7f5&+iu_(KH%xD8K$ zwJ&@*5|JnY9}0kkgoJ;;c>`ojZ}9dX7t+YGhUv)b!!|DPc=~>?4k8lx3CjEX=5KGB z-sKNxgTF|@b0qbdI?Z9m6D~v~##%Q$Bo`2`X@gB+(q~&7$9?ERTzqD;3j?6KYQD?~>-NL(Rva+Pm;apoi zw51XbQJcZ*!Lg>sB27wGG<0ogJfKm+ZZ~?{plgm)_-L&6VxwMDAdRy*MA_%}fmS1w z4|K8LO*z=(;kdODP;xx8PVH3h& z1qO$NhLNB6Gd2DhJ0ql*T@5dY;1!aGr>Ca}zFo7%%gf8#CO$(Q4JE2)C-a5OhzLIX z6Y#>r`Mhu*uaM>oY*#3Dqfw0|MWCaju5RZ}b*2=oU+?Wrgp!H`d>$_hHkdyDdHe1i z3u=T7H-`H8c+zP9wRZIYj{J#HmTs#bh1Vl+c>Rg?QM}-hgf@wcz=g*R4Ty~3@wh05 z9R#(7+n^_(&&LOXquR#%7@H$h5EMbu(R3spjYssyj-O~b+uqqdR{=7cJa9>&qjWL- zIUQl6Y%yEykNP7)r~*}p70(q&HkvKYR?AU2qCzF8L@aqOK~m5Zaf&()jYFj9bQ0zP z$Le%WGTC%ilsf15I0Fd-W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vlm;Q6fv{^7vlKX*20(qbZ6L0)$+H&tXSB(Whu7y1j^BW>2+zQs7hvv$?`O4@Bgf>1Hk z6SCNCro7XMbwR~`s=FhyR>j&k-hK2y*0yLq!+Y3VSDU4lNLeA{eKqYFP0>{W z1lkZ+g-eEaS%5_P;iborg(+AF!|h4n!PSM7;IO`Jkt1t9RT zzqa8sTO8og->O$h8#FSBP#}nafAE(!xcu;NUU;FG+x*(bT<$wbulHTFwfVU*NP7L+ zMT_A8e#%54urLIiC3h@#zlCMHV!SARJ>2r`}so;zaY%Hurx zbuFT1CFH|z-oi^KO4yOjTdd`pKP}$Mm&ZBtKF#Z3!D}zBm0yo@>b*pNxAN=>uKi1Q zpZ{vk59hzrApgCnd+58R;J+_5w)64oN&Bbd*5k1$e*MhS+yXR;U%vp*C>Qrez?n7U Y`8f5n?e0Cxg=a_c>zDdl^XJF^AJTDnG5`Po literal 0 HcmV?d00001 diff --git a/package/firmware/ipq-wifi/board-nbg6617.bin b/package/firmware/ipq-wifi/board-nbg6617.bin new file mode 100644 index 0000000000000000000000000000000000000000..ab4d43e8cbc949c06f74e332807b8d92239a7de0 GIT binary patch literal 24276 zcmeHPdr(tX8b3f3b+K|ohzNKIAwYrF7CNWZXS>;2@eZ$zi`g^ z&f`1hJHLB!bMHMr?mLO`A@RFK;bEyE3F+|}LLisR0hFvzEC#?IhC)Tzj)J1X;6k}H z$kafo#Pjxb%W@MuBlek>cl71}w#whU;;2(38j-~gOzsF9giA3;4Z$_HSbvnx~p zfbkmV)5WavuD}pVn)D-q7f`0x5$896 z6O4EeFQmY^=s$Q{%tu@|rLlAO*whKs))~iT0R6|J8fIuz^O9Jav$ON6RjZuL1b{ns z%+wurXCCM}fBc%drBa@~J2_!| zKz*jZRQgWx*6~58l}R&_-~0v2gKs#2VEi+6ePv;GGOQd{H&sfrcO}P+_hZdq86O%n z)K_GSlcRM84+De1_*L~;IKtb>QRAOO1DVdC4|YwuE=nJur<-iCsTr~`qS-l_LmN^6qj+*j^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v?YdbX+vP97)oxuY*2YX}*Uh0!B*>V6$ zlt`2a5O^Jy2Eo+G;uVWP+sKj2v8^F>Uga0Hzf}v*1y*l5a_mCVNluApp-a-;-UDZM zDE$s?lw2G+b~&LXw9ZR0GJH^za(>J2ypEph$!rX-V#qe6ecgY!Ij+`Uz9~;Nyr-Lg z-lv)>tLx9}WxJzb=s-$WA1y`@4V4p*u1@l@xFV`S2vUc>FU4}bh-Ab;!<=yvz)rGzCHbPWVwgL zMRaX&-^ct9edO+WeOhU^@Ek*dR>rNep@=1RE9KTv7UVSfoyClm6hBp9+gM9mSy_{NI z_{x;(IP#7Z14kY>2q8Z|D2i3$N(l$fwd)v`fx?)hQ>57|Kmg;vQy~96tL@5z#o)g$ z_7sSC^?3QO$*sr6Ci(SdEPFy8v|;m&lgc1^X2{jAHkef%K!iX literal 0 HcmV?d00001 diff --git a/package/firmware/ipq-wifi/board-rt-ac58u.bin b/package/firmware/ipq-wifi/board-rt-ac58u.bin new file mode 100644 index 0000000000000000000000000000000000000000..379bdc8ce20b5760dbbdbf9790ca9f5b20c4df3b GIT binary patch literal 24276 zcmeHPTT~NC8ZMBVib^Np7D5w}00~P11QsJi2_Z58qA;u?MAt<`B>@%$ zIyy20j35UUx%9fqVRdGd+0}8KJ(}b0%e?urZ}T8~JbU)|uku!Snfhp`x;>{ldUufO<_%qsy7N~JVdeM7>-*zdBWjo>9~Vk=v=jo~ zzH8TS*n}_xgG0l@BdAaOxf1`3ofE2;O$l#^;2n~Or>Ca}p08Qs?d|O|Bfj@~YSi4P zC-Q|Xfq)NxqIi*!d|o7vSLo$O+*a8PMORiDfeRPv>v!$aWXZt#^*%nNH<>7k&*MeF z3d{FDZ{EHQgc@nXjp6>jo?c%6Bbs^ud;Q5#RxYm@gZCqF_?p(PF+Aa(;%p=~Rv1kh zma4_hNObh_X!cM+Pz1?9Gmu0y5ve)e+}eJo>(bzS1;}S4+9`#BG9-*=41|rcC2UOq z8i0hLN>nLPK2st&XpSUDqd*mi8k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