Skip to content
This repository has been archived by the owner on Mar 17, 2018. It is now read-only.

Commit

Permalink
sync 2017.12
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxmon committed Dec 26, 2017
1 parent f5a5cf4 commit d3d0d7c
Show file tree
Hide file tree
Showing 542 changed files with 10,601 additions and 3,394 deletions.
8 changes: 4 additions & 4 deletions LastSync.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
commit 9c500db89680af5d89fb679e08452c8f090d804d
Author: Jiawei Wang <[email protected]>
Date: Wed Sep 13 14:04:22 2017 +0800
commit 9f8d28285d569f28ad3db9b2cbb61814b2c90fdc
Author: John Crispin <[email protected]>
Date: Thu Dec 14 10:58:15 2017 +0100

ramips: fix used MAC addresses for Phicomm K2P
Revert "ar71xx: TL-WR1043N v4/v5: add orange WAN LED support"

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export TOPDIR LC_ALL LANG TZ

empty:=
space:= $(empty) $(empty)
$(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the LEDE directory must not include any spaces))
$(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the Entware directory must not include any spaces))

world:

Expand Down
1 change: 1 addition & 0 deletions config/Config-images.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ menu "Target Images"
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ar71xx
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_apm821xx
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_mpc85xx
default TARGET_INITRAMFS_COMPRESSION_NONE
depends on TARGET_ROOTFS_INITRAMFS
help
Expand Down
2 changes: 1 addition & 1 deletion config/Config-kernel.in
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ config KERNEL_DEVTMPFS
default n
help
devtmpfs is a simple, kernel-managed /dev filesystem. The kernel creates
devices nodes for all registered devices ti simplify boot, but leaves more
devices nodes for all registered devices to simplify boot, but leaves more
complex tasks to userspace (e.g. udev).

if KERNEL_DEVTMPFS
Expand Down
2 changes: 1 addition & 1 deletion include/download.mk
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ hash_var = $(if $(filter-out x,$(1)),MD5SUM,HASH)
endif

define DownloadMethod/unknown
@echo "ERROR: No download method available"; false
echo "ERROR: No download method available"; false
endef

define DownloadMethod/default
Expand Down
6 changes: 3 additions & 3 deletions include/feeds.mk
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ endef
# 1: destination file
define FeedSourcesAppend
( \
echo "src/gz %n_core %U/targets/%S/packages"; \
echo "src/gz %d_core %U/targets/%S/packages"; \
$(strip $(if $(CONFIG_PER_FEED_REPO), \
$(foreach feed,base $(FEEDS_ENABLED),echo "src/gz %n_$(feed) %U/packages/%A/$(feed)";) \
$(foreach feed,base $(FEEDS_ENABLED),echo "src/gz %d_$(feed) %U/packages/%A/$(feed)";) \
$(if $(CONFIG_PER_FEED_REPO_ADD_DISABLED), \
$(foreach feed,$(FEEDS_DISABLED),echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %n_$(feed) %U/packages/%A/$(feed)";)))) \
$(foreach feed,$(FEEDS_DISABLED),echo "$(if $(CONFIG_PER_FEED_REPO_ADD_COMMENTED),# )src/gz %d_$(feed) %U/packages/%A/$(feed)";)))) \
) >> $(1)
endef
7 changes: 6 additions & 1 deletion include/host-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ include $(INCLUDE_DIR)/depends.mk
include $(INCLUDE_DIR)/quilt.mk

BUILD_TYPES += host
HOST_STAMP_PREPARED:=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(HOST_PREPARED_DEPENDS)))
HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(HOST_PREPARED_DEPENDS)))
HOST_STAMP_CONFIGURED:=$(HOST_BUILD_DIR)/.configured
HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built
HOST_BUILD_PREFIX?=$(if $(IS_PACKAGE_BUILD),$(STAGING_DIR_HOSTPKG),$(STAGING_DIR_HOST))
Expand Down Expand Up @@ -78,6 +78,10 @@ HOST_MAKE_FLAGS =

HOST_CONFIGURE_CMD = $(BASH) ./configure

ifeq ($(HOST_OS),Darwin)
HOST_CONFIG_SITE:=$(INCLUDE_DIR)/site/darwin
endif

define Host/Configure/Default
$(if $(HOST_CONFIGURE_PARALLEL),+)(cd $(HOST_BUILD_DIR)/$(3); \
if [ -x configure ]; then \
Expand Down Expand Up @@ -128,6 +132,7 @@ define Host/Exports/Default
$(1) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig:$$(HOST_BUILD_PREFIX)/lib/pkgconfig
$(1) : export PKG_CONFIG_LIBDIR=$$(HOST_BUILD_PREFIX)/lib/pkgconfig
$(1) : export CCACHE_DIR:=$(STAGING_DIR_HOST)/ccache
$(if $(HOST_CONFIG_SITE),$(1) : export CONFIG_SITE:=$(HOST_CONFIG_SITE))
$(if $(IS_PACKAGE_BUILD),$(1) : export PATH=$$(TARGET_PATH_PKG))
endef
Host/Exports=$(Host/Exports/Default)
Expand Down
28 changes: 19 additions & 9 deletions include/image-commands.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ define Build/uImage
mkimage -A $(LINUX_KARCH) \
-O linux -T kernel \
-C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
-n '$(if $(UIMAGE_NAME),$(UIMAGE_NAME),$(call toupper,$(LINUX_KARCH)) LEDE Linux-$(LINUX_VERSION))' -d $@ $@.new
-n '$(if $(UIMAGE_NAME),$(UIMAGE_NAME),$(call toupper,$(LINUX_KARCH)) OpenWrt Linux-$(LINUX_VERSION))' -d $@ $@.new
mv $@.new $@
endef

Expand Down Expand Up @@ -60,7 +60,7 @@ endef

define Build/netgear-dni
$(STAGING_DIR_HOST)/bin/mkdniimg \
-B $(NETGEAR_BOARD_ID) -v LEDE.$(REVISION) \
-B $(NETGEAR_BOARD_ID) -v OpenWrt.$(REVISION) \
$(if $(NETGEAR_HW_ID),-H $(NETGEAR_HW_ID)) \
-r "$(1)" \
-i $@ -o $@.new
Expand All @@ -83,7 +83,7 @@ define Build/append-uImage-fakeroot-hdr
rm -f $@.fakeroot
$(STAGING_DIR_HOST)/bin/mkimage \
-A $(LINUX_KARCH) -O linux -T filesystem -C none \
-n '$(call toupper,$(LINUX_KARCH)) LEDE fakeroot' \
-n '$(call toupper,$(LINUX_KARCH)) OpenWrt fakeroot' \
-s \
$@.fakeroot
cat $@.fakeroot >> $@
Expand All @@ -102,8 +102,7 @@ define Build/tplink-safeloader
endef

define Build/append-dtb
$(call Image/BuildDTB,$(if $(DEVICE_DTS_DIR),$(DEVICE_DTS_DIR),$(DTS_DIR))/$(DEVICE_DTS).dts,$@.dtb)
cat $@.dtb >> $@
cat $(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb >> $@
endef

define Build/install-dtb
Expand All @@ -114,6 +113,11 @@ define Build/install-dtb
)
endef

define Build/install-zImage
$(CP) $(KDIR)/zImage \
$(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-zImage
endef

define Build/fit
$(TOPDIR)/scripts/mkits.sh \
-D $(DEVICE_NAME) -o $@.its -k $@ \
Expand Down Expand Up @@ -244,14 +248,20 @@ endef

define Build/tplink-v2-header
$(STAGING_DIR_HOST)/bin/mktplinkfw2 \
-c -V "ver. 2.0" -B $(TPLINK_BOARD_ID) $(1) -k $@ -o $@.new
-c -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -L $(KERNEL_LOADADDR) \
-E $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
-w $(TPLINK_HWREVADD) -F "$(TPLINK_FLASHLAYOUT)" \
-T $(TPLINK_HVERSION) -V "ver. 2.0" \
-k $@ -o $@.new $(1)
@mv $@.new $@
endef

define Build/tplink-v2-image
$(STAGING_DIR_HOST)/bin/mktplinkfw2 \
-a 0x4 -j -V "ver. 2.0" -B $(TPLINK_BOARD_ID) $(1) \
-k $(IMAGE_KERNEL) -r $(IMAGE_ROOTFS) -o $@.new
-H $(TPLINK_HWID) -W $(TPLINK_HWREV) \
-w $(TPLINK_HWREVADD) -F "$(TPLINK_FLASHLAYOUT)" \
-T $(TPLINK_HVERSION) -V "ver. 2.0" -a 0x4 -j \
-k $(IMAGE_KERNEL) -r $(IMAGE_ROOTFS) -o $@.new $(1)
cat $@.new >> $@
rm -rf $@.new
endef
Expand All @@ -271,7 +281,7 @@ metadata_json = \
}'

define Build/append-metadata
$(if $(SUPPORTED_DEVICES),echo $(call metadata_json,$(SUPPORTED_DEVICES)) | fwtool -I - $@)
$(if $(SUPPORTED_DEVICES),-echo $(call metadata_json,$(SUPPORTED_DEVICES)) | fwtool -I - $@)
endef

define Build/kernel2minor
Expand Down
23 changes: 22 additions & 1 deletion include/image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ endef

define Image/BuildKernel/MkuImage
mkimage -A $(ARCH) -O linux -T kernel -C $(1) -a $(2) -e $(3) \
-n '$(call toupper,$(ARCH)) LEDE Linux-$(LINUX_VERSION)' -d $(4) $(5)
-n '$(call toupper,$(ARCH)) OpenWrt Linux-$(LINUX_VERSION)' -d $(4) $(5)
endef

define Image/BuildKernel/MkFIT
Expand All @@ -161,6 +161,7 @@ define Image/BuildDTB
$(TARGET_CROSS)cpp -nostdinc -x assembler-with-cpp \
-I$(DTS_DIR) \
-I$(DTS_DIR)/include \
-I$(LINUX_DIR)/include/ \
-undef -D__DTS__ $(3) \
-o $(2).tmp $(1)
$(LINUX_DIR)/scripts/dtc/dtc -O dtb \
Expand Down Expand Up @@ -434,7 +435,27 @@ define Device/Build/compile

endef

ifndef IB
define Device/Build/dtb
ifndef BUILD_DTS_$(1)
BUILD_DTS_$(1) := 1
$(KDIR)/image-$(1).dtb: FORCE
$(call Image/BuildDTB,$(strip $(2))/$(strip $(3)).dts,$$@)

image_prepare: $(KDIR)/image-$(1).dtb
endif

endef
endif

define Device/Build/kernel
$$(eval $$(foreach dts,$$(DEVICE_DTS), \
$$(call Device/Build/dtb,$$(notdir $$(dts)), \
$$(if $$(DEVICE_DTS_DIR),$$(DEVICE_DTS_DIR),$$(DTS_DIR)), \
$$(dts) \
) \
))

$(KDIR)/$$(KERNEL_NAME):: image_prepare
$$(_TARGET): $$(if $$(KERNEL_INSTALL),$(BIN_DIR)/$$(KERNEL_IMAGE))
$(call Device/Export,$$(KDIR_KERNEL_IMAGE),$(1))
Expand Down
10 changes: 5 additions & 5 deletions include/kernel-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ifneq ($(DUMP),1)
all: compile
endif

KERNEL_FILE_DEPENDS=$(GENERIC_PATCH_DIR) $(PATCH_DIR) $(GENERIC_FILES_DIR) $(FILES_DIR)
KERNEL_FILE_DEPENDS=$(BACKPORT_PATCH_DIR) $(GENERIC_PATCH_DIR) $(GENERIC_HACK_DIR) $(PATCH_DIR) $(GENERIC_FILES_DIR) $(FILES_DIR)
STAMP_PREPARED=$(LINUX_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,$(KERNEL_FILE_DEPENDS),)))
STAMP_CONFIGURED:=$(LINUX_DIR)/.configured
include $(INCLUDE_DIR)/download.mk
Expand All @@ -31,8 +31,6 @@ define Kernel/CompileModules
endef

define Kernel/CompileImage
$(call Kernel/CompileImage/Default)
$(call Kernel/CompileImage/Initramfs)
endef

define Kernel/Clean
Expand Down Expand Up @@ -104,7 +102,7 @@ define BuildKernel
$(KERNEL_BUILD_DIR)/symtab.h: FORCE
rm -f $(KERNEL_BUILD_DIR)/symtab.h
touch $(KERNEL_BUILD_DIR)/symtab.h
+$(MAKE) $(KERNEL_MAKEOPTS) vmlinux
+$(KERNEL_MAKE) vmlinux
find $(LINUX_DIR) $(STAGING_DIR_ROOT)/lib/modules -name \*.ko | \
xargs $(TARGET_CROSS)nm | \
awk '$$$$1 == "U" { print $$$$2 } ' | \
Expand Down Expand Up @@ -159,7 +157,9 @@ define BuildKernel
rm -f $(LINUX_DIR)/.config.prev
rm -f $(STAMP_CONFIGURED)
$(LINUX_RECONF_CMD) > $(LINUX_DIR)/.config
$(_SINGLE)$(MAKE) -C $(LINUX_DIR) $(KERNEL_MAKEOPTS) HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib -lncurses" $$@
$(_SINGLE)$(KERNEL_MAKE) \
$(if $(findstring Darwin,$(HOST_OS)),HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib -lncurses") \
$$@
$(LINUX_RECONF_DIFF) $(LINUX_DIR)/.config > $(LINUX_RECONFIG_TARGET)

install: $(LINUX_DIR)/.image
Expand Down
37 changes: 3 additions & 34 deletions include/kernel-defaults.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,6 @@
# See /LICENSE for more information.
#

ifneq ($(SOURCE_DATE_EPOCH),)
ifndef DUMP
KBUILD_BUILD_TIMESTAMP:=$(shell perl -e 'print scalar gmtime($(SOURCE_DATE_EPOCH))')
endif
endif

KERNEL_MAKEOPTS := -C $(LINUX_DIR) \
HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \
CROSS_COMPILE="$(KERNEL_CROSS)" \
ARCH="$(LINUX_KARCH)" \
KBUILD_HAVE_NLS=no \
KBUILD_BUILD_USER="$(call qstrip,$(CONFIG_KERNEL_BUILD_USER))" \
KBUILD_BUILD_HOST="$(call qstrip,$(CONFIG_KERNEL_BUILD_DOMAIN))" \
KBUILD_BUILD_TIMESTAMP="$(KBUILD_BUILD_TIMESTAMP)" \
KBUILD_BUILD_VERSION="0" \
HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib" \
CONFIG_SHELL="$(BASH)" \
$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \
$(if $(PKG_BUILD_ID),LDFLAGS_MODULE=--build-id=0x$(PKG_BUILD_ID)) \
cmd_syscalls=


ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
KERNEL_MAKEOPTS += \
KERNELRELEASE=$(LINUX_VERSION)
endif

ifdef CONFIG_STRIP_KERNEL_EXPORTS
KERNEL_MAKEOPTS += \
EXTRA_LDSFLAGS="-I$(KERNEL_BUILD_DIR) -include symtab.h"
Expand All @@ -43,10 +16,6 @@ ifneq (,$(KERNEL_CC))
KERNEL_MAKEOPTS += CC="$(KERNEL_CC)"
endif

ifdef CONFIG_USE_SPARSE
KERNEL_MAKEOPTS += C=1 CHECK=$(STAGING_DIR_HOST)/bin/sparse
endif

export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include

# defined in quilt.mk
Expand Down Expand Up @@ -127,7 +96,7 @@ define Kernel/Configure/Default
cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config; \
cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.prev; \
}
$(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(MAKE) $(KERNEL_MAKEOPTS) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install
$(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(KERNEL_MAKE) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install
grep '=[ym]' $(LINUX_DIR)/.config.set | LC_ALL=C sort | mkhash md5 > $(LINUX_DIR)/.vermagic
endef

Expand Down Expand Up @@ -162,7 +131,7 @@ endef

define Kernel/CompileImage/Default
rm -f $(TARGET_DIR)/init
+$(MAKE) $(KERNEL_MAKEOPTS) $(if $(KERNELNAME),$(KERNELNAME),all) modules
+$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all) modules
$(call Kernel/CopyImage)
endef

Expand All @@ -171,7 +140,7 @@ define Kernel/CompileImage/Initramfs
$(call Kernel/Configure/Initramfs)
$(CP) $(GENERIC_PLATFORM_DIR)/other-files/init $(TARGET_DIR)/init
rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio*
+$(MAKE) $(KERNEL_MAKEOPTS) $(if $(KERNELNAME),$(KERNELNAME),all) modules
+$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all) modules
$(call Kernel/CopyImage,-initramfs)
endef
else
Expand Down
Loading

0 comments on commit d3d0d7c

Please sign in to comment.