One story shown in Buddhist art stupas has Gautama Buddha (also known as Shakyamuni) in a former incarnation known as Sumedha, a rich Brahmin turned hermit kneeling and laying his long black hair on the ground, in an act of piety that the Dīpankara Buddha could cross a puddle of mud without soiling his feet.
It was the time of the golden occasion of welcoming the Buddha Dipankara to the great city of Rammavati. The citizens of Rammavati were repairing the road, eagerly waiting for the coming of Dipankara Buddha. While travelling through space, the ascetic Sumedha saw the citizens being engaged cheerfully in road-reconstruction and city-decoration, wondering what was going on below, he came down and questioned them. They answered that they were repairing the road in order that the Buddha and his disciples could tread on it comfortably.
The ascetic Sumedha felt greatly delighted and thought: "Oh! it's very hard to hear the word 'Buddha', and it is, indeed, harder to become a Buddha." He requested them to give him a chance to repair a part of the road.
Although the road-repairing could be finished quickly by his supernormal power, he used his own labour with the view that he would earn more merit by using his labour than by using his super-normal power. Before he finished repairing his portion of the road, the Buddha and his disciples came. To prevent the feet of the Buddha and his disciples from getting soiled, he prostrated himself on the mud to form a man-bridge. Among the welcoming people, there was a young woman named Sumitta. As soon as the young woman saw the ascetic, she was very happy and delighted. So, she gave five lotus-flowers to him leaving three lotus-flowers in her hands. The ascetic offered the flowers to the Buddha while lying on the muddy road.
This story between Dīpankara Buddha and Shakyamuni, occurred many lifetimes before Shakyamuni's eventual enlightenment. From this act, Dīpankara told Sumedha "In the ages of the future you will come to be a Buddha called 'Shakyamuni'", to which Sumedha replied, "I am to become a Buddha, awakened to enlightenment; may you tread with your feet on my hair - on my birth, old age, and death."
Dīpankara Buddha then said, "Freed from human existence, you will become an effective teacher, for the sake of the world. Born among the Shakyas, as the epitome of the Triple World, the Lamp of all Beings, you will be known as Gautama. You will be the son of King Suddhodana and Queen Maya. Shariputta and Moggallana will be your chief disciples. Your caretaker will name as Ananda."
In the 40-plus years of his life after enlightenment, the Buddha Shakayamuni is said to have recounted almost 554 past life stories, (called Jataka tales) of his prior existences. Gautama Bodhisattva is quoted as saying a person starts the journey to become a Buddha filling 10 Paramita or "perfections". Some sources and scriptures recount that Shakayamuni Buddha was born in the time of Dīpankara Buddha, and was rich and gave away all his wealth to become a Monk. It is said that Gautama Bodhisattva received his first Niyatha Vivarana, (or definite foresighting by a Buddha) from Dīpankara Buddha. This encounter, among many other predictions of Shakyamuni Buddha's future enlightenment, can be found in a Mahayana text named the Sangatha Sutra.
Source : Buddhist Wisdom Hall Group