Around 1046 BC King Wu of Zhou, joined by the Yong, Shu and Qiang peoples, destroyed the Shang at the battle of Muye and founded the Zhou, seated at Haojing (modern Xi'an) - the Western Zhou. The Duke of Zhou codified ritual and music, quelled the Three Guards' revolt and built the eastern capital Luoyi, fixing the enfeoffment-and-lineage order: the king enfeoffed lords to hold the quarters, primogeniture ran through the ruling houses, and graded ritual structured society. After the Cheng-Kang flourishing the royal house waned; in 841 BC the guoren uprising expelled King Li, and the 'Gonghe regency' that followed opens China's securely dated chronology. In 771 BC the Marquis of Shen with the Quanrong dog-tribes killed King You at Mount Li; the Western Zhou fell, King Ping moved east to Luoyi, and the Eastern Zhou began.