Fix some bug to generate target image

Cannot generate target image for mercury mw4530r.