본문 바로가기
IT/ETC

uboot 명령어 및 환경변수

by 아키다 2019. 1. 9.

* uboot 명령어 및 환경변수


[명령어]

Command

Explanation

parameter

bdinfo

board에 대한 정보를 출력

coninfo

console에 대한 device 정보 출

flinfo

Flash Memory에 대한 정보를 화면에 출력

flinfo N (Flash memory bank)

iminfo

image header 정보를 출력

iminfo addr [addr ...]

base

memory의 base address를 설정 하거나 화면에 출력

crc32

crc32를 계산 하거나 계산한 결과를 특정 메모리에 저장

crc32 address count [addr]

cmp

memory의 내용을 비교

cmp [.b, .w, .l] addr1 addr2 count

cp

memory의 내용을 복사

cp [.b, .w, .l] source target count

md

memory의 내용을 화면에 출력

md [.b, .w, .l] address [# of objects]

mm

memory의 내용을 변경

mm [.b, .w, .l] address

mtest

RAM read/write 테스트

mtest [start [end [pattern]]]

mw

memory의 내용을 특정 값으로 채움

mw [.b, .w, .l] address value [count]

nm

memory의 동일한 번지에 값을 변경

nm [.b, .w, .l] address

loop

memory의 특정 영역을 반복하여 실행

loop [.b, .w, .l] address number_of_objects

erase

flash의 내용을 지운다

erase start end

erase start +len

erase N:SF[-SL]

erase bank N

erase <part-id>

erase all

protect

flash의 write protect를 enable/disable 한다

protect on(off)  start end

protect on(off) start +len

protect on(off)  N:SF[-SL]

protect on(off)  bank N

protect on(off) <part-id>

protect on(off)  all

mtdpart

MTD partition table을 보거나 수정

mtdparts

mtdparts delall

mtdparts del part-id

mtdparts add <mtd-dev> <size>[@<offset>] [<name>] [ro]

mtdparts default

bootm

특정 메모리의 주소에 있는 image로 부팅

bootm [addr [arg ...]]

bootp

BOOTP/TFTP를 사용하여 Boot Image를 특정 메모리에 다운로드

bootp [loadAddress] [bootfilename]

boot

bootcmd의 값을 사용하여 시스템 부팅

go

특정 memory의 주소에 있는 application 실행

go addr [arg ...]

loadb

serial line로 binary file을 특정주소에 로드

loadb [ off ] [ baud ]

loads

serial line을 사용하여 S-Record file을 특정 주소에 로드

loads [ off ]

rarp

RARP/TFTP를 사용하여 Boot Image를 특정 메모리 주소에 다운로드

rarpboot [loadAddress] [bootfilename]

tftpboot

TFTP를 사용하여 Boot Image를 특정 메모리에 다운로드

tftpboot [loadAddress] [bootfilename]

printenv

환경변수를 화면에 출력

printenv

printenv name ...

setenv

환경변수 설정

setenv name value …

setenv name

saveenv

환경변수를 flash에 저장

run

환경변수 값의 내용을 실행

run var [...]



[환경변수]


Environment  variable

Explanation

autoload

변수 값이 ‘no’나 ‘n’으로 설정되어 있다면 rarp, bootp, hdcp 명령은 BOOTP/HDCP 서버로 부터 검색된 서버 정보를 통해 다운로드, 그렇지 않은 경우 TFTP를 사용하여 다운로드

autostart

rarp, bootp, hdcp, tftp, disk, doob 를 통해 로드된 boot 이미지를 자동으로 시작

baurate

console의 10진수 baudrate

bootargs

부팅시 커널에 전달할 인수

bootcmd

자동으로 부팅할 때 사용하는 command 정의

bootdelay

부팅 인터럽트 대기 시간

bootfile

tftp를 통해 로드될 기본 이미지 이름

cpuclk

cpu clock 변경

ethaddr

ethernet MAC 주소

eth1addr

ethernet 주소의 두번째 인터페이스

initrd_high

ramdisk 위치를 지정하기 위해 사용

ipaddr

target board IP 주소

serverip

tftp 서버 IP 주소

verify

check sum 실행 여부 설정

rootpath

NFS 서버에서 root file system의 경로

filesize

마지막에 bootp, hdcp, tftp 명령어로 다운로드한 이미지 파일 크기



댓글