Riolu starts with 70 friendship, unless you catch it in a friend ball.
Walking 128 steps has a 50% chance of raising its friendship by 1, unless you catch it in a luxury ball. Riolu can evolve into Lucario if its friendship is at least 220.
Therefore, it takes 256 steps on average to raise its friendship by 1. 256 * (220 - 70) = 38400 steps. It'll probably evolve faster if you feed it EV berries or level it up.