Skip to content
Peter Saunderson edited this page Aug 30, 2015 · 3 revisions

Home / Tutorial Index / Getting started

Building Linux Check it works

Ref: http://git.yoctoproject.org/cgit.cgi/poky/tree/README.hardware

The exact device path to your SD card depends on your Linux distribution and computer setup. Use the command

$ df -h

with and without the SD card to see which device is created. Take care because one of the devices will be your Build machine disk and you dont want to accidently reformat the build machine! Let us suppose the SD card is /dev/mmcblk0p1

Now partition and format the SD card (notice the change of name to the raw device name without partition info):

$ sudo fdisk -lu /dev/mmcblk0
Disk /dev/sdb: 29.2 GiB, 31322013696 bytes, 61175808 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000a07b6

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sdb1         2048   264191   262144  128M  b W95 FAT32
/dev/sdb2       264192 14600191 14336000  6.9G 83 Linux

Now create the partitions

$ sudo mkfs.vfat -F 32 -n "boot" /dev/mmcblk0p1
$ sudo mkfs.ext3 -j -L "root" /dev/mmcblk0p2

Now copy the boot files to the boot partition

$ sudo mkdir -p /tmp/mmcboot
$ sudo mount -t vfat /dev/mmcblk0p1 /tmp/mmcboot
$ sudo cp tmp/deploy/images/parallella-hdmi/uImage /tmp/mmcboot/uImage
$ sudo cp tmp/deploy/images/parallella-hdmi/parallella-hdmi-mmc-boot-example.dtb /tmp/mmcboot/devicetree.dtb
$ sudo cp tmp/deploy/images/parallella-hdmi/bitstreams/parallella_e16_hdmi_gpiose_7020_base_example.bit.bin /tmp/mmcboot/parallella.bit.bin

Now create the root file system

$ sudo mkdir -p /tmp/mmcroot
$ sudo mount -t ext3 /dev/mmcblk0p2 /tmp/mmcroot
$ sudo tar xf tmp/deploy/images/parallella-hdmi/hdmi-image-example-parallella-hdmi.tar.gz -C /tmp/mmcroot

Now sync and unmount the SD card.. its ready to try on the parallella!

$ sync; sync
$ sudo umount /dev/mmcblk0p1
$ sudo umount /dev/mmcblk0p2
$ sync; sync

I suggest putting these commands into a script. As this is build machine specific I will leave that as an exercise for the reader!

Building Linux Check it works