iPhone Dev Team has finally released PwnageTool 4.0 (4.01 released), an official update after PwnageTool 3.1.5 which will jailbreak iOS 4.0 final version on iPhone 3GS, iPhone 3G and iPod Touch 2G. It will preserve your baseband version so that you can unlock it with Ultrasn0w 0.93. Before you may start the jailbreaking your device with PwnageTool 4.0 , please read the official notes below from iPhone Dev Team to make sure that your iPhone / iPod Touch is supported by PwnageTool 4.0 or not.
This PwnageTool version supports iPhone 3GS (Old BootROM + Non Spirit Jailbreak), iPhone 3G and iPod Touch 2G(non-MC model). It is not compatible with iPod Touch 3G, iPhone 2G, iPod Touch 2G(MC model) and iPod Touch 1G.
Notes from iPhone Dev Team's official blog:
Unlock: Unlock iPhone 3G/3GS baseband 04.26.08, 05.11.07, 05.12.01 and latest 05.13.04 on iOS 4 with Ultrasn0w 0.93
Update 1: Guide to Jailbreak iOS 4.0 with PwnageTool 4.0
Update 2: Guide to Jailbreak iPhone 3GS iOS 4.0 with PwnageTool 4.0
Update 3: Guide to Jailbreak iPhone 3G iOS 4.0 with PwnageTool 4.0
Update 4: Fix 16xx Errors During iOS 4 Custom FW Restore Using iReb
Update 5: Sn0wbreeze v1.7 - Jailbreak iOS 4 on iPhone 3GS (New Bootrom) / iPod Touch 2G (MC Models) & iPod Touch 3G