Browse Source

Fresh pull from upstream

RISCi_ATOM 2 years ago
parent
commit
71a6d1298d
100 changed files with 3129 additions and 1223 deletions
  1. 6 0
      Makefile
  2. 0 53
      config/Config-build.in
  3. 1 2
      config/Config-images.in
  4. 22 0
      config/Config-kernel.in
  5. 1 1
      include/depends.mk
  6. 112 20
      include/download.mk
  7. 12 27
      include/host-build.mk
  8. 5 0
      include/image-commands.mk
  9. 3 3
      include/image-legacy.mk
  10. 9 7
      include/image.mk
  11. 1 1
      include/kernel-build.mk
  12. 1 1
      include/kernel-defaults.mk
  13. 5 7
      include/kernel-version.mk
  14. 10 1
      include/kernel.mk
  15. 1 4
      include/netfilter.mk
  16. 9 0
      include/package-ipkg.mk
  17. 17 29
      include/package.mk
  18. 4 17
      include/prereq-build.mk
  19. 2 1
      include/quilt.mk
  20. 2 2
      include/scan.mk
  21. 0 22
      include/shell.sh
  22. 1 1
      include/subdir.mk
  23. 4 1
      include/toplevel.mk
  24. 2 7
      include/unpack.mk
  25. 1 1
      include/version.mk
  26. 7 29
      package/Makefile
  27. 1 1
      package/base-files/Makefile
  28. 1 1
      package/base-files/files/bin/config_generate
  29. 1 1
      package/base-files/files/etc/profile
  30. 5 0
      package/base-files/files/lib/functions.sh
  31. 92 1
      package/base-files/files/lib/upgrade/common.sh
  32. 14 44
      package/base-files/image-config.in
  33. 1 1
      package/devel/binutils/Makefile
  34. 1 1
      package/devel/gdb-arc/Makefile
  35. 1 1
      package/devel/gdb/Makefile
  36. 0 16
      package/devel/gdb/patches/002-remove-arguments.patch
  37. 2 2
      package/devel/strace/Makefile
  38. 1 3
      package/devel/strace/patches/100-workaround--pt-reg-collisions-ppc.patch
  39. 1 3
      package/devel/trace-cmd/Makefile
  40. 1 1
      package/devel/valgrind/Makefile
  41. 30 0
      package/kernel/hwmon-gsc/Makefile
  42. 1 0
      package/kernel/hwmon-gsc/src/Makefile
  43. 308 0
      package/kernel/hwmon-gsc/src/gsc.c
  44. 5 7
      package/kernel/kmod-sched-cake/Makefile
  45. 1 2
      package/kernel/linux/Makefile
  46. 0 19
      package/kernel/linux/modules/block.mk
  47. 22 90
      package/kernel/linux/modules/crypto.mk
  48. 3 3
      package/kernel/linux/modules/fs.mk
  49. 24 9
      package/kernel/linux/modules/hwmon.mk
  50. 0 47
      package/kernel/linux/modules/i2c.mk
  51. 17 9
      package/kernel/linux/modules/lib.mk
  52. 33 51
      package/kernel/linux/modules/netdevices.mk
  53. 22 0
      package/kernel/linux/modules/netfilter.mk
  54. 4 137
      package/kernel/linux/modules/other.mk
  55. 47 8
      package/kernel/linux/modules/pcmcia.mk
  56. 0 17
      package/kernel/linux/modules/spi.mk
  57. 4 234
      package/kernel/linux/modules/usb.mk
  58. 1 1
      package/kernel/linux/modules/w1.mk
  59. 94 11
      package/kernel/mac80211/Makefile
  60. 36 1
      package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
  61. 1 1
      package/kernel/mac80211/patches/004-fix_duplicate_skcipher_backport.patch
  62. 3 2
      package/kernel/mac80211/patches/315-ath9k_hw-issue-external-reset-for-QCA955x.patch
  63. 1 1
      package/kernel/mac80211/patches/325-ath9k-fix-ath9k_hw_gpio_get-to-return-0-or-1-on-succ.patch
  64. 65 0
      package/kernel/mac80211/patches/329-ath9k-unlock-rcu-read-when-returning-early.patch
  65. 196 0
      package/kernel/mac80211/patches/334-mac80211-minstrel_ht-move-supported-bitrate-mask-out.patch
  66. 70 0
      package/kernel/mac80211/patches/335-mac80211-minstrel_ht-move-short-preamble-check-out-o.patch
  67. 22 0
      package/kernel/mac80211/patches/336-mac80211-minstrel_ht-make-att_hist-and-succ_hist-u32.patch
  68. 34 0
      package/kernel/mac80211/patches/337-mac80211-check-for-MCS-in-ieee80211_duration-before-.patch
  69. 192 0
      package/kernel/mac80211/patches/338-mac80211-minstrel-remove-cur_prob-from-debugfs.patch
  70. 22 0
      package/kernel/mac80211/patches/339-mac80211-minstrel-reduce-MINSTREL_SCALE.patch
  71. 186 0
      package/kernel/mac80211/patches/340-mac80211-minstrel-store-probability-variance-instead.patch
  72. 20 0
      package/kernel/mac80211/patches/341-mac80211-minstrel-make-prob_ewma-u16-instead-of-u32.patch
  73. 80 0
      package/kernel/mac80211/patches/342-mac80211-minstrel_ht-remove-obsolete-if-for-3-stream.patch
  74. 150 0
      package/kernel/mac80211/patches/343-cfg80211-limit-scan-results-cache-size.patch
  75. 23 0
      package/kernel/mac80211/patches/346-ath5k-drop-bogus-warning-on-drv_set_key-with-unsuppo.patch
  76. 101 0
      package/kernel/mac80211/patches/347-0001-cfg80211-move-function-checking-range-fit-to-util.c.patch
  77. 211 0
      package/kernel/mac80211/patches/347-0002-cfg80211-support-ieee80211-freq-limit-DT-property.patch
  78. 26 0
      package/kernel/mac80211/patches/347-ath9k-don-t-run-periodic-and-nf-calibation-at-the-sa.patch
  79. 3 2
      package/kernel/mac80211/patches/400-ath_move_debug_code.patch
  80. 1 1
      package/kernel/mac80211/patches/401-ath9k_blink_default.patch
  81. 1 1
      package/kernel/mac80211/patches/410-ath9k_allow_adhoc_and_ap.patch
  82. 1 1
      package/kernel/mac80211/patches/501-ath9k_ahb_init.patch
  83. 1 1
      package/kernel/mac80211/patches/530-ath9k_extra_leds.patch
  84. 0 28
      package/kernel/mac80211/patches/541-ath9k_rx_dma_stop_check.patch
  85. 2 2
      package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch
  86. 3 3
      package/kernel/mac80211/patches/543-ath9k_entropy_from_adc.patch
  87. 4 4
      package/kernel/mac80211/patches/544-ath9k-ar933x-usb-hang-workaround.patch
  88. 23 27
      package/kernel/mac80211/patches/556-ath9k-define-all-EEPROM-fields-in-Little-Endian-form.patch
  89. 0 77
      package/kernel/mmc_over_gpio/Makefile
  90. 0 8
      package/kernel/mmc_over_gpio/files/mmc_over_gpio.config
  91. 0 83
      package/kernel/mmc_over_gpio/files/mmc_over_gpio.init
  92. 33 0
      package/kernel/rtc-rv5c386a/Makefile
  93. 18 0
      package/kernel/rtc-rv5c386a/src/Makefile
  94. 613 0
      package/kernel/rtc-rv5c386a/src/rtc.c
  95. 1 1
      package/libs/argp-standalone/Makefile
  96. 4 3
      package/libs/cyassl/Makefile
  97. 5 3
      package/libs/elfutils/Makefile
  98. 0 14
      package/libs/elfutils/patches/004-memcpy_def.patch
  99. 1 1
      package/libs/elfutils/patches/006-libdw_LIBS.patch
  100. 0 0
      package/libs/elfutils/patches/007-fix_TEMP_FAILURE_RETRY.patch

+ 6 - 0
Makefile

@@ -44,6 +44,7 @@ $(target/stamp-compile): $(toolchain/stamp-install) $(tools/stamp-install) $(BUI
 $(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
@@ -86,9 +87,14 @@ prereq: $(target/stamp-prereq) tmp/.prereq_packages
 checksum: FORCE
 	$(call sha256sums,$(BIN_DIR))
 
+diffconfig: FORCE
+	mkdir -p $(BIN_DIR)
+	$(SCRIPT_DIR)/diffconfig.sh > $(BIN_DIR)/config.seed
+
 prepare: .config $(tools/stamp-install) $(toolchain/stamp-install)
 world: prepare $(target/stamp-compile) $(package/stamp-compile) $(package/stamp-install) $(target/stamp-install) 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

+ 0 - 53
config/Config-build.in

@@ -87,59 +87,6 @@ menu "Global build settings"
 		help
 		  Enables IPv6 support in kernel (builtin) and packages.
 
-	config PKG_BUILD_PARALLEL
-		bool
-		prompt "Compile certain packages parallelized"
-		default y
-		help
-		  This adds a -jX option to certain packages that are known to behave well
-		  for parallel build. By default, the package make processes use the main
-		  jobserver, in which case this option only takes effect when you add -jX
-		  to the make command.
-
-		  If you are unsure, select N.
-
-	config PKG_BUILD_USE_JOBSERVER
-		bool
-		prompt "Use top-level make jobserver for packages"
-		depends on PKG_BUILD_PARALLEL
-		default y
-		help
-		  This passes the main make process jobserver fds to package builds,
-		  enabling full parallelization across different packages.
-
-		  Note that disabling this may overcommit CPU resources depending on the
-		  -j level of the main make process, the number of package submake jobs
-		  selected below and the number of actual CPUs present.
-		  Example: If the main make is passed a -j4 and the submake -j
-		  is also set to 4, we may end up with 16 parallel make processes
-		  in the worst case.
-
-	config PKG_BUILD_JOBS
-		int
-		prompt "Number of package submake jobs (2-512)"
-		range 2 512
-		default 2
-		depends on PKG_BUILD_PARALLEL && !PKG_BUILD_USE_JOBSERVER
-		help
-		  The number of jobs (-jX) to pass to packages submake.
-
-	config PKG_DEFAULT_PARALLEL
-		bool
-		prompt "Parallelize the default package build rule (May break build)"
-		depends on PKG_BUILD_PARALLEL
-		depends on BROKEN
-		default n
-		help
-		  Always set the default package build rules to parallel build.
-
-		  WARNING: This may break build or kill your cat, as it builds packages
-		  with multiple jobs that are probably not tested in a parallel build
-		  environment.
-
-		  Only say Y if you don't mind fixing broken packages.  Before reporting
-		  build bugs, set this to N and re-run the build.
-
 	comment "Stripping options"
 
 	choice

+ 1 - 2
config/Config-images.in

@@ -253,8 +253,7 @@ menu "Target Images"
 	config TARGET_ROOTFS_PARTSIZE
 		int "Root filesystem partition size (in MB)"
 		depends on GRUB_IMAGES || TARGET_ROOTFS_EXT4FS || TARGET_rb532 || TARGET_mvebu || TARGET_uml
-		default 2048 if TARGET_x86
-		default 256 if ! TARGET_x86
+		default 256
 		help
 		  Select the root filesystem partition size.
 

+ 22 - 0
config/Config-kernel.in

@@ -190,6 +190,14 @@ config KERNEL_MAGIC_SYSRQ
 	bool "Compile the kernel with SysRq support"
 	default y
 
+config KERNEL_DEBUG_PINCTRL
+	bool "Compile the kernel with pinctrl debugging"
+	select KERNEL_DEBUG_KERNEL
+
+config KERNEL_DEBUG_GPIO
+	bool "Compile the kernel with gpio debugging"
+	select KERNEL_DEBUG_KERNEL
+
 config KERNEL_COREDUMP
 	bool
 
@@ -737,3 +745,17 @@ menu "Filesystem ACL and attr support options"
 		default y if USE_FS_ACL_ATTR
 
 endmenu
+
+config KERNEL_DEVMEM
+	bool "/dev/mem virtual device support"
+	help
+	  Say Y here if you want to support the /dev/mem device.
+	  The /dev/mem device is used to access areas of physical
+	  memory.
+
+config KERNEL_DEVKMEM
+	bool "/dev/kmem virtual device support"
+	help
+	  Say Y here if you want to support the /dev/kmem device. The
+	  /dev/kmem device is rarely used, but can be used for certain
+	  kind of kernel debugging operations.

+ 1 - 1
include/depends.mk

@@ -13,7 +13,7 @@
 
 DEP_FINDPARAMS := -x "*/.svn*" -x ".*" -x "*:*" -x "*\!*" -x "* *" -x "*\\\#*" -x "*/.*_check" -x "*/.*.swp"
 
-find_md5=$(SH_FUNC) find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) | md5s
+find_md5=find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) | mkhash md5
 
 define rdep
   .PRECIOUS: $(2)

+ 112 - 20
include/download.mk

@@ -9,6 +9,12 @@
 OPENWRT_GIT = http://git.openwrt.org
 LEDE_GIT = https://git.lede-project.org
 
+ifdef PKG_SOURCE_VERSION
+PKG_VERSION ?= $(if $(PKG_SOURCE_DATE),$(PKG_SOURCE_DATE)-)$(call version_abbrev,$(PKG_SOURCE_VERSION))
+PKG_SOURCE_SUBDIR ?= $(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE ?= $(PKG_SOURCE_SUBDIR).tar.xz
+endif
+
 DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED)
 
 # Try to guess the download method from the URL
@@ -33,28 +39,94 @@ $(strip \
 endef
 
 # code for creating tarballs from cvs/svn/git/bzr/hg/darcs checkouts - useful for mirror support
-dl_pack/bz2=$(TAR) --owner=0 --group=0 --sort=name $$$${TAR_TIMESTAMP:+--mtime="$$$$TAR_TIMESTAMP"} -cjf $(1) $(2)
-dl_pack/gz=$(TAR) --owner=0 --group=0 --sort=name $$$${TAR_TIMESTAMP:+--mtime="$$$$TAR_TIMESTAMP"} -c $(2) | gzip -nc > $(1)
-dl_pack/xz=$(TAR) --owner=0 --group=0 --sort=name $$$${TAR_TIMESTAMP:+--mtime="$$$$TAR_TIMESTAMP"} -c $(2) | xz -zc -7e > $(1)
-dl_pack/unknown=echo "ERROR: Unknown pack format for file $(1)"; false
+dl_pack/bz2=bzip2 -c > $(1)
+dl_pack/gz=gzip -nc > $(1)
+dl_pack/xz=xz -zc -7e > $(1)
+dl_pack/unknown=$(error ERROR: Unknown pack format for file $(1))
 define dl_pack
 	$(if $(dl_pack/$(call ext,$(1))),$(dl_pack/$(call ext,$(1))),$(dl_pack/unknown))
 endef
+define dl_tar_pack
+	$(TAR) --numeric-owner --owner=0 --group=0 --sort=name $$$${TAR_TIMESTAMP:+--mtime="$$$$TAR_TIMESTAMP"} -c $(2) | $(call dl_pack,$(1))
+endef
+
+ifdef CHECK
+check_escape=$(subst ','\'',$(1))
+#')
+
+check_warn_nofix = $(info $(shell printf "$(_R)WARNING: %s$(_N)" '$(call check_escape,$(call C_$(1),$(2),$(3),$(4)))'))
+ifndef FIXUP
+  check_warn = $(check_warn_nofix)
+else
+  check_warn = $(if $(filter-out undefined,$(origin F_$(1))),$(filter ,$(shell $(call F_$(1),$(2),$(3),$(4)) >&2)),$(check_warn_nofix))
+endif
+
+gen_sha256sum = $(shell mkhash sha256 $(DL_DIR)/$(1))
+
+ifdef FIXUP
+F_hash_deprecated = $(SCRIPT_DIR)/fixup-makefile.pl $(CURDIR)/Makefile fix-hash $(3) $(call gen_sha256sum,$(1)) $(2)
+F_hash_mismatch = $(F_hash_deprecated)
+F_hash_missing = $(SCRIPT_DIR)/fixup-makefile.pl $(CURDIR)/Makefile add-hash $(3) $(call gen_sha256sum,$(1))
+endif
+
+C_download_missing = $(1) is missing, please run make download before re-running this check
+C_hash_mismatch = $(3) does not match $(1) hash $(call gen_sha256sum,$(1))
+C_hash_deprecated = $(3) uses deprecated hash, set to $(call gen_sha256sum,$(1))
+C_hash_missing = $(3) is missing, set to $(call gen_sha256sum,$(1))
+
+check_hash = \
+  $(if $(wildcard $(DL_DIR)/$(1)), \
+    $(if $(filter-out x,$(2)), \
+      $(if $(filter 64,$(shell printf '%s' '$(2)' | wc -c)), \
+        $(if $(filter $(2),$(call gen_sha256sum,$(1))),, \
+          $(call check_warn,hash_mismatch,$(1),$(2),$(3)) \
+        ), \
+        $(call check_warn,hash_deprecated,$(1),$(2),$(3)), \
+      ), \
+      $(call check_warn,hash_missing,$(1),$(2),$(3)) \
+    ), \
+    $(call check_warn,download_missing,$(1),$(2),$(3)) \
+  )
+
+ifdef FIXUP
+F_md5_deprecated = $(SCRIPT_DIR)/fixup-makefile.pl $(CURDIR)/Makefile rename-var $(2) $(3)
+endif
+
+C_md5_deprecated = Use of $(2) is deprecated, switch to $(3)
+
+# Skip MD5SUM check in feeds until OpenWrt is updated
+ifneq ($(filter $(foreach dir,package tools toolchain, $(TOPDIR)/$(dir)/%),$(CURDIR)),)
+check_md5 = \
+  $(if $(filter-out x,$(1)), \
+    $(call check_warn,md5_deprecated,$(1),$(2),$(3)) \
+  )
+endif
+
+hash_var = $(if $(filter-out x,$(1)),MD5SUM,HASH)
+endif
 
 define DownloadMethod/unknown
 	@echo "ERROR: No download method available"; false
 endef
 
 define DownloadMethod/default
-	$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(MD5SUM)" "$(URL_FILE)" $(foreach url,$(URL),"$(url)")
+	$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(HASH)" "$(URL_FILE)" $(foreach url,$(URL),"$(url)") \
+	$(if $(filter check,$(1)), \
+		$(call check_hash,$(FILE),$(HASH),$(2)$(call hash_var,$(MD5SUM))) \
+		$(call check_md5,$(MD5SUM),$(2)MD5SUM,$(2)HASH) \
+	)
 endef
 
 define wrap_mirror
-$(if $(if $(MIRROR),$(filter-out x,$(MIRROR_MD5SUM))),$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(MIRROR_MD5SUM)" "" || ( $(1) ),$(1))
+$(if $(if $(MIRROR),$(filter-out x,$(MIRROR_HASH))),$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(MIRROR_HASH)" "" || ( $(3) ),$(3)) \
+$(if $(filter check,$(1)), \
+	$(call check_hash,$(FILE),$(MIRROR_HASH),$(2)MIRROR_$(call hash_var,$(MIRROR_MD5SUM))) \
+	$(call check_md5,$(MIRROR_MD5SUM),$(2)MIRROR_MD5SUM,$(2)MIRROR_HASH) \
+)
 endef
 
 define DownloadMethod/cvs
-	$(call wrap_mirror, \
+	$(call wrap_mirror,$(1),$(2), \
 		echo "Checking out files from the cvs repository..."; \
 		mkdir -p $(TMP_DIR)/dl && \
 		cd $(TMP_DIR)/dl && \
@@ -62,14 +134,14 @@ define DownloadMethod/cvs
 		[ \! -d $(SUBDIR) ] && \
 		cvs -d $(URL) export $(VERSION) $(SUBDIR) && \
 		echo "Packing checkout..." && \
-		$(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
+		$(call dl_tar_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
 		mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
 		rm -rf $(SUBDIR); \
 	)
 endef
 
 define DownloadMethod/svn
-	$(call wrap_mirror, \
+	$(call wrap_mirror,$(1),$(2), \
 		echo "Checking out files from the svn repository..."; \
 		mkdir -p $(TMP_DIR)/dl && \
 		cd $(TMP_DIR)/dl && \
@@ -80,14 +152,14 @@ define DownloadMethod/svn
 		svn export --non-interactive -r$(VERSION) $(URL) $(SUBDIR) ) && \
 		echo "Packing checkout..." && \
 		export TAR_TIMESTAMP="" && \
-		$(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
+		$(call dl_tar_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
 		mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
 		rm -rf $(SUBDIR); \
 	)
 endef
 
 define DownloadMethod/git
-	$(call wrap_mirror, \
+	$(call wrap_mirror,$(1),$(2), \
 		echo "Checking out files from the git repository..."; \
 		mkdir -p $(TMP_DIR)/dl && \
 		cd $(TMP_DIR)/dl && \
@@ -99,14 +171,14 @@ define DownloadMethod/git
 		echo "Packing checkout..." && \
 		export TAR_TIMESTAMP=`cd $(SUBDIR) && git log -1 --format='@%ct'` && \
 		rm -rf $(SUBDIR)/.git && \
-		$(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
+		$(call dl_tar_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
 		mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
 		rm -rf $(SUBDIR); \
 	)
 endef
 
 define DownloadMethod/bzr
-	$(call wrap_mirror, \
+	$(call wrap_mirror,$(1),$(2), \
 		echo "Checking out files from the bzr repository..."; \
 		mkdir -p $(TMP_DIR)/dl && \
 		cd $(TMP_DIR)/dl && \
@@ -115,14 +187,14 @@ define DownloadMethod/bzr
 		bzr export --per-file-timestamps -r$(VERSION) $(SUBDIR) $(URL) && \
 		echo "Packing checkout..." && \
 		export TAR_TIMESTAMP="" && \
-		$(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
+		$(call dl_tar_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
 		mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
 		rm -rf $(SUBDIR); \
 	)
 endef
 
 define DownloadMethod/hg
-	$(call wrap_mirror, \
+	$(call wrap_mirror,$(1),$(2), \
 		echo "Checking out files from the hg repository..."; \
 		mkdir -p $(TMP_DIR)/dl && \
 		cd $(TMP_DIR)/dl && \
@@ -132,14 +204,14 @@ define DownloadMethod/hg
 		export TAR_TIMESTAMP=`cd $(SUBDIR) && hg log --template '@{date}' -l 1` && \
 		find $(SUBDIR) -name .hg | xargs rm -rf && \
 		echo "Packing checkout..." && \
-		$(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
+		$(call dl_tar_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
 		mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
 		rm -rf $(SUBDIR); \
 	)
 endef
 
 define DownloadMethod/darcs
-	$(call wrap_mirror, \
+	$(call wrap_mirror, $(1), $(2), \
 		echo "Checking out files from the darcs repository..."; \
 		mkdir -p $(TMP_DIR)/dl && \
 		cd $(TMP_DIR)/dl && \
@@ -149,7 +221,7 @@ define DownloadMethod/darcs
 		export TAR_TIMESTAMP=`cd $(SUBDIR) && LC_ALL=C darcs log --last 1 | sed -ne 's!^Date: \+!!p'` && \
 		find $(SUBDIR) -name _darcs | xargs rm -rf && \
 		echo "Packing checkout..." && \
-		$(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
+		$(call dl_tar_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
 		mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
 		rm -rf $(SUBDIR); \
 	)
@@ -167,14 +239,29 @@ define Download/Defaults
   FILE:=
   URL_FILE:=
   PROTO:=
-  MD5SUM:=
+  HASH=$$(MD5SUM)
+  MD5SUM:=x
   SUBDIR:=
   MIRROR:=1
+  MIRROR_HASH=$$(MIRROR_MD5SUM)
   MIRROR_MD5SUM:=x
   VERSION:=
   OPTS:=
 endef
 
+define Download/default
+  FILE:=$(PKG_SOURCE)
+  URL:=$(PKG_SOURCE_URL)
+  SUBDIR:=$(PKG_SOURCE_SUBDIR)
+  PROTO:=$(PKG_SOURCE_PROTO)
+  $(if $(PKG_SOURCE_MIRROR),MIRROR:=$(filter 1,$(PKG_MIRROR)))
+  $(if $(PKG_MIRROR_MD5SUM),MIRROR_MD5SUM:=$(PKG_MIRROR_MD5SUM))
+  $(if $(PKG_MIRROR_HASH),MIRROR_HASH:=$(PKG_MIRROR_HASH))
+  VERSION:=$(PKG_SOURCE_VERSION)
+  $(if $(PKG_MD5SUM),MD5SUM:=$(PKG_MD5SUM))
+  $(if $(PKG_HASH),HASH:=$(PKG_HASH))
+endef
+
 define Download
   $(eval $(Download/Defaults))
   $(eval $(Download/$(1)))
@@ -191,6 +278,11 @@ define Download
 
   $(DL_DIR)/$(FILE):
 	mkdir -p $(DL_DIR)
-	$(call locked,$(if $(DownloadMethod/$(call dl_method,$(URL),$(PROTO))),$(DownloadMethod/$(call dl_method,$(URL),$(PROTO))),$(DownloadMethod/unknown)),$(FILE))
+	$(call locked, \
+		$(if $(DownloadMethod/$(call dl_method,$(URL),$(PROTO))), \
+			$(call DownloadMethod/$(call dl_method,$(URL),$(PROTO)),check,$(if $(filter default,$(1)),PKG_,Download/$(1):)), \
+			$(DownloadMethod/unknown) \
+		),\
+		$(FILE))
 
 endef

+ 12 - 27
include/host-build.mk

@@ -5,21 +5,18 @@
 # See /LICENSE for more information.
 #
 
+include $(INCLUDE_DIR)/download.mk
+
 HOST_BUILD_DIR ?= $(BUILD_DIR_HOST)/$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
 HOST_INSTALL_DIR ?= $(HOST_BUILD_DIR)/host-install
 HOST_BUILD_PARALLEL ?=
 
-ifneq ($(CONFIG_PKG_BUILD_USE_JOBSERVER),)
-  HOST_MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) $(if $(filter 3.% 4.0 4.1,$(MAKE_VERSION)),-j))
-else
-  HOST_MAKE_J:=-j$(CONFIG_PKG_BUILD_JOBS)
-endif
+HOST_MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) $(if $(filter 3.% 4.0 4.1,$(MAKE_VERSION)),-j))
 
 ifeq ($(strip $(HOST_BUILD_PARALLEL)),0)
 HOST_JOBS?=-j1
 else
-HOST_JOBS?=$(if $(HOST_BUILD_PARALLEL)$(CONFIG_PKG_DEFAULT_PARALLEL),\
-	$(if $(CONFIG_PKG_BUILD_PARALLEL),$(HOST_MAKE_J),-j1),-j1)
+HOST_JOBS?=$(if $(HOST_BUILD_PARALLEL),$(HOST_MAKE_J),-j1)
 endif
 
 include $(INCLUDE_DIR)/host.mk
@@ -35,7 +32,6 @@ HOST_STAMP_INSTALLED:=$(HOST_BUILD_PREFIX)/stamp/.$(PKG_NAME)_installed
 
 override MAKEFLAGS=
 
-include $(INCLUDE_DIR)/download.mk
 include $(INCLUDE_DIR)/quilt.mk
 include $(INCLUDE_DIR)/autotools.mk
 
@@ -52,17 +48,12 @@ define Host/Prepare
   $(call Host/Prepare/Default)
 endef
 
-ifeq ($(HOST_OS),Darwin)
-  HOST_CFLAGS += -I/usr/local/opt/openssl/include
-  HOST_LDFLAGS += -L/usr/local/opt/openssl/lib
-endif
-
 HOST_CONFIGURE_VARS = \
 	CC="$(HOSTCC)" \
 	CFLAGS="$(HOST_CFLAGS)" \
 	CPPFLAGS="$(HOST_CPPFLAGS)" \
 	LDFLAGS="$(HOST_LDFLAGS)" \
-	SHELL="$(SHELL)"
+	CONFIG_SHELL="$(SHELL)"
 
 HOST_CONFIGURE_ARGS = \
 	--target=$(GNU_HOST_NAME) \
@@ -84,9 +75,9 @@ define Host/Configure/Default
 	$(if $(HOST_CONFIGURE_PARALLEL),+)(cd $(HOST_BUILD_DIR)/$(3); \
 		if [ -x configure ]; then \
 			$(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_BUILD_DIR)/$(3)/ && \
+			$(HOST_CONFIGURE_VARS) \
 			$(2) \
 			$(HOST_CONFIGURE_CMD) \
-			$(HOST_CONFIGURE_VARS) \
 			$(HOST_CONFIGURE_ARGS) \
 			$(1); \
 		fi \
@@ -123,16 +114,6 @@ ifneq ($(if $(HOST_QUILT),,$(CONFIG_AUTOREBUILD)),)
   endef
 endif
 
-define Download/default
-  FILE:=$(PKG_SOURCE)
-  URL:=$(PKG_SOURCE_URL)
-  PROTO:=$(PKG_SOURCE_PROTO)
-  SUBDIR:=$(PKG_SOURCE_SUBDIR)
-  VERSION:=$(PKG_SOURCE_VERSION)
-  MD5SUM:=$(PKG_MD5SUM)
-  MIRROR_MD5SUM:=$(PKG_MIRROR_MD5SUM)
-endef
-
 define Host/Exports/Default
   $(1) : export ACLOCAL_INCLUDE=$$(foreach p,$$(wildcard $$(STAGING_DIR_HOST)/share/aclocal $$(STAGING_DIR_HOST)/share/aclocal-* $(if $(IS_PACKAGE_BUILD),$$(STAGING_DIR)/host/share/aclocal $$(STAGING_DIR)/host/share/aclocal-*)),-I $$(p))
   $(1) : export STAGING_PREFIX=$$(HOST_BUILD_PREFIX)
@@ -146,9 +127,8 @@ Host/Exports=$(Host/Exports/Default)
 .NOTPARALLEL:
 
 ifndef DUMP
-  define HostBuild
+  define HostBuild/Core
   $(if $(HOST_QUILT),$(Host/Quilt))
-  $(if $(if $(PKG_HOST_ONLY),,$(STAMP_PREPARED)),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
   $(if $(DUMP),,$(call HostHost/Autoclean))
 
   $(HOST_STAMP_PREPARED):
@@ -208,3 +188,8 @@ ifndef DUMP
   clean:
 
 endif
+
+define HostBuild
+  $(HostBuild/Core)
+  $(if $(if $(PKG_HOST_ONLY),,$(STAMP_PREPARED)),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
+endef

+ 5 - 0
include/image-commands.mk

@@ -190,3 +190,8 @@ metadata_json = \
 define Build/append-metadata
 	$(if $(SUPPORTED_DEVICES),echo $(call metadata_json,$(SUPPORTED_DEVICES)) | fwtool -I - $@)
 endef
+
+define Build/kernel2minor
+	kernel2minor -k $@ -r $@.new $(1)
+	mv $@.new $@
+endef

+ 3 - 3
include/image-legacy.mk

@@ -15,9 +15,9 @@ ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
 		$(STAGING_DIR_HOST)/bin/mkfs.ubifs \
 			$(if $($(PROFILE)_UBIFS_OPTS),$($(PROFILE)_UBIFS_OPTS),$(UBIFS_OPTS)) \
 			$(if $(CONFIG_TARGET_UBIFS_FREE_SPACE_FIXUP),--space-fixup) \
-			$(if $(CONFIG_TARGET_UBIFS_COMPRESSION_NONE),--force-compr=none) \
-			$(if $(CONFIG_TARGET_UBIFS_COMPRESSION_LZO),--force-compr=lzo) \
-			$(if $(CONFIG_TARGET_UBIFS_COMPRESSION_ZLIB),--force-compr=zlib) \
+			$(if $(CONFIG_TARGET_UBIFS_COMPRESSION_NONE),--compr=none) \
+			$(if $(CONFIG_TARGET_UBIFS_COMPRESSION_LZO),--compr=lzo) \
+			$(if $(CONFIG_TARGET_UBIFS_COMPRESSION_ZLIB),--compr=zlib) \
 			$(if $(shell echo $(CONFIG_TARGET_UBIFS_JOURNAL_SIZE)),--jrn-size=$(CONFIG_TARGET_UBIFS_JOURNAL_SIZE)) \
 			--squash-uids \
 			-o $(KDIR)/root.ubifs \

+ 9 - 7
include/image.mk

@@ -33,16 +33,18 @@ param_get_default = $(firstword $(call param_get,$(1),$(2)) $(3))
 param_mangle = $(subst $(space),_,$(strip $(1)))
 param_unmangle = $(subst _,$(space),$(1))
 
-mkfs_packages_id = $(shell echo $(sort $(1)) | md5sum | head -c 8)
+mkfs_packages_id = $(shell echo $(sort $(1)) | mkhash md5 | head -c 8)
 mkfs_target_dir = $(if $(call param_get,pkg,$(1)),$(KDIR)/target-dir-$(call param_get,pkg,$(1)),$(TARGET_DIR))
 
 KDIR=$(KERNEL_BUILD_DIR)
 KDIR_TMP=$(KDIR)/tmp
 DTS_DIR:=$(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts
 
-EXTRA_NAME_SANITIZED=$(call sanitize,$(EXTRA_IMAGE_NAME))
+IMG_PREFIX_EXTRA:=$(if $(EXTRA_IMAGE_NAME),$(call sanitize,$(EXTRA_IMAGE_NAME))-)
+IMG_PREFIX_VERNUM:=$(if $(CONFIG_VERSION_FILENAMES),$(call sanitize,$(VERSION_NUMBER))-)
+IMG_PREFIX_VERCODE:=$(if $(CONFIG_VERSION_CODE_FILENAMES),$(call sanitize,$(VERSION_CODE))-)
 
-IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(if $(CONFIG_VERSION_FILENAMES),$(VERSION_NUMBER)-)$(if $(EXTRA_NAME_SANITIZED),$(EXTRA_NAME_SANITIZED)-)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
+IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(IMG_PREFIX_EXTRA)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
 
 MKFS_DEVTABLE_OPT := -D $(INCLUDE_DIR)/device_table.txt
 
@@ -195,7 +197,7 @@ define Image/mkfs/squashfs
 	$(STAGING_DIR_HOST)/bin/mksquashfs4 $(call mkfs_target_dir,$(1)) $@ \
 		-nopad -noappend -root-owned \
 		-comp $(SQUASHFSCOMP) $(SQUASHFSOPT) \
-		-processors $(if $(CONFIG_PKG_BUILD_JOBS),$(CONFIG_PKG_BUILD_JOBS),1) \
+		-processors 1 \
 		$(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
 endef
 
@@ -231,9 +233,9 @@ define Image/mkfs/ubifs
 	$(STAGING_DIR_HOST)/bin/mkfs.ubifs \
 		$(UBIFS_OPTS) $(call param_unmangle,$(call param_get,fs,$(1))) \
 		$(if $(CONFIG_TARGET_UBIFS_FREE_SPACE_FIXUP),--space-fixup) \
-		$(if $(CONFIG_TARGET_UBIFS_COMPRESSION_NONE),--force-compr=none) \
-		$(if $(CONFIG_TARGET_UBIFS_COMPRESSION_LZO),--force-compr=lzo) \
-		$(if $(CONFIG_TARGET_UBIFS_COMPRESSION_ZLIB),--force-compr=zlib) \
+		$(if $(CONFIG_TARGET_UBIFS_COMPRESSION_NONE),--compr=none) \
+		$(if $(CONFIG_TARGET_UBIFS_COMPRESSION_LZO),--compr=lzo) \
+		$(if $(CONFIG_TARGET_UBIFS_COMPRESSION_ZLIB),--compr=zlib) \
 		$(if $(shell echo $(CONFIG_TARGET_UBIFS_JOURNAL_SIZE)),--jrn-size=$(CONFIG_TARGET_UBIFS_JOURNAL_SIZE)) \
 		--squash-uids \
 		-o $@ -d $(call mkfs_target_dir,$(1))

+ 1 - 1
include/kernel-build.mk

@@ -43,7 +43,7 @@ endef
 define Download/kernel
   URL:=$(LINUX_SITE)
   FILE:=$(LINUX_SOURCE)
-  MD5SUM:=$(LINUX_KERNEL_MD5SUM)
+  HASH:=$(LINUX_KERNEL_HASH)
 endef
 
 KERNEL_GIT_OPTS:=

+ 1 - 1
include/kernel-defaults.mk

@@ -125,7 +125,7 @@ define Kernel/Configure/Default
 		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
-	$(SH_FUNC) grep '=[ym]' $(LINUX_DIR)/.config.set | LC_ALL=C sort | md5s > $(LINUX_DIR)/.vermagic
+	grep '=[ym]' $(LINUX_DIR)/.config.set | LC_ALL=C sort | mkhash md5 > $(LINUX_DIR)/.vermagic
 endef
 
 define Kernel/Configure/Initramfs

+ 5 - 7
include/kernel-version.mk

@@ -3,12 +3,10 @@
 LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .43
-LINUX_VERSION-4.1 = .34
-LINUX_VERSION-4.4 = .36
+LINUX_VERSION-4.4 = .40
 
-LINUX_KERNEL_MD5SUM-3.18.43 = b1faeb4a2e1e70ffe061bdbb3452840a
-LINUX_KERNEL_MD5SUM-4.1.34 = fba99f0f4765ebf01033e69518740a3c
-LINUX_KERNEL_MD5SUM-4.4.36 = 505548da130599c866d92105a8b04758
+LINUX_KERNEL_HASH-3.18.43 = 1236e8123a6ce537d5029232560966feed054ae31776fe8481dd7d18cdd5492c
+LINUX_KERNEL_HASH-4.4.40 = c381411888dd3a78ed86eefabc7b1e63f5c26aaa803184f3325ef4570d14c94e
 
 ifdef KERNEL_PATCHVER
   LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
@@ -21,5 +19,5 @@ KERNEL=$(call merge_version,$(wordlist 1,2,$(call split_version,$(KERNEL_BASE)))
 KERNEL_PATCHVER ?= $(KERNEL)
 
 # disable the md5sum check for unknown kernel versions
-LINUX_KERNEL_MD5SUM:=$(LINUX_KERNEL_MD5SUM-$(strip $(LINUX_VERSION)))
-LINUX_KERNEL_MD5SUM?=x
+LINUX_KERNEL_HASH:=$(LINUX_KERNEL_HASH-$(strip $(LINUX_VERSION)))
+LINUX_KERNEL_HASH?=x

+ 10 - 1
include/kernel.mk

@@ -5,8 +5,15 @@
 # See /LICENSE for more information.
 #
 
+ifneq ($(filter check,$(MAKECMDGOALS)),)
+CHECK:=1
+DUMP:=1
+endif
+
 ifeq ($(__target_inc),)
-  include $(INCLUDE_DIR)/target.mk
+  ifndef CHECK
+    include $(INCLUDE_DIR)/target.mk
+  endif
 endif
 
 ifeq ($(DUMP),1)
@@ -148,6 +155,7 @@ define KernelPackage
   $(eval $(call KernelPackage/Defaults))
   $(eval $(call KernelPackage/$(1)))
   $(eval $(call KernelPackage/$(1)/$(BOARD)))
+  $(eval $(call KernelPackage/$(1)/$(BOARD)/$(if $(SUBTARGET),$(SUBTARGET),generic)))
 
   define Package/kmod-$(1)
     TITLE:=$(TITLE)
@@ -159,6 +167,7 @@ define KernelPackage
     PKGFLAGS:=$(PKGFLAGS)
     $(call KernelPackage/$(1))
     $(call KernelPackage/$(1)/$(BOARD))
+    $(call KernelPackage/$(1)/$(BOARD)/$(if $(SUBTARGET),$(SUBTARGET),generic))
   endef
 
   ifdef KernelPackage/$(1)/conffiles

+ 1 - 4
include/netfilter.mk

@@ -39,13 +39,12 @@ $(eval $(if $(NF_KMOD),$(call nf_add,IPT_CORE,CONFIG_IP_NF_FILTER, $(P_V4)iptabl
 $(eval $(if $(NF_KMOD),$(call nf_add,IPT_CORE,CONFIG_IP_NF_MANGLE, $(P_V4)iptable_mangle),))
 
 # userland only
-$(eval $(if $(NF_KMOD),,$(call nf_add,IPT_CORE,CONFIG_IP_NF_IPTABLES, xt_standard ipt_icmp xt_tcp xt_udp xt_comment xt_id xt_set xt_SET)))
+$(eval $(if $(NF_KMOD),,$(call nf_add,IPT_CORE,CONFIG_IP_NF_IPTABLES, xt_standard ipt_icmp xt_tcp xt_udp xt_comment xt_set xt_SET)))
 
 $(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MATCH_LIMIT, $(P_XT)xt_limit))
 $(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MATCH_MAC, $(P_XT)xt_mac))
 $(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MATCH_MULTIPORT, $(P_XT)xt_multiport))
 $(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MATCH_COMMENT, $(P_XT)xt_comment))
-$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MATCH_ID, $(P_XT)xt_id))
 
 #cluster
 $(eval $(call nf_add,IPT_CLUSTER,CONFIG_NETFILTER_XT_MATCH_CLUSTER, $(P_XT)xt_cluster))
@@ -72,7 +71,6 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_DEFRAG_IPV4, $(P_V4)
 $(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_CONNTRACK_IPV4, $(P_V4)nf_conntrack_ipv4),))
 
 $(eval $(call nf_add,IPT_CONNTRACK,CONFIG_NETFILTER_XT_MATCH_STATE, $(P_XT)xt_state))
-$(eval $(call nf_add,IPT_CONNTRACK,CONFIG_IP_NF_RAW, $(P_V4)iptable_raw))
 $(eval $(call nf_add,IPT_CONNTRACK,CONFIG_NETFILTER_XT_TARGET_CT, $(P_XT)xt_CT))
 $(eval $(call nf_add,IPT_CONNTRACK,CONFIG_NETFILTER_XT_MATCH_CONNTRACK, $(P_XT)xt_conntrack))
 
@@ -151,7 +149,6 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK6,CONFIG_NF_CONNTRACK_IPV6, $(P
 $(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_FILTER, $(P_V6)ip6table_filter),))
 $(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_MANGLE, $(P_V6)ip6table_mangle),))
 $(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_QUEUE, $(P_V6)ip6_queue),))
-$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_RAW, $(P_V6)ip6table_raw),))
 $(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_NF_LOG_IPV6, $(P_V6)nf_log_ipv6),))
 
 $(eval $(if $(NF_KMOD),,$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_IPTABLES, ip6t_icmp6)))

+ 9 - 0
include/package-ipkg.mk

@@ -96,7 +96,14 @@ ifeq ($(DUMP),)
     KEEP_$(1):=$(strip $(call Package/$(1)/conffiles))
 
     ifeq ($(BUILD_VARIANT),$$(if $$(VARIANT),$$(VARIANT),$(BUILD_VARIANT)))
+    do_install=
     ifdef Package/$(1)/install
+      do_install=yes
+    endif
+    ifdef Package/$(1)/install-overlay
+      do_install=yes
+    endif
+    ifdef do_install
       ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),)
         IPKGS += $(1)
         compile: $$(IPKG_$(1)) $(PKG_INFO_DIR)/$(1).provides $(STAGING_DIR_ROOT)/stamp/.$(1)_installed
@@ -178,6 +185,8 @@ $(_endef)
 	@rm -rf $$(IDIR_$(1)) $$(call opkg_package_files,$(1))
 	mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/CONTROL $(PKG_INFO_DIR)
 	$(call Package/$(1)/install,$$(IDIR_$(1)))
+	$(if $(Package/$(1)/install-overlay),mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/rootfs-overlay)
+	$(call Package/$(1)/install-overlay,$$(IDIR_$(1))/rootfs-overlay)
 	-find $$(IDIR_$(1)) -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| $(XARGS) rm -rf
 	@( \
 		find $$(IDIR_$(1)) -name lib\*.so\* -or -name \*.ko | awk -F/ '{ print $$$$NF }'; \

+ 17 - 29
include/package.mk

@@ -7,26 +7,22 @@
 
 __package_mk:=1
 
-all: $(if $(DUMP),dumpinfo,compile)
+all: $(if $(DUMP),dumpinfo,$(if $(CHECK),check,compile))
+
+include $(INCLUDE_DIR)/download.mk
 
 PKG_BUILD_DIR ?= $(BUILD_DIR)/$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
 PKG_INSTALL_DIR ?= $(PKG_BUILD_DIR)/ipkg-install
-PKG_MD5SUM ?= unknown
 PKG_BUILD_PARALLEL ?=
 PKG_USE_MIPS16 ?= 1
 PKG_IREMAP ?= 1
 
-ifneq ($(CONFIG_PKG_BUILD_USE_JOBSERVER),)
-  MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) $(if $(filter 3.% 4.0 4.1,$(MAKE_VERSION)),-j))
-else
-  MAKE_J:=-j$(CONFIG_PKG_BUILD_JOBS)
-endif
+MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) $(if $(filter 3.% 4.0 4.1,$(MAKE_VERSION)),-j))
 
 ifeq ($(strip $(PKG_BUILD_PARALLEL)),0)
 PKG_JOBS?=-j1
 else
-PKG_JOBS?=$(if $(PKG_BUILD_PARALLEL)$(CONFIG_PKG_DEFAULT_PARALLEL),\
-	$(if $(CONFIG_PKG_BUILD_PARALLEL),$(MAKE_J),-j1),-j1)
+PKG_JOBS?=$(if $(PKG_BUILD_PARALLEL),$(MAKE_J),-j1)
 endif
 ifdef CONFIG_USE_MIPS16
   ifeq ($(strip $(PKG_USE_MIPS16)),1)
@@ -93,7 +89,6 @@ endif
 
 PKG_INSTALL_STAMP:=$(PKG_INFO_DIR)/$(PKG_DIR_NAME).$(if $(BUILD_VARIANT),$(BUILD_VARIANT),default).install
 
-include $(INCLUDE_DIR)/download.mk
 include $(INCLUDE_DIR)/quilt.mk
 include $(INCLUDE_DIR)/package-defaults.mk
 include $(INCLUDE_DIR)/package-dumpinfo.mk
@@ -118,17 +113,6 @@ ifeq ($(DUMP)$(filter prereq clean refresh update,$(MAKECMDGOALS)),)
   endif
 endif
 
-define Download/default
-  FILE:=$(PKG_SOURCE)
-  URL:=$(PKG_SOURCE_URL)
-  SUBDIR:=$(PKG_SOURCE_SUBDIR)
-  PROTO:=$(PKG_SOURCE_PROTO)
-  $(if $(PKG_SOURCE_MIRROR),MIRROR:=$(filter 1,$(PKG_MIRROR)))
-  $(if $(PKG_MIRROR_MD5SUM),MIRROR_MD5SUM:=$(PKG_MIRROR_MD5SUM))
-  VERSION:=$(PKG_SOURCE_VERSION)
-  MD5SUM:=$(PKG_MD5SUM)
-endef
-
 ifdef USE_GIT_TREE
   define Build/Prepare/Default
 	mkdir -p $(PKG_BUILD_DIR)
@@ -156,9 +140,8 @@ define Build/Exports/Default
 endef
 Build/Exports=$(Build/Exports/Default)
 
-define Build/DefaultTargets
+define Build/CoreTargets
   $(if $(QUILT),$(Build/Quilt))
-  $(if $(USE_SOURCE_DIR)$(USE_GIT_TREE),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
   $(call Build/Autoclean)
 
   download:
@@ -223,15 +206,20 @@ define Build/DefaultTargets
     compile: $(STAMP_INSTALLED)
   endif
 
-  define Build/DefaultTargets
-  endef
-
   prepare: $(STAMP_PREPARED)
   configure: $(STAMP_CONFIGURED)
   dist: $(STAMP_CONFIGURED)
   distcheck: $(STAMP_CONFIGURED)
 endef
 
+define Build/DefaultTargets
+  $(if $(USE_SOURCE_DIR)$(USE_GIT_TREE),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
+  $(if $(DUMP),,$(Build/CoreTargets))
+
+  define Build/DefaultTargets
+  endef
+endef
+
 define Build/IncludeOverlay
   $(eval -include $(wildcard $(TOPDIR)/overlay/*/$(PKG_DIR_NAME).mk))
   define Build/IncludeOverlay
@@ -263,14 +251,14 @@ endif
   )
 
   $(if $(DUMP), \
-    $(Dumpinfo/Package), \
+    $(if $(CHECK),,$(Dumpinfo/Package)), \
     $(foreach target, \
       $(if $(Package/$(1)/targets),$(Package/$(1)/targets), \
         $(if $(PKG_TARGETS),$(PKG_TARGETS), ipkg) \
       ), $(BuildTarget/$(target)) \
     ) \
   )
-  $(if $(PKG_HOST_ONLY)$(DUMP),,$(call Build/DefaultTargets,$(1)))
+  $(if $(PKG_HOST_ONLY),,$(call Build/DefaultTargets,$(1)))
 endef
 
 define pkg_install_files
@@ -298,7 +286,7 @@ prepare-package-install:
 
 $(PACKAGE_DIR):
 	mkdir -p $@
-	
+
 dumpinfo:
 download:
 prepare:

+ 4 - 17
include/prereq-build.mk

@@ -75,14 +75,6 @@ $(eval $(call TestHostCommand,zlib, \
 	echo 'int main(int argc, char **argv) { gzdopen(0, "rb"); return 0; }' | \
 		gcc -include zlib.h -x c -o $(TMP_DIR)/a.out - $(zlib_link_flags)))
 
-# Xcode deprecated openssl, MacPorts doesn't work nicely for other packages
-ifneq ($(HOST_OS),Darwin)
-$(eval $(call TestHostCommand,libssl, \
-	Please install the openssl library (with development headers), \
-	echo 'int main(int argc, char **argv) { SSL_library_init(); return 0; }' | \
-		gcc $(HOST_CFLAGS) -include openssl/ssl.h -x c -o $(TMP_DIR)/a.out - -lcrypto -lssl $(HOST_LDFLAGS)))
-endif
-
 $(eval $(call TestHostCommand,perl-thread-queue, \
 	Please install the Perl Thread::Queue module, \
 	perl -MThread::Queue -e 1))
@@ -135,11 +127,6 @@ $(eval $(call SetupHostCommand,stat,Cannot find a file stat utility, \
 	gstat -c%s $(TMP_DIR)/.host.mk, \
 	stat -c%s $(TMP_DIR)/.host.mk))
 
-$(eval $(call SetupHostCommand,md5sum,, \
-	gmd5sum /dev/null | grep d41d8cd98f00b204e9800998ecf8427e, \
-	md5sum /dev/null | grep d41d8cd98f00b204e9800998ecf8427e, \
-	$(SCRIPT_DIR)/md5sum /dev/null | grep d41d8cd98f00b204e9800998ecf8427e))
-
 $(eval $(call SetupHostCommand,unzip,Please install 'unzip', \
 	unzip 2>&1 | grep zipfile, \
 	unzip))
@@ -164,11 +151,11 @@ $(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \
 $(eval $(call SetupHostCommand,file,Please install the 'file' package, \
 	file --version 2>&1 | grep file))
 
-ifneq ($(HOST_OS),Darwin)
-$(eval $(call SetupHostCommand,openssl,Please install the 'openssl' utility, \
-	openssl version | grep '\(OpenSSL\|LibreSSL\)'))
-endif
+$(STAGING_DIR_HOST)/bin/mkhash: $(SCRIPT_DIR)/mkhash.c
+	mkdir -p $(dir $@)
+	$(CC) -O2 -I$(TOPDIR)/tools/include -o $@ $<
 
+prereq: $(STAGING_DIR_HOST)/bin/mkhash
 
 # Install ldconfig stub
 $(eval $(call TestHostCommand,ldconfig-stub,Failed to install stub, \

+ 2 - 1
include/quilt.mk

@@ -149,7 +149,8 @@ define Quilt/Template
 		echo "The source directory contains no quilt patches."; \
 		false; \
 	}
-	@[ -n "$$$$(ls $(1)/patches/series)" -o "$$$$(cat $(1)/patches/series | md5sum)" = "$$(sort $(1)/patches/series | md5sum)" ] || { \
+	@[ -n "$$$$(ls $(1)/patches/series)" -o \
+	   "$$$$(cat $(1)/patches/series | mkhash md5)" = "$$(sort $(1)/patches/series | mkhash md5)" ] || { \
 		echo "The patches are not sorted in the right order. Please fix."; \
 		false; \
 	}

+ 2 - 2
include/scan.mk

@@ -51,7 +51,7 @@ $(OVERRIDELIST):
 ifeq ($(SCAN_NAME),target)
   GREP_STRING=BuildTarget
 else
-  GREP_STRING=(Build/DefaultTargets|BuildPackage|.+Package)
+  GREP_STRING=(Build/DefaultTargets|BuildPackage|KernelPackage)
 endif
 
 $(FILELIST): $(OVERRIDELIST)
@@ -85,7 +85,7 @@ $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST)
 $(TARGET_STAMP)::
 	+( \
 		$(NO_TRACE_MAKE) $(FILELIST); \
-		MD5SUM=$$(cat $(FILELIST) $(OVERRIDELIST) | (md5sum || md5) 2>/dev/null | awk '{print $$1}'); \
+		MD5SUM=$$(cat $(FILELIST) $(OVERRIDELIST) | mkhash md5 | awk '{print $$1}'); \
 		[ -f "$@.$$MD5SUM" ] || { \
 			rm -f $@.*; \
 			touch $@.$$MD5SUM; \

+ 0 - 22
include/shell.sh

@@ -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}'
-}

+ 1 - 1
include/subdir.mk

@@ -9,7 +9,7 @@ ifeq ($(MAKECMDGOALS),prereq)
   SUBTARGETS:=prereq
   PREREQ_ONLY:=1
 else
-  SUBTARGETS:=clean download prepare compile install update refresh prereq dist distcheck configure
+  SUBTARGETS:=clean download prepare compile install update refresh prereq dist distcheck configure check
 endif
 
 subtarget-default = $(filter-out ., \

+ 4 - 1
include/toplevel.mk

@@ -67,7 +67,7 @@ SUBMAKE:=umask 022; $(SUBMAKE)
 
 ULIMIT_FIX=_limit=`ulimit -n`; [ "$$_limit" = "unlimited" -o "$$_limit" -ge 1024 ] || ulimit -n 1024;
 
-prepare-mk: FORCE ;
+prepare-mk: staging_dir/host/.prereq-build FORCE ;
 
 ifdef SDK
   IGNORE_PACKAGES = linux
@@ -179,6 +179,9 @@ clean dirclean: .config
 prereq:: prepare-tmpinfo .config
 	@+$(NO_TRACE_MAKE) -r -s $@
 
+check: .config FORCE
+	@+$(NO_TRACE_MAKE) -r -s $@ QUIET= V=s
+
 WARN_PARALLEL_ERROR = $(if $(BUILD_LOG),,$(and $(filter -j,$(MAKEFLAGS)),$(findstring s,$(OPENWRT_VERBOSE))))
 
 ifeq ($(SDK),1)

+ 2 - 7
include/unpack.mk

@@ -5,14 +5,9 @@
 # See /LICENSE for more information.
 #
 
-# unpacking files with +s may break on some platforms. this typically emits error code 2
-ifneq ($(HOST_OS),Linux)
-  HOST_TAR:=trapret 2 $(TAR)
-else
-  HOST_TAR:=$(TAR)
-endif
+HOST_TAR:=$(TAR)
 TAR_CMD=$(HOST_TAR) -C $(1)/.. $(TAR_OPTIONS)
-UNZIP_CMD=unzip -d $(1)/.. $(DL_DIR)/$(PKG_SOURCE)
+UNZIP_CMD=unzip -q -d $(1)/.. $(DL_DIR)/$(PKG_SOURCE)
 
 ifeq ($(PKG_SOURCE),)
   PKG_UNPACK ?= true

+ 1 - 1
include/version.mk

@@ -50,7 +50,7 @@ VERSION_MANUFACTURER:=$(call qstrip_escape,$(CONFIG_VERSION_MANUFACTURER))
 VERSION_MANUFACTURER:=$(if $(VERSION_MANUFACTURER),$(VERSION_MANUFACTURER),libreCMC)
 
 VERSION_MANUFACTURER_URL:=$(call qstrip_escape,$(CONFIG_VERSION_MANUFACTURER_URL))
-VERSION_MANUFACTURER_URL:=$(if $(VERSION_MANUFACTURER_URL),$(VERSION_MANUFACTURER_URL),https://librecmc.org/librecmc)
+VERSION_MANUFACTURER_URL:=$(if $(VERSION_MANUFACTURER_URL),$(VERSION_MANUFACTURER_URL),https://librecmc.org)
 
 VERSION_BUG_URL:=$(call qstrip_escape,$(CONFIG_VERSION_BUG_URL))
 VERSION_BUG_URL:=$(if $(VERSION_BUG_URL),$(VERSION_BUG_URL))

+ 7 - 29
package/Makefile

@@ -14,6 +14,10 @@ $(curdir)/builddirs:=$(sort $(package-) $(package-y) $(package-m))
 $(curdir)/builddirs-install:=.
 $(curdir)/builddirs-default:=. $(sort $(package-y) $(package-m))
 $(curdir)/builddirs-prereq:=. $(sort $(prereq-y) $(prereq-m))
+ifdef CHECK_ALL
+$(curdir)/builddirs-check:=$($(curdir)/builddirs)
+$(curdir)/builddirs-download:=$($(curdir)/builddirs)
+endif
 ifneq ($(IGNORE_ERRORS),)
   package-y-filter := $(package-y)
   package-m-filter := $(filter-out $(package-y),$(package-m))
@@ -70,21 +74,13 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/system/opkg/host/install $(curdir
 
 	$(call prepare_rootfs,$(TARGET_DIR))
 
-PASSOPT=""
-PASSARG=""
-ifndef CONFIG_OPKGSMIME_PASSPHRASE
-  ifneq ($(call qstrip,$(CONFIG_OPKGSMIME_PASSFILE)),)
-    PASSOPT="-passin"
-    PASSARG="file:$(call qstrip,$(CONFIG_OPKGSMIME_PASSFILE))"
-  endif
-endif
-
 $(curdir)/index: FORCE
 	@echo Generating package index...
 	@for d in $(PACKAGE_SUBDIRS); do ( \
 		mkdir -p $$d; \
 		cd $$d || continue; \
-		$(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages && \
+		$(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages.manifest; \
+		grep -vE '^(Maintainer|LicenseFiles|Source|Require)' Packages.manifest > Packages && \
 			gzip -9nc Packages > Packages.gz; \
 	); done
 ifdef CONFIG_SIGNED_PACKAGES
@@ -94,25 +90,6 @@ ifdef CONFIG_SIGNED_PACKAGES
 			cd $$d || continue; \
 		$(STAGING_DIR_HOST)/bin/usign -S -m Packages -s $(BUILD_KEY); \
 	); done
-else
-ifeq ($(call qstrip,$(CONFIG_OPKGSMIME_KEY)),)
-	@echo Signing key has not been configured
-else
-ifeq ($(call qstrip,$(CONFIG_OPKGSMIME_CERT)),)
-	@echo Certificate has not been configured
-else
-	@echo Signing package index...
-	@for d in $(PACKAGE_SUBDIRS); do ( \
-		[ -d $$d ] && \
-			cd $$d || continue; \
-		openssl smime -binary -in Packages.gz \
-			-out Packages.sig -outform PEM -sign \
-			-signer $(CONFIG_OPKGSMIME_CERT) \
-			-inkey $(CONFIG_OPKGSMIME_KEY) \
-			$(PASSOPT) $(PASSARG); \
-	); done
-endif
-endif
 endif
 
 $(curdir)/preconfig:
@@ -123,5 +100,6 @@ $(eval $(call stampfile,$(curdir),package,prereq,.config))
 $(eval $(call stampfile,$(curdir),package,cleanup,$(TMP_DIR)/.build))
 $(eval $(call stampfile,$(curdir),package,compile,$(TMP_DIR)/.build))
 $(eval $(call stampfile,$(curdir),package,install,$(TMP_DIR)/.build))
+$(eval $(call stampfile,$(curdir),package,check,$(TMP_DIR)/.build))
 
 $(eval $(call subdir,$(curdir)))

+ 1 - 1
package/base-files/Makefile

@@ -23,7 +23,7 @@ PKG_CONFIG_DEPENDS := CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARG
 include $(INCLUDE_DIR)/package.mk
 
 ifneq ($(DUMP),1)
-  STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell $(SH_FUNC) echo $(CONFIG_TARGET_INIT_PATH) | md5s)
+  STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell echo $(CONFIG_TARGET_INIT_PATH) | mkhash md5)
   TARGET:=-$(BOARD)
 endif
 

+ 1 - 1
package/base-files/files/bin/config_generate

@@ -401,7 +401,7 @@ generate_gpioswitch() {
 				set system.$cfg='gpio_switch'
 				set system.$cfg.name='$name'
 				set system.$cfg.gpio_pin='$pin'
-				set system.$cfg.default='$default'
+				set system.$cfg.value='$default'
 			EOF
 		json_select ..
 	json_select ..

+ 1 - 1
package/base-files/files/etc/profile

@@ -44,7 +44,7 @@ fi
 
 service() {
 	[ -f "/etc/init.d/$1" ] || {
-		echo -n "$1 does not exist. the following services are available :"
+		echo "service "'"'"$1"'"'" not found, the following services are available:"
 		ls "/etc/init.d"
 		return 1
 	}

+ 5 - 0
package/base-files/files/lib/functions.sh

@@ -230,6 +230,11 @@ default_postinst() {
 		ret=$?
 	fi
 
+	if [ -d "$root/rootfs-overlay" ]; then
+		cp -R $root/rootfs-overlay/. $root/
+		rm -fR $root/rootfs-overlay/
+	fi
+
 	if [ -z "$root" ] && grep -q -s "^/etc/uci-defaults/" "/usr/lib/opkg/info/${pkgname}.list"; then
 		. /lib/functions/system.sh
 		[ -d /tmp/.uci ] || mkdir -p /tmp/.uci

+ 92 - 1
package/base-files/files/lib/upgrade/common.sh

@@ -53,7 +53,8 @@ run_ramfs() { # <command> [...]
 		/bin/vi /bin/ls /bin/cat /usr/bin/awk /usr/bin/hexdump		\
 		/bin/sleep /bin/zcat /usr/bin/bzcat /usr/bin/printf /usr/bin/wc \
 		/bin/cut /usr/bin/printf /bin/sync /bin/mkdir /bin/rmdir	\
-		/bin/rm /usr/bin/basename /bin/kill /bin/chmod /usr/bin/find
+		/bin/rm /usr/bin/basename /bin/kill /bin/chmod /usr/bin/find \
+		/bin/mknod
 
 	install_bin /bin/uclient-fetch /bin/wget
 	install_bin /sbin/mtd
@@ -206,6 +207,96 @@ get_magic_long() {
 	(get_image "$@" | dd bs=4 count=1 | hexdump -v -n 4 -e '1/1 "%02x"') 2>/dev/null
 }
 
+export_bootdevice() {
+	local cmdline uuid disk uevent
+	local MAJOR MINOR DEVNAME DEVTYPE
+
+	if read cmdline < /proc/cmdline; then
+		case "$cmdline" in
+			*block2mtd=*)
+				disk="${cmdline##*block2mtd=}"
+				disk="${disk%%,*}"
+			;;
+			*root=*)
+				disk="${cmdline##*root=}"
+				disk="${disk%% *}"
+			;;
+		esac
+
+		case "$disk" in
+			PARTUUID=[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]-02)
+				uuid="${disk#PARTUUID=}"
+				uuid="${uuid%-02}"
+				for disk in $(find /dev -type b); do
+					set -- $(dd if=$disk bs=1 skip=440 count=4 2>/dev/null | hexdump -v -e '4/1 "%02x "')
+					if [ "$4$3$2$1" = "$uuid" ]; then
+						uevent="/sys/class/block/${disk##*/}/uevent"
+						break
+					fi
+				done
+			;;
+			/dev/*)
+				uevent="/sys/class/block/${disk##*/}/uevent"
+			;;
+		esac
+
+		if [ -e "$uevent" ]; then
+			. "$uevent"
+
+			export BOOTDEV_MAJOR=$MAJOR
+			export BOOTDEV_MINOR=$MINOR
+			return 0
+		fi
+	fi
+
+	return 1
+}
+
+export_partdevice() {
+	local var="$1" offset="$2"
+	local uevent MAJOR MINOR DEVNAME DEVTYPE
+
+	for uevent in /sys/class/block/*/uevent; do
+		. "$uevent"
+		if [ $BOOTDEV_MAJOR = $MAJOR -a $(($BOOTDEV_MINOR + $offset)) = $MINOR -a -b "/dev/$DEVNAME" ]; then
+			export "$var=$DEVNAME"
+			return 0
+		fi
+	done
+
+	return 1
+}
+
+get_partitions() { # <device> <filename>
+	local disk="$1"
+	local filename="$2"
+
+	if [ -b "$disk" -o -f "$disk" ]; then
+		v "Reading partition table from $filename..."
+
+		local magic="$(hexdump -v -n 2 -s 0x1FE -e '1/2 "0x%04X"' "$disk")"
+		if [ "$magic" != 0xAA55 ]; then
+			v "Invalid partition table on $disk"
+			exit
+		fi
+
+		rm -f "/tmp/partmap.$filename"
+
+		local part
+		for part in 1 2 3 4; do
+			set -- $(hexdump -v -n 12 -s "$((0x1B2 + $part * 16))" -e '3/4 "0x%08X "' "$disk")
+
+			local type="$(($1 % 256))"
+			local lba="$(($2))"
+			local num="$(($3))"
+
+			[ $type -gt 0 ] || continue
+
+			printf "%2d %5d %7d\n" $part $lba $num >> "/tmp/partmap.$filename"
+		done
+	fi
+}
+
 jffs2_copy_config() {
 	if grep rootfs_data /proc/mtd >/dev/null; then
 		# squashfs+jffs2

+ 14 - 44
package/base-files/image-config.in

@@ -158,7 +158,7 @@ if VERSIONOPT
 	config VERSION_DIST
 		string
 		prompt "Release distribution"
-		default "Lede"
+		default "LEDE"
 		help
 			This is the name of the release distribution.
 			If unspecified, it defaults to OpenWrt.
@@ -175,8 +175,8 @@ if VERSIONOPT
 		prompt "Release version number"
 		help
 			This is the release version number embedded in the image.
-			If unspecified, it defaults to CURRENT for the master branch
-			or to ##.##-CURRENT on release branches.
+			If unspecified, it defaults to SNAPSHOT for the master branch
+			or to ##.##-SNAPSHOT on release branches.
 
 	config VERSION_CODE
 		string
@@ -195,8 +195,8 @@ if VERSIONOPT
 			This is the repository address embedded in the image, it defaults
 			to the trunk snapshot repo; the url may contain the following placeholders:
 			 %R .. Repository revision ID
-			 %V .. Configured release version number or "CURRENT", uppercase
-			 %v .. Configured release version number or "current", lowercase
+			 %V .. Configured release version number or "SNAPSHOT", uppercase
+			 %v .. Configured release version number or "snapshot", lowercase
 			 %C .. Configured release revision code or value of %R, uppercase
 			 %c .. Configured release revision code or value of %R, lowercase
 			 %N .. Release name, uppercase
@@ -258,6 +258,15 @@ if VERSIONOPT
 		help
 			Enable this to include the version number in firmware image, SDK-
 			and Image Builder archive file names
+
+	config VERSION_CODE_FILENAMES
+		bool
+		prompt "Revision code in filenames"
+		default y
+		help
+			Enable this to include the revision identifier or the configured
+			version code into the firmware image, SDK- and Image Builder archive
+			file names
 endif
 
 
@@ -283,42 +292,3 @@ menuconfig PER_FEED_REPO
 		  Add not enabled feeds as commented out source lines to opkg.conf.
 
 source "tmp/.config-feeds.in"
-
-
-menuconfig SMIMEOPT
-	bool "Package signing options" if IMAGEOPT
-        default n
-	help
-		These options configure the signing key and certificate to
-		be used for signing and verifying packages.
-
-	config OPKGSMIME_CERT
-		string
-		prompt "Path to certificate (PEM certificate format)" if SMIMEOPT
-		help
-		  Path to the certificate to use for signature verification
-
-	config OPKGSMIME_KEY
-		string
-		prompt "Path to signing key (PEM private key format)" if SMIMEOPT
-		help
-		  Path to the key to use for signing packages
-
-	config OPKGSMIME_PASSPHRASE
-		bool
-		default y
-		prompt "Wait for a passphrase when signing packages?" if SMIMEOPT
-		help
-		  If this value is set, then the build will pause and request a passphrase
-                  from the command line when signing packages. This SHOULD NOT be used with
-                  automatic builds. If this value is not set, a file can be specified from
-                  which the passphrase will be read.
-
-	config OPKGSMIME_PASSFILE
-		string
-		prompt "Path to a file containing the passphrase" if SMIMEOPT
-                depends on !OPKGSMIME_PASSPHRASE
-		help
-		  Path to a file containing the passphrase for the signing key.
-                  If the signing key is not encrypted and does not require a passphrase,
-                  this option may be left blank.

+ 1 - 1
package/devel/binutils/Makefile

@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PKG_SOURCE_URL:=@GNU/binutils
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_VERSION:=$(PKG_VERSION)
-PKG_MD5SUM:=2869c9bf3e60ee97c74ac2a6bf4e9d68
+PKG_HASH:=369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88
 
 PKG_FIXUP:=autoreconf
 PKG_LIBTOOL_PATHS:=. gas bfd opcodes gprof binutils ld libiberty gold intl

+ 1 - 1
package/devel/gdb-arc/Makefile

@@ -13,7 +13,7 @@ PKG_RELEASE:=1
 
 PKG_SOURCE:=gdb-arc-2016.03-gdb.tar.gz
 PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/$(PKG_VERSION)
-PKG_MD5SUM:=775caaf6385c16f20b6f53c0a2b95f79
+PKG_HASH:=6a91f86cc487c1548d3f5d4f29f7226d2019c0db8a63633aeabd5914a340f3f9
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/binutils-gdb-arc-2016.03-gdb
 

+ 1 - 1
package/devel/gdb/Makefile

@@ -13,7 +13,7 @@ PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/gdb
-PKG_MD5SUM:=5aa71522e488e358243917967db87476
+PKG_HASH:=e9216da4e3755e9f414c1aa0026b626251dfc57ffe572a266e98da4f6988fc70
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1

+ 0 - 16
package/devel/gdb/patches/002-remove-arguments.patch

@@ -1,16 +0,0 @@
-# The additional warnings are causing compile errors on gcc version 4.1.2 as
-# a host compiler.
-
---- a/sim/igen/configure
-+++ b/sim/igen/configure
-@@ -4768,8 +4768,8 @@ build_warnings="-Wall -Wdeclaration-afte
- -Wpointer-sign \
- -Wno-unused -Wunused-value -Wunused-function \
- -Wno-switch -Wno-char-subscripts -Wmissing-prototypes
---Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
---Wold-style-declaration -Wold-style-definition"
-+-Wdeclaration-after-statement \
-+-Wold-style-definition"
- 
- # Enable -Wno-format by default when using gcc on mingw since many
- # GCC versions complain about %I64.

+ 2 - 2
package/devel/strace/Makefile

@@ -10,9 +10,9 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=strace
 
-PKG_VERSION:=4.14
+PKG_VERSION:=4.15
 PKG_RELEASE:=1
-PKG_MD5SUM:=1e39b5f7583256d7dc21170b9da529ae
+PKG_HASH:=c0cdc094d6141fd9dbf6aaad605142d651ae10998b660fda57fc61f7ad583ca9
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)

+ 1 - 3
package/devel/strace/patches/100-workaround--pt-reg-collisions-ppc.patch

@@ -1,8 +1,6 @@
-diff --git a/ptrace.h b/ptrace.h
-index ddb46cb..48a54b8 100644
 --- a/ptrace.h
 +++ b/ptrace.h
-@@ -55,7 +55,14 @@ extern long ptrace(int, int, char *, long);
+@@ -55,7 +55,14 @@ extern long ptrace(int, int, char *, lon
  # define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args
  #endif
  

+ 1 - 3
package/devel/trace-cmd/Makefile

@@ -8,10 +8,8 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=\
 		https://kernel.googlesource.com/pub/scm/linux/kernel/git/rostedt/trace-cmd \
 		https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE_VERSION:=9be5d74805830a291615f2f34a27c903f6a37b1e
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MIRROR_MD5SUM:=735b69f61a8c627037dcc01361cdb8415e5ab0ec892fbd731236c444003b0c71
+PKG_MIRROR_HASH:=735b69f61a8c627037dcc01361cdb8415e5ab0ec892fbd731236c444003b0c71
 PKG_INSTALL:=1
 PKG_USE_MIPS16:=0
 PKG_LICENSE:=GPL-2.0

+ 1 - 1
package/devel/valgrind/Makefile

@@ -13,7 +13,7 @@ PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://valgrind.org/downloads/
-PKG_MD5SUM:=67ca4395b2527247780f36148b084f5743a68ab0c850cb43e4a5b4b012cf76a1
+PKG_HASH:=67ca4395b2527247780f36148b084f5743a68ab0c850cb43e4a5b4b012cf76a1
 
 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
 PKG_LICENSE:=GPL-2.0+

+ 30 - 0
package/kernel/hwmon-gsc/Makefile

@@ -0,0 +1,30 @@
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=hwmon-gsc
+PKG_RELEASE:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/hwmon-gsc
+  SUBMENU:=Hardware Monitoring Support
+  DEPENDS:=@TARGET_imx6||TARGET_cns3xxx kmod-hwmon-core +kmod-i2c-core
+  TITLE:=Driver for the Gateworks System Controller
+  AUTOLOAD:=$(call AutoLoad,60,gsc)
+  FILES:=$(PKG_BUILD_DIR)/gsc.ko
+endef
+
+define KernelPackage/hwmon-gsc/description
+  Kernel module for the Gateworks System Controller chips.
+endef
+
+define Build/Compile
+	$(MAKE) -C "$(LINUX_DIR)" \
+		CROSS_COMPILE="$(TARGET_CROSS)" \
+		ARCH="$(LINUX_KARCH)" \
+		SUBDIRS="$(PKG_BUILD_DIR)" \
+		EXTRA_CFLAGS="$(BUILDFLAGS)" \
+		modules
+endef
+
+$(eval $(call KernelPackage,hwmon-gsc))

+ 1 - 0
package/kernel/hwmon-gsc/src/Makefile

@@ -0,0 +1 @@
+obj-m := gsc.o

+ 308 - 0
package/kernel/hwmon-gsc/src/gsc.c

@@ -0,0 +1,308 @@
+/*
+ * A hwmon driver for the Gateworks System Controller 
+ * Copyright (C) 2009 Gateworks Corporation
+ *
+ * Author: Chris Lang <clang@gateworks.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License,
+ * as published by the Free Software Foundation - version 2.
+ */
+
+#include <linux/module.h>
+#include <linux/i2c.h>
+#include <linux/hwmon.h>
+#include <linux/hwmon-sysfs.h>
+#include <linux/err.h>
+#include <linux/slab.h>
+
+#define DRV_VERSION "0.2"
+
+enum chips { gsp };
+
+/* AD7418 registers */
+#define GSP_REG_TEMP_IN		0x00
+#define GSP_REG_VIN		0x02
+#define GSP_REG_3P3		0x05
+#define GSP_REG_BAT		0x08
+#define GSP_REG_5P0		0x0b
+#define GSP_REG_CORE		0x0e
+#define GSP_REG_CPU1		0x11
+#define GSP_REG_CPU2		0x14
+#define GSP_REG_DRAM		0x17
+#define GSP_REG_EXT_BAT		0x1a
+#define GSP_REG_IO1		0x1d
+#define GSP_REG_IO2 		0x20
+#define GSP_REG_PCIE		0x23
+#define GSP_REG_CURRENT		0x26
+#define GSP_FAN_0		0x2C
+#define GSP_FAN_1		0x2E
+#define GSP_FAN_2		0x30
+#define GSP_FAN_3		0x32
+#define GSP_FAN_4		0x34
+#define GSP_FAN_5		0x36
+
+struct gsp_sensor_info {
+	const char* name;
+	int reg;
+};
+
+static const struct gsp_sensor_info gsp_sensors[] = {
+	{"temp", GSP_REG_TEMP_IN},
+	{"vin", GSP_REG_VIN},
+	{"3p3", GSP_REG_3P3},
+	{"bat", GSP_REG_BAT},
+	{"5p0", GSP_REG_5P0},
+	{"core", GSP_REG_CORE},
+	{"cpu1", GSP_REG_CPU1},
+	{"cpu2", GSP_REG_CPU2},
+	{"dram", GSP_REG_DRAM},
+	{"ext_bat", GSP_REG_EXT_BAT},
+	{"io1", GSP_REG_IO1},
+	{"io2", GSP_REG_IO2},
+	{"pci2", GSP_REG_PCIE},
+	{"current", GSP_REG_CURRENT},
+	{"fan_point0", GSP_FAN_0},
+	{"fan_point1", GSP_FAN_1},
+	{"fan_point2", GSP_FAN_2},
+	{"fan_point3", GSP_FAN_3},
+	{"fan_point4", GSP_FAN_4},
+	{"fan_point5", GSP_FAN_5},
+};
+
+struct gsp_data {
+	struct device		*hwmon_dev;
+	struct attribute_group	attrs;
+	enum chips		type;
+};
+
+static int gsp_probe(struct i2c_client *client,
+			const struct i2c_device_id *id);
+static int gsp_remove(struct i2c_client *client);
+
+static const struct i2c_device_id gsp_id[] = {
+	{ "gsp", 0 },
+	{ }
+};
+MODULE_DEVICE_TABLE(i2c, gsp_id);
+
+static struct i2c_driver gsp_driver = {
+	.driver = {
+		.name	= "gsp",
+	},
+	.probe		= gsp_probe,
+	.remove		= gsp_remove,
+	.id_table	= gsp_id,
+};
+
+/* All registers are word-sized, except for the configuration registers.
+ * AD7418 uses a high-byte first convention. Do NOT use those functions to
+ * access the configuration registers CONF and CONF2, as they are byte-sized.
+ */
+static inline int gsp_read(struct i2c_client *client, u8 reg)
+{
+	unsigned int adc = 0;
+	if (reg == GSP_REG_TEMP_IN || reg > GSP_REG_CURRENT)
+	{
+		adc |= i2c_smbus_read_byte_data(client, reg);
+		adc |= i2c_smbus_read_byte_data(client, reg + 1) << 8;
+		return adc;
+	}
+	else
+	{
+		adc |= i2c_smbus_read_byte_data(client, reg);
+		adc |= i2c_smbus_read_byte_data(client, reg + 1) << 8;
+		adc |= i2c_smbus_read_byte_data(client, reg + 2) << 16;
+		return adc;
+	}
+}
+
+static inline int gsp_write(struct i2c_client *client, u8 reg, u16 value)
+{
+	i2c_smbus_write_byte_data(client, reg, value & 0xff);
+	i2c_smbus_write_byte_data(client, reg + 1, ((value >> 8) & 0xff));
+	return 1;
+}
+
+static ssize_t show_adc(struct device *dev, struct device_attribute *devattr,
+			char *buf)
+{
+	struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+	struct i2c_client *client = to_i2c_client(dev);
+	return sprintf(buf, "%d\n", gsp_read(client, gsp_sensors[attr->index].reg));
+}
+
+static ssize_t show_label(struct device *dev,
+			struct device_attribute *devattr, char *buf)
+{
+	struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+
+	return sprintf(buf, "%s\n", gsp_sensors[attr->index].name);
+}
+
+static ssize_t store_fan(struct device *dev,
+			struct device_attribute *devattr, const char *buf, size_t count)
+{
+	u16 val;
+	struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+	struct i2c_client *client = to_i2c_client(dev);
+	val = simple_strtoul(buf, NULL, 10);
+	gsp_write(client, gsp_sensors[attr->index].reg, val);
+	return count;
+}
+
+static SENSOR_DEVICE_ATTR(temp0_input, S_IRUGO, show_adc, NULL, 0);
+static SENSOR_DEVICE_ATTR(temp0_label, S_IRUGO, show_label, NULL, 0);
+
+static SENSOR_DEVICE_ATTR(in0_input, S_IRUGO, show_adc, NULL, 1);
+static SENSOR_DEVICE_ATTR(in0_label, S_IRUGO, show_label, NULL, 1);
+static SENSOR_DEVICE_ATTR(in1_input, S_IRUGO, show_adc, NULL, 2);
+static SENSOR_DEVICE_ATTR(in1_label, S_IRUGO, show_label, NULL, 2);
+static SENSOR_DEVICE_ATTR(in2_input, S_IRUGO, show_adc, NULL, 3);
+static SENSOR_DEVICE_ATTR(in2_label, S_IRUGO, show_label, NULL, 3);
+static SENSOR_DEVICE_ATTR(in3_input, S_IRUGO, show_adc, NULL, 4);
+static SENSOR_DEVICE_ATTR(in3_label, S_IRUGO, show_label, NULL, 4);
+static SENSOR_DEVICE_ATTR(in4_input, S_IRUGO, show_adc, NULL, 5);
+static SENSOR_DEVICE_ATTR(in4_label, S_IRUGO, show_label, NULL, 5);
+static SENSOR_DEVICE_ATTR(in5_input, S_IRUGO, show_adc, NULL, 6);
+static SENSOR_DEVICE_ATTR(in5_label, S_IRUGO, show_label, NULL, 6);
+static SENSOR_DEVICE_ATTR(in6_input, S_IRUGO, show_adc, NULL, 7);
+static SENSOR_DEVICE_ATTR(in6_label, S_IRUGO, show_label, NULL, 7);
+static SENSOR_DEVICE_ATTR(in7_input, S_IRUGO, show_adc, NULL, 8);
+static SENSOR_DEVICE_ATTR(in7_label, S_IRUGO, show_label, NULL, 8);
+static SENSOR_DEVICE_ATTR(in8_input, S_IRUGO, show_adc, NULL, 9);
+static SENSOR_DEVICE_ATTR(in8_label, S_IRUGO, show_label, NULL, 9);
+static SENSOR_DEVICE_ATTR(in9_input, S_IRUGO, show_adc, NULL, 10);
+static SENSOR_DEVICE_ATTR(in9_label, S_IRUGO, show_label, NULL, 10);
+static SENSOR_DEVICE_ATTR(in10_input, S_IRUGO, show_adc, NULL, 11);
+static SENSOR_DEVICE_ATTR(in10_label, S_IRUGO, show_label, NULL, 11);
+static SENSOR_DEVICE_ATTR(in11_input, S_IRUGO, show_adc, NULL, 12);
+static SENSOR_DEVICE_ATTR(in11_label, S_IRUGO, show_label, NULL, 12);
+static SENSOR_DEVICE_ATTR(in12_input, S_IRUGO, show_adc, NULL, 13);
+static SENSOR_DEVICE_ATTR(in12_label, S_IRUGO, show_label, NULL, 13);
+
+static SENSOR_DEVICE_ATTR(fan0_point0, S_IRUGO | S_IWUSR, show_adc, store_fan, 14);
+static SENSOR_DEVICE_ATTR(fan0_point1, S_IRUGO | S_IWUSR, show_adc, store_fan, 15);
+static SENSOR_DEVICE_ATTR(fan0_point2, S_IRUGO | S_IWUSR, show_adc, store_fan, 16);
+static SENSOR_DEVICE_ATTR(fan0_point3, S_IRUGO | S_IWUSR, show_adc, store_fan, 17);
+static SENSOR_DEVICE_ATTR(fan0_point4, S_IRUGO | S_IWUSR, show_adc, store_fan, 18);
+static SENSOR_DEVICE_ATTR(fan0_point5, S_IRUGO | S_IWUSR, show_adc, store_fan, 19);
+
+static struct attribute *gsp_attributes[] = {
+	&sensor_dev_attr_temp0_input.dev_attr.attr,
+	&sensor_dev_attr_in0_input.dev_attr.attr,
+	&sensor_dev_attr_in1_input.dev_attr.attr,
+	&sensor_dev_attr_in2_input.dev_attr.attr,
+	&sensor_dev_attr_in3_input.dev_attr.attr,
+	&sensor_dev_attr_in4_input.dev_attr.attr,
+	&sensor_dev_attr_in5_input.dev_attr.attr,
+	&sensor_dev_attr_in6_input.dev_attr.attr,
+	&sensor_dev_attr_in7_input.dev_attr.attr,
+	&sensor_dev_attr_in8_input.dev_attr.attr,
+	&sensor_dev_attr_in9_input.dev_attr.attr,
+	&sensor_dev_attr_in10_input.dev_attr.attr,
+	&sensor_dev_attr_in11_input.dev_attr.attr,
+	&sensor_dev_attr_in12_input.dev_attr.attr,
+
+	&sensor_dev_attr_temp0_label.dev_attr.attr,
+	&sensor_dev_attr_in0_label.dev_attr.attr,
+	&sensor_dev_attr_in1_label.dev_attr.attr,
+	&sensor_dev_attr_in2_label.dev_attr.attr,
+	&sensor_dev_attr_in3_label.dev_attr.attr,
+	&sensor_dev_attr_in4_label.dev_attr.attr,
+	&sensor_dev_attr_in5_label.dev_attr.attr,
+	&sensor_dev_attr_in6_label.dev_attr.attr,
+	&sensor_dev_attr_in7_label.dev_attr.attr,
+	&sensor_dev_attr_in8_label.dev_attr.attr,
+	&sensor_dev_attr_in9_label.dev_attr.attr,
+	&sensor_dev_attr_in10_label.dev_attr.attr,
+	&sensor_dev_attr_in11_label.dev_attr.attr,
+	&sensor_dev_attr_in12_label.dev_attr.attr,
+
+	&sensor_dev_attr_fan0_point0.dev_attr.attr,
+	&sensor_dev_attr_fan0_point1.dev_attr.attr,
+	&sensor_dev_attr_fan0_point2.dev_attr.attr,
+	&sensor_dev_attr_fan0_point3.dev_attr.attr,
+	&sensor_dev_attr_fan0_point4.dev_attr.attr,
+	&sensor_dev_attr_fan0_point5.dev_attr.attr,
+	NULL
+};
+
+
+static int gsp_probe(struct i2c_client *client,
+			 const struct i2c_device_id *id)
+{
+	struct i2c_adapter *adapter = client->adapter;
+	struct gsp_data *data;
+	int err;
+
+	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA |
+					I2C_FUNC_SMBUS_WORD_DATA)) {
+		err = -EOPNOTSUPP;
+		goto exit;
+	}
+
+	if (!(data = kzalloc(sizeof(struct gsp_data), GFP_KERNEL))) {
+		err = -ENOMEM;
+		goto exit;
+	}
+
+	i2c_set_clientdata(client, data);
+
+	data->type = id->driver_data;
+
+	switch (data->type) {
+	case 0:
+		data->attrs.attrs = gsp_attributes;
+		break;
+	}
+
+	dev_info(&client->dev, "%s chip found\n", client->name);
+
+	/* Register sysfs hooks */
+	if ((err = sysfs_create_group(&client->dev.kobj, &data->attrs)))
+		goto exit_free;
+
+	data->hwmon_dev = hwmon_device_register(&client->dev);
+	if (IS_ERR(data->hwmon_dev)) {
+		err = PTR_ERR(data->hwmon_dev);
+		goto exit_remove;
+	}
+
+	return 0;
+
+exit_remove:
+	sysfs_remove_group(&client->dev.kobj, &data->attrs);
+exit_free:
+	kfree(data);
+exit:
+	return err;
+}
+
+static int gsp_remove(struct i2c_client *client)
+{
+	struct gsp_data *data = i2c_get_clientdata(client);
+	hwmon_device_unregister(data->hwmon_dev);
+	sysfs_remove_group(&client->dev.kobj, &data->attrs);
+	kfree(data);
+	return 0;
+}
+
+static int __init gsp_init(void)
+{
+	return i2c_add_driver(&gsp_driver);
+}
+
+static void __exit gsp_exit(void)
+{
+	i2c_del_driver(&gsp_driver);
+}
+
+module_init(gsp_init);
+module_exit(gsp_exit);
+
+MODULE_AUTHOR("Chris Lang <clang@gateworks.com>");
+MODULE_DESCRIPTION("GSC HWMON driver");
+MODULE_LICENSE("GPL");
+MODULE_VERSION(DRV_VERSION);
+

+ 5 - 7
package/kernel/kmod-sched-cake/Makefile

@@ -9,15 +9,13 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=sched-cake
-PKG_SOURCE_VERSION:=4f62bd17fa34036cb3c8fd4800a709b2734c3de3
-PKG_VERSION:=2016-10-02-$(PKG_SOURCE_VERSION)
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/dtaht/sch_cake.git
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_MIRROR_MD5SUM:=d6fd82607862c16ba5f1007ecfb251eba9e2cc82c55bb3f4aee2fbebf9fa6d2a
+PKG_SOURCE_URL:=https://github.com/kdarbyshirebryant/sch_cake.git
+PKG_SOURCE_DATE:=2016-12-19
+PKG_SOURCE_VERSION:=70c8eb766d5afcf3cf187594b7cd776da92bee3c
+PKG_MIRROR_HASH:=16174db5dad0a5b5ba522d4cfc058cff9851ed013a3a05166b04eb127bb12a24
 PKG_MAINTAINER:=Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
 
 include $(INCLUDE_DIR)/package.mk
@@ -28,7 +26,7 @@ define KernelPackage/sched-cake
   URL:=https://github.com/dtaht/sch_cake
   FILES:=$(PKG_BUILD_DIR)/sch_cake.ko
   AUTOLOAD:=$(call AutoLoad,75,sch_cake)
-  DEPENDS:=+kmod-ipt-conntrack
+  DEPENDS:=+kmod-ipt-conntrack @!LINUX_3_18
 endef
 
 include $(INCLUDE_DIR)/kernel-defaults.mk

+ 1 - 2
package/kernel/linux/Makefile

@@ -23,9 +23,8 @@ export SHELL:=/bin/sh
 
 include $(INCLUDE_DIR)/package.mk
 
-STAMP_BUILT:=$(STAMP_BUILT)_$(firstword $(shell $(SCRIPT_DIR)/kconfig.pl $(LINUX_DIR)/.config | md5sum))
-
 ifeq ($(DUMP),)
+  STAMP_BUILT:=$(STAMP_BUILT)_$(shell $(SCRIPT_DIR)/kconfig.pl $(LINUX_DIR)/.config | mkhash md5)
   -include $(LINUX_DIR)/.config
 endif
 

+ 0 - 19
package/kernel/linux/modules/block.mk

@@ -90,25 +90,6 @@ endef
 $(eval $(call KernelPackage,ata-artop))
 
 
-define KernelPackage/ata-imx
-  TITLE:=Freescale i.MX AHCI SATA support
-  DEPENDS:=@TARGET_imx6
-  KCONFIG:=\
-	CONFIG_AHCI_IMX \
-	CONFIG_SATA_AHCI_PLATFORM \
-	CONFIG_PATA_IMX=n
-  FILES:=$(LINUX_DIR)/drivers/ata/ahci_imx.ko
-  AUTOLOAD:=$(call AutoLoad,41,ahci_imx,1)
-  $(call AddDepends/ata)
-endef
-
-define KernelPackage/ata-imx/description
- SATA support for the Freescale i.MX6 SoC's onboard AHCI SATA
-endef
-
-$(eval $(call KernelPackage,ata-imx))
-
-
 define KernelPackage/ata-marvell-sata
   TITLE:=Marvell Serial ATA support
   KCONFIG:=CONFIG_SATA_MV

+ 22 - 90
package/kernel/linux/modules/crypto.mk

@@ -158,32 +158,6 @@ endef
 $(eval $(call KernelPackage,crypto-seqiv))
 
 
-define KernelPackage/crypto-hw-caam
-  TITLE:=Freescale CAAM driver (SEC4)
-  DEPENDS:=@TARGET_imx6||TARGET_mpc85xx +kmod-crypto-aead +kmod-crypto-authenc +kmod-crypto-hash +kmod-random-core
-  KCONFIG:= \
-	CONFIG_CRYPTO_HW=y \
-	CONFIG_CRYPTO_DEV_FSL_CAAM \
-	CONFIG_CRYPTO_DEV_FSL_CAAM_JR \
-	CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API \
-	CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API \
-	CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API \
-	CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9 \
-	CONFIG_CRYPTO_DEV_FSL_CAAM_INTC=n \
-	CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG=n
-  FILES:= \
-	$(LINUX_DIR)/drivers/crypto/caam/caam.ko \
-	$(LINUX_DIR)/drivers/crypto/caam/caamalg.ko \
-	$(LINUX_DIR)/drivers/crypto/caam/caamhash.ko \
-	$(LINUX_DIR)/drivers/crypto/caam/caam_jr.ko \
-	$(LINUX_DIR)/drivers/crypto/caam/caamrng.ko
-  AUTOLOAD:=$(call AutoLoad,09,caam caamalg caamhash caam_jr caamrng)
-  $(call AddDepends/crypto)
-endef
-
-$(eval $(call KernelPackage,crypto-hw-caam))
-
-
 define KernelPackage/crypto-hw-talitos
   TITLE:=Freescale integrated security engine (SEC) driver
   DEPENDS:=+kmod-crypto-manager +kmod-crypto-hash +kmod-random-core +kmod-crypto-authenc
@@ -266,54 +240,6 @@ endef
 $(eval $(call KernelPackage,crypto-hw-hifn-795x))
 
 
-define KernelPackage/crypto-hw-ppc4xx
-  TITLE:=AMCC PPC4xx hardware crypto module
-  DEPENDS:=@TARGET_ppc40x||TARGET_ppc44x
-  KCONFIG:= \
-	CONFIG_CRYPTO_HW=y \
-	CONFIG_CRYPTO_DEV_PPC4XX
-  FILES:=$(LINUX_DIR)/drivers/crypto/amcc/crypto4xx.ko
-  AUTOLOAD:=$(call AutoLoad,90,crypto4xx)
-  $(call AddDepends/crypto,+kmod-crypto-manager +kmod-crypto-hash)
-endef
-
-define KernelPackage/crypto-hw-ppc4xx/description
-  Kernel support for the AMCC PPC4xx HW crypto engine.
-endef
-
-$(eval $(call KernelPackage,crypto-hw-ppc4xx))
-
-
-define KernelPackage/crypto-hw-omap
-  TITLE:=TI OMAP hardware crypto modules
-  DEPENDS:=@TARGET_omap
-  KCONFIG:= \
-	CONFIG_CRYPTO_HW=y \
-	CONFIG_CRYPTO_DEV_OMAP_AES \
-	CONFIG_CRYPTO_DEV_OMAP_DES \
-	CONFIG_CRYPTO_DEV_OMAP_SHAM
-ifneq ($(wildcard $(LINUX_DIR)/drivers/crypto/omap-des.ko),)
-  FILES:= \
-	$(LINUX_DIR)/drivers/crypto/omap-aes.ko \
-	$(LINUX_DIR)/drivers/crypto/omap-des.ko \
-	$(LINUX_DIR)/drivers/crypto/omap-sham.ko
-  AUTOLOAD:=$(call AutoLoad,90,omap-aes omap-des omap-sham)
-else
-  FILES:= \
-	$(LINUX_DIR)/drivers/crypto/omap-aes.ko \
-	$(LINUX_DIR)/drivers/crypto/omap-sham.ko
-  AUTOLOAD:=$(call AutoLoad,90,omap-aes omap-sham)
-endif
-  $(call AddDepends/crypto,+kmod-crypto-manager +kmod-crypto-hash)
-endef
-
-define KernelPackage/crypto-hw-omap/description
-  Kernel support for the TI OMAP HW crypto engine.
-endef
-
-$(eval $(call KernelPackage,crypto-hw-omap))
-
-
 define KernelPackage/crypto-authenc
   TITLE:=Combined mode wrapper for IPsec
   DEPENDS:=+kmod-crypto-manager +LINUX_4_4:kmod-crypto-null
@@ -394,7 +320,7 @@ $(eval $(call KernelPackage,crypto-des))
 
 define KernelPackage/crypto-deflate
   TITLE:=Deflate compression CryptoAPI module
-  DEPENDS:=+kmod-lib-zlib
+  DEPENDS:=+kmod-lib-zlib-inflate +kmod-lib-zlib-deflate
   KCONFIG:=CONFIG_CRYPTO_DEFLATE
   FILES:=$(LINUX_DIR)/crypto/deflate.ko
   AUTOLOAD:=$(call AutoLoad,09,deflate)
@@ -533,7 +459,8 @@ define KernelPackage/crypto-sha1
   DEPENDS:=+kmod-crypto-hash
   KCONFIG:= \
 	CONFIG_CRYPTO_SHA1 \
-	CONFIG_CRYPTO_SHA1_OCTEON
+	CONFIG_CRYPTO_SHA1_OCTEON \
+	CONFIG_CRYPTO_SHA1_SSSE3
   FILES:=$(LINUX_DIR)/crypto/sha1_generic.ko
   AUTOLOAD:=$(call AutoLoad,09,sha1_generic)
   $(call AddDepends/crypto)
@@ -544,6 +471,11 @@ define KernelPackage/crypto-sha1/octeon
   AUTOLOAD:=$(call AutoLoad,09,octeon-sha1)
 endef
 
+define KernelPackage/crypto-sha1/x86/64
+  FILES+=$(LINUX_DIR)/arch/x86/crypto/sha1-ssse3.ko
+  AUTOLOAD:=$(call AutoLoad,09,sha1-ssse3)
+endef
+
 $(eval $(call KernelPackage,crypto-sha1))
 
 
@@ -552,7 +484,8 @@ define KernelPackage/crypto-sha256
   DEPENDS:=+kmod-crypto-hash
   KCONFIG:= \
 	CONFIG_CRYPTO_SHA256 \
-	CONFIG_CRYPTO_SHA256_OCTEON
+	CONFIG_CRYPTO_SHA256_OCTEON \
+	CONFIG_CRYPTO_SHA256_SSSE3
   FILES:=$(LINUX_DIR)/crypto/sha256_generic.ko
   AUTOLOAD:=$(call AutoLoad,09,sha256_generic)
   $(call AddDepends/crypto)
@@ -563,6 +496,11 @@ define KernelPackage/crypto-sha256/octeon
   AUTOLOAD:=$(call AutoLoad,09,octeon-sha256)
 endef
 
+define KernelPackage/crypto-sha256/x86/64
+  FILES+=$(LINUX_DIR)/arch/x86/crypto/sha256-ssse3.ko
+  AUTOLOAD:=$(call AutoLoad,09,sha256-ssse3)
+endef
+
 $(eval $(call KernelPackage,crypto-sha256))
 
 
@@ -571,7 +509,8 @@ define KernelPackage/crypto-sha512
   DEPENDS:=+kmod-crypto-hash
   KCONFIG:= \
 	CONFIG_CRYPTO_SHA512 \
-	CONFIG_CRYPTO_SHA512_OCTEON
+	CONFIG_CRYPTO_SHA512_OCTEON \
+	CONFIG_CRYPTO_SHA512_SSSE3
   FILES:=$(LINUX_DIR)/crypto/sha512_generic.ko
   AUTOLOAD:=$(call AutoLoad,09,sha512_generic)
   $(call AddDepends/crypto)
@@ -582,6 +521,11 @@ define KernelPackage/crypto-sha512/octeon
   AUTOLOAD:=$(call AutoLoad,09,octeon-sha512)
 endef
 
+define KernelPackage/crypto-sha512/x86/64
+  FILES+=$(LINUX_DIR)/arch/x86/crypto/sha512-ssse3.ko
+  AUTOLOAD:=$(call AutoLoad,09,sha512-ssse3)
+endef
+
 $(eval $(call KernelPackage,crypto-sha512))
 
 
@@ -661,15 +605,3 @@ define KernelPackage/crypto-xts
 endef
 
 $(eval $(call KernelPackage,crypto-xts))
-
-
-define KernelPackage/crypto-mv-cesa
-  TITLE:=Marvell crypto engine
-  DEPENDS:=+kmod-crypto-manager @TARGET_kirkwood||TARGET_orion
-  KCONFIG:=CONFIG_CRYPTO_DEV_MV_CESA
-  FILES:=$(LINUX_DIR)/drivers/crypto/mv_cesa.ko
-  AUTOLOAD:=$(call AutoLoad,09,mv_cesa)
-  $(call AddDepends/crypto)
-endef
-
-$(eval $(call KernelPackage,crypto-mv-cesa))

+ 3 - 3
package/kernel/linux/modules/fs.mk

@@ -82,7 +82,7 @@ $(eval $(call KernelPackage,fs-autofs4))
 define KernelPackage/fs-btrfs
   SUBMENU:=$(FS_MENU)
   TITLE:=BTRFS filesystem support
-  DEPENDS:=+kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib +kmod-lib-raid6 +kmod-lib-xor
+  DEPENDS:=+kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +kmod-lib-raid6 +kmod-lib-xor
   KCONFIG:=\
 	CONFIG_BTRFS_FS \
 	CONFIG_BTRFS_FS_POSIX_ACL=n \
@@ -144,7 +144,7 @@ $(eval $(call KernelPackage,fs-configfs))
 define KernelPackage/fs-cramfs
   SUBMENU:=$(FS_MENU)
   TITLE:=Compressed RAM/ROM filesystem support
-  DEPENDS:=+kmod-lib-zlib
+  DEPENDS:=+kmod-lib-zlib-inflate
   KCONFIG:= \
 	CONFIG_CRAMFS
   FILES:=$(LINUX_DIR)/fs/cramfs/cramfs.ko
@@ -268,7 +268,7 @@ $(eval $(call KernelPackage,fs-hfsplus))
 define KernelPackage/fs-isofs
   SUBMENU:=$(FS_MENU)
   TITLE:=ISO9660 filesystem support
-  DEPENDS:=+kmod-lib-zlib
+  DEPENDS:=+kmod-lib-zlib-inflate
   KCONFIG:=CONFIG_ISO9660_FS CONFIG_JOLIET=y CONFIG_ZISOFS=n
   FILES:=$(LINUX_DIR)/fs/isofs/isofs.ko
   AUTOLOAD:=$(call AutoLoad,30,isofs)

+ 24 - 9
package/kernel/linux/modules/hwmon.mk

@@ -313,19 +313,34 @@ endef
 $(eval $(call KernelPackage,hwmon-w83793))
 
 
-define KernelPackage/hwmon-gsc
-  TITLE:=Gateworks GSC monitoring support
-  KCONFIG:=CONFIG_SENSORS_GSC
-  FILES:=$(LINUX_DIR)/drivers/hwmon/gsc.ko
-  AUTOLOAD:=$(call AutoLoad,60,gsc)
-  $(call AddDepends/hwmon,+kmod-i2c-core)
+define KernelPackage/hwmon-tmp102
+  TITLE:=Texas Instruments TMP102 monitoring support
+  KCONFIG:=CONFIG_SENSORS_TMP102
+  FILES:=$(LINUX_DIR)/drivers/hwmon/tmp102.ko
+  AUTOLOAD:=$(call AutoProbe,tmp102)
+  $(call AddDepends/hwmon,+kmod-i2c-core +PACKAGE_kmod-thermal:kmod-thermal)
+endef
+
+define KernelPackage/hwmon-tmp102/description
+ Kernel module for Texas Instruments TMP102 temperature sensors chip
+endef
+
+$(eval $(call KernelPackage,hwmon-tmp102))
+
+
+define KernelPackage/hwmon-tmp103
+  TITLE:=Texas Instruments TMP103 monitoring support
+  KCONFIG:=CONFIG_SENSORS_TMP103
+  FILES:=$(LINUX_DIR)/drivers/hwmon/tmp103.ko
+  AUTOLOAD:=$(call AutoProbe,tmp103)
+  $(call AddDepends/hwmon,+kmod-i2c-core +kmod-regmap)
 endef
 
-define KernelPackage/hwmon-gsc/description
-  Kernel module for the Gateworks System Controller chips.
+define KernelPackage/hwmon-tmp103/description
+ Kernel module for Texas Instruments TMP103 temperature sensors chip
 endef
 
-$(eval $(call KernelPackage,hwmon-gsc))
+$(eval $(call KernelPackage,hwmon-tmp103))
 
 
 define KernelPackage/hwmon-tmp421

+ 0 - 47
package/kernel/linux/modules/i2c.mk

@@ -104,53 +104,6 @@ endef
 
 $(eval $(call KernelPackage,i2c-gpio))
 
-I2C_MPC_MODULES:=\
-  CONFIG_I2C_MPC:drivers/i2c/busses/i2c-mpc
-
-define KernelPackage/i2c-mpc
-  $(call i2c_defaults,$(I2C_MPC_MODULES),59)
-  TITLE:=MPC I2C accessors
-  DEPENDS:=@TARGET_mpc52xx||TARGET_mpc83xx||TARGET_mpc85xx +kmod-i2c-core
-endef
-
-define KernelPackage/i2c-mpc/description
- Kernel module for Freescale MPC52xx MPC83xx MPC85xx I2C accessors
-endef
-
-$(eval $(call KernelPackage,i2c-mpc))
-
-I2C_IBM_IIC_MODULES:=\
-  CONFIG_I2C_IBM_IIC:drivers/i2c/busses/i2c-ibm_iic
-
-define KernelPackage/i2c-ibm-iic
-  $(call i2c_defaults,$(OF_I2C_MODULES),59)
-  TITLE:=IBM PPC 4xx on-chip I2C interface support
-  DEPENDS:=@TARGET_ppc40x||TARGET_ppc4xx +kmod-i2c-core
-endef
-
-define KernelPackage/i2c-ibm-iic/description
- Kernel module for IIC peripheral found on embedded IBM PPC4xx based systems
-endef
-
-$(eval $(call KernelPackage,i2c-ibm-iic))
-
-I2C_MV64XXX_MODULES:=\
-  CONFIG_I2C_MV64XXX:drivers/i2c/busses/i2c-mv64xxx
-
-define KernelPackage/i2c-mv64xxx
-  $(call i2c_defaults,$(I2C_MV64XXX_MODULES),59)
-  TITLE:=Orion Platform I2C interface support
-  DEPENDS:=@TARGET_kirkwood||TARGET_orion +kmod-i2c-core
-endef
-
-define KernelPackage/i2c-mv64xxx/description
- Kernel module for I2C interface on the Kirkwood, Orion and Armada XP/370
- family processors
-endef
-
-$(eval $(call KernelPackage,i2c-mv64xxx))
-
-
 I2C_TINY_USB_MODULES:= \
   CONFIG_I2C_TINY_USB:drivers/i2c/busses/i2c-tiny-usb
 

+ 17 - 9
package/kernel/linux/modules/lib.mk

@@ -195,20 +195,28 @@ endef
 $(eval $(call KernelPackage,lib-textsearch))
 
 
-define KernelPackage/lib-zlib
+define KernelPackage/lib-zlib-inflate
   SUBMENU:=$(LIB_MENU)
   TITLE:=Zlib support
   HIDDEN:=1
-  KCONFIG:= \
-    CONFIG_ZLIB_DEFLATE \
-    CONFIG_ZLIB_INFLATE
-  FILES:= \
-    $(LINUX_DIR)/lib/zlib_deflate/zlib_deflate.ko \
-    $(LINUX_DIR)/lib/zlib_inflate/zlib_inflate.ko
-  AUTOLOAD:=$(call AutoProbe,zlib_deflate zlib_inflate)
+  KCONFIG:=CONFIG_ZLIB_INFLATE
+  FILES:=$(LINUX_DIR)/lib/zlib_inflate/zlib_inflate.ko
+  AUTOLOAD:=$(call AutoProbe,zlib_inflate)
+endef
+
+$(eval $(call KernelPackage,lib-zlib-inflate))
+
+
+define KernelPackage/lib-zlib-deflate
+  SUBMENU:=$(LIB_MENU)
+  TITLE:=Zlib support
+  HIDDEN:=1
+  KCONFIG:=CONFIG_ZLIB_DEFLATE
+  FILES:=$(LINUX_DIR)/lib/zlib_deflate/zlib_deflate.ko
+  AUTOLOAD:=$(call AutoProbe,zlib_deflate)
 endef
 
-$(eval $(call KernelPackage,lib-zlib))
+$(eval $(call KernelPackage,lib-zlib-deflate))
 
 
 define KernelPackage/lib-cordic

+ 33 - 51
package/kernel/linux/modules/netdevices.mk

@@ -130,24 +130,6 @@ endef
 $(eval $(call KernelPackage,et131x))
 
 
-define KernelPackage/gw16083
-  SUBMENU:=$(NETWORK_DEVICES_MENU)
-  TITLE:=Gateworks Ventana Ethernet Expansion Mezzanine driver
-  URL:=http://www.gateworks.com
-  FILES:=$(LINUX_DIR)/drivers/net/phy/gw16083.ko
-  KCONFIG:=CONFIG_GATEWORKS_GW16083
-  DEPENDS:=@TARGET_imx6 @PCI_SUPPORT +kmod-libphy +kmod-igb
-  AUTOLOAD:=$(call AutoLoad,36,gw16083)
-endef
-
-define KernelPackage/gw16083/description
- This package contains the gw16083 kernel module for supporting the Gateworks
- Ventana Ethernet Expansion Mezzanine.
-endef
-
-$(eval $(call KernelPackage,gw16083))
-
-
 define KernelPackage/phylib-broadcom
    SUBMENU:=$(NETWORK_DEVICES_MENU)
    TITLE:=Broadcom Ethernet PHY library
@@ -380,7 +362,7 @@ $(eval $(call KernelPackage,via-rhine))
 define KernelPackage/via-velocity
   SUBMENU:=$(NETWORK_DEVICES_MENU)
   TITLE:=VIA Velocity Gigabit Ethernet Adapter kernel support
-  DEPENDS:=@TARGET_ixp4xx||TARGET_mpc83xx||PCI_SUPPORT +kmod-lib-crc-ccitt
+  DEPENDS:=@PCI_SUPPORT +kmod-lib-crc-ccitt
   KCONFIG:=CONFIG_VIA_VELOCITY
   FILES:=$(LINUX_DIR)/drivers/net/ethernet/via/via-velocity.ko
   AUTOLOAD:=$(call AutoProbe,via-velocity)
@@ -800,38 +782,6 @@ endef
 $(eval $(call KernelPackage,of-mdio))
 
 
-define KernelPackage/fsl-pq-mdio
-  SUBMENU:=$(NETWORK_DEVICES_MENU)
-  TITLE:=Freescale PQ MDIO bus support
-  DEPENDS:=@TARGET_mpc85xx +kmod-of-mdio
-  KCONFIG:=CONFIG_FSL_PQ_MDIO
-  FILES:=$(LINUX_DIR)/drivers/net/ethernet/freescale/fsl_pq_mdio.ko
-  AUTOLOAD:=$(call AutoLoad,42,fsl_pq_mdio)
-endef
-
-define KernelPackage/fsl-pq-mdio/description
- Kernel driver for the Freescale PQ MDIO bus
-endef
-
-$(eval $(call KernelPackage,fsl-pq-mdio))
-
-
-define KernelPackage/gianfar
-  SUBMENU:=$(NETWORK_DEVICES_MENU)
-  TITLE:=Gianfar Ethernet support
-  DEPENDS:=@TARGET_mpc85xx +kmod-fsl-pq-mdio
-  KCONFIG:=CONFIG_GIANFAR
-  FILES:=$(LINUX_DIR)/drivers/net/ethernet/freescale/gianfar_driver.ko
-  AUTOLOAD:=$(call AutoProbe,gianfar_driver)
-endef
-
-define KernelPackage/gianfar/description
- Kernel driver for Freescale Gianfar Ethernet support
-endef
-
-$(eval $(call KernelPackage,gianfar))
-
-
 define KernelPackage/vmxnet3
   SUBMENU:=$(NETWORK_DEVICES_MENU)
   TITLE:=VMware VMXNET3 ethernet driver 
@@ -863,3 +813,35 @@ define KernelPackage/spi-ks8995/description
 endef
 
 $(eval $(call KernelPackage,spi-ks8995))
+
+
+define KernelPackage/ethoc
+  SUBMENU:=$(NETWORK_DEVICES_MENU)
+  TITLE:=Opencore.org ethoc driver
+  DEPENDS:=+kmod-libphy
+  FILES:=$(LINUX_DIR)/drivers/net/ethernet/ethoc.ko
+  KCONFIG:=CONFIG_ETHOC
+  AUTOLOAD:=$(call AutoProbe,ethoc)
+endef
+
+define KernelPackage/ethoc/description
+  Kernel module for the Opencores.org ethernet adapter
+endef
+
+$(eval $(call KernelPackage,ethoc))
+
+
+define KernelPackage/bnx2
+  SUBMENU:=$(NETWORK_DEVICES_MENU)
+  TITLE:=BCM5706/5708/5709/5716 ethernet adapter driver
+  DEPENDS:=@PCI_SUPPORT +bnx2-firmware
+  FILES:=$(LINUX_DIR)/drivers/net/ethernet/broadcom/bnx2.ko
+  KCONFIG:=CONFIG_BNX2
+  AUTOLOAD:=$(call AutoProbe,bnx2)
+endef
+
+define KernelPackage/bnx2/description
+  Kernel module for the BCM5706/5708/5709/5716 ethernet adapter
+endef
+
+$(eval $(call KernelPackage,bnx2))

+ 22 - 0
package/kernel/linux/modules/netfilter.mk

@@ -289,6 +289,28 @@ endef
 $(eval $(call KernelPackage,ipt-nat))
 
 
+define KernelPackage/ipt-raw
+  TITLE:=Netfilter IPv4 raw table support
+  KCONFIG:=CONFIG_IP_NF_RAW
+  FILES:=$(LINUX_DIR)/net/ipv4/netfilter/iptable_raw.ko
+  AUTOLOAD:=$(call AutoProbe,iptable_raw)
+  $(call AddDepends/ipt)
+endef
+
+$(eval $(call KernelPackage,ipt-raw))
+
+
+define KernelPackage/ipt-raw6
+  TITLE:=Netfilter IPv6 raw table support
+  KCONFIG:=CONFIG_IP6_NF_RAW
+  FILES:=$(LINUX_DIR)/net/ipv6/netfilter/ip6table_raw.ko
+  AUTOLOAD:=$(call AutoProbe,ip6table_raw)
+  $(call AddDepends/ipt,+kmod-ip6tables)
+endef
+
+$(eval $(call KernelPackage,ipt-raw6))
+
+
 define KernelPackage/ipt-nat6
   TITLE:=IPv6 NAT targets
   KCONFIG:=$(KCONFIG_IPT_NAT6)

+ 4 - 137
package/kernel/linux/modules/other.mk

@@ -114,23 +114,8 @@ endef
 $(eval $(call KernelPackage,bluetooth_6lowpan))
 
 
-define KernelPackage/bluetooth-hci-h4p
-  SUBMENU:=$(OTHER_MENU)
-  TITLE:=HCI driver with H4 Nokia extensions
-  DEPENDS:=@TARGET_omap24xx +kmod-bluetooth
-  KCONFIG:=CONFIG_BT_HCIH4P
-  FILES:=$(LINUX_DIR)/drivers/bluetooth/hci_h4p/hci_h4p.ko
-  AUTOLOAD:=$(call AutoProbe,hci_h4p)
-endef
-
-define KernelPackage/bluetooth-hci-h4p/description
- HCI driver with H4 Nokia extensions
-endef
-
-$(eval $(call KernelPackage,bluetooth-hci-h4p))
-
-
 define KernelPackage/dma-buf
+  SUBMENU:=$(OTHER_MENU)
   TITLE:=DMA shared buffer support
   HIDDEN:=1
   KCONFIG:=CONFIG_DMA_SHARED_BUFFER
@@ -383,7 +368,7 @@ define KernelPackage/sdhci
 	$(LINUX_DIR)/drivers/mmc/host/sdhci.ko \
 	$(LINUX_DIR)/drivers/mmc/host/sdhci-pltfm.ko
 
-  AUTOLOAD:=$(call AutoProbe,sdhci sdhci-pltfm,1)
+  AUTOLOAD:=$(call AutoProbe,sdhci-pltfm,1)
 endef
 
 define KernelPackage/sdhci/description
@@ -481,38 +466,6 @@ endef
 $(eval $(call KernelPackage,bcma))
 
 
-define KernelPackage/wdt-omap
-  SUBMENU:=$(OTHER_MENU)
-  TITLE:=OMAP Watchdog timer
-  DEPENDS:=@(TARGET_omap24xx||TARGET_omap35xx)
-  KCONFIG:=CONFIG_OMAP_WATCHDOG
-  FILES:=$(LINUX_DIR)/drivers/$(WATCHDOG_DIR)/omap_wdt.ko
-  AUTOLOAD:=$(call AutoLoad,50,omap_wdt,1)
-endef
-
-define KernelPackage/wdt-omap/description
- Kernel module for TI omap watchdog timer
-endef
-
-$(eval $(call KernelPackage,wdt-omap))
-
-
-define KernelPackage/wdt-orion
-  SUBMENU:=$(OTHER_MENU)
-  TITLE:=Marvell Orion Watchdog timer
-  DEPENDS:=@TARGET_orion||TARGET_kirkwood
-  KCONFIG:=CONFIG_ORION_WATCHDOG
-  FILES:=$(LINUX_DIR)/drivers/$(WATCHDOG_DIR)/orion_wdt.ko
-  AUTOLOAD:=$(call AutoLoad,50,orion_wdt,1)
-endef
-
-define KernelPackage/wdt-orion/description
- Kernel module for Marvell Orion, Kirkwood and Armada XP/370 watchdog timer
-endef
-
-$(eval $(call KernelPackage,wdt-orion))
-
-
 define KernelPackage/rtc-ds1307
   SUBMENU:=$(OTHER_MENU)
   TITLE:=Dallas/Maxim DS1307 (and compatible) RTC support
@@ -583,23 +536,6 @@ endef
 $(eval $(call KernelPackage,rtc-isl1208))
 
 
-define KernelPackage/rtc-marvell
-  SUBMENU:=$(OTHER_MENU)
-  TITLE:=Marvell SoC built-in RTC support
-  DEPENDS:=@RTC_SUPPORT @TARGET_kirkwood||TARGET_orion
-  KCONFIG:=CONFIG_RTC_DRV_MV \
-	CONFIG_RTC_CLASS=y
-  FILES:=$(LINUX_DIR)/drivers/rtc/rtc-mv.ko
-  AUTOLOAD:=$(call AutoProbe,rtc-mv)
-endef
-
-define KernelPackage/rtc-marvell/description
- Kernel module for Marvell SoC built-in RTC.
-endef
-
-$(eval $(call KernelPackage,rtc-marvell))
-
-
 define KernelPackage/rtc-pcf8563
   SUBMENU:=$(OTHER_MENU)
   TITLE:=Philips PCF8563/Epson RTC8564 RTC support
@@ -650,22 +586,6 @@ endef
 
 $(eval $(call KernelPackage,rtc-pt7c4338))
 
-define KernelPackage/rtc-snvs
-  SUBMENU:=$(OTHER_MENU)
-  TITLE:=Freescale SNVS RTC support
-  DEPENDS:=@TARGET_imx6 @RTC_SUPPORT
-  KCONFIG:=CONFIG_RTC_DRV_SNVS \
-	CONFIG_RTC_CLASS=y
-  FILES:=$(LINUX_DIR)/drivers/rtc/rtc-snvs.ko
-  AUTOLOAD:=$(call AutoLoad,50,rtc-snvs,1)
-endef
-
-define KernelPackage/rtc-snvs/description
- Kernel module for Freescale SNVS RTC on chip module
-endef
-
-$(eval $(call KernelPackage,rtc-snvs))
-
 define KernelPackage/rtc-rs5c372a
   SUBMENU:=$(OTHER_MENU)
   TITLE:=Ricoh R2025S/D, RS5C372A/B, RV5C386, RV5C387A
@@ -791,22 +711,6 @@ endef
 $(eval $(call KernelPackage,zram))
 
 
-define KernelPackage/mvsdio
-  SUBMENU:=$(OTHER_MENU)
-  TITLE:=Marvell SDIO support
-  DEPENDS:=@TARGET_orion||TARGET_kirkwood +kmod-mmc
-  KCONFIG:=CONFIG_MMC_MVSDIO
-  FILES:=$(LINUX_DIR)/drivers/mmc/host/mvsdio.ko
-  AUTOLOAD:=$(call AutoProbe,mvsdio)
-endef
-
-define KernelPackage/mvsdio/description
- Kernel support for the Marvell SDIO controller
-endef
-
-$(eval $(call KernelPackage,mvsdio))
-
-
 define KernelPackage/pps
   SUBMENU:=$(OTHER_MENU)
   TITLE:=PPS support
@@ -881,7 +785,7 @@ $(eval $(call KernelPackage,ptp))
 define KernelPackage/ptp-gianfar
   SUBMENU:=$(OTHER_MENU)
   TITLE:=Freescale Gianfar PTP support
-  DEPENDS:=@TARGET_mpc85xx +kmod-gianfar +kmod-ptp
+  DEPENDS:=@TARGET_mpc85xx +kmod-ptp
   KCONFIG:=CONFIG_PTP_1588_CLOCK_GIANFAR
   FILES:=$(LINUX_DIR)/drivers/net/ethernet/freescale/gianfar_ptp.ko
   AUTOLOAD:=$(call AutoProbe,gianfar_ptp)
@@ -913,7 +817,7 @@ define KernelPackage/random-omap
   TITLE:=Hardware Random Number Generator OMAP support
   KCONFIG:=CONFIG_HW_RANDOM_OMAP
   FILES:=$(LINUX_DIR)/drivers/char/hw_random/omap-rng.ko
-  DEPENDS:=@(TARGET_omap24xx||TARGET_omap) +kmod-random-core
+  DEPENDS:=@TARGET_omap24xx +kmod-random-core
   AUTOLOAD:=$(call AutoProbe,random-omap)
 endef
 
@@ -954,43 +858,6 @@ endef
 $(eval $(call KernelPackage,thermal))
 
 
-define KernelPackage/thermal-imx
-  SUBMENU:=$(OTHER_MENU)
-  TITLE:=Temperature sensor driver for Freescale i.MX SoCs
-  DEPENDS:=@TARGET_imx6 +kmod-thermal
-  KCONFIG:= \
-	CONFIG_IMX_THERMAL
-  FILES:=$(LINUX_DIR)/drivers/thermal/imx_thermal.ko
-  AUTOLOAD:=$(call AutoProbe,imx_thermal)
-endef
-
-define KernelPackage/thermal-imx/description
- Support for Temperature Monitor (TEMPMON) found on Freescale i.MX SoCs.
- It supports one critical trip point and one passive trip point. The
- cpufreq is used as the cooling device to throttle CPUs when the
- passive trip is crossed.
-endef
-
-$(eval $(call KernelPackage,thermal-imx))
-
-
-define KernelPackage/thermal-kirkwood
-  SUBMENU:=$(OTHER_MENU)
-  TITLE:=Temperature sensor on Marvell Kirkwood SoCs
-  DEPENDS:=@TARGET_kirkwood +kmod-thermal
-  KCONFIG:=CONFIG_KIRKWOOD_THERMAL
-  FILES:=$(LINUX_DIR)/drivers/thermal/kirkwood_thermal.ko
-  AUTOLOAD:=$(call AutoProbe,kirkwood_thermal)
-endef
-
-define KernelPackage/thermal-kirkwood/description
- Support for the Kirkwood thermal sensor driver into the Linux thermal
- framework. Only kirkwood 88F6282 and 88F6283 have this sensor.
-endef
-
-$(eval $(call KernelPackage,thermal-kirkwood))
-
-
 define KernelPackage/gpio-beeper
   SUBMENU:=$(OTHER_MENU)
   TITLE:=GPIO beeper support

+ 47 - 8
package/kernel/linux/modules/pcmcia.mk

@@ -13,6 +13,7 @@ define KernelPackage/pcmcia-core
   DEPENDS:=@PCMCIA_SUPPORT
   KCONFIG:= \
 	CONFIG_PCMCIA \
+	CONFIG_PCMCIA_LOAD_CIS=y \
 	CONFIG_CARDBUS \
 	CONFIG_PCCARD \
 	PCMCIA_DEBUG=n
@@ -28,13 +29,19 @@ endef
 
 $(eval $(call KernelPackage,pcmcia-core))
 
-define KernelPackage/pcmcia-rsrc
+
+define AddDepends/pcmcia
   SUBMENU:=$(PCMCIA_MENU)
+  DEPENDS+=kmod-pcmcia-core $(1)
+endef
+
+
+define KernelPackage/pcmcia-rsrc
   TITLE:=PCMCIA resource support
-  DEPENDS:=kmod-pcmcia-core
   KCONFIG:=CONFIG_PCCARD_NONSTATIC=y
   FILES:=$(LINUX_DIR)/drivers/pcmcia/pcmcia_rsrc.ko
   AUTOLOAD:=$(call AutoLoad,26,pcmcia_rsrc)
+  $(call AddDepends/pcmcia)
 endef
 
 define KernelPackage/pcmcia-rsrc/description
@@ -45,26 +52,26 @@ $(eval $(call KernelPackage,pcmcia-rsrc))
 
 
 define KernelPackage/pcmcia-yenta
-  SUBMENU:=$(PCMCIA_MENU)
   TITLE:=yenta socket driver
-  DEPENDS:=kmod-pcmcia-rsrc
   KCONFIG:=CONFIG_YENTA
   FILES:=$(LINUX_DIR)/drivers/pcmcia/yenta_socket.ko
-  AUTOLOAD:=$(call AutoLoad,41,pcmcia_rsrc yenta_socket)
+  AUTOLOAD:=$(call AutoLoad,41,yenta_socket)
+  DEPENDS:=+kmod-pcmcia-rsrc
+  $(call AddDepends/pcmcia)
 endef
 
 $(eval $(call KernelPackage,pcmcia-yenta))
 
 
 define KernelPackage/pcmcia-serial
-  SUBMENU:=$(PCMCIA_MENU)
   TITLE:=Serial devices support
-  DEPENDS:=kmod-pcmcia-core +kmod-serial-8250
   KCONFIG:= \
 	CONFIG_PCMCIA_SERIAL_CS \
 	CONFIG_SERIAL_8250_CS
-    FILES:=$(LINUX_DIR)/drivers/tty/serial/8250/serial_cs.ko
+  FILES:=$(LINUX_DIR)/drivers/tty/serial/8250/serial_cs.ko
   AUTOLOAD:=$(call AutoLoad,45,serial_cs)
+  DEPENDS:=+kmod-serial-8250
+  $(call AddDepends/pcmcia)
 endef
 
 define KernelPackage/pcmcia-serial/description
@@ -72,3 +79,35 @@ define KernelPackage/pcmcia-serial/description
 endef
 
 $(eval $(call KernelPackage,pcmcia-serial))
+
+
+define KernelPackage/pcmcia-pd6729
+  TITLE:=Cirrus PD6729 compatible bridge support
+  KCONFIG:=CONFIG_PD6729
+  FILES:=$(LINUX_DIR)/drivers/pcmcia/pd6729.ko
+  AUTOLOAD:=$(call AutoLoad,41,pd6729)
+  DEPENDS:=+kmod-pcmcia-rsrc
+  $(call AddDepends/pcmcia)
+endef
+
+define KernelPackage/pcmcia-pd6729/description
+ Kernel support for the Cirrus PD6729 PCI-to-PCMCIA bridge
+endef
+
+$(eval $(call KernelPackage,pcmcia-pd6729))
+
+
+define KernelPackage/pcmcia-nozomi
+  TITLE:=Option Fusion+ card
+  KCONFIG:=CONFIG_NOZOMI
+  FILES:=$(LINUX_DIR)/drivers/tty/nozomi.ko
+  AUTOLOAD:=$(call AutoLoad,60,nozomi)
+  DEPENDS:=+kmod-pcmcia-rsrc
+  $(call AddDepends/pcmcia)
+endef
+
+define KernelPackage/pcmcia-nozomi/description
+ Kernel support for Option Fusion+ card
+endef
+
+$(eval $(call KernelPackage,pcmcia-nozomi))

+ 0 - 17
package/kernel/linux/modules/spi.mk