5. In the geometric sequence $\left\{a_{n}\right\}$ with all terms being positive, $a_{1}=2, a_{8}+a_{10}=16\left(a_{4}+a_{6}\right)$. The sequence $\left\{b_{n}\right\}$ satisfies: for any positive integer $n$, $a_{1} b_{1}+a_{2} b_{2}+\cdots+a_{n} b_{n}=(n-1) \cdot 2^{n+1}+2$, then $\frac{b_{1}}{a_{1}}+\frac{b_{2}}{a_{2}}+\cdots+\frac{b_{n}}{a_{n}}=$ $\qquad$
$$
a_{8}+a_{10}=q^{4}\left(a_{4}+a_{6}\right)=16\left(a_{4}+a_{6}\right) \Rightarrow q=2 \Rightarrow a_{n}=2^{n} \text {, }
$$

and $a_{n} b_{n}=2^{n} b_{n}=(n-1) \cdot 2^{n+1}-(n-2) \cdot 2^{n}=2^{n} n \Rightarrow b_{n}=n$, also $\frac{n}{2^{n}}=\frac{n+1}{2^{n-1}}-\frac{n+2}{2^{n}}$, so $\frac{1}{2}+\frac{2}{2^{2}}+\cdots+\frac{n}{2^{n}}=2-\frac{n+2}{2^{n}}$.