'OS/OpenWRT'에 해당되는 글 3건

  1. 2017.03.15 shell 추가
  2. 2017.03.03 Busybox TFTP 사용법
  3. 2017.02.14 Openwrt_build 방법
OS/OpenWRT2017. 3. 15. 14:00
#!/bin/sh /etc/rc.common
# "new(er)" style init script
# Look at /lib/functions/service.sh on a running system for explanations of what other SERVICE_
# options you can use, and when you might want them.

START=80
APP=mrelay
SERVICE_WRITE_PID=1
SERVICE_DAEMONIZE=1

start() {
        service_start /usr/bin/$APP
}

stop() {
        service_stop /usr/bin/$APP
}
#!/bin/sh /etc/rc.common
###########################################
# NOTE - this is an old style init script #
###########################################

START=80
APP=mrelay
PID_FILE=/var/run/$APP.pid

start() {
        start-stop-daemon -S -x $APP -p $PID_FILE -m -b
}

stop() {
        start-stop-daemon -K -n $APP -p $PID_FILE -s TERM
        rm -rf $PID_FILE
}

패키지 추가

https://wiki.openwrt.org/doc/devel/packages

'OS > OpenWRT' 카테고리의 다른 글

Busybox TFTP 사용법  (0) 2017.03.03
Openwrt_build 방법  (0) 2017.02.14
Posted by idwook
OS/OpenWRT2017. 3. 3. 16:37
TFTP 사용법
Usage: tftp [OPTION]... HOST [PORT]
Transfer a file from/to tftp server
Options:
        -l FILE Local FILE
        -r FILE Remote FILE
        -g      Get file
        -p      Put file
        -b SIZE Transfer blocks of SIZE octets
PUT : #  tftp -l {local file name} -p {server ip}
ex) tftp -l test.txt -p 192.168.1.10
GET : #  tftp -r {remote fiel name} -g {server ip} 
ex tftp -r text.txt -g 192.168.1.10

'OS > OpenWRT' 카테고리의 다른 글

shell 추가  (0) 2017.03.15
Openwrt_build 방법  (0) 2017.02.14
Posted by idwook
OS/OpenWRT2017. 2. 14. 11:01

OS : Ubuntu_16.04.01_desktop_amd64

※ (주의사항) 사용자 권한으로 실행하세요

※ OS별 필수 패키지 목록 주소   https://wiki.openwrt.org/doc/howto/buildroot.exigence


1.필수 패키지 설치
~$ sudo update
~$ sudo apt-get install build-essential subversion libncurses5-dev zlib1g-dev gawk gcc-multilib flex git-core gettext libssl-dev unzip mercurial libssl-dev    

※ make 시 패키지 설치가 안된부분이 있으면 상황에 맞추어 추가 설치 해야 make 할수 있습니다.

  

2.Openwrt 빌드 패키지 다운로드 

※  git주소  https://git.openwrt.org/ 
~$ cd /home/user/work   
※root의 폴더에 다운받으면 openwrt 실행에 제약이 있습니다.   
   
~$ sudo git clone https://github.com/openwrt/openwrt.git   
or 버전별 다운로드  
 git clone http://git.openwrt.org/15.05/openwrt.git  
 git clone https://git.openwrt.org/15.05/openwrt.git  
 git clone git://git.openwrt.org/15.05/openwrt.git

3.패키지 인스톨   
 ※ 인스톨 방법 주소  https://wiki.openwrt.org/doc/howto/buildroot.exigence
    
 ~$ cd /home/user/work/openwrt_15.05/   
 ~$ ./scripts/feeds update -a   
 ~$ ./scripts/feeds install -a   
    
 ~$ make menuconfig    
 ~$ make defconfig   
 ~$ make prereq   
 ~$ make V=s j=2   ※ V=s(로그확인용) , j=2(자신의 CPU코어 개수)

 

4. 완료

 ~$ cd /home/user/work/openwrt15.05/bin/ar71xx/*.bin  생성됩니다.


 ※ ar71xx폴더 대신 자신이 make menuconfig에서 선택한 보드에 따라 달라집니다.


'OS > OpenWRT' 카테고리의 다른 글

shell 추가  (0) 2017.03.15
Busybox TFTP 사용법  (0) 2017.03.03
Posted by idwook