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

Commit

Permalink
sync with LEDE 09.2017
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxmon committed Sep 22, 2017
1 parent 98f7125 commit 9e0af89
Show file tree
Hide file tree
Showing 213 changed files with 6,799 additions and 5,668 deletions.
9 changes: 5 additions & 4 deletions LastSync.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
commit cffeb31107e27a48ddaf4953590acdefc66f2de9
Author: Felix Fietkau <[email protected]>
Date: Mon Apr 3 15:08:28 2017 +0200
commit 9c500db89680af5d89fb679e08452c8f090d804d
Author: Jiawei Wang <[email protected]>
Date: Wed Sep 13 14:04:22 2017 +0800

mac80211: backport an upstream fix for queue start/stop handling
ramips: fix used MAC addresses for Phicomm K2P

7 changes: 4 additions & 3 deletions config/Config-build.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ menu "Global build settings"

config ALL_NONSHARED
bool "Select all target specific packages by default"
default ALL || BUILDBOT
select ALL_KMODS
default BUILDBOT

config ALL_KMODS
bool "Select all kernel module packages by default"
default ALL

config ALL
bool "Select all userspace packages by default"
default n
select ALL_KMODS
select ALL_NONSHARED

config BUILDBOT
bool "Set build defaults for automatic builds (e.g. via buildbot)"
Expand Down
2 changes: 1 addition & 1 deletion config/Config-images.in
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ menu "Target Images"

config TARGET_IMAGES_GZIP
bool "GZip images"
depends on TARGET_IMAGES_PAD || TARGET_ROOTFS_EXT4FS
depends on TARGET_IMAGES_PAD || TARGET_ROOTFS_EXT4FS || TARGET_x86
default y

comment "Image Options"
Expand Down
16 changes: 11 additions & 5 deletions config/Config-kernel.in
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ config KERNEL_ARM_PMU
depends on (arm || arm64)

config KERNEL_PERF_EVENTS
bool
bool "Compile the kernel with performance events and counters"
default n
select KERNEL_ARM_PMU if (arm || arm64)

Expand Down Expand Up @@ -170,10 +170,6 @@ config KERNEL_AIO
bool "Compile the kernel with asynchronous IO support"
default n

config KERNEL_DIRECT_IO
bool "Compile the kernel with direct IO support"
default n

config KERNEL_FHANDLE
bool "Compile the kernel with support for fhandle syscalls"
default n
Expand Down Expand Up @@ -235,6 +231,16 @@ config KERNEL_RELAY
config KERNEL_KEXEC
bool "Enable kexec support"

config KERNEL_PROC_VMCORE
bool

config KERNEL_CRASH_DUMP
depends on i386 || x86_64 || arm || armeb
select KERNEL_KEXEC
select KERNEL_PROC_VMCORE
bool "Enable support for kexec crashdump"
default y

config USE_RFKILL
bool "Enable rfkill support"
default RFKILL_SUPPORT
Expand Down
40 changes: 39 additions & 1 deletion include/image-commands.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand All @@ -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 $@ \
Expand Down Expand Up @@ -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))"))))
Expand Down
1 change: 1 addition & 0 deletions include/image-legacy.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 13 additions & 5 deletions include/quilt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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),)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down
22 changes: 0 additions & 22 deletions include/shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
}
4 changes: 3 additions & 1 deletion include/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion include/toplevel.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
9 changes: 1 addition & 8 deletions package/boot/kexec-tools/Config.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
menu "Configuration"
depends on PACKAGE_kexec-tools

config KEXEC_TOOLS_kdump
bool
prompt "kdump support"
default n
help
Include the kdump utility.
depends on PACKAGE_kexec

config KEXEC_ZLIB
bool
Expand Down
66 changes: 50 additions & 16 deletions package/boot/kexec-tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,62 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=kexec-tools
PKG_VERSION:=2.0.14-rc1
PKG_VERSION:=2.0.14
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kexec
PKG_HASH:=3fc505ff8d8a2d24c68aac5e6b4783997d5a086966ff3de8b05a0ceb27e5e23b
PKG_HASH:=ffb2e7e99d9d08754c6bc1922aed3c000094f318665d82a72ecc76c4ff1c0dc6

PKG_FIXUP:=autoreconf

PKG_CONFIG_DEPENDS := CONFIG_KEXEC_ZLIB CONFIG_KEXEC_LZMA

include $(INCLUDE_DIR)/package.mk

define Package/kexec-tools
define Package/kexec-tools/Default
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=@armeb||@arm||@i386||@x86_64||@powerpc64||@mipsel||@mips +KEXEC_ZLIB:zlib +KEXEC_LZMA:liblzma
TITLE:=Kernel boots kernel
URL:=http://kernel.org/pub/linux/kernel/people/horms/kexec-tools/
MAINTAINER:=Florian Fainelli <[email protected]>
MENU:=1
endef

define Package/kexec-tools
$(call Package/kexec-tools/Default)
TITLE:=kexec-tools transition meta package
DEPENDS:=+kexec
endef

define Package/kexec-tools/description
kexec is a set of systems call that allows you to load
kexec is a set of system calls that allows you to load
another kernel from the currently executing Linux kernel.
The kexec utility allows to load and boot another kernel.
endef

define Package/kexec
$(call Package/kexec-tools/Default)
TITLE:=Kernel boots kernel
DEPENDS:=\
@armeb||@arm||@i386||@x86_64||@powerpc64||@mipsel||@mips \
+KEXEC_ZLIB:zlib +KEXEC_LZMA:liblzma
endef

define Package/kexec/description
The kexec utility allows to load and boot another kernel.
endef

define Package/kexec-tools/config
define Package/kdump
$(call Package/kexec-tools/Default)
TITLE:=Kernel crash analysis
DEPENDS:=+kexec @i386||@x86_64||@arm @KERNEL_CRASH_DUMP
endef

define Package/kdump/description
The kdump package allows to automatically boot into a
special kernel for analyzing kernel crashes using kdump.
endef

define Package/kexec/config
source "$(SOURCE)/Config.in"
endef

Expand Down Expand Up @@ -65,20 +92,27 @@ CONFIGURE_VARS += \
BUILD_CC="$(HOSTCC)" \
TARGET_CC="$(TARGET_CC)"

kexec-extra-sbin-$(CONFIG_KEXEC_TOOLS_kdump) += kdump

define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
endef

define Package/kexec-tools/install
:
endef

define Package/kexec/install
$(INSTALL_DIR) $(1)/opt/sbin
$(INSTALL_BIN) \
$(addprefix $(PKG_INSTALL_DIR)/opt/sbin/, \
$(kexec-extra-sbin-y)) \
$(kexec-extra-bin-y) \
$(PKG_INSTALL_DIR)/opt/sbin/kexec \
$(1)/opt/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/opt/sbin/kexec $(1)/opt/sbin
endef

define Package/kdump/install
$(INSTALL_DIR) $(1)/opt/sbin $(1)/etc/config
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/opt/sbin/kdump $(PKG_INSTALL_DIR)/opt/sbin/vmcore-dmesg $(1)/opt/sbin
$(INSTALL_BIN) ./files/kdump.defaults $(1)/etc/uci-defaults/kdump
$(INSTALL_CONF) ./files/kdump.config $(1)/etc/config/kdump
endef


$(eval $(call BuildPackage,kexec-tools))
$(eval $(call BuildPackage,kexec))
$(eval $(call BuildPackage,kdump))
7 changes: 7 additions & 0 deletions package/boot/kexec-tools/files/kdump.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

config kdump
option enabled '1'
option save_dmesg '1'
option save_vmcore '0'
# using an external partition to store vmcore is highly recommended!
# option path '/mnt/crashdump'
11 changes: 11 additions & 0 deletions package/boot/kexec-tools/files/kdump.defaults
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

case $(uname -m) in
i?86|x86_64)
if ! grep -q crashkernel /boot/grub/grub.cfg; then
mount /boot -o remount,rw
sed -i 's/linux.*/& crashkernel=32M@32M/' /boot/grub/grub.cfg
mount /boot -o remount,ro
fi
;;
esac
Loading

0 comments on commit 9e0af89

Please sign in to comment.