MSTAR Wiki
MSTAR Wiki

Genel Bakış[]

MBoot is the MStar boot loader which is composed of SBoot and UBoot. MBoot is used to boot up system, so it would initialize H/W setting and then load application from SPI to ram.

Commands[]

Command Short Desc Usage Example
? alias for 'help'
LzmaDec do Lzma for compress image LzmaDec
arg[1]: u32LzmaBufAddr
arg[2]: u32AppFileLen
arg[3]: u32AppDramAddr
arg[4]: u32LzmaDecBufAddr
base print or set address offset base - print address offset for memory commands
base off - set address offset for memory commands to 'off'
bdinfo print Board Info structure
boot_logo Logo display Boot up logo display              

   - DispX: Display X-axis            - DispY: Display Y-axis            - HorStretch: Horizontal Stretch
   - VerStretch: Vertical Stretch  

boot_logo 0 0 1 1
bootm boot application image from memory bootm [addr [arg ...]]  - boot application image stored in memory
passing arguments 'arg ...'; when booting a Linux kernel,
'arg' can be the address of an initrd image
cmp memory compare [.b, .w, .l] addr1 addr2 count
   - compare memory           
coninfo print console devices and information
cp memory copy cp [.b, .w, .l] source target count
cpmsbin Copy ms bin file (Chakra) from nand to dram
crc32 checksum calculation crc32 address count [addr]
    - compute CRC32 checksum [save at addr]
cusid check the image is release by the valid guys cusid <oui> <swModel> <swVer>
dcache enable or disable data cache dcache [on, off]
    - enable or disable data (writethrough) cache
dmx_init initialize the demux setting dmx_init
 <arg[1]>: dmx flow input source => 0:demodulator; 1:memory; 2:ext input0; 3:ext input1
draw_pixel draw a pixel with color  draw a pixel
    - x: in Dec
    - y: in Dec
    - color: in Hex
draw_string draw string with color draw string
    - string: in char
    - x: in Dec
    - y: in Dec
    - color: in Hex
    - attrib: align attrib, 0: left, 1: middle, 2: right
draw_rect draw rect with color  draw rect
    - x: in Dec
    - y: in Dec
    - w: in Dec
    - h: in Dec
    - color: in Hex
draw_string draw string with color  draw string
    - string: in char
    - x: in Dec
    - y: in Dec
    - color: in Hex
    - attrib: align attrib, 0: left, 1: middle, 2: right
du Disable UART
env2flash read environment parameter file and restore it to flash
envbin read out environment parameter and store it to usb disk
erase erase FLASH memory erase
 start end
    - erase FLASH from addr 'start' to addr 'end'
erase start +len
    - erase FLASH from addr 'start' to the end of sect w/addr 'start'+'len'-1
erase N:SF[-SL]
    - erase sectors SF-SL in FLASH bank # N
erase bank N
    - erase FLASH bank # N
erase all
    - erase all FLASH banks
fatinfo print information about filesystem <interface> <dev[:part]>
    - print information about filesystem from 'dev' on 'interface'
fatload load binary file from a dos filesystem fatload
 <interface> <dev[:part]>  <addr> <filename> [bytes]
    - load binary file 'filename' from 'dev' on 'interface'
      to address 'addr' from dos filesystem
fatls list files in a directory (default /) fatls
 <interface> <dev[:part]> [directory]
    - list files from 'dev' on 'interface' in a 'directory'
fatwrite write binary file to a dos filesystem fatwrite
 <interface> <dev[:part]>  <addr> <filename> [bytes]
    - load binary file 'filename' from 'dev' on 'interface'
      to address 'addr' from dos filesystem
flinfo print FLASH memory information flinfo
 

    - print information for all FLASH memory banks
flinfo N
    - print information for FLASH memory bank # N

go start application at address 'addr' go
 addr [arg ...]
    - start application at address 'addr'
      passing 'arg' as arguments
help print online help help
 [command ...]
    - show help information (for 'command')
'help' prints online help for the monitor commands.

Without arguments, it prints a short usage message for all commands.

To get detailed help information for specific commands you can type
'help' with one or more command names as arguments.
loop infinite loop on address range loop
 [.b, .w, .l] address number_of_objects
    - loop on a set of addresses
md memory display md
 [.b, .w, .l] address [# of objects]
    - memory display
mm memory modify (auto-incrementing) mm
 [.b, .w, .l] address
    - memory modify, auto increment address
mstar update kernal & root file system automatically by script file mstar
 [script_file_name [target_ipaddr [tftp_serverip [bootdelay]]]]
    - script_file_name: auto update script file name
    - target_ipaddr: the ip address of target board
    - tftp_serverip: tftp server ip address
    - bootdelay: boot delay setting
mtest simple RAM test mtest
 [start [end [pattern]]]
    - simple RAM read/write test
mw memory write (fill) mw
 [.b, .w, .l] address value [count]
    - write memory
ustar update kernal & root file system automatically by script file ustar
 [script_file_name]
    - when use this command
    - at first use usb start
    - then use ustar 
nm memory modify (constant address) nm
 [.b, .w, .l] address
    - memory modify, read and keep address
oad_get_size Get the file size from OAD download oad_get_size
 Get download size
    - Address: 32 bits (Hex) address to save download size
osd_create create osd layer osd_create
 create osd layer
    - w: in Dec
    - h: in Dec
osd_destroy destroy osd layer osd_destroy
 destroy osd layer
ostar update kernal & root file system automatically by script file ostar
 [script_file_name]
    - when use this command
    - at first use usb start
    - then use ustar 
pnlinfo set panel info and save to nand flahs
printenv print environment variables printenv
    - print values of all environment variables
printenv name ...
    - print value of environment variable 'name'
protect enable or disable FLASH write protection protect
 on  start end
    - protect FLASH from addr 'start' to addr 'end'
protect on start +len
    - protect FLASH from addr 'start' to end of sect w/addr 'start'+'len'-1
protect on  N:SF[-SL]
    - protect sectors SF-SL in FLASH bank # N
protect on  bank N
    - protect FLASH bank # N
protect on  all
    - protect all FLASH banks
protect off start end
    - make FLASH from addr 'start' to addr 'end' writable
protect off start +len
    - make FLASH from addr 'start' to end of sect w/addr 'start'+'len'-1 wrtable
protect off N:SF[-SL]
    - make sectors SF-SL writable in FLASH bank # N
protect off bank N
    - make FLASH bank # N writable
protect off all
    - make all FLASH banks writable
reset Perform RESET of the CPU
run run commands in an environment variable run
 var [...]
    - run the commands in the environment variable(s) 'var'
saveenv save environment variables to persistent storage
set_paneltype Set Mboot panel type and store the type value in env set_paneltype [type]
 Set Mboot Panel Type
    - pType: Panel Type
setenv set environment variables setenv name value ...
    - set environment variable 'name' to 'value ...'
setenv name
    - delete environment variable 'name'
spi_dma SPI copy data from flash to DRAM by PIU DMA spi_dma flash start addr(hex) DRAM start addr(hex) len(hex)
spi_ea SPI erase all spi_ea
spi_eb SPI erase block spi_es start addr(hex) end addr(hex)
spi_gfo SPI get flash info spi_gfo
spi_gr SPI get Chip Rev spi_gr
spi_id SPI read ID spi_id
spi_in SPI initialization spi_in
spi_r SPI read commands spi_r addr(hex) len(hex)
spi_rb SPI read buffer spi_rb addr(hex) len(hex)
spi_rdc SPI read code from SPI flash to DRAM spi_rdc to_dram_addr(hex) from_flash_addr(hex) len(hex)
    - to_dram_addr: dram start address (hex, flash erase size aligned)
    - from_flash_addr: flash start address (hex, flash erase size aligned)
    - len: total lenght to move data (hex, flash erase size aligned)
spi_rs SPI read status spi_rs
spi_w SPI write commands spi_w addr(hex) len(hex)
spi_wb SPI write buffer spi_ewb edit addr(hex) value(hex) len(hex)
spi_wp SPI write protect spi_wp (enable(1)or disable(0))
spi_wrc SPI write code from DRAM to SPI flash spi_wrc from_dram_addr(hex) to_flash_addr(hex) len(hex)
    - from_dram_addr: dram start address (hex, flash erase size aligned)
    - to_flash_addr: flash start address (hex, flash erase size aligned)
    - len: total lenght to move data (hex, flash erase size aligned)
sspi SPI utility commands sspi
 <device> <bit_len> <dout> - Send <bit_len> bits from <dout> out the SPI
<device>  - Identifies the chip select of the device
<bit_len> - Number of bits to send (base 10)
<dout>    - Hexadecimal string that gets sent
sysinfo set system info and save to nand flahs
tuner_demodtype set frontend type tuner_demodtype
 arg[1]: 1:dvb-t; 2:dvb-t2
tuner_init frondend initialization tuner_init
tuner_tune tune RF to check lock or not tuner_tune
 arg[1]: center frequency(KHz)
arg[2]: bandwidth>>1: 6MHz; 2: 7MHz; 3: 8MHz
usb USB subsystem usb reset - reset (rescan) USB controller
usb stop [f]  - stop USB [f]=force stop
usb tree  - show USB device tree
usb info [dev] - show available USB devices
usb storage  - show details of USB storage devices
usb dev [dev] - show or set current USB storage device
usb part [dev] - print partition table of one or all USB storage devices
usb read addr blk# cnt - read `cnt' blocks starting at block `blk#'
    to memory address `addr'
usb performance r/w blksize loopcount - do read/write performance test
    transfer blksize bytes for loopcount loops
ustar update kernal & root file system automatically by script file  [script_file_name]
    - when use this command
    - at first use usb start
    - then use ustar 
usbboot boot from USB device usbboot
 loadAddr dev:part
ustar update kernal & root file system automatically by script file  [script_file_name]
    - when use this command
    - at first use usb start
    - then use ustar 
version print monitor version