How to boot a board from a SD card
In this section it will be shown how to boot your board directly from your SD card. For this tutorial it will be used the Stable Release of the SDK for the LeopardBoard DM368 (called 2011Q2) but in most of SDKs you will find similar options.
Disabling Ubuntu Auto-Mount
When the SDK installer is putting a new file system on a partition, it seems on some (fast) machines a race condition occurs when the Nautilus file system manager auto-mounter is able to mount the file. To disable Nautilus from auto-mounting file systems, run
and in the apps/nautilus/preferences tree, unselect media_automount.
Instruction to boot from SD card using the SDK 2011Q2
In our new Stable Release of the SDK (called 2011Q2) and later versions you will be able to find a new option to boot your board from the SD card, this means you will be able to load the bootloader and kernel images directly from a SD card. For this example we will use NFS for file system.
1. Got to you SDK's path: cd <mySDKPath>.
2. Run make config.
3. Go to Installer Configuration.
4. Press ENTER in the "Firmware deployment mode" option.
5. Select "Deploy all the firmware to an SD card".
6. If you want to put your file system to the SD card too, select the "Secure Digital Card" option on
-> File System Configuration -> File system image target
7. Now you can choose how to flash your SD card with the images: creating a sdcard image or write the images directly to your SD card. Both methods are shown in the following sections.
Creating a SD card image
This is the default option, you will see the "Flash SD card image into loopback file instead of real SD" option selected. This method creates a SD image that then you will be able to write to a real SD card. In order to do this follow the next steps:
1. Select the size of the image you want to create by typing it the "Size of loopback device for SD card", by default it is set to 128MB and in most of the cases this value is enough.
2. Exit you configuration wizard and type make install into your SDK's path. A warning message will be prompted, just type yes and wait until the process finishes.
3. After that a file called sdcard.img will be created into the <mySDKPath>/images/ directory.
4. Insert a SD card in your PC and wait until it is mounted.
5. Type mount and verify the name of the device associated to your SD card as is shown below:
'''/dev/sdb1''' on /media/boot type vfat (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,flush)
6. Umount the media by typing the following command:
sudo umount <directory where your SD card was mounted i.e. /media/boot >
7. Go to the images directory and run the following command:
sudo dd if=sdcard.img of=/dev/sdX
Where sdX represents the device name gotten in 5, for the example presented it would be sdb.
8. Once the process finishes insert the SD card into your board and turn ON the dip switch 2, then power on the board, it will start booting from your SD card now.
Write to the SD card directly
This method allows you to write a SD card directly using your SDK storing the kernel and bootloader images on it. In order to do that you must follow the next steps:
1. Unselect the option "Flash SD card image into loopback file instead of real SD".
2. Repeat steps 5 and 6 of the previous section.
3. In step 1 a new option called "SD device on Linux host" will appear, type the name of the device associated with your SD card on it.
4. Save the changes and exit to your SDK's path.
5. Run make install and wait until the SD card has been wrote.
6. Once the process finishes insert the SD card into your board and turn ON the dip switch 2, then power on the board, it will start booting from your SD card now.