Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to LEDE 17.01.1 and Node 6.10.3 #72

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "openwrt"]
path = openwrt
url = https://github.com/tessel/openwrt.git
url = https://github.com/tessel/lede.git
[submodule "upstream-packages"]
path = upstream-packages
url = https://github.com/kevinmehall/packages.git
url = https://github.com/openwrt/packages.git
3 changes: 2 additions & 1 deletion config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ CONFIG_SDK=y

CONFIG_IMAGEOPT=y
CONFIG_VERSIONOPT=y
CONFIG_VERSION_REPO="http://downloads.openwrt.org/chaos_calmer/15.05-rc2/%S/packages"
CONFIG_VERSION_REPO="http://downloads.lede-project.org/releases/17.01.1"
CONFIG_VERSION_MANUFACTURER="Tessel"
CONFIG_VERSION_FILENAMES=n
CONFIG_VERSION_CODE_FILENAMES=n
2 changes: 1 addition & 1 deletion files/etc/banner
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Tessel 2 / Built on OpenWrt
Tessel 2 / Built on LEDE
2 changes: 1 addition & 1 deletion openwrt
116 changes: 81 additions & 35 deletions package/node/node/Makefile
Original file line number Diff line number Diff line change
@@ -1,69 +1,115 @@
#
# Copyright (C) 2006-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=node
PKG_VERSION:=v4.5.0
PKG_VERSION:=v6.10.3
PKG_RELEASE:=1

PKG_SOURCE:=node-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://nodejs.org/dist/${PKG_VERSION}/
PKG_SHA256SUM:=74ced83b8d890d90e2a8b0d54b0d0e9b5e01d6fd6148cec6e9911ff6eaf0cf21
PKG_SOURCE:=node-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://nodejs.org/dist/${PKG_VERSION}
PKG_MD5SUM:=e82ede32b31a6c5f98659eb1f7b8d8a6

HOST_BUILD_DEPENDS:=python/host
PKG_BUILD_DEPENDS:=python/host
PKG_INSTALL:=1
PKG_USE_MIPS16:=0

HOST_BUILD_PARALLEL:=1
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=

PKG_MAINTAINER:=John Crispin <[email protected]>
PKG_LICENSE:=

include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk

define Package/node
DEPENDS:=+libpthread +librt +libstdcpp +libopenssl +zlib
SUBMENU:=Node
SECTION:=lang
CATEGORY:=Languages
TITLE:=Node is a JavaScript runtime built on Chrome's V8 JavaScript engine
URL:=https://nodejs.org/
SUBMENU:=Node.js
TITLE:=Node.js is a platform built on Chrome's JavaScript runtime
URL:=http://nodejs.org/
DEPENDS:=+libpthread +librt +libstdcpp +libopenssl +zlib
endef

define Package/node/description
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses
an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js'
package ecosystem, npm, is the largest ecosystem of open source libraries in the world.
endef

define Package/npm
DEPENDS:=+node
SUBMENU:=Node.js
define Package/node-npm
SECTION:=lang
CATEGORY:=Languages
TITLE:=Node/io.js Package Manager
URL:=https://npmjs.org/
SUBMENU:=Node.js
TITLE:=NPM stands for Node Package Manager
URL:=http://npmjs.com/
DEPENDS:=+node
endef

ifeq ($(ARCH),i386)
DEST_CPU=ia32
else
DEST_CPU=$(ARCH)
endif
define Package/node-npm/description
NPM is the package manager for NodeJS
endef

CPU:=$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))))

MAKE_VARS += \
DESTCPU=$(CPU)

CONFIGURE_ARGS = --dest-cpu=$(DEST_CPU) --dest-os=linux \
--shared-openssl --shared-openssl-includes="$(STAGING_DIR)/usr/include" --shared-openssl-libpath="$(STAGING_DIR)/usr/lib" \
--shared-zlib --shared-zlib-includes="$(STAGING_DIR)/usr/include" --shared-zlib-libpath="$(STAGING_DIR)/usr/lib" \
--v8-options="--max_old_space_size=20 --initial_old_space_size=4 --max_semi_space_size=2 --max_executable_size=5" \
--without-snapshot
CONFIGURE_ARGS= \
--dest-cpu=$(CPU) \
--dest-os=linux \
--without-snapshot \
--shared-zlib \
--shared-openssl \
--prefix=/usr \
--with-intl=none
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


ifeq ($(ARCH),mipsel)
CONFIGURE_ARGS += \
--with-mips-arch-variant=r2 --with-mips-fpu-mode=fp32 --with-mips-float-abi=soft
ifneq ($(findstring arm,$(ARCH)),)
CONFIGURE_ARGS+= \
$(if $(CONFIG_SOFT_FLOAT),--with-arm-float-abi=soft,--with-arm-float-abi=hard)
endif

ifneq ($(findstring mips,$(ARCH)),)
CONFIGURE_ARGS+= \
$(if $(CONFIG_SOFT_FLOAT),--with-mips-float-abi=soft,--with-mips-float-abi=hard)
endif

HOST_CONFIGURE_VARS:=

HOST_CONFIGURE_ARGS:= \
--dest-os=linux \
--without-snapshot \
--with-intl=none \
--prefix=$(STAGING_DIR_HOSTPKG)

HOST_CONFIGURE_CMD:=python ./configure

define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
endef

define Package/node/install
mkdir -p $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/Release/node $(1)/usr/bin/node
$(CP) $(PKG_INSTALL_DIR)/usr/bin/node $(1)/usr/bin/
endef

define Package/npm/install
mkdir -p $(1)/usr/lib/node_modules
$(CP) $(PKG_BUILD_DIR)/deps/npm $(1)/usr/lib/node_modules
ln -sf /usr/lib/node_modules/npm/bin/npm-cli.js $(1)/usr/bin/npm
define Package/node-npm/install
mkdir -p $(1)/usr/bin $(1)/usr/lib/node_modules/npm/{bin,lib,node_modules}
$(CP) $(PKG_INSTALL_DIR)/usr/bin/npm $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/{package.json,LICENSE,cli.js} $(1)/usr/lib/node_modules/npm
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/bin/npm-cli.js $(1)/usr/lib/node_modules/npm/bin
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/lib/* $(1)/usr/lib/node_modules/npm/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/node_modules/* $(1)/usr/lib/node_modules/npm/node_modules/
endef

$(eval $(call HostBuild))
$(eval $(call BuildPackage,node))
$(eval $(call BuildPackage,npm))

$(eval $(call BuildPackage,node-npm))
12 changes: 12 additions & 0 deletions package/node/node/patches/001-hardfloat.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/deps/v8/src/base/cpu.cc b/deps/v8/src/base/cpu.cc
index 4f58720..1f3071e 100644
--- a/deps/v8/src/base/cpu.cc
+++ b/deps/v8/src/base/cpu.cc
@@ -143,6 +143,7 @@ int __detect_fp64_mode(void) {
".set push\n\t"
".set noreorder\n\t"
".set oddspreg\n\t"
+ ".set hardfloat\n\t"
"lui $t0, 0x3FF0\n\t"
"ldc1 $f0, %0\n\t"
"mtc1 $t0, $f1\n\t"
10 changes: 10 additions & 0 deletions package/node/node/patches/002-addr_info.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- a/deps/uv/src/unix/getaddrinfo.c
+++ b/deps/uv/src/unix/getaddrinfo.c
@@ -99,6 +99,7 @@
int err;

req = container_of(w, uv_getaddrinfo_t, work_req);
+ req->hints->ai_flags &= ~AI_V4MAPPED;
err = getaddrinfo(req->hostname, req->service, req->hints, &req->addrinfo);
req->retcode = uv__getaddrinfo_translate_error(err);
}
12 changes: 12 additions & 0 deletions package/node/node/patches/003-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- a/lib/module.js 2017-05-02 18:34:23.000000000 +0200
+++ b/lib/module.js 2017-05-05 12:07:20.217903258 +0200
@@ -625,7 +625,8 @@
} else {
prefixDir = path.resolve(process.execPath, '..', '..');
}
- var paths = [path.resolve(prefixDir, 'lib', 'node')];
+ var paths = [path.resolve(prefixDir, 'lib', 'node'),
+ path.resolve(process.execPath, '..', '..', 'lib', 'node_modules')];

if (homeDir) {
paths.unshift(path.resolve(homeDir, '.node_libraries'));
36 changes: 0 additions & 36 deletions package/node/node/patches/010-uclib_execinfo.patch

This file was deleted.

4 changes: 1 addition & 3 deletions package/tessel/tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/tessel/t2-firmware.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=fe9165c7137a8c0fe5809c282e39f8f267ec92e1
PKG_SOURCE_VERSION:=8037907f24d3e0c3f93f46f70fe384395ce4ee7f
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz

include $(INCLUDE_DIR)/package.mk
Expand All @@ -26,11 +26,9 @@ define Package/tessel-tools/install
$(INSTALL_DIR) $(1)/etc/init.d

$(INSTALL_BIN) $(PKG_BUILD_DIR)/soc/spid $(1)/usr/bin/spid
$(INSTALL_BIN) $(PKG_BUILD_DIR)/soc/spid.sh $(1)/usr/bin/spid-start
$(INSTALL_BIN) ./files/spid.init $(1)/etc/init.d/spid

$(INSTALL_BIN) $(PKG_BUILD_DIR)/soc/usbexecd $(1)/usr/bin/usbexecd
$(INSTALL_BIN) $(PKG_BUILD_DIR)/soc/usbexecd.sh $(1)/usr/bin/usbexecd-start
$(INSTALL_BIN) ./files/usbexecd.init $(1)/etc/init.d/usbexecd

$(INSTALL_DIR) $(1)/usr/lib/node
Expand Down
5 changes: 4 additions & 1 deletion package/tessel/tools/files/spid.init
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
START=60
USE_PROCD=1
start_service() {
mkdir -p /var/run/tessel
ln -sf /var/run/tessel/1 /var/run/tessel/port_a
ln -sf /var/run/tessel/2 /var/run/tessel/port_b
procd_open_instance
procd_set_param command sh /usr/bin/spid-start
procd_set_param command spid /dev/spidev1.0 2 1 /var/run/tessel
procd_set_param respawn
procd_close_instance
}
5 changes: 3 additions & 2 deletions package/tessel/tools/files/usbexecd.init
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/bin/sh /etc/rc.common

START=60
START=61
USE_PROCD=1
start_service() {
ln -sf /var/run/tessel/0 /var/run/tessel/usb
procd_open_instance
procd_set_param command sh /usr/bin/usbexecd-start
procd_set_param command /usr/bin/usbexecd /var/run/tessel/usb
procd_set_param respawn
procd_close_instance
}
5 changes: 3 additions & 2 deletions target/v2/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ PROFILE=Tessel

CONFIG_TARGET_ramips=y
CONFIG_TARGET_ramips_mt7620=y
CONFIG_TARGET_ramips_mt7620_Default=y
CONFIG_TARGET_PROFILE="DEVICE_tessel"
CONFIG_TARGET_ramips_mt7620_DEVICE_tessel=y

CONFIG_PACKAGE_kmod-rt2800-pci=n
CONFIG_PACKAGE_kmod-rt2x00-pci=n

PACKAGES+=kmod-spi-dev
PACKAGES+=tessel-tools
PACKAGES+=uboot-mt7620-Default
#PACKAGES+=uboot-mt7620-Default
2 changes: 1 addition & 1 deletion upstream-packages