A friend of mine asked me whether I could buy for him a pandaboard from the factory in Shenzhen directly and set it up with a Linux for him. Here are the steps I went through to get it running.
Insert the SD card for the boot media (we assume it's /dev/sdX) and then do the following.
Zero the beginning of the SD card:
dd if=/dev/zero of=/dev/sdX bs=1M count=8
Start fdisk to partition the SD card:
At the fdisk prompt, delete old partitions and create a new one:
Type o. This will clear out any partitions on the drive.
Type p to list partitions. There should be no partitions left.
Now type n, then p for primary, 1 for the first partition on the drive, 2048 for the first sector, and then press ENTER to accept the default last sector.
Write the partition table and exit by typing w.
Create and mount the ext4 filesystem:
mkfs.ext4 /dev/sdX1 mount /dev/sdX1 /mnt
Download and extract the root filesystem:
wget http://archlinuxarm.org/os/ArchLinuxARM-armv7-latest.tar.gz bsdtar -xpf ArchLinuxARM-armv7-latest.tar.gz -C /mnt sync
If you don't have yet installed a cross compiler for ARM, you should do so, for instance with
zypper in cross-arm-linux-gnueabi-gcc
then clone and compile your u(nified)-boot(loader):
git clone git://git.denx.de/u-boot.git cd u-boot export CROSS_COMPILE=arm-linux-gnueabi- make omap4_panda_config make
Then write your boot loader to the SD card:
dd if=MLO of=/dev/sdX count=1 seek=1 conv=notrunc bs=128k dd if=u-boot.img of=/dev/sdX count=2 seek=1 conv=notrunc bs=384k