I have summerzied some steps and I hope this can help some people, but I want to confirm the steps (sorry this is not a full tutorial but with enough information you can search across internet), since I feel I missed some steps?
1, Prepare the build environment and I am using Linux. More details can be found on openwrt website. A few important points:
* the openwrt version. I picked Chaos Calmer 15.05 which is the latest, although it is not in fully stable release. (RC2 for now)
* the default configuration has no webGUI (Luci), so if you download the default bin, you have to telnet then ssh into via putty.
2, Config - make menuconfig is very useful. This is the time you can pull ddserver source code from github and put into the package folder. so in the menuconfig, you will see the ddserver option under multimedia category (also, as I mentioned above, pick Luci so you have webGUI). It will solve the dependency automatically. NOTE: You'd better install the packages into bin NOW, install using opkg later is not feasible since the flash space is too small to do that. (the bin is compressed so it can fit in)
3, Make it! The major pain is from bad internet connection. You can 'make download' first to download all the sources, then a single make will much faster (less than 10 minutes).
4, get the .bin file and install it on your router!
So here comes my questions:
* Is there anything more I need to config to enable the ddserver by default? For example, it will be in /etc/init.d and auto start by default, which is great. But the I am not sure about the network configuration. Should I leave it as it is or do some change? The Wifi is off by default, so more or less I should make some change? Or should I change it via webGUI?
* Just to confirm. so ohci is good enough for camera USB connection? should I install kmod-usb-uhci in the kernel setting? I tested, and it works all right without uhci.
* A very funny findout: If I config /etc/config/network without a gateway setting (e.g. This router will be a AP in the network) along with bridging function, the camera will not be detected (LED will not flashing while camera is on). As soon as the gateway is set, camera can be detected immediately. Is this a ddserver setting or some system function? As I said I am still confused about the network configuration, so maybe they are related.
* This is not directly related to ddserver, but about how to flash the openwrt... For a different model, say tp-link MR11U, which has the same hardware as MR3040. But the original webGUI will not allow a MR3040 factory bin. What I did, was using openwrt default MR11U factory bin from webGUI, then using mtd command convert it with openwrt default MR3040 factory bin, then sysupgrade command flash it with ddserver MR3040 sysupgrade bin.
Just now I feel I can also mtd the ddserver MR3040 factory directly into MR11U openwrt directly (actually this is the MR11U with ddserver compiled by myself). Unfortunately, I bricked it.

Maybe you want to ask me why I did that, because I want to check the network configuration in the ddserver MR3040 bin provided here....
OK, so much story. I hope above information can help someone and perhaps some one could help me...with the network setup... (I will try to debrick by myself and let everyone know). Thanks!