Apple has released the iPhone OS 2.0 update for first-generation iPhones. Once the new software/firmware is installed, these devices can access the AppStore.
In order to apply the iPhone OS 2.0 update, download and install iTunes 7.7, then click the "Update" button.
"Normally if you choose to update, the iPhone or iPod touch software is updated but your settings and media are not affected. If your device currently has a software version prior to 2.0 (1.x) and you are updating to software version 2.0 or later, all data on your device will be erased in order to perform install the new software. In this case, iTunes will offer to create a one-time media backup of your device depending on what content is on your device and what content is stored in the iTunes Library you are connected to. You should ensure that you have enough free space on your Mac or PC to accommodate a backup that matches the capacity of your iPhone or iPod touch (4 GB, 8 GB, 16 GB, or 32 GB) if you proceed with the this backup."
You can also use the following direct link to download iPhone OS 2.0 (currently only for the iPhone, not the iPod touch):
iPhone OS 2.0 software [225MB]
If you use the standalone download, after downloading the update, you can hold the option key on a Mac or Shift key on a Windows system, then click the "Restore" button in iTunes (under the iPhone tab) and select the file to apply it.
To apply the update using iTunes, simply connect your iPhone then click the "Update" or "Restore" button.