Its called a bootloop. I'm guessing you are rooted. You need to pull the battery then reinstall the rom after you wipe data and cache. I'm not familiar with the d2 and how to do that, sorry. Once you've done that, reinstall the new rom, or your backup.