How to get dual boot on Leopardboard DM36x

From RidgeRun Developer Connection

(Difference between revisions)
Jump to:navigation, search
(Created page with '= Summary = This whitepaper explains how to configure your LeopardBoard and RR SDK to use NAND boot and SD Card boot with just changing the boot selector switch SW1. = Configur...')
Line 2: Line 2:
This whitepaper explains how to configure your LeopardBoard and RR SDK to use NAND boot and SD Card boot with just changing the boot selector switch SW1.
This whitepaper explains how to configure your LeopardBoard and RR SDK to use NAND boot and SD Card boot with just changing the boot selector switch SW1.
 +
= Configuring your board to work with RidgeRun's SDK =
= Configuring your board to work with RidgeRun's SDK =
Line 14: Line 15:
b) Use the SD card to install the new bootloader as is explained at https://www.ridgerun.com/developer/wiki/index.php/How_to_flash_the_RidgeRun%27s_u-boot_in_a_new_board
b) Use the SD card to install the new bootloader as is explained at https://www.ridgerun.com/developer/wiki/index.php/How_to_flash_the_RidgeRun%27s_u-boot_in_a_new_board
 +
= Configuring your board to boot from NAND =
= Configuring your board to boot from NAND =

Revision as of 23:03, 3 January 2012

Contents

Summary

This whitepaper explains how to configure your LeopardBoard and RR SDK to use NAND boot and SD Card boot with just changing the boot selector switch SW1.


Configuring your board to work with RidgeRun's SDK

When using a new virgin LeopardBoard you need to replace its u-boot with a modified RidgeRun's version that helps the user to interact in a friendly way with the installer system. In order to do that you can follow the steps specified at:

https://www.ridgerun.com/developer/wiki/index.php/How_to_flash_the_RidgeRun%27s_u-boot_in_a_new_board

Basically follow the next steps:

a) Create the SD card following the steps listed at https://www.ridgerun.com/developer/wiki/index.php/How_to_boot_a_board_from_a_SD_card

b) Use the SD card to install the new bootloader as is explained at https://www.ridgerun.com/developer/wiki/index.php/How_to_flash_the_RidgeRun%27s_u-boot_in_a_new_board


Configuring your board to boot from NAND

On RidgeRun's Professional SDK it is highly recommended to use UBIFS as file system type when using NAND, so this section shows how to configure your SDK to use UBIFS as file system and how to install it in your board.

Configuring your SDK

In order to configure your SDK for UBIFS/NAND support follow the next steps:

a) Go to you SDK's root directory b) `make env` c) Select "Attached board on communication port" on

→ Installer Configuration 
  → Firmware deployment mode

c) Configure your serial or telnet settings.

c-1) Change the "Interface on your host machine connected to your target hardware" option to the name of your current Ethernet interface attached to the board i.e. eth0

c-2) In the case of serial communication select "Serial port" on

→ Installer Configuration 
  →  Communication method with the target board 

and change the "Serial port for target communication" option with the name of your serial port device i.e. /dev/ttyS0 or /dev/ttyUSB0 (the last one is common when using a USB-Serial converter).

c-3) In the case you are using a telnet-like communication method select "Telnet-serial adaptor" on

→  Installer Configuration 
   →  Communication method with the target board 

and modify the "IP address of telnet-serial adaptor" and "Network port of telnet-serial adaptor" option to the corresponding host PC IP address and the network port used i.e. 10.251.101.56 and 3000.

d) Select "UBIFS volume" on

 →  File System Configuration 
    → File system image target 

e) Exit saving the changes.

f) make

Installing the images

In order to install the images to your board follow the next steps:

a) Access your board through serial/telnet port.

b) Power on your board and stop it on the u-boot prompt.

c) Quit from your minicom/termnet session.

d) Install your SDK running the make install command. You will get a output like this:

$ make install 

  Ridgerun Linux SDK 
  Board configuration: Leopard Board DM368 
  Multi-core machine, using 4 out of 8 cores for building 
  
  Installation system of uboot images over TFTP for host 10.251.101.7 
  Be sure u-boot is running on 10.251.101.56:3001 and no process (like termnet) is using it 
  Press return to continue... 

  Performing handshake with u-boot... 

  Trying to identify NAND block size... detected 0x20000 
  Trying to identify NAND Page size... detected 2048 

  Verifying if kernel needs to be installed... 
  Loading Kernel image... 
  Configuring the network... 
    Uboot <= setenv autoload no 
    Uboot <= dhcp 
    Uboot <= setenv serverip 10.251.101.7 
    Uboot <= setenv autostart no 
     cp -f /home/mmadrigal/devdirs/DM365LEO/images/kernel.uImage /srv/tftp/kernel.uImage.mmadrigal.DM365LEO.leopard 
    Uboot <= tftp 0x82000000 kernel.uImage.mmadrigal.DM365LEO.leopard 
    Uboot <= setenv autostart yes 
  Saving kernel... 
    Uboot <= nand erase 0x400000 0x460000 
    Uboot <= nand write 0x82000000 0x400000 0x460000 
  Saving new kernel offset and size... 
    Uboot <= setenv kerneloffset 0x400000 
    Uboot <= setenv ksize 0x460000 
  Saving new kernel md5sum value... 
    Uboot <= setenv kernelmd5sum 9efab373b51b466dd5f79943102b4d22 
    Uboot <= saveenv 
  Generating file system using flash geometry... 
   Generating file system ubifs... 
  File system doesn't need to be loaded, since file system size match on board and host 

  Verifying if kernel command line needs to be installed... 
    Uboot <= setenv bootargs 'davinci_enc_mngr.ch0_output=COMPONENT davinci_enc_mngr.ch0_mode=720P-60 davinci_display.cont2_bufsize=6291456 vpfe_capture.cont_bufoffset=6291456 vpfe_capture.cont_bufsize=12582912 video=davincifb:osd1=0x0x8:osd0=1280x720x16,1800K@0,0:vid0=off:vid1=off console=ttyS0,115200n8 dm365_imp.oper_mode=0 vpfe_capture.interface=1 mem=78M ubi.mtd=FS root=ubi0:rootfs rootfstype=ubifs mtdparts=davinci_nand.0:4096k(UBOOT),4480k(KERNEL),204800k(FS)' 
    Uboot <= saveenv 

  Verifying if the boot command needs to be installed... 
  Boot command doesn't need to be installed 

  Installation completed 

$ 


Configuring your board to boot from SD Card

In order to cerated a bootable SD card you can follow the steps listed at:

https://www.ridgerun.com/developer/wiki/index.php/How_to_boot_a_board_from_a_SD_card#Instruction_to_boot_from_SD_card_using_the_SDK_2011Q2


Interacting with both boot modes

Once you have configured and installed your SDK for NAND and SD card booting, you can now interact with your board and easily switch between both modes, just follow next steps:

a) Insert your SD card into your board.

b) Set the switch 2 on SW1 to 0 for NAND boot.

c) Get into your minicom/termnet session.

d) Power on your board.

e) Now your board should start from NAND

f) Power of your board.

g) Set the switch 2 on SW1 to 1 for SD boot.

h) Repeat the steps c) and d)

i) Now your board should start from SD card.

Navigation
Toolbox