OpenWrt for Arduino Yun cheat sheet: Difference between revisions

 
(83 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">
<syntaxhighlight lang="text" enclose="div">
Line 14: Line 14:
  \        \  DE /
  \        \  DE /
   \    LE  \    /  -----------------------------------------------------------
   \    LE  \    /  -----------------------------------------------------------
   \  DE    \  /    Reboot (17.01-SNAPSHOT, r3401-e02b12c)
   \  DE    \  /    Reboot (17.01-SNAPSHOT, r3796-473e994)
     \________\/    -----------------------------------------------------------
     \________\/    -----------------------------------------------------------


Line 38: Line 38:


root@Arduino:~# uname -a
root@Arduino:~# uname -a
Linux Arduino 4.4.70 #0 Fri May 26 22:43:02 2017 mips GNU/Linux
Linux Arduino 4.4.108 #0 Fri Dec 29 23:36:25 2017 mips GNU/Linux
</syntaxhighlight>
</syntaxhighlight>


'''NOTE:''' Arduino.cc (LLC) goes to '''LininoOS'''!!!
'''NOTE:''' Arduino.cc (LLC) goes to '''LininoOS'''!!!
: [https://www.arduino.cc/en/Main/ArduinoBoardYun Arduino Yún LininoOS]  (since 2-Nov-2016)
: [https://www.arduino.cc/en/Guide/ArduinoYunLin Arduino Yún LininoOS]  (since 2-Nov-2016)




Line 58: Line 58:
  [https://github.com/arduino/openwrt-yun-1505 https://github.com/arduino/openwrt-yun-1505]
  [https://github.com/arduino/openwrt-yun-1505 https://github.com/arduino/openwrt-yun-1505]


= Investigate the Yun Profile of the OpenWrt / LEDE Project =
= Explore the Yun Profile of the OpenWrt / LEDE Project =
The OpenWrt / LEDE Project, already exist a Arduino Yun Profile.
The OpenWrt / LEDE Project, already exist a Arduino Yun Profile.
  [https://git.lede-project.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=blob;f=target/linux/ar71xx/generic/profiles/arduino.mk;h=8ae5054a7e312213cf872833594b16c0f0237cf1;hb=HEAD target/linux/ar71xx/generic/profiles/arduino.mk]
  [https://git.lede-project.org/?p=source.git;a=commitdiff;h=fa137d51f5cbc678922950a6b06883c1d2141ac2 ar71xx: add Arduino Yun]
  [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 70: 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/]


Line 78: Line 76:
  [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/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/]
  [http://downloads.lede-project.org/snapshots/packages/mips_24kc/ http://downloads.lede-project.org/snapshots/packages/mips_24kc/]
:'''lede-ar71xx-generic-yun-16M-squashfs-sysupgrade.bin''' dose not exist now, because of kernel size issue.
:'''This System Image is corresponding Arduino Yun Hardware. but, of course Arduino Yun own software is not implemented.'''
::Disable 'CONFIG_KERNEL_KALLSYMS' reduce kernel size.
:::Latest LEDE Trunk Allows to have a kernel bigger than 1280k.
::::'''lede-ar71xx-generic-arduino-yun-squashfs-sysupgrade.bin'''
:::You may re-enable 'CONFIG_KERNEL_KALLSYMS'


OpenWrt Core:
OpenWrt Core:
Line 101: 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 144: Line 138:
#node, node-serialport: use a OpenWrt package. so should delete.
#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.
#v8m-rb: Not required, so should delete.


'''My new arduino packages here''':
'''My new arduino packages here''':
  [https://github.com/nxhack/openwrt-arduino-packages/tree/for-trunk https://github.com/nxhack/openwrt-arduino-packages/tree/for-trunk]
  [https://github.com/nxhack/openwrt-arduino-packages https://github.com/nxhack/openwrt-arduino-packages]


Arturo Rinaldi edition linino packages:
Arturo Rinaldi edition linino packages:
Line 158: Line 152:
= Trunk Bleeding Edge / Reboot version of OpenWrt-Yun package and build environment =
= Trunk Bleeding Edge / Reboot version of OpenWrt-Yun package and build environment =


  [https://git.lede-project.org/source.git https://git.lede-project.org/?p=source.git]
  [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-yun-build-extra https://github.com/nxhack/openwrt-yun-build-extra]
  [https://github.com/nxhack/openwrt-arduino-packages/tree/for-trunk https://github.com/nxhack/openwrt-arduino-packages/tree/for-trunk]
  [https://github.com/nxhack/openwrt-arduino-packages https://github.com/nxhack/openwrt-arduino-packages]


Setup repos:
Setup repos:
Line 166: Line 160:
mkdir Build_Path_Some_Where
mkdir Build_Path_Some_Where
cd Build_Path_Some_Where
cd Build_Path_Some_Where
git clone --depth=1 https://git.lede-project.org/source.git
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
git clone --depth=1 --branch master --single-branch https://github.com/nxhack/openwrt-yun-build-extra.git
cd source
cd openwrt
ln -s ../openwrt-yun-build-extra/* .
</syntaxhighlight>
Or lede-17.01
<syntaxhighlight lang="bash" enclose="div">
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/* .
ln -s ../openwrt-yun-build-extra/* .
</syntaxhighlight>
</syntaxhighlight>


Please modify ./files/etc/opkg/distfeeds.conf
Please modify ./files/etc/opkg/distfeeds.conf
Line 196: Line 200:
<syntaxhighlight lang="bash" enclose="div">
<syntaxhighlight lang="bash" enclose="div">
setenv mtdparts "spi0.0:256k(u-boot)ro,64k(u-boot-env),15936k(firmware),64k(nvram),64k(art)ro"
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 0x9fea0000"
setenv bootcmd "run addboard; run addtty; run addparts; run addrootfs; bootm 0x9f050000 || bootm 0x9fde0000"
saveenv
saveenv
</syntaxhighlight>
</syntaxhighlight>


memo...
memo memo... be careful
:setenv serverip ‹tftp-server-ip›; setenv ipaddr ‹yun-board-ip›;
 
<syntaxhighlight lang="bash" enclose="div">
<syntaxhighlight lang="bash" enclose="div">
setenv serverip 192.168.0.101;
setenv board Yun
setenv ipaddr 192.168.0.120;
setenv mtdparts "spi0.0:256k(u-boot)ro,64k(u-boot-env),15936k(firmware),64k(nvram),64k(art)ro"
ping 192.168.0.101;
setenv rootfstype "squashfs,jffs2"
setenv bootargs "console=ttyATH0,250000 board=Yun mem=64M"
setenv noinitrd
</syntaxhighlight>
</syntaxhighlight>


<syntaxhighlight lang="bash" enclose="div">
 
tftp 0x80060000 lede-ar71xx-generic/lede-ar71xx-generic-uImage-lzma.bin;
 
erase 0x9FDE0000 +$filesize;
memo...
cp.b $fileaddr 0x9FDE0000 $filesize;
:setenv serverip ‹tftp-server-ip›; setenv ipaddr ‹yun-board-ip›;
tftp 0x80060000 lede-ar71xx-generic/lede-ar71xx-generic-root.squashfs;
erase 0x9F050000 +$filesize;
cp.b $fileaddr 0x9F050000 $filesize;
reset
</syntaxhighlight>


<syntaxhighlight lang="bash" enclose="div">
<syntaxhighlight lang="bash" enclose="div">
saveenv
setenv serverip 192.168.1.10;
setenv console ttyATH0,250000
setenv ipaddr 192.168.1.1;
saveenv
ping 192.168.1.10;
reset
</syntaxhighlight>
</syntaxhighlight>


Line 237: Line 235:


== 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
Line 244: Line 243:
CONFIG_ALL_NONSHARED=y
CONFIG_ALL_NONSHARED=y
CONFIG_DEVEL=y
CONFIG_DEVEL=y
CONFIG_TOOLCHAINOPTS=y
CONFIG_BUILD_PATENTED=y
CONFIG_CCACHE=y
CONFIG_CCACHE=y
CONFIG_GCC_USE_VERSION_6=y
CONFIG_GCC_VERSION="6.3.0"
CONFIG_IB=y
CONFIG_IB=y
CONFIG_IB_STANDALONE=y
CONFIG_IB_STANDALONE=y
CONFIG_IMAGEOPT=y
CONFIG_IMAGEOPT=y
CONFIG_KERNEL_AIO=y
CONFIG_KERNEL_MIPS_FPU_EMULATOR=y
CONFIG_LIBCURL_COOKIES=y
CONFIG_LIBCURL_COOKIES=y
CONFIG_LIBCURL_FILE=y
CONFIG_LIBCURL_FILE=y
Line 261: Line 258:
CONFIG_LUCI_LANG_en=y
CONFIG_LUCI_LANG_en=y
CONFIG_MAKE_TOOLCHAIN=y
CONFIG_MAKE_TOOLCHAIN=y
CONFIG_MINIUPNPD_IGDv2=y
CONFIG_NODEJS_8=y
CONFIG_NODEJS_6=y
CONFIG_NODEJS_ICU_NONE=y
CONFIG_OPENSSL_ENGINE_CRYPTO=y
CONFIG_OPENSSL_WITH_COMPRESSION=y
CONFIG_OPENSSL_WITH_COMPRESSION=y
CONFIG_OPENSSL_WITH_DEPRECATED=y
CONFIG_OPENSSL_WITH_DEPRECATED=y
Line 290: Line 286:
CONFIG_PACKAGE_arduinoos=m
CONFIG_PACKAGE_arduinoos=m
CONFIG_PACKAGE_argp-standalone=y
CONFIG_PACKAGE_argp-standalone=y
CONFIG_PACKAGE_avahi-daemon-service-ssh=y
CONFIG_PACKAGE_avahi-dbus-daemon=y
CONFIG_PACKAGE_avahi-dbus-daemon=y
CONFIG_PACKAGE_avahi-dnsconfd=y
CONFIG_PACKAGE_avahi-dnsconfd=y
CONFIG_PACKAGE_avahi-utils=y
CONFIG_PACKAGE_avrdude=y
CONFIG_PACKAGE_avrdude=y
CONFIG_PACKAGE_badblocks=y
CONFIG_PACKAGE_blkid=y
CONFIG_PACKAGE_blkid=y
CONFIG_PACKAGE_block-mount=y
CONFIG_PACKAGE_block-mount=y
CONFIG_PACKAGE_bluez-libs=m
CONFIG_PACKAGE_bluez-libs=m
CONFIG_PACKAGE_bossa=y
CONFIG_PACKAGE_bossa=y
CONFIG_PACKAGE_ca-bundle=y
CONFIG_PACKAGE_ca-certificates=y
CONFIG_PACKAGE_ciao=y
CONFIG_PACKAGE_ciao=y
CONFIG_PACKAGE_ciao-connector-phant=m
CONFIG_PACKAGE_ciao-connector-phant=m
Line 305: Line 306:
CONFIG_PACKAGE_dbus=y
CONFIG_PACKAGE_dbus=y
CONFIG_PACKAGE_dbus-utils=y
CONFIG_PACKAGE_dbus-utils=y
CONFIG_PACKAGE_dnsmasq-dhcpv6=y
CONFIG_PACKAGE_dosfstools=y
CONFIG_PACKAGE_duktape=m
CONFIG_PACKAGE_duktape=m
CONFIG_PACKAGE_git=m
CONFIG_PACKAGE_e2fsprogs=y
CONFIG_PACKAGE_fdisk=y
CONFIG_PACKAGE_gnupg=y
CONFIG_PACKAGE_gnupg=y
CONFIG_PACKAGE_hidapi=m
CONFIG_PACKAGE_hidapi=m
CONFIG_PACKAGE_kmod-crypto-aead=y
CONFIG_PACKAGE_kmod-fs-exfat=m
CONFIG_PACKAGE_kmod-crypto-crc32c=y
CONFIG_PACKAGE_kmod-fs-msdos=y
CONFIG_PACKAGE_kmod-crypto-hash=y
CONFIG_PACKAGE_kmod-crypto-manager=y
CONFIG_PACKAGE_kmod-crypto-null=y
CONFIG_PACKAGE_kmod-crypto-pcompress=y
CONFIG_PACKAGE_kmod-cryptodev=m
CONFIG_PACKAGE_kmod-fs-afs=m
CONFIG_PACKAGE_kmod-fs-ext4=y
CONFIG_PACKAGE_kmod-fs-hfs=y
CONFIG_PACKAGE_kmod-fs-hfsplus=y
CONFIG_PACKAGE_kmod-fs-ntfs=y
CONFIG_PACKAGE_kmod-fs-reiserfs=y
CONFIG_PACKAGE_kmod-fs-vfat=y
CONFIG_PACKAGE_kmod-fs-vfat=y
CONFIG_PACKAGE_kmod-fuse=y
CONFIG_PACKAGE_kmod-i2c-core=y
CONFIG_PACKAGE_kmod-ipt-debug=m
CONFIG_PACKAGE_kmod-leds-gpio=y
CONFIG_PACKAGE_kmod-ledtrig-default-on=y
CONFIG_PACKAGE_kmod-ledtrig-netdev=y
CONFIG_PACKAGE_kmod-ledtrig-timer=y
CONFIG_PACKAGE_kmod-lib-crc16=y
CONFIG_PACKAGE_kmod-loop=y
CONFIG_PACKAGE_kmod-loop=y
CONFIG_PACKAGE_kmod-nls-cp437=y
CONFIG_PACKAGE_kmod-nls-cp437=y
CONFIG_PACKAGE_kmod-nls-iso8859-1=y
CONFIG_PACKAGE_kmod-nls-iso8859-1=y
CONFIG_PACKAGE_kmod-nls-utf8=y
CONFIG_PACKAGE_kmod-nls-utf8=y
CONFIG_PACKAGE_kmod-rxrpc=m
CONFIG_PACKAGE_kmod-scsi-core=y
CONFIG_PACKAGE_kmod-scsi-core=y
CONFIG_PACKAGE_kmod-scsi-generic=y
CONFIG_PACKAGE_kmod-spi-bitbang=y
CONFIG_PACKAGE_kmod-spi-bitbang=y
CONFIG_PACKAGE_kmod-spi-dev=y
CONFIG_PACKAGE_kmod-spi-dev=y
CONFIG_PACKAGE_kmod-spi-gpio=y
CONFIG_PACKAGE_kmod-spi-gpio=y
CONFIG_PACKAGE_kmod-spi-gpio-custom=y
CONFIG_PACKAGE_kmod-spi-gpio-custom=y
CONFIG_PACKAGE_kmod-usb-ohci=y
CONFIG_PACKAGE_kmod-usb-storage=y
CONFIG_PACKAGE_kmod-usb-storage=y
CONFIG_PACKAGE_kmod-video-core=y
CONFIG_PACKAGE_libavahi-client=y
CONFIG_PACKAGE_libavahi-client=y
CONFIG_PACKAGE_libavahi-compat-libdnssd=y
CONFIG_PACKAGE_libavahi-compat-libdnssd=y
Line 350: Line 331:
CONFIG_PACKAGE_libblkid=y
CONFIG_PACKAGE_libblkid=y
CONFIG_PACKAGE_libbz2=y
CONFIG_PACKAGE_libbz2=y
CONFIG_PACKAGE_libcap=y
CONFIG_PACKAGE_libcap=m
CONFIG_PACKAGE_libcomerr=y
CONFIG_PACKAGE_libcurl=y
CONFIG_PACKAGE_libcurl=y
CONFIG_PACKAGE_libdaemon=y
CONFIG_PACKAGE_libdaemon=y
CONFIG_PACKAGE_libdbus=y
CONFIG_PACKAGE_libdbus=y
CONFIG_PACKAGE_libelf1=y
CONFIG_PACKAGE_libelf1=y
CONFIG_PACKAGE_libevdev=m
CONFIG_PACKAGE_libexpat=y
CONFIG_PACKAGE_libexpat=y
CONFIG_PACKAGE_libext2fs=y
CONFIG_PACKAGE_libfdisk=y
CONFIG_PACKAGE_libffi=y
CONFIG_PACKAGE_libffi=y
CONFIG_PACKAGE_libftdi1=y
CONFIG_PACKAGE_libftdi1=y
CONFIG_PACKAGE_libfuse=m
CONFIG_PACKAGE_libfuse=m
CONFIG_PACKAGE_libgcrypt=y
CONFIG_PACKAGE_libgdbm=y
CONFIG_PACKAGE_libgdbm=y
CONFIG_PACKAGE_libgmp=y
CONFIG_PACKAGE_libgpg-error=y
CONFIG_PACKAGE_libiwinfo-lua=y
CONFIG_PACKAGE_libiwinfo-lua=y
CONFIG_PACKAGE_liblua=y
CONFIG_PACKAGE_liblua=y
CONFIG_PACKAGE_libmodbus=m
CONFIG_PACKAGE_liblucihttp=y
CONFIG_PACKAGE_liblucihttp-lua=y
CONFIG_PACKAGE_liblzma=m
CONFIG_PACKAGE_libncurses=y
CONFIG_PACKAGE_libncurses=y
CONFIG_PACKAGE_libnettle=y
CONFIG_PACKAGE_libopenssl=y
CONFIG_PACKAGE_libopenssl=y
CONFIG_PACKAGE_libpam=m
CONFIG_PACKAGE_libpam=m
Line 374: Line 357:
CONFIG_PACKAGE_libreadline=y
CONFIG_PACKAGE_libreadline=y
CONFIG_PACKAGE_librt=y
CONFIG_PACKAGE_librt=y
CONFIG_PACKAGE_libsmartcols=y
CONFIG_PACKAGE_libss=y
CONFIG_PACKAGE_libstdcpp=y
CONFIG_PACKAGE_libstdcpp=y
CONFIG_PACKAGE_libubus-lua=y
CONFIG_PACKAGE_libubus-lua=y
CONFIG_PACKAGE_libuci-lua=y
CONFIG_PACKAGE_libudev-fbsd=m
CONFIG_PACKAGE_libusb-1.0=y
CONFIG_PACKAGE_libusb-1.0=y
CONFIG_PACKAGE_libusb-compat=y
CONFIG_PACKAGE_libusb-compat=y
Line 404: Line 389:
CONFIG_PACKAGE_luci-theme-bootstrap=y
CONFIG_PACKAGE_luci-theme-bootstrap=y
CONFIG_PACKAGE_luci-theme-openwrt=y
CONFIG_PACKAGE_luci-theme-openwrt=y
CONFIG_PACKAGE_mg=m
CONFIG_PACKAGE_mg=y
CONFIG_PACKAGE_nano=y
CONFIG_PACKAGE_nano=y
CONFIG_PACKAGE_node=m
CONFIG_PACKAGE_node=m
CONFIG_PACKAGE_node-alljoyn=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-arduino-firmata=m
CONFIG_PACKAGE_node-authenticate-pam=m
CONFIG_PACKAGE_node-authenticate-pam=m
Line 423: Line 410:
CONFIG_PACKAGE_node-bleno=m
CONFIG_PACKAGE_node-bleno=m
CONFIG_PACKAGE_node-bluetooth-hci-socket=m
CONFIG_PACKAGE_node-bluetooth-hci-socket=m
CONFIG_PACKAGE_node-bower=m
CONFIG_PACKAGE_node-browserify=m
CONFIG_PACKAGE_node-browserify=m
CONFIG_PACKAGE_node-bufferutil=m
CONFIG_PACKAGE_node-coap=m
CONFIG_PACKAGE_node-coap=m
CONFIG_PACKAGE_node-cpx=m
CONFIG_PACKAGE_node-cpx=m
Line 432: Line 419:
CONFIG_PACKAGE_node-cylon-i2c=m
CONFIG_PACKAGE_node-cylon-i2c=m
CONFIG_PACKAGE_node-eddystone-beacon=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-express=m
CONFIG_PACKAGE_node-ffi=m
CONFIG_PACKAGE_node-firmata=m
CONFIG_PACKAGE_node-firmata=m
CONFIG_PACKAGE_node-forever=m
CONFIG_PACKAGE_node-forever=m
CONFIG_PACKAGE_node-fuse-bindings=m
CONFIG_PACKAGE_node-fuse-bindings=m
CONFIG_PACKAGE_node-hap-nodejs=m
CONFIG_PACKAGE_node-hashmap=m
CONFIG_PACKAGE_node-hashmap=m
CONFIG_PACKAGE_node-hashtable=m
CONFIG_PACKAGE_node-hashtable=m
Line 449: Line 441:
CONFIG_PACKAGE_node-levelup=m
CONFIG_PACKAGE_node-levelup=m
CONFIG_PACKAGE_node-logfmt=m
CONFIG_PACKAGE_node-logfmt=m
CONFIG_PACKAGE_node-lwm2m-node-lib=m
CONFIG_PACKAGE_node-mdns=m
CONFIG_PACKAGE_node-mdns=m
CONFIG_PACKAGE_node-mknod=m
CONFIG_PACKAGE_node-mknod=m
Line 456: Line 449:
CONFIG_PACKAGE_node-muzzley-client=m
CONFIG_PACKAGE_node-muzzley-client=m
CONFIG_PACKAGE_node-nconf=m
CONFIG_PACKAGE_node-nconf=m
CONFIG_PACKAGE_node-net-ping=m
CONFIG_PACKAGE_node-nino-io=m
CONFIG_PACKAGE_node-nino-io=m
CONFIG_PACKAGE_node-nitrogen=m
CONFIG_PACKAGE_node-nitrogen=m
Line 463: Line 457:
CONFIG_PACKAGE_node-node-expat=m
CONFIG_PACKAGE_node-node-expat=m
CONFIG_PACKAGE_node-node-hid=m
CONFIG_PACKAGE_node-node-hid=m
CONFIG_PACKAGE_node-node-inspect=m
CONFIG_PACKAGE_node-node-lambda=m
CONFIG_PACKAGE_node-node-lambda=m
CONFIG_PACKAGE_node-node-red=m
CONFIG_PACKAGE_node-node-red=m
CONFIG_PACKAGE_node-node-red-contrib-gpio=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-red-node-arduino=m
CONFIG_PACKAGE_node-node-static=m
CONFIG_PACKAGE_node-node-static=m
CONFIG_PACKAGE_node-npm=m
CONFIG_PACKAGE_node-npm=m
CONFIG_PACKAGE_node-nsp=m
CONFIG_PACKAGE_node-npm-check-updates=m
CONFIG_PACKAGE_node-onoff=m
CONFIG_PACKAGE_node-onoff=m
CONFIG_PACKAGE_node-pm2=m
CONFIG_PACKAGE_node-pm2=m
Line 486: Line 482:
CONFIG_PACKAGE_node-statvfs=m
CONFIG_PACKAGE_node-statvfs=m
CONFIG_PACKAGE_node-twilio=m
CONFIG_PACKAGE_node-twilio=m
CONFIG_PACKAGE_node-typescript=m
CONFIG_PACKAGE_node-uglify-js=m
CONFIG_PACKAGE_node-uglify-js=m
CONFIG_PACKAGE_node-usb=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=m
Line 499: Line 497:
CONFIG_PACKAGE_python-light=y
CONFIG_PACKAGE_python-light=y
CONFIG_PACKAGE_python-logging=y
CONFIG_PACKAGE_python-logging=y
CONFIG_PACKAGE_python-netifaces=m
CONFIG_PACKAGE_python-openssl=y
CONFIG_PACKAGE_python-openssl=y
CONFIG_PACKAGE_python-paho-mqtt=y
CONFIG_PACKAGE_python-paho-mqtt=y
CONFIG_PACKAGE_python-pyserial=y
CONFIG_PACKAGE_python-pyserial=y
CONFIG_PACKAGE_python-xml=y
CONFIG_PACKAGE_python-xml=y
CONFIG_PACKAGE_querierd=m
CONFIG_PACKAGE_reset-serial=y
CONFIG_PACKAGE_reset-serial=y
CONFIG_PACKAGE_rng-tools=y
CONFIG_PACKAGE_rng-tools=y
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_rpcd-mod-rrdns=y
CONFIG_PACKAGE_shellinabox=m
CONFIG_PACKAGE_shellinabox=m
CONFIG_PACKAGE_spacebrew=y
CONFIG_PACKAGE_spacebrew=y
CONFIG_PACKAGE_strace=y
CONFIG_PACKAGE_swap-utils=y
CONFIG_PACKAGE_swap-utils=y
CONFIG_PACKAGE_temboo=y
CONFIG_PACKAGE_temboo=y
CONFIG_PACKAGE_terminfo=y
CONFIG_PACKAGE_terminfo=y
CONFIG_PACKAGE_tune2fs=y
CONFIG_PACKAGE_uSDaemon=m
CONFIG_PACKAGE_uSDaemon=m
CONFIG_PACKAGE_uboot-ar71xx-linino-yun=y
CONFIG_PACKAGE_uboot-ar71xx-linino-yun=y
Line 526: Line 529:
CONFIG_VERSION_BUG_URL=""
CONFIG_VERSION_BUG_URL=""
CONFIG_VERSION_CODE=""
CONFIG_VERSION_CODE=""
CONFIG_VERSION_DIST="LEDE"
CONFIG_VERSION_DIST="OpenWrt"
CONFIG_VERSION_HOME_URL=""
CONFIG_VERSION_HWREV="1.0"
CONFIG_VERSION_HWREV="1.0"
CONFIG_VERSION_MANUFACTURER="Arduino"
CONFIG_VERSION_MANUFACTURER="Arduino"
CONFIG_VERSION_MANUFACTURER_URL=""
CONFIG_VERSION_MANUFACTURER_URL=""
CONFIG_VERSION_NICK=""
CONFIG_VERSION_NUMBER=""
CONFIG_VERSION_NUMBER=""
CONFIG_VERSION_PRODUCT="Arduino Yun"
CONFIG_VERSION_PRODUCT="Arduino Yun"
CONFIG_VERSION_REPO="http://downloads.lede-project.org/snapshots"
CONFIG_VERSION_REPO="https://downloads.openwrt.org/snapshots"
CONFIG_VERSION_SUPPORT_URL=""
CONFIG_VERSION_SUPPORT_URL=""
CONFIG_uhttpd_lua=y
CONFIG_uhttpd_lua=y
# CONFIG_VERSION_CODE_FILENAMES is not set
# CONFIG_VERSION_FILENAMES is not set
</syntaxhighlight>
</syntaxhighlight>


  [https://github.com/nxhack/openwrt-yun-build-extra/blob/master/lede-yun-lininoos.config lede-yun-lininoos.config]
  [https://raw.githubusercontent.com/nxhack/openwrt-yun-build-extra/master/openwrt-yun-lininoos.config openwrt-yun-lininoos.config]


== Difference between the LLC edition ==
== Difference between the LLC edition ==
Line 550: Line 555:


  '''Should be started before the Yun original startup script "S49generate_new_gpg_key".'''
  '''Should be started before the Yun original startup script "S49generate_new_gpg_key".'''
  Add rngd section to /etc/config/system
  To enable rngd, add rngd section to /etc/config/system
:<syntaxhighlight lang="bash" enclose="div">
:<syntaxhighlight lang="bash" enclose="div">
config rngd
config rngd
Line 614: Line 619:
  [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/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#L14-L22 /etc/config/system]
  [https://github.com/nxhack/openwrt-arduino-packages/tree/for-trunk/yun-conf/files/etc/config/system#L19-L28 /etc/config/system]


:Add button section to /etc/config/system.
:Add button section to /etc/config/system.
Line 661: Line 666:
   2. Limit the target board.
   2. Limit the target board.
   3. Enable PCI. need for making various packages.
   3. Enable PCI. need for making various packages.
  [https://github.com/nxhack/openwrt-yun-build-extra/blob/master/patches/LEDE-MIPS24Kc%2BPCI%2BFPU_EMU.patch LEDE-MIPS24Kc+PCI+FPU_EMU.patch]
  [https://raw.githubusercontent.com/nxhack/openwrt-yun-build-extra/master/openwrt-yun-lininoos.config openwrt-yun-lininoos.config]


:check fpu emu debugfs
:check fpu emu debugfs
Line 702: Line 707:
<syntaxhighlight lang="bash" enclose="div">
<syntaxhighlight lang="bash" enclose="div">
opkg update
opkg update
opkg install e2fsprogs dosfstools fdisk rsync
opkg install e2fsprogs dosfstools fdisk rsync badblocks tune2fs
# opkg install kmod-fs-f2fs mkf2fs f2fsck
# opkg install kmod-fs-f2fs mkf2fs f2fsck
cd /usr/sbin
cd /usr/sbin
Line 731: Line 736:
uci set fstab.@mount[0].fstype=ext4
uci set fstab.@mount[0].fstype=ext4
uci set fstab.@mount[0].enabled=1
uci set fstab.@mount[0].enabled=1
uci set fstab.@mount[0].enabled_fsck=0
uci set fstab.@mount[0].check_fs=1
uci set fstab.@mount[0].options=rw,sync,noatime,nodiratime
uci set fstab.@mount[0].options=rw,sync,noatime,nodiratime
uci commit
uci commit
Line 749: Line 754:
uci set fstab.@mount[0].fstype=ext4
uci set fstab.@mount[0].fstype=ext4
uci set fstab.@mount[0].enabled=1
uci set fstab.@mount[0].enabled=1
uci set fstab.@mount[0].enabled_fsck=0
uci set fstab.@mount[0].check_fs=1
uci set fstab.@mount[0].options=rw,sync,noatime,nodiratime
uci set fstab.@mount[0].options=rw,sync,noatime,nodiratime
uci commit
uci commit
Line 760: Line 765:
</syntaxhighlight>
</syntaxhighlight>


after backup & restore sysupgrade
After firmware upgrade with luci.(backup, sysupgrade, restore)
<syntaxhighlight lang="bash" enclose="div">
<syntaxhighlight lang="bash" enclose="div">
# edit /etc/opkg.conf
# remove extroot settings
opkg update
opkg update
opkg install e2fsprogs dosfstools fdisk rsync
opkg install e2fsprogs dosfstools fdisk rsync badblocks tune2fs
mkdir -p /mnt/sda2
mkdir -p /mnt/sda2
mount /dev/sda1 /mnt/sda2
mount /dev/sda2 /mnt/sda2
rm /mnt/sda2/etc/.extroot-uuid
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 add fstab mount
Line 773: Line 784:
uci set fstab.@mount[0].fstype=ext4
uci set fstab.@mount[0].fstype=ext4
uci set fstab.@mount[0].enabled=1
uci set fstab.@mount[0].enabled=1
uci set fstab.@mount[0].enabled_fsck=0
uci set fstab.@mount[0].check_fs=1
uci set fstab.@mount[0].options=rw,sync,noatime,nodiratime
uci set fstab.@mount[0].options=rw,sync,noatime,nodiratime
uci commit
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 788: Line 811:
opkg install coreutils-ls coreutils-stty
opkg install coreutils-ls coreutils-stty
opkg install dropbearconvert
opkg install dropbearconvert
opkg install e2fsprogs fdisk dosfstools  
opkg install e2fsprogs fdisk dosfstools badblocks tune2fs
opkg install avahi-utils avahi-daemon-service-ssh
# opkg install kmod-fs-f2fs mkf2fs f2fsck  
# opkg install kmod-fs-f2fs mkf2fs f2fsck  
opkg install rsync
opkg install rsync
Line 832: Line 856:
cd /usr/sbin
cd /usr/sbin
ln -s fsck.fat dosfsck
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>
</syntaxhighlight>


Line 880: Line 948:
#uboot-linino
#uboot-linino
#:Once the bootloader rewrite fails, I am afraid that completely become brick...
#:Once the bootloader rewrite fails, I am afraid that completely become brick...
#extroot
#: [https://wiki.openwrt.org/doc/howto/extroot https://wiki.openwrt.org/doc/howto/extroot]
#:A partitioned and formatted media that was created in [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 this operation],
#:<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>
#:If you want to restore, restart press the eject the SD card and poweroff 'YUN RST'. Modify the then /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, /etc/opkg/customfeeds.conf
#/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.
#:Since the strange message came out, modified distfeeds.conf, It is correct to modify opkg.conf.