Only recently Apple announced the availability of iPhone OS 4.0 for developers which brings a lot of new features including Multitasking and the new iAd platform.

While we believe that the firmware is not mature enough to be used by end-users, limiting it to the developers is still a bit unfair. Therefore! we are providing the links to download the iPhone 4.0 beta firmware.
It may be noted; the firmware may only be used by the user for testing-purposes as it is not meant for daily use. Also! Those who would like to keep their devices Jailbroken and Unlocked should stay away from this firmware as there is a good chance that they might not be able to restore to a previous firmware ever. The list of firmware as provided by Apple:
- iPhone1,2_4.0_8A230m_Restore.ipsw (iPhone 3G)
- iPhone2,1_4.0_8A230m_Restore.ipsw (iPhone 3GS)
- iPod2,1_4.0_8A230m_Restore.ipsw (iPod Touch 2G)
- iPod3,1_4.0_8A230m_Restore.ipsw (iPod Touch 3G)
To download the firmware for your device; follow onto this link. Only available for iPhone 3G/3GS and iPod Touch 2G/3G. Only those with iPhone 3GS and iPod Touch 3G would be able to take advantage of multitasking on their device.
Update: The iPhone 4.0 beta 2 firmware is out. Also see our tutorial on how to Activate the iPhone Firmware 4.0 beta with Unique device ID (UDID) on your device.