RedBoot commands notes

simple

January 7, 2007

Linux

No Comment

Editing Commands:

  • ^A moves the cursor (insertion point) to the beginning of the line.
  • ^K erases all characters on the line from the cursor to the end.
  • ^P replaces the current line by a previous line from the history buffer.
  • ^N replaces the current line by the next line from the history buffer.

RedBoot Commands:

1. ctrl-c to stop normal boot and enter RedBoot.2. net commands>ip/ip_address : show current net config.

>ip_address -l local_ip -h host_ip -d dns_ip : set net config.

3. some simple commands>version; >reset ; >ping

4. Download programs (from net, serial, disk..)>load [-m tftp|http|disk|xmodem|ymodem] [-h host_ip] [-b mem_addr] [-r -v] filename

-r -v options mean display a small spinner and the file is raw data.
RedBoot>load –r –v –b 0×1020000 –h 10.0.59.2 Redboot_ram.bin //default is tftp

RedBoot>go 0×1020000

-b mem_addr is in ram. Formatted data streams will have an implied load address which this option may override.
RedBoot> load /redboot.ROM -m HTTP -h 192.168.1.104

Address offset = 0x0c400000

Entry point: 0x80000000, address range: 0x80000000-0x8000fe80
RedBoot> load -mode disk hda1:hello.elf

Entry point: 0x00020000, address range: 0x00020000-0x0002fd70
5. file manager
fis list : list current files in Flash.
RedBoot> fis list

Name FLASH addr Mem addr Length Entry point

RedBoot 0×50000000 0×50000000 0×00040000 0×03000000

RedBoot config 0×50FC0000 0×50FC0000 0×00001000 0×00000000

FIS directory 0×50FE0000 0×50FE0000 0×00020000 0×00000000

zImage 0×50040000 0×03000000 0×000C0000 0×03000000

ramdisk 0×50100000 0×00800000 0×00800000 0×00300000
fis load [-b load address] [-c ] [-d ] [name]: load an existing image file into ram.

-b ram_addr : If not specified, the address associated with the image in the FIS directory will be used.

-d: Decompress gzipped image while copying it from flash to RAM.

fis create {-b data address} {-l length} [-f flash address] [-e entry] [-r relocation address] [-s data length] [-n ] [name]

: create an flash image file from a file already in ram.

-b -l -f : necessary options. Write a length of data into flash as an image file. Normally used after “load” command.
RedBoot>load –r –v –b 0×3000000 –h 10.0.59.2 Redboot_rom.bin

RedBoot>load –r –v –m ymodem –b 0×3000000

RedBoot>fis create RedBoot –b 0×03000000 –f 0×50000000 –l 0×40000

-e entry: entry address of the image file. Default to last loaded file entry.

-s data length: actual length of file. Default to last loaded file size.

-r reloc addr: addr in ram which the image file should be relocated. Default to the load address of last loaded file.

fis delete {name} : Delete a image file in flash.

fis write {-b mem_address} {-l length} {-f flash_address}: write a length of ram data into flash.

fis erase {-f flash_address} {-l length} : erase a length of data in flash.

fis lock|unlock {-f flash_address} {-l length} : protect/unprotect a lengh of flash.
RedBoot> fis unlock RedBoot[RAM]
fis init [-f] : initialize the Flash Image System (FIS). It should normally only be executed once, when RedBoot is first installed on the hardware. If the reserved images or their sizes in the FIS change, due to a different configuration of RedBoot being used, it may be necessary to issue the command again though.6. options config command fcon|fconfig -l [-f | -n]— list all current options. (saved in flash, config section.)

-f : list the full name of options.

-n : list the nickname of options.

fconfig nickname value— change the value of an option.

fconfig— change the default bootscript.

7. Running a image file.go [-w timeout] [-c] [-n] [ start_address] — Execute a program. (-c: cache on. -n: network stopped. )

exec [-w timeout] [-r ramdisk_address] [-s ramdisk_length] [-b load_address {-l load_length} ] [-c kernel_command_line] [ entry_point] — Execute a Linux kernel.

-x: Boot kernel with endianess opposite of RedBoot endianess.
RedBoot> exec -b 0x100000 -l 0x80000 -c “noinitrd root=/dev/mtdblock3 console=ttySA0”
8. Memory commands.
dump {-b location} [-l length] [-1 | -2 | -4] — Display memory.
mcopy {-s source} {-d destination} {-l length} [-1 | -2 | -4] — Copy memory
mfill {-b location} {-l length} {-p value} [-1 | -2 | -4] — Fill RAM with a specified pattern

technorati tags:redboot

Related Posts

Better openerp-server init.d script, for ennhanced Monit/d behavior

simple

December 6, 2012

Linux

No Comment

This script was taken from the default distributions openerp-server init.d script and mainly modified for improved Monit/d behavior. The main problem was that sometimes the openerp-server could not be reliable shutdown – as a result a manual kill had been necessary. This should be now addressed with the following script: [crayon-5a669137138ed274590335/]

Read More

UNIX: Jailkit – jk_init, jk_chrootsh

simple

January 25, 2012

Linux

No Comment

Sometimes you do not want to have users bugging around with your server, but only set up a shell environment where they can work. The answer for Solaris, many Linux distributions, OpenBSD, FreeBSD and MacOSX is plain and simple JailKit. Install it using the package manager of your favorite distribution or download the source from: […]

Read More

Leave a Reply