וְדָוִ֡ד עֹלֶה֩ בְמַעֲלֵ֨ה הַזֵּיתִ֜ים עֹלֶ֣ה ׀ וּבוֹכֶ֗ה וְרֹ֥אשׁ לוֹ֙ חָפ֔וּי וְה֖וּא הֹלֵ֣ךְ יָחֵ֑ף וְכָל־הָעָ֣ם אֲשֶׁר־אִתּ֗וֹ חָפוּ֙ אִ֣ישׁ רֹאשׁ֔וֹ וְעָל֥וּ עָלֹ֖ה וּבָכֹֽה׃
And David went up by the ascent of the mount of Olives, and wept as he went up; and he had his head covered, and went barefoot; and all the people that were with him covered every man his head, and they went up, weeping as they went up.
Malbim on II Samuel
David arose after separating from the Ark of God, and he arrived at the Mount of Olives, for there he separated from God's city and began to cry and cover his head and remove his sandals like a mourner.