I charge mine from a battery pack when I stop at controls, you can get a good 20-30% in about 15 mins at a control, if you stop for lunch, 30 mins will put plenty of charge in to complete a 300, even with back light on for half of it.
I have an extra mount on my stem for charging on the go if I really need to. With the mount I have on mine (hide my bell), there isn't enough space to fit in the right angle connector I have (I got a 90° right angle usb cable just for this purpose), but on the stem mount, it fits just fine. I've used it maybe 3 times in nearly 18 months. But it's really useful if it's not raining and you forgot to charge earlier in a ride, and you just want to top it up...
I wouldn't plug it into a dynamo, you'll knacker the battery. Use a battery pack.
J