How do you upgrade a Jailbroken 3G from 3.0.1 to 3.1.2?

I have a Jailbroken White 16GB iPhone 3G running on the 3.0.1 firmware. I'd like to upgrade it to the 3.1.2 firmware because certain apps like MySpace no longer work on 3.0.1, and I'd also like to keep it jailbroken. How do I do this? I need detailed steps, because I'm really paranoid ever since Apple started cracking the whip on Jailbroken devices. I could care less if I lose everything that's on it, as long as I can keep it unlocked and jailbroken.
Bump. I reeeeally need help, I'm clueless on this matter!
go to iphonedownloadblog.com and view the tutorials.

Original thread: https://forums.imore.com/threads/how-do-you-upgrade-a-jailbroken-3g-from-3-0-1-to-3-1-2.189057/