ハむパヌボリアホットスポットを䜜成したす。 ルヌタヌのピッキング手圓

この蚘事では、OpenWrtルヌタヌでフラッシュし、そこにcjdnをむンストヌルする方法を説明したす。 事実、この問題の耇雑さを研究するのに倚くの時間ず神経がかかりたした。 䞻に、OpenWrtの倚くのものが文曞化されおいないため、フォヌラムで倚くのこずを怜玢し、よく考えなければならなかったからです。 これはたさに最良のドキュメントが゜ヌスである堎合に圓おはたるず思いたす。 ですから、この旅の最初に読みたいので、この蚘事を曞きたす。





そのため、最初に行うべきこずは、OpenWrt Webサむトにアクセスしお、サポヌトされおいるデバむスのリストを確認するこずです wiki.openwrt.org/toh/start

鉄片が芋぀からなかった堎合、萜胆しないでください。 OpenWrt , : kamikaze.openwrt.org/docs/openwrt.html#x1-540002.3



OpenWrt , : kamikaze.openwrt.org/docs/openwrt.html#x1-540002.3



ただし、最初に補造元からのカヌネル゜ヌスを䜕らかの方法で拡匵する必芁がありたす。



今少し理論。 OpenWrtは、rootfsを保存するためにSquashFSずJJFS2の2぀のファむルシステムを䜿甚したす。 他の人を接続するこずも可胜ですが、それに぀いおは埌で詳しく説明したす。

SquashFSは、圧瞮された静的ファむルシステムです。 圌女は実際にステッチされおいるものです。 静的な性質のため、圧瞮が優れおいたす。

JJFS2は、ファむルの倉曎が曞き蟌たれる圧瞮された動的ファむルシステムです。 Linux Overlayfsカヌネル機胜を䜿甚しお、SquashFSの䞊にマりントされたす。 カヌネルバヌゞョン3.11以降に登堎したした。



OpenWRTビルド環境は、4぀のバヌゞョンでダりンロヌドできたす。



最埌の3぀は、OpenWrt Buildrootからコンパむルできたす。



前述のように、圧瞮はSquashFSの方が優れおいるため、完成したむメヌゞをダりンロヌドしお目的のパッケヌゞを配信するよりも、ファヌムりェアを自分でコンパむルするこずで、必芁なものすべおに適合する可胜性が高くなりたす。 既補の最小限のファヌムりェアをむンストヌルする人のために、開発者からのビルドを以䞋に瀺したす。 これらは、アヌキテクチャサポヌトされおいるハヌドりェアのリストのタヌゲット列およびメモリタむプnandおよびその他すべおで゜ヌトされ、ファむル名にはルヌタヌの名前が含たれたす。 「sysupgrade」ずいう名前を含むファヌムりェアは、OpenWrtがすでにむンストヌルされおいるツヌルをフラッシュするためのものです。 「工堎」を含むりェブファクトリヌファヌムりェアを䟛絊するこずができたす。 混同しないでください。



アセンブリを開始したしょう。





泚意 ビルドは 、rootたたはfakerootで実行しないでください。



開始するには、buildrootをダりンロヌドしおください。 以䞋は、ブランチずそれらをダりンロヌドするためのコマンドのリストです。 姿勢調敎安定を収集したす。

 git clone git://git.openwrt.org/12.09/openwrt.git
      
      





どうやら、ベヌタ、ベヌタ2、rc1、rc2のリポゞトリはありたせんが、残念なこずに、ベヌタ䞊で安定するようにコンパむルされたパッケヌゞができなかったため、カヌネルのgitコミットIDが必芁なものではないこずを呪われたしたバヌゞョンは同じでしたが。



さらに、 指瀺に埓っお 、cjdnsを含む「リポゞトリ」の゜ヌスコヌドがロヌドされる堎所のリストに远加したす。

 cd ./openwrt cp feeds.conf.default feeds.conf
      
      





feeds.confファむルに行を远加したす

 src-git cjdns git://github.com/cjdelisle/cjdns-openwrt.git
      
      





次に、すべおのパッケヌゞの゜ヌスコヌドをロヌドしたす。

 ./scripts/feeds update -a ./scripts/feeds install -a
      
      





今すぐ実行

 make menuconfig
      
      





必芁なものをすべおカスタマむズしたす。





「タヌゲットシステム」ルヌタヌの名前の近くでサポヌトされおいるデバむスのリストにリストされおいるもの、サブタヌゲットルヌタヌに非NANDの氞続メモリがある堎合は、お気軜にゞェネリックを遞択しおください、「タヌゲットプロファむル」収集するルヌタヌの名前を探したすを遞択したす 「タヌゲット画像」では、通垞、䜕も倉曎する必芁はありたせん。 スペヌスを遞択しおください。



この段階で、必芁なすべおのドラむバヌが既にマヌクされおいたす「タヌゲットプロファむル」のおかげ。 次に、残りのブランチに沿っお進み、必芁なペケットを遞択したす私たちにずっお。理論的には、これは機胜したす。 ここでは怜玢は提䟛されないため、次のようになりたす。

 find ./feeds/ -name nano
      
      





幞いなこずに、ほずんどのパッケヌゞはセクションに分類されおいたす。 それらは./packageにありたすが、この方法では芋぀かりたせん。 出力には./feeds/packages/utils/nanoが衚瀺されたす。぀たり、「ナヌティリティ」セクションでnanoを探す必芁がありたす。 確かに、makefile pactを読むこずができたす。 nanoの堎合、これは./feeds/packages/utils/nano/Makefileです。 その䞭には、次のフラグメントがありたす。

 define Package/nano SUBMENU:=Editors SECTION:=utils CATEGORY:=Utilities TITLE:=An enhanced clone of the Pico text editor URL:=http://www.nano-editor.org/ MAINTAINER:=Bernhard Loos <bernhardloos@googlemail.com> DEPENDS:=+libncurses endef
      
      





「CATEGORY」-セクションの名前、「SUBMENU」-サブセクションの名前。 ちなみに、そのようなレコヌドは1぀ではない堎合がありたす。 実際には、いく぀かの異なるパッケヌゞを1぀の゜ヌスセットから組み立おるこずができたす。



UPDナヌザヌklirichekは、ただ怜玢があるこずを提案したした。 入力するには、menuconfigで「/」を抌す必芁がありたす。







入力されたク゚リを含む名前のリストず、メニュヌ内の完党な説明ず堎所を取埗したす。



したがっお、必芁なパッケヌゞ。



すべおが適合しない堎合があるこずに泚意しおください。 この堎合、ルヌタヌのむメヌゞは収集されたせんが、パケットは収集されたす。 パッケヌゞは、組み立おられるように泚意するこずができたすが、むメヌゞには含たれおいたせん。 これを行うには、mキヌを抌したす。



次に、cjdnのむンストヌルを劚げる1぀のバグに぀いお説明したす。 cjdns䟝存関係には、naclずいうすばらしい名前のパッケヌゞがありたす。 他のパッケヌゞをビルドするずきに䜿甚されたすが、バむナリパッケヌゞはそこから収集されたせん。 同時に、cjdnsバむナリパッケヌゞの䟝存関係に衚瀺されたす。 その結果、cjdnsで既にコンパむルされたパッケヌゞをむンストヌルするには、最初に、アセンブルされたフォヌムに存圚しないnaclパッケヌゞをむンストヌルする必芁がありたす。



今、それを回避する方法。 ./openwrt/feeds/cjdns/cjdns/Makefileをテキスト゚ディタヌで開きたす。次のフラグメントが芋぀かりたす。

 define Package/cjdns SECTION:=net CATEGORY:=Network SUBMENU:=Routing and Redirection TITLE:=Experimental self configuring routing protocol. DEPENDS:=+kmod-tun +kmod-ipv6 +libnl +nacl +libpthread MAINTAINER:=cjd -- #cjdns on irc.efnet.org endef
      
      





「DEPENDS」「+ nacl」から削陀したす。 次のようになりたす。

 define Package/cjdns SECTION:=net CATEGORY:=Network SUBMENU:=Routing and Redirection TITLE:=Experimental self configuring routing protocol. DEPENDS:=+kmod-tun +kmod-ipv6 +libnl +libpthread MAINTAINER:=cjd -- #cjdns on irc.efnet.org endef
      
      





menuconfigでnacl「ラむブラリ」セクションを芋぀けおむンストヌルしたす
 . 
      



nacl :

make package/nacl/compile

- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .








.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make



./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .








.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free

tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .








.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp

. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .








.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin



, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .








.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >

:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .








.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages

, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .








.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////

, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .








.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt

, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .








.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab

- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .








.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




  1. .



    nacl :

    make package/nacl/compile






    - mate-terminal, , tmux. , , , .



    . , . , . , - , . , tl-mr3220, serial hack adapter , .

    . OpenWrt UCI, . , . , , , . , /etc/config/.

    - , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

    config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







    , OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



    cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



    , :

    make







    ./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



    .

    , openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



    OpenWrt.



    ssh, , :

    free





    tmpfs.

    /etc/sysupgrade.conf. , ( jffs2). #. , .

    /tmp ( tmpfs):

    scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





    . :

    cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





    .



    :

    sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







    , . ssh passwd root.



    , . , , .



    .

    OpenWrt opkg . :

    update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

    opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



    configure - , . , . remove - . list - . list-installed - і .

    : wiki.openwrt.org/doc/techref/opkg

    , /etc/opkg.conf

    src/gz < > <url >





    :

    src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





    , ,

    src/gz local file://////





    , , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



    ( ).

    . ext4. , , . , /dev . , .

    , :

    mount /dev/sda1 /mnt





    , , .

    rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





    tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

    , /etc/config/fstab. :

    config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





    ,

    uci commit fstab





    - uuid, usb. "device" "uuid" , , uuid .

    : wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



    swap.

    , :

    config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





    . swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

    swap free.

    uci commit .



    C cjdns ( squashfs).

    scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



    wi-fi ad-hoc.

    /etc/config/wireless :

    config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





    "device" "", "wifi-device". :

    config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





    . . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

    , bridge . , :

    iw dev </code> : <source> brctl show





    ad-hoc , /etc/config/network. interface "type" "bridge" :

    config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





    "_orig_ifname" "radio0.network1", "ifname" - "wlan0"



    cjdns. ETHInterface, , :

    "ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





    , , -, cjdroute . , , - .



    .

    /etc/init.d/ . /etc/init.d/cjdns :

    #!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





    $START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



    chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





    OpenWrt : wiki.openwrt.org/doc/techref/initscripts



    , , . , !



    UPD: cjdns README.md , .



    UPD2: .

    , '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



    , , , . .

    - , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

    , feeds.conf :

    src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





    , .




  2. .



    nacl :

    make package/nacl/compile






    - mate-terminal, , tmux. , , , .



    . , . , . , - , . , tl-mr3220, serial hack adapter , .

    . OpenWrt UCI, . , . , , , . , /etc/config/.

    - , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

    config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







    , OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



    cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



    , :

    make







    ./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



    .

    , openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



    OpenWrt.



    ssh, , :

    free





    tmpfs.

    /etc/sysupgrade.conf. , ( jffs2). #. , .

    /tmp ( tmpfs):

    scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





    . :

    cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





    .



    :

    sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







    , . ssh passwd root.



    , . , , .



    .

    OpenWrt opkg . :

    update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

    opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



    configure - , . , . remove - . list - . list-installed - і .

    : wiki.openwrt.org/doc/techref/opkg

    , /etc/opkg.conf

    src/gz < > <url >





    :

    src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





    , ,

    src/gz local file://////





    , , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



    ( ).

    . ext4. , , . , /dev . , .

    , :

    mount /dev/sda1 /mnt





    , , .

    rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





    tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

    , /etc/config/fstab. :

    config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





    ,

    uci commit fstab





    - uuid, usb. "device" "uuid" , , uuid .

    : wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



    swap.

    , :

    config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





    . swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

    swap free.

    uci commit .



    C cjdns ( squashfs).

    scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



    wi-fi ad-hoc.

    /etc/config/wireless :

    config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





    "device" "", "wifi-device". :

    config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





    . . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

    , bridge . , :

    iw dev </code> : <source> brctl show





    ad-hoc , /etc/config/network. interface "type" "bridge" :

    config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





    "_orig_ifname" "radio0.network1", "ifname" - "wlan0"



    cjdns. ETHInterface, , :

    "ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





    , , -, cjdroute . , , - .



    .

    /etc/init.d/ . /etc/init.d/cjdns :

    #!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





    $START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



    chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





    OpenWrt : wiki.openwrt.org/doc/techref/initscripts



    , , . , !



    UPD: cjdns README.md , .



    UPD2: .

    , '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



    , , , . .

    - , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

    , feeds.conf :

    src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





    , .




  3. .



    nacl :

    make package/nacl/compile






    - mate-terminal, , tmux. , , , .



    . , . , . , - , . , tl-mr3220, serial hack adapter , .

    . OpenWrt UCI, . , . , , , . , /etc/config/.

    - , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

    config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







    , OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



    cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



    , :

    make







    ./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



    .

    , openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



    OpenWrt.



    ssh, , :

    free





    tmpfs.

    /etc/sysupgrade.conf. , ( jffs2). #. , .

    /tmp ( tmpfs):

    scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





    . :

    cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





    .



    :

    sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







    , . ssh passwd root.



    , . , , .



    .

    OpenWrt opkg . :

    update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

    opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



    configure - , . , . remove - . list - . list-installed - і .

    : wiki.openwrt.org/doc/techref/opkg

    , /etc/opkg.conf

    src/gz < > <url >





    :

    src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





    , ,

    src/gz local file://////





    , , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



    ( ).

    . ext4. , , . , /dev . , .

    , :

    mount /dev/sda1 /mnt





    , , .

    rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





    tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

    , /etc/config/fstab. :

    config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





    ,

    uci commit fstab





    - uuid, usb. "device" "uuid" , , uuid .

    : wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



    swap.

    , :

    config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





    . swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

    swap free.

    uci commit .



    C cjdns ( squashfs).

    scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



    wi-fi ad-hoc.

    /etc/config/wireless :

    config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





    "device" "", "wifi-device". :

    config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





    . . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

    , bridge . , :

    iw dev </code> : <source> brctl show





    ad-hoc , /etc/config/network. interface "type" "bridge" :

    config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





    "_orig_ifname" "radio0.network1", "ifname" - "wlan0"



    cjdns. ETHInterface, , :

    "ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





    , , -, cjdroute . , , - .



    .

    /etc/init.d/ . /etc/init.d/cjdns :

    #!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





    $START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



    chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





    OpenWrt : wiki.openwrt.org/doc/techref/initscripts



    , , . , !



    UPD: cjdns README.md , .



    UPD2: .

    , '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



    , , , . .

    - , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

    , feeds.conf :

    src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





    , .




  4. .



    nacl :

    make package/nacl/compile






    - mate-terminal, , tmux. , , , .



    . , . , . , - , . , tl-mr3220, serial hack adapter , .

    . OpenWrt UCI, . , . , , , . , /etc/config/.

    - , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

    config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







    , OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



    cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



    , :

    make







    ./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



    .

    , openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



    OpenWrt.



    ssh, , :

    free





    tmpfs.

    /etc/sysupgrade.conf. , ( jffs2). #. , .

    /tmp ( tmpfs):

    scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





    . :

    cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





    .



    :

    sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







    , . ssh passwd root.



    , . , , .



    .

    OpenWrt opkg . :

    update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

    opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



    configure - , . , . remove - . list - . list-installed - і .

    : wiki.openwrt.org/doc/techref/opkg

    , /etc/opkg.conf

    src/gz < > <url >





    :

    src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





    , ,

    src/gz local file://////





    , , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



    ( ).

    . ext4. , , . , /dev . , .

    , :

    mount /dev/sda1 /mnt





    , , .

    rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





    tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

    , /etc/config/fstab. :

    config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





    ,

    uci commit fstab





    - uuid, usb. "device" "uuid" , , uuid .

    : wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



    swap.

    , :

    config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





    . swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

    swap free.

    uci commit .



    C cjdns ( squashfs).

    scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



    wi-fi ad-hoc.

    /etc/config/wireless :

    config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





    "device" "", "wifi-device". :

    config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





    . . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

    , bridge . , :

    iw dev </code> : <source> brctl show





    ad-hoc , /etc/config/network. interface "type" "bridge" :

    config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





    "_orig_ifname" "radio0.network1", "ifname" - "wlan0"



    cjdns. ETHInterface, , :

    "ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





    , , -, cjdroute . , , - .



    .

    /etc/init.d/ . /etc/init.d/cjdns :

    #!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





    $START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



    chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





    OpenWrt : wiki.openwrt.org/doc/techref/initscripts



    , , . , !



    UPD: cjdns README.md , .



    UPD2: .

    , '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



    , , , . .

    - , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

    , feeds.conf :

    src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





    , .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .




 . 
      



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git

, .








.



nacl :

make package/nacl/compile






- mate-terminal, , tmux. , , , .



. , . , . , - , . , tl-mr3220, serial hack adapter , .

. OpenWrt UCI, . , . , , , . , /etc/config/.

- , , , Buildroot files . , ./files/etc/config/network . tl-mr3220 v1.2:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0 radio0.network1' option _orig_bridge 'true' option ifname 'eth0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2' config switch option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan option device 'eth0' option vlan '1' option ports '0 1 2 3 4'







, OpenWrt . _orig_ifname _orig_bridge , . , , , , , - .



cjdns. , menuconfig: "Network"->"Routing and Redirection"->"cjdns".



, :

make







./bin, target- ( ). , ./bin/ar71xx, ./bin/ar71xx/packages/. ./bin/ar71xx/openwrt-ar71xx-generic-rootfs.tar.gz ( target) , .



.

, openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-factory.bin . , , : wi-fi!



OpenWrt.



ssh, , :

free





tmpfs.

/etc/sysupgrade.conf. , ( jffs2). #. , .

/tmp ( tmpfs):

scp ./bin/ar71xx/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin root@192.168.5.1:/tmp





. :

cd /tmp md5sum openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin





.



:

sysupgrade -v /tmp/openwrt-ar71xx-generic-tl-mr3220-v1-squashfs-sysupgrade.bin







, . ssh passwd root.



, . , , .



.

OpenWrt opkg . :

update - . /tmp/opkg-lists/snapshots, /tmp tmpfs. , - . upgrade - , , , . trunc. , . ( kmod-). " " opkg . install , url :

opkg install hiawatha opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk



configure - , . , . remove - . list - . list-installed - і .

: wiki.openwrt.org/doc/techref/opkg

, /etc/opkg.conf

src/gz < > <url >





:

src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages





, ,

src/gz local file://////





, , apt-get, , https. https, , , downloads.openwrt.org. , , , , , - .



( ).

. ext4. , , . , /dev . , .

, :

mount /dev/sda1 /mnt





, , .

rm -rf /mnt/* tar -C /overlay -cvf - . | tar -C /mnt -xf - # overlay





tar, -? , . wiki.openwrt.org/doc/howto/extroot#installation1 .

, /etc/config/fstab. :

config mount option target /overlay option device /dev/sda1 # option uuid <uuid> option fstype ext4 option options rw,sync option enabled 1 option enabled_fsck 0





,

uci commit fstab





- uuid, usb. "device" "uuid" , , uuid .

: wiki.openwrt.org/doc/uci/fstab#mounting.filesystem



swap.

, :

config swap option device /dev/sda2 # option uuid <uuid> option enabled 1





. swap. linux swap , , " " ( ?) , , swap. , " " - . - . 512 MiB, , !

swap free.

uci commit .



C cjdns ( squashfs).

scp /tmp opkg. cjdns. . , ETHInterface br-lan eth0.



wi-fi ad-hoc.

/etc/config/wireless :

config wifi-iface option device radio0 option mode adhoc option ssid hype option bssid 66:77:55:88:44:aa option disabled 0





"device" "", "wifi-device". :

config wifi-device 'radio0' option type 'mac80211' option macaddr 'ab:cd:ef:ab:cd:ef' option hwmode '11ng' option htmode 'HT40+' list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option channel 'auto' option txpower '18' option country 'RU'





. . uci commit wireless ; /etc/init.d/wireless restart , . , disabled 1.

, bridge . , :

iw dev </code> : <source> brctl show





ad-hoc , /etc/config/network. interface "type" "bridge" :

config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option _orig_ifname 'eth0, radio0.network1' option _orig_bridge 'true' option ifname 'eth0 wlan0' option ipaddr '192.168.5.1' option gateway '192.168.5.2' option broadcast '192.168.5.255' option dns '192.168.5.2'





"_orig_ifname" "radio0.network1", "ifname" - "wlan0"



cjdns. ETHInterface, , :

"ETHInterface": [ { "bind": "wlan0", "beacon": 2, }, { "bind":"br-lan", "beacon": 2 } ]





, , -, cjdroute . , , - .



.

/etc/init.d/ . /etc/init.d/cjdns :

#!/bin/sh /etc/rc.common START=93 STOP=51 start() { cjdroute < /etc/cjdroute.conf } stop() { killall cjdroute }





$START $STOP . "start()" - , -. "stop()" - . , , , , , . -, cjdns "pidFile", "master", OpenWrt.



chmod u+rwx /etc/init.d/cjdns /etc/init.d/cjdns enable





OpenWrt : wiki.openwrt.org/doc/techref/initscripts



, , . , !



UPD: cjdns README.md , .



UPD2: .

, '' '' uci. , , , json-uci, LUA, , , - , . - . cjdroute . , crashey. init- , trunc. . , todo.



, , , . .

- , Makefile init-. , , . : github.com/DinoAsm/cjdns-openwrt-tiny

, feeds.conf :

src-git cjdns_tiny https://github.com/DinoAsm/cjdns-openwrt-tiny.git





, .







All Articles