OpenWrt for Arduino Yun cheat sheet: Difference between revisions
Line 209: | Line 209: | ||
<syntaxhighlight lang="bash" enclose="div"> | <syntaxhighlight lang="bash" enclose="div"> | ||
tftp 0x80060000 lede-ar71xx-generic/lede-ar71xx-generic-uImage-lzma.bin | tftp 0x80060000 lede-ar71xx-generic/lede-ar71xx-generic-uImage-lzma.bin; | ||
erase 0x9FDE0000 +$filesize | erase 0x9FDE0000 +$filesize; | ||
cp.b $fileaddr 0x9FDE0000 $filesize | cp.b $fileaddr 0x9FDE0000 $filesize; | ||
tftp 0x80060000 lede-ar71xx-generic/lede-ar71xx-generic-root.squashfs | tftp 0x80060000 lede-ar71xx-generic/lede-ar71xx-generic-root.squashfs; | ||
erase 0x9F050000 +$filesize | erase 0x9F050000 +$filesize; | ||
cp.b $fileaddr 0x9F050000 $filesize | cp.b $fileaddr 0x9F050000 $filesize; | ||
reset | reset | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 18:05, 30 June 2017
OpenWrt running on Atheros AR9331 of Arduino Yun, LLC edition OpenWrt-Yun also Linino, is in obsolete (and has security issues) at kernel and various packages. I will try to investigate the upgrade to the latest version of OpenWrt. (With Absolutely NO Warranty)
Prepare for the Security update of OpenWrt-Yun, Arduino Yun Operating System (YunOS). 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, r3401-e02b12c)
\________\/ -----------------------------------------------------------
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.70 #0 Fri May 26 22:43:02 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
Investigate 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/ 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.
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/
- lede-ar71xx-generic-yun-16M-squashfs-sysupgrade.bin dose not exist now, because of kernel size issue.
- 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'
- Latest LEDE Trunk Allows to have a kernel bigger than 1280k.
- Disable 'CONFIG_KERNEL_KALLSYMS' reduce kernel size.
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.
Investigate the OpenWrt-Yun
OpenWrt-Yun arduino packages
LLC edition arduino package:
https://github.com/arduino/openwrt-packages-yun/tree/master/arduino
RedSnake64 edition arduino package:
https://github.com/RedSnake64/openwrt-arduino-packages/tree/for-15.05
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
- 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.
- cwiid: only RedSnake64 edition. cwiid is Nintendo Wii remote interface package, so should delete.
- node: If you want to run node.js, Should turn on MIPS FPU EMULATOR kernel config.
- node, node-serialport: use a OpenWrt package. so should delete.
- "-legacy" mean that the 0.9.x version.
- rng-tools: OpenWrt package has a problem. Should be changed START=98 to START=48.
- v8m-rb: Not required, so should delete.
My new arduino packages here:
https://github.com/nxhack/openwrt-arduino-packages/tree/for-trunk
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://git.lede-project.org/?p=source.git https://github.com/nxhack/openwrt-yun-build-extra https://github.com/nxhack/openwrt-arduino-packages/tree/for-trunk
Setup repos:
mkdir Build_Path_Some_Where
cd Build_Path_Some_Where
git clone --depth=1 https://git.lede-project.org/source.git
git clone --depth=1 --branch master --single-branch https://github.com/nxhack/openwrt-yun-build-extra.git
cd source
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 0x9fea0000"
saveenv
- setenv serverip ‹tftp-server-ip›; setenv ipaddr ‹yun-board-ip›;
setenv serverip 192.168.0.101;
setenv ipaddr 192.168.0.120;
ping 192.168.0.101;
tftp 0x80060000 lede-ar71xx-generic/lede-ar71xx-generic-uImage-lzma.bin;
erase 0x9FDE0000 +$filesize;
cp.b $fileaddr 0x9FDE0000 $filesize;
tftp 0x80060000 lede-ar71xx-generic/lede-ar71xx-generic-root.squashfs;
erase 0x9F050000 +$filesize;
cp.b $fileaddr 0x9F050000 $filesize;
reset
Essential items in the kernel configuration
CONFIG_TARGET_ar71xx=y
CONFIG_TARGET_ar71xx_generic=y
CONFIG_TARGET_ar71xx_generic_DEVICE_YUN_16M=y
CONFIG_ALL_KMODS=y
CONFIG_ALL_NONSHARED=y
CONFIG_DEVEL=y
CONFIG_TOOLCHAINOPTS=y
CONFIG_CCACHE=y
CONFIG_GCC_USE_VERSION_6=y
CONFIG_GCC_VERSION="6.3.0"
CONFIG_IB=y
CONFIG_IB_STANDALONE=y
CONFIG_IMAGEOPT=y
CONFIG_KERNEL_AIO=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_OPENSSL_ENGINE_CRYPTO=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-dnsconfd=y
CONFIG_PACKAGE_avahi-nodbus-daemon=y
CONFIG_PACKAGE_avrdude=y
CONFIG_PACKAGE_blkid=y
CONFIG_PACKAGE_block-mount=y
CONFIG_PACKAGE_bluez-libs=m
CONFIG_PACKAGE_bossa=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_dnsmasq-dhcpv6=y
CONFIG_PACKAGE_duktape=m
CONFIG_PACKAGE_git=m
CONFIG_PACKAGE_gnupg=y
CONFIG_PACKAGE_hidapi=m
CONFIG_PACKAGE_kmod-crypto-aead=y
CONFIG_PACKAGE_kmod-crypto-crc32c=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-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-nls-cp437=y
CONFIG_PACKAGE_kmod-nls-iso8859-1=y
CONFIG_PACKAGE_kmod-nls-utf8=y
CONFIG_PACKAGE_kmod-rxrpc=m
CONFIG_PACKAGE_kmod-scsi-core=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-ohci=y
CONFIG_PACKAGE_kmod-usb-storage=y
CONFIG_PACKAGE_kmod-video-core=y
CONFIG_PACKAGE_libavahi-nodbus-support=y
CONFIG_PACKAGE_libblkid=y
CONFIG_PACKAGE_libbz2=y
CONFIG_PACKAGE_libcap=y
CONFIG_PACKAGE_libcurl=y
CONFIG_PACKAGE_libdaemon=y
CONFIG_PACKAGE_libelf1=y
CONFIG_PACKAGE_libexpat=y
CONFIG_PACKAGE_libffi=y
CONFIG_PACKAGE_libftdi1=y
CONFIG_PACKAGE_libfuse=m
CONFIG_PACKAGE_libgcrypt=y
CONFIG_PACKAGE_libgdbm=y
CONFIG_PACKAGE_libgmp=y
CONFIG_PACKAGE_libgpg-error=y
CONFIG_PACKAGE_libiwinfo-lua=y
CONFIG_PACKAGE_liblua=y
CONFIG_PACKAGE_libmodbus=m
CONFIG_PACKAGE_libncurses=y
CONFIG_PACKAGE_libnettle=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_libstdcpp=y
CONFIG_PACKAGE_libubus-lua=y
CONFIG_PACKAGE_libuci-lua=y
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=m
CONFIG_PACKAGE_nano=y
CONFIG_PACKAGE_node=m
CONFIG_PACKAGE_node-alljoyn=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-bower=m
CONFIG_PACKAGE_node-browserify=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-express=m
CONFIG_PACKAGE_node-firmata=m
CONFIG_PACKAGE_node-forever=m
CONFIG_PACKAGE_node-fuse-bindings=m
CONFIG_PACKAGE_node-hashmap=m
CONFIG_PACKAGE_node-hashtable=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-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-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-lambda=m
CONFIG_PACKAGE_node-node-red=m
CONFIG_PACKAGE_node-node-red-contrib-gpio=m
CONFIG_PACKAGE_node-node-red-node-arduino=m
CONFIG_PACKAGE_node-node-static=m
CONFIG_PACKAGE_node-npm=m
CONFIG_PACKAGE_node-nsp=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-uglify-js=m
CONFIG_PACKAGE_node-usb=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-openssl=y
CONFIG_PACKAGE_python-paho-mqtt=y
CONFIG_PACKAGE_python-pyserial=y
CONFIG_PACKAGE_python-xml=y
CONFIG_PACKAGE_reset-serial=y
CONFIG_PACKAGE_rng-tools=y
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_shellinabox=m
CONFIG_PACKAGE_spacebrew=y
CONFIG_PACKAGE_swap-utils=y
CONFIG_PACKAGE_temboo=y
CONFIG_PACKAGE_terminfo=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="LEDE"
CONFIG_VERSION_HWREV="1.0"
CONFIG_VERSION_MANUFACTURER="Arduino"
CONFIG_VERSION_MANUFACTURER_URL=""
CONFIG_VERSION_NICK=""
CONFIG_VERSION_NUMBER=""
CONFIG_VERSION_PRODUCT="Arduino Yun"
CONFIG_VERSION_REPO="http://downloads.lede-project.org/snapshots"
CONFIG_VERSION_SUPPORT_URL=""
CONFIG_uhttpd_lua=y
lede-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
In the original rng-tools has a problem. Should match the init script of the LLC version. Should be started before the Yun original startup script "S49generate_new_gpg_key". 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. LEDE-MIPS24Kc+PCI+FPU_EMU.patch
- 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
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
basic tools setup : opkg
# edit /etc/opkg.conf for extroot
opkg update
opkg list-upgradable
opkg install ca-certificates
opkg install unzip
opkg install screen
opkg install coreutils-ls coreutils-stty
opkg install dropbearconvert
opkg install e2fsprogs fdisk dosfstools
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
opkg install python-idna
opkg install python-urllib3
opkg install chardet
# 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
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
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.
- If the prompt is out && if the OS can operable.
- Enabling the network.
ifconfig IF IP route add default gw somewhere
- Edit /etc/resolv.conf
- Bring the official sysupgrade image via SD card.
mkdir /mnt/sda1 mount -t vfat /dev/sda1 /mnt/sda1
- Enabling the network.
- If you can operate the u-boot via YunSerialTerminal.
TO DO
- uboot-linino
- Once the bootloader rewrite fails, I am afraid that completely become brick...
- extroot
- https://wiki.openwrt.org/doc/howto/extroot
- A partitioned and formatted media that was created in this operation,
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
- If you want to restore, restart press the eject the SD card and poweroff 'YUN RST'. Modify the then /etc/config/fstab.
config global 'automount' option from_fstab '1' option anon_mount '1'
- /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.
- Since the strange message came out, modified distfeeds.conf, It is correct to modify opkg.conf.
- 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).
- (extroot environment)
- 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}')
- LEDE Project
- 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!!!
- How can I reduce kernel size?
- 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.