redsn0w beta has been updated to hacktivate iOS 4.0 for iPhone3G (in addition to jailbreaking the iPhone3G and iPod Touch 2G). The download links for redsn0w 0.9.5b5-3 are:
For now, the redsn0w beta release supports only the iPhone3G and iPod Touch 2G. It’s still a beta, so you’ll need to let Cydia reorganize, reload, and update after using redsn0w.
We will have a tutorial soon on how to jailbreak and unlock your iPhone 3G on iOS 4.0!