sentences:  During Emperor Wen's reign, he participated in the civil service selection process, and the deputy minister of civil service affairs, Gao Xiaoji (), was particularly impressed with him.Gao gave him the post as a county magistrate, although Du did not remain at that post for long and resigned.In 617, the governor of Taiyuan Li Yuan rebelled against the rule of Emperor Wen's son Emperor Yang, and by 618 had established the Tang Dynasty at Chang'an (as its Emperor Gaozu).