Permalink
Browse files

sync inclide with owrt 12.2018

  • Loading branch information...
zyxmon committed Dec 6, 2018
1 parent dd26558 commit 4913225b0af0d61525e382da3cfb544e63fa338d
Showing with 48 additions and 21 deletions.
  1. +2 −2 include/cmake.mk
  2. +1 −9 include/image-commands.mk
  3. +18 −0 include/image.mk
  4. +8 −2 include/kernel-defaults.mk
  5. +12 −5 include/kernel.mk
  6. +1 −1 include/prereq-build.mk
  7. +0 −1 include/quilt.mk
  8. +1 −0 include/rootfs.mk
  9. +5 −1 include/target.mk
@@ -7,8 +7,8 @@ ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
endif
CMAKE_BINARY_DIR = $(PKG_BUILD_DIR)$(if $(CMAKE_BINARY_SUBDIR),/$(CMAKE_BINARY_SUBDIR))
CMAKE_SOURCE_DIR = $(PKG_BUILD_DIR)
HOST_CMAKE_SOURCE_DIR = $(HOST_BUILD_DIR)
CMAKE_SOURCE_DIR = $(PKG_BUILD_DIR)$(if $(CMAKE_SOURCE_SUBDIR),/$(CMAKE_SOURCE_SUBDIR))
HOST_CMAKE_SOURCE_DIR = $(HOST_BUILD_DIR)$(if $(CMAKE_SOURCE_SUBDIR),/$(CMAKE_SOURCE_SUBDIR))
MAKE_PATH = $(firstword $(CMAKE_BINARY_SUBDIR) .)
ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
@@ -62,14 +62,6 @@ define Build/zyxel-ras-image
&& mv $@.new $@
endef
define Build/mkbuffaloimg
$(STAGING_DIR_HOST)/bin/mkbuffaloimg -B $(BOARDNAME) \
-R $$(($(subst k, * 1024,$(ROOTFS_SIZE)))) \
-K $$(($(subst k, * 1024,$(KERNEL_SIZE)))) \
-i $@ -o $@.new
mv $@.new $@
endef
define Build/netgear-chk
$(STAGING_DIR_HOST)/bin/mkchkimg \
-o $@.new \
@@ -332,7 +324,7 @@ metadata_json = \
define Build/append-metadata
$(if $(SUPPORTED_DEVICES),-echo $(call metadata_json,$(SUPPORTED_DEVICES)) | fwtool -I - $@)
[ ! -s "$(BUILD_KEY)" -o ! -s "$(BUILD_KEY).ucert" ] || { \
[ ! -s "$(BUILD_KEY)" -o ! -s "$(BUILD_KEY).ucert" -o ! -s "$@" ] || { \
cp "$(BUILD_KEY).ucert" "$@.ucert" ;\
usign -S -m "$@" -s "$(BUILD_KEY)" -x "$@.sig" ;\
ucert -A -c "$@.ucert" -x "$@.sig" ;\
@@ -321,6 +321,7 @@ define Device/Init
CMDLINE:=
IMAGES :=
ARTIFACTS :=
IMAGE_PREFIX := $(IMG_PREFIX)-$(1)
IMAGE_NAME = $$(IMAGE_PREFIX)-$$(1)-$$(2)
KERNEL_PREFIX = $$(IMAGE_PREFIX)
@@ -498,6 +499,19 @@ define Device/Build/image
endef
define Device/Build/artifact
$$(_TARGET): $(BIN_DIR)/$(IMAGE_PREFIX)-$(1)
$(KDIR)/tmp/$(IMAGE_PREFIX)-$(1): $$(KDIR_KERNEL_IMAGE)
@rm -f $$@
$$(call concat_cmd,$(ARTIFACT/$(1)))
.IGNORE: $(BIN_DIR)/$(IMAGE_PREFIX)-$(1)
$(BIN_DIR)/$(IMAGE_PREFIX)-$(1): $(KDIR)/tmp/$(IMAGE_PREFIX)-$(1)
cp $$^ $$@
endef
define Device/Build
$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call Device/Build/initramfs,$(1)))
$(call Device/Build/kernel,$(1))
@@ -508,6 +522,10 @@ define Device/Build
$$(eval $$(foreach image,$$(IMAGES), \
$$(foreach fs,$$(filter $(TARGET_FILESYSTEMS),$$(FILESYSTEMS)), \
$$(call Device/Build/image,$$(fs),$$(image),$(1)))))
$$(eval $$(foreach artifact,$$(ARTIFACTS), \
$$(call Device/Build/artifact,$$(artifact))))
endef
define Device/DumpInfo
@@ -21,16 +21,22 @@ export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include
# defined in quilt.mk
Kernel/Patch:=$(Kernel/Patch/Default)
ifneq (,$(findstring .xz,$(LINUX_SOURCE)))
LINUX_CAT:=xzcat
else
LINUX_CAT:=zcat
endif
ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
define Kernel/Prepare/Default
xzcat $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
$(LINUX_CAT) $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
$(Kernel/Patch)
$(if $(QUILT),touch $(LINUX_DIR)/.quilt_used)
endef
else
define Kernel/Prepare/Default
xzcat $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
$(LINUX_CAT) $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
endef
endif
else
@@ -59,10 +59,16 @@ else
LINUX_KERNEL:=$(KERNEL_BUILD_DIR)/vmlinux
LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.xz
TESTING:=$(if $(findstring -rc,$(LINUX_VERSION)),/testing,)
ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
LINUX_SITE:=@KERNEL/linux/kernel/v$(word 1,$(subst ., ,$(KERNEL_BASE))).x$(TESTING)
ifneq (,$(findstring -rc,$(LINUX_VERSION)))
LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.gz
else
LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.xz
endif
ifneq (,$(findstring -rc,$(LINUX_VERSION)))
LINUX_SITE:=https://git.kernel.org/torvalds/t
else ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
LINUX_SITE:=@KERNEL/linux/kernel/v$(word 1,$(subst ., ,$(KERNEL_BASE))).x
else
LINUX_UNAME_VERSION:=$(strip $(shell cat $(LINUX_DIR)/include/config/kernel.release 2>/dev/null))
endif
@@ -97,7 +103,7 @@ endif
KERNEL_MAKE = $(MAKE) $(KERNEL_MAKEOPTS)
KERNEL_MAKE_FLAGS := \
KERNEL_MAKE_FLAGS = \
HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \
CROSS_COMPILE="$(KERNEL_CROSS)" \
ARCH="$(LINUX_KARCH)" \
@@ -254,6 +260,7 @@ $(call KernelPackage/$(1)/config)
$$(eval $$(call BuildPackage,kmod-$(1)))
$$(IPKG_kmod-$(1)): $$(wildcard $$(FILES))
endef
version_filter=$(if $(findstring @,$(1)),$(shell $(SCRIPT_DIR)/package-metadata.pl version_filter $(KERNEL_PATCHVER) $(1)),$(1))
@@ -27,7 +27,7 @@ $(eval $(call TestHostCommand,proper-umask, \
umask | grep -xE 00[012][012]))
$(eval $(call SetupHostCommand,gcc, \
Please install the GNU C Compiler (gcc) 4.8 or later \
Please install the GNU C Compiler (gcc) 4.8 or later, \
$(CC) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?)', \
gcc -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?)', \
gcc48 --version | grep gcc, \
@@ -89,7 +89,6 @@ endef
define Build/Patch/Default
$(if $(QUILT),rm -rf $(PKG_BUILD_DIR)/patches; mkdir -p $(PKG_BUILD_DIR)/patches)
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR),)
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)-$(KERNVER))
$(if $(QUILT),touch $(PKG_BUILD_DIR)/.quilt_used)
endef
@@ -90,6 +90,7 @@ define prepare_rootfs
rm -f $(1)/opt/lib/opkg/lists/*
rm -f $(1)/opt/lib/opkg/info/*.postinst*
rm -f $(1)/var/lock/*.lock
rm -rf $(1)/boot
$(call clean_ipkg,$(1))
$(call mklibs,$(1))
endef
@@ -51,11 +51,15 @@ else
endif
endif
ifneq ($(filter 3.18 4.9,$(KERNEL_PATCHVER)),)
DEFAULT_PACKAGES.router:=$(filter-out kmod-ipt-offload,$(DEFAULT_PACKAGES.router))
endif
# Add device specific packages (here below to allow device type set from subtarget)
DEFAULT_PACKAGES += $(DEFAULT_PACKAGES.$(DEVICE_TYPE))
filter_packages = $(filter-out -% $(patsubst -%,%,$(filter -%,$(1))),$(1))
extra_packages = $(if $(filter wpad-mini wpad nas,$(1)),iwinfo)
extra_packages = $(if $(filter wpad-mini wpad-basic wpad nas,$(1)),iwinfo)
define ProfileDefault
NAME:=

0 comments on commit 4913225

Please sign in to comment.