cab build refactoring, part 5
inf builder refactoring, final
fix bugs in inf builder, common part