ViewsPersonal tools |
Setting up the microSDFrom GizmoForYou Wiki
OverviewThe Overo platform with is located on the FLOW motherboard will boot directly from a properly prepared Micro-SD card. Here we shall explain how to partition and format a bootable Micro-SD card. We shall be explaining here how to setup the 1GB Micro-SD Basic that can be found in our shop. The information found here can also be found in more detail on the Gumstix website. Setting up partitionsInsert your Micro-SD card into a free USB slot by using any hardware available for reading these types of cards. After it has been inserted go to your terminal window and type: mount You should see the name of the card there in the format of something like /dev/sdb1 or something similar. That is your card and this is what we shall refer to when doing this explanation. Here is what shows up on our screen when we insert a fresh, out of the box 1GB Micro-SD card: /dev/sdb1 on /media/3580-CF53 type vfat Now let's unmount this card: sudo unmount /dev/sdb1 Launch fdisk and create an empty partition table. Have in mind that the argument for fdisk is the entire device (/dev/sdb) not just a single partition which could be /dev/sdb1: sudo fdisk /dev/sdb Command (m for help): o Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Let's first look at the current card information: Command (m for help): p Disk /dev/sdb: 1015 MB, 1015545856 bytes 28 heads, 59 sectors/track, 1200 cylinders Units = cylinders of 1652 * 512 = 845824 bytes Disk identifier: 0x7f8256bf Device Boot Start End Blocks Id System Note the card size in bytes (Disk /dev/sdb: 1015 MB, 1015545856 bytes). We will needed this number later, so write it down somewhere. Now go into "Expert" mode: Command (m for help): x Next we will set the geometry to 255 heads, 63 sectors and a calculated value for the number of cylinders required for our Micro-SD card. To calculate the number of cylinders, we take the 1015545856 bytes which we noted above by fdisk divided by 255 heads, 63 sectors and 512 bytes per sector: 1015545856 / 255 / 63 / 512 = 123.46 which we round down to 123 cylinders. Expert command (m for help): h Number of heads (1-256, default 28): 255 Expert command (m for help): s Number of sectors (1-63, default 59): 63 Warning: setting sector offset for DOS compatiblity Expert command (m for help): c Number of cylinders (1-1048576, default 1200): 123 Return to fdisk's main mode and create a new partition 32 MB FAT partition:
Expert command (m for help): r
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-123, default 1): 1
Last cylinder, +cylinders or +size{K,M,G} (1-123, default 123): +32M
Change the partition type to FAT32: 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)) Mark it bootable: Command (m for help): a Partition number (1-4): 1 Next we create an ext3 partition for the rootfs:
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (6-123, default 6): 6
Last cylinder, +cylinders or +size{K,M,G} (6-123, default 123): 123
To verify our work, lets print the partition info: Command (m for help): p Disk /dev/sdb: 1015 MB, 1015545856 bytes 255 heads, 63 sectors/track, 123 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 * 1 5 40131 c W95 FAT32 (LBA) /dev/sdb2 6 123 947835 83 Linux Write the new partition table to the card and then exit: 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. Formatting the partitionsFormat the first partition as a FAT file system: sudo mkfs.vfat -F 32 /dev/sdb1 -n FAT mkfs.vfat 3.0.1 (23 Nov 2008) Format the second partition as an ext3 file system: sudo mkfs.ext3 /dev/sdb2 mke2fs 1.41.4 (27-Jan-2009) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 59264 inodes, 236958 blocks 11847 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=243269632 8 block groups 32768 blocks per group, 32768 fragments per group 7408 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 28 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. Now your Micro-SD card is ready for image uploads. Follow the below explanation on how to do that by ither using your own built images and file systems or using our own pre-build images found in the Files section of the project. Installing the Images onto the Micro-SD cardThere are three files required on the first (FAT) partition to boot your Overo which is located on the FLOW motherboard:
This example will assume that you have mounted the Micro-SD FAT partition at /media/FAT. Please make sure that the files are uploaded to the Micro-SD card in the order described here. If you have simply downloaded the images described above then navigate to the directory you have downloaded them. For this example we are taking the images from the build environment we have set up on our machine so we shall navigate to ~/overo-oe/tmp/deploy/glibc/images/overo Copy the files as described below to your Micro-SD card: sudo cp MLO-overo /media/FAT/MLO sudo cp u-boot-overo.bin /media/FAT/u-boot.bin sudo cp uImage-overo.bin /media/FAT/uImage Untar your desired rootfs onto the ext3 partition that you created above. Note that this step can be dangerous. You do not want to untar your Overo rootfs onto your development machine - be careful! This example will assume that you have mounted it at /media/disk: cd /media/disk sudo tar xvjf ~/overo-oe/tmp/deploy/glibc/images/overo/omap3-palmtop-image-overo.tar.bz2 You can unmount both partitions now: sudo umount /dev/sdb1 sudo umount /dev/sdb2 Congratulations ! Now you have your own Micro-SD Basic and it should be identical with the one available in our shop. |




Wiki