├── .gitmodules ├── .travis.yml ├── COPYRIGHT ├── LICENSE-APACHE ├── LICENSE-MIT ├── Makefile ├── README.md ├── config.mk ├── feeds.conf ├── files ├── etc │ ├── banner │ ├── config │ │ ├── dhcp │ │ ├── dropbear │ │ ├── firewall │ │ ├── network │ │ ├── system │ │ └── wireless │ ├── init.d │ │ └── telnet │ ├── passwd │ └── uci-defaults │ │ └── 50-tessel-hostname └── lib │ └── preinit │ ├── 10_indicate_failsafe │ ├── 30_failsafe_wait │ ├── 40_run_failsafe_hook │ └── 99_10_failsafe_login ├── package ├── node │ └── node │ │ ├── Makefile │ │ └── patches │ │ ├── 001-hardfloat.patch │ │ ├── 004-uclibc-no-execinfo.patch │ │ └── 011-gyp-force-link-command-to-use-CXX.patch └── tessel │ ├── hotplug │ ├── Makefile │ └── files │ │ ├── 10-usb_ble_autoload │ │ ├── ble-boot-start │ │ └── fstab │ ├── tessel-app │ ├── Makefile │ └── files │ │ └── tessel-app.init │ ├── tessel-mdns │ ├── Makefile │ └── files │ │ └── tessel-mdns.init │ ├── tools │ ├── Makefile │ └── files │ │ ├── spid.init │ │ └── usbexecd.init │ └── uboot-mt7620 │ └── Makefile └── target ├── v2 └── config.mk └── vm └── config.mk /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "openwrt"] 2 | path = openwrt 3 | url = https://github.com/tessel/openwrt.git 4 | [submodule "upstream-packages"] 5 | path = upstream-packages 6 | url = https://github.com/kevinmehall/packages.git 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: python 3 | 4 | addons: 5 | apt: 6 | packages: 7 | - coreutils 8 | - rsync 9 | 10 | cache: 11 | directories: 12 | - "$HOME/gcloud/" 13 | 14 | env: 15 | - PATH=$PATH:$HOME/gcloud/google-cloud-sdk/bin 16 | 17 | git: 18 | submodules: false 19 | 20 | before_install: 21 | - if [ ! -d $HOME/gcloud/google-cloud-sdk ]; then mkdir -p $HOME/gcloud && wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz 22 | --directory-prefix=$HOME/gcloud && cd $HOME/gcloud && tar xzf google-cloud-sdk.tar.gz 23 | && printf '\ny\n\ny\ny\n' | ./google-cloud-sdk/install.sh && cd $TRAVIS_BUILD_DIR; 24 | fi 25 | - ssh-keygen -q -f ~/.ssh/google_compute_engine -N "" 26 | - gcloud auth activate-service-account --key-file <(echo "$SERVICE_ACCOUNT" | base64 --decode) 27 | - gcloud config set project technical-tusk 28 | 29 | install: 30 | - yes | gcloud compute instances delete travis-instance --zone us-central1-b || true 31 | - gcloud compute instances create travis-instance --zone us-central1-b --image ubuntu-14-04 --machine-type n1-highcpu-32 --boot-disk-size 64 --scopes compute-rw 32 | - | 33 | while [ 1 ]; do 34 | gcloud compute ssh travis-instance --zone us-central1-b --command 'exit 0' -- -o ConnectTimeout=10 > /dev/null 2>&1 && break 35 | sleep 1 36 | done 37 | - gcloud compute ssh travis-instance --zone us-central1-b --command 'at now +60 minute -f <(echo "yes | gcloud compute instances delete travis-instance --zone us-central1-b")' 38 | 39 | script: 40 | - | 41 | rsync -avz -e "$(gcloud compute ssh --zone us-central1-b travis-instance --dry-run | sed s/'[^ ]*$'//)" . "$(gcloud compute ssh --zone us-central1-b travis-instance --dry-run | awk 'END {print $NF}'):~/openwrt-tessel" 42 | - | 43 | gcloud compute ssh travis-instance --zone us-central1-b --command ' 44 | set -e 45 | set -x 46 | 47 | sudo mkdir /tmp/ramdisk 48 | sudo chmod 777 /tmp/ramdisk 49 | sudo mount -t tmpfs -o size=14G tmpfs /tmp/ramdisk/ 50 | 51 | sudo apt-get update -qq 52 | sudo apt-get install -y software-properties-common 53 | sudo apt-add-repository -y ppa:terry.guo/gcc-arm-embedded 54 | sudo apt-get update -qq 55 | sudo apt-get install -y build-essential git-core g++ subversion libncurses-dev libssl-dev unzip gettext gcc-arm-none-eabi 56 | cp -rf ~/openwrt-tessel /tmp/ramdisk/openwrt-tessel 57 | cd /tmp/ramdisk/openwrt-tessel 58 | git submodule update --init --recursive 59 | make -j64 || make -j64 || make -j64 || make -j64 || make -j64 V=s 60 | ' 61 | 62 | #after_script: 63 | #- yes | gcloud compute instances delete travis-instance --zone us-central1-b || true 64 | -------------------------------------------------------------------------------- /COPYRIGHT: -------------------------------------------------------------------------------- 1 | Copyright 2015 Technical Machine, Inc. 2 | 3 | Licensed under the Apache License, Version 2.0 4 | or the MIT 6 | license , 7 | at your option. Files in the project may not be copied, 8 | modified, or distributed except according to those terms. 9 | 10 | This notice only applies to the scripts and package definitions 11 | in this repository. OpenWrt and its packages are subject to 12 | their own license terms. 13 | -------------------------------------------------------------------------------- /LICENSE-APACHE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Technical Machine, Inc 2 | 3 | Permission is hereby granted, free of charge, to any 4 | person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the 6 | Software without restriction, including without 7 | limitation the rights to use, copy, modify, merge, 8 | publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software 10 | is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice 14 | shall be included in all copies or substantial portions 15 | of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 18 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 19 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | default: world 2 | 3 | OPENWRT_DIR := openwrt 4 | 5 | include config.mk 6 | include target/$(TARGET)/config.mk 7 | 8 | OPENWRT_MAKE := +$(MAKE) -C $(OPENWRT_DIR) 9 | 10 | print-%: ; $(info $* = $($*)) 11 | 12 | MK = config.mk target/$(TARGET)/config.mk 13 | 14 | openwrt/.config: $(MK) openwrt openwrt/feeds/tessel.index openwrt/feeds.conf 15 | +cd openwrt; ./scripts/feeds install $(PACKAGES) 16 | +make --no-print-directory -s print-config > openwrt/.config 17 | $(OPENWRT_MAKE) defconfig 18 | 19 | print-config: 20 | # Include CONFIG_* vars from included makefiles in OpenWRT configuration 21 | $(foreach V, $(filter CONFIG_%, $(.VARIABLES)),$(info $V=$($V))) 22 | 23 | # Enable packages in OpenWRT configuration 24 | $(foreach P, $(PACKAGES),$(info CONFIG_PACKAGE_$(P)=y)) 25 | 26 | .PHONY: print-config 27 | 28 | openwrt/feeds.conf: feeds.conf $(MK) 29 | cp feeds.conf openwrt/feeds.conf 30 | 31 | openwrt/feeds/tessel.index: openwrt/feeds.conf 32 | +cd openwrt; ./scripts/feeds update -a 33 | 34 | openwrt/files: 35 | ln -s ../files openwrt/files 36 | 37 | download: openwrt/.config openwrt/feeds.conf 38 | $(OPENWRT_MAKE) download 39 | 40 | toolchain: openwrt/.config 41 | $(OPENWRT_MAKE) toolchain 42 | 43 | world: openwrt/.config openwrt/files openwrt/feeds.conf 44 | git rev-parse HEAD > openwrt/files/etc/tessel-version 45 | $(OPENWRT_MAKE) world PROFILE=$(PROFILE) 46 | 47 | clean: 48 | $(OPENWRT_MAKE) clean 49 | rm -f openwrt/feeds.conf openwrt/.config 50 | 51 | update: 52 | git submodule update 53 | rm -f openwrt/feeds.conf openwrt/.config 54 | 55 | .PHONY: download toolchain world clean update 56 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OpenWrt 2 | 3 | [![Code of Conduct](https://img.shields.io/badge/%E2%9D%A4-code%20of%20conduct-blue.svg?style=flat)](https://github.com/tessel/project/blob/master/CONDUCT.md) 4 | 5 | This repository contains build scripts and packages for the OpenWrt system on Tessel 2. It overlays 6 | a lightly-modified OpenWrt tree to build a Tessel-customized OpenWrt, replacing the use of 7 | `menuconfig` with a version-controlled configuration from this repository. 8 | 9 | ### Building 10 | 11 | Building the toolchain and all system packages requires a fast Linux system and several GB of disk 12 | space. 13 | 14 | ```shell-script 15 | git clone --recursive https://github.com/tessel/openwrt-tessel.git 16 | cd openwrt-tessel 17 | make -j50 18 | ``` 19 | 20 | The resulting sysupgrade image is 21 | `openwrt/bin/ramips/openwrt-ramips-mt7620-tessel-squashfs-sysupgrade.bin`. 22 | 23 | ### Setup Ubuntu 24 | 25 | In general we suggest to prepare a build-server with the following command: 26 | ```shell-script 27 | sudo apt-get install make gcc g++ subversion unzip libncurses5-dev libncursesw5-dev ncurses-doc zlib1g-dev libssl-dev gettext gawk --yes 28 | ``` 29 | 30 | ### Related OpenWrt documentation 31 | 32 | * [Creating packages](http://wiki.openwrt.org/doc/devel/packages) 33 | * [Working with patches](http://wiki.openwrt.org/doc/devel/patches) 34 | -------------------------------------------------------------------------------- /config.mk: -------------------------------------------------------------------------------- 1 | TARGET ?= v2 2 | 3 | # USB 4 | PACKAGES += kmod-usb-serial 5 | PACKAGES += kmod-usb-serial-ch341 6 | PACKAGES += kmod-usb-serial-ftdi 7 | PACKAGES += kmod-usb-serial-pl2303 8 | PACKAGES += kmod-usb-serial-option 9 | PACKAGES += kmod-usb-serial-wwan 10 | PACKAGES += kmod-usb-acm 11 | PACKAGES += kmod-usb-hid 12 | PACKAGES += libusb-1.0 13 | PACKAGES += usbutils 14 | PACKAGES += udev 15 | 16 | # Storage 17 | PACKAGES += kmod-usb-storage 18 | PACKAGES += kmod-usb-storage-extras 19 | PACKAGES += kmod-fs-vfat 20 | PACKAGES += kmod-nls-cp437 21 | PACKAGES += kmod-nls-utf8 22 | PACKAGES += kmod-nls-iso8859-1 23 | PACKAGES += block-mount 24 | 25 | # Video (Webcam) 26 | PACKAGES += kmod-video-core 27 | PACKAGES += kmod-video-uvc 28 | PACKAGES += v4l-utils 29 | PACKAGES += libv4l 30 | PACKAGES += libjpeg 31 | 32 | # Bluetooth 33 | PACKAGES += kmod-bluetooth 34 | PACKAGES += bluez-libs 35 | PACKAGES += bluez-utils 36 | 37 | # Cellular 38 | PACKAGES += comgt 39 | PACKAGES += usb-modeswitch 40 | 41 | # Utilities 42 | PACKAGES += nano 43 | PACKAGES += dmesg 44 | PACKAGES += rpcd 45 | PACKAGES += rpcd-mod-iwinfo 46 | PACKAGES += wget 47 | PACKAGES += ca-certificates 48 | 49 | # Sound 50 | PACKAGES += kmod-usb-audio 51 | PACKAGES += kmod-sound-core 52 | PACKAGES += kmod-sound-i8x0 53 | PACKAGES += alsa-lib 54 | PACKAGES += alsa-utils 55 | PACKAGES += libbz2 56 | PACKAGES += mjpg-streamer 57 | PACKAGES += madplay 58 | 59 | # JavaScript 60 | PACKAGES += node 61 | PACKAGES += tessel-app 62 | 63 | # Python 64 | PACKAGES += python 65 | 66 | # MDNS 67 | PACKAGES += tessel-mdns 68 | PACKAGES += mdns-utils 69 | 70 | # Hotplug 71 | PACKAGES += tessel-hotplug 72 | 73 | CONFIG_SDK=y 74 | 75 | CONFIG_IMAGEOPT=y 76 | CONFIG_VERSIONOPT=y 77 | CONFIG_VERSION_REPO="http://downloads.openwrt.org/chaos_calmer/15.05-rc2/%S/packages" 78 | CONFIG_VERSION_MANUFACTURER="Tessel" 79 | CONFIG_VERSION_FILENAMES=n 80 | -------------------------------------------------------------------------------- /feeds.conf: -------------------------------------------------------------------------------- 1 | src-link tessel ../../package/ 2 | src-link packages ../../upstream-packages/ 3 | -------------------------------------------------------------------------------- /files/etc/banner: -------------------------------------------------------------------------------- 1 | Tessel 2 / Built on OpenWrt 2 | -------------------------------------------------------------------------------- /files/etc/config/dhcp: -------------------------------------------------------------------------------- 1 | config 'dnsmasq' 2 | option domainneeded 1 3 | option boguspriv 1 4 | option filterwin2k 0 5 | option localise_queries 1 6 | option rebind_protection 1 7 | option rebind_localhost 0 8 | option local '/lan/' 9 | option domain 'lan' 10 | option expandhosts 1 11 | option nonegcache 0 12 | option authoritative 1 13 | option readethers 1 14 | option leasefile '/tmp/dhcp.leases' 15 | option resolvfile '/tmp/resolv.conf.auto' 16 | 17 | config 'dhcp' 'lan' 18 | option 'interface' 'lan' 19 | option 'start' '100' 20 | option 'limit' '150' 21 | option 'leasetime' '12h' 22 | option 'networkid' 'wlan0' 23 | option ra server 24 | option dhcpv6 server 25 | -------------------------------------------------------------------------------- /files/etc/config/dropbear: -------------------------------------------------------------------------------- 1 | config dropbear 2 | option PasswordAuth 'off' 3 | option RootPasswordAuth 'off' 4 | option Port '22' 5 | 6 | -------------------------------------------------------------------------------- /files/etc/config/firewall: -------------------------------------------------------------------------------- 1 | config defaults 2 | option syn_flood 1 3 | option input ACCEPT 4 | option output ACCEPT 5 | option forward REJECT 6 | 7 | config zone 8 | option name lan 9 | list network 'ethernet' 10 | list network 'wifi' 11 | list network 'lan' 12 | option input ACCEPT 13 | option output ACCEPT 14 | option forward ACCEPT 15 | -------------------------------------------------------------------------------- /files/etc/config/network: -------------------------------------------------------------------------------- 1 | config interface 'loopback' 2 | option ifname 'lo' 3 | option proto 'static' 4 | option ipaddr '127.0.0.1' 5 | option netmask '255.0.0.0' 6 | 7 | config interface 'wifi' 8 | option proto 'dhcp' 9 | 10 | config interface 'ethernet' 11 | option ifname 'eth0' 12 | option proto 'dhcp' 13 | 14 | config interface 'lan' 15 | option ifname 'wlan0' 16 | option proto 'static' 17 | option ipaddr '192.168.1.101' 18 | option netmask '255.255.255.0' 19 | 20 | config switch 'mt7620' 21 | option enable_vlan 0 22 | -------------------------------------------------------------------------------- /files/etc/config/system: -------------------------------------------------------------------------------- 1 | config system 2 | option timezone 'UTC' 3 | 4 | config timeserver 'ntp' 5 | list server '0.openwrt.pool.ntp.org' 6 | list server '1.openwrt.pool.ntp.org' 7 | list server '2.openwrt.pool.ntp.org' 8 | list server '3.openwrt.pool.ntp.org' 9 | option enabled '1' 10 | option enable_server '0' 11 | 12 | config led 'led_wifi_led' 13 | option name 'wifi' 14 | option sysfs 'tessel:amber:wlan' 15 | option dev 'wlan0' 16 | option trigger 'netdev' 17 | option mode 'link tx rx' 18 | 19 | config led 'led_eth' 20 | option name 'ETH' 21 | option sysfs 'tessel:green:eth_data' 22 | option dev 'eth0' 23 | option trigger 'netdev' 24 | option mode 'link tx rx' 25 | -------------------------------------------------------------------------------- /files/etc/config/wireless: -------------------------------------------------------------------------------- 1 | config wifi-device 'radio0' 2 | option type 'mac80211' 3 | option channel '11' 4 | option hwmode '11g' 5 | option path '10180000.wmac' 6 | option htmode 'HT20' 7 | option disabled '0' 8 | 9 | config wifi-iface 10 | option device 'radio0' 11 | option network 'wifi' 12 | option mode 'sta' 13 | option disabled '1' 14 | 15 | config wifi-iface 16 | option device 'radio0' 17 | option network 'lan' 18 | option mode 'ap' 19 | option encryption 'psk2' 20 | option disabled '1' 21 | -------------------------------------------------------------------------------- /files/etc/init.d/telnet: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Telnet disabled 3 | -------------------------------------------------------------------------------- /files/etc/passwd: -------------------------------------------------------------------------------- 1 | root:x:0:0:root:/root:/bin/ash 2 | daemon:*:1:1:daemon:/var:/bin/false 3 | ftp:*:55:55:ftp:/home/ftp:/bin/false 4 | network:*:101:101:network:/var:/bin/false 5 | nobody:*:65534:65534:nobody:/var:/bin/false 6 | tessel:x:1000:1000:tessel:/tmp:/bin/ash 7 | -------------------------------------------------------------------------------- /files/etc/uci-defaults/50-tessel-hostname: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | CUSTOM_HOSTNAME=$(uci get system.@system[0].custom_hostname_set) 4 | 5 | if [ -z $CUSTOM_HOSTNAME ] 6 | then 7 | MACADDR=$(ifconfig eth0 | awk '/HWaddr/ { print $5 }' | tr -d :) 8 | uci batch < 7 | #include 8 | 9 | -#if V8_LIBC_GLIBC || V8_LIBC_BSD || V8_LIBC_UCLIBC || V8_OS_SOLARIS 10 | +#if V8_LIBC_GLIBC || V8_LIBC_BSD || V8_OS_SOLARIS 11 | #define HAVE_EXECINFO_H 1 12 | #endif 13 | 14 | diff --git a/deps/v8/src/compiler/node-matchers.h b/deps/v8/src/compiler/node-matchers.h 15 | index d2bdb8bff5..a7dcce3b66 100644 16 | --- a/deps/v8/src/compiler/node-matchers.h 17 | +++ b/deps/v8/src/compiler/node-matchers.h 18 | @@ -168,7 +168,7 @@ struct FloatMatcher final : public ValueMatcher { 19 | return this->HasValue() && std::isnormal(this->Value()); 20 | } 21 | bool IsInteger() const { 22 | - return this->HasValue() && std::nearbyint(this->Value()) == this->Value(); 23 | + return this->HasValue() && nearbyint(this->Value()) == this->Value(); 24 | } 25 | bool IsPositiveOrNegativePowerOf2() const { 26 | if (!this->HasValue() || (this->Value() == 0.0)) { 27 | diff --git a/src/backtrace_posix.cc b/src/backtrace_posix.cc 28 | index 8fd798757a..8328b59439 100644 29 | --- a/src/backtrace_posix.cc 30 | +++ b/src/backtrace_posix.cc 31 | @@ -4,9 +4,7 @@ 32 | #include 33 | #endif 34 | 35 | -#if defined(__linux__) && !defined(__GLIBC__) || \ 36 | - defined(__UCLIBC__) || \ 37 | - defined(_AIX) 38 | +#if defined(__linux__) && defined(__UCLIBC__) 39 | #define HAVE_EXECINFO_H 0 40 | #else 41 | #define HAVE_EXECINFO_H 1 42 | -------------------------------------------------------------------------------- /package/node/node/patches/011-gyp-force-link-command-to-use-CXX.patch: -------------------------------------------------------------------------------- 1 | diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py 2 | index f7f519b3e6..0fc5be2dd6 100644 3 | --- a/tools/gyp/pylib/gyp/generator/make.py 4 | +++ b/tools/gyp/pylib/gyp/generator/make.py 5 | @@ -201,7 +201,7 @@ quiet_cmd_alink = LIBTOOL-STATIC $@ 6 | cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^) 7 | 8 | quiet_cmd_link = LINK($(TOOLSET)) $@ 9 | -cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS) 10 | +cmd_link = $(CXX.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS) 11 | 12 | quiet_cmd_solink = SOLINK($(TOOLSET)) $@ 13 | cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS) 14 | -------------------------------------------------------------------------------- /package/tessel/hotplug/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=tessel-hotplug 4 | PKG_VERSION:=0.1 5 | PKG_RELEASE=$(PKG_SOURCE_VERSION) 6 | 7 | include $(INCLUDE_DIR)/package.mk 8 | 9 | define Package/tessel-hotplug 10 | CATEGORY:=Tessel 11 | TITLE:=Installs Tessel 2 related hotplug utilities 12 | DEPENDS:=+block-mount 13 | endef 14 | 15 | define Build/Compile 16 | endef 17 | 18 | define Package/tessel-hotplug/install 19 | $(INSTALL_DIR) $(1)/etc/hotplug.d/usb 20 | $(INSTALL_DIR) $(1)/etc/config 21 | $(INSTALL_DIR) $(1)/etc/init.d/ 22 | 23 | $(INSTALL_BIN) ./files/10-usb_ble_autoload $(1)/etc/hotplug.d/usb/10-usb_ble_autoload 24 | $(INSTALL_BIN) ./files/fstab $(1)/etc/config/fstab 25 | $(INSTALL_BIN) ./files/ble-boot-start $(1)/etc/init.d/ble-boot-start 26 | endef 27 | 28 | $(eval $(call BuildPackage,tessel-hotplug)) 29 | -------------------------------------------------------------------------------- /package/tessel/hotplug/files/10-usb_ble_autoload: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | BT_PRODID="a12/1/" 3 | BT_PRODID_HOT=`echo $PRODUCT | cut -c 1-6` 4 | 5 | if [ "$BT_PRODID_HOT" = "$BT_PRODID" ]; then 6 | if [ "$ACTION" = "add" ]; then 7 | logger -t HOTPLUG "Detected hotplugged BLE device. Initializing both interfaces..." 8 | hciconfig hci0 up 9 | hciconfig hci1 up 10 | logger -t HOTPLUG "Done initializing." 11 | fi 12 | fi 13 | -------------------------------------------------------------------------------- /package/tessel/hotplug/files/ble-boot-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | START=65 4 | STOP=65 5 | 6 | boot() { 7 | logger -t BLE "Initializing any BLE devices plugged in at boot..." 8 | hciconfig hci0 up 9 | hciconfig hci1 up 10 | logger -t BLE "Done initializing." 11 | } 12 | -------------------------------------------------------------------------------- /package/tessel/hotplug/files/fstab: -------------------------------------------------------------------------------- 1 | config 'global' 2 | # mount swap devices that don't have their own config section 3 | option anon_swap '0' 4 | # mount block devices that don't have their own config section 5 | option anon_mount '1' 6 | # automatically mount swap devices when they appear 7 | option auto_swap '1' 8 | # automatically mount block devices when they appear 9 | option auto_mount '1' 10 | # wait X seconds before trying to mount root devices on boot 11 | option delay_root '0' 12 | # run e2fsck on device prior to a mount 13 | option check_fs '0' 14 | 15 | 16 | config 'global' 'automount' 17 | option 'anon_mount' '1' 18 | -------------------------------------------------------------------------------- /package/tessel/tessel-app/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=tessel-app 4 | PKG_VERSION:=0.1 5 | PKG_RELEASE=$(PKG_SOURCE_VERSION) 6 | 7 | include $(INCLUDE_DIR)/package.mk 8 | 9 | define Package/tessel-app 10 | CATEGORY:=Tessel 11 | TITLE:=Launch tessel user application 12 | endef 13 | 14 | define Build/Compile 15 | endef 16 | 17 | define Package/tessel-app/conffiles 18 | /app/ 19 | endef 20 | 21 | define Package/tessel-app/install 22 | $(INSTALL_DIR) $(1)/etc/init.d 23 | $(INSTALL_BIN) ./files/tessel-app.init $(1)/etc/init.d/tessel-app 24 | endef 25 | 26 | $(eval $(call BuildPackage,tessel-app)) 27 | -------------------------------------------------------------------------------- /package/tessel/tessel-app/files/tessel-app.init: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | START=99 4 | USE_PROCD=1 5 | start_service() { 6 | procd_open_instance 7 | procd_set_param command /app/start 8 | procd_close_instance 9 | } 10 | -------------------------------------------------------------------------------- /package/tessel/tessel-mdns/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=tessel-mdns 4 | PKG_VERSION:=0.1 5 | PKG_RELEASE=$(PKG_SOURCE_VERSION) 6 | 7 | include $(INCLUDE_DIR)/package.mk 8 | 9 | define Package/tessel-mdns 10 | CATEGORY:=Tessel 11 | TITLE:=Begin advertising Tessel over mDNS 12 | DEPENDS:=+mdns-utils 13 | endef 14 | 15 | define Build/Compile 16 | endef 17 | 18 | define Package/tessel-mdns/install 19 | $(INSTALL_DIR) $(1)/etc/init.d 20 | $(INSTALL_BIN) ./files/tessel-mdns.init $(1)/etc/init.d/tessel-mdns 21 | endef 22 | 23 | $(eval $(call BuildPackage,tessel-mdns)) 24 | -------------------------------------------------------------------------------- /package/tessel/tessel-mdns/files/tessel-mdns.init: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | START=61 4 | USE_PROCD=1 5 | 6 | start_service() { 7 | procd_open_instance 8 | # Advertise a service 9 | # name=hostname 10 | # type=tessel/tcp 11 | # domain=local 12 | # port= 22 13 | procd_set_param command dns-sd -R "$(uci get system.@system[0].hostname)" '_tessel._tcp' 'local' 22 14 | procd_close_instance 15 | } -------------------------------------------------------------------------------- /package/tessel/tools/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=tessel-tools 4 | PKG_VERSION:=0.1 5 | PKG_RELEASE=$(PKG_SOURCE_VERSION) 6 | 7 | PKG_SOURCE_PROTO:=git 8 | PKG_SOURCE_URL:=https://github.com/tessel/t2-firmware.git 9 | PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) 10 | PKG_SOURCE_VERSION:=a22ba2d29e7e891c53fa6a4a26d5825b7d81d631 11 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz 12 | 13 | include $(INCLUDE_DIR)/package.mk 14 | 15 | define Package/tessel-tools 16 | CATEGORY:=Tessel 17 | TITLE:=Tessel coprocessor bridge 18 | endef 19 | 20 | define Build/Compile 21 | $(call Build/Compile/Default,-C soc) 22 | endef 23 | 24 | define Package/tessel-tools/install 25 | $(INSTALL_DIR) $(1)/usr/bin 26 | $(INSTALL_DIR) $(1)/etc/init.d 27 | 28 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/soc/spid $(1)/usr/bin/spid 29 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/soc/spid.sh $(1)/usr/bin/spid-start 30 | $(INSTALL_BIN) ./files/spid.init $(1)/etc/init.d/spid 31 | 32 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/soc/usbexecd $(1)/usr/bin/usbexecd 33 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/soc/usbexecd.sh $(1)/usr/bin/usbexecd-start 34 | $(INSTALL_BIN) ./files/usbexecd.init $(1)/etc/init.d/usbexecd 35 | 36 | $(INSTALL_DIR) $(1)/usr/lib/node 37 | $(INSTALL_DATA) $(PKG_BUILD_DIR)/node/tessel.js $(1)/usr/lib/node/tessel.js 38 | $(INSTALL_DATA) $(PKG_BUILD_DIR)/node/tessel-export.js $(1)/usr/lib/node/tessel-export.js 39 | endef 40 | 41 | $(eval $(call BuildPackage,tessel-tools)) 42 | -------------------------------------------------------------------------------- /package/tessel/tools/files/spid.init: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | START=60 4 | USE_PROCD=1 5 | start_service() { 6 | procd_open_instance 7 | procd_set_param command sh /usr/bin/spid-start 8 | procd_set_param respawn 9 | procd_close_instance 10 | } 11 | -------------------------------------------------------------------------------- /package/tessel/tools/files/usbexecd.init: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | START=60 4 | USE_PROCD=1 5 | start_service() { 6 | procd_open_instance 7 | procd_set_param command sh /usr/bin/usbexecd-start 8 | procd_set_param respawn 9 | procd_close_instance 10 | } 11 | -------------------------------------------------------------------------------- /package/tessel/uboot-mt7620/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2010 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | 8 | include $(TOPDIR)/rules.mk 9 | include $(INCLUDE_DIR)/kernel.mk 10 | 11 | PKG_NAME:=uboot-mt7620 12 | PKG_VERSION:=1.1.3 13 | PKG_RELEASE=$(PKG_SOURCE_VERSION) 14 | 15 | PKG_SOURCE_PROTO:=git 16 | PKG_SOURCE_URL:=https://github.com/tessel/uboot-mt7620.git 17 | PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) 18 | PKG_SOURCE_VERSION:=f53d0ad2b41c18119f7c5be7c75a2a5be3b04e69 19 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz 20 | 21 | include $(INCLUDE_DIR)/package.mk 22 | 23 | define uboot/Default 24 | TITLE:=U-boot for mt7620 25 | CONFIG:= 26 | IMAGE:= 27 | endef 28 | 29 | define uboot/8 30 | TITLE:=U-boot for mt7620 (8M) 31 | endef 32 | 33 | define uboot/16 34 | TITLE:=U-boot for mt7620 (16M) 35 | endef 36 | 37 | UBOOTS:=Default 38 | 39 | define Package/uboot/template 40 | define Package/uboot-mt7620-$(1) 41 | SECTION:=boot 42 | CATEGORY:=Boot Loaders 43 | TITLE:=$(2) 44 | DEPENDS:=@TARGET_ramips 45 | URL:=http://www.denx.de/wiki/U-Boot 46 | endef 47 | endef 48 | 49 | define BuildUbootPackage 50 | $(eval $(uboot/Default)) 51 | $(eval $(uboot/$(1))) 52 | $(call Package/uboot/template,$(1),$(TITLE)) 53 | endef 54 | 55 | 56 | ifdef BUILD_VARIANT 57 | $(eval $(call uboot/$(BUILD_VARIANT))) 58 | UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT)) 59 | UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin) 60 | endif 61 | 62 | define Build/Configure 63 | endef 64 | 65 | define Build/Compile 66 | $(MAKE) -C $(PKG_BUILD_DIR) CROSS_COMPILE=$(TARGET_CROSS) 67 | endef 68 | 69 | define Package/uboot/install/template 70 | define Package/uboot-mt7620-$(1)/install 71 | $(INSTALL_DIR) $$(1) 72 | $(CP) $(PKG_BUILD_DIR)/uboot.bin $(BIN_DIR)/$(2) 73 | endef 74 | endef 75 | 76 | $(foreach u,$(UBOOTS), \ 77 | $(eval $(call Package/uboot/install/template,$(u),openwrt-$(BOARD)-$(SUBTARGET)-$(u)-u-boot.bin)) \ 78 | ) 79 | 80 | $(foreach u,$(UBOOTS), \ 81 | $(eval $(call BuildUbootPackage,$(u))) \ 82 | $(eval $(call BuildPackage,uboot-mt7620-$(u))) \ 83 | ) 84 | -------------------------------------------------------------------------------- /target/v2/config.mk: -------------------------------------------------------------------------------- 1 | PROFILE=Tessel 2 | 3 | CONFIG_TARGET_ramips=y 4 | CONFIG_TARGET_ramips_mt7620=y 5 | CONFIG_TARGET_ramips_mt7620_Default=y 6 | 7 | CONFIG_PACKAGE_kmod-rt2800-pci=n 8 | CONFIG_PACKAGE_kmod-rt2x00-pci=n 9 | 10 | PACKAGES+=kmod-spi-dev 11 | PACKAGES+=tessel-tools 12 | PACKAGES+=uboot-mt7620-Default 13 | -------------------------------------------------------------------------------- /target/vm/config.mk: -------------------------------------------------------------------------------- 1 | CONFIG_TARGET_x86=y 2 | CONFIG_TARGET_x86_generic=y 3 | CONFIG_TARGET_x86_generic_Generic=y 4 | CONFIG_TARGET_ROOTFS_EXT4FS=y 5 | CONFIG_VDI_IMAGES=y 6 | 7 | PACKAGES += kmod-usb-ohci-pci 8 | --------------------------------------------------------------------------------