 As they became followers of the Yuwen branch of the Xianbei, their names were named to Yuwen.His great-great-grandfather Yuwen Juyudun (宇文侰與敦), great-grandfather Yuwen Changshou (宇文長壽), and grandfather Yuwen Gu (宇文孤) all served under Northern Wei as army officers at Woye Garrison (沃野, in modern Bayan Nur, Inner Mongolia).Yuwen Shu's father Yuwen Sheng (宇文盛) was a general under Northern Zhou and eventually served as the minister of imperial clan affairs, one of the six main ministers under Northern Zhou's six-department governmental structure.