admin

make 명령행 옵션

출처 : http://blog.daum.net/english_100/13 9. make를 실행하는 법   make의 종료 상태는 다음 3가지중 하나를 갖는다.   0 make가 성공적으로 끝났음   2 make 수행중 에러가 발생했음. 그 에러에 대한 메시지를 출력함   1 ‘-q’ 옵션이 사용되었고 어떤 타깃이 아직 최신상태로 갱신되지 않았다고 make가 결정했을 때   9.1 Makefile을 명기하기 위한 옵션   특정 makefile을 명기하기 […]

make 명령행 옵션 더 읽기"

make 암묵적 규칙 사용

출처 : http://blog.daum.net/english_100/14 10. 암묵적 규칙 사용하기 C 소스파일을 C 컴파일러를 이용해 오브젝트 파일을 생성하는 이런 표준적인 작업은 자주 발생하는 일이다. 암묵적 규칙은 사용자가 구체적으로 명기하지 않은 사항에 대해 관례적으로 사용하는 기술을 말한다. 예를 들어 ‘.c’로 끝나는 파일을 만나면 make는 C 컴파일러를 통해 오브젝트 파일을 만드는 암묵적 규칙을 수행한다. 10.1 암묵적 규칙 사용하기 타깃 파일을

make 암묵적 규칙 사용 더 읽기"

make 텍스트 변환 함수

출처 : http://blog.daum.net/english_100/12 8. 텍스트 변환을 위한 함수   8.1 함수 호출 문법   함수 호출은 변수 참조와 비슷하다. 즉 : $(function arguments) 또는 ${function arguments}   여기서 function은 함수 이름으로 make가 제공하는 함수거나 사용자가 직접 만든 함수일 수 있다. arguments는 함수의 인자로서 함수명과는 공백문자나 탭문자 등으로 분리되고 여러개의 인자가 있을 경우는 콤마로 분리한다. 함수의

make 텍스트 변환 함수 더 읽기"

make 변수 문법

출처 : http://blog.daum.net/english_100/10 6. 변수 사용법   변수란 문자열을 함유하고 있는 makefile 내에 정의된 이름이다. 이 값은 타깃이나 prerequisite, recipe 등 makefile의 다른 부분에서 치환되어 쓰이게 된다. 변수나 함수는 recipe 에서만 제외하고 makefile을 읽어들일 때 ‘=’의 오른쪽 부분이나 define 지시자의 몸통부분의 값으로 펼쳐진다. 변수에는 파일이름, 컴파일러에게 건네줄 옵션, 실행할 프로그램, 검색할 디렉토리 등등 상상할 수 있는

make 변수 문법 더 읽기"

OpenWRT 이미지 빌드

export KERNEL_SRC_DIR=/home/hasu0707/ib/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_rt305xexport ROOTFS_SRC_DIR=/home/hasu0707/ib/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/root-ramipsexport TOOLCHAIN_BIN_DIR=/home/hasu0707/ib/staging_dir/host/binexport DTS_DIR=/home/hasu0707/ib/target/linux/ramips/dtsexport OUTPUT_DIR=/home/hasu0707/ib/bin/ramips cp -fv ${KERNEL_SRC_DIR}/vmlinux.elf ${OUTPUT_DIR}/openwrt-ramips-rt305x-vmlinux.elfcp -fv ${KERNEL_SRC_DIR}/vmlinux ${OUTPUT_DIR}/openwrt-ramips-rt305x-vmlinux.bin ${TOOLCHAIN_BIN_DIR}/lzma e \${KERNEL_SRC_DIR}/vmlinux \-lc1 -lp2 -pb2 \${KERNEL_SRC_DIR}/vmlinux.bin.lzma cp -fv ${KERNEL_SRC_DIR}/uImage.lzma ${OUTPUT_DIR}/openwrt-ramips-rt305x-uImage.bin ${TOOLCHAIN_BIN_DIR}/mksquashfs4 \${ROOTFS_SRC_DIR} \${KERNEL_SRC_DIR}/root.squashfs \-nopad -noappend -root-owned -comp xz -Xpreset 9 \-Xe -Xlc 0 -Xlp 2 -Xpb 2  -b 256k -p ‘/dev d 755 0 0’ \-p ‘/dev/console c 600 0 0

OpenWRT 이미지 빌드 더 읽기"

iptables manpage

NAME iptables – IPv4 기반 패킷 필터링 및 NAT 를 위한 관리자 툴   SYNOPSIS iptables [-t table] -[AD] chain rule-specification [options] iptables [-t table] -I chain [rulenum] rule-specification [options] iptables [-t table] -R chain rulenum rule-specification [options] iptables [-t table] -D chain rulenum [options] iptables [-t table] -[LFZ] [chain] [options] iptables [-t table] -N

iptables manpage 더 읽기"

kernel compile

export LINUX_SRC_DIR=/home/hasu0707/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_rt305x/linux-3.10.36export INCLUDE_DIR=/home/hasu0707/openwrt/staging_dir/host/includeexport OUTPUT_DIR=/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_rt305x make -C ${LINUX_SRC_DIR} \HOSTCFLAGS=”-O2 -I${INCLUDE_DIR} -Wall -Wmissing-prototypes -Wstrict-prototypes” \CROSS_COMPILE=”mipsel-openwrt-linux-uclibc-” \ARCH=”mips” \KBUILD_HAVE_NLS=no \CONFIG_SHELL=”/bin/bash” \V=” mipsel-openwrt-linux-uclibc-objcopy \-O binary \-R .reginfo \-R .notes \-R .note \-R .comment \-R .mdebug \-R .note.gnu.build-id \-S ${OUTPUT_DIR}/linux-3.10.36/vmlinux \${OUTPUT_DIR}/vmlinux mipsel-openwrt-linux-uclibc-objcopy \-R .reginfo \-R .notes \-R .note \-R .comment \-R .mdebug \-R .note.gnu.build-id \-S ${OUTPUT_DIR}/linux-3.10.36/vmlinux \${OUTPUT_DIR}/vmlinux.elf

kernel compile 더 읽기"

firmware-mod-kit의 펌웨어(bin) 추출과정 설명

■ firmware-mod-kit의 펌웨어(bin) 추출과정 설명 firmware-mod-kit(https://code.google.com/archive/p/firmware-mod-kit/downloads)의 extract-firmware.sh의 동작과정을 설명한다. ■ 필요한 프로그램 fmk/src/binwalk-1.0/src/bin/binwalk-script fmk/unsquashfs_all.sh ■ 추출 과정 1. 쉘스크립트 변수 정의 BINWALK="/opt/fmk/src/binwalk-1.0/src/bin/binwalk-script -v -m /opt/fmk/src/binwalk-1.0/src/binwalk/magic/binwalk" UNSQUASHFS="/opt/fmk/unsquashfs_all.sh" 2. 펌웨어 정보 추출 ${BINWALK} -f bininfo.txt test.bin test.bin의 정보를 bininfo.txt로 출력한다. 정상적으로 실행되면 아래와 같은 내용이 bininfo.txt에 들어있다. Firmware Mod Kit (extract) 0.99, (c)2011-2013 Craig Heffner, Jeremy Collake

firmware-mod-kit의 펌웨어(bin) 추출과정 설명 더 읽기"

dts 파일 컴파일

dts – device tree source textdtb – device tree blob ~/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_rt305x/linux-3.10.36/scripts/dtc/dtc \-O dtb \-o ~/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_rt305x/SR-K100.dtb \~/openwrt/target/linux/ramips/dts/SR-K100.dts

dts 파일 컴파일 더 읽기"

위로 스크롤