WIP: rework image builder code for x86

No match.