From DD-WRT Wiki
This install needs to be updated, I just wanted to get the page started.
Special Thanks to Eko
Asus RT-N12 is now supported. Actually it is quite good router for its price.
If you don't need USB and Giga ethernet and 5GHz, it is good alternative to e.g. Linksys wrt160nv3 etc...
It has bcm4716b0 cpu, 4 MB flash and 32 MB ram + 2 external removable antennas.
Please don't flash any old builds.
Ok, here it is... something to start with.... then simple GUI update will do.
For Revision B1 of the RT-N12B1 devices use this firmware image: dd-wrt.v24-17990_NEWD-2_K2.6_mini_RT-N12B1.trx
There is also a revision C of the hardware. For the RT-N12C1 Try: dd-wrt.v24-18774_NEWD-2_K2.6_mini_RT-N12C1.trx
For revision RT-N12 D1 support is now in beta:
Forum: Asus Rt N12 D1 - SOLUTION 
It appears that as of 30771 (BS) 2016-10-18 D1 is supported 
FTP with known good firmware 
Check the label on the bottom of your device or view the Top left of the original ASUS firmware for your hardware revision. Do not flash the initial firmware for a different revision of hardware than yours. You may still be able to recover your device if it enters an infinite reboot loop using recovery mode as a result of loading incompatible firmware. (Hold recover button for 30 seconds when applying the power, with static IP settings on your computer connected via ethernet)
To clear NVRAM hold down the WPS button when applying power for 30 seconds on all the RT-N12 models.
 INSTALLATION INSTRUCTIONS
DO NOT use Firefox for upgrading builds! Use Internet Explorer!!!!
0. Download the firmware above and extract it to your desktop or a convenient location.
1. For simplicity, connect only the PC to one of the router's LAN ports with a normal [uplink] ethernet cable. No other modem,computers,routers,switches, etc should be connected.
2. In order to prevent DHCP from interupting the connection, you will need to manually set the address of your PC's Network LAN card to a STATIC IP in the same subnet of the router, such as 192.168.1.10 with subnet mask 255.255.255.0 . Also make sure all other adapters,such as wireless, which might be seen as "clients" by the router are disabled. Only the main LAN connection [IP: 192.168.1.10] should be able to communicate with the router.
3. Unplug the power connector from the back of the router.
4. While pushing & holding the recessed Restore button on the back of the router, plug the power connector back in. The Restore button is NOT the raised red WPS button.
5. When the power LED slowly blinks on and off, release the Restore button. The router is now in "RESCUE MODE".
6. Use the Asus Firmware Restoration Utility [which you should have installed on the PC] to upload the DD-WRT mini-asus.trx file from the location where you saved it.
DO NOT DISTURB THE ROUTER or PC FOR THE NEXT FEW MINUTES. BE PATIENT!
6. After the upgrade, the Utility should ask for a router reboot. Give it AT LEAST a minute to be on the safe side before removing the power. Then unplug the power from the router, wait 10 seconds or so and plug the power back in. You should now be able to access the web interface.
7. Return your Net adapter properties for TCP/IP to DHCP "Automatically Obtain IP"
8. Type 192.168.1.1 into your browser and set your username as root and pick a password.
 ALTERNATE INSTALLATION METHOD FOR ASUS TO DD-WRT FW UPDATE
The steps listed above did not work for me, but these steps did.
1) Disconnect all ethernet cables from the RT-N12 except 1 going to your NIC.
2) Turn off all wireless clients (notebooks, PS3 etc...).
2a) Turn off all programs on your computer that may be trying to access the internet - e.g. open browser tabs, IM software, etc.
3) Ensure DHCP is enabled in the ASUS firmware and retreive IP/DNS automatically is set in your NIC properties.
(When you open your IE browser it will instruct you to plug back in your WAN ISP cable, if your PC is still seeing the router. If not, you may need to reboot router and/or PC.)
4) Do the 30/30/30 peacock method of putting your router in recovery mode.
5) Open the router IP of 192.168.1.1. The page will open to a built in browser (HTTP) recovery console.
6) Click on the link below Reboot to reset/flash the Vram.
7) Click the Browse button to browse to your DD-WRT firmware file location.
8) Click the Upload button.
The router will upload the file fairly quickly, and you will be brought to the next screen that says "Allow router time to reboot." BE PATIENT this takes about 4-5 minutes. You will see the LAN1 light turn off and notice the "Network Cable Unplugged" windows popup message in task bar. Wait for the light to turn back on and the PC to reconnect to router.
9) Click the "Continue" link shown on the page.
Clicking "Continue" forces the router to perform another reboot. When it comes back up you will be at the DD-WRT admin login screen.
If the login screen is white and looks very basic you will need to perform another reboot of the router by removing the power cable.