Now that I'm not completely clueless (just mostly clueless), edited the build script to make it more kterm-friendly as well as fixed some minor stuff. Would you look at that, it actually worked.
I used the PW2 kindletool binary for packaging. (extracted from: kual-mrinstaller-1.7.N-r15706.tar.xz/extensions/MRInstaller/data/mrpi-PW2.tar.gz/bin/PW2)
Tested working on a PW4 running 5.10.1.2 using latest snapshot versions (2019-01-28).