CHROMIUM: ath10k/wcn3990: add initial board-2.bin

Generated with the appended bash script using r00026.1.

Eventually, board-2.bin will be upstreamed, but it won't include the
HACK step (forcing b33 to be the default bdwlan). We do this for now, to
support boards that haven't yet set a board ID in the module OTP.

	#!/bin/bash

	# ${QCA_TOOLS} = path to https://github.com/qca/qca-swiss-army-knife.git
	QCA_TOOLS=/path/to/git/qca-swiss-army-knife
	# ${BDF_DIR} = path to BDF (with bdwlan.*)
	BDF_DIR=/path/to/sdm845-lc-1-0_test_device.git/wlan_proc/wlan/halphy_tools/host/bdfUtil/qca61x0/bdf

	[ $# -ne 1 ] && {
		echo "Too few arguments: expect output file (e.g., /path/to/board-2.bin)" 1>&2
		exit 1
	}

	OUT="$1"

	TMPDIR="$(mktemp -d)"
	JSON="${TMPDIR}/board-2.json"

	cleanup() {
		rm -rf "${TMPDIR}"
	}

	trap cleanup EXIT

	cp -r "${BDF_DIR}"/* "${TMPDIR}"
	## HACK: b33 is the best "default" board for us for now. Eventually, we should
	## get real board IDs OTP'd to the module.
	cp "${TMPDIR}/bdwlan.b33" "${TMPDIR}/bdwlan.bin"

	iter=0
	echo "[" > "${JSON}"
	for file in "${TMPDIR}"/bdwlan.*; do
		[[ $file == *.txt ]] && continue

		iter=$((iter+1))
		[ $iter -ne 1 ] && echo "  }," >> "${JSON}"

		echo "  {" >> "${JSON}"
		echo "          \"data\": \"$file\"," >> "${JSON}"
		if [[ $file == */bdwlan.bin ]]; then
			file_ext="ff"
		else
			file_ext="$(printf '%x\n' "$(basename "${file}" | sed -E 's:^.*\.b?([0-9a-f]*)$:0x\1:')")"
		fi
		echo "          \"names\": [\"bus=snoc,qmi-board-id=${file_ext}\"]" >> "${JSON}"
	done

	echo "  }" >> "${JSON}"
	echo "]" >> "${JSON}"

	"${QCA_TOOLS}"/tools/scripts/ath10k/ath10k-bdencoder -c "${JSON}" -o "${OUT}"

BUG=b:78530936, b:119626783
TEST=Cheza Wifi

Change-Id: Ie5c7503ceeab26119029f037a9e7cca1ce723f56
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1337445
Tested-by: Govind Singh <govinds@qualcomm.corp-partner.google.com>
Reviewed-by: Govind Singh <govinds@qualcomm.corp-partner.google.com>
diff --git a/ath10k/WCN3990/hw1.0/board-2.bin b/ath10k/WCN3990/hw1.0/board-2.bin
new file mode 100644
index 0000000..0b27efe
--- /dev/null
+++ b/ath10k/WCN3990/hw1.0/board-2.bin
Binary files differ