network protocol supported by u-boot
ethernet 초기화
arch\arm\lib\board.c의 board_init_r()함수 에서 eth_initialize(gd->bd)함수를 호출한다.
board_eth_init in board\samsung\smdk5250\smdk5250.c
smc911x_initialize in drivers\net\smc911x.c
smc911x_get_mac_csr in drivers\net\sm911x.h
smc911x_reg_write, smc911x_reg_read in drivers\net\sm911x.h
bootstage_error
bootstage_mark
eth_write_hwaddr() in \net\eth.c
eth_setenv_enetaddr_by_index in \net\eth.c
eth_setenv_enetaddr in \net\eth.c
setenv in common\cmd_nevdit.c
eth_mac_skip in \net\eth.c
getenv
is_valid_ether_addr in include\Net.h
is_multicast_ether_addr in include\Net.h
is_zero_ether_addr in include\Net.h
eth_current_cnaged() in \net\eth.c
setenv
getenv
각 NIC를 eth_device구조체형태로 list를 만든다.
각 함수등록.
그 외 필요한 hardware & software component
network protocol이다 보니 timer를 필요로 한다.
timer는 입력으로 들어오는 pulse를 counting하는 장치로 볼 수 있다. timer/counting 비슷한 맥락.
PWM, CLK, CPU까지..
ethernet초기화의 경우, PHY와 MII가 무엇인지?
tftp(Trivial File Transfer Protocol)
udp 69 port사용.
bootloader에서는 host pc에서 target board로 ethernet을 통해 kernel를 전송하기 위한 용도로 사용된다.
구현이 간단하고 가볍기 때문에 임베디드 시스템에서 사용된다.
user@host:~$ tftp 192.168.1.1 tftp> get file.txt
in bootloader
tftpboot : boot image via network using TFTP protocol
tftpput : TFTP put command, for uploading files to a server
tftpsrv : Listen for an incoming TFTP transfer, receive a file and boot it
환경변수 등록. TFTP block size와 timeout 을 설정한다.
device name출력, subnet확인,
bootp, DHCP
bootp
클라이언트가 서버에 IP 요구 시, 서버는 클라이언트의 Physical address와 미리 바인딩 되어있는 IP를 할당한다.. 즉 "physical address - 할당될 IP address" 사이가 미리 admin에 의해 작성된 binding table에 정해져 있다.
DHCP
클라이언트가 서버에 IP 요구 시,동적으로 IP를 할당한다.
in bootloader
bootp : boot image via network using BOOTP/TFTP protocol
dhcp : boot image via network using DHCP/TFTP protocol
RARP protocol
rarpboot : boot image via network using RARP/TFTP protocol
ping
arp, icmp, 필요
ICMP header를 세팅,
ICMP_ECHO_REPLY :
ICMP_ECHO_REQUEST :
ping_start
ping_send -> set_icmp_header
ArpRequest
arp request
NFS (Network File System)
nfs : boot image via network using NFS protocol
CDP protocol
SNTP protocol