Now that our SD card is set with a 52 MB FAT 32 boot partition and an ext4 root file system partition, we can add the files that will boot Linaro on the Zedboard.
** What we will need **
- The Out of Box files that come on the SD card with the Zedboard. If you do not have these files, fear not, they can be downloaded from this page : https://reference.digilentinc.com/zedboard:zedboard
Download the Out-of-Box Demo .zip file and extract the files to the directory of your choice
-The Linaro file system from:
http://releases.linaro.org/archive/12.09/ubuntu/precise-images/ubuntu-desktop/linaro-precise-ubuntu-desktop-20120923-436.tar.gz
The file should look like this: linaro-precise-ubuntu-desktop-20120923-436.tar.gz
-Linaro device tree blob file (.dtb) from http://svenand.blogdrive.com/Zynq/Linaro/devicetree_linaro.dtb
The file should look like this: devicetree_linaro.dtb
Once we have all these downloaded, we are ready!
The first step is to copy the image files that come with the Zedboard SD card onto our 52 MB BOOT partition of our SD card. All of these files are located in the sd_image folder of the Zedboard Out of Box Demo download.
Our BOOT partition should look like this.
The next step is to get the Linaro file system onto our SD Card. We want to start by making a directory named 'linaro' in the tmp folder of our computer. This can be done by going to the terminal and typing the following commands.
cd /tmp
mkdir linaro
Once we have this directory, we should navigate to the folder where our Linaro file system downloaded, and run the following command in the terminal to copy the file to the /tmp/linaro directory that we just created.
sudo cp linaro-precise-ubuntu-desktop-20120923-436.tar.gz /tmp/linaro/
Navigate to the linaro folder by typing cd /tmp/linaro/ in the terminal. Now we are going to unpack the file by running the following command.
sudo tar zxf linaro-precise-ubuntu-desktop-20120923-436.tar.gz
Your linaro folder should now look like this.
The next step is to copy the file system to the ext4 rootfs partition of our SD card. You should locate where your partitions are mounted, however they usually get mounted to the /media directory. For my machine, they are mounted at /media/zynquser/. Navigate to /tmp/linaro/binary/boot/filesystem.dir by typing 'cd /tmp/linaro/binary/boot/filesystem.dir' in terminal. Run this command to copy the file system to the rootfs partition of the SD card (This may take a few minutes).
sudo rsync -a --progress ./ /media/zynquser/rootfs/
Once the above command is complete, unmount the partition to ensure all files have been synchronized successfully. You can unmount the partition in the terminal by typing 'sudo umount /media/zynquser/rootfs/'
We are almost done!
All that is left to do is fix the boot files to correctly boot Linaro. Open the BOOT partition on our SD card, and delete the ramdisk8M.image.gz and devicetree_ramdisk.dtb files. Then, copy the devicetree_linaro.dtb into the BOOT partition. Our BOOT partition should now look like this.
We did it! Our SD card is ready to help us boot Linaro on the Zedboard. To prepare the Zedboard for booting Linaro, please reference this earlier blog entry.
http://zedboardsiena2015.blogspot.com/2016/03/ubuntu-with-linaro-gui-working.html
No comments:
Post a Comment