OpenWrt for Arduino Yun cheat sheet: Difference between revisions
(→TO DO) |
(→TO DO) |
||
Line 522: | Line 522: | ||
block detect > /etc/config/fstab ; vi /etc/config/fstab | block detect > /etc/config/fstab ; vi /etc/config/fstab | ||
# edit /etc/config/fstab : Set all enabled '0' → enabled '1' | # edit /etc/config/fstab : Set all enabled '0' → enabled '1' | ||
# | # + | ||
# option target '/overlay' | # option target '/overlay' | ||
# option device '/dev/sda2' | # option device '/dev/sda2' |
Revision as of 21:38, 9 March 2016
OpenWrt running on Atheros AR9331 of Arduino Yun, LLC edition OpenWrt-Yun also Linino, is in obsolete (and has security issues) at kernel and various packages. I will try to investigate the upgrade to the latest version of OpenWrt. (With Absolutely NO Warranty)
Prepare for the Security update of OpenWrt-Yun, Arduino Yun Operating System (YunOS).
OpenWrt-Yun Chaos Calmer 15.05
Arduino Yun フォーラムで発見した RedSnake64 さんの実装。
RedSnake64 edition OpenWrt-Yun:
https://github.com/RedSnake64/openwrt-yun/tree/15.05 ChaosCalmer_v1.3
- 人柱で導入してみた。mDNS がつかえず .local でアクセスできなかった。IP 指定で設定まではいけたがいったん実験終了。
opkg install avahi-daemon-service-http
- 違いが見えてきたので OpenWrt trunk Bleeding Edge でつかえる Arduino Yun package つくることにする。
Investigate the Yun Profile of Origin OpenWrt
OpenWrt Project には、すでに Arduino Yun の Profile がある。
target/linux/ar71xx/generic/profiles/arduino.mk ar71xx: add Arduino Yun
https://github.com/openwrt/packages/tree/master/utils/yunbridge yunbridge
- Arduino YUN bridge library が取り込まれている。
OpenWrt snapshot images:
https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/ https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/ openwrt-ar71xx-generic-yun-16M-squashfs-sysupgrade.bin
- 時々ビルドに失敗して snapshots から消えてしまうようだ。一週間ぐらい気長に待つ。
- この System Image は Arduino Yun のハードウェアは対応してるが、もちろん Yun 独自のソフトウェアは組み込まれていない。
- 公式サイトが落ちまくってるようなので、ミラーサイト http://ftp.stw-bonn.de/pub/openwrt/snapshots/trunk/ar71xx/generic/
OpenWrt Core:
git.openwrt.org Git - openwrt trunk tree shortlog
OpenWrt Packages:
https://github.com/openwrt/packages https://github.com/openwrt/luci https://github.com/openwrt-routing/packages https://github.com/openwrt/telephony https://github.com/openwrt/targets https://github.com/openwrt-management/packages
- 本家のオプションパッケージは github で管理するようになっている。
Where to get packages OpenWrt Wiki
ちなみに linino:
https://github.com/linino/linino_distro/tree/lininoIO
Investigate the OpenWrt-Yun
OpenWrt-Yun arduino packages
LLC edition arduino package:
https://github.com/arduino/openwrt-packages-yun/tree/master/arduino
RedSnake64 edition arduino package:
https://github.com/RedSnake64/openwrt-arduino-packages/tree/for-15.05
Arduino OpenWrt Yún packages:
(y) avrdude *
(y) cpu-mcu-bridge *
(m) cwiid *
(y) luci-app-arduino-webpanel
(m) node *
(m) node-bleno
(m) node-noble
(m) node-serialport *
(m) node-socket.io
(m) node-socket.io-legacy *
(m) node-socket.io-client
(m) node-socket.io-client-legacy *
(m) node-sqlite3
(m) node-ws
(y) rng-tools *
(y) spacebrew
(y) temboo
(y) uSDaemon
(m) v8m-rb *
(y) yun-conf
(y) yun-scripts
- avrdude は純正パッケージがある。Yun 用に設定された avrdude.conf があれば良い。avrdude.conf は ./files に配置する。
- cpu-mcu-bridge は純正パッケージの yunbridge と重なるが互換性をかんがえるとこっちにする。(あとで yunbridge を動作検証する)
- cwiid は RedSnake64 版のみだし Nintendo Wii remote interface なので削除する。
- node は純正パッケージで。
- node-serialport は純正パッケージでエラーがでるのでこっちに取り込む。純正 node-arduino-firmata も同様なので取り込む
- もし、純正モジュールで稼働するなら不要。y ではないので m する必要はなく n でよい。しかし現状は純正モジュールが build 失敗しているようで ipk が配布されていないようだ。安定するまでは m で。
- 当面は arduino packages で取り込む方針にする。
- もし、純正モジュールで稼働するなら不要。y ではないので m する必要はなく n でよい。しかし現状は純正モジュールが build 失敗しているようで ipk が配布されていないようだ。安定するまでは m で。
- "-legacy" は 0.9.x 版という意味。間違えて Makefile 変えてしまった。忘れないように。
- rng-tools は純正パッケージは問題あり。
- START=98 から START=48 にしないと Yun 独自の起動スクリプト S49generate_new_gpg_key で不具合がでる。これより前に rngd を起動する必要がある。
- 純正パッケージの rngd.init にパッチあててから build させる方針にする。
- v8m-rb はコンパイルエラーになるが パッケージの patch に '-fno-strict-overflow'. 追加すればよい。(悪手だがやむなし)
Essential items in the kernel configuration
CONFIG_TARGET_ar71xx=y
CONFIG_TARGET_ar71xx_generic=y
CONFIG_TARGET_ar71xx_generic_Yun=y
CONFIG_IMAGEOPT=y
# CONFIG_PREINITOPT is not set
CONFIG_TARGET_PREINIT_SUPPRESS_STDERR=y
CONFIG_TARGET_PREINIT_TIMEOUT=2
# CONFIG_TARGET_PREINIT_SHOW_NETMSG is not set
# CONFIG_TARGET_PREINIT_SUPPRESS_FAILSAFE_NETMSG is not set
CONFIG_TARGET_PREINIT_IFNAME=""
CONFIG_TARGET_PREINIT_IP="192.168.1.1"
CONFIG_TARGET_PREINIT_NETMASK="255.255.255.0"
CONFIG_TARGET_PREINIT_BROADCAST="192.168.1.255"
# CONFIG_INITOPT is not set
CONFIG_TARGET_INIT_PATH="/usr/sbin:/usr/bin:/sbin:/bin"
CONFIG_TARGET_INIT_ENV=""
CONFIG_TARGET_INIT_CMD="/sbin/init"
CONFIG_TARGET_INIT_SUPPRESS_STDERR=y
CONFIG_VERSIONOPT=y
CONFIG_VERSION_DIST="OpenWrt"
CONFIG_VERSION_NICK="Bleeding Edge"
CONFIG_VERSION_NUMBER=""
CONFIG_VERSION_REPO="http://downloads.openwrt.org/snapshots/trunk/%S/packages"
CONFIG_VERSION_MANUFACTURER="Arduino"
CONFIG_VERSION_MANUFACTURER_URL=""
CONFIG_VERSION_PRODUCT="Arduino Yun"
CONFIG_VERSION_HWREV="1.0"
# CONFIG_VERSION_FILENAMES is not set
CONFIG_PER_FEED_REPO=y
CONFIG_PER_FEED_REPO_ADD_DISABLED=y
CONFIG_PER_FEED_REPO_ADD_COMMENTED=y
CONFIG_FEED_packages=y
CONFIG_FEED_luci=y
CONFIG_FEED_routing=y
CONFIG_FEED_telephony=y
CONFIG_FEED_management=y
CONFIG_FEED_targets=y
CONFIG_FEED_arduino=y
# CONFIG_SMIMEOPT is not set
CONFIG_OPKGSMIME_PASSPHRASE=y
CONFIG_DEFAULT_base-files=y
CONFIG_DEFAULT_busybox=y
CONFIG_DEFAULT_dnsmasq=y
CONFIG_DEFAULT_dropbear=y
CONFIG_DEFAULT_firewall=y
CONFIG_DEFAULT_fstools=y
CONFIG_DEFAULT_ip6tables=y
CONFIG_DEFAULT_iptables=y
CONFIG_DEFAULT_iwinfo=y
CONFIG_DEFAULT_kmod-ath9k=y
CONFIG_DEFAULT_kmod-gpio-button-hotplug=y
CONFIG_DEFAULT_kmod-usb-core=y
CONFIG_DEFAULT_kmod-usb2=y
CONFIG_DEFAULT_libc=y
CONFIG_DEFAULT_libgcc=y
CONFIG_DEFAULT_mtd=y
CONFIG_DEFAULT_netifd=y
CONFIG_DEFAULT_odhcp6c=y
CONFIG_DEFAULT_odhcpd=y
CONFIG_DEFAULT_opkg=y
CONFIG_DEFAULT_ppp=y
CONFIG_DEFAULT_ppp-mod-pppoe=y
CONFIG_DEFAULT_swconfig=y
CONFIG_DEFAULT_uboot-envtools=y
CONFIG_DEFAULT_uci=y
CONFIG_DEFAULT_uclient-fetch=y
CONFIG_DEFAULT_wpad-mini=y
CONFIG_PACKAGE_python-base=y
CONFIG_PACKAGE_python-light=y
CONFIG_PACKAGE_avrdude=y
CONFIG_PACKAGE_cpu-mcu-bridge=y
CONFIG_PACKAGE_luci-app-arduino-webpanel=y
CONFIG_PACKAGE_node=m
CONFIG_PACKAGE_node-bleno=m
CONFIG_PACKAGE_node-noble=m
CONFIG_PACKAGE_node-serialport=m
CONFIG_PACKAGE_node-socket.io=m
CONFIG_PACKAGE_node-socket.io-client=m
CONFIG_PACKAGE_node-socket.io-client-legacy=m
CONFIG_PACKAGE_node-socket.io-legacy=m
CONFIG_PACKAGE_node-sqlite3=m
CONFIG_PACKAGE_node-ws=m
CONFIG_PACKAGE_rng-tools=y
CONFIG_PACKAGE_spacebrew=y
CONFIG_PACKAGE_temboo=y
CONFIG_PACKAGE_uSDaemon=y
CONFIG_PACKAGE_v8m-rb=m
CONFIG_PACKAGE_yun-conf=y
CONFIG_PACKAGE_yun-scripts=y
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-base=y
CONFIG_LUCI_LANG_en=y
CONFIG_PACKAGE_luci-mod-admin-full=y
CONFIG_PACKAGE_luci-app-arduino-webpanel=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-theme-bootstrap=y
CONFIG_PACKAGE_luci-theme-openwrt=y
CONFIG_PACKAGE_luci-proto-ipv6=y
CONFIG_PACKAGE_luci-proto-ppp=y
CONFIG_PACKAGE_luci-lib-ip=y
CONFIG_PACKAGE_luci-lib-json=y
CONFIG_PACKAGE_luci-lib-jsonc=y
CONFIG_PACKAGE_luci-lib-nixio=y
CONFIG_PACKAGE_luci-i18n-base-en=y
CONFIG_PACKAGE_luci-i18n-firewall-en=y
CONFIG_PACKAGE_dbus=y
CONFIG_PACKAGE_kmod-nls-base=y
CONFIG_PACKAGE_kmod-nls-cp437=y
CONFIG_PACKAGE_kmod-nls-iso8859-1=y
CONFIG_PACKAGE_kmod-nls-utf8=y
CONFIG_PACKAGE_kmod-sdhci=y
# CONFIG_PACKAGE_triggerhappy is not set
CONFIG_PACKAGE_kmod-gpio-button-hotplug=y
CONFIG_PACKAGE_kmod-input-core=m
CONFIG_PACKAGE_kmod-input-evdev=m
CONFIG_PACKAGE_kmod-input-gpio-encoder=m
CONFIG_PACKAGE_kmod-input-gpio-keys=m
CONFIG_PACKAGE_kmod-input-gpio-keys-polled=m
CONFIG_PACKAGE_kmod-input-joydev=m
CONFIG_PACKAGE_kmod-input-matrixkmap=m
CONFIG_PACKAGE_kmod-input-polldev=m
CONFIG_PACKAGE_kmod-input-uinput=m
CONFIG_PACKAGE_libavahi-client=y
CONFIG_PACKAGE_libavahi-dbus-support=y
CONFIG_PACKAGE_avahi-dbus-daemon=y
CONFIG_PACKAGE_avahi-dnsconfd=y
CONFIG_PACKAGE_avahi-utils=y
CONFIG_PACKAGE_gnupg=y
CONFIG_PACKAGE_libgpg-error=y
CONFIG_PACKAGE_nano=y
CONFIG_PACKAGE_curl=y
CONFIG_PACKAGE_wget=y
Python OpenWrt Wiki
python-mini が python-light に変更されている。
If you are using Chaos Calmer then python-mini package is replaced by python-light package. Currently python package adds a lot of dependencies so we suggest that you don't even try to install full version, unless you have at least 50MB of free space on your flash storage.
Important concept of OpenWrt
The Minimized (smaller footprint) is Highest Priority. This is the large difference in policy between PC GNU/Linux and OpenWrt.
サイズが最小限になるようにコンフィグレーションすることが最優先。これが PC GNU/Linux と大きな方針の差であることに気がついた。
OpenWrt-Yun build memo
LLC edition OpenWrt-Yun:
git clone --depth=1 --branch master --single-branch https://github.com/arduino/openwrt-yun.git
RedSnake64 edition OpenWrt-Yun:
git clone --depth=1 --branch 15.05 --single-branch https://github.com/RedSnake64/openwrt-yun.git
LLC 版と RedSnake64 版を参考に、本家の trunk / Bleeding Edge でビルド可能にする。
Origin OpenWrt:
git clone --depth=1 --branch master --single-branch https://github.com/openwrt/openwrt.git
Ubuntu 14.04 環境でクロスコンパイルのための準備。
apt-get update
apt-get install -y git subversion build-essential asciidoc \
fastjar flex gawk libgtk2.0-dev intltool zlib1g-dev \
genisoimage libncurses5-dev libssl-dev ruby sdcc unzip \
bison libboost-dev libxml-parser-perl libusb-dev bin86 \
bcc sharutils openjdk-7-jdk mercurial cvs bzr \
nodejs-legacy curl g++-multilib squashfs-tools
- 出来上がった Image の検証用に squashfs-tools も入れておく。 (unsquashfs openwrt-ar71xx-generic-yun-16M-squashfs-sysupgrade.bin)
Installing Node.js via package manager | Node.js
- Ubuntu 純正パッケージの nodejs, npm 使うとビルドこける。
https://downloads.openwrt.org/sources/
- パッケージのソースの取得に失敗する場合はここからとって ./dl/ 配下に置いておく。
wget http://pkgs.fedoraproject.org/repo/pkgs/libconfuse/confuse-2.7.tar.gz/45932fdeeccbb9ef4228f1c1a25e9c8f/confuse-2.7.tar.gz
wget http://pkgs.fedoraproject.org/repo/pkgs/avrdude/avrdude-6.1.tar.gz/9db8c25b935d34234b9b1ba16ad55fd5/avrdude-6.1.tar.gz
./feeds.conf:
src-git packages https://github.com/openwrt/packages.git
src-git luci https://github.com/openwrt/luci.git
src-git routing https://github.com/openwrt-routing/packages.git
src-git telephony https://github.com/openwrt/telephony.git
src-git management https://github.com/openwrt-management/packages.git
src-git targets https://github.com/openwrt/targets.git
#src-git oldpackages http://git.openwrt.org/packages.git
#src-svn xwrt http://x-wrt.googlecode.com/svn/trunk/package
#src-svn phone svn://svn.openwrt.org/openwrt/feeds/phone
#src-svn efl svn://svn.openwrt.org/openwrt/feeds/efl
#src-svn xorg svn://svn.openwrt.org/openwrt/feeds/xorg
#src-svn desktop svn://svn.openwrt.org/openwrt/feeds/desktop
#src-svn xfce svn://svn.openwrt.org/openwrt/feeds/xfce
#src-svn lxde svn://svn.openwrt.org/openwrt/feeds/lxde
#src-link custom /usr/src/openwrt/custom-feed
#src-git arduino https://github.com/RedSnake64/openwrt-arduino-packages.git;for-15.05
src-git arduino https://github.com/nxhack/openwrt-arduino-packages.git;for-trunk
- これでビルド実験中...
./build.sh:
#!/bin/bash -ex
#FEEDS
./scripts/feeds uninstall -a
rm -rf feeds
./scripts/feeds update -a
./scripts/feeds install -a
#UNINSTALL BROKEN PACKAGES
#./scripts/feeds uninstall aria2 freecwmp libfreecwmp libmicroxml crtmpserver dansguardian
#DELETE PACKAGES
rm -rf ./package/feeds/packages/node-serialport
rm -rf ./package/feeds/packages/node-arduino-firmata
#LINK CUSTOM PACKAGES
ln -s ../../../feeds/arduino/node-serialport ./package/feeds/arduino/
ln -s ../../../feeds/arduino/node-arduino-firmata ./package/feeds/arduino/
#PATCH SOME PACKAGES
sed -i -e s/^START=98/START=48/ ./feeds/packages/utils/rng-tools/files/rngd.init
#COPY CONFIG FILE
mv .config .config.$$
cp openwrt-yun-minimum.config .config
make oldconfig
make
- 純正パッケージには(ar71xx環境では)コンパイルできない壊れたものもいろいろある。
Trunk Bleeding Edge version of OpenWrt-Yun package and build environment
testing...
https://github.com/nxhack/openwrt-arduino-packages https://github.com/nxhack/openwrt-yun-build-extra
Setup Repos:
mkdir Build_Path_Some_Where
cd Build_Path_Some_Where
git clone --depth=1 https://git.openwrt.org/openwrt.git
git clone --depth=1 --branch master --single-branch https://github.com/nxhack/openwrt-yun-build-extra.git
cd openwrt
ln -s ../openwrt-yun-build-extra/* .
Please modify ./files/etc/opkg/distfeeds.conf
First Time, Setup cross compile build environment (ubuntu 14.04):
./FIRST_SETUP_ubuntu_Trusty_Tahr.sh
Build:
./build.sh
Difference between the LLC edition
led の デバイス名が 変更になった。純正に合わせる。 arduino:blue:wlan arduino:white:usb target/linux/ar71xx/base-files/etc/uci-defaults/01_leds https://github.com/nxhack/openwrt-arduino-packages/commit/eb7130ac331ce491765f27372d987d9d7415f6c0
rng-tools は純正版ではだめ LLC 版の init script に合わせる。 S98rngd -> S48rngd START=98 -> START=48 START=98 から START=48 にしないと Yun独自の起動スクリプト S49generate_new_gpg_key で不具合がでる。これより前に rngd を起動する必要がある。 package build の前に rngd.init を変更する。
sed -i -e s/^START=98/START=48/ ./feeds/packages/utils/rng-tools/files/rngd.init
BUSYBOX ASH BANNER の日付がなぜか出ない。 表示しないように変更されていた。 https://git.openwrt.org/?p=openwrt.git;a=commit;h=39fabb5068e95ab9c0901dd4f37129111d88ae00
+# don't create a version string containing the actual timestamp +export KCONFIG_NOTIMESTAMP=1 +
BUSYBOX ASH HELP のバナーが出ない。 CONFIG_ASH_HELP がデフォルトが n に変更されていた。
AR9331 を AVR ライタにするために /etc/avrdude.conf に設定追加する。
programmer id = "linuxgpio"; desc = "Use the Linux sysfs interface to bitbang GPIO lines"; type = "linuxgpio"; reset = ~18; sck = 11; mosi = 27; miso = 8; ;
BUSYBOX で telnet が有効になっていない。 ポリシーなので arduino yun bridge Console につなぐには nc localhost 6571 でしのぐ。 なにか良い方法はないのか調査する。
BUSYBOX で stty が有効になっていない。
PATH が変わった LLC バージョン CONFIG_TARGET_INIT_PATH="/bin:/sbin:/usr/bin:/usr/sbin" システムの規定値 CONFIG_TARGET_INIT_PATH="/usr/sbin:/usr/bin:/sbin:/bin" システム全体にかかわるので、検証は新しい規定値で行うことにする。
uhttpd で option redirect_https '1' にする。昨今はこれでないとダメ。
uhttpd 本体の alias サポートを使う。alias patch は当てない。
list alias '/arduino=/cgi-bin/luci' list alias '/data=/cgi-bin/luci' list alias '/mailbox=/cgi-bin/luci'
procd button の仕組みがあるので triggerhappy は不要。 (triggerhappy は HID button をトリガーにするので kmod-input-* が必要) (kmod-gpio-button-hotplug + procd buttons のほうがもちろんサイズが小さい) 本家 https://github.com/openwrt/openwrt/blob/master/target/linux/ar71xx/files/arch/mips/ath79/mach-arduino-yun.c に ath79_register_gpio_keys_polled が無いのでパッチを作った。(メンテナーにPR済み) 00-arduino-yun-gpio_keys_polled.patch
- /etc/config/system に button section 追加。
config button option button 'wps' option action 'pressed' option handler '/usr/bin/wifi-reset-button-pressed' config button option button 'wps' option action 'released' option handler '/usr/bin/wifi-reset-button-released'
TO DO
- uboot-linino コンパイルエラーとる
- extern inline -> static inline, extern __inline__ -> static inline
- ブートローダの書き換え失敗したら完全に文鎮になるので検証はこわくてできない。
- extern inline -> static inline, extern __inline__ -> static inline
- DISTRIB_TAINTS 意味調査
- ./include/version.mk 確認する。OpenWrt snapshot では、最終的に DISTRIB_TAINTS="" である。
- BUSYBOX 差異
- デフォルトが微妙にちがう。OpenWrt 本家を基本にするにはデフォルトは変更しない方針にする。
- telnet が無い。stty が無い。
- 気持ち悪いのが CROND_DIR="/var/spool/cron" から CROND_DIR="/etc" になっている事。動いてから考えよう。
- SD card の automount 方法調査する。(uSDaemon がいまいちすぎるので)
- OpenWrt (e)udev まだ試していないが。
- /etc/udev/rules.d/11-sd-cards-auto-mount.rules
KERNEL!="sda[0-9]", GOTO="sd_cards_auto_mount_end" # Global mount options ACTION=="add", ENV{mount_options}="relatime" # Filesystem specific options ACTION=="add", IMPORT{program}="/sbin/blkid -o udev -p %N" ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002" ACTION=="add", RUN+="/bin/mkdir -p /mnt/%k", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/%k" ACTION=="remove", RUN+="/bin/umount -l /mnt/%k", RUN+="/bin/rmdir /mnt/%k" # exit LABEL="sd_cards_auto_mount_end"
udevadm control --reload-rules
- なるほど、(e)udev を使わないのはサイズの問題だね。system image はできるだけ小さくするのが最優先になっている。なのでこの実装はしない。
- OpenWrt (e)udev まだ試していないが。
- opkg packages
- procps -> procps-ng procps-ng-ps procps-ng-w procps-ng-top
- logrotate がないので作った。
- python-pip があった
- local build packages の BUILD_KEY (Local build key)
- /etc/opkg/keys/ にストアされる。
- まちがって $(TOPDIR)/key-build と $(TOPDIR)/key-build.pub を消して再生成してしまったら、 その環境で作った opkg パッケージを、System Image に組み込まれ(build-in)てる opkg と入れ替える。
- $(CP) $(BUILD_KEY).pub $(1)/etc/opkg/keys/`$(STAGING_DIR_HOST)/bin/usign -F -p $(BUILD_KEY).pub`
- /etc/opkg/keys/ にストアされる。
- fstools, block-mount, fstab
- https://wiki.openwrt.org/doc/uci/fstab
Sun Mar 6 19:54:35 2016 user.notice : this file has been obsoleted. please call "/sbin/block mount" directly Sun Mar 6 19:54:36 2016 daemon.err block: /dev/sda2 is already mounted
- block-mount は /etc/config/fstab に automount って書けば boot 時によしなに mount するようだ。hotplug 的な挙動はまだこれからっぽい。
- block info and DISK_MEDIA_CHANGE events
- uSDaemon は有効にする。
- extroot
- https://wiki.openwrt.org/doc/howto/extroot
opkg install e2fsprogs umount /mnt/sda2 mkfs.ext4 /dev/sda2 mount /dev/sda2 /mnt/sda2 ; tar -C /overlay -cvf - . | tar -C /mnt/sda2 -xf - ; umount /mnt/sda2 rmdir /mnt/sda2 block detect > /etc/config/fstab ; vi /etc/config/fstab # edit /etc/config/fstab : Set all enabled '0' → enabled '1' # + # option target '/overlay' # option device '/dev/sda2' # option fstype 'ext4' # option enabled '1' # option enabled_fsck '0' # option options 'rw,sync,noatime,nodiratime' # reboot
config mount option target '/overlay' option device '/dev/sda2' option fstype 'ext4' option enabled '1' option enabled_fsck '0' option options 'rw,sync,noatime,nodiratime'
- /etc/opkg.conf と distfeeds.conf の切り分けを調査する。
- なんか変なメッセージがでたので根元の distfeeds.conf を書き換えたのだが、opkg.conf をユーザが書き換えるのが本筋。調査する。
- opkg_conf_parse_file: Duplicate src declaration
- なんか変なメッセージがでたので根元の distfeeds.conf を書き換えたのだが、opkg.conf をユーザが書き換えるのが本筋。調査する。
Bricked
My Yún doesn't boot anymore! How can I restore it?
YunSerialTerminal をロードしてシリアルコンソールを有効にする。SDカードは抜いておく事。YUN RST ボタンをおす。
- YunSerialTerminal で prompt が出て OS の操作ができる場合。
- なんとかして network を生かす。
ifconfig インターフェース IPアドレス route add default gw どこか
- /etc/resolv.conf を編集。
- SD card で正常な sysupgrade のイメージをもってくる。
mkdir /mnt/sda1 mount -t vfat /dev/sda1 /mnt/sda1
- なんとかして network を生かす。
- YunSerialTerminal で u-boot を操作できる場合。