tools/thermal: Add util library