Hadithcore
Sunan Ibn Majah, 941
sahih· Darussalam

It was narrated that Ibn ‘Umar said:

“A small spear (Harbah) would be brought out to the Prophet (ﷺ) when he was travelling; he would plant it (in the ground) to perform prayer while facing it.”

حَدَّثَنَا مُحَمَّدُ بْنُ الصَّبَّاحِ، أَنْبَأَنَا عَبْدُ اللَّهِ بْنُ رَجَاءٍ الْمَكِّيُّ، عَنْ عُبَيْدِ اللَّهِ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، قَالَ كَانَ النَّبِيُّ ـ صلى الله عليه وسلم ـ تُخْرَجُ لَهُ حَرْبَةٌ فِي السَّفَرِ، فَيَنْصِبُهَا فَيُصَلِّي إِلَيْهَا ‏.‏

References2 variants
In-Book Reference
Book 5, Hadith 139
English Reference
Vol. 1, Book 5, Hadith 941