OpenWrt build system Installation - Leo-Mun/UROP_SDN GitHub Wiki

OpenWrt λΉŒλ“œ μ‹œμŠ€ν…œμ€ OpenWrt Linux 배포 용 λΉŒλ“œ μ‹œμŠ€ν…œμž…λ‹ˆλ‹€. OpenWrt λΉŒλ“œ μ‹œμŠ€ν…œμ€ GNU / Linux, BSD λ˜λŠ” MacOSX 운영 μ²΄μ œμ—μ„œ μž‘λ™ν•©λ‹ˆλ‹€. λŒ€μ†Œ 문자λ₯Ό κ΅¬λ³„ν•˜λŠ” 파일 μ‹œμŠ€ν…œμ΄ ν•„μš”ν•©λ‹ˆλ‹€.

독립 μ‹€ν–‰ ν˜• μ„€μΉ˜ λ˜λŠ” 가상 ν™˜κ²½ (VMware λ˜λŠ” Qemu)μ—μ„œ μ‹€ν–‰λ˜λŠ” GNU / Linux 배포판 (Debian)을 μ‚¬μš©ν•˜λŠ” 것이 μ’‹μŠ΅λ‹ˆλ‹€.

UbuntuλŠ” κ³΅μ‹μ μœΌλ‘œ μ§€μ›λ˜λŠ” ν™˜κ²½μ΄ μ•„λ‹ˆμ§€λ§Œ 쒋은 λΉŒλ“œλ₯Ό μƒμ„±ν•˜λŠ” κ²ƒμœΌλ‘œ λ³΄μž…λ‹ˆλ‹€. Cygwin (Windows)은 파일 μ‹œμŠ€ν…œμ—μ„œ λŒ€μ†Œ λ¬Έμžκ°€ κ΅¬λΆ„λ˜μ§€ μ•ŠκΈ° λ•Œλ¬Έμ— μ§€μ›λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

이전 Buildroot 버전, 였래된 GNU / Linux λ³€ν˜•μ— λŒ€ν•œ 였래된 μ •λ³΄λŠ” λ‹€μŒ μœ„μΉ˜μ— λ³΄κ΄€λ©λ‹ˆλ‹€. buildroot.exigence.old

일반적인 문제의 경우 벀치 마크, 일반적인 μ΅œμ ν™”λŠ” development을 μ°Έμ‘°ν•˜μ‹­μ‹œμ˜€.

Prerequisites

μ„€μΉ˜ κ°€λŠ₯ν•œ OpenWrt νŽŒμ›¨μ–΄ 이미지 νŒŒμΌμ„ μƒμ„±ν•˜λ €λ©΄. 8MBκ°€ ν•„μš”ν•©λ‹ˆλ‹€.

  • ca. OpenWrt λΉŒλ“œ μ‹œμŠ€ν…œ 용 200MB ν•˜λ“œ λ””μŠ€ν¬ 곡간
  • ca. OpenWrt λΉŒλ“œ μ‹œμŠ€ν…œ + OpenWrt ν”Όλ“œ 용 300MB의 ν•˜λ“œ λ””μŠ€ν¬ 곡간
  • ca. OpenWrt ν”Όλ“œμ—μ„œ λΉŒλ“œν•˜λŠ” λ™μ•ˆ λ‹€μš΄λ‘œλ“œ ν•œ μ†ŒμŠ€ νŒ¨ν‚€μ§€μ— 2.1GB의 ν•˜λ“œ λ””μŠ€ν¬ 곡간
  • ca. OpenWrtλ₯Ό λΉŒλ“œ (즉, 크둜슀 컴파일)ν•˜κ³  νŽŒμ›¨μ–΄ νŒŒμΌμ„ μƒμ„±ν•˜κΈ° μœ„ν•΄ 3-4 GB의 ν•˜λ“œ λ””μŠ€ν¬ μ—¬μœ  곡간

  • ca. Openwrtλ₯Ό λΉŒλ“œν•˜λ €λ©΄ 1 ~ 4GB의 RAM이 ν•„μš”ν•©λ‹ˆλ‹€. (x86의 imgμ—λŠ” ​​4GB RAM이 ν•„μš”ν•©λ‹ˆλ‹€)

GNU / Linuxμ—μ„œ μ„€μΉ˜ 절차

β†’Procedure on ~BSD / β†’Procedure on MAC OS X

  1. λ£¨νŠΈκ°€ μ•„λ‹Œ μ‚¬μš©μžλ‘œ λͺ¨λ“  것을 μˆ˜ν–‰ν•˜μ„Έμš”
  2. λ””λ ‰ν† λ¦¬μ—μžˆλŠ” λͺ¨λ“  OpenWrt λΉŒλ“œ μ‹œμŠ€ν…œ λͺ…령을 μ‹€ν–‰ν•˜μ„Έμš” ~ / openwrt / trunk /
  3. 전체 κ²½λ‘œμ— κ³΅λ°±μ΄μžˆλŠ” λ””λ ‰ν† λ¦¬μ—λŠ” λΉŒλ“œν•˜μ§€ λ§ˆμ„Έμš”.
  4. 루트 μ‚¬μš©μžκ°€ μ•„λ‹Œ OpenWrtλ₯Ό λ‹€μš΄λ‘œλ“œ ν•œ λ””λ ‰ν† λ¦¬μ˜ μ†Œμœ κΆŒμ„ λ³€κ²½ν•˜μ„Έμš” (sudo chown -R user : user / openwrt /).

  1. git을 μ„€μΉ˜ν•˜λ©΄ OpenWrt μ†ŒμŠ€ μ½”λ“œλ₯Ό νŽΈλ¦¬ν•˜κ²Œ λ‹€μš΄λ‘œλ“œν•˜κ³  크둜슀 컴파일 과정을 μˆ˜ν–‰ν•˜λŠ” 도ꡬλ₯Ό λΉŒλ“œ ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
sudo apt-get update 
sudo apt-get install git-core build-essential libssl-dev libncurses5-dev unzip gawk zlib1g-dev

일뢀 ν”Όλ“œλŠ” gitμ—μ„œλŠ” μ‚¬μš©ν•  수 μ—†μ§€λ§Œ subversion (short : svn) λ˜λŠ” mercurial을 ν†΅ν•΄μ„œλ§Œ μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€. μ†ŒμŠ€ μ½”λ“œλ₯Ό μ–»μœΌλ €λ©΄ svnκ³Ό mercurial도 μ„€μΉ˜ν•΄μ•Όν•©λ‹ˆλ‹€.

sudo apt-get install subversion mercurial
  • λΉŒλ“œ 도ꡬ에 λŒ€ν•œ μ •λ³΄λŠ” make와 build-essential을 μ°Έμ‘°ν•˜μ‹­μ‹œμ˜€.
  • 깃에 λŒ€ν•œ μ •λ³΄λŠ” git (7)을 μ°Έμ‘°ν•˜μ‹­μ‹œμ˜€.
  • Subversion 도ꡬ에 λŒ€ν•œ μžμ„Έν•œ λ‚΄μš©μ€ svn 및 subversion μ„€λͺ…μ„œ (μ—¬λŸ¬ μ–Έμ–΄)λ₯Ό μ°Έμ‘°ν•˜μ‹­μ‹œμ˜€.
  1. OpenWrt bleeding edge (트렁크 버전)λ₯Ό git으둜 λ‹€μš΄λ‘œλ“œν•˜μ‹­μ‹œμ˜€ (μžμ„Έν•œ λ‚΄μš©μ€ λ‹€μš΄λ‘œλ“œ μ†ŒμŠ€ μ°Έμ‘°) :
 git clone https://github.com/openwrt/openwrt.git 

μ΄λ ‡κ²Œν•˜λ©΄ OpenWrt λΉŒλ“œ μ‹œμŠ€ν…œ λΉŒλ“œ 디렉토리 인 'openwrt'디렉토리가 μƒμ„±λ©λ‹ˆλ‹€
OpenWrt 툴체인 "OpenWrt λΉŒλ“œ μ‹œμŠ€ν…œ"이 ν¬ν•¨λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€.
HTTPSλ₯Ό μ‚¬μš©ν•˜μ—¬ μ••μΆ•λœ μ†ŒμŠ€λ₯Ό λ‹€μš΄λ‘œλ“œν•˜μ‹­μ‹œμ˜€.
파일 이름 : openwrt-master.zip
ν˜„μž¬ 체크섬
md5 : e450f968e19abd733458a1b3b2fe59c8
sha256 : 4f268c75c5525c5a9a74766a2e473aa085ed7a1262fda72c0e9575b48414fdba

  1. (선택 사항) μ‚¬μš© κ°€λŠ₯ν•œ λͺ¨λ“  "ν”Όλ“œ"λ₯Ό λ‹€μš΄λ‘œλ“œν•˜μ—¬ μ„€μΉ˜ν•˜μ‹­μ‹œμ˜€ (μΆ”κ°€ μ˜΅μ…˜μ€ Openwrt ν”Όλ“œ μ°Έμ‘°).
 cd openwrt 
./scripts/feeds update -a
./scripts/feeds install -a
  1. OpenWrt λΉŒλ“œ μ‹œμŠ€ν…œμ—μ„œ λ‹€μŒ λͺ…λ Ή 쀑 ν•˜λ‚˜λ₯Ό μ‚¬μš©ν•˜μ—¬ λΉŒλ“œ μ‹œμŠ€ν…œμ—μ„œ λˆ„λ½ 된 νŒ¨ν‚€μ§€λ₯Ό ν™•μΈν•˜μ‹­μ‹œμ˜€.
 make menuconfig (most likely you would like to use this) 
-OR-
make defconfig
-OR-
make prereq
// Note: If you use these in order, or use more than one, the **compilation will fail**.//

컴파일 ν•  λ‚΄μš©μ„ μ„ νƒν•΄μ•Όν•©λ‹ˆλ‹€.

  1. λΉŒλ“œ μ§„ν–‰ (즉, λ‹€μš΄λ‘œλ“œ ν•œ μ†ŒμŠ€λ₯Ό λ°”μ΄λ„ˆλ¦¬λ‘œ 크둜슀 컴파일) \ 크둜슀 컴파일 ν”„λ‘œμ„ΈμŠ€ ν›„ 트렁크 디렉토리에 총 크기가 3GiB 이상인 240000 개 μ΄μƒμ˜ 파일이 ν¬ν•¨λ˜μ—ˆμŠ΅λ‹ˆλ‹€

μ•Œλ €μ§„ μ „μ œ 쑰건 및 ν•΄λ‹Ή νŒ¨ν‚€μ§€ ν‘œ

ν‘œ

Examples of Package Installations

Ubuntu 12.04LTS:

 sudo apt-get install build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercur 

Downloading Sources

15.05 branch (Chaos Calmer) Main repository

 git clone -b chaos_calmer git://github.com/openwrt/chaos_calmer.git 
⚠️ **GitHub.com Fallback** ⚠️