Difference between revisions of "Didj UART Boot"

From eLinux.org
Jump to: navigation, search
(Software Requirements)
(Software Needed)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Hardware Requirements ==
+
== Hardware Needed ==
 +
[[LeapFrog_Pollux_Platform:_Console_Access| Console Access]]
  
To perform UART boot, you must:
+
== Software Needed == 
 +
 
 +
[[Didj_Lightning_Boot | Lightning-boot 1.4+]] Must be specifically UART enabled version.
 +
 
 +
[[Didj_U-Boot | U-Boot]]
 +
 
 +
Didj kernel zImage
 +
 
 +
== Programs Needed ==
 +
Terminal program - (ex: cutecom) that can send plain binary, xmodem and kermit
  
#Make a serial connection to the UART pins on the Didj. To do this you can use a [http://www.elinux.org/Didj#Cartridges breakout board], or you can solder wires directly to the [http://www.elinux.org/Didj_Serial_Console cartridge connector] pins.
+
If using the "With Linux" method.
# Pull cartridge pin D5 to ground, via a pulldown resistor. (470Ω, 2200Ω, and 3300Ω are known to work).
+
$ sudo apt-get install lrzsz ckermit cutecom
  
== Software Needed ==
+
== UART Boot Lightning Boot ==
 +
Some Lightning Boot's are created specifically for UART booting, and some for NAND.
  
[[Didj_Lightning_Boot | Lightning-boot 1.4+]]
+
If you are unsure about what type your Lightning Boot is, run this command and check the output. The two options are UART and NAND.
  
[[Didj_uboot | u-boot]]
+
# hexdump -C -n 16 lightning-boot.bin
 +
00000000  00 00 00 ea 55 41 52 54  04 d0 9f e5 01 00 00 eb  |....UART........|
 +
00000010
  
Terminal program(s) - (ex: cutecom) that can send plain binary, xmodem and kermit
 
  
zImage kernel file for Didj Linux
+
* Connect your serial adapter between the Didj and your computer.
 +
* Configure your terminal
 +
** Device:(ex. Linux /dev/ttyUSB0) (ex. Windows COM1)
 +
** baudrate:19200
 +
** bits:8
 +
** Flow Control:none
 +
** Stopbits:1
 +
** Parity:none
 +
* Pull D5 low on your cartridge, or through a 470 Ohm resistor to ground.
  
<code>
+
* Open the connection in the terminal program, and hold down the power button on the Didj.
sudo apt-get install lrzsz ckermit cutecom
 
</code>
 
  
== Step 1 - Lightning Boot ==
+
* Using the Send Text or plain method, open lightning-boot UART version (ex. lightning-boot-1.4-UART.bin), nothing will be displayed, but usb/rs232 adapter will show activity, if its got an LED to do so.
# Connect your Didj UART Console cable, and connect D5 to ground via the resistor mentioned above.  Do '''not''' power up your Didj yet.
 
# Run cutecom, select the connection to your device (ex: /dev/ttyUSB0), and set the connection params to 19200 8N1.
 
# Select a download type of Plain.
 
# Click Send File- and in the next dialog select your lightning-boot.bin but '''do not send it yet'''.
 
# Pull the power switch on the didj down and '''hold it down.'''
 
# While doing this, send the lightning-boot file from Cutecom, while continuing to hold the Didj power switch down as it loads.
 
# Upon completion, the lightning boot screen will display on your Didj; at which time you may let go of the power button (and massage your finger).
 
# Disconnect the connection (but dont leave cutecom)
 
  
== Step 2 - U-Boot ==
+
* Once loaded you should see a blue screen with a menu, you can let off the power button (if you are loading an older version of lightning boot, there will be no blue screen, it will stay blank and you will need to keep the power button held down through the entire process). There is two ways to continue from here.
 +
If you have an SD card connected you can use the lightning boot 1.4+ menu to load a zImage or u-boot.bin off of it and be finished here. Otherwise if you would like to continue loading over UART or don't have lightning boot 1.4+ continue to step 2.
  
# Change the baud rate to 115200 and then reopen the connection to the device.
+
== Loading U-Boot ==
# Select a download type of XModem, click Send File and select/open the U-Boot.bin file. (This will queue up the file for transmission.)
+
* Change the baud rate to 115200 and then reopen the connection to the device.
# Trigger the transmission of this file by pressing any button on the device.
+
* Select a download type of XModem, click Send File and select/open the U-Boot.bin file. (This will queue up the file for transmission.)
 +
* Trigger the transmission of this file by pressing any button on the device.
 
When U-Boot is loaded you will see  
 
When U-Boot is loaded you will see  
<code>
 
 
  LF1000#  
 
  LF1000#  
</code>
 
:4. Quit cutecom.
 
  
== Step 3 - Kernel ==
 
  
:1. From the command line, run Kermit:
+
== Loading Kernel ==
<code>
+
==== General ====
  #kermit
+
If your terminal program supports kermit, you can proceed from here. If you are using Linux, and your terminal does not support Kermit, go to the ''' With Linux ''' section, it explains in more detail how to set your PC up to transfer the file.
</code>
+
 
 +
'' On Didj ''
 +
 
 +
Once uboot has been sent there'll be a terminal prompt, enter.
 +
LF1000# setenv bootargs mem=18M init=/sbin/init console=ttyS0,115200 root=31:06 ro rootflags=noatime rootfstype=jffs2 ubi.mtd=Brio ubi.mtd=prg_Brio ubi.mtd=Cartridge ubi.mtd=EXT
 +
LF1000# setenv loadaddr 1800000
 +
LF1000# loadb
 +
 
 +
Then send zImage file using the Kermit transfer method once finished there will be another terminal prompt, enter.
 +
LF1000# go 1800000
 +
 
 +
If you see boot messages filling your console display, you have successfully performed a UART boot. You can now release the power button.
 +
 
 +
 
 +
==== With Linux ====
 +
Quit your terminal program.
 +
 
 +
'' On Host ''
 +
 
 +
From the command line, run Kermit:
 +
$ kermit
 +
 
 +
Run the following at the Kermit prompt.
 +
C-Kermit> set modem type none
 +
  C-Kermit> set line /dev/ttyUSB0
 +
C-Kermit> set carrier-watch off
 +
C-Kermit> set speed 115200
 +
C-Kermit> connect
 +
 
 +
This takes you to the u-boot prompt.
  
:2. Paste the following at the <code>C-Kermit></code> prompt once Kermit launches: (TODO - Command Line Params)
+
Enter the following:
<code>
+
'' On Didj ''
set modem type none
 
set line /dev/ttyUSB0
 
set carrier-watch off
 
set speed 115200
 
connect
 
</code>
 
:This takes you to the u-boot <code>LF1000 #</code> prompt.
 
  
:3. Enter the following:
+
LF1000 # setenv bootargs mem=18M init=/sbin/init console=ttyS0,115200 root=31:06 ro rootflags=noatime rootfstype=jffs2 ubi.mtd=Brio ubi.mtd=prg_Brio ubi.mtd=Cartridge ubi.mtd=EXT
<code>
+
LF1000 # setenv loadaddr 1800000
setenv bootargs mem=18M init=/sbin/init console=ttyS0,115200 root=31:06 ro rootflags=noatime rootfstype=jffs2 ubi.mtd=Brio ubi.mtd=prg_Brio ubi.mtd=Cartridge ubi.mtd=EXT
+
LF1000 # loadb
</code>
+
 
: Followed by:
+
 
<code>
+
Type ctrl-backslash and type letter c. This returns you to the  <code></code> prompt.
  setenv loadaddr 1800000
+
'' On Host ''
  loadb
+
Enter the following to send your image:
</code>
+
C-Kermit>robust
 +
  C-Kermit>cd /to/wherever/your/zImage/is
 +
  C-Kermit>send zImage
  
:4. Type ctrl-backslash and type letter c. This returns you to the  <code>C-Kermit></code> prompt.
 
:Enter the following to send your image:
 
<code>
 
robust
 
cd /to/wherever/your/zImage/is
 
send zImage
 
</code>
 
 
The file is sent. When done, kermit returns you to the  <code>C-Kermit></code> prompt.  
 
The file is sent. When done, kermit returns you to the  <code>C-Kermit></code> prompt.  
  
:5. Reconnect to u-boot and boot the image you just sent:
+
Reconnect to u-boot and boot the image you just sent:
<code>
+
'' On Host ''
 
  C-Kermit>connect
 
  C-Kermit>connect
  
 +
'' On Didj ''
 
  LF1000 # go 1800000
 
  LF1000 # go 1800000
</code>
 
  
If you see boot messages filling your console display, you have successfully performed a UART boot.
+
 
 +
If you see boot messages filling your console display, you have successfully performed a UART boot. You can now release the power button
 +
 
 
[[Category:Didj]]
 
[[Category:Didj]]
 +
[[Category:LeapFrog Pollux Platform]]

Latest revision as of 14:32, 23 July 2011

Hardware Needed

Console Access

Software Needed

Lightning-boot 1.4+ Must be specifically UART enabled version.

U-Boot

Didj kernel zImage

Programs Needed

Terminal program - (ex: cutecom) that can send plain binary, xmodem and kermit

If using the "With Linux" method.

$ sudo apt-get install lrzsz ckermit cutecom

UART Boot Lightning Boot

Some Lightning Boot's are created specifically for UART booting, and some for NAND.

If you are unsure about what type your Lightning Boot is, run this command and check the output. The two options are UART and NAND.

# hexdump -C -n 16 lightning-boot.bin
00000000  00 00 00 ea 55 41 52 54  04 d0 9f e5 01 00 00 eb  |....UART........|
00000010


  • Connect your serial adapter between the Didj and your computer.
  • Configure your terminal
    • Device:(ex. Linux /dev/ttyUSB0) (ex. Windows COM1)
    • baudrate:19200
    • bits:8
    • Flow Control:none
    • Stopbits:1
    • Parity:none
  • Pull D5 low on your cartridge, or through a 470 Ohm resistor to ground.
  • Open the connection in the terminal program, and hold down the power button on the Didj.
  • Using the Send Text or plain method, open lightning-boot UART version (ex. lightning-boot-1.4-UART.bin), nothing will be displayed, but usb/rs232 adapter will show activity, if its got an LED to do so.
  • Once loaded you should see a blue screen with a menu, you can let off the power button (if you are loading an older version of lightning boot, there will be no blue screen, it will stay blank and you will need to keep the power button held down through the entire process). There is two ways to continue from here.

If you have an SD card connected you can use the lightning boot 1.4+ menu to load a zImage or u-boot.bin off of it and be finished here. Otherwise if you would like to continue loading over UART or don't have lightning boot 1.4+ continue to step 2.

Loading U-Boot

  • Change the baud rate to 115200 and then reopen the connection to the device.
  • Select a download type of XModem, click Send File and select/open the U-Boot.bin file. (This will queue up the file for transmission.)
  • Trigger the transmission of this file by pressing any button on the device.

When U-Boot is loaded you will see

LF1000# 


Loading Kernel

General

If your terminal program supports kermit, you can proceed from here. If you are using Linux, and your terminal does not support Kermit, go to the With Linux section, it explains in more detail how to set your PC up to transfer the file.

On Didj

Once uboot has been sent there'll be a terminal prompt, enter.

LF1000# setenv bootargs mem=18M init=/sbin/init console=ttyS0,115200 root=31:06 ro rootflags=noatime rootfstype=jffs2 ubi.mtd=Brio ubi.mtd=prg_Brio ubi.mtd=Cartridge ubi.mtd=EXT
LF1000# setenv loadaddr 1800000
LF1000# loadb

Then send zImage file using the Kermit transfer method once finished there will be another terminal prompt, enter.

LF1000# go 1800000

If you see boot messages filling your console display, you have successfully performed a UART boot. You can now release the power button.


With Linux

Quit your terminal program.

On Host

From the command line, run Kermit:

$ kermit

Run the following at the Kermit prompt.

C-Kermit> set modem type none
C-Kermit> set line /dev/ttyUSB0
C-Kermit> set carrier-watch off
C-Kermit> set speed 115200
C-Kermit> connect

This takes you to the u-boot prompt.

Enter the following: On Didj

LF1000 # setenv bootargs mem=18M init=/sbin/init console=ttyS0,115200 root=31:06 ro rootflags=noatime rootfstype=jffs2 ubi.mtd=Brio ubi.mtd=prg_Brio ubi.mtd=Cartridge ubi.mtd=EXT
LF1000 # setenv loadaddr 1800000
LF1000 # loadb


Type ctrl-backslash and type letter c. This returns you to the prompt. On Host Enter the following to send your image:

C-Kermit>robust
C-Kermit>cd /to/wherever/your/zImage/is
C-Kermit>send zImage

The file is sent. When done, kermit returns you to the C-Kermit> prompt.

Reconnect to u-boot and boot the image you just sent: On Host

C-Kermit>connect

On Didj

LF1000 # go 1800000


If you see boot messages filling your console display, you have successfully performed a UART boot. You can now release the power button