Permalink
Browse files

include/*: sync with Entware-ng

  • Loading branch information...
The-BB committed Oct 11, 2017
1 parent acdb1d9 commit a47e196ceed9736e0cb7464b0a90db2c6a7f32b4
Showing with 58 additions and 30 deletions.
  1. +39 −1 include/image-commands.mk
  2. +1 −0 include/image-legacy.mk
  3. +13 −5 include/quilt.mk
  4. +0 −22 include/shell.sh
  5. +3 −1 include/target.mk
  6. +2 −1 include/toplevel.mk
View
@@ -44,6 +44,11 @@ define Build/buffalo-dhp-image
mv $@.new $@
endef
define Build/eva-image
$(STAGING_DIR_HOST)/bin/lzma2eva $(KERNEL_LOADADDR) $(KERNEL_LOADADDR) $@ $@.new
mv $@.new $@
endef
define Build/netgear-chk
$(STAGING_DIR_HOST)/bin/mkchkimg \
-o $@.new \
@@ -62,6 +67,16 @@ define Build/netgear-dni
mv $@.new $@
endef
define Build/append-squashfs-fakeroot-be
rm -rf $@.fakefs $@.fakesquashfs
mkdir $@.fakefs
$(STAGING_DIR_HOST)/bin/mksquashfs-lzma \
$@.fakefs $@.fakesquashfs \
-noappend -root-owned -be -nopad -b 65536 \
$(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
cat $@.fakesquashfs >> $@
endef
# append a fake/empty rootfs uImage header, to fool the bootloaders
# rootfs integrity check
define Build/append-uImage-fakeroot-hdr
@@ -76,7 +91,7 @@ endef
define Build/tplink-safeloader
-$(STAGING_DIR_HOST)/bin/tplink-safeloader \
-B $(TPLINK_BOARD_NAME) \
-B $(TPLINK_BOARD_ID) \
-V $(REVISION) \
-k $(IMAGE_KERNEL) \
-r $@ \
@@ -218,6 +233,29 @@ define Build/sysupgrade-tar
$@
endef
define Build/tplink-v1-header
$(STAGING_DIR_HOST)/bin/mktplinkfw \
-c -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -L $(KERNEL_LOADADDR) \
-E $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
-m $(TPLINK_HEADER_VERSION) -N "$(VERSION_DIST)" -V $(REVISION) \
-k $@ -o $@.new $(1)
@mv $@.new $@
endef
define Build/tplink-v2-header
$(STAGING_DIR_HOST)/bin/mktplinkfw2 \
-c -V "ver. 2.0" -B $(TPLINK_BOARD_ID) $(1) -k $@ -o $@.new
@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
cat $@.new >> $@
rm -rf $@.new
endef
json_quote=$(subst ','\'',$(subst ",\",$(1)))
#")')
metadata_devices=$(if $(1),$(subst "$(space)","$(comma)",$(strip $(foreach v,$(1),"$(call json_quote,$(v))"))))
View
@@ -48,6 +48,7 @@ endef
ifdef TARGET_PER_DEVICE_ROOTFS
define Image/Build/Profile/Filesystem
cp $(KDIR)/root.$(2)+pkg=$(3) $(KDIR)/root.$(2)
$(call Image/Build/$(2),$(2))
$(call Image/Build/Profile,$(1),$(2))
endef
else
View
@@ -8,6 +8,11 @@ ifeq ($(TARGET_BUILD),1)
PKG_BUILD_DIR:=$(LINUX_DIR)
endif
ifneq ($(filter host-refresh refresh,$(MAKECMDGOALS)),)
override QUILT=1
override HOST_QUILT=1
endif
ifneq ($(PKG_BUILD_DIR),)
QUILT?=$(if $(wildcard $(PKG_BUILD_DIR)/.quilt_used),y)
ifneq ($(QUILT),)
@@ -36,11 +41,6 @@ FILES_DIR?=./files
HOST_PATCH_DIR?=$(PATCH_DIR)
HOST_FILES_DIR?=$(FILES_DIR)
ifneq ($(filter host-refresh refresh,$(MAKECMDGOALS)),)
override QUILT=1
override HOST_QUILT=1
endif
QUILT_CMD:=quilt --quiltrc=-
define filter_series
@@ -97,7 +97,13 @@ define Kernel/Patch/Default
$(if $(QUILT),rm -rf $(PKG_BUILD_DIR)/patches; mkdir -p $(PKG_BUILD_DIR)/patches)
$(if $(kernel_files),$(CP) $(kernel_files) $(LINUX_DIR)/)
find $(LINUX_DIR)/ -name \*.rej -or -name \*.orig | $(XARGS) rm -f
if [ -d $(GENERIC_PLATFORM_DIR)/patches$(if $(wildcard $(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER)) ]; then \
echo "generic patches directory is present. please move your patches to the pending directory" ; \
exit 1; \
fi
$(call PatchDir,$(PKG_BUILD_DIR),$(GENERIC_BACKPORT_DIR),generic-backport/)
$(call PatchDir,$(PKG_BUILD_DIR),$(GENERIC_PATCH_DIR),generic/)
$(call PatchDir,$(PKG_BUILD_DIR),$(GENERIC_HACK_DIR),generic-hack/)
$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR),platform/)
endef
@@ -124,7 +130,9 @@ define Quilt/Refresh/Kernel
echo "All kernel patches must start with either generic/ or platform/"; \
false; \
}
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(GENERIC_BACKPORT_DIR),generic-backport/)
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(GENERIC_PATCH_DIR),generic/)
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(GENERIC_HACK_DIR),generic-hack/)
$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR),platform/)
endef
View
@@ -13,25 +13,3 @@ isset() {
eval "var=\"\${$1}\""
[ -n "$var" ]
}
trapret() {(
local retvals="$1"; shift
local cmd="$1"; shift
for retval in $(echo $retvals); do
local trap_$retval=1
done
"$cmd" "$@" || {
local retval="$?"
eval "trapped=\${trap_$retval}"
[ -n "$trapped" ] || {
return $retval
}
}
)}
md5s() {
cat "$@" | (
md5sum 2>/dev/null ||
md5
) | awk '{print $1}'
}
View
@@ -104,7 +104,9 @@ ifneq ($(TARGET_BUILD)$(if $(DUMP),,1),)
endif
GENERIC_PLATFORM_DIR := $(TOPDIR)/target/linux/generic
GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/patches$(if $(wildcard $(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER))
GENERIC_BACKPORT_DIR := $(GENERIC_PLATFORM_DIR)/backport$(if $(wildcard $(GENERIC_PLATFORM_DIR)/backport-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER))
GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/pending$(if $(wildcard $(GENERIC_PLATFORM_DIR)/pending-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER))
GENERIC_HACK_DIR := $(GENERIC_PLATFORM_DIR)/hack$(if $(wildcard $(GENERIC_PLATFORM_DIR)/hack-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER))
GENERIC_FILES_DIR := $(foreach dir,$(wildcard $(GENERIC_PLATFORM_DIR)/files $(GENERIC_PLATFORM_DIR)/files-$(KERNEL_PATCHVER)),"$(dir)")
__config_name_list = $(1)/config-$(KERNEL_PATCHVER) $(1)/config-default
View
@@ -23,6 +23,7 @@ HOSTCC ?= $(CC)
export REVISION
export SOURCE_DATE_EPOCH
export GIT_CONFIG_PARAMETERS='core.autocrlf=false'
export GIT_ASKPASS:=/bin/true
export MAKE_JOBSERVER=$(filter --jobserver%,$(MAKEFLAGS))
export GNU_HOST_NAME:=$(shell $(TOPDIR)/scripts/config.guess)
export HOST_OS:=$(shell uname)
@@ -176,7 +177,7 @@ else
DOWNLOAD_DIRS = package/download
endif
download: .config FORCE
download: .config FORCE $(if $(wildcard $(TOPDIR)/staging_dir/host/bin/flock),,tools/flock/compile)
@+$(foreach dir,$(DOWNLOAD_DIRS),$(SUBMAKE) $(dir);)
clean dirclean: .config

0 comments on commit a47e196

Please sign in to comment.