BeagleBoard Zippy2



The Zippy2 Ethernet Combo Board (KSZ8851SNL-BBE-EVAL) is a low cost expansion board for the BeagleBoard that provides the following peripherals:
 * 10/100BaseT Ethernet
 * Second SD/MMC Interface
 * Second RS232 Serial Interface
 * Real-Time clock with Battery Back-up
 * I2C Interface (+5V level)
 * AT24C01 Serial EEPROM for Board Identification

= Hardware =

Ethernet
The Zippy2 provides a standard 10/100BaseT (10/100 Mbit) Ethernet interface and uses Micrel's KSZ8851SNL SPI to Ethernet controller.

SD/MMC Interface
The Zippy2 provides a second SD/MMC interface that supports both 3.3V and 1.8V SD memory cards.

RS232 Serial Interface
The Zippy2 provides a second RS-232 serial port for the BeagleBoard. There are two serial connectors provided. Either connector is available for use: 1) standard DB9 Male connector, or 2) 2x5 shrouded header (0.1 inch pin spacing).

Real-time Clock
The Zippy2 provides a battery backed-up Real Time Clock (RTC) which uses the Maxim DS1307. The backup power is provided by a small 3V lithium coin battery and is held in place by a battery holder.

Compatible 3V Lithium Coin Batteries:


 * CR1216
 * CR1220
 * CR1225

Battery cell size = 12mm.

The battery is not included with the Zippy2 and must be purchased separately. Compatible batteries are available from Digi-Key:

Panasonic CR1216

Energizer CR1216

Installing the 3V lithium coin battery:



Insert the battery with the positive "+" side up.



Slide the battery all the way into the battery holder.

I²C Interface
The Zippy2 provides a 4-pin header expansion connector for access to the BeagleBoard's I²C signals. The signals have been level translated to 5V to allow easy connection to standard 5V peripherals.

I²C expansion header pin assignments:


 * pin 1 - +5V Power
 * pin 2 - SDA (5V signal level)
 * pin 3 - SCL (5V signal level)
 * pin 4 - Ground

Serial EEPROM
The Zippy2 provides a AT24C01 serial EEPROM that contains a Vendor ID and a Device ID that the BeagleBoard uses to identify the type of board connected to the expansion header. This information enables the BeagleBoard to auto-configure the pin mux for signals needed by the Zippy2. More information can be found here.

= Soldering BeagleBoard's Expansion Header = This is a quick guide showing you how to solder the 2x14 Header into the BeagleBoard’s Expansion connector (J3).



Insert the 2x14 Header’s SHORT PINS from the back side of the BeagleBoard into the BeagleBoard’s expansion connector (J3).



Position the 2x14 Header so the LONG PINS are on the BACK SIDE of the BeagleBoard.



Solder the SHORT PINS of the 2x14 Header from the TOP SIDE of the BeagleBoard.

Attaching to the BeagleBoard


Attach the four board spacers with the screws provides.



Connect the expansion board onto the BACK SIDE of the BeagleBoard by mating with the 2x14 Header you just soldered. Make sure all of the pins align correctly.



Continue pushing the two boards together until the connectors mate together.



Attach the male standoffs as shown.



= Creating a bootable SD card in Ubuntu =

This guide will show you how to create a dual-partition SD card for the BeagleBoard/Zippy2 combination to boot Linux from the first partition and have the root file system located on the second partition. This guide covers the same procedure as BeagleBoardBeginners SDCard setup and LinuxBootDiskFormat.

Determine which device the SD Card Reader is on your system

Insert the SD Card into the SD Card Reader reader on your Linux PC. Then determine which device it is on your system:

dmesg | tail ... [2079456.496092] sd 34:0:0:0: [sdb] Mode Sense: 03 00 00 00 [2079456.496096] sd 34:0:0:0: [sdb] Assuming drive cache: write through [2079456.513743] sd 34:0:0:0: [sdb] Assuming drive cache: write through [2079456.513751] sdb: sdb1 [2079456.529193] sd 34:0:0:0: [sdb] Assuming drive cache: write through [2079456.529201] sd 34:0:0:0: [sdb] Attached SCSI removable disk

In this case it shows up as /dev/sdb (note sdb insite the square brackets above).

Check to see if the automounter has mounted the SD Card:

df -h Filesystem           Size  Used Avail Use% Mounted on ... 1.8G    0  1.8G   0% /lib/init/rw /dev/sdb1            1.9G     0  1.9G   0% /media/6262-9331 ...

If mounted, unmount the SD card

umount /media/6262-9331

Start fdisk:

sudo fdisk /dev/sdb Print the partition record: Command (m for help): p

Disk /dev/sdb: 1967 MB, 19671285764 bytes 57 heads, 56 sectors/track, 1203 cylinders Units = cylinders of 3192 * 512 = 1634304 bytes Disk identifier: 0x00000000

Device Boot     Start         End      Blocks   Id  System /dev/sdb1           1        1204     1920955+   6  FAT16 Note card size in bytes listed above (in this example: 19671285764). Write this number down, it will be needed later below.

Delete any partitions that are already on the SD card

Command (m for help): d Selected partition 1

Set the Geometry of the SD Card

Go into "Expert mode":

Command (m for help): x

Now we want to set the geometry to 255 heads, 63 sectors and calculate the number of cylinders required for the particular SD card you are using: Expert command (m for help): h Number of heads (1-256, default 57): 255

Expert command (m for help): s Number of sectors (1-63, default 56): 63 Warning: setting sector offset for DOS compatiblity

Expert command (m for help): c Number of cylinders (1-1048576, default 1203): 239 The 239 entered in the cylinders above must be calculated based upon the size of your particular SD card.

Now Calculate the number of Cylinders for your SD card:

number of cylinders = FLOOR (the number of Bytes on the SD Card (from above) / 255 heads / 63 sectors / 512 sector size in bytes )

So for this example: 128450560 / 255 / 63 / 512 = 239.156427  (use Google to calculate). So we use 239 (i.e. truncate, don't round). Return to "Normal" mode:

Expert command (m for help): r

Print the partition record to check your work: Command (m for help): p

Disk /dev/sdb: 1967 MB, 1967128576 bytes 57 heads, 56 sectors/track, 1203 cylinders Units = cylinders of 3192 * 512 = 1634304 bytes Disk identifier: 0x00000000

Device Boot     Start         End      Blocks   Id  System /dev/sdb1              1        1204     1920955+   6  FAT16

Create the FAT32 partition for booting and transferring files from your PC

Command (m for help): n Command action e  extended p  primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-15, default 1): 1 Last cylinder or +size or +sizeM or +sizeK (1-15, default 15): 50

Command (m for help): t Selected partition 1 Hex code (type L to list codes): c Changed system type of partition 1 to c (W95 FAT32 (LBA))

We use 50 cylinders of the total of 239 for the FAT32 partition above. The remainder of the cylinders will be used for the Linux root file system below.

Mark this FAT32 partition as bootable:

Command (m for help): a Partition number (1-4): 1

Create the Linux partition for the root file system

Command (m for help): n Command action e  extended p  primary partition (1-4) p Partition number (1-4): 1 First cylinder (51-239, default 51): 51 Last cylinder or +size or +sizeM or +sizeK (51-239, default 239): 239

Print the partition record to check your work Command (m for help): p

Disk /dev/sdb: 1967 MB, 1967128576 bytes 57 heads, 56 sectors/track, 1203 cylinders Units = cylinders of 3192 * 512 = 1634304 bytes

Device Boot     Start         End      Blocks   Id  System /dev/sdb1              1         50     1920955+   c  w95 FAT32 (LBA) /dev/sdb2             51         239               83 Linux

Save the new partition records on the SD card

This is an important step. All work up to now has been temporary.

Command (m for help): w The partition table has been altered! Calling ioctl to re-read partition table. WARNING: If you have created or modified any DOS 6.x partitions, please see the fdisk manual page for additional information. Syncing disks.

Format the partitions

sudo mkfs.msdos -F 32 /dev/sdb1 -n boot

sudo mkfs.ext3 -L rootfs /dev/sdb2

Copy files onto the SD card

The last step is to copy the Linux system onto a bootable SD/SDHC card.

Unplug and re-plug your card reader in order to auto-mount the two new partitions.

If your card is correctly formatted, then you can now copy the Linux system on it.

Copy files onto the BOOT partition
You will need to download the following files:


 * Demo/Test Files
 * [[media:MLO-zippy2.ift|MLO]] (save as MLO)
 * [[media:u-boot-zippy2.bin|u-boot.bin]] (save as u-boot.bin)
 * [[media:uImage-zippy2.bin|uImage]] (save as uImage)
 * [[media:test.rootfs2.tar.gz|test.rootfs.tar.gz]]

IMPORTANT: Copy MLO FIRST!.

And now copy the two files onto the boot partition (MLO first because of a bug in the X-loader which causes problems if MLO is not the first file written onto the boot partition).

cp MLO /media/boot/MLO cp u-boot.bin /media/boot/u-boot.bin

The Linux kernel (uImage) resides also on the BOOT partition of the SD-card. If you compile a new version of the kernel you have to copy the new uImage on the BOOT partition. See the instructions below. Copy Linux

The next step is to copy the Linux kernel and the Linux root filesystem on the bootand rootfs partitions. You can use precompiled binaries for both or compile an OpenEmbedded image yourself.

Instructions for both options are provided below. Copy the precompiled Ångström Image

The precompiled Ångström image consists (besided MLO and u-boot.bin from the bootloader section) of two files: The Linux kernel image (uImage) and the root file system. Copy uImage

cp uImage /media/BOOT/uImage

Copy the Linux root file system

The file is named *rootfs.tar.bz2 for the Beagle link

http://www.angstrom-distribution.org/demo/beagleboard/

Download the files to a temporary directory, e.g. the Desktop or your user folder. The next step is to extract these files into the LINUX partition (NOT the boot partition). This can only be done by using Linux.

sudo tar xjf *rootfs.tar.bz2 -C /media/LINUX

Copy custom OpenEmbedded Linux Image
Linux Kernel Image and u-boot bootloader

Copy the kernel image and u-boot.

sudo cp $OE_HOME/tmp/deploy/glibc/images/beagleboard/uImage-beagleboard.bin /media/BOOT/uImage cp $OE_HOME/tmp/deploy/glibc/images/beagleboard/u-boot-beagleboard.bin /media/BOOT/u-boot.bin

Linux root filesystem

After the kernel, the root filesystem has to be copied as well. If you are overwriting an existing installation and you don't need a 100% clean system, you can just delete all files. The command below will delete all files in /media/LINUX except the lost+found directory of the EXT3 file system.

sudo rm -rf /media/LINUX/* && sudo mkdir /media/LINUX/lost+found

The console image:

sudo tar xjf $OE_HOME/tmp/deploy/glibc/images/beagleboard/omap3-console-image-beagleboard.tar.bz2 -C /media/LINUX

Unmount the SD/SDHC card

Now unmount the drive either manually (by clicking the unmount icon on the desktop) or by shell command:

sync sudo umount /media/BOOT sudo umount /media/LINUX sudo rm -r /media/BOOT sudo rm -r /media/LINUX

Copy bytewise from one SDHC card to another
If you have modified your installation and want to clone the content of the SD card, you can do this with dd.

Make sure to plug in the source card first, then the destination card. Check the file names with:

dmesg | tail

And unmount the card (with the GUI or with umount /dev/sdb). Then use dd to copy the first gigabyte from one card to the other (including partition table, etc.):

sudo dd if=/dev/sdb of=/dev/sdc bs=1073741824

= Automated script =

The following script will create a formatted SD card using your Linux PC.


 * [[media:mksdcard2.sh| mksdcard.sh]]

Attached are the files needed to generate a new sd card for testing the Zippy2:

Make a directory for the files and copy them to it. You will also need to make two mount points:

mkdir /mnt/sdcard1 mkdir /mnt/sdcard2

Then issue the command like this:

./mksdcard.sh /dev/sdb

Where /dev/sdb is the drive for the sd card.

This should generate a fresh bootable sdcard for you!

= Design Documents =



= Software =


 * Demo/Test Files
 * [[media:MLO-zippy2.ift|MLO]] (save as MLO)
 * [[media:u-boot-zippy2.bin|u-boot.bin]] (save as u-boot.bin)
 * [[media:uImage-zippy2.bin|uImage]] (save as uImage)
 * [[media:defconfig2.txt|Kernel Config]]


 * place these files on your formated SD card per the instuctions at the LinuxBootDiskFormat page
 * boot your BeagleBoard while holding down the "User" button.