From 84e3dcf57bb37ae72348fb1400be17141b3bf018 Mon Sep 17 00:00:00 2001 From: The-BB Date: Sun, 12 Feb 2017 02:38:28 +0300 Subject: [PATCH] Entware-ng sync, 2017.02 --- .github/CONTRIBUTING.md | 4 + .github/ISSUE_TEMPLATE.md | 20 ++ .github/PULL_REQUEST_TEMPLATE.md | 14 + .gitignore | 1 + LastSync.txt | 27 +- Makefile | 15 +- README | 14 +- changes.eng.patch | 499 +++++++++++++++++++++++++++++++ feeds.conf.default | 20 +- rules.mk | 76 +++-- 10 files changed, 625 insertions(+), 65 deletions(-) create mode 100644 .github/CONTRIBUTING.md create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 changes.eng.patch diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 00000000..6fdacf92 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,4 @@ +Thank you for contributing! +========================================= + +Please follow issue/PR template. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..55b735ed --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,20 @@ +### Package: + +For existing package: + +- expected behavior: ... +- actual behavior: ... + + +For new package to be added: + +- make sure there's no similar package already added, +- describe killer features of new package, +- make sure it's open source and not abandoned (at least for last 5 years or so), +- please, use native compilation for additional PHP, Perl, Ruby, Python modules for non-MIPS platforms. + + +### Platform: + +- please, tell us what feed and\or devices are you using. +- be ready to check issue-related changes or it will be closed after 30 days with "no response" status. \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..ffb4ddd5 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,14 @@ +Please double check that your PR is for Buildroot or existing packages in /package folder only. + +Please, add new packages to appropriate feeds: +- [rtndev](https://github.com/Entware-ng/rtndev) for packages which was never existed in OpenWrt before. +- [go](https://github.com/Entware-ng/entware-go) for packages, written in Golang. +- [oldports](https://github.com/Entware-ng/entware-oldpackages-ports) for packages which is abandoned form OpenWrt for some reason. +- [packages](https://github.com/Entware-ng/entware-packages), [routing](https://github.com/Entware-ng/entware-routing), [telephony](https://github.com/Entware-ng/entware-telephony) for packages, maintained by OpenWrt team. + +Thanks for your contribution +Please remove this text (before ---) and fill the following template +------------------------------- + +Compile tested: (put here arch, model, version) +Run tested: (put here arch, model, version, tests done) diff --git a/.gitignore b/.gitignore index f6520b97..1b8ac627 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ /logs /feeds /files +/overlay /package/feeds /package/openwrt-packages key-build* diff --git a/LastSync.txt b/LastSync.txt index 1d8b2ef6..0ed8b7f8 100644 --- a/LastSync.txt +++ b/LastSync.txt @@ -1,25 +1,14 @@ -Sync with LEDE +commit 2711b94932a01ecd00ee9cfba7dcbb1cf4fe2517 +Author: Alexander Couzens +Date: Sat Jan 28 17:23:16 2017 +0100 -commit 7c47f43fe650309e6a2383c99273dc1bde367bc1 -Author: Hauke Mehrtens -Date: Sun Dec 4 19:03:48 2016 +0100 + lantiq: fix unaligned access in xrx200_poll_rx() - lantiq: falcon: remove bootargs-append + Signed-off-by: Alexander Couzens -trunk/packages -commit fb237477fd1e7801e4877f9fe1ea7bc1ec16dd99 -Author: Felix Fietkau -Date: Thu Dec 15 13:02:31 2016 +0100 - - mt76: update to the latest version, fixes a build error on some platforms - - Signed-off-by: Felix Fietkau - -Entware-ng - -commit 20313a6c97d344bce19552320fdf7f82fb5c7eac +commit 30e2ec73c0c8a84988af1013f49e903806d513a8 Author: Alexander Ryzhov -Date: Thu Dec 22 15:02:34 2016 +0300 +Date: Sat Feb 11 19:25:28 2017 +0300 - mipsel toolchain: uClibc-ng: bump to 1.0.17 + dnsmasq: PKG_HASH typo diff --git a/Makefile b/Makefile index f5c96b9a..241e988b 100644 --- a/Makefile +++ b/Makefile @@ -39,11 +39,12 @@ else include tools/Makefile include toolchain/Makefile -$(toolchain/stamp-install): $(tools/stamp-install) -$(target/stamp-compile): $(toolchain/stamp-install) $(tools/stamp-install) $(BUILD_DIR)/.prepared +$(toolchain/stamp-compile): $(tools/stamp-compile) +$(target/stamp-compile): $(toolchain/stamp-compile) $(tools/stamp-compile) $(BUILD_DIR)/.prepared $(package/stamp-compile): $(target/stamp-compile) $(package/stamp-cleanup) $(package/stamp-install): $(package/stamp-compile) $(target/stamp-install): $(package/stamp-compile) $(package/stamp-install) +check: $(tools/stamp-check) $(toolchain/stamp-check) $(package/stamp-check) printdb: @true @@ -54,7 +55,7 @@ clean: FORCE rm -rf $(BUILD_DIR) $(STAGING_DIR) $(BIN_DIR) $(OUTPUT_DIR)/packages/$(ARCH_PACKAGES) $(BUILD_LOG_DIR) $(TOPDIR)/staging_dir/packages dirclean: clean - rm -rf $(STAGING_DIR_HOST) $(TOOLCHAIN_DIR) $(BUILD_DIR_HOST) $(BUILD_DIR_TOOLCHAIN) + rm -rf $(STAGING_DIR_HOST) $(STAGING_DIR_HOSTPKG) $(TOOLCHAIN_DIR) $(BUILD_DIR_BASE)/host $(BUILD_DIR_BASE)/hostpkg $(BUILD_DIR_TOOLCHAIN) rm -rf $(TMP_DIR) ifndef DUMP_TARGET_DB @@ -86,9 +87,15 @@ prereq: $(target/stamp-prereq) tmp/.prereq_packages checksum: FORCE $(call sha256sums,$(BIN_DIR)) -prepare: .config $(tools/stamp-install) $(toolchain/stamp-install) +diffconfig: FORCE + mkdir -p $(BIN_DIR) + $(SCRIPT_DIR)/diffconfig.sh > $(BIN_DIR)/config.seed + +prepare: .config $(tools/stamp-compile) $(toolchain/stamp-compile) world: prepare $(target/stamp-compile) $(package/stamp-compile) FORCE $(_SINGLE)$(SUBMAKE) -r package/index + $(_SINGLE)$(SUBMAKE) -r diffconfig + $(_SINGLE)$(SUBMAKE) -r checksum .PHONY: clean dirclean prereq prepare world package/symlinks package/symlinks-install package/symlinks-clean diff --git a/README b/README index 4cbe5634..405c18ba 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ -This is the buildsystem for the OpenWrt Linux distribution. +This is the buildsystem for the LEDE Linux distribution. -Please use "make menuconfig" to configure your appreciated +Please use "make menuconfig" to choose your preferred configuration for the toolchain and firmware. You need to have installed gcc, binutils, bzip2, flex, python, perl, make, @@ -17,19 +17,13 @@ Simply running "make" will build your firmware. It will download all sources, build the cross-compile toolchain, the kernel and all choosen applications. -You can use "scripts/flashing/flash.sh" for remotely updating your embedded -system via tftp. - -The OpenWrt system is documented in docs/. You will need a LaTeX distribution -and the tex4ht package to build the documentation. Type "make -C docs/" to build it. - To build your own firmware you need to have access to a Linux, BSD or MacOSX system (case-sensitive filesystem required). Cygwin will not be supported because of the lack of case sensitiveness in the file system. Sunshine! - Your OpenWrt Project - http://openwrt.org + Your LEDE Community + http://www.lede-project.org diff --git a/changes.eng.patch b/changes.eng.patch new file mode 100644 index 00000000..f3a3bb35 --- /dev/null +++ b/changes.eng.patch @@ -0,0 +1,499 @@ +This patch reflects differences between LEDE and Entware-ng Buildroots as it was in 2017, January. + +Patch doesn't reflect some changes: + +* /target was wiped out and replaced by ours (see https://github.com/Entware-ng/Entware-ng/tree/master/target/linux) +* /tools: gobin, go-dep, go-src was added to provide Golang cross-compilation (see https://github.com/Entware-ng/entware-go) +* /tools/wl500g-kernel pseudo-tool was added as part of MIPSEL toolchain (from here https://github.com/wl500g/wl500g/tree/master/linux/linux-2.6.22.19) +* /toolchain folder was changed to reflect tools we are using (uClibc-ng for MIPSEL, Glibc for other targets and so on) +* /package contains usr->opt changes mostly. All kernel-, boot- and image-related packages are excluded as we are firmware independent project. + +diff -ur LEDE/Config.in Entware-ng/Config.in +--- LEDE/Config.in ++++ Entware-ng/Config.in +@@ -4,7 +4,7 @@ + # See /LICENSE for more information. + # + +-mainmenu "LEDE Configuration" ++mainmenu "Entware-ng Configuration" + + config MODULES + option modules +@@ -17,7 +17,7 @@ + + source "target/Config.in" + +-source "config/Config-images.in" ++#source "config/Config-images.in" + + source "config/Config-build.in" + +@@ -25,10 +25,10 @@ + + source "toolchain/Config.in" + +-source "target/imagebuilder/Config.in" ++#source "target/imagebuilder/Config.in" + +-source "target/sdk/Config.in" ++#source "target/sdk/Config.in" + +-source "target/toolchain/Config.in" ++#source "target/toolchain/Config.in" + + source "tmp/.config-package.in" +Only in Entware-ng: configs +Only in Entware-ng: feeds.conf +diff -ur LEDE/include/autotools.mk Entware-ng/include/autotools.mk +--- LEDE/include/autotools.mk ++++ Entware-ng/include/autotools.mk +@@ -75,7 +75,7 @@ + $(strip $(call autoreconf, \ + $(PKG_BUILD_DIR), $(PKG_REMOVE_FILES), \ + $(PKG_AUTOMAKE_PATHS), $(PKG_LIBTOOL_PATHS), \ +- $(STAGING_DIR)/host/share/aclocal $(STAGING_DIR_HOSTPKG)/share/aclocal $(STAGING_DIR)/usr/share/aclocal $(PKG_MACRO_PATHS))) ++ $(STAGING_DIR)/host/share/aclocal $(STAGING_DIR_HOSTPKG)/share/aclocal $(STAGING_DIR)/opt/share/aclocal $(PKG_MACRO_PATHS))) + endef + + define patch_libtool_target +diff -ur LEDE/include/cmake.mk Entware-ng/include/cmake.mk +--- LEDE/include/cmake.mk ++++ Entware-ng/include/cmake.mk +@@ -33,7 +33,7 @@ + CMAKE_NM:=$(call cmake_tool,$(TARGET_NM)) + CMAKE_RANLIB:=$(call cmake_tool,$(TARGET_RANLIB)) + +-CMAKE_FIND_ROOT_PATH:=$(STAGING_DIR)/usr;$(TOOLCHAIN_DIR)$(if $(CONFIG_EXTERNAL_TOOLCHAIN),;$(CONFIG_TOOLCHAIN_ROOT)) ++CMAKE_FIND_ROOT_PATH:=$(STAGING_DIR)/opt;$(TOOLCHAIN_DIR)$(if $(CONFIG_EXTERNAL_TOOLCHAIN),;$(CONFIG_TOOLCHAIN_ROOT)) + CMAKE_HOST_FIND_ROOT_PATH:=$(STAGING_DIR)/host;$(STAGING_DIR_HOSTPKG);$(STAGING_DIR_HOST) + CMAKE_SHARED_LDFLAGS:=-Wl,-Bsymbolic-functions + +@@ -67,7 +67,7 @@ + -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ + -DCMAKE_STRIP=: \ +- -DCMAKE_INSTALL_PREFIX=/usr \ ++ -DCMAKE_INSTALL_PREFIX=/opt \ + -DDL_LIBRARY=$(STAGING_DIR) \ + -DCMAKE_PREFIX_PATH=$(STAGING_DIR) \ + -DCMAKE_SKIP_RPATH=TRUE \ +diff -ur LEDE/include/kernel-build.mk Entware-ng/include/kernel-build.mk +--- LEDE/include/kernel-build.mk ++++ Entware-ng/include/kernel-build.mk +@@ -28,12 +28,11 @@ + endef + + define Kernel/CompileModules +- $(call Kernel/CompileModules/Default) ++ @echo "Skipping Kernel/CompileModules" + endef + + define Kernel/CompileImage +- $(call Kernel/CompileImage/Default) +- $(call Kernel/CompileImage/Initramfs) ++ @echo "Skipping Kernel/CompileImage" + endef + + define Kernel/Clean +diff -ur LEDE/include/kernel-version.mk Entware-ng/include/kernel-version.mk +--- LEDE/include/kernel-version.mk ++++ Entware-ng/include/kernel-version.mk +@@ -2,11 +2,11 @@ + + LINUX_RELEASE?=1 + +-LINUX_VERSION-3.18 = .43 +-LINUX_VERSION-4.4 = .45 +- +-LINUX_KERNEL_HASH-3.18.43 = 1236e8123a6ce537d5029232560966feed054ae31776fe8481dd7d18cdd5492c +-LINUX_KERNEL_HASH-4.4.45 = 22fb59247746a3dd109df6d1485a9972382507a3c0040ac33371b3fd2a021741 ++LINUX_VERSION-2.6.36 = .4 ++LINUX_VERSION-2.6.32 = .68 ++LINUX_VERSION-2.6.22 = .19 ++LINUX_KERNEL_HASH-2.6.36.4 = 70d124743041974e1220fb39465627ded1df0fdd46da6cd74f6e3da414194d03 ++LINUX_KERNEL_HASH-2.6.32.68 = f56ca7f9ae41a80b37b42a9aa6367d6b054cde8a32ef3585a8b7b1fecd1c399e + + ifdef KERNEL_PATCHVER + LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER))) +diff -ur LEDE/include/nls.mk Entware-ng/include/nls.mk +--- LEDE/include/nls.mk ++++ Entware-ng/include/nls.mk +@@ -7,18 +7,18 @@ + + # iconv full + ifeq ($(CONFIG_BUILD_NLS),y) +- ICONV_PREFIX:=$(STAGING_DIR)/usr/lib/libiconv-full ++ ICONV_PREFIX:=$(STAGING_DIR)/opt/lib/libiconv-full + ICONV_FULL:=1 + +- INTL_PREFIX:=$(STAGING_DIR)/usr/lib/libintl-full ++ INTL_PREFIX:=$(STAGING_DIR)/opt/lib/libintl-full + INTL_FULL:=1 + + # iconv stub + else +- ICONV_PREFIX:=$(STAGING_DIR)/usr/lib/libiconv-stub ++ ICONV_PREFIX:=$(STAGING_DIR)/opt/lib/libiconv-stub + ICONV_FULL:= + +- INTL_PREFIX:=$(STAGING_DIR)/usr/lib/libintl-stub ++ INTL_PREFIX:=$(STAGING_DIR)/opt/lib/libintl-stub + INTL_FULL:= + endif + +diff -ur LEDE/include/package-defaults.mk Entware-ng/include/package-defaults.mk +--- LEDE/include/package-defaults.mk ++++ Entware-ng/include/package-defaults.mk +@@ -68,13 +68,13 @@ + endif + + EXTRA_CXXFLAGS = $(EXTRA_CFLAGS) +-ifeq ($(CONFIG_BUILD_NLS),y) +- DISABLE_NLS:= +-else ++#ifeq ($(CONFIG_BUILD_NLS),y) ++# DISABLE_NLS:= ++#else + DISABLE_NLS:=--disable-nls +-endif ++#endif + +-CONFIGURE_PREFIX:=/usr ++CONFIGURE_PREFIX:=/opt + CONFIGURE_ARGS = \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ +@@ -86,9 +86,9 @@ + --bindir=$(CONFIGURE_PREFIX)/bin \ + --sbindir=$(CONFIGURE_PREFIX)/sbin \ + --libexecdir=$(CONFIGURE_PREFIX)/lib \ +- --sysconfdir=/etc \ ++ --sysconfdir=$(CONFIGURE_PREFIX)/etc \ + --datadir=$(CONFIGURE_PREFIX)/share \ +- --localstatedir=/var \ ++ --localstatedir=$(CONFIGURE_PREFIX)/var \ + --mandir=$(CONFIGURE_PREFIX)/man \ + --infodir=$(CONFIGURE_PREFIX)/info \ + $(DISABLE_NLS) \ +diff -ur LEDE/include/package-ipkg.mk Entware-ng/include/package-ipkg.mk +--- LEDE/include/package-ipkg.mk ++++ Entware-ng/include/package-ipkg.mk +@@ -13,7 +13,7 @@ + IPKG_BUILD:= \ + $(SCRIPT_DIR)/ipkg-build -c -o 0 -g 0 + +-IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/opkg ++IPKG_STATE_DIR:=$(TARGET_DIR)/opt/lib/opkg + + # 1: package name + # 2: variable name +@@ -134,8 +134,8 @@ + + $(eval $(call BuildIPKGVariable,$(1),conffiles)) + $(eval $(call BuildIPKGVariable,$(1),preinst,,1)) +- $(eval $(call BuildIPKGVariable,$(1),postinst,-pkg,1)) +- $(eval $(call BuildIPKGVariable,$(1),prerm,-pkg,1)) ++ $(eval $(call BuildIPKGVariable,$(1),postinst,,1)) ++ $(eval $(call BuildIPKGVariable,$(1),prerm,,1)) + $(eval $(call BuildIPKGVariable,$(1),postrm,,1)) + + $(PKG_BUILD_DIR)/.pkgdir/$(1).installed : export PATH=$$(TARGET_PATH_PKG) +@@ -204,20 +204,6 @@ + printf "Description: "; echo "$$$$DESCRIPTION" | sed -e 's,^[[:space:]]*, ,g'; \ + ) > control; \ + chmod 644 control; \ +- ( \ +- echo "#!/bin/sh"; \ +- echo "[ \"\$$$${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; \ +- echo "[ -x "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \ +- echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \ +- echo "default_postinst \$$$$0 \$$$$@"; \ +- ) > postinst; \ +- ( \ +- echo "#!/bin/sh"; \ +- echo "[ -x "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \ +- echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \ +- echo "default_prerm \$$$$0 \$$$$@"; \ +- ) > prerm; \ +- chmod 0755 postinst prerm; \ + $($(1)_COMMANDS) \ + ) + +@@ -228,8 +214,8 @@ + [ -f "$$(IDIR_$(1))/$$$$x" ] || keepfiles="$$$${keepfiles:+$$$$keepfiles }$$$$x"; \ + done; \ + [ -z "$$$$keepfiles" ] || { \ +- mkdir -p $$(IDIR_$(1))/lib/upgrade/keep.d; \ +- for x in $$$$keepfiles; do echo $$$$x >> $$(IDIR_$(1))/lib/upgrade/keep.d/$(1); done; \ ++ mkdir -p $$(IDIR_$(1))/opt/lib/upgrade/keep.d; \ ++ for x in $$$$keepfiles; do echo $$$$x >> $$(IDIR_$(1))/opt/lib/upgrade/keep.d/$(1); done; \ + }; \ + ) + endif +diff -ur LEDE/include/package.mk Entware-ng/include/package.mk +--- LEDE/include/package.mk ++++ Entware-ng/include/package.mk +@@ -102,7 +102,7 @@ + CONFIG_SITE:=$(INCLUDE_DIR)/site/$(ARCH) + CUR_MAKEFILE:=$(filter-out Makefile,$(firstword $(MAKEFILE_LIST))) + SUBMAKE:=$(NO_TRACE_MAKE) $(if $(CUR_MAKEFILE),-f $(CUR_MAKEFILE)) +-PKG_CONFIG_PATH=$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig ++PKG_CONFIG_PATH=$(STAGING_DIR)/opt/lib/pkgconfig:$(STAGING_DIR)/opt/share/pkgconfig + unexport QUIET CONFIG_SITE + + ifeq ($(DUMP)$(filter prereq clean refresh update,$(MAKECMDGOALS)),) +@@ -132,8 +132,8 @@ + endif + + define Build/Exports/Default +- $(1) : export ACLOCAL_INCLUDE=$$(foreach p,$$(wildcard $$(STAGING_DIR)/usr/share/aclocal $$(STAGING_DIR)/usr/share/aclocal-* $$(STAGING_DIR_HOSTPKG)/share/aclocal $$(STAGING_DIR_HOSTPKG)/share/aclocal-* $$(STAGING_DIR)/host/share/aclocal $$(STAGING_DIR)/host/share/aclocal-*),-I $$(p)) +- $(1) : export STAGING_PREFIX=$$(STAGING_DIR)/usr ++ $(1) : export ACLOCAL_INCLUDE=$$(foreach p,$$(wildcard $$(STAGING_DIR)/opt/share/aclocal $$(STAGING_DIR)/opt/share/aclocal-* $$(STAGING_DIR_HOSTPKG)/share/aclocal $$(STAGING_DIR_HOSTPKG)/share/aclocal-* $$(STAGING_DIR)/host/share/aclocal $$(STAGING_DIR)/host/share/aclocal-*),-I $$(p)) ++ $(1) : export STAGING_PREFIX=$$(STAGING_DIR)/opt + $(1) : export PATH=$$(TARGET_PATH_PKG) + $(1) : export CONFIG_SITE:=$$(CONFIG_SITE) + $(1) : export PKG_CONFIG_PATH:=$$(PKG_CONFIG_PATH) +diff -ur LEDE/include/rootfs.mk Entware-ng/include/rootfs.mk +--- LEDE/include/rootfs.mk ++++ Entware-ng/include/rootfs.mk +@@ -49,9 +49,9 @@ + + ifdef CONFIG_CLEAN_IPKG + define clean_ipkg +- -find $(1)/usr/lib/opkg -type f -and -not -name '*.control' | $(XARGS) rm -rf +- -sed -i -ne '/^Require-User: /p' $(1)/usr/lib/opkg/info/*.control +- -find $(1)/usr/lib/opkg -empty | $(XARGS) rm -rf ++ -find $(1)/opt/lib/opkg -type f -and -not -name '*.control' | $(XARGS) rm -rf ++ -sed -i -ne '/^Require-User: /p' $(1)/opt/lib/opkg/info/*.control ++ -find $(1)/opt/lib/opkg -empty | $(XARGS) rm -rf + endef + endif + +diff -ur LEDE/include/scons.mk Entware-ng/include/scons.mk +--- LEDE/include/scons.mk ++++ Entware-ng/include/scons.mk +@@ -13,7 +13,7 @@ + (cd $(PKG_BUILD_DIR); \ + $(SCONS_VARS) \ + scons \ +- prefix=/usr \ ++ prefix=/opt \ + $(SCONS_OPTIONS) \ + install \ + ) +diff -ur LEDE/include/target.mk Entware-ng/include/target.mk +--- LEDE/include/target.mk ++++ Entware-ng/include/target.mk +@@ -13,11 +13,11 @@ + DEVICE_TYPE?=router + + # Default packages - the really basic set +-DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd ++DEFAULT_PACKAGES:=libc libgcc busybox dropbear + # For nas targets +-DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm ++DEFAULT_PACKAGES.nas:=libc libgcc busybox dropbear + # For router targets +-DEFAULT_PACKAGES.router:=dnsmasq iptables ip6tables ppp ppp-mod-pppoe firewall odhcpd odhcp6c ++DEFAULT_PACKAGES.router:=libc libgcc busybox dropbear + DEFAULT_PACKAGES.bootloader:= + + ifneq ($(DUMP),) +@@ -280,7 +280,7 @@ + echo 'Target-Board: $(BOARD)'; \ + echo 'Target-Name: $(BOARDNAME)$(if $(SUBTARGETS),$(if $(SUBTARGET),))'; \ + echo 'Target-Arch: $(ARCH)'; \ +- echo 'Target-Arch-Packages: $(if $(ARCH_PACKAGES),$(ARCH_PACKAGES),$(ARCH)$(if $(CPU_TYPE),_$(CPU_TYPE))$(if $(CPU_SUBTYPE),_$(CPU_SUBTYPE)))'; \ ++ echo 'Target-Arch-Packages: $(if $(ARCH_PACKAGES),$(ARCH_PACKAGES),$(BOARD))'; \ + echo 'Target-Features: $(FEATURES)'; \ + echo 'Target-Depends: $(DEPENDS)'; \ + echo 'Target-Optimization: $(if $(CFLAGS),$(CFLAGS),$(DEFAULT_CFLAGS))'; \ +Only in Entware-ng: LastSync.txt +diff -ur LEDE/Makefile Entware-ng/Makefile +--- LEDE/Makefile ++++ Entware-ng/Makefile +@@ -92,7 +92,7 @@ + $(SCRIPT_DIR)/diffconfig.sh > $(BIN_DIR)/config.seed + + prepare: .config $(tools/stamp-compile) $(toolchain/stamp-compile) +-world: prepare $(target/stamp-compile) $(package/stamp-compile) $(package/stamp-install) $(target/stamp-install) FORCE ++world: prepare $(target/stamp-compile) $(package/stamp-compile) FORCE + $(_SINGLE)$(SUBMAKE) -r package/index + $(_SINGLE)$(SUBMAKE) -r diffconfig + $(_SINGLE)$(SUBMAKE) -r checksum +Only in Entware-ng: make_include_archs.sh +diff -ur LEDE/rules.mk Entware-ng/rules.mk +--- LEDE/rules.mk ++++ Entware-ng/rules.mk +@@ -139,9 +139,9 @@ + TOOLCHAIN_DIR_NAME:=toolchain-$(GNU_TARGET_NAME) + endif + +-ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_GCC_VERSION_4_8),$(CONFIG_TARGET_uml)),) +- iremap = -iremap $(1):$(2) +-endif ++#ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_GCC_VERSION_4_8),$(CONFIG_TARGET_uml)),) ++# iremap = -iremap $(1):$(2) ++#endif + + PACKAGE_DIR:=$(BIN_DIR)/packages + BUILD_DIR:=$(BUILD_DIR_BASE)/$(TARGET_DIR_NAME) +@@ -168,8 +168,9 @@ + TARGET_CXXFLAGS = $(TARGET_CFLAGS) + TARGET_ASFLAGS_DEFAULT = $(TARGET_CFLAGS) + TARGET_ASFLAGS = $(TARGET_ASFLAGS_DEFAULT) +-TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include +-TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib ++TARGET_GCCGOFLAGS = -g1 -O2 ++TARGET_CPPFLAGS:=-I$(STAGING_DIR)/opt/include -I$(STAGING_DIR)/include ++TARGET_LDFLAGS:=-L$(STAGING_DIR)/opt/lib -L$(STAGING_DIR)/lib -Wl,-rpath,/opt/lib -Wl,-rpath-link=$(STAGING_DIR)/opt/lib + ifneq ($(CONFIG_EXTERNAL_TOOLCHAIN),) + LIBGCC_S_PATH=$(realpath $(wildcard $(call qstrip,$(CONFIG_LIBGCC_ROOT_DIR))/$(call qstrip,$(CONFIG_LIBGCC_FILE_SPEC)))) + LIBGCC_S=$(if $(LIBGCC_S_PATH),-L$(dir $(LIBGCC_S_PATH)) -lgcc_s) +@@ -178,8 +179,37 @@ + LIBGCC_A=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc.a)) + LIBGCC_S=$(if $(wildcard $(TOOLCHAIN_DIR)/lib/libgcc_s.so),-L$(TOOLCHAIN_DIR)/lib -lgcc_s,$(LIBGCC_A)) + endif +-LIBRPC=-lrpc +-LIBRPC_DEPENDS=+librpc ++# ++# glibc does not have librpc, so we set it only for uclibc ++# dynamic linker depends on libc and arch. it is set for the targets we compile ++# may be it is better to patch gcc & glibc to set the path of dynamic linker ???? ++# ++#LIBRPC=-lrpc ++#LIBRPC_DEPENDS=+librpc ++ ++ifeq ($(LIBC),uClibc) ++DYNLINKER=ld-uClibc.so.0 ++endif ++ ++ifeq ($(LIBC),glibc) ++ ifeq ($(ARCH),arm) ++ DYNLINKER=ld-linux.so.3 ++ endif ++ ifeq ($(ARCH),i386) ++ DYNLINKER=ld-linux.so.2 ++ endif ++ ifeq ($(ARCH),x86_64) ++ DYNLINKER=ld-linux-x86-64.so.2 ++ endif ++ ifeq ($(ARCH),mipsel) ++ DYNLINKER=ld.so.1 ++ endif ++ ifeq ($(ARCH),mips) ++ DYNLINKER=ld.so.1 ++ endif ++endif ++TARGET_LDFLAGS+= -Wl,--dynamic-linker=/opt/lib/$(DYNLINKER) ++TARGET_GCCGOFLAGS+= -Wl,--dynamic-linker=/opt/lib/$(DYNLINKER) -Wl,-rpath=/opt/lib + + ifeq ($(CONFIG_ARCH_64BIT),y) + LIB_SUFFIX:=64 +@@ -224,8 +254,10 @@ + SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft + ifeq ($(CONFIG_arm),y) + TARGET_CFLAGS+= -mfloat-abi=soft ++ TARGET_GCCGOFLAGS+= -mfloat-abi=soft + else + TARGET_CFLAGS+= -msoft-float ++ TARGET_GCCGOFLAGS+= -msoft-float + endif + else + SOFT_FLOAT_CONFIG_OPTION:= +@@ -242,6 +274,8 @@ + + export PKG_CONFIG + ++export GOROOT:=$(STAGING_DIR_HOST)/go ++ + HOSTCC:=gcc + HOSTCXX:=g++ + HOST_CPPFLAGS:=-I$(STAGING_DIR_HOST)/include -I$(STAGING_DIR_HOST)/usr/include $(if $(IS_PACKAGE_BUILD),-I$(STAGING_DIR_HOSTPKG)/include -I$(STAGING_DIR)/host/include) +diff -ur LEDE/scripts/download.pl Entware-ng/scripts/download.pl +--- LEDE/scripts/download.pl ++++ Entware-ng/scripts/download.pl +@@ -259,6 +259,7 @@ + push @mirrors, 'http://sources.lede-project.org'; + push @mirrors, 'http://mirror2.openwrt.org/sources'; + push @mirrors, 'http://downloads.openwrt.org/sources'; ++push @mirrors, 'http://pkg.entware.net/sources'; + + while (!-f "$target/$filename") { + my $mirror = shift @mirrors; +diff -ur LEDE/scripts/getver.sh Entware-ng/scripts/getver.sh +--- LEDE/scripts/getver.sh ++++ Entware-ng/scripts/getver.sh +@@ -12,7 +12,7 @@ + } + + try_git() { +- REBOOT=ee53a240ac902dc83209008a2671e7fdcf55957a ++ REBOOT=b22c8681ee0093a2a284d2deb01c00ec5ae8b483 + git rev-parse --git-dir >/dev/null 2>&1 || return 1 + + [ -n "$GET_REV" ] || GET_REV="HEAD" +diff -ur LEDE/scripts/ipkg-make-index.sh Entware-ng/scripts/ipkg-make-index.sh +--- LEDE/scripts/ipkg-make-index.sh ++++ Entware-ng/scripts/ipkg-make-index.sh +@@ -15,7 +15,6 @@ + name="${pkg##*/}" + name="${name%%_*}" + [[ "$name" = "kernel" ]] && continue +- [[ "$name" = "libc" ]] && continue + echo "Generating index for package $pkg" >&2 + file_size=$(ls -l $pkg | awk '{print $5}') + sha256sum=$(mkhash sha256 $pkg) +diff -ur LEDE/scripts/rstrip.sh Entware-ng/scripts/rstrip.sh +--- LEDE/scripts/rstrip.sh ++++ Entware-ng/scripts/rstrip.sh +@@ -30,16 +30,6 @@ + eval "$STRIP_KMOD $F" + } || { + b=$(stat -c '%a' $F) +- [ -z "$PATCHELF" ] || [ -z "$TOPDIR" ] || { +- old_rpath="$($PATCHELF --print-rpath $F)"; new_rpath="" +- for path in $old_rpath; do +- case "$path" in +- /lib/[^/]*|/usr/lib/[^/]*|\$ORIGIN/*) new_rpath="${new_rpath:+$new_rpath:}$path" ;; +- *) echo "$SELF: $F: removing rpath $path" ;; +- esac +- done +- [ "$new_rpath" = "$old_rpath" ] || $PATCHELF --set-rpath "$new_rpath" $F +- } + eval "$STRIP $F" + a=$(stat -c '%a' $F) + [ "$a" = "$b" ] || chmod $b $F +Only in Entware-ng/tools: go-bin +Only in Entware-ng/tools: godep +Only in Entware-ng/tools: go-src +diff -ur LEDE/tools/Makefile Entware-ng/tools/Makefile +--- LEDE/tools/Makefile ++++ Entware-ng/tools/Makefile +@@ -32,11 +32,15 @@ + tools-$(CONFIG_TARGET_x86) += qemu + tools-$(CONFIG_TARGET_mxs) += elftosb sdimage + tools-$(CONFIG_TARGET_ar71xx) += lzma-old squashfs ++tools-$(CONFIG_TARGET_mipselsf) += wl500g-kernel + tools-$(CONFIG_USES_MINOR) += kernel2minor + tools-y += lzma squashfs4 + tools-$(BUILD_B43_TOOLS) += b43-tools + tools-$(BUILD_ISL) += isl + tools-$(CONFIG_USE_SPARSE) += sparse ++tools-$(CONFIG_INSTALL_GCCGO) += go-bin ++tools-$(CONFIG_INSTALL_GCCGO) += go-src ++tools-$(CONFIG_INSTALL_GCCGO) += godep + tools-$(CONFIG_TARGET_apm821xx) += genext2fs + + # builddir dependencies +@@ -72,6 +76,8 @@ + $(curdir)/mkimage/compile += $(curdir)/libressl/compile + $(curdir)/firmware-utils/compile += $(curdir)/libressl/compile + $(curdir)/cmake/compile += $(curdir)/libressl/compile ++$(curdir)/go-src/compile := $(curdir)/go-bin/compile ++$(curdir)/godep/compile := $(curdir)/go-bin/compile + + ifneq ($(HOST_OS),Linux) + tools-y += coreutils +Only in Entware-ng/tools: wl500g-kernel diff --git a/feeds.conf.default b/feeds.conf.default index bc062db7..040dbdc5 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,15 +1,9 @@ -src-git packages https://github.com/openwrt/packages.git -src-git luci https://github.com/openwrt/luci.git -src-git routing https://github.com/openwrt-routing/packages.git -src-git telephony https://github.com/openwrt/telephony.git -src-git management https://github.com/openwrt-management/packages.git -src-git targets https://github.com/openwrt/targets.git +src-git packages https://git.lede-project.org/feed/packages.git +src-git luci https://git.lede-project.org/project/luci.git +src-git routing https://git.lede-project.org/feed/routing.git +src-git telephony https://git.lede-project.org/feed/telephony.git +#src-git video https://github.com/openwrt/video.git +#src-git targets https://github.com/openwrt/targets.git +#src-git management https://github.com/openwrt-management/packages.git #src-git oldpackages http://git.openwrt.org/packages.git -#src-svn xwrt http://x-wrt.googlecode.com/svn/trunk/package -#src-svn phone svn://svn.openwrt.org/openwrt/feeds/phone -#src-svn efl svn://svn.openwrt.org/openwrt/feeds/efl -#src-svn xorg svn://svn.openwrt.org/openwrt/feeds/xorg -#src-svn desktop svn://svn.openwrt.org/openwrt/feeds/desktop -#src-svn xfce svn://svn.openwrt.org/openwrt/feeds/xfce -#src-svn lxde svn://svn.openwrt.org/openwrt/feeds/lxde #src-link custom /usr/src/openwrt/custom-feed diff --git a/rules.mk b/rules.mk index 5da9a687..8b95a8a3 100644 --- a/rules.mk +++ b/rules.mk @@ -15,6 +15,11 @@ endif include $(TOPDIR)/include/debug.mk include $(TOPDIR)/include/verbose.mk +ifneq ($(filter check,$(MAKECMDGOALS)),) +CHECK:=1 +DUMP:=1 +endif + export TMP_DIR:=$(TOPDIR)/tmp qstrip=$(strip $(subst ",,$(1))) @@ -50,6 +55,8 @@ __tr_template = $(__tr_head)$$(1)$(__tr_tail) $(eval toupper = $(call __tr_template,$(chars_lower),$(chars_upper))) $(eval tolower = $(call __tr_template,$(chars_upper),$(chars_lower))) +version_abbrev = $(if $(if $(CHECK),,$(DUMP)),$(1),$(shell printf '%.8s' $(1))) + _SINGLE=export MAKEFLAGS=$(space); CFLAGS:= ARCH:=$(subst i486,i386,$(subst i586,i386,$(subst i686,i386,$(call qstrip,$(CONFIG_ARCH))))) @@ -94,8 +101,19 @@ ifdef CONFIG_MIPS64_ABI endif endif +DEFAULT_SUBDIR_TARGETS:=clean download prepare compile install update refresh prereq dist distcheck configure check check-depends + +define DefaultTargets +$(foreach t,$(DEFAULT_SUBDIR_TARGETS) $(1), + .$(t): + $(t): .$(t) + .PHONY: $(t) .$(t) +) +endef + DL_DIR:=$(if $(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(TOPDIR)/dl) -BIN_DIR:=$(if $(call qstrip,$(CONFIG_BINARY_FOLDER)),$(call qstrip,$(CONFIG_BINARY_FOLDER)),$(TOPDIR)/bin/$(BOARD)) +OUTPUT_DIR:=$(if $(call qstrip,$(CONFIG_BINARY_FOLDER)),$(call qstrip,$(CONFIG_BINARY_FOLDER)),$(TOPDIR)/bin) +BIN_DIR:=$(OUTPUT_DIR)/targets/$(BOARD)/$(SUBTARGET) INCLUDE_DIR:=$(TOPDIR)/include SCRIPT_DIR:=$(TOPDIR)/scripts BUILD_DIR_BASE:=$(TOPDIR)/build_dir @@ -116,7 +134,8 @@ else GNU_TARGET_NAME=$(shell gcc -dumpmachine) endif REAL_GNU_TARGET_NAME=$(GNU_TARGET_NAME) - TARGET_DIR_NAME:=target-$(GNU_TARGET_NAME)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX)) + LIBC:=$(call qstrip,$(CONFIG_LIBC)) + TARGET_DIR_NAME:=target-$(GNU_TARGET_NAME)_$(LIBC)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX)) TOOLCHAIN_DIR_NAME:=toolchain-$(GNU_TARGET_NAME) endif @@ -134,12 +153,13 @@ STAMP_DIR_HOST=$(BUILD_DIR_HOST)/stamp TARGET_ROOTFS_DIR?=$(if $(call qstrip,$(CONFIG_TARGET_ROOTFS_DIR)),$(call qstrip,$(CONFIG_TARGET_ROOTFS_DIR)),$(BUILD_DIR)) TARGET_DIR:=$(TARGET_ROOTFS_DIR)/root-$(BOARD) STAGING_DIR_ROOT:=$(STAGING_DIR)/root-$(BOARD) +STAGING_DIR_IMAGE:=$(STAGING_DIR)/image BUILD_LOG_DIR:=$(TOPDIR)/logs PKG_INFO_DIR := $(STAGING_DIR)/pkginfo -BUILD_DIR_HOST:=$(if $(IS_PACKAGE_BUILD),$(BUILD_DIR)/host,$(BUILD_DIR_BASE)/host) +BUILD_DIR_HOST:=$(if $(IS_PACKAGE_BUILD),$(BUILD_DIR_BASE)/hostpkg,$(BUILD_DIR_BASE)/host) STAGING_DIR_HOST:=$(TOPDIR)/staging_dir/host -STAGING_DIR_HOSTPKG:=$(STAGING_DIR)/host +STAGING_DIR_HOSTPKG:=$(TOPDIR)/staging_dir/hostpkg TARGET_PATH:=$(subst $(space),:,$(filter-out .,$(filter-out ./,$(subst :,$(space),$(PATH))))) TARGET_INIT_PATH:=$(call qstrip,$(CONFIG_TARGET_INIT_PATH)) @@ -148,16 +168,9 @@ TARGET_CFLAGS:=$(TARGET_OPTIMIZATION)$(if $(CONFIG_DEBUG), -g3) $(call qstrip,$( TARGET_CXXFLAGS = $(TARGET_CFLAGS) TARGET_ASFLAGS_DEFAULT = $(TARGET_CFLAGS) TARGET_ASFLAGS = $(TARGET_ASFLAGS_DEFAULT) -TARGET_GCCGOFLAGS = -g1 -O2 - -# include files are in /opt/include (entware) - +TARGET_GCCGOFLAGS = -g1 -O2 TARGET_CPPFLAGS:=-I$(STAGING_DIR)/opt/include -I$(STAGING_DIR)/include - -# entware uses RPATH for libs. we set it globally here - TARGET_LDFLAGS:=-L$(STAGING_DIR)/opt/lib -L$(STAGING_DIR)/lib -Wl,-rpath,/opt/lib -Wl,-rpath-link=$(STAGING_DIR)/opt/lib - ifneq ($(CONFIG_EXTERNAL_TOOLCHAIN),) LIBGCC_S_PATH=$(realpath $(wildcard $(call qstrip,$(CONFIG_LIBGCC_ROOT_DIR))/$(call qstrip,$(CONFIG_LIBGCC_FILE_SPEC)))) LIBGCC_S=$(if $(LIBGCC_S_PATH),-L$(dir $(LIBGCC_S_PATH)) -lgcc_s) @@ -166,7 +179,6 @@ else LIBGCC_A=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc.a)) LIBGCC_S=$(if $(wildcard $(TOOLCHAIN_DIR)/lib/libgcc_s.so),-L$(TOOLCHAIN_DIR)/lib -lgcc_s,$(LIBGCC_A)) endif - # # glibc does not have librpc, so we set it only for uclibc # dynamic linker depends on libc and arch. it is set for the targets we compile @@ -196,9 +208,9 @@ ifeq ($(LIBC),glibc) DYNLINKER=ld.so.1 endif endif - TARGET_LDFLAGS+= -Wl,--dynamic-linker=/opt/lib/$(DYNLINKER) TARGET_GCCGOFLAGS+= -Wl,--dynamic-linker=/opt/lib/$(DYNLINKER) -Wl,-rpath=/opt/lib + ifeq ($(CONFIG_ARCH_64BIT),y) LIB_SUFFIX:=64 endif @@ -236,7 +248,7 @@ ifndef DUMP endif endif endif -TARGET_PATH_PKG:=$(STAGING_DIR)/host/bin:$(TARGET_PATH) +TARGET_PATH_PKG:=$(STAGING_DIR)/host/bin:$(STAGING_DIR_HOSTPKG)/bin:$(TARGET_PATH) ifeq ($(CONFIG_SOFT_FLOAT),y) SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft @@ -255,7 +267,7 @@ else endif export PATH:=$(TARGET_PATH) -export STAGING_DIR STAGING_DIR_HOST +export STAGING_DIR STAGING_DIR_HOST STAGING_DIR_HOSTPKG export SH_FUNC:=. $(INCLUDE_DIR)/shell.sh; PKG_CONFIG:=$(STAGING_DIR_HOST)/bin/pkg-config @@ -264,11 +276,34 @@ export PKG_CONFIG export GOROOT:=$(STAGING_DIR_HOST)/go +ifeq ($(ARCH),mips) + GOARCH=mips +endif +ifeq ($(ARCH),mipsel) + GOARCH=mipsle +endif +ifeq ($(ARCH),arm) + GOARCH=arm + ifeq ($(ARCH_SUFFIX),_cortex-a9) + GOARM=GOARM=7 + else + GOARM=GOARM=5 + endif +endif +ifeq ($(ARCH),x86_64) + GOARCH=amd64 +endif +ifeq ($(ARCH),i386) + GOARCH=386 +endif + + + HOSTCC:=gcc HOSTCXX:=g++ -HOST_CPPFLAGS:=-I$(STAGING_DIR_HOST)/include -I$(STAGING_DIR_HOST)/usr/include $(if $(IS_PACKAGE_BUILD),-I$(STAGING_DIR)/host/include) +HOST_CPPFLAGS:=-I$(STAGING_DIR_HOST)/include -I$(STAGING_DIR_HOST)/usr/include $(if $(IS_PACKAGE_BUILD),-I$(STAGING_DIR_HOSTPKG)/include -I$(STAGING_DIR)/host/include) HOST_CFLAGS:=-O2 $(HOST_CPPFLAGS) -HOST_LDFLAGS:=-L$(STAGING_DIR_HOST)/lib -L$(STAGING_DIR_HOST)/usr/lib $(if $(IS_PACKAGE_BUILD),-L$(STAGING_DIR)/host/lib) +HOST_LDFLAGS:=-L$(STAGING_DIR_HOST)/lib -L$(STAGING_DIR_HOST)/usr/lib $(if $(IS_PACKAGE_BUILD),-L$(STAGING_DIR_HOSTPKG)/lib -L$(STAGING_DIR)/host/lib) ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) TARGET_AR:=$(TARGET_CROSS)gcc-ar @@ -417,7 +452,7 @@ endef # $(1) => Input directory define sha256sums (cd $(1); find . -maxdepth 1 -type f -not -name 'sha256sums' -printf "%P\n" | sort | \ - xargs openssl dgst -sha256 | sed -ne 's!^SHA256(\(.*\))= \(.*\)$$!\2 *\1!p' > sha256sums) + xargs -r $(STAGING_DIR_HOST)/bin/mkhash -n sha256 | sed -ne 's!^\(.*\) \(.*\)$$!\1 *\2!p' > sha256sums) endef # file extension @@ -427,6 +462,9 @@ all: FORCE: ; .PHONY: FORCE +check: FORCE + @true + val.%: @$(if $(filter undefined,$(origin $*)),\ echo "$* undefined" >&2, \