「Armadillo」の編集履歴(バックアップ)一覧に戻る
Armadillo - (2009/10/09 (金) 11:37:22) のソース
#contents *Armadillo-220でiproute2を使う **カーネルオプション ArmadilloカーネルVer 2.6.12-3 ネタもと http://diffserv.sourceforge.net/ The following kernel configuration options have to be enabled in the section Networking options: * Kernel/User netlink socket (CONFIG_NETLINK)なし * Network packet filtering (CONFIG_NETFILTER) x Symbol: NETFILTER [=y] x x Prompt: Network packet filtering (replaces ipchains) x x Defined at net/Kconfig:134 x x Depends on: NET x x Location: x x -> Device Drivers x x -> Networking support x x -> Networking support (NET [=y]) x x -> Networking options * QoS and/or fair queueing (CONFIG_NET_SCHED) x Symbol: NET_SCHED [=n] x x Prompt: QoS and/or fair queueing x x Defined at net/Kconfig:573 x x Depends on: NET x x Location: x x -> Device Drivers x x -> Networking support x x -> Networking support (NET [=y]) x x -> Networking options x x -> QoS and/or fair queueing x The following kernel configuration options should be enabled in the section Networking options, QoS and/or fair queueing: * CBQ packet scheduler (CONFIG_NET_SCH_CBQ) * The simplest PRIO pseudoscheduler (CONFIG_NET_SCH_PRIO) * RED queue (CONFIG_NET_SCH_RED) * GRED queue (CONFIG_NET_SCH_GRED) * Diffserv field marker (CONFIG_NET_SCH_DSMARK) * Ingress Qdisc (CONFIG_NET_SCH_INGRESS) * QoS support (CONFIG_NET_QOS) * Packet classifier API (CONFIG_NET_CLS) * TC index classifier (CONFIG_NET_CLS_TCINDEX) * Firewall based classifier (CONFIG_NET_CLS_FW) * U32 classifier (CONFIG_NET_CLS_U32) * Traffic policing (CONFIG_NET_CLS_POLICE) 上記全てON さらにカーネルでnetemをONにする x Symbol: NET_SCH_NETEM [=n] x x Prompt: Network emulator x x Defined at net/sched/Kconfig:207 x x Depends on: NET && NET_SCHED x x Location: x x -> Device Drivers x x -> Networking support x x -> Networking support (NET [=y]) x x -> Networking options x x -> QoS and/or fair queueing x x -> QoS and/or fair queueing (NET_SCHED [=y]) x さらに TBF queue ON x Symbol: NET_SCH_TBF [=n] x x Prompt: TBF queue x x Defined at net/sched/Kconfig:171 x x Depends on: NET && NET_SCHED x x Location: x x -> Device Drivers x x -> Networking support x x -> Networking support (NET [=y]) x x -> Networking options x x -> QoS and/or fair queueing x x -> QoS and/or fair queueing (NET_SCHED [=y]) x **iproute2のコンパイル atmark-distに入っているiproute2だとエラーが出てコンパイルできず。 ここから http://devresources.linux-foundation.org/dev/iproute2/download/ iproute2-2.6.11-050330.tar.gzwを落とす。 Makefileにrmofs追加 iproute2/Makefile romfs: $(ROMFSINST) etc /etc for i in $(SUBDIRS); \ do $(MAKE) -C $$i romfs; done iproute2/lib/Makefile romfs: iproute2/tc/Makefile romfs: $(ROMFSINST) -e CONFIG_USER_IPROUTE2_TC_TC /bin/tc $(ROMFSINST) -e CONFIG_USER_IPROUTE2_TC_TC /usr/lib/tc/q_netem.so iproute2/ip/Makefile romfs: $(ROMFSINST) -e CONFIG_USER_IPROUTE2_IP_IFCFG /bin/ifcfg $(ROMFSINST) -e CONFIG_USER_IPROUTE2_IP_IP /bin/ip $(ROMFSINST) -e CONFIG_USER_IPROUTE2_IP_ROUTEF /bin/routef $(ROMFSINST) -e CONFIG_USER_IPROUTE2_IP_ROUTEL /bin/routel $(ROMFSINST) -e CONFIG_USER_IPROUTE2_IP_RTACCT /bin/rtacct $(ROMFSINST) -e CONFIG_USER_IPROUTE2_IP_RTMON /bin/rtmon $(ROMFSINST) -e CONFIG_USER_IPROUTE2_IP_RTPR /bin/rtpr romfsにディレクトリ追加 mkdir romfs/usr/lib/tc tc/Makefileは、atmark-distのオリジナルを参考に色々変更したので、全部を掲載する。 # Path to parent kernel include files directory KERNEL_INCLUDE=$(ROOTDIR)/$(LINUXDIR)/include LIBC_INCLUDE=$(ROOTDIR)/include DESTDIR= SBINDIR=/usr/sbin CONFDIR=/etc/iproute2 DOCDIR=/usr/share/doc/iproute2 MANDIR=/usr/share/man # Path to db_185.h include DBM_INCLUDE:=/usr/include DEFINES= -DRESOLVE_HOSTNAMES #options if you have a bind>=4.9.4 libresolv (or, maybe, glibc) #LDLIBS=-lresolv ADDLIB= LDLIBS := -lresolv $(LDLIBS) #options for decnet ADDLIB+=dnet_ntop.o dnet_pton.o #options for ipx ADDLIB+=ipx_ntop.o ipx_pton.o CC = arm-linux-gcc #CC = gcc HOSTCC = gcc #CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall #CFLAGS = $(CCOPTS) -I../include $(DEFINES) CFLAGS := $(CCOPTS) $(GLIBCFIX) -I$(KERNEL_INCLUDE) -I../include $(DEFINES) $(CFLAGS) LDLIBS += -L../lib -lnetlink -lutil #LDLIBS += -L/usr/arm-linux/lib -L../lib -lnetlink -lutil #SUBDIRS=lib ip tc misc netem SUBDIRS=lib ip tc LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a #all: Config #all: check-kernel all: @for i in $(SUBDIRS); \ do $(MAKE) $(MFLAGS) -C $$i; done Config: ./configure $(KERNEL_INCLUDE) check-kernel: ifeq ($(KERNEL_INCLUDE),) @echo "Please, set correct KERNEL_INCLUDE"; false else @set -e; \ if [ ! -r $(KERNEL_INCLUDE)/linux/autoconf.h ]; then \ echo "Please, Compile the kernel first"; false; fi endif install: all install -m 0755 -d $(DESTDIR)$(SBINDIR) install -m 0755 -d $(DESTDIR)$(CONFDIR) install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples/diffserv install -m 0644 README.iproute2+tc $(shell find examples -maxdepth 1 -type f) \ $(DESTDIR)$(DOCDIR)/examples install -m 0644 $(shell find examples/diffserv -maxdepth 1 -type f) \ $(DESTDIR)$(DOCDIR)/examples/diffserv @for i in $(SUBDIRS) doc; do $(MAKE) -C $$i install; done install -m 0644 $(shell find etc/iproute2 -maxdepth 1 -type f) $(DESTDIR)$(CONFDIR) install -m 0755 -d $(DESTDIR)$(MANDIR)/man8 install -m 0644 $(shell find man/man8 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man8 ln -sf $(MANDIR)/man8/tc-pbfifo.8 $(DESTDIR)$(MANDIR)/man8/tc-bfifo.8 ln -sf $(MANDIR)/man8/tc-pbfifo.8 $(DESTDIR)$(MANDIR)/man8/tc-pfifo.8 install -m 0755 -d $(DESTDIR)$(MANDIR)/man3 install -m 0644 $(shell find man/man3 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man3 clean: @for i in $(SUBDIRS) doc; \ do $(MAKE) $(MFLAGS) -C $$i clean; done clobber: clean rm -f Config distclean: clean clobber romfs: $(ROMFSINST) etc /etc for i in $(SUBDIRS); \ do $(MAKE) -C $$i romfs; done .EXPORT_ALL_VARIABLES: *atmark-dist カーネルconfig $ make config いらないかも $ make menuconfig メニュー出るのでここでconfig変える $ make dep all *ダウンロードサイトURL 意外と見つけにくいのでメモ http://download.atmark-techno.com/ http://armadillo.atmark-techno.com/filebrowser *atmark-distのビルド方法@Armadillo2x0 http://manual.atmark-techno.com/armadillo-2x0/armadillo-200-series-software-manual/ch07 *トラブル **apt-get updateでエラー「公開鍵を利用できない」 W: GPG error: http://cdn.debian.or.jp etch Release: 公開鍵を利用できないため、以下の署名は検証できませんでした: NO_PUBKEY 9AA38DCD55BE302B W: GPG error: http://ftp.debian.or.jp etch/updates Release: 公開鍵を利用できないため、以下の署名は検証できませんでした: NO_PUBKEY 9AA38DCD55BE302B W: GPG error: http://security.debian.org etch/updates Release: 公開鍵を利用でき ないため、以下の署名は検証できませんでした: NO_PUBKEY 9AA38DCD55BE302B W: これらの問題を解決するためには apt-get update を実行する必要があるかもしれま せん # gpg --keyserver pgp.mit.edu --recv-keys 9AA38DCD55BE302B # gpg --armor --export 9AA38DCD55BE302B | apt-key add - ネタもと 気長に日記: aptでつかう公開鍵の更新(玄箱:etch) http://w033.seesaa.net/article/28051911.html **atmark-dist makeエラー arm-linux-gcc: Command not found $ make make ARCH=arm CROSS_COMPILE=arm-linux- -C linux-2.6.x || exit 1 make[1]: arm-linux-gcc: Command not found $ su # cd /usr/bin # ln -s arm-linux-gnu-cpp-4.1 arm-linux-cpp # ln -s arm-linux-gnu-g++-4.1 arm-linux-g++ # ln -s arm-linux-gnu-gcc-4.1 arm-linux-gcc # ln -s arm-linux-gnu-ld arm-linux-ld # ln -s arm-linux-gnu-ar arm-linux-ar # ln -s arm-linux-gnu-addr2line arm-linux-addr2line # ln -s arm-linux-gnu-as arm-linux-as # ln -s arm-linux-gnu-c++filt arm-linux-c++filt # ln -s arm-linux-gnu-gdb arm-linux-gdb # ln -s arm-linux-gnu-gdbtui arm-linux-gdbtui # ln -s arm-linux-gnu-nm arm-linux-nm # ln -s arm-linux-gnu-objcopy arm-linux-objcopy # ln -s arm-linux-gnu-objdump arm-linux-objdump # ln -s arm-linux-gnu-ranlib arm-linux-ranlib # ln -s arm-linux-gnu-readelf arm-linux-readelf # ln -s arm-linux-gnu-run arm-linux-run # ln -s arm-linux-gnu-size arm-linux-size # ln -s arm-linux-gnu-strings arm-linux-strings # ln -s arm-linux-gnu-strip arm-linux-strip **atmark-dist makeエラー stdio.h: No such file or directory net.c:12:19: error: stdio.h: No such file or directory net.c:13:20: error: unistd.h: No such file or directory net.c:14:20: error: stdlib.h: No such file or directory $ su # cd /usr # ln -s arm-linux-gnu arm-linux **atmark-dist makeエラー tools/genfs_ext2.shでコンパイルに失敗 tools/genfs_ext2.shでコンパイルに失敗します | Armadillo 開発者サイト http://armadillo.atmark-techno.com/faq/genext2fs-update 上記ページでは、genextfsを最新(1.3-7.1-cvs20050225)にしろと書いてあるが、現在2009/9では 1.4-rc1-2.1が最新である。 しかし、1.4-rc1-2.1では同じ問題が起こるので、結局はダウングレードすることになる。 インストールされていたバージョン 1.4-rc1-2.1 ここからdebファイルget genext2fs_1.3-7.1-cvs20050225_i386.deb http://armadillo.atmark-techno.com/filebrowser/armadillo-9/tools/ # dpkg --install genext2fs_1.3-7.1-cvs20050225_i386.deb dpkg - 警告: genext2fs のバージョンを 1.4-rc1-2.1 から 1.3-7.1-cvs20050225 にダ ウングレードしています。 genext2fsバージョン固定しておく # echo "genext2fs hold" | dpkg --set-selections 固定されたかどうかチェックする。Statusが以下のようになっていればOK。 # dpkg --status genext2fs Status: hold ok installed 指定を解除する場合 # echo "genext2fs install" | dpkg --set-selections