Saturday, June 4, 2016

Preparing SD Card for Linaro to be Booted on Zedboard

According to Sven, (http://svenand.blogdrive.com/archive/199.html) the best way to prepare the SD card for booting Linaro is as follows:

** Things to keep in mind **
- SD Card should have at least 4 GB of free space
- The application gparted can be very useful for correctly partitioning the SD card (I will be using gparted to complete these steps)

Acquire an SD card with at least 4 GB storage available on it (SD card will be wiped clean so back up any files you do not want to lose).

Insert SD card into your computer via a USB converter if you do not have an SD card slot.

Start the gparted application by typing "gparted" into the terminal (sudo may be needed depending on your machine). If you do not have gparted, it can be downloaded by typing "sudo apt-get install gparted" (for Ubuntu users) or "sudo yum install gparted" (for CentOS users).

Locate your device in the gparted user interface. There should be a small drop down arrow in the top right. Your SD card should be in this box, listed below your computers main hard drive. Click on your SD card (It should look something like /dev/sdb/ (memory on your card)). You should now see a screen something like this:

The next steps are to unmount any existing partitions on your card, and then delete them. To unmount your partitions, locate them in the interface (in the picture above, the line that has an ext4 file system and label 'myusb'), right click, and select unmount. Once you have unmounted all partitions, you will delete them (this will DELETE ALL DATA ON THE CARD).

To delete partitions, right click in the same area you did to unmount, and select delete. Your SD card should now be completely free of any partitions, and all the space on the card should be 'unallocated' and you should have a screen like the one below:


Now we will be creating the proper partitions to set up the SD card for booting Linaro.

Right click the line with unallocated file system and select the 'New' option. We want this partition to be 52 MB in size and have a FAT32 file system (Don't forget to leave 4 MB space free preceding the partition). We will name this partition 'BOOT'. You should set up your partition like the one below. Click Add when you have the correct set up. (The 'Free space following MiB' should automatically take up the remaining space on your SD card, which is what we want).

You should now have 4 MB of unallocated space, a 52 MB FAT32 partition named BOOT, and the rest should also be unallocated space the size of the rest of your SD card.

Now we want to create our second partition, which is an ext4 file system partition that will take up the remaining space on our SD card. Right click the unallocated space that fills the majority of the space on the SD card and select 'New'. We will name this partition 'rootfs'. Set up this partition like the one below. Click Add when the set up is correct.


Click the green check mark at the top of the interface too save changes made to the SD card. Your gparted interface should now look very similar to the one below.


Our SD card is now correctly partitioned so that we can add the correct files to the correct partitions in order to boot Linaro on the Zedboard!

No comments:

Post a Comment