OpenWrt for Arduino Yun cheat sheet: Difference between revisions

From misc notes
Jump to navigation Jump to search
 
(438 intermediate revisions by the same user not shown)
Line 1: Line 1:
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''')
OpenWrt which runs on the Atheros AR 9331 of Arduino Yun, LLC edition OpenWrt-Yun also Linino is obsolete in the kernel and various packages (and there are security problems). I will drill down on how to upgrade to the latest version of OpenWrt. ('''With Absolutely NO Warranty''')




Prepare for the Security update of OpenWrt-Yun, Arduino Yun Operating System (YunOS). '''In the IoT ERA, I think it is a very important thing.'''
Prepare for the Security update of OpenWrt-Yun, Arduino Yun Operating System. '''In the IoT ERA, I think it is a very important thing.'''
 
<syntaxhighlight lang="text" enclose="div">
BusyBox v1.25.1 () built-in shell (ash)
 
    _________
    /        /\      _    ___ ___  ___
  /  LE    /  \    | |  | __|  \| __|
  /    DE  /    \  | |__| _|| |) | _|
/________/  LE  \  |____|___|___/|___|                      lede-project.org
\        \  DE /
  \    LE  \    /  -----------------------------------------------------------
  \  DE    \  /    Reboot (17.01-SNAPSHOT, r3796-473e994)
    \________\/    -----------------------------------------------------------
 
root@Arduino:~# cat /proc/cpuinfo
system type            : Atheros AR9330 rev 1
machine                : Arduino Yun
processor              : 0
cpu model              : MIPS 24Kc V7.4
BogoMIPS                : 265.42
wait instruction        : yes
microsecond timers      : yes
tlb_entries            : 16
extra interrupt vector  : yes
hardware watchpoint    : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                    : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16
shadow register sets    : 1
kscratch registers      : 0
package                : 0
core                    : 0
VCED exceptions        : not available
VCEI exceptions        : not available
 
root@Arduino:~# uname -a
Linux Arduino 4.4.108 #0 Fri Dec 29 23:36:25 2017 mips GNU/Linux
</syntaxhighlight>
 
'''NOTE:''' Arduino.cc (LLC) goes to '''LininoOS'''!!!
: [https://www.arduino.cc/en/Guide/ArduinoYunLin Arduino Yún LininoOS]  (since 2-Nov-2016)
 


= OpenWrt-Yun Chaos Calmer 15.05 =
= OpenWrt-Yun Chaos Calmer 15.05 =
RedSnake64's implementation found at [https://forum.arduino.cc/index.php?topic=347224.0 Arduino Yun forum.]
RedSnake64's implementation can be found at [https://forum.arduino.cc/index.php?topic=347224.0 Arduino Yun forum.]


RedSnake64 edition OpenWrt-Yun:
RedSnake64 edition OpenWrt-Yun:
  [https://github.com/RedSnake64/openwrt-yun/tree/15.05 https://github.com/RedSnake64/openwrt-yun/tree/15.05]
  [https://github.com/RedSnake64/openwrt-yun/tree/15.05 https://github.com/RedSnake64/openwrt-yun/tree/15.05]
  [https://github.com/RedSnake64/openwrt-yun/releases ChaosCalmer_v1.3]
  [https://github.com/RedSnake64/openwrt-yun/releases ChaosCalmer_v1.4]
:I tried it. 'mDNS' is not active, so I could not be accessed in '.local'.  
:I tried it. 'mDNS' is not active, so I could not be accessed in '.local'.  
<syntaxhighlight lang="bash" enclose="div">
 
opkg install avahi-nodbus-daemon
</syntaxhighlight>
:Grasp that implementation. I decided to make Arduino Yun package that can be used in OpenWrt trunk Bleeding Edge.
:Grasp that implementation. I decided to make Arduino Yun package that can be used in OpenWrt trunk Bleeding Edge.


= Investigate the Yun Profile of Origin OpenWrt =
RedSnake64 edition become Arduino LLC Official edition:
The OpenWrt Project, already there is a Arduino Yun Profile.
[https://github.com/arduino/openwrt-yun-1505 https://github.com/arduino/openwrt-yun-1505]
  [https://git.openwrt.org/?p=openwrt.git;a=blob;f=target/linux/ar71xx/generic/profiles/arduino.mk;h=8ae5054a7e312213cf872833594b16c0f0237cf1;hb=HEAD target/linux/ar71xx/generic/profiles/arduino.mk]
 
  [https://git.openwrt.org/?p=openwrt.git;a=commit;h=914d4fc6219538640ce843b6cf2a6cab5d71db8a ar71xx: add Arduino Yun]
= Explore the Yun Profile of the OpenWrt / LEDE Project =
The OpenWrt / LEDE Project, already exist a Arduino Yun Profile.
  [https://git.openwrt.org/?p=source.git;a=blob;f=target/linux/ar71xx/generic/profiles/arduino.mk;h=8ae5054a7e312213cf872833594b16c0f0237cf1;hb=HEAD target/linux/ar71xx/generic/profiles/arduino.mk]
  [https://git.openwrt.org/?p=source.git;a=commitdiff;h=fa137d51f5cbc678922950a6b06883c1d2141ac2 ar71xx: add Arduino Yun]


  [https://github.com/openwrt/packages/tree/master/utils/yunbridge https://github.com/openwrt/packages/tree/master/utils/yunbridge]
  [https://github.com/openwrt/packages/tree/master/utils/yunbridge https://github.com/openwrt/packages/tree/master/utils/yunbridge]
Line 28: Line 70:
  [https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/ https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/]
  [https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/ https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/]
  [https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/ https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/]
  [https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/ https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/]
[https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/openwrt-ar71xx-generic-yun-16M-squashfs-sysupgrade.bin openwrt-ar71xx-generic-yun-16M-squashfs-sysupgrade.bin]
:This System Image is corresponding Arduino Yun Hardware. but, of course Arduino Yun own software is not implemented.
::Mirror site: [http://ftp.stw-bonn.de/pub/openwrt/snapshots/trunk/ar71xx/generic/ http://ftp.stw-bonn.de/pub/openwrt/snapshots/trunk/ar71xx/generic/]
::Mirror site: [http://ftp.stw-bonn.de/pub/openwrt/snapshots/trunk/ar71xx/generic/ http://ftp.stw-bonn.de/pub/openwrt/snapshots/trunk/ar71xx/generic/]
OpenWrt / LEDE snapshot images:
[http://downloads.lede-project.org/snapshots/targets/ar71xx/generic/ http://downloads.lede-project.org/snapshots/targets/ar71xx/generic/]
[http://downloads.lede-project.org/snapshots/targets/ar71xx/generic/packages/ http://downloads.lede-project.org/snapshots/targets/ar71xx/generic/packages/]
[http://downloads.lede-project.org/snapshots/packages/mips_24kc/ http://downloads.lede-project.org/snapshots/packages/mips_24kc/]
:'''This System Image is corresponding Arduino Yun Hardware. but, of course Arduino Yun own software is not implemented.'''


OpenWrt Core:
OpenWrt Core:
  [https://git.openwrt.org/?p=openwrt.git;a=tree git.openwrt.org Git - openwrt trunk tree]
  [https://git.openwrt.org/?p=openwrt.git;a=tree git.openwrt.org Git - openwrt trunk tree]
  [https://git.openwrt.org/?p=openwrt.git;a=shortlog;h=HEAD shortlog]
  [https://git.openwrt.org/?p=openwrt.git;a=shortlog;h=HEAD shortlog]
OpenWrt / LEDE Core:
[https://git.lede-project.org/?p=source.git;a=tree git.lede-project.org Git - source.git/tree]
[https://git.lede-project.org/?p=source.git;a=shortlog shortlog]


OpenWrt Packages:
OpenWrt Packages:
Line 45: Line 95:
:Optional package of OpenWrt Project is managed on github.
:Optional package of OpenWrt Project is managed on github.


= Investigate the OpenWrt-Yun =
= Explore the OpenWrt-Yun =
== OpenWrt-Yun arduino packages ==
== OpenWrt-Yun arduino packages ==
LLC edition arduino package:
LLC edition arduino package:
Line 52: Line 102:
RedSnake64 edition arduino package:
RedSnake64 edition arduino package:
  [https://github.com/RedSnake64/openwrt-arduino-packages/tree/for-15.05 https://github.com/RedSnake64/openwrt-arduino-packages/tree/for-15.05]
  [https://github.com/RedSnake64/openwrt-arduino-packages/tree/for-15.05 https://github.com/RedSnake64/openwrt-arduino-packages/tree/for-15.05]
LLC edition OpenWrt CC version arduino package:
[https://github.com/arduino/openwrt-arduino-packages/tree/for-15.05 https://github.com/arduino/openwrt-arduino-packages/tree/for-15.05]
:Hmmmm.... '''CONFIG_USE_UCLIBC=y'''
::(I go USE_MUSL ;)


Arduino OpenWrt Yún packages:
Arduino OpenWrt Yún packages:
Line 73: Line 128:
(y) temboo
(y) temboo
(y) uSDaemon
(y) uSDaemon
(m) v8m-rb
(m) v8m-rb *
(y) yun-conf
(y) yun-conf
(y) yun-scripts
(y) yun-scripts
</syntaxhighlight>
</syntaxhighlight>
#avrdude: use a OpenWrt package. if that is configured for Yun. avrdude.conf may arranged in ./files/etc/avrdude.conf.
#avrdude: use a OpenWrt package. Configuration for the Arduino Yun should be placed in /etc/avrdude.conf.
#cpu-mcu-bridge: overlaps with OpenWrt yunbridge package. For compatibility use a Arduino package.
#cpu-mcu-bridge: overlaps with OpenWrt yunbridge package. For compatibility use a Arduino package.
#cwiid: only RedSnake64 edition. cwiid is Nintendo Wii remote interface package, so should delete.
#cwiid: only RedSnake64 edition. cwiid is Nintendo Wii remote interface package, so should delete.
#node: use a OpenWrt package.
#node: '''If you want to run node.js, Should turn on MIPS FPU EMULATOR kernel config.'''
#node-serialport: use a OpenWrt package.
#node, node-serialport: use a OpenWrt package. so should delete.
#"-legacy" mean that the 0.9.x version.
#"-legacy" mean that the 0.9.x version.
#rng-tools: OpenWrt package has a problem. Should be changed START=98 to START=48.
#rng-tools: use a OpenWrt package. so should delete.
#v8m-rb: Not required, so should delete.
 
'''My new arduino packages here''':
[https://github.com/nxhack/openwrt-arduino-packages https://github.com/nxhack/openwrt-arduino-packages]
 
Arturo Rinaldi edition linino packages:
[https://github.com/artynet/LEDE/tree/linino-20/package/linino https://github.com/artynet/LEDE/tree/linino-20/package/linino]


'''My new arduino package here''':
= Important concept of OpenWrt =
'''The Minimized (smaller footprint) is Highest Priority. This is the large difference in policy between PC GNU/Linux and OpenWrt.'''
 
= Trunk Bleeding Edge / Reboot version of OpenWrt-Yun package and build environment =
 
[https://github.com/openwrt/openwrt.git https://github.com/openwrt/openwrt.git]
[https://github.com/nxhack/openwrt-yun-build-extra https://github.com/nxhack/openwrt-yun-build-extra]
  [https://github.com/nxhack/openwrt-arduino-packages https://github.com/nxhack/openwrt-arduino-packages]
  [https://github.com/nxhack/openwrt-arduino-packages https://github.com/nxhack/openwrt-arduino-packages]


== OpenWrt-Yun build memo ==
Setup repos:
LLC edition OpenWrt-Yun:
<syntaxhighlight lang="bash" enclose="div">
<syntaxhighlight lang="bash" enclose="div">
git clone --depth=1 --branch master --single-branch https://github.com/arduino/openwrt-yun.git
mkdir Build_Path_Some_Where
cd Build_Path_Some_Where
git clone https://github.com/openwrt/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/* .
</syntaxhighlight>
</syntaxhighlight>
RedSnake64 edition OpenWrt-Yun:
Or lede-17.01
<syntaxhighlight lang="bash" enclose="div">
<syntaxhighlight lang="bash" enclose="div">
git clone --depth=1 --branch 15.05 --single-branch https://github.com/RedSnake64/openwrt-yun.git
mkdir Build_Path_Some_Where
cd Build_Path_Some_Where
git clone --branch lede-17.01 https://github.com/openwrt/openwrt.git
git clone --depth=1 --branch lede-17.01 --single-branch https://github.com/nxhack/openwrt-yun-build-extra.git
cd openwrt
ln -s ../openwrt-yun-build-extra/* .
</syntaxhighlight>
</syntaxhighlight>


In reference to the LLC edition and RedSnake64 edition, to enable build the upstream of trunk / Bleeding Edge.


Origin OpenWrt:
Please modify ./files/etc/opkg/distfeeds.conf
 
First Time, Setup cross compile build environment (ubuntu 14.04):
<syntaxhighlight lang="bash" enclose="div">
<syntaxhighlight lang="bash" enclose="div">
git clone --depth=1 --branch master --single-branch https://github.com/openwrt/openwrt.git
./FIRST_SETUP_ubuntu_Trusty_Tahr.sh
</syntaxhighlight>
</syntaxhighlight>
:Also run fine on 'Bash on Ubuntu on Widnows' ;)


Preparation for cross-compiling environment in Ubuntu 14.04.
Build:
<syntaxhighlight lang="bash" enclose="div">
<syntaxhighlight lang="bash" enclose="div">
apt-get update
./build.sh
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
</syntaxhighlight>
</syntaxhighlight>
:It also puts squashfs-tools for the validation of the build Image. (unsquashfs openwrt-ar71xx-generic-yun-16M-squashfs-sysupgrade.bin)


[https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions Installing Node.js via package manager | Node.js]
When build succeed, You find '''lede-ar71xx-generic-yun-16M-squashfs-sysupgrade.bin''' in ./bin/targets/ar71xx/generic directory.
:Do not use the Ubuntu nodejs, npm packages.
:(Apply Yun-Shield patch, then SELECT Yun Shield: '''lede-ar71xx-generic-yun-shield-squashfs-sysupgrade.bin''')


./feeds.conf:
In order to using the packages, You must placed kernel packages and arduino packages to server (or SD card).
<syntaxhighlight lang="text" enclose="div">
 
src-git packages https://github.com/openwrt/packages.git
=== '''LEDE Trunk Breaking changes''' ===
src-git luci https://github.com/openwrt/luci.git
[https://github.com/lede-project/source/commit/bb46b635df48d5c2368f98646c16e3333cbc11fb ar71xx: move Arduino Yun to generic building code]
src-git routing https://github.com/openwrt-routing/packages.git
 
src-git telephony https://github.com/openwrt/telephony.git
To use the new partitioning, you need to update your U-Boot env in advance:
src-git management https://github.com/openwrt-management/packages.git
<syntaxhighlight lang="bash" enclose="div">
src-git targets https://github.com/openwrt/targets.git                                                                     
setenv mtdparts "spi0.0:256k(u-boot)ro,64k(u-boot-env),15936k(firmware),64k(nvram),64k(art)ro"
#src-git oldpackages http://git.openwrt.org/packages.git                                                                     
setenv bootcmd "run addboard; run addtty; run addparts; run addrootfs; bootm 0x9f050000 || bootm 0x9fde0000"
#src-svn xwrt http://x-wrt.googlecode.com/svn/trunk/package                                                                 
saveenv
#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
</syntaxhighlight>
</syntaxhighlight>


./build.sh:
memo memo... be careful
<syntaxhighlight lang="bash" enclose="div">
<syntaxhighlight lang="bash" enclose="div">
#!/bin/bash -ex
setenv board Yun
 
setenv mtdparts "spi0.0:256k(u-boot)ro,64k(u-boot-env),15936k(firmware),64k(nvram),64k(art)ro"
#FEEDS
setenv rootfstype "squashfs,jffs2"
./scripts/feeds uninstall -a
setenv bootargs "console=ttyATH0,250000 board=Yun mem=64M"
rm -rf feeds
setenv noinitrd
./scripts/feeds update -a
./scripts/feeds install -a
 
#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
</syntaxhighlight>
</syntaxhighlight>
:Note: Various OpenWrt packages are broken.
As reference linino:
[https://github.com/linino/linino_distro/tree/lininoIO https://github.com/linino/linino_distro/tree/lininoIO]


= Important concept of OpenWrt =
'''The Minimized (smaller footprint) is Highest Priority. This is the large difference in policy between PC GNU/Linux and OpenWrt.'''


= Trunk Bleeding Edge version of OpenWrt-Yun package and build environment =


[https://git.openwrt.org/?p=openwrt.git https://git.openwrt.org/?p=openwrt.git]
memo...
[https://github.com/nxhack/openwrt-yun-build-extra https://github.com/nxhack/openwrt-yun-build-extra]
:setenv serverip ‹tftp-server-ip›; setenv ipaddr ‹yun-board-ip›;
[https://github.com/nxhack/openwrt-arduino-packages https://github.com/nxhack/openwrt-arduino-packages]


Setup Repos:
<syntaxhighlight lang="bash" enclose="div">
<syntaxhighlight lang="bash" enclose="div">
mkdir Build_Path_Some_Where
setenv serverip 192.168.1.10;
cd Build_Path_Some_Where
setenv ipaddr 192.168.1.1;
git clone --depth=1 https://git.openwrt.org/openwrt.git
ping 192.168.1.10;
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/* .
</syntaxhighlight>
</syntaxhighlight>


Please modify ./files/etc/opkg/distfeeds.conf
[http://www.arduino.org/learning/tutorials/advanced-guides/how-to-upgrade-lininoio-os-from-u-boot LininoIO OS upgrade from U-boot]
[https://www.arduino.cc/en/Tutorial/YunUBootReflash Reflashing the OpenWrt-Yun image on the Yún]
[https://www.arduino.cc/en/Tutorial/YunSysRestore Restore the 1.5.3 image after you did sysupgrade to 1.6.2 on old Yún]


First Time, Setup cross compile build environment (ubuntu 14.04):
Restore old image:
<syntaxhighlight lang="bash" enclose="div">
<syntaxhighlight lang="bash" enclose="div">
./FIRST_SETUP_ubuntu_Trusty_Tahr.sh
setenv bootargs board=YUN console=ttyATH0,250000 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot env)ro,14656k(rootfs),1280k(kernel),64k(nvram),64k(art),15936k@0x50000(firmware) rootfstype=squashfs,jffs2 noinitrd
</syntaxhighlight>
saveenv
 
Build:
<syntaxhighlight lang="bash" enclose="div">
./build.sh
</syntaxhighlight>
</syntaxhighlight>


== Essential items in the kernel configuration ==
== Essential items in the kernel configuration ==
'''diffconfig'''
<syntaxhighlight lang="text" enclose="div">
<syntaxhighlight lang="text" enclose="div">
CONFIG_TARGET_ar71xx=y
CONFIG_TARGET_ar71xx=y
CONFIG_TARGET_ar71xx_generic=y
CONFIG_TARGET_ar71xx_generic=y
CONFIG_TARGET_ar71xx_generic_Yun=y
CONFIG_TARGET_ar71xx_generic_DEVICE_arduino-yun=y
 
CONFIG_ALL_KMODS=y
CONFIG_ALL_NONSHARED=y
CONFIG_DEVEL=y
CONFIG_BUILD_PATENTED=y
CONFIG_CCACHE=y
CONFIG_IB=y
CONFIG_IB_STANDALONE=y
CONFIG_IMAGEOPT=y
CONFIG_IMAGEOPT=y
# CONFIG_PREINITOPT is not set
CONFIG_KERNEL_MIPS_FPU_EMULATOR=y
CONFIG_TARGET_PREINIT_SUPPRESS_STDERR=y
CONFIG_LIBCURL_COOKIES=y
CONFIG_TARGET_PREINIT_TIMEOUT=2
CONFIG_LIBCURL_FILE=y
# CONFIG_TARGET_PREINIT_SHOW_NETMSG is not set
CONFIG_LIBCURL_FTP=y
# CONFIG_TARGET_PREINIT_SUPPRESS_FAILSAFE_NETMSG is not set
CONFIG_LIBCURL_HTTP=y
CONFIG_TARGET_PREINIT_IFNAME=""
CONFIG_LIBCURL_NO_SMB="!"
CONFIG_TARGET_PREINIT_IP="192.168.1.1"
CONFIG_LIBCURL_OPENSSL=y
CONFIG_TARGET_PREINIT_NETMASK="255.255.255.0"
CONFIG_LIBCURL_PROXY=y
CONFIG_TARGET_PREINIT_BROADCAST="192.168.1.255"
CONFIG_LUCI_LANG_en=y
# CONFIG_INITOPT is not set
CONFIG_MAKE_TOOLCHAIN=y
CONFIG_TARGET_INIT_PATH="/usr/sbin:/usr/bin:/sbin:/bin"
CONFIG_NODEJS_8=y
CONFIG_TARGET_INIT_ENV=""
CONFIG_NODEJS_ICU_NONE=y
CONFIG_TARGET_INIT_CMD="/sbin/init"
CONFIG_OPENSSL_WITH_COMPRESSION=y
CONFIG_TARGET_INIT_SUPPRESS_STDERR=y
CONFIG_OPENSSL_WITH_DEPRECATED=y
CONFIG_VERSIONOPT=y
CONFIG_OPENSSL_WITH_EC=y
CONFIG_VERSION_DIST="OpenWrt"
CONFIG_OPENSSL_WITH_NPN=y
CONFIG_VERSION_NICK="Bleeding Edge"
CONFIG_OPENSSL_WITH_PSK=y
CONFIG_VERSION_NUMBER=""
CONFIG_OPENSSL_WITH_SRP=y
CONFIG_VERSION_REPO="http://downloads.openwrt.org/snapshots/trunk/%S/packages"
CONFIG_PACKAGE_ajtcl=m
CONFIG_VERSION_MANUFACTURER="Arduino"
CONFIG_PACKAGE_ajtcl-alljoynjs=m
CONFIG_VERSION_MANUFACTURER_URL=""
CONFIG_PACKAGE_ajtcl-alljoynjs-samples=m
CONFIG_VERSION_PRODUCT="Arduino Yun"
CONFIG_PACKAGE_ajtcl-samples=m
CONFIG_VERSION_HWREV="1.0"
CONFIG_PACKAGE_ajtcl-services=m
# CONFIG_VERSION_FILENAMES is not set
CONFIG_PACKAGE_alljoyn=m
 
CONFIG_PACKAGE_alljoyn-about=m
CONFIG_PER_FEED_REPO=y
CONFIG_PACKAGE_alljoyn-c=m
CONFIG_PER_FEED_REPO_ADD_DISABLED=y
CONFIG_PACKAGE_alljoyn-config=m
CONFIG_PER_FEED_REPO_ADD_COMMENTED=y
CONFIG_PACKAGE_alljoyn-config-samples=m
CONFIG_FEED_packages=y
CONFIG_PACKAGE_alljoyn-controlpanel=m
CONFIG_FEED_luci=y
CONFIG_PACKAGE_alljoyn-controlpanel-samples=m
CONFIG_FEED_routing=y
CONFIG_PACKAGE_alljoyn-non-gw-config=m
CONFIG_FEED_telephony=y
CONFIG_PACKAGE_alljoyn-notification=m
CONFIG_FEED_management=y
CONFIG_PACKAGE_alljoyn-notification-samples=m
CONFIG_FEED_targets=y
CONFIG_PACKAGE_alljoyn-sample_apps=m
CONFIG_FEED_arduino=y
CONFIG_PACKAGE_alljoyn-samples=m
# CONFIG_SMIMEOPT is not set
CONFIG_PACKAGE_alljoyn-services_common=m
CONFIG_OPKGSMIME_PASSPHRASE=y
CONFIG_PACKAGE_arduinoos=m
 
CONFIG_PACKAGE_argp-standalone=y
CONFIG_DEFAULT_base-files=y
CONFIG_PACKAGE_avahi-daemon-service-ssh=y
CONFIG_DEFAULT_busybox=y
CONFIG_PACKAGE_avahi-dbus-daemon=y
CONFIG_DEFAULT_dnsmasq=y
CONFIG_PACKAGE_avahi-dnsconfd=y
CONFIG_DEFAULT_dropbear=y
CONFIG_PACKAGE_avahi-utils=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_avrdude=y
CONFIG_PACKAGE_badblocks=y
CONFIG_PACKAGE_blkid=y
CONFIG_PACKAGE_block-mount=y
CONFIG_PACKAGE_bluez-libs=m
CONFIG_PACKAGE_bossa=y
CONFIG_PACKAGE_ca-bundle=y
CONFIG_PACKAGE_ca-certificates=y
CONFIG_PACKAGE_ciao=y
CONFIG_PACKAGE_ciao-connector-phant=m
CONFIG_PACKAGE_ciao-connector-smtp=m
CONFIG_PACKAGE_ciao-connector-xmpp=m
CONFIG_PACKAGE_cpu-mcu-bridge=y
CONFIG_PACKAGE_cpu-mcu-bridge=y
CONFIG_PACKAGE_curl=y
CONFIG_PACKAGE_dbus=y
CONFIG_PACKAGE_dbus-utils=y
CONFIG_PACKAGE_dosfstools=y
CONFIG_PACKAGE_duktape=m
CONFIG_PACKAGE_e2fsprogs=y
CONFIG_PACKAGE_fdisk=y
CONFIG_PACKAGE_gnupg=y
CONFIG_PACKAGE_hidapi=m
CONFIG_PACKAGE_kmod-fs-exfat=m
CONFIG_PACKAGE_kmod-fs-msdos=y
CONFIG_PACKAGE_kmod-fs-vfat=y
CONFIG_PACKAGE_kmod-loop=y
CONFIG_PACKAGE_kmod-nls-cp437=y
CONFIG_PACKAGE_kmod-nls-iso8859-1=y
CONFIG_PACKAGE_kmod-nls-utf8=y
CONFIG_PACKAGE_kmod-scsi-core=y
CONFIG_PACKAGE_kmod-scsi-generic=y
CONFIG_PACKAGE_kmod-spi-bitbang=y
CONFIG_PACKAGE_kmod-spi-dev=y
CONFIG_PACKAGE_kmod-spi-gpio=y
CONFIG_PACKAGE_kmod-spi-gpio-custom=y
CONFIG_PACKAGE_kmod-usb-storage=y
CONFIG_PACKAGE_libavahi-client=y
CONFIG_PACKAGE_libavahi-compat-libdnssd=y
CONFIG_PACKAGE_libavahi-dbus-support=y
CONFIG_PACKAGE_libblkid=y
CONFIG_PACKAGE_libbz2=y
CONFIG_PACKAGE_libcap=m
CONFIG_PACKAGE_libcomerr=y
CONFIG_PACKAGE_libcurl=y
CONFIG_PACKAGE_libdaemon=y
CONFIG_PACKAGE_libdbus=y
CONFIG_PACKAGE_libelf1=y
CONFIG_PACKAGE_libevdev=m
CONFIG_PACKAGE_libexpat=y
CONFIG_PACKAGE_libext2fs=y
CONFIG_PACKAGE_libfdisk=y
CONFIG_PACKAGE_libffi=y
CONFIG_PACKAGE_libftdi1=y
CONFIG_PACKAGE_libfuse=m
CONFIG_PACKAGE_libgdbm=y
CONFIG_PACKAGE_libiwinfo-lua=y
CONFIG_PACKAGE_liblua=y
CONFIG_PACKAGE_liblucihttp=y
CONFIG_PACKAGE_liblucihttp-lua=y
CONFIG_PACKAGE_liblzma=m
CONFIG_PACKAGE_libncurses=y
CONFIG_PACKAGE_libopenssl=y
CONFIG_PACKAGE_libpam=m
CONFIG_PACKAGE_libpcre=y
CONFIG_PACKAGE_libpopt=m
CONFIG_PACKAGE_libreadline=y
CONFIG_PACKAGE_librt=y
CONFIG_PACKAGE_libsmartcols=y
CONFIG_PACKAGE_libss=y
CONFIG_PACKAGE_libstdcpp=y
CONFIG_PACKAGE_libubus-lua=y
CONFIG_PACKAGE_libudev-fbsd=m
CONFIG_PACKAGE_libusb-1.0=y
CONFIG_PACKAGE_libusb-compat=y
CONFIG_PACKAGE_libustream-openssl=y
CONFIG_PACKAGE_libuuid=y
CONFIG_PACKAGE_logrotate=m
CONFIG_PACKAGE_lua=y
CONFIG_PACKAGE_lua-base64=m
CONFIG_PACKAGE_lua-coxpcall=m
CONFIG_PACKAGE_lua-wsapi-base=m
CONFIG_PACKAGE_lua-wsapi-xavante=m
CONFIG_PACKAGE_lua-xavante=m
CONFIG_PACKAGE_luafilesystem=m
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-app-arduino-webpanel=y
CONFIG_PACKAGE_luci-app-arduino-webpanel=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-base=y
CONFIG_PACKAGE_luci-i18n-base-en=y
CONFIG_PACKAGE_luci-i18n-firewall-en=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-mod-admin-full=y
CONFIG_PACKAGE_luci-proto-ipv6=y
CONFIG_PACKAGE_luci-proto-ppp=y
CONFIG_PACKAGE_luci-theme-bootstrap=y
CONFIG_PACKAGE_luci-theme-openwrt=y
CONFIG_PACKAGE_mg=y
CONFIG_PACKAGE_nano=y
CONFIG_PACKAGE_node=m
CONFIG_PACKAGE_node=m
CONFIG_PACKAGE_node-actions-on-google=m
CONFIG_PACKAGE_node-alexa-app=m
CONFIG_PACKAGE_node-alexa-sdk=m
CONFIG_PACKAGE_node-arduino-firmata=m
CONFIG_PACKAGE_node-authenticate-pam=m
CONFIG_PACKAGE_node-autobahn=m
CONFIG_PACKAGE_node-aws-iot-device-sdk=m
CONFIG_PACKAGE_node-aws-sdk=m
CONFIG_PACKAGE_node-azure-event-hubs=m
CONFIG_PACKAGE_node-azure-iot-device-amqp=m
CONFIG_PACKAGE_node-azure-iot-device-http=m
CONFIG_PACKAGE_node-azure-iot-device-mqtt=m
CONFIG_PACKAGE_node-azure-iothub=m
CONFIG_PACKAGE_node-bignum=m
CONFIG_PACKAGE_node-binaryjs=m
CONFIG_PACKAGE_node-bleacon=m
CONFIG_PACKAGE_node-bleno=m
CONFIG_PACKAGE_node-bleno=m
CONFIG_PACKAGE_node-bluetooth-hci-socket=m
CONFIG_PACKAGE_node-browserify=m
CONFIG_PACKAGE_node-bufferutil=m
CONFIG_PACKAGE_node-coap=m
CONFIG_PACKAGE_node-cpx=m
CONFIG_PACKAGE_node-cylon=m
CONFIG_PACKAGE_node-cylon-firmata=m
CONFIG_PACKAGE_node-cylon-gpio=m
CONFIG_PACKAGE_node-cylon-i2c=m
CONFIG_PACKAGE_node-eddystone-beacon=m
CONFIG_PACKAGE_node-ejdb=m
CONFIG_PACKAGE_node-epoll=m
CONFIG_PACKAGE_node-exorcist=m
CONFIG_PACKAGE_node-express=m
CONFIG_PACKAGE_node-ffi=m
CONFIG_PACKAGE_node-firmata=m
CONFIG_PACKAGE_node-forever=m
CONFIG_PACKAGE_node-fuse-bindings=m
CONFIG_PACKAGE_node-hap-nodejs=m
CONFIG_PACKAGE_node-hashmap=m
CONFIG_PACKAGE_node-hashtable=m
CONFIG_PACKAGE_node-homebridge=m
CONFIG_PACKAGE_node-i2c-bus=m
CONFIG_PACKAGE_node-ibmiotf=m
CONFIG_PACKAGE_node-ideino-linino-lib=m
CONFIG_PACKAGE_node-iothub-explorer=m
CONFIG_PACKAGE_node-johnny-five=m
CONFIG_PACKAGE_node-jsonfile=m
CONFIG_PACKAGE_node-level=m
CONFIG_PACKAGE_node-leveldown=m
CONFIG_PACKAGE_node-levelup=m
CONFIG_PACKAGE_node-logfmt=m
CONFIG_PACKAGE_node-lwm2m-node-lib=m
CONFIG_PACKAGE_node-mdns=m
CONFIG_PACKAGE_node-mknod=m
CONFIG_PACKAGE_node-mocha=m
CONFIG_PACKAGE_node-modbus=m
CONFIG_PACKAGE_node-mqtt=m
CONFIG_PACKAGE_node-muzzley-client=m
CONFIG_PACKAGE_node-nconf=m
CONFIG_PACKAGE_node-net-ping=m
CONFIG_PACKAGE_node-nino-io=m
CONFIG_PACKAGE_node-nitrogen=m
CONFIG_PACKAGE_node-nitrogen-cli=m
CONFIG_PACKAGE_node-nitrogen-leveldb-store=m
CONFIG_PACKAGE_node-noble=m
CONFIG_PACKAGE_node-noble=m
# CONFIG_PACKAGE_node-serialport is not set
CONFIG_PACKAGE_node-node-expat=m
CONFIG_PACKAGE_node-node-hid=m
CONFIG_PACKAGE_node-node-inspect=m
CONFIG_PACKAGE_node-node-lambda=m
CONFIG_PACKAGE_node-node-red=m
CONFIG_PACKAGE_node-node-red-contrib-gpio=m
CONFIG_PACKAGE_node-node-red-contrib-homekit=m
CONFIG_PACKAGE_node-node-red-node-arduino=m
CONFIG_PACKAGE_node-node-static=m
CONFIG_PACKAGE_node-npm=m
CONFIG_PACKAGE_node-npm-check-updates=m
CONFIG_PACKAGE_node-onoff=m
CONFIG_PACKAGE_node-pm2=m
CONFIG_PACKAGE_node-reverse-wstunnel=m
CONFIG_PACKAGE_node-rimraf=m
CONFIG_PACKAGE_node-rpio=m
CONFIG_PACKAGE_node-serialport=m
CONFIG_PACKAGE_node-simple-xmpp=m
CONFIG_PACKAGE_node-sleep=m
CONFIG_PACKAGE_node-socket.io=m
CONFIG_PACKAGE_node-socket.io=m
CONFIG_PACKAGE_node-socket.io-client=m
CONFIG_PACKAGE_node-socket.io-client=m
CONFIG_PACKAGE_node-socket.io-client-legacy=m
CONFIG_PACKAGE_node-socket.io-client-legacy=m
CONFIG_PACKAGE_node-socket.io-legacy=m
CONFIG_PACKAGE_node-socket.io-legacy=m
CONFIG_PACKAGE_node-soracom=m
CONFIG_PACKAGE_node-sqlite3=m
CONFIG_PACKAGE_node-sqlite3=m
CONFIG_PACKAGE_node-statvfs=m
CONFIG_PACKAGE_node-twilio=m
CONFIG_PACKAGE_node-typescript=m
CONFIG_PACKAGE_node-uglify-js=m
CONFIG_PACKAGE_node-usb=m
CONFIG_PACKAGE_node-utf-8-validate=m
CONFIG_PACKAGE_node-ws=m
CONFIG_PACKAGE_node-ws=m
CONFIG_PACKAGE_node-xmpp=m
CONFIG_PACKAGE_node-xmpp-client=m
CONFIG_PACKAGE_node-xmpp-component=m
CONFIG_PACKAGE_node-xmpp-server=m
CONFIG_PACKAGE_node-yarn=m
CONFIG_PACKAGE_openssl-util=y
CONFIG_PACKAGE_python-base=y
CONFIG_PACKAGE_python-email=m
CONFIG_PACKAGE_python-light=y
CONFIG_PACKAGE_python-logging=y
CONFIG_PACKAGE_python-netifaces=m
CONFIG_PACKAGE_python-openssl=y
CONFIG_PACKAGE_python-paho-mqtt=y
CONFIG_PACKAGE_python-pyserial=y
CONFIG_PACKAGE_python-xml=y
CONFIG_PACKAGE_querierd=m
CONFIG_PACKAGE_reset-serial=y
CONFIG_PACKAGE_rng-tools=y
CONFIG_PACKAGE_rng-tools=y
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_rpcd-mod-rrdns=y
CONFIG_PACKAGE_shellinabox=m
CONFIG_PACKAGE_spacebrew=y
CONFIG_PACKAGE_spacebrew=y
CONFIG_PACKAGE_strace=y
CONFIG_PACKAGE_swap-utils=y
CONFIG_PACKAGE_temboo=y
CONFIG_PACKAGE_temboo=y
CONFIG_PACKAGE_uSDaemon=y
CONFIG_PACKAGE_terminfo=y
CONFIG_PACKAGE_v8m-rb=m
CONFIG_PACKAGE_tune2fs=y
CONFIG_PACKAGE_uSDaemon=m
CONFIG_PACKAGE_uboot-ar71xx-linino-yun=y
CONFIG_PACKAGE_uhttpd=y
CONFIG_PACKAGE_uhttpd-mod-lua=y
CONFIG_PACKAGE_uhttpd-mod-ubus=y
CONFIG_PACKAGE_usbutils=y
CONFIG_PACKAGE_wget=y
CONFIG_PACKAGE_wireless-tools=y
CONFIG_PACKAGE_yun-conf=y
CONFIG_PACKAGE_yun-conf=y
CONFIG_PACKAGE_yun-scripts=y
CONFIG_PACKAGE_yun-scripts=y
CONFIG_PACKAGE_zlib=y
CONFIG_SDK=y
CONFIG_VERSIONOPT=y
CONFIG_VERSION_BUG_URL=""
CONFIG_VERSION_CODE=""
CONFIG_VERSION_DIST="OpenWrt"
CONFIG_VERSION_HOME_URL=""
CONFIG_VERSION_HWREV="1.0"
CONFIG_VERSION_MANUFACTURER="Arduino"
CONFIG_VERSION_MANUFACTURER_URL=""
CONFIG_VERSION_NUMBER=""
CONFIG_VERSION_PRODUCT="Arduino Yun"
CONFIG_VERSION_REPO="https://downloads.openwrt.org/snapshots"
CONFIG_VERSION_SUPPORT_URL=""
CONFIG_uhttpd_lua=y
# CONFIG_VERSION_CODE_FILENAMES is not set
# CONFIG_VERSION_FILENAMES is not set
</syntaxhighlight>


CONFIG_PACKAGE_luci=y
[https://raw.githubusercontent.com/nxhack/openwrt-yun-build-extra/master/openwrt-yun-lininoos.config openwrt-yun-lininoos.config]
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_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_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_odhcp6c is not set
# CONFIG_PACKAGE_odhcpd is not set
# CONFIG_PACKAGE_dnsmasq is not set                                                                                         
CONFIG_PACKAGE_dnsmasq-dhcpv6=y
 
# CONFIG_PACKAGE_libavahi-client is not set                                                                                 
# CONFIG_PACKAGE_libavahi-compat-libdnssd is not set                                                                         
# CONFIG_PACKAGE_libavahi-dbus-support is not set                                                                           
CONFIG_PACKAGE_libavahi-nodbus-support=y
 
# CONFIG_PACKAGE_avahi-autoipd is not set                                                                                   
# CONFIG_PACKAGE_avahi-daemon-service-http is not set
# CONFIG_PACKAGE_avahi-daemon-service-ssh is not set                                                                         
# CONFIG_PACKAGE_avahi-dbus-daemon is not set                                                                               
CONFIG_PACKAGE_avahi-dnsconfd=y
CONFIG_PACKAGE_avahi-nodbus-daemon=y
 
CONFIG_PACKAGE_gnupg=y
CONFIG_PACKAGE_libgpg-error=y
 
CONFIG_PACKAGE_nano=y
CONFIG_PACKAGE_curl=y
CONFIG_PACKAGE_wget=y
</syntaxhighlight>


== Difference between the LLC edition ==
== Difference between the LLC edition ==
  IPv6 stack is enabled.
  '''IPv6 stack is enabled.'''


  Device name of the leds has been changed.
  '''Device name of the leds has been changed.'''
  '''arduino:blue:wlan'''  '''arduino:white:usb'''
  '''ds:green:wlan''' -> '''arduino:blue:wlan'''
  '''ds:green:usb''' -> '''arduino:white:usb'''
  [https://git.openwrt.org/?p=openwrt.git;a=blobdiff;f=target/linux/ar71xx/base-files/etc/uci-defaults/01_leds;h=39f472a5bb63896153f425f381714788a756d5ef;hp=1db6ad0482ccd308f84ffb080bcd5f11201fc70d;hb=914d4fc6219538640ce843b6cf2a6cab5d71db8a;hpb=124526b5b091e2c4487860bcea26099ec442d301 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds]
  [https://git.openwrt.org/?p=openwrt.git;a=blobdiff;f=target/linux/ar71xx/base-files/etc/uci-defaults/01_leds;h=39f472a5bb63896153f425f381714788a756d5ef;hp=1db6ad0482ccd308f84ffb080bcd5f11201fc70d;hb=914d4fc6219538640ce843b6cf2a6cab5d71db8a;hpb=124526b5b091e2c4487860bcea26099ec442d301 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds]
  [https://github.com/nxhack/openwrt-arduino-packages/commit/eb7130ac331ce491765f27372d987d9d7415f6c0 https://github.com/nxhack/openwrt-arduino-packages/commit/eb7130ac331ce491765f27372d987d9d7415f6c0]
  [https://github.com/nxhack/openwrt-arduino-packages/commit/eb7130ac331ce491765f27372d987d9d7415f6c0 https://github.com/nxhack/openwrt-arduino-packages/commit/eb7130ac331ce491765f27372d987d9d7415f6c0]


  rng-tools は純正版ではだめ LLC 版の init script に合わせる。
  '''Should be started before the Yun original startup script "S49generate_new_gpg_key".'''
S98rngd -> S48rngd
  To enable rngd, add rngd section to /etc/config/system
START=98 -> START=48
  START=98 から START=48 にしないと Yun独自の起動スクリプト S49generate_new_gpg_key で不具合がでる。これより前に rngd を起動する必要がある。
package build の前に rngd.init を変更する。
:<syntaxhighlight lang="bash" enclose="div">
:<syntaxhighlight lang="bash" enclose="div">
sed -i -e s/^START=98/START=48/ ./feeds/packages/utils/rng-tools/files/rngd.init
config rngd
        option enabled '1'
        option device '/dev/urandom'
        option fill_watermark '4000'
</syntaxhighlight>
</syntaxhighlight>


  BUSYBOX ASH BANNER の日付がなぜか出ない。
  '''BUSYBOX ASH BANNER The date disappear.'''
表示しないように変更されていた。
  [https://git.openwrt.org/?p=openwrt.git;a=commit;h=39fabb5068e95ab9c0901dd4f37129111d88ae00 https://git.openwrt.org/?p=openwrt.git;a=commit;h=39fabb5068e95ab9c0901dd4f37129111d88ae00]
  [https://git.openwrt.org/?p=openwrt.git;a=commit;h=39fabb5068e95ab9c0901dd4f37129111d88ae00 https://git.openwrt.org/?p=openwrt.git;a=commit;h=39fabb5068e95ab9c0901dd4f37129111d88ae00]
:<syntaxhighlight lang="diff" enclose="div">
:<syntaxhighlight lang="diff" enclose="div">
Line 379: Line 571:
</syntaxhighlight>
</syntaxhighlight>


  BUSYBOX ASH HELP のバナーが出ない。
  '''BUSYBOX ASH HELP Banner disappear.'''
  CONFIG_ASH_HELP がデフォルトが n に変更されていた。
  CONFIG_ASH_HELP The default has been changed to 'n'.
: [https://github.com/openwrt/openwrt/blob/master/package/utils/busybox/Config-defaults.in https://github.com/openwrt/openwrt/blob/master/package/utils/busybox/Config-defaults.in]
[https://github.com/openwrt/openwrt/blob/master/package/utils/busybox/Config-defaults.in#L2617 https://github.com/openwrt/openwrt/blob/master/package/utils/busybox/Config-defaults.in#L2617]


  AR9331 AVR ライタにするために /etc/avrdude.conf に設定追加する。
  '''Add a configuration of the AR9331 as AVR writer to the original package.'''
[https://github.com/nxhack/openwrt-yun-build-extra/blob/master/files/etc/avrdude.conf#L1108-L1122 /etc/avrdude.conf]


/etc/avrdude.conf:
:<syntaxhighlight lang="text" enclose="div">
:<syntaxhighlight lang="text" enclose="div">
programmer
programmer
Line 397: Line 591:
</syntaxhighlight>
</syntaxhighlight>


  BUSYBOX telnet が有効になっていない。
  '''BUSYBOX: telnet is disabled.'''
  ポリシーなので arduino yun bridge Console につなぐには
  nc localhost 6571
stty -icanon -echo; nc localhost 6571
さらに BUSYBOX で stty が有効になっていない。
opkg install coreutils-stty


  PATH が変わった
  '''PATH has changed.'''
  LLC バージョン CONFIG_TARGET_INIT_PATH="/bin:/sbin:/usr/bin:/usr/sbin"
  CONFIG_TARGET_INIT_PATH="/bin:/sbin:/usr/bin:/usr/sbin" to CONFIG_TARGET_INIT_PATH="/usr/sbin:/usr/bin:/sbin:/bin"
システムの規定値 CONFIG_TARGET_INIT_PATH="/usr/sbin:/usr/bin:/sbin:/bin"
システム全体にかかわるので、検証は新しい規定値で行うことにする。


  uhttpd SSL を強制するようにした。
  '''uhttpd: SSL is forced.'''
  uhttpd で option redirect_https '1'  昨今はこれでないとダメ。
  option redirect_https '1'
[https://github.com/nxhack/openwrt-arduino-packages/tree/for-trunk/yun-conf/files/etc/config/uhttpd#L7 /etc/config/uhttpd]
enable openssl-util libustream-openssl
  CONFIG_OPENSSL_WITH_COMPRESSION=y


  uhttpd 本体の alias サポートを使う。alias patch は当てない。
  '''uhttpd: Use URL alias handle. Do not apply alias patch.'''
[https://github.com/nxhack/openwrt-arduino-packages/tree/for-trunk/yun-conf/files/etc/config/uhttpd#L20-L22 /etc/config/uhttpd]


:/etc/config/uhttpd に追加。
:Add to /etc/config/uhttpd
:<syntaxhighlight lang="text" enclose="div">
:<syntaxhighlight lang="text" enclose="div">
list alias '/arduino=/cgi-bin/luci'
list alias '/arduino=/cgi-bin/luci'
Line 420: Line 613:
</syntaxhighlight>
</syntaxhighlight>


  procd button の仕組みがあるので triggerhappy は不要。
  '''Procd button mechanism exists. triggerhappy is not required.'''
  (triggerhappy HID button をトリガーにするので kmod-input-* が必要)
  (triggerhappy use HID button mechanism, It depends on kmod-input-*)
  (kmod-gpio-button-hotplug + procd buttons のほうがもちろんサイズが小さい)
  (kmod-gpio-button-hotplug + procd buttons, Of course, smaller footprint)
  本家に ath79_register_gpio_keys_polled が無いので PR した。
  I sent PR, adding ath79_register_gpio_keys_polled.
  [https://git.openwrt.org/?p=openwrt.git;a=commit;h=10ae130265302c717b1580514ada28d9a48a2484 https://git.openwrt.org/?p=openwrt.git;a=commit;h=10ae130265302c717b1580514ada28d9a48a2484]
  [https://git.openwrt.org/?p=openwrt.git;a=commit;h=10ae130265302c717b1580514ada28d9a48a2484 https://git.openwrt.org/?p=openwrt.git;a=commit;h=10ae130265302c717b1580514ada28d9a48a2484]
[https://github.com/nxhack/openwrt-arduino-packages/tree/for-trunk/yun-conf/files/etc/hotplug.d/button/00-button /etc/hotplug.d/button/00-button]
[https://github.com/nxhack/openwrt-arduino-packages/tree/for-trunk/yun-conf/files/etc/config/system#L19-L28 /etc/config/system]


: [https://raw.githubusercontent.com/openwrt/openwrt/master/target/linux/ath25/base-files/etc/hotplug.d/button/00-button /etc/hotplug.d/button/00-button] を設定
:Add button section to /etc/config/system.
 
:/etc/config/system に button section 追加。
:<syntaxhighlight lang="bash" enclose="div">
:<syntaxhighlight lang="bash" enclose="div">
config button
config button
         option button 'wps'
         option button 'wps'
         option action 'pressed'
         option action 'pressed'
         option handler '/usr/bin/wifi-reset-button-pressed'
         option handler '/usr/bin/wifi-reset-button-pressed'


config button
config button
         option button 'wps'
         option button 'wps'
         option action 'released'
         option action 'released'
         option handler '/usr/bin/wifi-reset-button-released'
         option handler '/usr/bin/wifi-reset-button-released'
</syntaxhighlight>
</syntaxhighlight>


== TO DO ==
:OR add button section to /etc/config/system.
#uboot-linino コンパイルエラーとる
:<syntaxhighlight lang="bash" enclose="div">
#:extern inline -> static inline, extern __inline__ -> static inline
config button
#::ブートローダの書き換え失敗したら完全に文鎮になるので検証はこわくてできない。
        option button  'wps'
#DISTRIB_TAINTS 意味調査
        option action  'pressed'
#:./include/version.mk 確認する。OpenWrt snapshot では、最終的に DISTRIB_TAINTS="" である。
        option handler '/usr/bin/blink-start 100'
#BUSYBOX 差異
 
#:デフォルトが微妙にちがう。OpenWrt 本家を基本にするにはデフォルトは変更しない方針にする。
config button
#:telnet が無い。stty が無い。
        option button  'wps'
#:気持ち悪いのが CROND_DIR="/var/spool/cron" から CROND_DIR="/etc" になっている事。動いてから考えよう。
        option action  'released'
#::ちゃんと /etc/crontabs -> /var/spool/cron/crontabs のシンボリックリンクがはられていた。
        option handler '/usr/bin/blink-stop'
#SD card の automount 方法調査する。(uSDaemon がいまいちすぎるので)
 
#:OpenWrt (e)udev まだ試していないが。
config button
#::/etc/udev/rules.d/11-sd-cards-auto-mount.rules
        option button  'wps'
#::<syntaxhighlight lang="text" enclose="div">
        option action  'released'
KERNEL!="sda[0-9]", GOTO="sd_cards_auto_mount_end"
        option min    '5'
# Global mount options
        option max    '30'
ACTION=="add", ENV{mount_options}="relatime"
        option handler '/usr/bin/wifi-reset-and-reboot'
# Filesystem specific options
 
ACTION=="add", IMPORT{program}="/sbin/blkid -o udev -p %N"
config button
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"
        option button  'wps'
ACTION=="add", RUN+="/bin/mkdir -p /mnt/%k", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/%k"
        option action  'released'
ACTION=="remove", RUN+="/bin/umount -l /mnt/%k", RUN+="/bin/rmdir /mnt/%k"
        option min    '30'
# exit
        option max    '999'
LABEL="sd_cards_auto_mount_end"
        option handler '/usr/bin/reset-to-factory-anyway'
</syntaxhighlight>
</syntaxhighlight>
#::<syntaxhighlight lang="bash" enclose="div">
 
udevadm control --reload-rules
'''Definitely enable MIPS_FPU_EMULATOR. (disabled by default config)'''
For reduce kernel size, change the kernel config.
  1. Limit the target architecture to MIPS 24Kc. AR933X, AR724X
  2. Limit the target board.
  3. Enable PCI. need for making various packages.
[https://raw.githubusercontent.com/nxhack/openwrt-yun-build-extra/master/openwrt-yun-lininoos.config openwrt-yun-lininoos.config]
 
:check fpu emu debugfs
:<syntaxhighlight lang="bash" enclose="div">
ls -l /sys/kernel/debug/mips/fpuemustats
</syntaxhighlight>
</syntaxhighlight>
#::なるほど、(e)udev を使わないのはサイズの問題だね。system image はできるだけ小さくするのが最優先になっている。なのでこの実装はしない。
 
#opkg packages
= memo =
#: procps -> procps-ng procps-ng-ps procps-ng-w procps-ng-top
== Arduino IDE Bridge Library ==
#:: CPU Usage がバグってる様子...
Must apply this patch.
#: logrotate がないので作った。
<syntaxhighlight lang="diff" enclose="div">
#: python-pip があった
--- a/Bridge/src/Bridge.cpp
#local build packages の BUILD_KEY (Local build key)
+++ b/Bridge/src/Bridge.cpp
#:/etc/opkg/keys/ にストアされる。
@@ -52,7 +52,7 @@
#::まちがって $(TOPDIR)/key-build と $(TOPDIR)/key-build.pub を消して再生成してしまったら、 その環境で作った opkg パッケージを、System Image に組み込まれ(build-in)てる opkg と入れ替える。
    // Wait for OpenWRT message
#:: $(CP) $(BUILD_KEY).pub $(1)/etc/opkg/keys/`$(STAGING_DIR_HOST)/bin/usign -F -p $(BUILD_KEY).pub`
    // "Press enter to activate console"
#fstools, block-mount, fstab
    stream.print(F("run-bridge\n"));
#:[https://wiki.openwrt.org/doc/uci/fstab https://wiki.openwrt.org/doc/uci/fstab]
-   delay(500);
#:<syntaxhighlight lang="text" enclose="div">
+    delay(5000);
Sun Mar  6 19:54:35 2016 user.notice : this file has been obsoleted. please call "/sbin/block mount" directly
    dropAll();
Sun Mar  6 19:54:36 2016 daemon.err block: /dev/sda2 is already mounted
 
</syntaxhighlight>
     // Reset the brigde to check if it is running
#::block-mount は /etc/config/fstab に automount って書けば boot 時によしなに mount するようだ。hotplug 的な挙動はまだこれからっぽい。
#:: [https://lists.openwrt.org/pipermail/openwrt-devel/2016-February/039792.html block info and DISK_MEDIA_CHANGE events]
#:メディア挿入後 /sbin/block mount ってやればよいのだが、とりあえず今は uSDaemon は有効にする。
#extroot
#: [https://wiki.openwrt.org/doc/howto/extroot https://wiki.openwrt.org/doc/howto/extroot]
#: [http://www.egrep.jp/wiki/index.php/Arduino_Yun_cheat_sheet#.E3.83.87.E3.82.A3.E3.82.B9.E3.82.AF.E3.81.AE.E5.AE.B9.E9.87.8F.E3.82.92.E5.A2.97.E3.82.84.E3.81.99 この作業]を前提でパーティションとフォーマット済みのメディアがあるとして、
#:<syntaxhighlight lang="bash" enclose="div">
cd /mnt/sda2
rm -rf *
rm -rf .??*
cd /
tar -C /overlay -cvf - . | tar -C /mnt/sda2 -xf -
block detect > /etc/config/fstab ; vi /etc/config/fstab
# edit /etc/config/fstab : Set all enabled '0' → enabled '1'
#     option target '/mnt/sda2' ->  option target '/overlay'
reboot
</syntaxhighlight>
</syntaxhighlight>
#:戻す場合は、poweroff して SD card を取り出し 'YUN RST' を押し再起動。その後 /etc/config/fstab を修正。
#:<syntaxhighlight lang="text" enclose="div">
config global 'automount'
option from_fstab '1'
option anon_mount '1'
</syntaxhighlight>
#/etc/opkg.conf と /etc/opkg/distfeeds.conf の切り分けを調査する。
#:なんか変なメッセージがでたので根元の distfeeds.conf を書き換えたのだが、opkg.conf をユーザが書き換えるのが本筋。調査する。
#::* opkg_conf_parse_file: Duplicate src declaration
#:[https://wiki.openwrt.org/doc/techref/opkg https://wiki.openwrt.org/doc/techref/opkg]
#:[https://wiki.openwrt.org/doc/packages https://wiki.openwrt.org/doc/packages]
#:仕様がまだ定まってないようだ。
#OOM
#:(もちろん extroot 環境で)
#:beaver とかうごかすと OOM が発生する。
#::メモリー減らすために、いらないモジュールがあるか再調査する。
#:::IPv6 support はさすがにこのご時世外せない。
#:::odhcpd はなくても大丈夫だった。そのかわりdnsmasq を dnsmasq-dhcpv6 に置き換える。
#:::dbus はなくても大丈夫だった。avahi を nodbus で。
#:<syntaxhighlight lang="bash" enclose="div">
echo -1000 > /proc/`cat /var/run/dropbear.1.pid`/oom_score_adj
sysctl -w vm.swappiness=0
sysctl -w kernel.panic_on_oops=1
sysctl -w kernel.panic=3
</syntaxhighlight>
#:opkg でも Out of memory のエラー
#::/etc/opkg/distfeeds.conf で本当に必要なレポジトリのみにする。
#::/etc/opkg.conf の lists_dir ext /var/opkg-lists を tmpfs 以外の場所にする ex. lists_dir ext /usr/local/var/opkg-lists
#::/etc/opkg.conf に option force_space を追加する
#:<syntaxhighlight lang="text" enclose="div">
lists_dir ext /usr/local/var/opkg-lists
option tmp_dir /usr/local/var/tmp
option force_space
</syntaxhighlight>
#:beaver のインストール時に OOM がでるのはひょっとして tmpfs の /tmp が足りないのかもしれない。調査する。
#::/tmp/usr/lib/opkg 調査
#:とにかく /tmp や /var (/tmp の symlink) には物を置かない事。これ大事。


= memo =
== refresh fstab : uci ==
== refresh fstab : uci ==
<syntaxhighlight lang="bash" enclose="div">
<syntaxhighlight lang="bash" enclose="div">
Line 557: Line 705:


== extroot ==
== extroot ==
<syntaxhighlight lang="bash" enclose="div">
opkg update
opkg install e2fsprogs dosfstools fdisk rsync badblocks tune2fs
# opkg install kmod-fs-f2fs mkf2fs f2fsck
cd /usr/sbin
ln -s fsck.fat dosfsck
cd /
umount /dev/sda1
### Destroy partition information.
dd if=/dev/zero of=/dev/sda bs=4096 count=1000
### FAT32 = 14G, ext4 = 14G, else swap
(echo o; echo n; echo p; echo 1; echo; echo +14G; echo n; echo p; echo 2; echo; echo +14G; echo n; echo p; echo 3; echo; echo; echo t; echo 1; echo c; echo t; echo 3; echo 82; echo w) | fdisk /dev/sda
mkfs.fat /dev/sda1
mkfs.ext4 /dev/sda2
mkswap /dev/sda3
mkdir -p /mnt/sda2
mount /dev/sda2 /mnt/sda2
cd /
tar -C /overlay -cvf - . | tar -C /mnt/sda2 -xf -
# rsync -a --exclude=/mnt/ /overlay/ /mnt/sda2/
umount /dev/sda2
rm -rf /mnt/sda2
# check /etc/config/fstab
# remove unused fstab entry at booting time.
uci add fstab mount
uci set fstab.@mount[0].target=/overlay
uci set fstab.@mount[0].device=/dev/sda2
uci set fstab.@mount[0].fstype=ext4
uci set fstab.@mount[0].enabled=1
uci set fstab.@mount[0].check_fs=1
uci set fstab.@mount[0].options=rw,sync,noatime,nodiratime
uci commit
reboot
</syntaxhighlight>
<syntaxhighlight lang="bash" enclose="div">
<syntaxhighlight lang="bash" enclose="div">
cd /mnt/sda2
cd /mnt/sda2
Line 563: Line 748:
cd /
cd /
tar -C /overlay -cvf - . | tar -C /mnt/sda2 -xf -
tar -C /overlay -cvf - . | tar -C /mnt/sda2 -xf -
uci add fstab mount
uci set fstab.@mount[0].target=/overlay
uci set fstab.@mount[0].device=/dev/sda2
uci set fstab.@mount[0].fstype=ext4
uci set fstab.@mount[0].enabled=1
uci set fstab.@mount[0].check_fs=1
uci set fstab.@mount[0].options=rw,sync,noatime,nodiratime
uci commit
reboot
</syntaxhighlight>
<syntaxhighlight lang="bash" enclose="div">
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' exclude extroot device
#     option target '/mnt/sda2' ->  option target '/overlay'
</syntaxhighlight>
 
After firmware upgrade with luci.(backup, sysupgrade, restore)
<syntaxhighlight lang="bash" enclose="div">
# edit /etc/opkg.conf
# remove extroot settings
opkg update
opkg install e2fsprogs dosfstools fdisk rsync badblocks tune2fs
mkdir -p /mnt/sda2
mount /dev/sda2 /mnt/sda2
rm /mnt/sda2/etc/.extroot-uuid
umount /mnt/sda2
 
# check /etc/config/fstab
# remove unused fstab entry at booting time.
 
uci add fstab mount
uci set fstab.@mount[0].target=/overlay
uci set fstab.@mount[0].device=/dev/sda2
uci set fstab.@mount[0].fstype=ext4
uci set fstab.@mount[0].enabled=1
uci set fstab.@mount[0].check_fs=1
uci set fstab.@mount[0].options=rw,sync,noatime,nodiratime
uci commit
reboot
reboot
</syntaxhighlight>
Accessing original root
[https://lede-project.org/docs/user-guide/extroot_configuration#accessing_original_root https://lede-project.org/docs/user-guide/extroot_configuration#accessing_original_root]
<syntaxhighlight lang="bash" enclose="div">
config mount
option target /overlay-boot
option device /dev/mtdblock3
option fstype jffs2
option options rw,sync
option enabled 1
option check_fs 0
</syntaxhighlight>
</syntaxhighlight>


Line 574: Line 807:
opkg update
opkg update
opkg list-upgradable
opkg list-upgradable
opkg install ca-certificates
opkg install unzip
opkg install unzip
opkg install screen
opkg install screen
opkg install procps-ng procps-ng-ps procps-ng-w procps-ng-vmstat procps-ng-watch
opkg install procps-ng-top --force-overwrite
opkg install coreutils-ls coreutils-stty
opkg install coreutils-ls coreutils-stty
opkg install dropbearconvert
opkg install dropbearconvert
opkg install e2fsprogs mkdosfs fdisk dosfsck
opkg install e2fsprogs fdisk dosfstools badblocks tune2fs
opkg install avahi-utils avahi-daemon-service-ssh
# opkg install kmod-fs-f2fs mkf2fs f2fsck
opkg install rsync
opkg install rsync
opkg install diffutils
opkg install diffutils
Line 587: Line 819:
opkg install mg
opkg install mg
opkg install openssh-client --force-overwrite
opkg install openssh-client --force-overwrite
opkg install procps-ng procps-ng-ps procps-ng-w procps-ng-vmstat procps-ng-watch
opkg install procps-ng-top --force-overwrite
</syntaxhighlight>
</syntaxhighlight>
:procps-ng has bug, CPU usage fail.


<syntaxhighlight lang="bash" enclose="div">
<syntaxhighlight lang="bash" enclose="div">
Line 597: Line 830:
# Edit /etc/pip.conf
# Edit /etc/pip.conf
#  cache-dir=/usr/local/var/tmp/.cache
#  cache-dir=/usr/local/var/tmp/.cache
#  log-file=/usr/local/var/tmp/pip-log.txt
# pip install --upgrade pip
# pip install --upgrade pip
pip install beaver==36.1.0
pip install beaver
pip install supervisor
pip install supervisor
</syntaxhighlight>
:If OOM occurs, re-run pip. or use swap
:[https://gist.github.com/nxhack/71e7988e60106de14564 python supervisor startup script for OpenWrt-yun]
: my local setup
<syntaxhighlight lang="bash" enclose="div">
/etc/init.d/cron enable
/etc/init.d/cron start
</syntaxhighlight>
</syntaxhighlight>


== dosfsck ==
== dosfsck --> fsck.fat ==
<syntaxhighlight lang="bash" enclose="div">
<syntaxhighlight lang="bash" enclose="div">
cd /
cd /
umount /mnt/sda1
umount /mnt/sda1
dosfsck -t -a -w /dev/sda1
fsck.fat -y -v -w /dev/sda1
# dosfsck -t -a /dev/sda1
mount /dev/sda1 /mnt/sda1
mount /dev/sda1 /mnt/sda1
</syntaxhighlight>
<syntaxhighlight lang="bash" enclose="div">
cd /usr/sbin
ln -s fsck.fat dosfsck
</syntaxhighlight>
== fsck ==
<syntaxhighlight lang="bash" enclose="div">
opkg install badblocks
</syntaxhighlight>
<syntaxhighlight lang="bash" enclose="div">
e2fsck -t -y -f -c /dev/sda2
</syntaxhighlight>
== YunFirstConfig ==
https://www.arduino.cc/en/Tutorial/YunFirstConfig
https://github.com/arduino-libraries/Bridge/tree/master/examples/YunFirstConfig
== Luci and arduino-webpanel ==
https://github.com/arduino/lede-yun/commit/565508f99cc8922d55b47554de98f7dcb441a461#diff-f2fe3255fb192223dd3dbef288fe215f
== mDNS ==
<syntaxhighlight lang="text" enclose="div">
host-name-from-machine-id=no
host-name=MY_HOST_NAME
domain-name=local
</syntaxhighlight>
== homebridge ==
<syntaxhighlight lang="bash" enclose="div">
opkg install node-homebridge
opkg install sudo
npm install -g homebridge-temperature-cmd
npm install -g homebridge-humidity-cmd
</syntaxhighlight>
== IGMP querierd ==
<syntaxhighlight lang="bash" enclose="div">
opkg install querierd
</syntaxhighlight>
edit /etc/querierd
:supesify a interface
<syntaxhighlight lang="bash" enclose="div">
/etc/init.d/querierd enable
/etc/init.d/querierd start
</syntaxhighlight>
== drop caches ==
<syntaxhighlight lang="bash" enclose="div">
echo 3 > /proc/sys/vm/drop_caches
</syntaxhighlight>
== network ==
eth1 -> wan
wlan0 -> lan
[https://github.com/nxhack/openwrt-arduino-packages/blob/for-trunk/yun-conf/files/etc/config/network /etc/config/network]
[https://github.com/nxhack/openwrt-arduino-packages/blob/for-trunk/yun-conf/files/etc/config/firewall#L22 /etc/config/firewall]
[https://github.com/nxhack/openwrt-yun-build-extra/blob/master/files/etc/config/dhcp#L18 /etc/config/dhcp]
== Secure ==
[https://wiki.openwrt.org/doc/howto/secure.access Secure your router's access]
[https://wiki.openwrt.org/inbox/howto/dropbear-security Dropbear Security]
== revision check ==
<syntaxhighlight lang="bash" enclose="div">
./scripts/getver.sh
</syntaxhighlight>
</syntaxhighlight>


Line 614: Line 928:
  [http://playground.arduino.cc/Hardware/Yun#restoring_a_yun My Yún doesn't boot anymore! How can I restore it?]
  [http://playground.arduino.cc/Hardware/Yun#restoring_a_yun My Yún doesn't boot anymore! How can I restore it?]


YunSerialTerminal をロードしてシリアルコンソールを有効にする。SDカードは抜いておく事。YUN RST ボタンをおす。
Load YunSerialTerminal to enable serial console. Unplug SD card . Press 'YUN RST' button.


#YunSerialTerminal で prompt が出て OS の操作ができる場合。
#If the prompt is out && if the OS can operable.
##なんとかして network を生かす。
##Enabling the network.
##:<syntaxhighlight lang="bash" enclose="div">
##:<syntaxhighlight lang="bash" enclose="div">
ifconfig インターフェース IPアドレス
ifconfig IF IP
route add default gw どこか
route add default gw somewhere
</syntaxhighlight>
</syntaxhighlight>
##:/etc/resolv.conf を編集。
##:Edit /etc/resolv.conf
##SD card で正常な sysupgrade のイメージをもってくる。
##Bring the official sysupgrade image via SD card.
##:<syntaxhighlight lang="bash" enclose="div">
##:<syntaxhighlight lang="bash" enclose="div">
mkdir /mnt/sda1
mkdir /mnt/sda1
mount -t vfat /dev/sda1 /mnt/sda1
mount -t vfat /dev/sda1 /mnt/sda1
</syntaxhighlight>
</syntaxhighlight>
#YunSerialTerminal で u-boot を操作できる場合。
#If you can operate the u-boot via YunSerialTerminal.
##[https://www.arduino.cc/en/Tutorial/YunUBootReflash https://www.arduino.cc/en/Tutorial/YunUBootReflash]
##[https://www.arduino.cc/en/Tutorial/YunUBootReflash https://www.arduino.cc/en/Tutorial/YunUBootReflash]
= TO DO =
#uboot-linino
#:Once the bootloader rewrite fails, I am afraid that completely become brick...
#/etc/opkg.conf, /etc/opkg/distfeeds.conf, /etc/opkg/customfeeds.conf
#:Since the strange message came out, modified distfeeds.conf, It is correct to modify opkg.conf.
#::* opkg_conf_parse_file: Duplicate src declaration
#:[https://wiki.openwrt.org/doc/techref/opkg https://wiki.openwrt.org/doc/techref/opkg]
#:[https://wiki.openwrt.org/doc/packages https://wiki.openwrt.org/doc/packages]
#:Specification seems not yet settled.
#OOM
#:(extroot environment)
#::/etc/opkg/distfeeds.conf : Limit repositories.
#::/etc/opkg.conf : lists_dir ext /var/opkg-lists place not tmpfs. ex. lists_dir ext /usr/local/var/opkg-lists
#::/etc/opkg.conf : Add 'option force_space'
#:<syntaxhighlight lang="text" enclose="div">
lists_dir ext /usr/local/var/opkg-lists
option tmp_dir /usr/local/var/tmp
option force_space
</syntaxhighlight>
#:'''Anyway,  Do not place any objects to /tmp and /var (symlink of /tmp).'''
#sysupgrade with ExtRoot
#: [http://wiki.mbirth.de/know-how/software/openwrt/sysupgrade-with-extroot.html sysupgrade with ExtRoot :: wiki.mbirth.de]
#:<syntaxhighlight lang="bash" enclose="div">
sysupgrade ...
# reboot...
rm /mnt/sda2/etc/.extroot-uuid
reboot
#...
opkg update
opkg upgrade $(opkg list-upgradable | awk '($1 !~ "^kmod|Multiple") {print $1}')
</syntaxhighlight>
#LEDE Project
#: [https://www.lede-project.org/ https://www.lede-project.org/]
#Kernel 4.4
#:How can I reduce kernel size?
#::It does not fit in 1280k.
#:[https://github.com/lede-project/source/pull/1145/commits/105afb63e97cae24890cd76952c80366b2db9921 ar71xx: make arduino yun work with kernel size > 1280k and use generic.mk by camille-hack · Pull Request #1145 · lede-project/source]
#:[https://github.com/lede-project/source/pull/1145 ar71xx: make arduino yun work with kernel size > 1280k and use generic.mk by camille-hack · Pull Request #1145 · lede-project/source]
#::Merged!!!
#PKG DPENDS
#:<syntaxhighlight lang="bash" enclose="div">
To find missing library provider, if the case is not obvious (usually it is just a library name), you may search in $STAGING_DIR/pkginfo folder.
</syntaxhighlight>

Latest revision as of 15:49, 9 May 2019

OpenWrt which runs on the Atheros AR 9331 of Arduino Yun, LLC edition OpenWrt-Yun also Linino is obsolete in the kernel and various packages (and there are security problems). I will drill down on how to upgrade to the latest version of OpenWrt. (With Absolutely NO Warranty)


Prepare for the Security update of OpenWrt-Yun, Arduino Yun Operating System. In the IoT ERA, I think it is a very important thing.

BusyBox v1.25.1 () built-in shell (ash)

     _________
    /        /\      _    ___ ___  ___
   /  LE    /  \    | |  | __|   \| __|
  /    DE  /    \   | |__| _|| |) | _|
 /________/  LE  \  |____|___|___/|___|                      lede-project.org
 \        \   DE /
  \    LE  \    /  -----------------------------------------------------------
   \  DE    \  /    Reboot (17.01-SNAPSHOT, r3796-473e994)
    \________\/    -----------------------------------------------------------

root@Arduino:~# cat /proc/cpuinfo 
system type             : Atheros AR9330 rev 1
machine                 : Arduino Yun
processor               : 0
cpu model               : MIPS 24Kc V7.4
BogoMIPS                : 265.42
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16
shadow register sets    : 1
kscratch registers      : 0
package                 : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

root@Arduino:~# uname -a
Linux Arduino 4.4.108 #0 Fri Dec 29 23:36:25 2017 mips GNU/Linux

NOTE: Arduino.cc (LLC) goes to LininoOS!!!

Arduino Yún LininoOS (since 2-Nov-2016)


OpenWrt-Yun Chaos Calmer 15.05

RedSnake64's implementation can be found at Arduino Yun forum.

RedSnake64 edition OpenWrt-Yun:

https://github.com/RedSnake64/openwrt-yun/tree/15.05
ChaosCalmer_v1.4
I tried it. 'mDNS' is not active, so I could not be accessed in '.local'.
Grasp that implementation. I decided to make Arduino Yun package that can be used in OpenWrt trunk Bleeding Edge.

RedSnake64 edition become Arduino LLC Official edition:

https://github.com/arduino/openwrt-yun-1505

Explore the Yun Profile of the OpenWrt / LEDE Project

The OpenWrt / LEDE Project, already exist a 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 has been implemented.

OpenWrt snapshot images:

https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/
https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/
Mirror site: http://ftp.stw-bonn.de/pub/openwrt/snapshots/trunk/ar71xx/generic/

OpenWrt / LEDE snapshot images:

http://downloads.lede-project.org/snapshots/targets/ar71xx/generic/
http://downloads.lede-project.org/snapshots/targets/ar71xx/generic/packages/
http://downloads.lede-project.org/snapshots/packages/mips_24kc/
This System Image is corresponding Arduino Yun Hardware. but, of course Arduino Yun own software is not implemented.

OpenWrt Core:

git.openwrt.org Git - openwrt trunk tree
shortlog

OpenWrt / LEDE Core:

git.lede-project.org Git - source.git/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
Optional package of OpenWrt Project is managed on github.

Explore 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

LLC edition OpenWrt CC version arduino package:

https://github.com/arduino/openwrt-arduino-packages/tree/for-15.05
Hmmmm.... CONFIG_USE_UCLIBC=y
(I go USE_MUSL ;)

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
  1. avrdude: use a OpenWrt package. Configuration for the Arduino Yun should be placed in /etc/avrdude.conf.
  2. cpu-mcu-bridge: overlaps with OpenWrt yunbridge package. For compatibility use a Arduino package.
  3. cwiid: only RedSnake64 edition. cwiid is Nintendo Wii remote interface package, so should delete.
  4. node: If you want to run node.js, Should turn on MIPS FPU EMULATOR kernel config.
  5. node, node-serialport: use a OpenWrt package. so should delete.
  6. "-legacy" mean that the 0.9.x version.
  7. rng-tools: use a OpenWrt package. so should delete.
  8. v8m-rb: Not required, so should delete.

My new arduino packages here:

https://github.com/nxhack/openwrt-arduino-packages

Arturo Rinaldi edition linino packages:

https://github.com/artynet/LEDE/tree/linino-20/package/linino

Important concept of OpenWrt

The Minimized (smaller footprint) is Highest Priority. This is the large difference in policy between PC GNU/Linux and OpenWrt.

Trunk Bleeding Edge / Reboot version of OpenWrt-Yun package and build environment

https://github.com/openwrt/openwrt.git
https://github.com/nxhack/openwrt-yun-build-extra
https://github.com/nxhack/openwrt-arduino-packages

Setup repos:

mkdir Build_Path_Some_Where
cd Build_Path_Some_Where
git clone https://github.com/openwrt/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/* .

Or lede-17.01

mkdir Build_Path_Some_Where
cd Build_Path_Some_Where
git clone --branch lede-17.01 https://github.com/openwrt/openwrt.git
git clone --depth=1 --branch lede-17.01 --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
Also run fine on 'Bash on Ubuntu on Widnows' ;)

Build:

./build.sh

When build succeed, You find lede-ar71xx-generic-yun-16M-squashfs-sysupgrade.bin in ./bin/targets/ar71xx/generic directory.

(Apply Yun-Shield patch, then SELECT Yun Shield: lede-ar71xx-generic-yun-shield-squashfs-sysupgrade.bin)

In order to using the packages, You must placed kernel packages and arduino packages to server (or SD card).

LEDE Trunk Breaking changes

ar71xx: move Arduino Yun to generic building code

To use the new partitioning, you need to update your U-Boot env in advance:

setenv mtdparts "spi0.0:256k(u-boot)ro,64k(u-boot-env),15936k(firmware),64k(nvram),64k(art)ro"
setenv bootcmd "run addboard; run addtty; run addparts; run addrootfs; bootm 0x9f050000 || bootm 0x9fde0000"
saveenv

memo memo... be careful

setenv board Yun
setenv mtdparts "spi0.0:256k(u-boot)ro,64k(u-boot-env),15936k(firmware),64k(nvram),64k(art)ro"
setenv rootfstype "squashfs,jffs2"
setenv bootargs "console=ttyATH0,250000 board=Yun mem=64M"
setenv noinitrd


memo...

setenv serverip ‹tftp-server-ip›; setenv ipaddr ‹yun-board-ip›;
setenv serverip 192.168.1.10;
setenv ipaddr 192.168.1.1;
ping 192.168.1.10;
LininoIO OS upgrade from U-boot
Reflashing the OpenWrt-Yun image on the Yún
Restore the 1.5.3 image after you did sysupgrade to 1.6.2 on old Yún

Restore old image:

setenv bootargs board=YUN console=ttyATH0,250000 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot env)ro,14656k(rootfs),1280k(kernel),64k(nvram),64k(art),15936k@0x50000(firmware) rootfstype=squashfs,jffs2 noinitrd
saveenv

Essential items in the kernel configuration

diffconfig

CONFIG_TARGET_ar71xx=y
CONFIG_TARGET_ar71xx_generic=y
CONFIG_TARGET_ar71xx_generic_DEVICE_arduino-yun=y
CONFIG_ALL_KMODS=y
CONFIG_ALL_NONSHARED=y
CONFIG_DEVEL=y
CONFIG_BUILD_PATENTED=y
CONFIG_CCACHE=y
CONFIG_IB=y
CONFIG_IB_STANDALONE=y
CONFIG_IMAGEOPT=y
CONFIG_KERNEL_MIPS_FPU_EMULATOR=y
CONFIG_LIBCURL_COOKIES=y
CONFIG_LIBCURL_FILE=y
CONFIG_LIBCURL_FTP=y
CONFIG_LIBCURL_HTTP=y
CONFIG_LIBCURL_NO_SMB="!"
CONFIG_LIBCURL_OPENSSL=y
CONFIG_LIBCURL_PROXY=y
CONFIG_LUCI_LANG_en=y
CONFIG_MAKE_TOOLCHAIN=y
CONFIG_NODEJS_8=y
CONFIG_NODEJS_ICU_NONE=y
CONFIG_OPENSSL_WITH_COMPRESSION=y
CONFIG_OPENSSL_WITH_DEPRECATED=y
CONFIG_OPENSSL_WITH_EC=y
CONFIG_OPENSSL_WITH_NPN=y
CONFIG_OPENSSL_WITH_PSK=y
CONFIG_OPENSSL_WITH_SRP=y
CONFIG_PACKAGE_ajtcl=m
CONFIG_PACKAGE_ajtcl-alljoynjs=m
CONFIG_PACKAGE_ajtcl-alljoynjs-samples=m
CONFIG_PACKAGE_ajtcl-samples=m
CONFIG_PACKAGE_ajtcl-services=m
CONFIG_PACKAGE_alljoyn=m
CONFIG_PACKAGE_alljoyn-about=m
CONFIG_PACKAGE_alljoyn-c=m
CONFIG_PACKAGE_alljoyn-config=m
CONFIG_PACKAGE_alljoyn-config-samples=m
CONFIG_PACKAGE_alljoyn-controlpanel=m
CONFIG_PACKAGE_alljoyn-controlpanel-samples=m
CONFIG_PACKAGE_alljoyn-non-gw-config=m
CONFIG_PACKAGE_alljoyn-notification=m
CONFIG_PACKAGE_alljoyn-notification-samples=m
CONFIG_PACKAGE_alljoyn-sample_apps=m
CONFIG_PACKAGE_alljoyn-samples=m
CONFIG_PACKAGE_alljoyn-services_common=m
CONFIG_PACKAGE_arduinoos=m
CONFIG_PACKAGE_argp-standalone=y
CONFIG_PACKAGE_avahi-daemon-service-ssh=y
CONFIG_PACKAGE_avahi-dbus-daemon=y
CONFIG_PACKAGE_avahi-dnsconfd=y
CONFIG_PACKAGE_avahi-utils=y
CONFIG_PACKAGE_avrdude=y
CONFIG_PACKAGE_badblocks=y
CONFIG_PACKAGE_blkid=y
CONFIG_PACKAGE_block-mount=y
CONFIG_PACKAGE_bluez-libs=m
CONFIG_PACKAGE_bossa=y
CONFIG_PACKAGE_ca-bundle=y
CONFIG_PACKAGE_ca-certificates=y
CONFIG_PACKAGE_ciao=y
CONFIG_PACKAGE_ciao-connector-phant=m
CONFIG_PACKAGE_ciao-connector-smtp=m
CONFIG_PACKAGE_ciao-connector-xmpp=m
CONFIG_PACKAGE_cpu-mcu-bridge=y
CONFIG_PACKAGE_curl=y
CONFIG_PACKAGE_dbus=y
CONFIG_PACKAGE_dbus-utils=y
CONFIG_PACKAGE_dosfstools=y
CONFIG_PACKAGE_duktape=m
CONFIG_PACKAGE_e2fsprogs=y
CONFIG_PACKAGE_fdisk=y
CONFIG_PACKAGE_gnupg=y
CONFIG_PACKAGE_hidapi=m
CONFIG_PACKAGE_kmod-fs-exfat=m
CONFIG_PACKAGE_kmod-fs-msdos=y
CONFIG_PACKAGE_kmod-fs-vfat=y
CONFIG_PACKAGE_kmod-loop=y
CONFIG_PACKAGE_kmod-nls-cp437=y
CONFIG_PACKAGE_kmod-nls-iso8859-1=y
CONFIG_PACKAGE_kmod-nls-utf8=y
CONFIG_PACKAGE_kmod-scsi-core=y
CONFIG_PACKAGE_kmod-scsi-generic=y
CONFIG_PACKAGE_kmod-spi-bitbang=y
CONFIG_PACKAGE_kmod-spi-dev=y
CONFIG_PACKAGE_kmod-spi-gpio=y
CONFIG_PACKAGE_kmod-spi-gpio-custom=y
CONFIG_PACKAGE_kmod-usb-storage=y
CONFIG_PACKAGE_libavahi-client=y
CONFIG_PACKAGE_libavahi-compat-libdnssd=y
CONFIG_PACKAGE_libavahi-dbus-support=y
CONFIG_PACKAGE_libblkid=y
CONFIG_PACKAGE_libbz2=y
CONFIG_PACKAGE_libcap=m
CONFIG_PACKAGE_libcomerr=y
CONFIG_PACKAGE_libcurl=y
CONFIG_PACKAGE_libdaemon=y
CONFIG_PACKAGE_libdbus=y
CONFIG_PACKAGE_libelf1=y
CONFIG_PACKAGE_libevdev=m
CONFIG_PACKAGE_libexpat=y
CONFIG_PACKAGE_libext2fs=y
CONFIG_PACKAGE_libfdisk=y
CONFIG_PACKAGE_libffi=y
CONFIG_PACKAGE_libftdi1=y
CONFIG_PACKAGE_libfuse=m
CONFIG_PACKAGE_libgdbm=y
CONFIG_PACKAGE_libiwinfo-lua=y
CONFIG_PACKAGE_liblua=y
CONFIG_PACKAGE_liblucihttp=y
CONFIG_PACKAGE_liblucihttp-lua=y
CONFIG_PACKAGE_liblzma=m
CONFIG_PACKAGE_libncurses=y
CONFIG_PACKAGE_libopenssl=y
CONFIG_PACKAGE_libpam=m
CONFIG_PACKAGE_libpcre=y
CONFIG_PACKAGE_libpopt=m
CONFIG_PACKAGE_libreadline=y
CONFIG_PACKAGE_librt=y
CONFIG_PACKAGE_libsmartcols=y
CONFIG_PACKAGE_libss=y
CONFIG_PACKAGE_libstdcpp=y
CONFIG_PACKAGE_libubus-lua=y
CONFIG_PACKAGE_libudev-fbsd=m
CONFIG_PACKAGE_libusb-1.0=y
CONFIG_PACKAGE_libusb-compat=y
CONFIG_PACKAGE_libustream-openssl=y
CONFIG_PACKAGE_libuuid=y
CONFIG_PACKAGE_logrotate=m
CONFIG_PACKAGE_lua=y
CONFIG_PACKAGE_lua-base64=m
CONFIG_PACKAGE_lua-coxpcall=m
CONFIG_PACKAGE_lua-wsapi-base=m
CONFIG_PACKAGE_lua-wsapi-xavante=m
CONFIG_PACKAGE_lua-xavante=m
CONFIG_PACKAGE_luafilesystem=m
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-app-arduino-webpanel=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-base=y
CONFIG_PACKAGE_luci-i18n-base-en=y
CONFIG_PACKAGE_luci-i18n-firewall-en=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-mod-admin-full=y
CONFIG_PACKAGE_luci-proto-ipv6=y
CONFIG_PACKAGE_luci-proto-ppp=y
CONFIG_PACKAGE_luci-theme-bootstrap=y
CONFIG_PACKAGE_luci-theme-openwrt=y
CONFIG_PACKAGE_mg=y
CONFIG_PACKAGE_nano=y
CONFIG_PACKAGE_node=m
CONFIG_PACKAGE_node-actions-on-google=m
CONFIG_PACKAGE_node-alexa-app=m
CONFIG_PACKAGE_node-alexa-sdk=m
CONFIG_PACKAGE_node-arduino-firmata=m
CONFIG_PACKAGE_node-authenticate-pam=m
CONFIG_PACKAGE_node-autobahn=m
CONFIG_PACKAGE_node-aws-iot-device-sdk=m
CONFIG_PACKAGE_node-aws-sdk=m
CONFIG_PACKAGE_node-azure-event-hubs=m
CONFIG_PACKAGE_node-azure-iot-device-amqp=m
CONFIG_PACKAGE_node-azure-iot-device-http=m
CONFIG_PACKAGE_node-azure-iot-device-mqtt=m
CONFIG_PACKAGE_node-azure-iothub=m
CONFIG_PACKAGE_node-bignum=m
CONFIG_PACKAGE_node-binaryjs=m
CONFIG_PACKAGE_node-bleacon=m
CONFIG_PACKAGE_node-bleno=m
CONFIG_PACKAGE_node-bluetooth-hci-socket=m
CONFIG_PACKAGE_node-browserify=m
CONFIG_PACKAGE_node-bufferutil=m
CONFIG_PACKAGE_node-coap=m
CONFIG_PACKAGE_node-cpx=m
CONFIG_PACKAGE_node-cylon=m
CONFIG_PACKAGE_node-cylon-firmata=m
CONFIG_PACKAGE_node-cylon-gpio=m
CONFIG_PACKAGE_node-cylon-i2c=m
CONFIG_PACKAGE_node-eddystone-beacon=m
CONFIG_PACKAGE_node-ejdb=m
CONFIG_PACKAGE_node-epoll=m
CONFIG_PACKAGE_node-exorcist=m
CONFIG_PACKAGE_node-express=m
CONFIG_PACKAGE_node-ffi=m
CONFIG_PACKAGE_node-firmata=m
CONFIG_PACKAGE_node-forever=m
CONFIG_PACKAGE_node-fuse-bindings=m
CONFIG_PACKAGE_node-hap-nodejs=m
CONFIG_PACKAGE_node-hashmap=m
CONFIG_PACKAGE_node-hashtable=m
CONFIG_PACKAGE_node-homebridge=m
CONFIG_PACKAGE_node-i2c-bus=m
CONFIG_PACKAGE_node-ibmiotf=m
CONFIG_PACKAGE_node-ideino-linino-lib=m
CONFIG_PACKAGE_node-iothub-explorer=m
CONFIG_PACKAGE_node-johnny-five=m
CONFIG_PACKAGE_node-jsonfile=m
CONFIG_PACKAGE_node-level=m
CONFIG_PACKAGE_node-leveldown=m
CONFIG_PACKAGE_node-levelup=m
CONFIG_PACKAGE_node-logfmt=m
CONFIG_PACKAGE_node-lwm2m-node-lib=m
CONFIG_PACKAGE_node-mdns=m
CONFIG_PACKAGE_node-mknod=m
CONFIG_PACKAGE_node-mocha=m
CONFIG_PACKAGE_node-modbus=m
CONFIG_PACKAGE_node-mqtt=m
CONFIG_PACKAGE_node-muzzley-client=m
CONFIG_PACKAGE_node-nconf=m
CONFIG_PACKAGE_node-net-ping=m
CONFIG_PACKAGE_node-nino-io=m
CONFIG_PACKAGE_node-nitrogen=m
CONFIG_PACKAGE_node-nitrogen-cli=m
CONFIG_PACKAGE_node-nitrogen-leveldb-store=m
CONFIG_PACKAGE_node-noble=m
CONFIG_PACKAGE_node-node-expat=m
CONFIG_PACKAGE_node-node-hid=m
CONFIG_PACKAGE_node-node-inspect=m
CONFIG_PACKAGE_node-node-lambda=m
CONFIG_PACKAGE_node-node-red=m
CONFIG_PACKAGE_node-node-red-contrib-gpio=m
CONFIG_PACKAGE_node-node-red-contrib-homekit=m
CONFIG_PACKAGE_node-node-red-node-arduino=m
CONFIG_PACKAGE_node-node-static=m
CONFIG_PACKAGE_node-npm=m
CONFIG_PACKAGE_node-npm-check-updates=m
CONFIG_PACKAGE_node-onoff=m
CONFIG_PACKAGE_node-pm2=m
CONFIG_PACKAGE_node-reverse-wstunnel=m
CONFIG_PACKAGE_node-rimraf=m
CONFIG_PACKAGE_node-rpio=m
CONFIG_PACKAGE_node-serialport=m
CONFIG_PACKAGE_node-simple-xmpp=m
CONFIG_PACKAGE_node-sleep=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-soracom=m
CONFIG_PACKAGE_node-sqlite3=m
CONFIG_PACKAGE_node-statvfs=m
CONFIG_PACKAGE_node-twilio=m
CONFIG_PACKAGE_node-typescript=m
CONFIG_PACKAGE_node-uglify-js=m
CONFIG_PACKAGE_node-usb=m
CONFIG_PACKAGE_node-utf-8-validate=m
CONFIG_PACKAGE_node-ws=m
CONFIG_PACKAGE_node-xmpp=m
CONFIG_PACKAGE_node-xmpp-client=m
CONFIG_PACKAGE_node-xmpp-component=m
CONFIG_PACKAGE_node-xmpp-server=m
CONFIG_PACKAGE_node-yarn=m
CONFIG_PACKAGE_openssl-util=y
CONFIG_PACKAGE_python-base=y
CONFIG_PACKAGE_python-email=m
CONFIG_PACKAGE_python-light=y
CONFIG_PACKAGE_python-logging=y
CONFIG_PACKAGE_python-netifaces=m
CONFIG_PACKAGE_python-openssl=y
CONFIG_PACKAGE_python-paho-mqtt=y
CONFIG_PACKAGE_python-pyserial=y
CONFIG_PACKAGE_python-xml=y
CONFIG_PACKAGE_querierd=m
CONFIG_PACKAGE_reset-serial=y
CONFIG_PACKAGE_rng-tools=y
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_rpcd-mod-rrdns=y
CONFIG_PACKAGE_shellinabox=m
CONFIG_PACKAGE_spacebrew=y
CONFIG_PACKAGE_strace=y
CONFIG_PACKAGE_swap-utils=y
CONFIG_PACKAGE_temboo=y
CONFIG_PACKAGE_terminfo=y
CONFIG_PACKAGE_tune2fs=y
CONFIG_PACKAGE_uSDaemon=m
CONFIG_PACKAGE_uboot-ar71xx-linino-yun=y
CONFIG_PACKAGE_uhttpd=y
CONFIG_PACKAGE_uhttpd-mod-lua=y
CONFIG_PACKAGE_uhttpd-mod-ubus=y
CONFIG_PACKAGE_usbutils=y
CONFIG_PACKAGE_wget=y
CONFIG_PACKAGE_wireless-tools=y
CONFIG_PACKAGE_yun-conf=y
CONFIG_PACKAGE_yun-scripts=y
CONFIG_PACKAGE_zlib=y
CONFIG_SDK=y
CONFIG_VERSIONOPT=y
CONFIG_VERSION_BUG_URL=""
CONFIG_VERSION_CODE=""
CONFIG_VERSION_DIST="OpenWrt"
CONFIG_VERSION_HOME_URL=""
CONFIG_VERSION_HWREV="1.0"
CONFIG_VERSION_MANUFACTURER="Arduino"
CONFIG_VERSION_MANUFACTURER_URL=""
CONFIG_VERSION_NUMBER=""
CONFIG_VERSION_PRODUCT="Arduino Yun"
CONFIG_VERSION_REPO="https://downloads.openwrt.org/snapshots"
CONFIG_VERSION_SUPPORT_URL=""
CONFIG_uhttpd_lua=y
# CONFIG_VERSION_CODE_FILENAMES is not set
# CONFIG_VERSION_FILENAMES is not set
openwrt-yun-lininoos.config

Difference between the LLC edition

IPv6 stack is enabled.
Device name of the leds has been changed.
ds:green:wlan -> arduino:blue:wlan
ds:green:usb -> arduino:white:usb
target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
https://github.com/nxhack/openwrt-arduino-packages/commit/eb7130ac331ce491765f27372d987d9d7415f6c0
Should be started before the Yun original startup script "S49generate_new_gpg_key".
To enable rngd, add rngd section to /etc/config/system
config rngd
        option enabled '1'
        option device '/dev/urandom'
        option fill_watermark '4000'
BUSYBOX ASH BANNER The date disappear.
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 Banner disappear.
CONFIG_ASH_HELP The default has been changed to 'n'.
https://github.com/openwrt/openwrt/blob/master/package/utils/busybox/Config-defaults.in#L2617
Add a configuration of the AR9331 as AVR writer to the original package.
/etc/avrdude.conf

/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 is disabled.
nc localhost 6571
PATH has changed.
CONFIG_TARGET_INIT_PATH="/bin:/sbin:/usr/bin:/usr/sbin" to CONFIG_TARGET_INIT_PATH="/usr/sbin:/usr/bin:/sbin:/bin"
uhttpd: SSL is forced.
option redirect_https '1'
/etc/config/uhttpd
enable openssl-util libustream-openssl
CONFIG_OPENSSL_WITH_COMPRESSION=y
uhttpd: Use URL alias handle. Do not apply alias patch.
/etc/config/uhttpd
Add to /etc/config/uhttpd
	list alias '/arduino=/cgi-bin/luci'
	list alias '/data=/cgi-bin/luci'
	list alias '/mailbox=/cgi-bin/luci'
Procd button mechanism exists. triggerhappy is not required.
(triggerhappy use HID button mechanism, It depends on kmod-input-*)
(kmod-gpio-button-hotplug + procd buttons, Of course, smaller footprint)
I sent PR, adding ath79_register_gpio_keys_polled.
https://git.openwrt.org/?p=openwrt.git;a=commit;h=10ae130265302c717b1580514ada28d9a48a2484
/etc/hotplug.d/button/00-button
/etc/config/system
Add button section to /etc/config/system.
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'
OR add button section to /etc/config/system.
config button
        option button  'wps'
        option action  'pressed'
        option handler '/usr/bin/blink-start 100'

config button
        option button  'wps'
        option action  'released'
        option handler '/usr/bin/blink-stop'

config button
        option button  'wps'
        option action  'released'
        option min     '5'
        option max     '30'
        option handler '/usr/bin/wifi-reset-and-reboot'

config button
        option button  'wps'
        option action  'released'
        option min     '30'
        option max     '999'
        option handler '/usr/bin/reset-to-factory-anyway'
Definitely enable MIPS_FPU_EMULATOR. (disabled by default config)
For reduce kernel size, change the kernel config.
 1. Limit the target architecture to MIPS 24Kc. AR933X, AR724X
 2. Limit the target board.
 3. Enable PCI. need for making various packages.
openwrt-yun-lininoos.config
check fpu emu debugfs
ls -l /sys/kernel/debug/mips/fpuemustats

memo

Arduino IDE Bridge Library

Must apply this patch.

--- a/Bridge/src/Bridge.cpp
+++ b/Bridge/src/Bridge.cpp
@@ -52,7 +52,7 @@
     // Wait for OpenWRT message
     // "Press enter to activate console"
     stream.print(F("run-bridge\n"));
-    delay(500);
+    delay(5000);
     dropAll();

     // Reset the brigde to check if it is running

refresh fstab : uci

uci delete fstab.@mount[0]
uci delete fstab.@mount[0]
uci commit
uci set fstab.automount=global
uci set fstab.automount.from_fstab='1'
uci set fstab.automount.anon_mount='1'
uci commit

extroot

opkg update
opkg install e2fsprogs dosfstools fdisk rsync badblocks tune2fs
# opkg install kmod-fs-f2fs mkf2fs f2fsck
cd /usr/sbin
ln -s fsck.fat dosfsck
cd /
umount /dev/sda1
### Destroy partition information.
dd if=/dev/zero of=/dev/sda bs=4096 count=1000
### FAT32 = 14G, ext4 = 14G, else swap
(echo o; echo n; echo p; echo 1; echo; echo +14G; echo n; echo p; echo 2; echo; echo +14G; echo n; echo p; echo 3; echo; echo; echo t; echo 1; echo c; echo t; echo 3; echo 82; echo w) | fdisk /dev/sda
mkfs.fat /dev/sda1
mkfs.ext4 /dev/sda2
mkswap /dev/sda3
mkdir -p /mnt/sda2
mount /dev/sda2 /mnt/sda2
cd /
tar -C /overlay -cvf - . | tar -C /mnt/sda2 -xf -
# rsync -a --exclude=/mnt/ /overlay/ /mnt/sda2/
umount /dev/sda2
rm -rf /mnt/sda2

# check /etc/config/fstab
# remove unused fstab entry at booting time.

uci add fstab mount
uci set fstab.@mount[0].target=/overlay
uci set fstab.@mount[0].device=/dev/sda2
uci set fstab.@mount[0].fstype=ext4
uci set fstab.@mount[0].enabled=1
uci set fstab.@mount[0].check_fs=1
uci set fstab.@mount[0].options=rw,sync,noatime,nodiratime
uci commit
reboot
cd /mnt/sda2
rm -rf *
rm -rf .??*
cd /
tar -C /overlay -cvf - . | tar -C /mnt/sda2 -xf -

uci add fstab mount
uci set fstab.@mount[0].target=/overlay
uci set fstab.@mount[0].device=/dev/sda2
uci set fstab.@mount[0].fstype=ext4
uci set fstab.@mount[0].enabled=1
uci set fstab.@mount[0].check_fs=1
uci set fstab.@mount[0].options=rw,sync,noatime,nodiratime
uci commit
reboot
block detect > /etc/config/fstab ; vi /etc/config/fstab
# edit /etc/config/fstab : Set all enabled '0' -> enabled '1' exclude extroot device

After firmware upgrade with luci.(backup, sysupgrade, restore)

# edit /etc/opkg.conf
# remove extroot settings
opkg update
opkg install e2fsprogs dosfstools fdisk rsync badblocks tune2fs
mkdir -p /mnt/sda2
mount /dev/sda2 /mnt/sda2
rm /mnt/sda2/etc/.extroot-uuid
umount /mnt/sda2

# check /etc/config/fstab
# remove unused fstab entry at booting time.

uci add fstab mount
uci set fstab.@mount[0].target=/overlay
uci set fstab.@mount[0].device=/dev/sda2
uci set fstab.@mount[0].fstype=ext4
uci set fstab.@mount[0].enabled=1
uci set fstab.@mount[0].check_fs=1
uci set fstab.@mount[0].options=rw,sync,noatime,nodiratime
uci commit
reboot

Accessing original root

https://lede-project.org/docs/user-guide/extroot_configuration#accessing_original_root
config mount
	option target	/overlay-boot
	option device	/dev/mtdblock3
	option fstype	jffs2
	option options	rw,sync
	option enabled	1
	option check_fs 0

basic tools setup : opkg

# edit /etc/opkg.conf for extroot
opkg update
opkg list-upgradable
opkg install unzip
opkg install screen
opkg install coreutils-ls coreutils-stty
opkg install dropbearconvert
opkg install e2fsprogs fdisk dosfstools badblocks tune2fs
opkg install avahi-utils avahi-daemon-service-ssh
# opkg install kmod-fs-f2fs mkf2fs f2fsck 
opkg install rsync
opkg install diffutils
opkg install logrotate
opkg install mg
opkg install openssh-client --force-overwrite
opkg install procps-ng procps-ng-ps procps-ng-w procps-ng-vmstat procps-ng-watch
opkg install procps-ng-top --force-overwrite
mkdir -p -m 1777 /usr/local/var/tmp
export TMPDIR=/usr/local/var/tmp
opkg install python-pip
opkg install python-six
# Edit /etc/pip.conf
#   cache-dir=/usr/local/var/tmp/.cache
#   log-file=/usr/local/var/tmp/pip-log.txt
# pip install --upgrade pip
pip install beaver
pip install supervisor
If OOM occurs, re-run pip. or use swap
python supervisor startup script for OpenWrt-yun
my local setup
/etc/init.d/cron enable
/etc/init.d/cron start

dosfsck --> fsck.fat

cd /
umount /mnt/sda1
fsck.fat -y -v -w /dev/sda1
mount /dev/sda1 /mnt/sda1
cd /usr/sbin
ln -s fsck.fat dosfsck

fsck

opkg install badblocks
e2fsck -t -y -f -c /dev/sda2

YunFirstConfig

https://www.arduino.cc/en/Tutorial/YunFirstConfig
https://github.com/arduino-libraries/Bridge/tree/master/examples/YunFirstConfig

Luci and arduino-webpanel

https://github.com/arduino/lede-yun/commit/565508f99cc8922d55b47554de98f7dcb441a461#diff-f2fe3255fb192223dd3dbef288fe215f

mDNS

host-name-from-machine-id=no
host-name=MY_HOST_NAME
domain-name=local

homebridge

opkg install node-homebridge
opkg install sudo
npm install -g homebridge-temperature-cmd
npm install -g homebridge-humidity-cmd

IGMP querierd

opkg install querierd

edit /etc/querierd

supesify a interface
/etc/init.d/querierd enable
/etc/init.d/querierd start

drop caches

echo 3 > /proc/sys/vm/drop_caches

network

eth1 -> wan
wlan0 -> lan
/etc/config/network
/etc/config/firewall
/etc/config/dhcp

Secure

Secure your router's access
Dropbear Security

revision check

./scripts/getver.sh

Bricked

My Yún doesn't boot anymore! How can I restore it?

Load YunSerialTerminal to enable serial console. Unplug SD card . Press 'YUN RST' button.

  1. If the prompt is out && if the OS can operable.
    1. Enabling the network.
      ifconfig IF IP
      route add default gw somewhere
      
      Edit /etc/resolv.conf
    2. Bring the official sysupgrade image via SD card.
      mkdir /mnt/sda1
      mount -t vfat /dev/sda1 /mnt/sda1
      
  2. If you can operate the u-boot via YunSerialTerminal.
    1. https://www.arduino.cc/en/Tutorial/YunUBootReflash

TO DO

  1. uboot-linino
    Once the bootloader rewrite fails, I am afraid that completely become brick...
  2. /etc/opkg.conf, /etc/opkg/distfeeds.conf, /etc/opkg/customfeeds.conf
    Since the strange message came out, modified distfeeds.conf, It is correct to modify opkg.conf.
    • opkg_conf_parse_file: Duplicate src declaration
    https://wiki.openwrt.org/doc/techref/opkg
    https://wiki.openwrt.org/doc/packages
    Specification seems not yet settled.
  3. OOM
    (extroot environment)
    /etc/opkg/distfeeds.conf : Limit repositories.
    /etc/opkg.conf : lists_dir ext /var/opkg-lists place not tmpfs. ex. lists_dir ext /usr/local/var/opkg-lists
    /etc/opkg.conf : Add 'option force_space'
    lists_dir ext /usr/local/var/opkg-lists
    option tmp_dir /usr/local/var/tmp
    option force_space
    
    Anyway, Do not place any objects to /tmp and /var (symlink of /tmp).
  4. sysupgrade with ExtRoot
    sysupgrade with ExtRoot :: wiki.mbirth.de
    sysupgrade ...
    # reboot...
    rm /mnt/sda2/etc/.extroot-uuid
    reboot
    #...
    opkg update
    opkg upgrade $(opkg list-upgradable | awk '($1 !~ "^kmod|Multiple") {print $1}')
    
  5. LEDE Project
    https://www.lede-project.org/
  6. Kernel 4.4
    How can I reduce kernel size?
    It does not fit in 1280k.
    ar71xx: make arduino yun work with kernel size > 1280k and use generic.mk by camille-hack · Pull Request #1145 · lede-project/source
    ar71xx: make arduino yun work with kernel size > 1280k and use generic.mk by camille-hack · Pull Request #1145 · lede-project/source
    Merged!!!
  7. PKG DPENDS
    To find missing library provider, if the case is not obvious (usually it is just a library name), you may search in $STAGING_DIR/pkginfo folder.