Banana Pro&Pi RD - 5 -
Copyright © 2014 LeMaker. All Rights Reserved.
2 Setting up the bootable SD card
This chapter describes how to create a bootable SD card. Depending on how the SD
card is set up, the locations in which data is written can be different. Throughout this
chapter ${card} refers to the SD card and ${p} to the partition, if there are any.
If the SD card is connected via a USB adapter, Linux will know it for example as
/dev/sdX (X represents the letters b or c or d, etc.). Please note that this device might
be different depending on various factors, so when you are not sure, use the fdisk
command to check it.
If connected via an SD slot on a device, Linux will know it as /dev/mmcblk0 (or
mmcblk1, mmcblk2, depending on which mmc slot is being used). (mmc stands for
MultiMediaCard by the way!)
Data is either stored raw on the SD card or in a partition. If ${p} is used, then the
appropriate partition should be written to. Also, this differs for USB adapters and
mmc controllers. When using an USB adapter, ${p} will be 1, 2, 3 etc so the resulting
device is /dev/sdX1. Using an mmc controller, this would be p1, p2, p3 etc so the
resulting device is /dev/mmcblk0p1.
To summarize, ${card} and ${card}${p}1 mean /dev/sdX and /dev/sdX1 on a USB
connected SD card, and /dev/mmcblk0, /dev/mmcblk0p1 on an mmc controller
connected device.
If the SD card is physically removed but then inserted into/connected to another slot
or port of the PC, the device nodes can change again and be different, so be aware of
this and take it into account.
It is assumed that you have already got files such as u-boot-sunxi-with-spl.bin,
uImage and script.bin.