diff --git a/config/Config-images.in b/config/Config-images.in index dcaf6fb0b96f81..607659114e672e 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -17,6 +17,7 @@ menu "Target Images" default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ar71xx default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_apm821xx + default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_mpc85xx default TARGET_INITRAMFS_COMPRESSION_NONE depends on TARGET_ROOTFS_INITRAMFS help @@ -61,7 +62,7 @@ menu "Target Images" config TARGET_ROOTFS_TARGZ bool "tar.gz" - default n if USES_TARGZ + default y if USES_TARGZ help Build a compressed tar archive of the root filesystem. @@ -69,7 +70,7 @@ menu "Target Images" menuconfig TARGET_ROOTFS_EXT4FS bool "ext4" - default n if USES_EXT4 + default y if USES_EXT4 help Build an ext4 root filesystem. @@ -114,7 +115,7 @@ menu "Target Images" config TARGET_ROOTFS_ISO bool "iso" default n - depends on TARGET_x86 + depends on TARGET_x86_generic help Create a bootable ISO image. @@ -141,7 +142,7 @@ menu "Target Images" int "Block size (in KiB)" depends on TARGET_ROOTFS_SQUASHFS default 64 if LOW_MEMORY_FOOTPRINT - default 1024 + default 256 menuconfig TARGET_ROOTFS_UBIFS bool "ubifs" @@ -184,31 +185,22 @@ menu "Target Images" depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_ISO || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS select PACKAGE_grub2 default y - - config EFI_IMAGES - bool "Build EFI GRUB images (Linux x86 or x86_64 host only)" - depends on TARGET_x86 - depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_ISO || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS - select PACKAGE_grub2 - select PACKAGE_grub2-efi - default n - config GRUB_CONSOLE bool "Use Console Terminal (in addition to Serial)" - depends on GRUB_IMAGES || EFI_IMAGES + depends on GRUB_IMAGES default n if (TARGET_x86_generic_Soekris45xx || TARGET_x86_generic_Soekris48xx || TARGET_x86_net5501 || TARGET_x86_geos || TARGET_x86_alix2) default y config GRUB_SERIAL string "Serial port device" - depends on GRUB_IMAGES || EFI_IMAGES + depends on GRUB_IMAGES default "hvc0" if TARGET_x86_xen_domu default "ttyS0" if ! TARGET_x86_xen_domu config GRUB_BAUDRATE int "Serial port baud rate" - depends on GRUB_IMAGES || EFI_IMAGES + depends on GRUB_IMAGES default 38400 if TARGET_x86_generic default 115200 @@ -219,41 +211,40 @@ menu "Target Images" config GRUB_BOOTOPTS string "Extra kernel boot options" - depends on GRUB_IMAGES || EFI_IMAGES + depends on GRUB_IMAGES default "xencons=hvc" if TARGET_x86_xen_domu help If you don't know, just leave it blank. config GRUB_TIMEOUT string "Seconds to wait before booting the default entry" - depends on GRUB_IMAGES || EFI_IMAGES - default "0" + depends on GRUB_IMAGES + default "5" help If you don't know, 5 seconds is a reasonable default. config VDI_IMAGES bool "Build VirtualBox image files (VDI)" depends on TARGET_x86 || TARGET_x86_64 - depends on GRUB_IMAGES || EFI_IMAGES + select GRUB_IMAGES select TARGET_IMAGES_PAD select PACKAGE_kmod-e1000 config VMDK_IMAGES bool "Build VMware image files (VMDK)" depends on TARGET_x86 || TARGET_x86_64 - depends on GRUB_IMAGES || EFI_IMAGES + select GRUB_IMAGES select TARGET_IMAGES_PAD select PACKAGE_kmod-e1000 - default y config TARGET_IMAGES_PAD bool "Pad images to filesystem size (for JFFS2)" - depends on GRUB_IMAGES || EFI_IMAGES + depends on GRUB_IMAGES config TARGET_IMAGES_GZIP bool "GZip images" depends on TARGET_IMAGES_PAD || TARGET_ROOTFS_EXT4FS || TARGET_x86 - default n + default y comment "Image Options" @@ -261,19 +252,19 @@ menu "Target Images" config TARGET_KERNEL_PARTSIZE int "Kernel partition size (in MB)" - depends on GRUB_IMAGES || EFI_IMAGES - default 8 + depends on GRUB_IMAGES + default 16 config TARGET_ROOTFS_PARTSIZE int "Root filesystem partition size (in MB)" - depends on GRUB_IMAGES || EFI_IMAGES || TARGET_ROOTFS_EXT4FS || TARGET_rb532 || TARGET_mvebu || TARGET_uml - default 96 + depends on GRUB_IMAGES || TARGET_ROOTFS_EXT4FS || TARGET_rb532 || TARGET_mvebu || TARGET_uml + default 256 help Select the root filesystem partition size. config TARGET_ROOTFS_PARTNAME string "Root partition on target device" - depends on GRUB_IMAGES || EFI_IMAGES + depends on GRUB_IMAGES help Override the root partition on the final device. If left empty, it will be mounted by PARTUUID which makes the kernel find the diff --git a/config/Config-kernel.in b/config/Config-kernel.in index d7cb2d9fcbbfd5..678323efa14970 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -62,7 +62,7 @@ config KERNEL_PROFILING config KERNEL_KALLSYMS bool "Compile the kernel with symbol table information" - default n + default y if !SMALL_FLASH help This will give you more information in stack traces from kernel oopses. @@ -254,7 +254,7 @@ config KERNEL_DEVTMPFS default n help devtmpfs is a simple, kernel-managed /dev filesystem. The kernel creates - devices nodes for all registered devices ti simplify boot, but leaves more + devices nodes for all registered devices to simplify boot, but leaves more complex tasks to userspace (e.g. udev). if KERNEL_DEVTMPFS diff --git a/include/download.mk b/include/download.mk index 82a3dd2f988d28..0a256417384133 100644 --- a/include/download.mk +++ b/include/download.mk @@ -103,7 +103,7 @@ hash_var = $(if $(filter-out x,$(1)),MD5SUM,HASH) endif define DownloadMethod/unknown - @echo "ERROR: No download method available"; false + echo "ERROR: No download method available"; false endef define DownloadMethod/default diff --git a/include/host-build.mk b/include/host-build.mk index dc7037385563a3..9120570c54b4a5 100644 --- a/include/host-build.mk +++ b/include/host-build.mk @@ -24,7 +24,7 @@ include $(INCLUDE_DIR)/depends.mk include $(INCLUDE_DIR)/quilt.mk BUILD_TYPES += host -HOST_STAMP_PREPARED:=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(HOST_PREPARED_DEPENDS))) +HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(HOST_PREPARED_DEPENDS))) HOST_STAMP_CONFIGURED:=$(HOST_BUILD_DIR)/.configured HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built HOST_BUILD_PREFIX?=$(if $(IS_PACKAGE_BUILD),$(STAGING_DIR_HOSTPKG),$(STAGING_DIR_HOST)) @@ -78,6 +78,10 @@ HOST_MAKE_FLAGS = HOST_CONFIGURE_CMD = $(BASH) ./configure +ifeq ($(HOST_OS),Darwin) + HOST_CONFIG_SITE:=$(INCLUDE_DIR)/site/darwin +endif + define Host/Configure/Default $(if $(HOST_CONFIGURE_PARALLEL),+)(cd $(HOST_BUILD_DIR)/$(3); \ if [ -x configure ]; then \ @@ -128,6 +132,7 @@ define Host/Exports/Default $(1) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig:$$(HOST_BUILD_PREFIX)/lib/pkgconfig $(1) : export PKG_CONFIG_LIBDIR=$$(HOST_BUILD_PREFIX)/lib/pkgconfig $(1) : export CCACHE_DIR:=$(STAGING_DIR_HOST)/ccache + $(if $(HOST_CONFIG_SITE),$(1) : export CONFIG_SITE:=$(HOST_CONFIG_SITE)) $(if $(IS_PACKAGE_BUILD),$(1) : export PATH=$$(TARGET_PATH_PKG)) endef Host/Exports=$(Host/Exports/Default) diff --git a/include/image-commands.mk b/include/image-commands.mk index 970bdc9b371555..5f0ac6164d9241 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -102,8 +102,7 @@ define Build/tplink-safeloader endef define Build/append-dtb - $(call Image/BuildDTB,$(if $(DEVICE_DTS_DIR),$(DEVICE_DTS_DIR),$(DTS_DIR))/$(DEVICE_DTS).dts,$@.dtb) - cat $@.dtb >> $@ + cat $(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb >> $@ endef define Build/install-dtb @@ -114,6 +113,11 @@ define Build/install-dtb ) endef +define Build/install-zImage + $(CP) $(KDIR)/zImage \ + $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-zImage +endef + define Build/fit $(TOPDIR)/scripts/mkits.sh \ -D $(DEVICE_NAME) -o $@.its -k $@ \ @@ -244,14 +248,20 @@ endef define Build/tplink-v2-header $(STAGING_DIR_HOST)/bin/mktplinkfw2 \ - -c -V "ver. 2.0" -B $(TPLINK_BOARD_ID) $(1) -k $@ -o $@.new + -c -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -L $(KERNEL_LOADADDR) \ + -E $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ + -w $(TPLINK_HWREVADD) -F "$(TPLINK_FLASHLAYOUT)" \ + -T $(TPLINK_HVERSION) -V "ver. 2.0" \ + -k $@ -o $@.new $(1) @mv $@.new $@ endef define Build/tplink-v2-image $(STAGING_DIR_HOST)/bin/mktplinkfw2 \ - -a 0x4 -j -V "ver. 2.0" -B $(TPLINK_BOARD_ID) $(1) \ - -k $(IMAGE_KERNEL) -r $(IMAGE_ROOTFS) -o $@.new + -H $(TPLINK_HWID) -W $(TPLINK_HWREV) \ + -w $(TPLINK_HWREVADD) -F "$(TPLINK_FLASHLAYOUT)" \ + -T $(TPLINK_HVERSION) -V "ver. 2.0" -a 0x4 -j \ + -k $(IMAGE_KERNEL) -r $(IMAGE_ROOTFS) -o $@.new $(1) cat $@.new >> $@ rm -rf $@.new endef @@ -271,7 +281,7 @@ metadata_json = \ }' define Build/append-metadata - $(if $(SUPPORTED_DEVICES),echo $(call metadata_json,$(SUPPORTED_DEVICES)) | fwtool -I - $@) + $(if $(SUPPORTED_DEVICES),-echo $(call metadata_json,$(SUPPORTED_DEVICES)) | fwtool -I - $@) endef define Build/kernel2minor diff --git a/include/image.mk b/include/image.mk index a1c3781562a421..605cb066729324 100644 --- a/include/image.mk +++ b/include/image.mk @@ -435,7 +435,27 @@ define Device/Build/compile endef +ifndef IB +define Device/Build/dtb + ifndef BUILD_DTS_$(1) + BUILD_DTS_$(1) := 1 + $(KDIR)/image-$(1).dtb: FORCE + $(call Image/BuildDTB,$(strip $(2))/$(strip $(3)).dts,$$@) + + image_prepare: $(KDIR)/image-$(1).dtb + endif + +endef +endif + define Device/Build/kernel + $$(eval $$(foreach dts,$$(DEVICE_DTS), \ + $$(call Device/Build/dtb,$$(notdir $$(dts)), \ + $$(if $$(DEVICE_DTS_DIR),$$(DEVICE_DTS_DIR),$$(DTS_DIR)), \ + $$(dts) \ + ) \ + )) + $(KDIR)/$$(KERNEL_NAME):: image_prepare $$(_TARGET): $$(if $$(KERNEL_INSTALL),$(BIN_DIR)/$$(KERNEL_IMAGE)) $(call Device/Export,$$(KDIR_KERNEL_IMAGE),$(1)) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 8c5af2f765f6aa..ff6ba2a705a040 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -4,13 +4,13 @@ LINUX_RELEASE?=1 LINUX_VERSION-3.18 = .71 LINUX_VERSION-4.4 = .108 -LINUX_VERSION-4.9 = .72 -LINUX_VERSION-4.14 = .6 +LINUX_VERSION-4.9 = .73 +LINUX_VERSION-4.14 = .12 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240 LINUX_KERNEL_HASH-4.4.108 = 5a001198625ce9f7b0ef1e4b43e033aea859e1ef3509532412cce8f0375ba51a -LINUX_KERNEL_HASH-4.9.72 = 69f201f1eb9eade9a3cde26d3896a53df9fddf1e19f9fa7b36331b8b1976b83b -LINUX_KERNEL_HASH-4.14.6 = 0907678ba9ea146ddbdecd0a0b6363f56b896b5c61c9a15e809effb3ea346ccc +LINUX_KERNEL_HASH-4.9.73 = 558b65c53f6d6c421d897ad4b651e51ba341fe4dd97122ec922e23ebd2c16e2b +LINUX_KERNEL_HASH-4.14.12 = 6608f7d480efc5c1078888e9344f4e0b0cd9bef0b6541cbdaec7d138e03856af ifdef KERNEL_PATCHVER LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER))) @@ -24,4 +24,4 @@ KERNEL_PATCHVER ?= $(KERNEL) # disable the md5sum check for unknown kernel versions LINUX_KERNEL_HASH:=$(LINUX_KERNEL_HASH-$(strip $(LINUX_VERSION))) -LINUX_KERNEL_HASH?=x \ No newline at end of file +LINUX_KERNEL_HASH?=x diff --git a/include/kernel.mk b/include/kernel.mk index 7674f0dadc202a..1b6006a62d53e8 100644 --- a/include/kernel.mk +++ b/include/kernel.mk @@ -52,7 +52,7 @@ else LINUX_VERMAGIC:=$(strip $(shell cat $(LINUX_DIR)/.vermagic 2>/dev/null)) LINUX_VERMAGIC:=$(if $(LINUX_VERMAGIC),$(LINUX_VERMAGIC),unknown) - LINUX_UNAME_VERSION:=$(if $(word 3,$(subst ., ,$(KERNEL_BASE))),$(KERNEL_BASE),$(KERNEL_BASE).0) + LINUX_UNAME_VERSION:=$(KERNEL_BASE) ifneq ($(findstring -rc,$(LINUX_VERSION)),) LINUX_UNAME_VERSION:=$(LINUX_UNAME_VERSION)-$(strip $(lastword $(subst -, ,$(LINUX_VERSION)))) endif @@ -64,7 +64,7 @@ else ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),) LINUX_SITE:=@KERNEL/linux/kernel/v$(word 1,$(subst ., ,$(KERNEL_BASE))).x$(TESTING) else - LINUX_UNAME_VERSION:=$(strip $(shell cat $(LINUX_DIR)/include/config/kernel.release)) + LINUX_UNAME_VERSION:=$(strip $(shell cat $(LINUX_DIR)/include/config/kernel.release 2>/dev/null)) endif MODULES_SUBDIR:=lib/modules/$(LINUX_UNAME_VERSION) @@ -85,6 +85,8 @@ else ifneq (,$(findstring $(ARCH) , armeb )) LINUX_KARCH := arm else ifneq (,$(findstring $(ARCH) , mipsel mips64 mips64el )) LINUX_KARCH := mips +else ifneq (,$(findstring $(ARCH) , powerpc64 )) + LINUX_KARCH := powerpc else ifneq (,$(findstring $(ARCH) , sh2 sh3 sh4 )) LINUX_KARCH := sh else ifneq (,$(findstring $(ARCH) , i386 x86_64 )) @@ -121,61 +123,53 @@ ifdef CONFIG_USE_SPARSE KERNEL_MAKEOPTS += C=1 CHECK=$(STAGING_DIR_HOST)/bin/sparse endif +PKG_EXTMOD_SUBDIRS ?= . + +define populate_module_symvers + @mkdir -p $(PKG_INFO_DIR) + cat /dev/null > $(PKG_INFO_DIR)/$(PKG_NAME).symvers; \ + for subdir in $(PKG_EXTMOD_SUBDIRS); do \ + cat $(PKG_INFO_DIR)/*.symvers 2>/dev/null > $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers; \ + done +endef + +define collect_module_symvers + for subdir in $(PKG_EXTMOD_SUBDIRS); do \ + grep -F $$$$(readlink -f $(PKG_BUILD_DIR)) $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers >> $(PKG_BUILD_DIR)/Module.symvers.tmp; \ + done; \ + sort -u $(PKG_BUILD_DIR)/Module.symvers.tmp > $(PKG_BUILD_DIR)/Module.symvers; \ + mv $(PKG_BUILD_DIR)/Module.symvers $(PKG_INFO_DIR)/$(PKG_NAME).symvers +endef + +define KernelPackage/hooks + ifneq ($(PKG_NAME),kernel) + Hooks/Compile/Pre += populate_module_symvers + Hooks/Compile/Post += collect_module_symvers + endif + define KernelPackage/hooks + endef +endef + define KernelPackage/Defaults FILES:= AUTOLOAD:= + MODPARAMS:= PKGFLAGS+=nonshared endef +# 1: name +# 2: install prefix +# 3: module priority prefix +# 4: required for boot +# 5: module list define ModuleAutoLoad - $(SH_FUNC) \ - export modules=; \ - probe_module() { \ - local mods="$$$$$$$$1"; \ - local boot="$$$$$$$$2"; \ - local mod; \ - shift 2; \ - for mod in $$$$$$$$mods; do \ - mkdir -p $(2)/etc/modules.d; \ - echo "$$$$$$$$mod" >> $(2)/etc/modules.d/$(1); \ - done; \ - if [ -e $(2)/etc/modules.d/$(1) ]; then \ - if [ "$$$$$$$$boot" = "1" -a ! -e $(2)/etc/modules-boot.d/$(1) ]; then \ - mkdir -p $(2)/etc/modules-boot.d; \ - ln -s ../modules.d/$(1) $(2)/etc/modules-boot.d/; \ - fi; \ - modules="$$$$$$$${modules:+$$$$$$$$modules }$$$$$$$$mods"; \ - fi; \ - }; \ - add_module() { \ - local priority="$$$$$$$$1"; \ - local mods="$$$$$$$$2"; \ - local boot="$$$$$$$$3"; \ - local mod; \ - shift 3; \ - for mod in $$$$$$$$mods; do \ - mkdir -p $(2)/etc/modules.d; \ - echo "$$$$$$$$mod" >> $(2)/etc/modules.d/$$$$$$$$priority-$(1); \ - done; \ - if [ -e $(2)/etc/modules.d/$$$$$$$$priority-$(1) ]; then \ - if [ "$$$$$$$$boot" = "1" -a ! -e $(2)/etc/modules-boot.d/$$$$$$$$priority-$(1) ]; then \ - mkdir -p $(2)/etc/modules-boot.d; \ - ln -s ../modules.d/$$$$$$$$priority-$(1) $(2)/etc/modules-boot.d/; \ - fi; \ - modules="$$$$$$$${modules:+$$$$$$$$modules }$$$$$$$$priority-$(1)"; \ - fi; \ - }; \ - $(3) \ - if [ -n "$$$$$$$$modules" ]; then \ - modules="$$$$$$$$(echo "$$$$$$$$modules" | tr ' ' '\n' | sort | uniq | paste -s -d' ' -)"; \ - mkdir -p $(2)/etc/modules.d; \ - mkdir -p $(2)/CONTROL; \ - echo "#!/bin/sh" > $(2)/CONTROL/postinst-pkg; \ - echo "[ -z \"\$$$$$$$$IPKG_INSTROOT\" ] || exit 0" >> $(2)/CONTROL/postinst-pkg; \ - echo ". /lib/functions.sh" >> $(2)/CONTROL/postinst-pkg; \ - echo "insert_modules $$$$$$$$modules" >> $(2)/CONTROL/postinst-pkg; \ - chmod 0755 $(2)/CONTROL/postinst-pkg; \ - fi + $(if $(5), \ + mkdir -p $(2)/etc/modules.d; \ + ($(foreach mod,$(5), \ + echo "$(mod)$(if $(MODPARAMS.$(mod)), $(MODPARAMS.$(mod)),$(if $(MODPARAMS), $(MODPARAMS)))"; )) > $(2)/etc/modules.d/$(3)$(1); \ + $(if $(4), \ + mkdir -p $(2)/etc/modules-boot.d; \ + ln -sf ../modules.d/$(3)$(1) $(2)/etc/modules-boot.d/;)) endef ifeq ($(DUMP)$(TARGET_BUILD),) @@ -228,6 +222,7 @@ $(call KernelPackage/$(1)/config) endif $(call KernelPackage/depends) + $(call KernelPackage/hooks) ifneq ($(if $(filter-out %=y %=n %=m,$(KCONFIG)),$(filter m y,$(foreach c,$(filter-out %=y %=n %=m,$(KCONFIG)),$($(c)))),.),) ifneq ($(strip $(FILES)),) @@ -243,7 +238,7 @@ $(call KernelPackage/$(1)/config) exit 1; \ fi; \ done; - $(call ModuleAutoLoad,$(1),$$(1),$(AUTOLOAD)) + $(call ModuleAutoLoad,$(1),$$(1),$(filter-out 0-,$(word 1,$(AUTOLOAD))-),$(filter-out 0,$(word 2,$(AUTOLOAD))),$(wordlist 3,99,$(AUTOLOAD))) $(call KernelPackage/$(1)/install,$$(1)) endef endif @@ -265,12 +260,17 @@ endef version_filter=$(if $(findstring @,$(1)),$(shell $(SCRIPT_DIR)/package-metadata.pl version_filter $(KERNEL_PATCHVER) $(1)),$(1)) +# 1: priority (optional) +# 2: module list +# 3: boot flag define AutoLoad - add_module "$(1)" "$(call version_filter,$(2))" "$(3)"; + $(if $(1),$(1),0) $(if $(3),1,0) $(call version_filter,$(2)) endef +# 1: module list +# 2: boot flag define AutoProbe - probe_module "$(call version_filter,$(1))" "$(2)"; + $(call AutoLoad,,$(1),$(2)) endef version_field=$(if $(word $(1),$(2)),$(word $(1),$(2)),0) diff --git a/include/netfilter.mk b/include/netfilter.mk index 2d537583bd7eb5..616425cb089592 100644 --- a/include/netfilter.mk +++ b/include/netfilter.mk @@ -262,6 +262,10 @@ $(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV6, $(P_V6)nf_dup_i $(eval $(call nf_add,IPT_U32,CONFIG_NETFILTER_XT_MATCH_U32, $(P_XT)xt_u32)) +# checksum + +$(eval $(call nf_add,IPT_CHECKSUM,CONFIG_NETFILTER_XT_TARGET_CHECKSUM, $(P_XT)xt_CHECKSUM)) + # netlink @@ -366,7 +370,6 @@ IPT_BUILTIN += $(IPT_NAT_EXTRA-y) IPT_BUILTIN += $(NF_NATHELPER-y) IPT_BUILTIN += $(NF_NATHELPER_EXTRA-y) IPT_BUILTIN += $(IPT_ULOG-y) -IPT_BUILTIN += $(IPT_DEBUG-y) IPT_BUILTIN += $(IPT_TPROXY-y) IPT_BUILTIN += $(NFNETLINK-y) IPT_BUILTIN += $(NFNETLINK_LOG-y) diff --git a/include/package-defaults.mk b/include/package-defaults.mk index 0eecd6c4f81ec1..0bca076e72d190 100644 --- a/include/package-defaults.mk +++ b/include/package-defaults.mk @@ -57,6 +57,8 @@ define Package/Default DEFAULT_VARIANT:= USERID:= ALTERNATIVES:= + LICENSE:=$(PKG_LICENSE) + LICENSE_FILES:=$(PKG_LICENSE_FILES) endef Build/Patch:=$(Build/Patch/Default) diff --git a/include/package-dumpinfo.mk b/include/package-dumpinfo.mk index b717c1b472df6a..1be7d958d42461 100644 --- a/include/package-dumpinfo.mk +++ b/include/package-dumpinfo.mk @@ -46,8 +46,8 @@ $(if $(filter nonshared,$(PKGFLAGS)),,Repository: $(if $(FEED),$(FEED),base) Maintainer: $(MAINTAINER) $(if $(USERID),Require-User: $(USERID) )Source: $(PKG_SOURCE) -$(if $(PKG_LICENSE),License: $(PKG_LICENSE) -)$(if $(PKG_LICENSE_FILES),LicenseFiles: $(PKG_LICENSE_FILES) +$(if $(LICENSE),License: $(LICENSE) +)$(if $(LICENSE_FILES),LicenseFiles: $(LICENSE_FILES) )Type: $(if $(Package/$(1)/targets),$(Package/$(1)/targets),$(if $(PKG_TARGETS),$(PKG_TARGETS),ipkg)) $(if $(KCONFIG),Kernel-Config: $(KCONFIG) )$(if $(BUILDONLY),Build-Only: $(BUILDONLY) diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index bf508fb4934ad6..9e2717e788cc21 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -161,8 +161,8 @@ $$(call addfield,Depends,$$(Package/$(1)/DEPENDS) )$$(call addfield,Provides,$$(call mergelist,$(PROVIDES)) )$$(call addfield,Alternatives,$$(call mergelist,$(ALTERNATIVES)) )$$(call addfield,Source,$(SOURCE) -)$$(call addfield,License,$$(PKG_LICENSE) -)$$(call addfield,LicenseFiles,$$(PKG_LICENSE_FILES) +)$$(call addfield,License,$(LICENSE) +)$$(call addfield,LicenseFiles,$(LICENSE_FILES) )$$(call addfield,Section,$(SECTION) )$$(call addfield,Require-User,$(USERID) )$(if $(filter hold,$(PKG_FLAGS)),Status: unknown hold not-installed diff --git a/include/package.mk b/include/package.mk index 5dc4aec70da10a..78ea5d0ef8b73e 100644 --- a/include/package.mk +++ b/include/package.mk @@ -69,9 +69,9 @@ ifneq ($(PREV_STAMP_PREPARED),) STAMP_PREPARED:=$(PREV_STAMP_PREPARED) CONFIG_AUTOREBUILD:= else - STAMP_PREPARED:=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(PKG_PREPARED_DEPENDS))) + STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(PKG_PREPARED_DEPENDS))) endif -STAMP_CONFIGURED:=$(PKG_BUILD_DIR)/.configured$(if $(DUMP),,_$(call confvar,$(PKG_CONFIG_DEPENDS))) +STAMP_CONFIGURED=$(PKG_BUILD_DIR)/.configured$(if $(DUMP),,_$(call confvar,$(PKG_CONFIG_DEPENDS))) STAMP_CONFIGURED_WILDCARD=$(PKG_BUILD_DIR)/.configured_* STAMP_BUILT:=$(PKG_BUILD_DIR)/.built STAMP_INSTALLED:=$(STAGING_DIR)/stamp/.$(PKG_DIR_NAME)$(if $(BUILD_VARIANT),.$(BUILD_VARIANT),)_installed @@ -144,6 +144,9 @@ endef Build/Exports=$(Build/Exports/Default) define Build/CoreTargets + STAMP_PREPARED:=$$(STAMP_PREPARED) + STAMP_CONFIGURED:=$$(STAMP_CONFIGURED) + $(if $(QUILT),$(Build/Quilt)) $(call Build/Autoclean) $(call DefaultTargets) @@ -165,11 +168,11 @@ define Build/CoreTargets $(call Build/Exports,$(STAMP_CONFIGURED)) $(STAMP_CONFIGURED): $(STAMP_PREPARED) $(STAMP_CONFIGURED_DEPENDS) + rm -f $(STAMP_CONFIGURED_WILDCARD) $(CleanStaging) $(foreach hook,$(Hooks/Configure/Pre),$(call $(hook))$(sep)) $(Build/Configure) $(foreach hook,$(Hooks/Configure/Post),$(call $(hook))$(sep)) - rm -f $(STAMP_CONFIGURED_WILDCARD) touch $$@ $(call Build/Exports,$(STAMP_BUILT)) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index 0fab32601629ae..6a423d2c7dd71b 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -27,32 +27,36 @@ $(eval $(call TestHostCommand,proper-umask, \ umask | grep -xE 00[012][012])) $(eval $(call SetupHostCommand,gcc, \ - Please install the GNU C Compiler (gcc), \ - $(CC) --version | grep gcc, \ - gcc --version | grep gcc, \ - gcc49 --version | grep gcc, \ + Please install the GNU C Compiler (gcc) 4.8 or later \ + $(CC) -dumpversion | grep -E '(4\.[8-9]|5\.?[0-9]?|6\.?[0-9]?|7\.?[0-9]?)', \ + gcc -dumpversion | grep -E '(4\.[8-9]|5\.?[0-9]?|6\.?[0-9]?|7\.?[0-9]?)', \ gcc48 --version | grep gcc, \ - gcc47 --version | grep gcc, \ - gcc46 --version | grep gcc, \ + gcc49 --version | grep gcc, \ + gcc5 --version | grep gcc, \ + gcc6 --version | grep gcc, \ + gcc7 --version | grep gcc, \ gcc --version | grep Apple.LLVM )) $(eval $(call TestHostCommand,working-gcc, \ - Please reinstall the GNU C Compiler - it appears to be broken, \ + \nPlease reinstall the GNU C Compiler (4.8 or later) - \ + it appears to be broken, \ echo 'int main(int argc, char **argv) { return 0; }' | \ gcc -x c -o $(TMP_DIR)/a.out -)) $(eval $(call SetupHostCommand,g++, \ - Please install the GNU C++ Compiler (g++), \ - $(CXX) --version | grep g++, \ - g++ --version | grep g++, \ - g++49 --version | grep g++, \ + Please install the GNU C++ Compiler (g++) 4.8 or later \ + $(CXX) -dumpversion | grep -E '(4\.[8-9]|5\.?[0-9]?|6\.?[0-9]?|7\.?[0-9]?)', \ + g++ -dumpversion | grep -E '(4\.[8-9]|5\.?[0-9]?|6\.?[0-9]?|7\.?[0-9]?)', \ g++48 --version | grep g++, \ - g++47 --version | grep g++, \ - g++46 --version | grep g++, \ + g++49 --version | grep g++, \ + g++5 --version | grep g++, \ + g++6 --version | grep g++, \ + g++7 --version | grep g++, \ g++ --version | grep Apple.LLVM )) $(eval $(call TestHostCommand,working-g++, \ - Please reinstall the GNU C++ Compiler - it appears to be broken, \ + \nPlease reinstall the GNU C++ Compiler (4.8 or later) - \ + it appears to be broken, \ echo 'int main(int argc, char **argv) { return 0; }' | \ g++ -x c++ -o $(TMP_DIR)/a.out - -lstdc++ && \ $(TMP_DIR)/a.out)) diff --git a/include/site/darwin b/include/site/darwin new file mode 100644 index 00000000000000..ec38f67be63d08 --- /dev/null +++ b/include/site/darwin @@ -0,0 +1,2 @@ +ac_cv_func_futimens=no +ac_cv_func_utimensat=no diff --git a/include/site/powerpc64 b/include/site/powerpc64 new file mode 100644 index 00000000000000..6a66346b42a8de --- /dev/null +++ b/include/site/powerpc64 @@ -0,0 +1,26 @@ +#!/bin/sh +. $TOPDIR/include/site/linux +ac_cv_c_littleendian=${ac_cv_c_littleendian=no} +ac_cv_c_bigendian=${ac_cv_c_bigendian=yes} + +ac_cv_sizeof_char=1 +ac_cv_sizeof_char_p=8 +ac_cv_sizeof_double=8 +ac_cv_sizeof_float=4 +ac_cv_sizeof_int=4 +ac_cv_sizeof_long=8 +ac_cv_sizeof_long_double=16 +ac_cv_sizeof_long_int=8 +ac_cv_sizeof_long_long=8 +ac_cv_sizeof_long_long_int=8 +ac_cv_sizeof_short=2 +ac_cv_sizeof_short_int=2 +ac_cv_sizeof_signed_char=1 +ac_cv_sizeof_unsigned_char=1 +ac_cv_sizeof_unsigned_int=4 +ac_cv_sizeof_unsigned_long=8 +ac_cv_sizeof_unsigned_long_int=8 +ac_cv_sizeof_unsigned_long_long_int=8 +ac_cv_sizeof_unsigned_short=2 +ac_cv_sizeof_unsigned_short_int=2 +ac_cv_sizeof_void_p=8 diff --git a/include/target.mk b/include/target.mk index b1e97b4386ee5e..73a211c9f167f5 100644 --- a/include/target.mk +++ b/include/target.mk @@ -21,7 +21,7 @@ luci-app-pptp-server luci-app-ipsec-vpnd luci-app-vlmcsd luci-app-wifischedule l # For nas targets DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm # For router targets -DEFAULT_PACKAGES.router:=dnsmasq-full iptables ip6tables ppp ppp-mod-pppoe firewall +DEFAULT_PACKAGES.router:=dnsmasq-full iptables ip6tables ppp ppp-mod-pppoe firewall odhcpd-ipv6only odhcp6c DEFAULT_PACKAGES.bootloader:= ifneq ($(DUMP),) @@ -190,7 +190,7 @@ ifeq ($(DUMP),1) CPU_CFLAGS_cortex-a7 = -mcpu=cortex-a7 CPU_CFLAGS_cortex-a8 = -mcpu=cortex-a8 CPU_CFLAGS_cortex-a9 = -mcpu=cortex-a9 - CPU_CFLAGS_cortex-a15 = -mcpu=cortex-a15 -mtune=cortex-a15 + CPU_CFLAGS_cortex-a15 = -mcpu=cortex-a15 CPU_CFLAGS_cortex-a53 = -mcpu=cortex-a53 CPU_CFLAGS_fa526 = -mcpu=fa526 CPU_CFLAGS_mpcore = -mcpu=mpcore @@ -209,6 +209,10 @@ ifeq ($(DUMP),1) CPU_CFLAGS_440:=-mcpu=440 CPU_CFLAGS_464fp:=-mcpu=464fp endif + ifeq ($(ARCH),powerpc64) + CPU_TYPE ?= powerpc64 + CPU_CFLAGS_powerpc64:=-mcpu=powerpc64 + endif ifeq ($(ARCH),sparc) CPU_TYPE = sparc CPU_CFLAGS_ultrasparc = -mcpu=ultrasparc diff --git a/include/toplevel.mk b/include/toplevel.mk index 658eb4ce475e73..3f5a7500308516 100644 --- a/include/toplevel.mk +++ b/include/toplevel.mk @@ -104,6 +104,9 @@ scripts/config/mconf: $(eval $(call rdep,scripts/config,scripts/config/mconf)) +scripts/config/qconf: + @$(_SINGLE)$(SUBMAKE) -s -C scripts/config qconf CC="$(HOSTCC_WRAPPER)" + scripts/config/conf: @$(_SINGLE)$(SUBMAKE) -s -C scripts/config conf CC="$(HOSTCC_WRAPPER)" @@ -136,6 +139,12 @@ menuconfig: scripts/config/mconf prepare-tmpinfo FORCE [ -L .config ] && export KCONFIG_OVERWRITECONFIG=1; \ $< Config.in +xconfig: scripts/config/qconf prepare-tmpinfo FORCE + if [ \! -e .config -a -e $(HOME)/.openwrt/defconfig ]; then \ + cp $(HOME)/.openwrt/defconfig .config; \ + fi + $< Config.in + prepare_kernel_conf: .config FORCE ifeq ($(wildcard staging_dir/host/bin/quilt),) diff --git a/include/version.mk b/include/version.mk index 880721afee7f96..a869ed6f5490df 100644 --- a/include/version.mk +++ b/include/version.mk @@ -101,4 +101,4 @@ VERSION_SED:=$(SED) 's,%U,$(VERSION_REPO),g' \ -e 's,%P,$(VERSION_PRODUCT),g' \ -e 's,%h,$(VERSION_HWREV),g' -VERSION_SED_SCRIPT:=$(subst '\'','\'\\\\\'\'',$(VERSION_SED)) \ No newline at end of file +VERSION_SED_SCRIPT:=$(subst '\'','\'\\\\\'\'',$(VERSION_SED)) diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 99690300b41e23..a7cc4ca48bc764 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -9,9 +9,10 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/version.mk +include $(INCLUDE_DIR)/feeds.mk PKG_NAME:=base-files -PKG_RELEASE:=174 +PKG_RELEASE:=181 PKG_FLAGS:=nonshared PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ @@ -21,7 +22,12 @@ PKG_LICENSE:=GPL-2.0 # Extend depends from version.mk PKG_CONFIG_DEPENDS += \ CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE \ - CONFIG_NAND_SUPPORT + CONFIG_NAND_SUPPORT \ + CONFIG_CLEAN_IPKG \ + CONFIG_PER_FEED_REPO \ + CONFIG_PER_FEED_REPO_ADD_DISABLED \ + CONFIG_PER_FEED_REPO_ADD_COMMENTED \ + $(foreach feed,$(FEEDS_INSTALLED),CONFIG_FEED_$(feed)) include $(INCLUDE_DIR)/package.mk @@ -148,6 +154,7 @@ define Package/base-files/install mkdir -p $(1)/CONTROL mkdir -p $(1)/dev + mkdir -p $(1)/etc/config mkdir -p $(1)/etc/crontabs mkdir -p $(1)/etc/rc.d mkdir -p $(1)/overlay @@ -183,6 +190,11 @@ define Package/base-files/install $(if $(CONFIG_INCLUDE_CONFIG), \ echo -e "# Build configuration for board $(BOARD)/$(SUBTARGET)/$(PROFILE)\n" >$(1)/etc/build.config; \ cat $(BIN_DIR)/config.seed >>$(1)/etc/build.config) + + $(if $(CONFIG_CLEAN_IPKG),, \ + mkdir -p $(1)/etc/opkg; \ + $(call FeedSourcesAppend,$(1)/etc/opkg/distfeeds.conf); \ + $(VERSION_SED) $(1)/etc/opkg/distfeeds.conf) endef ifneq ($(DUMP),1) diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate index e181c96495963c..bbed567defcf20 100755 --- a/package/base-files/files/bin/config_generate +++ b/package/base-files/files/bin/config_generate @@ -119,17 +119,14 @@ generate_network() { ;; pppoe) - # fixup IPv6 slave interface - ifname="pppoe-$1" - uci -q batch <<-EOF set network.$1.proto='pppoe' set network.$1.username='username' set network.$1.password='password' - set network.$1.ipv6='auto' + set network.$1.ipv6='1' delete network.${1}6 set network.${1}6='interface' - set network.${1}6.ifname='$ifname' + set network.${1}6.ifname='@${1}' set network.${1}6.proto='dhcpv6' EOF ;; diff --git a/package/base-files/files/etc/config/fstab b/package/base-files/files/etc/config/fstab deleted file mode 100644 index fcc6c7bc190183..00000000000000 --- a/package/base-files/files/etc/config/fstab +++ /dev/null @@ -1,13 +0,0 @@ - -config global - option from_fstab '1' - option anon_swap '1' - option anon_mount '1' - option auto_swap '1' - option auto_mount '1' - option delay_root '5' - option check_fs '0' - - - - diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led index 7c2a185013d2aa..c790e3e181f5c9 100755 --- a/package/base-files/files/etc/init.d/led +++ b/package/base-files/files/etc/init.d/led @@ -72,6 +72,7 @@ load_led() { [ -n "$dev" ] && { echo $dev > /sys/class/leds/${sysfs}/device_name echo $mode > /sys/class/leds/${sysfs}/mode + echo $interval > /sys/class/leds/${sysfs}/interval } ;; diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile index 3eda09b456ba26..e9936fb36a9a93 100644 --- a/package/base-files/files/etc/profile +++ b/package/base-files/files/etc/profile @@ -1,6 +1,9 @@ #!/bin/sh +[ -e /tmp/.failsafe ] && export FAILSAFE=1 + [ -f /etc/banner ] && cat /etc/banner -[ -e /tmp/.failsafe ] && cat /etc/banner.failsafe +[ -n "$FAILSAFE" ] && cat /etc/banner.failsafe + fgrep -sq '/ overlay ro,' /proc/mounts && { echo 'Your JFFS2-partition seems full and overlayfs is mounted read-only.' echo 'Please try to remove files from /overlay/upper/... and reboot!' diff --git a/package/base-files/files/etc/rc.common b/package/base-files/files/etc/rc.common index e80af891e684fd..3e237170b4cb08 100755 --- a/package/base-files/files/etc/rc.common +++ b/package/base-files/files/etc/rc.common @@ -41,14 +41,15 @@ disable() { } enable() { + err=1 name="$(basename "${initscript}")" - disable - [ -n "$START" -o -n "$STOP" ] || { - echo "/etc/init.d/$name does not have a START or STOP value" - return 1 - } - [ "$START" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" - [ "$STOP" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${STOP}${name##K[0-9][0-9]}" + [ "$START" ] && \ + ln -sf "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" && \ + err=0 + [ "$STOP" ] && \ + ln -sf "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${STOP}${name##K[0-9][0-9]}" && \ + err=0 + return $err } enabled() { @@ -88,6 +89,10 @@ service_triggers() { return 0 } +service_data() { + return 0 +} + service_running() { return 0 } @@ -122,12 +127,14 @@ ${INIT_TRACE:+set -x} } stop() { + procd_lock stop_service "$@" procd_kill "$(basename ${basescript:-$initscript})" "$1" } reload() { if eval "type reload_service" 2>/dev/null >/dev/null; then + procd_lock reload_service "$@" else start diff --git a/package/base-files/files/etc/sysctl.conf b/package/base-files/files/etc/sysctl.conf index 91a3ac9a02d434..ddc7a9bf69f060 100644 --- a/package/base-files/files/etc/sysctl.conf +++ b/package/base-files/files/etc/sysctl.conf @@ -1,5 +1,6 @@ kernel.panic=3 kernel.core_pattern=/tmp/%e.%t.%p.%s.core +fs.suid_dumpable=2 net.ipv4.conf.default.arp_ignore=1 net.ipv4.conf.all.arp_ignore=1 diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index 81ef84b8ef8fc4..dfadfdb2d9c243 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -202,7 +202,7 @@ add_group_and_user() { if [ -n "$gname" ] && [ -n "$gid" ]; then group_exists "$gname" || group_add "$gname" "$gid" elif [ -n "$gname" ]; then - group_add_next "$gname"; gid=$? + gid="$(group_add_next "$gname")" fi if [ -n "$uname" ]; then @@ -235,12 +235,16 @@ default_postinst() { rm -fR $root/rootfs-overlay/ fi + if [ -z "$root" ] && grep -q -s "^/etc/modules.d/" "/usr/lib/opkg/info/${pkgname}.list"; then + kmodloader + 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 for i in $(sed -ne 's!^/etc/uci-defaults/!!p' "/usr/lib/opkg/info/${pkgname}.list"); do ( cd /etc/uci-defaults - [ -f "$i" ] && . "$i" && rm -f "$i" + [ -f "$i" ] && . ./"$i" && rm -f "$i" ) done uci commit fi @@ -292,9 +296,7 @@ group_add() { [ -f "${IPKG_INSTROOT}/etc/group" ] || return 1 [ -n "$IPKG_INSTROOT" ] || lock /var/lock/group echo "${name}:x:${gid}:" >> ${IPKG_INSTROOT}/etc/group - rc=$? [ -n "$IPKG_INSTROOT" ] || lock -u /var/lock/group - return $rc } group_exists() { @@ -304,14 +306,17 @@ group_exists() { group_add_next() { local gid gids gid=$(grep -s "^${1}:" ${IPKG_INSTROOT}/etc/group | cut -d: -f3) - [ -n "$gid" ] && return $gid + if [ -n "$gid" ]; then + echo $gid + return + fi gids=$(cat ${IPKG_INSTROOT}/etc/group | cut -d: -f3) gid=65536 while [ -n "$(echo "$gids" | grep "^$gid$")" ] ; do gid=$((gid + 1)) done group_add $1 $gid - return $gid + echo $gid } group_add_user() { @@ -344,9 +349,7 @@ user_add() { [ -n "$IPKG_INSTROOT" ] || lock /var/lock/passwd echo "${name}:x:${uid}:${gid}:${desc}:${home}:${shell}" >> ${IPKG_INSTROOT}/etc/passwd echo "${name}:x:0:0:99999:7:::" >> ${IPKG_INSTROOT}/etc/shadow - rc=$? [ -n "$IPKG_INSTROOT" ] || lock -u /var/lock/passwd - return $rc } user_exists() { diff --git a/package/base-files/files/lib/functions/leds.sh b/package/base-files/files/lib/functions/leds.sh index 857e7e53927b04..83e775fada9ed3 100644 --- a/package/base-files/files/lib/functions/leds.sh +++ b/package/base-files/files/lib/functions/leds.sh @@ -1,6 +1,18 @@ #!/bin/sh # Copyright (C) 2013 OpenWrt.org +get_dt_led() { + local label + local ledpath + local basepath="/proc/device-tree" + local nodepath="$basepath/aliases/led-$1" + + [ -f "$nodepath" ] && ledpath=$(cat "$nodepath") + [ -n "$ledpath" ] && label=$(cat "$basepath$ledpath/label") + + echo "$label" +} + led_set_attr() { [ -f "/sys/class/leds/$1/$2" ] && echo "$3" > "/sys/class/leds/$1/$2" } diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index e1f6ded68959b8..71cffc8587cb94 100644 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -117,24 +117,6 @@ export_bootdevice() { 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]-[A-F0-9][A-F0-9][A-F0-9][A-F0-9]-[A-F0-9][A-F0-9][A-F0-9][A-F0-9]-[A-F0-9][A-F0-9][A-F0-9][A-F0-9]-[A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9]0002) - uuid="${disk#PARTUUID=}" - uuid="${uuid%0002}0002" - for disk in $(find /dev -type b); do - set -- $(dd if=$disk bs=1 skip=$((2*512+256+128+16)) count=16 2>/dev/null | hexdump -v -e '4/1 "%02x"' | awk '{ \ - for(i=1;i<9;i=i+2) first=substr($0,i,1) substr($0,i+1,1) first; \ - for(i=9;i<13;i=i+2) second=substr($0,i,1) substr($0,i+1,1) second; \ - for(i=13;i<16;i=i+2) third=substr($0,i,1) substr($0,i+1,1) third; \ - fourth = substr($0,17,4); \ - five = substr($0,21,12); \ - } END { print toupper(first"-"second"-"third"-"fourth"-"five) }') - if [ "$1" = "$uuid" ]; then - uevent="/sys/class/block/${disk##*/}/uevent" - export SAVE_PARTITIONS=0 - break - fi - done -;; 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}" @@ -178,6 +160,14 @@ export_partdevice() { return 1 } +hex_le32_to_cpu() { + [ "$(echo 01 | hexdump -v -n 2 -e '/2 "%x"')" == "3031" ] && { + echo "${1:0:2}${1:8:2}${1:6:2}${1:4:2}${1:2:2}" + return + } + echo "$@" +} + get_partitions() { # local disk="$1" local filename="$2" @@ -185,8 +175,8 @@ get_partitions() { # 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 + local magic=$(dd if="$disk" bs=2 count=1 skip=255 2>/dev/null) + if [ "$magic" != $'\x55\xAA' ]; then v "Invalid partition table on $disk" exit fi @@ -197,9 +187,9 @@ get_partitions() { # 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))" + local type="$(( $(hex_le32_to_cpu $1) % 256))" + local lba="$(( $(hex_le32_to_cpu $2) ))" + local num="$(( $(hex_le32_to_cpu $3) ))" [ $type -gt 0 ] || continue diff --git a/package/base-files/files/lib/upgrade/nand.sh b/package/base-files/files/lib/upgrade/nand.sh index 563db4c320ef24..42f488c118fab5 100644 --- a/package/base-files/files/lib/upgrade/nand.sh +++ b/package/base-files/files/lib/upgrade/nand.sh @@ -239,30 +239,23 @@ nand_upgrade_ubifs() { nand_do_upgrade_success } -nand_board_name() { - if type 'platform_nand_board_name' >/dev/null 2>/dev/null; then - platform_nand_board_name - return - fi - - cat /tmp/sysinfo/board_name -} - nand_upgrade_tar() { local tar_file="$1" - local board_name="$(nand_board_name)" local kernel_mtd="$(find_mtd_index $CI_KERNPART)" - local kernel_length=`(tar xf $tar_file sysupgrade-$board_name/kernel -O | wc -c) 2> /dev/null` - local rootfs_length=`(tar xf $tar_file sysupgrade-$board_name/root -O | wc -c) 2> /dev/null` + local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$') + board_dir=${board_dir%/} + + local kernel_length=`(tar xf $tar_file ${board_dir}/kernel -O | wc -c) 2> /dev/null` + local rootfs_length=`(tar xf $tar_file ${board_dir}/root -O | wc -c) 2> /dev/null` - local rootfs_type="$(identify_tar "$tar_file" sysupgrade-$board_name/root)" + local rootfs_type="$(identify_tar "$tar_file" ${board_dir}/root)" local has_kernel=1 local has_env=0 [ "$kernel_length" != 0 -a -n "$kernel_mtd" ] && { - tar xf $tar_file sysupgrade-$board_name/kernel -O | mtd write - $CI_KERNPART + tar xf $tar_file ${board_dir}/kernel -O | mtd write - $CI_KERNPART } [ "$kernel_length" = 0 -o ! -z "$kernel_mtd" ] && has_kernel=0 @@ -271,12 +264,12 @@ nand_upgrade_tar() { local ubidev="$( nand_find_ubi "$CI_UBIPART" )" [ "$has_kernel" = "1" ] && { local kern_ubivol="$(nand_find_volume $ubidev $CI_KERNPART)" - tar xf $tar_file sysupgrade-$board_name/kernel -O | \ + tar xf $tar_file ${board_dir}/kernel -O | \ ubiupdatevol /dev/$kern_ubivol -s $kernel_length - } local root_ubivol="$(nand_find_volume $ubidev rootfs)" - tar xf $tar_file sysupgrade-$board_name/root -O | \ + tar xf $tar_file ${board_dir}/root -O | \ ubiupdatevol /dev/$root_ubivol -s $rootfs_length - nand_do_upgrade_success diff --git a/package/base-files/files/lib/upgrade/stage2 b/package/base-files/files/lib/upgrade/stage2 index d7f92a4f3506d0..3985d8fd7eca9d 100755 --- a/package/base-files/files/lib/upgrade/stage2 +++ b/package/base-files/files/lib/upgrade/stage2 @@ -84,6 +84,7 @@ kill_remaining() { # [ [ ] ] local loop="${2:-0}" local run=true local stat + local proc_ppid=$(cut -d' ' -f4 /proc/$$/stat) echo -n "Sending $sig to remaining processes ... " @@ -96,8 +97,8 @@ kill_remaining() { # [ [ ] ] read pid name state ppid rest < $stat name="${name#(}"; name="${name%)}" - # Skip PID1, ourself and our children - [ $pid -ne 1 -a $pid -ne $$ -a $ppid -ne $$ ] || continue + # Skip PID1, our parent, ourself and our children + [ $pid -ne 1 -a $pid -ne $proc_ppid -a $pid -ne $$ -a $ppid -ne $$ ] || continue local cmdline read cmdline < /proc/$pid/cmdline diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade index 359f21f51c3d54..3fd612c37572aa 100755 --- a/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade @@ -108,14 +108,8 @@ add_uci_conffiles() { add_overlayfiles() { local file="$1" - if [ -d /overlay/upper ]; then - local overlaydir="/overlay/upper" - else - local overlaydir="/overlay" - fi - find $overlaydir/etc/ -type f -o -type l | sed \ + find /overlay/upper/etc/ -type f -o -type l | sed \ -e 's,^/overlay\/upper/,/,' \ - -e 's,^/overlay/,/,' \ -e '\,/META_[a-zA-Z0-9]*$,d' \ -e '\,/functions.sh$,d' \ -e '\,/[^/]*-opkg$,d' \ @@ -126,9 +120,16 @@ add_overlayfiles() { # hooks sysupgrade_image_check="fwtool_check_image platform_check_image" sysupgrade_pre_upgrade="fwtool_pre_upgrade" -[ $SAVE_OVERLAY = 0 -o ! -d /overlay/etc ] && \ - sysupgrade_init_conffiles="add_uci_conffiles" || \ + +if [ $SAVE_OVERLAY = 1 ]; then + [ ! -d /overlay/upper/etc ] && { + echo "Cannot find '/overlay/upper/etc', required for '-c'" + exit 1 + } sysupgrade_init_conffiles="add_overlayfiles" +else + sysupgrade_init_conffiles="add_uci_conffiles" +fi include /lib/upgrade @@ -152,7 +153,7 @@ do_save_conffiles() { } if [ $CONF_BACKUP_LIST -eq 1 ]; then - add_uci_conffiles "$CONFFILES" + run_hooks "$CONFFILES" $sysupgrade_init_conffiles cat "$CONFFILES" rm -f "$CONFFILES" exit 0 diff --git a/package/base-files/files/usr/lib/os-release b/package/base-files/files/usr/lib/os-release index 21abf969e100c1..82ade5940639bb 100644 --- a/package/base-files/files/usr/lib/os-release +++ b/package/base-files/files/usr/lib/os-release @@ -1,8 +1,8 @@ NAME="%D" -VERSION="%V, %N" +VERSION="%V" ID="%d" ID_LIKE="lede openwrt" -PRETTY_NAME="%D %N %V" +PRETTY_NAME="%D %V" VERSION_ID="%v" HOME_URL="%m" BUG_URL="%b" @@ -15,4 +15,4 @@ LEDE_DEVICE_MANUFACTURER="%M" LEDE_DEVICE_MANUFACTURER_URL="%m" LEDE_DEVICE_PRODUCT="%P" LEDE_DEVICE_REVISION="%h" -LEDE_RELEASE="%D %N %V %C" +LEDE_RELEASE="%D %V %C" diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in index 45ca1306f7d7f9..dbbd60b1527cdb 100644 --- a/package/base-files/image-config.in +++ b/package/base-files/image-config.in @@ -163,13 +163,6 @@ if VERSIONOPT This is the name of the release distribution. If unspecified, it defaults to OpenWrt. - config VERSION_NICK - string - prompt "Release version nickname" - help - This is the release codename embedded in the image. - If unspecified, it defaults to the name of source branch. - config VERSION_NUMBER string prompt "Release version number" diff --git a/package/boot/arm-trusted-firmware-sunxi/Makefile b/package/boot/arm-trusted-firmware-sunxi/Makefile new file mode 100644 index 00000000000000..88d4f6efaaa536 --- /dev/null +++ b/package/boot/arm-trusted-firmware-sunxi/Makefile @@ -0,0 +1,52 @@ +# +# Copyright (C) 2017 Hauke Mehrtens +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=arm-trusted-firmware-sunxi +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL=https://github.com/apritzel/arm-trusted-firmware +PKG_SOURCE_DATE:=2016-07-12 +PKG_SOURCE_VERSION:=87e8aedd80e6448a55b2328768d956fcb5f5d410 +PKG_MIRROR_HASH:=4e71a7d4bc0613533854c646b0fa574b18503c0ab28621aac67c70b9827562d8 + +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=license.md + +PKG_MAINTAINER:=Hauke Mehrtens + +include $(INCLUDE_DIR)/package.mk + + +define Package/arm-trusted-firmware-sunxi + SECTION:=boot + CATEGORY:=Boot Loaders + TITLE:=ARM Trusted Firmware for Allwinner + DEPENDS:=@TARGET_sunxi_cortexa53 +endef + +export GCC_HONOUR_COPTS=s + +MAKE_VARS = \ + CROSS_COMPILE="$(TARGET_CROSS)" + +MAKE_FLAGS += \ + PLAT=sun50iw1p1 \ + DEBUG=1 \ + bl31 + +define Build/InstallDev + $(INSTALL_DIR) $(STAGING_DIR_IMAGE) + $(CP) $(PKG_BUILD_DIR)/build/sun50iw1p1/debug/bl31.bin $(STAGING_DIR_IMAGE)/bl31.bin +endef + +define Package/arm-trusted-firmware-sunxi/install +endef + +$(eval $(call BuildPackage,arm-trusted-firmware-sunxi)) diff --git a/package/boot/at91bootstrap/Makefile b/package/boot/at91bootstrap/Makefile new file mode 100644 index 00000000000000..4571fedc044ac6 --- /dev/null +++ b/package/boot/at91bootstrap/Makefile @@ -0,0 +1,94 @@ +# +# Copyright (C) 2016 Microchip Technology Inc. +# +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=at91bootstrap +PKG_VERSION:=v3.8.8 +PKG_RELEASE:= + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/linux4sam/at91bootstrap.git +PKG_SOURCE_VERSION:=3d33a4e0707c61007a5278f6620453502f7500db + +PKG_BUILD_DIR = \ + $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +include at91bootstrap.mk +include $(INCLUDE_DIR)/package.mk + +define AT91Bootstrap/Default + BUILD_TARGET:=at91 + BUILD_SUBTARGET:=sama5 + AT91BOOTSTRAP_IMAGE:=at91bootstrap.bin +endef + +define at91bootstrap/sama5d2_xplaineddf_uboot + TITLE:=AT91Bootstrap for the SAMA5D2 Xplained board (SPI Flash) + BUILD_SUBTARGET:=sama5 + BUILD_DEVICES:=at91-sama5d2_xplained +endef + +define at91bootstrap/sama5d2_xplaineddf_qspi_uboot + TITLE:=AT91Bootstrap for the SAMA5D2 Xplained board (QSPI Flash) + BUILD_SUBTARGET:=sama5 + BUILD_DEVICES:=at91-sama5d2_xplained +endef + +define at91bootstrap/sama5d2_xplainedsd_uboot + TITLE:=AT91Bootstrap for the SAMA5D2 Xplained board (SDcard/EMMC) + BUILD_SUBTARGET:=sama5 + BUILD_DEVICES:=at91-sama5d2_xplained +endef + +define at91bootstrap/sama5d3_xplainednf_uboot + TITLE:=AT91Bootstrap for the SAMA5D3 Xplained board (Nand Flash) + BUILD_SUBTARGET:=sama5 + BUILD_DEVICES:=at91-sama5d3_xplained +endef + +define at91bootstrap/sama5d3_xplainedsd_uboot + TITLE:=AT91Bootstrap for the SAMA5D3 Xplained board (SDcard) + BUILD_SUBTARGET:=sama5 + BUILD_DEVICES:=at91-sama5d3_xplained +endef + +define at91bootstrap/sama5d4_xplainednf_uboot + TITLE:=AT91Bootstrap for the SAMA5D4 Xplained board (Nand Flash) + BUILD_SUBTARGET:=sama5 + BUILD_DEVICES:=at91-sama5d4_xplained +endef + +define at91bootstrap/sama5d4_xplaineddf_uboot_secure + TITLE:=AT91Bootstrap for the SAMA5D4 Xplained board (SPI Flash) + BUILD_SUBTARGET:=sama5 + BUILD_DEVICES:=at91-sama5d4_xplained +endef + +define at91bootstrap/sama5d4_xplainedsd_uboot_secure + TITLE:=AT91Bootstrap for the SAMA5D4 Xplained board (SDcard) + BUILD_SUBTARGET:=sama5 + BUILD_DEVICES:=at91-sama5d4_xplained +endef + +AT91BOOTSTRAP_TARGETS := \ + sama5d2_xplaineddf_uboot \ + sama5d2_xplaineddf_qspi_uboot \ + sama5d2_xplainedsd_uboot \ + sama5d3_xplainednf_uboot \ + sama5d3_xplainedsd_uboot \ + sama5d4_xplainednf_uboot_secure \ + sama5d4_xplaineddf_uboot_secure \ + sama5d4_xplainedsd_uboot_secure + +define Build/Compile + +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + CROSS_COMPILE=$(TARGET_CROSS) +endef + +$(eval $(call BuildPackage/AT91Bootstrap)) diff --git a/package/boot/at91bootstrap/at91bootstrap.mk b/package/boot/at91bootstrap/at91bootstrap.mk new file mode 100644 index 00000000000000..dda5fa4e9ce4a1 --- /dev/null +++ b/package/boot/at91bootstrap/at91bootstrap.mk @@ -0,0 +1,88 @@ + +PKG_TARGETS := bin +PKG_FLAGS:=nonshared + +export GCC_HONOUR_COPTS=s + +define Package/at91bootstrap/install/default + $(CP) $(PKG_BUILD_DIR)/binaries/*uboot* $(1)/ +endef + +Package/at91bootstrap/install = $(Package/at91bootstrap/install/default) + +define AT91Bootstrap/Init + BUILD_TARGET:= + BUILD_SUBTARGET:= + BUILD_DEVICES:= + NAME:= + DEPENDS:= + HIDDEN:= + DEFAULT:= + VARIANT:=$(1) + AT91BOOTSTRAP_CONFIG:=$(1) +endef + +TARGET_DEP = TARGET_$(BUILD_TARGET)$(if $(BUILD_SUBTARGET),_$(BUILD_SUBTARGET)) + +AT91BOOTSTRAP_MAKE_FLAGS = \ + HOSTCC="$(HOSTCC)" \ + HOSTCFLAGS='$(HOST_CFLAGS) $$$$(HOSTCPPFLAGS)' \ + HOSTLDFLAGS="" + +define Build/AT91Bootstrap/Target + $(eval $(call AT91Bootstrap/Init,$(1))) + $(eval $(call AT91Bootstrap/Default,$(1))) + $(eval $(call AT91Bootstrap/$(1),$(1))) + + define Package/at91bootstrap-$(1) + SECTION:=boot + CATEGORY:=Boot Loaders + TITLE:= .$(NAME) + VARIANT:=$(VARIANT) + DEPENDS:=@!IN_SDK $(DEPENDS) + HIDDEN:=$(HIDDEN) + ifneq ($(BUILD_TARGET),) + DEPENDS += @$(TARGET_DEP) + ifneq ($(BUILD_DEVICES),) + DEFAULT := y if ($(TARGET_DEP)_Default \ + $(patsubst %,|| $(TARGET_DEP)_DEVICE_%,$(BUILD_DEVICES)) \ + $(patsubst %,|| $(patsubst TARGET_%,TARGET_DEVICE_%, \ + $(TARGET_DEP))_DEVICE_%,$(BUILD_DEVICES))) + endif + endif + $(if $(DEFAULT),DEFAULT:=$(DEFAULT)) + URL:=https://www.at91.com/linux4sam/bin/view/Linux4SAM/AT91Bootstrap + endef + + define Package/at91bootstrap-$(1)/install + $$(Package/at91bootstrap/install) + endef +endef + +define Build/Configure/AT91Bootstrap + +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + $(AT91BOOTSTRAP_CONFIG)_defconfig +endef + + +define Build/Compile/AT91Bootstrap + +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ + CROSS_COMPILE=$(TARGET_CROSS) \ + $(AT91BOOTSTRAP_MAKE_FLAGS) +endef + +define BuildPackage/AT91Bootstrap/Defaults + Build/Configure/Default = $$$$(Build/Configure/AT91Bootstrap) + Build/Compile/Default = $$$$(Build/Compile/AT91Bootstrap) +endef + +define BuildPackage/AT91Bootstrap + $(eval $(call BuildPackage/AT91Bootstrap/Defaults)) + $(foreach type,$(if $(DUMP),$(AT91BOOTSTRAP_TARGETS),$(BUILD_VARIANT)), \ + $(eval $(call Build/AT91Bootstrap/Target,$(type))) + ) + $(eval $(call Build/DefaultTargets)) + $(foreach type,$(if $(DUMP),$(AT91BOOTSTRAP_TARGETS),$(BUILD_VARIANT)), \ + $(call BuildPackage,at91bootstrap-$(type)) + ) +endef diff --git a/package/boot/grub2/common.mk b/package/boot/grub2/Makefile similarity index 57% rename from package/boot/grub2/common.mk rename to package/boot/grub2/Makefile index 0f528f0b60cf42..8cfc0dcff981df 100644 --- a/package/boot/grub2/common.mk +++ b/package/boot/grub2/Makefile @@ -1,24 +1,34 @@ +# +# Copyright (C) 2006-2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=grub +PKG_CPE_ID:=cpe:/a:gnu:grub2 PKG_VERSION:=2.02 PKG_RELEASE:=1 -PKG_SOURCE:=grub-$(PKG_VERSION).tar.xz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/grub PKG_HASH:=810b3798d316394f94096ec2797909dbf23c858e48f7b3830826b8daa06b7b0f PKG_FIXUP:=autoreconf HOST_BUILD_PARALLEL:=1 +PKG_BUILD_DEPENDS:=grub2/host PKG_SSP:=0 PKG_FLAGS:=nonshared -PATCH_DIR := ../patches -HOST_PATCH_DIR := ../patches - include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk -define Package/grub2/Default +define Package/grub2 CATEGORY:=Boot Loaders SECTION:=boot TITLE:=GRand Unified Bootloader @@ -26,6 +36,19 @@ define Package/grub2/Default DEPENDS:=@TARGET_x86||TARGET_x86_64 endef +define Package/grub2-editenv + CATEGORY:=Utilities + SECTION:=utils + SUBMENU:=Boot Loaders + TITLE:=Grub2 Environment editor + URL:=http://www.gnu.org/software/grub/ + DEPENDS:=@TARGET_x86||TARGET_x86_64 +endef + +define Package/grub2-editenv/description + Edit grub2 environment files. +endef + HOST_BUILD_PREFIX := $(STAGING_DIR_HOST) CONFIGURE_VARS += \ @@ -59,3 +82,11 @@ define Host/Configure $(Host/Configure/Default) endef +define Package/grub2-editenv/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/ +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,grub2)) +$(eval $(call BuildPackage,grub2-editenv)) diff --git a/package/boot/grub2/grub2-efi/Makefile b/package/boot/grub2/grub2-efi/Makefile deleted file mode 100644 index 37e0b353e7c542..00000000000000 --- a/package/boot/grub2/grub2-efi/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=grub-efi - -include ../common.mk - -TAR_OPTIONS:= --transform 's/grub-${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}/' $(TAR_OPTIONS) - -PKG_BUILD_DEPENDS:=grub2-efi/host - -CONFIGURE_ARGS += --with-platform=efi -HOST_CONFIGURE_ARGS += --with-platform=efi --program-suffix=-efi - -define Package/grub2-efi -$(call Package/grub2/Default) -HIDDEN:=1 -TITLE += (with EFI support) -endef - -$(eval $(call HostBuild)) -$(eval $(call BuildPackage,grub2-efi)) diff --git a/package/boot/grub2/grub2/Makefile b/package/boot/grub2/grub2/Makefile deleted file mode 100644 index c00797662b7cb9..00000000000000 --- a/package/boot/grub2/grub2/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=grub - -include ../common.mk - -PKG_BUILD_DEPENDS:=grub2/host - -define Package/grub2 -$(call Package/grub2/Default) -endef - -define Package/grub2-editenv - CATEGORY:=Utilities - SECTION:=utils - TITLE:=Grub2 Environment editor - URL:=http://www.gnu.org/software/grub/ - DEPENDS:=@TARGET_x86||TARGET_x86_64 -endef - -define Package/grub2-editenv/description - Edit grub2 environment files. -endef - -define Package/grub2-editenv/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/ -endef - -$(eval $(call HostBuild)) -$(eval $(call BuildPackage,grub2)) -$(eval $(call BuildPackage,grub2-editenv)) diff --git a/package/boot/kobs-ng/patches/001-compile.patch b/package/boot/kobs-ng/patches/001-compile.patch index 67da93a324ba2a..8648dc8b940f50 100644 --- a/package/boot/kobs-ng/patches/001-compile.patch +++ b/package/boot/kobs-ng/patches/001-compile.patch @@ -10,13 +10,14 @@ #include --- a/src/mtd.h +++ b/src/mtd.h -@@ -25,8 +25,10 @@ +@@ -25,8 +25,11 @@ #ifndef MTD_H #define MTD_H +#define _GNU_SOURCE #include #include ++#include +#include #include "BootControlBlocks.h" diff --git a/package/boot/rbcfg/Makefile b/package/boot/rbcfg/Makefile index 412f7ab11a59bf..9d9b97524a195c 100644 --- a/package/boot/rbcfg/Makefile +++ b/package/boot/rbcfg/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rbcfg -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) diff --git a/package/boot/rbcfg/src/main.c b/package/boot/rbcfg/src/main.c index 9aedcc55a87d0b..2acbfbd8cba3d7 100644 --- a/package/boot/rbcfg/src/main.c +++ b/package/boot/rbcfg/src/main.c @@ -2,6 +2,7 @@ * RouterBOOT configuration utility * * Copyright (C) 2010 Gabor Juhos + * Copyright (C) 2017 Thibaut VARENE * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published @@ -29,6 +30,7 @@ #define RB_ERR_INVALID 2 #define RB_ERR_NOMEM 3 #define RB_ERR_IO 4 +#define RB_ERR_NOTWANTED 5 #define ARRAY_SIZE(_a) (sizeof((_a)) / sizeof((_a)[0])) @@ -67,6 +69,11 @@ struct rbcfg_command { int (*exec)(int argc, const char *argv[]); }; +struct rbcfg_soc { + const char *needle; + const int type; +}; + static void usage(void); /* Globals */ @@ -135,12 +142,32 @@ static const struct rbcfg_value rbcfg_cpu_mode[] = { RB_CPU_MODE_REGULAR), }; +static const struct rbcfg_value rbcfg_cpu_freq_dummy[] = { +}; + +static const struct rbcfg_value rbcfg_cpu_freq_qca953x[] = { + CFG_U32("-2", "-100MHz", RB_CPU_FREQ_L2), + CFG_U32("-1", "- 50MHz", RB_CPU_FREQ_L1), + CFG_U32("0", "Factory", RB_CPU_FREQ_N0), + CFG_U32("+1", "+ 50MHz", RB_CPU_FREQ_H1), + CFG_U32("+2", "+100MHz", RB_CPU_FREQ_H2), +}; + +static const struct rbcfg_value rbcfg_cpu_freq_ar9344[] = { + CFG_U32("-2", "-100MHz", RB_CPU_FREQ_L2), + CFG_U32("-1", "- 50MHz", RB_CPU_FREQ_L1), + CFG_U32("0", "Factory", RB_CPU_FREQ_N0), + CFG_U32("+1", "+ 50MHz", RB_CPU_FREQ_H1), + CFG_U32("+2", "+100MHz", RB_CPU_FREQ_H2), + CFG_U32("+3", "+150MHz", RB_CPU_FREQ_H3), +}; + static const struct rbcfg_value rbcfg_booter[] = { CFG_U32("regular", "load regular booter", RB_BOOTER_REGULAR), CFG_U32("backup", "force backup-booter loading", RB_BOOTER_BACKUP), }; -static const struct rbcfg_env rbcfg_envs[] = { +static struct rbcfg_env rbcfg_envs[] = { { .name = "boot_delay", .id = RB_ID_BOOT_DELAY, @@ -177,6 +204,12 @@ static const struct rbcfg_env rbcfg_envs[] = { .type = RBCFG_ENV_TYPE_U32, .values = rbcfg_cpu_mode, .num_values = ARRAY_SIZE(rbcfg_cpu_mode), + }, { + .name = "cpu_freq", + .id = RB_ID_CPU_FREQ, + .type = RBCFG_ENV_TYPE_U32, + .values = rbcfg_cpu_freq_dummy, + .num_values = ARRAY_SIZE(rbcfg_cpu_freq_dummy), }, { .name = "uart_speed", .id = RB_ID_UART_SPEED, @@ -240,8 +273,10 @@ rbcfg_find_tag(struct rbcfg_ctx *ctx, uint16_t tag_id, uint16_t *tag_len, buf += 2; buflen -= 2; - if (id == RB_ID_TERMINATOR) + if (id == RB_ID_TERMINATOR) { + ret = RB_ERR_NOTWANTED; break; + } if (buflen < len) break; @@ -257,7 +292,7 @@ rbcfg_find_tag(struct rbcfg_ctx *ctx, uint16_t tag_id, uint16_t *tag_len, buflen -= len; } - if (ret) + if (RB_ERR_NOTFOUND == ret) fprintf(stderr, "no tag found with id=%u\n", tag_id); return ret; @@ -748,6 +783,96 @@ usage(void) fprintf(stderr, "\n"); } +#define RBCFG_SOC_UNKNOWN 0 +#define RBCFG_SOC_QCA953X 1 +#define RBCFG_SOC_AR9344 2 + +static const struct rbcfg_soc rbcfg_socs[] = { + { + .needle = "QCA953", + .type = RBCFG_SOC_QCA953X, + }, { + .needle = "AR9344", + .type = RBCFG_SOC_AR9344, + }, +}; + +#define CPUINFO_BUFSIZE 128 /* lines of interest are < 80 chars */ + +static int cpuinfo_find_soc(void) +{ + FILE *fp; + char temp[CPUINFO_BUFSIZE]; + char *haystack, *needle; + int i, found = 0, soc_type = RBCFG_SOC_UNKNOWN; + + fp = fopen("/proc/cpuinfo", "r"); + if (!fp) + goto end; + + /* first, extract the system type line */ + needle = "system type"; + while(fgets(temp, CPUINFO_BUFSIZE, fp)) { + if (!strncmp(temp, needle, strlen(needle))) { + found = 1; + break; + } + } + + fclose(fp); + + /* failsafe in case cpuinfo format changes */ + if (!found) + goto end; + + /* skip the field header */ + haystack = strchr(temp, ':'); + + /* then, try to identify known SoC, stop at first match */ + for (i = 0; i < ARRAY_SIZE(rbcfg_socs); i++) { + if ((strstr(haystack, rbcfg_socs[i].needle))) { + soc_type = rbcfg_socs[i].type; + break; + } + } + +end: + return soc_type; +} + +static void fixup_rbcfg_envs(void) +{ + int i, num_val, soc_type; + const struct rbcfg_value * env_value; + + /* detect SoC */ + soc_type = cpuinfo_find_soc(); + + /* update rbcfg_envs */ + switch (soc_type) { + case RBCFG_SOC_QCA953X: + env_value = rbcfg_cpu_freq_qca953x; + num_val = ARRAY_SIZE(rbcfg_cpu_freq_qca953x); + break; + case RBCFG_SOC_AR9344: + env_value = rbcfg_cpu_freq_ar9344; + num_val = ARRAY_SIZE(rbcfg_cpu_freq_ar9344); + break; + } + + for (i = 0; i < ARRAY_SIZE(rbcfg_envs); i++) { + if (RB_ID_CPU_FREQ == rbcfg_envs[i].id) { + if (RBCFG_SOC_UNKNOWN == soc_type) + rbcfg_envs[i].id = RB_ID_TERMINATOR; + else { + rbcfg_envs[i].values = env_value; + rbcfg_envs[i].num_values = num_val; + } + break; + } + } +} + int main(int argc, const char *argv[]) { const struct rbcfg_command *cmd = NULL; @@ -756,6 +881,8 @@ int main(int argc, const char *argv[]) rbcfg_name = (char *) argv[0]; + fixup_rbcfg_envs(); + if (argc < 2) { usage(); return EXIT_FAILURE; diff --git a/package/boot/rbcfg/src/rbcfg.h b/package/boot/rbcfg/src/rbcfg.h index 864bc821725a46..88acc13dc12c8d 100644 --- a/package/boot/rbcfg/src/rbcfg.h +++ b/package/boot/rbcfg/src/rbcfg.h @@ -32,6 +32,7 @@ #define RB_ID_BOOT_PROTOCOL 9 #define RB_ID_SOFT_10 10 #define RB_ID_SOFT_11 11 +#define RB_ID_CPU_FREQ 12 #define RB_ID_BOOTER 13 #define RB_UART_SPEED_115200 0 @@ -71,6 +72,13 @@ #define RB_BOOT_PROTOCOL_BOOTP 0 #define RB_BOOT_PROTOCOL_DHCP 1 +#define RB_CPU_FREQ_L2 (0 << 3) +#define RB_CPU_FREQ_L1 (1 << 3) +#define RB_CPU_FREQ_N0 (2 << 3) +#define RB_CPU_FREQ_H1 (3 << 3) +#define RB_CPU_FREQ_H2 (4 << 3) +#define RB_CPU_FREQ_H3 (5 << 3) + #define RB_BOOTER_REGULAR 0 #define RB_BOOTER_BACKUP 1 diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile index 6a806ff635f190..7c420f1262b02a 100644 --- a/package/boot/uboot-at91/Makefile +++ b/package/boot/uboot-at91/Makefile @@ -17,21 +17,73 @@ include $(INCLUDE_DIR)/package.mk define U-Boot/Default BUILD_TARGET:=at91 - BUILD_SUBTARGET:=legacy UBOOT_IMAGE:=u-boot.bin boot.bin endef define U-Boot/at91sam9m10g45ek_nandflash NAME:=AT91SAM9M10G45-EK board (NandFlash) + BUILD_SUBTARGET:=legacy + BUILD_DEVICES:=at91sam9m10g45ek endef define U-Boot/at91sam9x5ek_nandflash NAME:=AT91SAM9X5-EK board (NandFlash) + BUILD_SUBTARGET:=legacy + BUILD_DEVICES:=at91sam9g15ek at91sam9g25ek at91sam9g35ek at91sam9x25ek at91sam9x35ek +endef + +define U-Boot/sama5d3_xplained_nandflash + NAME:=SAMA5D3 Xplained board (NandFlash) + BUILD_SUBTARGET:=sama5 + BUILD_DEVICES:=at91-sama5d3_xplained +endef + +define U-Boot/sama5d3_xplained_mmc + NAME:=SAMA5D3 Xplained board (SDcard) + BUILD_SUBTARGET:=sama5 + BUILD_DEVICES:=at91-sama5d3_xplained +endef + +define U-Boot/sama5d2_xplained_spiflash + NAME:=SAMA5D2 Xplained board (SPI Flash) + BUILD_SUBTARGET:=sama5 + BUILD_DEVICES:=at91-sama5d2_xplained +endef + +define U-Boot/sama5d2_xplained_mmc + NAME:=SAMA5D2 Xplained board (SDcard/EMMC) + BUILD_SUBTARGET:=sama5 + BUILD_DEVICES:=at91-sama5d2_xplained +endef + +define U-Boot/sama5d4_xplained_spiflash + NAME:=SAMA5D4 Xplained board (SPI Flash) + BUILD_SUBTARGET:=sama5 + BUILD_DEVICES:=at91-sama5d4_xplained +endef + +define U-Boot/sama5d4_xplained_mmc + NAME:=SAMA5D4 Xplained board (SDcard) + BUILD_SUBTARGET:=sama5 + BUILD_DEVICES:=at91-sama5d4_xplained +endef + +define U-Boot/sama5d4_xplained_nandflash + NAME:=SAMA5D4 Xplained board (NandFlash) + BUILD_SUBTARGET:=sama5 + BUILD_DEVICES:=at91-sama5d4_xplained endef UBOOT_TARGETS := \ at91sam9m10g45ek_nandflash \ - at91sam9x5ek_nandflash + at91sam9x5ek_nandflash \ + sama5d3_xplained_nandflash \ + sama5d3_xplained_mmc \ + sama5d2_xplained_mmc \ + sama5d2_xplained_spiflash \ + sama5d4_xplained_mmc \ + sama5d4_xplained_spiflash \ + sama5d4_xplained_nandflash define Build/Compile +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile index 10175b0f777ea6..57a2ec5393626d 100644 --- a/package/boot/uboot-envtools/Makefile +++ b/package/boot/uboot-envtools/Makefile @@ -19,7 +19,7 @@ PKG_SOURCE_URL:=\ ftp://ftp.denx.de/pub/u-boot PKG_HASH:=bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955 -PKG_BUILD_DEPENDS:=+fstools +PKG_BUILD_DEPENDS:=fstools PKG_LICENSE:=GPL-2.0 GPL-2.0+ PKG_LICENSE_FILES:=Licenses/README diff --git a/package/boot/uboot-envtools/files/ar71xx b/package/boot/uboot-envtools/files/ar71xx index 0bdb6dea41eeb2..6acfa69693ceab 100644 --- a/package/boot/uboot-envtools/files/ar71xx +++ b/package/boot/uboot-envtools/files/ar71xx @@ -66,6 +66,7 @@ dap-2695-a1|\ wzr-hp-ag300h) ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000" ;; +dr342|\ dr531) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000" ;; @@ -76,6 +77,9 @@ rambutan) qihoo-c301) ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000" ;; +wi2a-ac200i) + ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x8000" "0x10000" + ;; esac config_load ubootenv diff --git a/package/boot/uboot-envtools/files/lantiq b/package/boot/uboot-envtools/files/lantiq index d1a6668e84c2f7..f4541a559bdc4b 100644 --- a/package/boot/uboot-envtools/files/lantiq +++ b/package/boot/uboot-envtools/files/lantiq @@ -13,19 +13,19 @@ touch /etc/config/ubootenv board=$(board_name) case "$board" in -BTHOMEHUBV2B) +bt,homehub-v2b) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1" ;; -BTHOMEHUBV3A) +bt,homehub-v3a) ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x4000" "0x4000" "1" ;; -GIGASX76X) +siemens,gigaset-sx76x) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1" ;; -P2812HNUF1) +zyxel,p-2812hnu-f1) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x2000" "0x20000" "1" ;; -WBMR300) +buffalo,wbmr-300hpd) idx="$(find_mtd_index ubootconfig)" [ -n "$idx" ] && \ ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x2000" "0x1000" "2" diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index 70ba6a23bedfab..ce200a1fff38a9 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -20,7 +20,6 @@ all5002) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" ;; linkits7688|\ -linkits7688d|\ miwifi-nano|\ sk-wb8|\ wsr-1166|\ @@ -28,6 +27,9 @@ wsr-600|\ zbt-wg2626) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" ;; +mir3g) + ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" + ;; esac config_load ubootenv diff --git a/package/boot/uboot-kirkwood/Makefile b/package/boot/uboot-kirkwood/Makefile index c2d8eaa73ce72f..929fca6aeb870b 100644 --- a/package/boot/uboot-kirkwood/Makefile +++ b/package/boot/uboot-kirkwood/Makefile @@ -7,10 +7,10 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=2017.03 +PKG_VERSION:=2017.09 PKG_RELEASE:=1 -PKG_HASH:=f54baf3f9325bf444c7905f3a5b6f83680edb1e6e1a4d5f8a5ad80abe885113f +PKG_HASH:=b2d15f2cf5f72e706025cde73d67247c6da8cd35f7e10891eefe7d9095089744 include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/boot/uboot-kirkwood/patches/007-nsa310-uboot-generic.patch b/package/boot/uboot-kirkwood/patches/007-nsa310-uboot-generic.patch index 0831f1092a2ab6..10d8d4405c952b 100644 --- a/package/boot/uboot-kirkwood/patches/007-nsa310-uboot-generic.patch +++ b/package/boot/uboot-kirkwood/patches/007-nsa310-uboot-generic.patch @@ -27,23 +27,23 @@ diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index 9205b1e..819bd3b 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig -@@ -53,6 +53,9 @@ config TARGET_GOFLEXHOME +@@ -56,6 +56,9 @@ config TARGET_GOFLEXHOME config TARGET_NAS220 - bool "BlackArmor NAS220" - + bool "BlackArmor NAS220" + +config TARGET_NSA310 + bool "Zyxel NSA310 Board" + config TARGET_NSA310S - bool "Zyxel NSA310S" - -@@ -77,6 +80,7 @@ source "board/raidsonic/ib62x0/Kconfig" + bool "Zyxel NSA310S" + +@@ -80,6 +83,7 @@ source "board/raidsonic/ib62x0/Kconfig" source "board/Seagate/dockstar/Kconfig" source "board/Seagate/goflexhome/Kconfig" source "board/Seagate/nas220/Kconfig" +source "board/zyxel/nsa310/Kconfig" source "board/zyxel/nsa310s/Kconfig" - + endif diff --git a/board/zyxel/nsa310/Kconfig b/board/zyxel/nsa310/Kconfig new file mode 100644 @@ -528,7 +528,7 @@ new file mode 100644 index 0000000..d26ef35 --- /dev/null +++ b/configs/nsa310_defconfig -@@ -0,0 +1,22 @@ +@@ -0,0 +1,34 @@ +CONFIG_ARM=y +CONFIG_KIRKWOOD=y +CONFIG_TARGET_NSA310=y @@ -544,19 +544,31 @@ index 0000000..d26ef35 +CONFIG_CMD_DHCP=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y ++CONFIG_CMD_DNS=y ++CONFIG_CMD_SNTP=y +CONFIG_CMD_USB=y ++CONFIG_CMD_DATE=y +CONFIG_CMD_EXT2=y ++CONFIG_CMD_EXT4=y +CONFIG_CMD_FAT=y ++CONFIG_CMD_JFFS2=y ++CONFIG_CMD_MTDPARTS=y ++CONFIG_CMD_ENV=y ++CONFIG_CMD_NAND=y +CONFIG_EFI_PARTITION=y ++CONFIG_ENV_IS_IN_NAND=y +CONFIG_CMD_UBI=y +CONFIG_USB=y ++CONFIG_USB_EHCI_HCD=y +CONFIG_USB_STORAGE=y ++CONFIG_LZMA=y ++CONFIG_LZO=y diff --git a/include/configs/nsa310.h b/include/configs/nsa310.h new file mode 100644 index 0000000..86ef825 --- /dev/null +++ b/include/configs/nsa310.h -@@ -0,0 +1,144 @@ +@@ -0,0 +1,126 @@ +/* Copyright (C) 2015-2016 bodhi + * + * Based on @@ -594,7 +606,7 @@ index 0000000..86ef825 + */ +#define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */ +#define CONFIG_KW88F6281 /* SOC Name */ -+#define CONFIG_MACH_NSA310 /* Machine type */ ++ +#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ + +/* @@ -605,14 +617,8 @@ index 0000000..86ef825 +/* + * Commands configuration + */ -+#define CONFIG_CMD_ENV -+#define CONFIG_CMD_IDE -+#define CONFIG_CMD_NAND -+#define CONFIG_CMD_DATE +#define CONFIG_SYS_LONGHELP +#define CONFIG_PREBOOT -+#define CONFIG_SYS_HUSH_PARSER -+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " + +/* + * mv-common.h should be defined after CMD configs since it used them @@ -624,10 +630,7 @@ index 0000000..86ef825 + * Environment variables configurations + */ +#ifdef CONFIG_CMD_NAND -+#define CONFIG_ENV_IS_IN_NAND 1 +#define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K */ -+#else -+#define CONFIG_ENV_IS_NOWHERE 1 /* if env in SDRAM */ +#endif + +/* max 4k env size is enough, but in case of nand @@ -665,7 +668,6 @@ index 0000000..86ef825 +#define CONFIG_NET_MULTI +#define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */ +#define CONFIG_PHY_BASE_ADR 0x1 -+#define CONFIG_PHY_GIGE +#define CONFIG_RESET_PHY_R +#endif /* CONFIG_CMD_NET */ + @@ -680,24 +682,16 @@ index 0000000..86ef825 +/* + * File system + */ -+#define CONFIG_CMD_EXT4 -+#define CONFIG_CMD_JFFS2 +#define CONFIG_JFFS2_NAND +#define CONFIG_JFFS2_LZO -+#define CONFIG_CMD_UBIFS -+#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ +#define CONFIG_MTD_PARTITIONS -+#define CONFIG_CMD_MTDPARTS -+#define CONFIG_LZO + +/* + * Date Time + */ +#ifdef CONFIG_CMD_DATE +#define CONFIG_RTC_MV -+#define CONFIG_CMD_SNTP -+#define CONFIG_CMD_DNS +#endif /* CONFIG_CMD_DATE */ + +#endif /* _CONFIG_NSA310_H */ diff --git a/package/boot/uboot-kirkwood/patches/008-nsa325-uboot-generic.patch b/package/boot/uboot-kirkwood/patches/008-nsa325-uboot-generic.patch index 0bb79fa4e55940..4b4356e5d5e8ab 100644 --- a/package/boot/uboot-kirkwood/patches/008-nsa325-uboot-generic.patch +++ b/package/boot/uboot-kirkwood/patches/008-nsa325-uboot-generic.patch @@ -2,22 +2,22 @@ diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index 819bd3b..6a2d578 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig -@@ -59,6 +59,9 @@ config TARGET_NSA310 +@@ -62,6 +62,9 @@ config TARGET_NSA310 config TARGET_NSA310S - bool "Zyxel NSA310S" - + bool "Zyxel NSA310S" + +config TARGET_NSA325 + bool "Zyxel NSA325 board" + endchoice - + config SYS_SOC -@@ -82,5 +85,6 @@ source "board/Seagate/goflexhome/Kconfig" +@@ -85,5 +88,6 @@ source "board/Seagate/goflexhome/Kconfig source "board/Seagate/nas220/Kconfig" source "board/zyxel/nsa310/Kconfig" source "board/zyxel/nsa310s/Kconfig" +source "board/zyxel/nsa325/Kconfig" - + endif diff --git a/board/zyxel/nsa325/Kconfig b/board/zyxel/nsa325/Kconfig new file mode 100644 @@ -511,7 +511,7 @@ new file mode 100644 index 0000000..48e09cc --- /dev/null +++ b/configs/nsa325_defconfig -@@ -0,0 +1,22 @@ +@@ -0,0 +1,34 @@ +CONFIG_ARM=y +CONFIG_KIRKWOOD=y +CONFIG_TARGET_NSA325=y @@ -527,19 +527,31 @@ index 0000000..48e09cc +CONFIG_CMD_DHCP=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y ++CONFIG_CMD_DNS=y ++CONFIG_CMD_SNTP=y +CONFIG_CMD_USB=y +CONFIG_USB=y ++CONFIG_CMD_DATE=y +CONFIG_CMD_EXT2=y ++CONFIG_CMD_EXT4=y +CONFIG_CMD_FAT=y ++CONFIG_CMD_JFFS2=y ++CONFIG_CMD_MTDPARTS=y ++CONFIG_CMD_ENV=y ++CONFIG_CMD_NAND=y +CONFIG_EFI_PARTITION=y ++CONFIG_ENV_IS_IN_NAND=y +CONFIG_CMD_UBI=y ++CONFIG_USB_EHCI_HCD=y +CONFIG_USB_STORAGE=y ++CONFIG_LZMA=y ++CONFIG_LZO=y diff --git a/include/configs/nsa325.h b/include/configs/nsa325.h new file mode 100644 index 0000000..e5a8e2a --- /dev/null +++ b/include/configs/nsa325.h -@@ -0,0 +1,148 @@ +@@ -0,0 +1,129 @@ +/* + * (C) Copyright 2016 bodhi + * @@ -579,7 +591,6 @@ index 0000000..e5a8e2a + * High Level Configuration Options (easy to change) + */ +#define CONFIG_FEROCEON_88FR131 1 /* CPU Core subversion */ -+#define CONFIG_KIRKWOOD 1 /* SOC Family Name */ +#define CONFIG_KW88F6281 1 /* SOC Name */ + +#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ @@ -592,14 +603,8 @@ index 0000000..e5a8e2a +/* + * Commands configuration + */ -+#define CONFIG_CMD_ENV -+#define CONFIG_CMD_IDE -+#define CONFIG_CMD_NAND -+#define CONFIG_CMD_DATE +#define CONFIG_SYS_LONGHELP +#define CONFIG_PREBOOT -+#define CONFIG_SYS_HUSH_PARSER -+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " + +/* + * mv-common.h should be defined after CMD configs since it used them @@ -611,10 +616,7 @@ index 0000000..e5a8e2a + * Environment variables configurations + */ +#ifdef CONFIG_CMD_NAND -+#define CONFIG_ENV_IS_IN_NAND 1 +#define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K */ -+#else -+#define CONFIG_ENV_IS_NOWHERE 1 /* if env in SDRAM */ +#endif +/* + * max 4k env size is enough, but in case of nand @@ -650,7 +652,6 @@ index 0000000..e5a8e2a +#ifdef CONFIG_CMD_NET +#define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */ +#define CONFIG_PHY_BASE_ADR 0x1 -+#define CONFIG_PHY_GIGE +#define CONFIG_NETCONSOLE +#endif /* CONFIG_CMD_NET */ + @@ -665,24 +666,16 @@ index 0000000..e5a8e2a +/* + * File system + */ -+#define CONFIG_CMD_EXT4 -+#define CONFIG_CMD_JFFS2 +#define CONFIG_JFFS2_NAND +#define CONFIG_JFFS2_LZO -+#define CONFIG_CMD_UBIFS -+#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ +#define CONFIG_MTD_PARTITIONS -+#define CONFIG_CMD_MTDPARTS -+#define CONFIG_LZO + +/* + * Date Time + */ +#ifdef CONFIG_CMD_DATE +#define CONFIG_RTC_MV -+#define CONFIG_CMD_SNTP -+#define CONFIG_CMD_DNS +#endif /* CONFIG_CMD_DATE */ + +#define CONFIG_KIRKWOOD_GPIO /* Enable GPIO Support */ diff --git a/package/boot/uboot-kirkwood/patches/110-dockstar.patch b/package/boot/uboot-kirkwood/patches/110-dockstar.patch index 46b838f30b99cf..94d62cee82b90a 100644 --- a/package/boot/uboot-kirkwood/patches/110-dockstar.patch +++ b/package/boot/uboot-kirkwood/patches/110-dockstar.patch @@ -7,8 +7,8 @@ +#define CONFIG_SYS_MVFS /* - * Commands configuration -@@ -45,29 +46,29 @@ + * mv-common.h should be defined after CMD configs since it used them +@@ -37,29 +38,29 @@ * it has to be rounded to sector size */ #define CONFIG_ENV_SIZE 0x20000 /* 128k */ diff --git a/package/boot/uboot-kirkwood/patches/120-iconnect.patch b/package/boot/uboot-kirkwood/patches/120-iconnect.patch index 1f1ce75f252a2d..bd1dab818f6028 100644 --- a/package/boot/uboot-kirkwood/patches/120-iconnect.patch +++ b/package/boot/uboot-kirkwood/patches/120-iconnect.patch @@ -1,7 +1,7 @@ --- a/include/configs/iconnect.h +++ b/include/configs/iconnect.h -@@ -51,30 +51,29 @@ - #define CONFIG_ENV_IS_NOWHERE +@@ -44,30 +44,29 @@ + #define CONFIG_ENV_SECT_SIZE 0x20000 #endif #define CONFIG_ENV_SIZE 0x20000 -#define CONFIG_ENV_OFFSET 0x80000 @@ -42,8 +42,8 @@ * Ethernet driver configuration --- a/configs/iconnect_defconfig +++ b/configs/iconnect_defconfig -@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="iconnect => " - # CONFIG_CMD_FLASH is not set +@@ -10,6 +10,7 @@ CONFIG_SYS_PROMPT="iconnect => " + CONFIG_CMD_NAND=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_DHCP=y diff --git a/package/boot/uboot-kirkwood/patches/130-ib62x0.patch b/package/boot/uboot-kirkwood/patches/130-ib62x0.patch index 1be0c62517bada..58db8c8c8dc23a 100644 --- a/package/boot/uboot-kirkwood/patches/130-ib62x0.patch +++ b/package/boot/uboot-kirkwood/patches/130-ib62x0.patch @@ -1,6 +1,6 @@ --- a/include/configs/ib62x0.h +++ b/include/configs/ib62x0.h -@@ -54,27 +54,22 @@ +@@ -49,27 +49,22 @@ */ #define CONFIG_BOOTCOMMAND \ "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \ diff --git a/package/boot/uboot-kirkwood/patches/140-pogoplug_e02.patch b/package/boot/uboot-kirkwood/patches/140-pogoplug_e02.patch index 871affc1afebf3..5c8ff35bee239b 100644 --- a/package/boot/uboot-kirkwood/patches/140-pogoplug_e02.patch +++ b/package/boot/uboot-kirkwood/patches/140-pogoplug_e02.patch @@ -1,6 +1,6 @@ --- a/include/configs/pogo_e02.h +++ b/include/configs/pogo_e02.h -@@ -49,23 +49,30 @@ +@@ -44,23 +44,30 @@ #endif #define CONFIG_ENV_SIZE 0x20000 /* 128k */ diff --git a/package/boot/uboot-kirkwood/patches/150-goflexhome.patch b/package/boot/uboot-kirkwood/patches/150-goflexhome.patch index a7fa8e6f93b1cf..88b833072f27b0 100644 --- a/package/boot/uboot-kirkwood/patches/150-goflexhome.patch +++ b/package/boot/uboot-kirkwood/patches/150-goflexhome.patch @@ -1,16 +1,15 @@ --- a/include/configs/goflexhome.h +++ b/include/configs/goflexhome.h -@@ -77,20 +77,18 @@ +@@ -70,20 +70,18 @@ */ #define CONFIG_BOOTCOMMAND \ "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \ - "ubi part root; " \ - "ubifsmount ubi:root; " \ - "ubifsload 0x800000 ${kernel}; " \ -- "bootm 0x800000" + "ubi part ubi; " \ + "ubi read 0x800000 kernel; " \ -+ "bootm 0x800000" + "bootm 0x800000" #define CONFIG_MTDPARTS \ - "mtdparts=orion_nand:1m(uboot),6M(uImage),-(root)\0" diff --git a/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch b/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch index 27849859287a84..d6246dc9344ffe 100644 --- a/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch +++ b/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch @@ -1,43 +1,43 @@ --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig -@@ -87,4 +87,7 @@ source "board/Seagate/nas220/Kconfig" +@@ -90,4 +90,7 @@ source "board/zyxel/nsa310/Kconfig" source "board/zyxel/nsa310s/Kconfig" source "board/zyxel/nsa325/Kconfig" - + +config SECOND_STAGE + bool "OpenWrt second stage hack" + endif --- a/include/configs/dockstar.h +++ b/include/configs/dockstar.h -@@ -89,4 +89,6 @@ - #define CONFIG_CMD_MTDPARTS - #define CONFIG_LZO - +@@ -76,4 +76,6 @@ + #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ + #define CONFIG_MTD_PARTITIONS + +#include "openwrt-kirkwood-common.h" + #endif /* _CONFIG_DOCKSTAR_H */ --- a/include/configs/ib62x0.h +++ b/include/configs/ib62x0.h -@@ -99,4 +99,6 @@ +@@ -94,4 +94,6 @@ #define CONFIG_RTC_MV #endif /* CONFIG_CMD_DATE */ - + +#include "openwrt-kirkwood-common.h" + #endif /* _CONFIG_IB62x0_H */ --- a/include/configs/iconnect.h +++ b/include/configs/iconnect.h -@@ -94,4 +94,6 @@ +@@ -83,4 +83,6 @@ + #define CONFIG_MTD_DEVICE #define CONFIG_MTD_PARTITIONS - #define CONFIG_CMD_MTDPARTS - + +#include "openwrt-kirkwood-common.h" + #endif /* _CONFIG_ICONNECT_H */ --- /dev/null +++ b/include/configs/openwrt-kirkwood-common.h -@@ -0,0 +1,40 @@ +@@ -0,0 +1,31 @@ +/* + * Copyright (C) 2013 Luka Perkov + * @@ -47,9 +47,6 @@ +#ifndef __OPENWRT_KIRKWOOD_COMMON_H +#define __OPENWRT_KIRKWOOD_COMMON_H + -+/* Commands */ -+#define CONFIG_CMD_BOOTZ -+ +/* Ethernet */ +#if defined(CONFIG_CMD_NET) +#define CONFIG_SERVERIP 192.168.1.2 @@ -63,14 +60,8 @@ +#define CONFIG_ENV_IS_NOWHERE +#endif + -+/* Flattened uImage Tree */ -+#define CONFIG_FIT 1 -+#define CONFIG_FIT_VERBOSE 1 -+ +/* Various */ +#define CONFIG_BZIP2 -+#define CONFIG_LZMA -+#define CONFIG_LZO + +/* Unnecessary */ +#undef CONFIG_BOOTM_NETBSD @@ -80,37 +71,119 @@ +#endif /* __OPENWRT_KIRKWOOD_COMMON_H */ --- a/include/configs/pogo_e02.h +++ b/include/configs/pogo_e02.h -@@ -93,4 +93,6 @@ - #define CONFIG_CMD_MTDPARTS - #define CONFIG_LZO - +@@ -83,4 +83,6 @@ + #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ + #define CONFIG_MTD_PARTITIONS + +#include "openwrt-kirkwood-common.h" + #endif /* _CONFIG_POGO_E02_H */ --- a/include/configs/sheevaplug.h +++ b/include/configs/sheevaplug.h -@@ -99,4 +99,6 @@ +@@ -96,4 +96,6 @@ #define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET - #endif /* CONFIG_CMD_IDE */ - + #endif /* CONFIG_IDE */ + +#include "openwrt-kirkwood-common.h" + #endif /* _CONFIG_SHEEVAPLUG_H */ --- a/include/configs/goflexhome.h +++ b/include/configs/goflexhome.h -@@ -112,4 +112,6 @@ +@@ -105,4 +105,6 @@ #define CONFIG_RTC_MV #endif /* CONFIG_CMD_DATE */ - + +#include "openwrt-kirkwood-common.h" + #endif /* _CONFIG_GOFLEXHOME_H */ --- a/include/configs/nsa310.h +++ b/include/configs/nsa310.h -@@ -141,4 +141,6 @@ - #define CONFIG_CMD_DNS +@@ -123,4 +123,6 @@ + #define CONFIG_RTC_MV #endif /* CONFIG_CMD_DATE */ - + +#include "openwrt-kirkwood-common.h" + #endif /* _CONFIG_NSA310_H */ +--- a/configs/dockstar_defconfig ++++ b/configs/dockstar_defconfig +@@ -25,3 +25,8 @@ CONFIG_USB=y + CONFIG_USB_EHCI_HCD=y + CONFIG_USB_STORAGE=y + CONFIG_OF_LIBFDT=y ++CONFIG_CMD_BOOTZ=y ++CONFIG_FIT=y ++CONFIG_FIT_VERBOSE=y ++CONFIG_LZMA=y ++CONFIG_LZO=y +--- a/configs/goflexhome_defconfig ++++ b/configs/goflexhome_defconfig +@@ -29,3 +29,8 @@ CONFIG_USB=y + CONFIG_USB_EHCI_HCD=y + CONFIG_USB_STORAGE=y + CONFIG_OF_LIBFDT=y ++CONFIG_CMD_BOOTZ=y ++CONFIG_FIT=y ++CONFIG_FIT_VERBOSE=y ++CONFIG_LZMA=y ++CONFIG_LZO=y +--- a/configs/ib62x0_defconfig ++++ b/configs/ib62x0_defconfig +@@ -27,5 +27,9 @@ CONFIG_SYS_NS16550=y + CONFIG_USB=y + CONFIG_USB_EHCI_HCD=y + CONFIG_USB_STORAGE=y +-CONFIG_LZMA=y + CONFIG_OF_LIBFDT=y ++CONFIG_CMD_BOOTZ=y ++CONFIG_FIT=y ++CONFIG_FIT_VERBOSE=y ++CONFIG_LZMA=y ++CONFIG_LZO=y +--- a/configs/iconnect_defconfig ++++ b/configs/iconnect_defconfig +@@ -24,5 +24,9 @@ CONFIG_SYS_NS16550=y + CONFIG_USB=y + CONFIG_USB_EHCI_HCD=y + CONFIG_USB_STORAGE=y +-CONFIG_LZMA=y + CONFIG_OF_LIBFDT=y ++CONFIG_CMD_BOOTZ=y ++CONFIG_FIT=y ++CONFIG_FIT_VERBOSE=y ++CONFIG_LZMA=y ++CONFIG_LZO=y +--- a/configs/nsa310_defconfig ++++ b/configs/nsa310_defconfig +@@ -30,5 +30,8 @@ CONFIG_CMD_UBI=y + CONFIG_USB=y + CONFIG_USB_EHCI_HCD=y + CONFIG_USB_STORAGE=y ++CONFIG_CMD_BOOTZ=y ++CONFIG_FIT=y ++CONFIG_FIT_VERBOSE=y + CONFIG_LZMA=y + CONFIG_LZO=y +--- a/configs/pogo_e02_defconfig ++++ b/configs/pogo_e02_defconfig +@@ -25,3 +25,8 @@ CONFIG_USB=y + CONFIG_USB_EHCI_HCD=y + CONFIG_USB_STORAGE=y + CONFIG_OF_LIBFDT=y ++CONFIG_CMD_BOOTZ=y ++CONFIG_FIT=y ++CONFIG_FIT_VERBOSE=y ++CONFIG_LZMA=y ++CONFIG_LZO=y +--- a/configs/sheevaplug_defconfig ++++ b/configs/sheevaplug_defconfig +@@ -28,5 +28,8 @@ CONFIG_SYS_NS16550=y + CONFIG_USB=y + CONFIG_USB_EHCI_HCD=y + CONFIG_USB_STORAGE=y +-CONFIG_LZMA=y + CONFIG_OF_LIBFDT=y ++CONFIG_FIT=y ++CONFIG_FIT_VERBOSE=y ++CONFIG_LZMA=y ++CONFIG_LZO=y diff --git a/package/boot/uboot-lantiq/Makefile b/package/boot/uboot-lantiq/Makefile index 94b604af34859b..5493737d3fe3a2 100644 --- a/package/boot/uboot-lantiq/Makefile +++ b/package/boot/uboot-lantiq/Makefile @@ -26,205 +26,205 @@ endef define U-Boot/arv4519pw_ram NAME:=Arcadyan arv4519pw (RAM) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV4519PW + BUILD_DEVICES:=arcadyan_arv4519pw DDR_SETTINGS:=board/arcadyan/arv4519pw/ddr_settings.h endef define U-Boot/arv4519pw_nor NAME:=Arcadyan arv4519pw (NOR) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV4519PW + BUILD_DEVICES:=arcadyan_arv4519pw endef define U-Boot/arv4519pw_brn NAME:=Arcadyan arv4519pw (BRN) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV4519PW + BUILD_DEVICES:=arcadyan_arv4519pw endef define U-Boot/arv7506pw11_ram NAME:=Arcadyan ARV7506PW11 (RAM) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV7506PW11 + BUILD_DEVICES:=arcadyan_arv7506pw11 DDR_SETTINGS:=board/arcadyan/arv7506pw11/ddr_settings.h endef define U-Boot/arv7506pw11_nor NAME:=Arcadyan ARV7506PW11 (NOR) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV7506PW11 + BUILD_DEVICES:=arcadyan_arv7506pw11 endef define U-Boot/arv7506pw11_brn NAME:=Arcadyan ARV7506PW11 (BRN) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV7506PW11 + BUILD_DEVICES:=arcadyan_arv7506pw11 endef define U-Boot/arv7510pw_ram NAME:=Arcadyan arv7510pw (RAM) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV4510PW + BUILD_DEVICES:=arcadyan_arv4510pw DDR_SETTINGS:=board/arcadyan/arv7510pw/ddr_settings.h endef define U-Boot/arv7510pw_nor NAME:=Arcadyan arv7510pw (NOR) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV4510PW + BUILD_DEVICES:=arcadyan_arv4510pw endef define U-Boot/arv7510pw_brn NAME:=Arcadyan arv7510pw (BRN) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV4510PW + BUILD_DEVICES:=arcadyan_arv4510pw endef define U-Boot/arv7510pw22_ram NAME:=Arcadyan arv7510pw22 (RAM) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV7510PW22 + BUILD_DEVICES:=arcadyan_arv7510pw22 DDR_SETTINGS:=board/arcadyan/arv7510pw22/ddr_settings.h endef define U-Boot/arv7510pw22_nor NAME:=Arcadyan arv7510pw22 (NOR) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV7510PW22 + BUILD_DEVICES:=arcadyan_arv7510pw22 endef define U-Boot/arv7510pw22_brn NAME:=Arcadyan arv7510pw22 (BRN) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV7510PW22 + BUILD_DEVICES:=arcadyan_arv7510pw22 endef define U-Boot/arv7518pw_ram NAME:=Arcadyan arv7518pw (RAM) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV7518PW + BUILD_DEVICES:=arcadyan_arv7518pw DDR_SETTINGS:=board/arcadyan/arv7518pw/ddr_settings.h endef define U-Boot/arv7518pw_nor NAME:=Arcadyan arv7518pw (NOR) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV7518PW + BUILD_DEVICES:=arcadyan_arv7518pw endef define U-Boot/arv7518pw_brn NAME:=Arcadyan arv7518pw (BRN) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV7518PW + BUILD_DEVICES:=arcadyan_arv7518pw endef define U-Boot/arv752dpw_ram NAME:=Arcadyan arv752dpw (RAM) BUILD_SUBTARGET:=xway DDR_SETTINGS:=board/arcadyan/arv752dpw/ddr_settings.h - BUILD_DEVICES:=ARV752DPW + BUILD_DEVICES:=arcadyan_arv752dpw endef define U-Boot/arv752dpw_nor NAME:=Arcadyan arv752dpw (NOR) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV752DPW + BUILD_DEVICES:=arcadyan_arv752dpw endef define U-Boot/arv752dpw_brn NAME:=Arcadyan arv752dpw (BRN) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV752DPW + BUILD_DEVICES:=arcadyan_arv752dpw endef define U-Boot/arv752dpw22_ram NAME:=Arcadyan arv752dpw22 (RAM) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV752DPW22 + BUILD_DEVICES:=arcadyan_arv752dpw22 DDR_SETTINGS:=board/arcadyan/arv752dpw22/ddr_settings.h endef define U-Boot/arv752dpw22_nor NAME:=Arcadyan arv752dpw22 (NOR) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV752DPW22 + BUILD_DEVICES:=arcadyan_arv752dpw22 endef define U-Boot/arv752dpw22_brn NAME:=Arcadyan arv752dpw22 (BRN) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV752DPW22 + BUILD_DEVICES:=arcadyan_arv752dpw22 endef define U-Boot/arv8539pw22_ram NAME:=Speedport W 504V Typ A (RAM) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV8539PW22 + BUILD_DEVICES:=arcadyan_arv8539pw22 DDR_SETTINGS:=board/arcadyan/arv8539pw22/ddr_settings.h endef define U-Boot/arv8539pw22_nor NAME:=Speedport W 504V Typ A (NOR) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV8539PW22 + BUILD_DEVICES:=arcadyan_arv8539pw22 endef define U-Boot/arv8539pw22_brn NAME:=Speedport W 504V Typ A (BRN) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ARV8539PW22 + BUILD_DEVICES:=arcadyan_arv8539pw22 endef define U-Boot/gigasx76x_ram NAME:=Siemens Gigaset sx76x (RAM) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=GIGASX76X + BUILD_DEVICES:=siemens_gigaset-sx76x DDR_SETTINGS:=board/gigaset/sx76x/ddr_settings.h endef define U-Boot/gigasx76x_nor NAME:=Siemens Gigaset sx76x (NOR) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=GIGASX76X + BUILD_DEVICES:=siemens_gigaset-sx76x endef define U-Boot/acmp252_ram NAME:=AudioCodes MP-252 (RAM) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ACMP252 + BUILD_DEVICES:=audiocodes_mp-252 DDR_SETTINGS:=board/audiocodes/acmp252/ddr_settings.h endef define U-Boot/acmp252_nor NAME:=AudioCodes MP-252 (NOR) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=ACMP252 + BUILD_DEVICES:=audiocodes_mp-252 endef define U-Boot/bthomehubv5a_ram NAME:=BT Home Hub 5A (RAM) BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=BTHOMEHUBV5A + BUILD_DEVICES:=bt_homehub-v5a DDR_SETTINGS:=board/bt/bthomehubv5a/ddr_settings.h endef define U-Boot/easy50712_ram NAME:=Lantiq EASY50712 (RAM) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=EASY50712 + BUILD_DEVICES:=lantiq_easy50712 DDR_SETTINGS:=board/lantiq/easy50712/ddr_settings.h endef define U-Boot/easy50712_nor NAME:=Lantiq EASY50712 (NOR) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=EASY50712 + BUILD_DEVICES:=lantiq_easy50712 endef define U-Boot/easy50712_norspl NAME:=Lantiq EASY50712 (NOR SPL) BUILD_SUBTARGET:=xway - BUILD_DEVICES:=EASY50712 + BUILD_DEVICES:=lantiq_easy50712 UBOOT_IMAGE:=u-boot.ltq.lzo.norspl DEPENDS+=@BROKEN endef @@ -232,20 +232,20 @@ endef define U-Boot/easy80920_ram NAME:=Lantiq EASY80920 (RAM) BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=EASY80920NOR EASY80920NAND + BUILD_DEVICES:=lantiq_easy80920-nor lantiq_easy80920-nand DDR_SETTINGS:=board/lantiq/easy80920/ddr_settings.h endef define U-Boot/easy80920_nor NAME:=Lantiq EASY80920 (NOR) - BUILD_DEVICES:=EASY80920NOR EASY80920NAND + BUILD_DEVICES:=lantiq_easy80920-nor lantiq_easy80920-nand BUILD_SUBTARGET:=xrx200 endef define U-Boot/easy80920_norspl NAME:=Lantiq EASY80920 (NOR SPL) BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=EASY80920NOR EASY80920NAND + BUILD_DEVICES:=lantiq_easy80920-nor lantiq_easy80920-nand UBOOT_IMAGE:=u-boot.ltq.lzo.norspl DEPENDS+=@BROKEN endef @@ -253,7 +253,7 @@ endef define U-Boot/easy80920_sfspl NAME:=Lantiq EASY80920 (SPI SPL) BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=EASY80920NOR EASY80920NAND + BUILD_DEVICES:=lantiq_easy80920-nor lantiq_easy80920-nand UBOOT_IMAGE:=u-boot.ltq.lzo.sfspl DEPENDS+=@BROKEN endef @@ -261,20 +261,20 @@ endef define U-Boot/fb3370_eva NAME:=AVM FRITZ3370 (EVA) BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=FRITZ3370 + BUILD_DEVICES:=avm_fritz3370 endef define U-Boot/fb3370_ram NAME:=AVM FRITZ3370 (RAM) BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=FRITZ3370 + BUILD_DEVICES:=avm_fritz3370 DDR_SETTINGS:=board/avm/fb3370/ddr_settings.h endef define U-Boot/fb3370_sfspl NAME:=AVM FRITZ3370 (SPI SPL) BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=FRITZ3370 + BUILD_DEVICES:=avm_fritz3370 UBOOT_IMAGE:=u-boot.ltq.lzo.sfspl DEPENDS+=@BROKEN endef @@ -282,14 +282,14 @@ endef define U-Boot/p2812hnufx_ram NAME:=ZyXEL P-2812HNU-Fx (RAM) BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=P2812HNUF1 + BUILD_DEVICES:=zyxel_p-2812hnu-f1 DDR_SETTINGS:=board/zyxel/p2812hnufx/ddr_settings.h endef define U-Boot/p2812hnufx_nandspl NAME:=ZyXEL P-2812HNU-Fx (NAND SPL) BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=P2812HNUF1 + BUILD_DEVICES:=zyxel_p-2812hnu-f1 UBOOT_IMAGE:=u-boot.ltq.lzo.nandspl DEPENDS+=@BROKEN endef @@ -297,38 +297,38 @@ endef define U-Boot/vgv7510kw22_brn NAME:=Arcadyan VGV7510KW22 (BRN) BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=VGV7510KW22NOR + BUILD_DEVICES:=arcadyan_vgv7510kw22-nor endef define U-Boot/vgv7510kw22_nor NAME:=Arcadyan VGV7510KW22 (NOR) BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=VGV7510KW22NOR + BUILD_DEVICES:=arcadyan_vgv7510kw22-nor endef define U-Boot/vgv7510kw22_ram NAME:=Arcadyan VGV7510KW22 (RAM) BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=VGV7510KW22NOR + BUILD_DEVICES:=arcadyan_vgv7510kw22-nor DDR_SETTINGS:=board/arcadyan/vgv7510kw22/ddr_settings.h endef define U-Boot/vgv7519_brn NAME:=Arcadyan VGV7519 (BRN) BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=VGV7519NOR VGV7519BRN + BUILD_DEVICES:=arcadyan_vgv7519-nor arcadyan_vgv7519-brn endef define U-Boot/vgv7519_nor NAME:=Arcadyan VGV7519 (NOR) BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=VGV7519NOR VGV7519BRN + BUILD_DEVICES:=arcadyan_vgv7519-nor arcadyan_vgv7519-brn endef define U-Boot/vgv7519_ram NAME:=Arcadyan VGV7519 (RAM) BUILD_SUBTARGET:=xrx200 - BUILD_DEVICES:=VGV7519NOR VGV7519BRN + BUILD_DEVICES:=arcadyan_vgv7519-nor arcadyan_vgv7519-brn DDR_SETTINGS:=board/arcadyan/vgv7519/ddr_settings.h endef diff --git a/package/boot/uboot-layerscape-32b/Makefile b/package/boot/uboot-layerscape-32b/Makefile deleted file mode 100644 index 2ea03e5f4f883f..00000000000000 --- a/package/boot/uboot-layerscape-32b/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (C) 2016 Jiang Yutang -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=uboot-layerscape-32bit -PKG_VERSION:=v1.0 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_MIRROR_HASH:=a29edbeddde4b3007ac349c2a5ee434719049ac4753e459dbb1bab21e1c585da -PKG_SOURCE_URL:=https://github.com/fsl-jyt/uboot-ls-32b.git -PKG_SOURCE_VERSION:=6476195551ea83193afd06d0c441483c04729c8d - -PKG_LICENSE:=GPL-2.0 GPL-2.0+ -PKG_LICENSE_FILES:=Licenses/README - -PKG_MAINTAINER:=Jiang Yutang - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/kernel.mk - -define Package/uboot-layerscape-32b - SECTION:=boot - CATEGORY:=Boot Loaders - DEPENDS:=@TARGET_layerscape_32b - TITLE:=32-bit U-Boot for Layerscape boards - DEFAULT:=y - HIDDEN:=1 -endef - -define Build/Configure - -endef - -define Build/Compile - -endef - -define Build/InstallDev - $(INSTALL_DIR) $(STAGING_DIR_IMAGE) - $(CP) $(PKG_BUILD_DIR)/ls1043ardb-uboot.bin $(STAGING_DIR_IMAGE)/ls1043ardb-32b-uboot.bin - $(CP) $(PKG_BUILD_DIR)/ls1046ardb-uboot.bin $(STAGING_DIR_IMAGE)/ls1046ardb-32b-uboot.bin - $(CP) $(PKG_BUILD_DIR)/ls1012ardb-uboot.bin.swap $(STAGING_DIR_IMAGE)/ls1012ardb-32b-uboot.bin -endef - -$(eval $(call BuildPackage,uboot-layerscape-32b)) diff --git a/package/boot/uboot-layerscape-armv8_32b/Makefile b/package/boot/uboot-layerscape-armv8_32b/Makefile new file mode 100644 index 00000000000000..d1ca8291737f44 --- /dev/null +++ b/package/boot/uboot-layerscape-armv8_32b/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2016 Jiang Yutang +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=uboot-layerscape-armv8_32b +PKG_SOURCE_DATE:=2017-10-24 +PKG_RELEASE:=1 + +# Layerscape ARMv8 platforms use 64-bit u-boot to support both 32-bit and 64-bit +# kernel/rootfs. Since OpenWrt could only provide 32-bit toolchain for 32-bit targets, +# 64-bit u-boot images git tree is provided here whose source code actually is +# uboot-layerscape's source code. +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/yangbolu1991/u-boot-lede.git +PKG_SOURCE_VERSION:=43cb4c0fcab237f8daa39c393cc1441b76b99fcf +PKG_MIRROR_HASH:=ff7d1fcb85dda2be6a9e3785821b5791c7189d2d412b160a9621bb2dcad24dea + +PKG_MAINTAINER:=Yangbo Lu + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/kernel.mk + +define Package/uboot-layerscape-armv8_32b + SECTION:=boot + CATEGORY:=Boot Loaders + DEPENDS:=@TARGET_layerscape_armv8_32b + TITLE:=U-Boot for ARMv8 32-bit based Layerscape boards + DEFAULT:=y + HIDDEN:=1 +endef + +define Build/Configure + +endef + +define Build/Compile + +endef + +define Build/InstallDev + $(INSTALL_DIR) $(STAGING_DIR_IMAGE) + $(CP) $(PKG_BUILD_DIR)/ls1043ardb-uboot.bin $(STAGING_DIR_IMAGE)/ls1043ardb-armv8_32b-uboot.bin + $(CP) $(PKG_BUILD_DIR)/ls1046ardb-uboot.bin $(STAGING_DIR_IMAGE)/ls1046ardb-armv8_32b-uboot.bin + $(CP) $(PKG_BUILD_DIR)/ls1012ardb-uboot.bin $(STAGING_DIR_IMAGE)/ls1012ardb-armv8_32b-uboot.bin + $(CP) $(PKG_BUILD_DIR)/ls1012afrdm-uboot.bin $(STAGING_DIR_IMAGE)/ls1012afrdm-armv8_32b-uboot.bin +endef + +$(eval $(call BuildPackage,uboot-layerscape-armv8_32b)) diff --git a/package/boot/uboot-layerscape/Makefile b/package/boot/uboot-layerscape/Makefile index f98205335b1f3d..c37b335b49a255 100644 --- a/package/boot/uboot-layerscape/Makefile +++ b/package/boot/uboot-layerscape/Makefile @@ -9,20 +9,20 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=uboot-layerscape -PKG_VERSION:=v1.0 +PKG_SOURCE_DATE:=2017-08-24 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git -PKG_MIRROR_HASH:=462fea9bdf03ec4bc23f2f1bb3917c2ec57017eca1e11b8a609bf60cd51a94e7 -PKG_SOURCE_URL:=https://github.com/fsl-jyt/u-boot.git -PKG_SOURCE_VERSION:=69b5ea576a2b0448391a910114d6c05859bf78d0 +PKG_SOURCE_URL:=https://github.com/qoriq-open-source/u-boot.git +PKG_SOURCE_VERSION:=fbedf04c1bad675eadbac86febdcf759441a02af +PKG_MIRROR_HASH:=29922f83ce3e8dde163eafcfd07f3595e2779b7a3e8eb43640f058f58248718d include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk define U-Boot/Default BUILD_TARGET:=layerscape - BUILD_SUBTARGET:=64b + BUILD_SUBTARGET:=armv8_64b BUILD_DEVICES:=$(1) UBOOT_IMAGE:=u-boot-dtb.bin HIDDEN:=y @@ -40,17 +40,34 @@ endef define U-Boot/ls1012ardb NAME:=NXP ls1012ardb 64b Dev Board UBOOT_CONFIG:=ls1012ardb_qspi - UBOOT_IMAGE:=u-boot-swap.bin +endef + +define U-Boot/ls1088ardb + NAME:=NXP ls1088ardb 64b Dev Board + UBOOT_CONFIG:=ls1088ardb_qspi +endef + +define U-Boot/ls2088ardb + NAME:=NXP ls2088ardb 64b Dev Board + UBOOT_CONFIG:=ls2080ardb +endef + +define U-Boot/ls1012afrdm + NAME:=NXP ls1012afrdm 64b Dev Board + UBOOT_CONFIG:=ls1012afrdm_qspi endef UBOOT_TARGETS := \ ls1043ardb \ ls1046ardb \ - ls1012ardb + ls1012ardb \ + ls1088ardb \ + ls2088ardb \ + ls1012afrdm define Build/InstallDev $(INSTALL_DIR) $(STAGING_DIR_IMAGE) - $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-64b-uboot.bin + $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-$(BUILD_SUBTARGET)-uboot.bin endef define Package/u-boot/install/default diff --git a/package/boot/uboot-layerscape/patches/0001-armv8-ls1043a-add-LEDE-boot-support-in-environment.patch b/package/boot/uboot-layerscape/patches/0001-armv8-ls1043a-add-LEDE-boot-support-in-environment.patch new file mode 100644 index 00000000000000..5973831665f351 --- /dev/null +++ b/package/boot/uboot-layerscape/patches/0001-armv8-ls1043a-add-LEDE-boot-support-in-environment.patch @@ -0,0 +1,51 @@ +From 74be1b50f96b3ada0a4fc18f0283659739edbadf Mon Sep 17 00:00:00 2001 +From: Yangbo Lu +Date: Fri, 22 Sep 2017 11:00:12 +0800 +Subject: [PATCH 1/3] armv8: ls1043a: add LEDE boot support in environment + +Signed-off-by: Yangbo Lu +--- + include/configs/ls1043a_common.h | 20 +++++++++++++++++++- + 1 file changed, 19 insertions(+), 1 deletion(-) + +diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h +index 0b3fb4e..5c01111 100644 +--- a/include/configs/ls1043a_common.h ++++ b/include/configs/ls1043a_common.h +@@ -336,7 +336,19 @@ + "sd_bootcmd=echo Trying load from SD ..;" \ + "mmcinfo; mmc read $load_addr " \ + "$kernel_addr_sd $kernel_size_sd ;" \ +- " bootm $load_addr#$board\0" ++ " bootm $load_addr#$board\0" \ ++ "lede_setenv=setenv loadaddr 82000000 && " \ ++ "setenv fdtaddr 8f000000 && " \ ++ "setenv bootargs root=/dev/mtdblock8 " \ ++ "rootfstype=squashfs,jffs2 noinitrd " \ ++ "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \ ++ "mtdparts=60000000.nor:1M(rcw),2M(u-boot),1M(u-boot-env)," \ ++ "5M(reserved-1),256k(fman),5888k(reserved-2),1M(dtb)," \ ++ "16M(kernel),32M(rootfs),64M(otherbank)\0" \ ++ "lede_run=cp.b 60f00000 $fdtaddr 100000 && " \ ++ "cp.b 61000000 $loadaddr 1000000 && " \ ++ "bootm $loadaddr - $fdtaddr\0" \ ++ "lede_boot=run lede_setenv;run lede_run\0" + + + #undef CONFIG_BOOTCOMMAND +@@ -351,6 +363,12 @@ + "env exists secureboot && esbc_halt;" + #endif + ++#undef CONFIG_BOOTCOMMAND ++#define CONFIG_BOOTCOMMAND "run lede_boot" ++ ++#undef CONFIG_BOOTDELAY ++#define CONFIG_BOOTDELAY 3 ++ + #define CONFIG_BOOTARGS "console=ttyS0,115200 root=/dev/ram0 " \ + "earlycon=uart8250,mmio,0x21c0500 " \ + MTDPARTS_DEFAULT +-- +2.7.4 + diff --git a/package/boot/uboot-layerscape/patches/0002-armv8-ls1046ardb-add-LEDE-boot-support-in-environmen.patch b/package/boot/uboot-layerscape/patches/0002-armv8-ls1046ardb-add-LEDE-boot-support-in-environmen.patch new file mode 100644 index 00000000000000..418f6287fba125 --- /dev/null +++ b/package/boot/uboot-layerscape/patches/0002-armv8-ls1046ardb-add-LEDE-boot-support-in-environmen.patch @@ -0,0 +1,57 @@ +From dc0e8734ea1c679738377d13bdd9bf3fa644e6b3 Mon Sep 17 00:00:00 2001 +From: Yangbo Lu +Date: Fri, 22 Sep 2017 11:36:43 +0800 +Subject: [PATCH 2/3] armv8: ls1046ardb: add LEDE boot support in environment + +Signed-off-by: Yangbo Lu +--- + include/configs/ls1046a_common.h | 15 ++++++++++++++- + include/configs/ls1046ardb.h | 6 ++++++ + 2 files changed, 20 insertions(+), 1 deletion(-) + +diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h +index 4fc2f94..53bd41b 100644 +--- a/include/configs/ls1046a_common.h ++++ b/include/configs/ls1046a_common.h +@@ -276,7 +276,20 @@ + "sd_bootcmd=echo Trying load from SD ..;" \ + "mmcinfo; mmc read $load_addr " \ + "$kernel_addr_sd $kernel_size_sd ;" \ +- " bootm $load_addr#$board\0" ++ " bootm $load_addr#$board\0" \ ++ "lede_setenv=setenv loadaddr 82000000 && " \ ++ "setenv fdtaddr 8f000000 && " \ ++ "setenv bootargs root=/dev/mtdblock9 " \ ++ "rootfstype=ext4 noinitrd " \ ++ "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \ ++ "mtdparts=1550000.quadspi:1M(rcw),2M(u-boot),1M(u-boot-env)," \ ++ "5M(reserved-1),256k(fman),5888k(reserved-2),1M(dtb)," \ ++ "16M(kernel),30M(ext4rfs),2M(user)\0" \ ++ "lede_run=sf probe 0:0 && " \ ++ "sf read $fdtaddr f00000 100000 && " \ ++ "sf read $loadaddr 1000000 1000000 && " \ ++ "bootm $loadaddr - $fdtaddr\0" \ ++ "lede_boot=run lede_setenv;run lede_run\0" + + + #define CONFIG_BOOTARGS "console=ttyS0,115200 root=/dev/ram0 " \ +diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h +index f8c15a6..c3b50b1 100644 +--- a/include/configs/ls1046ardb.h ++++ b/include/configs/ls1046ardb.h +@@ -251,6 +251,12 @@ + "env exists secureboot && esbc_halt;" + #endif + ++#undef CONFIG_BOOTCOMMAND ++#define CONFIG_BOOTCOMMAND "run lede_boot" ++ ++#undef CONFIG_BOOTDELAY ++#define CONFIG_BOOTDELAY 3 ++ + #define MTDPARTS_DEFAULT "mtdparts=1550000.quadspi:1m(rcw)," \ + "15m(u-boot),48m(kernel.itb);" \ + "7e800000.flash:16m(nand_uboot)," \ +-- +2.7.4 + diff --git a/package/boot/uboot-layerscape/patches/0003-armv8-ls1012ardb-add-LEDE-boot-support-in-environmen.patch b/package/boot/uboot-layerscape/patches/0003-armv8-ls1012ardb-add-LEDE-boot-support-in-environmen.patch new file mode 100644 index 00000000000000..e8bbe7faa386b4 --- /dev/null +++ b/package/boot/uboot-layerscape/patches/0003-armv8-ls1012ardb-add-LEDE-boot-support-in-environmen.patch @@ -0,0 +1,51 @@ +From 8d6efca7eb2de012b98493206c87f31ee9b9e967 Mon Sep 17 00:00:00 2001 +From: Yangbo Lu +Date: Thu, 28 Sep 2017 11:25:58 +0800 +Subject: [PATCH 3/3] armv8: ls1012ardb: add LEDE boot support in environment + +Signed-off-by: Yangbo Lu +--- + include/configs/ls1012ardb.h | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +diff --git a/include/configs/ls1012ardb.h b/include/configs/ls1012ardb.h +index 5fe3218..242cdf0 100644 +--- a/include/configs/ls1012ardb.h ++++ b/include/configs/ls1012ardb.h +@@ -127,13 +127,32 @@ + "$kernel_addr $kernel_size; env exists secureboot " \ + "&& sf read $kernelheader_addr_r $kernelheader_addr " \ + "$kernelheader_size && esbc_validate ${kernelheader_addr_r}; " \ +- "bootm $load_addr#$board\0" ++ "bootm $load_addr#$board\0" \ ++ "lede_setenv=setenv loadaddr 82000000 && " \ ++ "setenv fdtaddr 8f000000 && " \ ++ "setenv bootargs root=/dev/mtdblock8 " \ ++ "rootfstype=ext4 noinitrd " \ ++ "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \ ++ "mtdparts=1550000.quadspi:1M(rcw),2M(u-boot),1M(u-boot-env)," \ ++ "5M(reserved-1),256k(fman),5888k(reserved-2),1M(dtb)," \ ++ "16M(kernel),30M(ext4rfs),2M(user)\0" \ ++ "lede_run=pfe stop && sf probe 0:0 && " \ ++ "sf read $fdtaddr f00000 100000 && " \ ++ "sf read $loadaddr 1000000 1000000 && " \ ++ "bootm $loadaddr - $fdtaddr\0" \ ++ "lede_boot=run lede_setenv;run lede_run\0" + + #undef CONFIG_BOOTCOMMAND + #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) + #define CONFIG_BOOTCOMMAND "run distro_bootcmd; run qspi_bootcmd; " \ + "env exists secureboot && esbc_halt;" + #endif ++#undef CONFIG_BOOTCOMMAND ++#define CONFIG_BOOTCOMMAND "run lede_boot" ++ ++#undef CONFIG_BOOTDELAY ++#define CONFIG_BOOTDELAY 3 ++ + + #include + +-- +2.7.4 + diff --git a/package/boot/uboot-layerscape/patches/0004-armv8-ls1088ardb-add-LEDE-boot-support-in-environmen.patch b/package/boot/uboot-layerscape/patches/0004-armv8-ls1088ardb-add-LEDE-boot-support-in-environmen.patch new file mode 100644 index 00000000000000..eaf0da28337224 --- /dev/null +++ b/package/boot/uboot-layerscape/patches/0004-armv8-ls1088ardb-add-LEDE-boot-support-in-environmen.patch @@ -0,0 +1,58 @@ +From 479bf0c0bec2e99442214facf0f414c2c737ac7b Mon Sep 17 00:00:00 2001 +From: Yangbo Lu +Date: Mon, 16 Oct 2017 11:57:36 +0800 +Subject: [PATCH] armv8: ls1088ardb: add LEDE boot support in environment + +Signed-off-by: Yangbo Lu +--- + include/configs/ls1088ardb.h | 27 ++++++++++++++++++++++++++- + 1 file changed, 26 insertions(+), 1 deletion(-) + +diff --git a/include/configs/ls1088ardb.h b/include/configs/ls1088ardb.h +index 7bd152d..4cefa40 100644 +--- a/include/configs/ls1088ardb.h ++++ b/include/configs/ls1088ardb.h +@@ -404,7 +404,20 @@ + "env exists secureboot && mmc read $kernelheader_addr_r " \ + "$kernelhdr_addr_sd $kernelhdr_size_sd " \ + " && esbc_validate ${kernelheader_addr_r};" \ +- "bootm $load_addr#$BOARD\0" ++ "bootm $load_addr#$BOARD\0" \ ++ "lede_setenv=setenv loadaddr 82000000 && " \ ++ "setenv fdtaddr 8f000000 && " \ ++ "setenv bootargs root=/dev/mtdblock10 " \ ++ "rootfstype=ext4 noinitrd " \ ++ "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \ ++ "mtdparts=20c0000.quadspi:1M(rcw),2M(u-boot),1M(u-boot-env)," \ ++ "6M(reserved-1),3M(mc),1M(dpl),1M(dpc),1M(dtb)," \ ++ "16M(kernel),30M(ext4rfs),2M(user)\0" \ ++ "lede_run=sf probe 0:0 && " \ ++ "sf read $fdtaddr f00000 100000 && " \ ++ "sf read $loadaddr 1000000 1000000 && " \ ++ "bootm $loadaddr - $fdtaddr\0" \ ++ "lede_boot=run lede_setenv;run lede_run\0" + + #undef CONFIG_BOOTCOMMAND + #if defined(CONFIG_QSPI_BOOT) +@@ -429,6 +442,18 @@ + "run distro_bootcmd;run sd_bootcmd;" \ + "env exists secureboot && esbc_halt;" + #endif ++ ++#undef CONFIG_BOOTCOMMAND ++#define CONFIG_BOOTCOMMAND \ ++ "sf probe 0:0;sf read 0x80000000 0xA00000 0x300000;" \ ++ "sf read 0x80300000 0xE00000 0x100000;" \ ++ "fsl_mc start mc 0x80000000 0x80300000;" \ ++ "sf read 0x80400000 0xd00000 0x100000;" \ ++ "fsl_mc apply dpl 0x80400000;" \ ++ "run lede_boot;" ++#undef CONFIG_BOOTDELAY ++#define CONFIG_BOOTDELAY 3 ++ + /* MAC/PHY configuration */ + #ifdef CONFIG_FSL_MC_ENET + #define CONFIG_PHYLIB_10G +-- +2.7.4 + diff --git a/package/boot/uboot-layerscape/patches/0005-armv8-ls2088ardb-add-LEDE-boot-support-in-environmen.patch b/package/boot/uboot-layerscape/patches/0005-armv8-ls2088ardb-add-LEDE-boot-support-in-environmen.patch new file mode 100644 index 00000000000000..6da256ab068e50 --- /dev/null +++ b/package/boot/uboot-layerscape/patches/0005-armv8-ls2088ardb-add-LEDE-boot-support-in-environmen.patch @@ -0,0 +1,54 @@ +From 20f270670d1d5e14f3fd128f359535300a955ac8 Mon Sep 17 00:00:00 2001 +From: Yangbo Lu +Date: Mon, 16 Oct 2017 12:37:05 +0800 +Subject: [PATCH] armv8: ls2088ardb: add LEDE boot support in environment + +Signed-off-by: Yangbo Lu +--- + include/configs/ls2080ardb.h | 23 ++++++++++++++++++++++- + 1 file changed, 22 insertions(+), 1 deletion(-) + +diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h +index 8a34990..8ae3944 100644 +--- a/include/configs/ls2080ardb.h ++++ b/include/configs/ls2080ardb.h +@@ -432,7 +432,19 @@ unsigned long get_board_sys_clk(void); + "env exists secureboot && mmc read $kernelheader_addr_r " \ + "$kernelhdr_addr_sd $kernelhdr_size_sd " \ + " && esbc_validate ${kernelheader_addr_r};" \ +- "bootm $load_addr#$board\0" ++ "bootm $load_addr#$board\0" \ ++ "lede_setenv=setenv loadaddr 82000000 && " \ ++ "setenv fdtaddr 8f000000 && " \ ++ "setenv bootargs root=/dev/mtdblock9 " \ ++ "rootfstype=squashfs,jffs2 noinitrd " \ ++ "earlycon=uart8250,mmio,0x21c0500 console=ttyS1,115200 " \ ++ "mtdparts=580000000.nor:1M(rcw),2M(u-boot),1M(u-boot-env)," \ ++ "6M(reserved-1),3M(mc),1M(dpl),1M(dpc),1M(dtb)," \ ++ "16M(kernel),32M(rootfs),64M(otherbank)\0" \ ++ "lede_run=cp.b 580f00000 $fdtaddr 100000 && " \ ++ "cp.b 581000000 $loadaddr 1000000 && " \ ++ "bootm $loadaddr - $fdtaddr\0" \ ++ "lede_boot=run lede_setenv;run lede_run\0" + + #undef CONFIG_BOOTCOMMAND + #ifdef CONFIG_QSPI_BOOT +@@ -463,6 +475,15 @@ unsigned long get_board_sys_clk(void); + "env exists secureboot && esbc_halt;" + #endif + ++#undef CONFIG_BOOTCOMMAND ++#define CONFIG_BOOTCOMMAND \ ++ "fsl_mc start mc 0x580a00000 0x580e00000;" \ ++ "fsl_mc apply dpl 0x580d00000;" \ ++ "run lede_boot;" ++ ++#undef CONFIG_BOOTDELAY ++#define CONFIG_BOOTDELAY 3 ++ + #undef CONFIG_BOOTARGS + #define CONFIG_BOOTARGS "console=ttyS1,115200 root=/dev/ram0 " \ + "earlycon=uart8250,mmio,0x21c0600 " \ +-- +2.7.4 + diff --git a/package/boot/uboot-layerscape/patches/0006-armv8-ls1012afrdm-add-LEDE-boot-support-in-environme.patch b/package/boot/uboot-layerscape/patches/0006-armv8-ls1012afrdm-add-LEDE-boot-support-in-environme.patch new file mode 100644 index 00000000000000..45010a21083426 --- /dev/null +++ b/package/boot/uboot-layerscape/patches/0006-armv8-ls1012afrdm-add-LEDE-boot-support-in-environme.patch @@ -0,0 +1,49 @@ +From a5e454a3bb33a456655f08592606e4df34e40110 Mon Sep 17 00:00:00 2001 +From: Yangbo Lu +Date: Tue, 24 Oct 2017 17:48:08 +0800 +Subject: [PATCH] armv8: ls1012afrdm: add LEDE boot support in environment + +Signed-off-by: Yangbo Lu +--- + include/configs/ls1012afrdm.h | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/include/configs/ls1012afrdm.h b/include/configs/ls1012afrdm.h +index a3f8824d27..36dff19bdd 100644 +--- a/include/configs/ls1012afrdm.h ++++ b/include/configs/ls1012afrdm.h +@@ -73,12 +73,31 @@ + "qspi_bootcmd=echo Trying load from qspi..;" \ + "sf probe && sf read $load_addr " \ + "$kernel_addr $kernel_size && bootm $load_addr#$board\0" \ ++ "lede_setenv=setenv loadaddr 82000000 && " \ ++ "setenv fdtaddr 8f000000 && " \ ++ "setenv bootargs root=/dev/mtdblock8 " \ ++ "rootfstype=ext4 noinitrd " \ ++ "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \ ++ "mtdparts=1550000.quadspi:1M(rcw),2M(u-boot),1M(u-boot-env)," \ ++ "5M(reserved-1),256k(fman),5888k(reserved-2),1M(dtb)," \ ++ "16M(kernel),30M(ext4rfs),2M(user)\0" \ ++ "lede_run=pfe stop && sf probe 0:0 && " \ ++ "sf read $fdtaddr f00000 100000 && " \ ++ "sf read $loadaddr 1000000 1000000 && " \ ++ "bootm $loadaddr - $fdtaddr\0" \ ++ "lede_boot=run lede_setenv;run lede_run\0" + + #undef CONFIG_BOOTCOMMAND + #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) + #define CONFIG_BOOTCOMMAND "run distro_bootcmd;run qspi_bootcmd" + #endif + ++#undef CONFIG_BOOTCOMMAND ++#define CONFIG_BOOTCOMMAND "run lede_boot" ++ ++#undef CONFIG_BOOTDELAY ++#define CONFIG_BOOTDELAY 3 ++ + /* + * USB + */ +-- +2.14.1 + diff --git a/package/boot/uboot-mvebu/Makefile b/package/boot/uboot-mvebu/Makefile index 2c280faa21019f..b29039cd829aa0 100644 --- a/package/boot/uboot-mvebu/Makefile +++ b/package/boot/uboot-mvebu/Makefile @@ -16,6 +16,8 @@ PKG_HASH:=f54baf3f9325bf444c7905f3a5b6f83680edb1e6e1a4d5f8a5ad80abe885113f include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk +UBOOT_MAKE_FLAGS:= + define U-Boot/Default BUILD_TARGET:=mvebu HIDDEN:=1 diff --git a/package/boot/uboot-mvebu/patches/0004-clearfog-enable-setexpr-command-by-default.patch b/package/boot/uboot-mvebu/patches/0004-clearfog-enable-setexpr-command-by-default.patch index 9a74c52c6300b3..ca734660ef6f61 100644 --- a/package/boot/uboot-mvebu/patches/0004-clearfog-enable-setexpr-command-by-default.patch +++ b/package/boot/uboot-mvebu/patches/0004-clearfog-enable-setexpr-command-by-default.patch @@ -11,18 +11,14 @@ Signed-off-by: Josua Mayer configs/clearfog_defconfig | 1 + 1 file changed, 1 insertion(+) -diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig -index 41e94e6daf..f3572971be 100644 --- a/configs/clearfog_defconfig +++ b/configs/clearfog_defconfig -@@ -34,6 +34,7 @@ CONFIG_CMD_EXT2=y - CONFIG_CMD_EXT4=y - CONFIG_CMD_FAT=y - CONFIG_CMD_FS_GENERIC=y +@@ -23,7 +23,7 @@ CONFIG_CMD_SF=y + CONFIG_CMD_SPI=y + CONFIG_CMD_I2C=y + CONFIG_CMD_USB=y +-# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_SETEXPR=y - CONFIG_EFI_PARTITION=y - # CONFIG_PARTITION_UUIDS is not set - # CONFIG_SPL_PARTITION_UUIDS is not set --- -2.12.2 - + CONFIG_CMD_TFTPPUT=y + CONFIG_CMD_DHCP=y + CONFIG_CMD_MII=y diff --git a/package/boot/uboot-mvebu/patches/0011-rsa-Fix-build-with-OpenSSL-1.1.x.patch b/package/boot/uboot-mvebu/patches/0011-rsa-Fix-build-with-OpenSSL-1.1.x.patch new file mode 100644 index 00000000000000..fbbfe462b74c14 --- /dev/null +++ b/package/boot/uboot-mvebu/patches/0011-rsa-Fix-build-with-OpenSSL-1.1.x.patch @@ -0,0 +1,153 @@ +From 59be82ef7e7ec4be6e1597d8aef65dd3d8c3a0d9 Mon Sep 17 00:00:00 2001 +From: Jelle van der Waa +Date: Mon, 8 May 2017 21:31:19 +0200 +Subject: [PATCH 1/2] rsa: Fix build with OpenSSL 1.1.x + +The rsa_st struct has been made opaque in 1.1.x, add forward compatible +code to access the n, e, d members of rsa_struct. + +EVP_MD_CTX_cleanup has been removed in 1.1.x and EVP_MD_CTX_reset should be +called to reinitialise an already created structure. +--- + lib/rsa/rsa-sign.c | 44 ++++++++++++++++++++++++++++++++++++++------ + 1 file changed, 38 insertions(+), 6 deletions(-) + +--- a/lib/rsa/rsa-sign.c ++++ b/lib/rsa/rsa-sign.c +@@ -9,6 +9,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -20,6 +21,19 @@ + #define HAVE_ERR_REMOVE_THREAD_STATE + #endif + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++static void RSA_get0_key(const RSA *r, ++ const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) ++{ ++ if (n != NULL) ++ *n = r->n; ++ if (e != NULL) ++ *e = r->e; ++ if (d != NULL) ++ *d = r->d; ++} ++#endif ++ + static int rsa_err(const char *msg) + { + unsigned long sslErr = ERR_get_error(); +@@ -286,16 +300,22 @@ static int rsa_init(void) + { + int ret; + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + ret = SSL_library_init(); ++#else ++ ret = OPENSSL_init_ssl(0, NULL); ++#endif + if (!ret) { + fprintf(stderr, "Failure to init SSL library\n"); + return -1; + } ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + SSL_load_error_strings(); + + OpenSSL_add_all_algorithms(); + OpenSSL_add_all_digests(); + OpenSSL_add_all_ciphers(); ++#endif + + return 0; + } +@@ -335,12 +355,15 @@ err_set_rsa: + err_engine_init: + ENGINE_free(e); + err_engine_by_id: ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + ENGINE_cleanup(); ++#endif + return ret; + } + + static void rsa_remove(void) + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + CRYPTO_cleanup_all_ex_data(); + ERR_free_strings(); + #ifdef HAVE_ERR_REMOVE_THREAD_STATE +@@ -349,6 +372,7 @@ static void rsa_remove(void) + ERR_remove_state(0); + #endif + EVP_cleanup(); ++#endif + } + + static void rsa_engine_remove(ENGINE *e) +@@ -409,7 +433,11 @@ static int rsa_sign_with_key(RSA *rsa, s + ret = rsa_err("Could not obtain signature"); + goto err_sign; + } +- EVP_MD_CTX_cleanup(context); ++ #if OPENSSL_VERSION_NUMBER < 0x10100000L ++ EVP_MD_CTX_cleanup(context); ++ #else ++ EVP_MD_CTX_reset(context); ++ #endif + EVP_MD_CTX_destroy(context); + EVP_PKEY_free(key); + +@@ -479,6 +507,7 @@ static int rsa_get_exponent(RSA *key, ui + { + int ret; + BIGNUM *bn_te; ++ const BIGNUM *key_e; + uint64_t te; + + ret = -EINVAL; +@@ -487,17 +516,18 @@ static int rsa_get_exponent(RSA *key, ui + if (!e) + goto cleanup; + +- if (BN_num_bits(key->e) > 64) ++ RSA_get0_key(key, NULL, &key_e, NULL); ++ if (BN_num_bits(key_e) > 64) + goto cleanup; + +- *e = BN_get_word(key->e); ++ *e = BN_get_word(key_e); + +- if (BN_num_bits(key->e) < 33) { ++ if (BN_num_bits(key_e) < 33) { + ret = 0; + goto cleanup; + } + +- bn_te = BN_dup(key->e); ++ bn_te = BN_dup(key_e); + if (!bn_te) + goto cleanup; + +@@ -527,6 +557,7 @@ int rsa_get_params(RSA *key, uint64_t *e + { + BIGNUM *big1, *big2, *big32, *big2_32; + BIGNUM *n, *r, *r_squared, *tmp; ++ const BIGNUM *key_n; + BN_CTX *bn_ctx = BN_CTX_new(); + int ret = 0; + +@@ -548,7 +579,8 @@ int rsa_get_params(RSA *key, uint64_t *e + if (0 != rsa_get_exponent(key, exponent)) + ret = -1; + +- if (!BN_copy(n, key->n) || !BN_set_word(big1, 1L) || ++ RSA_get0_key(key, &key_n, NULL, NULL); ++ if (!BN_copy(n, key_n) || !BN_set_word(big1, 1L) || + !BN_set_word(big2, 2L) || !BN_set_word(big32, 32L)) + ret = -1; + diff --git a/package/boot/uboot-mvebu/patches/0012-tools-kwbimage-fix-build-with-OpenSSL-1.1.x.patch b/package/boot/uboot-mvebu/patches/0012-tools-kwbimage-fix-build-with-OpenSSL-1.1.x.patch new file mode 100644 index 00000000000000..882969905c3f9e --- /dev/null +++ b/package/boot/uboot-mvebu/patches/0012-tools-kwbimage-fix-build-with-OpenSSL-1.1.x.patch @@ -0,0 +1,96 @@ +From 65030804dc57f3488e4ffe21e72fc65cd245cb98 Mon Sep 17 00:00:00 2001 +From: Jelle van der Waa +Date: Mon, 8 May 2017 21:31:20 +0200 +Subject: [PATCH 2/2] tools: kwbimage fix build with OpenSSL 1.1.x + +The rsa_st struct has been made opaque in 1.1.x, add forward compatible +code to access the n, e, d members of rsa_struct. + +EVP_MD_CTX_cleanup has been removed in 1.1.x and EVP_MD_CTX_reset should be +called to reinitialise an already created structure. + +Signed-off-by: Jelle van der Waa +--- + tools/kwbimage.c | 36 ++++++++++++++++++++++++++++++------ + 1 file changed, 30 insertions(+), 6 deletions(-) + +--- a/tools/kwbimage.c ++++ b/tools/kwbimage.c +@@ -18,10 +18,30 @@ + #include "kwbimage.h" + + #ifdef CONFIG_KWB_SECURE ++#include + #include + #include + #include + #include ++ ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++static void RSA_get0_key(const RSA *r, ++ const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) ++{ ++ if (n != NULL) ++ *n = r->n; ++ if (e != NULL) ++ *e = r->e; ++ if (d != NULL) ++ *d = r->d; ++} ++ ++#else ++void EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx) ++{ ++ EVP_MD_CTX_reset(ctx); ++} ++#endif + #endif + + static struct image_cfg_element *image_cfg; +@@ -470,12 +490,16 @@ static int kwb_export_pubkey(RSA *key, s + char *keyname) + { + int size_exp, size_mod, size_seq; ++ const BIGNUM *key_e, *key_n; + uint8_t *cur; + char *errmsg = "Failed to encode %s\n"; + +- if (!key || !key->e || !key->n || !dst) { ++ RSA_get0_key(key, NULL, &key_e, NULL); ++ RSA_get0_key(key, &key_n, NULL, NULL); ++ ++ if (!key || !key_e || !key_n || !dst) { + fprintf(stderr, "export pk failed: (%p, %p, %p, %p)", +- key, key->e, key->n, dst); ++ key, key_e, key_n, dst); + fprintf(stderr, errmsg, keyname); + return -EINVAL; + } +@@ -490,8 +514,8 @@ static int kwb_export_pubkey(RSA *key, s + * do the encoding manually. + */ + +- size_exp = BN_num_bytes(key->e); +- size_mod = BN_num_bytes(key->n); ++ size_exp = BN_num_bytes(key_e); ++ size_mod = BN_num_bytes(key_n); + size_seq = 4 + size_mod + 4 + size_exp; + + if (size_mod > 256) { +@@ -520,14 +544,14 @@ static int kwb_export_pubkey(RSA *key, s + *cur++ = 0x82; + *cur++ = (size_mod >> 8) & 0xFF; + *cur++ = size_mod & 0xFF; +- BN_bn2bin(key->n, cur); ++ BN_bn2bin(key_n, cur); + cur += size_mod; + /* Exponent */ + *cur++ = 0x02; /* INTEGER */ + *cur++ = 0x82; + *cur++ = (size_exp >> 8) & 0xFF; + *cur++ = size_exp & 0xFF; +- BN_bn2bin(key->e, cur); ++ BN_bn2bin(key_e, cur); + + if (hashf) { + struct hash_v1 pk_hash; diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile index bb58104d065039..056300e1899662 100644 --- a/package/boot/uboot-sunxi/Makefile +++ b/package/boot/uboot-sunxi/Makefile @@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2016.03 +PKG_VERSION:=2017.07 -PKG_HASH:=e49337262ecac44dbdeac140f2c6ebd1eba345e0162b0464172e7f05583ed7bb +PKG_HASH:=5374bfdc8acb9a38c025371b1ff20f45e7533668e84e685d0df5d9e7c0e4feff PKG_MAINTAINER:=Zoltan HERPAI @@ -26,93 +26,162 @@ define U-Boot/Default endef define U-Boot/A10-OLinuXino-Lime + BUILD_SUBTARGET:=cortexa8 NAME:=A10 OLinuXino LIME BUILD_DEVICES:=sun4i-a10-olinuxino-lime endef define U-Boot/A13-OLinuXino + BUILD_SUBTARGET:=cortexa8 NAME:=A13 OlinuXino BUILD_DEVICES:=sun5i-a13-olinuxino endef define U-Boot/A20-OLinuXino-Lime + BUILD_SUBTARGET:=cortexa7 NAME:=A20 OLinuXino LIME BUILD_DEVICES:=sun7i-a20-olinuxino-lime endef +define U-Boot/A20-OLinuXino-Lime2 + BUILD_SUBTARGET:=cortexa7 + NAME:=A20 OLinuXino LIME2 + BUILD_DEVICES:=sun7i-a20-olinuxino-lime2 +endef + +define U-Boot/A20-OLinuXino-Lime2-eMMC + BUILD_SUBTARGET:=cortexa7 + NAME:=A20 OLinuXino LIME2 eMMC + BUILD_DEVICES:=sun7i-a20-olinuxino-lime2-emmc +endef + define U-Boot/A20-OLinuXino_MICRO + BUILD_SUBTARGET:=cortexa7 NAME:=A20 OLinuXino MICRO BUILD_DEVICES:=sun7i-a20-olinuxino-micro endef define U-Boot/Bananapi + BUILD_SUBTARGET:=cortexa7 NAME:=Bananapi BUILD_DEVICES:=sun7i-a20-bananapi endef define U-Boot/Bananapro + BUILD_SUBTARGET:=cortexa7 NAME:=Bananapro BUILD_DEVICES:=sun7i-a20-bananapro endef define U-Boot/Cubieboard + BUILD_SUBTARGET:=cortexa8 NAME:=Cubieboard BUILD_DEVICES:=sun4i-a10-cubieboard endef define U-Boot/Cubieboard2 + BUILD_SUBTARGET:=cortexa7 NAME:=Cubieboard2 BUILD_DEVICES:=sun7i-a20-cubieboard2 endef define U-Boot/Cubietruck + BUILD_SUBTARGET:=cortexa7 NAME:=Cubietruck BUILD_DEVICES:=sun7i-a20-cubietruck endef define U-Boot/Hummingbird_A31 + BUILD_SUBTARGET:=cortexa7 NAME:=Hummingbird A31 board endef +define U-Boot/Marsboard_A10 + BUILD_SUBTARGET:=cortexa8 + NAME:=Marsboard + BUILD_DEVICES:=sun4i-a10-marsboard +endef + define U-Boot/Mele_M9 + BUILD_SUBTARGET:=cortexa7 NAME:=Mele M9 (A31) BUILD_DEVICES:=sun6i-a31-m9 endef define U-Boot/OLIMEX_A13_SOM + BUILD_SUBTARGET:=cortexa8 NAME:=Olimex A13 SOM BUILD_DEVICES:=sun5i-a13-olimex-som endef define U-Boot/Linksprite_pcDuino + BUILD_SUBTARGET:=cortexa8 NAME:=Linksprite pcDuino BUILD_DEVICES:=sun4i-a10-pcduino endef define U-Boot/Linksprite_pcDuino3 + BUILD_SUBTARGET:=cortexa7 NAME:=Linksprite pcDuino3 BUILD_DEVICES:=sun7i-a20-pcduino3 endef define U-Boot/Lamobo_R1 + BUILD_SUBTARGET:=cortexa7 NAME:=Lamobo R1 BUILD_DEVICES:=sun7i-a20-lamobo-r1 endef +define U-Boot/nanopi_m1_plus + BUILD_SUBTARGET:=cortexa7 + NAME:=NanoPi M1 Plus (H3) + BUILD_DEVICES:=sun8i-h3-nanopi-m1-plus +endef + +define U-Boot/nanopi_neo + BUILD_SUBTARGET:=cortexa7 + NAME:=U-Boot for NanoPi NEO (H3) + BUILD_DEVICES:=sun8i-h3-nanopi-neo +endef + +define U-Boot/orangepi_r1 + BUILD_SUBTARGET:=cortexa7 + NAME:=Orange Pi R1 (H2+) + BUILD_DEVICES:=sun8i-h2-plus-orangepi-r1 +endef + define U-Boot/orangepi_plus + BUILD_SUBTARGET:=cortexa7 NAME:=Orange Pi Plus (H3) BUILD_DEVICES:=sun8i-h3-orangepi-plus endef +define U-Boot/orangepi_2 + BUILD_SUBTARGET:=cortexa7 + NAME:=Orange Pi 2 (H3) + BUILD_DEVICES:=sun8i-h3-orangepi-2 +endef + define U-Boot/pangolin + BUILD_SUBTARGET:=cortexa7 NAME:=Theobroma A31-yQ7 devboard UENV:=pangolin endef +define U-Boot/pine64_plus + BUILD_SUBTARGET:=cortexa53 + NAME:=Pine64 Plus A64 + BUILD_DEVICES:=sun50i-a64-pine64-plus + DEPENDS:=+PACKAGE_u-boot-pine64_plus:arm-trusted-firmware-sunxi + UENV:=a64 +endef + UBOOT_TARGETS := \ A10-OLinuXino-Lime \ A13-OLinuXino \ A20-OLinuXino-Lime \ + A20-OLinuXino-Lime2 \ + A20-OLinuXino-Lime2-eMMC \ A20-OLinuXino_MICRO \ Bananapi \ Bananapro \ @@ -120,19 +189,32 @@ UBOOT_TARGETS := \ Cubieboard2 \ Cubietruck \ Hummingbird_A31 \ + Marsboard_A10 \ Mele_M9 \ OLIMEX_A13_SOM \ Linksprite_pcDuino \ Linksprite_pcDuino3 \ Lamobo_R1 \ + nanopi_m1_plus \ + nanopi_neo \ + orangepi_r1 \ orangepi_plus \ - pangolin + orangepi_2 \ + pangolin \ + pine64_plus UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes +UBOOT_MAKE_FLAGS += \ + BL31=$(STAGING_DIR_IMAGE)/bl31.bin + define Build/InstallDev $(INSTALL_DIR) $(STAGING_DIR_IMAGE) +ifeq ($(SUBTARGET),cortexa53) + cat $(PKG_BUILD_DIR)/spl/sunxi-spl.bin $(PKG_BUILD_DIR)/u-boot.itb > $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-u-boot-with-spl.bin +else $(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-u-boot-with-spl.bin +endif mkimage -C none -A arm -T script -d uEnv-$(UENV).txt \ $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-boot.scr endef diff --git a/package/boot/uboot-sunxi/patches/002-add-olimex-a13-som.patch b/package/boot/uboot-sunxi/patches/002-add-olimex-a13-som.patch index f29ad12b751620..c19f3781d18353 100644 --- a/package/boot/uboot-sunxi/patches/002-add-olimex-a13-som.patch +++ b/package/boot/uboot-sunxi/patches/002-add-olimex-a13-som.patch @@ -1,8 +1,7 @@ --- /dev/null +++ b/configs/OLIMEX_A13_SOM_defconfig -@@ -0,0 +1,18 @@ +@@ -0,0 +1,17 @@ +CONFIG_SPL=y -+CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2" +CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino" +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y diff --git a/package/boot/uboot-sunxi/patches/003-add-theobroma-a31-pangolin.patch b/package/boot/uboot-sunxi/patches/003-add-theobroma-a31-pangolin.patch index e5a66d7ebe00e5..2fce04828c4745 100644 --- a/package/boot/uboot-sunxi/patches/003-add-theobroma-a31-pangolin.patch +++ b/package/boot/uboot-sunxi/patches/003-add-theobroma-a31-pangolin.patch @@ -1,16 +1,16 @@ --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile -@@ -152,6 +152,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \ +@@ -254,6 +254,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \ sun6i-a31-m9.dtb \ sun6i-a31-mele-a1000g-quad.dtb \ sun6i-a31-mixtile-loftq.dtb \ + sun6i-a31-pangolin.dtb \ + sun6i-a31s-colorfly-e708-q1.dtb \ sun6i-a31s-cs908.dtb \ - sun6i-a31s-primo81.dtb \ - sun6i-a31s-sinovoip-bpi-m2.dtb + sun6i-a31s-inet-q972.dtb \ --- a/arch/arm/dts/sun6i-a31.dtsi +++ b/arch/arm/dts/sun6i-a31.dtsi -@@ -643,6 +643,13 @@ +@@ -679,6 +679,13 @@ allwinner,pull = ; }; @@ -358,17 +358,9 @@ +CONFIG_DM_SPI=y +CONFIG_DM_SPI_FLASH=y +CONFIG_SUNXI_SPI=y ---- a/board/sunxi/Kconfig -+++ b/board/sunxi/Kconfig -@@ -15,7 +15,6 @@ config SUNXI_GEN_SUN6I - separate ahb reset control registers, custom pmic bus, new style - watchdog, etc. - -- - choice - prompt "Sunxi SoC Variant" - optional -@@ -533,6 +532,14 @@ config VIDEO_LCD_PANEL_I2C_SCL +--- a/arch/arm/mach-sunxi/Kconfig ++++ b/arch/arm/mach-sunxi/Kconfig +@@ -746,6 +746,14 @@ config VIDEO_LCD_PANEL_I2C_SCL Set the SCL pin for the LCD i2c interface. This takes a string in the format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H. diff --git a/package/boot/uboot-sunxi/patches/010-dt-sync-files-with-kernel.patch b/package/boot/uboot-sunxi/patches/010-dt-sync-files-with-kernel.patch deleted file mode 100644 index d8fa52c7e523fd..00000000000000 --- a/package/boot/uboot-sunxi/patches/010-dt-sync-files-with-kernel.patch +++ /dev/null @@ -1,1403 +0,0 @@ -From 4bb656e9dde2019cb42ac4c27b3a114a801ad127 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Wed, 16 Mar 2016 13:41:23 +0100 -Subject: [PATCH] include/dt-bindings: Sync some files with the kernel - -This commit syncs the dt-bindings/input/* headers with the kernel (v4.5) -and adds dt-bindings/clock/sun4i-a10-pll2.h, both are necessary for newer -sunxi dts files to build. - -Signed-off-by: Hans de Goede -Reviewed-by: Tom Rini -Acked-by: Ian Campbell ---- - include/dt-bindings/clock/sun4i-a10-pll2.h | 53 ++ - include/dt-bindings/input/input.h | 510 +--------------- - include/dt-bindings/input/linux-event-codes.h | 805 ++++++++++++++++++++++++++ - 3 files changed, 859 insertions(+), 509 deletions(-) - create mode 100644 include/dt-bindings/clock/sun4i-a10-pll2.h - create mode 100644 include/dt-bindings/input/linux-event-codes.h - ---- /dev/null -+++ b/include/dt-bindings/clock/sun4i-a10-pll2.h -@@ -0,0 +1,53 @@ -+/* -+ * Copyright 2015 Maxime Ripard -+ * -+ * Maxime Ripard -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) This file 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; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#ifndef __DT_BINDINGS_CLOCK_SUN4I_A10_PLL2_H_ -+#define __DT_BINDINGS_CLOCK_SUN4I_A10_PLL2_H_ -+ -+#define SUN4I_A10_PLL2_1X 0 -+#define SUN4I_A10_PLL2_2X 1 -+#define SUN4I_A10_PLL2_4X 2 -+#define SUN4I_A10_PLL2_8X 3 -+ -+#endif /* __DT_BINDINGS_CLOCK_SUN4I_A10_PLL2_H_ */ ---- a/include/dt-bindings/input/input.h -+++ b/include/dt-bindings/input/input.h -@@ -9,515 +9,7 @@ - #ifndef _DT_BINDINGS_INPUT_INPUT_H - #define _DT_BINDINGS_INPUT_INPUT_H - --#define KEY_RESERVED 0 --#define KEY_ESC 1 --#define KEY_1 2 --#define KEY_2 3 --#define KEY_3 4 --#define KEY_4 5 --#define KEY_5 6 --#define KEY_6 7 --#define KEY_7 8 --#define KEY_8 9 --#define KEY_9 10 --#define KEY_0 11 --#define KEY_MINUS 12 --#define KEY_EQUAL 13 --#define KEY_BACKSPACE 14 --#define KEY_TAB 15 --#define KEY_Q 16 --#define KEY_W 17 --#define KEY_E 18 --#define KEY_R 19 --#define KEY_T 20 --#define KEY_Y 21 --#define KEY_U 22 --#define KEY_I 23 --#define KEY_O 24 --#define KEY_P 25 --#define KEY_LEFTBRACE 26 --#define KEY_RIGHTBRACE 27 --#define KEY_ENTER 28 --#define KEY_LEFTCTRL 29 --#define KEY_A 30 --#define KEY_S 31 --#define KEY_D 32 --#define KEY_F 33 --#define KEY_G 34 --#define KEY_H 35 --#define KEY_J 36 --#define KEY_K 37 --#define KEY_L 38 --#define KEY_SEMICOLON 39 --#define KEY_APOSTROPHE 40 --#define KEY_GRAVE 41 --#define KEY_LEFTSHIFT 42 --#define KEY_BACKSLASH 43 --#define KEY_Z 44 --#define KEY_X 45 --#define KEY_C 46 --#define KEY_V 47 --#define KEY_B 48 --#define KEY_N 49 --#define KEY_M 50 --#define KEY_COMMA 51 --#define KEY_DOT 52 --#define KEY_SLASH 53 --#define KEY_RIGHTSHIFT 54 --#define KEY_KPASTERISK 55 --#define KEY_LEFTALT 56 --#define KEY_SPACE 57 --#define KEY_CAPSLOCK 58 --#define KEY_F1 59 --#define KEY_F2 60 --#define KEY_F3 61 --#define KEY_F4 62 --#define KEY_F5 63 --#define KEY_F6 64 --#define KEY_F7 65 --#define KEY_F8 66 --#define KEY_F9 67 --#define KEY_F10 68 --#define KEY_NUMLOCK 69 --#define KEY_SCROLLLOCK 70 --#define KEY_KP7 71 --#define KEY_KP8 72 --#define KEY_KP9 73 --#define KEY_KPMINUS 74 --#define KEY_KP4 75 --#define KEY_KP5 76 --#define KEY_KP6 77 --#define KEY_KPPLUS 78 --#define KEY_KP1 79 --#define KEY_KP2 80 --#define KEY_KP3 81 --#define KEY_KP0 82 --#define KEY_KPDOT 83 -- --#define KEY_ZENKAKUHANKAKU 85 --#define KEY_102ND 86 --#define KEY_F11 87 --#define KEY_F12 88 --#define KEY_RO 89 --#define KEY_KATAKANA 90 --#define KEY_HIRAGANA 91 --#define KEY_HENKAN 92 --#define KEY_KATAKANAHIRAGANA 93 --#define KEY_MUHENKAN 94 --#define KEY_KPJPCOMMA 95 --#define KEY_KPENTER 96 --#define KEY_RIGHTCTRL 97 --#define KEY_KPSLASH 98 --#define KEY_SYSRQ 99 --#define KEY_RIGHTALT 100 --#define KEY_LINEFEED 101 --#define KEY_HOME 102 --#define KEY_UP 103 --#define KEY_PAGEUP 104 --#define KEY_LEFT 105 --#define KEY_RIGHT 106 --#define KEY_END 107 --#define KEY_DOWN 108 --#define KEY_PAGEDOWN 109 --#define KEY_INSERT 110 --#define KEY_DELETE 111 --#define KEY_MACRO 112 --#define KEY_MUTE 113 --#define KEY_VOLUMEDOWN 114 --#define KEY_VOLUMEUP 115 --#define KEY_POWER 116 /* SC System Power Down */ --#define KEY_KPEQUAL 117 --#define KEY_KPPLUSMINUS 118 --#define KEY_PAUSE 119 --#define KEY_SCALE 120 /* AL Compiz Scale (Expose) */ -- --#define KEY_KPCOMMA 121 --#define KEY_HANGEUL 122 --#define KEY_HANGUEL KEY_HANGEUL --#define KEY_HANJA 123 --#define KEY_YEN 124 --#define KEY_LEFTMETA 125 --#define KEY_RIGHTMETA 126 --#define KEY_COMPOSE 127 -- --#define KEY_STOP 128 /* AC Stop */ --#define KEY_AGAIN 129 --#define KEY_PROPS 130 /* AC Properties */ --#define KEY_UNDO 131 /* AC Undo */ --#define KEY_FRONT 132 --#define KEY_COPY 133 /* AC Copy */ --#define KEY_OPEN 134 /* AC Open */ --#define KEY_PASTE 135 /* AC Paste */ --#define KEY_FIND 136 /* AC Search */ --#define KEY_CUT 137 /* AC Cut */ --#define KEY_HELP 138 /* AL Integrated Help Center */ --#define KEY_MENU 139 /* Menu (show menu) */ --#define KEY_CALC 140 /* AL Calculator */ --#define KEY_SETUP 141 --#define KEY_SLEEP 142 /* SC System Sleep */ --#define KEY_WAKEUP 143 /* System Wake Up */ --#define KEY_FILE 144 /* AL Local Machine Browser */ --#define KEY_SENDFILE 145 --#define KEY_DELETEFILE 146 --#define KEY_XFER 147 --#define KEY_PROG1 148 --#define KEY_PROG2 149 --#define KEY_WWW 150 /* AL Internet Browser */ --#define KEY_MSDOS 151 --#define KEY_COFFEE 152 /* AL Terminal Lock/Screensaver */ --#define KEY_SCREENLOCK KEY_COFFEE --#define KEY_DIRECTION 153 --#define KEY_CYCLEWINDOWS 154 --#define KEY_MAIL 155 --#define KEY_BOOKMARKS 156 /* AC Bookmarks */ --#define KEY_COMPUTER 157 --#define KEY_BACK 158 /* AC Back */ --#define KEY_FORWARD 159 /* AC Forward */ --#define KEY_CLOSECD 160 --#define KEY_EJECTCD 161 --#define KEY_EJECTCLOSECD 162 --#define KEY_NEXTSONG 163 --#define KEY_PLAYPAUSE 164 --#define KEY_PREVIOUSSONG 165 --#define KEY_STOPCD 166 --#define KEY_RECORD 167 --#define KEY_REWIND 168 --#define KEY_PHONE 169 /* Media Select Telephone */ --#define KEY_ISO 170 --#define KEY_CONFIG 171 /* AL Consumer Control Configuration */ --#define KEY_HOMEPAGE 172 /* AC Home */ --#define KEY_REFRESH 173 /* AC Refresh */ --#define KEY_EXIT 174 /* AC Exit */ --#define KEY_MOVE 175 --#define KEY_EDIT 176 --#define KEY_SCROLLUP 177 --#define KEY_SCROLLDOWN 178 --#define KEY_KPLEFTPAREN 179 --#define KEY_KPRIGHTPAREN 180 --#define KEY_NEW 181 /* AC New */ --#define KEY_REDO 182 /* AC Redo/Repeat */ -- --#define KEY_F13 183 --#define KEY_F14 184 --#define KEY_F15 185 --#define KEY_F16 186 --#define KEY_F17 187 --#define KEY_F18 188 --#define KEY_F19 189 --#define KEY_F20 190 --#define KEY_F21 191 --#define KEY_F22 192 --#define KEY_F23 193 --#define KEY_F24 194 -- --#define KEY_PLAYCD 200 --#define KEY_PAUSECD 201 --#define KEY_PROG3 202 --#define KEY_PROG4 203 --#define KEY_DASHBOARD 204 /* AL Dashboard */ --#define KEY_SUSPEND 205 --#define KEY_CLOSE 206 /* AC Close */ --#define KEY_PLAY 207 --#define KEY_FASTFORWARD 208 --#define KEY_BASSBOOST 209 --#define KEY_PRINT 210 /* AC Print */ --#define KEY_HP 211 --#define KEY_CAMERA 212 --#define KEY_SOUND 213 --#define KEY_QUESTION 214 --#define KEY_EMAIL 215 --#define KEY_CHAT 216 --#define KEY_SEARCH 217 --#define KEY_CONNECT 218 --#define KEY_FINANCE 219 /* AL Checkbook/Finance */ --#define KEY_SPORT 220 --#define KEY_SHOP 221 --#define KEY_ALTERASE 222 --#define KEY_CANCEL 223 /* AC Cancel */ --#define KEY_BRIGHTNESSDOWN 224 --#define KEY_BRIGHTNESSUP 225 --#define KEY_MEDIA 226 -- --#define KEY_SWITCHVIDEOMODE 227 /* Cycle between available video -- outputs (Monitor/LCD/TV-out/etc) */ --#define KEY_KBDILLUMTOGGLE 228 --#define KEY_KBDILLUMDOWN 229 --#define KEY_KBDILLUMUP 230 -- --#define KEY_SEND 231 /* AC Send */ --#define KEY_REPLY 232 /* AC Reply */ --#define KEY_FORWARDMAIL 233 /* AC Forward Msg */ --#define KEY_SAVE 234 /* AC Save */ --#define KEY_DOCUMENTS 235 -- --#define KEY_BATTERY 236 -- --#define KEY_BLUETOOTH 237 --#define KEY_WLAN 238 --#define KEY_UWB 239 -- --#define KEY_UNKNOWN 240 -- --#define KEY_VIDEO_NEXT 241 /* drive next video source */ --#define KEY_VIDEO_PREV 242 /* drive previous video source */ --#define KEY_BRIGHTNESS_CYCLE 243 /* brightness up, after max is min */ --#define KEY_BRIGHTNESS_ZERO 244 /* brightness off, use ambient */ --#define KEY_DISPLAY_OFF 245 /* display device to off state */ -- --#define KEY_WIMAX 246 --#define KEY_RFKILL 247 /* Key that controls all radios */ -- --#define KEY_MICMUTE 248 /* Mute / unmute the microphone */ -- --/* Code 255 is reserved for special needs of AT keyboard driver */ -- --#define BTN_MISC 0x100 --#define BTN_0 0x100 --#define BTN_1 0x101 --#define BTN_2 0x102 --#define BTN_3 0x103 --#define BTN_4 0x104 --#define BTN_5 0x105 --#define BTN_6 0x106 --#define BTN_7 0x107 --#define BTN_8 0x108 --#define BTN_9 0x109 -- --#define BTN_MOUSE 0x110 --#define BTN_LEFT 0x110 --#define BTN_RIGHT 0x111 --#define BTN_MIDDLE 0x112 --#define BTN_SIDE 0x113 --#define BTN_EXTRA 0x114 --#define BTN_FORWARD 0x115 --#define BTN_BACK 0x116 --#define BTN_TASK 0x117 -- --#define BTN_JOYSTICK 0x120 --#define BTN_TRIGGER 0x120 --#define BTN_THUMB 0x121 --#define BTN_THUMB2 0x122 --#define BTN_TOP 0x123 --#define BTN_TOP2 0x124 --#define BTN_PINKIE 0x125 --#define BTN_BASE 0x126 --#define BTN_BASE2 0x127 --#define BTN_BASE3 0x128 --#define BTN_BASE4 0x129 --#define BTN_BASE5 0x12a --#define BTN_BASE6 0x12b --#define BTN_DEAD 0x12f -- --#define BTN_GAMEPAD 0x130 --#define BTN_SOUTH 0x130 --#define BTN_A BTN_SOUTH --#define BTN_EAST 0x131 --#define BTN_B BTN_EAST --#define BTN_C 0x132 --#define BTN_NORTH 0x133 --#define BTN_X BTN_NORTH --#define BTN_WEST 0x134 --#define BTN_Y BTN_WEST --#define BTN_Z 0x135 --#define BTN_TL 0x136 --#define BTN_TR 0x137 --#define BTN_TL2 0x138 --#define BTN_TR2 0x139 --#define BTN_SELECT 0x13a --#define BTN_START 0x13b --#define BTN_MODE 0x13c --#define BTN_THUMBL 0x13d --#define BTN_THUMBR 0x13e -- --#define BTN_DIGI 0x140 --#define BTN_TOOL_PEN 0x140 --#define BTN_TOOL_RUBBER 0x141 --#define BTN_TOOL_BRUSH 0x142 --#define BTN_TOOL_PENCIL 0x143 --#define BTN_TOOL_AIRBRUSH 0x144 --#define BTN_TOOL_FINGER 0x145 --#define BTN_TOOL_MOUSE 0x146 --#define BTN_TOOL_LENS 0x147 --#define BTN_TOOL_QUINTTAP 0x148 /* Five fingers on trackpad */ --#define BTN_TOUCH 0x14a --#define BTN_STYLUS 0x14b --#define BTN_STYLUS2 0x14c --#define BTN_TOOL_DOUBLETAP 0x14d --#define BTN_TOOL_TRIPLETAP 0x14e --#define BTN_TOOL_QUADTAP 0x14f /* Four fingers on trackpad */ -- --#define BTN_WHEEL 0x150 --#define BTN_GEAR_DOWN 0x150 --#define BTN_GEAR_UP 0x151 -- --#define KEY_OK 0x160 --#define KEY_SELECT 0x161 --#define KEY_GOTO 0x162 --#define KEY_CLEAR 0x163 --#define KEY_POWER2 0x164 --#define KEY_OPTION 0x165 --#define KEY_INFO 0x166 /* AL OEM Features/Tips/Tutorial */ --#define KEY_TIME 0x167 --#define KEY_VENDOR 0x168 --#define KEY_ARCHIVE 0x169 --#define KEY_PROGRAM 0x16a /* Media Select Program Guide */ --#define KEY_CHANNEL 0x16b --#define KEY_FAVORITES 0x16c --#define KEY_EPG 0x16d --#define KEY_PVR 0x16e /* Media Select Home */ --#define KEY_MHP 0x16f --#define KEY_LANGUAGE 0x170 --#define KEY_TITLE 0x171 --#define KEY_SUBTITLE 0x172 --#define KEY_ANGLE 0x173 --#define KEY_ZOOM 0x174 --#define KEY_MODE 0x175 --#define KEY_KEYBOARD 0x176 --#define KEY_SCREEN 0x177 --#define KEY_PC 0x178 /* Media Select Computer */ --#define KEY_TV 0x179 /* Media Select TV */ --#define KEY_TV2 0x17a /* Media Select Cable */ --#define KEY_VCR 0x17b /* Media Select VCR */ --#define KEY_VCR2 0x17c /* VCR Plus */ --#define KEY_SAT 0x17d /* Media Select Satellite */ --#define KEY_SAT2 0x17e --#define KEY_CD 0x17f /* Media Select CD */ --#define KEY_TAPE 0x180 /* Media Select Tape */ --#define KEY_RADIO 0x181 --#define KEY_TUNER 0x182 /* Media Select Tuner */ --#define KEY_PLAYER 0x183 --#define KEY_TEXT 0x184 --#define KEY_DVD 0x185 /* Media Select DVD */ --#define KEY_AUX 0x186 --#define KEY_MP3 0x187 --#define KEY_AUDIO 0x188 /* AL Audio Browser */ --#define KEY_VIDEO 0x189 /* AL Movie Browser */ --#define KEY_DIRECTORY 0x18a --#define KEY_LIST 0x18b --#define KEY_MEMO 0x18c /* Media Select Messages */ --#define KEY_CALENDAR 0x18d --#define KEY_RED 0x18e --#define KEY_GREEN 0x18f --#define KEY_YELLOW 0x190 --#define KEY_BLUE 0x191 --#define KEY_CHANNELUP 0x192 /* Channel Increment */ --#define KEY_CHANNELDOWN 0x193 /* Channel Decrement */ --#define KEY_FIRST 0x194 --#define KEY_LAST 0x195 /* Recall Last */ --#define KEY_AB 0x196 --#define KEY_NEXT 0x197 --#define KEY_RESTART 0x198 --#define KEY_SLOW 0x199 --#define KEY_SHUFFLE 0x19a --#define KEY_BREAK 0x19b --#define KEY_PREVIOUS 0x19c --#define KEY_DIGITS 0x19d --#define KEY_TEEN 0x19e --#define KEY_TWEN 0x19f --#define KEY_VIDEOPHONE 0x1a0 /* Media Select Video Phone */ --#define KEY_GAMES 0x1a1 /* Media Select Games */ --#define KEY_ZOOMIN 0x1a2 /* AC Zoom In */ --#define KEY_ZOOMOUT 0x1a3 /* AC Zoom Out */ --#define KEY_ZOOMRESET 0x1a4 /* AC Zoom */ --#define KEY_WORDPROCESSOR 0x1a5 /* AL Word Processor */ --#define KEY_EDITOR 0x1a6 /* AL Text Editor */ --#define KEY_SPREADSHEET 0x1a7 /* AL Spreadsheet */ --#define KEY_GRAPHICSEDITOR 0x1a8 /* AL Graphics Editor */ --#define KEY_PRESENTATION 0x1a9 /* AL Presentation App */ --#define KEY_DATABASE 0x1aa /* AL Database App */ --#define KEY_NEWS 0x1ab /* AL Newsreader */ --#define KEY_VOICEMAIL 0x1ac /* AL Voicemail */ --#define KEY_ADDRESSBOOK 0x1ad /* AL Contacts/Address Book */ --#define KEY_MESSENGER 0x1ae /* AL Instant Messaging */ --#define KEY_DISPLAYTOGGLE 0x1af /* Turn display (LCD) on and off */ --#define KEY_SPELLCHECK 0x1b0 /* AL Spell Check */ --#define KEY_LOGOFF 0x1b1 /* AL Logoff */ -- --#define KEY_DOLLAR 0x1b2 --#define KEY_EURO 0x1b3 -- --#define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ --#define KEY_FRAMEFORWARD 0x1b5 --#define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ --#define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ --#define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ --#define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ --#define KEY_IMAGES 0x1ba /* AL Image Browser */ -- --#define KEY_DEL_EOL 0x1c0 --#define KEY_DEL_EOS 0x1c1 --#define KEY_INS_LINE 0x1c2 --#define KEY_DEL_LINE 0x1c3 -- --#define KEY_FN 0x1d0 --#define KEY_FN_ESC 0x1d1 --#define KEY_FN_F1 0x1d2 --#define KEY_FN_F2 0x1d3 --#define KEY_FN_F3 0x1d4 --#define KEY_FN_F4 0x1d5 --#define KEY_FN_F5 0x1d6 --#define KEY_FN_F6 0x1d7 --#define KEY_FN_F7 0x1d8 --#define KEY_FN_F8 0x1d9 --#define KEY_FN_F9 0x1da --#define KEY_FN_F10 0x1db --#define KEY_FN_F11 0x1dc --#define KEY_FN_F12 0x1dd --#define KEY_FN_1 0x1de --#define KEY_FN_2 0x1df --#define KEY_FN_D 0x1e0 --#define KEY_FN_E 0x1e1 --#define KEY_FN_F 0x1e2 --#define KEY_FN_S 0x1e3 --#define KEY_FN_B 0x1e4 -- --#define KEY_BRL_DOT1 0x1f1 --#define KEY_BRL_DOT2 0x1f2 --#define KEY_BRL_DOT3 0x1f3 --#define KEY_BRL_DOT4 0x1f4 --#define KEY_BRL_DOT5 0x1f5 --#define KEY_BRL_DOT6 0x1f6 --#define KEY_BRL_DOT7 0x1f7 --#define KEY_BRL_DOT8 0x1f8 --#define KEY_BRL_DOT9 0x1f9 --#define KEY_BRL_DOT10 0x1fa -- --#define KEY_NUMERIC_0 0x200 /* used by phones, remote controls, */ --#define KEY_NUMERIC_1 0x201 /* and other keypads */ --#define KEY_NUMERIC_2 0x202 --#define KEY_NUMERIC_3 0x203 --#define KEY_NUMERIC_4 0x204 --#define KEY_NUMERIC_5 0x205 --#define KEY_NUMERIC_6 0x206 --#define KEY_NUMERIC_7 0x207 --#define KEY_NUMERIC_8 0x208 --#define KEY_NUMERIC_9 0x209 --#define KEY_NUMERIC_STAR 0x20a --#define KEY_NUMERIC_POUND 0x20b -- --#define KEY_CAMERA_FOCUS 0x210 --#define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ -- --#define KEY_TOUCHPAD_TOGGLE 0x212 /* Request switch touchpad on or off */ --#define KEY_TOUCHPAD_ON 0x213 --#define KEY_TOUCHPAD_OFF 0x214 -- --#define KEY_CAMERA_ZOOMIN 0x215 --#define KEY_CAMERA_ZOOMOUT 0x216 --#define KEY_CAMERA_UP 0x217 --#define KEY_CAMERA_DOWN 0x218 --#define KEY_CAMERA_LEFT 0x219 --#define KEY_CAMERA_RIGHT 0x21a -- --#define KEY_ATTENDANT_ON 0x21b --#define KEY_ATTENDANT_OFF 0x21c --#define KEY_ATTENDANT_TOGGLE 0x21d /* Attendant call on or off */ --#define KEY_LIGHTS_TOGGLE 0x21e /* Reading light on or off */ -- --#define BTN_DPAD_UP 0x220 --#define BTN_DPAD_DOWN 0x221 --#define BTN_DPAD_LEFT 0x222 --#define BTN_DPAD_RIGHT 0x223 -+#include "linux-event-codes.h" - - #define MATRIX_KEY(row, col, code) \ - ((((row) & 0xFF) << 24) | (((col) & 0xFF) << 16) | ((code) & 0xFFFF)) ---- /dev/null -+++ b/include/dt-bindings/input/linux-event-codes.h -@@ -0,0 +1,805 @@ -+/* -+ * Input event codes -+ * -+ * *** IMPORTANT *** -+ * This file is not only included from C-code but also from devicetree source -+ * files. As such this file MUST only contain comments and defines. -+ * -+ * Copyright (c) 1999-2002 Vojtech Pavlik -+ * Copyright (c) 2015 Hans de Goede -+ * -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License version 2 as published by -+ * the Free Software Foundation. -+ */ -+#ifndef _UAPI_INPUT_EVENT_CODES_H -+#define _UAPI_INPUT_EVENT_CODES_H -+ -+/* -+ * Device properties and quirks -+ */ -+ -+#define INPUT_PROP_POINTER 0x00 /* needs a pointer */ -+#define INPUT_PROP_DIRECT 0x01 /* direct input devices */ -+#define INPUT_PROP_BUTTONPAD 0x02 /* has button(s) under pad */ -+#define INPUT_PROP_SEMI_MT 0x03 /* touch rectangle only */ -+#define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */ -+#define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */ -+#define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */ -+ -+#define INPUT_PROP_MAX 0x1f -+#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1) -+ -+/* -+ * Event types -+ */ -+ -+#define EV_SYN 0x00 -+#define EV_KEY 0x01 -+#define EV_REL 0x02 -+#define EV_ABS 0x03 -+#define EV_MSC 0x04 -+#define EV_SW 0x05 -+#define EV_LED 0x11 -+#define EV_SND 0x12 -+#define EV_REP 0x14 -+#define EV_FF 0x15 -+#define EV_PWR 0x16 -+#define EV_FF_STATUS 0x17 -+#define EV_MAX 0x1f -+#define EV_CNT (EV_MAX+1) -+ -+/* -+ * Synchronization events. -+ */ -+ -+#define SYN_REPORT 0 -+#define SYN_CONFIG 1 -+#define SYN_MT_REPORT 2 -+#define SYN_DROPPED 3 -+#define SYN_MAX 0xf -+#define SYN_CNT (SYN_MAX+1) -+ -+/* -+ * Keys and buttons -+ * -+ * Most of the keys/buttons are modeled after USB HUT 1.12 -+ * (see http://www.usb.org/developers/hidpage). -+ * Abbreviations in the comments: -+ * AC - Application Control -+ * AL - Application Launch Button -+ * SC - System Control -+ */ -+ -+#define KEY_RESERVED 0 -+#define KEY_ESC 1 -+#define KEY_1 2 -+#define KEY_2 3 -+#define KEY_3 4 -+#define KEY_4 5 -+#define KEY_5 6 -+#define KEY_6 7 -+#define KEY_7 8 -+#define KEY_8 9 -+#define KEY_9 10 -+#define KEY_0 11 -+#define KEY_MINUS 12 -+#define KEY_EQUAL 13 -+#define KEY_BACKSPACE 14 -+#define KEY_TAB 15 -+#define KEY_Q 16 -+#define KEY_W 17 -+#define KEY_E 18 -+#define KEY_R 19 -+#define KEY_T 20 -+#define KEY_Y 21 -+#define KEY_U 22 -+#define KEY_I 23 -+#define KEY_O 24 -+#define KEY_P 25 -+#define KEY_LEFTBRACE 26 -+#define KEY_RIGHTBRACE 27 -+#define KEY_ENTER 28 -+#define KEY_LEFTCTRL 29 -+#define KEY_A 30 -+#define KEY_S 31 -+#define KEY_D 32 -+#define KEY_F 33 -+#define KEY_G 34 -+#define KEY_H 35 -+#define KEY_J 36 -+#define KEY_K 37 -+#define KEY_L 38 -+#define KEY_SEMICOLON 39 -+#define KEY_APOSTROPHE 40 -+#define KEY_GRAVE 41 -+#define KEY_LEFTSHIFT 42 -+#define KEY_BACKSLASH 43 -+#define KEY_Z 44 -+#define KEY_X 45 -+#define KEY_C 46 -+#define KEY_V 47 -+#define KEY_B 48 -+#define KEY_N 49 -+#define KEY_M 50 -+#define KEY_COMMA 51 -+#define KEY_DOT 52 -+#define KEY_SLASH 53 -+#define KEY_RIGHTSHIFT 54 -+#define KEY_KPASTERISK 55 -+#define KEY_LEFTALT 56 -+#define KEY_SPACE 57 -+#define KEY_CAPSLOCK 58 -+#define KEY_F1 59 -+#define KEY_F2 60 -+#define KEY_F3 61 -+#define KEY_F4 62 -+#define KEY_F5 63 -+#define KEY_F6 64 -+#define KEY_F7 65 -+#define KEY_F8 66 -+#define KEY_F9 67 -+#define KEY_F10 68 -+#define KEY_NUMLOCK 69 -+#define KEY_SCROLLLOCK 70 -+#define KEY_KP7 71 -+#define KEY_KP8 72 -+#define KEY_KP9 73 -+#define KEY_KPMINUS 74 -+#define KEY_KP4 75 -+#define KEY_KP5 76 -+#define KEY_KP6 77 -+#define KEY_KPPLUS 78 -+#define KEY_KP1 79 -+#define KEY_KP2 80 -+#define KEY_KP3 81 -+#define KEY_KP0 82 -+#define KEY_KPDOT 83 -+ -+#define KEY_ZENKAKUHANKAKU 85 -+#define KEY_102ND 86 -+#define KEY_F11 87 -+#define KEY_F12 88 -+#define KEY_RO 89 -+#define KEY_KATAKANA 90 -+#define KEY_HIRAGANA 91 -+#define KEY_HENKAN 92 -+#define KEY_KATAKANAHIRAGANA 93 -+#define KEY_MUHENKAN 94 -+#define KEY_KPJPCOMMA 95 -+#define KEY_KPENTER 96 -+#define KEY_RIGHTCTRL 97 -+#define KEY_KPSLASH 98 -+#define KEY_SYSRQ 99 -+#define KEY_RIGHTALT 100 -+#define KEY_LINEFEED 101 -+#define KEY_HOME 102 -+#define KEY_UP 103 -+#define KEY_PAGEUP 104 -+#define KEY_LEFT 105 -+#define KEY_RIGHT 106 -+#define KEY_END 107 -+#define KEY_DOWN 108 -+#define KEY_PAGEDOWN 109 -+#define KEY_INSERT 110 -+#define KEY_DELETE 111 -+#define KEY_MACRO 112 -+#define KEY_MUTE 113 -+#define KEY_VOLUMEDOWN 114 -+#define KEY_VOLUMEUP 115 -+#define KEY_POWER 116 /* SC System Power Down */ -+#define KEY_KPEQUAL 117 -+#define KEY_KPPLUSMINUS 118 -+#define KEY_PAUSE 119 -+#define KEY_SCALE 120 /* AL Compiz Scale (Expose) */ -+ -+#define KEY_KPCOMMA 121 -+#define KEY_HANGEUL 122 -+#define KEY_HANGUEL KEY_HANGEUL -+#define KEY_HANJA 123 -+#define KEY_YEN 124 -+#define KEY_LEFTMETA 125 -+#define KEY_RIGHTMETA 126 -+#define KEY_COMPOSE 127 -+ -+#define KEY_STOP 128 /* AC Stop */ -+#define KEY_AGAIN 129 -+#define KEY_PROPS 130 /* AC Properties */ -+#define KEY_UNDO 131 /* AC Undo */ -+#define KEY_FRONT 132 -+#define KEY_COPY 133 /* AC Copy */ -+#define KEY_OPEN 134 /* AC Open */ -+#define KEY_PASTE 135 /* AC Paste */ -+#define KEY_FIND 136 /* AC Search */ -+#define KEY_CUT 137 /* AC Cut */ -+#define KEY_HELP 138 /* AL Integrated Help Center */ -+#define KEY_MENU 139 /* Menu (show menu) */ -+#define KEY_CALC 140 /* AL Calculator */ -+#define KEY_SETUP 141 -+#define KEY_SLEEP 142 /* SC System Sleep */ -+#define KEY_WAKEUP 143 /* System Wake Up */ -+#define KEY_FILE 144 /* AL Local Machine Browser */ -+#define KEY_SENDFILE 145 -+#define KEY_DELETEFILE 146 -+#define KEY_XFER 147 -+#define KEY_PROG1 148 -+#define KEY_PROG2 149 -+#define KEY_WWW 150 /* AL Internet Browser */ -+#define KEY_MSDOS 151 -+#define KEY_COFFEE 152 /* AL Terminal Lock/Screensaver */ -+#define KEY_SCREENLOCK KEY_COFFEE -+#define KEY_ROTATE_DISPLAY 153 /* Display orientation for e.g. tablets */ -+#define KEY_DIRECTION KEY_ROTATE_DISPLAY -+#define KEY_CYCLEWINDOWS 154 -+#define KEY_MAIL 155 -+#define KEY_BOOKMARKS 156 /* AC Bookmarks */ -+#define KEY_COMPUTER 157 -+#define KEY_BACK 158 /* AC Back */ -+#define KEY_FORWARD 159 /* AC Forward */ -+#define KEY_CLOSECD 160 -+#define KEY_EJECTCD 161 -+#define KEY_EJECTCLOSECD 162 -+#define KEY_NEXTSONG 163 -+#define KEY_PLAYPAUSE 164 -+#define KEY_PREVIOUSSONG 165 -+#define KEY_STOPCD 166 -+#define KEY_RECORD 167 -+#define KEY_REWIND 168 -+#define KEY_PHONE 169 /* Media Select Telephone */ -+#define KEY_ISO 170 -+#define KEY_CONFIG 171 /* AL Consumer Control Configuration */ -+#define KEY_HOMEPAGE 172 /* AC Home */ -+#define KEY_REFRESH 173 /* AC Refresh */ -+#define KEY_EXIT 174 /* AC Exit */ -+#define KEY_MOVE 175 -+#define KEY_EDIT 176 -+#define KEY_SCROLLUP 177 -+#define KEY_SCROLLDOWN 178 -+#define KEY_KPLEFTPAREN 179 -+#define KEY_KPRIGHTPAREN 180 -+#define KEY_NEW 181 /* AC New */ -+#define KEY_REDO 182 /* AC Redo/Repeat */ -+ -+#define KEY_F13 183 -+#define KEY_F14 184 -+#define KEY_F15 185 -+#define KEY_F16 186 -+#define KEY_F17 187 -+#define KEY_F18 188 -+#define KEY_F19 189 -+#define KEY_F20 190 -+#define KEY_F21 191 -+#define KEY_F22 192 -+#define KEY_F23 193 -+#define KEY_F24 194 -+ -+#define KEY_PLAYCD 200 -+#define KEY_PAUSECD 201 -+#define KEY_PROG3 202 -+#define KEY_PROG4 203 -+#define KEY_DASHBOARD 204 /* AL Dashboard */ -+#define KEY_SUSPEND 205 -+#define KEY_CLOSE 206 /* AC Close */ -+#define KEY_PLAY 207 -+#define KEY_FASTFORWARD 208 -+#define KEY_BASSBOOST 209 -+#define KEY_PRINT 210 /* AC Print */ -+#define KEY_HP 211 -+#define KEY_CAMERA 212 -+#define KEY_SOUND 213 -+#define KEY_QUESTION 214 -+#define KEY_EMAIL 215 -+#define KEY_CHAT 216 -+#define KEY_SEARCH 217 -+#define KEY_CONNECT 218 -+#define KEY_FINANCE 219 /* AL Checkbook/Finance */ -+#define KEY_SPORT 220 -+#define KEY_SHOP 221 -+#define KEY_ALTERASE 222 -+#define KEY_CANCEL 223 /* AC Cancel */ -+#define KEY_BRIGHTNESSDOWN 224 -+#define KEY_BRIGHTNESSUP 225 -+#define KEY_MEDIA 226 -+ -+#define KEY_SWITCHVIDEOMODE 227 /* Cycle between available video -+ outputs (Monitor/LCD/TV-out/etc) */ -+#define KEY_KBDILLUMTOGGLE 228 -+#define KEY_KBDILLUMDOWN 229 -+#define KEY_KBDILLUMUP 230 -+ -+#define KEY_SEND 231 /* AC Send */ -+#define KEY_REPLY 232 /* AC Reply */ -+#define KEY_FORWARDMAIL 233 /* AC Forward Msg */ -+#define KEY_SAVE 234 /* AC Save */ -+#define KEY_DOCUMENTS 235 -+ -+#define KEY_BATTERY 236 -+ -+#define KEY_BLUETOOTH 237 -+#define KEY_WLAN 238 -+#define KEY_UWB 239 -+ -+#define KEY_UNKNOWN 240 -+ -+#define KEY_VIDEO_NEXT 241 /* drive next video source */ -+#define KEY_VIDEO_PREV 242 /* drive previous video source */ -+#define KEY_BRIGHTNESS_CYCLE 243 /* brightness up, after max is min */ -+#define KEY_BRIGHTNESS_AUTO 244 /* Set Auto Brightness: manual -+ brightness control is off, -+ rely on ambient */ -+#define KEY_BRIGHTNESS_ZERO KEY_BRIGHTNESS_AUTO -+#define KEY_DISPLAY_OFF 245 /* display device to off state */ -+ -+#define KEY_WWAN 246 /* Wireless WAN (LTE, UMTS, GSM, etc.) */ -+#define KEY_WIMAX KEY_WWAN -+#define KEY_RFKILL 247 /* Key that controls all radios */ -+ -+#define KEY_MICMUTE 248 /* Mute / unmute the microphone */ -+ -+/* Code 255 is reserved for special needs of AT keyboard driver */ -+ -+#define BTN_MISC 0x100 -+#define BTN_0 0x100 -+#define BTN_1 0x101 -+#define BTN_2 0x102 -+#define BTN_3 0x103 -+#define BTN_4 0x104 -+#define BTN_5 0x105 -+#define BTN_6 0x106 -+#define BTN_7 0x107 -+#define BTN_8 0x108 -+#define BTN_9 0x109 -+ -+#define BTN_MOUSE 0x110 -+#define BTN_LEFT 0x110 -+#define BTN_RIGHT 0x111 -+#define BTN_MIDDLE 0x112 -+#define BTN_SIDE 0x113 -+#define BTN_EXTRA 0x114 -+#define BTN_FORWARD 0x115 -+#define BTN_BACK 0x116 -+#define BTN_TASK 0x117 -+ -+#define BTN_JOYSTICK 0x120 -+#define BTN_TRIGGER 0x120 -+#define BTN_THUMB 0x121 -+#define BTN_THUMB2 0x122 -+#define BTN_TOP 0x123 -+#define BTN_TOP2 0x124 -+#define BTN_PINKIE 0x125 -+#define BTN_BASE 0x126 -+#define BTN_BASE2 0x127 -+#define BTN_BASE3 0x128 -+#define BTN_BASE4 0x129 -+#define BTN_BASE5 0x12a -+#define BTN_BASE6 0x12b -+#define BTN_DEAD 0x12f -+ -+#define BTN_GAMEPAD 0x130 -+#define BTN_SOUTH 0x130 -+#define BTN_A BTN_SOUTH -+#define BTN_EAST 0x131 -+#define BTN_B BTN_EAST -+#define BTN_C 0x132 -+#define BTN_NORTH 0x133 -+#define BTN_X BTN_NORTH -+#define BTN_WEST 0x134 -+#define BTN_Y BTN_WEST -+#define BTN_Z 0x135 -+#define BTN_TL 0x136 -+#define BTN_TR 0x137 -+#define BTN_TL2 0x138 -+#define BTN_TR2 0x139 -+#define BTN_SELECT 0x13a -+#define BTN_START 0x13b -+#define BTN_MODE 0x13c -+#define BTN_THUMBL 0x13d -+#define BTN_THUMBR 0x13e -+ -+#define BTN_DIGI 0x140 -+#define BTN_TOOL_PEN 0x140 -+#define BTN_TOOL_RUBBER 0x141 -+#define BTN_TOOL_BRUSH 0x142 -+#define BTN_TOOL_PENCIL 0x143 -+#define BTN_TOOL_AIRBRUSH 0x144 -+#define BTN_TOOL_FINGER 0x145 -+#define BTN_TOOL_MOUSE 0x146 -+#define BTN_TOOL_LENS 0x147 -+#define BTN_TOOL_QUINTTAP 0x148 /* Five fingers on trackpad */ -+#define BTN_TOUCH 0x14a -+#define BTN_STYLUS 0x14b -+#define BTN_STYLUS2 0x14c -+#define BTN_TOOL_DOUBLETAP 0x14d -+#define BTN_TOOL_TRIPLETAP 0x14e -+#define BTN_TOOL_QUADTAP 0x14f /* Four fingers on trackpad */ -+ -+#define BTN_WHEEL 0x150 -+#define BTN_GEAR_DOWN 0x150 -+#define BTN_GEAR_UP 0x151 -+ -+#define KEY_OK 0x160 -+#define KEY_SELECT 0x161 -+#define KEY_GOTO 0x162 -+#define KEY_CLEAR 0x163 -+#define KEY_POWER2 0x164 -+#define KEY_OPTION 0x165 -+#define KEY_INFO 0x166 /* AL OEM Features/Tips/Tutorial */ -+#define KEY_TIME 0x167 -+#define KEY_VENDOR 0x168 -+#define KEY_ARCHIVE 0x169 -+#define KEY_PROGRAM 0x16a /* Media Select Program Guide */ -+#define KEY_CHANNEL 0x16b -+#define KEY_FAVORITES 0x16c -+#define KEY_EPG 0x16d -+#define KEY_PVR 0x16e /* Media Select Home */ -+#define KEY_MHP 0x16f -+#define KEY_LANGUAGE 0x170 -+#define KEY_TITLE 0x171 -+#define KEY_SUBTITLE 0x172 -+#define KEY_ANGLE 0x173 -+#define KEY_ZOOM 0x174 -+#define KEY_MODE 0x175 -+#define KEY_KEYBOARD 0x176 -+#define KEY_SCREEN 0x177 -+#define KEY_PC 0x178 /* Media Select Computer */ -+#define KEY_TV 0x179 /* Media Select TV */ -+#define KEY_TV2 0x17a /* Media Select Cable */ -+#define KEY_VCR 0x17b /* Media Select VCR */ -+#define KEY_VCR2 0x17c /* VCR Plus */ -+#define KEY_SAT 0x17d /* Media Select Satellite */ -+#define KEY_SAT2 0x17e -+#define KEY_CD 0x17f /* Media Select CD */ -+#define KEY_TAPE 0x180 /* Media Select Tape */ -+#define KEY_RADIO 0x181 -+#define KEY_TUNER 0x182 /* Media Select Tuner */ -+#define KEY_PLAYER 0x183 -+#define KEY_TEXT 0x184 -+#define KEY_DVD 0x185 /* Media Select DVD */ -+#define KEY_AUX 0x186 -+#define KEY_MP3 0x187 -+#define KEY_AUDIO 0x188 /* AL Audio Browser */ -+#define KEY_VIDEO 0x189 /* AL Movie Browser */ -+#define KEY_DIRECTORY 0x18a -+#define KEY_LIST 0x18b -+#define KEY_MEMO 0x18c /* Media Select Messages */ -+#define KEY_CALENDAR 0x18d -+#define KEY_RED 0x18e -+#define KEY_GREEN 0x18f -+#define KEY_YELLOW 0x190 -+#define KEY_BLUE 0x191 -+#define KEY_CHANNELUP 0x192 /* Channel Increment */ -+#define KEY_CHANNELDOWN 0x193 /* Channel Decrement */ -+#define KEY_FIRST 0x194 -+#define KEY_LAST 0x195 /* Recall Last */ -+#define KEY_AB 0x196 -+#define KEY_NEXT 0x197 -+#define KEY_RESTART 0x198 -+#define KEY_SLOW 0x199 -+#define KEY_SHUFFLE 0x19a -+#define KEY_BREAK 0x19b -+#define KEY_PREVIOUS 0x19c -+#define KEY_DIGITS 0x19d -+#define KEY_TEEN 0x19e -+#define KEY_TWEN 0x19f -+#define KEY_VIDEOPHONE 0x1a0 /* Media Select Video Phone */ -+#define KEY_GAMES 0x1a1 /* Media Select Games */ -+#define KEY_ZOOMIN 0x1a2 /* AC Zoom In */ -+#define KEY_ZOOMOUT 0x1a3 /* AC Zoom Out */ -+#define KEY_ZOOMRESET 0x1a4 /* AC Zoom */ -+#define KEY_WORDPROCESSOR 0x1a5 /* AL Word Processor */ -+#define KEY_EDITOR 0x1a6 /* AL Text Editor */ -+#define KEY_SPREADSHEET 0x1a7 /* AL Spreadsheet */ -+#define KEY_GRAPHICSEDITOR 0x1a8 /* AL Graphics Editor */ -+#define KEY_PRESENTATION 0x1a9 /* AL Presentation App */ -+#define KEY_DATABASE 0x1aa /* AL Database App */ -+#define KEY_NEWS 0x1ab /* AL Newsreader */ -+#define KEY_VOICEMAIL 0x1ac /* AL Voicemail */ -+#define KEY_ADDRESSBOOK 0x1ad /* AL Contacts/Address Book */ -+#define KEY_MESSENGER 0x1ae /* AL Instant Messaging */ -+#define KEY_DISPLAYTOGGLE 0x1af /* Turn display (LCD) on and off */ -+#define KEY_BRIGHTNESS_TOGGLE KEY_DISPLAYTOGGLE -+#define KEY_SPELLCHECK 0x1b0 /* AL Spell Check */ -+#define KEY_LOGOFF 0x1b1 /* AL Logoff */ -+ -+#define KEY_DOLLAR 0x1b2 -+#define KEY_EURO 0x1b3 -+ -+#define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ -+#define KEY_FRAMEFORWARD 0x1b5 -+#define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ -+#define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ -+#define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ -+#define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ -+#define KEY_IMAGES 0x1ba /* AL Image Browser */ -+ -+#define KEY_DEL_EOL 0x1c0 -+#define KEY_DEL_EOS 0x1c1 -+#define KEY_INS_LINE 0x1c2 -+#define KEY_DEL_LINE 0x1c3 -+ -+#define KEY_FN 0x1d0 -+#define KEY_FN_ESC 0x1d1 -+#define KEY_FN_F1 0x1d2 -+#define KEY_FN_F2 0x1d3 -+#define KEY_FN_F3 0x1d4 -+#define KEY_FN_F4 0x1d5 -+#define KEY_FN_F5 0x1d6 -+#define KEY_FN_F6 0x1d7 -+#define KEY_FN_F7 0x1d8 -+#define KEY_FN_F8 0x1d9 -+#define KEY_FN_F9 0x1da -+#define KEY_FN_F10 0x1db -+#define KEY_FN_F11 0x1dc -+#define KEY_FN_F12 0x1dd -+#define KEY_FN_1 0x1de -+#define KEY_FN_2 0x1df -+#define KEY_FN_D 0x1e0 -+#define KEY_FN_E 0x1e1 -+#define KEY_FN_F 0x1e2 -+#define KEY_FN_S 0x1e3 -+#define KEY_FN_B 0x1e4 -+ -+#define KEY_BRL_DOT1 0x1f1 -+#define KEY_BRL_DOT2 0x1f2 -+#define KEY_BRL_DOT3 0x1f3 -+#define KEY_BRL_DOT4 0x1f4 -+#define KEY_BRL_DOT5 0x1f5 -+#define KEY_BRL_DOT6 0x1f6 -+#define KEY_BRL_DOT7 0x1f7 -+#define KEY_BRL_DOT8 0x1f8 -+#define KEY_BRL_DOT9 0x1f9 -+#define KEY_BRL_DOT10 0x1fa -+ -+#define KEY_NUMERIC_0 0x200 /* used by phones, remote controls, */ -+#define KEY_NUMERIC_1 0x201 /* and other keypads */ -+#define KEY_NUMERIC_2 0x202 -+#define KEY_NUMERIC_3 0x203 -+#define KEY_NUMERIC_4 0x204 -+#define KEY_NUMERIC_5 0x205 -+#define KEY_NUMERIC_6 0x206 -+#define KEY_NUMERIC_7 0x207 -+#define KEY_NUMERIC_8 0x208 -+#define KEY_NUMERIC_9 0x209 -+#define KEY_NUMERIC_STAR 0x20a -+#define KEY_NUMERIC_POUND 0x20b -+#define KEY_NUMERIC_A 0x20c /* Phone key A - HUT Telephony 0xb9 */ -+#define KEY_NUMERIC_B 0x20d -+#define KEY_NUMERIC_C 0x20e -+#define KEY_NUMERIC_D 0x20f -+ -+#define KEY_CAMERA_FOCUS 0x210 -+#define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ -+ -+#define KEY_TOUCHPAD_TOGGLE 0x212 /* Request switch touchpad on or off */ -+#define KEY_TOUCHPAD_ON 0x213 -+#define KEY_TOUCHPAD_OFF 0x214 -+ -+#define KEY_CAMERA_ZOOMIN 0x215 -+#define KEY_CAMERA_ZOOMOUT 0x216 -+#define KEY_CAMERA_UP 0x217 -+#define KEY_CAMERA_DOWN 0x218 -+#define KEY_CAMERA_LEFT 0x219 -+#define KEY_CAMERA_RIGHT 0x21a -+ -+#define KEY_ATTENDANT_ON 0x21b -+#define KEY_ATTENDANT_OFF 0x21c -+#define KEY_ATTENDANT_TOGGLE 0x21d /* Attendant call on or off */ -+#define KEY_LIGHTS_TOGGLE 0x21e /* Reading light on or off */ -+ -+#define BTN_DPAD_UP 0x220 -+#define BTN_DPAD_DOWN 0x221 -+#define BTN_DPAD_LEFT 0x222 -+#define BTN_DPAD_RIGHT 0x223 -+ -+#define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */ -+ -+#define KEY_BUTTONCONFIG 0x240 /* AL Button Configuration */ -+#define KEY_TASKMANAGER 0x241 /* AL Task/Project Manager */ -+#define KEY_JOURNAL 0x242 /* AL Log/Journal/Timecard */ -+#define KEY_CONTROLPANEL 0x243 /* AL Control Panel */ -+#define KEY_APPSELECT 0x244 /* AL Select Task/Application */ -+#define KEY_SCREENSAVER 0x245 /* AL Screen Saver */ -+#define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */ -+ -+#define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ -+#define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ -+ -+#define KEY_KBDINPUTASSIST_PREV 0x260 -+#define KEY_KBDINPUTASSIST_NEXT 0x261 -+#define KEY_KBDINPUTASSIST_PREVGROUP 0x262 -+#define KEY_KBDINPUTASSIST_NEXTGROUP 0x263 -+#define KEY_KBDINPUTASSIST_ACCEPT 0x264 -+#define KEY_KBDINPUTASSIST_CANCEL 0x265 -+ -+#define BTN_TRIGGER_HAPPY 0x2c0 -+#define BTN_TRIGGER_HAPPY1 0x2c0 -+#define BTN_TRIGGER_HAPPY2 0x2c1 -+#define BTN_TRIGGER_HAPPY3 0x2c2 -+#define BTN_TRIGGER_HAPPY4 0x2c3 -+#define BTN_TRIGGER_HAPPY5 0x2c4 -+#define BTN_TRIGGER_HAPPY6 0x2c5 -+#define BTN_TRIGGER_HAPPY7 0x2c6 -+#define BTN_TRIGGER_HAPPY8 0x2c7 -+#define BTN_TRIGGER_HAPPY9 0x2c8 -+#define BTN_TRIGGER_HAPPY10 0x2c9 -+#define BTN_TRIGGER_HAPPY11 0x2ca -+#define BTN_TRIGGER_HAPPY12 0x2cb -+#define BTN_TRIGGER_HAPPY13 0x2cc -+#define BTN_TRIGGER_HAPPY14 0x2cd -+#define BTN_TRIGGER_HAPPY15 0x2ce -+#define BTN_TRIGGER_HAPPY16 0x2cf -+#define BTN_TRIGGER_HAPPY17 0x2d0 -+#define BTN_TRIGGER_HAPPY18 0x2d1 -+#define BTN_TRIGGER_HAPPY19 0x2d2 -+#define BTN_TRIGGER_HAPPY20 0x2d3 -+#define BTN_TRIGGER_HAPPY21 0x2d4 -+#define BTN_TRIGGER_HAPPY22 0x2d5 -+#define BTN_TRIGGER_HAPPY23 0x2d6 -+#define BTN_TRIGGER_HAPPY24 0x2d7 -+#define BTN_TRIGGER_HAPPY25 0x2d8 -+#define BTN_TRIGGER_HAPPY26 0x2d9 -+#define BTN_TRIGGER_HAPPY27 0x2da -+#define BTN_TRIGGER_HAPPY28 0x2db -+#define BTN_TRIGGER_HAPPY29 0x2dc -+#define BTN_TRIGGER_HAPPY30 0x2dd -+#define BTN_TRIGGER_HAPPY31 0x2de -+#define BTN_TRIGGER_HAPPY32 0x2df -+#define BTN_TRIGGER_HAPPY33 0x2e0 -+#define BTN_TRIGGER_HAPPY34 0x2e1 -+#define BTN_TRIGGER_HAPPY35 0x2e2 -+#define BTN_TRIGGER_HAPPY36 0x2e3 -+#define BTN_TRIGGER_HAPPY37 0x2e4 -+#define BTN_TRIGGER_HAPPY38 0x2e5 -+#define BTN_TRIGGER_HAPPY39 0x2e6 -+#define BTN_TRIGGER_HAPPY40 0x2e7 -+ -+/* We avoid low common keys in module aliases so they don't get huge. */ -+#define KEY_MIN_INTERESTING KEY_MUTE -+#define KEY_MAX 0x2ff -+#define KEY_CNT (KEY_MAX+1) -+ -+/* -+ * Relative axes -+ */ -+ -+#define REL_X 0x00 -+#define REL_Y 0x01 -+#define REL_Z 0x02 -+#define REL_RX 0x03 -+#define REL_RY 0x04 -+#define REL_RZ 0x05 -+#define REL_HWHEEL 0x06 -+#define REL_DIAL 0x07 -+#define REL_WHEEL 0x08 -+#define REL_MISC 0x09 -+#define REL_MAX 0x0f -+#define REL_CNT (REL_MAX+1) -+ -+/* -+ * Absolute axes -+ */ -+ -+#define ABS_X 0x00 -+#define ABS_Y 0x01 -+#define ABS_Z 0x02 -+#define ABS_RX 0x03 -+#define ABS_RY 0x04 -+#define ABS_RZ 0x05 -+#define ABS_THROTTLE 0x06 -+#define ABS_RUDDER 0x07 -+#define ABS_WHEEL 0x08 -+#define ABS_GAS 0x09 -+#define ABS_BRAKE 0x0a -+#define ABS_HAT0X 0x10 -+#define ABS_HAT0Y 0x11 -+#define ABS_HAT1X 0x12 -+#define ABS_HAT1Y 0x13 -+#define ABS_HAT2X 0x14 -+#define ABS_HAT2Y 0x15 -+#define ABS_HAT3X 0x16 -+#define ABS_HAT3Y 0x17 -+#define ABS_PRESSURE 0x18 -+#define ABS_DISTANCE 0x19 -+#define ABS_TILT_X 0x1a -+#define ABS_TILT_Y 0x1b -+#define ABS_TOOL_WIDTH 0x1c -+ -+#define ABS_VOLUME 0x20 -+ -+#define ABS_MISC 0x28 -+ -+#define ABS_MT_SLOT 0x2f /* MT slot being modified */ -+#define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ -+#define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ -+#define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */ -+#define ABS_MT_WIDTH_MINOR 0x33 /* Minor axis (omit if circular) */ -+#define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */ -+#define ABS_MT_POSITION_X 0x35 /* Center X touch position */ -+#define ABS_MT_POSITION_Y 0x36 /* Center Y touch position */ -+#define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ -+#define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ -+#define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ -+#define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ -+#define ABS_MT_DISTANCE 0x3b /* Contact hover distance */ -+#define ABS_MT_TOOL_X 0x3c /* Center X tool position */ -+#define ABS_MT_TOOL_Y 0x3d /* Center Y tool position */ -+ -+ -+#define ABS_MAX 0x3f -+#define ABS_CNT (ABS_MAX+1) -+ -+/* -+ * Switch events -+ */ -+ -+#define SW_LID 0x00 /* set = lid shut */ -+#define SW_TABLET_MODE 0x01 /* set = tablet mode */ -+#define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ -+#define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any" -+ set = radio enabled */ -+#define SW_RADIO SW_RFKILL_ALL /* deprecated */ -+#define SW_MICROPHONE_INSERT 0x04 /* set = inserted */ -+#define SW_DOCK 0x05 /* set = plugged into dock */ -+#define SW_LINEOUT_INSERT 0x06 /* set = inserted */ -+#define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */ -+#define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */ -+#define SW_CAMERA_LENS_COVER 0x09 /* set = lens covered */ -+#define SW_KEYPAD_SLIDE 0x0a /* set = keypad slide out */ -+#define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */ -+#define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */ -+#define SW_LINEIN_INSERT 0x0d /* set = inserted */ -+#define SW_MUTE_DEVICE 0x0e /* set = device disabled */ -+#define SW_MAX 0x0f -+#define SW_CNT (SW_MAX+1) -+ -+/* -+ * Misc events -+ */ -+ -+#define MSC_SERIAL 0x00 -+#define MSC_PULSELED 0x01 -+#define MSC_GESTURE 0x02 -+#define MSC_RAW 0x03 -+#define MSC_SCAN 0x04 -+#define MSC_TIMESTAMP 0x05 -+#define MSC_MAX 0x07 -+#define MSC_CNT (MSC_MAX+1) -+ -+/* -+ * LEDs -+ */ -+ -+#define LED_NUML 0x00 -+#define LED_CAPSL 0x01 -+#define LED_SCROLLL 0x02 -+#define LED_COMPOSE 0x03 -+#define LED_KANA 0x04 -+#define LED_SLEEP 0x05 -+#define LED_SUSPEND 0x06 -+#define LED_MUTE 0x07 -+#define LED_MISC 0x08 -+#define LED_MAIL 0x09 -+#define LED_CHARGING 0x0a -+#define LED_MAX 0x0f -+#define LED_CNT (LED_MAX+1) -+ -+/* -+ * Autorepeat values -+ */ -+ -+#define REP_DELAY 0x00 -+#define REP_PERIOD 0x01 -+#define REP_MAX 0x01 -+#define REP_CNT (REP_MAX+1) -+ -+/* -+ * Sounds -+ */ -+ -+#define SND_CLICK 0x00 -+#define SND_BELL 0x01 -+#define SND_TONE 0x02 -+#define SND_MAX 0x07 -+#define SND_CNT (SND_MAX+1) -+ -+#endif diff --git a/package/boot/uboot-sunxi/patches/011-dt-sync-dts-files-with-kernel.patch b/package/boot/uboot-sunxi/patches/011-dt-sync-dts-files-with-kernel.patch deleted file mode 100644 index e36f9e3c5a7ef6..00000000000000 --- a/package/boot/uboot-sunxi/patches/011-dt-sync-dts-files-with-kernel.patch +++ /dev/null @@ -1,7211 +0,0 @@ -From 80e5f83c0fc4bf42110cc55ce671ad7ddc7b08a4 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Mon, 14 Mar 2016 17:37:09 +0100 -Subject: [PATCH] sunxi: Sync dts files with the upstream kernel - -Sync dts files with the upstream kernel including -changes queued for 4.6: - -https://git.kernel.org/cgit/linux/kernel/git/mripard/linux.git/commit/?h=sunxi/dt-for-4.6 - -Note this adds a number of new unused board dts files. I've asked the -authors of the kernel commits adding these to submit a matching defconfig -to u-boot. - -Signed-off-by: Hans de Goede -Acked-by: Ian Campbell ---- - arch/arm/dts/Makefile | 8 +- - arch/arm/dts/axp22x.dtsi | 145 ++++++++++++ - arch/arm/dts/sun4i-a10-a1000.dts | 4 + - arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts | 22 ++ - arch/arm/dts/sun4i-a10-cubieboard.dts | 4 + - arch/arm/dts/sun4i-a10-gemei-g9.dts | 63 +++++- - arch/arm/dts/sun4i-a10-inet1.dts | 48 ++++ - arch/arm/dts/sun4i-a10-inet97fv2.dts | 127 ++++++++++- - arch/arm/dts/sun4i-a10-inet9f-rev03.dts | 181 +++++++++++++++ - arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts | 86 +------ - arch/arm/dts/sun4i-a10-jesurun-q5.dts | 15 ++ - arch/arm/dts/sun4i-a10-marsboard.dts | 23 ++ - arch/arm/dts/sun4i-a10-mk802.dts | 37 +++ - arch/arm/dts/sun4i-a10-olinuxino-lime.dts | 12 + - arch/arm/dts/sun4i-a10-pcduino.dts | 58 ++++- - arch/arm/dts/sun4i-a10-pcduino2.dts | 78 +++++++ - arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts | 69 ++++++ - arch/arm/dts/sun4i-a10.dtsi | 153 +++++++++++-- - arch/arm/dts/sun5i-a10s-auxtek-t004.dts | 14 ++ - arch/arm/dts/sun5i-a10s-olinuxino-micro.dts | 2 +- - arch/arm/dts/sun5i-a13-empire-electronix-d709.dts | 19 +- - arch/arm/dts/sun5i-a13-inet-98v-rev2.dts | 26 +-- - arch/arm/dts/sun5i-a13-utoo-p66.dts | 30 +++ - arch/arm/dts/sun5i-q8-common.dtsi | 10 + - arch/arm/dts/sun5i-r8-chip.dts | 47 +++- - arch/arm/dts/sun5i.dtsi | 31 +++ - arch/arm/dts/sun6i-a31-colombus.dts | 24 ++ - arch/arm/dts/sun6i-a31-hummingbird.dts | 132 ++++++----- - arch/arm/dts/sun6i-a31.dtsi | 65 +++++- - arch/arm/dts/sun6i-a31s-primo81.dts | 247 ++++++++++++++++++++- - arch/arm/dts/sun6i-a31s-sina31s-core.dtsi | 142 ++++++++++++ - arch/arm/dts/sun6i-a31s-sina31s.dts | 153 +++++++++++++ - .../arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts | 205 +++++++++++++++++ - arch/arm/dts/sun7i-a20-bananapi.dts | 78 ++++++- - arch/arm/dts/sun7i-a20-cubieboard2.dts | 23 ++ - arch/arm/dts/sun7i-a20-cubietruck.dts | 4 + - arch/arm/dts/sun7i-a20-icnova-swac.dts | 169 ++++++++++++++ - arch/arm/dts/sun7i-a20-itead-ibox.dts | 125 +++++++++++ - arch/arm/dts/sun7i-a20-lamobo-r1.dts | 10 - - arch/arm/dts/sun7i-a20-mk808c.dts | 39 ++++ - arch/arm/dts/sun7i-a20-olimex-som-evb.dts | 95 ++++++-- - arch/arm/dts/sun7i-a20-olinuxino-lime.dts | 12 + - arch/arm/dts/sun7i-a20-olinuxino-lime2.dts | 47 ++++ - arch/arm/dts/sun7i-a20-olinuxino-micro.dts | 6 + - arch/arm/dts/sun7i-a20-orangepi-mini.dts | 33 +++ - arch/arm/dts/sun7i-a20-orangepi.dts | 29 +++ - arch/arm/dts/sun7i-a20-pcduino3-nano.dts | 69 +++++- - arch/arm/dts/sun7i-a20-pcduino3.dts | 58 ++++- - arch/arm/dts/sun7i-a20-wexler-tab7200.dts | 90 +++++++- - arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts | 187 +++++++++++++++- - arch/arm/dts/sun7i-a20.dtsi | 113 +++++++++- - arch/arm/dts/sun8i-a23-a33.dtsi | 71 ++++-- - arch/arm/dts/sun8i-a23-gt90h-v4.dts | 120 +++++++++- - arch/arm/dts/sun8i-a23.dtsi | 25 +++ - arch/arm/dts/sun8i-a33-sinlinx-sina33.dts | 83 ++++++- - arch/arm/dts/sun8i-a33.dtsi | 45 ++++ - arch/arm/dts/sun8i-a83t-cubietruck-plus.dts | 65 ++++++ - arch/arm/dts/sun8i-a83t.dtsi | 125 +++++------ - arch/arm/dts/sun8i-h3-orangepi-pc.dts | 69 ++++++ - arch/arm/dts/sun8i-h3-orangepi-plus.dts | 63 ++++++ - arch/arm/dts/sun8i-h3.dtsi | 189 +++++++++++----- - arch/arm/dts/sun8i-q8-common.dtsi | 96 +++++++- - arch/arm/dts/sun9i-a80-cubieboard4.dts | 36 +++ - arch/arm/dts/sun9i-a80-optimus.dts | 48 ++-- - arch/arm/dts/sun9i-a80.dtsi | 204 +++++++++++++++-- - arch/arm/dts/sunxi-itead-core-common.dtsi | 136 ++++++++++++ - arch/arm/dts/sunxi-q8-common.dtsi | 6 + - 67 files changed, 4351 insertions(+), 497 deletions(-) - create mode 100644 arch/arm/dts/axp22x.dtsi - create mode 100644 arch/arm/dts/sun4i-a10-pcduino2.dts - create mode 100644 arch/arm/dts/sun6i-a31s-sina31s-core.dtsi - create mode 100644 arch/arm/dts/sun6i-a31s-sina31s.dts - create mode 100644 arch/arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts - create mode 100644 arch/arm/dts/sun7i-a20-icnova-swac.dts - create mode 100644 arch/arm/dts/sun7i-a20-itead-ibox.dts - create mode 100644 arch/arm/dts/sun8i-a83t-cubietruck-plus.dts - create mode 100644 arch/arm/dts/sunxi-itead-core-common.dtsi - ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -126,6 +126,7 @@ dtb-$(CONFIG_MACH_SUN4I) += \ - sun4i-a10-mk802ii.dtb \ - sun4i-a10-olinuxino-lime.dtb \ - sun4i-a10-pcduino.dtb \ -+ sun4i-a10-pcduino2.dtb \ - sun4i-a10-pov-protab2-ips9.dtb - dtb-$(CONFIG_MACH_SUN5I) += \ - sun5i-a10s-auxtek-t003.dtb \ -@@ -155,7 +156,9 @@ dtb-$(CONFIG_MACH_SUN6I) += \ - sun6i-a31-pangolin.dtb \ - sun6i-a31s-cs908.dtb \ - sun6i-a31s-primo81.dtb \ -- sun6i-a31s-sinovoip-bpi-m2.dtb -+ sun6i-a31s-sina31s.dtb \ -+ sun6i-a31s-sinovoip-bpi-m2.dtb \ -+ sun6i-a31s-yones-toptech-bs1078-v2.dtb - dtb-$(CONFIG_MACH_SUN7I) += \ - sun7i-a20-ainol-aw1.dtb \ - sun7i-a20-bananapi.dtb \ -@@ -164,6 +167,8 @@ dtb-$(CONFIG_MACH_SUN7I) += \ - sun7i-a20-cubietruck.dtb \ - sun7i-a20-hummingbird.dtb \ - sun7i-a20-i12-tvbox.dtb \ -+ sun7i-a20-icnova-swac.dtb \ -+ sun7i-a20-itead-ibox.dtb \ - sun7i-a20-lamobo-r1.dtb \ - sun7i-a20-m3.dtb \ - sun7i-a20-m5.dtb \ -@@ -190,6 +195,7 @@ dtb-$(CONFIG_MACH_SUN8I_A33) += \ - sun8i-a33-sinlinx-sina33.dtb - dtb-$(CONFIG_MACH_SUN8I_A83T) += \ - sun8i-a83t-allwinner-h8homlet-v2.dtb \ -+ sun8i-a83t-cubietruck-plus.dtb \ - sun8i-a83t-sinovoip-bpi-m3.dtb - dtb-$(CONFIG_MACH_SUN8I_H3) += \ - sun8i-h3-orangepi-pc.dtb \ ---- /dev/null -+++ b/arch/arm/dts/axp22x.dtsi -@@ -0,0 +1,145 @@ -+/* -+ * Copyright 2015 Chen-Yu Tsai -+ * -+ * Chen-Yu Tsai -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) This file 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; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+/* -+ * AXP221/221s/223 Integrated Power Management Chip -+ * http://www.x-powers.com/product/AXP22X.php -+ * http://dl.linux-sunxi.org/AXP/AXP221%20Datasheet%20V1.2%2020130326%20.pdf -+ */ -+ -+&axp22x { -+ interrupt-controller; -+ #interrupt-cells = <1>; -+ -+ regulators { -+ /* Default work frequency for buck regulators */ -+ x-powers,dcdc-freq = <3000>; -+ -+ reg_dcdc1: dcdc1 { -+ regulator-name = "dcdc1"; -+ }; -+ -+ reg_dcdc2: dcdc2 { -+ regulator-name = "dcdc2"; -+ }; -+ -+ reg_dcdc3: dcdc3 { -+ regulator-name = "dcdc3"; -+ }; -+ -+ reg_dcdc4: dcdc4 { -+ regulator-name = "dcdc4"; -+ }; -+ -+ reg_dcdc5: dcdc5 { -+ regulator-name = "dcdc5"; -+ }; -+ -+ reg_dc1sw: dc1sw { -+ regulator-name = "dc1sw"; -+ }; -+ -+ reg_dc5ldo: dc5ldo { -+ regulator-name = "dc5ldo"; -+ }; -+ -+ reg_aldo1: aldo1 { -+ regulator-name = "aldo1"; -+ }; -+ -+ reg_aldo2: aldo2 { -+ regulator-name = "aldo2"; -+ }; -+ -+ reg_aldo3: aldo3 { -+ regulator-name = "aldo3"; -+ }; -+ -+ reg_dldo1: dldo1 { -+ regulator-name = "dldo1"; -+ }; -+ -+ reg_dldo2: dldo2 { -+ regulator-name = "dldo2"; -+ }; -+ -+ reg_dldo3: dldo3 { -+ regulator-name = "dldo3"; -+ }; -+ -+ reg_dldo4: dldo4 { -+ regulator-name = "dldo4"; -+ }; -+ -+ reg_eldo1: eldo1 { -+ regulator-name = "eldo1"; -+ }; -+ -+ reg_eldo2: eldo2 { -+ regulator-name = "eldo2"; -+ }; -+ -+ reg_eldo3: eldo3 { -+ regulator-name = "eldo3"; -+ }; -+ -+ reg_ldo_io0: ldo_io0 { -+ regulator-name = "ldo_io0"; -+ status = "disabled"; -+ }; -+ -+ reg_ldo_io1: ldo_io1 { -+ regulator-name = "ldo_io1"; -+ status = "disabled"; -+ }; -+ -+ reg_rtc_ldo: rtc_ldo { -+ /* RTC_LDO is a fixed, always-on regulator */ -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "rtc_ldo"; -+ }; -+ }; -+}; ---- a/arch/arm/dts/sun4i-a10-a1000.dts -+++ b/arch/arm/dts/sun4i-a10-a1000.dts -@@ -93,6 +93,10 @@ - status = "okay"; - }; - -+&codec { -+ status = "okay"; -+}; -+ - &ehci0 { - status = "okay"; - }; ---- a/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts -+++ b/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts -@@ -45,6 +45,7 @@ - #include "sunxi-common-regulators.dtsi" - #include - #include -+#include - - / { - model = "Chuwi V7 CW0825"; -@@ -78,6 +79,27 @@ - }; - }; - -+&i2c1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c1_pins_a>; -+ status = "okay"; -+}; -+ -+&i2c2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c2_pins_a>; -+ status = "okay"; -+ -+ ft5306de4: touchscreen@38 { -+ compatible = "edt,edt-ft5406"; -+ reg = <0x38>; -+ interrupt-parent = <&pio>; -+ interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; -+ touchscreen-size-x = <1024>; -+ touchscreen-size-y = <768>; -+ }; -+}; -+ - &lradc { - vref-supply = <®_vcc3v0>; - status = "okay"; ---- a/arch/arm/dts/sun4i-a10-cubieboard.dts -+++ b/arch/arm/dts/sun4i-a10-cubieboard.dts -@@ -83,6 +83,10 @@ - status = "okay"; - }; - -+&codec { -+ status = "okay"; -+}; -+ - &cpu0 { - cpu-supply = <®_dcdc2>; - }; ---- a/arch/arm/dts/sun4i-a10-gemei-g9.dts -+++ b/arch/arm/dts/sun4i-a10-gemei-g9.dts -@@ -47,6 +47,7 @@ - #include "sunxi-common-regulators.dtsi" - #include - #include -+#include - - / { - model = "Gemei G9 Tablet"; -@@ -64,12 +65,22 @@ - /* - * TODO: - * 2x cameras via CSI -- * bma250 IRQs - * AXP battery management - * NAND - * OTG - * Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48 - */ -+&codec { -+ /* PH15 controls power to external amplifier (ft2012q) */ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&codec_pa_pin>; -+ allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; -+ status = "okay"; -+}; -+ -+&cpu0 { -+ cpu-supply = <®_dcdc2>; -+}; - - &ehci0 { - status = "okay"; -@@ -85,15 +96,13 @@ - status = "okay"; - - axp209: pmic@34 { -- compatible = "x-powers,axp209"; - reg = <0x34>; - interrupts = <0>; -- -- interrupt-controller; -- #interrupt-cells = <1>; - }; - }; - -+#include "axp209.dtsi" -+ - &i2c1 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c1_pins_a>; -@@ -103,17 +112,13 @@ - bma250@18 { - compatible = "bosch,bma250"; - reg = <0x18>; -- -- /* -- * TODO: interrupt pins: -- * int1 - PH00 -- * int2 - PI10 -- */ -+ interrupt-parent = <&pio>; -+ interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH00 / EINT0 */ - }; - }; - - &lradc { -- vref-supply = <®_vcc3v0>; -+ vref-supply = <®_ldo2>; - - status = "okay"; - -@@ -149,6 +154,40 @@ - status = "okay"; - }; - -+&pio { -+ codec_pa_pin: codec_pa_pin@0 { -+ allwinner,pins = "PH15"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+}; -+ -+®_dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-cpu"; -+}; -+ -+®_dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <1250000>; -+ regulator-max-microvolt = <1250000>; -+ regulator-name = "vdd-int-dll"; -+}; -+ -+®_ldo1 { -+ regulator-name = "vdd-rtc"; -+}; -+ -+®_ldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "avcc"; -+}; -+ - ®_usb1_vbus { - status = "okay"; - }; ---- a/arch/arm/dts/sun4i-a10-inet1.dts -+++ b/arch/arm/dts/sun4i-a10-inet1.dts -@@ -47,6 +47,7 @@ - #include - #include - #include -+#include - - / { - model = "iNet-1"; -@@ -56,11 +57,25 @@ - serial0 = &uart0; - }; - -+ backlight: backlight { -+ compatible = "pwm-backlight"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&bl_en_pin_inet>; -+ pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; -+ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; -+ default-brightness-level = <8>; -+ enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ -+ }; -+ - chosen { - stdout-path = "serial0:115200n8"; - }; - }; - -+&codec { -+ status = "okay"; -+}; -+ - &cpu0 { - cpu-supply = <®_dcdc2>; - }; -@@ -104,6 +119,19 @@ - pinctrl-names = "default"; - pinctrl-0 = <&i2c2_pins_a>; - status = "okay"; -+ -+ ft5x: touchscreen@38 { -+ compatible = "edt,edt-ft5406"; -+ reg = <0x38>; -+ interrupt-parent = <&pio>; -+ interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&touchscreen_wake_pin>; -+ wake-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* PB13 */ -+ touchscreen-size-x = <600>; -+ touchscreen-size-y = <1024>; -+ touchscreen-swapped-x-y; -+ }; - }; - - &lradc { -@@ -151,6 +179,20 @@ - }; - - &pio { -+ bl_en_pin_inet: bl_en_pin@0 { -+ allwinner,pins = "PH7"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ touchscreen_wake_pin: touchscreen_wake_pin@0 { -+ allwinner,pins = "PB13"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ - usb0_id_detect_pin: usb0_id_detect_pin@0 { - allwinner,pins = "PH4"; - allwinner,function = "gpio_in"; -@@ -166,6 +208,12 @@ - }; - }; - -+&pwm { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pwm0_pins_a>; -+ status = "okay"; -+}; -+ - ®_dcdc2 { - regulator-always-on; - regulator-min-microvolt = <1000000>; ---- a/arch/arm/dts/sun4i-a10-inet97fv2.dts -+++ b/arch/arm/dts/sun4i-a10-inet97fv2.dts -@@ -47,6 +47,8 @@ - #include "sunxi-common-regulators.dtsi" - - #include -+#include -+#include - - / { - model = "INet-97F Rev 02"; -@@ -61,8 +63,8 @@ - }; - }; - --&ehci0 { -- status = "okay"; -+&cpu0 { -+ cpu-supply = <®_dcdc2>; - }; - - &ehci1 { -@@ -75,12 +77,71 @@ - status = "okay"; - - axp209: pmic@34 { -- compatible = "x-powers,axp209"; - reg = <0x34>; - interrupts = <0>; -+ }; -+}; -+ -+#include "axp209.dtsi" -+ -+&i2c1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c1_pins_a>; -+ status = "okay"; -+}; -+ -+&i2c2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c2_pins_a>; -+ status = "okay"; -+ -+ ft5406ee8: touchscreen@38 { -+ compatible = "edt,edt-ft5406"; -+ reg = <0x38>; -+ interrupt-parent = <&pio>; -+ interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; -+ touchscreen-size-x = <800>; -+ touchscreen-size-y = <480>; -+ }; -+}; -+ -+&lradc { -+ vref-supply = <®_ldo2>; -+ status = "okay"; -+ -+ button@200 { -+ label = "Menu"; -+ linux,code = ; -+ channel = <0>; -+ voltage = <200000>; -+ }; -+ -+ button@600 { -+ label = "Volume Up"; -+ linux,code = ; -+ channel = <0>; -+ voltage = <600000>; -+ }; - -- interrupt-controller; -- #interrupt-cells = <1>; -+ button@800 { -+ label = "Volume Down"; -+ linux,code = ; -+ channel = <0>; -+ voltage = <800000>; -+ }; -+ -+ button@1000 { -+ label = "Home"; -+ linux,code = ; -+ channel = <0>; -+ voltage = <1000000>; -+ }; -+ -+ button@1200 { -+ label = "Esc"; -+ linux,code = ; -+ channel = <0>; -+ voltage = <1200000>; - }; - }; - -@@ -94,15 +155,52 @@ - status = "okay"; - }; - --&ohci0 { -+&otg_sram { - status = "okay"; - }; - --&ohci1 { -- status = "okay"; -+&pio { -+ usb0_id_detect_pin: usb0_id_detect_pin@0 { -+ allwinner,pins = "PH4"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { -+ allwinner,pins = "PH5"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+}; -+ -+®_dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-cpu"; - }; - --®_usb1_vbus { -+®_dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <1250000>; -+ regulator-max-microvolt = <1250000>; -+ regulator-name = "vdd-int-dll"; -+}; -+ -+®_ldo1 { -+ regulator-name = "vdd-rtc"; -+}; -+ -+®_ldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "avcc"; -+}; -+ -+®_usb0_vbus { - status = "okay"; - }; - -@@ -116,8 +214,17 @@ - status = "okay"; - }; - -+&usb_otg { -+ dr_mode = "otg"; -+ status = "okay"; -+}; -+ - &usbphy { -- usb1_vbus-supply = <®_usb1_vbus>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; -+ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ -+ usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ -+ usb0_vbus-supply = <®_usb0_vbus>; - usb2_vbus-supply = <®_usb2_vbus>; - status = "okay"; - }; ---- a/arch/arm/dts/sun4i-a10-inet9f-rev03.dts -+++ b/arch/arm/dts/sun4i-a10-inet9f-rev03.dts -@@ -59,6 +59,159 @@ - chosen { - stdout-path = "serial0:115200n8"; - }; -+ -+ gpio_keys { -+ compatible = "gpio-keys-polled"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&key_pins_inet9f>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ poll-interval = <20>; -+ -+ button@0 { -+ label = "Left Joystick Left"; -+ linux,code = ; -+ linux,input-type = ; -+ linux,input-value = <0xffffffff>; /* -1 */ -+ gpios = <&pio 0 6 GPIO_ACTIVE_LOW>; /* PA6 */ -+ }; -+ -+ button@1 { -+ label = "Left Joystick Right"; -+ linux,code = ; -+ linux,input-type = ; -+ linux,input-value = <1>; -+ gpios = <&pio 0 5 GPIO_ACTIVE_LOW>; /* PA5 */ -+ }; -+ -+ button@2 { -+ label = "Left Joystick Up"; -+ linux,code = ; -+ linux,input-type = ; -+ linux,input-value = <0xffffffff>; /* -1 */ -+ gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */ -+ }; -+ -+ button@3 { -+ label = "Left Joystick Down"; -+ linux,code = ; -+ linux,input-type = ; -+ linux,input-value = <1>; -+ gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */ -+ }; -+ -+ button@4 { -+ label = "Right Joystick Left"; -+ linux,code = ; -+ linux,input-type = ; -+ linux,input-value = <0xffffffff>; /* -1 */ -+ gpios = <&pio 0 1 GPIO_ACTIVE_LOW>; /* PA1 */ -+ }; -+ -+ button@5 { -+ label = "Right Joystick Right"; -+ linux,code = ; -+ linux,input-type = ; -+ linux,input-value = <1>; -+ gpios = <&pio 0 0 GPIO_ACTIVE_LOW>; /* PA0 */ -+ }; -+ -+ button@6 { -+ label = "Right Joystick Up"; -+ linux,code = ; -+ linux,input-type = ; -+ linux,input-value = <0xffffffff>; /* -1 */ -+ gpios = <&pio 0 3 GPIO_ACTIVE_LOW>; /* PA3 */ -+ }; -+ -+ button@7 { -+ label = "Right Joystick Down"; -+ linux,code = ; -+ linux,input-type = ; -+ linux,input-value = <1>; -+ gpios = <&pio 0 4 GPIO_ACTIVE_LOW>; /* PA4 */ -+ }; -+ -+ button@8 { -+ label = "DPad Left"; -+ linux,code = ; -+ linux,input-type = ; -+ linux,input-value = <0xffffffff>; /* -1 */ -+ gpios = <&pio 7 23 GPIO_ACTIVE_LOW>; /* PH23 */ -+ }; -+ -+ button@9 { -+ label = "DPad Right"; -+ linux,code = ; -+ linux,input-type = ; -+ linux,input-value = <1>; -+ gpios = <&pio 7 24 GPIO_ACTIVE_LOW>; /* PH24 */ -+ }; -+ -+ button@10 { -+ label = "DPad Up"; -+ linux,code = ; -+ linux,input-type = ; -+ linux,input-value = <0xffffffff>; /* -1 */ -+ gpios = <&pio 7 25 GPIO_ACTIVE_LOW>; /* PH25 */ -+ }; -+ -+ button@11 { -+ label = "DPad Down"; -+ linux,code = ; -+ linux,input-type = ; -+ linux,input-value = <1>; -+ gpios = <&pio 7 26 GPIO_ACTIVE_LOW>; /* PH26 */ -+ }; -+ -+ button@12 { -+ label = "Button X"; -+ linux,code = ; -+ gpios = <&pio 0 16 GPIO_ACTIVE_LOW>; /* PA16 */ -+ }; -+ -+ button@13 { -+ label = "Button Y"; -+ linux,code = ; -+ gpios = <&pio 0 14 GPIO_ACTIVE_LOW>; /* PA14 */ -+ }; -+ -+ button@14 { -+ label = "Button A"; -+ linux,code = ; -+ gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */ -+ }; -+ -+ button@15 { -+ label = "Button B"; -+ linux,code = ; -+ gpios = <&pio 0 15 GPIO_ACTIVE_LOW>; /* PA15 */ -+ }; -+ -+ button@16 { -+ label = "Select Button"; -+ linux,code = ; -+ gpios = <&pio 0 11 GPIO_ACTIVE_LOW>; /* PA11 */ -+ }; -+ -+ button@17 { -+ label = "Start Button"; -+ linux,code = ; -+ gpios = <&pio 0 12 GPIO_ACTIVE_LOW>; /* PA12 */ -+ }; -+ -+ button@18 { -+ label = "Top Left Button"; -+ linux,code = ; -+ gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 */ -+ }; -+ -+ button@19 { -+ label = "Top Right Button"; -+ linux,code = ; -+ gpios = <&pio 0 13 GPIO_ACTIVE_LOW>; /* PA13 */ -+ }; -+ }; - }; - - &cpu0 { -@@ -86,12 +239,29 @@ - pinctrl-names = "default"; - pinctrl-0 = <&i2c1_pins_a>; - status = "okay"; -+ -+ /* Accelerometer */ -+ bma250@18 { -+ compatible = "bosch,bma250"; -+ reg = <0x18>; -+ interrupt-parent = <&pio>; -+ interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */ -+ }; - }; - - &i2c2 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c2_pins_a>; - status = "okay"; -+ -+ ft5406ee8: touchscreen@38 { -+ compatible = "edt,edt-ft5406"; -+ reg = <0x38>; -+ interrupt-parent = <&pio>; -+ interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; -+ touchscreen-size-x = <800>; -+ touchscreen-size-y = <480>; -+ }; - }; - - &lradc { -@@ -149,6 +319,17 @@ - }; - - &pio { -+ key_pins_inet9f: key_pins@0 { -+ allwinner,pins = "PA0", "PA1", "PA3", "PA4", -+ "PA5", "PA6", "PA8", "PA9", -+ "PA11", "PA12", "PA13", -+ "PA14", "PA15", "PA16", "PA17", -+ "PH22", "PH23", "PH24", "PH25", "PH26"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ - usb0_id_detect_pin: usb0_id_detect_pin@0 { - allwinner,pins = "PH4"; - allwinner,function = "gpio_in"; ---- a/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts -+++ b/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts -@@ -1,5 +1,6 @@ - /* - * Copyright 2015 Josef Gajdusek -+ * Copyright 2015 - Marcus Cooper - * - * This file is dual-licensed: you can use it either under the terms - * of the GPL or the X11 license, at your option. Note that this dual -@@ -42,22 +43,11 @@ - - /dts-v1/; - #include "sun4i-a10.dtsi" --#include "sunxi-common-regulators.dtsi" -- --#include --#include -+#include "sunxi-itead-core-common.dtsi" - - / { - model = "Iteaduino Plus A10"; - compatible = "itead,iteaduino-plus-a10", "allwinner,sun4i-a10"; -- -- aliases { -- serial0 = &uart0; -- }; -- -- chosen { -- stdout-path = "serial0:115200n8"; -- }; - }; - - &ahci { -@@ -65,18 +55,6 @@ - status = "okay"; - }; - --&cpu0 { -- cpu-supply = <®_dcdc2>; --}; -- --&ehci0 { -- status = "okay"; --}; -- --&ehci1 { -- status = "okay"; --}; -- - &emac { - pinctrl-names = "default"; - pinctrl-0 = <&emac_pins_a>; -@@ -89,12 +67,7 @@ - }; - - &i2c0 { -- pinctrl-names = "default"; -- pinctrl-0 = <&i2c0_pins_a>; -- status = "okay"; -- - axp209: pmic@34 { -- reg = <0x34>; - interrupts = <0>; - }; - }; -@@ -135,68 +108,13 @@ - status = "okay"; - }; - --&ohci0 { -- status = "okay"; --}; -- --&ohci1 { -- status = "okay"; --}; -- - ®_ahci_5v { - status = "okay"; - }; - --#include "axp209.dtsi" -- --®_dcdc2 { -- regulator-always-on; -- regulator-min-microvolt = <1000000>; -- regulator-max-microvolt = <1450000>; -- regulator-name = "vdd-cpu"; --}; -- --®_dcdc3 { -- regulator-always-on; -- regulator-min-microvolt = <1000000>; -- regulator-max-microvolt = <1400000>; -- regulator-name = "vdd-int-dll"; --}; -- --®_ldo1 { -- regulator-name = "vdd-rtc"; --}; -- --®_ldo2 { -- regulator-always-on; -- regulator-min-microvolt = <3000000>; -- regulator-max-microvolt = <3000000>; -- regulator-name = "avcc"; --}; -- --®_usb1_vbus { -- status = "okay"; --}; -- --®_usb2_vbus { -- status = "okay"; --}; -- - &spi0 { - pinctrl-names = "default"; - pinctrl-0 = <&spi0_pins_a>, - <&spi0_cs0_pins_a>; - status = "okay"; - }; -- --&uart0 { -- pinctrl-names = "default"; -- pinctrl-0 = <&uart0_pins_a>; -- status = "okay"; --}; -- --&usbphy { -- usb1_vbus-supply = <®_usb1_vbus>; -- usb2_vbus-supply = <®_usb2_vbus>; -- status = "okay"; --}; ---- a/arch/arm/dts/sun4i-a10-jesurun-q5.dts -+++ b/arch/arm/dts/sun4i-a10-jesurun-q5.dts -@@ -156,6 +156,10 @@ - status = "okay"; - }; - -+&otg_sram { -+ status = "okay"; -+}; -+ - &pio { - emac_power_pin_q5: emac_power_pin@0 { - allwinner,pins = "PH19"; -@@ -172,6 +176,11 @@ - }; - }; - -+®_usb0_vbus { -+ regulator-boot-on; -+ status = "okay"; -+}; -+ - ®_usb1_vbus { - status = "okay"; - }; -@@ -186,7 +195,13 @@ - status = "okay"; - }; - -+&usb_otg { -+ dr_mode = "host"; -+ status = "okay"; -+}; -+ - &usbphy { -+ usb0_vbus-supply = <®_usb0_vbus>; - usb1_vbus-supply = <®_usb1_vbus>; - usb2_vbus-supply = <®_usb2_vbus>; - status = "okay"; ---- a/arch/arm/dts/sun4i-a10-marsboard.dts -+++ b/arch/arm/dts/sun4i-a10-marsboard.dts -@@ -91,6 +91,10 @@ - status = "okay"; - }; - -+&codec { -+ status = "okay"; -+}; -+ - &ehci0 { - status = "okay"; - }; -@@ -154,6 +158,10 @@ - status = "okay"; - }; - -+&otg_sram { -+ status = "okay"; -+}; -+ - &pio { - led_pins_marsboard: led_pins@0 { - allwinner,pins = "PB5", "PB6", "PB7", "PB8"; -@@ -161,6 +169,13 @@ - allwinner,drive = ; - allwinner,pull = ; - }; -+ -+ usb0_id_detect_pin: usb0_id_detect_pin@0 { -+ allwinner,pins = "PH4"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; - }; - - ®_usb1_vbus { -@@ -184,7 +199,15 @@ - status = "okay"; - }; - -+&usb_otg { -+ dr_mode = "otg"; -+ status = "okay"; -+}; -+ - &usbphy { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&usb0_id_detect_pin>; -+ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ - usb1_vbus-supply = <®_usb1_vbus>; - usb2_vbus-supply = <®_usb2_vbus>; - status = "okay"; ---- a/arch/arm/dts/sun4i-a10-mk802.dts -+++ b/arch/arm/dts/sun4i-a10-mk802.dts -@@ -44,6 +44,7 @@ - #include "sun4i-a10.dtsi" - #include "sunxi-common-regulators.dtsi" - #include -+#include - - / { - model = "MK802"; -@@ -58,6 +59,10 @@ - }; - }; - -+&codec { -+ status = "okay"; -+}; -+ - &ehci0 { - status = "okay"; - }; -@@ -80,7 +85,25 @@ - status = "okay"; - }; - -+&otg_sram { -+ status = "okay"; -+}; -+ - &pio { -+ usb0_id_detect_pin: usb0_id_detect_pin@0 { -+ allwinner,pins = "PH4"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { -+ allwinner,pins = "PH5"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ - usb2_vbus_pin_mk802: usb2_vbus_pin@0 { - allwinner,pins = "PH12"; - allwinner,function = "gpio_out"; -@@ -89,6 +112,10 @@ - }; - }; - -+®_usb0_vbus { -+ status = "okay"; -+}; -+ - ®_usb1_vbus { - status = "okay"; - }; -@@ -105,7 +132,17 @@ - status = "okay"; - }; - -+&usb_otg { -+ dr_mode = "otg"; -+ status = "okay"; -+}; -+ - &usbphy { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; -+ usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ -+ usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ -+ usb0_vbus-supply = <®_usb0_vbus>; - usb1_vbus-supply = <®_usb1_vbus>; - usb2_vbus-supply = <®_usb2_vbus>; - status = "okay"; ---- a/arch/arm/dts/sun4i-a10-olinuxino-lime.dts -+++ b/arch/arm/dts/sun4i-a10-olinuxino-lime.dts -@@ -124,6 +124,18 @@ - }; - }; - -+&i2c1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c1_pins_a>; -+ status = "okay"; -+ -+ eeprom: eeprom@50 { -+ compatible = "atmel,24c16"; -+ reg = <0x50>; -+ pagesize = <16>; -+ }; -+}; -+ - &mdio { - status = "okay"; - ---- a/arch/arm/dts/sun4i-a10-pcduino.dts -+++ b/arch/arm/dts/sun4i-a10-pcduino.dts -@@ -104,6 +104,10 @@ - }; - }; - -+&cpu0 { -+ cpu-supply = <®_dcdc2>; -+}; -+ - &ehci0 { - status = "okay"; - }; -@@ -129,12 +133,8 @@ - status = "okay"; - - axp209: pmic@34 { -- compatible = "x-powers,axp209"; - reg = <0x34>; - interrupts = <0>; -- -- interrupt-controller; -- #interrupt-cells = <1>; - }; - }; - -@@ -164,6 +164,10 @@ - status = "okay"; - }; - -+&otg_sram { -+ status = "okay"; -+}; -+ - &pio { - led_pins_pcduino: led_pins@0 { - allwinner,pins = "PH15", "PH16"; -@@ -178,14 +182,40 @@ - allwinner,drive = ; - allwinner,pull = ; - }; -+ -+ usb0_id_detect_pin: usb0_id_detect_pin@0 { -+ allwinner,pins = "PH4"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; - }; - --®_usb1_vbus { -- status = "okay"; -+#include "axp209.dtsi" -+ -+®_dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-cpu"; - }; - --®_usb2_vbus { -- status = "okay"; -+®_dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-int-dll"; -+}; -+ -+®_ldo1 { -+ regulator-name = "vdd-rtc"; -+}; -+ -+®_ldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "avcc"; - }; - - &uart0 { -@@ -194,8 +224,16 @@ - status = "okay"; - }; - -+&usb_otg { -+ dr_mode = "otg"; -+ status = "okay"; -+}; -+ - &usbphy { -- usb1_vbus-supply = <®_usb1_vbus>; -- usb2_vbus-supply = <®_usb2_vbus>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&usb0_id_detect_pin>; -+ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ -+ usb1_vbus-supply = <®_vcc5v0>; /* USB1 VBUS is always on */ -+ usb2_vbus-supply = <®_vcc5v0>; /* USB2 VBUS is always on */ - status = "okay"; - }; ---- /dev/null -+++ b/arch/arm/dts/sun4i-a10-pcduino2.dts -@@ -0,0 +1,78 @@ -+/* -+ * Copyright 2015 Siarhei Siamashka -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) This file 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; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+/* -+ * The LinkSprite pcDuino2 board is almost identical to the older -+ * LinkSprite pcDuino1 board. The only software visible difference -+ * is that the pcDuino2 board got a USB VBUS voltage regulator, which -+ * is controlled by the PD2 pin (pulled-up by default). Also one of -+ * the USB host ports has been replaced with a USB WIFI chip. -+ */ -+ -+#include "sun4i-a10-pcduino.dts" -+ -+/ { -+ model = "LinkSprite pcDuino2"; -+ compatible = "linksprite,a10-pcduino2", "allwinner,sun4i-a10"; -+}; -+ -+&pio { -+ usb2_vbus_pin_pcduino2: usb2_vbus_pin@0 { -+ allwinner,pins = "PD2"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+}; -+ -+®_usb2_vbus { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&usb2_vbus_pin_pcduino2>; -+ gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>; -+ status = "okay"; -+}; -+ -+&usbphy { -+ usb1_vbus-supply = <®_vcc3v3>; /* USB WIFI is always on */ -+ usb2_vbus-supply = <®_usb2_vbus>; -+ status = "okay"; -+}; ---- a/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts -+++ b/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts -@@ -47,6 +47,7 @@ - #include - #include - #include -+#include - - / { - model = "Point of View Protab2-IPS9"; -@@ -56,11 +57,28 @@ - serial0 = &uart0; - }; - -+ backlight: backlight { -+ compatible = "pwm-backlight"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&bl_en_pin_protab>; -+ pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; -+ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; -+ default-brightness-level = <8>; -+ enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ -+ }; -+ - chosen { - stdout-path = "serial0:115200n8"; - }; - }; - -+&codec { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&codec_pa_pin>; -+ allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */ -+ status = "okay"; -+}; -+ - &cpu0 { - cpu-supply = <®_dcdc2>; - }; -@@ -86,12 +104,36 @@ - pinctrl-names = "default"; - pinctrl-0 = <&i2c1_pins_a>; - status = "okay"; -+ -+ /* Accelerometer */ -+ bma250@18 { -+ compatible = "bosch,bma250"; -+ reg = <0x18>; -+ interrupt-parent = <&pio>; -+ interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */ -+ }; - }; - - &i2c2 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c2_pins_a>; - status = "okay"; -+ -+ pixcir_ts@5c { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&touchscreen_pins>; -+ compatible = "pixcir,pixcir_tangoc"; -+ reg = <0x5c>; -+ interrupt-parent = <&pio>; -+ interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */ -+ attb-gpio = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* PH21 */ -+ enable-gpios = <&pio 0 5 GPIO_ACTIVE_LOW>; -+ wake-gpios = <&pio 1 13 GPIO_ACTIVE_LOW>; -+ touchscreen-size-x = <1024>; -+ touchscreen-size-y = <768>; -+ touchscreen-inverted-x; -+ touchscreen-inverted-y; -+ }; - }; - - &lradc { -@@ -128,6 +170,27 @@ - }; - - &pio { -+ bl_en_pin_protab: bl_en_pin@0 { -+ allwinner,pins = "PH7"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ codec_pa_pin: codec_pa_pin@0 { -+ allwinner,pins = "PH15"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ touchscreen_pins: touchscreen_pins@0 { -+ allwinner,pins = "PA5", "PB13"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ - usb0_id_detect_pin: usb0_id_detect_pin@0 { - allwinner,pins = "PH4"; - allwinner,function = "gpio_in"; -@@ -143,6 +206,12 @@ - }; - }; - -+&pwm { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pwm0_pins_a>; -+ status = "okay"; -+}; -+ - ®_dcdc2 { - regulator-always-on; - regulator-min-microvolt = <1000000>; ---- a/arch/arm/dts/sun4i-a10.dtsi -+++ b/arch/arm/dts/sun4i-a10.dtsi -@@ -45,6 +45,7 @@ - - #include - -+#include - #include - #include - -@@ -65,7 +66,7 @@ - "simple-framebuffer"; - allwinner,pipeline = "de_be0-lcd0-hdmi"; - clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>, -- <&ahb_gates 44>; -+ <&ahb_gates 44>, <&dram_gates 26>; - status = "disabled"; - }; - -@@ -74,7 +75,8 @@ - "simple-framebuffer"; - allwinner,pipeline = "de_fe0-de_be0-lcd0-hdmi"; - clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>, -- <&ahb_gates 44>, <&ahb_gates 46>; -+ <&ahb_gates 44>, <&ahb_gates 46>, -+ <&dram_gates 25>, <&dram_gates 26>; - status = "disabled"; - }; - -@@ -83,7 +85,8 @@ - "simple-framebuffer"; - allwinner,pipeline = "de_fe0-de_be0-lcd0"; - clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>, -- <&ahb_gates 46>; -+ <&ahb_gates 46>, <&dram_gates 25>, -+ <&dram_gates 26>; - status = "disabled"; - }; - -@@ -92,7 +95,8 @@ - "simple-framebuffer"; - allwinner,pipeline = "de_fe0-de_be0-lcd0-tve0"; - clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>, -- <&ahb_gates 44>, <&ahb_gates 46>; -+ <&ahb_gates 44>, <&ahb_gates 46>, -+ <&dram_gates 25>, <&dram_gates 26>; - status = "disabled"; - }; - }; -@@ -195,6 +199,15 @@ - clock-output-names = "pll1"; - }; - -+ pll2: clk@01c20008 { -+ #clock-cells = <1>; -+ compatible = "allwinner,sun4i-a10-pll2-clk"; -+ reg = <0x01c20008 0x8>; -+ clocks = <&osc24M>; -+ clock-output-names = "pll2-1x", "pll2-2x", -+ "pll2-4x", "pll2-8x"; -+ }; -+ - pll4: clk@01c20018 { - #clock-cells = <0>; - compatible = "allwinner,sun4i-a10-pll1-clk"; -@@ -241,6 +254,7 @@ - compatible = "allwinner,sun4i-a10-axi-gates-clk"; - reg = <0x01c2005c 0x4>; - clocks = <&axi>; -+ clock-indices = <0>; - clock-output-names = "axi_dram"; - }; - -@@ -257,17 +271,36 @@ - compatible = "allwinner,sun4i-a10-ahb-gates-clk"; - reg = <0x01c20060 0x8>; - clocks = <&ahb>; -+ clock-indices = <0>, <1>, -+ <2>, <3>, -+ <4>, <5>, <6>, -+ <7>, <8>, <9>, -+ <10>, <11>, <12>, -+ <13>, <14>, <16>, -+ <17>, <18>, <20>, -+ <21>, <22>, <23>, -+ <24>, <25>, <26>, -+ <32>, <33>, <34>, -+ <35>, <36>, <37>, -+ <40>, <41>, <43>, -+ <44>, <45>, -+ <46>, <47>, -+ <50>, <52>; - clock-output-names = "ahb_usb0", "ahb_ehci0", -- "ahb_ohci0", "ahb_ehci1", "ahb_ohci1", "ahb_ss", -- "ahb_dma", "ahb_bist", "ahb_mmc0", "ahb_mmc1", -- "ahb_mmc2", "ahb_mmc3", "ahb_ms", "ahb_nand", -- "ahb_sdram", "ahb_ace", "ahb_emac", "ahb_ts", -- "ahb_spi0", "ahb_spi1", "ahb_spi2", "ahb_spi3", -- "ahb_pata", "ahb_sata", "ahb_gps", "ahb_ve", -- "ahb_tvd", "ahb_tve0", "ahb_tve1", "ahb_lcd0", -- "ahb_lcd1", "ahb_csi0", "ahb_csi1", "ahb_hdmi", -- "ahb_de_be0", "ahb_de_be1", "ahb_de_fe0", -- "ahb_de_fe1", "ahb_mp", "ahb_mali400"; -+ "ahb_ohci0", "ahb_ehci1", -+ "ahb_ohci1", "ahb_ss", "ahb_dma", -+ "ahb_bist", "ahb_mmc0", "ahb_mmc1", -+ "ahb_mmc2", "ahb_mmc3", "ahb_ms", -+ "ahb_nand", "ahb_sdram", "ahb_ace", -+ "ahb_emac", "ahb_ts", "ahb_spi0", -+ "ahb_spi1", "ahb_spi2", "ahb_spi3", -+ "ahb_pata", "ahb_sata", "ahb_gps", -+ "ahb_ve", "ahb_tvd", "ahb_tve0", -+ "ahb_tve1", "ahb_lcd0", "ahb_lcd1", -+ "ahb_csi0", "ahb_csi1", "ahb_hdmi", -+ "ahb_de_be0", "ahb_de_be1", -+ "ahb_de_fe0", "ahb_de_fe1", -+ "ahb_mp", "ahb_mali400"; - }; - - apb0: apb0@01c20054 { -@@ -283,9 +316,14 @@ - compatible = "allwinner,sun4i-a10-apb0-gates-clk"; - reg = <0x01c20068 0x4>; - clocks = <&apb0>; -+ clock-indices = <0>, <1>, -+ <2>, <3>, -+ <5>, <6>, -+ <7>, <10>; - clock-output-names = "apb0_codec", "apb0_spdif", -- "apb0_ac97", "apb0_iis", "apb0_pio", "apb0_ir0", -- "apb0_ir1", "apb0_keypad"; -+ "apb0_ac97", "apb0_iis", -+ "apb0_pio", "apb0_ir0", -+ "apb0_ir1", "apb0_keypad"; - }; - - apb1: clk@01c20058 { -@@ -301,12 +339,22 @@ - compatible = "allwinner,sun4i-a10-apb1-gates-clk"; - reg = <0x01c2006c 0x4>; - clocks = <&apb1>; -+ clock-indices = <0>, <1>, -+ <2>, <4>, -+ <5>, <6>, -+ <7>, <16>, -+ <17>, <18>, -+ <19>, <20>, -+ <21>, <22>, -+ <23>; - clock-output-names = "apb1_i2c0", "apb1_i2c1", -- "apb1_i2c2", "apb1_can", "apb1_scr", -- "apb1_ps20", "apb1_ps21", "apb1_uart0", -- "apb1_uart1", "apb1_uart2", "apb1_uart3", -- "apb1_uart4", "apb1_uart5", "apb1_uart6", -- "apb1_uart7"; -+ "apb1_i2c2", "apb1_can", -+ "apb1_scr", "apb1_ps20", -+ "apb1_ps21", "apb1_uart0", -+ "apb1_uart1", "apb1_uart2", -+ "apb1_uart3", "apb1_uart4", -+ "apb1_uart5", "apb1_uart6", -+ "apb1_uart7"; - }; - - nand_clk: clk@01c20080 { -@@ -446,6 +494,48 @@ - clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; - clock-output-names = "spi3"; - }; -+ -+ dram_gates: clk@01c20100 { -+ #clock-cells = <1>; -+ compatible = "allwinner,sun4i-a10-dram-gates-clk"; -+ reg = <0x01c20100 0x4>; -+ clocks = <&pll5 0>; -+ clock-indices = <0>, -+ <1>, <2>, -+ <3>, -+ <4>, -+ <5>, <6>, -+ <15>, -+ <24>, <25>, -+ <26>, <27>, -+ <28>, <29>; -+ clock-output-names = "dram_ve", -+ "dram_csi0", "dram_csi1", -+ "dram_ts", -+ "dram_tvd", -+ "dram_tve0", "dram_tve1", -+ "dram_output", -+ "dram_de_fe1", "dram_de_fe0", -+ "dram_de_be0", "dram_de_be1", -+ "dram_de_mp", "dram_ace"; -+ }; -+ -+ ve_clk: clk@01c2013c { -+ #clock-cells = <0>; -+ #reset-cells = <0>; -+ compatible = "allwinner,sun4i-a10-ve-clk"; -+ reg = <0x01c2013c 0x4>; -+ clocks = <&pll4>; -+ clock-output-names = "ve"; -+ }; -+ -+ codec_clk: clk@01c20140 { -+ #clock-cells = <0>; -+ compatible = "allwinner,sun4i-a10-codec-clk"; -+ reg = <0x01c20140 0x4>; -+ clocks = <&pll2 SUN4I_A10_PLL2_1X>; -+ clock-output-names = "codec"; -+ }; - }; - - soc@01c00000 { -@@ -656,6 +746,14 @@ - status = "disabled"; - }; - -+ crypto: crypto-engine@01c15000 { -+ compatible = "allwinner,sun4i-a10-crypto"; -+ reg = <0x01c15000 0x1000>; -+ interrupts = <86>; -+ clocks = <&ahb_gates 5>, <&ss_clk>; -+ clock-names = "ahb", "mod"; -+ }; -+ - spi2: spi@01c17000 { - compatible = "allwinner,sun4i-a10-spi"; - reg = <0x01c17000 0x1000>; -@@ -961,6 +1059,19 @@ - status = "disabled"; - }; - -+ codec: codec@01c22c00 { -+ #sound-dai-cells = <0>; -+ compatible = "allwinner,sun4i-a10-codec"; -+ reg = <0x01c22c00 0x40>; -+ interrupts = <30>; -+ clocks = <&apb0_gates 0>, <&codec_clk>; -+ clock-names = "apb", "codec"; -+ dmas = <&dma SUN4I_DMA_NORMAL 19>, -+ <&dma SUN4I_DMA_NORMAL 19>; -+ dma-names = "rx", "tx"; -+ status = "disabled"; -+ }; -+ - sid: eeprom@01c23800 { - compatible = "allwinner,sun4i-a10-sid"; - reg = <0x01c23800 0x10>; ---- a/arch/arm/dts/sun5i-a10s-auxtek-t004.dts -+++ b/arch/arm/dts/sun5i-a10s-auxtek-t004.dts -@@ -86,6 +86,20 @@ - status = "okay"; - }; - -+&i2c0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c0_pins_a>; -+ status = "okay"; -+ -+ axp152: pmic@30 { -+ compatible = "x-powers,axp152"; -+ reg = <0x30>; -+ interrupts = <0>; -+ interrupt-controller; -+ #interrupt-cells = <1>; -+ }; -+}; -+ - &mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_t004>; ---- a/arch/arm/dts/sun5i-a10s-olinuxino-micro.dts -+++ b/arch/arm/dts/sun5i-a10s-olinuxino-micro.dts -@@ -111,7 +111,7 @@ - status = "okay"; - - at24@50 { -- compatible = "at,24c16"; -+ compatible = "atmel,24c16"; - pagesize = <16>; - reg = <0x50>; - read-only; ---- a/arch/arm/dts/sun5i-a13-empire-electronix-d709.dts -+++ b/arch/arm/dts/sun5i-a13-empire-electronix-d709.dts -@@ -123,7 +123,7 @@ - - &mmc0 { - pinctrl-names = "default"; -- pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_inet98fv2>; -+ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_d709>; - vmmc-supply = <®_vcc3v3>; - bus-width = <4>; - cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */ -@@ -131,27 +131,12 @@ - status = "okay"; - }; - --&mmc2 { -- pinctrl-names = "default"; -- pinctrl-0 = <&mmc2_pins_a>; -- vmmc-supply = <®_vcc3v3>; -- bus-width = <8>; -- non-removable; -- status = "okay"; -- -- mmccard: mmccard@0 { -- reg = <0>; -- compatible = "mmc-card"; -- broken-hpi; -- }; --}; -- - &otg_sram { - status = "okay"; - }; - - &pio { -- mmc0_cd_pin_inet98fv2: mmc0_cd_pin@0 { -+ mmc0_cd_pin_d709: mmc0_cd_pin@0 { - allwinner,pins = "PG0"; - allwinner,function = "gpio_in"; - allwinner,drive = ; ---- a/arch/arm/dts/sun5i-a13-inet-98v-rev2.dts -+++ b/arch/arm/dts/sun5i-a13-inet-98v-rev2.dts -@@ -123,21 +123,6 @@ - status = "okay"; - }; - --&mmc2 { -- pinctrl-names = "default"; -- pinctrl-0 = <&mmc2_pins_a>; -- vmmc-supply = <®_vcc3v3>; -- bus-width = <8>; -- non-removable; -- status = "okay"; -- -- mmccard: mmccard@0 { -- reg = <0>; -- compatible = "mmc-card"; -- broken-hpi; -- }; --}; -- - &otg_sram { - status = "okay"; - }; -@@ -201,11 +186,6 @@ - status = "okay"; - }; - --®_usb1_vbus { -- gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */ -- status = "okay"; --}; -- - &uart1 { - pinctrl-names = "default"; - pinctrl-0 = <&uart1_pins_b>; -@@ -221,16 +201,12 @@ - allwinner,pins = "PG12"; - }; - --&usb1_vbus_pin_a { -- allwinner,pins = "PG11"; --}; -- - &usbphy { - pinctrl-names = "default"; - pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; - usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */ - usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */ - usb0_vbus-supply = <®_usb0_vbus>; -- usb1_vbus-supply = <®_usb1_vbus>; -+ usb1_vbus-supply = <®_ldo3>; - status = "okay"; - }; ---- a/arch/arm/dts/sun5i-a13-utoo-p66.dts -+++ b/arch/arm/dts/sun5i-a13-utoo-p66.dts -@@ -47,11 +47,21 @@ - #include - #include - #include -+#include - - / { - model = "Utoo P66"; - compatible = "utoo,p66", "allwinner,sun5i-a13"; - -+ backlight: backlight { -+ compatible = "pwm-backlight"; -+ pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; -+ /* Note levels of 10 / 20% result in backlight off */ -+ brightness-levels = <0 30 40 50 60 70 80 90 100>; -+ default-brightness-level = <6>; -+ /* TODO: backlight uses axp gpio1 as enable pin */ -+ }; -+ - i2c_lcd: i2c@0 { - /* The lcd panel i2c interface is hooked up via gpios */ - compatible = "i2c-gpio"; -@@ -63,6 +73,13 @@ - }; - }; - -+&codec { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&codec_pa_pin>; -+ allwinner,pa-gpios = <&pio 6 3 GPIO_ACTIVE_HIGH>; /* PG3 */ -+ status = "okay"; -+}; -+ - &cpu0 { - cpu-supply = <®_dcdc2>; - }; -@@ -158,6 +175,13 @@ - }; - - &pio { -+ codec_pa_pin: codec_pa_pin@0 { -+ allwinner,pins = "PG3"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ - mmc0_cd_pin_p66: mmc0_cd_pin@0 { - allwinner,pins = "PG0"; - allwinner,function = "gpio_in"; -@@ -201,6 +225,12 @@ - }; - }; - -+&pwm { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pwm0_pins>; -+ status = "okay"; -+}; -+ - ®_dcdc2 { - regulator-always-on; - regulator-min-microvolt = <1000000>; ---- a/arch/arm/dts/sun5i-q8-common.dtsi -+++ b/arch/arm/dts/sun5i-q8-common.dtsi -@@ -41,11 +41,21 @@ - */ - #include "sunxi-q8-common.dtsi" - -+#include -+ - / { - aliases { - serial0 = &uart1; - }; - -+ backlight: backlight { -+ compatible = "pwm-backlight"; -+ pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; -+ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; -+ default-brightness-level = <8>; -+ /* TODO: backlight uses axp gpio1 as enable pin */ -+ }; -+ - chosen { - stdout-path = "serial0:115200n8"; - }; ---- a/arch/arm/dts/sun5i-r8-chip.dts -+++ b/arch/arm/dts/sun5i-r8-chip.dts -@@ -64,6 +64,26 @@ - chosen { - stdout-path = "serial0:115200n8"; - }; -+ -+ wifi_reg_on: wifi_reg_on { -+ compatible = "regulator-fixed"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&chip_wifi_reg_on_pin>; -+ -+ regulator-name = "wifi-reg-on"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&pio 2 19 GPIO_ACTIVE_HIGH>; /* PC19 */ -+ enable-active-high; -+ }; -+}; -+ -+&codec { -+ status = "okay"; -+}; -+ -+&cpu0 { -+ cpu-supply = <®_dcdc2>; - }; - - &ehci0 { -@@ -109,10 +129,14 @@ - }; - }; - -+&mmc0_pins_a { -+ allwinner,pull = ; -+}; -+ - &mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>; -- vmmc-supply = <®_vcc3v3>; -+ vmmc-supply = <&wifi_reg_on>; - bus-width = <4>; - non-removable; - status = "okay"; -@@ -134,6 +158,13 @@ - allwinner,pull = ; - }; - -+ chip_wifi_reg_on_pin: chip_wifi_reg_on_pin@0 { -+ allwinner,pins = "PC19"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ - chip_id_det_pin: chip_id_det_pin@0 { - allwinner,pins = "PG2"; - allwinner,function = "gpio_in"; -@@ -167,6 +198,20 @@ - regulator-always-on; - }; - -+®_ldo3 { -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vdd-wifi1"; -+ regulator-always-on; -+}; -+ -+®_ldo4 { -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vdd-wifi2"; -+ regulator-always-on; -+}; -+ - ®_ldo5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; ---- a/arch/arm/dts/sun5i.dtsi -+++ b/arch/arm/dts/sun5i.dtsi -@@ -44,6 +44,7 @@ - - #include "skeleton.dtsi" - -+#include - #include - #include - -@@ -102,6 +103,15 @@ - clock-output-names = "pll1"; - }; - -+ pll2: clk@01c20008 { -+ #clock-cells = <1>; -+ compatible = "allwinner,sun5i-a13-pll2-clk"; -+ reg = <0x01c20008 0x8>; -+ clocks = <&osc24M>; -+ clock-output-names = "pll2-1x", "pll2-2x", -+ "pll2-4x", "pll2-8x"; -+ }; -+ - pll4: clk@01c20018 { - #clock-cells = <0>; - compatible = "allwinner,sun4i-a10-pll1-clk"; -@@ -285,6 +295,14 @@ - clock-output-names = "usb_ohci0", "usb_phy"; - }; - -+ codec_clk: clk@01c20140 { -+ #clock-cells = <0>; -+ compatible = "allwinner,sun4i-a10-codec-clk"; -+ reg = <0x01c20140 0x4>; -+ clocks = <&pll2 SUN4I_A10_PLL2_1X>; -+ clock-output-names = "codec"; -+ }; -+ - mbus_clk: clk@01c2015c { - #clock-cells = <0>; - compatible = "allwinner,sun5i-a13-mbus-clk"; -@@ -571,6 +589,19 @@ - status = "disabled"; - }; - -+ codec: codec@01c22c00 { -+ #sound-dai-cells = <0>; -+ compatible = "allwinner,sun4i-a10-codec"; -+ reg = <0x01c22c00 0x40>; -+ interrupts = <30>; -+ clocks = <&apb0_gates 0>, <&codec_clk>; -+ clock-names = "apb", "codec"; -+ dmas = <&dma SUN4I_DMA_NORMAL 19>, -+ <&dma SUN4I_DMA_NORMAL 19>; -+ dma-names = "rx", "tx"; -+ status = "disabled"; -+ }; -+ - sid: eeprom@01c23800 { - compatible = "allwinner,sun4i-a10-sid"; - reg = <0x01c23800 0x10>; ---- a/arch/arm/dts/sun6i-a31-colombus.dts -+++ b/arch/arm/dts/sun6i-a31-colombus.dts -@@ -60,6 +60,16 @@ - chosen { - stdout-path = "serial0:115200n8"; - }; -+ -+ i2c_lcd: i2c@0 { -+ /* The lcd panel i2c interface is hooked up via gpios */ -+ compatible = "i2c-gpio"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c_lcd_pins>; -+ gpios = <&pio 0 23 GPIO_ACTIVE_HIGH>, /* PA23, sda */ -+ <&pio 0 24 GPIO_ACTIVE_HIGH>; /* PA24, scl */ -+ i2c-gpio,delay-us = <5>; -+ }; - }; - - &ehci1 { -@@ -94,6 +104,13 @@ - pinctrl-names = "default"; - pinctrl-0 = <&i2c2_pins_a>; - status = "okay"; -+ -+ mma8452: mma8452@1d { -+ compatible = "fsl,mma8452"; -+ reg = <0x1d>; -+ interrupt-parent = <&pio>; -+ interrupts = <0 9 IRQ_TYPE_LEVEL_LOW>; /* PA9 */ -+ }; - }; - - &mmc0 { -@@ -124,6 +141,13 @@ - allwinner,drive = ; - allwinner,pull = ; - }; -+ -+ i2c_lcd_pins: i2c_lcd_pin@0 { -+ allwinner,pins = "PA23", "PA24"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; - }; - - ®_usb2_vbus { ---- a/arch/arm/dts/sun6i-a31-hummingbird.dts -+++ b/arch/arm/dts/sun6i-a31-hummingbird.dts -@@ -54,6 +54,8 @@ - compatible = "merrii,a31-hummingbird", "allwinner,sun6i-a31"; - - aliases { -+ rtc0 = &pcf8563; -+ rtc1 = &rtc; - serial0 = &uart0; - }; - -@@ -67,13 +69,17 @@ - }; - }; - -+&cpu0 { -+ cpu-supply = <®_dcdc3>; -+}; -+ - &ehci0 { - status = "okay"; - }; - - &gmac { - pinctrl-names = "default"; -- pinctrl-0 = <&gmac_pins_rgmii_a>; -+ pinctrl-0 = <&gmac_pins_rgmii_a>, <&gmac_phy_reset_pin_hummingbird>; - phy = <&phy1>; - phy-mode = "rgmii"; - snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>; -@@ -119,7 +125,7 @@ - &mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>; -- vmmc-supply = <&vcc_3v0>; -+ vmmc-supply = <®_dcdc1>; - bus-width = <4>; - cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */ - cd-inverted; -@@ -134,7 +140,7 @@ - &mmc1 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc1_pins_a>, <&wifi_reset_pin_hummingbird>; -- vmmc-supply = <&vcc_wifi>; -+ vmmc-supply = <®_aldo1>; - mmc-pwrseq = <&wifi_pwrseq>; - bus-width = <4>; - non-removable; -@@ -146,6 +152,13 @@ - }; - - &pio { -+ gmac_phy_reset_pin_hummingbird: gmac_phy_reset_pin@0 { -+ allwinner,pins = "PA21"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ - mmc0_cd_pin_hummingbird: mmc0_cd_pin@0 { - allwinner,pins = "PA8"; - allwinner,function = "gpio_in"; -@@ -164,70 +177,69 @@ - &p2wi { - status = "okay"; - -- axp221: pmic@68 { -+ axp22x: pmic@68 { - compatible = "x-powers,axp221"; - reg = <0x68>; - interrupt-parent = <&nmi_intc>; - interrupts = <0 IRQ_TYPE_LEVEL_LOW>; -- interrupt-controller; -- #interrupt-cells = <1>; -- dcdc1-supply = <&vcc_3v0>; -- dcdc5-supply = <&vcc_dram>; -- -- regulators { -- x-powers,dcdc-freq = <3000>; -- -- vcc_3v0: dcdc1 { -- regulator-always-on; -- regulator-min-microvolt = <3000000>; -- regulator-max-microvolt = <3000000>; -- regulator-name = "vcc-3v0"; -- }; -- -- vdd_cpu: dcdc2 { -- regulator-always-on; -- regulator-min-microvolt = <700000>; -- regulator-max-microvolt = <1320000>; -- regulator-name = "vdd-cpu"; -- }; -- -- vdd_gpu: dcdc3 { -- regulator-always-on; -- regulator-min-microvolt = <700000>; -- regulator-max-microvolt = <1320000>; -- regulator-name = "vdd-gpu"; -- }; -- -- vdd_sys_dll: dcdc4 { -- regulator-always-on; -- regulator-min-microvolt = <1100000>; -- regulator-max-microvolt = <1100000>; -- regulator-name = "vdd-sys-dll"; -- }; -- -- vcc_dram: dcdc5 { -- regulator-always-on; -- regulator-min-microvolt = <1500000>; -- regulator-max-microvolt = <1500000>; -- regulator-name = "vcc-dram"; -- }; -- -- vcc_wifi: aldo1 { -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- regulator-name = "vcc_wifi"; -- }; -- -- avcc: aldo3 { -- regulator-always-on; -- regulator-min-microvolt = <3000000>; -- regulator-max-microvolt = <3000000>; -- regulator-name = "avcc"; -- }; -- }; - }; - }; - -+#include "axp22x.dtsi" -+ -+®_aldo1 { -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-wifi"; -+}; -+ -+®_aldo3 { -+ regulator-always-on; -+ regulator-min-microvolt = <2700000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "avcc"; -+}; -+ -+®_dc5ldo { -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <1320000>; -+ regulator-name = "vdd-cpus"; -+}; -+ -+®_dcdc1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "vcc-3v0"; -+}; -+ -+®_dcdc2 { -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <1320000>; -+ regulator-name = "vdd-gpu"; -+}; -+ -+®_dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <1320000>; -+ regulator-name = "vdd-cpu"; -+}; -+ -+®_dcdc4 { -+ regulator-always-on; -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <1320000>; -+ regulator-name = "vdd-sys-dll"; -+}; -+ -+®_dcdc5 { -+ regulator-always-on; -+ regulator-min-microvolt = <1500000>; -+ regulator-max-microvolt = <1500000>; -+ regulator-name = "vcc-dram"; -+}; -+ - ®_usb1_vbus { - gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */ - status = "okay"; ---- a/arch/arm/dts/sun6i-a31.dtsi -+++ b/arch/arm/dts/sun6i-a31.dtsi -@@ -61,7 +61,7 @@ - #size-cells = <1>; - ranges; - -- framebuffer@0 { -+ simplefb_hdmi: framebuffer@0 { - compatible = "allwinner,simple-framebuffer", - "simple-framebuffer"; - allwinner,pipeline = "de_be0-lcd0-hdmi"; -@@ -69,7 +69,7 @@ - status = "disabled"; - }; - -- framebuffer@1 { -+ simplefb_lcd: framebuffer@1 { - compatible = "allwinner,simple-framebuffer", - "simple-framebuffer"; - allwinner,pipeline = "de_be0-lcd0"; -@@ -252,6 +252,20 @@ - compatible = "allwinner,sun6i-a31-ahb1-gates-clk"; - reg = <0x01c20060 0x8>; - clocks = <&ahb1>; -+ clock-indices = <1>, <5>, -+ <6>, <8>, <9>, -+ <10>, <11>, <12>, -+ <13>, <14>, -+ <17>, <18>, <19>, -+ <20>, <21>, <22>, -+ <23>, <24>, <26>, -+ <27>, <29>, -+ <30>, <31>, <32>, -+ <36>, <37>, <40>, -+ <43>, <44>, <45>, -+ <46>, <47>, <50>, -+ <52>, <55>, <56>, -+ <57>, <58>; - clock-output-names = "ahb1_mipidsi", "ahb1_ss", - "ahb1_dma", "ahb1_mmc0", "ahb1_mmc1", - "ahb1_mmc2", "ahb1_mmc3", "ahb1_nand1", -@@ -281,6 +295,9 @@ - compatible = "allwinner,sun6i-a31-apb1-gates-clk"; - reg = <0x01c20068 0x4>; - clocks = <&apb1>; -+ clock-indices = <0>, <4>, -+ <5>, <12>, -+ <13>; - clock-output-names = "apb1_codec", "apb1_digital_mic", - "apb1_pio", "apb1_daudio0", - "apb1_daudio1"; -@@ -299,6 +316,10 @@ - compatible = "allwinner,sun6i-a31-apb2-gates-clk"; - reg = <0x01c2006c 0x4>; - clocks = <&apb2>; -+ clock-indices = <0>, <1>, -+ <2>, <3>, <16>, -+ <17>, <18>, <19>, -+ <20>, <21>; - clock-output-names = "apb2_i2c0", "apb2_i2c1", - "apb2_i2c2", "apb2_i2c3", - "apb2_uart0", "apb2_uart1", -@@ -346,6 +367,14 @@ - "mmc3_sample"; - }; - -+ ss_clk: clk@01c2009c { -+ #clock-cells = <0>; -+ compatible = "allwinner,sun4i-a10-mod0-clk"; -+ reg = <0x01c2009c 0x4>; -+ clocks = <&osc24M>, <&pll6 0>; -+ clock-output-names = "ss"; -+ }; -+ - spi0_clk: clk@01c200a0 { - #clock-cells = <0>; - compatible = "allwinner,sun4i-a10-mod0-clk"; -@@ -384,6 +413,9 @@ - compatible = "allwinner,sun6i-a31-usb-clk"; - reg = <0x01c200cc 0x4>; - clocks = <&osc24M>; -+ clock-indices = <8>, <9>, <10>, -+ <16>, <17>, -+ <18>; - clock-output-names = "usb_phy0", "usb_phy1", "usb_phy2", - "usb_ohci0", "usb_ohci1", - "usb_ohci2"; -@@ -684,6 +716,16 @@ - allwinner,pull = ; - }; - -+ mmc3_8bit_emmc_pins: mmc3@1 { -+ allwinner,pins = "PC6", "PC7", "PC8", "PC9", -+ "PC10", "PC11", "PC12", -+ "PC13", "PC14", "PC15", -+ "PC24"; -+ allwinner,function = "mmc3"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ - gmac_pins_mii_a: gmac_mii@0 { - allwinner,pins = "PA0", "PA1", "PA2", "PA3", - "PA8", "PA9", "PA11", -@@ -761,6 +803,13 @@ - reg = <0x01c20ca0 0x20>; - }; - -+ lradc: lradc@01c22800 { -+ compatible = "allwinner,sun4i-a10-lradc-keys"; -+ reg = <0x01c22800 0x100>; -+ interrupts = ; -+ status = "disabled"; -+ }; -+ - rtp: rtp@01c25000 { - compatible = "allwinner,sun6i-a31-ts"; - reg = <0x01c25000 0x100>; -@@ -907,6 +956,16 @@ - #size-cells = <0>; - }; - -+ crypto: crypto-engine@01c15000 { -+ compatible = "allwinner,sun4i-a10-crypto"; -+ reg = <0x01c15000 0x1000>; -+ interrupts = ; -+ clocks = <&ahb1_gates 5>, <&ss_clk>; -+ clock-names = "ahb", "mod"; -+ resets = <&ahb1_rst 5>; -+ reset-names = "ahb"; -+ }; -+ - timer@01c60000 { - compatible = "allwinner,sun6i-a31-hstimer", - "allwinner,sun7i-a20-hstimer"; -@@ -1068,7 +1127,7 @@ - resets = <&apb0_rst 0>; - gpio-controller; - interrupt-controller; -- #interrupt-cells = <2>; -+ #interrupt-cells = <3>; - #size-cells = <0>; - #gpio-cells = <3>; - ---- a/arch/arm/dts/sun6i-a31s-primo81.dts -+++ b/arch/arm/dts/sun6i-a31s-primo81.dts -@@ -1,16 +1,57 @@ - /* -- * Copyright 2015 Hans de Goede -+ * Copyright 2014 Siarhei Siamashka -+ * Copyright 2015 Karsten Merker -+ * Copyright 2015 Chen-Yu Tsai - * -- * Minimal dts file for the MSI Primo81 for u-boot only -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. - * -- * SPDX-License-Identifier: GPL-2.0+ or X11 -+ * a) This file 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; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. - */ - - /dts-v1/; - #include "sun6i-a31s.dtsi" -+#include "sunxi-common-regulators.dtsi" -+ -+#include -+#include -+#include - - / { -- model = "MSI Primo81"; -+ model = "MSI Primo81 tablet"; - compatible = "msi,primo81", "allwinner,sun6i-a31s"; - - aliases { -@@ -22,8 +63,202 @@ - }; - }; - --&uart0 { -+&cpu0 { -+ cpu-supply = <®_dcdc3>; -+}; -+ -+&ehci0 { -+ /* rtl8188etv wifi is connected here */ -+ status = "okay"; -+}; -+ -+&i2c0 { -+ /* pull-ups and device VDDIO use AXP221 DLDO3 */ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c0_pins_a>; -+ status = "failed"; -+}; -+ -+&i2c1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c1_pins_a>; -+ status = "okay"; -+ -+ ctp@5d { -+ pinctrl-names = "default"; -+ pinctrl-0 = <>911_int_primo81>; -+ compatible = "goodix,gt911"; -+ reg = <0x5d>; -+ interrupt-parent = <&pio>; -+ interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */ -+ touchscreen-swapped-x-y; -+ }; -+}; -+ -+&i2c2 { - pinctrl-names = "default"; -- pinctrl-0 = <&uart0_pins_a>; -+ pinctrl-0 = <&i2c2_pins_a>; -+ status = "okay"; -+ -+ accelerometer@1c { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mma8452_int_primo81>; -+ compatible = "fsl,mma8452"; -+ reg = <0x1c>; -+ interrupt-parent = <&pio>; -+ interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>; /* PA9 */ -+ #io-channel-cells = <1>; -+ }; -+}; -+ -+&lradc { -+ vref-supply = <®_aldo3>; -+ status = "okay"; -+ -+ button@158 { -+ label = "Volume Up"; -+ linux,code = ; -+ channel = <0>; -+ voltage = <158730>; -+ }; -+ -+ button@349 { -+ label = "Volume Down"; -+ linux,code = ; -+ channel = <0>; -+ voltage = <349206>; -+ }; -+}; -+ -+&mmc0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>; -+ vmmc-supply = <®_dcdc1>; -+ bus-width = <4>; -+ cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */ -+ cd-inverted; -+ status = "okay"; -+}; -+ -+&pio { -+ gt911_int_primo81: gt911_int_pin@0 { -+ allwinner,pins = "PA3"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ mma8452_int_primo81: mma8452_int_pin@0 { -+ allwinner,pins = "PA9"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ mmc0_cd_pin_primo81: mmc0_cd_pin@0 { -+ allwinner,pins = "PA8"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+}; -+ -+&p2wi { -+ status = "okay"; -+ -+ axp22x: pmic@68 { -+ compatible = "x-powers,axp221"; -+ reg = <0x68>; -+ interrupt-parent = <&nmi_intc>; -+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; -+ }; -+}; -+ -+#include "axp22x.dtsi" -+ -+®_aldo3 { -+ regulator-always-on; -+ regulator-min-microvolt = <2700000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "avcc"; -+}; -+ -+®_dc1sw { -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "vcc-lcd"; -+}; -+ -+®_dc5ldo { -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <1320000>; -+ regulator-name = "vdd-cpus"; /* This is an educated guess */ -+}; -+ -+®_dcdc1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "vcc-3v0"; -+}; -+ -+®_dcdc2 { -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <1320000>; -+ regulator-name = "vdd-gpu"; -+}; -+ -+®_dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <1320000>; -+ regulator-name = "vdd-cpu"; -+}; -+ -+®_dcdc4 { -+ regulator-always-on; -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <1320000>; -+ regulator-name = "vdd-sys-dll"; -+}; -+ -+®_dcdc5 { -+ regulator-always-on; -+ regulator-min-microvolt = <1500000>; -+ regulator-max-microvolt = <1500000>; -+ regulator-name = "vcc-dram"; -+}; -+ -+®_dldo1 { -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-wifi"; -+}; -+ -+®_dldo3 { -+ regulator-min-microvolt = <2800000>; -+ regulator-max-microvolt = <2800000>; -+ regulator-name = "vddio-csi"; -+}; -+ -+®_eldo3 { -+ regulator-min-microvolt = <1080000>; -+ regulator-max-microvolt = <1320000>; -+ regulator-name = "vdd-mipi-bridge"; -+}; -+ -+&simplefb_lcd { -+ vcc-lcd-supply = <®_dc1sw>; -+ vdd-mipi-bridge-supply = <®_eldo3>; -+}; -+ -+&usb_otg { -+ /* otg support requires support for AXP221 usb-power-supply and GPIO */ -+ dr_mode = "host"; -+ status = "okay"; -+}; -+ -+&usbphy { -+ usb1_vbus-supply = <®_dldo1>; - status = "okay"; - }; ---- /dev/null -+++ b/arch/arm/dts/sun6i-a31s-sina31s-core.dtsi -@@ -0,0 +1,142 @@ -+/* -+ * Copyright 2015 Chen-Yu Tsai -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) This file 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; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+/dts-v1/; -+#include "sun6i-a31s.dtsi" -+#include "sunxi-common-regulators.dtsi" -+ -+#include -+#include -+ -+/ { -+ model = "Sinlinx SinA31s Core Board"; -+ compatible = "sinlinx,sina31s", "allwinner,sun6i-a31s"; -+ -+ aliases { -+ serial0 = &uart0; -+ }; -+}; -+ -+&cpu0 { -+ cpu-supply = <®_dcdc3>; -+}; -+ -+/* eMMC on core board */ -+&mmc3 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc3_8bit_emmc_pins>; -+ vmmc-supply = <®_dcdc1>; -+ vqmmc-supply = <®_dcdc1>; -+ bus-width = <8>; -+ non-removable; -+ cap-mmc-hw-reset; -+ status = "okay"; -+}; -+ -+/* AXP221s PMIC on core board */ -+&p2wi { -+ status = "okay"; -+ -+ axp22x: pmic@68 { -+ compatible = "x-powers,axp221"; -+ reg = <0x68>; -+ interrupt-parent = <&nmi_intc>; -+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; -+ }; -+}; -+ -+#include "axp22x.dtsi" -+ -+®_aldo3 { -+ regulator-always-on; -+ regulator-min-microvolt = <2700000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "avcc"; -+}; -+ -+®_dc5ldo { -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <1320000>; -+ regulator-name = "vdd-cpus"; -+}; -+ -+®_dcdc1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "vcc-3v0"; -+}; -+ -+®_dcdc2 { -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <1320000>; -+ regulator-name = "vdd-gpu"; -+}; -+ -+®_dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <1320000>; -+ regulator-name = "vdd-cpu"; -+}; -+ -+®_dcdc4 { -+ regulator-always-on; -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <1320000>; -+ regulator-name = "vdd-sys-dll"; -+}; -+ -+®_dcdc5 { -+ regulator-always-on; -+ regulator-min-microvolt = <1500000>; -+ regulator-max-microvolt = <1500000>; -+ regulator-name = "vcc-dram"; -+}; -+ -+/* UART0 pads available on core board */ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pins_a>; -+ status = "okay"; -+}; -+ ---- /dev/null -+++ b/arch/arm/dts/sun6i-a31s-sina31s.dts -@@ -0,0 +1,153 @@ -+/* -+ * Copyright 2015 Chen-Yu Tsai -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) This file 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; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+/* The SinA31s development board has the SinA31s core board soldered on */ -+#include "sun6i-a31s-sina31s-core.dtsi" -+ -+#include -+ -+/ { -+ model = "Sinlinx SinA31s Development Board"; -+ compatible = "sinlinx,sina31s-sdk", "allwinner,sun6i-a31s"; -+ -+ chosen { -+ stdout-path = "serial0:115200n8"; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&led_pin_sina31s>; -+ -+ status { -+ label = "sina31s:status:usr"; -+ gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */ -+ }; -+ }; -+}; -+ -+&ehci0 { -+ /* USB 2.0 4 port hub IC */ -+ status = "okay"; -+}; -+ -+&ehci1 { -+ status = "okay"; -+}; -+ -+&gmac { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&gmac_pins_mii_a>; -+ phy = <&phy1>; -+ phy-mode = "mii"; -+ phy-supply = <®_dldo1>; -+ status = "okay"; -+ -+ phy1: ethernet-phy@1 { -+ reg = <1>; -+ }; -+}; -+ -+&ir { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&ir_pins_a>; -+ status = "okay"; -+}; -+ -+&lradc { -+ vref-supply = <®_aldo3>; -+ status = "okay"; -+ -+ button@158 { -+ label = "Volume Up"; -+ linux,code = ; -+ channel = <0>; -+ voltage = <158730>; -+ }; -+ -+ button@349 { -+ label = "Volume Down"; -+ linux,code = ; -+ channel = <0>; -+ voltage = <349206>; -+ }; -+}; -+ -+&mmc0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina31s>; -+ vmmc-supply = <®_dcdc1>; -+ bus-width = <4>; -+ cd-gpios = <&pio 0 4 GPIO_ACTIVE_HIGH>; /* PA4 */ -+ cd-inverted; -+ status = "okay"; -+}; -+ -+&ohci1 { -+ status = "okay"; -+}; -+ -+&pio { -+ led_pin_sina31s: led_pin@0 { -+ allwinner,pins = "PH13"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ mmc0_cd_pin_sina31s: mmc0_cd_pin@0 { -+ allwinner,pins = "PA4"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+}; -+ -+®_dldo1 { -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-gmac-phy"; -+}; -+ -+&usbphy { -+ status = "okay"; -+}; ---- /dev/null -+++ b/arch/arm/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts -@@ -0,0 +1,205 @@ -+/* -+ * Copyright 2015 Lawrence Yu -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) This file 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; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+/dts-v1/; -+#include "sun6i-a31s.dtsi" -+#include "sunxi-common-regulators.dtsi" -+ -+#include -+#include -+ -+/ { -+ model = "Yones TopTech BS1078 v2 Tablet"; -+ compatible = "yones-toptech,bs1078-v2", "allwinner,sun6i-a31s"; -+ -+ aliases { -+ serial0 = &uart0; -+ i2c1 = &i2c1; -+ i2c2 = &i2c2; -+ }; -+ -+ chosen { -+ stdout-path = "serial0:115200n8"; -+ }; -+}; -+ -+&i2c1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c1_pins_a>; -+ status = "okay"; -+}; -+ -+&i2c2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c2_pins_a>; -+ status = "okay"; -+}; -+ -+&ehci0 { -+ status = "okay"; -+}; -+ -+&ehci1 { -+ status = "okay"; -+}; -+ -+&ohci0 { -+ status = "okay"; -+}; -+ -+&ohci1 { -+ status = "okay"; -+}; -+ -+&pio { -+ mmc0_cd_pin_bs1078v2: mmc0_cd_pin@0 { -+ allwinner,pins = "PA8"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+}; -+ -+&mmc0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bs1078v2>; -+ vmmc-supply = <®_vcc3v0>; -+ bus-width = <4>; -+ cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */ -+ cd-inverted; -+ status = "okay"; -+}; -+ -+&mmc0_pins_a { -+ allwinner,pull = ; -+}; -+ -+&p2wi { -+ status = "okay"; -+ -+ axp22x: pmic@68 { -+ compatible = "x-powers,axp221"; -+ reg = <0x68>; -+ interrupt-parent = <&nmi_intc>; -+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; -+ }; -+}; -+ -+#include "axp22x.dtsi" -+ -+®_aldo3 { -+ regulator-always-on; -+ regulator-min-microvolt = <2700000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "avcc"; -+}; -+ -+®_dc1sw { -+ regulator-name = "vcc-lcd-usb2"; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+}; -+ -+®_dc5ldo { -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <1320000>; -+ regulator-name = "vdd-cpus"; -+}; -+ -+®_dcdc1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "vcc-3v0"; -+}; -+ -+®_dcdc2 { -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <1320000>; -+ regulator-name = "vdd-gpu"; -+}; -+ -+®_dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <1320000>; -+ regulator-name = "vdd-cpu"; -+}; -+ -+®_dcdc4 { -+ regulator-always-on; -+ regulator-min-microvolt = <700000>; -+ regulator-max-microvolt = <1320000>; -+ regulator-name = "vdd-sys-dll"; -+}; -+ -+®_dcdc5 { -+ regulator-always-on; -+ regulator-min-microvolt = <1500000>; -+ regulator-max-microvolt = <1500000>; -+ regulator-name = "vcc-dram"; -+}; -+ -+®_dldo1 { -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-wifi"; -+}; -+ -+/* Voltage source for I2C pullup resistors for I2C Bus 0 */ -+®_dldo3 { -+ regulator-min-microvolt = <2800000>; -+ regulator-max-microvolt = <2800000>; -+ regulator-name = "vddio-csi"; -+}; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pins_a>; -+ status = "okay"; -+}; -+ -+&usbphy { -+ usb1_vbus-supply = <®_dldo1>; -+ usb2_vbus-supply = <®_dc1sw>; -+ status = "okay"; -+}; ---- a/arch/arm/dts/sun7i-a20-bananapi.dts -+++ b/arch/arm/dts/sun7i-a20-bananapi.dts -@@ -92,6 +92,24 @@ - status = "okay"; - }; - -+&codec { -+ status = "okay"; -+}; -+ -+&cpu0 { -+ cpu-supply = <®_dcdc2>; -+ operating-points = < -+ /* kHz uV */ -+ 960000 1400000 -+ 912000 1400000 -+ 864000 1350000 -+ 720000 1250000 -+ 528000 1150000 -+ 312000 1100000 -+ 144000 1050000 -+ >; -+}; -+ - &ehci0 { - status = "okay"; - }; -@@ -119,13 +137,9 @@ - status = "okay"; - - axp209: pmic@34 { -- compatible = "x-powers,axp209"; - reg = <0x34>; - interrupt-parent = <&nmi_intc>; - interrupts = <0 IRQ_TYPE_LEVEL_LOW>; -- -- interrupt-controller; -- #interrupt-cells = <1>; - }; - }; - -@@ -159,7 +173,18 @@ - status = "okay"; - }; - -+&otg_sram { -+ status = "okay"; -+}; -+ - &pio { -+ usb0_id_detect_pin: usb0_id_detect_pin@0 { -+ allwinner,pins = "PH4"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ - mmc0_cd_pin_bananapi: mmc0_cd_pin@0 { - allwinner,pins = "PH10"; - allwinner,function = "gpio_in"; -@@ -182,6 +207,37 @@ - }; - }; - -+#include "axp209.dtsi" -+ -+®_dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-cpu"; -+}; -+ -+®_dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-int-dll"; -+}; -+ -+®_ldo1 { -+ regulator-name = "vdd-rtc"; -+}; -+ -+®_ldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "avcc"; -+}; -+ -+®_usb0_vbus { -+ status = "okay"; -+}; -+ - ®_usb1_vbus { - status = "okay"; - }; -@@ -216,7 +272,21 @@ - status = "okay"; - }; - -+&usb_otg { -+ dr_mode = "otg"; -+ status = "okay"; -+}; -+ -+&usb_power_supply { -+ status = "okay"; -+}; -+ - &usbphy { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&usb0_id_detect_pin>; -+ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ -+ usb0_vbus_power-supply = <&usb_power_supply>; -+ usb0_vbus-supply = <®_usb0_vbus>; - usb1_vbus-supply = <®_usb1_vbus>; - usb2_vbus-supply = <®_usb2_vbus>; - status = "okay"; ---- a/arch/arm/dts/sun7i-a20-cubieboard2.dts -+++ b/arch/arm/dts/sun7i-a20-cubieboard2.dts -@@ -84,6 +84,10 @@ - status = "okay"; - }; - -+&codec { -+ status = "okay"; -+}; -+ - &cpu0 { - cpu-supply = <®_dcdc2>; - }; -@@ -150,6 +154,10 @@ - status = "okay"; - }; - -+&otg_sram { -+ status = "okay"; -+}; -+ - &pio { - led_pins_cubieboard2: led_pins@0 { - allwinner,pins = "PH20", "PH21"; -@@ -157,12 +165,24 @@ - allwinner,drive = ; - allwinner,pull = ; - }; -+ -+ usb0_id_detect_pin: usb0_id_detect_pin@0 { -+ allwinner,pins = "PH4"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; - }; - - ®_ahci_5v { - status = "okay"; - }; - -+&usb_otg { -+ dr_mode = "otg"; -+ status = "okay"; -+}; -+ - #include "axp209.dtsi" - - ®_dcdc2 { -@@ -205,6 +225,9 @@ - }; - - &usbphy { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&usb0_id_detect_pin>; -+ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ - usb1_vbus-supply = <®_usb1_vbus>; - usb2_vbus-supply = <®_usb2_vbus>; - status = "okay"; ---- a/arch/arm/dts/sun7i-a20-cubietruck.dts -+++ b/arch/arm/dts/sun7i-a20-cubietruck.dts -@@ -101,6 +101,10 @@ - status = "okay"; - }; - -+&codec { -+ status = "okay"; -+}; -+ - &cpu0 { - cpu-supply = <®_dcdc2>; - }; ---- /dev/null -+++ b/arch/arm/dts/sun7i-a20-icnova-swac.dts -@@ -0,0 +1,169 @@ -+/* -+ * Copyright 2015 Stefan Roese -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) This file 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; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+/dts-v1/; -+#include "sun7i-a20.dtsi" -+#include "sunxi-common-regulators.dtsi" -+ -+#include -+#include -+#include -+ -+/ { -+ model = "ICnova-A20 SWAC"; -+ compatible = "swac,icnova-a20-swac", "incircuit,icnova-a20", "allwinner,sun7i-a20"; -+ -+ aliases { -+ serial0 = &uart0; -+ }; -+ -+ chosen { -+ stdout-path = "serial0:115200n8"; -+ }; -+}; -+ -+&cpu0 { -+ cpu-supply = <®_dcdc2>; -+}; -+ -+&ehci0 { -+ status = "okay"; -+}; -+ -+&ehci1 { -+ status = "okay"; -+}; -+ -+&gmac { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&gmac_pins_mii_a>; -+ phy = <&phy1>; -+ phy-mode = "mii"; -+ status = "okay"; -+ -+ phy1: ethernet-phy@1 { -+ reg = <1>; -+ }; -+}; -+ -+&i2c0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c0_pins_a>; -+ status = "okay"; -+ -+ axp209: pmic@34 { -+ reg = <0x34>; -+ interrupt-parent = <&nmi_intc>; -+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; -+ }; -+}; -+ -+&i2c1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c1_pins_a>; -+ status = "okay"; -+}; -+ -+&mmc0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; -+ vmmc-supply = <®_vcc3v3>; -+ bus-width = <4>; -+ cd-gpios = <&pio 8 5 GPIO_ACTIVE_HIGH>; /* PI5 */ -+ cd-inverted; -+ status = "okay"; -+}; -+ -+&ohci0 { -+ status = "okay"; -+}; -+ -+&ohci1 { -+ status = "okay"; -+}; -+ -+#include "axp209.dtsi" -+ -+®_dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-cpu"; -+}; -+ -+®_dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-int-dll"; -+}; -+ -+®_ldo1 { -+ regulator-name = "vdd-rtc"; -+}; -+ -+®_ldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "avcc"; -+}; -+ -+®_usb1_vbus { -+ status = "okay"; -+}; -+ -+®_usb2_vbus { -+ status = "okay"; -+}; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pins_a>; -+ status = "okay"; -+}; -+ -+&usbphy { -+ usb1_vbus-supply = <®_usb1_vbus>; -+ usb2_vbus-supply = <®_usb2_vbus>; -+ status = "okay"; -+}; ---- /dev/null -+++ b/arch/arm/dts/sun7i-a20-itead-ibox.dts -@@ -0,0 +1,125 @@ -+/* -+ * Copyright 2015 - Marcus Cooper -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) This file 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; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+/dts-v1/; -+#include "sun7i-a20.dtsi" -+#include "sunxi-itead-core-common.dtsi" -+ -+/ { -+ model = "Itead Ibox A20"; -+ compatible = "itead,itead-ibox-a20", "allwinner,sun7i-a20"; -+ -+ leds { -+ compatible = "gpio-leds"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&led_pins_itead_core>; -+ -+ green { -+ label = "itead_core:green:usr"; -+ gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ -+ blue { -+ label = "itead_core:blue:usr"; -+ gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ }; -+}; -+ -+&ahci { -+ target-supply = <®_ahci_5v>; -+ status = "okay"; -+}; -+ -+&codec { -+ status = "okay"; -+}; -+ -+&gmac { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&gmac_pins_mii_a>; -+ phy = <&phy1>; -+ phy-mode = "mii"; -+ status = "okay"; -+ -+ phy1: ethernet-phy@1 { -+ reg = <1>; -+ }; -+}; -+ -+&i2c0 { -+ axp209: pmic@34 { -+ interrupt-parent = <&nmi_intc>; -+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; -+ }; -+}; -+ -+&ir0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&ir0_rx_pins_a>; -+ status = "okay"; -+}; -+ -+&mmc0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; -+ vmmc-supply = <®_vcc3v3>; -+ bus-width = <4>; -+ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ -+ cd-inverted; -+ status = "okay"; -+}; -+ -+&pio { -+ led_pins_itead_core: led_pins@0 { -+ allwinner,pins = "PH20","PH21"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+}; -+ -+®_ahci_5v { -+ status = "okay"; -+}; ---- a/arch/arm/dts/sun7i-a20-lamobo-r1.dts -+++ b/arch/arm/dts/sun7i-a20-lamobo-r1.dts -@@ -97,16 +97,6 @@ - - &cpu0 { - cpu-supply = <®_dcdc2>; -- operating-points = < -- /* kHz uV */ -- 960000 1400000 -- 912000 1400000 -- 864000 1350000 -- 720000 1250000 -- 528000 1150000 -- 312000 1100000 -- 144000 1050000 -- >; - }; - - &ehci0 { ---- a/arch/arm/dts/sun7i-a20-mk808c.dts -+++ b/arch/arm/dts/sun7i-a20-mk808c.dts -@@ -53,6 +53,7 @@ - - #include - #include -+#include - - / { - model = "mk808c"; -@@ -68,6 +69,10 @@ - }; - }; - -+&codec { -+ status = "okay"; -+}; -+ - &ehci0 { - status = "okay"; - }; -@@ -121,6 +126,30 @@ - status = "okay"; - }; - -+&otg_sram { -+ status = "okay"; -+}; -+ -+&pio { -+ usb0_id_detect_pin: usb0_id_detect_pin@0 { -+ allwinner,pins = "PH4"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { -+ allwinner,pins = "PH5"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+}; -+ -+®_usb0_vbus { -+ status = "okay"; -+}; -+ - ®_usb1_vbus { - status = "okay"; - }; -@@ -141,7 +170,17 @@ - status = "okay"; - }; - -+&usb_otg { -+ dr_mode = "otg"; -+ status = "okay"; -+}; -+ - &usbphy { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; -+ usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ -+ usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ -+ usb0_vbus-supply = <®_usb0_vbus>; - usb1_vbus-supply = <®_usb1_vbus>; - usb2_vbus-supply = <®_usb2_vbus>; - status = "okay"; ---- a/arch/arm/dts/sun7i-a20-olimex-som-evb.dts -+++ b/arch/arm/dts/sun7i-a20-olimex-som-evb.dts -@@ -1,5 +1,6 @@ - /* - * Copyright 2015 - Marcus Cooper -+ * Copyright 2015 - Karsten Merker - * - * This file is dual-licensed: you can use it either under the terms - * of the GPL or the X11 license, at your option. Note that this dual -@@ -45,6 +46,7 @@ - #include "sunxi-common-regulators.dtsi" - - #include -+#include - #include - #include - -@@ -71,14 +73,6 @@ - default-state = "on"; - }; - }; -- -- reg_axp_ipsout: axp_ipsout { -- compatible = "regulator-fixed"; -- regulator-name = "axp-ipsout"; -- regulator-min-microvolt = <5000000>; -- regulator-max-microvolt = <5000000>; -- regulator-always-on; -- }; - }; - - &ahci { -@@ -94,6 +88,10 @@ - status = "okay"; - }; - -+&codec { -+ status = "okay"; -+}; -+ - &gmac { - pinctrl-names = "default"; - pinctrl-0 = <&gmac_pins_rgmii_a>; -@@ -118,10 +116,58 @@ - }; - }; - --&i2c1 { -- pinctrl-names = "default"; -- pinctrl-0 = <&i2c1_pins_a>; -+&lradc { -+ vref-supply = <®_vcc3v0>; - status = "okay"; -+ -+ button@190 { -+ label = "Volume Up"; -+ linux,code = ; -+ channel = <0>; -+ voltage = <190000>; -+ }; -+ -+ button@390 { -+ label = "Volume Down"; -+ linux,code = ; -+ channel = <0>; -+ voltage = <390000>; -+ }; -+ -+ button@600 { -+ label = "Menu"; -+ linux,code = ; -+ channel = <0>; -+ voltage = <600000>; -+ }; -+ -+ button@800 { -+ label = "Search"; -+ linux,code = ; -+ channel = <0>; -+ voltage = <800000>; -+ }; -+ -+ button@980 { -+ label = "Home"; -+ linux,code = ; -+ channel = <0>; -+ voltage = <980000>; -+ }; -+ -+ button@1180 { -+ label = "Esc"; -+ linux,code = ; -+ channel = <0>; -+ voltage = <1180000>; -+ }; -+ -+ button@1400 { -+ label = "Enter"; -+ linux,code = ; -+ channel = <0>; -+ voltage = <1400000>; -+ }; - }; - - &mmc0 { -@@ -134,6 +180,16 @@ - status = "okay"; - }; - -+&mmc3 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olimex_som_evb>; -+ vmmc-supply = <®_vcc3v3>; -+ bus-width = <4>; -+ cd-gpios = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */ -+ cd-inverted; -+ status = "okay"; -+}; -+ - &ohci0 { - status = "okay"; - }; -@@ -161,15 +217,22 @@ - allwinner,pull = ; - }; - -+ mmc3_cd_pin_olimex_som_evb: mmc3_cd_pin@0 { -+ allwinner,pins = "PH0"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ - usb0_id_detect_pin: usb0_id_detect_pin@0 { -- allwinner,pins = "PH04"; -+ allwinner,pins = "PH4"; - allwinner,function = "gpio_in"; - allwinner,drive = ; - allwinner,pull = ; - }; - - usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { -- allwinner,pins = "PH05"; -+ allwinner,pins = "PH5"; - allwinner,function = "gpio_in"; - allwinner,drive = ; - allwinner,pull = ; -@@ -187,7 +250,7 @@ - ®_dcdc2 { - regulator-always-on; - regulator-min-microvolt = <1000000>; -- regulator-max-microvolt = <1425000>; -+ regulator-max-microvolt = <1400000>; - regulator-name = "vdd-cpu"; - }; - -@@ -235,8 +298,8 @@ - &usbphy { - pinctrl-names = "default"; - pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; -- usb0_id_det-gpios = <&pio 7 04 GPIO_ACTIVE_HIGH>; /* PH04 */ -- usb0_vbus_det-gpios = <&pio 7 05 GPIO_ACTIVE_HIGH>; /* PH05 */ -+ usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH04 */ -+ usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH05 */ - usb0_vbus-supply = <®_usb0_vbus>; - usb1_vbus-supply = <®_usb1_vbus>; - usb2_vbus-supply = <®_usb2_vbus>; ---- a/arch/arm/dts/sun7i-a20-olinuxino-lime.dts -+++ b/arch/arm/dts/sun7i-a20-olinuxino-lime.dts -@@ -117,6 +117,18 @@ - }; - }; - -+&i2c1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c1_pins_a>; -+ status = "okay"; -+ -+ eeprom: eeprom@50 { -+ compatible = "atmel,24c16"; -+ reg = <0x50>; -+ pagesize = <16>; -+ }; -+}; -+ - &mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; ---- a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts -+++ b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts -@@ -170,6 +170,12 @@ - pinctrl-names = "default"; - pinctrl-0 = <&i2c1_pins_a>; - status = "okay"; -+ -+ eeprom: eeprom@50 { -+ compatible = "atmel,24c16"; -+ reg = <0x50>; -+ pagesize = <16>; -+ }; - }; - - &mmc0 { -@@ -190,6 +196,10 @@ - status = "okay"; - }; - -+&otg_sram { -+ status = "okay"; -+}; -+ - &pio { - ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 { - allwinner,pins = "PC3"; -@@ -204,6 +214,27 @@ - allwinner,drive = ; - allwinner,pull = ; - }; -+ -+ usb0_id_detect_pin: usb0_id_detect_pin@0 { -+ allwinner,pins = "PH4"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 { -+ allwinner,pins = "PH5"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ usb0_vbus_pin_lime2: usb0_vbus_pin@0 { -+ allwinner,pins = "PC17"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; - }; - - ®_ahci_5v { -@@ -212,6 +243,12 @@ - status = "okay"; - }; - -+®_usb0_vbus { -+ pinctrl-0 = <&usb0_vbus_pin_lime2>; -+ gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>; -+ status = "okay"; -+}; -+ - ®_usb1_vbus { - status = "okay"; - }; -@@ -226,7 +263,17 @@ - status = "okay"; - }; - -+&usb_otg { -+ dr_mode = "otg"; -+ status = "okay"; -+}; -+ - &usbphy { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>; -+ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ -+ usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ -+ usb0_vbus-supply = <®_usb0_vbus>; - usb1_vbus-supply = <®_usb1_vbus>; - usb2_vbus-supply = <®_usb2_vbus>; - status = "okay"; ---- a/arch/arm/dts/sun7i-a20-olinuxino-micro.dts -+++ b/arch/arm/dts/sun7i-a20-olinuxino-micro.dts -@@ -125,6 +125,12 @@ - pinctrl-names = "default"; - pinctrl-0 = <&i2c1_pins_a>; - status = "okay"; -+ -+ eeprom: eeprom@50 { -+ compatible = "atmel,24c16"; -+ reg = <0x50>; -+ pagesize = <16>; -+ }; - }; - - &i2c2 { ---- a/arch/arm/dts/sun7i-a20-orangepi-mini.dts -+++ b/arch/arm/dts/sun7i-a20-orangepi-mini.dts -@@ -95,6 +95,10 @@ - status = "okay"; - }; - -+&codec { -+ status = "okay"; -+}; -+ - &ehci0 { - status = "okay"; - }; -@@ -156,7 +160,18 @@ - status = "okay"; - }; - -+&otg_sram { -+ status = "okay"; -+}; -+ - &pio { -+ usb0_id_detect_pin: usb0_id_detect_pin@0 { -+ allwinner,pins = "PH4"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ - mmc0_cd_pin_orangepi: mmc0_cd_pin@0 { - allwinner,pins = "PH10"; - allwinner,function = "gpio_in"; -@@ -225,6 +240,10 @@ - regulator-name = "avcc"; - }; - -+®_usb0_vbus { -+ status = "okay"; -+}; -+ - ®_usb1_vbus { - pinctrl-0 = <&usb1_vbus_pin_bananapro>; - gpio = <&pio 7 26 GPIO_ACTIVE_HIGH>; /* PH26 */ -@@ -243,7 +262,21 @@ - status = "okay"; - }; - -+&usb_otg { -+ dr_mode = "otg"; -+ status = "okay"; -+}; -+ -+&usb_power_supply { -+ status = "okay"; -+}; -+ - &usbphy { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&usb0_id_detect_pin>; -+ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ -+ usb0_vbus_power-supply = <&usb_power_supply>; -+ usb0_vbus-supply = <®_usb0_vbus>; - usb1_vbus-supply = <®_usb1_vbus>; - usb2_vbus-supply = <®_usb2_vbus>; - status = "okay"; ---- a/arch/arm/dts/sun7i-a20-orangepi.dts -+++ b/arch/arm/dts/sun7i-a20-orangepi.dts -@@ -141,7 +141,18 @@ - status = "okay"; - }; - -+&otg_sram { -+ status = "okay"; -+}; -+ - &pio { -+ usb0_id_detect_pin: usb0_id_detect_pin@0 { -+ allwinner,pins = "PH4"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ - mmc0_cd_pin_orangepi: mmc0_cd_pin@0 { - allwinner,pins = "PH10"; - allwinner,function = "gpio_in"; -@@ -203,6 +214,10 @@ - regulator-name = "avcc"; - }; - -+®_usb0_vbus { -+ status = "okay"; -+}; -+ - ®_usb1_vbus { - pinctrl-0 = <&usb1_vbus_pin_bananapro>; - gpio = <&pio 7 26 GPIO_ACTIVE_HIGH>; /* PH26 */ -@@ -221,7 +236,21 @@ - status = "okay"; - }; - -+&usb_otg { -+ dr_mode = "otg"; -+ status = "okay"; -+}; -+ -+&usb_power_supply { -+ status = "okay"; -+}; -+ - &usbphy { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&usb0_id_detect_pin>; -+ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ -+ usb0_vbus_power-supply = <&usb_power_supply>; -+ usb0_vbus-supply = <®_usb0_vbus>; - usb1_vbus-supply = <®_usb1_vbus>; - usb2_vbus-supply = <®_usb2_vbus>; - status = "okay"; ---- a/arch/arm/dts/sun7i-a20-pcduino3-nano.dts -+++ b/arch/arm/dts/sun7i-a20-pcduino3-nano.dts -@@ -82,6 +82,14 @@ - status = "okay"; - }; - -+&codec { -+ status = "okay"; -+}; -+ -+&cpu0 { -+ cpu-supply = <®_dcdc2>; -+}; -+ - &ehci0 { - status = "okay"; - }; -@@ -108,13 +116,9 @@ - status = "okay"; - - axp209: pmic@34 { -- compatible = "x-powers,axp209"; - reg = <0x34>; - interrupt-parent = <&nmi_intc>; - interrupts = <0 IRQ_TYPE_LEVEL_LOW>; -- -- interrupt-controller; -- #interrupt-cells = <1>; - }; - }; - -@@ -142,6 +146,10 @@ - status = "okay"; - }; - -+&otg_sram { -+ status = "okay"; -+}; -+ - &pio { - ahci_pwr_pin_pcduino3_nano: ahci_pwr_pin@0 { - allwinner,pins = "PH2"; -@@ -157,8 +165,15 @@ - allwinner,pull = ; - }; - -+ usb0_id_detect_pin: usb0_id_detect_pin@0 { -+ allwinner,pins = "PH4"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ - usb1_vbus_pin_pcduino3_nano: usb1_vbus_pin@0 { -- allwinner,pins = "PH11"; -+ allwinner,pins = "PD2"; - allwinner,function = "gpio_out"; - allwinner,drive = ; - allwinner,pull = ; -@@ -171,13 +186,37 @@ - status = "okay"; - }; - --®_usb1_vbus { -- pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>; -- gpio = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */ -- status = "okay"; -+#include "axp209.dtsi" -+ -+®_dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-cpu"; -+}; -+ -+®_dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-int-pll"; -+}; -+ -+®_ldo1 { -+ regulator-name = "vdd-rtc"; -+}; -+ -+®_ldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "avcc"; - }; - --®_usb2_vbus { -+/* A single regulator (U24) powers both USB host ports. */ -+®_usb1_vbus { -+ pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>; -+ gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */ - status = "okay"; - }; - -@@ -187,8 +226,16 @@ - status = "okay"; - }; - -+&usb_otg { -+ dr_mode = "otg"; -+ status = "okay"; -+}; -+ - &usbphy { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&usb0_id_detect_pin>; -+ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ - usb1_vbus-supply = <®_usb1_vbus>; -- usb2_vbus-supply = <®_usb2_vbus>; -+ usb2_vbus-supply = <®_usb1_vbus>; - status = "okay"; - }; ---- a/arch/arm/dts/sun7i-a20-pcduino3.dts -+++ b/arch/arm/dts/sun7i-a20-pcduino3.dts -@@ -111,6 +111,14 @@ - allwinner,pins = "PH2"; - }; - -+&codec { -+ status = "okay"; -+}; -+ -+&cpu0 { -+ cpu-supply = <®_dcdc2>; -+}; -+ - &ehci0 { - status = "okay"; - }; -@@ -137,16 +145,14 @@ - status = "okay"; - - axp209: pmic@34 { -- compatible = "x-powers,axp209"; - reg = <0x34>; - interrupt-parent = <&nmi_intc>; - interrupts = <0 IRQ_TYPE_LEVEL_LOW>; -- -- interrupt-controller; -- #interrupt-cells = <1>; - }; - }; - -+#include "axp209.dtsi" -+ - &ir0 { - pinctrl-names = "default"; - pinctrl-0 = <&ir0_rx_pins_a>; -@@ -171,6 +177,10 @@ - status = "okay"; - }; - -+&otg_sram { -+ status = "okay"; -+}; -+ - &pio { - led_pins_pcduino3: led_pins@0 { - allwinner,pins = "PH15", "PH16"; -@@ -185,6 +195,13 @@ - allwinner,drive = ; - allwinner,pull = ; - }; -+ -+ usb0_id_detect_pin: usb0_id_detect_pin@0 { -+ allwinner,pins = "PH4"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; - }; - - ®_ahci_5v { -@@ -192,6 +209,31 @@ - status = "okay"; - }; - -+®_dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-cpu"; -+}; -+ -+®_dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-int-pll"; -+}; -+ -+®_ldo1 { -+ regulator-name = "vdd-rtc"; -+}; -+ -+®_ldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "avcc"; -+}; -+ - ®_usb1_vbus { - status = "okay"; - }; -@@ -206,7 +248,15 @@ - status = "okay"; - }; - -+&usb_otg { -+ dr_mode = "otg"; -+ status = "okay"; -+}; -+ - &usbphy { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&usb0_id_detect_pin>; -+ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ - usb1_vbus-supply = <®_usb1_vbus>; - usb2_vbus-supply = <®_usb2_vbus>; - status = "okay"; ---- a/arch/arm/dts/sun7i-a20-wexler-tab7200.dts -+++ b/arch/arm/dts/sun7i-a20-wexler-tab7200.dts -@@ -48,6 +48,7 @@ - #include - #include - #include -+#include - - / { - model = "Wexler TAB7200"; -@@ -57,11 +58,28 @@ - serial0 = &uart0; - }; - -+ backlight { -+ compatible = "pwm-backlight"; -+ pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; -+ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; -+ default-brightness-level = <8>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&bl_enable_pin>; -+ enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ -+ }; -+ - chosen { - stdout-path = "serial0:115200n8"; - }; - }; - -+&codec { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&codec_pa_pin>; -+ allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */ -+ status = "okay"; -+}; -+ - &cpu0 { - cpu-supply = <®_dcdc2>; - }; -@@ -86,6 +104,8 @@ - }; - }; - -+#include "axp209.dtsi" -+ - &i2c1 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c1_pins_a>; -@@ -96,6 +116,18 @@ - pinctrl-names = "default"; - pinctrl-0 = <&i2c2_pins_a>; - status = "okay"; -+ -+ gt911: touchscreen@5d { -+ compatible = "goodix,gt911"; -+ reg = <0x5d>; -+ interrupt-parent = <&pio>; -+ interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&ts_reset_pin>; -+ irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */ -+ reset-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* RST (PB13) */ -+ touchscreen-swapped-x-y; -+ }; - }; - - &lradc { -@@ -135,7 +167,45 @@ - status = "okay"; - }; - --#include "axp209.dtsi" -+&otg_sram { -+ status = "okay"; -+}; -+ -+&pio { -+ bl_enable_pin: bl_enable_pin@0 { -+ allwinner,pins = "PH7"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ codec_pa_pin: codec_pa_pin@0 { -+ allwinner,pins = "PH15"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ ts_reset_pin: ts_reset_pin@0 { -+ allwinner,pins = "PB13"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ usb0_id_detect_pin: usb0_id_detect_pin@0 { -+ allwinner,pins = "PH4"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+}; -+ -+&pwm { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pwm0_pins_a>; -+ status = "okay"; -+}; - - ®_dcdc2 { - regulator-always-on; -@@ -162,6 +232,10 @@ - regulator-name = "avcc"; - }; - -+®_usb0_vbus { -+ status = "okay"; -+}; -+ - ®_usb1_vbus { - status = "okay"; - }; -@@ -176,7 +250,21 @@ - status = "okay"; - }; - -+&usb_otg { -+ dr_mode = "otg"; -+ status = "okay"; -+}; -+ -+&usb_power_supply { -+ status = "okay"; -+}; -+ - &usbphy { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&usb0_id_detect_pin>; -+ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ -+ usb0_vbus_power-supply = <&usb_power_supply>; -+ usb0_vbus-supply = <®_usb0_vbus>; - usb1_vbus-supply = <®_usb1_vbus>; - usb2_vbus-supply = <®_usb2_vbus>; - status = "okay"; ---- a/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts -+++ b/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts -@@ -1,13 +1,52 @@ - /* -- * Copyright 2015 Hans de Goede -+ * Copyright 2015 Jelle de Jong - * -- * Minimal dts file for the Wits Pro A20 DKT for u-boot only -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. - * -- * SPDX-License-Identifier: GPL-2.0+ or X11 -+ * a) This file 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; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. - */ - - /dts-v1/; - #include "sun7i-a20.dtsi" -+#include "sunxi-common-regulators.dtsi" -+ -+#include -+#include -+#include - - / { - model = "Wits Pro A20 DKT"; -@@ -20,6 +59,17 @@ - chosen { - stdout-path = "serial0:115200n8"; - }; -+ -+ mmc3_pwrseq: mmc3_pwrseq { -+ compatible = "mmc-pwrseq-simple"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&vmmc3_pin_ap6xxx_wl_regon>; -+ reset-gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; /* PH9 WIFI_EN */ -+ }; -+}; -+ -+&cpu0 { -+ cpu-supply = <®_dcdc2>; - }; - - &ehci0 { -@@ -42,6 +92,60 @@ - }; - }; - -+&i2c0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c0_pins_a>; -+ status = "okay"; -+ -+ axp209: pmic@34 { -+ reg = <0x34>; -+ interrupt-parent = <&nmi_intc>; -+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; -+ }; -+}; -+ -+&i2c1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c1_pins_a>; -+ status = "okay"; -+}; -+ -+&i2c2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c2_pins_a>; -+ status = "okay"; -+}; -+ -+#include "axp209.dtsi" -+ -+&mmc0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; -+ vmmc-supply = <®_vcc3v3>; -+ bus-width = <4>; -+ cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ -+ cd-inverted; -+ status = "okay"; -+}; -+ -+&mmc3 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc3_pins_a>; -+ vmmc-supply = <®_vcc3v3>; -+ mmc-pwrseq = <&mmc3_pwrseq>; -+ bus-width = <4>; -+ non-removable; -+ status = "okay"; -+ -+ brcmf: bcrmf@1 { -+ reg = <1>; -+ compatible = "brcm,bcm4329-fmac"; -+ interrupt-parent = <&pio>; -+ interrupts = <7 10 IRQ_TYPE_LEVEL_LOW>; /* PH10 / EINT10 */ -+ interrupt-names = "host-wake"; -+ }; -+}; -+ - &ohci0 { - status = "okay"; - }; -@@ -50,8 +154,85 @@ - status = "okay"; - }; - -+&otg_sram { -+ status = "okay"; -+}; -+ -+&pio { -+ vmmc3_pin_ap6xxx_wl_regon: vmmc3_pin@0 { -+ allwinner,pins = "PH9"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ usb0_id_detect_pin: usb0_id_detect_pin@0 { -+ allwinner,pins = "PH4"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+}; -+ -+®_dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1450000>; -+ regulator-name = "vdd-cpu"; -+}; -+ -+®_dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-int-dll"; -+}; -+ -+®_ldo1 { -+ regulator-name = "vdd-rtc"; -+}; -+ -+®_ldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "avcc"; -+}; -+ -+®_usb0_vbus { -+ status = "okay"; -+}; -+ -+®_usb1_vbus { -+ status = "okay"; -+}; -+ -+®_usb2_vbus { -+ status = "okay"; -+}; -+ - &uart0 { - pinctrl-names = "default"; - pinctrl-0 = <&uart0_pins_a>; - status = "okay"; - }; -+ -+&usb_otg { -+ dr_mode = "otg"; -+ status = "okay"; -+}; -+ -+&usb_power_supply { -+ status = "okay"; -+}; -+ -+&usbphy { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&usb0_id_detect_pin>; -+ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ -+ usb0_vbus_power-supply = <&usb_power_supply>; -+ usb0_vbus-supply = <®_usb0_vbus>; -+ usb1_vbus-supply = <®_usb1_vbus>; -+ usb2_vbus-supply = <®_usb2_vbus>; -+ status = "okay"; -+}; ---- a/arch/arm/dts/sun7i-a20.dtsi -+++ b/arch/arm/dts/sun7i-a20.dtsi -@@ -47,6 +47,7 @@ - #include - #include - -+#include - #include - #include - -@@ -67,7 +68,7 @@ - "simple-framebuffer"; - allwinner,pipeline = "de_be0-lcd0-hdmi"; - clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>, -- <&ahb_gates 44>; -+ <&ahb_gates 44>, <&dram_gates 26>; - status = "disabled"; - }; - -@@ -75,7 +76,8 @@ - compatible = "allwinner,simple-framebuffer", - "simple-framebuffer"; - allwinner,pipeline = "de_be0-lcd0"; -- clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>; -+ clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>, -+ <&dram_gates 26>; - status = "disabled"; - }; - -@@ -84,7 +86,7 @@ - "simple-framebuffer"; - allwinner,pipeline = "de_be0-lcd0-tve0"; - clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>, -- <&ahb_gates 44>; -+ <&ahb_gates 44>, <&dram_gates 26>; - status = "disabled"; - }; - }; -@@ -107,7 +109,7 @@ - 720000 1200000 - 528000 1100000 - 312000 1000000 -- 144000 900000 -+ 144000 1000000 - >; - #cooling-cells = <2>; - cooling-min-level = <0>; -@@ -199,6 +201,15 @@ - clock-output-names = "pll1"; - }; - -+ pll2: clk@01c20008 { -+ #clock-cells = <1>; -+ compatible = "allwinner,sun4i-a10-pll2-clk"; -+ reg = <0x01c20008 0x8>; -+ clocks = <&osc24M>; -+ clock-output-names = "pll2-1x", "pll2-2x", -+ "pll2-4x", "pll2-8x"; -+ }; -+ - pll4: clk@01c20018 { - #clock-cells = <0>; - compatible = "allwinner,sun7i-a20-pll4-clk"; -@@ -267,6 +278,19 @@ - compatible = "allwinner,sun7i-a20-ahb-gates-clk"; - reg = <0x01c20060 0x8>; - clocks = <&ahb>; -+ clock-indices = <0>, <1>, -+ <2>, <3>, <4>, -+ <5>, <6>, <7>, <8>, -+ <9>, <10>, <11>, <12>, -+ <13>, <14>, <16>, -+ <17>, <18>, <20>, <21>, -+ <22>, <23>, <25>, -+ <28>, <32>, <33>, <34>, -+ <35>, <36>, <37>, <40>, -+ <41>, <42>, <43>, -+ <44>, <45>, <46>, -+ <47>, <49>, <50>, -+ <52>; - clock-output-names = "ahb_usb0", "ahb_ehci0", - "ahb_ohci0", "ahb_ehci1", "ahb_ohci1", - "ahb_ss", "ahb_dma", "ahb_bist", "ahb_mmc0", -@@ -295,6 +319,10 @@ - compatible = "allwinner,sun7i-a20-apb0-gates-clk"; - reg = <0x01c20068 0x4>; - clocks = <&apb0>; -+ clock-indices = <0>, <1>, -+ <2>, <3>, <4>, -+ <5>, <6>, <7>, -+ <8>, <10>; - clock-output-names = "apb0_codec", "apb0_spdif", - "apb0_ac97", "apb0_iis0", "apb0_iis1", - "apb0_pio", "apb0_ir0", "apb0_ir1", -@@ -314,6 +342,12 @@ - compatible = "allwinner,sun7i-a20-apb1-gates-clk"; - reg = <0x01c2006c 0x4>; - clocks = <&apb1>; -+ clock-indices = <0>, <1>, -+ <2>, <3>, <4>, -+ <5>, <6>, <7>, -+ <15>, <16>, <17>, -+ <18>, <19>, <20>, -+ <21>, <22>, <23>; - clock-output-names = "apb1_i2c0", "apb1_i2c1", - "apb1_i2c2", "apb1_i2c3", "apb1_can", - "apb1_scr", "apb1_ps20", "apb1_ps21", -@@ -442,6 +476,14 @@ - clock-output-names = "ir1"; - }; - -+ keypad_clk: clk@01c200c4 { -+ #clock-cells = <0>; -+ compatible = "allwinner,sun4i-a10-mod0-clk"; -+ reg = <0x01c200c4 0x4>; -+ clocks = <&osc24M>; -+ clock-output-names = "keypad"; -+ }; -+ - usb_clk: clk@01c200cc { - #clock-cells = <1>; - #reset-cells = <1>; -@@ -460,6 +502,48 @@ - clock-output-names = "spi3"; - }; - -+ dram_gates: clk@01c20100 { -+ #clock-cells = <1>; -+ compatible = "allwinner,sun4i-a10-dram-gates-clk"; -+ reg = <0x01c20100 0x4>; -+ clocks = <&pll5 0>; -+ clock-indices = <0>, -+ <1>, <2>, -+ <3>, -+ <4>, -+ <5>, <6>, -+ <15>, -+ <24>, <25>, -+ <26>, <27>, -+ <28>, <29>; -+ clock-output-names = "dram_ve", -+ "dram_csi0", "dram_csi1", -+ "dram_ts", -+ "dram_tvd", -+ "dram_tve0", "dram_tve1", -+ "dram_output", -+ "dram_de_fe1", "dram_de_fe0", -+ "dram_de_be0", "dram_de_be1", -+ "dram_de_mp", "dram_ace"; -+ }; -+ -+ ve_clk: clk@01c2013c { -+ #clock-cells = <0>; -+ #reset-cells = <0>; -+ compatible = "allwinner,sun4i-a10-ve-clk"; -+ reg = <0x01c2013c 0x4>; -+ clocks = <&pll4>; -+ clock-output-names = "ve"; -+ }; -+ -+ codec_clk: clk@01c20140 { -+ #clock-cells = <0>; -+ compatible = "allwinner,sun4i-a10-codec-clk"; -+ reg = <0x01c20140 0x4>; -+ clocks = <&pll2 SUN4I_A10_PLL2_1X>; -+ clock-output-names = "codec"; -+ }; -+ - mbus_clk: clk@01c2015c { - #clock-cells = <0>; - compatible = "allwinner,sun5i-a13-mbus-clk"; -@@ -744,6 +828,14 @@ - status = "disabled"; - }; - -+ crypto: crypto-engine@01c15000 { -+ compatible = "allwinner,sun4i-a10-crypto"; -+ reg = <0x01c15000 0x1000>; -+ interrupts = ; -+ clocks = <&ahb_gates 5>, <&ss_clk>; -+ clock-names = "ahb", "mod"; -+ }; -+ - spi2: spi@01c17000 { - compatible = "allwinner,sun4i-a10-spi"; - reg = <0x01c17000 0x1000>; -@@ -1159,6 +1251,19 @@ - status = "disabled"; - }; - -+ codec: codec@01c22c00 { -+ #sound-dai-cells = <0>; -+ compatible = "allwinner,sun7i-a20-codec"; -+ reg = <0x01c22c00 0x40>; -+ interrupts = ; -+ clocks = <&apb0_gates 0>, <&codec_clk>; -+ clock-names = "apb", "codec"; -+ dmas = <&dma SUN4I_DMA_NORMAL 19>, -+ <&dma SUN4I_DMA_NORMAL 19>; -+ dma-names = "rx", "tx"; -+ status = "disabled"; -+ }; -+ - sid: eeprom@01c23800 { - compatible = "allwinner,sun7i-a20-sid"; - reg = <0x01c23800 0x200>; ---- a/arch/arm/dts/sun8i-a23-a33.dtsi -+++ b/arch/arm/dts/sun8i-a23-a33.dtsi -@@ -56,7 +56,7 @@ - #size-cells = <1>; - ranges; - -- framebuffer@0 { -+ simplefb_lcd: framebuffer@0 { - compatible = "allwinner,simple-framebuffer", - "simple-framebuffer"; - allwinner,pipeline = "de_be0-lcd0"; -@@ -175,27 +175,13 @@ - clock-output-names = "apb1"; - }; - -- ahb1_gates: clk@01c20060 { -- #clock-cells = <1>; -- compatible = "allwinner,sun8i-a23-ahb1-gates-clk"; -- reg = <0x01c20060 0x8>; -- clocks = <&ahb1>; -- clock-output-names = "ahb1_mipidsi", "ahb1_dma", -- "ahb1_mmc0", "ahb1_mmc1", "ahb1_mmc2", -- "ahb1_nand", "ahb1_sdram", -- "ahb1_hstimer", "ahb1_spi0", -- "ahb1_spi1", "ahb1_otg", "ahb1_ehci", -- "ahb1_ohci", "ahb1_ve", "ahb1_lcd", -- "ahb1_csi", "ahb1_be", "ahb1_fe", -- "ahb1_gpu", "ahb1_spinlock", -- "ahb1_drc"; -- }; -- - apb1_gates: clk@01c20068 { - #clock-cells = <1>; - compatible = "allwinner,sun8i-a23-apb1-gates-clk"; - reg = <0x01c20068 0x4>; - clocks = <&apb1>; -+ clock-indices = <0>, <5>, -+ <12>, <13>; - clock-output-names = "apb1_codec", "apb1_pio", - "apb1_daudio0", "apb1_daudio1"; - }; -@@ -213,6 +199,10 @@ - compatible = "allwinner,sun8i-a23-apb2-gates-clk"; - reg = <0x01c2006c 0x4>; - clocks = <&apb2>; -+ clock-indices = <0>, <1>, -+ <2>, <16>, -+ <17>, <18>, -+ <19>, <20>; - clock-output-names = "apb2_i2c0", "apb2_i2c1", - "apb2_i2c2", "apb2_uart0", - "apb2_uart1", "apb2_uart2", -@@ -391,12 +381,19 @@ - allwinner,pins = "PC5", "PC6", "PC8", - "PC9", "PC10", "PC11", - "PC12", "PC13", "PC14", -- "PC15"; -+ "PC15", "PC16"; - allwinner,function = "mmc2"; - allwinner,drive = ; - allwinner,pull = ; - }; - -+ pwm0_pins: pwm0 { -+ allwinner,pins = "PH0"; -+ allwinner,function = "pwm0"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ - i2c0_pins_a: i2c0@0 { - allwinner,pins = "PH2", "PH3"; - allwinner,function = "i2c0"; -@@ -451,6 +448,14 @@ - interrupts = ; - }; - -+ pwm: pwm@01c21400 { -+ compatible = "allwinner,sun7i-a20-pwm"; -+ reg = <0x01c21400 0xc>; -+ clocks = <&osc24M>; -+ #pwm-cells = <3>; -+ status = "disabled"; -+ }; -+ - lradc: lradc@01c22800 { - compatible = "allwinner,sun4i-a10-lradc-keys"; - reg = <0x01c22800 0x100>; -@@ -574,6 +579,14 @@ - ; - }; - -+ nmi_intc: interrupt-controller@01f00c0c { -+ compatible = "allwinner,sun6i-a31-sc-nmi"; -+ interrupt-controller; -+ #interrupt-cells = <2>; -+ reg = <0x01f00c0c 0x38>; -+ interrupts = ; -+ }; -+ - prcm@01f01400 { - compatible = "allwinner,sun8i-a23-prcm"; - reg = <0x01f01400 0x200>; -@@ -642,10 +655,18 @@ - resets = <&apb0_rst 0>; - gpio-controller; - interrupt-controller; -+ #interrupt-cells = <3>; - #address-cells = <1>; - #size-cells = <0>; - #gpio-cells = <3>; - -+ r_rsb_pins: r_rsb { -+ allwinner,pins = "PL0", "PL1"; -+ allwinner,function = "s_rsb"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ - r_uart_pins_a: r_uart@0 { - allwinner,pins = "PL2", "PL3"; - allwinner,function = "s_uart"; -@@ -653,5 +674,19 @@ - allwinner,pull = ; - }; - }; -+ -+ r_rsb: rsb@01f03400 { -+ compatible = "allwinner,sun8i-a23-rsb"; -+ reg = <0x01f03400 0x400>; -+ interrupts = ; -+ clocks = <&apb0_gates 3>; -+ clock-frequency = <3000000>; -+ resets = <&apb0_rst 3>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&r_rsb_pins>; -+ status = "disabled"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ }; - }; - }; ---- a/arch/arm/dts/sun8i-a23-gt90h-v4.dts -+++ b/arch/arm/dts/sun8i-a23-gt90h-v4.dts -@@ -47,15 +47,26 @@ - #include - #include - #include -+#include - - / { -- model = "Allwinner GT90H Quad Core Tablet (v4)"; -- compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a33"; -+ model = "Allwinner GT90H Dual Core Tablet (v4)"; -+ compatible = "allwinner,gt90h-v4", "allwinner,sun8i-a23"; - - aliases { - serial0 = &r_uart; - }; - -+ backlight: backlight { -+ compatible = "pwm-backlight"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&bl_en_pin_gt90h>; -+ pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; -+ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; -+ default-brightness-level = <8>; -+ enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */ -+ }; -+ - chosen { - stdout-path = "serial0:115200n8"; - }; -@@ -106,8 +117,7 @@ - &mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_gt90h>; -- /* FIXME this really is aldo1, correct once we've pmic support */ -- vmmc-supply = <®_vcc3v0>; -+ vmmc-supply = <®_aldo1>; - bus-width = <4>; - cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ - cd-inverted; -@@ -115,6 +125,13 @@ - }; - - &pio { -+ bl_en_pin_gt90h: bl_en_pin@0 { -+ allwinner,pins = "PH6"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ - mmc0_cd_pin_gt90h: mmc0_cd_pin@0 { - allwinner,pins = "PB4"; - allwinner,function = "gpio_in"; -@@ -123,12 +140,106 @@ - }; - }; - -+&pwm { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pwm0_pins>; -+ status = "okay"; -+}; -+ -+&r_rsb { -+ status = "okay"; -+ -+ axp22x: pmic@3a3 { -+ compatible = "x-powers,axp223"; -+ reg = <0x3a3>; -+ interrupt-parent = <&nmi_intc>; -+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; -+ eldoin-supply = <®_dcdc1>; -+ }; -+}; -+ - &r_uart { - pinctrl-names = "default"; - pinctrl-0 = <&r_uart_pins_a>; - status = "okay"; - }; - -+#include "axp22x.dtsi" -+ -+®_aldo1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "vcc-io"; -+}; -+ -+®_aldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <2350000>; -+ regulator-max-microvolt = <2650000>; -+ regulator-name = "vdd-dll"; -+}; -+ -+®_aldo3 { -+ regulator-always-on; -+ regulator-min-microvolt = <2700000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-pll-avcc"; -+}; -+ -+®_dc1sw { -+ regulator-name = "vcc-lcd"; -+}; -+ -+®_dc5ldo { -+ regulator-always-on; -+ regulator-min-microvolt = <900000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-cpus"; -+}; -+ -+®_dcdc1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "vcc-3v0"; -+}; -+ -+®_dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <900000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-sys"; -+}; -+ -+®_dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <900000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-cpu"; -+}; -+ -+®_dcdc5 { -+ regulator-always-on; -+ regulator-min-microvolt = <1500000>; -+ regulator-max-microvolt = <1500000>; -+ regulator-name = "vcc-dram"; -+}; -+ -+®_dldo1 { -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-wifi"; -+}; -+ -+®_rtc_ldo { -+ regulator-name = "vcc-rtc"; -+}; -+ -+&simplefb_lcd { -+ vcc-lcd-supply = <®_dc1sw>; -+}; -+ - /* - * FIXME for now we only support host mode and rely on u-boot to have - * turned on Vbus which is controlled by the axp223 pmic on the board. -@@ -141,5 +252,6 @@ - }; - - &usbphy { -+ usb1_vbus-supply = <®_dldo1>; - status = "okay"; - }; ---- a/arch/arm/dts/sun8i-a23.dtsi -+++ b/arch/arm/dts/sun8i-a23.dtsi -@@ -50,6 +50,31 @@ - }; - - clocks { -+ ahb1_gates: clk@01c20060 { -+ #clock-cells = <1>; -+ compatible = "allwinner,sun8i-a23-ahb1-gates-clk"; -+ reg = <0x01c20060 0x8>; -+ clocks = <&ahb1>; -+ clock-indices = <1>, <6>, -+ <8>, <9>, <10>, -+ <13>, <14>, -+ <19>, <20>, -+ <21>, <24>, <26>, -+ <29>, <32>, <36>, -+ <40>, <44>, <46>, -+ <52>, <53>, -+ <54>, <57>; -+ clock-output-names = "ahb1_mipidsi", "ahb1_dma", -+ "ahb1_mmc0", "ahb1_mmc1", "ahb1_mmc2", -+ "ahb1_nand", "ahb1_sdram", -+ "ahb1_hstimer", "ahb1_spi0", -+ "ahb1_spi1", "ahb1_otg", "ahb1_ehci", -+ "ahb1_ohci", "ahb1_ve", "ahb1_lcd", -+ "ahb1_csi", "ahb1_be", "ahb1_fe", -+ "ahb1_gpu", "ahb1_msgbox", -+ "ahb1_spinlock", "ahb1_drc"; -+ }; -+ - mbus_clk: clk@01c2015c { - #clock-cells = <0>; - compatible = "allwinner,sun8i-a23-mbus-clk"; ---- a/arch/arm/dts/sun8i-a33-sinlinx-sina33.dts -+++ b/arch/arm/dts/sun8i-a33-sinlinx-sina33.dts -@@ -68,7 +68,7 @@ - }; - - &lradc { -- vref-supply = <®_vcc3v0>; -+ vref-supply = <®_dcdc1>; - status = "okay"; - - button@200 { -@@ -96,7 +96,7 @@ - &mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina33>; -- vmmc-supply = <®_vcc3v0>; -+ vmmc-supply = <®_dcdc1>; - bus-width = <4>; - cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ - cd-inverted; -@@ -106,13 +106,16 @@ - &mmc2 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc2_8bit_pins>; -- vmmc-supply = <®_vcc3v0>; -+ vmmc-supply = <®_dcdc1>; - bus-width = <8>; - non-removable; -+ cap-mmc-hw-reset; - status = "okay"; - }; - - &mmc2_8bit_pins { -+ /* Increase drive strength for DDR modes */ -+ allwinner,drive = ; - /* eMMC is missing pull-ups */ - allwinner,pull = ; - }; -@@ -130,6 +133,80 @@ - }; - }; - -+&r_rsb { -+ status = "okay"; -+ -+ axp22x: pmic@3a3 { -+ compatible = "x-powers,axp223"; -+ reg = <0x3a3>; -+ interrupt-parent = <&nmi_intc>; -+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; -+ eldoin-supply = <®_dcdc1>; -+ }; -+}; -+ -+#include "axp22x.dtsi" -+ -+®_aldo1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "vcc-io"; -+}; -+ -+®_aldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <2350000>; -+ regulator-max-microvolt = <2650000>; -+ regulator-name = "vdd-dll"; -+}; -+ -+®_aldo3 { -+ regulator-always-on; -+ regulator-min-microvolt = <2700000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-pll-avcc"; -+}; -+ -+®_dc5ldo { -+ regulator-always-on; -+ regulator-min-microvolt = <900000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-cpus"; -+}; -+ -+®_dcdc1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "vcc-3v0"; -+}; -+ -+®_dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <900000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-sys"; -+}; -+ -+®_dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <900000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-cpu"; -+}; -+ -+®_dcdc5 { -+ regulator-always-on; -+ regulator-min-microvolt = <1500000>; -+ regulator-max-microvolt = <1500000>; -+ regulator-name = "vcc-dram"; -+}; -+ -+®_rtc_ldo { -+ regulator-name = "vcc-rtc"; -+}; -+ - &uart0 { - pinctrl-names = "default"; - pinctrl-0 = <&uart0_pins_b>; ---- a/arch/arm/dts/sun8i-a33.dtsi -+++ b/arch/arm/dts/sun8i-a33.dtsi -@@ -72,6 +72,41 @@ - clock-output-names = "pll11"; - }; - -+ ahb1_gates: clk@01c20060 { -+ #clock-cells = <1>; -+ compatible = "allwinner,sun8i-a33-ahb1-gates-clk"; -+ reg = <0x01c20060 0x8>; -+ clocks = <&ahb1>; -+ clock-indices = <1>, <5>, -+ <6>, <8>, <9>, -+ <10>, <13>, <14>, -+ <19>, <20>, -+ <21>, <24>, <26>, -+ <29>, <32>, <36>, -+ <40>, <44>, <46>, -+ <52>, <53>, -+ <54>, <57>, -+ <58>; -+ clock-output-names = "ahb1_mipidsi", "ahb1_ss", -+ "ahb1_dma","ahb1_mmc0", "ahb1_mmc1", -+ "ahb1_mmc2", "ahb1_nand", "ahb1_sdram", -+ "ahb1_hstimer", "ahb1_spi0", -+ "ahb1_spi1", "ahb1_otg", "ahb1_ehci", -+ "ahb1_ohci", "ahb1_ve", "ahb1_lcd", -+ "ahb1_csi", "ahb1_be", "ahb1_fe", -+ "ahb1_gpu", "ahb1_msgbox", -+ "ahb1_spinlock", "ahb1_drc", -+ "ahb1_sat"; -+ }; -+ -+ ss_clk: clk@01c2009c { -+ #clock-cells = <0>; -+ compatible = "allwinner,sun4i-a10-mod0-clk"; -+ reg = <0x01c2009c 0x4>; -+ clocks = <&osc24M>, <&pll6 0>; -+ clock-output-names = "ss"; -+ }; -+ - mbus_clk: clk@01c2015c { - #clock-cells = <0>; - compatible = "allwinner,sun8i-a23-mbus-clk"; -@@ -82,6 +117,16 @@ - }; - - soc@01c00000 { -+ crypto: crypto-engine@01c15000 { -+ compatible = "allwinner,sun4i-a10-crypto"; -+ reg = <0x01c15000 0x1000>; -+ interrupts = ; -+ clocks = <&ahb1_gates 5>, <&ss_clk>; -+ clock-names = "ahb", "mod"; -+ resets = <&ahb1_rst 5>; -+ reset-names = "ahb"; -+ }; -+ - usb_otg: usb@01c19000 { - compatible = "allwinner,sun8i-a33-musb"; - reg = <0x01c19000 0x0400>; ---- /dev/null -+++ b/arch/arm/dts/sun8i-a83t-cubietruck-plus.dts -@@ -0,0 +1,65 @@ -+/* -+ * Copyright 2015 Chen-Yu Tsai -+ * -+ * Chen-Yu Tsai -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) This file 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; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+/dts-v1/; -+#include "sun8i-a83t.dtsi" -+ -+/ { -+ model = "Cubietech Cubietruck Plus"; -+ compatible = "cubietech,cubietruck-plus", "allwinner,sun8i-a83t"; -+ -+ aliases { -+ serial0 = &uart0; -+ }; -+ -+ chosen { -+ stdout-path = "serial0:115200n8"; -+ }; -+}; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pins_b>; -+ status = "okay"; -+}; ---- a/arch/arm/dts/sun8i-a83t.dtsi -+++ b/arch/arm/dts/sun8i-a83t.dtsi -@@ -52,12 +52,6 @@ - / { - interrupt-parent = <&gic>; - -- chosen { -- #address-cells = <1>; -- #size-cells = <1>; -- ranges; -- }; -- - cpus { - #address-cells = <1>; - #size-cells = <0>; -@@ -85,6 +79,7 @@ - device_type = "cpu"; - reg = <3>; - }; -+ - cpu@100 { - compatible = "arm,cortex-a7"; - device_type = "cpu"; -@@ -96,6 +91,7 @@ - device_type = "cpu"; - reg = <0x101>; - }; -+ - cpu@102 { - compatible = "arm,cortex-a7"; - device_type = "cpu"; -@@ -109,18 +105,12 @@ - }; - }; - -- memory { -- reg = <0x40000000 0x80000000>; -- }; -- - timer { - compatible = "arm,armv7-timer"; -- interrupts = , -- , -- , -- ; -- clock-frequency = <24000000>; -- arm,cpu-registers-not-fw-configured; -+ interrupts = , -+ , -+ , -+ ; - }; - - clocks { -@@ -128,6 +118,7 @@ - #size-cells = <1>; - ranges; - -+ /* TODO: PRCM block has a mux for this. */ - osc24M: osc24M_clk { - #clock-cells = <0>; - compatible = "fixed-clock"; -@@ -135,36 +126,39 @@ - clock-output-names = "osc24M"; - }; - -- osc32k: osc32k_clk { -+ /* -+ * This is called "internal OSC" in some places. -+ * It is an internal RC-based oscillator. -+ * TODO: Its controls are in the PRCM block. -+ */ -+ osc16M: osc16M_clk { - #clock-cells = <0>; - compatible = "fixed-clock"; -- clock-frequency = <32768>; -- clock-output-names = "osc32k"; -+ clock-frequency = <16000000>; -+ clock-output-names = "osc16M"; -+ }; -+ -+ osc16Md512: osc16Md512_clk { -+ #clock-cells = <0>; -+ compatible = "fixed-factor-clock"; -+ clock-div = <512>; -+ clock-mult = <1>; -+ clocks = <&osc16M>; -+ clock-output-names = "osc16M-d512"; - }; - }; - -- soc@01c00000 { -+ soc { - compatible = "simple-bus"; - #address-cells = <1>; - #size-cells = <1>; - ranges; - -- gic: interrupt-controller@01c81000 { -- compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic"; -- reg = <0x01c81000 0x1000>, -- <0x01c82000 0x1000>, -- <0x01c84000 0x2000>, -- <0x01c86000 0x2000>; -- interrupt-controller; -- #interrupt-cells = <3>; -- interrupts = ; -- }; -- - pio: pinctrl@01c20800 { - compatible = "allwinner,sun8i-a83t-pinctrl"; - interrupts = , -- , -- ; -+ , -+ ; - reg = <0x01c20800 0x400>; - clocks = <&osc24M>; - gpio-controller; -@@ -172,27 +166,6 @@ - #interrupt-cells = <3>; - #gpio-cells = <3>; - -- i2c0_pins_a: i2c0@0 { -- allwinner,pins = "PH0", "PH1"; -- allwinner,function = "i2c0"; -- allwinner,drive = ; -- allwinner,pull = ; -- }; -- -- i2c1_pins_a: i2c1@0 { -- allwinner,pins = "PH2", "PH3"; -- allwinner,function = "i2c1"; -- allwinner,drive = ; -- allwinner,pull = ; -- }; -- -- i2c2_pins_a: i2c2@0 { -- allwinner,pins = "PH4", "PH5"; -- allwinner,function = "i2c2"; -- allwinner,drive = ; -- allwinner,pull = ; -- }; -- - mmc0_pins_a: mmc0@0 { - allwinner,pins = "PF0", "PF1", "PF2", - "PF3", "PF4", "PF5"; -@@ -201,24 +174,6 @@ - allwinner,pull = ; - }; - -- mmc1_pins_a: mmc1@0 { -- allwinner,pins = "PG0", "PG1", "PG2", -- "PG3", "PG4", "PG5"; -- allwinner,function = "mmc1"; -- allwinner,drive = ; -- allwinner,pull = ; -- }; -- -- mmc2_8bit_pins: mmc2_8bit { -- allwinner,pins = "PC5", "PC6", "PC8", -- "PC9", "PC10", "PC11", -- "PC12", "PC13", "PC14", -- "PC15"; -- allwinner,function = "mmc2"; -- allwinner,drive = ; -- allwinner,pull = ; -- }; -- - uart0_pins_a: uart0@0 { - allwinner,pins = "PF2", "PF4"; - allwinner,function = "uart0"; -@@ -234,6 +189,21 @@ - }; - }; - -+ timer@01c20c00 { -+ compatible = "allwinner,sun4i-a10-timer"; -+ reg = <0x01c20c00 0xa0>; -+ interrupts = , -+ ; -+ clocks = <&osc24M>; -+ }; -+ -+ watchdog@01c20ca0 { -+ compatible = "allwinner,sun6i-a31-wdt"; -+ reg = <0x01c20ca0 0x20>; -+ interrupts = ; -+ clocks = <&osc24M>; -+ }; -+ - uart0: serial@01c28000 { - compatible = "snps,dw-apb-uart"; - reg = <0x01c28000 0x400>; -@@ -243,5 +213,16 @@ - clocks = <&osc24M>; - status = "disabled"; - }; -+ -+ gic: interrupt-controller@01c81000 { -+ compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic"; -+ reg = <0x01c81000 0x1000>, -+ <0x01c82000 0x1000>, -+ <0x01c84000 0x2000>, -+ <0x01c86000 0x2000>; -+ interrupt-controller; -+ #interrupt-cells = <3>; -+ interrupts = ; -+ }; - }; - }; ---- a/arch/arm/dts/sun8i-h3-orangepi-pc.dts -+++ b/arch/arm/dts/sun8i-h3-orangepi-pc.dts -@@ -45,6 +45,7 @@ - #include "sunxi-common-regulators.dtsi" - - #include -+#include - #include - - / { -@@ -58,6 +59,43 @@ - chosen { - stdout-path = "serial0:115200n8"; - }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&leds_opc>; -+ -+ status_led { -+ label = "status:red:user"; -+ gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>; -+ }; -+ }; -+ -+ r_leds { -+ compatible = "gpio-leds"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&leds_r_opc>; -+ -+ tx { -+ label = "pwr:green:user"; -+ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ }; -+ -+ r_gpio_keys { -+ compatible = "gpio-keys"; -+ input-name = "sw4"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sw_r_opc>; -+ -+ sw4@0 { -+ label = "sw4"; -+ linux,code = ; -+ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; -+ }; -+ }; - }; - - &ehci1 { -@@ -72,6 +110,12 @@ - status = "okay"; - }; - -+&ir { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&ir_pins_a>; -+ status = "okay"; -+}; -+ - &mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; -@@ -94,6 +138,31 @@ - status = "okay"; - }; - -+&pio { -+ leds_opc: led_pins@0 { -+ allwinner,pins = "PA15"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+}; -+ -+&r_pio { -+ leds_r_opc: led_pins@0 { -+ allwinner,pins = "PL10"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ sw_r_opc: key_pins@0 { -+ allwinner,pins = "PL03"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+}; -+ - &uart0 { - pinctrl-names = "default"; - pinctrl-0 = <&uart0_pins_a>; ---- a/arch/arm/dts/sun8i-h3-orangepi-plus.dts -+++ b/arch/arm/dts/sun8i-h3-orangepi-plus.dts -@@ -45,6 +45,7 @@ - #include "sunxi-common-regulators.dtsi" - - #include -+#include - #include - - / { -@@ -70,6 +71,68 @@ - enable-active-high; - gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; - }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&leds_opc>; -+ -+ status_led { -+ label = "status:red:user"; -+ gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>; -+ }; -+ }; -+ -+ r_leds { -+ compatible = "gpio-leds"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&leds_r_opc>; -+ -+ tx { -+ label = "pwr:green:user"; -+ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ }; -+ -+ r_gpio_keys { -+ compatible = "gpio-keys"; -+ input-name = "sw4"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sw_r_opc>; -+ -+ sw4@0 { -+ label = "sw4"; -+ linux,code = ; -+ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; -+ }; -+ }; -+}; -+ -+&pio { -+ leds_opc: led_pins@0 { -+ allwinner,pins = "PA15"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+}; -+ -+&r_pio { -+ leds_r_opc: led_pins@0 { -+ allwinner,pins = "PL10"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ sw_r_opc: key_pins@0 { -+ allwinner,pins = "PL03"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; - }; - - &ehci1 { ---- a/arch/arm/dts/sun8i-h3.dtsi -+++ b/arch/arm/dts/sun8i-h3.dtsi -@@ -83,12 +83,6 @@ - , - , - ; -- clock-frequency = <24000000>; -- arm,cpu-registers-not-fw-configured; -- }; -- -- memory { -- reg = <0x40000000 0x80000000>; - }; - - clocks { -@@ -131,15 +125,24 @@ - compatible = "allwinner,sun6i-a31-pll6-clk"; - reg = <0x01c20028 0x4>; - clocks = <&osc24M>; -- clock-output-names = "pll6", "pll6x2", "pll6d2"; -+ clock-output-names = "pll6", "pll6x2"; - }; - -- pll8: clk@01c20044 { -- #clock-cells = <1>; -- compatible = "allwinner,sun6i-a31-pll6-clk"; -- reg = <0x01c20044 0x4>; -- clocks = <&osc24M>; -- clock-output-names = "pll8", "pll8x2"; -+ pll6d2: pll6d2_clk { -+ #clock-cells = <0>; -+ compatible = "fixed-factor-clock"; -+ clock-div = <2>; -+ clock-mult = <1>; -+ clocks = <&pll6 0>; -+ clock-output-names = "pll6d2"; -+ }; -+ -+ /* dummy clock until pll6 can be reused */ -+ pll8: pll8_clk { -+ #clock-cells = <0>; -+ compatible = "fixed-clock"; -+ clock-frequency = <1>; -+ clock-output-names = "pll8"; - }; - - cpu: cpu_clk@01c20050 { -@@ -170,7 +173,7 @@ - #clock-cells = <0>; - compatible = "allwinner,sun8i-h3-ahb2-clk"; - reg = <0x01c2005c 0x4>; -- clocks = <&ahb1>, <&pll6 2>; -+ clocks = <&ahb1>, <&pll6d2>; - clock-output-names = "ahb2"; - }; - -@@ -213,34 +216,34 @@ - <76>, <77>, <78>, - <96>, <97>, <98>, - <112>, <113>, -- <114>, <115>, <116>, -- <128>, <135>; -- clock-output-names = "ahb1_ce", "ahb1_dma", "ahb1_mmc0", -- "ahb1_mmc1", "ahb1_mmc2", "ahb1_nand", -- "ahb1_sdram", "ahb2_gmac", "ahb1_ts", -- "ahb1_hstimer", "ahb1_spi0", -- "ahb1_spi1", "ahb1_otg", -- "ahb1_otg_ehci0", "ahb1_ehic1", -- "ahb1_ehic2", "ahb1_ehic3", -- "ahb1_otg_ohci0", "ahb2_ohic1", -- "ahb2_ohic2", "ahb2_ohic3", "ahb1_ve", -- "ahb1_lcd0", "ahb1_lcd1", "ahb1_deint", -- "ahb1_csi", "ahb1_tve", "ahb1_hdmi", -- "ahb1_de", "ahb1_gpu", "ahb1_msgbox", -- "ahb1_spinlock", "apb1_codec", -- "apb1_spdif", "apb1_pio", "apb1_ths", -- "apb1_i2s0", "apb1_i2s1", "apb1_i2s2", -- "apb2_i2c0", "apb2_i2c1", "apb2_i2c2", -- "apb2_uart0", "apb2_uart1", -- "apb2_uart2", "apb2_uart3", "apb2_scr", -- "ahb1_ephy", "ahb1_dbg"; -+ <114>, <115>, -+ <116>, <128>, <135>; -+ clock-output-names = "bus_ce", "bus_dma", "bus_mmc0", -+ "bus_mmc1", "bus_mmc2", "bus_nand", -+ "bus_sdram", "bus_gmac", "bus_ts", -+ "bus_hstimer", "bus_spi0", -+ "bus_spi1", "bus_otg", -+ "bus_otg_ehci0", "bus_ehci1", -+ "bus_ehci2", "bus_ehci3", -+ "bus_otg_ohci0", "bus_ohci1", -+ "bus_ohci2", "bus_ohci3", "bus_ve", -+ "bus_lcd0", "bus_lcd1", "bus_deint", -+ "bus_csi", "bus_tve", "bus_hdmi", -+ "bus_de", "bus_gpu", "bus_msgbox", -+ "bus_spinlock", "bus_codec", -+ "bus_spdif", "bus_pio", "bus_ths", -+ "bus_i2s0", "bus_i2s1", "bus_i2s2", -+ "bus_i2c0", "bus_i2c1", "bus_i2c2", -+ "bus_uart0", "bus_uart1", -+ "bus_uart2", "bus_uart3", -+ "bus_scr", "bus_ephy", "bus_dbg"; - }; - - mmc0_clk: clk@01c20088 { - #clock-cells = <1>; - compatible = "allwinner,sun4i-a10-mmc-clk"; - reg = <0x01c20088 0x4>; -- clocks = <&osc24M>, <&pll6 0>, <&pll8 0>; -+ clocks = <&osc24M>, <&pll6 0>, <&pll8>; - clock-output-names = "mmc0", - "mmc0_output", - "mmc0_sample"; -@@ -250,7 +253,7 @@ - #clock-cells = <1>; - compatible = "allwinner,sun4i-a10-mmc-clk"; - reg = <0x01c2008c 0x4>; -- clocks = <&osc24M>, <&pll6 0>, <&pll8 0>; -+ clocks = <&osc24M>, <&pll6 0>, <&pll8>; - clock-output-names = "mmc1", - "mmc1_output", - "mmc1_sample"; -@@ -260,7 +263,7 @@ - #clock-cells = <1>; - compatible = "allwinner,sun4i-a10-mmc-clk"; - reg = <0x01c20090 0x4>; -- clocks = <&osc24M>, <&pll6 0>, <&pll8 0>; -+ clocks = <&osc24M>, <&pll6 0>, <&pll8>; - clock-output-names = "mmc2", - "mmc2_output", - "mmc2_sample"; -@@ -285,6 +288,33 @@ - clocks = <&osc24M>, <&pll6 1>, <&pll5>; - clock-output-names = "mbus"; - }; -+ -+ apb0: apb0_clk { -+ compatible = "fixed-factor-clock"; -+ #clock-cells = <0>; -+ clock-div = <1>; -+ clock-mult = <1>; -+ clocks = <&osc24M>; -+ clock-output-names = "apb0"; -+ }; -+ -+ apb0_gates: clk@01f01428 { -+ compatible = "allwinner,sun8i-h3-apb0-gates-clk", -+ "allwinner,sun4i-a10-gates-clk"; -+ reg = <0x01f01428 0x4>; -+ #clock-cells = <1>; -+ clocks = <&apb0>; -+ clock-indices = <0>, <1>; -+ clock-output-names = "apb0_pio", "apb0_ir"; -+ }; -+ -+ ir_clk: ir_clk@01f01454 { -+ compatible = "allwinner,sun4i-a10-mod0-clk"; -+ reg = <0x01f01454 0x4>; -+ #clock-cells = <0>; -+ clocks = <&osc32k>, <&osc24M>; -+ clock-output-names = "ir"; -+ }; - }; - - soc { -@@ -298,7 +328,7 @@ - reg = <0x01c02000 0x1000>; - interrupts = ; - clocks = <&bus_gates 6>; -- resets = <&bus_rst 6>; -+ resets = <&ahb_rst 6>; - #dma-cells = <1>; - }; - -@@ -313,7 +343,7 @@ - "mmc", - "output", - "sample"; -- resets = <&bus_rst 8>; -+ resets = <&ahb_rst 8>; - reset-names = "ahb"; - interrupts = ; - status = "disabled"; -@@ -332,7 +362,7 @@ - "mmc", - "output", - "sample"; -- resets = <&bus_rst 9>; -+ resets = <&ahb_rst 9>; - reset-names = "ahb"; - interrupts = ; - status = "disabled"; -@@ -351,7 +381,7 @@ - "mmc", - "output", - "sample"; -- resets = <&bus_rst 10>; -+ resets = <&ahb_rst 10>; - reset-names = "ahb"; - interrupts = ; - status = "disabled"; -@@ -396,7 +426,7 @@ - reg = <0x01c1b000 0x100>; - interrupts = ; - clocks = <&bus_gates 25>, <&bus_gates 29>; -- resets = <&bus_rst 25>, <&bus_rst 29>; -+ resets = <&ahb_rst 25>, <&ahb_rst 29>; - phys = <&usbphy 1>; - phy-names = "usb"; - status = "disabled"; -@@ -408,7 +438,7 @@ - interrupts = ; - clocks = <&bus_gates 29>, <&bus_gates 25>, - <&usb_clk 17>; -- resets = <&bus_rst 29>, <&bus_rst 25>; -+ resets = <&ahb_rst 29>, <&ahb_rst 25>; - phys = <&usbphy 1>; - phy-names = "usb"; - status = "disabled"; -@@ -419,7 +449,7 @@ - reg = <0x01c1c000 0x100>; - interrupts = ; - clocks = <&bus_gates 26>, <&bus_gates 30>; -- resets = <&bus_rst 26>, <&bus_rst 30>; -+ resets = <&ahb_rst 26>, <&ahb_rst 30>; - phys = <&usbphy 2>; - phy-names = "usb"; - status = "disabled"; -@@ -431,7 +461,7 @@ - interrupts = ; - clocks = <&bus_gates 30>, <&bus_gates 26>, - <&usb_clk 18>; -- resets = <&bus_rst 30>, <&bus_rst 26>; -+ resets = <&ahb_rst 30>, <&ahb_rst 26>; - phys = <&usbphy 2>; - phy-names = "usb"; - status = "disabled"; -@@ -442,7 +472,7 @@ - reg = <0x01c1d000 0x100>; - interrupts = ; - clocks = <&bus_gates 27>, <&bus_gates 31>; -- resets = <&bus_rst 27>, <&bus_rst 31>; -+ resets = <&ahb_rst 27>, <&ahb_rst 31>; - phys = <&usbphy 3>; - phy-names = "usb"; - status = "disabled"; -@@ -454,7 +484,7 @@ - interrupts = ; - clocks = <&bus_gates 31>, <&bus_gates 27>, - <&usb_clk 19>; -- resets = <&bus_rst 31>, <&bus_rst 27>; -+ resets = <&ahb_rst 31>, <&ahb_rst 27>; - phys = <&usbphy 3>; - phy-names = "usb"; - status = "disabled"; -@@ -469,7 +499,7 @@ - gpio-controller; - #gpio-cells = <3>; - interrupt-controller; -- #interrupt-cells = <2>; -+ #interrupt-cells = <3>; - - uart0_pins_a: uart0@0 { - allwinner,pins = "PA4", "PA5"; -@@ -502,10 +532,22 @@ - }; - }; - -- bus_rst: reset@01c202c0 { -+ ahb_rst: reset@01c202c0 { - #reset-cells = <1>; -- compatible = "allwinner,sun8i-h3-bus-reset"; -- reg = <0x01c202c0 0x1c>; -+ compatible = "allwinner,sun6i-a31-ahb1-reset"; -+ reg = <0x01c202c0 0xc>; -+ }; -+ -+ apb1_rst: reset@01c202d0 { -+ #reset-cells = <1>; -+ compatible = "allwinner,sun6i-a31-clock-reset"; -+ reg = <0x01c202d0 0x4>; -+ }; -+ -+ apb2_rst: reset@01c202d8 { -+ #reset-cells = <1>; -+ compatible = "allwinner,sun6i-a31-clock-reset"; -+ reg = <0x01c202d8 0x4>; - }; - - timer@01c20c00 { -@@ -529,7 +571,7 @@ - reg-shift = <2>; - reg-io-width = <4>; - clocks = <&bus_gates 112>; -- resets = <&bus_rst 144>; -+ resets = <&apb2_rst 16>; - dmas = <&dma 6>, <&dma 6>; - dma-names = "rx", "tx"; - status = "disabled"; -@@ -542,7 +584,7 @@ - reg-shift = <2>; - reg-io-width = <4>; - clocks = <&bus_gates 113>; -- resets = <&bus_rst 145>; -+ resets = <&apb2_rst 17>; - dmas = <&dma 7>, <&dma 7>; - dma-names = "rx", "tx"; - status = "disabled"; -@@ -555,7 +597,7 @@ - reg-shift = <2>; - reg-io-width = <4>; - clocks = <&bus_gates 114>; -- resets = <&bus_rst 146>; -+ resets = <&apb2_rst 18>; - dmas = <&dma 8>, <&dma 8>; - dma-names = "rx", "tx"; - status = "disabled"; -@@ -568,7 +610,7 @@ - reg-shift = <2>; - reg-io-width = <4>; - clocks = <&bus_gates 115>; -- resets = <&bus_rst 147>; -+ resets = <&apb2_rst 19>; - dmas = <&dma 9>, <&dma 9>; - dma-names = "rx", "tx"; - status = "disabled"; -@@ -591,5 +633,40 @@ - interrupts = , - ; - }; -+ -+ apb0_reset: reset@01f014b0 { -+ reg = <0x01f014b0 0x4>; -+ compatible = "allwinner,sun6i-a31-clock-reset"; -+ #reset-cells = <1>; -+ }; -+ -+ ir: ir@01f02000 { -+ compatible = "allwinner,sun5i-a13-ir"; -+ clocks = <&apb0_gates 1>, <&ir_clk>; -+ clock-names = "apb", "ir"; -+ resets = <&apb0_reset 1>; -+ interrupts = ; -+ reg = <0x01f02000 0x40>; -+ status = "disabled"; -+ }; -+ -+ r_pio: pinctrl@01f02c00 { -+ compatible = "allwinner,sun8i-h3-r-pinctrl"; -+ reg = <0x01f02c00 0x400>; -+ interrupts = ; -+ clocks = <&apb0_gates 0>; -+ resets = <&apb0_reset 0>; -+ gpio-controller; -+ #gpio-cells = <3>; -+ interrupt-controller; -+ #interrupt-cells = <3>; -+ -+ ir_pins_a: ir@0 { -+ allwinner,pins = "PL11"; -+ allwinner,function = "s_cir_rx"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ }; - }; - }; ---- a/arch/arm/dts/sun8i-q8-common.dtsi -+++ b/arch/arm/dts/sun8i-q8-common.dtsi -@@ -41,11 +41,23 @@ - */ - #include "sunxi-q8-common.dtsi" - -+#include -+ - / { - aliases { - serial0 = &r_uart; - }; - -+ backlight: backlight { -+ compatible = "pwm-backlight"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&bl_en_pin_q8>; -+ pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; -+ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; -+ default-brightness-level = <8>; -+ enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */ -+ }; -+ - chosen { - stdout-path = "serial0:115200n8"; - }; -@@ -54,7 +66,7 @@ - &mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>; -- vmmc-supply = <®_vcc3v0>; -+ vmmc-supply = <®_dcdc1>; - bus-width = <4>; - cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */ - cd-inverted; -@@ -77,8 +89,90 @@ - }; - }; - -+&r_rsb { -+ status = "okay"; -+ -+ axp22x: pmic@3a3 { -+ compatible = "x-powers,axp223"; -+ reg = <0x3a3>; -+ interrupt-parent = <&nmi_intc>; -+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; -+ eldoin-supply = <®_dcdc1>; -+ }; -+}; -+ -+#include "axp22x.dtsi" -+ -+®_aldo1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "vcc-io"; -+}; -+ -+®_aldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <2350000>; -+ regulator-max-microvolt = <2650000>; -+ regulator-name = "vdd-dll"; -+}; -+ -+®_aldo3 { -+ regulator-always-on; -+ regulator-min-microvolt = <2700000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-pll-avcc"; -+}; -+ -+®_dc1sw { -+ regulator-name = "vcc-lcd"; -+}; -+ -+®_dc5ldo { -+ regulator-always-on; -+ regulator-min-microvolt = <900000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-cpus"; -+}; -+ -+®_dcdc1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "vcc-3v0"; -+}; -+ -+®_dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <900000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-sys"; -+}; -+ -+®_dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <900000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-cpu"; -+}; -+ -+®_dcdc5 { -+ regulator-always-on; -+ regulator-min-microvolt = <1500000>; -+ regulator-max-microvolt = <1500000>; -+ regulator-name = "vcc-dram"; -+}; -+ -+®_rtc_ldo { -+ regulator-name = "vcc-rtc"; -+}; -+ - &r_uart { - pinctrl-names = "default"; - pinctrl-0 = <&r_uart_pins_a>; - status = "okay"; - }; -+ -+&simplefb_lcd { -+ vcc-lcd-supply = <®_dc1sw>; -+}; ---- a/arch/arm/dts/sun9i-a80-cubieboard4.dts -+++ b/arch/arm/dts/sun9i-a80-cubieboard4.dts -@@ -62,9 +62,31 @@ - stdout-path = "serial0:115200n8"; - }; - -+ leds { -+ compatible = "gpio-leds"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&led_pins_cubieboard4>; -+ -+ green { -+ label = "cubieboard4:green:usr"; -+ gpios = <&pio 7 17 GPIO_ACTIVE_HIGH>; /* PH17 */ -+ }; -+ -+ red { -+ label = "cubieboard4:red:usr"; -+ gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */ -+ }; -+ }; - }; - - &pio { -+ led_pins_cubieboard4: led-pins@0 { -+ allwinner,pins = "PH6", "PH17"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ - mmc0_cd_pin_cubieboard4: mmc0_cd_pin@0 { - allwinner,pins = "PH18"; - allwinner,function = "gpio_in"; -@@ -89,6 +111,20 @@ - vmmc-supply = <®_vcc3v0>; - bus-width = <8>; - non-removable; -+ cap-mmc-hw-reset; -+ status = "okay"; -+}; -+ -+&mmc2_8bit_pins { -+ /* Increase drive strength for DDR modes */ -+ allwinner,drive = ; -+}; -+ -+&r_ir { -+ status = "okay"; -+}; -+ -+&r_rsb { - status = "okay"; - }; - ---- a/arch/arm/dts/sun9i-a80-optimus.dts -+++ b/arch/arm/dts/sun9i-a80-optimus.dts -@@ -65,7 +65,7 @@ - leds { - compatible = "gpio-leds"; - pinctrl-names = "default"; -- pinctrl-0 = <&led_pins_optimus>; -+ pinctrl-0 = <&led_pins_optimus>, <&led_r_pins_optimus>; - - /* The LED names match those found on the board */ - -@@ -74,7 +74,10 @@ - gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; - }; - -- /* led3 is on PM15, in R_PIO */ -+ led3 { -+ label = "optimus:led3:usr"; -+ gpios = <&r_pio 1 15 GPIO_ACTIVE_HIGH>; /* PM15 */ -+ }; - - led4 { - label = "optimus:led4:usr"; -@@ -106,17 +109,6 @@ - status = "okay"; - }; - --&i2c3 { -- pinctrl-names = "default"; -- pinctrl-0 = <&i2c3_pins_a>; -- status = "okay"; --}; -- --&i2c3_pins_a { -- /* Enable internal pull-up */ -- allwinner,pull = ; --}; -- - &ohci0 { - status = "okay"; - }; -@@ -171,30 +163,42 @@ - vmmc-supply = <®_vcc3v0>; - bus-width = <8>; - non-removable; -+ cap-mmc-hw-reset; - status = "okay"; - }; - -+&mmc2_8bit_pins { -+ /* Increase drive strength for DDR modes */ -+ allwinner,drive = ; -+}; -+ - ®_usb1_vbus { - pinctrl-0 = <&usb1_vbus_pin_optimus>; - gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ - status = "okay"; - }; - --&uart0 { -- pinctrl-names = "default"; -- pinctrl-0 = <&uart0_pins_a>; -+&r_ir { - status = "okay"; - }; - --&uart4 { -- pinctrl-names = "default"; -- pinctrl-0 = <&uart4_pins_a>; -+&r_pio { -+ led_r_pins_optimus: led-pins@1 { -+ allwinner,pins = "PM15"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+}; -+ -+&r_rsb { - status = "okay"; - }; - --&uart4_pins_a { -- /* Enable internal pull-up */ -- allwinner,pull = ; -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pins_a>; -+ status = "okay"; - }; - - &usbphy1 { ---- a/arch/arm/dts/sun9i-a80.dtsi -+++ b/arch/arm/dts/sun9i-a80.dtsi -@@ -128,6 +128,17 @@ - */ - ranges = <0 0 0 0x20000000>; - -+ /* -+ * This clock is actually configurable from the PRCM address -+ * space. The external 24M oscillator can be turned off, and -+ * the clock switched to an internal 16M RC oscillator. Under -+ * normal operation there's no reason to do this, and the -+ * default is to use the external good one, so just model this -+ * as a fixed clock. Also it is not entirely clear if the -+ * osc24M mux in the PRCM affects the entire clock tree, which -+ * would also throw all the PLL clock rates off, or just the -+ * downstream clocks in the PRCM. -+ */ - osc24M: osc24M_clk { - #clock-cells = <0>; - compatible = "fixed-clock"; -@@ -135,6 +146,13 @@ - clock-output-names = "osc24M"; - }; - -+ /* -+ * The 32k clock is from an external source, normally the -+ * AC100 codec/RTC chip. This clock is by default enabled -+ * and clocked at 32768 Hz, from the oscillator connected -+ * to the AC100. It is configurable, but no such driver or -+ * bindings exist yet. -+ */ - osc32k: osc32k_clk { - #clock-cells = <0>; - compatible = "fixed-clock"; -@@ -164,6 +182,14 @@ - "usb_phy2", "usb_hsic_12M"; - }; - -+ pll3: clk@06000008 { -+ /* placeholder until implemented */ -+ #clock-cells = <0>; -+ compatible = "fixed-clock"; -+ clock-rate = <0>; -+ clock-output-names = "pll3"; -+ }; -+ - pll4: clk@0600000c { - #clock-cells = <0>; - compatible = "allwinner,sun9i-a80-pll4-clk"; -@@ -277,9 +303,12 @@ - compatible = "allwinner,sun9i-a80-ahb0-gates-clk"; - reg = <0x06000580 0x4>; - clocks = <&ahb0>; -- clock-indices = <0>, <1>, <3>, <5>, <8>, <12>, <13>, -- <14>, <15>, <16>, <18>, <20>, <21>, -- <22>, <23>; -+ clock-indices = <0>, <1>, <3>, -+ <5>, <8>, <12>, -+ <13>, <14>, -+ <15>, <16>, <18>, -+ <20>, <21>, <22>, -+ <23>; - clock-output-names = "ahb0_fd", "ahb0_ve", "ahb0_gpu", - "ahb0_ss", "ahb0_sd", "ahb0_nand1", - "ahb0_nand0", "ahb0_sdram", -@@ -293,7 +322,10 @@ - compatible = "allwinner,sun9i-a80-ahb1-gates-clk"; - reg = <0x06000584 0x4>; - clocks = <&ahb1>; -- clock-indices = <0>, <1>, <17>, <21>, <22>, <23>, <24>; -+ clock-indices = <0>, <1>, -+ <17>, <21>, -+ <22>, <23>, -+ <24>; - clock-output-names = "ahb1_usbotg", "ahb1_usbhci", - "ahb1_gmac", "ahb1_msgbox", - "ahb1_spinlock", "ahb1_hstimer", -@@ -305,8 +337,9 @@ - compatible = "allwinner,sun9i-a80-ahb2-gates-clk"; - reg = <0x06000588 0x4>; - clocks = <&ahb2>; -- clock-indices = <0>, <1>, <2>, <4>, <5>, <7>, <8>, -- <11>; -+ clock-indices = <0>, <1>, -+ <2>, <4>, <5>, -+ <7>, <8>, <11>; - clock-output-names = "ahb2_lcd0", "ahb2_lcd1", - "ahb2_edp", "ahb2_csi", "ahb2_hdmi", - "ahb2_de", "ahb2_mp", "ahb2_mipi_dsi"; -@@ -317,8 +350,10 @@ - compatible = "allwinner,sun9i-a80-apb0-gates-clk"; - reg = <0x06000590 0x4>; - clocks = <&apb0>; -- clock-indices = <1>, <5>, <11>, <12>, <13>, <15>, -- <17>, <18>, <19>; -+ clock-indices = <1>, <5>, -+ <11>, <12>, <13>, -+ <15>, <17>, <18>, -+ <19>; - clock-output-names = "apb0_spdif", "apb0_pio", - "apb0_ac97", "apb0_i2s0", "apb0_i2s1", - "apb0_lradc", "apb0_gpadc", "apb0_twd", -@@ -330,14 +365,79 @@ - compatible = "allwinner,sun9i-a80-apb1-gates-clk"; - reg = <0x06000594 0x4>; - clocks = <&apb1>; -- clock-indices = <0>, <1>, <2>, <3>, <4>, -- <16>, <17>, <18>, <19>, <20>, <21>; -+ clock-indices = <0>, <1>, -+ <2>, <3>, <4>, -+ <16>, <17>, -+ <18>, <19>, -+ <20>, <21>; - clock-output-names = "apb1_i2c0", "apb1_i2c1", - "apb1_i2c2", "apb1_i2c3", "apb1_i2c4", - "apb1_uart0", "apb1_uart1", - "apb1_uart2", "apb1_uart3", - "apb1_uart4", "apb1_uart5"; - }; -+ -+ cpus_clk: clk@08001410 { -+ compatible = "allwinner,sun9i-a80-cpus-clk"; -+ reg = <0x08001410 0x4>; -+ #clock-cells = <0>; -+ clocks = <&osc32k>, <&osc24M>, <&pll4>, <&pll3>; -+ clock-output-names = "cpus"; -+ }; -+ -+ ahbs: ahbs_clk { -+ compatible = "fixed-factor-clock"; -+ #clock-cells = <0>; -+ clock-div = <1>; -+ clock-mult = <1>; -+ clocks = <&cpus_clk>; -+ clock-output-names = "ahbs"; -+ }; -+ -+ apbs: clk@0800141c { -+ compatible = "allwinner,sun8i-a23-apb0-clk"; -+ reg = <0x0800141c 0x4>; -+ #clock-cells = <0>; -+ clocks = <&ahbs>; -+ clock-output-names = "apbs"; -+ }; -+ -+ apbs_gates: clk@08001428 { -+ compatible = "allwinner,sun9i-a80-apbs-gates-clk"; -+ reg = <0x08001428 0x4>; -+ #clock-cells = <1>; -+ clocks = <&apbs>; -+ clock-indices = <0>, <1>, -+ <2>, <3>, -+ <4>, <5>, -+ <6>, <7>, -+ <12>, <13>, -+ <16>, <17>, -+ <18>, <20>; -+ clock-output-names = "apbs_pio", "apbs_ir", -+ "apbs_timer", "apbs_rsb", -+ "apbs_uart", "apbs_1wire", -+ "apbs_i2c0", "apbs_i2c1", -+ "apbs_ps2_0", "apbs_ps2_1", -+ "apbs_dma", "apbs_i2s0", -+ "apbs_i2s1", "apbs_twd"; -+ }; -+ -+ r_1wire_clk: clk@08001450 { -+ reg = <0x08001450 0x4>; -+ #clock-cells = <0>; -+ compatible = "allwinner,sun4i-a10-mod0-clk"; -+ clocks = <&osc32k>, <&osc24M>; -+ clock-output-names = "r_1wire"; -+ }; -+ -+ r_ir_clk: clk@08001454 { -+ reg = <0x08001454 0x4>; -+ #clock-cells = <0>; -+ compatible = "allwinner,sun4i-a10-mod0-clk"; -+ clocks = <&osc32k>, <&osc24M>; -+ clock-output-names = "r_ir"; -+ }; - }; - - soc { -@@ -443,7 +543,7 @@ - }; - - mmc0: mmc@01c0f000 { -- compatible = "allwinner,sun5i-a13-mmc"; -+ compatible = "allwinner,sun9i-a80-mmc"; - reg = <0x01c0f000 0x1000>; - clocks = <&mmc_config_clk 0>, <&mmc0_clk 0>, - <&mmc0_clk 1>, <&mmc0_clk 2>; -@@ -457,7 +557,7 @@ - }; - - mmc1: mmc@01c10000 { -- compatible = "allwinner,sun5i-a13-mmc"; -+ compatible = "allwinner,sun9i-a80-mmc"; - reg = <0x01c10000 0x1000>; - clocks = <&mmc_config_clk 1>, <&mmc1_clk 0>, - <&mmc1_clk 1>, <&mmc1_clk 2>; -@@ -471,7 +571,7 @@ - }; - - mmc2: mmc@01c11000 { -- compatible = "allwinner,sun5i-a13-mmc"; -+ compatible = "allwinner,sun9i-a80-mmc"; - reg = <0x01c11000 0x1000>; - clocks = <&mmc_config_clk 2>, <&mmc2_clk 0>, - <&mmc2_clk 1>, <&mmc2_clk 2>; -@@ -485,7 +585,7 @@ - }; - - mmc3: mmc@01c12000 { -- compatible = "allwinner,sun5i-a13-mmc"; -+ compatible = "allwinner,sun9i-a80-mmc"; - reg = <0x01c12000 0x1000>; - clocks = <&mmc_config_clk 3>, <&mmc3_clk 0>, - <&mmc3_clk 1>, <&mmc3_clk 2>; -@@ -582,7 +682,7 @@ - clocks = <&apb0_gates 5>; - gpio-controller; - interrupt-controller; -- #interrupt-cells = <2>; -+ #interrupt-cells = <3>; - #size-cells = <0>; - #gpio-cells = <3>; - -@@ -604,7 +704,8 @@ - mmc2_8bit_pins: mmc2_8bit { - allwinner,pins = "PC6", "PC7", "PC8", "PC9", - "PC10", "PC11", "PC12", -- "PC13", "PC14", "PC15"; -+ "PC13", "PC14", "PC15", -+ "PC16"; - allwinner,function = "mmc2"; - allwinner,drive = ; - allwinner,pull = ; -@@ -752,14 +853,83 @@ - interrupts = ; - }; - -+ apbs_rst: reset@080014b0 { -+ reg = <0x080014b0 0x4>; -+ compatible = "allwinner,sun6i-a31-clock-reset"; -+ #reset-cells = <1>; -+ }; -+ -+ nmi_intc: interrupt-controller@080015a0 { -+ compatible = "allwinner,sun9i-a80-nmi"; -+ interrupt-controller; -+ #interrupt-cells = <2>; -+ reg = <0x080015a0 0xc>; -+ interrupts = ; -+ }; -+ -+ r_ir: ir@08002000 { -+ compatible = "allwinner,sun5i-a13-ir"; -+ interrupts = ; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&r_ir_pins>; -+ clocks = <&apbs_gates 1>, <&r_ir_clk>; -+ clock-names = "apb", "ir"; -+ resets = <&apbs_rst 1>; -+ reg = <0x08002000 0x40>; -+ status = "disabled"; -+ }; -+ - r_uart: serial@08002800 { - compatible = "snps,dw-apb-uart"; - reg = <0x08002800 0x400>; - interrupts = ; - reg-shift = <2>; - reg-io-width = <4>; -- clocks = <&osc24M>; -+ clocks = <&apbs_gates 4>; -+ resets = <&apbs_rst 4>; - status = "disabled"; - }; -+ -+ r_pio: pinctrl@08002c00 { -+ compatible = "allwinner,sun9i-a80-r-pinctrl"; -+ reg = <0x08002c00 0x400>; -+ interrupts = , -+ ; -+ clocks = <&apbs_gates 0>; -+ resets = <&apbs_rst 0>; -+ gpio-controller; -+ interrupt-controller; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ #gpio-cells = <3>; -+ -+ r_ir_pins: r_ir { -+ allwinner,pins = "PL6"; -+ allwinner,function = "s_cir_rx"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ r_rsb_pins: r_rsb { -+ allwinner,pins = "PN0", "PN1"; -+ allwinner,function = "s_rsb"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ }; -+ -+ r_rsb: i2c@08003400 { -+ compatible = "allwinner,sun8i-a23-rsb"; -+ reg = <0x08003400 0x400>; -+ interrupts = ; -+ clocks = <&apbs_gates 3>; -+ clock-frequency = <3000000>; -+ resets = <&apbs_rst 3>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&r_rsb_pins>; -+ status = "disabled"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ }; - }; - }; ---- /dev/null -+++ b/arch/arm/dts/sunxi-itead-core-common.dtsi -@@ -0,0 +1,136 @@ -+/* -+ * Copyright 2015 - Marcus Cooper -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) This file 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; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#include "sunxi-common-regulators.dtsi" -+ -+/ { -+ aliases { -+ serial0 = &uart0; -+ }; -+ -+ chosen { -+ stdout-path = "serial0:115200n8"; -+ }; -+}; -+ -+&cpu0 { -+ cpu-supply = <®_dcdc2>; -+}; -+ -+&ehci0 { -+ status = "okay"; -+}; -+ -+&ehci1 { -+ status = "okay"; -+}; -+ -+&i2c0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c0_pins_a>; -+ status = "okay"; -+ -+ axp209: pmic@34 { -+ reg = <0x34>; -+ }; -+}; -+ -+&i2c1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c1_pins_a>; -+ status = "okay"; -+}; -+ -+&ohci0 { -+ status = "okay"; -+}; -+ -+&ohci1 { -+ status = "okay"; -+}; -+ -+#include "axp209.dtsi" -+ -+®_dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-cpu"; -+}; -+ -+®_dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-int-dll"; -+}; -+ -+®_ldo1 { -+ regulator-name = "vdd-rtc"; -+}; -+ -+®_ldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "avcc"; -+}; -+ -+®_usb1_vbus { -+ status = "okay"; -+}; -+ -+®_usb2_vbus { -+ status = "okay"; -+}; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pins_a>; -+ status = "okay"; -+}; -+ -+&usbphy { -+ usb1_vbus-supply = <®_usb1_vbus>; -+ usb2_vbus-supply = <®_usb2_vbus>; -+ status = "okay"; -+}; ---- a/arch/arm/dts/sunxi-q8-common.dtsi -+++ b/arch/arm/dts/sunxi-q8-common.dtsi -@@ -75,3 +75,9 @@ - voltage = <400000>; - }; - }; -+ -+&pwm { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pwm0_pins>; -+ status = "okay"; -+}; diff --git a/package/boot/uboot-sunxi/patches/012-sun6i-fix-clock_twi_onoff.patch b/package/boot/uboot-sunxi/patches/012-sun6i-fix-clock_twi_onoff.patch deleted file mode 100644 index 45416703a4fd0a..00000000000000 --- a/package/boot/uboot-sunxi/patches/012-sun6i-fix-clock_twi_onoff.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 730d2f3a41c5ccae71b5008fffdf697d143be68c Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Wed, 16 Mar 2016 20:44:51 +0100 -Subject: [PATCH] sunxi: Fix clock_twi_onoff for sun6i - -The clock_sun6i.c implementation was not deasserting the reset for -the regular i2c controllers, this commit fixes this. - -Signed-off-by: Hans de Goede -Acked-by: Ian Campbell ---- - arch/arm/cpu/armv7/sunxi/clock_sun6i.c | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - ---- a/arch/arm/cpu/armv7/sunxi/clock_sun6i.c -+++ b/arch/arm/cpu/armv7/sunxi/clock_sun6i.c -@@ -100,13 +100,18 @@ int clock_twi_onoff(int port, int state) - return 0; - } - -- /* set the apb clock gate for twi */ -- if (state) -+ /* set the apb clock gate and reset for twi */ -+ if (state) { - setbits_le32(&ccm->apb2_gate, - CLK_GATE_OPEN << (APB2_GATE_TWI_SHIFT+port)); -- else -+ setbits_le32(&ccm->apb2_reset_cfg, -+ 1 << (APB2_RESET_TWI_SHIFT + port)); -+ } else { -+ clrbits_le32(&ccm->apb2_reset_cfg, -+ 1 << (APB2_RESET_TWI_SHIFT + port)); - clrbits_le32(&ccm->apb2_gate, - CLK_GATE_OPEN << (APB2_GATE_TWI_SHIFT+port)); -+ } - - return 0; - } diff --git a/package/boot/uboot-sunxi/patches/013-enable-realtek-phy.patch b/package/boot/uboot-sunxi/patches/013-enable-realtek-phy.patch deleted file mode 100644 index 47f825c5706f41..00000000000000 --- a/package/boot/uboot-sunxi/patches/013-enable-realtek-phy.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 1eae8f66ff749409eb96e2f3f3387c56232d0b8a Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Wed, 16 Mar 2016 13:46:22 +0100 -Subject: [PATCH] sunxi: Enable realtek phy support - -Enable building of drivers/net/phy/realtek.c so that realtek phys -get properly initialized. - -Signed-off-by: Hans de Goede -Acked-by: Ian Campbell ---- - include/configs/sunxi-common.h | 1 + - 1 file changed, 1 insertion(+) - ---- a/include/configs/sunxi-common.h -+++ b/include/configs/sunxi-common.h -@@ -314,6 +314,7 @@ extern int soft_i2c_gpio_scl; - #define CONFIG_PHY_GIGE /* GMAC can use gigabit PHY */ - #define CONFIG_PHY_ADDR 1 - #define CONFIG_MII /* MII PHY management */ -+#define CONFIG_PHY_REALTEK - #endif - - #ifdef CONFIG_USB_EHCI_HCD diff --git a/package/boot/uboot-sunxi/patches/014-fix-gmac-init.patch b/package/boot/uboot-sunxi/patches/014-fix-gmac-init.patch deleted file mode 100644 index cf511ce77336d6..00000000000000 --- a/package/boot/uboot-sunxi/patches/014-fix-gmac-init.patch +++ /dev/null @@ -1,127 +0,0 @@ -From fc8991c61c393ce6a9d3dfc97cb56dbbd9e8cbba Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Thu, 17 Mar 2016 13:53:03 +0100 -Subject: [PATCH] sunxi: Fix gmac not working due to cpu_eth_init no longer - being called - -cpu_eth_init is no longer called for dm enabled eth drivers, this -was causing the sunxi gmac eth controller to no longer work in u-boot. - -This commit fixes this by calling the clock, reset and pinmux setup -function from s_init() and enabling the phy power pin (if any) from -board_init(). - -The enabling of phy power cannot be done from s_init because it uses dm -and dm is not ready yet at this point. - -Note that the mdelay is dropped as the phy gets enabled much earlier -now, so it is no longer needed. - -Signed-off-by: Hans de Goede -Acked-by: Ian Campbell -Tested-by: Karsten Merker -Tested-by: Michael Haas ---- - arch/arm/cpu/armv7/sunxi/board.c | 28 +--------------------------- - arch/arm/include/asm/arch-sunxi/sys_proto.h | 6 +++++- - board/sunxi/board.c | 5 +++++ - board/sunxi/gmac.c | 14 +------------- - 4 files changed, 12 insertions(+), 41 deletions(-) - ---- a/arch/arm/cpu/armv7/sunxi/board.c -+++ b/arch/arm/cpu/armv7/sunxi/board.c -@@ -136,6 +136,7 @@ void s_init(void) - timer_init(); - gpio_init(); - i2c_init_board(); -+ eth_init_board(); - } - - #ifdef CONFIG_SPL_BUILD -@@ -243,30 +244,3 @@ void enable_caches(void) - dcache_enable(); - } - #endif -- --#ifdef CONFIG_CMD_NET --/* -- * Initializes on-chip ethernet controllers. -- * to override, implement board_eth_init() -- */ --int cpu_eth_init(bd_t *bis) --{ -- __maybe_unused int rc; -- --#ifdef CONFIG_MACPWR -- gpio_request(CONFIG_MACPWR, "macpwr"); -- gpio_direction_output(CONFIG_MACPWR, 1); -- mdelay(200); --#endif -- --#ifdef CONFIG_SUNXI_GMAC -- rc = sunxi_gmac_initialize(bis); -- if (rc < 0) { -- printf("sunxi: failed to initialize gmac\n"); -- return rc; -- } --#endif -- -- return 0; --} --#endif ---- a/arch/arm/include/asm/arch-sunxi/sys_proto.h -+++ b/arch/arm/include/asm/arch-sunxi/sys_proto.h -@@ -24,6 +24,10 @@ void sdelay(unsigned long); - void return_to_fel(uint32_t lr, uint32_t sp); - - /* Board / SoC level designware gmac init */ --int sunxi_gmac_initialize(bd_t *bis); -+#if !defined CONFIG_SPL_BUILD && defined CONFIG_SUNXI_GMAC -+void eth_init_board(void); -+#else -+static inline void eth_init_board(void) {} -+#endif - - #endif ---- a/board/sunxi/board.c -+++ b/board/sunxi/board.c -@@ -90,6 +90,11 @@ int board_init(void) - if (ret) - return ret; - -+#ifdef CONFIG_MACPWR -+ gpio_request(CONFIG_MACPWR, "macpwr"); -+ gpio_direction_output(CONFIG_MACPWR, 1); -+#endif -+ - /* Uses dm gpio code so do this here and not in i2c_init_board() */ - return soft_i2c_board_init(); - } ---- a/board/sunxi/gmac.c -+++ b/board/sunxi/gmac.c -@@ -6,7 +6,7 @@ - #include - #include - --int sunxi_gmac_initialize(bd_t *bis) -+void eth_init_board(void) - { - int pin; - struct sunxi_ccm_reg *const ccm = -@@ -79,16 +79,4 @@ int sunxi_gmac_initialize(bd_t *bis) - for (pin = SUNXI_GPA(26); pin <= SUNXI_GPA(27); pin++) - sunxi_gpio_set_cfgpin(pin, SUN6I_GPA_GMAC); - #endif -- --#ifdef CONFIG_DM_ETH -- return 0; --#else --# ifdef CONFIG_RGMII -- return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_RGMII); --# elif defined CONFIG_GMII -- return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_GMII); --# else -- return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_MII); --# endif --#endif - } diff --git a/package/boot/uboot-sunxi/patches/015-fix-2nd-usb-ctrler-on-sun47i.patch b/package/boot/uboot-sunxi/patches/015-fix-2nd-usb-ctrler-on-sun47i.patch deleted file mode 100644 index 95a77c68d62fbd..00000000000000 --- a/package/boot/uboot-sunxi/patches/015-fix-2nd-usb-ctrler-on-sun47i.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 948603d4d637a0e04a3214253b911cfc4ed11220 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Mon, 21 Mar 2016 14:44:35 +0100 -Subject: [PATCH] sunxi: Fix 2nd usb controller on sun4i/sun7i no longer - working - -The 2nd usb controller on sun4i/sun7i has its base address 0x8000 -bytes from the 1st one, rather then 0x1000. Also the ahb clk gates -are interleaved with the ohci clk-gates introducing a hole between -the clks for usb1 and usb2. - -Signed-off-by: Hans de Goede -Acked-by: Ian Campbell ---- - drivers/usb/host/ehci-sunxi.c | 13 +++++++++++-- - drivers/usb/host/ohci-sunxi.c | 15 ++++++++++++--- - 2 files changed, 23 insertions(+), 5 deletions(-) - ---- a/drivers/usb/host/ehci-sunxi.c -+++ b/drivers/usb/host/ehci-sunxi.c -@@ -17,6 +17,14 @@ - #include - #include "ehci.h" - -+#ifdef CONFIG_SUNXI_GEN_SUN4I -+#define BASE_DIST 0x8000 -+#define AHB_CLK_DIST 2 -+#else -+#define BASE_DIST 0x1000 -+#define AHB_CLK_DIST 1 -+#endif -+ - struct ehci_sunxi_priv { - struct ehci_ctrl ehci; - int ahb_gate_mask; /* Mask of ahb_gate0 clk gate bits for this hcd */ -@@ -39,8 +47,9 @@ static int ehci_usb_probe(struct udevice - #ifdef CONFIG_MACH_SUN8I_H3 - priv->ahb_gate_mask |= 1 << AHB_GATE_OFFSET_USB_OHCI0; - #endif -- priv->phy_index = ((u32)hccr - SUNXI_USB1_BASE) / 0x1000 + 1; -- priv->ahb_gate_mask <<= priv->phy_index - 1; -+ priv->phy_index = ((u32)hccr - SUNXI_USB1_BASE) / BASE_DIST; -+ priv->ahb_gate_mask <<= priv->phy_index * AHB_CLK_DIST; -+ priv->phy_index++; /* Non otg phys start at 1 */ - - setbits_le32(&ccm->ahb_gate0, priv->ahb_gate_mask); - #ifdef CONFIG_SUNXI_GEN_SUN6I ---- a/drivers/usb/host/ohci-sunxi.c -+++ b/drivers/usb/host/ohci-sunxi.c -@@ -17,6 +17,14 @@ - #include - #include "ohci.h" - -+#ifdef CONFIG_SUNXI_GEN_SUN4I -+#define BASE_DIST 0x8000 -+#define AHB_CLK_DIST 2 -+#else -+#define BASE_DIST 0x1000 -+#define AHB_CLK_DIST 1 -+#endif -+ - struct ohci_sunxi_priv { - ohci_t ohci; - int ahb_gate_mask; /* Mask of ahb_gate0 clk gate bits for this hcd */ -@@ -42,9 +50,10 @@ static int ohci_usb_probe(struct udevice - priv->ahb_gate_mask |= 1 << AHB_GATE_OFFSET_USB_EHCI0; - #endif - priv->usb_gate_mask = CCM_USB_CTRL_OHCI0_CLK; -- priv->phy_index = ((u32)regs - (SUNXI_USB1_BASE + 0x400)) / 0x1000 + 1; -- priv->ahb_gate_mask <<= priv->phy_index - 1; -- priv->usb_gate_mask <<= priv->phy_index - 1; -+ priv->phy_index = ((u32)regs - (SUNXI_USB1_BASE + 0x400)) / BASE_DIST; -+ priv->ahb_gate_mask <<= priv->phy_index * AHB_CLK_DIST; -+ priv->usb_gate_mask <<= priv->phy_index; -+ priv->phy_index++; /* Non otg phys start at 1 */ - - setbits_le32(&ccm->ahb_gate0, priv->ahb_gate_mask); - setbits_le32(&ccm->usb_clk_cfg, priv->usb_gate_mask); diff --git a/package/boot/uboot-sunxi/patches/016-spl-print-mmc-slot.patch b/package/boot/uboot-sunxi/patches/016-spl-print-mmc-slot.patch deleted file mode 100644 index 04a2af72eecc7a..00000000000000 --- a/package/boot/uboot-sunxi/patches/016-spl-print-mmc-slot.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 8f10b5c65611e6c15a113bf63289b6696452f90d Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Sun, 20 Mar 2016 14:17:10 +0100 -Subject: [PATCH] spl: Print from which mmc slot spl is trying to boot - -On some sunxi boards (and presumably also non sunxi boards) u-boot can -be either loaded from a sdcard in a micro-sd slot, or from eMMC. - -Print which MMC spl tries to boot from, to help debugging. - -Signed-off-by: Hans de Goede -Reviewed-by: Tom Rini ---- - common/spl/spl.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/common/spl/spl.c -+++ b/common/spl/spl.c -@@ -210,9 +210,9 @@ struct boot_device_name boot_name_table[ - { BOOT_DEVICE_RAM, "RAM" }, - #endif - #ifdef CONFIG_SPL_MMC_SUPPORT -- { BOOT_DEVICE_MMC1, "MMC" }, -- { BOOT_DEVICE_MMC2, "MMC" }, -- { BOOT_DEVICE_MMC2_2, "MMC" }, -+ { BOOT_DEVICE_MMC1, "MMC1" }, -+ { BOOT_DEVICE_MMC2, "MMC2" }, -+ { BOOT_DEVICE_MMC2_2, "MMC2_2" }, - #endif - #ifdef CONFIG_SPL_NAND_SUPPORT - { BOOT_DEVICE_NAND, "NAND" }, diff --git a/package/boot/uboot-sunxi/patches/017-usb-add-support-for-usb3-vbus-pin.patch b/package/boot/uboot-sunxi/patches/017-usb-add-support-for-usb3-vbus-pin.patch deleted file mode 100644 index 098fe720354468..00000000000000 --- a/package/boot/uboot-sunxi/patches/017-usb-add-support-for-usb3-vbus-pin.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 60fa63012fcdc3c4ec1497bf5e358f0a90b40949 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Fri, 18 Mar 2016 08:42:01 +0100 -Subject: [PATCH] sunxi: Add support for USB vbus pin for USB3 - -The H3 has USB0 - USB3, add support for having a USB vbus pin for USB3. - -Signed-off-by: Hans de Goede -Acked-by: Ian Campbell ---- - arch/arm/cpu/armv7/sunxi/usb_phy.c | 1 + - board/sunxi/Kconfig | 6 ++++++ - 2 files changed, 7 insertions(+) - ---- a/arch/arm/cpu/armv7/sunxi/usb_phy.c -+++ b/arch/arm/cpu/armv7/sunxi/usb_phy.c -@@ -76,6 +76,7 @@ static int get_vbus_gpio(int index) - case 0: return sunxi_name_to_gpio(CONFIG_USB0_VBUS_PIN); - case 1: return sunxi_name_to_gpio(CONFIG_USB1_VBUS_PIN); - case 2: return sunxi_name_to_gpio(CONFIG_USB2_VBUS_PIN); -+ case 3: return sunxi_name_to_gpio(CONFIG_USB3_VBUS_PIN); - } - return -EINVAL; - } ---- a/board/sunxi/Kconfig -+++ b/board/sunxi/Kconfig -@@ -341,6 +341,12 @@ config USB2_VBUS_PIN - ---help--- - See USB1_VBUS_PIN help text. - -+config USB3_VBUS_PIN -+ string "Vbus enable pin for usb3 (ehci2)" -+ default "" -+ ---help--- -+ See USB1_VBUS_PIN help text. -+ - config I2C0_ENABLE - bool "Enable I2C/TWI controller 0" - default y if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I diff --git a/package/boot/uboot-sunxi/patches/018-usb-specify-vbus-pins-on-orangepis.patch b/package/boot/uboot-sunxi/patches/018-usb-specify-vbus-pins-on-orangepis.patch deleted file mode 100644 index a216bc9f113fc3..00000000000000 --- a/package/boot/uboot-sunxi/patches/018-usb-specify-vbus-pins-on-orangepis.patch +++ /dev/null @@ -1,31 +0,0 @@ -From ce0d0926758f631fdd655d438acd32d5935d43a4 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Fri, 18 Mar 2016 08:45:21 +0100 -Subject: [PATCH] sunxi: Specify USB vbus pins for orangepi boards - -This fixes the USB ports not working on the orangepi_plus and stops us -from messing with gpio-s which we should not touch on the orangepi_pc. - -Signed-off-by: Hans de Goede -Acked-by: Ian Campbell ---- - configs/orangepi_pc_defconfig | 3 +++ - configs/orangepi_plus_defconfig | 1 + - 2 files changed, 4 insertions(+) - ---- a/configs/orangepi_pc_defconfig -+++ b/configs/orangepi_pc_defconfig -@@ -14,3 +14,6 @@ CONFIG_SPL=y - CONFIG_CMD_GPIO=y - CONFIG_SY8106A_POWER=y - CONFIG_USB_EHCI_HCD=y -+CONFIG_USB1_VBUS_PIN="" -+CONFIG_USB2_VBUS_PIN="" -+CONFIG_USB3_VBUS_PIN="" ---- a/configs/orangepi_plus_defconfig -+++ b/configs/orangepi_plus_defconfig -@@ -14,3 +14,4 @@ CONFIG_SPL=y - CONFIG_CMD_GPIO=y - CONFIG_SY8106A_POWER=y - CONFIG_USB_EHCI_HCD=y -+CONFIG_USB1_VBUS_PIN="PG13" diff --git a/package/boot/uboot-sunxi/patches/019-sid-add-efuse-support-for-h3-a83t.patch b/package/boot/uboot-sunxi/patches/019-sid-add-efuse-support-for-h3-a83t.patch deleted file mode 100644 index e7b8cd73df5820..00000000000000 --- a/package/boot/uboot-sunxi/patches/019-sid-add-efuse-support-for-h3-a83t.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 70fe24ed93fa90eb407d18a5fc9d9ad85ac9184c Mon Sep 17 00:00:00 2001 -From: Chen-Yu Tsai -Date: Wed, 27 Jan 2016 16:34:43 +0800 -Subject: [PATCH] sunxi: Support SID e-fuses on A83T and H3 - -On the A83T and H3, the SID block is at a different address. -Furthurmore, the e-fuses are at an offset of 0x200 within the -hardware's address space. - -Signed-off-by: Chen-Yu Tsai -Acked-by: Hans de Goede -Signed-off-by: Hans de Goede ---- - arch/arm/include/asm/arch-sunxi/cpu_sun4i.h | 7 +++++++ - 1 file changed, 7 insertions(+) - ---- a/arch/arm/include/asm/arch-sunxi/cpu_sun4i.h -+++ b/arch/arm/include/asm/arch-sunxi/cpu_sun4i.h -@@ -82,7 +82,14 @@ - #define SUNXI_AD_DA_BASE 0x01c22c00 - #define SUNXI_KEYPAD_BASE 0x01c23000 - #define SUNXI_TZPC_BASE 0x01c23400 -+ -+#if defined(CONFIG_MACH_SUN8I_A83T) || defined(CONFIG_MACH_SUN8I_H3) -+/* SID address space starts at 0x01c1400, but e-fuse is at offset 0x200 */ -+#define SUNXI_SID_BASE 0x01c14200 -+#else - #define SUNXI_SID_BASE 0x01c23800 -+#endif -+ - #define SUNXI_SJTAG_BASE 0x01c23c00 - - #define SUNXI_TP_BASE 0x01c25000 diff --git a/package/boot/uboot-sunxi/patches/020-boot-display-board-model-on-startup.patch b/package/boot/uboot-sunxi/patches/020-boot-display-board-model-on-startup.patch deleted file mode 100644 index d49fc97373c947..00000000000000 --- a/package/boot/uboot-sunxi/patches/020-boot-display-board-model-on-startup.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 2af25b747340c6c8f6a6b9e27632db577bf4da52 Mon Sep 17 00:00:00 2001 -From: Simon Glass -Date: Mon, 22 Feb 2016 22:55:46 -0700 -Subject: [PATCH] sunxi: Display the board model on start-up - -It is useful to know which sunxi board you are booting. Display this on -start-up to avoid confusion. - -Signed-off-by: Simon Glass ---- - include/configs/sunxi-common.h | 1 + - 1 file changed, 1 insertion(+) - ---- a/include/configs/sunxi-common.h -+++ b/include/configs/sunxi-common.h -@@ -174,6 +174,7 @@ - - #define CONFIG_SYS_MONITOR_LEN (768 << 10) /* 768 KiB */ - #define CONFIG_IDENT_STRING " Allwinner Technology" -+#define CONFIG_DISPLAY_BOARDINFO - - #define CONFIG_ENV_OFFSET (544 << 10) /* (8 + 24 + 512) KiB */ - #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ diff --git a/package/boot/uboot-sunxi/patches/060-sun7i-Add-support-for-Olimex-A20-OLinuXino-LIME2-eMM.patch b/package/boot/uboot-sunxi/patches/060-sun7i-Add-support-for-Olimex-A20-OLinuXino-LIME2-eMM.patch new file mode 100644 index 00000000000000..a7bfdd62d7e10e --- /dev/null +++ b/package/boot/uboot-sunxi/patches/060-sun7i-Add-support-for-Olimex-A20-OLinuXino-LIME2-eMM.patch @@ -0,0 +1,76 @@ +From 335d30050b0d02444c9297f7a9b0cbf75dce847f Mon Sep 17 00:00:00 2001 +From: Olliver Schinagl +Date: Fri, 12 May 2017 11:38:54 +0200 +Subject: sun7i: Add support for Olimex A20-OLinuXino-LIME2-eMMC + +This patch adds support for the Olimex OLinuXino Lime2 with eMMC flash +storage. +https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME2-eMMC/ + +It is a assembly variant of the regular Lime2 but featuring eMMC for +storage. + +Signed-off-by: Olliver Schinagl +Signed-off-by: Jagan Teki +Acked-by: Maxime Ripard +Reviewed-by: Jagan Teki +--- + board/sunxi/MAINTAINERS | 5 +++++ + configs/A20-OLinuXino-Lime2-eMMC_defconfig | 36 ++++++++++++++++++++++++++++++ + 2 files changed, 41 insertions(+) + create mode 100644 configs/A20-OLinuXino-Lime2-eMMC_defconfig + +--- a/board/sunxi/MAINTAINERS ++++ b/board/sunxi/MAINTAINERS +@@ -88,6 +88,11 @@ M: Iain Paton + S: Maintained + F: configs/A20-OLinuXino-Lime2_defconfig + ++A20-OLINUXINO-LIME2-EMMC BOARD ++M: Olliver Schinagl ++S: Maintained ++F: configs/A20-OLinuXino-Lime2-eMMC_defconfig ++ + A33-OLINUXINO BOARD + M: Stefan Mavrodiev + S: Maintained +--- /dev/null ++++ b/configs/A20-OLinuXino-Lime2-eMMC_defconfig +@@ -0,0 +1,37 @@ ++CONFIG_ARM=y ++CONFIG_ARCH_SUNXI=y ++CONFIG_MACH_SUN7I=y ++CONFIG_DRAM_CLK=384 ++CONFIG_MMC0_CD_PIN="PH1" ++CONFIG_MMC_SUNXI_SLOT_EXTRA=2 ++CONFIG_USB0_VBUS_PIN="PC17" ++CONFIG_USB0_VBUS_DET="PH5" ++CONFIG_I2C1_ENABLE=y ++CONFIG_SATAPWR="PC3" ++CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2-emmc" ++CONFIG_AHCI=y ++# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set ++CONFIG_SPL=y ++CONFIG_SPL_I2C_SUPPORT=y ++# CONFIG_CMD_IMLS is not set ++# CONFIG_CMD_FLASH is not set ++CONFIG_CMD_DFU=y ++CONFIG_CMD_USB_MASS_STORAGE=y ++# CONFIG_CMD_FPGA is not set ++# CONFIG_SPL_DOS_PARTITION is not set ++# CONFIG_SPL_ISO_PARTITION is not set ++# CONFIG_SPL_PARTITION_UUIDS is not set ++CONFIG_DFU_RAM=y ++CONFIG_ETH_DESIGNWARE=y ++CONFIG_RGMII=y ++CONFIG_SUN7I_GMAC=y ++CONFIG_GMAC_TX_DELAY=1 ++CONFIG_AXP_ALDO3_VOLT=2800 ++CONFIG_AXP_ALDO4_VOLT=2800 ++CONFIG_USB_EHCI_HCD=y ++CONFIG_USB_MUSB_GADGET=y ++CONFIG_USB_GADGET=y ++CONFIG_USB_GADGET_DOWNLOAD=y ++CONFIG_G_DNL_MANUFACTURER="Allwinner Technology" ++CONFIG_G_DNL_VENDOR_NUM=0x1f3a ++CONFIG_G_DNL_PRODUCT_NUM=0x1010 diff --git a/package/boot/uboot-sunxi/patches/061-ARM-dts-sunxi-Change-node-name-for-pwrseq-pin-on-Oli.patch b/package/boot/uboot-sunxi/patches/061-ARM-dts-sunxi-Change-node-name-for-pwrseq-pin-on-Oli.patch new file mode 100644 index 00000000000000..8db3e67e58ace6 --- /dev/null +++ b/package/boot/uboot-sunxi/patches/061-ARM-dts-sunxi-Change-node-name-for-pwrseq-pin-on-Oli.patch @@ -0,0 +1,31 @@ +From fb7fe04da2187b9853d713cb643d01bd56813e3d Mon Sep 17 00:00:00 2001 +From: Emmanuel Vadot +Date: Fri, 12 May 2017 11:38:53 +0200 +Subject: ARM: dts: sunxi: Change node name for pwrseq pin on + Olinuxino-lime2-emmc + +The node name for the power seq pin is mmc2@0 like the mmc2_pins_a one. +This makes the original node (mmc2_pins_a) scrapped out of the dtb and +result in a unusable eMMC if U-Boot didn't configured the pins to the +correct functions. + +Signed-off-by: Emmanuel Vadot +Signed-off-by: Maxime Ripard +Signed-off-by: Olliver Schinagl +Acked-by: Maxime Ripard +Reviewed-by: Jagan Teki +--- + arch/arm/dts/sun7i-a20-olinuxino-lime2-emmc.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/dts/sun7i-a20-olinuxino-lime2-emmc.dts ++++ b/arch/arm/dts/sun7i-a20-olinuxino-lime2-emmc.dts +@@ -56,7 +56,7 @@ + }; + + &pio { +- mmc2_pins_nrst: mmc2@0 { ++ mmc2_pins_nrst: mmc2-rst-pin { + allwinner,pins = "PC16"; + allwinner,function = "gpio_out"; + allwinner,drive = ; diff --git a/package/boot/uboot-sunxi/patches/062-A20-improve-gmac-upload.patch b/package/boot/uboot-sunxi/patches/062-A20-improve-gmac-upload.patch new file mode 100644 index 00000000000000..df2300194cb10a --- /dev/null +++ b/package/boot/uboot-sunxi/patches/062-A20-improve-gmac-upload.patch @@ -0,0 +1,12 @@ + GNU nano 2.7.4 File: 062-A20-improve-gmac-upload.patch + +--- a/configs/A20-OLinuXino-Lime2_defconfig ++++ b/configs/A20-OLinuXino-Lime2_defconfig +@@ -24,6 +24,7 @@ CONFIG_DFU_RAM=y + CONFIG_ETH_DESIGNWARE=y + CONFIG_RGMII=y + CONFIG_SUN7I_GMAC=y ++CONFIG_GMAC_TX_DELAY=1 + CONFIG_AXP_ALDO3_VOLT=2800 + CONFIG_AXP_ALDO4_VOLT=2800 + CONFIG_USB_EHCI_HCD=y diff --git a/package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch b/package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch index a402feb3cdb6e7..40d79878ad66f4 100644 --- a/package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch +++ b/package/boot/uboot-sunxi/patches/091-sun6i-sync-PLL1-multdiv-with-Boot1.patch @@ -12,9 +12,9 @@ More specifically, the following settings are now used: * up to 1152MHz: mul=3, div=2 (unchanged) * above 1152MHz: mul=4, div=2 (was: mul=2, div=1) ---- a/arch/arm/cpu/armv7/sunxi/clock_sun6i.c -+++ b/arch/arm/cpu/armv7/sunxi/clock_sun6i.c -@@ -122,11 +122,12 @@ void clock_set_pll1(unsigned int clk) +--- a/arch/arm/mach-sunxi/clock_sun6i.c ++++ b/arch/arm/mach-sunxi/clock_sun6i.c +@@ -107,11 +107,12 @@ void clock_set_pll1(unsigned int clk) struct sunxi_ccm_reg * const ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE; const int p = 0; diff --git a/package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch b/package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch index d200633bc20839..a8e03e2fb2ccf9 100644 --- a/package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch +++ b/package/boot/uboot-sunxi/patches/093-sun6i-fix-PLL-LDO-voltselect.patch @@ -16,9 +16,9 @@ order of magnitude as Boot1. Furthermore, a bit of documentation is added to clarify that the required setting for the PLL LDO is 1.37v as per the A31 manual. ---- a/arch/arm/cpu/armv7/sunxi/clock_sun6i.c -+++ b/arch/arm/cpu/armv7/sunxi/clock_sun6i.c -@@ -24,14 +24,27 @@ void clock_init_safe(void) +--- a/arch/arm/mach-sunxi/clock_sun6i.c ++++ b/arch/arm/mach-sunxi/clock_sun6i.c +@@ -26,13 +26,26 @@ void clock_init_safe(void) struct sunxi_prcm_reg * const prcm = (struct sunxi_prcm_reg *)SUNXI_PRCM_BASE; @@ -34,9 +34,9 @@ required setting for the PLL LDO is 1.37v as per the A31 manual. clrsetbits_le32(&prcm->pll_ctrl1, ~PRCM_PLL_CTRL_LDO_KEY_MASK, PRCM_PLL_CTRL_LDO_DIGITAL_EN | PRCM_PLL_CTRL_LDO_ANALOG_EN | - PRCM_PLL_CTRL_EXT_OSC_EN | PRCM_PLL_CTRL_LDO_OUT_L(1140)); -+ PRCM_PLL_CTRL_EXT_OSC_EN | PRCM_PLL_CTRL_LDO_OUT_L(1370) ); ++ PRCM_PLL_CTRL_EXT_OSC_EN | PRCM_PLL_CTRL_LDO_OUT_L(1370)); clrbits_le32(&prcm->pll_ctrl1, PRCM_PLL_CTRL_LDO_KEY_MASK); - ++ + /* Give the PLL LDO voltage setting some time to take hold. + * Notes: + * 1) We need to use sdelay() as the timers aren't set up yet. @@ -44,10 +44,9 @@ required setting for the PLL LDO is 1.37v as per the A31 manual. + * iterations through a loop. + */ + sdelay(100000); -+ - clock_set_pll1(408000000); + #endif - writel(PLL6_CFG_DEFAULT, &ccm->pll6_cfg); + #if defined(CONFIG_MACH_SUN8I_R40) || defined(CONFIG_MACH_SUN50I) --- a/arch/arm/include/asm/arch-sunxi/prcm.h +++ b/arch/arm/include/asm/arch-sunxi/prcm.h @@ -111,13 +111,13 @@ diff --git a/package/boot/uboot-sunxi/patches/100-sun6i-alternate-on-UART2.patch b/package/boot/uboot-sunxi/patches/100-sun6i-alternate-on-UART2.patch index bf5dc66e1a3b95..8bab220518852d 100644 --- a/package/boot/uboot-sunxi/patches/100-sun6i-alternate-on-UART2.patch +++ b/package/boot/uboot-sunxi/patches/100-sun6i-alternate-on-UART2.patch @@ -6,11 +6,11 @@ Subject: sun6i: define alternate-function for UART2 on GPG --- a/arch/arm/include/asm/arch-sunxi/gpio.h +++ b/arch/arm/include/asm/arch-sunxi/gpio.h -@@ -180,6 +180,7 @@ enum sunxi_gpio_number { +@@ -186,6 +186,7 @@ enum sunxi_gpio_number { #define SUN6I_GPG_SDC1 2 #define SUN8I_GPG_SDC1 2 #define SUN6I_GPG_TWI3 2 +#define SUN6I_GPG_UART2 2 #define SUN5I_GPG_UART1 4 - #define SUN4I_GPH_SDC1 5 + #define SUN6I_GPH_PWM 2 diff --git a/package/boot/uboot-sunxi/patches/101-sun6i-support-console-on-UART2.patch b/package/boot/uboot-sunxi/patches/101-sun6i-support-console-on-UART2.patch index 087074d0c96791..d140f2d53868de 100644 --- a/package/boot/uboot-sunxi/patches/101-sun6i-support-console-on-UART2.patch +++ b/package/boot/uboot-sunxi/patches/101-sun6i-support-console-on-UART2.patch @@ -4,9 +4,9 @@ Date: Tue, 16 Jun 2015 10:53:11 +0200 Subject: ARM: sun6i: Support console on UART2 (GPG6/GPG7) ---- a/arch/arm/cpu/armv7/sunxi/board.c -+++ b/arch/arm/cpu/armv7/sunxi/board.c -@@ -88,6 +88,10 @@ static int gpio_init(void) +--- a/arch/arm/mach-sunxi/board.c ++++ b/arch/arm/mach-sunxi/board.c +@@ -126,6 +126,10 @@ static int gpio_init(void) sunxi_gpio_set_cfgpin(SUNXI_GPG(3), SUN5I_GPG_UART1); sunxi_gpio_set_cfgpin(SUNXI_GPG(4), SUN5I_GPG_UART1); sunxi_gpio_set_pull(SUNXI_GPG(4), SUNXI_GPIO_PULL_UP); @@ -19,7 +19,7 @@ Subject: ARM: sun6i: Support console on UART2 (GPG6/GPG7) sunxi_gpio_set_cfgpin(SUNXI_GPB(1), SUN8I_GPB_UART2); --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h -@@ -260,6 +260,8 @@ extern int soft_i2c_gpio_scl; +@@ -259,6 +259,8 @@ extern int soft_i2c_gpio_scl; #endif #elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUN5I) #define OF_STDOUT_PATH "/soc@01c00000/serial@01c28400:115200" diff --git a/package/boot/uboot-sunxi/patches/102-sunxi-make_CONS_INDEX-configurable.patch b/package/boot/uboot-sunxi/patches/102-sunxi-make_CONS_INDEX-configurable.patch index ee1e3c9bfa66b1..41039796a02db0 100644 --- a/package/boot/uboot-sunxi/patches/102-sunxi-make_CONS_INDEX-configurable.patch +++ b/package/boot/uboot-sunxi/patches/102-sunxi-make_CONS_INDEX-configurable.patch @@ -4,9 +4,9 @@ Date: Tue, 16 Jun 2015 10:59:38 +0200 Subject: ARM: sunxi: Make CONS_INDEX configurable ---- a/board/sunxi/Kconfig -+++ b/board/sunxi/Kconfig -@@ -229,6 +229,14 @@ config SYS_BOARD +--- a/arch/arm/mach-sunxi/Kconfig ++++ b/arch/arm/mach-sunxi/Kconfig +@@ -412,6 +412,14 @@ config SYS_BOARD config SYS_SOC default "sunxi" diff --git a/package/boot/uboot-sunxi/patches/200-mkimage-check-environment-for-dtc-binary-location.patch b/package/boot/uboot-sunxi/patches/200-mkimage-check-environment-for-dtc-binary-location.patch new file mode 100644 index 00000000000000..d61895a3f97f48 --- /dev/null +++ b/package/boot/uboot-sunxi/patches/200-mkimage-check-environment-for-dtc-binary-location.patch @@ -0,0 +1,35 @@ +From 5b707cdadb35d896daafff52983416e1c617745b Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Wed, 19 Jul 2017 22:23:15 +0200 +Subject: [PATCH] mkimage: check environment for dtc binary location + +Currently mkimage assumes the dtc binary is in the path and fails +otherwise. This patch makes it check the DTC environment variable first +for the dtc binary and then fall back to the default path. This makes +it possible to call the u-boot build with make DTC=... and build a fit +image with the dtc binary not being the the default path. + +Signed-off-by: Hauke Mehrtens +Cc: Simon Glass +--- + tools/fit_image.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- a/tools/fit_image.c ++++ b/tools/fit_image.c +@@ -647,9 +647,14 @@ static int fit_handle_file(struct image_ + } + *cmd = '\0'; + } else if (params->datafile) { ++ const char* dtc = getenv("DTC"); ++ ++ if (!dtc) ++ dtc = MKIMAGE_DTC; ++ + /* dtc -I dts -O dtb -p 500 datafile > tmpfile */ + snprintf(cmd, sizeof(cmd), "%s %s %s > %s", +- MKIMAGE_DTC, params->dtc, params->datafile, tmpfile); ++ dtc, params->dtc, params->datafile, tmpfile); + debug("Trying to execute \"%s\"\n", cmd); + } else { + snprintf(cmd, sizeof(cmd), "cp %s %s", diff --git a/package/boot/uboot-sunxi/patches/210-Revert-fdt-Makefile-Build-python-libfdt-library-if-n.patch b/package/boot/uboot-sunxi/patches/210-Revert-fdt-Makefile-Build-python-libfdt-library-if-n.patch new file mode 100644 index 00000000000000..25edf5104c2c76 --- /dev/null +++ b/package/boot/uboot-sunxi/patches/210-Revert-fdt-Makefile-Build-python-libfdt-library-if-n.patch @@ -0,0 +1,89 @@ +From eed65e5c25cbc4b6e893f140e9d7898f4624c114 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Wed, 19 Jul 2017 23:12:38 +0200 +Subject: [PATCH 210/213] Revert "fdt: Makefile: Build python libfdt library if + needed" + +This reverts commit e38ffc42674fedc750ca895046be0bd983b56dd5. +--- + Makefile | 17 ++--------------- + scripts/Makefile.spl | 17 ++++------------- + 2 files changed, 6 insertions(+), 28 deletions(-) + +--- a/Makefile ++++ b/Makefile +@@ -1116,7 +1116,7 @@ cmd_ldr = $(LD) $(LDFLAGS_$(@F)) \ + + u-boot.rom: u-boot-x86-16bit.bin u-boot.bin \ + $(if $(CONFIG_SPL_X86_16BIT_INIT),spl/u-boot-spl.bin) \ +- $(if $(CONFIG_HAVE_REFCODE),refcode.bin) checkbinman FORCE ++ $(if $(CONFIG_HAVE_REFCODE),refcode.bin) FORCE + $(call if_changed,binman) + + OBJCOPYFLAGS_u-boot-x86-16bit.bin := -O binary -j .start16 -j .resetvec +@@ -1125,8 +1125,7 @@ u-boot-x86-16bit.bin: u-boot FORCE + endif + + ifneq ($(CONFIG_ARCH_SUNXI),) +-u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb \ +- checkbinman FORCE ++u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb FORCE + $(call if_changed,binman) + endif + +@@ -1355,18 +1354,6 @@ $(version_h): include/config/uboot.relea + $(timestamp_h): $(srctree)/Makefile FORCE + $(call filechk,timestamp.h) + +-checkbinman: tools +- @if ! ( echo 'import libfdt' | ( PYTHONPATH=tools python )); then \ +- echo >&2; \ +- echo >&2 '*** binman needs the Python libfdt library.'; \ +- echo >&2 '*** Either install it on your system, or try:'; \ +- echo >&2 '***'; \ +- echo >&2 '*** sudo apt-get install swig libpython-dev'; \ +- echo >&2 '***'; \ +- echo >&2 '*** to have U-Boot build its own version.'; \ +- false; \ +- fi +- + # --------------------------------------------------------------------------- + quiet_cmd_cpp_lds = LDS $@ + cmd_cpp_lds = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) \ +--- a/scripts/Makefile.spl ++++ b/scripts/Makefile.spl +@@ -257,12 +257,14 @@ PHONY += dts_dir + dts_dir: + $(shell [ -d $(obj)/dts ] || mkdir -p $(obj)/dts) + +-include/generated/dt-structs.h: $(obj)/$(SPL_BIN).dtb dts_dir checkdtoc ++include/generated/dt-structs.h: $(obj)/$(SPL_BIN).dtb dts_dir dtoc + $(call if_changed,dtoch) + +-$(obj)/dts/dt-platdata.c: $(obj)/$(SPL_BIN).dtb dts_dir checkdtoc ++$(obj)/dts/dt-platdata.c: $(obj)/$(SPL_BIN).dtb dts_dir dtoc + $(call if_changed,dtocc) + ++dtoc: #$(objtree)/tools/_libfdt.so ++ + ifdef CONFIG_SAMSUNG + ifdef CONFIG_VAR_SIZE_SPL + VAR_SIZE_PARAM = --vs +@@ -355,17 +357,6 @@ ifneq ($(cmd_files),) + include $(cmd_files) + endif + +-checkdtoc: tools +- @if ! ( echo 'import libfdt' | ( PYTHONPATH=tools python )); then \ +- echo '*** dtoc needs the Python libfdt library. Either '; \ +- echo '*** install it on your system, or try:'; \ +- echo '***'; \ +- echo '*** sudo apt-get install swig libpython-dev'; \ +- echo '***'; \ +- echo '*** to have U-Boot build its own version.'; \ +- false; \ +- fi +- + PHONY += FORCE + FORCE: + diff --git a/package/boot/uboot-sunxi/patches/211-Revert-scripts-Makefile.lib-Always-have-.-u-boot.dts.patch b/package/boot/uboot-sunxi/patches/211-Revert-scripts-Makefile.lib-Always-have-.-u-boot.dts.patch new file mode 100644 index 00000000000000..d40238d3a4d305 --- /dev/null +++ b/package/boot/uboot-sunxi/patches/211-Revert-scripts-Makefile.lib-Always-have-.-u-boot.dts.patch @@ -0,0 +1,26 @@ +From cdee74ad13e933631caf7f544c319d8e981c6063 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Thu, 20 Jul 2017 19:49:25 +0200 +Subject: [PATCH 211/213] Revert "scripts/Makefile.lib: Always have + ...-u-boot.dtsi be able to override" + +This reverts commit 7452946e7f3742b3ff1cb4a50603e7492aceea88. +--- + scripts/Makefile.lib | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/scripts/Makefile.lib ++++ b/scripts/Makefile.lib +@@ -306,10 +306,10 @@ $(obj)/%.dtb.S: $(obj)/%.dtb + + quiet_cmd_dtc = DTC $@ + # Modified for U-Boot +-# Bring in any U-Boot-specific include at the end of the file ++# Bring in any U-Boot-specific include after the '/dts-v1/;' header + cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ + cat $< $(if $(u_boot_dtsi),\ +- | sed "$$ a\#include \"$(u_boot_dtsi)\"") | \ ++ | sed '/^\/ {$$/{x;s%$$%\#include \"$(u_boot_dtsi)\"%;G;}') | \ + $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; \ + $(DTC) -O dtb -o $@ -b 0 \ + -i $(dir $<) $(DTC_FLAGS) \ diff --git a/package/boot/uboot-sunxi/patches/212-Revert-Avoid-non-portable-sed-construct.patch b/package/boot/uboot-sunxi/patches/212-Revert-Avoid-non-portable-sed-construct.patch new file mode 100644 index 00000000000000..1a5603417a567c --- /dev/null +++ b/package/boot/uboot-sunxi/patches/212-Revert-Avoid-non-portable-sed-construct.patch @@ -0,0 +1,21 @@ +From 53d123333fa0ddc64b2c55d48366f4582ac6922d Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Thu, 20 Jul 2017 19:50:52 +0200 +Subject: [PATCH 212/213] Revert "Avoid non-portable sed construct" + +This reverts commit 208db781cad4c24f538658a9cb17e24fa43ca3c9. +--- + scripts/Makefile.lib | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/scripts/Makefile.lib ++++ b/scripts/Makefile.lib +@@ -309,7 +309,7 @@ quiet_cmd_dtc = DTC $@ + # Bring in any U-Boot-specific include after the '/dts-v1/;' header + cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ + cat $< $(if $(u_boot_dtsi),\ +- | sed '/^\/ {$$/{x;s%$$%\#include \"$(u_boot_dtsi)\"%;G;}') | \ ++ | sed 's%^/ {$$%\#include \"$(u_boot_dtsi)\"\n&%') | \ + $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; \ + $(DTC) -O dtb -o $@ -b 0 \ + -i $(dir $<) $(DTC_FLAGS) \ diff --git a/package/boot/uboot-sunxi/patches/213-Revert-sunxi-Use-binman-for-sunxi-boards.patch b/package/boot/uboot-sunxi/patches/213-Revert-sunxi-Use-binman-for-sunxi-boards.patch new file mode 100644 index 00000000000000..6f75259a763b3d --- /dev/null +++ b/package/boot/uboot-sunxi/patches/213-Revert-sunxi-Use-binman-for-sunxi-boards.patch @@ -0,0 +1,58 @@ +From cf1defd80b7594f6f2721ab2dacffe48522abfca Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Thu, 20 Jul 2017 19:51:01 +0200 +Subject: [PATCH 213/213] Revert "sunxi: Use binman for sunxi boards" + +This reverts commit 61b994a386eb6f631dc1c2194d4cce9b1a43542c. +--- + Makefile | 6 ++++-- + arch/arm/dts/sunxi-u-boot.dtsi | 14 -------------- + scripts/Makefile.lib | 4 ++-- + 3 files changed, 6 insertions(+), 18 deletions(-) + delete mode 100644 arch/arm/dts/sunxi-u-boot.dtsi + +--- a/Makefile ++++ b/Makefile +@@ -1125,8 +1125,10 @@ u-boot-x86-16bit.bin: u-boot FORCE + endif + + ifneq ($(CONFIG_ARCH_SUNXI),) +-u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb FORCE +- $(call if_changed,binman) ++OBJCOPYFLAGS_u-boot-sunxi-with-spl.bin = -I binary -O binary \ ++ --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff ++u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img FORCE ++ $(call if_changed,pad_cat) + endif + + ifneq ($(CONFIG_TEGRA),) +--- a/arch/arm/dts/sunxi-u-boot.dtsi ++++ /dev/null +@@ -1,14 +0,0 @@ +-#include +- +-/ { +- binman { +- filename = "u-boot-sunxi-with-spl.bin"; +- pad-byte = <0xff>; +- blob { +- filename = "spl/sunxi-spl.bin"; +- }; +- u-boot-img { +- pos = ; +- }; +- }; +-}; +--- a/scripts/Makefile.lib ++++ b/scripts/Makefile.lib +@@ -308,8 +308,8 @@ quiet_cmd_dtc = DTC $@ + # Modified for U-Boot + # Bring in any U-Boot-specific include after the '/dts-v1/;' header + cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ +- cat $< $(if $(u_boot_dtsi),\ +- | sed 's%^/ {$$%\#include \"$(u_boot_dtsi)\"\n&%') | \ ++ cat $< $(if $(u-boot-dtsi),\ ++ | sed 's%^/ {$$%\#include \"$(u-boot-dtsi)\"\n&%') | \ + $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; \ + $(DTC) -O dtb -o $@ -b 0 \ + -i $(dir $<) $(DTC_FLAGS) \ diff --git a/package/boot/uboot-sunxi/patches/300-sunxi-add-device-tree-for-Orange-Pi-R1-board.patch b/package/boot/uboot-sunxi/patches/300-sunxi-add-device-tree-for-Orange-Pi-R1-board.patch new file mode 100644 index 00000000000000..65ae63c64ddecd --- /dev/null +++ b/package/boot/uboot-sunxi/patches/300-sunxi-add-device-tree-for-Orange-Pi-R1-board.patch @@ -0,0 +1,182 @@ +From 1f92596cc520f760589289059a5aa739366dd19c Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Tue, 26 Sep 2017 22:16:59 +0200 +Subject: sunxi: add device tree for Orange Pi R1 board + +Signed-off-by: Hauke Mehrtens +--- + arch/arm/dts/Makefile | 1 + + arch/arm/dts/sun8i-h2-plus-orangepi-r1.dts | 157 +++++++++++++++++++++++++++++ + 2 files changed, 158 insertions(+) + create mode 100644 arch/arm/dts/sun8i-h2-plus-orangepi-r1.dts + +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -310,6 +310,7 @@ dtb-$(CONFIG_MACH_SUN8I_A83T) += \ + sun8i-a83t-cubietruck-plus.dtb \ + sun8i-a83t-sinovoip-bpi-m3.dtb + dtb-$(CONFIG_MACH_SUN8I_H3) += \ ++ sun8i-h2-plus-orangepi-r1.dtb \ + sun8i-h2-plus-orangepi-zero.dtb \ + sun8i-h3-bananapi-m2-plus.dtb \ + sun8i-h3-orangepi-2.dtb \ +--- /dev/null ++++ b/arch/arm/dts/sun8i-h2-plus-orangepi-r1.dts +@@ -0,0 +1,157 @@ ++/* ++ * Copyright (C) 2017 Hauke Mehrtens ++ * ++ * Based on sun8i-h2-plus-orangepi-zero.dts, which is: ++ * Copyright (C) 2016 Icenowy Zheng ++ * ++ * Based on sun8i-h3-orangepi-one.dts, which is: ++ * Copyright (C) 2016 Hans de Goede ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) This file 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; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This file is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * Or, alternatively, ++ * ++ * b) Permission is hereby granted, free of charge, to any person ++ * obtaining a copy of this software and associated documentation ++ * files (the "Software"), to deal in the Software without ++ * restriction, including without limitation the rights to use, ++ * copy, modify, merge, publish, distribute, sublicense, and/or ++ * sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following ++ * conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT ++ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, ++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++/dts-v1/; ++#include "sun8i-h3.dtsi" ++#include "sunxi-common-regulators.dtsi" ++ ++#include ++#include ++#include ++ ++/ { ++ model = "Xunlong Orange Pi R1"; ++ compatible = "xunlong,orangepi-r1", "allwinner,sun8i-h2-plus"; ++ ++ aliases { ++ serial0 = &uart0; ++ /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */ ++ ethernet1 = &xr819; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ pwr_led { ++ label = "orangepi:green:pwr"; ++ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; ++ default-state = "on"; ++ }; ++ ++ status_led { ++ label = "orangepi:red:status"; ++ gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; ++ }; ++ }; ++ ++ reg_vcc_wifi: reg_vcc_wifi { ++ compatible = "regulator-fixed"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-wifi"; ++ enable-active-high; ++ gpio = <&pio 0 20 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ wifi_pwrseq: wifi_pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; ++ }; ++}; ++ ++&ehci1 { ++ status = "okay"; ++}; ++ ++&emac { ++ phy = <&phy1>; ++ phy-mode = "mii"; ++ allwinner,use-internal-phy; ++ allwinner,leds-active-low; ++ status = "okay"; ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++}; ++ ++&mmc0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>; ++ vmmc-supply = <®_vcc3v3>; ++ bus-width = <4>; ++ cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ ++ cd-inverted; ++ status = "okay"; ++}; ++ ++&mmc1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc1_pins_a>; ++ vmmc-supply = <®_vcc_wifi>; ++ mmc-pwrseq = <&wifi_pwrseq>; ++ bus-width = <4>; ++ non-removable; ++ status = "okay"; ++ ++ /* ++ * Explicitly define the sdio device, so that we can add an ethernet ++ * alias for it (which e.g. makes u-boot set a mac-address). ++ */ ++ xr819: sdio_wifi@1 { ++ reg = <1>; ++ }; ++}; ++ ++&ohci1 { ++ status = "okay"; ++}; ++ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins_a>; ++ status = "okay"; ++}; ++ ++&usbphy { ++ /* USB VBUS is always on */ ++ status = "okay"; ++}; diff --git a/package/boot/uboot-sunxi/patches/301-sunxi-add-orangepi-R1-defconfig.patch b/package/boot/uboot-sunxi/patches/301-sunxi-add-orangepi-R1-defconfig.patch new file mode 100644 index 00000000000000..6240fe3f571ee0 --- /dev/null +++ b/package/boot/uboot-sunxi/patches/301-sunxi-add-orangepi-R1-defconfig.patch @@ -0,0 +1,48 @@ +From 231201c71b902b5999ed9b143f2a54674cfae88a Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Tue, 26 Sep 2017 22:17:33 +0200 +Subject: sunxi: add orangepi R1 defconfig + +Signed-off-by: Hauke Mehrtens +--- + board/sunxi/MAINTAINERS | 5 +++++ + configs/orangepi_r1_defconfig | 19 +++++++++++++++++++ + 2 files changed, 24 insertions(+) + create mode 100644 configs/orangepi_r1_defconfig + +--- a/board/sunxi/MAINTAINERS ++++ b/board/sunxi/MAINTAINERS +@@ -302,6 +302,11 @@ M: Jagan Teki ++S: Maintained ++F: configs/orangepi_r1_defconfig ++ + PINE64 BOARDS + M: Andre Przywara + S: Maintained +--- /dev/null ++++ b/configs/orangepi_r1_defconfig +@@ -0,0 +1,19 @@ ++CONFIG_ARM=y ++CONFIG_ARCH_SUNXI=y ++CONFIG_SPL_SPI_FLASH_SUPPORT=y ++CONFIG_MACH_SUN8I_H3=y ++CONFIG_DRAM_CLK=624 ++CONFIG_DRAM_ZQ=3881979 ++CONFIG_DRAM_ODT_EN=y ++# CONFIG_VIDEO_DE2 is not set ++CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2-plus-orangepi-r1" ++# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set ++CONFIG_CONSOLE_MUX=y ++CONFIG_SPL=y ++# CONFIG_CMD_IMLS is not set ++# CONFIG_CMD_FLASH is not set ++# CONFIG_CMD_FPGA is not set ++CONFIG_SPL_SPI_SUNXI=y ++CONFIG_SUN8I_EMAC=y ++CONFIG_USB_EHCI_HCD=y ++CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y diff --git a/package/boot/uboot-sunxi/patches/302-sunxi-Fix-CONFIG_SUNXI_GMAC-references.patch b/package/boot/uboot-sunxi/patches/302-sunxi-Fix-CONFIG_SUNXI_GMAC-references.patch new file mode 100644 index 00000000000000..d884173c45aa2e --- /dev/null +++ b/package/boot/uboot-sunxi/patches/302-sunxi-Fix-CONFIG_SUNXI_GMAC-references.patch @@ -0,0 +1,83 @@ +From 6ff005cf19363382fc867d7876a75fd8a386e894 Mon Sep 17 00:00:00 2001 +From: Dave Prue +Date: Thu, 31 Aug 2017 19:21:01 +0200 +Subject: [PATCH] sunxi: Fix CONFIG_SUNXI_GMAC references + +SUNXI_GMAC was still used to configure the code where as the +same has been renamed and moved to Kconfig in below commit +"sunxi: Move SUNXI_GMAC to Kconfig" +(sha1: 4d43d065db3262f9a9918ba72457bf36dfb8e0bb) + +Signed-off-by: Dave Prue +Reviewed-by: Simon Glass +Reviewed-by: Jagan Teki +Reviewed-by: Mark Kettenis +Tested-by: Mark Kettenis +[Tweek commit message, config_whitelist.txt, build-whitelist.sh] +Signed-off-by: Jagan Teki +--- + arch/arm/include/asm/arch-sunxi/sys_proto.h | 2 +- + board/sunxi/Makefile | 2 +- + include/configs/sunxi-common.h | 2 +- + scripts/build-whitelist.sh | 4 ++-- + scripts/config_whitelist.txt | 1 - + 5 files changed, 5 insertions(+), 6 deletions(-) + +--- a/arch/arm/include/asm/arch-sunxi/sys_proto.h ++++ b/arch/arm/include/asm/arch-sunxi/sys_proto.h +@@ -24,7 +24,7 @@ void sdelay(unsigned long); + void return_to_fel(uint32_t lr, uint32_t sp); + + /* Board / SoC level designware gmac init */ +-#if !defined CONFIG_SPL_BUILD && defined CONFIG_SUNXI_GMAC ++#if !defined CONFIG_SPL_BUILD && defined CONFIG_SUN7I_GMAC + void eth_init_board(void); + #else + static inline void eth_init_board(void) {} +--- a/board/sunxi/Makefile ++++ b/board/sunxi/Makefile +@@ -9,7 +9,7 @@ + # SPDX-License-Identifier: GPL-2.0+ + # + obj-y += board.o +-obj-$(CONFIG_SUNXI_GMAC) += gmac.o ++obj-$(CONFIG_SUN7I_GMAC) += gmac.o + obj-$(CONFIG_SUNXI_AHCI) += ahci.o + obj-$(CONFIG_MACH_SUN4I) += dram_sun4i_auto.o + obj-$(CONFIG_MACH_SUN5I) += dram_sun5i_auto.o +--- a/include/configs/sunxi-common.h ++++ b/include/configs/sunxi-common.h +@@ -302,7 +302,7 @@ extern int soft_i2c_gpio_scl; + #define CONFIG_PHYLIB + #endif + +-#ifdef CONFIG_SUNXI_GMAC ++#ifdef CONFIG_SUN7I_GMAC + #define CONFIG_PHY_GIGE /* GMAC can use gigabit PHY */ + #define CONFIG_PHY_ADDR 1 + #define CONFIG_MII /* MII PHY management */ +--- a/scripts/build-whitelist.sh ++++ b/scripts/build-whitelist.sh +@@ -13,10 +13,10 @@ export LC_ALL=C LC_COLLATE=C + # There are two independent greps. The first pulls out the component parts + # of CONFIG_SYS_EXTRA_OPTIONS. An example is: + # +-# SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8) ++# SUN7I_GMAC,AHCI,SATAPWR=SUNXI_GPB(8) + # + # We want this to produce: +-# CONFIG_SUNXI_GMAC ++# CONFIG_SUN7I_GMAC + # CONFIG_AHCI + # CONFIG_SATAPWR + # +--- a/scripts/config_whitelist.txt ++++ b/scripts/config_whitelist.txt +@@ -2371,7 +2371,6 @@ CONFIG_STV0991_HZ_CLOCK + CONFIG_ST_SMI + CONFIG_SUNXI_AHCI + CONFIG_SUNXI_EMAC +-CONFIG_SUNXI_GMAC + CONFIG_SUNXI_GPIO + CONFIG_SUNXI_MAX_FB_SIZE + CONFIG_SUNXI_USB_PHYS diff --git a/package/boot/uboot-sunxi/uEnv-a64.txt b/package/boot/uboot-sunxi/uEnv-a64.txt new file mode 100644 index 00000000000000..7a717fdc0fc73d --- /dev/null +++ b/package/boot/uboot-sunxi/uEnv-a64.txt @@ -0,0 +1,5 @@ +setenv loadkernel fatload mmc 0 \$kernel_addr_r uImage +setenv loaddtb fatload mmc 0 \$fdt_addr_r dtb +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait earlycon=uart,mmio32,0x01c28000 +setenv uenvcmd run loadkernel \&\& run loaddtb \&\& booti \$kernel_addr_r - \$fdt_addr_r +run uenvcmd diff --git a/package/devel/binutils/Makefile b/package/devel/binutils/Makefile index 222922df282f54..291f45205a6c35 100644 --- a/package/devel/binutils/Makefile +++ b/package/devel/binutils/Makefile @@ -23,6 +23,7 @@ PKG_INSTALL:=1 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-3.0+ +PKG_CPE_ID:=cpe:/a:gnu:binutils PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 diff --git a/package/devel/gdb/Makefile b/package/devel/gdb/Makefile index 23039910ce570b..4cf2aaa87fc964 100644 --- a/package/devel/gdb/Makefile +++ b/package/devel/gdb/Makefile @@ -8,16 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gdb -PKG_VERSION:=7.12.1 -PKG_RELEASE:=3 +PKG_VERSION:=8.0.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/gdb -PKG_HASH:=4607680b973d3ec92c30ad029f1b7dbde3876869e6b3a117d8a7e90081113186 +PKG_HASH:=3dbd5f93e36ba2815ad0efab030dcd0c7b211d7b353a40a53f4c02d7d56295e3 PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 PKG_LICENSE:=GPL-3.0+ +PKG_CPE_ID:=cpe:/a:gnu:gdb include $(INCLUDE_DIR)/package.mk @@ -61,6 +62,10 @@ CONFIGURE_ARGS+= \ CONFIGURE_VARS+= \ ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline" +TARGET_LDFLAGS+= \ + -static-libstdc++ \ + -Wl,--gc-sections + define Build/Install $(MAKE) -C $(PKG_BUILD_DIR) \ DESTDIR="$(PKG_INSTALL_DIR)" \ diff --git a/package/devel/gdb/patches/110-shared_libgcc.patch b/package/devel/gdb/patches/110-shared_libgcc.patch index e44616f4a29fed..929a5ae9771925 100644 --- a/package/devel/gdb/patches/110-shared_libgcc.patch +++ b/package/devel/gdb/patches/110-shared_libgcc.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -1406,13 +1406,13 @@ if test -z "$LD"; then +@@ -1300,13 +1300,13 @@ if test -z "$LD"; then fi fi @@ -17,7 +17,7 @@ AC_LANG_PUSH(C++) AC_LINK_IFELSE([ #if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) -@@ -1740,7 +1740,7 @@ AC_ARG_WITH(stage1-ldflags, +@@ -1632,7 +1632,7 @@ AC_ARG_WITH(stage1-ldflags, # if supported. But if the user explicitly specified the libraries to use, # trust that they are doing what they want. if test "$stage1_libs" = "" -a "$have_static_libs" = yes; then @@ -26,7 +26,7 @@ fi]) AC_SUBST(stage1_ldflags) -@@ -1769,7 +1769,7 @@ AC_ARG_WITH(boot-ldflags, +@@ -1661,7 +1661,7 @@ AC_ARG_WITH(boot-ldflags, # statically. But if the user explicitly specified the libraries to # use, trust that they are doing what they want. if test "$poststage1_libs" = ""; then @@ -37,7 +37,7 @@ --- a/configure +++ b/configure -@@ -5109,14 +5109,14 @@ if test -z "$LD"; then +@@ -5005,14 +5005,14 @@ if test -z "$LD"; then fi fi @@ -56,7 +56,7 @@ ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -@@ -5902,7 +5902,7 @@ else +@@ -5795,7 +5795,7 @@ else # if supported. But if the user explicitly specified the libraries to use, # trust that they are doing what they want. if test "$stage1_libs" = "" -a "$have_static_libs" = yes; then @@ -65,7 +65,7 @@ fi fi -@@ -5938,7 +5938,7 @@ else +@@ -5831,7 +5831,7 @@ else # statically. But if the user explicitly specified the libraries to # use, trust that they are doing what they want. if test "$poststage1_libs" = ""; then diff --git a/package/devel/gdb/patches/120-sigprocmask-invalid-call.patch b/package/devel/gdb/patches/120-sigprocmask-invalid-call.patch index 7090db170a7b53..8afa8ccf811685 100644 --- a/package/devel/gdb/patches/120-sigprocmask-invalid-call.patch +++ b/package/devel/gdb/patches/120-sigprocmask-invalid-call.patch @@ -25,8 +25,6 @@ gdb/ChangeLog: gdb/common/signals-state-save-restore.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) -diff --git a/gdb/common/signals-state-save-restore.c b/gdb/common/signals-state-save-restore.c -index d11a9ae..734335c 100644 --- a/gdb/common/signals-state-save-restore.c +++ b/gdb/common/signals-state-save-restore.c @@ -41,7 +41,7 @@ save_original_signals_state (void) @@ -38,6 +36,3 @@ index d11a9ae..734335c 100644 if (res == -1) perror_with_name (("sigprocmask")); --- -2.6.4 - diff --git a/package/devel/strace/Makefile b/package/devel/strace/Makefile index 5793e0e9c878ce..6209dc5a638f87 100644 --- a/package/devel/strace/Makefile +++ b/package/devel/strace/Makefile @@ -9,16 +9,16 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=strace - -PKG_VERSION:=4.19 +PKG_VERSION:=4.20 PKG_RELEASE:=1 -PKG_HASH:=7c93ebc6c29280f47c24a0eb86873a99ccb2cac6512c60a60ba4ef99ab807281 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_HASH:=5bf3148dd17306a42566f7da17368fdd781afa147db05ea63a4ca2b50f58c523 PKG_LICENSE:=BSD-3c PKG_LICENSE_FILES:=COPYRIGHT +PKG_CPE_ID:=cpe:/a:paul_kranenburg:strace PKG_MAINTAINER:=Felix Fietkau diff --git a/package/devel/valgrind/Makefile b/package/devel/valgrind/Makefile index 57ab75f969e2f9..6be2f9ec1ab505 100644 --- a/package/devel/valgrind/Makefile +++ b/package/devel/valgrind/Makefile @@ -17,6 +17,7 @@ PKG_HASH:=d76680ef03f00cd5e970bbdcd4e57fb1f6df7d2e2c071635ef2be74790190c3b PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0+ +PKG_CPE_ID:=cpe:/a:valgrind:valgrind PKG_FIXUP = autoreconf PKG_INSTALL := 1 diff --git a/package/firmware/ath10k-firmware/Makefile b/package/firmware/ath10k-firmware/Makefile index 9a34ac3155cd34..1c6f4dfb7fd1b2 100644 --- a/package/firmware/ath10k-firmware/Makefile +++ b/package/firmware/ath10k-firmware/Makefile @@ -8,9 +8,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ath10k-firmware -PKG_SOURCE_DATE:=2017-03-29 -PKG_SOURCE_VERSION:=956e2609b7e42c8c710bba10ef925a5be1be5137 -PKG_MIRROR_HASH:=25f724ff38c830281b3efba4a4ddffaae0c4bd8fea0f4c1061591229ff05535b +PKG_SOURCE_DATE:=2017-10-30 +PKG_SOURCE_VERSION:=476a2850b1e8582d51187799d7de209daf1a57b2 +PKG_MIRROR_HASH:=77ba59f75c5897c842c5c525945de019fd23f1e2d8bea6239924857e500bf73a PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git @@ -223,7 +223,7 @@ define Package/ath10k-firmware-qca4019/install $(PKG_BUILD_DIR)/QCA4019/hw1.0/board-2.bin \ $(1)/lib/firmware/ath10k/QCA4019/hw1.0/ $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/QCA4019/hw1.0/3.2.1/firmware-5.bin_10.4-3.2.1-00053 \ + $(PKG_BUILD_DIR)/QCA4019/hw1.0/3.2.1/firmware-5.bin_10.4-3.2.1-00058 \ $(1)/lib/firmware/ath10k/QCA4019/hw1.0/firmware-5.bin endef diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 2f1b280bec2c4c..aec8bf27c25872 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -1,6 +1,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/version.mk +PKG_NAME:=ipq-wifi PKG_RELEASE:=1 include $(INCLUDE_DIR)/package.mk diff --git a/package/firmware/fman-ucode/Makefile b/package/firmware/layerscape/fman-ucode/Makefile similarity index 79% rename from package/firmware/fman-ucode/Makefile rename to package/firmware/layerscape/fman-ucode/Makefile index 396750f804713f..aa2601b2602683 100644 --- a/package/firmware/fman-ucode/Makefile +++ b/package/firmware/layerscape/fman-ucode/Makefile @@ -9,19 +9,16 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk PKG_NAME:=fman-ucode -PKG_VERSION:=fsl-sdk-v2.0 +PKG_SOURCE_DATE:=2017-02-13 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git -PKG_MIRROR_HASH:=209c60e4efaa3ce9c9a954266a7210fa0047a2de47ce00a412aa0318d94d0d88 -PKG_SOURCE_URL:=https://github.com/fsl-jyt/fm-ucode.git -PKG_SOURCE_VERSION:=b19c645821941493fbef32e616b5a16404259976 +PKG_SOURCE_URL:=https://github.com/qoriq-open-source/fm-ucode.git +PKG_SOURCE_VERSION:=c275e91392e2adab1ed22f3867b8269ca3c54014 +PKG_MIRROR_HASH:=1a4611d528f67f3acfa88aefdec9a9a67d96a3139ac5fe1089f599272e6c4a52 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) -PKG_LICENSE:=GPL-2.0 GPL-2.0+ -PKG_LICENSE_FILES:=Licenses/README - PKG_FLAGS:=nonshared include $(INCLUDE_DIR)/package.mk @@ -33,12 +30,12 @@ endef define fman/ls1043ardb TITLE=FMAN UCODE $(PKG_NAME)-$(PKG_VERSION) for NXP ls1043ardb 64b/32b Dev Board - CONFIG=fsl_fman_ucode_ls1043_r1.0_108_4_5.bin + CONFIG=fsl_fman_ucode_ls1043_r1.1_106_4_18.bin endef define fman/ls1046ardb TITLE=FMAN UCODE $(PKG_NAME)-$(PKG_VERSION) for NXP ls1046ardb 64b/32b Dev Board - CONFIG=fsl_fman_ucode_t2080_r1.1_106_4_18.bin + CONFIG=fsl_fman_ucode_ls1046_r1.0_106_4_18.bin endef FMANS := \ @@ -51,7 +48,7 @@ define Package/fman-layerscape-$(1) CATEGORY:=Firmware DEPENDS:=@TARGET_layerscape TITLE:=$(2) - URL:=http://git.freescale.com/git/cgit.cgi/ppc/sdk/fm-ucode.git + URL:=https://github.com/qoriq-open-source/fm-ucode.git VARIANT:=$(1) MAINTAINER:=Jiang Yutang endef diff --git a/package/firmware/layerscape/ls-dpl/Makefile b/package/firmware/layerscape/ls-dpl/Makefile new file mode 100644 index 00000000000000..86483cab89f68b --- /dev/null +++ b/package/firmware/layerscape/ls-dpl/Makefile @@ -0,0 +1,58 @@ +# +# Copyright 2017 NXP +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ls-dpl +PKG_SOURCE_DATE:=2017-09-07 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/qoriq-open-source/dpl-examples.git +PKG_SOURCE_VERSION:=a6c83759c0d9c02822eec89e86357a0998ef51d4 +PKG_MIRROR_HASH:=d0311591843fbf9faebc7e2f0d53cba47d42ef21c4407c5881f354df6c458ce5 + +PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +PKG_FLAGS:=nonshared + +include $(INCLUDE_DIR)/package.mk + +define Package/layerscape-dpl-ls1088ardb + SECTION:=firmware + CATEGORY:=Firmware + DEPENDS:=@TARGET_layerscape + TITLE:=NXP LS1088ARDB DPL firmware + VARIANT:=ls1088ardb + DPC_CONFIG:=ls1088a/RDB/dpc.0x1D-0x0D.dtb + DPL_CONFIG:=ls1088a/RDB/dpl-eth.0x1D_0x0D.dtb +endef + +define Package/layerscape-dpl-ls2088ardb + SECTION:=firmware + CATEGORY:=Firmware + DEPENDS:=@TARGET_layerscape + TITLE:=NXP LS2088ARDB DPL firmware + VARIANT:=ls2088ardb + DPC_CONFIG:=ls2088a/RDB/dpc.0x2A_0x41.dtb + DPL_CONFIG:=ls2088a/RDB/dpl-eth.0x2A_0x41.dtb +endef + +define Package/layerscape-dpl-ls1088ardb/install + $(INSTALL_DIR) $(STAGING_DIR_IMAGE) + $(CP) $(PKG_BUILD_DIR)/$(DPL_CONFIG) $(STAGING_DIR_IMAGE)/ls1088ardb-dpl.dtb + $(CP) $(PKG_BUILD_DIR)/$(DPC_CONFIG) $(STAGING_DIR_IMAGE)/ls1088ardb-dpc.dtb +endef + +define Package/layerscape-dpl-ls2088ardb/install + $(INSTALL_DIR) $(STAGING_DIR_IMAGE) + $(CP) $(PKG_BUILD_DIR)/$(DPL_CONFIG) $(STAGING_DIR_IMAGE)/ls2088ardb-dpl.dtb + $(CP) $(PKG_BUILD_DIR)/$(DPC_CONFIG) $(STAGING_DIR_IMAGE)/ls2088ardb-dpc.dtb +endef + +$(eval $(call BuildPackage,layerscape-dpl-ls1088ardb)) +$(eval $(call BuildPackage,layerscape-dpl-ls2088ardb)) diff --git a/package/firmware/layerscape/ls-mc/Makefile b/package/firmware/layerscape/ls-mc/Makefile new file mode 100644 index 00000000000000..a81e095638dce3 --- /dev/null +++ b/package/firmware/layerscape/ls-mc/Makefile @@ -0,0 +1,57 @@ +# +# Copyright 2017 NXP +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ls-mc +PKG_SOURCE_DATE:=2014-07-04 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/qoriq-open-source/mc-binary.git +PKG_SOURCE_VERSION:=824745fe1580b281bebb808321c3f41353a3140a +PKG_MIRROR_HASH:=984c7905af3a4b87b72263de9220901c531fe064f0b89dd2882676354e09ed16 + +PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +PKG_FLAGS:=nonshared + +include $(INCLUDE_DIR)/package.mk + +define Package/layerscape-mc-ls1088ardb + SECTION:=firmware + CATEGORY:=Firmware + DEPENDS:=@TARGET_layerscape + TITLE:=NXP LS1088ARDB MC firmware + VARIANT:=ls1088ardb + CONFIG:=ls1088a/mc_10.3.4_ls1088a_20170929.itb +endef + +define Package/layerscape-mc-ls2088ardb + SECTION:=firmware + CATEGORY:=Firmware + DEPENDS:=@TARGET_layerscape + TITLE:=NXP LS2088ARDB MC firmware + VARIANT:=ls2088ardb + CONFIG:=ls2088a/mc_10.3.4_ls2088a_20170929.itb +endef + +define Build/Compile +endef + +define Package/layerscape-mc-ls1088ardb/install + $(INSTALL_DIR) $(STAGING_DIR_IMAGE) + $(CP) $(PKG_BUILD_DIR)/$(CONFIG) $(STAGING_DIR_IMAGE)/ls1088ardb-mc.itb +endef + +define Package/layerscape-mc-ls2088ardb/install + $(INSTALL_DIR) $(STAGING_DIR_IMAGE) + $(CP) $(PKG_BUILD_DIR)/$(CONFIG) $(STAGING_DIR_IMAGE)/ls2088ardb-mc.itb +endef + +$(eval $(call BuildPackage,layerscape-mc-ls1088ardb)) +$(eval $(call BuildPackage,layerscape-mc-ls2088ardb)) diff --git a/package/firmware/layerscape/ls-ppa/Makefile b/package/firmware/layerscape/ls-ppa/Makefile new file mode 100644 index 00000000000000..a354ad1a9b641b --- /dev/null +++ b/package/firmware/layerscape/ls-ppa/Makefile @@ -0,0 +1,111 @@ +# +# Copyright 2017 NXP +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/image.mk + +PKG_NAME:=ls-ppa +PKG_SOURCE_DATE:=2017-10-26 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/yangbolu1991/ppa-binary.git +PKG_SOURCE_VERSION:=76a80ca988affbee67bb17096aefb82ba6d91be7 +PKG_MIRROR_HASH:=55e6cfa0f03f2db667ed4270e5aaf43ab830343af3b9724f92e830a1e3a3a25f + +PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +PKG_FLAGS:=nonshared + +include $(INCLUDE_DIR)/package.mk + +define ppa/Default + TITLE:= + CONFIG:= +endef + +define ppa/ls1043ardb + TITLE=PPA firmware $(PKG_VERSION) for NXP ls1043ardb 64b/32b Dev Board + CONFIG=ppa-ls1043a.itb +endef + +define ppa/ls1046ardb + TITLE=PPA firmware $(PKG_VERSION) for NXP ls1046ardb 64b/32b Dev Board + CONFIG=ppa-ls1046a.itb +endef + +define ppa/ls1012ardb + TITLE=PPA firmware $(PKG_VERSION) for NXP ls1012ardb 64b/32b Dev Board + CONFIG=ppa-ls1012a.itb +endef + +define ppa/ls1088ardb + TITLE=PPA firmware $(PKG_VERSION) for NXP ls1088ardb 64b/32b Dev Board + CONFIG=ppa-ls1088a.itb +endef + +define ppa/ls2088ardb + TITLE=PPA firmware $(PKG_VERSION) for NXP ls2088ardb 64b/32b Dev Board + CONFIG=ppa-ls2088a.itb +endef + +define ppa/ls1012afrdm + TITLE=PPA firmware $(PKG_VERSION) for NXP ls1012afrdm 64b/32b Dev Board + CONFIG=ppa-ls1012a.itb +endef + +PPAS := \ + ls1043ardb \ + ls1046ardb \ + ls1012ardb \ + ls1088ardb \ + ls2088ardb \ + ls1012afrdm + +define Package/ppa/template +define Package/layerscape-ppa-$(1) + SECTION:=firmware + CATEGORY:=Firmware + DEPENDS:= @TARGET_layerscape + TITLE:=$(2) + VARIANT:=$(1) +endef +endef + +define BuildPPAPackage + $(eval $(ppa/Default)) + $(eval $(ppa/$(1))) + $(call Package/ppa/template,$(1),$(TITLE)) +endef + +ifdef BUILD_VARIANT +$(eval $(call ppa/$(BUILD_VARIANT))) +PPA_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT)) +endif + +define Build/Compile +endef + +define Package/ppa/install/default + $(INSTALL_DIR) $(STAGING_DIR_IMAGE) + $(CP) $(PKG_BUILD_DIR)/$(PPA_CONFIG) $(STAGING_DIR_IMAGE)/$(1)-ppa.itb +endef + +define Package/ppa/install/template +define Package/layerscape-ppa-$(1)/install + $(call Package/ppa/install/default,$(2)) +endef +endef + +$(foreach r,$(PPAS), \ + $(eval $(call Package/ppa/install/template,$(r),$(r))) \ +) + +$(foreach r,$(PPAS), \ + $(eval $(call BuildPPAPackage,$(r))) \ + $(eval $(call BuildPackage,layerscape-ppa-$(r))) \ +) diff --git a/package/firmware/rcw/Makefile b/package/firmware/layerscape/ls-rcw/Makefile similarity index 56% rename from package/firmware/rcw/Makefile rename to package/firmware/layerscape/ls-rcw/Makefile index bae9c95b6cc487..70791d47b6679e 100644 --- a/package/firmware/rcw/Makefile +++ b/package/firmware/layerscape/ls-rcw/Makefile @@ -8,19 +8,19 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk -PKG_NAME:=rcw -PKG_VERSION:=v1.0 +PKG_NAME:=ls-rcw +PKG_SOURCE_DATE:=2017-09-26 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git -PKG_MIRROR_HASH:=8082979dbdef57e36a3096986aa426ef678c152403eb1dbd132da28f01490b6d -PKG_SOURCE_URL:=https://github.com/fsl-jyt/rcw.git -PKG_SOURCE_VERSION:=17e09e19bd5cf94e5ebc84916b4607743c29723e +PKG_SOURCE_URL:=https://github.com/qoriq-open-source/rcw.git +PKG_SOURCE_VERSION:=6719b046ee87b04026fe163e6c8fbbebba2186aa +PKG_MIRROR_HASH:=9645ecf148640ec7d1029bce65950f2a0b0e6b351a25ef60c8a839c42c6ed56d PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) -PKG_LICENSE:=GPL-2.0 GPL-2.0+ -PKG_LICENSE_FILES:=Licenses/README +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE PKG_FLAGS:=nonshared @@ -32,24 +32,42 @@ define rcw/Default endef define rcw/ls1043ardb - TITLE=RCW binary $(PKG_NAME)-$(PKG_VERSION) for NXP ls1043ardb 64b/32b Dev Board - CONFIG=ls1043ardb-rcw.bin + TITLE=RCW binary $(PKG_VERSION) for NXP ls1043ardb 64b/32b Dev Board + CONFIG=ls1043ardb/RR_FQPP_1455/rcw_1600.bin endef define rcw/ls1046ardb - TITLE=RCW binary $(PKG_NAME)-$(PKG_VERSION) for NXP ls1046ardb 64b/32b Dev Board - CONFIG=ls1046ardb-rcw.bin + TITLE=RCW binary $(PKG_VERSION) for NXP ls1046ardb 64b/32b Dev Board + CONFIG=ls1046ardb/RR_FFSSPPPH_1133_5559/rcw_1800_qspiboot.bin.swap endef define rcw/ls1012ardb - TITLE=RCW binary $(PKG_NAME)-$(PKG_VERSION) for NXP ls1012ardb 64b/32b Dev Board - CONFIG=ls1012ardb-rcw.bin + TITLE=RCW binary $(PKG_VERSION) for NXP ls1012ardb 64b/32b Dev Board + CONFIG=ls1012ardb/R_SPNH_3508/PBL_0x35_0x08_1000_250_1000_default.bin +endef + +define rcw/ls1088ardb + TITLE=RCW binary $(PKG_VERSION) for NXP ls1088ardb 64b/32b Dev Board + CONFIG=ls1088ardb/FCQQQQQQQQ_PPP_H_0x1d_0x0d/PBL_QSPI_1600_700_2100_0x1d_0x0d.bin +endef + +define rcw/ls2088ardb + TITLE=RCW binary $(PKG_VERSION) for NXP ls2088ardb 64b/32b Dev Board + CONFIG=ls2088ardb/FFFFFFFF_PP_HH_0x2a_0x41/PBL_0x2a_0x41_1800_700_1866_1600.bin +endef + +define rcw/ls1012afrdm + TITLE=RCW binary $(PKG_VERSION) for NXP ls1012afrdm 64b/32b Dev Board + CONFIG=ls1012afrdm/N_SSNP_3305/PBL_0x33_0x05_800_250_1000_default.bin endef RCWS := \ ls1043ardb \ ls1046ardb \ - ls1012ardb + ls1012ardb \ + ls1088ardb \ + ls2088ardb \ + ls1012afrdm define Package/rcw/template define Package/rcw-layerscape-$(1) @@ -77,9 +95,6 @@ endif define Build/Configure endef -define Build/Compile -endef - define Package/rcw/install/default $(INSTALL_DIR) $(STAGING_DIR_IMAGE) $(CP) $(PKG_BUILD_DIR)/$(RCW_CONFIG) $(STAGING_DIR_IMAGE)/$(1)-rcw.bin diff --git a/package/firmware/layerscape/ls-rcw/patches/0001-rcw-add-a-python-script-for-byte-swapping.patch b/package/firmware/layerscape/ls-rcw/patches/0001-rcw-add-a-python-script-for-byte-swapping.patch new file mode 100644 index 00000000000000..a2b7140654a0d4 --- /dev/null +++ b/package/firmware/layerscape/ls-rcw/patches/0001-rcw-add-a-python-script-for-byte-swapping.patch @@ -0,0 +1,66 @@ +From ebded197f9c12168d61973043fd9ebd5d49528a8 Mon Sep 17 00:00:00 2001 +From: Yangbo Lu +Date: Mon, 25 Dec 2017 14:11:02 +0800 +Subject: [PATCH] rcw: add a python script for byte swapping + +Signed-off-by: Yangbo Lu +--- + Makefile | 2 ++ + byte_swap.py | 32 ++++++++++++++++++++++++++++++++ + 2 files changed, 34 insertions(+) + create mode 100755 byte_swap.py + +diff --git a/Makefile b/Makefile +index fb55c8b..27e3ba2 100644 +--- a/Makefile ++++ b/Makefile +@@ -11,6 +11,8 @@ all install clean: + @for board in $(BOARDS); do \ + $(MAKE) -C $$board $@ DESTDIR=$(DESTDIR)/$$board; \ + done ++ chmod 755 ./byte_swap.py; \ ++ ./byte_swap.py ls1046ardb/RR_FFSSPPPH_1133_5559/rcw_1800_qspiboot.bin 8 + + release: $(foreach board,$(BOARDS),rcw-$(board)-$(VER).tar.gz) + +diff --git a/byte_swap.py b/byte_swap.py +new file mode 100755 +index 0000000..7ee4129 +--- /dev/null ++++ b/byte_swap.py +@@ -0,0 +1,32 @@ ++#!/usr/bin/env python ++""" ++Swap the 4/8 bytes endian except for PBI CRC ++2016-10-9: Initial version ++ ++Usage: ++ ./byte_swap.py ++""" ++import sys ++ ++try: ++ file_name = sys.argv[1] ++ byte = int(sys.argv[2]) ++except: ++ print("Usage: ./byte_swap.py ") ++ print("E.g.: ./byte_swap.py rcw_1600.bin 8\n") ++ exit ++ ++with open(file_name,'rb') as file: ++ tmp = file.read() ++file.close() ++ ++with open(file_name + '.swap','wb') as file: ++ for i in range(0, len(tmp) - 1, byte): ++ if(tmp[i:i+4].encode('hex')) == "08610040": ++ #print("PBI CRC command") ++ file.write(tmp[i:i+8]) ++ break ++ file.write(tmp[i:i+byte][::-1]) ++file.close() ++ ++print("Swapped file: " + file_name + '.swap') +-- +2.7.4 + diff --git a/package/firmware/layerscape/ppfe-firmware/Makefile b/package/firmware/layerscape/ppfe-firmware/Makefile new file mode 100644 index 00000000000000..419201e87e3efa --- /dev/null +++ b/package/firmware/layerscape/ppfe-firmware/Makefile @@ -0,0 +1,52 @@ +# +# Copyright (C) 2016 Jiang Yutang +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ppfe +PKG_SOURCE_DATE:=2017-10-13 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/qoriq-open-source/engine-pfe-bin.git +PKG_SOURCE_VERSION:=97cd13d3070d7199e62881bc495b332194b67edd +PKG_MIRROR_HASH:=3457bfe7201a8410443f34d4bb5fa67d4ff19e2d0f3957e84e3f20e2ae3fa34a + +PKG_FLAGS:=nonshared + +include $(INCLUDE_DIR)/package.mk + +RSTRIP:=: +STRIP:=: + +define Package/layerscape-ppfe + SECTION:=firmware + CATEGORY:=Firmware + DEPENDS:=@TARGET_layerscape + TITLE:=NXP Layerscape PPFE firmware + CONFIG_FW:=ls1012a/u-boot/pfe_fw_sbl.itb + CONFIG_BIN1:=ls1012a/slow_path/ppfe_class_ls1012a.elf + CONFIG_BIN2:=ls1012a/slow_path/ppfe_tmu_ls1012a.elf + CONFIG_LIC:=Freescale-Binary-EULA +endef + +define Build/Compile +endef + +define Package/layerscape-ppfe/install + $(INSTALL_DIR) $(STAGING_DIR_IMAGE) + $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(CONFIG_FW) \ + $(STAGING_DIR_IMAGE)/pfe.itb + $(INSTALL_DIR) $(1)/lib/firmware/ + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/$(CONFIG_BIN1) \ + $(PKG_BUILD_DIR)/$(CONFIG_BIN2) \ + $(PKG_BUILD_DIR)/$(CONFIG_LIC) \ + $(1)/lib/firmware/ +endef + +$(eval $(call BuildPackage,layerscape-ppfe)) diff --git a/package/firmware/linux-firmware/edgeport.mk b/package/firmware/linux-firmware/edgeport.mk new file mode 100644 index 00000000000000..d68c75a0dc9080 --- /dev/null +++ b/package/firmware/linux-firmware/edgeport.mk @@ -0,0 +1,12 @@ +Package/edgeport-firmware = $(call Package/firmware-default,USB Inside Out Edgeport Serial Driver firmware) +define Package/edgeport-firmware/install + $(INSTALL_DIR) $(1)/lib/firmware/edgeport + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/edgeport/boot.fw \ + $(PKG_BUILD_DIR)/edgeport/boot2.fw \ + $(PKG_BUILD_DIR)/edgeport/down.fw \ + $(PKG_BUILD_DIR)/edgeport/down2.fw \ + $(1)/lib/firmware/edgeport +endef + +$(eval $(call BuildPackage,edgeport-firmware)) diff --git a/package/firmware/ppfe-firmware/Makefile b/package/firmware/ppfe-firmware/Makefile deleted file mode 100644 index 506046db4e1054..00000000000000 --- a/package/firmware/ppfe-firmware/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -# -# Copyright (C) 2016 Jiang Yutang -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ppfe -PKG_VERSION:=v1.0 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_MIRROR_HASH:=645d9aaaaa39ac1fa50cf805f1866feb5f717b34cb110c80e3f45303ea6d7259 -PKG_SOURCE_URL:=https://github.com/fsl-jyt/ppfe.git -PKG_SOURCE_VERSION:=b9bb5cc690c0aab2592eb9d443ef55cc9dff8557 -PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -PKG_LICENSE:=GPL-2.0 GPL-2.0+ -PKG_LICENSE_FILES:=Licenses/README - -PKG_FLAGS:=nonshared - -include $(INCLUDE_DIR)/package.mk - -define ppfe/Default - TITLE:= - CONFIG:= -endef - -define ppfe/ls1012ardb - TITLE:=PPFE firmware $(PKG_NAME)-$(PKG_VERSION) for NXP ls1012a Dev Board\ - (must enable CONFIG_NO_STRIP=y for avoid firmware be broke) - CONFIG:=ls1012a/Freescale-Binary-EULA ls1012a/ppfe_class_ls1012a.elf ls1012a/ppfe_tmu_ls1012a.elf -endef - -PPFES := \ - ls1012ardb - -define Package/ppfe/template -define Package/ppfe-$(1) - SECTION:=firmware - CATEGORY:=Firmware - DEPENDS:=@TARGET_layerscape - TITLE:=$(2) - URL:=https://github.com/fsl-jyt/ppfe.git - VARIANT:=$(1) - MAINTAINER:=Jiang Yutang -endef -endef - -define BuildPPFEPackage - $(eval $(ppfe/Default)) - $(eval $(ppfe/$(1))) - $(call Package/ppfe/template,$(1),$(TITLE)) -endef - -ifdef BUILD_VARIANT -$(eval $(call ppfe/$(BUILD_VARIANT))) -PPFE_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT)) -endif - -define Build/Compile -endef - -define Package/ppfe/install/default - $(INSTALL_DIR) $(1)/lib/firmware - $(foreach i,$(PPFE_CONFIG), \ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(i) $(1)/lib/firmware/ ;\ - ) -endef - -define Package/ppfe/install/template -define Package/ppfe-$(1)/install - $(call Package/ppfe/install/default,$$(1),$(2)) -endef -endef - -$(foreach p,$(PPFES), \ - $(eval $(call Package/ppfe/install/template,$(p),$(p))) \ -) - -$(foreach p,$(PPFES), \ - $(eval $(call BuildPPFEPackage,$(p))) \ - $(eval $(call BuildPackage,ppfe-$(p))) \ -) diff --git a/package/firmware/wireless-regdb/Makefile b/package/firmware/wireless-regdb/Makefile new file mode 100644 index 00000000000000..d06da2c7083de7 --- /dev/null +++ b/package/firmware/wireless-regdb/Makefile @@ -0,0 +1,31 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=wireless-regdb + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git +PKG_SOURCE_DATE:=2017-10-20 +PKG_SOURCE_VERSION:=4343d359ed5e7404de8803a74df186457b26ab79 +PKG_MIRROR_HASH:=5f5b669f32ae36cb65b1d99efbbbfd42c2983cda32f6448346e3e54ffaba3889 + +PKG_MAINTAINER:=Felix Fietkau + +include $(INCLUDE_DIR)/package.mk + +define Package/wireless-regdb + SECTION:=firmware + CATEGORY:=Firmware + URL:=$(patsubst pub/scm,cgit,$(PKG_SOURCE_URL)) + TITLE:=Wireless Regulatory Database +endef + +define Build/Compile + python $(PKG_BUILD_DIR)/db2fw.py $(PKG_BUILD_DIR)/regulatory.db $(PKG_BUILD_DIR)/db.txt +endef + +define Package/wireless-regdb/install + $(INSTALL_DIR) $(1)/lib/firmware + $(CP) $(PKG_BUILD_DIR)/regulatory.db $(1)/lib/firmware/ +endef + +$(eval $(call BuildPackage,wireless-regdb)) diff --git a/package/firmware/wireless-regdb/patches/100-regdb-write-firmware-file-format-version-code-20.patch b/package/firmware/wireless-regdb/patches/100-regdb-write-firmware-file-format-version-code-20.patch new file mode 100644 index 00000000000000..0c5c63fc5f6a78 --- /dev/null +++ b/package/firmware/wireless-regdb/patches/100-regdb-write-firmware-file-format-version-code-20.patch @@ -0,0 +1,251 @@ +From: Johannes Berg +Date: Mon, 9 Oct 2017 11:50:57 +0200 +Subject: [PATCH] regdb: write firmware file format (version code 20) + +TODO: clean up the Makefile stuff ... + +Signed-off-by: Johannes Berg +--- + create mode 100755 db2fw.py + +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,5 @@ + # Install prefix + PREFIX ?= /usr +-CRDA_PATH ?= $(PREFIX)/lib/crda +-CRDA_KEY_PATH ?= $(CRDA_PATH)/pubkeys + + MANDIR ?= $(PREFIX)/share/man/ + +@@ -30,39 +28,47 @@ REGDB_AUTHOR ?= $(shell if [ -f $(DISTRO + fi) + + REGDB_PRIVKEY ?= ~/.wireless-regdb-$(REGDB_AUTHOR).key.priv.pem +-REGDB_PUBKEY ?= $(REGDB_AUTHOR).key.pub.pem +- +-REGDB_UPSTREAM_PUBKEY ?= sforshee.key.pub.pem ++REGDB_PUBCERT ?= $(REGDB_AUTHOR).x509.pem + + REGDB_CHANGED = $(shell $(SHA1SUM) -c --status sha1sum.txt >/dev/null 2>&1; \ + if [ $$? -ne 0 ]; then \ +- echo maintainer-clean $(REGDB_PUBKEY); \ ++ echo maintainer-clean $(REGDB_PUBCERT); \ + fi) + + .PHONY: all clean mrproper install maintainer-clean install-distro-key + +-all: $(REGDB_CHANGED) regulatory.bin sha1sum.txt ++all: $(REGDB_CHANGED) regulatory.db.p7s sha1sum.txt + + clean: + @rm -f *.pyc *.gz + + maintainer-clean: clean +- @rm -f regulatory.bin ++ @rm -f regulatory.db regulatory.db.p7s + + mrproper: clean maintainer-clean +- @echo Removed public key, regulatory.bin and compresed man pages +- @rm -f $(REGDB_PUBKEY) .custom ++ @echo Removed public key, regulatory.db* and compressed man pages ++ @rm -f $(REGDB_PUBCERT) .custom + +-regulatory.bin: db.txt $(REGDB_PRIVKEY) $(REGDB_PUBKEY) +- @echo Generating $@ digitally signed by $(REGDB_AUTHOR)... +- ./db2bin.py regulatory.bin db.txt $(REGDB_PRIVKEY) ++regulatory.db: db.txt db2fw.py ++ @echo "Generating $@" ++ ./db2fw.py regulatory.db db.txt ++ ++regulatory.db.p7s: regulatory.db $(REGDB_PRIVKEY) $(REGDB_PUBCERT) ++ @echo "Signing regulatory.db (by $(REGDB_AUTHOR))..." ++ @openssl smime -sign \ ++ -signer $(REGDB_PUBCERT) \ ++ -inkey $(REGDB_PRIVKEY) \ ++ -in $< -nosmimecap -binary \ ++ -outform DER -out $@ + + sha1sum.txt: db.txt + sha1sum $< > $@ + +-$(REGDB_PUBKEY): $(REGDB_PRIVKEY) +- @echo "Generating public key for $(REGDB_AUTHOR)..." +- openssl rsa -in $(REGDB_PRIVKEY) -out $(REGDB_PUBKEY) -pubout -outform PEM ++$(REGDB_PUBCERT): $(REGDB_PRIVKEY) ++ @echo "Generating certificate for $(REGDB_AUTHOR)..." ++ @openssl req -config regulatory.openssl.conf \ ++ -key $(REGDB_PRIVKEY) -days 36500 -utf8 -nodes -batch \ ++ -x509 -outform PEM -out $(REGDB_PUBCERT) + @echo $(REGDB_PUBKEY) > .custom + + +@@ -97,16 +103,7 @@ install-distro-key: maintainer-clean $(D + # make maintainer-clean + # make + # sudo make install +-install: regulatory.bin.5.gz +- install -m 755 -d $(DESTDIR)/$(CRDA_PATH) +- install -m 755 -d $(DESTDIR)/$(CRDA_KEY_PATH) +- if [ -f .custom ]; then \ +- install -m 644 -t $(DESTDIR)/$(CRDA_KEY_PATH)/ $(shell cat .custom); \ +- fi +- install -m 644 -t $(DESTDIR)/$(CRDA_KEY_PATH)/ $(REGDB_UPSTREAM_PUBKEY) +- install -m 644 -t $(DESTDIR)/$(CRDA_PATH)/ regulatory.bin ++install: regulatory.db.5.gz ++ install -m 644 -t $(DESTDIR)/$(CRDA_PATH)/ regulatory.db + install -m 755 -d $(DESTDIR)/$(MANDIR)/man5/ +- install -m 644 -t $(DESTDIR)/$(MANDIR)/man5/ regulatory.bin.5.gz +- +-uninstall: +- rm -rf $(DESTDIR)/$(CRDA_PATH)/ ++ install -m 644 -t $(DESTDIR)/$(MANDIR)/man5/ regulatory.db.5.gz +--- a/README ++++ b/README +@@ -18,8 +18,8 @@ python module is used by the web viewer + implemented as a MoinMoin macro (and used on http://wireless.kernel.org) + to allow viewing the database for verification. + +-The dbparse module is also used by db2bin.py, the `compiler', which +-compiles and signs the binary database. ++The dbparse module is also used by db2bin.py and db2fw.py, the `compilers' ++that compile the database to its binary formats. + + For more information, please see the CRDA git repository: + +--- /dev/null ++++ b/db2fw.py +@@ -0,0 +1,133 @@ ++#!/usr/bin/env python ++ ++from cStringIO import StringIO ++import struct ++import hashlib ++from dbparse import DBParser ++import sys ++ ++MAGIC = 0x52474442 ++VERSION = 20 ++ ++if len(sys.argv) < 3: ++ print 'Usage: %s output-file input-file' % sys.argv[0] ++ sys.exit(2) ++ ++def create_rules(countries): ++ result = {} ++ for c in countries.itervalues(): ++ for rule in c.permissions: ++ result[rule] = 1 ++ return result.keys() ++ ++def create_collections(countries): ++ result = {} ++ for c in countries.itervalues(): ++ result[(c.permissions, c.dfs_region)] = 1 ++ return result.keys() ++ ++ ++def be32(output, val): ++ output.write(struct.pack('>I', val)) ++def be16(output, val): ++ output.write(struct.pack('>H', val)) ++ ++class PTR(object): ++ def __init__(self, output): ++ self._output = output ++ self._pos = output.tell() ++ be16(output, 0) ++ self._written = False ++ ++ def set(self, val=None): ++ if val is None: ++ val = self._output.tell() ++ assert val & 3 == 0 ++ self._offset = val ++ pos = self._output.tell() ++ self._output.seek(self._pos) ++ be16(self._output, val >> 2) ++ self._output.seek(pos) ++ self._written = True ++ ++ def get(self): ++ return self._offset ++ ++ @property ++ def written(self): ++ return self._written ++ ++p = DBParser() ++countries = p.parse(file(sys.argv[2])) ++rules = create_rules(countries) ++rules.sort(cmp=lambda x, y: cmp(x.freqband, y.freqband)) ++collections = create_collections(countries) ++collections.sort(cmp=lambda x, y: cmp(x[0][0].freqband, y[0][0].freqband)) ++ ++output = StringIO() ++ ++# struct regdb_file_header ++be32(output, MAGIC) ++be32(output, VERSION) ++ ++country_ptrs = {} ++countrynames = countries.keys() ++countrynames.sort() ++for alpha2 in countrynames: ++ coll = countries[alpha2] ++ output.write(struct.pack('>cc', str(alpha2[0]), str(alpha2[1]))) ++ country_ptrs[alpha2] = PTR(output) ++output.write('\x00' * 4) ++ ++reg_rules = {} ++flags = 0 ++for reg_rule in rules: ++ freq_range, power_rule = reg_rule.freqband, reg_rule.power ++ reg_rules[reg_rule] = output.tell() ++ assert power_rule.max_ant_gain == 0 ++ flags = 0 ++ # convert to new rule flags ++ assert reg_rule.flags & ~0x899 == 0 ++ if reg_rule.flags & 1<<0: ++ flags |= 1<<0 ++ if reg_rule.flags & 1<<3: ++ flags |= 1<<1 ++ if reg_rule.flags & 1<<4: ++ flags |= 1<<2 ++ if reg_rule.flags & 1<<7: ++ flags |= 1<<3 ++ if reg_rule.flags & 1<<11: ++ flags |= 1<<4 ++ rule_len = 16 ++ cac_timeout = 0 # TODO ++ if not (flags & 1<<2): ++ cac_timeout = 0 ++ if cac_timeout: ++ rule_len += 2 ++ output.write(struct.pack('>BBHIII', rule_len, flags, power_rule.max_eirp * 100, ++ freq_range.start * 1000, freq_range.end * 1000, freq_range.maxbw * 1000, ++ )) ++ if cac_timeout: ++ output.write(struct.pack('>H', cac_timeout)) ++ while rule_len % 4: ++ output.write('\0') ++ rule_len += 1 ++ ++for coll in collections: ++ for alpha2 in countrynames: ++ if (countries[alpha2].permissions, countries[alpha2].dfs_region) == coll: ++ assert not country_ptrs[alpha2].written ++ country_ptrs[alpha2].set() ++ slen = 3 ++ output.write(struct.pack('>BBBx', slen, len(list(coll[0])), coll[1])) ++ coll = list(coll[0]) ++ for regrule in coll: ++ be16(output, reg_rules[regrule] >> 2) ++ if len(coll) % 2: ++ be16(output, 0) ++ ++for alpha2 in countrynames: ++ assert country_ptrs[alpha2].written ++ ++outfile = open(sys.argv[1], 'w') ++outfile.write(output.getvalue()) diff --git a/package/firmware/wireless-regdb/patches/500-world-regd-5GHz.patch b/package/firmware/wireless-regdb/patches/500-world-regd-5GHz.patch new file mode 100644 index 00000000000000..9baba808bca03e --- /dev/null +++ b/package/firmware/wireless-regdb/patches/500-world-regd-5GHz.patch @@ -0,0 +1,16 @@ +Remove the NO-IR flag from channels 36-48 on the World domain, +to make it usable for AP mode. + +Signed-off-by: Felix Fietkau +--- +--- a/db.txt ++++ b/db.txt +@@ -6,7 +6,7 @@ country 00: + # Channel 14. Only JP enables this and for 802.11b only + (2474 - 2494 @ 20), (20), NO-IR, NO-OFDM + # Channel 36 - 48 +- (5170 - 5250 @ 80), (20), NO-IR, AUTO-BW ++ (5170 - 5250 @ 80), (20), AUTO-BW + # Channel 52 - 64 + (5250 - 5330 @ 80), (20), NO-IR, DFS, AUTO-BW + # Channel 100 - 144 diff --git a/package/kernel/acx-mac80211/Makefile b/package/kernel/acx-mac80211/Makefile index 5629b050b5f1d6..5927f174d43072 100644 --- a/package/kernel/acx-mac80211/Makefile +++ b/package/kernel/acx-mac80211/Makefile @@ -16,7 +16,6 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_DATE:=2014-02-16 PKG_SOURCE_VERSION:=b6fc31491020cb01d2cd1acc170cfa03ced7e726 PKG_MIRROR_HASH:=58590245715f0e5fb4b57aab6d91071dfb6a97d3273f5aee0b97b1edee030ed0 -PKG_BUILD_DEPENDS:=mac80211 PKG_CONFIG_DEPENDS:= \ CONFIG_PACKAGE_MAC80211_DEBUGFS \ @@ -27,9 +26,9 @@ include $(INCLUDE_DIR)/package.mk define KernelPackage/acx-mac80211 SUBMENU:=Wireless Drivers TITLE:=ACX1xx mac80211 driver - DEPENDS:=@(PCI_SUPPORT||TARGET_ar7) @mipsel @LINUX_3_18||LINUX_4_4 +kmod-mac80211 + DEPENDS:=@(PCI_SUPPORT||TARGET_ar7) @mipsel +kmod-mac80211 FILES:=$(PKG_BUILD_DIR)/acx-mac80211.ko - AUTOLOAD:=$(call AutoLoad,50,mac80211 acx-mac80211) + AUTOLOAD:=$(call AutoProbe,acx-mac80211) MAINTAINER:=Florian Fainelli MENU:=1 endef @@ -183,8 +182,7 @@ PKG_EXTRA_CFLAGS:= \ define Build/Compile $(MAKE) -C "$(LINUX_DIR)" \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ + $(KERNEL_MAKE_FLAGS) \ SUBDIRS="$(PKG_BUILD_DIR)" \ $(PKG_EXTRA_KCONFIG) \ EXTRA_CFLAGS="$(PKG_EXTRA_CFLAGS) -DCONFIG_ACX_MAC80211_VERSION=\"KERNEL_VERSION(4,2,0)\"" \ diff --git a/package/kernel/acx-mac80211/patches/100-compat.patch b/package/kernel/acx-mac80211/patches/100-compat.patch new file mode 100644 index 00000000000000..6fcab5ea43f463 --- /dev/null +++ b/package/kernel/acx-mac80211/patches/100-compat.patch @@ -0,0 +1,16 @@ +diff --git a/pci.c b/pci.c +index ae07f5a..72d542f 100644 +--- a/pci.c ++++ b/pci.c +@@ -1495,7 +1495,11 @@ static struct acxpci_device_info acxpci_info_tbl[] __devinitdata = { + #endif + + #ifdef CONFIG_PCI ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0) + static DEFINE_PCI_DEVICE_TABLE(acxpci_id_tbl) = { ++#else ++static const struct pci_device_id acxpci_id_tbl[] = { ++#endif + { PCI_VDEVICE(TI, PCI_DEVICE_ID_TI_TNETW1100A), + .driver_data = CHIPTYPE_ACX100, + }, diff --git a/package/kernel/ar7-atm/Makefile b/package/kernel/ar7-atm/Makefile index edec44f969f19b..82d6f61a7d0215 100644 --- a/package/kernel/ar7-atm/Makefile +++ b/package/kernel/ar7-atm/Makefile @@ -80,8 +80,7 @@ endef define Build/Compile $(MAKE) -C "$(LINUX_DIR)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - ARCH="$(LINUX_KARCH)" \ + $(KERNEL_MAKE_FLAGS) \ SUBDIRS="$(PKG_BUILD_DIR)" \ modules endef diff --git a/package/kernel/ar7-atm/patches-D7.04.03.00/170-bus_id_removal.patch b/package/kernel/ar7-atm/patches-D7.04.03.00/170-bus_id_removal.patch index 9f1f0fdae47d85..a970574fe5b3cc 100644 --- a/package/kernel/ar7-atm/patches-D7.04.03.00/170-bus_id_removal.patch +++ b/package/kernel/ar7-atm/patches-D7.04.03.00/170-bus_id_removal.patch @@ -1,30 +1,19 @@ --- a/tn7dsl.c +++ b/tn7dsl.c -@@ -109,6 +109,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -446,7 +447,9 @@ static void avsar_release(struct device +@@ -446,7 +446,6 @@ static void avsar_release(struct device } static struct device avsar = { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) - .bus_id = "vlynq", -+#endif +- .bus_id = "vlynq", .release = avsar_release, }; -@@ -455,6 +458,9 @@ int shim_osLoadFWImage(unsigned char *pt +@@ -455,6 +454,8 @@ int shim_osLoadFWImage(unsigned char *pt const struct firmware *fw_entry; size_t size; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) + dev_set_name(&avsar, "avsar"); -+#endif ++ printk("requesting firmware image \"ar0700xx.bin\"\n"); if(device_register(&avsar) < 0) { printk(KERN_ERR diff --git a/package/kernel/ar7-atm/patches-D7.04.03.00/180-git_headers_include.patch b/package/kernel/ar7-atm/patches-D7.04.03.00/180-git_headers_include.patch index 6bd8f48760e35a..6d72b005442a80 100644 --- a/package/kernel/ar7-atm/patches-D7.04.03.00/180-git_headers_include.patch +++ b/package/kernel/ar7-atm/patches-D7.04.03.00/180-git_headers_include.patch @@ -1,54 +1,39 @@ --- a/tn7atm.c +++ b/tn7atm.c -@@ -71,10 +71,16 @@ - #include - #include +@@ -73,8 +73,8 @@ #include -+#include #include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) - #include - #include -+#else +-#include +-#include +#include +#include -+#endif #include "dsl_hal_api.h" #include "tn7atm.h" --- a/tn7dsl.c +++ b/tn7dsl.c -@@ -112,8 +112,13 @@ - #include +@@ -111,8 +111,8 @@ + #include #include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) - #include - #include -+#else +-#include +-#include +#include +#include -+#endif /* Modules specific header files */ #include "tn7atm.h" --- a/tn7sar.c +++ b/tn7sar.c -@@ -52,10 +52,16 @@ - #include - #include +@@ -54,8 +54,8 @@ #include -+#include #include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) - #include - #include -+#else +-#include +-#include +#include +#include -+#endif #define _CPHAL_AAL5 #define _CPHAL_SAR diff --git a/package/kernel/ar7-atm/patches-D7.04.03.00/190-2.6.32_proc_fixes.patch b/package/kernel/ar7-atm/patches-D7.04.03.00/190-2.6.32_proc_fixes.patch index 11487bf7a6a734..1223604b0eb2f2 100644 --- a/package/kernel/ar7-atm/patches-D7.04.03.00/190-2.6.32_proc_fixes.patch +++ b/package/kernel/ar7-atm/patches-D7.04.03.00/190-2.6.32_proc_fixes.patch @@ -1,53 +1,70 @@ --- a/tn7dsl.c +++ b/tn7dsl.c -@@ -203,7 +203,11 @@ led_reg_t ledreg[2]; +@@ -197,7 +197,7 @@ led_reg_t ledreg[2]; static struct led_funcs ledreg[2]; #endif -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) - #define DEV_DSLMOD CTL_UNNUMBERED -+#else +-#define DEV_DSLMOD CTL_UNNUMBERED +#define DEV_DSLMOD 0 -+#endif #define MAX_STR_SIZE 256 #define DSL_MOD_SIZE 256 -@@ -3431,9 +3435,16 @@ static int dslmod_sysctl(ctl_table *ctl, +@@ -333,8 +333,8 @@ static void tn7dsl_chng_modulation(void* + static unsigned int tn7dsl_set_modulation(void* data, int flag); + static void tn7dsl_ctrl_fineGain(int value); + static void tn7dsl_set_fineGainValue(int value); +-static int dslmod_sysctl (ctl_table * ctl, int write, struct file *filp, +- void *buffer, size_t * lenp); ++static int dslmod_sysctl (ctl_table * ctl, int write, void *buffer, ++ size_t * lenp, loff_t *ppos); + static void tn7dsl_register_dslss_led(void); + void tn7dsl_dslmod_sysctl_register(void); + void tn7dsl_dslmod_sysctl_unregister(void); +@@ -3398,8 +3398,8 @@ unsigned int tn7dsl_get_memory(unsigned + + + +-static int dslmod_sysctl(ctl_table *ctl, int write, struct file * filp, +- void *buffer, size_t *lenp) ++static int dslmod_sysctl(ctl_table *ctl, int write, void *buffer, ++ size_t *lenp, loff_t *ppos) + { + char *ptr; + int ret, len = 0; +@@ -3411,7 +3411,7 @@ static int dslmod_sysctl(ctl_table *ctl, + char mod_req[16] = { '\t' }; + char fst_byt; + +- if (!*lenp || (filp->f_pos && !write)) ++ if (!*lenp || (*ppos && !write)) + { + *lenp = 0; + return 0; +@@ -3421,9 +3421,9 @@ static int dslmod_sysctl(ctl_table *ctl, */ if(write) { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) - ret = proc_dostring(ctl, write, filp, buffer, lenp, 0); -- -+#else -+ ret = proc_dostring(ctl, write, buffer, lenp, 0); -+#endif -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) - switch (ctl->ctl_name) -+#else +- ret = proc_dostring(ctl, write, filp, buffer, lenp, 0); ++ ret = proc_dostring(ctl, write, buffer, lenp, ppos); + +- switch (ctl->ctl_name) + switch ((long)ctl->extra2) -+#endif { case DEV_DSLMOD: ptr = strpbrk(info, " \t"); -@@ -3517,14 +3528,29 @@ static int dslmod_sysctl(ctl_table *ctl, +@@ -3507,14 +3507,21 @@ static int dslmod_sysctl(ctl_table *ctl, else { len += sprintf(info+len, mod_req); -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) - ret = proc_dostring(ctl, write, filp, buffer, lenp, 0); -+#else -+ ret = proc_dostring(ctl, write, buffer, lenp, 0); -+#endif +- ret = proc_dostring(ctl, write, filp, buffer, lenp, 0); ++ ret = proc_dostring(ctl, write, buffer, lenp, ppos); } return ret; } ctl_table dslmod_table[] = { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) - {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, NULL, &dslmod_sysctl, &sysctl_string} -+#else +- {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, NULL, &dslmod_sysctl, &sysctl_string} + { + .procname = "dslmod", + .data = info, @@ -56,24 +73,20 @@ + .proc_handler = &dslmod_sysctl, + .extra2 = (void *)DEV_DSLMOD, + } -+#endif , {0} }; -@@ -3532,7 +3558,16 @@ ctl_table dslmod_table[] = { +@@ -3522,7 +3529,12 @@ ctl_table dslmod_table[] = { /* Make sure that /proc/sys/dev is there */ ctl_table dslmod_root_table[] = { #ifdef CONFIG_PROC_FS -+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) - {CTL_DEV, "dev", NULL, 0, 0555, dslmod_table} -+ #else +- {CTL_DEV, "dev", NULL, 0, 0555, dslmod_table} + { + .procname = "dev", + .maxlen = 0, + .mode = 0555, + .child = dslmod_table, + } -+ #endif , #endif /* CONFIG_PROC_FS */ {0} diff --git a/package/kernel/ar7-atm/patches-D7.04.03.00/200-2.6.37_args.patch b/package/kernel/ar7-atm/patches-D7.04.03.00/200-2.6.37_args.patch index e8668b6c5e5316..2007b497c29d35 100644 --- a/package/kernel/ar7-atm/patches-D7.04.03.00/200-2.6.37_args.patch +++ b/package/kernel/ar7-atm/patches-D7.04.03.00/200-2.6.37_args.patch @@ -1,28 +1,24 @@ --- a/tn7atm.c +++ b/tn7atm.c -@@ -1876,7 +1876,11 @@ static int __init tn7atm_register (Tn7At +@@ -1870,7 +1870,7 @@ static int __init tn7atm_register (Tn7At dgprintf (4, "device %s being registered\n", priv->name); -+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) - mydev = atm_dev_register (priv->proc_name, &tn7atm_ops, -1, NULL); -+ #else +- mydev = atm_dev_register (priv->proc_name, &tn7atm_ops, -1, NULL); + mydev = atm_dev_register (priv->proc_name, NULL, &tn7atm_ops, -1, NULL); -+ #endif if (mydev == NULL) { --- a/tn7dsl.c +++ b/tn7dsl.c -@@ -466,14 +466,17 @@ int shim_osLoadFWImage(unsigned char *pt +@@ -453,13 +453,16 @@ int shim_osLoadFWImage(unsigned char *pt { const struct firmware *fw_entry; size_t size; + int ret; - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) dev_set_name(&avsar, "avsar"); - #endif + printk("requesting firmware image \"ar0700xx.bin\"\n"); - if(device_register(&avsar) < 0) { + dev_set_name(&avsar, "avsar"); diff --git a/package/kernel/ar7-atm/patches-D7.04.03.00/220-3.10-update_proc_code.patch b/package/kernel/ar7-atm/patches-D7.04.03.00/220-3.10-update_proc_code.patch index be81ee1253c042..7a2bbe8089ee71 100644 --- a/package/kernel/ar7-atm/patches-D7.04.03.00/220-3.10-update_proc_code.patch +++ b/package/kernel/ar7-atm/patches-D7.04.03.00/220-3.10-update_proc_code.patch @@ -116,7 +116,7 @@ Signed-off-by: Jonas Gorski #endif __SGAPI_H --- a/tn7atm.c +++ b/tn7atm.c -@@ -277,25 +277,15 @@ static int tn7atm_change_qos (struct atm +@@ -271,25 +271,15 @@ static int tn7atm_change_qos (struct atm static int tn7atm_detect (void); static int tn7atm_init (struct atm_dev *dev); static int tn7atm_irq_request (struct atm_dev *dev); @@ -147,15 +147,7 @@ Signed-off-by: Jonas Gorski //CT - Added function to return chipset Id void tn7atm_get_chipsetId (char *pVerId); -@@ -415,63 +405,67 @@ const char drv_proc_root_folder[] = "ava - static struct proc_dir_entry *root_proc_dir_entry = NULL; - #define DRV_PROC_MODE 0644 - static int proc_root_already_exists = TRUE; -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) -+#define PDE_DATA(inode) PDE(inode)->data -+#endif -+ +@@ -412,60 +402,59 @@ static int proc_root_already_exists = TR static struct { const unsigned char name[32]; @@ -250,7 +242,7 @@ Signed-off-by: Jonas Gorski }; /* *INDENT-ON* */ -@@ -1709,75 +1703,81 @@ int tn7atm_receive (void *os_dev, int ch +@@ -1703,75 +1692,81 @@ int tn7atm_receive (void *os_dev, int ch return 0; } @@ -301,15 +293,15 @@ Signed-off-by: Jonas Gorski - return len; + return 0; -+} -+ -+static int tn7atm_proc_channels_open(struct inode *inode, struct file *file) -+{ -+ return single_open(file, tn7atm_proc_channels, PDE_DATA(inode)); } -static int tn7atm_proc_private (char *buf, char **start, off_t offset, - int count, int *eof, void *data) ++static int tn7atm_proc_channels_open(struct inode *inode, struct file *file) ++{ ++ return single_open(file, tn7atm_proc_channels, PDE_DATA(inode)); ++} ++ +static struct file_operations tn7atm_proc_channels_fops = { + .owner = THIS_MODULE, + .open = tn7atm_proc_channels_open, @@ -353,11 +345,11 @@ Signed-off-by: Jonas Gorski + + seq_printf (m, "tx_irq: %02d", priv->sar_irq); + seq_printf (m, "rx_irq: %02d", priv->dsl_irq); - -- return len; ++ + return 0; +} -+ + +- return len; +static int tn7atm_proc_private_open(struct inode *inode, struct file *file) +{ + return single_open(file, tn7atm_proc_private, PDE_DATA(inode)); @@ -374,7 +366,7 @@ Signed-off-by: Jonas Gorski void tn7atm_sarhal_isr_register (void *os_dev, void *hal_isr, int interrupt_num) { -@@ -1900,10 +1900,8 @@ static int __init tn7atm_register (Tn7At +@@ -1890,10 +1885,8 @@ static int __init tn7atm_register (Tn7At return ATM_REG_OK; } @@ -386,7 +378,7 @@ Signed-off-by: Jonas Gorski char dslVer[8]; char dspVer[10]; char chipsetID[32]; //CT CQ10076 - Added temporary buffer to store chipset Id -@@ -1914,56 +1912,64 @@ static int tn7atm_proc_version (char *bu +@@ -1904,56 +1897,64 @@ static int tn7atm_proc_version (char *bu priv = mydev->dev_data; @@ -472,7 +464,7 @@ Signed-off-by: Jonas Gorski int ctr; const char *residual; -@@ -2012,24 +2018,7 @@ static int __init tn7atm_detect (void) +@@ -2002,24 +2003,7 @@ static int __init tn7atm_detect (void) */ for (ctr = 0; ctr < (NUM_ELEMS (proc_if)); ctr++) { @@ -498,7 +490,7 @@ Signed-off-by: Jonas Gorski } tn7dsl_dslmod_sysctl_register (); -@@ -2501,63 +2490,10 @@ static int tn7atm_set_can_support_adsl2 +@@ -2491,63 +2475,10 @@ static int tn7atm_set_can_support_adsl2 return TRUE; } @@ -564,7 +556,7 @@ Signed-off-by: Jonas Gorski } static int tn7atm_proc_qos_write(struct file *fp, const char *buf, unsigned long count, void *data) -@@ -2591,5 +2527,19 @@ static int tn7atm_proc_qos_write(struct +@@ -2581,5 +2512,19 @@ static int tn7atm_proc_qos_write(struct return count; } @@ -586,17 +578,7 @@ Signed-off-by: Jonas Gorski module_exit (tn7atm_exit); --- a/tn7dsl.c +++ b/tn7dsl.c -@@ -221,6 +221,9 @@ static struct led_funcs ledreg[2]; - - #define tn7dsl_kfree_skb(x) dev_kfree_skb(x) - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) -+#define PDE_DATA(inode) PDE(inode)->data -+#endif - - //--------------------------------------------- - // Begin Clear EOC definitions -@@ -349,7 +352,7 @@ static void tn7dsl_register_dslss_led(vo +@@ -339,7 +339,7 @@ static void tn7dsl_register_dslss_led(vo void tn7dsl_dslmod_sysctl_register(void); void tn7dsl_dslmod_sysctl_unregister(void); static int tn7dsl_clear_eoc_receive(void); @@ -605,7 +587,7 @@ Signed-off-by: Jonas Gorski /* end of internal functions */ // UR8_MERGE_START CQ11054 Jack Zhang -@@ -649,11 +652,9 @@ void shim_osCriticalExit(void) +@@ -635,11 +635,9 @@ void shim_osCriticalExit(void) spin_unlock_irqrestore(&shimLock, flags); } @@ -618,7 +600,7 @@ Signed-off-by: Jonas Gorski int i, j; int bin = (int) data; unsigned short *rxSnrPerBin; -@@ -674,95 +675,128 @@ static int tn7dsl_proc_snr_print (char * +@@ -660,95 +658,128 @@ static int tn7dsl_proc_snr_print (char * break; default: @@ -791,7 +773,7 @@ Signed-off-by: Jonas Gorski #ifndef NO_ACT int tn7dsl_proc_ds_noise(char* buf, char **start, off_t offset, int count, int *eof, void *data) -@@ -825,59 +859,48 @@ static char *pUnknown= "Unknown"; +@@ -811,59 +842,48 @@ static char *pUnknown= "Unknown"; #ifdef ADV_DIAG_STATS //CQ10275, CQ10449 //UR8_MERGE_START CQ10449 Jack Zhang @@ -874,7 +856,7 @@ Signed-off-by: Jonas Gorski { int len = 0; int i = 0; -@@ -886,66 +909,53 @@ static int proc_adv_stats_header(char* b +@@ -872,66 +892,53 @@ static int proc_adv_stats_header(char* b */ dslhal_api_gatherStatistics(pIhw); @@ -963,7 +945,7 @@ Signed-off-by: Jonas Gorski } static int getDiagDisplayMode() -@@ -968,29 +978,24 @@ static int getDiagDisplayMode() +@@ -954,29 +961,24 @@ static int getDiagDisplayMode() ret = 2; return ret; } @@ -998,7 +980,7 @@ Signed-off-by: Jonas Gorski (unsigned int)pIhw->AppData.BitAllocTblDstrm[i], (unsigned int)pIhw->AppData.marginTblDstrm[i], (int)pIhw->AppData.rxSnrPerBin0[i]); -@@ -1001,26 +1006,34 @@ int tn7dsl_proc_adv_stats1(char* buf, ch +@@ -987,26 +989,34 @@ int tn7dsl_proc_adv_stats1(char* buf, ch if (dslhal_api_getSNRpsds(pIhw, SNRpsds, 1)) { dgprintf(4, "dslhal_api_getSNRpsds failed!\n"); @@ -1041,7 +1023,7 @@ Signed-off-by: Jonas Gorski int i; int mode = 0; //mode = 0 => ADSL1 or ADSL2 & 2+ unsigned char SNRpsds[512]; -@@ -1030,12 +1043,10 @@ int tn7dsl_proc_adv_stats2(char* buf, ch +@@ -1016,12 +1026,10 @@ int tn7dsl_proc_adv_stats2(char* buf, ch if( mode==1) //ADSL1 { dslhal_api_gatherStatistics(pIhw); @@ -1056,7 +1038,7 @@ Signed-off-by: Jonas Gorski (unsigned int)pIhw->AppData.BitAllocTblDstrm[i], (unsigned int)pIhw->AppData.marginTblDstrm[i], (int)pIhw->AppData.rxSnrPerBin0[i]); -@@ -1046,26 +1057,35 @@ int tn7dsl_proc_adv_stats2(char* buf, ch +@@ -1032,26 +1040,35 @@ int tn7dsl_proc_adv_stats2(char* buf, ch if (dslhal_api_getSNRpsds(pIhw, SNRpsds, 1)) { dgprintf(4, "dslhal_api_getSNRpsds failed!\n"); @@ -1100,7 +1082,7 @@ Signed-off-by: Jonas Gorski int i; int mode = 0; //mode = 0 => ADSL1 or ADSL2 & 2+ unsigned char SNRpsds[512]; -@@ -1075,12 +1095,10 @@ int tn7dsl_proc_adv_stats3(char* buf, ch +@@ -1061,12 +1078,10 @@ int tn7dsl_proc_adv_stats3(char* buf, ch if( mode==1) //ADSL1 { dslhal_api_gatherStatistics(pIhw); @@ -1115,7 +1097,7 @@ Signed-off-by: Jonas Gorski (unsigned int)pIhw->AppData.BitAllocTblDstrm[i], (unsigned int)pIhw->AppData.marginTblDstrm[i], (int)pIhw->AppData.rxSnrPerBin0[i]); -@@ -1091,283 +1109,287 @@ int tn7dsl_proc_adv_stats3(char* buf, ch +@@ -1077,283 +1092,287 @@ int tn7dsl_proc_adv_stats3(char* buf, ch if (dslhal_api_getSNRpsds(pIhw, SNRpsds, 1)) { dgprintf(4, "dslhal_api_getSNRpsds failed!\n"); @@ -1256,7 +1238,9 @@ Signed-off-by: Jonas Gorski { + return single_open(file, tn7dsl_proc_dbg_cmsgs, PDE_DATA(inode)); +} -+ + +- int len = 0; +- int limit = count - 80; +struct file_operations tn7dsl_proc_dbg_cmsgs_fops = { + .owner = THIS_MODULE, + .open = tn7dsl_proc_dbg_cmsgs_open, @@ -1264,9 +1248,7 @@ Signed-off-by: Jonas Gorski + .llseek = seq_lseek, + .release = single_release, +}; - -- int len = 0; -- int limit = count - 80; ++ + +int tn7dsl_proc_dbg_rmsgs1(struct seq_file *m, void *data) +{ @@ -1544,7 +1526,7 @@ Signed-off-by: Jonas Gorski int F4count, F5count; unsigned int maxRate=0; unsigned int us_maxRate=0; -@@ -1375,80 +1397,58 @@ int tn7dsl_proc_stats(char* buf, char ** +@@ -1361,80 +1380,58 @@ int tn7dsl_proc_stats(char* buf, char ** //UR8_MERGE_START CQ10700 Manjula K struct atm_dev *dev; Tn7AtmPrivate *priv; @@ -1648,7 +1630,7 @@ Signed-off-by: Jonas Gorski ((unsigned int) pIhw->AppData.usAtm_count[0] + (unsigned int) pIhw->AppData.usAtm_count[1]) * 48, ((unsigned int) pIhw->AppData.dsGood_count[0] + -@@ -1456,9 +1456,7 @@ int tn7dsl_proc_stats(char* buf, char ** +@@ -1442,9 +1439,7 @@ int tn7dsl_proc_stats(char* buf, char ** /* * Superframe Count */ @@ -1659,7 +1641,7 @@ Signed-off-by: Jonas Gorski "\tUS Superframe Cnt :\t%u\tDS Superframe Cnt:\t%u\n", (unsigned int)pIhw->AppData.usSuperFrmCnt, (unsigned int)pIhw->AppData.dsSuperFrmCnt ); -@@ -1466,57 +1464,45 @@ int tn7dsl_proc_stats(char* buf, char ** +@@ -1452,57 +1447,45 @@ int tn7dsl_proc_stats(char* buf, char ** /* * US and DS power */ @@ -1732,7 +1714,7 @@ Signed-off-by: Jonas Gorski (unsigned int)pIhw->AppData.currentHybridNum, trellis); //@Added Maximum attainable bit rate information. 05-14-2004 -@@ -1528,12 +1514,12 @@ int tn7dsl_proc_stats(char* buf, char ** +@@ -1514,12 +1497,12 @@ int tn7dsl_proc_stats(char* buf, char ** } else { @@ -1747,7 +1729,7 @@ Signed-off-by: Jonas Gorski (unsigned char *) &rMsgsRA[0], 12); maxRate = (unsigned int)pIhw->AppData.DSConRate; -@@ -1549,283 +1535,213 @@ int tn7dsl_proc_stats(char* buf, char ** +@@ -1535,283 +1518,213 @@ int tn7dsl_proc_stats(char* buf, char ** } } @@ -2129,7 +2111,7 @@ Signed-off-by: Jonas Gorski char *state; int tag; -@@ -1859,16 +1775,26 @@ int tn7dsl_proc_modem(char* buf, char ** +@@ -1845,16 +1758,26 @@ int tn7dsl_proc_modem(char* buf, char ** if(pIhw->lConnected == 1) state = "SHOWTIME"; @@ -2163,7 +2145,7 @@ Signed-off-by: Jonas Gorski /********************************************************************** ** * ** tn7dsl_hdlc_update_crc() -- Calculate CRC * -@@ -2133,11 +2059,8 @@ static int tn7dsl_hdlc_rx_process(unsign +@@ -2119,11 +2042,8 @@ static int tn7dsl_hdlc_rx_process(unsign return(ret); } @@ -2176,7 +2158,7 @@ Signed-off-by: Jonas Gorski int offset[2] = {34, 0}; // point to buffer parameter data structure clearEocParm_t peoc; -@@ -2146,62 +2069,49 @@ int tn7dsl_proc_eoc (char *buf, char **s +@@ -2132,62 +2052,49 @@ int tn7dsl_proc_eoc (char *buf, char **s (unsigned char *) &peoc, sizeof (clearEocParm_t)); @@ -2279,7 +2261,7 @@ Signed-off-by: Jonas Gorski int tn7dsl_clear_eoc_setup(void) { int i; -@@ -4440,14 +4350,10 @@ int tn7dsl_proc_write_stats (struct file +@@ -4407,14 +4314,10 @@ int tn7dsl_proc_write_stats (struct file } @@ -2295,7 +2277,7 @@ Signed-off-by: Jonas Gorski typedef struct { -@@ -4528,197 +4434,185 @@ int tn7dsl_proc_train_mode_export (char +@@ -4495,197 +4398,185 @@ int tn7dsl_proc_train_mode_export (char } @@ -2574,7 +2556,7 @@ Signed-off-by: Jonas Gorski } start = (indx -1) * 128; -@@ -4727,39 +4621,89 @@ static int tn7dsl_proc_HLINpsdsIndx(char +@@ -4694,39 +4585,89 @@ static int tn7dsl_proc_HLINpsdsIndx(char { if (!(i%8)) { @@ -2679,7 +2661,7 @@ Signed-off-by: Jonas Gorski #endif #endif //TR69_HLIN_IN // UR8_MERGE_END CQ10979* -@@ -4767,64 +4711,48 @@ int tn7dsl_proc_HLINpsds4(char* buf, cha +@@ -4734,64 +4675,48 @@ int tn7dsl_proc_HLINpsds4(char* buf, cha // * UR8_MERGE_START CQ11057 Jack Zhang #ifdef TR69_PMD_IN #ifndef NO_ADV_STATS @@ -2760,7 +2742,7 @@ Signed-off-by: Jonas Gorski } -@@ -4832,19 +4760,28 @@ int tn7dsl_proc_PMDus(char* buf, char ** +@@ -4799,19 +4724,28 @@ int tn7dsl_proc_PMDus(char* buf, char ** for (i=0; iAppData.max_us_tones; i++) { if (!(i%16)) @@ -2800,15 +2782,11 @@ Signed-off-by: Jonas Gorski // * UR8_MERGE_END CQ11057 * --- a/tn7sar.c +++ b/tn7sar.c -@@ -1401,44 +1401,70 @@ int tn7sar_oam_generation(void *privCont +@@ -1395,44 +1395,66 @@ int tn7sar_oam_generation(void *privCont return 0; } -int tn7sar_proc_oam_ping(char* buf, char **start, off_t offset, int count,int *eof, void *data) -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) -+#define PDE_DATA(inode) PDE(inode)->data -+#endif -+ +static int tn7sar_proc_oam_ping(struct seq_file *m, void *data) { - int len = 0; @@ -2883,7 +2861,7 @@ Signed-off-by: Jonas Gorski struct atm_dev *dev; Tn7AtmPrivate *priv; int i, j, k; -@@ -1447,21 +1473,19 @@ int tn7sar_proc_sar_stat(char* buf, char +@@ -1441,21 +1463,19 @@ int tn7sar_proc_sar_stat(char* buf, char unsigned int *pStateBase, *pSarStat; HAL_FUNCTIONS *pHalFunc; HAL_DEVICE *pHalDev; @@ -2908,7 +2886,7 @@ Signed-off-by: Jonas Gorski k=0; for(j=0;j<4;j++) { -@@ -1474,26 +1498,16 @@ int tn7sar_proc_sar_stat(char* buf, char +@@ -1468,26 +1488,18 @@ int tn7sar_proc_sar_stat(char* buf, char { if((char *)*pSarStat == NULL) break; @@ -2919,7 +2897,8 @@ Signed-off-by: Jonas Gorski - k += dBytes; - } + -+ k += seq_printf(m, "%s: ",(char *) *pSarStat); ++ seq_printf(m, "%s: ",(char *) *pSarStat); ++ k += strlen((char *) *pSarStat) + strlen(": "); pSarStat++; - if(len<=limit) - { @@ -2927,7 +2906,8 @@ Signed-off-by: Jonas Gorski - len += dBytes; - k += dBytes; - } -+ k += seq_printf(m, "%s; \n",(char *) *pSarStat); ++ seq_printf(m, "%s; \n",(char *) *pSarStat); ++ k += strlen((char *) *pSarStat) + strlen("; \n"); pSarStat++; if(k > 60) @@ -2939,7 +2919,7 @@ Signed-off-by: Jonas Gorski } } -@@ -1502,9 +1516,22 @@ int tn7sar_proc_sar_stat(char* buf, char +@@ -1496,9 +1508,22 @@ int tn7sar_proc_sar_stat(char* buf, char } } diff --git a/package/kernel/ar7-atm/patches-D7.04.03.00/240-3.18_fixes.patch b/package/kernel/ar7-atm/patches-D7.04.03.00/240-3.18_fixes.patch index e8bdab63da50d0..2e693001473736 100644 --- a/package/kernel/ar7-atm/patches-D7.04.03.00/240-3.18_fixes.patch +++ b/package/kernel/ar7-atm/patches-D7.04.03.00/240-3.18_fixes.patch @@ -1,38 +1,38 @@ --- a/tn7dsl.c +++ b/tn7dsl.c -@@ -346,7 +346,7 @@ static void tn7dsl_chng_modulation(void* +@@ -333,7 +333,7 @@ static void tn7dsl_chng_modulation(void* static unsigned int tn7dsl_set_modulation(void* data, int flag); static void tn7dsl_ctrl_fineGain(int value); static void tn7dsl_set_fineGainValue(int value); --static int dslmod_sysctl (ctl_table * ctl, int write, struct file *filp, -+static int dslmod_sysctl (struct ctl_table * ctl, int write, struct file *filp, - void *buffer, size_t * lenp); +-static int dslmod_sysctl (ctl_table * ctl, int write, void *buffer, ++static int dslmod_sysctl (struct ctl_table * ctl, int write, void *buffer, + size_t * lenp, loff_t *ppos); static void tn7dsl_register_dslss_led(void); void tn7dsl_dslmod_sysctl_register(void); -@@ -3325,7 +3325,7 @@ unsigned int tn7dsl_get_memory(unsigned +@@ -3308,7 +3308,7 @@ unsigned int tn7dsl_get_memory(unsigned --static int dslmod_sysctl(ctl_table *ctl, int write, struct file * filp, -+static int dslmod_sysctl(struct ctl_table *ctl, int write, struct file * filp, - void *buffer, size_t *lenp) +-static int dslmod_sysctl(ctl_table *ctl, int write, void *buffer, ++static int dslmod_sysctl(struct ctl_table *ctl, int write, void *buffer, + size_t *lenp, loff_t *ppos) { char *ptr; -@@ -3451,7 +3451,7 @@ static int dslmod_sysctl(ctl_table *ctl, +@@ -3423,7 +3423,7 @@ static int dslmod_sysctl(ctl_table *ctl, } -ctl_table dslmod_table[] = { +struct ctl_table dslmod_table[] = { - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) - {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, NULL, &dslmod_sysctl, &sysctl_string} - #else -@@ -3469,7 +3469,7 @@ ctl_table dslmod_table[] = { + { + .procname = "dslmod", + .data = info, +@@ -3437,7 +3437,7 @@ ctl_table dslmod_table[] = { }; /* Make sure that /proc/sys/dev is there */ -ctl_table dslmod_root_table[] = { +struct ctl_table dslmod_root_table[] = { #ifdef CONFIG_PROC_FS - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) - {CTL_DEV, "dev", NULL, 0, 0555, dslmod_table} + { + .procname = "dev", diff --git a/package/kernel/ar7-atm/patches-D7.04.03.00/250-4.1_fixes.patch b/package/kernel/ar7-atm/patches-D7.04.03.00/250-4.1_fixes.patch index 97a26cb417f328..f26b7e221cf031 100644 --- a/package/kernel/ar7-atm/patches-D7.04.03.00/250-4.1_fixes.patch +++ b/package/kernel/ar7-atm/patches-D7.04.03.00/250-4.1_fixes.patch @@ -1,6 +1,6 @@ --- a/tn7atm.c +++ b/tn7atm.c -@@ -788,7 +788,7 @@ static int __init tn7atm_irq_request (st +@@ -777,7 +777,7 @@ static int __init tn7atm_irq_request (st * Register SAR interrupt */ priv->sar_irq = LNXINTNUM (ATM_SAR_INT); /* Interrupt line # */ @@ -9,7 +9,7 @@ printk ("Could not register tn7atm_sar_irq\n"); /* -@@ -806,7 +806,7 @@ static int __init tn7atm_irq_request (st +@@ -795,7 +795,7 @@ static int __init tn7atm_irq_request (st * Reigster Receive interrupt A */ priv->dsl_irq = LNXINTNUM (ATM_DSL_INT); /* Interrupt line # */ diff --git a/package/kernel/ar7-atm/patches-D7.04.03.00/260-fix_function_signatures.patch b/package/kernel/ar7-atm/patches-D7.04.03.00/260-fix_function_signatures.patch new file mode 100644 index 00000000000000..fe13fc547624de --- /dev/null +++ b/package/kernel/ar7-atm/patches-D7.04.03.00/260-fix_function_signatures.patch @@ -0,0 +1,63 @@ +--- a/cpswhal_cpsar.h ++++ b/cpswhal_cpsar.h +@@ -430,10 +430,10 @@ typedef struct + int (*DeviceFindInfo)(int Inst, const char *DeviceName, void *DeviceInfo); + int (*DeviceFindParmUint)(void *DeviceInfo, const char *Parm, bit32u *Value); + int (*DeviceFindParmValue)(void *DeviceInfo, const char *Parm, void *Value); +- void (*Free)(void *MemPtr); ++ void (*Free)(const void *MemPtr); + void (*FreeRxBuffer)(OS_RECEIVEINFO *OsReceiveInfo, void *MemPtr); +- void (*FreeDev)(void *MemPtr); +- void (*FreeDmaXfer)(void *MemPtr); ++ void (*FreeDev)(const void *MemPtr); ++ void (*FreeDmaXfer)(const void *MemPtr); + void (*IsrRegister)(OS_DEVICE *OsDev, int (*halISR)(HAL_DEVICE*, int*), int InterruptBit); + void (*IsrUnRegister)(OS_DEVICE *OsDev, int InterruptBit); + void* (*Malloc)(bit32u size); +--- a/cpswhal_cpaal5.h ++++ b/cpswhal_cpaal5.h +@@ -430,10 +430,10 @@ typedef struct + int (*DeviceFindInfo)(int Inst, const char *DeviceName, void *DeviceInfo); + int (*DeviceFindParmUint)(void *DeviceInfo, const char *Parm, bit32u *Value); + int (*DeviceFindParmValue)(void *DeviceInfo, const char *Parm, void *Value); +- void (*Free)(void *MemPtr); ++ void (*Free)(const void *MemPtr); + void (*FreeRxBuffer)(OS_RECEIVEINFO *OsReceiveInfo, void *MemPtr); +- void (*FreeDev)(void *MemPtr); +- void (*FreeDmaXfer)(void *MemPtr); ++ void (*FreeDev)(const void *MemPtr); ++ void (*FreeDmaXfer)(const void *MemPtr); + void (*IsrRegister)(OS_DEVICE *OsDev, int (*halISR)(HAL_DEVICE*, int*), int InterruptBit); + void (*IsrUnRegister)(OS_DEVICE *OsDev, int InterruptBit); + void* (*Malloc)(bit32u size); +--- a/tn7atm.c ++++ b/tn7atm.c +@@ -2481,7 +2481,7 @@ static int tn7atm_proc_qos_read(struct s + return 0; + + } +-static int tn7atm_proc_qos_write(struct file *fp, const char *buf, unsigned long count, void *data) ++static int tn7atm_proc_qos_write(struct file *fp, const char *buf, size_t count, loff_t *data) + { + char local_buf[32]; + +--- a/tn7dsl.c ++++ b/tn7dsl.c +@@ -1712,7 +1712,7 @@ static int tn7dsl_proc_stats_open(struct + return single_open(file, tn7dsl_proc_stats, PDE_DATA(inode)); + } + +-int tn7dsl_proc_write_stats (struct file *fp, const char *buf, unsigned long count, void *data); ++int tn7dsl_proc_write_stats (struct file *fp, const char *buf, size_t count, loff_t *data); + + struct file_operations tn7dsl_proc_stats_fops = { + .owner = THIS_MODULE, +@@ -4256,7 +4256,7 @@ int tn7dsl_generic_write( int offsetnum, + } + + int tn7dsl_proc_write_stats (struct file *fp, const char *buf, +- unsigned long count, void *data) ++ size_t count, loff_t *data) + { + char local_buf[31]; + int ret_val = 0; diff --git a/package/kernel/ar7-atm/patches-D7.05.01.00/170-bus_id_removal.patch b/package/kernel/ar7-atm/patches-D7.05.01.00/170-bus_id_removal.patch index 6692f40f6a95ea..53767e45bec173 100644 --- a/package/kernel/ar7-atm/patches-D7.05.01.00/170-bus_id_removal.patch +++ b/package/kernel/ar7-atm/patches-D7.05.01.00/170-bus_id_removal.patch @@ -1,30 +1,19 @@ --- a/tn7dsl.c +++ b/tn7dsl.c -@@ -117,6 +117,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -492,7 +493,9 @@ static void avsar_release(struct device +@@ -492,7 +492,6 @@ static void avsar_release(struct device } static struct device avsar = { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) - .bus_id = "vlynq", -+#endif +- .bus_id = "vlynq", .release = avsar_release, }; -@@ -501,6 +504,9 @@ int shim_osLoadFWImage(unsigned char *pt +@@ -501,6 +500,8 @@ int shim_osLoadFWImage(unsigned char *pt const struct firmware *fw_entry; size_t size; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) + dev_set_name(&avsar, "avsar"); -+#endif ++ printk("requesting firmware image \"ar0700xx.bin\"\n"); if(device_register(&avsar) < 0) { printk(KERN_ERR diff --git a/package/kernel/ar7-atm/patches-D7.05.01.00/180-git_headers_include.patch b/package/kernel/ar7-atm/patches-D7.05.01.00/180-git_headers_include.patch index feb6ea8605ded8..69b433b2b9c0d5 100644 --- a/package/kernel/ar7-atm/patches-D7.05.01.00/180-git_headers_include.patch +++ b/package/kernel/ar7-atm/patches-D7.05.01.00/180-git_headers_include.patch @@ -1,54 +1,39 @@ --- a/tn7atm.c +++ b/tn7atm.c -@@ -76,10 +76,16 @@ - #include - #include +@@ -78,8 +78,8 @@ #include -+#include #include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) - #include - #include -+#else +-#include +-#include +#include +#include -+#endif #include "dsl_hal_api.h" #ifdef AR7_EFM --- a/tn7dsl.c +++ b/tn7dsl.c -@@ -120,8 +120,13 @@ - #include +@@ -119,8 +119,8 @@ + #include #include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) - #include - #include -+#else +-#include +-#include +#include +#include -+#endif /* Modules specific header files */ #ifdef AR7_EFM --- a/tn7sar.c +++ b/tn7sar.c -@@ -53,10 +53,16 @@ - #include - #include +@@ -55,8 +55,8 @@ #include -+#include #include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) - #include - #include -+#else +-#include +-#include +#include +#include -+#endif #define _CPHAL_AAL5 #define _CPHAL_SAR diff --git a/package/kernel/ar7-atm/patches-D7.05.01.00/190-2.6.32_proc_fixes.patch b/package/kernel/ar7-atm/patches-D7.05.01.00/190-2.6.32_proc_fixes.patch index 52ebbc1529522a..10d32d26180a8e 100644 --- a/package/kernel/ar7-atm/patches-D7.05.01.00/190-2.6.32_proc_fixes.patch +++ b/package/kernel/ar7-atm/patches-D7.05.01.00/190-2.6.32_proc_fixes.patch @@ -1,53 +1,70 @@ --- a/tn7dsl.c +++ b/tn7dsl.c -@@ -215,7 +215,11 @@ led_reg_t ledreg[2]; +@@ -209,7 +209,7 @@ led_reg_t ledreg[2]; static struct led_funcs ledreg[2]; #endif -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) - #define DEV_DSLMOD CTL_UNNUMBERED -+#else +-#define DEV_DSLMOD CTL_UNNUMBERED +#define DEV_DSLMOD 0 -+#endif #define MAX_STR_SIZE 256 #define DSL_MOD_SIZE 256 -@@ -3615,9 +3619,16 @@ static int dslmod_sysctl(ctl_table *ctl, +@@ -350,8 +350,8 @@ static void tn7dsl_chng_modulation(void* + static unsigned int tn7dsl_set_modulation(void* data, int flag); + static void tn7dsl_ctrl_fineGain(int value); + static void tn7dsl_set_fineGainValue(int value); +-static int dslmod_sysctl (ctl_table * ctl, int write, struct file *filp, +- void *buffer, size_t * lenp); ++static int dslmod_sysctl (ctl_table * ctl, int write, void *buffer, ++ size_t * lenp, loff_t *ppos); + static void tn7dsl_register_dslss_led(void); + void tn7dsl_dslmod_sysctl_register(void); + void tn7dsl_dslmod_sysctl_unregister(void); +@@ -3582,8 +3582,8 @@ unsigned int tn7dsl_get_memory(unsigned + + + +-static int dslmod_sysctl(ctl_table *ctl, int write, struct file * filp, +- void *buffer, size_t *lenp) ++static int dslmod_sysctl(ctl_table *ctl, int write, void *buffer, ++ size_t *lenp, loff_t *ppos) + { + char *ptr; + int ret, len = 0; +@@ -3595,7 +3595,7 @@ static int dslmod_sysctl(ctl_table *ctl, + char mod_req[16] = { '\t' }; + char fst_byt; + +- if (!*lenp || (filp->f_pos && !write)) ++ if (!*lenp || (*ppos && !write)) + { + *lenp = 0; + return 0; +@@ -3605,9 +3605,9 @@ static int dslmod_sysctl(ctl_table *ctl, */ if(write) { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) - ret = proc_dostring(ctl, write, filp, buffer, lenp, 0); -- -+#else -+ ret = proc_dostring(ctl, write, buffer, lenp, 0); -+#endif -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) - switch (ctl->ctl_name) -+#else +- ret = proc_dostring(ctl, write, filp, buffer, lenp, 0); ++ ret = proc_dostring(ctl, write, buffer, lenp, ppos); + +- switch (ctl->ctl_name) + switch ((long)ctl->extra2) -+#endif { case DEV_DSLMOD: ptr = strpbrk(info, " \t"); -@@ -3701,14 +3712,29 @@ static int dslmod_sysctl(ctl_table *ctl, +@@ -3691,14 +3691,21 @@ static int dslmod_sysctl(ctl_table *ctl, else { len += sprintf(info+len, mod_req); -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) - ret = proc_dostring(ctl, write, filp, buffer, lenp, 0); -+#else -+ ret = proc_dostring(ctl, write, buffer, lenp, 0); -+#endif +- ret = proc_dostring(ctl, write, filp, buffer, lenp, 0); ++ ret = proc_dostring(ctl, write, buffer, lenp, ppos); } return ret; } ctl_table dslmod_table[] = { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) - {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, NULL, &dslmod_sysctl, &sysctl_string} -+#else +- {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, NULL, &dslmod_sysctl, &sysctl_string} + { + .procname = "dslmod", + .data = info, @@ -56,24 +73,20 @@ + .proc_handler = &dslmod_sysctl, + .extra2 = (void *)DEV_DSLMOD, + } -+#endif , {0} }; -@@ -3716,7 +3742,16 @@ ctl_table dslmod_table[] = { +@@ -3706,7 +3713,12 @@ ctl_table dslmod_table[] = { /* Make sure that /proc/sys/dev is there */ ctl_table dslmod_root_table[] = { #ifdef CONFIG_PROC_FS -+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) - {CTL_DEV, "dev", NULL, 0, 0555, dslmod_table} -+ #else +- {CTL_DEV, "dev", NULL, 0, 0555, dslmod_table} + { + .procname = "dev", + .maxlen = 0, + .mode = 0555, + .child = dslmod_table, + } -+ #endif , #endif /* CONFIG_PROC_FS */ {0} diff --git a/package/kernel/ar7-atm/patches-D7.05.01.00/200-2.6.37_args.patch b/package/kernel/ar7-atm/patches-D7.05.01.00/200-2.6.37_args.patch index f6dba4be9fe939..75de5a33e7af02 100644 --- a/package/kernel/ar7-atm/patches-D7.05.01.00/200-2.6.37_args.patch +++ b/package/kernel/ar7-atm/patches-D7.05.01.00/200-2.6.37_args.patch @@ -1,28 +1,24 @@ --- a/tn7atm.c +++ b/tn7atm.c -@@ -2009,7 +2009,11 @@ static int __init tn7atm_register (Tn7At +@@ -2003,7 +2003,7 @@ static int __init tn7atm_register (Tn7At dgprintf (4, "device %s being registered\n", priv->name); -+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) - mydev = atm_dev_register (priv->proc_name, &tn7atm_ops, -1, NULL); -+ #else +- mydev = atm_dev_register (priv->proc_name, &tn7atm_ops, -1, NULL); + mydev = atm_dev_register (priv->proc_name, NULL, &tn7atm_ops, -1, NULL); -+ #endif if (mydev == NULL) { --- a/tn7dsl.c +++ b/tn7dsl.c -@@ -512,14 +512,17 @@ int shim_osLoadFWImage(unsigned char *pt +@@ -499,13 +499,16 @@ int shim_osLoadFWImage(unsigned char *pt { const struct firmware *fw_entry; size_t size; + int ret; - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) dev_set_name(&avsar, "avsar"); - #endif + printk("requesting firmware image \"ar0700xx.bin\"\n"); - if(device_register(&avsar) < 0) { + dev_set_name(&avsar, "avsar"); diff --git a/package/kernel/ar7-atm/patches-D7.05.01.00/220-3.10-update_proc_code.patch b/package/kernel/ar7-atm/patches-D7.05.01.00/220-3.10-update_proc_code.patch index 747869bf7cdebf..ef1ddd833cadd5 100644 --- a/package/kernel/ar7-atm/patches-D7.05.01.00/220-3.10-update_proc_code.patch +++ b/package/kernel/ar7-atm/patches-D7.05.01.00/220-3.10-update_proc_code.patch @@ -125,7 +125,7 @@ Signed-off-by: Jonas Gorski #endif __SGAPI_H --- a/tn7atm.c +++ b/tn7atm.c -@@ -265,11 +265,9 @@ MODULE_PARM_DESC(oam_lb_timeout, "OAM LB +@@ -259,11 +259,9 @@ MODULE_PARM_DESC(oam_lb_timeout, "OAM LB #ifdef AR7_EFM extern void tn7dsl_disable_alarm(void); @@ -140,7 +140,7 @@ Signed-off-by: Jonas Gorski extern unsigned int g_efm_proc_ctl; extern struct net_device *mydev_efm; extern Tn7AtmPrivate *mypriv; -@@ -305,31 +303,17 @@ extern int tn7efm_register (Tn7AtmPrivat +@@ -299,31 +297,17 @@ extern int tn7efm_register (Tn7AtmPrivat static int tn7atm_irq_request (struct atm_dev *dev); #endif @@ -177,15 +177,7 @@ Signed-off-by: Jonas Gorski //CT - Added function to return chipset Id void tn7atm_get_chipsetId (char *pVerId); -@@ -456,78 +440,83 @@ const char drv_proc_root_folder[] = "ava - static struct proc_dir_entry *root_proc_dir_entry = NULL; - #define DRV_PROC_MODE 0644 - static int proc_root_already_exists = TRUE; -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) -+#define PDE_DATA(inode) PDE(inode)->data -+#endif -+ +@@ -453,75 +437,75 @@ static int proc_root_already_exists = TR static struct { const unsigned char name[32]; @@ -301,7 +293,7 @@ Signed-off-by: Jonas Gorski }; /* *INDENT-ON* */ -@@ -1811,76 +1800,81 @@ int tn7atm_receive (void *os_dev, int ch +@@ -1805,76 +1789,81 @@ int tn7atm_receive (void *os_dev, int ch return 0; } @@ -353,15 +345,15 @@ Signed-off-by: Jonas Gorski - return len; + return 0; -+} -+ -+static int tn7atm_proc_channels_open(struct inode *inode, struct file *file) -+{ -+ return single_open(file, tn7atm_proc_channels, PDE_DATA(inode)); } -static int tn7atm_proc_private (char *buf, char **start, off_t offset, - int count, int *eof, void *data) ++static int tn7atm_proc_channels_open(struct inode *inode, struct file *file) ++{ ++ return single_open(file, tn7atm_proc_channels, PDE_DATA(inode)); ++} ++ +static struct file_operations tn7atm_proc_channels_fops = { + .owner = THIS_MODULE, + .open = tn7atm_proc_channels_open, @@ -426,7 +418,7 @@ Signed-off-by: Jonas Gorski void tn7atm_sarhal_isr_register (void *os_dev, void *hal_isr, int interrupt_num) { -@@ -2033,10 +2027,8 @@ static int __init tn7atm_register (Tn7At +@@ -2023,10 +2012,8 @@ static int __init tn7atm_register (Tn7At return ATM_REG_OK; } @@ -438,7 +430,7 @@ Signed-off-by: Jonas Gorski char dslVer[8]; char dspVer[10]; char chipsetID[32]; //CT CQ10076 - Added temporary buffer to store chipset Id -@@ -2051,58 +2043,52 @@ static int tn7atm_proc_version (char *bu +@@ -2041,58 +2028,52 @@ static int tn7atm_proc_version (char *bu priv = mydev->dev_data; #ifdef AR7_EFM @@ -517,7 +509,7 @@ Signed-off-by: Jonas Gorski pdspV1, pdspV2, (priv->curr_TC_mode== TC_MODE_ATM) ? '*' : ' '); tn7sar_get_EFM_firmware_version (&pdspV1, &pdspV2); -@@ -2114,26 +2100,37 @@ static int tn7atm_proc_version (char *bu +@@ -2104,26 +2085,37 @@ static int tn7atm_proc_version (char *bu #endif str = "EFM"; @@ -531,16 +523,16 @@ Signed-off-by: Jonas Gorski tn7atm_get_chipsetId(chipsetID); - len += sprintf (buf + len, "Chipset ID: [%s]\n",chipsetID); + seq_printf (m, "Chipset ID: [%s]\n",chipsetID); -+ -+ return 0; -+} - return len; ++ return 0; + } + +static int tn7atm_proc_version_open(struct inode *inode, struct file *file) +{ + return single_open(file, tn7atm_proc_version, PDE_DATA(inode)); - } - ++} ++ +static struct file_operations tn7atm_proc_version_fops = { + .owner = THIS_MODULE, + .open = tn7atm_proc_version_open, @@ -560,7 +552,7 @@ Signed-off-by: Jonas Gorski int ctr; const char *residual; -@@ -2214,24 +2211,7 @@ static int __init tn7atm_detect (void) +@@ -2204,24 +2196,7 @@ static int __init tn7atm_detect (void) */ for (ctr = 0; ctr < (NUM_ELEMS (proc_if)); ctr++) { @@ -586,7 +578,7 @@ Signed-off-by: Jonas Gorski } tn7dsl_dslmod_sysctl_register (); -@@ -2711,73 +2691,18 @@ static int tn7atm_set_can_support_adsl2 +@@ -2701,73 +2676,18 @@ static int tn7atm_set_can_support_adsl2 return TRUE; } @@ -599,10 +591,10 @@ Signed-off-by: Jonas Gorski +static int tn7atm_proc_qos_read(struct seq_file *m, void *data) { - if (!de || !de->low_ino) +- return 0; +- if (de->namelen != len) + seq_printf (m, "\nEnableQoS = %d\n", EnableQoS); return 0; -- if (de->namelen != len) -- return 0; - return !strncmp (name, de->name, len); -} - @@ -665,7 +657,7 @@ Signed-off-by: Jonas Gorski } static int tn7atm_proc_qos_write(struct file *fp, const char *buf, unsigned long count, void *data) -@@ -2812,7 +2737,7 @@ static int tn7atm_proc_qos_write(struct +@@ -2802,7 +2722,7 @@ static int tn7atm_proc_qos_write(struct } // [KT] @@ -674,7 +666,7 @@ Signed-off-by: Jonas Gorski { char local_buf[10]; -@@ -2843,5 +2768,33 @@ int tn7atm_proc_turbodsl_write(struct fi +@@ -2833,5 +2753,33 @@ int tn7atm_proc_turbodsl_write(struct fi return count; } @@ -710,17 +702,7 @@ Signed-off-by: Jonas Gorski module_exit (tn7atm_exit); --- a/tn7dsl.c +++ b/tn7dsl.c -@@ -233,6 +233,9 @@ static struct led_funcs ledreg[2]; - - #define tn7dsl_kfree_skb(x) dev_kfree_skb(x) - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) -+#define PDE_DATA(inode) PDE(inode)->data -+#endif - - //--------------------------------------------- - // Begin Clear EOC definitions -@@ -366,7 +369,7 @@ static void tn7dsl_register_dslss_led(vo +@@ -356,7 +356,7 @@ static void tn7dsl_register_dslss_led(vo void tn7dsl_dslmod_sysctl_register(void); void tn7dsl_dslmod_sysctl_unregister(void); static int tn7dsl_clear_eoc_receive(void); @@ -729,7 +711,7 @@ Signed-off-by: Jonas Gorski /* end of internal functions */ // UR8_MERGE_START CQ11054 Jack Zhang -@@ -698,11 +701,9 @@ void shim_osCriticalExit(void) +@@ -684,11 +684,9 @@ void shim_osCriticalExit(void) spin_unlock_irqrestore(&shimLock, flags); } @@ -742,7 +724,7 @@ Signed-off-by: Jonas Gorski int i, j; int bin = (int) data; unsigned short *rxSnrPerBin; -@@ -723,95 +724,128 @@ static int tn7dsl_proc_snr_print (char * +@@ -709,95 +707,128 @@ static int tn7dsl_proc_snr_print (char * break; default: @@ -915,7 +897,7 @@ Signed-off-by: Jonas Gorski #ifndef NO_ACT int tn7dsl_proc_ds_noise(char* buf, char **start, off_t offset, int count, int *eof, void *data) -@@ -874,59 +908,48 @@ static char *pUnknown= "Unknown"; +@@ -860,59 +891,48 @@ static char *pUnknown= "Unknown"; #ifdef ADV_DIAG_STATS //CQ10275, CQ10449 //UR8_MERGE_START CQ10449 Jack Zhang @@ -975,15 +957,15 @@ Signed-off-by: Jonas Gorski printk("proc_adv_stats - return: ctr=%d, len=%d\n", ctr, len); - return len; + return 0; - } - --static int proc_adv_stats_header(char* buf, int limit) ++} ++ + +static int tn7dsl_proc_adv_stats_open(struct inode *inode, struct file *file) +{ + return single_open(file, tn7dsl_proc_adv_stats, PDE_DATA(inode)); -+} -+ + } + +-static int proc_adv_stats_header(char* buf, int limit) +struct file_operations tn7dsl_proc_adv_stats_fops = { + .owner = THIS_MODULE, + .open = tn7dsl_proc_adv_stats_open, @@ -996,7 +978,7 @@ Signed-off-by: Jonas Gorski { int len = 0; int i = 0; -@@ -935,66 +958,53 @@ static int proc_adv_stats_header(char* b +@@ -921,66 +941,53 @@ static int proc_adv_stats_header(char* b */ dslhal_api_gatherStatistics(pIhw); @@ -1084,7 +1066,7 @@ Signed-off-by: Jonas Gorski } static int getDiagDisplayMode() -@@ -1017,29 +1027,24 @@ static int getDiagDisplayMode() +@@ -1003,29 +1010,24 @@ static int getDiagDisplayMode() ret = 2; return ret; } @@ -1118,7 +1100,7 @@ Signed-off-by: Jonas Gorski (unsigned int)pIhw->AppData.BitAllocTblDstrm[i], (unsigned int)pIhw->AppData.marginTblDstrm[i], (int)pIhw->AppData.rxSnrPerBin0[i]); -@@ -1050,26 +1055,34 @@ int tn7dsl_proc_adv_stats1(char* buf, ch +@@ -1036,26 +1038,34 @@ int tn7dsl_proc_adv_stats1(char* buf, ch if (dslhal_api_getSNRpsds(pIhw, SNRpsds, 1)) { dgprintf(4, "dslhal_api_getSNRpsds failed!\n"); @@ -1161,7 +1143,7 @@ Signed-off-by: Jonas Gorski int i; int mode = 0; //mode = 0 => ADSL1 or ADSL2 & 2+ unsigned char SNRpsds[512]; -@@ -1079,12 +1092,10 @@ int tn7dsl_proc_adv_stats2(char* buf, ch +@@ -1065,12 +1075,10 @@ int tn7dsl_proc_adv_stats2(char* buf, ch if( mode==1) //ADSL1 { dslhal_api_gatherStatistics(pIhw); @@ -1176,7 +1158,7 @@ Signed-off-by: Jonas Gorski (unsigned int)pIhw->AppData.BitAllocTblDstrm[i], (unsigned int)pIhw->AppData.marginTblDstrm[i], (int)pIhw->AppData.rxSnrPerBin0[i]); -@@ -1095,26 +1106,35 @@ int tn7dsl_proc_adv_stats2(char* buf, ch +@@ -1081,26 +1089,35 @@ int tn7dsl_proc_adv_stats2(char* buf, ch if (dslhal_api_getSNRpsds(pIhw, SNRpsds, 1)) { dgprintf(4, "dslhal_api_getSNRpsds failed!\n"); @@ -1220,7 +1202,7 @@ Signed-off-by: Jonas Gorski int i; int mode = 0; //mode = 0 => ADSL1 or ADSL2 & 2+ unsigned char SNRpsds[512]; -@@ -1124,12 +1144,10 @@ int tn7dsl_proc_adv_stats3(char* buf, ch +@@ -1110,12 +1127,10 @@ int tn7dsl_proc_adv_stats3(char* buf, ch if( mode==1) //ADSL1 { dslhal_api_gatherStatistics(pIhw); @@ -1235,7 +1217,7 @@ Signed-off-by: Jonas Gorski (unsigned int)pIhw->AppData.BitAllocTblDstrm[i], (unsigned int)pIhw->AppData.marginTblDstrm[i], (int)pIhw->AppData.rxSnrPerBin0[i]); -@@ -1140,283 +1158,287 @@ int tn7dsl_proc_adv_stats3(char* buf, ch +@@ -1126,283 +1141,287 @@ int tn7dsl_proc_adv_stats3(char* buf, ch if (dslhal_api_getSNRpsds(pIhw, SNRpsds, 1)) { dgprintf(4, "dslhal_api_getSNRpsds failed!\n"); @@ -1455,9 +1437,7 @@ Signed-off-by: Jonas Gorski { + return single_open(file, tn7dsl_proc_dbg_rmsgs1, PDE_DATA(inode)); +} - -- int len = 0; -- int limit = count - 80; ++ +struct file_operations tn7dsl_proc_dbg_rmsgs1_fops = { + .owner = THIS_MODULE, + .open = tn7dsl_proc_dbg_rmsgs1_open, @@ -1465,7 +1445,9 @@ Signed-off-by: Jonas Gorski + .llseek = seq_lseek, + .release = single_release, +}; -+ + +- int len = 0; +- int limit = count - 80; + +int tn7dsl_proc_dbg_rmsgs2(struct seq_file *m, void *data) +{ @@ -1636,12 +1618,12 @@ Signed-off-by: Jonas Gorski - return len; + return 0; - } ++} + +static int tn7dsl_proc_dbg_rmsgs4_open(struct inode *inode, struct file *file) +{ + return single_open(file, tn7dsl_proc_dbg_rmsgs4, PDE_DATA(inode)); -+} + } + +struct file_operations tn7dsl_proc_dbg_rmsgs4_fops = { + .owner = THIS_MODULE, @@ -1664,7 +1646,7 @@ Signed-off-by: Jonas Gorski int F4count, F5count; unsigned int maxRate=0; unsigned int us_maxRate=0; -@@ -1424,80 +1446,58 @@ int tn7dsl_proc_stats(char* buf, char ** +@@ -1410,80 +1429,58 @@ int tn7dsl_proc_stats(char* buf, char ** //UR8_MERGE_START CQ10700 Manjula K struct atm_dev *dev; Tn7AtmPrivate *priv; @@ -1768,7 +1750,7 @@ Signed-off-by: Jonas Gorski ((unsigned int) pIhw->AppData.usAtm_count[0] + (unsigned int) pIhw->AppData.usAtm_count[1]) * 48, ((unsigned int) pIhw->AppData.dsGood_count[0] + -@@ -1505,9 +1505,7 @@ int tn7dsl_proc_stats(char* buf, char ** +@@ -1491,9 +1488,7 @@ int tn7dsl_proc_stats(char* buf, char ** /* * Superframe Count */ @@ -1779,7 +1761,7 @@ Signed-off-by: Jonas Gorski "\tUS Superframe Cnt :\t%u\tDS Superframe Cnt:\t%u\n", (unsigned int)pIhw->AppData.usSuperFrmCnt, (unsigned int)pIhw->AppData.dsSuperFrmCnt ); -@@ -1515,59 +1513,45 @@ int tn7dsl_proc_stats(char* buf, char ** +@@ -1501,59 +1496,45 @@ int tn7dsl_proc_stats(char* buf, char ** /* * US and DS power */ @@ -1851,7 +1833,7 @@ Signed-off-by: Jonas Gorski (unsigned int)pIhw->AppData.currentHybridNum, trellis); //@Added Maximum attainable bit rate information. 05-14-2004 -@@ -1581,12 +1565,12 @@ int tn7dsl_proc_stats(char* buf, char ** +@@ -1567,12 +1548,12 @@ int tn7dsl_proc_stats(char* buf, char ** } else { @@ -1866,7 +1848,7 @@ Signed-off-by: Jonas Gorski (unsigned char *) &rMsgsRA[0], 12); maxRate = (unsigned int)pIhw->AppData.DSConRate; -@@ -1602,294 +1586,223 @@ int tn7dsl_proc_stats(char* buf, char ** +@@ -1588,294 +1569,223 @@ int tn7dsl_proc_stats(char* buf, char ** } } @@ -2259,7 +2241,7 @@ Signed-off-by: Jonas Gorski char *state; int tag; -@@ -1923,22 +1836,31 @@ extern int tn7efm_get_currTCmode(void); +@@ -1909,22 +1819,31 @@ extern int tn7efm_get_currTCmode(void); if(pIhw->lConnected == 1) state = "SHOWTIME"; @@ -2301,7 +2283,7 @@ Signed-off-by: Jonas Gorski /********************************************************************** ** * ** tn7dsl_hdlc_update_crc() -- Calculate CRC * -@@ -2203,11 +2125,8 @@ static int tn7dsl_hdlc_rx_process(unsign +@@ -2189,11 +2108,8 @@ static int tn7dsl_hdlc_rx_process(unsign return(ret); } @@ -2314,7 +2296,7 @@ Signed-off-by: Jonas Gorski int offset[2] = {34, 0}; // point to buffer parameter data structure clearEocParm_t peoc; -@@ -2216,62 +2135,49 @@ int tn7dsl_proc_eoc (char *buf, char **s +@@ -2202,62 +2118,49 @@ int tn7dsl_proc_eoc (char *buf, char **s (unsigned char *) &peoc, sizeof (clearEocParm_t)); @@ -2417,7 +2399,7 @@ Signed-off-by: Jonas Gorski int tn7dsl_clear_eoc_setup(void) { int i; -@@ -4624,14 +4530,10 @@ int tn7dsl_proc_write_stats (struct file +@@ -4591,14 +4494,10 @@ int tn7dsl_proc_write_stats (struct file } @@ -2433,13 +2415,12 @@ Signed-off-by: Jonas Gorski typedef struct { -@@ -4712,197 +4614,185 @@ int tn7dsl_proc_train_mode_export (char +@@ -4679,197 +4578,185 @@ int tn7dsl_proc_train_mode_export (char } - if(len <= count) -+ for (i = 0; (i < num_entries) ; i++) - { +- { - for (i = ctr; ((i < num_entries)&& (len <= count)) ; i++) - { - /* @@ -2453,21 +2434,22 @@ Signed-off-by: Jonas Gorski - else - break; - } -+ seq_printf(m, "%s\t\t\t%#x\n", -+ dsl_modes[i].mode_name, dsl_modes[i].mode_value); - } - +- } +- - /* - * Data was completely written - */ - if (i >= num_entries) -- { ++ for (i = 0; (i < num_entries) ; i++) + { - /* - * We are done with this - */ - *eof = 1; - ctr = 0; -- } ++ seq_printf(m, "%s\t\t\t%#x\n", ++ dsl_modes[i].mode_name, dsl_modes[i].mode_value); + } - else - { - /* @@ -2475,7 +2457,7 @@ Signed-off-by: Jonas Gorski - * terminate the buffer. - */ - *(cp + len) = '\0'; -- + - /* - * Save the value of the counter for the next read for the rest of the - * data. @@ -2712,7 +2694,7 @@ Signed-off-by: Jonas Gorski } start = (indx -1) * 128; -@@ -4911,39 +4801,89 @@ static int tn7dsl_proc_HLINpsdsIndx(char +@@ -4878,39 +4765,89 @@ static int tn7dsl_proc_HLINpsdsIndx(char { if (!(i%8)) { @@ -2817,7 +2799,7 @@ Signed-off-by: Jonas Gorski #endif #endif //TR69_HLIN_IN // UR8_MERGE_END CQ10979* -@@ -4951,64 +4891,48 @@ int tn7dsl_proc_HLINpsds4(char* buf, cha +@@ -4918,64 +4855,48 @@ int tn7dsl_proc_HLINpsds4(char* buf, cha // * UR8_MERGE_START CQ11057 Jack Zhang #ifdef TR69_PMD_IN #ifndef NO_ADV_STATS @@ -2897,7 +2879,7 @@ Signed-off-by: Jonas Gorski } -@@ -5016,19 +4940,28 @@ int tn7dsl_proc_PMDus(char* buf, char ** +@@ -4983,19 +4904,28 @@ int tn7dsl_proc_PMDus(char* buf, char ** for (i=0; iAppData.max_us_tones; i++) { if (!(i%16)) @@ -2937,15 +2919,11 @@ Signed-off-by: Jonas Gorski // * UR8_MERGE_END CQ11057 * --- a/tn7sar.c +++ b/tn7sar.c -@@ -1553,44 +1553,70 @@ int tn7sar_oam_generation(void *privCont +@@ -1547,44 +1547,66 @@ int tn7sar_oam_generation(void *privCont return 0; } -int tn7sar_proc_oam_ping(char* buf, char **start, off_t offset, int count,int *eof, void *data) -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) -+#define PDE_DATA(inode) PDE(inode)->data -+#endif -+ +static int tn7sar_proc_oam_ping(struct seq_file *m, void *data) { - int len = 0; @@ -3020,7 +2998,7 @@ Signed-off-by: Jonas Gorski struct atm_dev *dev; Tn7AtmPrivate *priv; int i, j, k; -@@ -1599,21 +1625,19 @@ int tn7sar_proc_sar_stat(char* buf, char +@@ -1593,21 +1615,19 @@ int tn7sar_proc_sar_stat(char* buf, char unsigned int *pStateBase, *pSarStat; HAL_FUNCTIONS *pHalFunc; HAL_DEVICE *pHalDev; @@ -3045,7 +3023,7 @@ Signed-off-by: Jonas Gorski k=0; for(j=0;j<4;j++) { -@@ -1626,26 +1650,16 @@ int tn7sar_proc_sar_stat(char* buf, char +@@ -1620,26 +1640,18 @@ int tn7sar_proc_sar_stat(char* buf, char { if((char *)*pSarStat == NULL) break; @@ -3056,7 +3034,8 @@ Signed-off-by: Jonas Gorski - k += dBytes; - } + -+ k += seq_printf(m, "%s: ",(char *) *pSarStat); ++ seq_printf(m, "%s: ",(char *) *pSarStat); ++ k += strlen((char *) *pSarStat) + strlen(": "); pSarStat++; - if(len<=limit) - { @@ -3064,7 +3043,8 @@ Signed-off-by: Jonas Gorski - len += dBytes; - k += dBytes; - } -+ k += seq_printf(m, "%s; \n",(char *) *pSarStat); ++ seq_printf(m, "%s; \n",(char *) *pSarStat); ++ k += strlen((char *) *pSarStat) + strlen("; \n"); pSarStat++; if(k > 60) @@ -3076,7 +3056,7 @@ Signed-off-by: Jonas Gorski } } -@@ -1654,9 +1668,22 @@ int tn7sar_proc_sar_stat(char* buf, char +@@ -1648,9 +1660,22 @@ int tn7sar_proc_sar_stat(char* buf, char } } diff --git a/package/kernel/ar7-atm/patches-D7.05.01.00/240-3.18_fixes.patch b/package/kernel/ar7-atm/patches-D7.05.01.00/240-3.18_fixes.patch index a29bae80a4254a..c95c876c546e4b 100644 --- a/package/kernel/ar7-atm/patches-D7.05.01.00/240-3.18_fixes.patch +++ b/package/kernel/ar7-atm/patches-D7.05.01.00/240-3.18_fixes.patch @@ -1,38 +1,38 @@ --- a/tn7dsl.c +++ b/tn7dsl.c -@@ -363,7 +363,7 @@ static void tn7dsl_chng_modulation(void* +@@ -350,7 +350,7 @@ static void tn7dsl_chng_modulation(void* static unsigned int tn7dsl_set_modulation(void* data, int flag); static void tn7dsl_ctrl_fineGain(int value); static void tn7dsl_set_fineGainValue(int value); --static int dslmod_sysctl (ctl_table * ctl, int write, struct file *filp, -+static int dslmod_sysctl (struct ctl_table * ctl, int write, struct file *filp, - void *buffer, size_t * lenp); +-static int dslmod_sysctl (ctl_table * ctl, int write, void *buffer, ++static int dslmod_sysctl (struct ctl_table * ctl, int write, void *buffer, + size_t * lenp, loff_t *ppos); static void tn7dsl_register_dslss_led(void); void tn7dsl_dslmod_sysctl_register(void); -@@ -3505,7 +3505,7 @@ unsigned int tn7dsl_get_memory(unsigned +@@ -3488,7 +3488,7 @@ unsigned int tn7dsl_get_memory(unsigned --static int dslmod_sysctl(ctl_table *ctl, int write, struct file * filp, -+static int dslmod_sysctl(struct ctl_table *ctl, int write, struct file * filp, - void *buffer, size_t *lenp) +-static int dslmod_sysctl(ctl_table *ctl, int write, void *buffer, ++static int dslmod_sysctl(struct ctl_table *ctl, int write, void *buffer, + size_t *lenp, loff_t *ppos) { char *ptr; -@@ -3631,7 +3631,7 @@ static int dslmod_sysctl(ctl_table *ctl, +@@ -3603,7 +3603,7 @@ static int dslmod_sysctl(ctl_table *ctl, } -ctl_table dslmod_table[] = { +struct ctl_table dslmod_table[] = { - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) - {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, NULL, &dslmod_sysctl, &sysctl_string} - #else -@@ -3649,7 +3649,7 @@ ctl_table dslmod_table[] = { + { + .procname = "dslmod", + .data = info, +@@ -3617,7 +3617,7 @@ ctl_table dslmod_table[] = { }; /* Make sure that /proc/sys/dev is there */ -ctl_table dslmod_root_table[] = { +struct ctl_table dslmod_root_table[] = { #ifdef CONFIG_PROC_FS - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) - {CTL_DEV, "dev", NULL, 0, 0555, dslmod_table} + { + .procname = "dev", diff --git a/package/kernel/ar7-atm/patches-D7.05.01.00/250-4.1_fixes.patch b/package/kernel/ar7-atm/patches-D7.05.01.00/250-4.1_fixes.patch index bc913a78a8d13f..426d593191ce25 100644 --- a/package/kernel/ar7-atm/patches-D7.05.01.00/250-4.1_fixes.patch +++ b/package/kernel/ar7-atm/patches-D7.05.01.00/250-4.1_fixes.patch @@ -1,6 +1,6 @@ --- a/tn7atm.c +++ b/tn7atm.c -@@ -856,7 +856,7 @@ static int __init tn7atm_irq_request (st +@@ -845,7 +845,7 @@ static int __init tn7atm_irq_request (st priv->sar_irq = LNXINTNUM (ATM_SAR_INT); /* Interrupt line # */ @@ -9,7 +9,7 @@ printk ("Could not register tn7atm_sar_irq\n"); /* -@@ -880,7 +880,7 @@ static int __init tn7atm_irq_request (st +@@ -869,7 +869,7 @@ static int __init tn7atm_irq_request (st * Reigster Receive interrupt A */ priv->dsl_irq = LNXINTNUM (ATM_DSL_INT); /* Interrupt line # */ diff --git a/package/kernel/ar7-atm/patches-D7.05.01.00/260-fix_function_signatures.patch b/package/kernel/ar7-atm/patches-D7.05.01.00/260-fix_function_signatures.patch new file mode 100644 index 00000000000000..61a1ff7c838a72 --- /dev/null +++ b/package/kernel/ar7-atm/patches-D7.05.01.00/260-fix_function_signatures.patch @@ -0,0 +1,63 @@ +--- a/cpswhal_cpsar.h ++++ b/cpswhal_cpsar.h +@@ -437,10 +437,10 @@ typedef struct + int (*DeviceFindInfo)(int Inst, const char *DeviceName, void *DeviceInfo); + int (*DeviceFindParmUint)(void *DeviceInfo, const char *Parm, bit32u *Value); + int (*DeviceFindParmValue)(void *DeviceInfo, const char *Parm, void *Value); +- void (*Free)(void *MemPtr); ++ void (*Free)(const void *MemPtr); + void (*FreeRxBuffer)(OS_RECEIVEINFO *OsReceiveInfo, void *MemPtr); +- void (*FreeDev)(void *MemPtr); +- void (*FreeDmaXfer)(void *MemPtr); ++ void (*FreeDev)(const void *MemPtr); ++ void (*FreeDmaXfer)(const void *MemPtr); + void (*IsrRegister)(OS_DEVICE *OsDev, int (*halISR)(HAL_DEVICE*, int*), int InterruptBit); + void (*IsrUnRegister)(OS_DEVICE *OsDev, int InterruptBit); + void* (*Malloc)(bit32u size); +--- a/cpswhal_cpaal5.h ++++ b/cpswhal_cpaal5.h +@@ -436,10 +436,10 @@ typedef struct + int (*DeviceFindInfo)(int Inst, const char *DeviceName, void *DeviceInfo); + int (*DeviceFindParmUint)(void *DeviceInfo, const char *Parm, bit32u *Value); + int (*DeviceFindParmValue)(void *DeviceInfo, const char *Parm, void *Value); +- void (*Free)(void *MemPtr); ++ void (*Free)(const void *MemPtr); + void (*FreeRxBuffer)(OS_RECEIVEINFO *OsReceiveInfo, void *MemPtr); +- void (*FreeDev)(void *MemPtr); +- void (*FreeDmaXfer)(void *MemPtr); ++ void (*FreeDev)(const void *MemPtr); ++ void (*FreeDmaXfer)(const void *MemPtr); + void (*IsrRegister)(OS_DEVICE *OsDev, int (*halISR)(HAL_DEVICE*, int*), int InterruptBit); + void (*IsrUnRegister)(OS_DEVICE *OsDev, int InterruptBit); + void* (*Malloc)(bit32u size); +--- a/tn7atm.c ++++ b/tn7atm.c +@@ -2690,7 +2690,7 @@ static int tn7atm_proc_turbodsl_read(str + return 0; + } + +-static int tn7atm_proc_qos_write(struct file *fp, const char *buf, unsigned long count, void *data) ++static int tn7atm_proc_qos_write(struct file *fp, const char *buf, size_t count, loff_t *data) + { + char local_buf[32]; + +--- a/tn7dsl.c ++++ b/tn7dsl.c +@@ -1770,7 +1770,7 @@ static int tn7dsl_proc_stats_open(struct + return single_open(file, tn7dsl_proc_stats, PDE_DATA(inode)); + } + +-int tn7dsl_proc_write_stats(struct file *fp, const char * buf, unsigned long count, void * data); ++int tn7dsl_proc_write_stats(struct file *fp, const char * buf, size_t count, loff_t * data); + + struct file_operations tn7dsl_proc_stats_fops = { + .owner = THIS_MODULE, +@@ -4436,7 +4436,7 @@ int tn7dsl_generic_write( int offsetnum, + } + + int tn7dsl_proc_write_stats (struct file *fp, const char *buf, +- unsigned long count, void *data) ++ size_t count, loff_t *data) + { + char local_buf[31]; + int ret_val = 0; diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile index a894773b73e432..82d7664b76e1fd 100644 --- a/package/kernel/ath10k-ct/Makefile +++ b/package/kernel/ath10k-ct/Makefile @@ -14,6 +14,7 @@ PKG_MIRROR_HASH:=616174650e12a82edb6b6bd18ac186e2c6a48fdad0082df9d2011ab20940814 PKG_MAINTAINER:=Ben Greear PKG_BUILD_PARALLEL:=1 +PKG_EXTMOD_SUBDIRS:=ath10k # Build the 4.13 ath10k-ct driver version. Other options are "-4.9", or # leave un-defined for 4.7 kernel. Probably this should match as closely as @@ -32,7 +33,7 @@ define KernelPackage/ath10k-ct FILES:=\ $(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_pci.ko \ $(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_core.ko - AUTOLOAD:=$(call AutoLoad,50,mac80211 ath ath10k_core ath10k_pci) + AUTOLOAD:=$(call AutoProbe,ath10k_pci) endef NOSTDINC_FLAGS = \ @@ -78,8 +79,7 @@ endif define Build/Compile +$(MAKE) $(CT_MAKEDEFS) $(PKG_JOBS) -C "$(LINUX_DIR)" \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ + $(KERNEL_MAKE_FLAGS) \ SUBDIRS="$(PKG_BUILD_DIR)/ath10k$(CT_KVER)" \ NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \ modules diff --git a/package/kernel/avila-wdt/Makefile b/package/kernel/avila-wdt/Makefile index 94bda9b8d5aab0..a91c93374c1e57 100644 --- a/package/kernel/avila-wdt/Makefile +++ b/package/kernel/avila-wdt/Makefile @@ -22,8 +22,7 @@ define KernelPackage/avila-wdt endef MAKE_OPTS:= \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ + $(KERNEL_MAKE_FLAGS) \ SUBDIRS="$(PKG_BUILD_DIR)" define Build/Compile diff --git a/package/kernel/broadcom-wl/Makefile b/package/kernel/broadcom-wl/Makefile index 2f3a0c5dc1e851..d1d060451900d4 100644 --- a/package/kernel/broadcom-wl/Makefile +++ b/package/kernel/broadcom-wl/Makefile @@ -22,6 +22,8 @@ ifeq ($(ARCH),mips) PKG_HASH:=ca6a86ca3e3e9c85b6dbb665b35bcbf338c37829c1b2f1994487d55664886045 endif +PKG_EXTMOD_SUBDIRS:=driver driver-mini glue + PKG_USE_MIPS16:=0 PKG_FLAGS:=nonshared @@ -41,7 +43,7 @@ define KernelPackage/brcm-wl/Default DEPENDS:=@TARGET_brcm47xx||TARGET_brcm63xx +wireless-tools TITLE:=Kernel driver for BCM43xx chipsets FILES:=$(PKG_BUILD_DIR)/driver$(1)/wl.ko $(PKG_BUILD_DIR)/glue/wl_glue.ko - AUTOLOAD:=$(call AutoLoad,30,wl_glue wl) + AUTOLOAD:=$(call AutoProbe,wl) endef define KernelPackage/brcm-wl/Default/description @@ -98,8 +100,7 @@ define Package/nas/description endef MAKE_KMOD := $(MAKE) -C "$(LINUX_DIR)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - ARCH="$(LINUX_KARCH)" \ + $(KERNEL_MAKE_FLAGS) \ PATH="$(TARGET_PATH)" \ SUBDIRS="$(PKG_BUILD_DIR)/kmod" \ @@ -110,23 +111,25 @@ define Build/Prepare endef define Build/Compile + # Compile glue driver + $(MAKE_KMOD) -C "$(LINUX_DIR)" \ + SUBDIRS="$(PKG_BUILD_DIR)/glue" \ + modules + # Compile the kernel part $(MAKE_KMOD) \ SUBDIRS="$(PKG_BUILD_DIR)/driver" \ MODFLAGS="-DMODULE -mlong-calls" \ + KBUILD_EXTRA_SYMBOLS="$(PKG_BUILD_DIR)/glue/Module.symvers" \ modules $(MAKE_KMOD) \ SUBDIRS="$(PKG_BUILD_DIR)/driver-mini" \ MODFLAGS="-DMODULE -mlong-calls" \ BUILD_TYPE="wl_apsta_mini" \ + KBUILD_EXTRA_SYMBOLS="$(PKG_BUILD_DIR)/glue/Module.symvers" \ modules - # Compile glue driver - $(MAKE_KMOD) -C "$(LINUX_DIR)" \ - SUBDIRS="$(PKG_BUILD_DIR)/glue" \ - modules - # Compile libshared $(MAKE) -C $(PKG_BUILD_DIR)/shared \ $(TARGET_CONFIGURE_OPTS) \ diff --git a/package/kernel/button-hotplug/Makefile b/package/kernel/button-hotplug/Makefile index 7b6aacfbf9be1a..2554ae61dd94d6 100644 --- a/package/kernel/button-hotplug/Makefile +++ b/package/kernel/button-hotplug/Makefile @@ -36,8 +36,7 @@ EXTRA_CFLAGS:= \ $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \ MAKE_OPTS:= \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ + $(KERNEL_MAKE_FLAGS) \ SUBDIRS="$(PKG_BUILD_DIR)" \ EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ $(EXTRA_KCONFIG) diff --git a/package/kernel/dtc/patches/0001-scripts-dtc-Update-to-version-with-overlays.patch b/package/kernel/dtc/patches/0001-scripts-dtc-Update-to-version-with-overlays.patch new file mode 100644 index 00000000000000..605d303c47a41f --- /dev/null +++ b/package/kernel/dtc/patches/0001-scripts-dtc-Update-to-version-with-overlays.patch @@ -0,0 +1,642 @@ +From 5f84cb93eef9f8a8ff7f49d593893f252744d0fe Mon Sep 17 00:00:00 2001 +From: Pantelis Antoniou +Date: Wed, 26 Aug 2015 18:28:08 +0300 +Subject: [PATCH] scripts/dtc: Update to version with overlays + +Update to mainline dtc with overlay support + +Signed-off-by: Pantelis Antoniou +--- + checks.c | 20 +++++- + dtc-lexer.l | 5 ++ + dtc-parser.y | 54 ++++++++++++++-- + dtc.c | 83 ++++++++++++++++++++++-- + dtc.h | 13 +++- + livetree.c | 202 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + treesource.c | 3 + + util.c | 2 +- + 8 files changed, 367 insertions(+), 15 deletions(-) + +diff --git a/checks.c b/checks.c +index 3bf0fa4..af25c2b 100644 +--- a/checks.c ++++ b/checks.c +@@ -465,8 +465,12 @@ static void fixup_phandle_references(struct check *c, struct node *dt, + + refnode = get_node_by_ref(dt, m->ref); + if (! refnode) { +- FAIL(c, "Reference to non-existent node or label \"%s\"\n", +- m->ref); ++ if (!source_is_plugin) ++ FAIL(c, "Reference to non-existent node or " ++ "label \"%s\"\n", m->ref); ++ else /* mark the entry as unresolved */ ++ *((cell_t *)(prop->val.val + m->offset)) = ++ cpu_to_fdt32(0xffffffff); + continue; + } + +@@ -559,7 +563,7 @@ static void check_reg_format(struct check *c, struct node *dt, + size_cells = node_size_cells(node->parent); + entrylen = (addr_cells + size_cells) * sizeof(cell_t); + +- if ((prop->val.len % entrylen) != 0) ++ if (!entrylen || (prop->val.len % entrylen) != 0) + FAIL(c, "\"reg\" property in %s has invalid length (%d bytes) " + "(#address-cells == %d, #size-cells == %d)", + node->fullpath, prop->val.len, addr_cells, size_cells); +@@ -651,6 +655,15 @@ static void check_obsolete_chosen_interrupt_controller(struct check *c, + } + TREE_WARNING(obsolete_chosen_interrupt_controller, NULL); + ++static void check_deprecated_plugin_syntax(struct check *c, ++ struct node *dt) ++{ ++ if (deprecated_plugin_syntax_warning) ++ FAIL(c, "Use '/dts-v1/ /plugin/'; syntax. /dts-v1/; /plugin/; " ++ "is going to be removed in next versions"); ++} ++TREE_WARNING(deprecated_plugin_syntax, NULL); ++ + static struct check *check_table[] = { + &duplicate_node_names, &duplicate_property_names, + &node_name_chars, &node_name_format, &property_name_chars, +@@ -668,6 +681,7 @@ static struct check *check_table[] = { + + &avoid_default_addr_size, + &obsolete_chosen_interrupt_controller, ++ &deprecated_plugin_syntax, + + &always_fail, + }; +diff --git a/dtc-lexer.l b/dtc-lexer.l +index 0ee1caf..dd44ba2 100644 +--- a/dtc-lexer.l ++++ b/dtc-lexer.l +@@ -113,6 +113,11 @@ static void lexical_error(const char *fmt, ...); + return DT_V1; + } + ++<*>"/plugin/" { ++ DPRINT("Keyword: /plugin/\n"); ++ return DT_PLUGIN; ++ } ++ + <*>"/memreserve/" { + DPRINT("Keyword: /memreserve/\n"); + BEGIN_DEFAULT(); +diff --git a/dtc-parser.y b/dtc-parser.y +index ea57e0a..7d9652d 100644 +--- a/dtc-parser.y ++++ b/dtc-parser.y +@@ -19,6 +19,7 @@ + */ + %{ + #include ++#include + + #include "dtc.h" + #include "srcpos.h" +@@ -52,9 +53,11 @@ extern bool treesource_error; + struct node *nodelist; + struct reserve_info *re; + uint64_t integer; ++ bool is_plugin; + } + + %token DT_V1 ++%token DT_PLUGIN + %token DT_MEMRESERVE + %token DT_LSHIFT DT_RSHIFT DT_LE DT_GE DT_EQ DT_NE DT_AND DT_OR + %token DT_BITS +@@ -71,6 +74,7 @@ extern bool treesource_error; + + %type propdata + %type propdataprefix ++%type plugindecl + %type memreserve + %type memreserves + %type arrayprefix +@@ -101,10 +105,39 @@ extern bool treesource_error; + %% + + sourcefile: +- DT_V1 ';' memreserves devicetree ++ basesource ++ | pluginsource ++ ; ++ ++basesource: ++ DT_V1 ';' plugindecl memreserves devicetree ++ { ++ source_is_plugin = $3; ++ if (source_is_plugin) ++ deprecated_plugin_syntax_warning = true; ++ the_boot_info = build_boot_info($4, $5, ++ guess_boot_cpuid($5)); ++ } ++ ; ++ ++plugindecl: ++ /* empty */ ++ { ++ $$ = false; ++ } ++ | DT_PLUGIN ';' ++ { ++ $$ = true; ++ } ++ ; ++ ++pluginsource: ++ DT_V1 DT_PLUGIN ';' memreserves devicetree + { +- the_boot_info = build_boot_info($3, $4, +- guess_boot_cpuid($4)); ++ source_is_plugin = true; ++ deprecated_plugin_syntax_warning = false; ++ the_boot_info = build_boot_info($4, $5, ++ guess_boot_cpuid($5)); + } + ; + +@@ -144,10 +177,14 @@ devicetree: + { + struct node *target = get_node_by_ref($1, $2); + +- if (target) ++ if (target) { + merge_nodes(target, $3); +- else +- ERROR(&@2, "Label or path %s not found", $2); ++ } else { ++ if (symbol_fixup_support) ++ add_orphan_node($1, $3, $2); ++ else ++ ERROR(&@2, "Label or path %s not found", $2); ++ } + $$ = $1; + } + | devicetree DT_DEL_NODE DT_REF ';' +@@ -162,6 +199,11 @@ devicetree: + + $$ = $1; + } ++ | /* empty */ ++ { ++ /* build empty node */ ++ $$ = name_node(build_node(NULL, NULL), ""); ++ } + ; + + nodedef: +diff --git a/dtc.c b/dtc.c +index 8c4add6..ee37be9 100644 +--- a/dtc.c ++++ b/dtc.c +@@ -18,6 +18,8 @@ + * USA + */ + ++#include ++ + #include "dtc.h" + #include "srcpos.h" + +@@ -29,6 +31,8 @@ int reservenum; /* Number of memory reservation slots */ + int minsize; /* Minimum blob size */ + int padsize; /* Additional padding to blob */ + int phandle_format = PHANDLE_BOTH; /* Use linux,phandle or phandle properties */ ++int symbol_fixup_support; ++int auto_label_aliases; + + static void fill_fullpaths(struct node *tree, const char *prefix) + { +@@ -51,7 +55,7 @@ static void fill_fullpaths(struct node *tree, const char *prefix) + #define FDT_VERSION(version) _FDT_VERSION(version) + #define _FDT_VERSION(version) #version + static const char usage_synopsis[] = "dtc [options] "; +-static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv"; ++static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:@Ahv"; + static struct option const usage_long_opts[] = { + {"quiet", no_argument, NULL, 'q'}, + {"in-format", a_argument, NULL, 'I'}, +@@ -69,6 +73,8 @@ static struct option const usage_long_opts[] = { + {"phandle", a_argument, NULL, 'H'}, + {"warning", a_argument, NULL, 'W'}, + {"error", a_argument, NULL, 'E'}, ++ {"symbols", no_argument, NULL, '@'}, ++ {"auto-alias", no_argument, NULL, 'A'}, + {"help", no_argument, NULL, 'h'}, + {"version", no_argument, NULL, 'v'}, + {NULL, no_argument, NULL, 0x0}, +@@ -99,16 +105,63 @@ static const char * const usage_opts_help[] = { + "\t\tboth - Both \"linux,phandle\" and \"phandle\" properties", + "\n\tEnable/disable warnings (prefix with \"no-\")", + "\n\tEnable/disable errors (prefix with \"no-\")", ++ "\n\tEnable symbols/fixup support", ++ "\n\tEnable auto-alias of labels", + "\n\tPrint this help and exit", + "\n\tPrint version and exit", + NULL, + }; + ++static const char *guess_type_by_name(const char *fname, const char *fallback) ++{ ++ const char *s; ++ ++ s = strrchr(fname, '.'); ++ if (s == NULL) ++ return fallback; ++ if (!strcasecmp(s, ".dts")) ++ return "dts"; ++ if (!strcasecmp(s, ".dtb")) ++ return "dtb"; ++ return fallback; ++} ++ ++static const char *guess_input_format(const char *fname, const char *fallback) ++{ ++ struct stat statbuf; ++ uint32_t magic; ++ FILE *f; ++ ++ if (stat(fname, &statbuf) != 0) ++ return fallback; ++ ++ if (S_ISDIR(statbuf.st_mode)) ++ return "fs"; ++ ++ if (!S_ISREG(statbuf.st_mode)) ++ return fallback; ++ ++ f = fopen(fname, "r"); ++ if (f == NULL) ++ return fallback; ++ if (fread(&magic, 4, 1, f) != 1) { ++ fclose(f); ++ return fallback; ++ } ++ fclose(f); ++ ++ magic = fdt32_to_cpu(magic); ++ if (magic == FDT_MAGIC) ++ return "dtb"; ++ ++ return guess_type_by_name(fname, fallback); ++} ++ + int main(int argc, char *argv[]) + { + struct boot_info *bi; +- const char *inform = "dts"; +- const char *outform = "dts"; ++ const char *inform = NULL; ++ const char *outform = NULL; + const char *outname = "-"; + const char *depname = NULL; + bool force = false, sort = false; +@@ -186,7 +239,12 @@ int main(int argc, char *argv[]) + case 'E': + parse_checks_option(false, true, optarg); + break; +- ++ case '@': ++ symbol_fixup_support = 1; ++ break; ++ case 'A': ++ auto_label_aliases = 1; ++ break; + case 'h': + usage(NULL); + default: +@@ -213,6 +271,17 @@ int main(int argc, char *argv[]) + fprintf(depfile, "%s:", outname); + } + ++ if (inform == NULL) ++ inform = guess_input_format(arg, "dts"); ++ if (outform == NULL) { ++ outform = guess_type_by_name(outname, NULL); ++ if (outform == NULL) { ++ if (streq(inform, "dts")) ++ outform = "dtb"; ++ else ++ outform = "dts"; ++ } ++ } + if (streq(inform, "dts")) + bi = dt_from_source(arg); + else if (streq(inform, "fs")) +@@ -236,6 +305,12 @@ int main(int argc, char *argv[]) + if (sort) + sort_tree(bi); + ++ if (symbol_fixup_support || auto_label_aliases) ++ generate_label_node(bi->dt, bi->dt); ++ ++ if (symbol_fixup_support) ++ generate_fixups_node(bi->dt, bi->dt); ++ + if (streq(outname, "-")) { + outf = stdout; + } else { +diff --git a/dtc.h b/dtc.h +index 56212c8..d025111 100644 +--- a/dtc.h ++++ b/dtc.h +@@ -20,7 +20,7 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + */ +- ++#define _GNU_SOURCE + #include + #include + #include +@@ -54,6 +54,14 @@ extern int reservenum; /* Number of memory reservation slots */ + extern int minsize; /* Minimum blob size */ + extern int padsize; /* Additional padding to blob */ + extern int phandle_format; /* Use linux,phandle or phandle properties */ ++extern int symbol_fixup_support;/* enable symbols & fixup support */ ++extern int auto_label_aliases; /* auto generate labels -> aliases */ ++ ++/* ++ * Tree source globals ++ */ ++extern bool source_is_plugin; ++extern bool deprecated_plugin_syntax_warning; + + #define PHANDLE_LEGACY 0x1 + #define PHANDLE_EPAPR 0x2 +@@ -194,6 +202,7 @@ struct node *build_node_delete(void); + struct node *name_node(struct node *node, char *name); + struct node *chain_node(struct node *first, struct node *list); + struct node *merge_nodes(struct node *old_node, struct node *new_node); ++void add_orphan_node(struct node *old_node, struct node *new_node, char *ref); + + void add_property(struct node *node, struct property *prop); + void delete_property_by_name(struct node *node, char *name); +@@ -244,6 +253,8 @@ struct boot_info { + struct boot_info *build_boot_info(struct reserve_info *reservelist, + struct node *tree, uint32_t boot_cpuid_phys); + void sort_tree(struct boot_info *bi); ++void generate_label_node(struct node *node, struct node *dt); ++void generate_fixups_node(struct node *node, struct node *dt); + + /* Checks */ + +diff --git a/livetree.c b/livetree.c +index e229b84..1ef9fc4 100644 +--- a/livetree.c ++++ b/livetree.c +@@ -216,6 +216,34 @@ struct node *merge_nodes(struct node *old_node, struct node *new_node) + return old_node; + } + ++void add_orphan_node(struct node *dt, struct node *new_node, char *ref) ++{ ++ static unsigned int next_orphan_fragment = 0; ++ struct node *ovl = xmalloc(sizeof(*ovl)); ++ struct property *p; ++ struct data d = empty_data; ++ char *name; ++ int ret; ++ ++ memset(ovl, 0, sizeof(*ovl)); ++ ++ d = data_add_marker(d, REF_PHANDLE, ref); ++ d = data_append_integer(d, 0xffffffff, 32); ++ ++ p = build_property("target", d); ++ add_property(ovl, p); ++ ++ ret = asprintf(&name, "fragment@%u", ++ next_orphan_fragment++); ++ if (ret == -1) ++ die("asprintf() failed\n"); ++ name_node(ovl, name); ++ name_node(new_node, "__overlay__"); ++ ++ add_child(dt, ovl); ++ add_child(ovl, new_node); ++} ++ + struct node *chain_node(struct node *first, struct node *list) + { + assert(first->next_sibling == NULL); +@@ -709,3 +737,177 @@ void sort_tree(struct boot_info *bi) + sort_reserve_entries(bi); + sort_node(bi->dt); + } ++ ++void generate_label_node(struct node *node, struct node *dt) ++{ ++ struct node *c, *an; ++ struct property *p; ++ struct label *l; ++ int has_label; ++ char *gen_node_name; ++ ++ if (auto_label_aliases) ++ gen_node_name = "aliases"; ++ else ++ gen_node_name = "__symbols__"; ++ ++ /* Make sure the label isn't already there */ ++ has_label = 0; ++ for_each_label(node->labels, l) { ++ has_label = 1; ++ break; ++ } ++ ++ if (has_label) { ++ ++ /* an is the aliases/__symbols__ node */ ++ an = get_subnode(dt, gen_node_name); ++ /* if no node exists, create it */ ++ if (!an) { ++ an = build_node(NULL, NULL); ++ name_node(an, gen_node_name); ++ add_child(dt, an); ++ } ++ ++ /* now add the label in the node */ ++ for_each_label(node->labels, l) { ++ /* check whether the label already exists */ ++ p = get_property(an, l->label); ++ if (p) { ++ fprintf(stderr, "WARNING: label %s already" ++ " exists in /%s", l->label, ++ gen_node_name); ++ continue; ++ } ++ ++ /* insert it */ ++ p = build_property(l->label, ++ data_copy_escape_string(node->fullpath, ++ strlen(node->fullpath))); ++ add_property(an, p); ++ } ++ ++ /* force allocation of a phandle for this node */ ++ if (symbol_fixup_support) ++ (void)get_node_phandle(dt, node); ++ } ++ ++ for_each_child(node, c) ++ generate_label_node(c, dt); ++} ++ ++static void add_fixup_entry(struct node *dt, struct node *node, ++ struct property *prop, struct marker *m) ++{ ++ struct node *fn; /* local fixup node */ ++ struct property *p; ++ char *fixups_name = "__fixups__"; ++ struct data d; ++ char *entry; ++ int ret; ++ ++ /* fn is the node we're putting entries in */ ++ fn = get_subnode(dt, fixups_name); ++ /* if no node exists, create it */ ++ if (!fn) { ++ fn = build_node(NULL, NULL); ++ name_node(fn, fixups_name); ++ add_child(dt, fn); ++ } ++ ++ ret = asprintf(&entry, "%s:%s:%u", ++ node->fullpath, prop->name, m->offset); ++ if (ret == -1) ++ die("asprintf() failed\n"); ++ ++ p = get_property(fn, m->ref); ++ d = data_append_data(p ? p->val : empty_data, entry, strlen(entry) + 1); ++ if (!p) ++ add_property(fn, build_property(m->ref, d)); ++ else ++ p->val = d; ++} ++ ++static void add_local_fixup_entry(struct node *dt, struct node *node, ++ struct property *prop, struct marker *m, ++ struct node *refnode) ++{ ++ struct node *lfn, *wn, *nwn; /* local fixup node, walk node, new */ ++ struct property *p; ++ struct data d; ++ char *local_fixups_name = "__local_fixups__"; ++ char *s, *e, *comp; ++ int len; ++ ++ /* fn is the node we're putting entries in */ ++ lfn = get_subnode(dt, local_fixups_name); ++ /* if no node exists, create it */ ++ if (!lfn) { ++ lfn = build_node(NULL, NULL); ++ name_node(lfn, local_fixups_name); ++ add_child(dt, lfn); ++ } ++ ++ /* walk the path components creating nodes if they don't exist */ ++ comp = NULL; ++ /* start skipping the first / */ ++ s = node->fullpath + 1; ++ wn = lfn; ++ while (*s) { ++ /* retrieve path component */ ++ e = strchr(s, '/'); ++ if (e == NULL) ++ e = s + strlen(s); ++ len = e - s; ++ comp = xrealloc(comp, len + 1); ++ memcpy(comp, s, len); ++ comp[len] = '\0'; ++ ++ /* if no node exists, create it */ ++ nwn = get_subnode(wn, comp); ++ if (!nwn) { ++ nwn = build_node(NULL, NULL); ++ name_node(nwn, strdup(comp)); ++ add_child(wn, nwn); ++ } ++ wn = nwn; ++ ++ /* last path component */ ++ if (!*e) ++ break; ++ ++ /* next path component */ ++ s = e + 1; ++ } ++ free(comp); ++ ++ p = get_property(wn, prop->name); ++ d = data_append_cell(p ? p->val : empty_data, (cell_t)m->offset); ++ if (!p) ++ add_property(wn, build_property(prop->name, d)); ++ else ++ p->val = d; ++} ++ ++void generate_fixups_node(struct node *node, struct node *dt) ++{ ++ struct node *c; ++ struct property *prop; ++ struct marker *m; ++ struct node *refnode; ++ ++ for_each_property(node, prop) { ++ m = prop->val.markers; ++ for_each_marker_of_type(m, REF_PHANDLE) { ++ refnode = get_node_by_ref(dt, m->ref); ++ if (!refnode) ++ add_fixup_entry(dt, node, prop, m); ++ else ++ add_local_fixup_entry(dt, node, prop, m, ++ refnode); ++ } ++ } ++ ++ for_each_child(node, c) ++ generate_fixups_node(c, dt); ++} +diff --git a/treesource.c b/treesource.c +index a55d1d1..e1d6657 100644 +--- a/treesource.c ++++ b/treesource.c +@@ -28,6 +28,9 @@ extern YYLTYPE yylloc; + struct boot_info *the_boot_info; + bool treesource_error; + ++bool source_is_plugin; ++bool deprecated_plugin_syntax_warning; ++ + struct boot_info *dt_from_source(const char *fname) + { + the_boot_info = NULL; +diff --git a/util.c b/util.c +index 9d65226..cbb945b 100644 +--- a/util.c ++++ b/util.c +@@ -349,7 +349,6 @@ int utilfdt_decode_type(const char *fmt, int *type, int *size) + void utilfdt_print_data(const char *data, int len) + { + int i; +- const char *p = data; + const char *s; + + /* no data, don't print */ +@@ -376,6 +375,7 @@ void utilfdt_print_data(const char *data, int len) + i < (len - 1) ? " " : ""); + printf(">"); + } else { ++ const unsigned char *p = (const unsigned char *)data; + printf(" = ["); + for (i = 0; i < len; i++) + printf("%02x%s", *p++, i < len - 1 ? " " : ""); +-- +2.7.0 + diff --git a/package/kernel/gpio-button-hotplug/Makefile b/package/kernel/gpio-button-hotplug/Makefile index 8f836a841a1eef..216d23b76d7d2e 100644 --- a/package/kernel/gpio-button-hotplug/Makefile +++ b/package/kernel/gpio-button-hotplug/Makefile @@ -33,8 +33,7 @@ define KernelPackage/gpio-button-hotplug/description endef MAKE_OPTS:= \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ + $(KERNEL_MAKE_FLAGS) \ SUBDIRS="$(PKG_BUILD_DIR)" define Build/Compile diff --git a/package/kernel/gpio-nct5104d/Makefile b/package/kernel/gpio-nct5104d/Makefile index b43291e5a4f25a..33352388cff63d 100644 --- a/package/kernel/gpio-nct5104d/Makefile +++ b/package/kernel/gpio-nct5104d/Makefile @@ -37,8 +37,7 @@ EXTRA_CFLAGS:= \ $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \ MAKE_OPTS:= \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ + $(KERNEL_MAKE_FLAGS) \ SUBDIRS="$(PKG_BUILD_DIR)" \ EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ $(EXTRA_KCONFIG) diff --git a/package/kernel/hwmon-gsc/Makefile b/package/kernel/hwmon-gsc/Makefile index 1892e027ca4b74..3888a2f17e7a0e 100644 --- a/package/kernel/hwmon-gsc/Makefile +++ b/package/kernel/hwmon-gsc/Makefile @@ -20,8 +20,7 @@ endef define Build/Compile $(MAKE) -C "$(LINUX_DIR)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - ARCH="$(LINUX_KARCH)" \ + $(KERNEL_MAKE_FLAGS) \ SUBDIRS="$(PKG_BUILD_DIR)" \ EXTRA_CFLAGS="$(BUILDFLAGS)" \ modules diff --git a/package/kernel/i2c-gpio-custom/Makefile b/package/kernel/i2c-gpio-custom/Makefile index fb3f3bf17e043f..d1123cc3fb529c 100644 --- a/package/kernel/i2c-gpio-custom/Makefile +++ b/package/kernel/i2c-gpio-custom/Makefile @@ -33,8 +33,7 @@ EXTRA_CFLAGS:= \ $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \ MAKE_OPTS:= \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ + $(KERNEL_MAKE_FLAGS) \ SUBDIRS="$(PKG_BUILD_DIR)" \ EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ $(EXTRA_KCONFIG) diff --git a/package/kernel/kmod-sched-cake/Makefile b/package/kernel/kmod-sched-cake/Makefile index 5f57433d618da3..ff27e951729db9 100644 --- a/package/kernel/kmod-sched-cake/Makefile +++ b/package/kernel/kmod-sched-cake/Makefile @@ -13,9 +13,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/dtaht/sch_cake.git -PKG_SOURCE_DATE:=2017-12-07 -PKG_SOURCE_VERSION:=49776da5b93f03c8548e26f2d7982d553d1d226c -PKG_MIRROR_HASH:=d7bc6c333b43f6ff100a4b1d4593a18686fcdd6fd28a3aae55ea8bdad868b67f +PKG_SOURCE_DATE:=2017-12-22 +PKG_SOURCE_VERSION:=5bf0b6596721e18269ee4bae6e3549c75cba923a +PKG_MIRROR_HASH:=95c0f886a3ad8ccfd7b35fa19af8b5ecbf0b2f74caea73fbabd6574f1c3be2db include $(INCLUDE_DIR)/package.mk diff --git a/package/kernel/lantiq/ltq-adsl-mei/Makefile b/package/kernel/lantiq/ltq-adsl-mei/Makefile index 91c798418d779f..08e5775771d518 100644 --- a/package/kernel/lantiq/ltq-adsl-mei/Makefile +++ b/package/kernel/lantiq/ltq-adsl-mei/Makefile @@ -23,8 +23,8 @@ define KernelPackage/ltq-adsl-mei-template URL:=http://www.lantiq.com/ VARIANT:=$(1) DEPENDS:=@$(2) - FILES:=$(PKG_BUILD_DIR)/ltq_mei_$(1).ko - AUTOLOAD:=$(call AutoLoad,50,ltq_mei_$(1)) + FILES:=$(PKG_BUILD_DIR)/drv_mei_cpe.ko + AUTOLOAD:=$(call AutoLoad,50,drv_mei_cpe) endef KernelPackage/ltq-adsl-danube-mei=$(call KernelPackage/ltq-adsl-mei-template,danube,(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy)) diff --git a/package/kernel/lantiq/ltq-adsl-mei/src/Makefile b/package/kernel/lantiq/ltq-adsl-mei/src/Makefile index 2d8645f8f273d7..9a3b89195c634f 100644 --- a/package/kernel/lantiq/ltq-adsl-mei/src/Makefile +++ b/package/kernel/lantiq/ltq-adsl-mei/src/Makefile @@ -1,17 +1,13 @@ ifeq ($(BUILD_VARIANT),danube) CFLAGS_MODULE = -DCONFIG_DANUBE -DCONFIG_IFXMIPS_DSL_CPE_MEI - obj-m = ltq_mei_danube.o - ltq_mei_danube-objs = lantiq_mei.o endif ifeq ($(BUILD_VARIANT),ase) CFLAGS_MODULE = -DCONFIG_AMAZON_SE -DCONFIG_IFXMIPS_DSL_CPE_MEI - obj-m = ltq_mei_ase.o - ltq_mei_ase-objs = lantiq_mei.o endif ifeq ($(BUILD_VARIANT),ar9) CFLAGS_MODULE = -DCONFIG_AR9 -DCONFIG_IFXMIPS_DSL_CPE_MEI - obj-m = ltq_mei_ar9.o - ltq_mei_ar9-objs = lantiq_mei.o endif + +obj-m = drv_mei_cpe.o diff --git a/package/kernel/lantiq/ltq-adsl-mei/src/lantiq_mei.c b/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c similarity index 100% rename from package/kernel/lantiq/ltq-adsl-mei/src/lantiq_mei.c rename to package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c diff --git a/package/kernel/lantiq/ltq-atm/Makefile b/package/kernel/lantiq/ltq-atm/Makefile index 7f4c197fe550ce..5d63983d2c38a4 100644 --- a/package/kernel/lantiq/ltq-atm/Makefile +++ b/package/kernel/lantiq/ltq-atm/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ltq-atm -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/ltq-atm-$(BUILD_VARIANT) PKG_MAINTAINER:=John Crispin @@ -24,17 +24,12 @@ define KernelPackage/ltq-atm-template VARIANT:=$(1) DEPENDS:=@$(2) +kmod-atm +br2684ctl FILES:=$(PKG_BUILD_DIR)/ltq_atm_$(1).ko - AUTOLOAD:=$(call AutoProbe,ltq_atm_$(1)) endef -KernelPackage/ltq-atm-danube=$(call KernelPackage/ltq-atm-template,danube,(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy)) -KernelPackage/ltq-atm-ar9=$(call KernelPackage/ltq-atm-template,ar9,TARGET_lantiq_xway) -KernelPackage/ltq-atm-ase=$(call KernelPackage/ltq-atm-template,ase,TARGET_lantiq_ase) - -define KernelPackage/ltq-atm-vr9 - $(call KernelPackage/ltq-atm-template,vr9,TARGET_lantiq_xrx200) - AUTOLOAD:= -endef +KernelPackage/ltq-atm-danube=$(call KernelPackage/ltq-atm-template,danube,(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy) +kmod-ltq-adsl-danube-mei) +KernelPackage/ltq-atm-ar9=$(call KernelPackage/ltq-atm-template,ar9,TARGET_lantiq_xway +kmod-ltq-adsl-ar9-mei) +KernelPackage/ltq-atm-ase=$(call KernelPackage/ltq-atm-template,ase,TARGET_lantiq_ase +kmod-ltq-adsl-ase-mei) +KernelPackage/ltq-atm-vr9=$(call KernelPackage/ltq-atm-template,vr9,TARGET_lantiq_xrx200 +kmod-ltq-vdsl-vr9-mei) define Build/Configure endef diff --git a/package/kernel/lantiq/ltq-ifxos/Makefile b/package/kernel/lantiq/ltq-ifxos/Makefile index 05663de2c4a03e..a0891be3e0e563 100644 --- a/package/kernel/lantiq/ltq-ifxos/Makefile +++ b/package/kernel/lantiq/ltq-ifxos/Makefile @@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=lib_ifxos PKG_VERSION:=1.5.19 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=https://github.com/xdarklight/$(PKG_NAME)/archive/v$(PKG_VERSION) @@ -34,8 +34,6 @@ define KernelPackage/ltq-ifxos AUTOLOAD:=$(call AutoLoad,10,drv_ifxos) endef -MAKE_FLAGS+=-s - CONFIGURE_ARGS += \ ARCH=$(LINUX_KARCH) \ --enable-linux-26 \ diff --git a/package/kernel/lantiq/ltq-ifxos/patches/200-Fix-app-compilation-failure-from-inclusion-of-wrong-.patch b/package/kernel/lantiq/ltq-ifxos/patches/200-Fix-app-compilation-failure-from-inclusion-of-wrong-.patch new file mode 100644 index 00000000000000..dee3482e4f2330 --- /dev/null +++ b/package/kernel/lantiq/ltq-ifxos/patches/200-Fix-app-compilation-failure-from-inclusion-of-wrong-.patch @@ -0,0 +1,59 @@ +From 7d52945b0b261c54ec736ecc435936c5fb8b81a4 Mon Sep 17 00:00:00 2001 +From: Yousong Zhou +Date: Thu, 30 Nov 2017 11:07:12 +0800 +Subject: [PATCH] Fix app compilation failure from inclusion of wrong headers + +Compiling against glibc can fail with the following errors + + In file included from /home/stefan/Router/o26431-vmmc_v5/source/staging_dir/toolchain-mips_24kc_gcc-5.5.0_glibc/include/bits/fcntl-linux.h:321:0, + from /home/stefan/Router/o26431-vmmc_v5/source/staging_dir/toolchain-mips_24kc_gcc-5.5.0_glibc/include/bits/fcntl.h:104, + from /home/stefan/Router/o26431-vmmc_v5/source/staging_dir/toolchain-mips_24kc_gcc-5.5.0_glibc/include/fcntl.h:35, + from linux/ifxos_linux_device_access_appl.c:30: + /home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:12:2: error: unknown type name '__s16' + __s16 l_type; + ^ + /home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:13:2: error: unknown type name '__s16' + __s16 l_whence; + ^ + /home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:14:2: error: unknown type name '__s64' + __s64 l_start; + ^ + /home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:15:2: error: unknown type name '__s64' + __s64 l_len; /* len == 0 means until end of file */ + ^ + /home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:16:2: error: unknown type name '__s32' + __s32 l_sysid; + ^ + /home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:17:2: error: unknown type name '__u32' + __u32 l_pid; + ^ + /home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:18:2: error: unknown type name '__s32' + __s32 l_pad[4]; /* reserved area */ + ^ + Makefile:1945: recipe for target 'libifxos_a-ifxos_linux_device_access_appl.o' failed + +Ref: https://bugs.lede-project.org/index.php?do=details&task_id=1196 +--- + src/Makefile.am | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index f95668f..d232e7f 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -14,11 +14,7 @@ lib_LIBRARIES = libifxos.a + + AM_CPPFLAGS = \ + -I@srcdir@\ +- -I@srcdir@/include \ +- -I@KERNEL_INCL_PATH@ \ +- -I@KERNEL_BUILD_PATH@/include \ +- -I@KERNEL_BUILD_PATH@/include2 \ +- -I$(TARGET_INCL_PATH) ++ -I@srcdir@/include + + if HAVE_GCC + +-- +1.8.3.1 + diff --git a/package/kernel/lantiq/ltq-ptm/Makefile b/package/kernel/lantiq/ltq-ptm/Makefile index d0743cda353e03..13831a2b6f5dc5 100644 --- a/package/kernel/lantiq/ltq-ptm/Makefile +++ b/package/kernel/lantiq/ltq-ptm/Makefile @@ -24,6 +24,14 @@ define KernelPackage/ltq-ptm-template URL:=http://www.lantiq.com/ VARIANT:=$(1) DEPENDS:=@TARGET_lantiq_$(2) +ifeq ($(1),vr9) + DEPENDS+= +kmod-ltq-vdsl-vr9-mei +else + DEPENDS+= +kmod-ltq-adsl-$(1)-mei +endif +ifeq ($(1),ase) + DEPENDS+=@BROKEN +endif FILES:=$(PKG_BUILD_DIR)/ltq_ptm_$(1).ko endef diff --git a/package/kernel/lantiq/ltq-vdsl-mei/Makefile b/package/kernel/lantiq/ltq-vdsl-mei/Makefile index 76bf3e9570d454..96bbc98c706edf 100644 --- a/package/kernel/lantiq/ltq-vdsl-mei/Makefile +++ b/package/kernel/lantiq/ltq-vdsl-mei/Makefile @@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ltq-vdsl-vr9-mei PKG_VERSION:=1.5.17.6 -PKG_RELEASE:=1 +PKG_RELEASE:=3 PKG_BASE_NAME:=drv_mei_cpe PKG_SOURCE:=$(PKG_BASE_NAME)-$(PKG_VERSION).tar.gz diff --git a/package/kernel/lantiq/ltq-vdsl/Makefile b/package/kernel/lantiq/ltq-vdsl/Makefile index 042e6080b20aa3..3b085ed8a7dd38 100644 --- a/package/kernel/lantiq/ltq-vdsl/Makefile +++ b/package/kernel/lantiq/ltq-vdsl/Makefile @@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ltq-vdsl-vr9 PKG_VERSION:=4.17.18.6 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_BASE_NAME:=drv_dsl_cpe_api PKG_SOURCE:=$(PKG_BASE_NAME)_vrx-$(PKG_VERSION).tar.gz diff --git a/package/kernel/lantiq/ltq-vdsl/patches/110-semaphore-lock.patch b/package/kernel/lantiq/ltq-vdsl/patches/110-semaphore-lock.patch new file mode 100644 index 00000000000000..12c00c33eccf7c --- /dev/null +++ b/package/kernel/lantiq/ltq-vdsl/patches/110-semaphore-lock.patch @@ -0,0 +1,107 @@ +--- a/src/include/drv_dsl_cpe_pm_core.h ++++ b/src/include/drv_dsl_cpe_pm_core.h +@@ -1510,9 +1510,9 @@ typedef struct + /** Common PM module mutex*/ + DSL_DRV_Mutex_t pmMutex; + /** PM module direction Near-End mutex*/ +- DSL_DRV_Mutex_t pmNeMutex; ++ struct semaphore pmNeMutex; + /** PM module direction Far-End mutex*/ +- DSL_DRV_Mutex_t pmFeMutex; ++ struct semaphore pmFeMutex; + /** PM module Near-End access mutex*/ + DSL_DRV_Mutex_t pmNeAccessMutex; + /** PM module Far-End access mutex*/ +--- a/src/pm/drv_dsl_cpe_api_pm.c ++++ b/src/pm/drv_dsl_cpe_api_pm.c +@@ -220,9 +220,9 @@ DSL_Error_t DSL_DRV_PM_Start( + /* init PM module common mutex */ + DSL_DRV_MUTEX_INIT(DSL_DRV_PM_CONTEXT(pContext)->pmMutex); + /* init PM module direction Near-End mutex */ +- DSL_DRV_MUTEX_INIT(DSL_DRV_PM_CONTEXT(pContext)->pmNeMutex); ++ sema_init(&(DSL_DRV_PM_CONTEXT(pContext)->pmNeMutex),1); + /* init PM module direction Far-End mutex */ +- DSL_DRV_MUTEX_INIT(DSL_DRV_PM_CONTEXT(pContext)->pmFeMutex); ++ sema_init(&(DSL_DRV_PM_CONTEXT(pContext)->pmFeMutex),1); + /* init PM module Near-End access mutex */ + DSL_DRV_MUTEX_INIT(DSL_DRV_PM_CONTEXT(pContext)->pmNeAccessMutex); + /* init PM module Far-End access mutex */ +@@ -592,7 +592,7 @@ DSL_Error_t DSL_DRV_PM_Stop( + if( DSL_DRV_PM_CONTEXT(pContext)->pmThreadFe.bRun != DSL_TRUE ) + { + DSL_DEBUG(DSL_DBG_WRN, +- (pContext, SYS_DBG_WRN"DSL[%02d]: PM module Near-End thread already stopped" ++ (pContext, SYS_DBG_WRN"DSL[%02d]: PM module Far-End thread already stopped" + DSL_DRV_CRLF, DSL_DEV_NUM(pContext))); + } + else +--- a/src/pm/drv_dsl_cpe_pm_core.c ++++ b/src/pm/drv_dsl_cpe_pm_core.c +@@ -1022,7 +1022,7 @@ DSL_Error_t DSL_DRV_PM_DirectionMutexCon + { + if( bLock ) + { +- if( DSL_DRV_MUTEX_LOCK(DSL_DRV_PM_CONTEXT(pContext)->pmNeMutex) ) ++ if(down_interruptible(&(DSL_DRV_PM_CONTEXT(pContext)->pmNeMutex))) + { + DSL_DEBUG( DSL_DBG_ERR, + (pContext, SYS_DBG_ERR"DSL[%02d]: ERROR - Couldn't lock PM NE mutex!" +@@ -1034,14 +1034,14 @@ DSL_Error_t DSL_DRV_PM_DirectionMutexCon + else + { + /* Unlock PM module NE Mutex*/ +- DSL_DRV_MUTEX_UNLOCK(DSL_DRV_PM_CONTEXT(pContext)->pmNeMutex); ++ up(&(DSL_DRV_PM_CONTEXT(pContext)->pmNeMutex)); + } + } + else + { + if( bLock ) + { +- if( DSL_DRV_MUTEX_LOCK(DSL_DRV_PM_CONTEXT(pContext)->pmFeMutex) ) ++ if(down_interruptible(&(DSL_DRV_PM_CONTEXT(pContext)->pmFeMutex))) + { + DSL_DEBUG( DSL_DBG_ERR, + (pContext, SYS_DBG_ERR"DSL[%02d]: ERROR - Couldn't lock PM FE mutex!" +@@ -1053,7 +1053,7 @@ DSL_Error_t DSL_DRV_PM_DirectionMutexCon + else + { + /* Unlock PM module FE Mutex*/ +- DSL_DRV_MUTEX_UNLOCK(DSL_DRV_PM_CONTEXT(pContext)->pmFeMutex); ++ up(&(DSL_DRV_PM_CONTEXT(pContext)->pmFeMutex)); + } + } + +@@ -1139,7 +1139,7 @@ DSL_Error_t DSL_DRV_PM_Lock(DSL_Context_ + if( !(DSL_DRV_PM_CONTEXT(pContext)->bPmLock) ) + { + /* Lock PM module Near-End Mutex*/ +- if( DSL_DRV_MUTEX_LOCK(DSL_DRV_PM_CONTEXT(pContext)->pmNeMutex) ) ++ if(down_interruptible(&(DSL_DRV_PM_CONTEXT(pContext)->pmNeMutex))) + { + DSL_DEBUG( DSL_DBG_ERR, + (pContext, SYS_DBG_ERR"DSL[%02d]: ERROR - Couldn't lock PM NE mutex!" +@@ -1148,8 +1148,8 @@ DSL_Error_t DSL_DRV_PM_Lock(DSL_Context_ + return DSL_ERR_SEMAPHORE_GET; + } + +- /* Lock PM module Near-End Mutex*/ +- if( DSL_DRV_MUTEX_LOCK(DSL_DRV_PM_CONTEXT(pContext)->pmFeMutex) ) ++ /* Lock PM module Far-End Mutex*/ ++ if( down_interruptible(&(DSL_DRV_PM_CONTEXT(pContext)->pmFeMutex)) ) + { + DSL_DEBUG( DSL_DBG_ERR, + (pContext, SYS_DBG_ERR"DSL[%02d]: ERROR - Couldn't lock PM FE mutex!" +@@ -1193,10 +1193,10 @@ DSL_Error_t DSL_DRV_PM_UnLock(DSL_Contex + if( DSL_DRV_PM_CONTEXT(pContext)->bPmLock ) + { + /* Unlock PM module NE Mutex*/ +- DSL_DRV_MUTEX_UNLOCK(DSL_DRV_PM_CONTEXT(pContext)->pmNeMutex); ++ up(&(DSL_DRV_PM_CONTEXT(pContext)->pmNeMutex)); + + /* Unlock PM module FE Mutex*/ +- DSL_DRV_MUTEX_UNLOCK(DSL_DRV_PM_CONTEXT(pContext)->pmFeMutex); ++ up(&(DSL_DRV_PM_CONTEXT(pContext)->pmFeMutex)); + + /* Clear bPmLock flag*/ + DSL_DRV_PM_CONTEXT(pContext)->bPmLock = DSL_FALSE; diff --git a/package/kernel/lantiq/ltq-vmmc/Makefile b/package/kernel/lantiq/ltq-vmmc/Makefile index ab0ef727b3b428..e42d5c07198232 100644 --- a/package/kernel/lantiq/ltq-vmmc/Makefile +++ b/package/kernel/lantiq/ltq-vmmc/Makefile @@ -27,7 +27,7 @@ define KernelPackage/ltq-vmmc SUBMENU:=Voice over IP TITLE:=TAPI LL driver for Voice Macro URL:=http://www.lantiq.com/ - DEPENDS:=@(TARGET_lantiq_falcon||TARGET_lantiq_xway||TARGET_lantiq_xrx200) +kmod-ltq-tapi + DEPENDS:=@(TARGET_lantiq_xway||TARGET_lantiq_xrx200) +kmod-ltq-tapi FILES:=$(PKG_BUILD_DIR)/src/drv_vmmc.ko AUTOLOAD:=$(call AutoProbe,drv_vmmc) endef diff --git a/package/kernel/leds-apu2/Makefile b/package/kernel/leds-apu2/Makefile index bab2315b075904..08aca1750f66b2 100644 --- a/package/kernel/leds-apu2/Makefile +++ b/package/kernel/leds-apu2/Makefile @@ -37,8 +37,7 @@ EXTRA_CFLAGS:= \ $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \ MAKE_OPTS:= \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ + $(KERNEL_MAKE_FLAGS) \ SUBDIRS="$(PKG_BUILD_DIR)" \ EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ $(EXTRA_KCONFIG) diff --git a/package/kernel/leds-apu2/src/leds-apu2.c b/package/kernel/leds-apu2/src/leds-apu2.c index 0a60df1bc302e1..4ea552cf5f7266 100644 --- a/package/kernel/leds-apu2/src/leds-apu2.c +++ b/package/kernel/leds-apu2/src/leds-apu2.c @@ -228,21 +228,21 @@ static struct platform_driver gpio_apu2_driver = { }; static struct gpio_led apu2_leds_gpio[] = { - { - .name = "apu2:green:power", - .gpio = 509, - .active_low = 1, - }, - { - .name = "apu2:green:led2", - .gpio = 510, - .active_low = 1, - }, - { - .name = "apu2:green:led3", - .gpio = 511, - .active_low = 1, - }, + { + .name = "apu2:green:power", + .gpio = 509, + .active_low = 1, + }, + { + .name = "apu2:green:led2", + .gpio = 510, + .active_low = 1, + }, + { + .name = "apu2:green:led3", + .gpio = 511, + .active_low = 1, + }, }; static struct gpio_keys_button apu2_gpio_keys[] = { @@ -332,7 +332,10 @@ static int __init gpio_apu2_init (void) const char *board_name = dmi_get_system_info(DMI_BOARD_NAME); /* Match the device name/model */ - if (!board_name || !board_vendor || strcasecmp(board_vendor, "PC Engines") || strcasecmp(board_name, "apu2")) { + if (!board_name \ + || !board_vendor \ + || strcasecmp(board_vendor, "PC Engines") \ + || (strcasecmp(board_name, "apu2") && strcasecmp(board_name, "apu3"))) { err = -ENODEV; goto exit; } diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index b05552006ade7c..bc56b3cc12c4da 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -191,7 +191,7 @@ $(eval $(call KernelPackage,crypto-seqiv)) 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 + DEPENDS:=+kmod-crypto-manager +kmod-crypto-hash +kmod-random-core +kmod-crypto-authenc +kmod-crypto-des KCONFIG:= \ CONFIG_CRYPTO_HW=y \ CONFIG_CRYPTO_DEV_TALITOS \ diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index 1c7869e7c6758b..973e4f3e26a57c 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -242,9 +242,9 @@ $(eval $(call KernelPackage,gpio-mcp23s08)) define KernelPackage/gpio-nxp-74hc164 SUBMENU:=$(OTHER_MENU) TITLE:=NXP 74HC164 GPIO expander support - KCONFIG:=CONFIG_GPIO_NXP_74HC164 - FILES:=$(LINUX_DIR)/drivers/gpio/nxp_74hc164.ko - AUTOLOAD:=$(call AutoProbe,nxp_74hc164) + KCONFIG:=CONFIG_GPIO_74X164 + FILES:=$(LINUX_DIR)/drivers/gpio/gpio-74x164.ko + AUTOLOAD:=$(call AutoProbe,gpio-74x164) endef define KernelPackage/gpio-nxp-74hc164/description diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index d1fb5f4cd23a2d..08e3bf699e6e8b 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -894,7 +894,7 @@ define KernelPackage/usb-storage-uas DEPENDS:=+kmod-usb-storage KCONFIG:=CONFIG_USB_UAS FILES:=$(LINUX_DIR)/drivers/usb/storage/uas.ko - AUTOLOAD:=$(call AutoProbe,uas) + AUTOLOAD:=$(call AutoProbe,uas,1) endef define KernelPackage/usb-storage-uas/description diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 7e9b5ad61814aa..385bea4d2f5db3 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 -PKG_VERSION:=2017-10-06 +PKG_VERSION:=2017-11-01 PKG_RELEASE:=1 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources -PKG_HASH:=194786b7635f36b9ce280fd2319f6a4feeff209175e330ddbcbe789a3b4540a5 +PKG_HASH:=8437ab7886b988c8152e7a4db30b7f41009e49a3b2cb863edd05da1ecd7eb05a PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION) @@ -87,7 +87,7 @@ endef define KernelPackage/cfg80211 $(call KernelPackage/mac80211/Default) TITLE:=cfg80211 - wireless configuration API - DEPENDS+= +iw + DEPENDS+= +iw +wireless-regdb FILES:= \ $(PKG_BUILD_DIR)/compat/compat.ko \ $(PKG_BUILD_DIR)/net/wireless/cfg80211.ko @@ -320,7 +320,7 @@ define KernelPackage/ath10k FILES:= \ $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath10k/ath10k_core.ko \ $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath10k/ath10k_pci.ko - AUTOLOAD:=$(call AutoLoad,55,ath10k_core ath10k_pci) + AUTOLOAD:=$(call AutoProbe,ath10k_pci) endef define KernelPackage/ath10k/description @@ -742,6 +742,7 @@ define KernelPackage/brcmfmac/config config BRCMFMAC_SDIO bool "Enable SDIO bus interface support" default y if TARGET_brcm2708 + default y if TARGET_sunxi default n help Enable support for cards attached to an SDIO bus. @@ -1516,7 +1517,6 @@ config-y:= \ WLAN \ NL80211_TESTMODE \ CFG80211_WEXT \ - CFG80211_INTERNAL_REGDB \ CFG80211_CERTIFICATION_ONUS \ MAC80211_RC_MINSTREL \ MAC80211_RC_MINSTREL_HT \ @@ -1568,7 +1568,7 @@ config-$(call config_package,lib80211) += LIB80211 LIB80211_CRYPT_WEP LIB80211_C config-$(call config_package,airo) += AIRO -config-$(call config_package,ath) += ATH_CARDS ATH_COMMON +config-$(call config_package,ath) += ATH_CARDS ATH_COMMON ATH_REG_DYNAMIC_USER_REG_HINTS config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH9K_STATION_STATISTICS config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED @@ -1742,7 +1742,6 @@ define Build/Prepare $(PKG_BUILD_DIR)/backport-include/linux/bcm47xx_nvram.h echo 'compat-wireless-$(PKG_VERSION)-$(PKG_RELEASE)-$(REVISION)' > $(PKG_BUILD_DIR)/compat_version - $(CP) ./files/regdb.txt $(PKG_BUILD_DIR)/net/wireless/db.txt endef ifneq ($(CONFIG_PACKAGE_kmod-cfg80211)$(CONFIG_PACKAGE_kmod-lib80211),) diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index ebd24df0d3e984..cdc155405ee9ab 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -522,6 +522,12 @@ mac80211_setup_supplicant() { wpa_supplicant_run "$ifname" ${hostapd_ctrl:+-H $hostapd_ctrl} } +mac80211_setup_supplicant_noctl() { + wpa_supplicant_prepare_interface "$ifname" nl80211 || return 1 + wpa_supplicant_add_network "$ifname" "$freq" "$htmode" + wpa_supplicant_run "$ifname" +} + mac80211_setup_adhoc_htmode() { case "$htmode" in VHT20|HT20) ibss_htmode=HT20;; @@ -631,7 +637,8 @@ mac80211_setup_vif() { authsae_start_interface || failed=1 else wireless_vif_parse_encryption - mac80211_setup_supplicant || failed=1 + freq="$(get_freq "$phy" "$channel")" + mac80211_setup_supplicant_noctl || failed=1 fi else json_get_vars mesh_id mcast_rate @@ -688,7 +695,8 @@ mac80211_setup_vif() { wireless_vif_parse_encryption mac80211_setup_adhoc_htmode if [ "$wpa" -gt 0 -o "$auto_channel" -gt 0 ]; then - mac80211_setup_supplicant || failed=1 + freq="$(get_freq "$phy" "$channel")" + mac80211_setup_supplicant_noctl || failed=1 else mac80211_setup_adhoc fi diff --git a/package/kernel/mac80211/files/regdb.txt b/package/kernel/mac80211/files/regdb.txt deleted file mode 100644 index d583887602d2e3..00000000000000 --- a/package/kernel/mac80211/files/regdb.txt +++ /dev/null @@ -1,1314 +0,0 @@ -# This is the world regulatory domain -country 00: - (2402 - 2472 @ 40), (20) - # Channel 12 - 13. - (2457 - 2482 @ 20), (20), NO-IR, AUTO-BW - # Channel 14. Only JP enables this and for 802.11b only - (2474 - 2494 @ 20), (20), NO-IR, NO-OFDM - # Channel 36 - 48 - (5170 - 5250 @ 80), (20), AUTO-BW - # Channel 52 - 64 - (5250 - 5330 @ 80), (20), NO-IR, DFS, AUTO-BW - # Channel 100 - 144 - (5490 - 5730 @ 160), (20), NO-IR, DFS - # Channel 149 - 165 - (5735 - 5835 @ 80), (20), NO-IR - # IEEE 802.11ad (60GHz), channels 1..3 - (57240 - 63720 @ 2160), (0) - - -country AD: - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20) - (5250 - 5330 @ 80), (20), DFS - (5490 - 5710 @ 80), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country AE: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country AF: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -# Source: -# http://pucanguilla.org/Downloads/January2005-Anguilla%20Table%20of%20Allocations.pdf -country AI: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country AL: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20.00), AUTO-BW - (5250 - 5330 @ 80), (20.00), DFS, AUTO-BW - (5490 - 5710 @ 160), (27.00), DFS - -country AM: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 20), (18) - (5250 - 5330 @ 20), (18), DFS - -country AN: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country AR: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country AS: DFS-FCC - (2402 - 2472 @ 40), (30) - (5170 - 5250 @ 80), (24), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country AT: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -# Source: -# https://www.legislation.gov.au/Details/F2016C00432 -# Both DFS-ETSI and DFS-FCC are acceptable per AS/NZS 4268 Appendix B. -# The EIRP for DFS bands can be increased by 3dB if TPC is implemented. -# In order to allow 80MHz operation between 5650-5730MHz the upper boundary -# of this more restrictive band has been shifted up by 5MHz from 5725MHz. -country AU: DFS-ETSI - (2400 - 2483.5 @ 40), (36) - (5150 - 5250 @ 80), (23), NO-OUTDOOR, AUTO-BW - (5250 - 5350 @ 80), (20), NO-OUTDOOR, AUTO-BW, DFS - (5470 - 5600 @ 80), (27), DFS - (5650 - 5730 @ 80), (27), DFS - (5730 - 5850 @ 80), (36) - (57000 - 66000 @ 2160), (43), NO-OUTDOOR - -country AW: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country AZ: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (18), AUTO-BW - (5250 - 5330 @ 80), (18), DFS, AUTO-BW - -country BA: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country BB: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (23), AUTO-BW - (5250 - 5330 @ 80), (23), DFS, AUTO-BW - (5735 - 5835 @ 80), (30) - -country BD: DFS-JP - (2402 - 2482 @ 40), (20) - (5735 - 5835 @ 80), (30) - -country BE: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country BF: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -# Bulgarian rules as defined by the Communications Regulation Commission in the -# following documents: -# -# Rules for carrying out electronic communications through radio equipment using -# radio spectrum, which does not need to be individually assigned (the Rules): -# http://www.crc.bg/files/_bg/Pravila_09_06_2015.pdf -# -# List of radio equipment that uses harmonized within the European Union bands -# and electronic communications terminal equipment (the List): -# http://www.crc.bg/files/_bg/Spisak_2015.pdf -# -# Note: The transmit power limits in the 5250-5350 MHz and 5470-5725 MHz bands -# can be raised by 3 dBm if TPC is enabled. Refer to BDS EN 301 893 for details. -country BG: DFS-ETSI - # Wideband data transmission systems (WDTS) in the 2.4GHz ISM band, ref: - # I.22 of the List, BDS EN 300 328 - (2402 - 2482 @ 40), (20) - # 5 GHz Radio Local Area Networks (RLANs), ref: - # II.H01 of the List, BDS EN 301 893 - (5170 - 5250 @ 80), (23), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - # II.H01 of the List, I.54 from the List, BDS EN 301 893 - (5490 - 5710 @ 160), (27), DFS - # Short range devices (SRDs) in the 5725-5875 MHz frequency range, ref: - # I.43 of the List, BDS EN 300 440-2, BDS EN 300 440-1 - (5725 - 5875 @ 80), (14) - # 60 GHz Multiple-Gigabit RLAN Systems, ref: - # II.H03 of the List, BDS EN 302 567-2 - (57000 - 66000 @ 2160), (40), NO-OUTDOOR - -country BH: DFS-JP - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 20), (20) - (5250 - 5330 @ 20), (20), DFS - (5735 - 5835 @ 20), (20) - -country BL: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country BM: DFS-FCC - (2402 - 2472 @ 40), (30) - (5170 - 5250 @ 80), (24), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country BN: DFS-JP - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5735 - 5835 @ 80), (20) - -country BO: DFS-JP - (2402 - 2482 @ 40), (20) - (5250 - 5330 @ 80), (30), DFS - (5735 - 5835 @ 80), (30) - -country BR: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country BS: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (24), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -# Source: -# http://www.bicma.gov.bt/paper/publication/nrrpart4.pdf -country BT: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country BY: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country BZ: DFS-JP - (2402 - 2482 @ 40), (30) - (5735 - 5835 @ 80), (30) - -country CA: DFS-FCC - (2402 - 2472 @ 40), (30) - (5150 - 5250 @ 80), (23), AUTO-BW - (5250 - 5350 @ 80), (24), DFS, AUTO-BW - (5470 - 5600 @ 80), (24), DFS - (5650 - 5730 @ 80), (24), DFS - (5735 - 5835 @ 80), (30) - -# Source: -# http://www.art-rca.org -country CF: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 40), (17) - (5250 - 5330 @ 40), (24), DFS - (5490 - 5730 @ 40), (24), DFS - (5735 - 5835 @ 40), (30) - -country CH: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country CI: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country CL: DFS-JP - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5735 - 5835 @ 80), (20) - -country CN: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (23), AUTO-BW - (5250 - 5330 @ 80), (23), DFS, AUTO-BW - (5735 - 5835 @ 80), (30) - # 60 GHz band channels 1,4: 28dBm, channels 2,3: 44dBm - # ref: http://www.miit.gov.cn/n11293472/n11505629/n11506593/n11960250/n11960606/n11960700/n12330791.files/n12330790.pdf - (57240 - 59400 @ 2160), (28) - (59400 - 63720 @ 2160), (44) - (63720 - 65880 @ 2160), (28) - -country CO: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country CR: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 20), (17) - (5250 - 5330 @ 20), (24), DFS - (5490 - 5730 @ 20), (24), DFS - (5735 - 5835 @ 20), (30) - -# http://www.mincom.gob.cu/?q=marcoregulatorio -# - Redes Informáticas -# Resolución 127, 2011 - Reglamento Banda 2,4 GHz. -country CU: DFS-FCC - (2400 - 2483.5 @ 40), (200 mW) - -country CX: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (24), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country CY: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -# Data from http://www.ctu.eu/164/download/VOR/VOR-12-08-2005-34.pdf -# and http://www.ctu.eu/164/download/VOR/VOR-12-05-2007-6-AN.pdf -# Power at 5250 - 5350 MHz and 5470 - 5725 MHz can be doubled if TPC is -# implemented. -country CZ: DFS-ETSI - (2400 - 2483.5 @ 40), (100 mW) - (5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW - (5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW - (5470 - 5725 @ 160), (500 mW), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -# Allocation for the 2.4 GHz band (Vfg 10 / 2013, Allgemeinzuteilung von -# Frequenzen für die Nutzung in lokalen Netzwerken; Wireless Local Area -# Networks (WLAN-Funkanwendungen). -# https://www.bundesnetzagentur.de/SharedDocs/Downloads/DE/Sachgebiete/Telekommunikation/Unternehmen_Institutionen/Frequenzen/Allgemeinzuteilungen/2013_10_WLAN_2,4GHz_pdf.pdf -# -# Allocation for the 5 GHz band (Vfg. 7 / 2010, Allgemeinzuteilung von -# Frequenzen in den Bereichen 5150 MHz - 5350 MHz und 5470 MHz - 5725 MHz für -# Funkanwendungen zur breitbandigen Datenübertragung, WAS/WLAN („Wireless -# Access Systems including Wireless Local Area Networks“). -# https://www.bundesnetzagentur.de/SharedDocs/Downloads/DE/Sachgebiete/Telekommunikation/Unternehmen_Institutionen/Frequenzen/Allgemeinzuteilungen/2010_07_WLAN_5GHz_pdf.pdf -# The values for the 5 GHz have been reduced by a factor of 2 (3db) for non TPC -# devices (in other words: devices with TPC can use twice the tx power of this -# table). Note that the docs do not require TPC for 5150--5250; the reduction -# to 100mW thus is not strictly required -- however the conservative 100mW -# limit is used here as the non-interference with radar and satellite -# apps relies on the attenuation by the building walls only in the -# absence of DFS; the neighbour countries have 100mW limit here as well. -# -# The ETSI EN 300 440-1 standard for short range devices in the 5 GHz band has -# been implemented in Germany: -# https://www.bundesnetzagentur.de/SharedDocs/Downloads/DE/Sachgebiete/Telekommunikation/Unternehmen_Institutionen/Frequenzen/Allgemeinzuteilungen/2014_69_SRD_pdf.pdf -# -# Allocation for the 60 GHz band (Allgemeinzuteilung von Frequenzen im -# Bereich 57 GHz - 66 GHz für Funkanwendungen für weitbandige -# Datenübertragungssysteme; „Multiple Gigabit WAS/RLAN Systems (MGWS)“). -# https://www.bundesnetzagentur.de/SharedDocs/Downloads/DE/Sachgebiete/Telekommunikation/Unternehmen_Institutionen/Frequenzen/Allgemeinzuteilungen/2011_08_MGWS_pdf.pdf - -country DE: DFS-ETSI - (2400 - 2483.5 @ 40), (100 mW) - (5150 - 5250 @ 80), (100 mW), NO-OUTDOOR, AUTO-BW - (5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW - (5470 - 5725 @ 160), (500 mW), DFS - # short range devices (ETSI EN 300 440-1) - (5725 - 5875 @ 80), (25 mW) - # 60 GHz band channels 1-4 (ETSI EN 302 567) - (57000 - 66000 @ 2160), (40) - -country DK: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -# Source: -# http://www.ntrcdom.org/index.php?option=com_content&view=category&layout=blog&id=10&Itemid=55 -country DM: DFS-FCC - (2402 - 2472 @ 40), (30) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (23), DFS, AUTO-BW - (5735 - 5835 @ 80), (30) - -country DO: DFS-FCC - (2402 - 2472 @ 40), (30) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (23), DFS, AUTO-BW - (5735 - 5835 @ 80), (30) - -country DZ: DFS-JP - (2402 - 2482 @ 40), (20) - (5170.000 - 5250.000 @ 80.000), (23.00), AUTO-BW - (5250.000 - 5330.000 @ 80.000), (23.00), DFS, AUTO-BW - (5490.000 - 5670.000 @ 160.000), (23.00), DFS - -country EC: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 20), (17) - (5250 - 5330 @ 20), (24), DFS - (5490 - 5730 @ 20), (24), DFS - (5735 - 5835 @ 20), (30) - -country EE: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country EG: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 40), (20) - (5250 - 5330 @ 40), (20), DFS - -# Orden IET/787/2013, de 25 de abril, por la que se aprueba -# el cuadro nacional de atribución de frecuencias. -# http://www.boe.es/diario_boe/txt.php?id=BOE-A-2013-4845 -# -# more info at "Cuadro nacional de atribución de frecuencias (CNAF)": -# http://www.minetur.gob.es/telecomunicaciones/espectro/paginas/cnaf.aspx - -country ES: DFS-ETSI - (2400 - 2483.5 @ 40), (100 mW) - (5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW - (5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW - (5470 - 5725 @ 160), (500 mW), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country ET: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country FI: DFS-ETSI - (2400 - 2483.5 @ 40), (20) - (5150 - 5250 @ 80), (23), NO-OUTDOOR, AUTO-BW - (5250 - 5350 @ 80), (20), NO-OUTDOOR, DFS, AUTO-BW - (5470 - 5725 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country FM: DFS-FCC - (2402 - 2472 @ 40), (30) - (5170 - 5250 @ 80), (24), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country FR: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country GB: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country GD: DFS-FCC - (2402 - 2472 @ 40), (30) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country GE: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (18), AUTO-BW - (5250 - 5330 @ 80), (18), DFS, AUTO-BW - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country GF: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country GH: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country GL: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country GP: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country GR: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country GT: DFS-FCC - (2402 - 2472 @ 40), (30) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (23), DFS, AUTO-BW - (5735 - 5835 @ 80), (30) - -country GU: DFS-FCC - (2402 - 2472 @ 40), (30) - (5170 - 5250 @ 20), (17) - (5250 - 5330 @ 20), (24), DFS - (5490 - 5730 @ 20), (24), DFS - (5735 - 5835 @ 20), (30) - -country GY: - (2402 - 2482 @ 40), (30) - (5735 - 5835 @ 80), (30) - -country HK: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5710 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country HN: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country HR: DFS-ETSI - (2400 - 2483.5 @ 40), (20) - (5150 - 5250 @ 80), (23), NO-OUTDOOR, AUTO-BW - (5250 - 5350 @ 80), (20), NO-OUTDOOR, DFS, AUTO-BW - (5470 - 5725 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country HT: DFS-FCC - (2402 - 2472 @ 40), (30) - (5170 - 5250 @ 80), (24), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country HU: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country ID: DFS-JP - # ref: http://www.postel.go.id/content/ID/regulasi/standardisasi/kepdir/bwa%205,8%20ghz.pdf - (2402 - 2482 @ 20), (20) - (5735 - 5815 @ 20), (23) - -country IE: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country IL: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW - (5250 - 5350 @ 80), (200 mW), NO-OUTDOOR, DFS, AUTO-BW - -country IN: - (2402 - 2482 @ 40), (20) - (5150 - 5350 @ 160), (23) - (5725 - 5875 @ 80), (23) - -country IR: DFS-JP - (2402 - 2482 @ 40), (20) - (5735 - 5835 @ 80), (30) - -country IS: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country IT: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country JM: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country JO: DFS-JP - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (23) - (5735 - 5835 @ 80), (23) - -country JP: DFS-JP - (2402 - 2482 @ 40), (20) - (2474 - 2494 @ 20), (20), NO-OFDM - (4910 - 4990 @ 40), (23) - (5030 - 5090 @ 40), (23) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (23), DFS - # 60 GHz band channels 2-4 at 10mW, - # ref: http://www.arib.or.jp/english/html/overview/doc/1-STD-T74v1_1.pdf - (59000 - 66000 @ 2160), (10 mW) - -country KE: DFS-JP - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (23) - (5490 - 5570 @ 80), (30), DFS - (5735 - 5775 @ 40), (23) - -country KH: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -# Source -# http://ntrc.kn/?page_id=7 -country KN: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (30), DFS - (5735 - 5815 @ 80), (30) - -country KP: DFS-JP - (2402 - 2482 @ 20), (20) - (5170 - 5250 @ 20), (20) - (5250 - 5330 @ 20), (20), DFS - (5490 - 5630 @ 20), (30), DFS - (5735 - 5815 @ 20), (30) - -country KR: DFS-JP - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (30), DFS - (5735 - 5835 @ 80), (30) - # 60 GHz band channels 1-4, - # ref: http://www.law.go.kr/%ED%96%89%EC%A0%95%EA%B7%9C%EC%B9%99/%EB%AC%B4%EC%84%A0%EC%84%A4%EB%B9%84%EA%B7%9C%EC%B9%99 - (57000 - 66000 @ 2160), (43) - -country KW: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - -country KY: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (24), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country KZ: - (2402 - 2482 @ 40), (20) - -country LB: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -# Source: -# http://www.ntrc.org.lc/operational_structures.htm -country LC: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (30), DFS - (5735 - 5815 @ 80), (30) - -country LI: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country LK: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 20), (17) - (5250 - 5330 @ 20), (24), DFS - (5490 - 5730 @ 20), (24), DFS - (5735 - 5835 @ 20), (30) - -# Source: -# http://lca.org.ls/images/documents/lesotho_national_frequency_allocation_plan.pdf -country LS: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country LT: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country LU: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country LV: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country MA: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - -country MC: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -# Source: -# http://www.cnfr.md/index.php?pag=sec&id=117&l=en -country MD: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -# Source: -# http://www.cept.org/files/1050/Tools%20and%20Services/EFIS%20-%20ECO%20Frequency%20Information%20System/National%20frequency%20tables/Montenegro%20NAFT%20-%202010.pdf -country ME: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country MF: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country MH: DFS-FCC - (2402 - 2472 @ 40), (30) - (5170 - 5250 @ 80), (24), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country MK: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country MN: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (24), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country MO: DFS-FCC - (2402 - 2482 @ 40), (23) - (5170 - 5250 @ 80), (23), AUTO-BW - (5250 - 5330 @ 80), (23), DFS, AUTO-BW - (5490 - 5730 @ 160), (30), DFS - (5735 - 5835 @ 80), (30) - -country MP: DFS-FCC - (2402 - 2472 @ 40), (30) - (5170 - 5250 @ 80), (24), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country MQ: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -# Source: -# http://www.are.mr/pdfs/telec_freq_TNAbf_2010.pdf -country MR: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country MT: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country MU: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (24), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -# Source: -# http://www.cam.gov.mv/docs/tech_standards/TAM-TS-100-2004-WLAN.pdf -country MV: DFS-ETSI - (2400 - 2483.5 @ 40), (100 mW) - (5150 - 5250 @ 80), (200 mW), AUTO-BW - (5250 - 5350 @ 80), (100 mW), DFS, AUTO-BW - (5725 - 5850 @ 80), (100 mW) - -country MW: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country MX: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country MY: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (24), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5650 @ 160), (24), DFS - (5735 - 5835 @ 80), (24) - -country NG: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5250 - 5330 @ 80), (30), DFS - (5735 - 5835 @ 80), (30) - -country NI: DFS-FCC - (2402 - 2472 @ 40), (30) - (5170 - 5250 @ 80), (24), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -# Regulation on the use of frequency space without a license and -# without notification 2015 -# -# http://wetten.overheid.nl/BWBR0036378/2015-03-05 - -country NL: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), NO-OUTDOOR, AUTO-BW - (5250 - 5330 @ 80), (20), NO-OUTDOOR, DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # short range devices (ETSI EN 300 440-1) - (5725 - 5875 @ 80), (25 mW) - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -# Data from http://www.lovdata.no/dokument/SF/forskrift/2012-01-19-77 -# Power at 5250 - 5350 MHz, 5470 - 5725 MHz and 5815 – 5850 MHz can -# be doubled if TPC is implemented. -# Up to 2W (or 4W with TPC) is allowed in the 5725 – 5795 MHz band -# which has been merged with 5470 - 5725 MHz to allow wide channels -country NO: DFS-ETSI - (2400 - 2483.5 @ 40), (100 mW) - (5150 - 5250 @ 80), (200 mW), AUTO-BW - (5250 - 5350 @ 80), (100 mW), DFS, AUTO-BW - (5470 - 5795 @ 160), (500 mW), DFS - (5815 - 5850 @ 35), (2000 mW), DFS - (17100 - 17300 @ 200), (100 mW) - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country NP: DFS-JP - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5735 - 5835 @ 80), (20) - -country NZ: DFS-ETSI - (2402 - 2482 @ 40), (30) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country OM: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country PA: DFS-FCC - (2402 - 2472 @ 40), (30) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (23), DFS, AUTO-BW - (5735 - 5835 @ 80), (30) - -country PE: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country PF: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country PG: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country PH: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country PK: DFS-JP - (2402 - 2482 @ 40), (20) - (5735 - 5835 @ 80), (30) - -country PL: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country PM: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country PR: DFS-FCC - (2402 - 2472 @ 40), (30) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country PT: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country PW: DFS-FCC - (2402 - 2472 @ 40), (30) - (5170 - 5250 @ 80), (24), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country PY: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (24), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country QA: DFS-JP - (2402 - 2482 @ 40), (20) - (5735 - 5835 @ 80), (30) - -country RE: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country RO: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - - -# Source: -# http://www.ratel.rs/upload/documents/Plan_namene/Plan_namene-sl_glasnik.pdf -country RS: DFS-ETSI - (2400 - 2483.5 @ 40), (100 mW) - (5150 - 5350 @ 40), (200 mW), NO-OUTDOOR - (5470 - 5725 @ 20), (1000 mW), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country RU: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5650 - 5730 @ 80), (30), DFS - (5735 - 5835 @ 80), (30) - # 60 GHz band channels 1-4, ref: Changes to NLA 124_Order №129_22042015.pdf - (57000 - 66000 @ 2160), (40) - -country RW: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country SA: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country SE: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country SG: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country SI: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country SK: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -# Source: -# Regulation N° 2004-005 ART/DG/DRC/D.Rég -country SN: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country SR: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country SV: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 20), (17) - (5250 - 5330 @ 20), (23), DFS - (5735 - 5835 @ 20), (30) - -country SY: - (2402 - 2482 @ 40), (20) - -# Source: -# http://www.telecommission.tc/Spectrum-plan20110324-101210.html -country TC: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (24), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country TD: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country TG: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 40), (20) - (5250 - 5330 @ 40), (20), DFS - (5490 - 5710 @ 40), (27), DFS - -country TH: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country TN: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - -country TR: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country TT: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -# Source: -# Table of Frequency Allocations of Republic of China (Taiwan) / Nov 2014: -# http://www.motc.gov.tw/websitedowndoc?file=post/201411171137330.doc& \ -# filedisplay=Table+of+radio+frequency+allocation.doc -# LP0002 Low-power Radio-frequency Devices Technical Regulations / 28 Jun 2011: -# http://www.ncc.gov.tw/english/show_file.aspx?table_name=news&file_sn=681 -# (section 3.10.1, 4.7) -country TW: DFS-FCC - (2400 - 2483.5 @ 40), (30) - # Follow US 5.15 ~ 5.25 GHz: 30 dBm for master mode, 23 dBm for clients - (5150 - 5250 @ 80), (23), AUTO-BW - (5250 - 5350 @ 80), (23), DFS, AUTO-BW - (5470 - 5725 @ 160), (23), DFS - (5725 - 5850 @ 80), (30) - -country TZ: - (2402 - 2482 @ 40), (20) - (5735 - 5835 @ 80), (30) - -# Source: -# #914 / 06 Sep 2007: http://www.ucrf.gov.ua/uk/doc/nkrz/1196068874 -# #1174 / 23 Oct 2008: http://www.nkrz.gov.ua/uk/activities/ruling/1225269361 -# (appendix 8) -# Listed 5GHz range is a lowest common denominator for all related -# rules in the referenced laws. Such a range is used because of -# disputable definitions there. -country UA: DFS-ETSI - (2400 - 2483.5 @ 40), (20), NO-OUTDOOR - (5150 - 5250 @ 80), (20), NO-OUTDOOR, AUTO-BW - (5250 - 5350 @ 80), (20), DFS, NO-OUTDOOR, AUTO-BW - (5490 - 5670 @ 160), (20), DFS - (5735 - 5835 @ 80), (20) - # 60 GHz band channels 1-4, ref: Etsi En 302 567 - (57000 - 66000 @ 2160), (40) - -country UG: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (24), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country US: DFS-FCC - (2402 - 2472 @ 40), (30) - # 5.15 ~ 5.25 GHz: 30 dBm for master mode, 23 dBm for clients - (5170 - 5250 @ 80), (23), AUTO-BW - (5250 - 5330 @ 80), (23), DFS, AUTO-BW - (5490 - 5730 @ 160), (23), DFS - (5735 - 5835 @ 80), (30) - # 60g band - # reference: http://cfr.regstoday.com/47cfr15.aspx#47_CFR_15p255 - # channels 1,2,3, EIRP=40dBm(43dBm peak) - (57240 - 63720 @ 2160), (40) - -country UY: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (23), AUTO-BW - (5250 - 5330 @ 80), (23), DFS, AUTO-BW - (5735 - 5835 @ 80), (30) - -# Source: -# http://cemc.uz/article/1976/ -country UZ: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - -# Source: -# http://www.ntrc.vc/regulations/Jun_2006_Spectrum_Managment_Regulations.pdf -country VC: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -# Source: -# Official Gazette (Gaceta Oficial) concerning Unlicensed transmitter use -# (10 June 2013) -# http://www.conatel.gob.ve/ -country VE: DFS-FCC - (2402 - 2482 @ 40), (30) - (5170 - 5250 @ 80), (23), AUTO-BW - (5250 - 5330 @ 80), (23), DFS, AUTO-BW - (5735 - 5835 @ 80), (30) - -country VI: DFS-FCC - (2402 - 2472 @ 40), (30) - (5170 - 5250 @ 80), (24), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country VN: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17) - (5250 - 5330 @ 80), (24), DFS - (5490 - 5730 @ 80), (24), DFS - (5735 - 5835 @ 80), (30) - -# Source: -# http://www.trr.vu/attachments/category/130/GURL_for_Short-range_Radiocommunication_Devices2.pdf -country VU: DFS-FCC - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (17), AUTO-BW - (5250 - 5330 @ 80), (24), DFS, AUTO-BW - (5490 - 5730 @ 160), (24), DFS - (5735 - 5835 @ 80), (30) - -country WF: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country WS: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 40), (20) - (5250 - 5330 @ 40), (20), DFS - (5490 - 5710 @ 40), (27), DFS - -country YE: - (2402 - 2482 @ 40), (20) - -country YT: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - -country ZA: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (30) - -country ZW: DFS-ETSI - (2402 - 2482 @ 40), (20) - (5170 - 5250 @ 80), (20), AUTO-BW - (5250 - 5330 @ 80), (20), DFS, AUTO-BW - (5490 - 5710 @ 160), (27), DFS - diff --git a/package/kernel/mac80211/patches/005-revert-devcoredump.patch b/package/kernel/mac80211/patches/005-revert-devcoredump.patch index 1216b99574ca4b..d485d95586bd43 100644 --- a/package/kernel/mac80211/patches/005-revert-devcoredump.patch +++ b/package/kernel/mac80211/patches/005-revert-devcoredump.patch @@ -1,11 +1,11 @@ --- a/compat/Makefile +++ b/compat/Makefile -@@ -39,8 +39,6 @@ compat-$(CPTCFG_KERNEL_4_10) += backport - - compat-$(CPTCFG_BPAUTO_BUILD_CRYPTO_CCM) += crypto-ccm.o - compat-$(CPTCFG_BPAUTO_CRYPTO_SKCIPHER) += crypto-skcipher.o +@@ -70,8 +70,6 @@ quiet_cmd_build_OID_registry = GEN $ + cmd_build_OID_registry = perl $(src)/build_OID_registry $< $@ + compat-$(CPTCFG_BPAUTO_ASN1_DECODER) += lib-asn1_decoder.o + compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += lib-oid_registry.o -skcipher-objs += crypto-skcipher.o -obj-$(CPTCFG_BPAUTO_CRYPTO_SKCIPHER) += skcipher.o - compat-$(CPTCFG_BPAUTO_BUILD_WANT_DEV_COREDUMP) += drivers-base-devcoredump.o compat-$(CPTCFG_BPAUTO_RHASHTABLE) += lib-rhashtable.o cordic-objs += lib-cordic.o + obj-$(CPTCFG_BPAUTO_BUILD_CORDIC) += cordic.o diff --git a/package/kernel/mac80211/patches/006-fix-genl-multicast.patch b/package/kernel/mac80211/patches/006-fix-genl-multicast.patch new file mode 100644 index 00000000000000..42fd3e82711a35 --- /dev/null +++ b/package/kernel/mac80211/patches/006-fix-genl-multicast.patch @@ -0,0 +1,10 @@ +--- a/compat/backport-4.12.c ++++ b/compat/backport-4.12.c +@@ -225,6 +225,7 @@ int bp_extack_genl_register_family(struc + + /* copy this since the family might access it directly */ + family->attrbuf = copy->family.attrbuf; ++ family->mcgrp_offset = copy->family.mcgrp_offset; + + mutex_lock(&copies_mutex); + list_add_tail(©->list, &copies_list); diff --git a/package/kernel/mac80211/patches/007-fix-linux-verification-h.patch b/package/kernel/mac80211/patches/007-fix-linux-verification-h.patch new file mode 100644 index 00000000000000..4011f1d3ba9380 --- /dev/null +++ b/package/kernel/mac80211/patches/007-fix-linux-verification-h.patch @@ -0,0 +1,11 @@ +--- a/backport-include/linux/verification.h ++++ b/backport-include/linux/verification.h +@@ -1,7 +1,7 @@ + #ifndef __BP_VERIFICATION_H + #define __BP_VERIFICATION_H + #include +-#ifndef CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION ++#if LINUX_VERSION_IS_GEQ(4,7,0) && !defined(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) + #include_next + #else + #include diff --git a/package/kernel/mac80211/patches/008-fix-genl-family-id.patch b/package/kernel/mac80211/patches/008-fix-genl-family-id.patch new file mode 100644 index 00000000000000..ee8fa6c2bc577b --- /dev/null +++ b/package/kernel/mac80211/patches/008-fix-genl-family-id.patch @@ -0,0 +1,10 @@ +--- a/compat/backport-4.12.c ++++ b/compat/backport-4.12.c +@@ -224,6 +224,7 @@ int bp_extack_genl_register_family(struc + } + + /* copy this since the family might access it directly */ ++ family->id = copy->family.id; + family->attrbuf = copy->family.attrbuf; + family->mcgrp_offset = copy->family.mcgrp_offset; + diff --git a/package/kernel/mac80211/patches/050-lib80211_option.patch b/package/kernel/mac80211/patches/050-lib80211_option.patch index 3fc8c052071e99..28a0d905b718e1 100644 --- a/package/kernel/mac80211/patches/050-lib80211_option.patch +++ b/package/kernel/mac80211/patches/050-lib80211_option.patch @@ -1,6 +1,6 @@ --- a/net/wireless/Kconfig +++ b/net/wireless/Kconfig -@@ -171,7 +171,7 @@ config CFG80211_WEXT_EXPORT +@@ -181,7 +181,7 @@ config CFG80211_WEXT_EXPORT wext compatibility symbols to be exported. config LIB80211 @@ -9,7 +9,7 @@ depends on m default n help -@@ -181,15 +181,15 @@ config LIB80211 +@@ -191,15 +191,15 @@ config LIB80211 Drivers should select this themselves if needed. config LIB80211_CRYPT_WEP diff --git a/package/kernel/mac80211/patches/060-no_local_ssb_bcma.patch b/package/kernel/mac80211/patches/060-no_local_ssb_bcma.patch index 1fc52f9ab0f671..d897b2b40eb8cd 100644 --- a/package/kernel/mac80211/patches/060-no_local_ssb_bcma.patch +++ b/package/kernel/mac80211/patches/060-no_local_ssb_bcma.patch @@ -1,6 +1,6 @@ --- a/local-symbols +++ b/local-symbols -@@ -383,45 +383,6 @@ USB_IPHETH= +@@ -388,45 +388,6 @@ USB_IPHETH= USB_SIERRA_NET= USB_VL600= USB_NET_CH9200= @@ -121,7 +121,7 @@ #source "$BACKPORT_DIR/drivers/media/Kconfig" --- a/Makefile.kernel +++ b/Makefile.kernel -@@ -39,8 +39,6 @@ obj-$(CPTCFG_MAC80211) += net/mac80211/ +@@ -42,8 +42,6 @@ obj-$(CPTCFG_MAC80211) += net/mac80211/ obj-$(CPTCFG_WLAN) += drivers/net/wireless/ #obj-$(CPTCFG_BT) += net/bluetooth/ #obj-$(CPTCFG_BT) += drivers/bluetooth/ diff --git a/package/kernel/mac80211/patches/100-remove-cryptoapi-dependencies.patch b/package/kernel/mac80211/patches/100-remove-cryptoapi-dependencies.patch index 0febc57b3f3bea..aa44149aed05a9 100644 --- a/package/kernel/mac80211/patches/100-remove-cryptoapi-dependencies.patch +++ b/package/kernel/mac80211/patches/100-remove-cryptoapi-dependencies.patch @@ -1,270 +1,388 @@ ---- a/net/mac80211/Kconfig -+++ b/net/mac80211/Kconfig -@@ -5,8 +5,6 @@ config MAC80211 - depends on CRYPTO - depends on CRYPTO_ARC4 - depends on CRYPTO_AES -- select BPAUTO_CRYPTO_CCM -- depends on CRYPTO_GCM - depends on CRYPTO_CMAC - depends on CRC32 - ---help--- --- a/net/mac80211/Makefile +++ b/net/mac80211/Makefile -@@ -16,9 +16,7 @@ mac80211-y := \ +@@ -6,7 +6,6 @@ mac80211-y := \ + driver-ops.o \ + sta_info.o \ + wep.o \ +- aead_api.o \ + wpa.o \ + scan.o offchannel.o \ + ht.o agg-tx.o agg-rx.o \ +@@ -16,8 +15,8 @@ mac80211-y := \ + rate.o \ michael.o \ tkip.o \ - aes_ccm.o \ -- aes_gcm.o \ ++ aes_ccm.o \ aes_cmac.o \ - aes_gmac.o \ fils_aead.o \ cfg.o \ ethtool.o \ ---- a/net/mac80211/aes_ccm.c -+++ b/net/mac80211/aes_ccm.c -@@ -13,103 +13,132 @@ - #include - #include - #include -+#include - - #include - #include "key.h" - #include "aes_ccm.h" - --int ieee80211_aes_ccm_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, -- u8 *data, size_t data_len, u8 *mic, -- size_t mic_len) -+static void aes_ccm_prepare(struct crypto_cipher *tfm, u8 *b_0, u8 *aad, u8 *s_0, -+ u8 *a, u8 *b) - { +--- a/net/mac80211/aead_api.c ++++ /dev/null +@@ -1,115 +0,0 @@ +-/* +- * Copyright 2003-2004, Instant802 Networks, Inc. +- * Copyright 2005-2006, Devicescape Software, Inc. +- * Copyright 2014-2015, Qualcomm Atheros, Inc. +- * +- * Rewrite: Copyright (C) 2013 Linaro Ltd +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License version 2 as +- * published by the Free Software Foundation. +- */ +- +-#include +-#include +-#include +-#include +-#include +- +-#include "aead_api.h" +- +-int aead_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, size_t aad_len, +- u8 *data, size_t data_len, u8 *mic) +-{ +- size_t mic_len = crypto_aead_authsize(tfm); - struct scatterlist sg[3]; - struct aead_request *aead_req; - int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); - u8 *__aad; -+ int i; - -- aead_req = kzalloc(reqsize + CCM_AAD_LEN, GFP_ATOMIC); +- +- aead_req = kzalloc(reqsize + aad_len, GFP_ATOMIC); - if (!aead_req) - return -ENOMEM; -+ crypto_cipher_encrypt_one(tfm, b, b_0); - +- - __aad = (u8 *)aead_req + reqsize; -- memcpy(__aad, aad, CCM_AAD_LEN); -+ /* Extra Authenticate-only data (always two AES blocks) */ -+ for (i = 0; i < AES_BLOCK_SIZE; i++) -+ aad[i] ^= b[i]; -+ crypto_cipher_encrypt_one(tfm, b, aad); - +- memcpy(__aad, aad, aad_len); +- - sg_init_table(sg, 3); -- sg_set_buf(&sg[0], &__aad[2], be16_to_cpup((__be16 *)__aad)); +- sg_set_buf(&sg[0], __aad, aad_len); - sg_set_buf(&sg[1], data, data_len); - sg_set_buf(&sg[2], mic, mic_len); -+ aad += AES_BLOCK_SIZE; - +- - aead_request_set_tfm(aead_req, tfm); - aead_request_set_crypt(aead_req, sg, sg, data_len, b_0); - aead_request_set_ad(aead_req, sg[0].length); -+ for (i = 0; i < AES_BLOCK_SIZE; i++) -+ aad[i] ^= b[i]; -+ crypto_cipher_encrypt_one(tfm, a, aad); - +- - crypto_aead_encrypt(aead_req); - kzfree(aead_req); -+ /* Mask out bits from auth-only-b_0 */ -+ b_0[0] &= 0x07; - +- - return 0; -+ /* S_0 is used to encrypt T (= MIC) */ -+ b_0[14] = 0; -+ b_0[15] = 0; -+ crypto_cipher_encrypt_one(tfm, s_0, b_0); - } - --int ieee80211_aes_ccm_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, -- u8 *data, size_t data_len, u8 *mic, -- size_t mic_len) -+ -+void ieee80211_aes_ccm_encrypt(struct crypto_cipher *tfm, u8 *b_0, u8 *aad, -+ u8 *data, size_t data_len, u8 *mic, -+ size_t mic_len) - { +-} +- +-int aead_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, size_t aad_len, +- u8 *data, size_t data_len, u8 *mic) +-{ +- size_t mic_len = crypto_aead_authsize(tfm); - struct scatterlist sg[3]; - struct aead_request *aead_req; - int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); - u8 *__aad; - int err; -+ int i, j, last_len, num_blocks; -+ u8 b[AES_BLOCK_SIZE]; -+ u8 s_0[AES_BLOCK_SIZE]; -+ u8 e[AES_BLOCK_SIZE]; -+ u8 *pos, *cpos; - +- - if (data_len == 0) - return -EINVAL; -+ num_blocks = DIV_ROUND_UP(data_len, AES_BLOCK_SIZE); -+ last_len = data_len % AES_BLOCK_SIZE; -+ aes_ccm_prepare(tfm, b_0, aad, s_0, b, b); - -- aead_req = kzalloc(reqsize + CCM_AAD_LEN, GFP_ATOMIC); +- +- aead_req = kzalloc(reqsize + aad_len, GFP_ATOMIC); - if (!aead_req) - return -ENOMEM; -+ /* Process payload blocks */ -+ pos = data; -+ cpos = data; -+ for (j = 1; j <= num_blocks; j++) { -+ int blen = (j == num_blocks && last_len) ? -+ last_len : AES_BLOCK_SIZE; - +- - __aad = (u8 *)aead_req + reqsize; -- memcpy(__aad, aad, CCM_AAD_LEN); -+ /* Authentication followed by encryption */ -+ for (i = 0; i < blen; i++) -+ b[i] ^= pos[i]; -+ crypto_cipher_encrypt_one(tfm, b, b); - +- memcpy(__aad, aad, aad_len); +- - sg_init_table(sg, 3); -- sg_set_buf(&sg[0], &__aad[2], be16_to_cpup((__be16 *)__aad)); +- sg_set_buf(&sg[0], __aad, aad_len); - sg_set_buf(&sg[1], data, data_len); - sg_set_buf(&sg[2], mic, mic_len); -+ b_0[14] = (j >> 8) & 0xff; -+ b_0[15] = j & 0xff; -+ crypto_cipher_encrypt_one(tfm, e, b_0); -+ for (i = 0; i < blen; i++) -+ *cpos++ = *pos++ ^ e[i]; -+ } - +- - aead_request_set_tfm(aead_req, tfm); - aead_request_set_crypt(aead_req, sg, sg, data_len + mic_len, b_0); - aead_request_set_ad(aead_req, sg[0].length); -+ for (i = 0; i < mic_len; i++) -+ mic[i] = b[i] ^ s_0[i]; -+} - +- - err = crypto_aead_decrypt(aead_req); - kzfree(aead_req); -+int ieee80211_aes_ccm_decrypt(struct crypto_cipher *tfm, u8 *b_0, u8 *aad, -+ u8 *data, size_t data_len, u8 *mic, -+ size_t mic_len) -+{ -+ int i, j, last_len, num_blocks; -+ u8 *pos, *cpos; -+ u8 a[AES_BLOCK_SIZE]; -+ u8 b[AES_BLOCK_SIZE]; -+ u8 s_0[AES_BLOCK_SIZE]; - +- - return err; -+ num_blocks = DIV_ROUND_UP(data_len, AES_BLOCK_SIZE); -+ last_len = data_len % AES_BLOCK_SIZE; -+ aes_ccm_prepare(tfm, b_0, aad, s_0, a, b); -+ -+ /* Process payload blocks */ -+ cpos = data; -+ pos = data; -+ for (j = 1; j <= num_blocks; j++) { -+ int blen = (j == num_blocks && last_len) ? -+ last_len : AES_BLOCK_SIZE; -+ -+ /* Decryption followed by authentication */ -+ b_0[14] = (j >> 8) & 0xff; -+ b_0[15] = j & 0xff; -+ crypto_cipher_encrypt_one(tfm, b, b_0); -+ for (i = 0; i < blen; i++) { -+ *pos = *cpos++ ^ b[i]; -+ a[i] ^= *pos++; -+ } -+ crypto_cipher_encrypt_one(tfm, a, a); -+ } -+ -+ for (i = 0; i < mic_len; i++) { -+ if ((mic[i] ^ s_0[i]) != a[i]) -+ return -1; -+ } -+ -+ return 0; - } - --struct crypto_aead *ieee80211_aes_key_setup_encrypt(const u8 key[], -- size_t key_len, -- size_t mic_len) -+struct crypto_cipher *ieee80211_aes_key_setup_encrypt(const u8 key[], -+ size_t key_len, -+ size_t mic_len) - { +-} +- +-struct crypto_aead * +-aead_key_setup_encrypt(const char *alg, const u8 key[], +- size_t key_len, size_t mic_len) +-{ - struct crypto_aead *tfm; - int err; - -- tfm = crypto_alloc_aead("ccm(aes)", 0, CRYPTO_ALG_ASYNC); +- tfm = crypto_alloc_aead(alg, 0, CRYPTO_ALG_ASYNC); - if (IS_ERR(tfm)) - return tfm; -+ struct crypto_cipher *tfm; - +- - err = crypto_aead_setkey(tfm, key, key_len); - if (err) - goto free_aead; - err = crypto_aead_setauthsize(tfm, mic_len); - if (err) - goto free_aead; -+ tfm = crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC); -+ if (!IS_ERR(tfm)) -+ crypto_cipher_setkey(tfm, key, key_len); - - return tfm; +- +- return tfm; - -free_aead: - crypto_free_aead(tfm); - return ERR_PTR(err); - } - --void ieee80211_aes_key_free(struct crypto_aead *tfm) -+ -+void ieee80211_aes_key_free(struct crypto_cipher *tfm) - { +-} +- +-void aead_key_free(struct crypto_aead *tfm) +-{ - crypto_free_aead(tfm); -+ crypto_free_cipher(tfm); - } ---- a/net/mac80211/aes_gmac.h -+++ b/net/mac80211/aes_gmac.h -@@ -15,10 +15,22 @@ - #define GMAC_MIC_LEN 16 - #define GMAC_NONCE_LEN 12 +-} +--- a/net/mac80211/aead_api.h ++++ /dev/null +@@ -1,27 +0,0 @@ +-/* +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License version 2 as +- * published by the Free Software Foundation. +- */ +- +-#ifndef _AEAD_API_H +-#define _AEAD_API_H +- +-#include +-#include +- +-struct crypto_aead * +-aead_key_setup_encrypt(const char *alg, const u8 key[], +- size_t key_len, size_t mic_len); +- +-int aead_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, +- size_t aad_len, u8 *data, +- size_t data_len, u8 *mic); +- +-int aead_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, +- size_t aad_len, u8 *data, +- size_t data_len, u8 *mic); +- +-void aead_key_free(struct crypto_aead *tfm); +- +-#endif /* _AEAD_API_H */ +--- a/net/mac80211/aes_ccm.h ++++ b/net/mac80211/aes_ccm.h +@@ -10,39 +10,17 @@ + #ifndef AES_CCM_H + #define AES_CCM_H --struct crypto_aead *ieee80211_aes_gmac_key_setup(const u8 key[], -- size_t key_len); --int ieee80211_aes_gmac(struct crypto_aead *tfm, const u8 *aad, u8 *nonce, -- const u8 *data, size_t data_len, u8 *mic); --void ieee80211_aes_gmac_key_free(struct crypto_aead *tfm); -+static inline struct crypto_aead * -+ieee80211_aes_gmac_key_setup(const u8 key[], size_t key_len) +-#include "aead_api.h" +- +-#define CCM_AAD_LEN 32 +- +-static inline struct crypto_aead * +-ieee80211_aes_key_setup_encrypt(const u8 key[], size_t key_len, size_t mic_len) +-{ +- return aead_key_setup_encrypt("ccm(aes)", key, key_len, mic_len); +-} +- +-static inline int +-ieee80211_aes_ccm_encrypt(struct crypto_aead *tfm, +- u8 *b_0, u8 *aad, u8 *data, +- size_t data_len, u8 *mic) +-{ +- return aead_encrypt(tfm, b_0, aad + 2, +- be16_to_cpup((__be16 *)aad), +- data, data_len, mic); +-} +- +-static inline int +-ieee80211_aes_ccm_decrypt(struct crypto_aead *tfm, +- u8 *b_0, u8 *aad, u8 *data, +- size_t data_len, u8 *mic) +-{ +- return aead_decrypt(tfm, b_0, aad + 2, +- be16_to_cpup((__be16 *)aad), +- data, data_len, mic); +-} ++#include + +-static inline void ieee80211_aes_key_free(struct crypto_aead *tfm) +-{ +- return aead_key_free(tfm); +-} ++struct crypto_cipher *ieee80211_aes_key_setup_encrypt(const u8 key[], ++ size_t key_len, ++ size_t mic_len); ++void ieee80211_aes_ccm_encrypt(struct crypto_cipher *tfm, u8 *b_0, u8 *aad, ++ u8 *data, size_t data_len, u8 *mic, ++ size_t mic_len); ++int ieee80211_aes_ccm_decrypt(struct crypto_cipher *tfm, u8 *b_0, u8 *aad, ++ u8 *data, size_t data_len, u8 *mic, ++ size_t mic_len); ++void ieee80211_aes_key_free(struct crypto_cipher *tfm); + + #endif /* AES_CCM_H */ +--- /dev/null ++++ b/net/mac80211/aes_gcm.c +@@ -0,0 +1,109 @@ ++/* ++ * Copyright 2014-2015, Qualcomm Atheros, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include "key.h" ++#include "aes_gcm.h" ++ ++int ieee80211_aes_gcm_encrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, ++ u8 *data, size_t data_len, u8 *mic) +{ -+ return NULL; ++ struct scatterlist sg[3]; ++ struct aead_request *aead_req; ++ int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); ++ u8 *__aad; ++ ++ aead_req = kzalloc(reqsize + GCM_AAD_LEN, GFP_ATOMIC); ++ if (!aead_req) ++ return -ENOMEM; ++ ++ __aad = (u8 *)aead_req + reqsize; ++ memcpy(__aad, aad, GCM_AAD_LEN); ++ ++ sg_init_table(sg, 3); ++ sg_set_buf(&sg[0], &__aad[2], be16_to_cpup((__be16 *)__aad)); ++ sg_set_buf(&sg[1], data, data_len); ++ sg_set_buf(&sg[2], mic, IEEE80211_GCMP_MIC_LEN); ++ ++ aead_request_set_tfm(aead_req, tfm); ++ aead_request_set_crypt(aead_req, sg, sg, data_len, j_0); ++ aead_request_set_ad(aead_req, sg[0].length); ++ ++ crypto_aead_encrypt(aead_req); ++ kzfree(aead_req); ++ return 0; +} + -+static inline int -+ieee80211_aes_gmac(struct crypto_aead *tfm, const u8 *aad, u8 *nonce, -+ const u8 *data, size_t data_len, u8 *mic) ++int ieee80211_aes_gcm_decrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, ++ u8 *data, size_t data_len, u8 *mic) +{ -+ return -EOPNOTSUPP; ++ struct scatterlist sg[3]; ++ struct aead_request *aead_req; ++ int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); ++ u8 *__aad; ++ int err; ++ ++ if (data_len == 0) ++ return -EINVAL; ++ ++ aead_req = kzalloc(reqsize + GCM_AAD_LEN, GFP_ATOMIC); ++ if (!aead_req) ++ return -ENOMEM; ++ ++ __aad = (u8 *)aead_req + reqsize; ++ memcpy(__aad, aad, GCM_AAD_LEN); ++ ++ sg_init_table(sg, 3); ++ sg_set_buf(&sg[0], &__aad[2], be16_to_cpup((__be16 *)__aad)); ++ sg_set_buf(&sg[1], data, data_len); ++ sg_set_buf(&sg[2], mic, IEEE80211_GCMP_MIC_LEN); ++ ++ aead_request_set_tfm(aead_req, tfm); ++ aead_request_set_crypt(aead_req, sg, sg, ++ data_len + IEEE80211_GCMP_MIC_LEN, j_0); ++ aead_request_set_ad(aead_req, sg[0].length); ++ ++ err = crypto_aead_decrypt(aead_req); ++ kzfree(aead_req); ++ ++ return err; +} + -+static inline void -+ieee80211_aes_gmac_key_free(struct crypto_aead *tfm) ++struct crypto_aead *ieee80211_aes_gcm_key_setup_encrypt(const u8 key[], ++ size_t key_len) ++{ ++ struct crypto_aead *tfm; ++ int err; ++ ++ tfm = crypto_alloc_aead("gcm(aes)", 0, CRYPTO_ALG_ASYNC); ++ if (IS_ERR(tfm)) ++ return tfm; ++ ++ err = crypto_aead_setkey(tfm, key, key_len); ++ if (err) ++ goto free_aead; ++ err = crypto_aead_setauthsize(tfm, IEEE80211_GCMP_MIC_LEN); ++ if (err) ++ goto free_aead; ++ ++ return tfm; ++ ++free_aead: ++ crypto_free_aead(tfm); ++ return ERR_PTR(err); ++} ++ ++void ieee80211_aes_gcm_key_free(struct crypto_aead *tfm) +{ ++ crypto_free_aead(tfm); +} +--- a/net/mac80211/aes_gcm.h ++++ b/net/mac80211/aes_gcm.h +@@ -9,38 +9,30 @@ + #ifndef AES_GCM_H + #define AES_GCM_H - #endif /* AES_GMAC_H */ ---- a/net/mac80211/key.h -+++ b/net/mac80211/key.h -@@ -88,7 +88,7 @@ struct ieee80211_key { - * Management frames. - */ - u8 rx_pn[IEEE80211_NUM_TIDS + 1][IEEE80211_CCMP_PN_LEN]; -- struct crypto_aead *tfm; -+ struct crypto_cipher *tfm; - u32 replays; /* dot11RSNAStatsCCMPReplays */ - } ccmp; - struct { +-#include "aead_api.h" +- +-#define GCM_AAD_LEN 32 ++#include + +-static inline int ieee80211_aes_gcm_encrypt(struct crypto_aead *tfm, +- u8 *j_0, u8 *aad, u8 *data, +- size_t data_len, u8 *mic) ++static inline void ++ieee80211_aes_gcm_encrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, ++ u8 *data, size_t data_len, u8 *mic) + { +- return aead_encrypt(tfm, j_0, aad + 2, +- be16_to_cpup((__be16 *)aad), +- data, data_len, mic); + } + +-static inline int ieee80211_aes_gcm_decrypt(struct crypto_aead *tfm, +- u8 *j_0, u8 *aad, u8 *data, +- size_t data_len, u8 *mic) ++static inline int ++ieee80211_aes_gcm_decrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, ++ u8 *data, size_t data_len, u8 *mic) + { +- return aead_decrypt(tfm, j_0, aad + 2, +- be16_to_cpup((__be16 *)aad), +- data, data_len, mic); ++ return -EOPNOTSUPP; + } + + static inline struct crypto_aead * + ieee80211_aes_gcm_key_setup_encrypt(const u8 key[], size_t key_len) + { +- return aead_key_setup_encrypt("gcm(aes)", key, +- key_len, IEEE80211_GCMP_MIC_LEN); ++ return NULL; + } + +-static inline void ieee80211_aes_gcm_key_free(struct crypto_aead *tfm) ++static inline void ++ieee80211_aes_gcm_key_free(struct crypto_aead *tfm) + { +- return aead_key_free(tfm); + } + + #endif /* AES_GCM_H */ --- a/net/mac80211/wpa.c +++ b/net/mac80211/wpa.c @@ -306,7 +306,8 @@ ieee80211_crypto_tkip_decrypt(struct iee @@ -318,7 +436,7 @@ pos += IEEE80211_CCMP_HDR_LEN; - ccmp_special_blocks(skb, pn, b_0, aad); - return ieee80211_aes_ccm_encrypt(key->u.ccmp.tfm, b_0, aad, pos, len, -- skb_put(skb, mic_len), mic_len); +- skb_put(skb, mic_len)); + ccmp_special_blocks(skb, pn, b_0, aad, len); + ieee80211_aes_ccm_encrypt(key->u.ccmp.tfm, b_0, aad, pos, len, + skb_put(skb, mic_len), mic_len); @@ -327,7 +445,7 @@ } -@@ -537,7 +536,7 @@ ieee80211_crypto_ccmp_decrypt(struct iee +@@ -537,13 +536,13 @@ ieee80211_crypto_ccmp_decrypt(struct iee u8 aad[2 * AES_BLOCK_SIZE]; u8 b_0[AES_BLOCK_SIZE]; /* hardware didn't decrypt/verify MIC */ @@ -336,6 +454,13 @@ if (ieee80211_aes_ccm_decrypt( key->u.ccmp.tfm, b_0, aad, + skb->data + hdrlen + IEEE80211_CCMP_HDR_LEN, + data_len, +- skb->data + skb->len - mic_len)) ++ skb->data + skb->len - mic_len, mic_len)) + return RX_DROP_UNUSABLE; + } + @@ -639,7 +638,7 @@ static int gcmp_encrypt_skb(struct ieee8 u8 *pos; u8 pn[6]; @@ -379,70 +504,202 @@ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; if (!ieee80211_is_mgmt(hdr->frame_control)) ---- a/net/mac80211/aes_ccm.h -+++ b/net/mac80211/aes_ccm.h -@@ -12,17 +12,15 @@ - - #include - --#define CCM_AAD_LEN 32 -- --struct crypto_aead *ieee80211_aes_key_setup_encrypt(const u8 key[], -- size_t key_len, -- size_t mic_len); --int ieee80211_aes_ccm_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, -- u8 *data, size_t data_len, u8 *mic, -- size_t mic_len); --int ieee80211_aes_ccm_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, -+struct crypto_cipher *ieee80211_aes_key_setup_encrypt(const u8 key[], -+ size_t key_len, -+ size_t mic_len); +--- /dev/null ++++ b/net/mac80211/aes_ccm.c +@@ -0,0 +1,144 @@ ++/* ++ * Copyright 2003-2004, Instant802 Networks, Inc. ++ * Copyright 2005-2006, Devicescape Software, Inc. ++ * ++ * Rewrite: Copyright (C) 2013 Linaro Ltd ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include "key.h" ++#include "aes_ccm.h" ++ ++static void aes_ccm_prepare(struct crypto_cipher *tfm, u8 *b_0, u8 *aad, u8 *s_0, ++ u8 *a, u8 *b) ++{ ++ int i; ++ ++ crypto_cipher_encrypt_one(tfm, b, b_0); ++ ++ /* Extra Authenticate-only data (always two AES blocks) */ ++ for (i = 0; i < AES_BLOCK_SIZE; i++) ++ aad[i] ^= b[i]; ++ crypto_cipher_encrypt_one(tfm, b, aad); ++ ++ aad += AES_BLOCK_SIZE; ++ ++ for (i = 0; i < AES_BLOCK_SIZE; i++) ++ aad[i] ^= b[i]; ++ crypto_cipher_encrypt_one(tfm, a, aad); ++ ++ /* Mask out bits from auth-only-b_0 */ ++ b_0[0] &= 0x07; ++ ++ /* S_0 is used to encrypt T (= MIC) */ ++ b_0[14] = 0; ++ b_0[15] = 0; ++ crypto_cipher_encrypt_one(tfm, s_0, b_0); ++} ++ ++ +void ieee80211_aes_ccm_encrypt(struct crypto_cipher *tfm, u8 *b_0, u8 *aad, + u8 *data, size_t data_len, u8 *mic, -+ size_t mic_len); ++ size_t mic_len) ++{ ++ int i, j, last_len, num_blocks; ++ u8 b[AES_BLOCK_SIZE]; ++ u8 s_0[AES_BLOCK_SIZE]; ++ u8 e[AES_BLOCK_SIZE]; ++ u8 *pos, *cpos; ++ ++ num_blocks = DIV_ROUND_UP(data_len, AES_BLOCK_SIZE); ++ last_len = data_len % AES_BLOCK_SIZE; ++ aes_ccm_prepare(tfm, b_0, aad, s_0, b, b); ++ ++ /* Process payload blocks */ ++ pos = data; ++ cpos = data; ++ for (j = 1; j <= num_blocks; j++) { ++ int blen = (j == num_blocks && last_len) ? ++ last_len : AES_BLOCK_SIZE; ++ ++ /* Authentication followed by encryption */ ++ for (i = 0; i < blen; i++) ++ b[i] ^= pos[i]; ++ crypto_cipher_encrypt_one(tfm, b, b); ++ ++ b_0[14] = (j >> 8) & 0xff; ++ b_0[15] = j & 0xff; ++ crypto_cipher_encrypt_one(tfm, e, b_0); ++ for (i = 0; i < blen; i++) ++ *cpos++ = *pos++ ^ e[i]; ++ } ++ ++ for (i = 0; i < mic_len; i++) ++ mic[i] = b[i] ^ s_0[i]; ++} ++ +int ieee80211_aes_ccm_decrypt(struct crypto_cipher *tfm, u8 *b_0, u8 *aad, - u8 *data, size_t data_len, u8 *mic, - size_t mic_len); --void ieee80211_aes_key_free(struct crypto_aead *tfm); -+void ieee80211_aes_key_free(struct crypto_cipher *tfm); - - #endif /* AES_CCM_H */ ---- a/net/mac80211/aes_gcm.h -+++ b/net/mac80211/aes_gcm.h -@@ -11,14 +11,28 @@ - - #include - --#define GCM_AAD_LEN 32 -+static inline void -+ieee80211_aes_gcm_encrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, -+ u8 *data, size_t data_len, u8 *mic) ++ u8 *data, size_t data_len, u8 *mic, ++ size_t mic_len) +{ ++ int i, j, last_len, num_blocks; ++ u8 *pos, *cpos; ++ u8 a[AES_BLOCK_SIZE]; ++ u8 b[AES_BLOCK_SIZE]; ++ u8 s_0[AES_BLOCK_SIZE]; ++ ++ num_blocks = DIV_ROUND_UP(data_len, AES_BLOCK_SIZE); ++ last_len = data_len % AES_BLOCK_SIZE; ++ aes_ccm_prepare(tfm, b_0, aad, s_0, a, b); ++ ++ /* Process payload blocks */ ++ cpos = data; ++ pos = data; ++ for (j = 1; j <= num_blocks; j++) { ++ int blen = (j == num_blocks && last_len) ? ++ last_len : AES_BLOCK_SIZE; ++ ++ /* Decryption followed by authentication */ ++ b_0[14] = (j >> 8) & 0xff; ++ b_0[15] = j & 0xff; ++ crypto_cipher_encrypt_one(tfm, b, b_0); ++ for (i = 0; i < blen; i++) { ++ *pos = *cpos++ ^ b[i]; ++ a[i] ^= *pos++; ++ } ++ crypto_cipher_encrypt_one(tfm, a, a); ++ } ++ ++ for (i = 0; i < mic_len; i++) { ++ if ((mic[i] ^ s_0[i]) != a[i]) ++ return -1; ++ } ++ ++ return 0; +} - --int ieee80211_aes_gcm_encrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, -- u8 *data, size_t data_len, u8 *mic); --int ieee80211_aes_gcm_decrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, -- u8 *data, size_t data_len, u8 *mic); --struct crypto_aead *ieee80211_aes_gcm_key_setup_encrypt(const u8 key[], -- size_t key_len); --void ieee80211_aes_gcm_key_free(struct crypto_aead *tfm); -+static inline int -+ieee80211_aes_gcm_decrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, -+ u8 *data, size_t data_len, u8 *mic) ++ ++struct crypto_cipher *ieee80211_aes_key_setup_encrypt(const u8 key[], ++ size_t key_len, ++ size_t mic_len) +{ -+ return -EOPNOTSUPP; ++ struct crypto_cipher *tfm; ++ ++ tfm = crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC); ++ if (!IS_ERR(tfm)) ++ crypto_cipher_setkey(tfm, key, key_len); ++ ++ return tfm; +} + ++ ++void ieee80211_aes_key_free(struct crypto_cipher *tfm) ++{ ++ crypto_free_cipher(tfm); ++} +--- a/net/mac80211/Kconfig ++++ b/net/mac80211/Kconfig +@@ -5,8 +5,6 @@ config MAC80211 + depends on CRYPTO + depends on CRYPTO_ARC4 + depends on CRYPTO_AES +- depends on CRYPTO_CCM +- depends on CRYPTO_GCM + depends on CRYPTO_CMAC + depends on CRC32 + ---help--- +--- a/net/mac80211/aes_gmac.h ++++ b/net/mac80211/aes_gmac.h +@@ -15,10 +15,22 @@ + #define GMAC_MIC_LEN 16 + #define GMAC_NONCE_LEN 12 + +-struct crypto_aead *ieee80211_aes_gmac_key_setup(const u8 key[], +- size_t key_len); +-int ieee80211_aes_gmac(struct crypto_aead *tfm, const u8 *aad, u8 *nonce, +- const u8 *data, size_t data_len, u8 *mic); +-void ieee80211_aes_gmac_key_free(struct crypto_aead *tfm); +static inline struct crypto_aead * -+ieee80211_aes_gcm_key_setup_encrypt(const u8 key[], size_t key_len) ++ieee80211_aes_gmac_key_setup(const u8 key[], size_t key_len) +{ -+ return NULL; ++ return NULL; ++} ++ ++static inline int ++ieee80211_aes_gmac(struct crypto_aead *tfm, const u8 *aad, u8 *nonce, ++ const u8 *data, size_t data_len, u8 *mic) ++{ ++ return -EOPNOTSUPP; +} + +static inline void -+ieee80211_aes_gcm_key_free(struct crypto_aead *tfm) ++ieee80211_aes_gmac_key_free(struct crypto_aead *tfm) +{ +} - #endif /* AES_GCM_H */ + #endif /* AES_GMAC_H */ +--- a/net/mac80211/key.h ++++ b/net/mac80211/key.h +@@ -88,7 +88,7 @@ struct ieee80211_key { + * Management frames. + */ + u8 rx_pn[IEEE80211_NUM_TIDS + 1][IEEE80211_CCMP_PN_LEN]; +- struct crypto_aead *tfm; ++ struct crypto_cipher *tfm; + u32 replays; /* dot11RSNAStatsCCMPReplays */ + } ccmp; + struct { diff --git a/package/kernel/mac80211/patches/110-mac80211_keep_keys_on_stop_ap.patch b/package/kernel/mac80211/patches/110-mac80211_keep_keys_on_stop_ap.patch index 005e3e5d5d4480..3b1fcdf9c82077 100644 --- a/package/kernel/mac80211/patches/110-mac80211_keep_keys_on_stop_ap.patch +++ b/package/kernel/mac80211/patches/110-mac80211_keep_keys_on_stop_ap.patch @@ -2,7 +2,7 @@ Used for AP+STA support in OpenWrt - preserve AP mode keys across STA reconnects --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -1056,7 +1056,6 @@ static int ieee80211_stop_ap(struct wiph +@@ -1058,7 +1058,6 @@ static int ieee80211_stop_ap(struct wiph sdata->u.ap.driver_smps_mode = IEEE80211_SMPS_OFF; __sta_info_flush(sdata, true); diff --git a/package/kernel/mac80211/patches/140-tweak-TSQ-setting.patch b/package/kernel/mac80211/patches/140-tweak-TSQ-setting.patch new file mode 100644 index 00000000000000..6e9a07a92741bc --- /dev/null +++ b/package/kernel/mac80211/patches/140-tweak-TSQ-setting.patch @@ -0,0 +1,15 @@ +--- a/net/mac80211/tx.c ++++ b/net/mac80211/tx.c +@@ -3750,6 +3750,12 @@ out: + netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, + struct net_device *dev) + { ++#if defined(sk_pacing_shift) || LINUX_VERSION_IS_GEQ(4,15,0) ++ if (skb->sk && sk_fullsock(skb->sk) && ++ skb->sk->sk_pacing_shift != 6) ++ skb->sk->sk_pacing_shift = 6; ++#endif ++ + if (unlikely(ieee80211_multicast_to_unicast(skb, dev))) { + struct sk_buff_head queue; + diff --git a/package/kernel/mac80211/patches/150-disable_addr_notifier.patch b/package/kernel/mac80211/patches/150-disable_addr_notifier.patch index 42a692a1fcd85f..781dd3c1bc15bf 100644 --- a/package/kernel/mac80211/patches/150-disable_addr_notifier.patch +++ b/package/kernel/mac80211/patches/150-disable_addr_notifier.patch @@ -18,7 +18,7 @@ static int ieee80211_ifa6_changed(struct notifier_block *nb, unsigned long data, void *arg) { -@@ -1115,14 +1115,14 @@ int ieee80211_register_hw(struct ieee802 +@@ -1114,14 +1114,14 @@ int ieee80211_register_hw(struct ieee802 if (result) goto fail_flows; @@ -35,7 +35,7 @@ local->ifa6_notifier.notifier_call = ieee80211_ifa6_changed; result = register_inet6addr_notifier(&local->ifa6_notifier); if (result) -@@ -1131,13 +1131,13 @@ int ieee80211_register_hw(struct ieee802 +@@ -1130,13 +1130,13 @@ int ieee80211_register_hw(struct ieee802 return 0; @@ -52,7 +52,7 @@ fail_ifa: #endif ieee80211_txq_teardown_flows(local); -@@ -1167,10 +1167,10 @@ void ieee80211_unregister_hw(struct ieee +@@ -1166,10 +1166,10 @@ void ieee80211_unregister_hw(struct ieee tasklet_kill(&local->tx_pending_tasklet); tasklet_kill(&local->tasklet); diff --git a/package/kernel/mac80211/patches/210-ap_scan.patch b/package/kernel/mac80211/patches/210-ap_scan.patch index e9999e32b91667..8ade963c9f909d 100644 --- a/package/kernel/mac80211/patches/210-ap_scan.patch +++ b/package/kernel/mac80211/patches/210-ap_scan.patch @@ -1,6 +1,6 @@ --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -2212,7 +2212,7 @@ static int ieee80211_scan(struct wiphy * +@@ -2215,7 +2215,7 @@ static int ieee80211_scan(struct wiphy * * the frames sent while scanning on other channel will be * lost) */ diff --git a/package/kernel/mac80211/patches/307-mac80211-add-hdrlen-to-ieee80211_tx_data.patch b/package/kernel/mac80211/patches/307-mac80211-add-hdrlen-to-ieee80211_tx_data.patch index baaca173c7bc4d..83c613434d321f 100644 --- a/package/kernel/mac80211/patches/307-mac80211-add-hdrlen-to-ieee80211_tx_data.patch +++ b/package/kernel/mac80211/patches/307-mac80211-add-hdrlen-to-ieee80211_tx_data.patch @@ -48,7 +48,7 @@ Signed-off-by: Janusz Dziedzic if (likely(sta)) { if (!IS_ERR(sta)) tx->sta = sta; -@@ -3434,6 +3434,7 @@ begin: +@@ -3468,6 +3468,7 @@ begin: tx.local = local; tx.skb = skb; tx.sdata = vif_to_sdata(info->control.vif); @@ -56,7 +56,7 @@ Signed-off-by: Janusz Dziedzic if (txq->sta) tx.sta = container_of(txq->sta, struct sta_info, sta); -@@ -3756,6 +3757,7 @@ ieee80211_build_data_template(struct iee +@@ -3796,6 +3797,7 @@ ieee80211_build_data_template(struct iee hdr = (void *)skb->data; tx.sta = sta_info_get(sdata, hdr->addr1); tx.skb = skb; diff --git a/package/kernel/mac80211/patches/308-mac80211-add-NEED_ALIGNED4_SKBS-hw-flag.patch b/package/kernel/mac80211/patches/308-mac80211-add-NEED_ALIGNED4_SKBS-hw-flag.patch index 762458ba789831..a9f01b368de3cf 100644 --- a/package/kernel/mac80211/patches/308-mac80211-add-NEED_ALIGNED4_SKBS-hw-flag.patch +++ b/package/kernel/mac80211/patches/308-mac80211-add-NEED_ALIGNED4_SKBS-hw-flag.patch @@ -23,9 +23,9 @@ Signed-off-by: Janusz Dziedzic --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -2056,6 +2056,9 @@ struct ieee80211_txq { - * The stack will not do fragmentation. - * The callback for @set_frag_threshold should be set as well. +@@ -2059,6 +2059,9 @@ struct ieee80211_txq { + * @IEEE80211_HW_SUPPORTS_TDLS_BUFFER_STA: Hardware supports buffer STA on + * TDLS links. * + * @IEEE80211_HW_NEEDS_ALIGNED4_SKBS: Driver need aligned skbs to four-byte. + * Padding will be added after ieee80211_hdr, before IV/LLC. @@ -33,27 +33,27 @@ Signed-off-by: Janusz Dziedzic * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays */ enum ieee80211_hw_flags { -@@ -2098,6 +2101,7 @@ enum ieee80211_hw_flags { - IEEE80211_HW_TX_FRAG_LIST, +@@ -2102,6 +2105,7 @@ enum ieee80211_hw_flags { IEEE80211_HW_REPORTS_LOW_ACK, IEEE80211_HW_SUPPORTS_TX_FRAG, + IEEE80211_HW_SUPPORTS_TDLS_BUFFER_STA, + IEEE80211_HW_NEEDS_ALIGNED4_SKBS, /* keep last, obviously */ NUM_IEEE80211_HW_FLAGS --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c -@@ -211,6 +211,7 @@ static const char *hw_flag_names[] = { - FLAG(TX_FRAG_LIST), +@@ -212,6 +212,7 @@ static const char *hw_flag_names[] = { FLAG(REPORTS_LOW_ACK), FLAG(SUPPORTS_TX_FRAG), + FLAG(SUPPORTS_TDLS_BUFFER_STA), + FLAG(NEEDS_ALIGNED4_SKBS), #undef FLAG }; --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -1547,6 +1547,29 @@ ieee80211_vif_get_num_mcast_if(struct ie +@@ -1548,6 +1548,29 @@ ieee80211_vif_get_num_mcast_if(struct ie return -1; } @@ -85,7 +85,7 @@ Signed-off-by: Janusz Dziedzic unsigned int mpdu_len, --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h -@@ -290,7 +290,7 @@ struct ieee80211_fast_tx { +@@ -300,7 +300,7 @@ struct ieee80211_fast_tx { u8 hdr_len; u8 sa_offs, da_offs, pn_offs; u8 band; @@ -147,7 +147,7 @@ Signed-off-by: Janusz Dziedzic if (likely(sta)) { if (!IS_ERR(sta)) -@@ -2150,7 +2149,7 @@ netdev_tx_t ieee80211_monitor_start_xmit +@@ -2184,7 +2183,7 @@ netdev_tx_t ieee80211_monitor_start_xmit goto fail; hdr = (struct ieee80211_hdr *)(skb->data + len_rthdr); @@ -156,7 +156,7 @@ Signed-off-by: Janusz Dziedzic if (skb->len < len_rthdr + hdrlen) goto fail; -@@ -2368,7 +2367,7 @@ static struct sk_buff *ieee80211_build_h +@@ -2402,7 +2401,7 @@ static struct sk_buff *ieee80211_build_h struct ieee80211_chanctx_conf *chanctx_conf; struct ieee80211_sub_if_data *ap_sdata; enum nl80211_band band; @@ -165,7 +165,7 @@ Signed-off-by: Janusz Dziedzic if (IS_ERR(sta)) sta = NULL; -@@ -2588,6 +2587,9 @@ static struct sk_buff *ieee80211_build_h +@@ -2622,6 +2621,9 @@ static struct sk_buff *ieee80211_build_h hdrlen += 2; } @@ -175,7 +175,7 @@ Signed-off-by: Janusz Dziedzic /* * Drop unicast frames to unauthorised stations unless they are * EAPOL frames from the local station. -@@ -2668,6 +2670,7 @@ static struct sk_buff *ieee80211_build_h +@@ -2702,6 +2704,7 @@ static struct sk_buff *ieee80211_build_h skb_pull(skb, skip_header_bytes); head_need = hdrlen + encaps_len + meshhdrlen - skb_headroom(skb); @@ -183,7 +183,7 @@ Signed-off-by: Janusz Dziedzic /* * So we need to modify the skb header and hence need a copy of -@@ -2700,6 +2703,9 @@ static struct sk_buff *ieee80211_build_h +@@ -2734,6 +2737,9 @@ static struct sk_buff *ieee80211_build_h memcpy(skb_push(skb, meshhdrlen), &mesh_hdr, meshhdrlen); #endif @@ -193,7 +193,7 @@ Signed-off-by: Janusz Dziedzic if (ieee80211_is_data_qos(fc)) { __le16 *qos_control; -@@ -2875,6 +2881,9 @@ void ieee80211_check_fast_xmit(struct st +@@ -2909,6 +2915,9 @@ void ieee80211_check_fast_xmit(struct st fc |= cpu_to_le16(IEEE80211_STYPE_QOS_DATA); } @@ -203,7 +203,7 @@ Signed-off-by: Janusz Dziedzic /* We store the key here so there's no point in using rcu_dereference() * but that's fine because the code that changes the pointers will call * this function after doing so. For a single CPU that would be enough, -@@ -3461,7 +3470,7 @@ begin: +@@ -3495,7 +3504,7 @@ begin: if (tx.key && (tx.key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV)) diff --git a/package/kernel/mac80211/patches/317-Revert-ath10k-disable-wake_tx_queue-for-older-device.patch b/package/kernel/mac80211/patches/317-Revert-ath10k-disable-wake_tx_queue-for-older-device.patch index 5e18f285ab7fd4..56d86c1525ac30 100644 --- a/package/kernel/mac80211/patches/317-Revert-ath10k-disable-wake_tx_queue-for-older-device.patch +++ b/package/kernel/mac80211/patches/317-Revert-ath10k-disable-wake_tx_queue-for-older-device.patch @@ -9,7 +9,7 @@ in the hope that we've fixed all the performance problems now. --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -8286,15 +8286,6 @@ int ath10k_mac_register(struct ath10k *a +@@ -8319,15 +8319,6 @@ int ath10k_mac_register(struct ath10k *a ath10k_warn(ar, "failed to initialise DFS pattern detector\n"); } diff --git a/package/kernel/mac80211/patches/318-ath10k-fix-build-errors-with-CONFIG_PM.patch b/package/kernel/mac80211/patches/318-ath10k-fix-build-errors-with-CONFIG_PM.patch new file mode 100644 index 00000000000000..2aeb49dc162943 --- /dev/null +++ b/package/kernel/mac80211/patches/318-ath10k-fix-build-errors-with-CONFIG_PM.patch @@ -0,0 +1,72 @@ +From: Brian Norris +Date: Thu, 19 Oct 2017 11:45:19 -0700 +Subject: [PATCH] ath10k: fix build errors with !CONFIG_PM + +Build errors have been reported with CONFIG_PM=n: + +drivers/net/wireless/ath/ath10k/pci.c:3416:8: error: implicit +declaration of function 'ath10k_pci_suspend' +[-Werror=implicit-function-declaration] + +drivers/net/wireless/ath/ath10k/pci.c:3428:8: error: implicit +declaration of function 'ath10k_pci_resume' +[-Werror=implicit-function-declaration] + +These are caused by the combination of the following two commits: + +6af1de2e4ec4 ("ath10k: mark PM functions as __maybe_unused") +96378bd2c6cd ("ath10k: fix core PCI suspend when WoWLAN is supported but +disabled") + +Both build fine on their own. + +But now that ath10k_pci_pm_{suspend,resume}() is compiled +unconditionally, we should also compile ath10k_pci_{suspend,resume}() +unconditionally. + +And drop the #ifdef around ath10k_pci_hif_{suspend,resume}() too; they +are trivial (empty), so we're not saving much space by compiling them +out. And the alternatives would be to sprinkle more __maybe_unused, or +spread the #ifdef's further. + +Build tested with the following combinations: +CONFIG_PM=y && CONFIG_PM_SLEEP=y +CONFIG_PM=y && CONFIG_PM_SLEEP=n +CONFIG_PM=n + +Fixes: 96378bd2c6cd ("ath10k: fix core PCI suspend when WoWLAN is supported but disabled") +Fixes: 096ad2a15fd8 ("Merge branch 'ath-next'") +Signed-off-by: Brian Norris +Signed-off-by: Kalle Valo +--- + +--- a/drivers/net/wireless/ath/ath10k/pci.c ++++ b/drivers/net/wireless/ath/ath10k/pci.c +@@ -2577,8 +2577,6 @@ void ath10k_pci_hif_power_down(struct at + */ + } + +-#ifdef CONFIG_PM +- + static int ath10k_pci_hif_suspend(struct ath10k *ar) + { + /* Nothing to do; the important stuff is in the driver suspend. */ +@@ -2627,7 +2625,6 @@ static int ath10k_pci_resume(struct ath1 + + return ret; + } +-#endif + + static bool ath10k_pci_validate_cal(void *data, size_t size) + { +@@ -2782,10 +2779,8 @@ static const struct ath10k_hif_ops ath10 + .power_down = ath10k_pci_hif_power_down, + .read32 = ath10k_pci_read32, + .write32 = ath10k_pci_write32, +-#ifdef CONFIG_PM + .suspend = ath10k_pci_hif_suspend, + .resume = ath10k_pci_hif_resume, +-#endif + .fetch_cal_eeprom = ath10k_pci_hif_fetch_cal_eeprom, + }; + diff --git a/package/kernel/mac80211/patches/319-ath10k-fix-recent-bandwidth-conversion-bug.patch b/package/kernel/mac80211/patches/319-ath10k-fix-recent-bandwidth-conversion-bug.patch new file mode 100644 index 00000000000000..5d5329f27e9366 --- /dev/null +++ b/package/kernel/mac80211/patches/319-ath10k-fix-recent-bandwidth-conversion-bug.patch @@ -0,0 +1,61 @@ +From: Christian Lamparter +Date: Wed, 1 Nov 2017 21:01:57 +0100 +Subject: [PATCH] ath10k: fix recent bandwidth conversion bug + +The commit "cfg80211: make RATE_INFO_BW_20 the default" changed +the index of RATE_INFO_BW_20, but the updates to ath10k missed +the special bandwidth calculation case in +ath10k_update_per_peer_tx_stats(). + +Fixes: 842be75c77cb ("cfg80211: make RATE_INFO_BW_20 the default") +Signed-off-by: Christian Lamparter +Patchwork-Id: 10037035 +Signed-off-by: Kalle Valo +--- + +--- a/drivers/net/wireless/ath/ath10k/htt_rx.c ++++ b/drivers/net/wireless/ath/ath10k/htt_rx.c +@@ -592,6 +592,9 @@ struct amsdu_subframe_hdr { + + #define GROUP_ID_IS_SU_MIMO(x) ((x) == 0 || (x) == 63) + ++static const u8 ath10k_bw_to_mac80211[] = { RATE_INFO_BW_20, RATE_INFO_BW_40, ++ RATE_INFO_BW_80, RATE_INFO_BW_160 }; ++ + static void ath10k_htt_rx_h_rates(struct ath10k *ar, + struct ieee80211_rx_status *status, + struct htt_rx_desc *rxd) +@@ -694,23 +697,7 @@ static void ath10k_htt_rx_h_rates(struct + if (sgi) + status->enc_flags |= RX_ENC_FLAG_SHORT_GI; + +- switch (bw) { +- /* 20MHZ */ +- case 0: +- break; +- /* 40MHZ */ +- case 1: +- status->bw = RATE_INFO_BW_40; +- break; +- /* 80MHZ */ +- case 2: +- status->bw = RATE_INFO_BW_80; +- break; +- case 3: +- status->bw = RATE_INFO_BW_160; +- break; +- } +- ++ status->bw = ath10k_bw_to_mac80211[bw]; + status->encoding = RX_ENC_VHT; + break; + default: +@@ -2297,7 +2284,7 @@ ath10k_update_per_peer_tx_stats(struct a + arsta->txrate.flags |= RATE_INFO_FLAGS_SHORT_GI; + + arsta->txrate.nss = txrate.nss; +- arsta->txrate.bw = txrate.bw + RATE_INFO_BW_20; ++ arsta->txrate.bw = ath10k_bw_to_mac80211[txrate.bw]; + } + + static void ath10k_htt_fetch_peer_stats(struct ath10k *ar, diff --git a/package/kernel/mac80211/patches/320-mac80211-properly-free-requested-but-not-started-TX-.patch b/package/kernel/mac80211/patches/320-mac80211-properly-free-requested-but-not-started-TX-.patch new file mode 100644 index 00000000000000..ecc5e491207594 --- /dev/null +++ b/package/kernel/mac80211/patches/320-mac80211-properly-free-requested-but-not-started-TX-.patch @@ -0,0 +1,37 @@ +From: Johannes Berg +Date: Mon, 20 Nov 2017 17:01:44 +0100 +Subject: [PATCH] mac80211: properly free requested-but-not-started TX agg + sessions + +When deleting a station or otherwise tearing down all aggregation +sessions, make sure to delete requested but not yet started ones, +to avoid the following scenario: + + * session is requested, added to tid_start_tx[] + * ieee80211_ba_session_work() runs, gets past BLOCK_BA check + * ieee80211_sta_tear_down_BA_sessions() runs, locks &sta->ampdu_mlme.mtx, + e.g. while deleting the station - deleting all active sessions + * ieee80211_ba_session_work() continues since tear down flushes it, and + calls ieee80211_tx_ba_session_handle_start() for the new session, arms + the timer for it + * station deletion continues to __cleanup_single_sta() and frees the + session struct, while the timer is armed + +Reported-by: Fengguang Wu +Signed-off-by: Johannes Berg +--- + +--- a/net/mac80211/agg-tx.c ++++ b/net/mac80211/agg-tx.c +@@ -330,6 +330,11 @@ int ___ieee80211_stop_tx_ba_session(stru + + spin_lock_bh(&sta->lock); + ++ /* free struct pending for start, if present */ ++ tid_tx = sta->ampdu_mlme.tid_start_tx[tid]; ++ kfree(tid_tx); ++ sta->ampdu_mlme.tid_start_tx[tid] = NULL; ++ + tid_tx = rcu_dereference_protected_tid_tx(sta, tid); + if (!tid_tx) { + spin_unlock_bh(&sta->lock); diff --git a/package/kernel/mac80211/patches/327-mac80211-accept-key-reinstall-without-changing-anyth.patch b/package/kernel/mac80211/patches/327-mac80211-accept-key-reinstall-without-changing-anyth.patch deleted file mode 100644 index 7d0be0395be884..00000000000000 --- a/package/kernel/mac80211/patches/327-mac80211-accept-key-reinstall-without-changing-anyth.patch +++ /dev/null @@ -1,81 +0,0 @@ -From fdf7cb4185b60c68e1a75e61691c4afdc15dea0e Mon Sep 17 00:00:00 2001 -From: Johannes Berg -Date: Tue, 5 Sep 2017 14:54:54 +0200 -Subject: [PATCH] mac80211: accept key reinstall without changing anything - -When a key is reinstalled we can reset the replay counters -etc. which can lead to nonce reuse and/or replay detection -being impossible, breaking security properties, as described -in the "KRACK attacks". - -In particular, CVE-2017-13080 applies to GTK rekeying that -happened in firmware while the host is in D3, with the second -part of the attack being done after the host wakes up. In -this case, the wpa_supplicant mitigation isn't sufficient -since wpa_supplicant doesn't know the GTK material. - -In case this happens, simply silently accept the new key -coming from userspace but don't take any action on it since -it's the same key; this keeps the PN replay counters intact. - -Signed-off-by: Johannes Berg ---- - net/mac80211/key.c | 21 +++++++++++++++++---- - 1 file changed, 17 insertions(+), 4 deletions(-) - -diff --git a/net/mac80211/key.c b/net/mac80211/key.c -index a98fc2b5e0dc..ae995c8480db 100644 ---- a/net/mac80211/key.c -+++ b/net/mac80211/key.c -@@ -4,7 +4,7 @@ - * Copyright 2006-2007 Jiri Benc - * Copyright 2007-2008 Johannes Berg - * Copyright 2013-2014 Intel Mobile Communications GmbH -- * Copyright 2015 Intel Deutschland GmbH -+ * Copyright 2015-2017 Intel Deutschland GmbH - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as -@@ -620,9 +620,6 @@ int ieee80211_key_link(struct ieee80211_key *key, - - pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE; - idx = key->conf.keyidx; -- key->local = sdata->local; -- key->sdata = sdata; -- key->sta = sta; - - mutex_lock(&sdata->local->key_mtx); - -@@ -633,6 +630,21 @@ int ieee80211_key_link(struct ieee80211_key *key, - else - old_key = key_mtx_dereference(sdata->local, sdata->keys[idx]); - -+ /* -+ * Silently accept key re-installation without really installing the -+ * new version of the key to avoid nonce reuse or replay issues. -+ */ -+ if (old_key && key->conf.keylen == old_key->conf.keylen && -+ !memcmp(key->conf.key, old_key->conf.key, key->conf.keylen)) { -+ ieee80211_key_free_unused(key); -+ ret = 0; -+ goto out; -+ } -+ -+ key->local = sdata->local; -+ key->sdata = sdata; -+ key->sta = sta; -+ - increment_tailroom_need_count(sdata); - - ieee80211_key_replace(sdata, sta, pairwise, old_key, key); -@@ -648,6 +660,7 @@ int ieee80211_key_link(struct ieee80211_key *key, - ret = 0; - } - -+ out: - mutex_unlock(&sdata->local->key_mtx); - - return ret; --- -2.13.6 - diff --git a/package/kernel/mac80211/patches/328-mac80211-use-constant-time-comparison-with-keys.patch b/package/kernel/mac80211/patches/328-mac80211-use-constant-time-comparison-with-keys.patch deleted file mode 100644 index 03e8201902d8a5..00000000000000 --- a/package/kernel/mac80211/patches/328-mac80211-use-constant-time-comparison-with-keys.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 2bdd713b92a9cade239d3c7d15205a09f556624d Mon Sep 17 00:00:00 2001 -From: "Jason A. Donenfeld" -Date: Tue, 17 Oct 2017 20:32:07 +0200 -Subject: [PATCH] mac80211: use constant time comparison with keys - -Otherwise we risk leaking information via timing side channel. - -Fixes: fdf7cb4185b6 ("mac80211: accept key reinstall without changing anything") -Signed-off-by: Jason A. Donenfeld -Signed-off-by: Johannes Berg ---- - net/mac80211/key.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/net/mac80211/key.c -+++ b/net/mac80211/key.c -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - #include - #include "ieee80211_i.h" - #include "driver-ops.h" -@@ -635,7 +636,7 @@ int ieee80211_key_link(struct ieee80211_ - * new version of the key to avoid nonce reuse or replay issues. - */ - if (old_key && key->conf.keylen == old_key->conf.keylen && -- !memcmp(key->conf.key, old_key->conf.key, key->conf.keylen)) { -+ !crypto_memneq(key->conf.key, old_key->conf.key, key->conf.keylen)) { - ieee80211_key_free_unused(key); - ret = 0; - goto out; diff --git a/package/kernel/mac80211/patches/329-mac80211-don-t-compare-TKIP-TX-MIC-key-in-reinstall.patch b/package/kernel/mac80211/patches/329-mac80211-don-t-compare-TKIP-TX-MIC-key-in-reinstall.patch deleted file mode 100644 index 1eaf51de72f991..00000000000000 --- a/package/kernel/mac80211/patches/329-mac80211-don-t-compare-TKIP-TX-MIC-key-in-reinstall.patch +++ /dev/null @@ -1,73 +0,0 @@ -From cfbb0d90a7abb289edc91833d0905931f8805f12 Mon Sep 17 00:00:00 2001 -From: Johannes Berg -Date: Tue, 24 Oct 2017 21:12:13 +0200 -Subject: [PATCH] mac80211: don't compare TKIP TX MIC key in reinstall prevention - -For the reinstall prevention, the code I had added compares the -whole key. It turns out though that iwlwifi firmware doesn't -provide the TKIP TX MIC key as it's not needed in client mode, -and thus the comparison will always return false. - -For client mode, thus always zero out the TX MIC key part before -doing the comparison in order to avoid accepting the reinstall -of the key with identical encryption and RX MIC key, but not the -same TX MIC key (since the supplicant provides the real one.) - -Fixes: fdf7cb4185b6 ("mac80211: accept key reinstall without changing anything") -Signed-off-by: Johannes Berg ---- - net/mac80211/key.c | 36 ++++++++++++++++++++++++++++++++++-- - 1 file changed, 34 insertions(+), 2 deletions(-) - ---- a/net/mac80211/key.c -+++ b/net/mac80211/key.c -@@ -610,6 +610,39 @@ void ieee80211_key_free_unused(struct ie - ieee80211_key_free_common(key); - } - -+static bool ieee80211_key_identical(struct ieee80211_sub_if_data *sdata, -+ struct ieee80211_key *old, -+ struct ieee80211_key *new) -+{ -+ u8 tkip_old[WLAN_KEY_LEN_TKIP], tkip_new[WLAN_KEY_LEN_TKIP]; -+ u8 *tk_old, *tk_new; -+ -+ if (!old || new->conf.keylen != old->conf.keylen) -+ return false; -+ -+ tk_old = old->conf.key; -+ tk_new = new->conf.key; -+ -+ /* -+ * In station mode, don't compare the TX MIC key, as it's never used -+ * and offloaded rekeying may not care to send it to the host. This -+ * is the case in iwlwifi, for example. -+ */ -+ if (sdata->vif.type == NL80211_IFTYPE_STATION && -+ new->conf.cipher == WLAN_CIPHER_SUITE_TKIP && -+ new->conf.keylen == WLAN_KEY_LEN_TKIP && -+ !(new->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE)) { -+ memcpy(tkip_old, tk_old, WLAN_KEY_LEN_TKIP); -+ memcpy(tkip_new, tk_new, WLAN_KEY_LEN_TKIP); -+ memset(tkip_old + NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY, 0, 8); -+ memset(tkip_new + NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY, 0, 8); -+ tk_old = tkip_old; -+ tk_new = tkip_new; -+ } -+ -+ return !crypto_memneq(tk_old, tk_new, new->conf.keylen); -+} -+ - int ieee80211_key_link(struct ieee80211_key *key, - struct ieee80211_sub_if_data *sdata, - struct sta_info *sta) -@@ -635,8 +668,7 @@ int ieee80211_key_link(struct ieee80211_ - * Silently accept key re-installation without really installing the - * new version of the key to avoid nonce reuse or replay issues. - */ -- if (old_key && key->conf.keylen == old_key->conf.keylen && -- !crypto_memneq(key->conf.key, old_key->conf.key, key->conf.keylen)) { -+ if (ieee80211_key_identical(sdata, old_key, key)) { - ieee80211_key_free_unused(key); - ret = 0; - goto out; diff --git a/package/kernel/mac80211/patches/402-ath_regd_optional.patch b/package/kernel/mac80211/patches/402-ath_regd_optional.patch index fae9b55529aab2..edd4ce26bf6bef 100644 --- a/package/kernel/mac80211/patches/402-ath_regd_optional.patch +++ b/package/kernel/mac80211/patches/402-ath_regd_optional.patch @@ -106,7 +106,7 @@ ---help--- --- a/local-symbols +++ b/local-symbols -@@ -82,6 +82,7 @@ ADM8211= +@@ -87,6 +87,7 @@ ADM8211= ATH_COMMON= WLAN_VENDOR_ATH= ATH_DEBUG= diff --git a/package/kernel/mac80211/patches/404-regd_no_assoc_hints.patch b/package/kernel/mac80211/patches/404-regd_no_assoc_hints.patch index 457c0cb28c3dc6..00be2ef98dd96c 100644 --- a/package/kernel/mac80211/patches/404-regd_no_assoc_hints.patch +++ b/package/kernel/mac80211/patches/404-regd_no_assoc_hints.patch @@ -1,6 +1,6 @@ --- a/net/wireless/reg.c +++ b/net/wireless/reg.c -@@ -2497,6 +2497,8 @@ void regulatory_hint_country_ie(struct w +@@ -2860,6 +2860,8 @@ void regulatory_hint_country_ie(struct w enum environment_cap env = ENVIRON_ANY; struct regulatory_request *request = NULL, *lr; @@ -9,7 +9,7 @@ /* IE len must be evenly divisible by 2 */ if (country_ie_len & 0x01) return; -@@ -2703,6 +2705,7 @@ static void restore_regulatory_settings( +@@ -3066,6 +3068,7 @@ static void restore_regulatory_settings( void regulatory_hint_disconnect(void) { diff --git a/package/kernel/mac80211/patches/522-mac80211_configure_antenna_gain.patch b/package/kernel/mac80211/patches/522-mac80211_configure_antenna_gain.patch index 72857a0dbf8757..2a2d2f3cdebd27 100644 --- a/package/kernel/mac80211/patches/522-mac80211_configure_antenna_gain.patch +++ b/package/kernel/mac80211/patches/522-mac80211_configure_antenna_gain.patch @@ -36,7 +36,7 @@ u8 ps_dtim_period; --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h -@@ -2149,6 +2149,9 @@ enum nl80211_commands { +@@ -2153,6 +2153,9 @@ enum nl80211_commands { * @NL80211_ATTR_PMKR0_NAME: PMK-R0 Name for offloaded FT. * @NL80211_ATTR_PORT_AUTHORIZED: (reserved) * @@ -46,7 +46,7 @@ * @NUM_NL80211_ATTR: total number of nl80211_attrs available * @NL80211_ATTR_MAX: highest attribute number currently defined * @__NL80211_ATTR_AFTER_LAST: internal use -@@ -2575,6 +2578,8 @@ enum nl80211_attrs { +@@ -2579,6 +2582,8 @@ enum nl80211_attrs { NL80211_ATTR_PMKR0_NAME, NL80211_ATTR_PORT_AUTHORIZED, @@ -57,7 +57,7 @@ __NL80211_ATTR_AFTER_LAST, --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -2444,6 +2444,19 @@ static int ieee80211_get_tx_power(struct +@@ -2447,6 +2447,19 @@ static int ieee80211_get_tx_power(struct return 0; } @@ -77,7 +77,7 @@ static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev, const u8 *addr) { -@@ -3717,6 +3730,7 @@ const struct cfg80211_ops mac80211_confi +@@ -3720,6 +3733,7 @@ const struct cfg80211_ops mac80211_confi .set_wiphy_params = ieee80211_set_wiphy_params, .set_tx_power = ieee80211_set_tx_power, .get_tx_power = ieee80211_get_tx_power, @@ -87,7 +87,7 @@ CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd) --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -1347,6 +1347,7 @@ struct ieee80211_local { +@@ -1348,6 +1348,7 @@ struct ieee80211_local { int dynamic_ps_forced_timeout; int user_power_level; /* in dBm, for all interfaces */ diff --git a/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch b/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch index 7cf589485ed921..6dd03fd28a4fa6 100644 --- a/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch +++ b/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch @@ -125,7 +125,7 @@ REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON); --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -527,6 +527,11 @@ irqreturn_t ath_isr(int irq, void *dev) +@@ -528,6 +528,11 @@ irqreturn_t ath_isr(int irq, void *dev) if (test_bit(ATH_OP_HW_RESET, &common->op_flags)) return IRQ_HANDLED; diff --git a/package/kernel/mac80211/patches/549-ath9k_enable_gpio_buttons.patch b/package/kernel/mac80211/patches/549-ath9k_enable_gpio_buttons.patch index f3fead0a1aef41..e86e3e38bd69ee 100644 --- a/package/kernel/mac80211/patches/549-ath9k_enable_gpio_buttons.patch +++ b/package/kernel/mac80211/patches/549-ath9k_enable_gpio_buttons.patch @@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau #ifdef CPTCFG_MAC80211_LEDS -@@ -129,6 +131,64 @@ static void ath9k_unregister_gpio_chip(s +@@ -129,6 +131,67 @@ static void ath9k_unregister_gpio_chip(s sc->gpiochip = NULL; } @@ -59,6 +59,9 @@ Signed-off-by: Felix Fietkau + return; + + for (i = 0; i < pdata->num_btns; i++) { ++ if (pdata->btns[i].gpio == sc->sc_ah->led_pin) ++ sc->sc_ah->led_pin = -1; ++ + ath9k_hw_gpio_request_in(sc->sc_ah, pdata->btns[i].gpio, + "ath9k-gpio"); + bt[i].gpio = sc->gpiochip->gchip.base + pdata->btns[i].gpio; @@ -94,7 +97,7 @@ Signed-off-by: Felix Fietkau #else /* CONFIG_GPIOLIB */ static inline void ath9k_register_gpio_chip(struct ath_softc *sc) -@@ -139,6 +199,14 @@ static inline void ath9k_unregister_gpio +@@ -139,6 +202,14 @@ static inline void ath9k_unregister_gpio { } @@ -109,7 +112,7 @@ Signed-off-by: Felix Fietkau #endif /* CONFIG_GPIOLIB */ /********************************/ -@@ -262,6 +330,7 @@ void ath_deinit_leds(struct ath_softc *s +@@ -262,6 +333,7 @@ void ath_deinit_leds(struct ath_softc *s { struct ath_led *led; @@ -117,7 +120,7 @@ Signed-off-by: Felix Fietkau while (!list_empty(&sc->leds)) { led = list_first_entry(&sc->leds, struct ath_led, list); #ifdef CONFIG_GPIOLIB -@@ -301,6 +370,7 @@ void ath_init_leds(struct ath_softc *sc) +@@ -301,6 +373,7 @@ void ath_init_leds(struct ath_softc *sc) } ath_fill_led_pin(sc); diff --git a/package/kernel/mac80211/patches/551-ath9k_ubnt_uap_plus_hsr.patch b/package/kernel/mac80211/patches/551-ath9k_ubnt_uap_plus_hsr.patch index 6d541d6a57d801..82b8109e069c5f 100644 --- a/package/kernel/mac80211/patches/551-ath9k_ubnt_uap_plus_hsr.patch +++ b/package/kernel/mac80211/patches/551-ath9k_ubnt_uap_plus_hsr.patch @@ -17,7 +17,7 @@ struct ath_hw *ah = sc->sc_ah; struct ath_common *common = ath9k_hw_common(ah); struct ieee80211_hw *hw = sc->hw; -@@ -41,6 +44,11 @@ static int ath_set_channel(struct ath_so +@@ -42,6 +45,11 @@ static int ath_set_channel(struct ath_so ath_dbg(common, CONFIG, "Set channel: %d MHz width: %d\n", chan->center_freq, chandef->width); @@ -27,7 +27,7 @@ + } + /* update survey stats for the old channel before switching */ - spin_lock_bh(&common->cc_lock); + spin_lock_irqsave(&common->cc_lock, flags); ath_update_survey_stats(sc); --- /dev/null +++ b/drivers/net/wireless/ath/ath9k/hsr.c @@ -343,7 +343,7 @@ u8 ath9k_parse_mpdudensity(u8 mpdudensity) { -@@ -648,6 +650,7 @@ void ath_reset_work(struct work_struct * +@@ -649,6 +651,7 @@ void ath_reset_work(struct work_struct * static int ath9k_start(struct ieee80211_hw *hw) { struct ath_softc *sc = hw->priv; @@ -351,7 +351,7 @@ struct ath_hw *ah = sc->sc_ah; struct ath_common *common = ath9k_hw_common(ah); struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan; -@@ -726,6 +729,11 @@ static int ath9k_start(struct ieee80211_ +@@ -727,6 +730,11 @@ static int ath9k_start(struct ieee80211_ AR_GPIO_OUTPUT_MUX_AS_OUTPUT); } @@ -386,7 +386,7 @@ #endif /* _LINUX_ATH9K_PLATFORM_H */ --- a/local-symbols +++ b/local-symbols -@@ -109,6 +109,7 @@ ATH9K_WOW= +@@ -114,6 +114,7 @@ ATH9K_WOW= ATH9K_RFKILL= ATH9K_CHANNEL_CONTEXT= ATH9K_PCOEM= diff --git a/package/kernel/mac80211/patches/602-rt2x00-introduce-rt2x00eeprom.patch b/package/kernel/mac80211/patches/602-rt2x00-introduce-rt2x00eeprom.patch index 5ad99995c2862a..b0c5d5ba37b33a 100644 --- a/package/kernel/mac80211/patches/602-rt2x00-introduce-rt2x00eeprom.patch +++ b/package/kernel/mac80211/patches/602-rt2x00-introduce-rt2x00eeprom.patch @@ -1,6 +1,6 @@ --- a/local-symbols +++ b/local-symbols -@@ -291,6 +291,7 @@ RT2X00_LIB_FIRMWARE= +@@ -296,6 +296,7 @@ RT2X00_LIB_FIRMWARE= RT2X00_LIB_CRYPTO= RT2X00_LIB_LEDS= RT2X00_LIB_DEBUGFS= diff --git a/package/kernel/mac80211/patches/801-libertas-configure-sysfs-links.patch b/package/kernel/mac80211/patches/801-libertas-configure-sysfs-links.patch index cfde08d4ea0890..885bc246babfaa 100644 --- a/package/kernel/mac80211/patches/801-libertas-configure-sysfs-links.patch +++ b/package/kernel/mac80211/patches/801-libertas-configure-sysfs-links.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/marvell/libertas/cfg.c +++ b/drivers/net/wireless/marvell/libertas/cfg.c -@@ -2043,6 +2043,8 @@ struct wireless_dev *lbs_cfg_alloc(struc +@@ -2040,6 +2040,8 @@ struct wireless_dev *lbs_cfg_alloc(struc goto err_wiphy_new; } @@ -11,7 +11,7 @@ err_wiphy_new: --- a/drivers/net/wireless/marvell/libertas/main.c +++ b/drivers/net/wireless/marvell/libertas/main.c -@@ -933,6 +933,7 @@ struct lbs_private *lbs_add_card(void *c +@@ -930,6 +930,7 @@ struct lbs_private *lbs_add_card(void *c goto err_adapter; } diff --git a/package/kernel/mac80211/patches/802-libertas-set-wireless-macaddr.patch b/package/kernel/mac80211/patches/802-libertas-set-wireless-macaddr.patch index b26505de21694b..089ad2fe789c91 100644 --- a/package/kernel/mac80211/patches/802-libertas-set-wireless-macaddr.patch +++ b/package/kernel/mac80211/patches/802-libertas-set-wireless-macaddr.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/marvell/libertas/cfg.c +++ b/drivers/net/wireless/marvell/libertas/cfg.c -@@ -2119,6 +2119,8 @@ int lbs_cfg_register(struct lbs_private +@@ -2116,6 +2116,8 @@ int lbs_cfg_register(struct lbs_private wdev->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites); wdev->wiphy->reg_notifier = lbs_reg_notifier; diff --git a/package/kernel/mac80211/patches/921-ath10k_init_devices_synchronously.patch b/package/kernel/mac80211/patches/921-ath10k_init_devices_synchronously.patch index 94a25b680da714..3b1e9673bbb95d 100644 --- a/package/kernel/mac80211/patches/921-ath10k_init_devices_synchronously.patch +++ b/package/kernel/mac80211/patches/921-ath10k_init_devices_synchronously.patch @@ -14,7 +14,7 @@ Signed-off-by: Sven Eckelmann --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c -@@ -2445,6 +2445,16 @@ int ath10k_core_register(struct ath10k * +@@ -2458,6 +2458,16 @@ int ath10k_core_register(struct ath10k * ar->chip_id = chip_id; queue_work(ar->workqueue, &ar->register_work); diff --git a/package/kernel/mac80211/patches/930-ath10k_add_tpt_led_trigger.patch b/package/kernel/mac80211/patches/930-ath10k_add_tpt_led_trigger.patch index e0ab671760a946..21e7359bc96917 100644 --- a/package/kernel/mac80211/patches/930-ath10k_add_tpt_led_trigger.patch +++ b/package/kernel/mac80211/patches/930-ath10k_add_tpt_led_trigger.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -8067,6 +8067,21 @@ static int ath10k_mac_init_rd(struct ath +@@ -8080,6 +8080,21 @@ static int ath10k_mac_init_rd(struct ath return 0; } @@ -22,7 +22,7 @@ int ath10k_mac_register(struct ath10k *ar) { static const u32 cipher_suites[] = { -@@ -8308,6 +8323,12 @@ int ath10k_mac_register(struct ath10k *a +@@ -8352,6 +8367,12 @@ int ath10k_mac_register(struct ath10k *a wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); diff --git a/package/kernel/mac80211/patches/936-ath10k-fix-otp-failure-result.patch b/package/kernel/mac80211/patches/936-ath10k-fix-otp-failure-result.patch index 0af8025d966555..ea30a9dfd6cdfe 100644 --- a/package/kernel/mac80211/patches/936-ath10k-fix-otp-failure-result.patch +++ b/package/kernel/mac80211/patches/936-ath10k-fix-otp-failure-result.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c -@@ -757,7 +757,7 @@ static int ath10k_core_get_board_id_from +@@ -770,7 +770,7 @@ static int ath10k_core_get_board_id_from if (ret) { ath10k_err(ar, "could not execute otp for board id check: %d\n", ret); diff --git a/package/kernel/mwlwifi/Makefile b/package/kernel/mwlwifi/Makefile index 811b31426e5387..f8e70e54a8f668 100644 --- a/package/kernel/mwlwifi/Makefile +++ b/package/kernel/mwlwifi/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mwlwifi -PKG_VERSION:=10.3.4.0-20171129 +PKG_VERSION:=10.3.4.0-20171214 PKG_RELEASE=1 PKG_LICENSE:=ISC @@ -16,8 +16,8 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/kaloz/mwlwifi PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=1522af59a501f74c8b6b02ae763829a79114a325 -PKG_MIRROR_HASH:=2de445e805db8b8eef907ae3cab41bdb4500b3f5563257c262fed3e5d0a63559 +PKG_SOURCE_VERSION:=843d00cd9c134629b9dad7162831ec5f136399b3 +PKG_MIRROR_HASH:=080c491473f0dbe9a7cac0fa3c6d004bf2dc3bd953a9f9d074eb8876a86437c2 PKG_MAINTAINER:=Imre Kaloz PKG_BUILD_PARALLEL:=1 diff --git a/package/kernel/rotary-gpio-custom/Makefile b/package/kernel/rotary-gpio-custom/Makefile index e1cf7ff1dedf9c..f75856736523d6 100644 --- a/package/kernel/rotary-gpio-custom/Makefile +++ b/package/kernel/rotary-gpio-custom/Makefile @@ -33,8 +33,7 @@ EXTRA_CFLAGS:= \ $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \ MAKE_OPTS:= \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ + $(KERNEL_MAKE_FLAGS) \ SUBDIRS="$(PKG_BUILD_DIR)" \ EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ $(EXTRA_KCONFIG) diff --git a/package/kernel/rtc-rv5c386a/Makefile b/package/kernel/rtc-rv5c386a/Makefile index e9709820707ac5..a268ad508cfe3b 100644 --- a/package/kernel/rtc-rv5c386a/Makefile +++ b/package/kernel/rtc-rv5c386a/Makefile @@ -23,8 +23,7 @@ endef define Build/Compile $(MAKE) -C "$(LINUX_DIR)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - ARCH="$(LINUX_KARCH)" \ + $(KERNEL_MAKE_FLAGS) \ SUBDIRS="$(PKG_BUILD_DIR)" \ EXTRA_CFLAGS="$(BUILDFLAGS)" \ modules diff --git a/package/kernel/spi-gpio-custom/Makefile b/package/kernel/spi-gpio-custom/Makefile index e6d692db443c5a..19aef20ed2f733 100644 --- a/package/kernel/spi-gpio-custom/Makefile +++ b/package/kernel/spi-gpio-custom/Makefile @@ -33,8 +33,7 @@ EXTRA_CFLAGS:= \ $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \ MAKE_OPTS:= \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ + $(KERNEL_MAKE_FLAGS) \ SUBDIRS="$(PKG_BUILD_DIR)" \ EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ $(EXTRA_KCONFIG) diff --git a/package/kernel/w1-gpio-custom/Makefile b/package/kernel/w1-gpio-custom/Makefile index 67fdc7d15e20d0..1008cf9736f659 100644 --- a/package/kernel/w1-gpio-custom/Makefile +++ b/package/kernel/w1-gpio-custom/Makefile @@ -33,8 +33,7 @@ EXTRA_CFLAGS:= \ $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) MAKE_OPTS:= \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ + $(KERNEL_MAKE_FLAGS) \ SUBDIRS="$(PKG_BUILD_DIR)" \ EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ $(EXTRA_KCONFIG) diff --git a/package/kernel/wrt55agv2-spidevs/Makefile b/package/kernel/wrt55agv2-spidevs/Makefile index 169f6b4da1a438..d80c1e570b4838 100644 --- a/package/kernel/wrt55agv2-spidevs/Makefile +++ b/package/kernel/wrt55agv2-spidevs/Makefile @@ -25,8 +25,7 @@ define KernelPackage/wrt55agv2-spidevs/description endef MAKE_OPTS:= \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ + $(KERNEL_MAKE_FLAGS) \ SUBDIRS="$(PKG_BUILD_DIR)" define Build/Compile diff --git a/package/kernel/shortcut-fe/Makefile b/package/lean/shortcut-fe/Makefile similarity index 100% rename from package/kernel/shortcut-fe/Makefile rename to package/lean/shortcut-fe/Makefile diff --git a/package/kernel/shortcut-fe/src/Kconfig b/package/lean/shortcut-fe/src/Kconfig similarity index 100% rename from package/kernel/shortcut-fe/src/Kconfig rename to package/lean/shortcut-fe/src/Kconfig diff --git a/package/kernel/shortcut-fe/src/Makefile b/package/lean/shortcut-fe/src/Makefile similarity index 100% rename from package/kernel/shortcut-fe/src/Makefile rename to package/lean/shortcut-fe/src/Makefile diff --git a/package/kernel/shortcut-fe/src/README b/package/lean/shortcut-fe/src/README similarity index 100% rename from package/kernel/shortcut-fe/src/README rename to package/lean/shortcut-fe/src/README diff --git a/package/kernel/shortcut-fe/src/fast-classifier.c b/package/lean/shortcut-fe/src/fast-classifier.c similarity index 100% rename from package/kernel/shortcut-fe/src/fast-classifier.c rename to package/lean/shortcut-fe/src/fast-classifier.c diff --git a/package/kernel/shortcut-fe/src/fast-classifier.h b/package/lean/shortcut-fe/src/fast-classifier.h similarity index 100% rename from package/kernel/shortcut-fe/src/fast-classifier.h rename to package/lean/shortcut-fe/src/fast-classifier.h diff --git a/package/kernel/shortcut-fe/src/nl_classifier_test.c b/package/lean/shortcut-fe/src/nl_classifier_test.c similarity index 100% rename from package/kernel/shortcut-fe/src/nl_classifier_test.c rename to package/lean/shortcut-fe/src/nl_classifier_test.c diff --git a/package/kernel/shortcut-fe/src/sfe.h b/package/lean/shortcut-fe/src/sfe.h similarity index 100% rename from package/kernel/shortcut-fe/src/sfe.h rename to package/lean/shortcut-fe/src/sfe.h diff --git a/package/kernel/shortcut-fe/src/sfe_backport.h b/package/lean/shortcut-fe/src/sfe_backport.h similarity index 100% rename from package/kernel/shortcut-fe/src/sfe_backport.h rename to package/lean/shortcut-fe/src/sfe_backport.h diff --git a/package/kernel/shortcut-fe/src/sfe_cm.c b/package/lean/shortcut-fe/src/sfe_cm.c similarity index 100% rename from package/kernel/shortcut-fe/src/sfe_cm.c rename to package/lean/shortcut-fe/src/sfe_cm.c diff --git a/package/kernel/shortcut-fe/src/sfe_cm.h b/package/lean/shortcut-fe/src/sfe_cm.h similarity index 100% rename from package/kernel/shortcut-fe/src/sfe_cm.h rename to package/lean/shortcut-fe/src/sfe_cm.h diff --git a/package/kernel/shortcut-fe/src/sfe_ipv4.c b/package/lean/shortcut-fe/src/sfe_ipv4.c similarity index 100% rename from package/kernel/shortcut-fe/src/sfe_ipv4.c rename to package/lean/shortcut-fe/src/sfe_ipv4.c diff --git a/package/kernel/shortcut-fe/src/sfe_ipv6.c b/package/lean/shortcut-fe/src/sfe_ipv6.c similarity index 100% rename from package/kernel/shortcut-fe/src/sfe_ipv6.c rename to package/lean/shortcut-fe/src/sfe_ipv6.c diff --git a/package/kernel/shortcut-fe/src/userspace_example.c b/package/lean/shortcut-fe/src/userspace_example.c similarity index 100% rename from package/kernel/shortcut-fe/src/userspace_example.c rename to package/lean/shortcut-fe/src/userspace_example.c diff --git a/package/libs/argp-standalone/patches/001-throw-in-funcdef.patch b/package/libs/argp-standalone/patches/001-throw-in-funcdef.patch index 4a90751e1e62dd..2dcfe9c2122f35 100644 --- a/package/libs/argp-standalone/patches/001-throw-in-funcdef.patch +++ b/package/libs/argp-standalone/patches/001-throw-in-funcdef.patch @@ -18,9 +18,9 @@ No __THROW in function implementation. --jsaw ---- argp-standalone-1.4-test2/argp.h.orig 2006-01-06 02:29:59.000000000 +0100 -+++ argp-standalone-1.4-test2/argp.h 2006-01-06 02:41:10.000000000 +0100 -@@ -560,17 +560,17 @@ +--- a/argp.h ++++ b/argp.h +@@ -560,17 +560,17 @@ __argp_short_program_name(const struct a # endif # ifndef ARGP_EI @@ -41,7 +41,7 @@ No __THROW in function implementation. { if (__opt->flags & OPTION_DOC) return 0; -@@ -582,7 +582,7 @@ +@@ -582,7 +582,7 @@ __option_is_short (__const struct argp_o } ARGP_EI int @@ -50,9 +50,9 @@ No __THROW in function implementation. { return !__opt->key && !__opt->name && !__opt->doc && !__opt->group; } ---- argp-standalone-1.4-test2/argp-parse.c.orig 2006-01-06 02:47:48.000000000 +0100 -+++ argp-standalone-1.4-test2/argp-parse.c 2006-01-06 02:48:16.000000000 +0100 -@@ -1290,13 +1290,13 @@ +--- a/argp-parse.c ++++ b/argp-parse.c +@@ -1277,13 +1277,13 @@ weak_alias (__argp_input, _argp_input) /* Defined here, in case a user is not inlining the definitions in * argp.h */ void @@ -68,7 +68,7 @@ No __THROW in function implementation. { if (__opt->flags & OPTION_DOC) return 0; -@@ -1310,7 +1310,7 @@ +@@ -1297,7 +1297,7 @@ __option_is_short (__const struct argp_o } int diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile index 869513f16f218c..07e1eb8157d60d 100644 --- a/package/libs/elfutils/Makefile +++ b/package/libs/elfutils/Makefile @@ -17,6 +17,7 @@ PKG_HASH:=9412fac7b30872b738bc1ed1ebcaed54493c26ef9a67887913498c17b10f3bc2 PKG_MAINTAINER:=Luiz Angelo Daros de Luca PKG_LICENSE:=GPL-3.0+ PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3 +PKG_CPE_ID:=cpe:/a:elfutils_project:elfutils PKG_INSTALL:=1 PKG_USE_MIPS16:=0 @@ -68,7 +69,7 @@ endif CONFIGURE_ARGS += \ --without-lzma -TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result +TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include diff --git a/package/libs/gettext-full/Makefile b/package/libs/gettext-full/Makefile index deb4840109f63e..db6aee75083fd5 100644 --- a/package/libs/gettext-full/Makefile +++ b/package/libs/gettext-full/Makefile @@ -19,6 +19,7 @@ HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/gettext-$(PKG_VERSION) PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-3.0+ +PKG_CPE_ID:=cpe:/a:gnu:gettext PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/package/libs/libevent2/Makefile b/package/libs/libevent2/Makefile index 99034bb228d9ec..5d56f37c51a338 100644 --- a/package/libs/libevent2/Makefile +++ b/package/libs/libevent2/Makefile @@ -17,6 +17,7 @@ PKG_SOURCE_URL:=@SF/levent PKG_HASH:=71c2c49f0adadacfdbe6332a372c38cf9c8b7895bb73dabeaa53cdcc1d4e1fa3 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=BSD-3-Clause +PKG_CPE_ID:=cpe:/a:libevent_project:libevent PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/package/libs/libjson-c/Makefile b/package/libs/libjson-c/Makefile index 359a688f117187..eeb7870f072f05 100644 --- a/package/libs/libjson-c/Makefile +++ b/package/libs/libjson-c/Makefile @@ -19,6 +19,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:json-c_project:json-c PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/package/libs/libnetfilter-conntrack/Makefile b/package/libs/libnetfilter-conntrack/Makefile index 399aa6ce1db68e..be82285317f1c7 100644 --- a/package/libs/libnetfilter-conntrack/Makefile +++ b/package/libs/libnetfilter-conntrack/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libnetfilter_conntrack -PKG_VERSION:=1.0.6 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:= \ - http://www.netfilter.org/projects/libnetfilter_conntrack/files/ \ - ftp://ftp.netfilter.org/pub/libnetfilter_conntrack/ -PKG_HASH:=efcc08021284e75f4d96d3581c5155a11f08fd63316b1938cbcb269c87f37feb +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://git.netfilter.org/libnetfilter_conntrack +PKG_SOURCE_DATE:=2017-07-25 +PKG_SOURCE_VERSION:=e870432649955d377a73ee5a72cb23f0f6b5e4c5 +PKG_MIRROR_HASH:=6891e6bea956d5d3514524918f439dfe8b5806397d8d40d1afc69b9bfebc1d57 + PKG_MAINTAINER:=Jo-Philipp Wich PKG_FIXUP:=autoreconf diff --git a/package/libs/libnetfilter-queue/Makefile b/package/libs/libnetfilter-queue/Makefile index dd8fd9f09e7576..8a11d0798863ad 100644 --- a/package/libs/libnetfilter-queue/Makefile +++ b/package/libs/libnetfilter-queue/Makefile @@ -11,10 +11,10 @@ PKG_NAME:=libnetfilter_queue PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL=http://git.netfilter.org/libnetfilter_queue -PKG_SOURCE_DATE:=2016-07-03 -PKG_SOURCE_VERSION:=981025e103d887fb6a9c9bb49c74ec323108d098 -PKG_MIRROR_HASH:=85c124be0e19162e1ebd1aba6e7e86bb4106e9dab4267baaf66d3ccb48d56e3f +PKG_SOURCE_URL=https://git.netfilter.org/libnetfilter_queue +PKG_SOURCE_DATE:=2017-06-27 +PKG_SOURCE_VERSION:=601abd1c71ccdf90753cf294c120ad43fb25dc54 +PKG_MIRROR_HASH:=283b99cfe5856dc87fd6bab8f78c0c59b72462d6b4f2b13111f928cf33020eb3 PKG_FIXUP:=autoreconf PKG_LICENSE:=GPL-2.0+ diff --git a/package/libs/libnetfilter-queue/patches/100-checksum_computation.patch b/package/libs/libnetfilter-queue/patches/100-checksum_computation.patch index 81faffe82e3375..92e750d510201a 100644 --- a/package/libs/libnetfilter-queue/patches/100-checksum_computation.patch +++ b/package/libs/libnetfilter-queue/patches/100-checksum_computation.patch @@ -8,7 +8,7 @@ #include #include #include -@@ -26,8 +27,13 @@ uint16_t nfq_checksum(uint32_t sum, uint16_t *buf, int size) +@@ -26,8 +27,13 @@ uint16_t nfq_checksum(uint32_t sum, uint sum += *buf++; size -= sizeof(uint16_t); } @@ -24,7 +24,7 @@ sum = (sum >> 16) + (sum & 0xffff); sum += (sum >>16); -@@ -35,7 +41,7 @@ uint16_t nfq_checksum(uint32_t sum, uint16_t *buf, int size) +@@ -35,7 +41,7 @@ uint16_t nfq_checksum(uint32_t sum, uint return (uint16_t)(~sum); } @@ -33,7 +33,7 @@ { uint32_t sum = 0; uint32_t iph_len = iph->ihl*4; -@@ -46,13 +52,13 @@ uint16_t nfq_checksum_tcpudp_ipv4(struct iphdr *iph) +@@ -46,13 +52,13 @@ uint16_t nfq_checksum_tcpudp_ipv4(struct sum += (iph->saddr) & 0xFFFF; sum += (iph->daddr >> 16) & 0xFFFF; sum += (iph->daddr) & 0xFFFF; @@ -49,7 +49,7 @@ { uint32_t sum = 0; uint32_t hdr_len = (uint32_t *)transport_hdr - (uint32_t *)ip6h; -@@ -68,7 +74,7 @@ uint16_t nfq_checksum_tcpudp_ipv6(struct ip6_hdr *ip6h, void *transport_hdr) +@@ -68,7 +74,7 @@ uint16_t nfq_checksum_tcpudp_ipv6(struct sum += (ip6h->ip6_dst.s6_addr16[i] >> 16) & 0xFFFF; sum += (ip6h->ip6_dst.s6_addr16[i]) & 0xFFFF; } @@ -58,11 +58,9 @@ sum += htons(ip6h->ip6_plen); return nfq_checksum(sum, (uint16_t *)payload, len); -diff --git a/src/extra/tcp.c b/src/extra/tcp.c -index d1cd79d..a66f392 100644 --- a/src/extra/tcp.c +++ b/src/extra/tcp.c -@@ -96,7 +96,7 @@ nfq_tcp_compute_checksum_ipv4(struct tcphdr *tcph, struct iphdr *iph) +@@ -96,7 +96,7 @@ nfq_tcp_compute_checksum_ipv4(struct tcp { /* checksum field in header needs to be zero for calculation. */ tcph->check = 0; @@ -71,7 +69,7 @@ index d1cd79d..a66f392 100644 } EXPORT_SYMBOL(nfq_tcp_compute_checksum_ipv4); -@@ -110,7 +110,7 @@ nfq_tcp_compute_checksum_ipv6(struct tcphdr *tcph, struct ip6_hdr *ip6h) +@@ -110,7 +110,7 @@ nfq_tcp_compute_checksum_ipv6(struct tcp { /* checksum field in header needs to be zero for calculation. */ tcph->check = 0; @@ -82,7 +80,7 @@ index d1cd79d..a66f392 100644 --- a/src/extra/udp.c +++ b/src/extra/udp.c -@@ -96,7 +96,7 @@ nfq_udp_compute_checksum_ipv4(struct udphdr *udph, struct iphdr *iph) +@@ -96,7 +96,7 @@ nfq_udp_compute_checksum_ipv4(struct udp { /* checksum field in header needs to be zero for calculation. */ udph->check = 0; @@ -91,7 +89,7 @@ index d1cd79d..a66f392 100644 } EXPORT_SYMBOL(nfq_udp_compute_checksum_ipv4); -@@ -115,7 +115,7 @@ nfq_udp_compute_checksum_ipv6(struct udphdr *udph, struct ip6_hdr *ip6h) +@@ -115,7 +115,7 @@ nfq_udp_compute_checksum_ipv6(struct udp { /* checksum field in header needs to be zero for calculation. */ udph->check = 0; diff --git a/package/libs/libnftnl/Makefile b/package/libs/libnftnl/Makefile index f7d6875b604004..f4a1bb132ee906 100644 --- a/package/libs/libnftnl/Makefile +++ b/package/libs/libnftnl/Makefile @@ -11,7 +11,7 @@ PKG_NAME:=libnftnl PKG_VERSION:=1.0.7 PKG_RELEASE:=1 -PKG_SOURCE_URL:=git://git.netfilter.org/libnftnl +PKG_SOURCE_URL:=https://git.netfilter.org/libnftnl PKG_SOURCE_PROTO:=git PKG_SOURCE_VERSION:=libnftnl-1.0.7 PKG_MIRROR_HASH:=d38a409d52074a5b20f5b7477b385506692a9a05ec6f4ac3d14a8a80aa4f81d9 diff --git a/package/libs/libnl-tiny/src/msg.c b/package/libs/libnl-tiny/src/msg.c index e84c281fc91ce0..b502047c4c7464 100644 --- a/package/libs/libnl-tiny/src/msg.c +++ b/package/libs/libnl-tiny/src/msg.c @@ -166,12 +166,7 @@ #include #include -static size_t default_msg_size; - -static void __init init_msg_size(void) -{ - default_msg_size = getpagesize(); -} +static size_t default_msg_size = 4096; /** * @name Attribute Access diff --git a/package/libs/libnl/Makefile b/package/libs/libnl/Makefile index 7916556c00ef41..67201cc7cc6639 100644 --- a/package/libs/libnl/Makefile +++ b/package/libs/libnl/Makefile @@ -8,14 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libnl -PKG_VERSION:=3.2.29 +PKG_VERSION:=3.3.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/thom311/libnl/releases/download/libnl3_2_29 -PKG_HASH:=0beb593dc6abfffa18a5c787b27884979c1b7e7f1fd468c801e3cc938a685922 +PKG_SOURCE_URL:=https://github.com/thom311/libnl/releases/download/libnl3_3_0 +PKG_HASH:=705468b5ae4cd1eb099d2d1c476d6a3abe519bc2810becf12fb1e32de1e074e4 PKG_LICENSE:=LGPL-2.1 +PKG_INSTALL:=1 +PKG_FIXUP:=autoreconf + include $(INCLUDE_DIR)/package.mk define Package/libnl/default @@ -77,13 +80,6 @@ endef TARGET_CFLAGS += -ffunction-sections $(FPIC) -define Build/Compile - $(call Build/Compile/Default) - make -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - install -endef - define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/libnl3 $(1)/usr/lib/pkgconfig $(CP) $(PKG_INSTALL_DIR)/usr/include/libnl3/* $(1)/usr/include/libnl3/ diff --git a/package/libs/libnl/patches/0001-lib-Escape-usage-of-strerror_l-if-it-doesn-t-exist-i.patch b/package/libs/libnl/patches/0001-lib-Escape-usage-of-strerror_l-if-it-doesn-t-exist-i.patch deleted file mode 100644 index a31ef47729451b..00000000000000 --- a/package/libs/libnl/patches/0001-lib-Escape-usage-of-strerror_l-if-it-doesn-t-exist-i.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 098a4cc35b0da4438b8b67a914edecebef5bb6a9 Mon Sep 17 00:00:00 2001 -From: Alexey Brodkin -Date: Fri, 10 Mar 2017 13:22:14 +0300 -Subject: [PATCH] lib: Escape usage of strerror_l() if it doesn't exist in libc - -uClibc doesn't implement strerror_l() and thus libnl starting from -3.2.29 couldn't be compiled with it any longer. - -To work-around that problem we'll just do a check on strerror_l() -availability during configuration and if it's not there just fall back -to locale-less strerror(). - -Signed-off-by: Alexey Brodkin -Cc: Andre Draszik -Cc: Thomas Haller ---- - -This patch is now accepted upstream and will be a part of the next libnl -release, see -https://github.com/thom311/libnl/commit/e15966ac7f3b43df2acf869f98089762807d0568 - - configure.ac | 2 ++ - lib/utils.c | 8 +++++++- - src/lib/utils.c | 6 ++++++ - 3 files changed, 15 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 68b285e5b15c..2739b997ee3a 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -121,6 +121,8 @@ fi - - AC_CONFIG_SUBDIRS([doc]) - -+AC_CHECK_FUNCS([strerror_l]) -+ - AC_CONFIG_FILES([ - Makefile - libnl-3.0.pc -diff --git a/lib/utils.c b/lib/utils.c -index fb350d13fd2f..06273c5b291e 100644 ---- a/lib/utils.c -+++ b/lib/utils.c -@@ -30,7 +30,9 @@ - #include - #include - #include /* exit() */ -+#ifdef HAVE_STRERROR_L - #include -+#endif - - /** - * Global variable indicating the desired level of debugging output. -@@ -123,9 +125,10 @@ int __nl_read_num_str_file(const char *path, int (*cb)(long, const char *)) - - const char *nl_strerror_l(int err) - { -+ const char *buf; -+#ifdef HAVE_STRERROR_L - int errno_save = errno; - locale_t loc = newlocale(LC_MESSAGES_MASK, "", (locale_t)0); -- const char *buf; - - if (loc == (locale_t)0) { - if (errno == ENOENT) -@@ -140,6 +143,9 @@ const char *nl_strerror_l(int err) - } - - errno = errno_save; -+#else -+ buf = strerror(err); -+#endif - return buf; - } - /** @endcond */ -diff --git a/src/lib/utils.c b/src/lib/utils.c -index 5878f279c364..feb1d4ef4056 100644 ---- a/src/lib/utils.c -+++ b/src/lib/utils.c -@@ -81,6 +81,7 @@ void nl_cli_fatal(int err, const char *fmt, ...) - fprintf(stderr, "\n"); - } else { - char *buf; -+#ifdef HAVE_STRERROR_L - locale_t loc = newlocale(LC_MESSAGES_MASK, "", (locale_t)0); - if (loc == (locale_t)0) { - if (errno == ENOENT) -@@ -91,9 +92,14 @@ void nl_cli_fatal(int err, const char *fmt, ...) - } - if (loc != (locale_t)0) - buf = strerror_l(err, loc); -+#else -+ buf = strerror(err); -+#endif - fprintf(stderr, "%s\n", buf); -+#ifdef HAVE_STRERROR_L - if (loc != (locale_t)0) - freelocale(loc); -+#endif - } - - exit(abs(err)); --- -2.7.4 - diff --git a/package/libs/libnl/patches/100-build-add-Libs.private-field-in-libnl-pkg-config-file.patch b/package/libs/libnl/patches/100-build-add-Libs.private-field-in-libnl-pkg-config-file.patch new file mode 100644 index 00000000000000..845a5937616bb6 --- /dev/null +++ b/package/libs/libnl/patches/100-build-add-Libs.private-field-in-libnl-pkg-config-file.patch @@ -0,0 +1,30 @@ +From db0d59cd06f3ffd350379847c0885e1bfb85af0f Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 7 Mar 2015 11:34:42 +0100 +Subject: [PATCH 2/2] build: add Libs.private field in libnl pkg-config file + +In order to support static linking, the libnl pkg-config file should +indicate in its Libs.private field the libraries that libnl-3.0.a +requires. The LIBS variable contains the appropriate list of +libraries: -lm in all cases, and -lpthread when pthread support is +enabled. This allows to statically link applications against libnl +properly. + +Signed-off-by: Thomas Petazzoni +--- + libnl-3.0.pc.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libnl-3.0.pc.in b/libnl-3.0.pc.in +index b87e3dc..ddbc999 100644 +--- a/libnl-3.0.pc.in ++++ b/libnl-3.0.pc.in +@@ -7,4 +7,5 @@ Name: libnl + Description: Convenience library for netlink sockets + Version: @PACKAGE_VERSION@ + Libs: -L${libdir} -lnl-@MAJ_VERSION@ ++Libs.private: @LIBS@ + Cflags: -I${includedir}/libnl@MAJ_VERSION@ +-- +2.1.0 + diff --git a/package/libs/libnl/patches/101-add-musl-workaround-to-the-libc-compat.h-copy.patch b/package/libs/libnl/patches/101-add-musl-workaround-to-the-libc-compat.h-copy.patch new file mode 100644 index 00000000000000..11dc75b898d8cc --- /dev/null +++ b/package/libs/libnl/patches/101-add-musl-workaround-to-the-libc-compat.h-copy.patch @@ -0,0 +1,103 @@ +diff -Naur libnl-3.3.0_rc1.orig/include/linux-private/linux/if_ether.h libnl-3.3.0_rc1/include/linux-private/linux/if_ether.h +--- /include/linux-private/linux/if_ether.h 2017-03-08 19:56:31.824516933 -0800 ++++ /include/linux-private/linux/if_ether.h 2017-03-08 20:07:01.938237767 -0800 +@@ -22,6 +22,7 @@ + #define _LINUX_IF_ETHER_H + + #include ++#include + + /* + * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble +@@ -117,10 +118,12 @@ + * This is an Ethernet frame header. + */ + ++#if __UAPI_DEF_ETHHDR + struct ethhdr { + unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ + unsigned char h_source[ETH_ALEN]; /* source ether addr */ + __be16 h_proto; /* packet type ID field */ + } __attribute__((packed)); ++#endif + + #endif /* _LINUX_IF_ETHER_H */ +diff -Naur libnl-3.3.0_rc1.orig/include/linux-private/linux/libc-compat.h libnl-3.3.0_rc1/include/linux-private/linux/libc-compat.h +--- /include/linux-private/linux/libc-compat.h 2017-03-08 19:56:31.823516923 -0800 ++++ /include/linux-private/linux/libc-compat.h 2017-03-08 20:12:30.376843489 -0800 +@@ -48,10 +48,18 @@ + #ifndef _LIBC_COMPAT_H + #define _LIBC_COMPAT_H + +-/* We have included glibc headers... */ +-#if defined(__GLIBC__) ++/* We're used from userspace... */ ++#if !defined(__KERNEL__) + +-/* Coordinate with glibc netinet/in.h header. */ ++/* Coordinate with libc netinet/if_ether.h */ ++#ifdef _NETINET_IF_ETHER_H /* musl */ ++#define __UAPI_DEF_ETHHDR 0 ++#else ++/* glibc uses __NETINET_IF_ETHER_H, and uses the uapi header. */ ++#define __UAPI_DEF_ETHHDR 1 ++#endif ++ ++/* Coordinate with libc netinet/in.h header. */ + #if defined(_NETINET_IN_H) + + /* GLIBC headers included first so don't define anything +@@ -64,15 +72,7 @@ + #define __UAPI_DEF_IN_CLASS 0 + + #define __UAPI_DEF_IN6_ADDR 0 +-/* The exception is the in6_addr macros which must be defined +- * if the glibc code didn't define them. This guard matches +- * the guard in glibc/inet/netinet/in.h which defines the +- * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */ +-#if defined(__USE_MISC) || defined (__USE_GNU) + #define __UAPI_DEF_IN6_ADDR_ALT 0 +-#else +-#define __UAPI_DEF_IN6_ADDR_ALT 1 +-#endif + #define __UAPI_DEF_SOCKADDR_IN6 0 + #define __UAPI_DEF_IPV6_MREQ 0 + #define __UAPI_DEF_IPPROTO_V6 0 +@@ -83,7 +83,7 @@ + #else + + /* Linux headers included first, and we must define everything +- * we need. The expectation is that glibc will check the ++ * we need. The expectation is that libc will check the + * __UAPI_DEF_* defines and adjust appropriately. */ + #define __UAPI_DEF_IN_ADDR 1 + #define __UAPI_DEF_IN_IPPROTO 1 +@@ -93,7 +93,7 @@ + #define __UAPI_DEF_IN_CLASS 1 + + #define __UAPI_DEF_IN6_ADDR 1 +-/* We unconditionally define the in6_addr macros and glibc must ++/* We unconditionally define the in6_addr macros and libc must + * coordinate. */ + #define __UAPI_DEF_IN6_ADDR_ALT 1 + #define __UAPI_DEF_SOCKADDR_IN6 1 +@@ -115,7 +115,10 @@ + /* If we did not see any headers from any supported C libraries, + * or we are being included in the kernel, then define everything + * that we need. */ +-#else /* !defined(__GLIBC__) */ ++#else /* defined(__KERNEL__) */ ++ ++/* Definitions for if/ether.h */ ++#define __UAPI_DEF_ETHHDR 1 + + /* Definitions for in.h */ + #define __UAPI_DEF_IN_ADDR 1 +@@ -138,6 +141,6 @@ + /* Definitions for xattr.h */ + #define __UAPI_DEF_XATTR 1 + +-#endif /* __GLIBC__ */ ++#endif /* defined(__KERNEL__) */ + + #endif /* _LIBC_COMPAT_H */ diff --git a/package/libs/libnl/patches/102-revert-build-enable-building-cli-during-tests.patch b/package/libs/libnl/patches/102-revert-build-enable-building-cli-during-tests.patch new file mode 100644 index 00000000000000..f715bb83f9dcf1 --- /dev/null +++ b/package/libs/libnl/patches/102-revert-build-enable-building-cli-during-tests.patch @@ -0,0 +1,115 @@ +From 68f8393bd356a3d0598cf77e1044b7e8b98aa4d8 Mon Sep 17 00:00:00 2001 +Message-Id: <68f8393bd356a3d0598cf77e1044b7e8b98aa4d8.1493920165.git.baruch@tkos.co.il> +From: Baruch Siach +Date: Thu, 4 May 2017 15:56:14 +0300 +Subject: [PATCH] Revert "build: enable building cli during tests" + +This reverts commit 3cb28534d34392ceec4adead0cfa97039796ccb7. + +Contrary to what 3cb28534d commit log claims, the cli programs depend on +dynamic libraries support of the toolchain. Enabling cli programs +unconditionally breaks static build as follows: + +In file included from lib/cli/cls/basic.c:12:0: +./include/netlink/cli/utils.h:25:19: fatal error: dlfcn.h: No such file or directory +compilation terminated. +Makefile:3666: recipe for target 'lib/cli/cls/lib_cli_cls_basic_la-basic.lo' failed +make[1]: *** [lib/cli/cls/lib_cli_cls_basic_la-basic.lo] Error 1 + +Revert that commit to restore the ability of static only build of libnl, and +its dependencies. + +Signed-off-by: Baruch Siach +--- +Upstream status: https://github.com/thom311/libnl/pull/141 + + Makefile.am | 21 ++++++--------------- + 1 file changed, 6 insertions(+), 15 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 1b95a559304f..279548394650 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -3,8 +3,6 @@ + ACLOCAL_AMFLAGS = -I m4 + + lib_LTLIBRARIES = +-noinst_LTLIBRARIES = +-check_LTLIBRARIES = + + check_PROGRAMS = + check_programs = +@@ -500,6 +498,8 @@ EXTRA_lib_libnl_xfrm_3_la_DEPENDENCIES = \ + lib_libnl_xfrm_3_la_LIBADD = \ + lib/libnl-3.la + ++if ENABLE_CLI ++ + lib_cli_ltlibraries_cls = \ + lib/cli/cls/basic.la \ + lib/cli/cls/cgroup.la +@@ -513,15 +513,11 @@ lib_cli_ltlibraries_qdisc = \ + lib/cli/qdisc/pfifo.la \ + lib/cli/qdisc/plug.la + +-if ENABLE_CLI + pkglib_clsdir = $(pkglibdir)/cli/cls + pkglib_qdiscdir = $(pkglibdir)/cli/qdisc + pkglib_cls_LTLIBRARIES = $(lib_cli_ltlibraries_cls) + pkglib_qdisc_LTLIBRARIES = $(lib_cli_ltlibraries_qdisc) +-else +-noinst_LTLIBRARIES += \ +- $(lib_cli_ltlibraries_cls) \ +- $(lib_cli_ltlibraries_qdisc) ++ + endif + + lib_cli_ldflags = \ +@@ -550,13 +546,8 @@ lib_cli_qdisc_plug_la_LDFLAGS = $(lib_cli_ldflags) + + ############################################################################### + +-src_lib_ldflags = +- + if ENABLE_CLI + lib_LTLIBRARIES += src/lib/libnl-cli-3.la +-src_lib_ldflags += -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) +-else +-check_LTLIBRARIES += src/lib/libnl-cli-3.la + endif + + src_lib_libnl_cli_3_la_SOURCES = \ +@@ -583,7 +574,7 @@ src_lib_libnl_cli_3_la_CPPFLAGS = \ + -I$(srcdir)/include \ + -I$(builddir)/include + src_lib_libnl_cli_3_la_LDFLAGS = \ +- $(src_lib_ldflags) \ ++ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ + -Wl,--version-script=$(srcdir)/libnl-cli-3.sym + src_lib_libnl_cli_3_la_LIBADD = \ + lib/libnl-3.la \ +@@ -668,8 +659,6 @@ else + noinst_PROGRAMS += $(cli_programs) + endif + endif +-else +-check_PROGRAMS += $(cli_programs) + endif + + src_genl_ctrl_list_CPPFLAGS = $(src_cppflags) +@@ -847,10 +836,12 @@ tests_test_complex_HTB_with_hash_filters_LDADD = $(tests_ldadd) + tests_test_u32_filter_with_actions_CPPFLAGS = $(tests_cppflags) + tests_test_u32_filter_with_actions_LDADD = $(tests_ldadd) + ++if ENABLE_CLI + check_PROGRAMS += \ + tests/test-cache-mngr \ + tests/test-genl \ + tests/test-nf-cache-mngr ++endif + + tests_cli_ldadd = \ + $(tests_ldadd) \ +-- +2.11.0 + diff --git a/package/libs/libtool/Makefile b/package/libs/libtool/Makefile index 5eb521a72bfdd8..8cef09f78a0200 100644 --- a/package/libs/libtool/Makefile +++ b/package/libs/libtool/Makefile @@ -17,6 +17,7 @@ PKG_HASH:=afcce660d3dc54c63a0a5ba3cf05272239dc3c54bbeba20f6bad250f9dc007ae PKG_LICENSE:=GPL-2.0+ PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:gnu:libtool PKG_BUILD_PARALLEL:=0 diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile index 5fdf946412319d..36a3bbeb286bac 100644 --- a/package/libs/libubox/Makefile +++ b/package/libs/libubox/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/libubox.git -PKG_SOURCE_DATE:=2017-09-29 -PKG_SOURCE_VERSION:=632688e8d6cde32781e4ec685d59afb0938300ad -PKG_MIRROR_HASH:=84b5a0bc404e96a2965cadc1beb92664f4c22cc878a0a624eecd4b6884b56625 +PKG_SOURCE_DATE:=2018-01-07 +PKG_SOURCE_VERSION:=1c08e80313fd487112c48346889cc57badeef751 +PKG_MIRROR_HASH:=58cad98de55d44d7791e5d49b809ac5c32d3e6c481dc385b10e02386853f2263 CMAKE_INSTALL:=1 PKG_LICENSE:=ISC diff --git a/package/libs/libunwind/Makefile b/package/libs/libunwind/Makefile index 913d616234dd6b..2e655ed6f04d7a 100644 --- a/package/libs/libunwind/Makefile +++ b/package/libs/libunwind/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libunwind PKG_VERSION:=1.2.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME) @@ -20,9 +20,11 @@ PKG_INSTALL:=1 PKG_LICENSE:=X11 PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:libunwind_project:libunwind PKG_MAINTAINER:=Yousong Zhou +PKG_SSP:=0 include $(INCLUDE_DIR)/package.mk define Package/libunwind diff --git a/package/libs/libusb-compat/Makefile b/package/libs/libusb-compat/Makefile index 59c5a80bd08d9b..0dc93941a9a32c 100644 --- a/package/libs/libusb-compat/Makefile +++ b/package/libs/libusb-compat/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libusb-compat -PKG_VERSION:=0.1.4 -PKG_RELEASE:=2 +PKG_VERSION:=0.1.5 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/libusb -PKG_HASH:=ed5bdd160c7b01ef767fb931a81b454f46226d1e2cf58502ced758d3e5a9fdc4 +PKG_HASH:=404ef4b6b324be79ac1bfb3d839eac860fbc929e6acb1ef88793a6ea328bc55a PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile index 0e3383150d7c9c..3a2b292285bf6c 100644 --- a/package/libs/mbedtls/Makefile +++ b/package/libs/mbedtls/Makefile @@ -18,6 +18,7 @@ PKG_HASH:=a99959d7360def22f9108d2d487c9de384fe76c349697176b1f22370080d5810 PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=GPL-2.0+ +PKG_CPE_ID:=cpe:/a:arm:mbed_tls include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk diff --git a/package/libs/nghttp2/Makefile b/package/libs/nghttp2/Makefile new file mode 100644 index 00000000000000..3cc2a5543010a8 --- /dev/null +++ b/package/libs/nghttp2/Makefile @@ -0,0 +1,45 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=nghttp2 +PKG_VERSION:=1.29.0 +PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz + +PKG_SOURCE_URL:=https://github.com/nghttp2/nghttp2/releases/download/v$(PKG_VERSION) +PKG_HASH:=a7a1b18be57be6a53a7739988ea27d6ec9209e7b0e8372b8483cd911d7838739 + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=COPYING +CMAKE_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/libnghttp2 + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Library implementing the framing layer of HTTP/2 + MAINTAINER:=Hans Dedecker +endef + +define Package/libnghttp2/description + C library implementing the framing layer of the HTTP/2 protocol. It can be used to build a HTTP/2-capable HTTP client or server +endef + +CMAKE_OPTIONS += \ + -DENABLE_LIB_ONLY=ON + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/nghttp2 + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/nghttp2/*.h $(1)/usr/include/nghttp2/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libnghttp2.so* $(1)/usr/lib/ +endef + +define Package/libnghttp2/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libnghttp2.so* $(1)/usr/lib +endef + +$(eval $(call BuildPackage,libnghttp2)) diff --git a/package/libs/openssl/Config.in b/package/libs/openssl/Config.in index 40fc945eaa3979..96d3ba3e9d69c1 100644 --- a/package/libs/openssl/Config.in +++ b/package/libs/openssl/Config.in @@ -49,20 +49,20 @@ config OPENSSL_ENGINE_DIGEST bool depends on OPENSSL_ENGINE_CRYPTO prompt "Digests acceleration support" - -config OPENSSL_THREADS - bool - prompt "Threading support" - default y - select PACKAGE_libpthread config OPENSSL_HARDWARE_SUPPORT bool default n prompt "Enable hardware support" +config OPENSSL_OPTIMIZE_SPEED + bool + default n + prompt "Enable optimization for speed instead of size" + endif config OPENSSL_ENGINE_CRYPTO bool + select OPENSSL_HARDWARE_SUPPORT prompt "Crypto acceleration support" if PACKAGE_libopenssl diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index 37dae96fe553e0..b75aa45e84dffb 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssl PKG_BASE:=1.0.2 -PKG_BUGFIX:=l +PKG_BUGFIX:=n PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_USE_MIPS16:=0 PKG_BUILD_PARALLEL:=0 @@ -24,10 +24,11 @@ PKG_SOURCE_URL:= \ http://gd.tuwien.ac.at/infosys/security/openssl/source/ \ http://www.openssl.org/source/ \ http://www.openssl.org/source/old/$(PKG_BASE)/ -PKG_HASH:=ce07195b659e75f4e1db43552860070061f156a98bb37b672b101ba6e3ddf30c +PKG_HASH:=370babb75f278c39e0c50e8c4e7493bc0f18db6867478341a832a982fd15a8fe PKG_LICENSE:=OpenSSL PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:openssl:openssl PKG_CONFIG_DEPENDS:= \ CONFIG_OPENSSL_ENGINE_CRYPTO \ CONFIG_OPENSSL_ENGINE_DIGEST \ @@ -35,13 +36,13 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_OPENSSL_WITH_EC2M \ CONFIG_OPENSSL_WITH_SSL3 \ CONFIG_OPENSSL_HARDWARE_SUPPORT \ - CONFIG_OPENSSL_THREADS \ CONFIG_OPENSSL_WITH_DEPRECATED \ CONFIG_OPENSSL_WITH_DTLS \ CONFIG_OPENSSL_WITH_COMPRESSION \ CONFIG_OPENSSL_WITH_NPN \ CONFIG_OPENSSL_WITH_PSK \ - CONFIG_OPENSSL_WITH_SRP + CONFIG_OPENSSL_WITH_SRP \ + CONFIG_OPENSSL_OPTIMIZE_SPEED include $(INCLUDE_DIR)/package.mk @@ -129,12 +130,6 @@ ifndef CONFIG_OPENSSL_HARDWARE_SUPPORT OPENSSL_OPTIONS += no-hw endif -ifdef CONFIG_OPENSSL_THREADS - OPENSSL_OPTIONS += threads -else - OPENSSL_OPTIONS += no-threads -endif - ifndef CONFIG_OPENSSL_WITH_DEPRECATED OPENSSL_OPTIONS += no-deprecated endif @@ -161,6 +156,10 @@ ifndef CONFIG_OPENSSL_WITH_SRP OPENSSL_OPTIONS += no-srp endif +ifeq ($(CONFIG_OPENSSL_OPTIMIZE_SPEED),y) + TARGET_CFLAGS := $(filter-out -Os,$(TARGET_CFLAGS)) -O3 +endif + ifeq ($(CONFIG_x86_64),y) OPENSSL_TARGET:=linux-x86_64-openwrt OPENSSL_MAKEFLAGS += LIBDIR=lib @@ -191,7 +190,7 @@ define Build/Configure --openssldir=/etc/ssl \ $(TARGET_CPPFLAGS) \ $(TARGET_LDFLAGS) -ldl \ - -DOPENSSL_SMALL_FOOTPRINT \ + $(if $(CONFIG_OPENSSL_OPTIMIZE_SPEED),,-DOPENSSL_SMALL_FOOTPRINT) \ $(OPENSSL_NO_CIPHERS) \ $(OPENSSL_OPTIONS) \ ) diff --git a/package/libs/openssl/patches/150-no_engines.patch b/package/libs/openssl/patches/150-no_engines.patch index f8c5d6e6cd3428..1cb04bdabbe653 100644 --- a/package/libs/openssl/patches/150-no_engines.patch +++ b/package/libs/openssl/patches/150-no_engines.patch @@ -1,6 +1,6 @@ --- a/Configure +++ b/Configure -@@ -2129,6 +2129,11 @@ EOF +@@ -2130,6 +2130,11 @@ EOF close(OUT); } diff --git a/package/libs/readline/Makefile b/package/libs/readline/Makefile index ccd20a4b185afb..ca3a468637afd4 100644 --- a/package/libs/readline/Makefile +++ b/package/libs/readline/Makefile @@ -17,6 +17,7 @@ PKG_HASH:=750d437185286f40a369e1e4f4764eda932b9459b5ec9a731628393dd3d32334 PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:gnu:readline PKG_BUILD_PARALLEL:=1 PKG_FIXUP:=autoreconf diff --git a/package/libs/uclient/Makefile b/package/libs/uclient/Makefile index 2c4c6262366711..3eefa2e012d341 100644 --- a/package/libs/uclient/Makefile +++ b/package/libs/uclient/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/uclient.git -PKG_SOURCE_DATE:=2017-09-06 -PKG_SOURCE_VERSION:=24d6eded73dec427fc4a3a20cc73c94227f59c31 -PKG_MIRROR_HASH:=e884ae0c859baa20a5c7f3d924022f8e1f57d28474dbe5fed1efb8fb97790dd0 +PKG_SOURCE_DATE:=2017-11-02 +PKG_SOURCE_VERSION:=4b87d83160fec70d50b7fcd736a8c538c28a016c +PKG_MIRROR_HASH:=4bbb4d5f295ebdcd67fec87a6794168bea2176a42cb2907c47d8566fb33dafb3 CMAKE_INSTALL:=1 PKG_BUILD_DEPENDS:=ustream-ssl diff --git a/package/libs/ustream-ssl/Makefile b/package/libs/ustream-ssl/Makefile index ff6c4b7d015c82..7afbeeba66aa27 100644 --- a/package/libs/ustream-ssl/Makefile +++ b/package/libs/ustream-ssl/Makefile @@ -35,11 +35,11 @@ define Package/libustream-openssl VARIANT:=openssl endef -define Package/libustream-cyassl +define Package/libustream-wolfssl $(Package/libustream/default) - TITLE += (cyassl) - DEPENDS += +PACKAGE_libustream-cyassl:libcyassl - VARIANT:=cyassl + TITLE += (wolfssl) + DEPENDS += +PACKAGE_libustream-wolfssl:libwolfssl + VARIANT:=wolfssl endef define Package/libustream-mbedtls @@ -50,7 +50,7 @@ define Package/libustream-mbedtls DEFAULT_VARIANT:=1 endef -ifeq ($(BUILD_VARIANT),cyassl) +ifeq ($(BUILD_VARIANT),wolfssl) TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/cyassl -DHAVE_SNI CMAKE_OPTIONS += -DCYASSL=on endif @@ -64,9 +64,9 @@ define Package/libustream/default/install endef Package/libustream-openssl/install = $(Package/libustream/default/install) -Package/libustream-cyassl/install = $(Package/libustream/default/install) +Package/libustream-wolfssl/install = $(Package/libustream/default/install) Package/libustream-mbedtls/install = $(Package/libustream/default/install) $(eval $(call BuildPackage,libustream-mbedtls)) -$(eval $(call BuildPackage,libustream-cyassl)) +$(eval $(call BuildPackage,libustream-wolfssl)) $(eval $(call BuildPackage,libustream-openssl)) diff --git a/package/libs/cyassl/Config.in b/package/libs/wolfssl/Config.in similarity index 63% rename from package/libs/cyassl/Config.in rename to package/libs/wolfssl/Config.in index 371bb564f8abd9..7e8a4b6cee62d1 100644 --- a/package/libs/cyassl/Config.in +++ b/package/libs/wolfssl/Config.in @@ -1,47 +1,47 @@ -if PACKAGE_libcyassl +if PACKAGE_libwolfssl -config CYASSL_HAS_AES_CCM +config WOLFSSL_HAS_AES_CCM bool "Include AES-CCM support" default n -config CYASSL_HAS_AES_GCM +config WOLFSSL_HAS_AES_GCM bool "Include AES-GCM support" default n -config CYASSL_HAS_CHACHA +config WOLFSSL_HAS_CHACHA bool "Include ChaCha cipher suite support" default n -config CYASSL_HAS_ECC +config WOLFSSL_HAS_ECC bool "Include ECC (Elliptic Curve Cryptography) support" default y -config CYASSL_HAS_DH +config WOLFSSL_HAS_DH bool "Include DH (Diffie-Hellman) support" default n -config CYASSL_HAS_ARC4 +config WOLFSSL_HAS_ARC4 bool "Include ARC4 support" default n -config CYASSL_HAS_DES3 +config WOLFSSL_HAS_DES3 bool "Include DES3 (Tripple-DES) support" default n -config CYASSL_HAS_PSK +config WOLFSSL_HAS_PSK bool "Include PKS (Pre Share Key) support" default n -config CYASSL_HAS_DTLS +config WOLFSSL_HAS_DTLS bool "Include DTLS support" default n -config CYASSL_HAS_ECC25519 +config WOLFSSL_HAS_ECC25519 bool "Include ECC Curve 22519 support" - depends on CYASSL_HAS_ECC + depends on WOLFSSL_HAS_ECC default n -config CYASSL_HAS_POLY_1305 +config WOLFSSL_HAS_POLY_1305 bool "Include Poly-1305 support" default n diff --git a/package/libs/cyassl/Makefile b/package/libs/wolfssl/Makefile similarity index 65% rename from package/libs/cyassl/Makefile rename to package/libs/wolfssl/Makefile index 68646d9b00299e..1d4b7f5579b353 100644 --- a/package/libs/cyassl/Makefile +++ b/package/libs/wolfssl/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2016 OpenWrt.org +# Copyright (C) 2006-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,36 +8,39 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wolfssl -PKG_VERSION:=3.10.0 +PKG_VERSION:=3.12.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip PKG_SOURCE_URL:=https://www.wolfssl.com/ -PKG_HASH:=66f7f2a8b8ee37d6b4beab3cb0dcb6a6980fd4674373bfd3bf1214b9d0d2c02e +PKG_HASH:=4993844c4b7919007c4511ec3f987fb06543536c3fc933cb53491bffe9150e49 PKG_FIXUP:=libtool PKG_INSTALL:=1 PKG_USE_MIPS16:=0 PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=GPL-2.0+ +PKG_CPE_ID:=cpe:/a:yassl:cyassl include $(INCLUDE_DIR)/package.mk -define Package/libcyassl +define Package/libwolfssl SECTION:=libs SUBMENU:=SSL CATEGORY:=Libraries - TITLE:=CyaSSL library + TITLE:=wolfSSL library URL:=http://www.wolfssl.com/ + MAINTAINER:=Alexandru Ardelean MENU:=1 + PROVIDES:=libcyassl endef -define Package/libcyassl/description -CyaSSL is an SSL library optimized for small footprint, both on disk and for -memory use. +define Package/libwolfssl/description +wolfSSL (formerly CyaSSL) is an SSL library optimized for small +footprint, both on disk and for memory use. endef -define Package/libcyassl/config +define Package/libwolfssl/config source "$(SOURCE)/Config.in" endef @@ -55,58 +58,58 @@ CONFIGURE_ARGS += \ --enable-ipv6 endif -ifeq ($(CONFIG_CYASSL_HAS_AES_CCM),y) +ifeq ($(CONFIG_WOLFSSL_HAS_AES_CCM),y) CONFIGURE_ARGS += \ --enable-aesccm endif -ifeq ($(CONFIG_CYASSL_HAS_AES_GCM),y) +ifneq ($(CONFIG_WOLFSSL_HAS_AES_GCM),y) CONFIGURE_ARGS += \ - --enable-aesgcm + --disable-aesgcm endif -ifeq ($(CONFIG_CYASSL_HAS_CHACHA),y) +ifneq ($(CONFIG_WOLFSSL_HAS_CHACHA),y) CONFIGURE_ARGS += \ - --enable-chacha + --disable-chacha endif -ifeq ($(CONFIG_CYASSL_HAS_ECC),y) +ifeq ($(CONFIG_WOLFSSL_HAS_ECC),y) CONFIGURE_ARGS += \ --enable-ecc \ --enable-supportedcurves endif -ifeq ($(CONFIG_CYASSL_HAS_DH),y) +ifneq ($(CONFIG_WOLFSSL_HAS_DH),y) CONFIGURE_ARGS += \ --enable-dh endif -ifeq ($(CONFIG_CYASSL_HAS_ARC4),n) +ifeq ($(CONFIG_WOLFSSL_HAS_ARC4),n) CONFIGURE_ARGS += \ --disable-arc4 endif -ifeq ($(CONFIG_CYASSL_HAS_DES3),y) +ifeq ($(CONFIG_WOLFSSL_HAS_DES3),y) CONFIGURE_ARGS += \ --disable-des3 endif -ifeq ($(CONFIG_CYASSL_HAS_PSK),y) +ifeq ($(CONFIG_WOLFSSL_HAS_PSK),y) CONFIGURE_ARGS += \ --enable-psk endif -ifeq ($(CONFIG_CYASSL_HAS_DTLS),y) +ifeq ($(CONFIG_WOLFSSL_HAS_DTLS),y) CONFIGURE_ARGS += \ --enable-dtls endif -ifeq ($(CONFIG_CYASSL_HAS_ECC25519),y) +ifeq ($(CONFIG_WOLFSSL_HAS_ECC25519),y) CONFIGURE_ARGS += \ - --enable-ecc25519 + --enable-curve25519 endif -ifeq ($(CONFIG_CYASSL_HAS_POLY1305),y) +ifneq ($(CONFIG_WOLFSSL_HAS_POLY1305),y) CONFIGURE_ARGS += \ --enable-poly1305 endif @@ -130,10 +133,10 @@ define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig endef -define Package/libcyassl/install +define Package/libwolfssl/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.so* $(1)/usr/lib/ ln -s libwolfssl.so $(1)/usr/lib/libcyassl.so endef -$(eval $(call BuildPackage,libcyassl)) +$(eval $(call BuildPackage,libwolfssl)) diff --git a/package/libs/wolfssl/patches/001-CVE-2017-13099.patch b/package/libs/wolfssl/patches/001-CVE-2017-13099.patch new file mode 100644 index 00000000000000..e7b63cb8d4f9f6 --- /dev/null +++ b/package/libs/wolfssl/patches/001-CVE-2017-13099.patch @@ -0,0 +1,144 @@ +From fd455d5a5e9fef24c208e7ac7d3a4bc58834cbf1 Mon Sep 17 00:00:00 2001 +From: David Garske +Date: Tue, 14 Nov 2017 14:05:50 -0800 +Subject: [PATCH] Fix for handling of static RSA PKCS formatting failures so + they are indistinguishable from from correctly formatted RSA blocks (per + RFC5246 section 7.4.7.1). Adjusted the static RSA preMasterSecret RNG + creation for consistency in client case. Removed obsolete + `PMS_VERSION_ERROR`. + +--- + src/internal.c | 70 +++++++++++++++++++++++++++++++++++++++++++++-------- + wolfssl/error-ssl.h | 2 +- + 2 files changed, 61 insertions(+), 11 deletions(-) + +--- a/src/internal.c ++++ b/src/internal.c +@@ -14190,9 +14190,6 @@ const char* wolfSSL_ERR_reason_error_str + case NOT_READY_ERROR : + return "handshake layer not ready yet, complete first"; + +- case PMS_VERSION_ERROR : +- return "premaster secret version mismatch error"; +- + case VERSION_ERROR : + return "record layer version error"; + +@@ -18758,8 +18755,10 @@ int SendClientKeyExchange(WOLFSSL* ssl) + #ifndef NO_RSA + case rsa_kea: + { ++ /* build PreMasterSecret with RNG data */ + ret = wc_RNG_GenerateBlock(ssl->rng, +- ssl->arrays->preMasterSecret, SECRET_LEN); ++ &ssl->arrays->preMasterSecret[VERSION_SZ], ++ SECRET_LEN - VERSION_SZ); + if (ret != 0) { + goto exit_scke; + } +@@ -23545,6 +23544,9 @@ static int DoSessionTicket(WOLFSSL* ssl, + word32 idx; + word32 begin; + word32 sigSz; ++ #ifndef NO_RSA ++ int lastErr; ++ #endif + } DckeArgs; + + static void FreeDckeArgs(WOLFSSL* ssl, void* pArgs) +@@ -23770,6 +23772,14 @@ static int DoSessionTicket(WOLFSSL* ssl, + ERROR_OUT(BUFFER_ERROR, exit_dcke); + } + ++ /* pre-load PreMasterSecret with RNG data */ ++ ret = wc_RNG_GenerateBlock(ssl->rng, ++ &ssl->arrays->preMasterSecret[VERSION_SZ], ++ SECRET_LEN - VERSION_SZ); ++ if (ret != 0) { ++ goto exit_dcke; ++ } ++ + args->output = NULL; + break; + } /* rsa_kea */ +@@ -24234,6 +24244,20 @@ static int DoSessionTicket(WOLFSSL* ssl, + NULL, 0, NULL + #endif + ); ++ ++ /* Errors that can occur here that should be ++ * indistinguishable: ++ * RSA_BUFFER_E, RSA_PAD_E and RSA_PRIVATE_ERROR ++ */ ++ if (ret < 0 && ret != BAD_FUNC_ARG) { ++ #ifdef WOLFSSL_ASYNC_CRYPT ++ if (ret == WC_PENDING_E) ++ goto exit_dcke; ++ #endif ++ /* store error code for handling below */ ++ args->lastErr = ret; ++ ret = 0; ++ } + break; + } /* rsa_kea */ + #endif /* !NO_RSA */ +@@ -24380,16 +24404,42 @@ static int DoSessionTicket(WOLFSSL* ssl, + /* Add the signature length to idx */ + args->idx += args->length; + +- if (args->sigSz == SECRET_LEN && args->output != NULL) { +- XMEMCPY(ssl->arrays->preMasterSecret, args->output, SECRET_LEN); +- if (ssl->arrays->preMasterSecret[0] != ssl->chVersion.major || +- ssl->arrays->preMasterSecret[1] != ssl->chVersion.minor) { +- ERROR_OUT(PMS_VERSION_ERROR, exit_dcke); ++ #ifdef DEBUG_WOLFSSL ++ /* check version (debug warning message only) */ ++ if (args->output != NULL) { ++ if (args->output[0] != ssl->chVersion.major || ++ args->output[1] != ssl->chVersion.minor) { ++ WOLFSSL_MSG("preMasterSecret version mismatch"); + } + } ++ #endif ++ ++ /* RFC5246 7.4.7.1: ++ * Treat incorrectly formatted message blocks and/or ++ * mismatched version numbers in a manner ++ * indistinguishable from correctly formatted RSA blocks ++ */ ++ ++ ret = args->lastErr; ++ args->lastErr = 0; /* reset */ ++ ++ /* build PreMasterSecret */ ++ ssl->arrays->preMasterSecret[0] = ssl->chVersion.major; ++ ssl->arrays->preMasterSecret[1] = ssl->chVersion.minor; ++ if (ret == 0 && args->sigSz == SECRET_LEN && ++ args->output != NULL) { ++ XMEMCPY(&ssl->arrays->preMasterSecret[VERSION_SZ], ++ &args->output[VERSION_SZ], ++ SECRET_LEN - VERSION_SZ); ++ } + else { +- ERROR_OUT(RSA_PRIVATE_ERROR, exit_dcke); ++ /* preMasterSecret has RNG and version set */ ++ /* return proper length and ignore error */ ++ /* error will be caught as decryption error */ ++ args->sigSz = SECRET_LEN; ++ ret = 0; + } ++ + break; + } /* rsa_kea */ + #endif /* !NO_RSA */ +--- a/wolfssl/error-ssl.h ++++ b/wolfssl/error-ssl.h +@@ -57,7 +57,7 @@ enum wolfSSL_ErrorCodes { + DOMAIN_NAME_MISMATCH = -322, /* peer subject name mismatch */ + WANT_READ = -323, /* want read, call again */ + NOT_READY_ERROR = -324, /* handshake layer not ready */ +- PMS_VERSION_ERROR = -325, /* pre m secret version error */ ++ + VERSION_ERROR = -326, /* record layer version error */ + WANT_WRITE = -327, /* want write, call again */ + BUFFER_ERROR = -328, /* malformed buffer input */ diff --git a/package/libs/wolfssl/patches/100-disable-hardening-check.patch b/package/libs/wolfssl/patches/100-disable-hardening-check.patch new file mode 100644 index 00000000000000..83d51b1d5cbdf4 --- /dev/null +++ b/package/libs/wolfssl/patches/100-disable-hardening-check.patch @@ -0,0 +1,11 @@ +--- a/wolfssl/wolfcrypt/settings.h ++++ b/wolfssl/wolfcrypt/settings.h +@@ -1553,7 +1553,7 @@ extern void uITRON4_free(void *p) ; + #endif + + /* warning for not using harden build options (default with ./configure) */ +-#ifndef WC_NO_HARDEN ++#if 0 + #if (defined(USE_FAST_MATH) && !defined(TFM_TIMING_RESISTANT)) || \ + (defined(HAVE_ECC) && !defined(ECC_TIMING_RESISTANT)) || \ + (!defined(NO_RSA) && !defined(WC_RSA_BLINDING) && !defined(HAVE_FIPS)) diff --git a/package/libs/cyassl/patches/400-additional_compatibility.patch b/package/libs/wolfssl/patches/400-additional_compatibility.patch similarity index 100% rename from package/libs/cyassl/patches/400-additional_compatibility.patch rename to package/libs/wolfssl/patches/400-additional_compatibility.patch diff --git a/package/network/config/firewall/Makefile b/package/network/config/firewall/Makefile index e5fcb8c9168039..06e67543b91a7b 100644 --- a/package/network/config/firewall/Makefile +++ b/package/network/config/firewall/Makefile @@ -13,9 +13,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/firewall3.git -PKG_SOURCE_DATE:=2017-05-27 -PKG_SOURCE_VERSION:=a4d98aea373e04f3fdc3c492c1688ba52ce490a9 -PKG_MIRROR_HASH:=55402b1e6bb471f6aed599c61c1c63b58212f5789f094d78247646fc0a7cf435 +PKG_SOURCE_DATE:=2017-11-07 +PKG_SOURCE_VERSION:=c4309372acc7e1bef8aa230269f7da1dec790e68 +PKG_MIRROR_HASH:=1699884d8499d01e433959185f79ff9eb69704de47885b996123374b8015b422 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=ISC diff --git a/package/network/config/gre/Makefile b/package/network/config/gre/Makefile index 9193f5c9fb70e2..b191327f873c43 100644 --- a/package/network/config/gre/Makefile +++ b/package/network/config/gre/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gre PKG_VERSION:=1 -PKG_RELEASE:=7 +PKG_RELEASE:=8 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/config/gre/files/gre.sh b/package/network/config/gre/files/gre.sh index a6b4ba85f6c762..e604bfb259a990 100755 --- a/package/network/config/gre/files/gre.sh +++ b/package/network/config/gre/files/gre.sh @@ -25,7 +25,7 @@ gre_generic_setup() { json_add_string mode "$mode" json_add_int mtu "${mtu:-1280}" [ -n "$df" ] && json_add_boolean df "$df" - [ -n "ttl" ] && json_add_int ttl "$ttl" + [ -n "$ttl" ] && json_add_int ttl "$ttl" [ -n "$tos" ] && json_add_string tos "$tos" json_add_boolean multicast "$multicast" json_add_string local "$local" diff --git a/package/network/config/ltq-adsl-app/Makefile b/package/network/config/ltq-adsl-app/Makefile index 6e0b47f87c2eff..cf8eaf247d3fb9 100644 --- a/package/network/config/ltq-adsl-app/Makefile +++ b/package/network/config/ltq-adsl-app/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=dsl_cpe_control_danube PKG_VERSION:=3.24.4.4 -PKG_RELEASE:=2 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_BUILD_DIR:=$(BUILD_DIR)/dsl_cpe_control-$(PKG_VERSION) PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/ @@ -35,7 +35,7 @@ define Package/ltq-adsl-app CATEGORY:=Network TITLE:=Lantiq DSL userland tool URL:=http://www.lantiq.com/ - DEPENDS:=@(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy||TARGET_lantiq_ase) +libpthread + DEPENDS:=@(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy||TARGET_lantiq_ase) +libpthread +ip MENU:=1 endef @@ -76,10 +76,11 @@ CONFIGURE_ARGS += \ TARGET_CFLAGS += -I$(LINUX_DIR)/include define Package/ltq-adsl-app/install - $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_DIR) $(1)/etc/init.d $(1)/sbin $(1)/etc/hotplug.d/dsl $(1)/etc/hotplug.d/net $(INSTALL_BIN) ./files/dsl_control $(1)/etc/init.d/ - - $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) ./files/10_atm.sh $(1)/etc/hotplug.d/dsl + $(INSTALL_BIN) ./files/10_ptm.sh $(1)/etc/hotplug.d/dsl + $(INSTALL_BIN) ./files/10-adsl_rename $(1)/etc/hotplug.d/net $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dsl_cpe_control $(1)/sbin endef diff --git a/package/network/config/ltq-adsl-app/files/10-adsl_rename b/package/network/config/ltq-adsl-app/files/10-adsl_rename new file mode 100644 index 00000000000000..f81a90a5f81693 --- /dev/null +++ b/package/network/config/ltq-adsl-app/files/10-adsl_rename @@ -0,0 +1,7 @@ +#!/bin/sh + +if [ "$ACTION" = add ]; then + [ "$DEVICENAME" = "nas0" ] || [ "$DEVICENAME" = "ptm0" ] || exit + + ip link set $DEVICENAME name dsl0 +fi diff --git a/package/network/config/ltq-adsl-app/files/10_atm.sh b/package/network/config/ltq-adsl-app/files/10_atm.sh new file mode 100755 index 00000000000000..898d8ec07c61a2 --- /dev/null +++ b/package/network/config/ltq-adsl-app/files/10_atm.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +[ "$DSL_NOTIFICATION_TYPE" = "DSL_STATUS" ] && \ +[ "$DSL_TC_LAYER_STATUS" = "ATM" ] && \ +! grep -q "ltq_atm_ar9\|ltq_atm_ase\|ltq_atm_danube" /proc/modules || exit 0 + +logger -p daemon.notice -t "dsl-notify" "Switching to TC-Layer ATM" + +if grep -q "ltq_ptm_ar9\|ltq_ptm_ase\|ltq_ptm_danube" /proc/modules ; then + logger -p daemon.notice -t "dsl-notify" "Loading ATM driver while EFM/PTM driver is loaded is not possible. Reboot is needed." + exit +fi + +case "$(strings /proc/device-tree/compatible)" in +*lantiq,ar9*) + soc="ar9" + ;; +*lantiq,ase*) + soc="ase" + ;; +*lantiq,danube*) + soc="danube" + ;; +*) + logger -p daemon.notice -t "dsl-notify" "Unsupported SoC" + exit +esac + +modprobe ltq_atm_${soc} + +/etc/init.d/br2684ctl reload diff --git a/package/network/config/ltq-adsl-app/files/10_ptm.sh b/package/network/config/ltq-adsl-app/files/10_ptm.sh new file mode 100755 index 00000000000000..8a76b926f7e2dc --- /dev/null +++ b/package/network/config/ltq-adsl-app/files/10_ptm.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +[ "$DSL_NOTIFICATION_TYPE" = "DSL_STATUS" ] && \ +[ "$DSL_TC_LAYER_STATUS" = "EFM" ] && \ +! grep -q "ltq_ptm_ar9\|ltq_ptm_ase\|ltq_ptm_danube" /proc/modules || exit 0 + +logger -p daemon.notice -t "dsl-notify" "Switching to TC-Layer EFM/PTM" + +if grep -q "ltq_atm_ar9\|ltq_atm_ase\|ltq_atm_danube" /proc/modules ; then + logger -p daemon.notice -t "dsl-notify" "Loading EFM/PTM driver while ATM driver is loaded is not possible. Reboot is needed." + exit +fi + +case "$(strings /proc/device-tree/compatible)" in +*lantiq,ar9*) + soc="ar9" + ;; +*lantiq,ase*) + soc="ase" + ;; +*lantiq,danube*) + soc="danube" + ;; +*) + logger -p daemon.notice -t "dsl-notify" "Unsupported SoC" + exit +esac + +modprobe ltq_ptm_${soc} diff --git a/package/network/config/ltq-adsl-app/files/dsl_control b/package/network/config/ltq-adsl-app/files/dsl_control index 8218186ef8b1aa..d93d47808b73d2 100644 --- a/package/network/config/ltq-adsl-app/files/dsl_control +++ b/package/network/config/ltq-adsl-app/files/dsl_control @@ -2,14 +2,12 @@ # Copyright (C) 2012 OpenWrt.org START=49 +USE_PROCD=1 EXTRA_COMMANDS="status lucistat" EXTRA_HELP=" status Get DSL status information lucistat Get status information if lua friendly format" -SERVICE_DAEMONIZE=1 -SERVICE_WRITE_PID=1 - [ -f /lib/functions/lantiq_dsl.sh ] && . /lib/functions/lantiq_dsl.sh annex_b=10_00_10_00_00_04_00_00 @@ -28,7 +26,11 @@ annex_m2=00_00_00_00_40_00_00_00 annex_m2p=00_00_00_00_00_00_04_00 annex_j=10_00_10_40_00_04_01_00 -start() { +service_triggers() { + procd_add_reload_trigger network +} + +start_service() { local annex local firmware local xtu @@ -45,12 +47,15 @@ start() { return 1 } - service_start /sbin/dsl_cpe_control -i${xtu} \ + procd_open_instance + procd_set_param command /sbin/dsl_cpe_control \ + -i${xtu} \ -n /sbin/dsl_notify.sh \ -f ${firmware} + procd_close_instance } -stop() { +stop_service() { DSL_NOTIFICATION_TYPE="DSL_INTERFACE_STATUS" \ DSL_INTERFACE_STATUS="DOWN" \ /sbin/dsl_notify.sh diff --git a/package/network/config/ltq-adsl-app/patches/100-add-more-script-notifications.patch b/package/network/config/ltq-adsl-app/patches/100-add-more-script-notifications.patch new file mode 100644 index 00000000000000..9d611c1caff581 --- /dev/null +++ b/package/network/config/ltq-adsl-app/patches/100-add-more-script-notifications.patch @@ -0,0 +1,42 @@ +From 9d4f86ba2cf10304303011f4f5628fa68dc77624 Mon Sep 17 00:00:00 2001 +From: Mathias Kresin +Date: Mon, 16 Oct 2017 21:08:26 +0200 +Subject: ltq-adsl-app: add more script notifications + +Backport HANDSHAKE and TRAINING notification from ltq-vdsl-app. It +unifies the dsl led blinking pattern accross all subtargets and allows +to get the current line status from the dsl led. + +Signed-off-by: Mathias Kresin +--- + .../100-add-more-script-notifications.patch | 27 ++++++++++++++++++++++ + 1 file changed, 27 insertions(+) + create mode 100644 package/network/config/ltq-adsl-app/patches/100-add-more-script-notifications.patch + +--- a/src/dsl_cpe_control.c ++++ b/src/dsl_cpe_control.c +@@ -3273,7 +3273,23 @@ DSL_CPE_STATIC DSL_int_t DSL_CPE_Event_S + #ifdef INCLUDE_SCRIPT_NOTIFICATION + if (g_sRcScript != DSL_NULL) + { +- if ( (nLineState == DSL_LINESTATE_SHOWTIME_TC_SYNC) && ++ if ( (nLineState == DSL_LINESTATE_HANDSHAKE) && ++ (g_nPrevLineState[nDevice] != DSL_LINESTATE_HANDSHAKE) ) ++ { ++ if (DSL_CPE_SetEnv("DSL_INTERFACE_STATUS", "HANDSHAKE") == DSL_SUCCESS) ++ { ++ bExec = DSL_TRUE; ++ } ++ } ++ else if ( (nLineState == DSL_LINESTATE_FULL_INIT) && ++ (g_nPrevLineState[nDevice] != DSL_LINESTATE_FULL_INIT) ) ++ { ++ if (DSL_CPE_SetEnv("DSL_INTERFACE_STATUS", "TRAINING") == DSL_SUCCESS) ++ { ++ bExec = DSL_TRUE; ++ } ++ } ++ else if ( (nLineState == DSL_LINESTATE_SHOWTIME_TC_SYNC) && + (g_nPrevLineState[nDevice] != DSL_LINESTATE_SHOWTIME_TC_SYNC) ) + { + if (DSL_CPE_SetEnv("DSL_INTERFACE_STATUS", "UP") == DSL_SUCCESS) diff --git a/package/network/config/ltq-vdsl-app/Makefile b/package/network/config/ltq-vdsl-app/Makefile index 20b506c48e079d..baf63f9d1305e0 100644 --- a/package/network/config/ltq-vdsl-app/Makefile +++ b/package/network/config/ltq-vdsl-app/Makefile @@ -28,7 +28,7 @@ define Package/ltq-vdsl-app CATEGORY:=Network TITLE:=Lantiq VDSL userland tool URL:=http://www.lantiq.com/ - DEPENDS:=@TARGET_lantiq_xrx200 +libpthread +librt + DEPENDS:=@TARGET_lantiq_xrx200 +libpthread +librt +ip endef define Package/ltq-vdsl-app/description @@ -58,10 +58,11 @@ CONFIGURE_ARGS += \ #CONFIGURE_ARGS += --enable-model=debug define Package/ltq-vdsl-app/install - $(INSTALL_DIR) $(1)/etc/init.d $(1)/sbin $(1)/etc/hotplug.d/dsl + $(INSTALL_DIR) $(1)/etc/init.d $(1)/sbin $(1)/etc/hotplug.d/dsl $(1)/etc/hotplug.d/net $(INSTALL_BIN) ./files/dsl_control $(1)/etc/init.d/ $(INSTALL_BIN) ./files/10_atm.sh $(1)/etc/hotplug.d/dsl $(INSTALL_BIN) ./files/10_ptm.sh $(1)/etc/hotplug.d/dsl + $(INSTALL_BIN) ./files/10-xdsl_rename $(1)/etc/hotplug.d/net $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dsl_cpe_control $(1)/sbin/vdsl_cpe_control $(INSTALL_BIN) ./files/dsl_cpe_pipe.sh $(1)/sbin/ diff --git a/package/network/config/ltq-vdsl-app/files/10-xdsl_rename b/package/network/config/ltq-vdsl-app/files/10-xdsl_rename new file mode 100644 index 00000000000000..f81a90a5f81693 --- /dev/null +++ b/package/network/config/ltq-vdsl-app/files/10-xdsl_rename @@ -0,0 +1,7 @@ +#!/bin/sh + +if [ "$ACTION" = add ]; then + [ "$DEVICENAME" = "nas0" ] || [ "$DEVICENAME" = "ptm0" ] || exit + + ip link set $DEVICENAME name dsl0 +fi diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control b/package/network/config/ltq-vdsl-app/files/dsl_control index 425208a0d0080e..818990e57418d4 100644 --- a/package/network/config/ltq-vdsl-app/files/dsl_control +++ b/package/network/config/ltq-vdsl-app/files/dsl_control @@ -109,7 +109,7 @@ locs 0 $1 } [Common]={ -}" > /tmp/adsl.scr +}" > /tmp/dsl.scr } lowlevel_cfg() { @@ -291,7 +291,7 @@ start_service() { [ -z "${snr}" ] || { # for SNR offset setting autoboot_script "$snr" - autoboot="-a /tmp/adsl.scr" + autoboot="-a /tmp/dsl.scr -A /tmp/dsl.scr" } procd_open_instance diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile index 2efbaf83e664bc..4eb4737a3a8b83 100644 --- a/package/network/config/netifd/Makefile +++ b/package/network/config/netifd/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/netifd.git -PKG_SOURCE_DATE:=2017-08-27 -PKG_SOURCE_VERSION:=7d94ede3c38dd7b8e08c8a2fd8ae5ede71a2059b -PKG_MIRROR_HASH:=967e993cdb49ddc6d6add23fa8ccbf2af798fdca6708e7937496baa4c2653957 +PKG_SOURCE_DATE:=2018-01-04 +PKG_SOURCE_VERSION:=fd5c399c01ceb1bbede3ae8b0e1daaa7652a6fa1 +PKG_MIRROR_HASH:=0040f94d11d0039505328a90b2ff48968db873e9e7967307631bf40ef5679275 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 diff --git a/package/network/config/netifd/files/lib/netifd/dhcp.script b/package/network/config/netifd/files/lib/netifd/dhcp.script index e841f918550999..24f243c2c76354 100755 --- a/package/network/config/netifd/files/lib/netifd/dhcp.script +++ b/package/network/config/netifd/files/lib/netifd/dhcp.script @@ -18,10 +18,12 @@ setup_interface () { proto_add_ipv4_address "$ip" "${subnet:-255.255.255.0}" # TODO: apply $broadcast + local i for i in $router; do proto_add_ipv4_route "$i" 32 "" "$ip" proto_add_ipv4_route 0.0.0.0 0 "$i" "$ip" + local r for r in $CUSTOMROUTES; do proto_add_ipv4_route "${r%%/*}" "${r##*/}" "$i" "$ip" done @@ -31,11 +33,11 @@ setup_interface () { [ -n "$staticroutes" ] && set_classless_routes $staticroutes [ -n "$msstaticroutes" ] && set_classless_routes $msstaticroutes - for dns in $dns; do - proto_add_dns_server "$dns" + for i in $dns; do + proto_add_dns_server "$i" done - for domain in $domain; do - proto_add_dns_search "$domain" + for i in $domain; do + proto_add_dns_search "$i" done proto_add_data diff --git a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh index ea02d68bb4fb00..143e4451b6648a 100755 --- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh +++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh @@ -40,6 +40,7 @@ proto_dhcp_setup() { append dhcpopts "-x $opt" done + [ -z "$hostname" ] && hostname="$(cat /proc/sys/kernel/hostname)" [ "$broadcast" = 1 ] && broadcast="-B" || broadcast= [ "$release" = 1 ] && release="-R" || release= [ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" || clientid="-C" diff --git a/package/network/services/dropbear/Config.in b/package/network/services/dropbear/Config.in index 7c2edd79f23708..ca0af9d5e078f3 100644 --- a/package/network/services/dropbear/Config.in +++ b/package/network/services/dropbear/Config.in @@ -32,6 +32,15 @@ config DROPBEAR_ECC Increases binary size by about 23 kB (MIPS). +config DROPBEAR_ZLIB + bool "Enable compression" + default n + help + Enables compression using shared zlib library. + + Increases binary size by about 0.1 kB (MIPS) and requires additional 62 kB (MIPS) + for a shared zlib library. + config DROPBEAR_UTMP bool "Utmp support" default n diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile index 7302db273c9db4..21ac09f72452e6 100644 --- a/package/network/services/dropbear/Makefile +++ b/package/network/services/dropbear/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dropbear PKG_VERSION:=2017.75 -PKG_RELEASE:=3 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:= \ @@ -19,11 +19,15 @@ PKG_HASH:=6cbc1dcb1c9709d226dff669e5604172a18cf5dbf9a201474d5618ae4465098c PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE libtomcrypt/LICENSE libtommath/LICENSE +PKG_CPE_ID:=cpe:/a:matt_johnston:dropbear_ssh_server PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 -PKG_CONFIG_DEPENDS:=CONFIG_TARGET_INIT_PATH CONFIG_DROPBEAR_ECC CONFIG_DROPBEAR_CURVE25519 +PKG_CONFIG_DEPENDS:= \ + CONFIG_TARGET_INIT_PATH CONFIG_DROPBEAR_ECC \ + CONFIG_DROPBEAR_CURVE25519 CONFIG_DROPBEAR_ZLIB \ + CONFIG_DROPBEAR_UTMP CONFIG_DROPBEAR_PUTUTLINE include $(INCLUDE_DIR)/package.mk @@ -44,6 +48,7 @@ define Package/dropbear SECTION:=net CATEGORY:=Base system TITLE:=Small SSH2 client/server + DEPENDS:= +DROPBEAR_ZLIB:zlib endef define Package/dropbear/description @@ -74,7 +79,7 @@ CONFIGURE_ARGS += \ --disable-loginfunc \ $(if $(CONFIG_DROPBEAR_PUTUTLINE),,--disable-pututline) \ --disable-pututxline \ - --disable-zlib \ + $(if $(CONFIG_DROPBEAR_ZLIB),,--disable-zlib) \ --enable-bundled-libtom TARGET_CFLAGS += -DARGTYPE=3 -ffunction-sections -fdata-sections diff --git a/package/network/services/dropbear/patches/120-openwrt_options.patch b/package/network/services/dropbear/patches/120-openwrt_options.patch index b49a95ce93d956..7f47a74304791a 100644 --- a/package/network/services/dropbear/patches/120-openwrt_options.patch +++ b/package/network/services/dropbear/patches/120-openwrt_options.patch @@ -39,7 +39,7 @@ /* Enable "Counter Mode" for ciphers. This is more secure than normal * CBC mode against certain attacks. It is recommended for security -@@ -131,9 +131,9 @@ If you test it please contact the Dropbe +@@ -131,10 +131,10 @@ If you test it please contact the Dropbe * If you disable MD5, Dropbear will fall back to SHA1 fingerprints, * which are not the standard form. */ #define DROPBEAR_SHA1_HMAC @@ -47,10 +47,12 @@ +/*#define DROPBEAR_SHA1_96_HMAC*/ #define DROPBEAR_SHA2_256_HMAC -#define DROPBEAR_SHA2_512_HMAC +-#define DROPBEAR_MD5_HMAC +/*#define DROPBEAR_SHA2_512_HMAC*/ - #define DROPBEAR_MD5_HMAC ++/*#define DROPBEAR_MD5_HMAC*/ /* You can also disable integrity. Don't bother disabling this if you're + * still using a cipher, it's relatively cheap. If you disable this it's dead @@ -146,7 +146,7 @@ If you test it please contact the Dropbe * Removing either of these won't save very much space. * SSH2 RFC Draft requires dss, recommends rsa */ diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index 5a353e67ed1a26..51f16929333679 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd -PKG_RELEASE:=3 +PKG_RELEASE:=6 PKG_SOURCE_URL:=http://w1.fi/hostap.git PKG_SOURCE_PROTO:=git @@ -17,6 +17,7 @@ PKG_MIRROR_HASH:=c6ad9a73fc1ae0ba8bc48f71cf14394b274bc9c2c1d1b53c2775f08312597e7 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=BSD-3-Clause +PKG_CPE_ID:=cpe:/a:w1.fi:hostapd PKG_BUILD_PARALLEL:=1 diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 6b2d73370820a5..36aee85f17a9cd 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -151,6 +151,8 @@ hostapd_common_add_bss_config() { wpa_group_rekey wpa_pair_rekey wpa_master_rekey config_add_boolean wpa_disable_eapol_key_retries + config_add_boolean tdls_prohibit + config_add_boolean rsn_preauth auth_cache config_add_int ieee80211w config_add_int eapol_version @@ -172,6 +174,7 @@ hostapd_common_add_bss_config() { config_add_string ownip config_add_string iapp_interface config_add_string eap_type ca_cert client_cert identity anonymous_identity auth priv_key priv_key_pwd + config_add_string ieee80211w_mgmt_cipher config_add_int dynamic_vlan vlan_naming config_add_string vlan_tagged_interface vlan_bridge @@ -215,7 +218,7 @@ hostapd_set_bss_options() { json_get_vars \ wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey \ - wpa_disable_eapol_key_retries \ + wpa_disable_eapol_key_retries tdls_prohibit \ maxassoc max_inactivity disassoc_low_ack isolate auth_cache \ wps_pushbutton wps_label ext_registrar wps_pbc_in_m1 wps_ap_setup_locked \ wps_independent wps_device_type wps_device_name wps_manufacturer wps_pin \ @@ -232,6 +235,7 @@ hostapd_set_bss_options() { set_default wmm 1 set_default uapsd 1 set_default wpa_disable_eapol_key_retries 0 + set_default tdls_prohibit 0 set_default eapol_version 0 set_default acct_port 1813 @@ -252,6 +256,8 @@ hostapd_set_bss_options() { append bss_conf "ignore_broadcast_ssid=$hidden" "$N" append bss_conf "uapsd_advertisement_enabled=$uapsd" "$N" + [ "$tdls_prohibit" -gt 0 ] && append bss_conf "tdls_prohibit=$tdls_prohibit" "$N" + [ "$wpa" -gt 0 ] && { [ -n "$wpa_group_rekey" ] && append bss_conf "wpa_group_rekey=$wpa_group_rekey" "$N" [ -n "$wpa_pair_rekey" ] && append bss_conf "wpa_ptk_rekey=$wpa_pair_rekey" "$N" @@ -397,7 +403,6 @@ hostapd_set_bss_options() { set_default mobility_domain "4f57" set_default r0_key_lifetime 10000 - set_default r1_key_holder "00004f577274" set_default reassociation_deadline 1000 set_default pmk_r1_push 0 set_default ft_psk_generate_local 0 @@ -405,7 +410,7 @@ hostapd_set_bss_options() { append bss_conf "mobility_domain=$mobility_domain" "$N" append bss_conf "r0_key_lifetime=$r0_key_lifetime" "$N" - append bss_conf "r1_key_holder=$r1_key_holder" "$N" + [ -n "$r1_key_holder" ] && append bss_conf "r1_key_holder=$r1_key_holder" "$N" append bss_conf "reassociation_deadline=$reassociation_deadline" "$N" append bss_conf "pmk_r1_push=$pmk_r1_push" "$N" append bss_conf "ft_psk_generate_local=$ft_psk_generate_local" "$N" @@ -440,9 +445,10 @@ hostapd_set_bss_options() { # RSN -> allow management frame protection case "$ieee80211w" in [012]) - json_get_vars ieee80211w_max_timeout ieee80211w_retry_timeout + json_get_vars ieee80211w_mgmt_cipher ieee80211w_max_timeout ieee80211w_retry_timeout append bss_conf "ieee80211w=$ieee80211w" "$N" [ "$ieee80211w" -gt "0" ] && { + append bss_conf "group_mgmt_cipher=${ieee80211w_mgmt_cipher:-AES-128-CMAC}" "$N" [ -n "$ieee80211w_max_timeout" ] && \ append bss_conf "assoc_sa_query_max_timeout=$ieee80211w_max_timeout" "$N" [ -n "$ieee80211w_retry_timeout" ] && \ @@ -595,8 +601,31 @@ EOF return 0 } +wpa_supplicant_set_fixed_freq() { + local freq="$1" + local htmode="$2" + + append network_data "fixed_freq=1" "$N$T" + append network_data "frequency=$freq" "$N$T" + case "$htmode" in + NOHT) append network_data "disable_ht=1" "$N$T";; + HT20|VHT20) append network_data "disable_ht40=1" "$N$T";; + HT40*|VHT40*|VHT80*|VHT160*) append network_data "ht40=1" "$N$T";; + esac + case "$htmode" in + VHT*) append network_data "vht=1" "$N$T";; + esac + case "$htmode" in + VHT80) append network_data "max_oper_chwidth=1" "$N$T";; + VHT160) append network_data "max_oper_chwidth=2" "$N$T";; + *) append network_data "max_oper_chwidth=0" "$N$T";; + esac +} + wpa_supplicant_add_network() { local ifname="$1" + local freq="$2" + local htmode="$3" _wpa_supplicant_common "$1" wireless_vif_parse_encryption @@ -618,11 +647,7 @@ wpa_supplicant_add_network() { [[ "$_w_mode" = "adhoc" ]] && { append network_data "mode=1" "$N$T" - [ -n "$channel" ] && { - freq="$(get_freq "$phy" "$channel")" - append network_data "fixed_freq=1" "$N$T" - append network_data "frequency=$freq" "$N$T" - } + [ -n "$channel" ] && wpa_supplicant_set_fixed_freq "$freq" "$htmode" scan_ssid="scan_ssid=0" @@ -634,10 +659,7 @@ wpa_supplicant_add_network() { ssid="${mesh_id}" append network_data "mode=5" "$N$T" - [ -n "$channel" ] && { - freq="$(get_freq "$phy" "$channel")" - append network_data "frequency=$freq" "$N$T" - } + [ -n "$channel" ] && wpa_supplicant_set_fixed_freq "$freq" "$htmode" append wpa_key_mgmt "SAE" scan_ssid="" } @@ -731,6 +753,7 @@ wpa_supplicant_add_network() { esac } [ -n "$bssid" ] && append network_data "bssid=$bssid" "$N$T" + [ -n "$beacon_int" ] && append network_data "beacon_int=$beacon_int" "$N$T" local bssid_blacklist bssid_whitelist json_get_values bssid_blacklist bssid_blacklist @@ -753,10 +776,6 @@ wpa_supplicant_add_network() { append network_data "mcast_rate=$mc_rate" "$N$T" } - local ht_str - [[ "$_w_mode" = adhoc ]] || ibss_htmode= - [ -n "$ibss_htmode" ] && append network_data "htmode=$ibss_htmode" "$N$T" - cat >> "$_config" < +Date: Fri, 20 Oct 2017 17:39:42 +0300 +Subject: [PATCH] WNM: Ignore WNM-Sleep Mode Request in wnm_sleep_mode=0 case + +The hostapd wnm_sleep_mode parameter was previously used to control +advertisement of WNM-Sleep Mode support, but it was not used when +processing a request to use WNM-Sleep Mode. Add an explicit check during +request processing as well so that any misbehaving station is ignored. + +Signed-off-by: Jouni Malinen +--- + src/ap/wnm_ap.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/ap/wnm_ap.c b/src/ap/wnm_ap.c +index 7c4fde0..973e4d3 100644 +--- a/src/ap/wnm_ap.c ++++ b/src/ap/wnm_ap.c +@@ -200,6 +200,13 @@ static void ieee802_11_rx_wnmsleep_req(struct hostapd_data *hapd, + u8 *tfsreq_ie_end = NULL; + u16 tfsreq_ie_len = 0; + ++ if (!hapd->conf->wnm_sleep_mode) { ++ wpa_printf(MSG_DEBUG, "Ignore WNM-Sleep Mode Request from " ++ MACSTR " since WNM-Sleep Mode is disabled", ++ MAC2STR(addr)); ++ return; ++ } ++ + dialog_token = *pos++; + while (pos + 1 < frm + len) { + u8 ie_len = pos[1]; +-- +2.1.4 diff --git a/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch b/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch index 88698524e2cc80..213ee6d726593e 100644 --- a/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch +++ b/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch @@ -140,11 +140,10 @@ Signed-hostap: Antonio Quartulli /* Helper macros for network block parser */ #ifdef OFFSET -@@ -2224,6 +2316,9 @@ static const struct parse_data ssid_fiel +@@ -2224,6 +2316,8 @@ static const struct parse_data ssid_fiel { INT(ap_max_inactivity) }, { INT(dtim_period) }, { INT(beacon_int) }, -+ { INT_RANGE(fixed_freq, 0, 1) }, + { FUNC(rates) }, + { FUNC(mcast_rate) }, #ifdef CONFIG_MACSEC @@ -175,11 +174,10 @@ Signed-hostap: Antonio Quartulli * macsec_policy - Determines the policy for MACsec secure session --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c -@@ -2781,6 +2781,13 @@ static void wpas_start_assoc_cb(struct w +@@ -2781,6 +2781,12 @@ static void wpas_start_assoc_cb(struct w params.beacon_int = ssid->beacon_int; else params.beacon_int = wpa_s->conf->beacon_int; -+ params.fixed_freq = ssid->fixed_freq; + i = 0; + while (i < WLAN_SUPP_RATES_MAX) { + params.rates[i] = ssid->rates[i]; diff --git a/package/network/services/hostapd/patches/462-wpa_s-support-htmode-param.patch b/package/network/services/hostapd/patches/462-wpa_s-support-htmode-param.patch deleted file mode 100644 index d2e5eab99303ef..00000000000000 --- a/package/network/services/hostapd/patches/462-wpa_s-support-htmode-param.patch +++ /dev/null @@ -1,156 +0,0 @@ -From b9329c5dfeed7d5c55d2117d8dfe326fc40c8fb1 Mon Sep 17 00:00:00 2001 -From: Antonio Quartulli -Date: Tue, 3 Jul 2012 00:36:24 +0200 -Subject: [PATCH] wpa_s: support htmode param - -possible values are HT20, HT40-, HT40+ and NOHT - -Signed-off-by: Antonio Quartulli ---- - src/drivers/driver.h | 2 ++ - src/drivers/driver_nl80211.c | 16 ++++++++++ - wpa_supplicant/config.c | 66 +++++++++++++++++++++++++++++++++++++++ - wpa_supplicant/config_ssid.h | 2 ++ - wpa_supplicant/wpa_supplicant.c | 2 ++ - 5 files changed, 88 insertions(+) - ---- a/src/drivers/driver.h -+++ b/src/drivers/driver.h -@@ -765,6 +765,8 @@ struct wpa_driver_associate_params { - - unsigned char rates[WLAN_SUPP_RATES_MAX]; - int mcast_rate; -+ int ht_set; -+ unsigned int htmode; - - /** - * bssid_hint - BSSID of a proposed AP ---- a/src/drivers/driver_nl80211.c -+++ b/src/drivers/driver_nl80211.c -@@ -5070,6 +5070,22 @@ retry: - nla_put_u32(msg, NL80211_ATTR_MCAST_RATE, params->mcast_rate); - } - -+ if (params->ht_set) { -+ switch(params->htmode) { -+ case NL80211_CHAN_HT20: -+ wpa_printf(MSG_DEBUG, " * ht=HT20"); -+ break; -+ case NL80211_CHAN_HT40PLUS: -+ wpa_printf(MSG_DEBUG, " * ht=HT40+"); -+ break; -+ case NL80211_CHAN_HT40MINUS: -+ wpa_printf(MSG_DEBUG, " * ht=HT40-"); -+ break; -+ } -+ nla_put_u32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE, -+ params->htmode); -+ } -+ - ret = nl80211_set_conn_keys(params, msg); - if (ret) - goto fail; ---- a/wpa_supplicant/config.c -+++ b/wpa_supplicant/config.c -@@ -2017,6 +2017,71 @@ static char * wpa_config_write_mcast_rat - } - #endif /* NO_CONFIG_WRITE */ - -+static int wpa_config_parse_htmode(const struct parse_data *data, -+ struct wpa_ssid *ssid, int line, -+ const char *value) -+{ -+ int i; -+ static const struct { -+ const char *name; -+ unsigned int val; -+ } htmap[] = { -+ { .name = "HT20", .val = NL80211_CHAN_HT20, }, -+ { .name = "HT40+", .val = NL80211_CHAN_HT40PLUS, }, -+ { .name = "HT40-", .val = NL80211_CHAN_HT40MINUS, }, -+ { .name = "NOHT", .val = NL80211_CHAN_NO_HT, }, -+ }; -+ ssid->ht_set = 0;; -+ for (i = 0; i < 4; i++) { -+ if (strcasecmp(htmap[i].name, value) == 0) { -+ ssid->htmode = htmap[i].val; -+ ssid->ht_set = 1; -+ break; -+ } -+ } -+ -+ return 0; -+} -+ -+#ifndef NO_CONFIG_WRITE -+static char * wpa_config_write_htmode(const struct parse_data *data, -+ struct wpa_ssid *ssid) -+{ -+ char *value; -+ int res; -+ -+ value = os_malloc(6); /* longest: HT40+ */ -+ if (value == NULL) -+ return NULL; -+ -+ switch(ssid->htmode) { -+ case NL80211_CHAN_HT20: -+ res = os_snprintf(value, 4, "HT20"); -+ break; -+ case NL80211_CHAN_HT40PLUS: -+ res = os_snprintf(value, 5, "HT40+"); -+ break; -+ case NL80211_CHAN_HT40MINUS: -+ res = os_snprintf(value, 5, "HT40-"); -+ break; -+ case NL80211_CHAN_NO_HT: -+ res = os_snprintf(value, 4, "NOHT"); -+ break; -+ default: -+ os_free(value); -+ return NULL; -+ } -+ -+ if (res < 0) { -+ os_free(value); -+ return NULL; -+ } -+ -+ return value; -+} -+#endif /* NO_CONFIG_WRITE */ -+ -+ - static int wpa_config_parse_rates(const struct parse_data *data, - struct wpa_ssid *ssid, int line, - const char *value) -@@ -2319,6 +2384,7 @@ static const struct parse_data ssid_fiel - { INT_RANGE(fixed_freq, 0, 1) }, - { FUNC(rates) }, - { FUNC(mcast_rate) }, -+ { FUNC(htmode) }, - #ifdef CONFIG_MACSEC - { INT_RANGE(macsec_policy, 0, 1) }, - { INT_RANGE(macsec_integ_only, 0, 1) }, ---- a/wpa_supplicant/config_ssid.h -+++ b/wpa_supplicant/config_ssid.h -@@ -739,6 +739,8 @@ struct wpa_ssid { - - unsigned char rates[WLAN_SUPP_RATES_MAX]; - double mcast_rate; -+ int ht_set; -+ unsigned int htmode; - - #ifdef CONFIG_MACSEC - /** ---- a/wpa_supplicant/wpa_supplicant.c -+++ b/wpa_supplicant/wpa_supplicant.c -@@ -2788,6 +2788,8 @@ static void wpas_start_assoc_cb(struct w - i++; - } - params.mcast_rate = ssid->mcast_rate; -+ params.ht_set = ssid->ht_set; -+ params.htmode = ssid->htmode; - } - - params.wpa_ie = wpa_ie; diff --git a/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch b/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch new file mode 100644 index 00000000000000..9b5ee4bbb35efd --- /dev/null +++ b/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch @@ -0,0 +1,68 @@ +From: Sven Eckelmann +Date: Thu, 11 May 2017 08:21:45 +0200 +Subject: [PATCH] set mcast_rate in mesh mode + +The wpa_supplicant code for IBSS allows to set the mcast rate. It is +recommended to increase this value from 1 or 6 Mbit/s to something higher +when using a mesh protocol on top which uses the multicast packet loss as +indicator for the link quality. + +This setting was unfortunately not applied for mesh mode. But it would be +beneficial when wpa_supplicant would behave similar to IBSS mode and set +this argument during mesh join like authsae already does. At least it is +helpful for companies/projects which are currently switching to 802.11s +(without mesh_fwding and with mesh_ttl set to 1) as replacement for IBSS +because newer drivers seem to support 802.11s but not IBSS anymore. + +Signed-off-by: Sven Eckelmann +Tested-by: Simon Wunderlich + +--- a/src/drivers/driver.h ++++ b/src/drivers/driver.h +@@ -1424,6 +1424,7 @@ struct wpa_driver_mesh_join_params { + #define WPA_DRIVER_MESH_FLAG_SAE_AUTH 0x00000004 + #define WPA_DRIVER_MESH_FLAG_AMPE 0x00000008 + unsigned int flags; ++ int mcast_rate; + }; + + /** +--- a/src/drivers/driver_nl80211.c ++++ b/src/drivers/driver_nl80211.c +@@ -8981,6 +8981,18 @@ static int nl80211_put_mesh_id(struct nl + } + + ++static int nl80211_put_mcast_rate(struct nl_msg *msg, int mcast_rate) ++{ ++ if (mcast_rate > 0) { ++ wpa_printf(MSG_DEBUG, " * mcast_rate=%.1f", ++ (double)mcast_rate / 10); ++ return nla_put_u32(msg, NL80211_ATTR_MCAST_RATE, mcast_rate); ++ } ++ ++ return 0; ++} ++ ++ + static int nl80211_put_mesh_config(struct nl_msg *msg, + struct wpa_driver_mesh_bss_params *params) + { +@@ -9039,6 +9051,7 @@ static int nl80211_join_mesh(struct i802 + nl80211_put_basic_rates(msg, params->basic_rates) || + nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) || + nl80211_put_beacon_int(msg, params->beacon_int) || ++ nl80211_put_mcast_rate(msg, params->mcast_rate) || + nl80211_put_dtim_period(msg, params->dtim_period)) + goto fail; + +--- a/wpa_supplicant/mesh.c ++++ b/wpa_supplicant/mesh.c +@@ -379,6 +379,7 @@ int wpa_supplicant_join_mesh(struct wpa_ + os_memset(¶ms, 0, sizeof(params)); + params.meshid = ssid->ssid; + params.meshid_len = ssid->ssid_len; ++ params.mcast_rate = ssid->mcast_rate; + ibss_mesh_setup_freq(wpa_s, ssid, ¶ms.freq); + wpa_s->mesh_ht_enabled = !!params.freq.ht_enabled; + wpa_s->mesh_vht_enabled = !!params.freq.vht_enabled; diff --git a/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch b/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch new file mode 100644 index 00000000000000..38335394890c76 --- /dev/null +++ b/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch @@ -0,0 +1,19 @@ +--- a/wpa_supplicant/wpa_supplicant.c ++++ b/wpa_supplicant/wpa_supplicant.c +@@ -2010,11 +2010,13 @@ void ibss_mesh_setup_freq(struct wpa_sup + for (j = 0; j < wpa_s->last_scan_res_used; j++) { + struct wpa_bss *bss = wpa_s->last_scan_res[j]; + +- if (ssid->mode != WPAS_MODE_IBSS) ++ /* Don't adjust control freq in case of fixed_freq */ ++ if (ssid->fixed_freq) { ++ obss_scan = 0; + break; ++ } + +- /* Don't adjust control freq in case of fixed_freq */ +- if (ssid->fixed_freq) ++ if (ssid->mode != WPAS_MODE_IBSS) + break; + + if (!bss_is_ibss(bss)) diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch index b63d99a57d0825..8f14f125d58419 100644 --- a/package/network/services/hostapd/patches/600-ubus_support.patch +++ b/package/network/services/hostapd/patches/600-ubus_support.patch @@ -1,7 +1,5 @@ -Index: hostapd-2017-08-24-c2d4f2eb/hostapd/Makefile -=================================================================== ---- hostapd-2017-08-24-c2d4f2eb.orig/hostapd/Makefile -+++ hostapd-2017-08-24-c2d4f2eb/hostapd/Makefile +--- a/hostapd/Makefile ++++ b/hostapd/Makefile @@ -165,6 +165,11 @@ OBJS += ../src/common/hw_features_common OBJS += ../src/eapol_auth/eapol_auth_sm.o @@ -14,10 +12,8 @@ Index: hostapd-2017-08-24-c2d4f2eb/hostapd/Makefile ifdef CONFIG_CODE_COVERAGE CFLAGS += -O0 -fprofile-arcs -ftest-coverage -Index: hostapd-2017-08-24-c2d4f2eb/src/ap/hostapd.h -=================================================================== ---- hostapd-2017-08-24-c2d4f2eb.orig/src/ap/hostapd.h -+++ hostapd-2017-08-24-c2d4f2eb/src/ap/hostapd.h +--- a/src/ap/hostapd.h ++++ b/src/ap/hostapd.h @@ -13,6 +13,7 @@ #include "utils/list.h" #include "ap_config.h" @@ -43,10 +39,8 @@ Index: hostapd-2017-08-24-c2d4f2eb/src/ap/hostapd.h enum hostapd_iface_state { HAPD_IFACE_UNINITIALIZED, HAPD_IFACE_DISABLED, -Index: hostapd-2017-08-24-c2d4f2eb/src/ap/hostapd.c -=================================================================== ---- hostapd-2017-08-24-c2d4f2eb.orig/src/ap/hostapd.c -+++ hostapd-2017-08-24-c2d4f2eb/src/ap/hostapd.c +--- a/src/ap/hostapd.c ++++ b/src/ap/hostapd.c @@ -309,6 +309,7 @@ static void hostapd_free_hapd_data(struc hapd->started = 0; @@ -88,10 +82,8 @@ Index: hostapd-2017-08-24-c2d4f2eb/src/ap/hostapd.c hostapd_interface_deinit(iface); wpa_printf(MSG_DEBUG, "%s: driver=%p drv_priv=%p -> hapd_deinit", __func__, driver, drv_priv); -Index: hostapd-2017-08-24-c2d4f2eb/src/ap/ieee802_11.c -=================================================================== ---- hostapd-2017-08-24-c2d4f2eb.orig/src/ap/ieee802_11.c -+++ hostapd-2017-08-24-c2d4f2eb/src/ap/ieee802_11.c +--- a/src/ap/ieee802_11.c ++++ b/src/ap/ieee802_11.c @@ -1587,7 +1587,8 @@ ieee802_11_set_radius_info(struct hostap @@ -209,10 +201,8 @@ Index: hostapd-2017-08-24-c2d4f2eb/src/ap/ieee802_11.c ret = 1; break; case WLAN_FC_STYPE_DISASSOC: -Index: hostapd-2017-08-24-c2d4f2eb/src/ap/beacon.c -=================================================================== ---- hostapd-2017-08-24-c2d4f2eb.orig/src/ap/beacon.c -+++ hostapd-2017-08-24-c2d4f2eb/src/ap/beacon.c +--- a/src/ap/beacon.c ++++ b/src/ap/beacon.c @@ -716,7 +716,7 @@ void sta_track_claim_taxonomy_info(struc void handle_probe_req(struct hostapd_data *hapd, @@ -251,10 +241,8 @@ Index: hostapd-2017-08-24-c2d4f2eb/src/ap/beacon.c /* TODO: verify that supp_rates contains at least one matching rate * with AP configuration */ -Index: hostapd-2017-08-24-c2d4f2eb/src/ap/beacon.h -=================================================================== ---- hostapd-2017-08-24-c2d4f2eb.orig/src/ap/beacon.h -+++ hostapd-2017-08-24-c2d4f2eb/src/ap/beacon.h +--- a/src/ap/beacon.h ++++ b/src/ap/beacon.h @@ -14,7 +14,7 @@ struct ieee80211_mgmt; void handle_probe_req(struct hostapd_data *hapd, @@ -264,10 +252,8 @@ Index: hostapd-2017-08-24-c2d4f2eb/src/ap/beacon.h int ieee802_11_set_beacon(struct hostapd_data *hapd); int ieee802_11_set_beacons(struct hostapd_iface *iface); int ieee802_11_update_beacons(struct hostapd_iface *iface); -Index: hostapd-2017-08-24-c2d4f2eb/src/ap/drv_callbacks.c -=================================================================== ---- hostapd-2017-08-24-c2d4f2eb.orig/src/ap/drv_callbacks.c -+++ hostapd-2017-08-24-c2d4f2eb/src/ap/drv_callbacks.c +--- a/src/ap/drv_callbacks.c ++++ b/src/ap/drv_callbacks.c @@ -116,6 +116,10 @@ int hostapd_notif_assoc(struct hostapd_d u16 reason = WLAN_REASON_UNSPECIFIED; u16 status = WLAN_STATUS_SUCCESS; @@ -292,10 +278,8 @@ Index: hostapd-2017-08-24-c2d4f2eb/src/ap/drv_callbacks.c #ifdef CONFIG_P2P if (elems.p2p) { wpabuf_free(sta->p2p_ie); -Index: hostapd-2017-08-24-c2d4f2eb/src/ap/sta_info.c -=================================================================== ---- hostapd-2017-08-24-c2d4f2eb.orig/src/ap/sta_info.c -+++ hostapd-2017-08-24-c2d4f2eb/src/ap/sta_info.c +--- a/src/ap/sta_info.c ++++ b/src/ap/sta_info.c @@ -404,6 +404,7 @@ void ap_handle_timer(void *eloop_ctx, vo HOSTAPD_LEVEL_INFO, "deauthenticated due to " "local deauth request"); @@ -320,10 +304,8 @@ Index: hostapd-2017-08-24-c2d4f2eb/src/ap/sta_info.c if (hapd->msg_ctx_parent && hapd->msg_ctx_parent != hapd->msg_ctx) -Index: hostapd-2017-08-24-c2d4f2eb/src/ap/wpa_auth_glue.c -=================================================================== ---- hostapd-2017-08-24-c2d4f2eb.orig/src/ap/wpa_auth_glue.c -+++ hostapd-2017-08-24-c2d4f2eb/src/ap/wpa_auth_glue.c +--- a/src/ap/wpa_auth_glue.c ++++ b/src/ap/wpa_auth_glue.c @@ -175,6 +175,7 @@ static void hostapd_wpa_auth_psk_failure struct hostapd_data *hapd = ctx; wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_POSSIBLE_PSK_MISMATCH MACSTR, diff --git a/package/network/services/igmpproxy/Makefile b/package/network/services/igmpproxy/Makefile index d07fe669986f11..38efabe1cb6b45 100644 --- a/package/network/services/igmpproxy/Makefile +++ b/package/network/services/igmpproxy/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=igmpproxy PKG_VERSION:=0.1 -PKG_RELEASE:=9 +PKG_RELEASE:=10 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/igmpproxy diff --git a/package/network/services/igmpproxy/files/igmpproxy.init b/package/network/services/igmpproxy/files/igmpproxy.init index 9f4e51ada4d8cc..403854546fab0c 100644 --- a/package/network/services/igmpproxy/files/igmpproxy.init +++ b/package/network/services/igmpproxy/files/igmpproxy.init @@ -132,3 +132,7 @@ start_service() { service_started() { procd_set_config_changed firewall } + +stop_service() { + procd_set_config_changed firewall +} diff --git a/package/network/services/ipset-dns/Makefile b/package/network/services/ipset-dns/Makefile index 2adc9fe0313104..3f21d04c47c52c 100644 --- a/package/network/services/ipset-dns/Makefile +++ b/package/network/services/ipset-dns/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=http://git.zx2c4.com/ipset-dns -PKG_SOURCE_DATE:=2013-05-03 -PKG_SOURCE_VERSION:=6be3afd819a86136b51c5ae722ab48266187155b -PKG_MIRROR_HASH:=4e34943b547babe705c2fad295ee24a5ee0c93ca03e2a9cdeaf323150f97e60b +PKG_SOURCE_DATE:=2017-10-08 +PKG_SOURCE_VERSION:=ade2cf88e933f4f90451e0a6171f0aa4a523f989 +PKG_MIRROR_HASH:=34ad1f5c7d2eab90b795f2a512102891428216e3d439d918a8992846550e9697 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0 diff --git a/package/network/services/ipset-dns/patches/100-simultaneous-ipv4-ipv6.patch b/package/network/services/ipset-dns/patches/100-simultaneous-ipv4-ipv6.patch deleted file mode 100644 index 19669a05b55b85..00000000000000 --- a/package/network/services/ipset-dns/patches/100-simultaneous-ipv4-ipv6.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- a/ipset-dns.c -+++ b/ipset-dns.c -@@ -307,19 +307,20 @@ int main(int argc, char *argv[]) - struct timeval tv; - char msg[512]; - char ip[INET6_ADDRSTRLEN]; -- char *ipset; -+ char *ipset, *ipset6; - int listen_sock, upstream_sock; - int pos, i, size, af; - socklen_t len; - size_t received; - pid_t child; - -- if (argc != 4) { -- fprintf(stderr, "Usage: %s ipset port upstream\n", argv[0]); -+ if (argc != 5) { -+ fprintf(stderr, "Usage: %s ipv4-ipset ipv6-ipset port upstream\n", argv[0]); - return 1; - } - - ipset = argv[1]; -+ ipset6 = argv[2]; - - listen_sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (listen_sock < 0) { -@@ -329,7 +330,7 @@ int main(int argc, char *argv[]) - - memset(&listen_addr, 0, sizeof(listen_addr)); - listen_addr.sin_family = AF_INET; -- listen_addr.sin_port = htons(atoi(argv[2])); -+ listen_addr.sin_port = htons(atoi(argv[3])); - listen_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - i = 1; - setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, &i, sizeof(i)); -@@ -341,7 +342,7 @@ int main(int argc, char *argv[]) - memset(&upstream_addr, 0, sizeof(upstream_addr)); - upstream_addr.sin_family = AF_INET; - upstream_addr.sin_port = htons(53); -- inet_aton(argv[3], &upstream_addr.sin_addr); -+ inet_aton(argv[4], &upstream_addr.sin_addr); - - /* TODO: Put all of the below code in several forks all listening on the same sock. */ - -@@ -434,8 +435,11 @@ int main(int argc, char *argv[]) - continue; - } - -+ if ((af == AF_INET && !*ipset) || (af == AF_INET6 && !*ipset6)) -+ continue; -+ - printf("%s: %s\n", answer.dotted, ip); -- if (add_to_ipset(ipset, answer.rdata, af) < 0) -+ if (add_to_ipset((af == AF_INET) ? ipset : ipset6, answer.rdata, af) < 0) - perror("add_to_ipset"); - } - diff --git a/package/network/services/lldpd/Makefile b/package/network/services/lldpd/Makefile index 8b1e4e96d8436a..cdd8f99d5e11b2 100644 --- a/package/network/services/lldpd/Makefile +++ b/package/network/services/lldpd/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lldpd -PKG_VERSION:=0.9.8 +PKG_VERSION:=0.9.9 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://media.luffy.cx/files/lldpd -PKG_HASH:=9ee494e91bc33938575b2c09b26188c486ef8eac6e2155d250c189cc4e988c4f +PKG_HASH:=5e9e08f500d21376631cbc9f8e19a4b167cd38eb2d8fd9e660b8e80507f802db PKG_MAINTAINER:=Stijn Tintel PKG_LICENSE:=ISC diff --git a/package/network/services/odhcpd/Makefile b/package/network/services/odhcpd/Makefile index 9c59fb648a43f9..2a22cd874e6a53 100644 --- a/package/network/services/odhcpd/Makefile +++ b/package/network/services/odhcpd/Makefile @@ -9,53 +9,94 @@ include $(TOPDIR)/rules.mk PKG_NAME:=odhcpd PKG_RELEASE:=1 +PKG_VERSION:=1.3 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/odhcpd.git -PKG_SOURCE_DATE:=2017-08-16 -PKG_SOURCE_VERSION:=94e65ee0aecf0749e64fb29b4532c614e7be86a8 -PKG_MIRROR_HASH:=cb3d1e42f87bfd1eb78e27ae6a59e34302db11a6e6c119962c1c02b2f51ddaef +PKG_SOURCE_DATE:=2017-12-22 +PKG_SOURCE_VERSION:=7aa2594c5a127d92fa8f04328ac7b43e595bcaa7 +PKG_MIRROR_HASH:=67ce9303ce2f7a47ca9c54e1ebd984f108066ab0fa4e0d81f39a9cfc2431f90b PKG_MAINTAINER:=Hans Dedecker PKG_LICENSE:=GPL-2.0 -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) -CMAKE_OPTIONS += -DUBUS=1 - -ifneq ($(CONFIG_PACKAGE_odhcpd_ext_cer_id),0) - CMAKE_OPTIONS += -DEXT_CER_ID=$(CONFIG_PACKAGE_odhcpd_ext_cer_id) -endif +PKG_INSTALL:=1 +PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_odhcpd_$(BUILD_VARIANT)_ext_cer_id +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk -define Package/odhcpd +define Package/odhcpd/default SECTION:=net CATEGORY:=Network - TITLE:=OpenWrt DHCP/DHCPv6(-PD)/RA Server & Relay + TITLE:=OpenWrt DHCPv6(-PD)/RA Server & Relay DEPENDS:=+libubox +libuci +libubus +libnl-tiny endef -define Package/odhcpd/config - config PACKAGE_odhcpd_ext_cer_id - int "CER-ID Extension ID (0 = disabled)" - depends on PACKAGE_odhcpd - default 0 -endef - -define Package/odhcpd/description +define Package/odhcpd/default/description odhcpd is a daemon for serving and relaying IP management protocols to configure clients and downstream routers. It tries to follow the RFC 6204 requirements for IPv6 home routers. - - odhcpd provides server services for DHCP, RA, stateless and stateful DHCPv6, - prefix delegation and can be used to relay RA, DHCPv6 and NDP between routed - (non-bridged) interfaces in case no delegated prefixes are available. endef +define Package/odhcpd/default/config +menu "Configuration" + depends on PACKAGE_$(1) + +config PACKAGE_odhcpd_$(2)_ext_cer_id + int + default 0 + prompt "CER-ID Extension ID (0 = disabled)" +endmenu +endef + +define Package/odhcpd + $(call Package/odhcpd/default) + TITLE += and DHCPv4 server + VARIANT:=full +endef + +Package/odhcpd/config=$(call Package/odhcpd/default/config,odhcpd,full) + +define Package/odhcpd/description + $(call Package/odhcpd/default/description) + + This is a variant providing server services for DHCPv4, RA, stateless and + stateful DHCPv6, prefix delegation and can be used to relay RA, DHCPv6 and + NDP between routed (non-bridged) interfaces in case no delegated prefixes + are available. +endef + +define Package/odhcpd-ipv6only + $(call Package/odhcpd/default) + VARIANT:=ipv6only +endef + +Package/odhcpd-ipv6only/config=$(call Package/odhcpd/default/config,odhcpd-ipv6only,ipv6only) + +define Package/odhcpd-ipv6only/description + $(call Package/odhcpd/default/description) + + This is a variant providing server services for RA, stateless and stateful + DHCPv6, prefix delegation and can be used to relay RA, DHCPv6 and NDP between + routed (non-bridged) interfaces in case no delegated prefixes are available. +endef + +CMAKE_OPTIONS += -DUBUS=1 + +ifeq ($(BUILD_VARIANT),full) + CMAKE_OPTIONS += -DDHCPV4_SUPPORT=1 +endif + +ifneq ($(CONFIG_PACKAGE_odhcpd_$(BUILD_VARIANT)_ext_cer_id),0) + CMAKE_OPTIONS += -DEXT_CER_ID=$(CONFIG_PACKAGE_odhcpd_$(BUILD_VARIANT)_ext_cer_id) +endif + define Package/odhcpd/install $(INSTALL_DIR) $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/odhcpd $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/odhcpd $(1)/usr/sbin/ $(INSTALL_BIN) ./files/odhcpd-update $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/odhcpd.init $(1)/etc/init.d/odhcpd @@ -63,4 +104,7 @@ define Package/odhcpd/install $(INSTALL_BIN) ./files/odhcpd.defaults $(1)/etc/uci-defaults endef +Package/odhcpd-ipv6only/install = $(Package/odhcpd/install) + $(eval $(call BuildPackage,odhcpd)) +$(eval $(call BuildPackage,odhcpd-ipv6only)) diff --git a/package/network/services/odhcpd/files/odhcpd.defaults b/package/network/services/odhcpd/files/odhcpd.defaults index e184da90acbb06..cecbdd4a8d7152 100644 --- a/package/network/services/odhcpd/files/odhcpd.defaults +++ b/package/network/services/odhcpd/files/odhcpd.defaults @@ -2,13 +2,28 @@ uci -q get dhcp.odhcpd && exit 0 touch /etc/config/dhcp +. /usr/share/libubox/jshn.sh + +json_load "$(cat /etc/board.json)" +json_select network +json_select lan +json_get_vars protocol +json_select .. +json_select .. + +case "$protocol" in +# only enable server mode on statically addressed lan ports +"static") MODE=server ;; +*) MODE=disabled ;; +esac + uci batch < @@ -26,6 +25,7 @@ PKG_INSTALL:=1 PKG_FIXUP:=autoreconf PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=GPL-2.0 +PKG_CPE_ID:=cpe:/a:openvpn:openvpn include $(INCLUDE_DIR)/package.mk diff --git a/package/network/services/openvpn/files/openvpn.init b/package/network/services/openvpn/files/openvpn.init index 98c1710f03f4bd..ab4f7dba0d4e24 100644 --- a/package/network/services/openvpn/files/openvpn.init +++ b/package/network/services/openvpn/files/openvpn.init @@ -60,7 +60,7 @@ openvpn_add_instance() { local dir="$2" local conf="$3" - procd_open_instance + procd_open_instance "$name" procd_set_param command "$PROG" \ --syslog "openvpn($name)" \ --status "/var/run/openvpn.$name.status" \ @@ -103,28 +103,47 @@ start_instance() { } start_service() { + local instance="$1" + local instance_found=0 + + config_cb() { + local type="$1" + local name="$2" + if [ "$type" = "openvpn" ]; then + if [ -n "$instance" -a "$instance" = "$name" ]; then + instance_found=1 + fi + fi + } + . /usr/share/openvpn/openvpn.options config_load 'openvpn' - config_foreach start_instance 'openvpn' - local path name - for path in /etc/openvpn/*.conf; do - if [ -f "$path" ]; then - name="${path##*/}"; name="${name%.conf}" + if [ -n "$instance" ]; then + [ "$instance_found" -gt 0 ] || return + start_instance "$instance" + else + config_foreach start_instance 'openvpn' - # don't start configs again that are already started by uci - if echo "$UCI_STARTED" | grep -qxF "$path"; then - continue + local path name + for path in /etc/openvpn/*.conf; do + if [ -f "$path" ]; then + name="${path##*/}"; name="${name%.conf}" - # don't start configs which are set to disabled in uci - elif echo "$UCI_DISABLED" | grep -qxF "$path"; then - logger -t openvpn "$name.conf is disabled in /etc/config/openvpn" - continue - fi + # don't start configs again that are already started by uci + if echo "$UCI_STARTED" | grep -qxF "$path"; then + continue - openvpn_add_instance "$name" "${path%/*}" "$path" - fi - done + # don't start configs which are set to disabled in uci + elif echo "$UCI_DISABLED" | grep -qxF "$path"; then + logger -t openvpn "$name.conf is disabled in /etc/config/openvpn" + continue + fi + + openvpn_add_instance "$name" "${path%/*}" "$path" + fi + done + fi } service_triggers() { diff --git a/package/network/services/openvpn/files/openvpn.options b/package/network/services/openvpn/files/openvpn.options index 022f530a0370ce..a6a3ded061e44a 100644 --- a/package/network/services/openvpn/files/openvpn.options +++ b/package/network/services/openvpn/files/openvpn.options @@ -30,6 +30,7 @@ ecdh_curve echo engine explicit_exit_notify +extra_certs fragment group hand_window diff --git a/package/network/services/openvpn/patches/210-build_always_use_internal_lz4.patch b/package/network/services/openvpn/patches/210-build_always_use_internal_lz4.patch index b0fe00df9b390c..d49e0bf9ec9f46 100644 --- a/package/network/services/openvpn/patches/210-build_always_use_internal_lz4.patch +++ b/package/network/services/openvpn/patches/210-build_always_use_internal_lz4.patch @@ -1,43 +1,68 @@ --- a/configure.ac +++ b/configure.ac -@@ -1076,37 +1076,14 @@ dnl +@@ -1068,62 +1068,15 @@ dnl AC_ARG_VAR([LZ4_CFLAGS], [C compiler flags for lz4]) AC_ARG_VAR([LZ4_LIBS], [linker flags for lz4]) if test "$enable_lz4" = "yes" && test "$enable_comp_stub" = "no"; then -- AC_CHECKING([for LZ4 Library and Header files]) -- havelz4lib=1 - +- if test -z "${LZ4_CFLAGS}" -a -z "${LZ4_LIBS}"; then +- # if the user did not explicitly specify flags, try to autodetect +- PKG_CHECK_MODULES([LZ4], +- [liblz4 >= 1.7.1], +- [have_lz4="yes"], +- [] # If this fails, we will do another test next +- ) +- fi + + saved_CFLAGS="${CFLAGS}" + saved_LIBS="${LIBS}" + CFLAGS="${CFLAGS} ${LZ4_CFLAGS}" + LIBS="${LIBS} ${LZ4_LIBS}" + +- # If pkgconfig check failed or LZ4_CFLAGS/LZ4_LIBS env vars +- # are used, check the version directly in the LZ4 include file +- if test "${have_lz4}" != "yes"; then +- AC_CHECK_HEADERS([lz4.h], +- [have_lz4h="yes"], +- []) +- +- if test "${have_lz4h}" = "yes" ; then +- AC_MSG_CHECKING([additionally if system LZ4 version >= 1.7.1]) +- AC_COMPILE_IFELSE( +- [AC_LANG_PROGRAM([[ +-#include +- ]], +- [[ +-/* Version encoding: MMNNPP (Major miNor Patch) - see lz4.h for details */ +-#if LZ4_VERSION_NUMBER < 10701L +-#error LZ4 is too old +-#endif +- ]] +- )], +- [ +- AC_MSG_RESULT([ok]) +- have_lz4="yes" +- ], +- [AC_MSG_RESULT([system LZ4 library is too old])] +- ) +- fi +- fi +- - # if LZ4_LIBS is set, we assume it will work, otherwise test - if test -z "${LZ4_LIBS}"; then -- AC_CHECK_LIB(lz4, LZ4_compress, -- [ LZ4_LIBS="-llz4" ], -- [ -- AC_MSG_RESULT([LZ4 library not found.]) -- havelz4lib=0 -- ]) +- AC_CHECK_LIB([lz4], +- [LZ4_compress], +- [LZ4_LIBS="-llz4"], +- [have_lz4="no"]) - fi -+ AC_MSG_RESULT([Using LZ4 library in src/compat/compat-lz4.*]) -+ AC_DEFINE([NEED_COMPAT_LZ4], [1], [use copy of LZ4 source in compat/]) -+ LZ4_LIBS="" - -- saved_CFLAGS="${CFLAGS}" -- CFLAGS="${CFLAGS} ${LZ4_CFLAGS}" -- AC_CHECK_HEADERS(lz4.h, -- , -- [ -- AC_MSG_RESULT([LZ4 headers not found.]) -- havelz4lib=0 -- ]) - -- if test $havelz4lib = 0 ; then -- AC_MSG_RESULT([LZ4 library or header not found, using version in src/compat/compat-lz4.*]) +- if test "${have_lz4}" != "yes" ; then +- AC_MSG_RESULT([ usuable LZ4 library or header not found, using version in src/compat/compat-lz4.*]) - AC_DEFINE([NEED_COMPAT_LZ4], [1], [use copy of LZ4 source in compat/]) - LZ4_LIBS="" - fi ++ AC_MSG_RESULT([ usuable LZ4 library or header not found, using version in src/compat/compat-lz4.*]) ++ AC_DEFINE([NEED_COMPAT_LZ4], [1], [use copy of LZ4 source in compat/]) ++ LZ4_LIBS="" OPTIONAL_LZ4_CFLAGS="${LZ4_CFLAGS}" OPTIONAL_LZ4_LIBS="${LZ4_LIBS}" - AC_DEFINE(ENABLE_LZ4, 1, [Enable LZ4 compression library]) -- CFLAGS="${saved_CFLAGS}" - fi - - + AC_DEFINE(ENABLE_LZ4, [1], [Enable LZ4 compression library]) diff --git a/package/network/services/samba36/Makefile b/package/network/services/samba36/Makefile index 81bad871aa418d..42c23b4e8ee591 100644 --- a/package/network/services/samba36/Makefile +++ b/package/network/services/samba36/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=samba PKG_VERSION:=3.6.25 -PKG_RELEASE:=8 +PKG_RELEASE:=9 PKG_SOURCE_URL:=https://download.samba.org/pub/samba \ https://download.samba.org/pub/samba/stable @@ -18,8 +18,7 @@ PKG_HASH:=8f2c8a7f2bd89b0dfd228ed917815852f7c625b2bc0936304ac3ed63aaf83751 PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=COPYING - -PKG_MAINTAINER:=Felix Fietkau +PKG_CPE_ID:=cpe:/a:samba:samba PKG_BUILD_PARALLEL:=1 @@ -30,27 +29,29 @@ CONFIGURE_PATH:=source3 PKG_BUILD_BIN:=$(PKG_BUILD_DIR)/$(MAKE_PATH)/bin -define Package/samba36-server +define Package/samba/Default SECTION:=net CATEGORY:=Network - TITLE:=Samba 3.6 SMB/CIFS server + TITLE:=Samba 3.6 SMB/CIFS URL:=https://www.samba.org/ + MAINTAINER:=Felix Fietkau +endef + +define Package/samba36-server + $(call Package/samba/Default) + TITLE+= server DEPENDS:=+USE_GLIBC:librt $(ICONV_DEPENDS) endef define Package/samba36-client - SECTION:=net - CATEGORY:=Network - TITLE:=Samba 3.6 SMB/CIFS client - URL:=https://www.samba.org/ + $(call Package/samba/Default) + TITLE+= client DEPENDS:=+libreadline +libncurses endef define Package/samba36-net - SECTION:=net - CATEGORY:=Network - TITLE:=Samba 3.6 SMB/CIFS net commands - URL:=https://www.samba.org/ + $(call Package/samba/Default) + TITLE+= net commands DEPENDS:=+libreadline +libncurses endef diff --git a/package/network/services/samba36/patches/029-CVE-2017-15275.patch b/package/network/services/samba36/patches/029-CVE-2017-15275.patch new file mode 100644 index 00000000000000..055a15e87ec61a --- /dev/null +++ b/package/network/services/samba36/patches/029-CVE-2017-15275.patch @@ -0,0 +1,40 @@ +From c1a22e59f87783d88dfbaeeb132b89be166b2754 Mon Sep 17 00:00:00 2001 +From: Jeremy Allison +Date: Wed, 20 Sep 2017 11:04:50 -0700 +Subject: [PATCH 2/2] s3: smbd: Chain code can return uninitialized memory when + talloc buffer is grown. + +Ensure we zero out unused grown area. + +CVE-2017-15275 + +BUG: https://bugzilla.samba.org/show_bug.cgi?id=13077 + +Signed-off-by: Jeremy Allison +--- + source3/smbd/srvstr.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +--- a/source3/smbd/srvstr.c ++++ b/source3/smbd/srvstr.c +@@ -70,6 +70,20 @@ ssize_t message_push_string(uint8 **outb + DEBUG(0, ("srvstr_push failed\n")); + return -1; + } ++ ++ /* ++ * Ensure we clear out the extra data we have ++ * grown the buffer by, but not written to. ++ */ ++ if (buf_size + result < buf_size) { ++ return -1; ++ } ++ if (grow_size < result) { ++ return -1; ++ } ++ ++ memset(tmp + buf_size + result, '\0', grow_size - result); ++ + set_message_bcc((char *)tmp, smb_buflen(tmp) + result); + + *outbuf = tmp; diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile index 3d483b692dea78..f2d061c095be16 100644 --- a/package/network/services/uhttpd/Makefile +++ b/package/network/services/uhttpd/Makefile @@ -8,17 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uhttpd -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/uhttpd.git -PKG_SOURCE_DATE:=2016-10-25 -PKG_SOURCE_VERSION:=1628fa4b34aa143187353f81e8001b9a15286bda -PKG_MIRROR_HASH:=2ac4ba8dc0b349d72174aac9ff693a73a214295a9890fe3d2a8eedcad54d06e3 +PKG_SOURCE_DATE:=2017-11-04 +PKG_SOURCE_VERSION:=a235636a2687fafb9c474e4b134a59ff66425c92 +PKG_MIRROR_HASH:=626392a485e8ab8085bb55d9424b176be9143529db59a820a7de71061a93a007 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=ISC PKG_BUILD_DEPENDS = ustream-ssl +PKG_CONFIG_DEPENDS:= CONFIG_uhttpd_lua include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -43,9 +44,6 @@ define Package/uhttpd/description endef define Package/uhttpd/config - config PACKAGE_uhttpd_debug - bool "Build with debug messages" - default n config uhttpd_lua depends on PACKAGE_uhttpd-mod-lua bool "Enable Integrated Lua interpreter" diff --git a/package/network/services/umdns/Makefile b/package/network/services/umdns/Makefile index cdafa5be1c5b4a..7fae197fec6a37 100644 --- a/package/network/services/umdns/Makefile +++ b/package/network/services/umdns/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_URL=$(LEDE_GIT)/project/mdnsd.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2017-05-22 -PKG_SOURCE_VERSION:=0e8b948ff8dd1cb1763180c99b522390529c7841 -PKG_MIRROR_HASH:=1cdd25464e1be69bef56092bc8547ba254ffc2d7c32f13cf02a80c8742876f1b +PKG_SOURCE_DATE:=2018-01-02 +PKG_SOURCE_VERSION:=78974417e182a3de8f78b7d73366ec0c98396b6c +PKG_MIRROR_HASH:=a60f9eb9428ac3256cd7c3c6d4207c116cedf4d212b82e2f86c1bf7c7898fcbb PKG_MAINTAINER:=John Crispin PKG_LICENSE:=LGPL-2.1 diff --git a/package/network/services/wireguard/Makefile b/package/network/services/wireguard/Makefile new file mode 100644 index 00000000000000..0cb17e9cc1fd5b --- /dev/null +++ b/package/network/services/wireguard/Makefile @@ -0,0 +1,115 @@ +# +# Copyright (C) 2016-2017 Jason A. Donenfeld +# Copyright (C) 2016 Baptiste Jonglez +# Copyright (C) 2016-2017 Dan Luedtke +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=wireguard + +PKG_VERSION:=0.0.20171221 +PKG_RELEASE:=1 + +PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/ +PKG_HASH:=2b97697e9b271ba8836a04120a287b824648124f21d5309170ec51c1f86ac5ed + +PKG_LICENSE:=GPL-2.0 Apache-2.0 +PKG_LICENSE_FILES:=COPYING + +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/WireGuard-$(PKG_VERSION) +PKG_BUILD_PARALLEL:=1 +PKG_USE_MIPS16:=0 + +# WireGuard's makefile needs this to know where to build the kernel module +export KERNELDIR:=$(LINUX_DIR) + +include $(INCLUDE_DIR)/package.mk + +define Package/wireguard/Default + SECTION:=net + CATEGORY:=Network + SUBMENU:=VPN + URL:=https://www.wireguard.com + MAINTAINER:=Baptiste Jonglez , \ + Dan Luedtke , \ + Jason A. Donenfeld +endef + +define Package/wireguard/Default/description + WireGuard is a novel VPN that runs inside the Linux Kernel and utilizes + state-of-the-art cryptography. It aims to be faster, simpler, leaner, and + more useful than IPSec, while avoiding the massive headache. It intends to + be considerably more performant than OpenVPN. WireGuard is designed as a + general purpose VPN for running on embedded interfaces and super computers + alike, fit for many different circumstances. It uses UDP. +endef + +define Package/wireguard + $(call Package/wireguard/Default) + TITLE:=WireGuard meta-package + DEPENDS:=+wireguard-tools +kmod-wireguard +endef + +include $(INCLUDE_DIR)/kernel-defaults.mk +include $(INCLUDE_DIR)/package-defaults.mk + +# Used by Build/Compile/Default +MAKE_PATH:=src/tools + +define Build/Compile + $(MAKE) $(KERNEL_MAKEOPTS) M="$(PKG_BUILD_DIR)/src" modules + $(call Build/Compile/Default) +endef + +define Package/wireguard/install + true +endef + +define Package/wireguard/description + $(call Package/wireguard/Default/description) +endef + +define Package/wireguard-tools + $(call Package/wireguard/Default) + TITLE:=WireGuard userspace control program (wg) + DEPENDS:=+libmnl +ip +endef + +define Package/wireguard-tools/description + $(call Package/wireguard/Default/description) + + This package provides the userspace control program for WireGuard, + `wg(8)`, and a netifd protocol helper. +endef + +define Package/wireguard-tools/install + $(INSTALL_DIR) $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/tools/wg $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/lib/netifd/proto/ + $(INSTALL_BIN) ./files/wireguard.sh $(1)/lib/netifd/proto/ +endef + +define KernelPackage/wireguard + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Network Support + TITLE:=WireGuard kernel module + DEPENDS:=+IPV6:kmod-udptunnel6 +kmod-udptunnel4 + FILES:= $(PKG_BUILD_DIR)/src/wireguard.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call AutoProbe,wireguard) +endef + +define KernelPackage/wireguard/description + $(call Package/wireguard/Default/description) + + This package provides the kernel module for WireGuard. +endef + +$(eval $(call BuildPackage,wireguard)) +$(eval $(call BuildPackage,wireguard-tools)) +$(eval $(call KernelPackage,wireguard)) diff --git a/package/network/services/wireguard/files/wireguard.sh b/package/network/services/wireguard/files/wireguard.sh new file mode 100644 index 00000000000000..7b18a2e0ecdb07 --- /dev/null +++ b/package/network/services/wireguard/files/wireguard.sh @@ -0,0 +1,192 @@ +#!/bin/sh +# Copyright 2016-2017 Dan Luedtke +# Licensed to the public under the Apache License 2.0. + + +WG=/usr/bin/wg +if [ ! -x $WG ]; then + logger -t "wireguard" "error: missing wireguard-tools (${WG})" + exit 0 +fi + + +[ -n "$INCLUDE_ONLY" ] || { + . /lib/functions.sh + . ../netifd-proto.sh + init_proto "$@" +} + + +proto_wireguard_init_config() { + proto_config_add_string "private_key" + proto_config_add_int "listen_port" + proto_config_add_int "mtu" + proto_config_add_string "fwmark" + available=1 + no_proto_task=1 +} + + +proto_wireguard_setup_peer() { + local peer_config="$1" + + local public_key + local preshared_key + local allowed_ips + local route_allowed_ips + local endpoint_host + local endpoint_port + local persistent_keepalive + + config_get public_key "${peer_config}" "public_key" + config_get preshared_key "${peer_config}" "preshared_key" + config_get allowed_ips "${peer_config}" "allowed_ips" + config_get_bool route_allowed_ips "${peer_config}" "route_allowed_ips" 0 + config_get endpoint_host "${peer_config}" "endpoint_host" + config_get endpoint_port "${peer_config}" "endpoint_port" + config_get persistent_keepalive "${peer_config}" "persistent_keepalive" + + # peer configuration + echo "[Peer]" >> "${wg_cfg}" + echo "PublicKey=${public_key}" >> "${wg_cfg}" + if [ "${preshared_key}" ]; then + echo "PresharedKey=${preshared_key}" >> "${wg_cfg}" + fi + for allowed_ip in $allowed_ips; do + echo "AllowedIPs=${allowed_ip}" >> "${wg_cfg}" + done + if [ "${endpoint_host}" ]; then + case "${endpoint_host}" in + *:*) + endpoint="[${endpoint_host}]" + ;; + *) + endpoint="${endpoint_host}" + ;; + esac + if [ "${endpoint_port}" ]; then + endpoint="${endpoint}:${endpoint_port}" + else + endpoint="${endpoint}:51820" + fi + echo "Endpoint=${endpoint}" >> "${wg_cfg}" + fi + if [ "${persistent_keepalive}" ]; then + echo "PersistentKeepalive=${persistent_keepalive}" >> "${wg_cfg}" + fi + + # add routes for allowed ips + if [ ${route_allowed_ips} -ne 0 ]; then + for allowed_ip in ${allowed_ips}; do + case "${allowed_ip}" in + *:*/*) + proto_add_ipv6_route "${allowed_ip%%/*}" "${allowed_ip##*/}" + ;; + *.*/*) + proto_add_ipv4_route "${allowed_ip%%/*}" "${allowed_ip##*/}" + ;; + *:*) + proto_add_ipv6_route "${allowed_ip%%/*}" "128" + ;; + *.*) + proto_add_ipv4_route "${allowed_ip%%/*}" "32" + ;; + esac + done + fi +} + + +proto_wireguard_setup() { + local config="$1" + local wg_dir="/tmp/wireguard" + local wg_cfg="${wg_dir}/${config}" + + local private_key + local listen_port + local mtu + + # load configuration + config_load network + config_get private_key "${config}" "private_key" + config_get listen_port "${config}" "listen_port" + config_get addresses "${config}" "addresses" + config_get mtu "${config}" "mtu" + config_get fwmark "${config}" "fwmark" + + # create interface + ip link del dev "${config}" 2>/dev/null + ip link add dev "${config}" type wireguard + + if [ "${mtu}" ]; then + ip link set mtu "${mtu}" dev "${config}" + fi + + proto_init_update "${config}" 1 + + # generate configuration file + umask 077 + mkdir -p "${wg_dir}" + echo "[Interface]" > "${wg_cfg}" + echo "PrivateKey=${private_key}" >> "${wg_cfg}" + if [ "${listen_port}" ]; then + echo "ListenPort=${listen_port}" >> "${wg_cfg}" + fi + if [ "${fwmark}" ]; then + echo "FwMark=${fwmark}" >> "${wg_cfg}" + fi + config_foreach proto_wireguard_setup_peer "wireguard_${config}" + + # apply configuration file + ${WG} setconf ${config} "${wg_cfg}" + WG_RETURN=$? + + # delete configuration file + rm -f "${wg_cfg}" + + # check status + if [ ${WG_RETURN} -ne 0 ]; then + sleep 5 + proto_setup_failed "${config}" + exit 1 + fi + + # add ip addresses + for address in ${addresses}; do + case "${address}" in + *:*/*) + proto_add_ipv6_address "${address%%/*}" "${address##*/}" + ;; + *.*/*) + proto_add_ipv4_address "${address%%/*}" "${address##*/}" + ;; + *:*) + proto_add_ipv6_address "${address%%/*}" "128" + ;; + *.*) + proto_add_ipv4_address "${address%%/*}" "32" + ;; + esac + done + + # endpoint dependency + wg show "${config}" endpoints | \ + sed -E 's/\[?([0-9.:a-f]+)\]?:([0-9]+)/\1 \2/' | \ + while IFS=$'\t ' read -r key address port; do + [ -n "${port}" ] || continue + proto_add_host_dependency "${config}" "${address}" + done + + proto_send_update "${config}" +} + + +proto_wireguard_teardown() { + local config="$1" + ip link del dev "${config}" >/dev/null 2>&1 +} + + +[ -n "$INCLUDE_ONLY" ] || { + add_protocol wireguard +} diff --git a/package/network/services/wireguard/patches/100-portability.patch b/package/network/services/wireguard/patches/100-portability.patch new file mode 100644 index 00000000000000..b26d51ebd8a20c --- /dev/null +++ b/package/network/services/wireguard/patches/100-portability.patch @@ -0,0 +1,18 @@ +tools: fix portability issue + +Check if the compiler defines __linux__, instead of assuming that the +host OS is the same as the target OS. + +Signed-off-by: Felix Fietkau +--- +--- a/src/tools/Makefile ++++ b/src/tools/Makefile +@@ -43,7 +43,7 @@ CFLAGS += -DRUNSTATEDIR="\"$(RUNSTATEDIR + ifeq ($(DEBUG_TOOLS),y) + CFLAGS += -g + endif +-ifeq ($(shell uname -s),Linux) ++ifeq ($(strip $(shell echo __linux__ | $(CC) -E - | grep -v '^\#')),1) + LIBMNL_CFLAGS := $(shell $(PKG_CONFIG) --cflags libmnl 2>/dev/null) + LIBMNL_LDLIBS := $(shell $(PKG_CONFIG) --libs libmnl 2>/dev/null || echo -lmnl) + CFLAGS += $(LIBMNL_CFLAGS) diff --git a/package/network/utils/arptables/Makefile b/package/network/utils/arptables/Makefile index d2fd2593a6541b..d1168ae68f01c6 100644 --- a/package/network/utils/arptables/Makefile +++ b/package/network/utils/arptables/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=arptables PKG_RELEASE:=1 -PKG_SOURCE_URL:=git://git.netfilter.org/arptables +PKG_SOURCE_URL:=https://git.netfilter.org/arptables PKG_SOURCE_PROTO:=git PKG_SOURCE_DATE:=2015-05-20 PKG_SOURCE_VERSION:=f4ab8f63f11a72f14687a6646d04ae1bae3fa45f diff --git a/package/network/utils/comgt/Makefile b/package/network/utils/comgt/Makefile index ce99a2a6888629..3b7f4b9022c420 100644 --- a/package/network/utils/comgt/Makefile +++ b/package/network/utils/comgt/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=comgt PKG_VERSION:=0.32 -PKG_RELEASE:=29 +PKG_RELEASE:=30 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz PKG_SOURCE_URL:=@SF/comgt diff --git a/package/network/utils/comgt/files/3g.sh b/package/network/utils/comgt/files/3g.sh index d438cb7a6d2390..0d02d4c4b989de 100644 --- a/package/network/utils/comgt/files/3g.sh +++ b/package/network/utils/comgt/files/3g.sh @@ -109,4 +109,4 @@ proto_3g_teardown() { proto_kill_command "$interface" } -[ -z "NOT_INCLUDED" ] || add_protocol 3g +[ -z "$NOT_INCLUDED" ] || add_protocol 3g diff --git a/package/network/utils/comgt/files/directip.sh b/package/network/utils/comgt/files/directip.sh index 381bfb000075d4..3452fa5db702c9 100644 --- a/package/network/utils/comgt/files/directip.sh +++ b/package/network/utils/comgt/files/directip.sh @@ -44,8 +44,7 @@ proto_directip_setup() { return 1 } - cardinfo=$(gcom -d "$device" -s /etc/gcom/getcardinfo.gcom) - [ -n $(echo "$cardinfo" | grep -q "Sierra Wireless") ] || { + gcom -d "$device" -s /etc/gcom/getcardinfo.gcom | grep -q "Sierra Wireless" || { proto_notify_error "$interface" BAD_DEVICE proto_block_restart "$interface" return 1 diff --git a/package/network/utils/conntrack-tools/Makefile b/package/network/utils/conntrack-tools/Makefile index 128fa9e6f37bed..f04ac69d2eba2f 100644 --- a/package/network/utils/conntrack-tools/Makefile +++ b/package/network/utils/conntrack-tools/Makefile @@ -8,18 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=conntrack-tools -PKG_VERSION:=1.4.4 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:= \ - http://www.netfilter.org/projects/conntrack-tools/files \ - ftp://ftp.netfilter.org/pub/conntrack-tools \ - http://mirrors.evolva.ro/netfilter.org/conntrack-tools -PKG_HASH:=b7caf4fcc4c03575df57d25e5216584d597fd916c891f191dac616ce68bdba6c +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://git.netfilter.org/conntrack-tools +PKG_SOURCE_DATE:=2017-09-27 +PKG_SOURCE_VERSION:=eefe649ca51ed0cbb995454cdc366f5072f6443c +PKG_MIRROR_HASH:=1c207c3e423d741fbb31e3c29486a811e6dad493f26ec47a2df75b6262a1b4bd PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0 +PKG_CPE_ID:=cpe:/a:conntrack-tools_project:conntrack-tools PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/package/network/utils/curl/Config.in b/package/network/utils/curl/Config.in index 6fa10b67816cab..973da3d964ac63 100644 --- a/package/network/utils/curl/Config.in +++ b/package/network/utils/curl/Config.in @@ -9,8 +9,8 @@ choice config LIBCURL_MBEDTLS bool "mbed TLS" - config LIBCURL_CYASSL - bool "CyaSSL" + config LIBCURL_WOLFSSL + bool "wolfSSL" config LIBCURL_OPENSSL bool "OpenSSL" @@ -101,6 +101,10 @@ config LIBCURL_TFTP bool "TFTP protocol" default n +config LIBCURL_NGHTTP2 + bool "HTTP2 protocol" + default n + comment "Miscellaneous" config LIBCURL_PROXY diff --git a/package/network/utils/curl/Makefile b/package/network/utils/curl/Makefile index 5d510a4d392671..17fcf704de6b99 100644 --- a/package/network/utils/curl/Makefile +++ b/package/network/utils/curl/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=curl -PKG_VERSION:=7.54.1 +PKG_VERSION:=7.57.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 @@ -16,10 +16,11 @@ PKG_SOURCE_URL:=https://dl.uxnr.de/mirror/curl/ \ http://curl.mirror.anstey.ca/ \ http://curl.askapache.com/download/ \ https://curl.haxx.se/download/ -PKG_HASH:=fdfc4df2d001ee0c44ec071186e770046249263c491fcae48df0e1a3ca8f25a0 +PKG_HASH:=c92fe31a348eae079121b73884065e600c533493eb50f1f6cee9c48a3f454826 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:haxx:libcurl PKG_FIXUP:=autoreconf PKG_BUILD_PARALLEL:=1 @@ -27,7 +28,7 @@ PKG_BUILD_PARALLEL:=1 PKG_CONFIG_DEPENDS:= \ CONFIG_IPV6 \ \ - CONFIG_LIBCURL_CYASSL \ + CONFIG_LIBCURL_WOLFSSL \ CONFIG_LIBCURL_GNUTLS \ CONFIG_LIBCURL_OPENSSL \ CONFIG_LIBCURL_MBEDTLS \ @@ -53,6 +54,7 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_LIBCURL_SMTP \ CONFIG_LIBCURL_TELNET \ CONFIG_LIBCURL_TFTP \ + CONFIG_LIBCURL_NGHTTP2 \ \ CONFIG_LIBCURL_COOKIES \ CONFIG_LIBCURL_CRYPTO_AUTH \ @@ -84,8 +86,9 @@ define Package/libcurl $(call Package/curl/Default) SECTION:=libs CATEGORY:=Libraries - DEPENDS:= +LIBCURL_CYASSL:libcyassl +LIBCURL_OPENSSL:libopenssl +LIBCURL_GNUTLS:libgnutls +LIBCURL_MBEDTLS:libmbedtls - DEPENDS += +LIBCURL_ZLIB:zlib +LIBCURL_THREADED_RESOLVER:libpthread +LIBCURL_LDAP:libopenldap +LIBCURL_LIBIDN:libidn +LIBCURL_SSH2:libssh2 + DEPENDS:= +LIBCURL_WOLFSSL:libwolfssl +LIBCURL_OPENSSL:libopenssl +LIBCURL_GNUTLS:libgnutls +LIBCURL_MBEDTLS:libmbedtls + DEPENDS += +LIBCURL_ZLIB:zlib +LIBCURL_THREADED_RESOLVER:libpthread +LIBCURL_LDAP:libopenldap +LIBCURL_LIBIDN:libidn + DEPENDS += +LIBCURL_SSH2:libssh2 +LIBCURL_NGHTTP2:libnghttp2 TITLE:=A client-side URL transfer library MENU:=1 endef @@ -111,7 +114,7 @@ CONFIGURE_ARGS += \ \ $(call autoconf_bool,CONFIG_IPV6,ipv6) \ \ - $(if $(CONFIG_LIBCURL_CYASSL),--with-cyassl="$(STAGING_DIR)/usr" --without-ca-path --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt,--without-cyassl) \ + $(if $(CONFIG_LIBCURL_WOLFSSL),--with-cyassl="$(STAGING_DIR)/usr" --without-ca-path --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt,--without-cyassl) \ $(if $(CONFIG_LIBCURL_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr" --without-ca-bundle --with-ca-path=/etc/ssl/certs,--without-gnutls) \ $(if $(CONFIG_LIBCURL_OPENSSL),--with-ssl="$(STAGING_DIR)/usr" --without-ca-bundle --with-ca-path=/etc/ssl/certs,--without-ssl) \ $(if $(CONFIG_LIBCURL_MBEDTLS),--with-mbedtls="$(STAGING_DIR)/usr" --without-ca-path --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt,--without-mbedtls) \ @@ -119,6 +122,7 @@ CONFIGURE_ARGS += \ $(if $(CONFIG_LIBCURL_LIBIDN),--with-libidn="$(STAGING_DIR)/usr",--without-libidn) \ $(if $(CONFIG_LIBCURL_SSH2),--with-libssh2="$(STAGING_DIR)/usr",--without-libssh2) \ $(if $(CONFIG_LIBCURL_ZLIB),--with-zlib="$(STAGING_DIR)/usr",--without-zlib) \ + $(if $(CONFIG_LIBCURL_NGHTTP2),--with-nghttp2="$(STAGING_DIR)/usr",--without-nghttp2) \ \ $(call autoconf_bool,CONFIG_LIBCURL_DICT,dict) \ $(call autoconf_bool,CONFIG_LIBCURL_FILE,file) \ diff --git a/package/network/utils/curl/patches/200-no_docs_tests.patch b/package/network/utils/curl/patches/200-no_docs_tests.patch index f5a158bf9c2ee7..a2a6851252b0e8 100644 --- a/package/network/utils/curl/patches/200-no_docs_tests.patch +++ b/package/network/utils/curl/patches/200-no_docs_tests.patch @@ -1,22 +1,22 @@ --- a/Makefile.am +++ b/Makefile.am -@@ -154,8 +154,8 @@ - +@@ -156,7 +156,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) bin_SCRIPTS = curl-config --SUBDIRS = lib docs src include --DIST_SUBDIRS = $(SUBDIRS) tests packages scripts -+SUBDIRS = lib src include -+DIST_SUBDIRS = $(SUBDIRS) packages + SUBDIRS = lib src +-DIST_SUBDIRS = $(SUBDIRS) tests packages scripts include docs ++DIST_SUBDIRS = $(SUBDIRS) packages include pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libcurl.pc -@@ -275,7 +275,7 @@ +@@ -267,8 +267,8 @@ cygwinbin: # We extend the standard install with a custom hook: install-data-hook: cd include && $(MAKE) install - cd docs && $(MAKE) install -+# cd docs && $(MAKE) install +- cd docs/libcurl && $(MAKE) install ++ #cd docs && $(MAKE) install ++ #cd docs/libcurl && $(MAKE) install # We extend the standard uninstall with a custom hook: uninstall-hook: diff --git a/package/network/utils/curl/patches/310-mbedtls-disable-runtime-version-check.patch b/package/network/utils/curl/patches/310-mbedtls-disable-runtime-version-check.patch index ef9c4b807064bc..aabf274ac89e86 100644 --- a/package/network/utils/curl/patches/310-mbedtls-disable-runtime-version-check.patch +++ b/package/network/utils/curl/patches/310-mbedtls-disable-runtime-version-check.patch @@ -1,8 +1,8 @@ --- a/lib/vtls/mbedtls.c +++ b/lib/vtls/mbedtls.c -@@ -796,7 +796,7 @@ +@@ -814,7 +814,7 @@ static void Curl_mbedtls_session_free(vo - size_t Curl_mbedtls_version(char *buffer, size_t size) + static size_t Curl_mbedtls_version(char *buffer, size_t size) { - unsigned int version = mbedtls_version_get_number(); + unsigned int version = MBEDTLS_VERSION_NUMBER; diff --git a/package/network/utils/ebtables/Makefile b/package/network/utils/ebtables/Makefile index da7b7416af97c6..7a3a82569d8d4d 100644 --- a/package/network/utils/ebtables/Makefile +++ b/package/network/utils/ebtables/Makefile @@ -11,7 +11,7 @@ PKG_NAME:=ebtables PKG_SOURCE_DATE:=2015-10-28 PKG_RELEASE:=1 -PKG_SOURCE_URL:=git://git.netfilter.org/ebtables +PKG_SOURCE_URL:=https://git.netfilter.org/ebtables PKG_SOURCE_PROTO:=git PKG_SOURCE_VERSION:=4c3e5cd3dbae3ea773e9dcca7cf019b2713af70d PKG_MIRROR_HASH:=997a877da02d6e2141e6d31c5d4dd005737facecfdbea07308c0e1286db8591c diff --git a/package/network/utils/iperf/Makefile b/package/network/utils/iperf/Makefile index ea8f026315e530..2f420a2e265907 100644 --- a/package/network/utils/iperf/Makefile +++ b/package/network/utils/iperf/Makefile @@ -8,17 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iperf -PKG_VERSION:=2.0.9 -PKG_VERSION_SUFFIX:=a +PKG_VERSION:=2.0.10 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_VERSION_SUFFIX).tar.gz -# Temporary URL change - iperf upstream altered the already released target -# without bumping the version number. The new tarball is renamed to avoid -# conflicts with existing mirrored files. -# PKG_SOURCE_URL:=@SF/iperf2 -PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources -PKG_HASH:=db02911f35686e808ed247160dfa766e08ae3f59d1e7dcedef0ffb2a6643f0bf +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=7fe4348dcca313b74e0aa9c34a8ccd713b84a5615b8578f4aa94cedce9891ef2 +PKG_SOURCE_URL:=@SF/iperf2 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=BSD-3-Clause diff --git a/package/network/utils/iperf3/Makefile b/package/network/utils/iperf3/Makefile index 1b94ce70fa51cf..a64d7396a28d42 100644 --- a/package/network/utils/iperf3/Makefile +++ b/package/network/utils/iperf3/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iperf -PKG_VERSION:=3.2 +PKG_VERSION:=3.3 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://downloads.es.net/pub/iperf -PKG_HASH:=f207b36f861485845dbdf09f909c62f3d2222a3cf3d2682095aede8213cd9c1d +PKG_HASH:=6f596271251056bffc11bbb8f17d4244ad9a7d4a317c2459fdbb853ae51284d8 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=BSD-3-Clause diff --git a/package/network/utils/iperf3/patches/010-fix-openssl-ac-macro.patch b/package/network/utils/iperf3/patches/010-fix-openssl-ac-macro.patch deleted file mode 100644 index d49e421ae2a06b..00000000000000 --- a/package/network/utils/iperf3/patches/010-fix-openssl-ac-macro.patch +++ /dev/null @@ -1,41 +0,0 @@ -commit 3fd1a2ae907bff2d7593c0bb9944aa05eca7b58d -Author: ralcini -Date: Mon Aug 14 22:43:38 2017 +0200 - - fix for issue #624 - force build without openssl (#631) - - * fix: now --without-openssl configure flags works - enh: if openssl support is required and no valid installation is found, now it raise an error - - * enh: added warning if building without openssl (iperf_auth disabled) - -diff --git a/configure.ac b/configure.ac -index 3c56cb3..79f3869 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -101,13 +101,18 @@ AC_CHECK_HEADERS([netinet/sctp.h], - #endif - ]) - --# Check for OPENSSL support --AX_CHECK_OPENSSL( -- AC_DEFINE([HAVE_SSL], [1], [OpenSSL Is Available]) --) --LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS" --LIBS="$OPENSSL_LIBS $LIBS" --CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS" -+if test "x$with_openssl" = "xno"; then -+ AC_MSG_WARN( [Building without OpenSSL; disabling iperf_auth functionality.] ) -+else -+ # Check for OPENSSL support -+ AX_CHECK_OPENSSL( -+ [ AC_DEFINE([HAVE_SSL], [1], [OpenSSL Is Available]) ], -+ [ AC_MSG_FAILURE([--with-openssl was given, but test for openssl failed]) ] -+ ) -+ LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS" -+ LIBS="$OPENSSL_LIBS $LIBS" -+ CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS" -+fi - - # Check for TCP_CONGESTION sockopt (believed to be Linux and FreeBSD only) - AC_CACHE_CHECK([TCP_CONGESTION socket option], diff --git a/package/network/utils/iperf3/patches/010-iperf-3.3-fix-build-warnings.patch b/package/network/utils/iperf3/patches/010-iperf-3.3-fix-build-warnings.patch new file mode 100644 index 00000000000000..d617ba9f40188a --- /dev/null +++ b/package/network/utils/iperf3/patches/010-iperf-3.3-fix-build-warnings.patch @@ -0,0 +1,300 @@ +The following patches are taken directly from: + +https://github.com/esnet/iperf/pull/664 + +as an upstream submission. + +commit b63d41b25f49a76d0be66edfb61bd4cb68921d55 +Author: Philip Prindeville +Date: Tue Oct 31 13:41:08 2017 -0600 + + Fix warnings about _GNU_SOURCE being redefined. + + Signed-off-by: Philip Prindeville + +diff --git a/src/iperf.h b/src/iperf.h +index bb951dc..b656784 100755 +--- a/src/iperf.h ++++ b/src/iperf.h +@@ -36,7 +36,9 @@ + #endif + #include + #include +-#define _GNU_SOURCE ++#ifndef _GNU_SOURCE ++# define _GNU_SOURCE ++#endif + #include + + #if defined(HAVE_CPUSET_SETAFFINITY) +diff --git a/src/iperf_api.c b/src/iperf_api.c +index ab30b93..9e41238 100755 +--- a/src/iperf_api.c ++++ b/src/iperf_api.c +@@ -24,7 +24,9 @@ + * This code is distributed under a BSD style license, see the LICENSE file + * for complete information. + */ +-#define _GNU_SOURCE ++#ifndef _GNU_SOURCE ++# define _GNU_SOURCE ++#endif + #define __USE_GNU + + #include "iperf_config.h" + +commit 315254cfc5f5682627f4a46ade3100bc3c64cfcc +Author: Philip Prindeville +Date: Tue Oct 31 13:42:58 2017 -0600 + + Fix warnings of format-specified mismatching type + + Signed-off-by: Philip Prindeville + +diff --git a/src/iperf_tcp.c b/src/iperf_tcp.c +index 91cf032..6f86d5d 100644 +--- a/src/iperf_tcp.c ++++ b/src/iperf_tcp.c +@@ -24,8 +24,6 @@ + * This code is distributed under a BSD style license, see the LICENSE + * file for complete information. + */ +-#include "iperf_config.h" +- + #include + #include + #include +@@ -44,6 +42,12 @@ + #include "net.h" + #include "cjson.h" + ++#if defined(HAVE_INTTYPES_H) ++# include ++#else ++# define PRIu64 "llu" ++#endif ++ + #if defined(HAVE_FLOWLABEL) + #include "flowlabel.h" + #endif /* HAVE_FLOWLABEL */ +@@ -90,7 +94,7 @@ iperf_tcp_send(struct iperf_stream *sp) + sp->result->bytes_sent_this_interval += r; + + if (sp->test->debug) +- printf("sent %d bytes of %d, total %llu\n", r, sp->settings->blksize, sp->result->bytes_sent); ++ printf("sent %d bytes of %d, total %" PRIu64 "\n", r, sp->settings->blksize, sp->result->bytes_sent); + + return r; + } +diff --git a/src/iperf_udp.c b/src/iperf_udp.c +index a2ea6d0..d04ae44 100644 +--- a/src/iperf_udp.c ++++ b/src/iperf_udp.c +@@ -48,6 +48,12 @@ + #include "cjson.h" + #include "portable_endian.h" + ++#if defined(HAVE_INTTYPES_H) ++# include ++#else ++# define PRIu64 "llu" ++#endif ++ + /* iperf_udp_recv + * + * receives the data for UDP +@@ -98,7 +104,7 @@ iperf_udp_recv(struct iperf_stream *sp) + } + + if (sp->test->debug) +- fprintf(stderr, "pcount %llu packet_count %d\n", pcount, sp->packet_count); ++ fprintf(stderr, "pcount %" PRIu64 " packet_count %d\n", pcount, sp->packet_count); + + /* + * Try to handle out of order packets. The way we do this +@@ -141,7 +147,7 @@ iperf_udp_recv(struct iperf_stream *sp) + + /* Log the out-of-order packet */ + if (sp->test->debug) +- fprintf(stderr, "OUT OF ORDER - incoming packet sequence %llu but expected sequence %d on stream %d", pcount, sp->packet_count, sp->socket); ++ fprintf(stderr, "OUT OF ORDER - incoming packet sequence %" PRIu64 " but expected sequence %d on stream %d", pcount, sp->packet_count, sp->socket); + } + + /* +@@ -220,7 +226,7 @@ iperf_udp_send(struct iperf_stream *sp) + sp->result->bytes_sent_this_interval += r; + + if (sp->test->debug) +- printf("sent %d bytes of %d, total %llu\n", r, sp->settings->blksize, sp->result->bytes_sent); ++ printf("sent %d bytes of %d, total %" PRIu64 "\n", r, sp->settings->blksize, sp->result->bytes_sent); + + return r; + } + +commit 9a66b3b0349e0a158bb4940b668a5cbc7c245762 +Author: Philip Prindeville +Date: Tue Oct 31 13:44:34 2017 -0600 + + Simplify endianness checks + + Linux can be built with too many types of C run-time library and it's + not reasonable to have to enumerate all of them, especially since at + least one of them (MUSL) goes out of its way to not be easily + detectable. + + Instead, leverage autoconf better for Linux/BSD to detect either + or directly. + + Signed-off-by: Philip Prindeville + +diff --git a/configure.ac b/configure.ac +index f57e83f..cfb42ac 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -101,6 +101,14 @@ AC_CHECK_HEADERS([netinet/sctp.h], + #endif + ]) + ++AC_CHECK_HEADER([endian.h], ++ AC_DEFINE([HAVE_ENDIAN_H], [1], [Define to 1 if you have the header file.]), ++ AC_CHECK_HEADER([sys/endian.h], ++ AC_DEFINE([HAVE_SYS_ENDIAN_H], [1], [Define to 1 if you have the header file.]), ++ AC_MSG_WARN([Couldn't find endian.h or sys/endian.h files: doing compile-time tests.]) ++ ) ++ ) ++ + if test "x$with_openssl" = "xno"; then + AC_MSG_WARN( [Building without OpenSSL; disabling iperf_auth functionality.] ) + else +diff --git a/src/iperf_config.h.in b/src/iperf_config.h.in +index bd03935..a9e51ec 100644 +--- a/src/iperf_config.h.in ++++ b/src/iperf_config.h.in +@@ -9,6 +9,9 @@ + /* Define to 1 if you have the header file. */ + #undef HAVE_DLFCN_H + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_ENDIAN_H ++ + /* Have IPv6 flowlabel support. */ + #undef HAVE_FLOWLABEL + +@@ -54,6 +57,9 @@ + /* Define to 1 if the system has the type `struct sctp_assoc_value'. */ + #undef HAVE_STRUCT_SCTP_ASSOC_VALUE + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_ENDIAN_H ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_SOCKET_H + +diff --git a/src/portable_endian.h b/src/portable_endian.h +index b86d37a..5dbc6e5 100644 +--- a/src/portable_endian.h ++++ b/src/portable_endian.h +@@ -10,14 +10,33 @@ + + #endif + +-// GLIBC / Linux with endian(3) support, which was added in glibc 2.9. +-// Intended to support CentOS 6 and newer. +-#if defined(__linux__) && \ +- ((__GLIBC__ > 3) || \ +- (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9)) +- ++#if defined(HAVE_ENDIAN_H) + # include + ++#elif defined(HAVE_SYS_ENDIAN_H) ++# include ++ ++# if defined(__OpenBSD__) ++ ++# define be16toh(x) betoh16(x) ++# define le16toh(x) letoh16(x) ++ ++# define be32toh(x) betoh32(x) ++# define le32toh(x) letoh32(x) ++ ++# define be64toh(x) betoh64(x) ++# define le64toh(x) letoh64(x) ++ ++# elif defined(__sgi) ++ ++# include ++# include ++ ++# define be64toh(x) (x) ++# define htobe64(x) (x) ++ ++# endif ++ + #elif defined(__CYGWIN__) + + # include +@@ -46,32 +65,6 @@ + # define __LITTLE_ENDIAN LITTLE_ENDIAN + # define __PDP_ENDIAN PDP_ENDIAN + +-#elif defined(__OpenBSD__) +- +-# include +- +-# define be16toh(x) betoh16(x) +-# define le16toh(x) letoh16(x) +- +-# define be32toh(x) betoh32(x) +-# define le32toh(x) letoh32(x) +- +-# define be64toh(x) betoh64(x) +-# define le64toh(x) letoh64(x) +- +-#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) +- +-# include +- +-#elif defined(__sgi) +- +-# include +-# include +-# include +- +-# define be64toh(x) (x) +-# define htobe64(x) (x) +- + #elif defined(__sun) && defined(__SVR4) + + # include + +commit 7e7285d0daf92ef7beda8f78a6f63cc647a77f38 +Author: Philip Prindeville +Date: Tue Oct 31 13:48:06 2017 -0600 + + Sys headers should not be included directly + + There's usually a top-level header which then includes the sys/ + descendent. + + Signed-off-by: Philip Prindeville + +diff --git a/src/net.c b/src/net.c +index af456cb..afd0022 100644 +--- a/src/net.c ++++ b/src/net.c +@@ -31,13 +31,12 @@ + #include + #include + #include +-#include + #include + #include + #include + #include + #include +-#include ++#include + + #ifdef HAVE_SENDFILE + #ifdef linux diff --git a/package/network/utils/iperf3/patches/100-iperf_auth-rsa-header.patch b/package/network/utils/iperf3/patches/100-iperf_auth-rsa-header.patch deleted file mode 100644 index fa78d91b1728d3..00000000000000 --- a/package/network/utils/iperf3/patches/100-iperf_auth-rsa-header.patch +++ /dev/null @@ -1,17 +0,0 @@ -commit 31d5b6b580a356c5149dbc4f53118b7f83c60822 -Author: Philip Prindeville -Date: Sun Jul 30 18:54:46 2017 -0600 -Subject: Add required RSA header for OpenSSL - -Signed-off-by: Philip Prindeville - ---- a/src/iperf_auth.c 2017-06-26 11:42:56.000000000 -0600 -+++ b/src/iperf_auth.c 2017-07-30 17:42:43.070447875 -0600 -@@ -40,6 +40,7 @@ - #include - #include - #include -+#include - - void sha256(const char *string, char outputBuffer[65]) - { diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 260bdac7792c86..5f718748db022c 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -8,18 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iproute2 -PKG_VERSION:=4.11.0 -PKG_RELEASE:=1 +PKG_VERSION:=4.14.1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 -PKG_HASH:=72671028bda696d0cb8f48ec8e702581c3a501caeed33eec3a81d7041cbc8026 +PKG_HASH:=d43ac068afcc350a448f4581b6e292331ef7e4e7aa746e34981582d5fdb10067 PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=iptables PKG_LICENSE:=GPL-2.0 +PKG_CPE_ID:=cpe:/a:iproute2_project:iproute2 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/package.mk define Package/iproute2/Default @@ -28,7 +30,6 @@ define Package/iproute2/Default URL:=http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2 SUBMENU:=Routing and Redirection MAINTAINER:=Russell Senior - DEPENDS:= +libnl-tiny endef define Package/ip-tiny @@ -37,6 +38,7 @@ $(call Package/iproute2/Default) VARIANT:=tiny PROVIDES:=ip ALTERNATIVES:=200:/sbin/ip:/sbin/ip-tiny + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl endef define Package/ip-full @@ -45,32 +47,37 @@ $(call Package/iproute2/Default) VARIANT:=full PROVIDES:=ip ALTERNATIVES:=300:/sbin/ip:/sbin/ip-full + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl endef define Package/tc $(call Package/iproute2/Default) TITLE:=Traffic control utility - DEPENDS:=+kmod-sched-core + DEPENDS:=+kmod-sched-core +(PACKAGE_devlink||PACKAGE_rdma):libmnl endef define Package/genl $(call Package/iproute2/Default) TITLE:=General netlink utility frontend + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl endef define Package/ip-bridge $(call Package/iproute2/Default) TITLE:=Bridge configuration utility from iproute2 + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl endef define Package/ss $(call Package/iproute2/Default) TITLE:=Socket statistics utility + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl endef define Package/nstat $(call Package/iproute2/Default) TITLE:=Network statistics utility + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl endef define Package/devlink @@ -79,10 +86,24 @@ $(call Package/iproute2/Default) DEPENDS:=+libmnl endef +define Package/rdma +$(call Package/iproute2/Default) + TITLE:=Network rdma utility + DEPENDS:=+libmnl +endef + ifeq ($(BUILD_VARIANT),tiny) IP_CONFIG_TINY:=y endif +ifdef CONFIG_PACKAGE_devlink + HAVE_MNL:=y +endif + +ifdef CONFIG_PACKAGE_rdma + HAVE_MNL:=y +endif + define Build/Configure $(SED) "s,-I/usr/include/db3,," $(PKG_BUILD_DIR)/Makefile $(SED) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \ @@ -101,6 +122,7 @@ MAKE_FLAGS += \ SHARED_LIBS="" \ LDFLAGS="$(TARGET_LDFLAGS) -Wl,--gc-sections" \ IP_CONFIG_TINY=$(IP_CONFIG_TINY) \ + HAVE_MNL=$(HAVE_MNL) \ IPT_LIB_DIR=/usr/lib/iptables \ FPIC="$(FPIC)" @@ -157,6 +179,11 @@ define Package/devlink/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/devlink/devlink $(1)/usr/sbin/ endef +define Package/rdma/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/rdma/rdma $(1)/usr/sbin/ +endef + $(eval $(call BuildPackage,ip-tiny)) $(eval $(call BuildPackage,ip-full)) $(eval $(call BuildPackage,tc)) @@ -165,3 +192,4 @@ $(eval $(call BuildPackage,ip-bridge)) $(eval $(call BuildPackage,ss)) $(eval $(call BuildPackage,nstat)) $(eval $(call BuildPackage,devlink)) +$(eval $(call BuildPackage,rdma)) diff --git a/package/network/utils/iproute2/patches/001-config.patch b/package/network/utils/iproute2/patches/001-config.patch index b3208e063e8887..7f23cfc35ec77f 100644 --- a/package/network/utils/iproute2/patches/001-config.patch +++ b/package/network/utils/iproute2/patches/001-config.patch @@ -1,8 +1,7 @@ --- /dev/null +++ b/Config -@@ -0,0 +1,5 @@ +@@ -0,0 +1,4 @@ +# Fixed config to disable ATM support even if present on host system +IP_CONFIG_SETNS:=y +TC_CONFIG_ATM:=n +TC_CONFIG_XT:=y -+HAVE_MNL:=y diff --git a/package/network/utils/iproute2/patches/004-darwin_fixes.patch b/package/network/utils/iproute2/patches/004-darwin_fixes.patch index e1a5e975685aa2..1f3eb101ea4c6d 100644 --- a/package/network/utils/iproute2/patches/004-darwin_fixes.patch +++ b/package/network/utils/iproute2/patches/004-darwin_fixes.patch @@ -42,7 +42,7 @@ #define TABLESIZE 16384 --- a/netem/paretonormal.c +++ b/netem/paretonormal.c -@@ -15,10 +15,13 @@ +@@ -14,10 +14,13 @@ #include #include #include diff --git a/package/network/utils/iproute2/patches/006-no_sctp.patch b/package/network/utils/iproute2/patches/006-no_sctp.patch index 0f6f269d40f0dc..e23fbcd77d1342 100644 --- a/package/network/utils/iproute2/patches/006-no_sctp.patch +++ b/package/network/utils/iproute2/patches/006-no_sctp.patch @@ -1,6 +1,6 @@ --- a/ip/ipxfrm.c +++ b/ip/ipxfrm.c -@@ -465,7 +465,6 @@ void xfrm_selector_print(struct xfrm_sel +@@ -454,7 +454,6 @@ void xfrm_selector_print(struct xfrm_sel switch (sel->proto) { case IPPROTO_TCP: case IPPROTO_UDP: @@ -8,7 +8,7 @@ case IPPROTO_DCCP: default: /* XXX */ if (sel->sport_mask) -@@ -1321,7 +1320,6 @@ static int xfrm_selector_upspec_parse(st +@@ -1329,7 +1328,6 @@ static int xfrm_selector_upspec_parse(st switch (sel->proto) { case IPPROTO_TCP: case IPPROTO_UDP: diff --git a/package/network/utils/iproute2/patches/007-no_arpd.patch b/package/network/utils/iproute2/patches/007-no_arpd.patch index 94fb197a459a67..ac216ba82598af 100644 --- a/package/network/utils/iproute2/patches/007-no_arpd.patch +++ b/package/network/utils/iproute2/patches/007-no_arpd.patch @@ -2,7 +2,7 @@ +++ b/misc/Makefile @@ -5,9 +5,9 @@ TARGETS=ss nstat ifstat rtacct lnstat - include ../Config + include ../config.mk -ifeq ($(HAVE_BERKELEY_DB),y) - TARGETS += arpd @@ -11,5 +11,5 @@ +# TARGETS += arpd +#endif - ifeq ($(HAVE_SELINUX),y) - LDLIBS += $(shell $(PKG_CONFIG) --libs libselinux) + all: $(TARGETS) + diff --git a/package/network/utils/iproute2/patches/008-no_netem.patch b/package/network/utils/iproute2/patches/008-no_netem.patch index 47ffd9946d02a8..2e088f1993287c 100644 --- a/package/network/utils/iproute2/patches/008-no_netem.patch +++ b/package/network/utils/iproute2/patches/008-no_netem.patch @@ -1,11 +1,11 @@ --- a/Makefile +++ b/Makefile -@@ -52,7 +52,7 @@ WFLAGS += -Wmissing-declarations -Wold-s - CFLAGS := $(WFLAGS) $(CCOPTS) -I../include $(DEFINES) $(CFLAGS) +@@ -49,7 +49,7 @@ WFLAGS += -Wmissing-declarations -Wold-s + CFLAGS := $(WFLAGS) $(CCOPTS) -I../include -I../include/uapi $(DEFINES) $(CFLAGS) YACCFLAGS = -d -t -v --SUBDIRS=lib ip tc bridge misc netem genl tipc devlink man -+SUBDIRS=lib ip tc bridge misc genl tipc devlink man +-SUBDIRS=lib ip tc bridge misc netem genl tipc devlink rdma man ++SUBDIRS=lib ip tc bridge misc genl tipc devlink rdma man LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a LDLIBS += $(LIBNETLINK) diff --git a/package/network/utils/iproute2/patches/009-keep_libmnl_optional.patch b/package/network/utils/iproute2/patches/009-keep_libmnl_optional.patch new file mode 100644 index 00000000000000..7a5a702237af7c --- /dev/null +++ b/package/network/utils/iproute2/patches/009-keep_libmnl_optional.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -292,7 +292,7 @@ check_selinux() + + check_mnl() + { +- if ${PKG_CONFIG} libmnl --exists ++ if [ "${HAVE_MNL}" = "y" ] && ${PKG_CONFIG} libmnl --exists + then + echo "HAVE_MNL:=y" >>$CONFIG + echo "yes" diff --git a/package/network/utils/iproute2/patches/110-extra-ccopts.patch b/package/network/utils/iproute2/patches/110-extra-ccopts.patch index b28e19de57ce72..e779934d7215de 100644 --- a/package/network/utils/iproute2/patches/110-extra-ccopts.patch +++ b/package/network/utils/iproute2/patches/110-extra-ccopts.patch @@ -1,6 +1,6 @@ --- a/Makefile +++ b/Makefile -@@ -45,7 +45,7 @@ HOSTCC ?= $(CC) +@@ -42,7 +42,7 @@ HOSTCC ?= $(CC) DEFINES += -D_GNU_SOURCE # Turn on transparent support for LFS DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE diff --git a/package/network/utils/iproute2/patches/120-libnetlink-pic.patch b/package/network/utils/iproute2/patches/120-libnetlink-pic.patch index 1f397f71b2d85a..83ce66d9761b1c 100644 --- a/package/network/utils/iproute2/patches/120-libnetlink-pic.patch +++ b/package/network/utils/iproute2/patches/120-libnetlink-pic.patch @@ -1,11 +1,10 @@ --- a/lib/Makefile +++ b/lib/Makefile -@@ -4,7 +4,7 @@ ifeq ($(IP_CONFIG_SETNS),y) - CFLAGS += -DHAVE_SETNS - endif +@@ -1,6 +1,6 @@ + include ../config.mk -CFLAGS += -fPIC +CFLAGS += $(FPIC) UTILOBJ = utils.o rt_names.o ll_types.o ll_proto.o ll_addr.o \ - inet_proto.o namespace.o json_writer.o \ + inet_proto.o namespace.o json_writer.o json_print.o \ diff --git a/package/network/utils/iproute2/patches/271-uapi-libc-compat.h-do-not-rely-on-__GLIBC__.patch b/package/network/utils/iproute2/patches/271-uapi-libc-compat.h-do-not-rely-on-__GLIBC__.patch index b0ed5991960089..e3364ad0592e6e 100644 --- a/package/network/utils/iproute2/patches/271-uapi-libc-compat.h-do-not-rely-on-__GLIBC__.patch +++ b/package/network/utils/iproute2/patches/271-uapi-libc-compat.h-do-not-rely-on-__GLIBC__.patch @@ -15,9 +15,9 @@ Signed-off-by: Jonas Gorski include/uapi/linux/libc-compat.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) ---- a/include/linux/libc-compat.h -+++ b/include/linux/libc-compat.h -@@ -48,13 +48,13 @@ +--- a/include/uapi/linux/libc-compat.h ++++ b/include/uapi/linux/libc-compat.h +@@ -49,13 +49,13 @@ #ifndef _LIBC_COMPAT_H #define _LIBC_COMPAT_H @@ -36,7 +36,7 @@ Signed-off-by: Jonas Gorski * that would already be defined. */ #define __UAPI_DEF_IF_IFCONF 0 -@@ -65,7 +65,11 @@ +@@ -66,7 +66,11 @@ #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0 /* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */ #ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO @@ -48,7 +48,7 @@ Signed-off-by: Jonas Gorski #endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ #else /* _NET_IF_H */ -@@ -85,10 +89,10 @@ +@@ -86,10 +90,10 @@ #endif /* _NET_IF_H */ @@ -61,7 +61,7 @@ Signed-off-by: Jonas Gorski * that would already be defined. */ #define __UAPI_DEF_IN_ADDR 0 #define __UAPI_DEF_IN_IPPROTO 0 -@@ -102,7 +106,7 @@ +@@ -103,7 +107,7 @@ * if the glibc code didn't define them. This guard matches * the guard in glibc/inet/netinet/in.h which defines the * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */ @@ -70,7 +70,7 @@ Signed-off-by: Jonas Gorski #define __UAPI_DEF_IN6_ADDR_ALT 0 #else #define __UAPI_DEF_IN6_ADDR_ALT 1 -@@ -117,7 +121,7 @@ +@@ -118,7 +122,7 @@ #else /* Linux headers included first, and we must define everything @@ -79,7 +79,7 @@ Signed-off-by: Jonas Gorski * __UAPI_DEF_* defines and adjust appropriately. */ #define __UAPI_DEF_IN_ADDR 1 #define __UAPI_DEF_IN_IPPROTO 1 -@@ -127,7 +131,7 @@ +@@ -128,7 +132,7 @@ #define __UAPI_DEF_IN_CLASS 1 #define __UAPI_DEF_IN6_ADDR 1 @@ -88,7 +88,7 @@ Signed-off-by: Jonas Gorski * coordinate. */ #define __UAPI_DEF_IN6_ADDR_ALT 1 #define __UAPI_DEF_SOCKADDR_IN6 1 -@@ -168,7 +172,7 @@ +@@ -169,7 +173,7 @@ /* If we did not see any headers from any supported C libraries, * or we are being included in the kernel, then define everything * that we need. */ @@ -97,7 +97,7 @@ Signed-off-by: Jonas Gorski /* Definitions for if.h */ #define __UAPI_DEF_IF_IFCONF 1 -@@ -208,6 +212,6 @@ +@@ -209,6 +213,6 @@ /* Definitions for xattr.h */ #define __UAPI_DEF_XATTR 1 diff --git a/package/network/utils/iproute2/patches/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch b/package/network/utils/iproute2/patches/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch index 42e29326b986de..abd1f7eaca9724 100644 --- a/package/network/utils/iproute2/patches/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch +++ b/package/network/utils/iproute2/patches/272-uapi-if_ether.h-prevent-redefinition-of-struct-ethhd.patch @@ -14,9 +14,9 @@ Signed-off-by: Jonas Gorski include/uapi/linux/libc-compat.h | 11 +++++++++++ 2 files changed, 14 insertions(+) ---- a/include/linux/if_ether.h -+++ b/include/linux/if_ether.h -@@ -22,6 +22,7 @@ +--- a/include/uapi/linux/if_ether.h ++++ b/include/uapi/linux/if_ether.h +@@ -23,6 +23,7 @@ #define _LINUX_IF_ETHER_H #include @@ -24,7 +24,7 @@ Signed-off-by: Jonas Gorski /* * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble -@@ -142,11 +143,13 @@ +@@ -149,11 +150,13 @@ * This is an Ethernet frame header. */ @@ -38,9 +38,9 @@ Signed-off-by: Jonas Gorski #endif /* _LINUX_IF_ETHER_H */ ---- a/include/linux/libc-compat.h -+++ b/include/linux/libc-compat.h -@@ -89,6 +89,14 @@ +--- a/include/uapi/linux/libc-compat.h ++++ b/include/uapi/linux/libc-compat.h +@@ -90,6 +90,14 @@ #endif /* _NET_IF_H */ @@ -55,7 +55,7 @@ Signed-off-by: Jonas Gorski /* Coordinate with libc netinet/in.h header. */ #if defined(_NETINET_IN_H) -@@ -184,6 +192,9 @@ +@@ -185,6 +193,9 @@ /* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */ #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 @@ -65,15 +65,3 @@ Signed-off-by: Jonas Gorski /* Definitions for in.h */ #define __UAPI_DEF_IN_ADDR 1 #define __UAPI_DEF_IN_IPPROTO 1 ---- a/ip/iplink_bridge.c -+++ b/ip/iplink_bridge.c -@@ -14,8 +14,8 @@ - #include - #include - #include --#include - #include -+#include - #include - - #include "rt_names.h" diff --git a/package/network/utils/iproute2/patches/300-ip_tiny.patch b/package/network/utils/iproute2/patches/300-ip_tiny.patch index e1b1da4d20f986..35b588f7ef5d8d 100644 --- a/package/network/utils/iproute2/patches/300-ip_tiny.patch +++ b/package/network/utils/iproute2/patches/300-ip_tiny.patch @@ -1,8 +1,8 @@ --- a/ip/Makefile +++ b/ip/Makefile -@@ -19,6 +19,13 @@ ifeq ($(IP_CONFIG_SETNS),y) - CFLAGS += -DHAVE_SETNS - endif +@@ -15,6 +15,13 @@ RTMONOBJ=rtmon.o + + include ../config.mk +STATIC_SYM_FILTER:= +ifeq ($(IP_CONFIG_TINY),y) @@ -14,7 +14,7 @@ ALLOBJ=$(IPOBJ) $(RTMONOBJ) SCRIPTS=ifcfg rtpr routel routef TARGETS=ip rtmon -@@ -48,7 +55,7 @@ else +@@ -44,7 +51,7 @@ else ip: static-syms.o static-syms.o: static-syms.h @@ -25,7 +25,24 @@ sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \ --- a/ip/ip.c +++ b/ip/ip.c -@@ -74,32 +74,44 @@ static const struct cmd { +@@ -49,10 +49,16 @@ static void usage(void) + fprintf(stderr, + "Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n" + " ip [ -force ] -batch filename\n" ++#ifndef IPROUTE2_TINY + "where OBJECT := { link | address | addrlabel | route | rule | neigh | ntable |\n" + " tunnel | tuntap | maddress | mroute | mrule | monitor | xfrm |\n" + " netns | l2tp | fou | macsec | tcp_metrics | token | netconf | ila |\n" + " vrf | sr }\n" ++#else ++"where OBJECT := { link | address | route | rule | neigh | tunnel | maddress |\n" ++" mroute | mrule | monitor | netns | macsec | token | ila |\n" ++" vrf | sr }\n" ++#endif + " OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n" + " -h[uman-readable] | -iec |\n" + " -f[amily] { inet | inet6 | ipx | dnet | mpls | bridge | link } |\n" +@@ -74,32 +80,44 @@ static const struct cmd { int (*func)(int argc, char **argv); } cmds[] = { { "address", do_ipaddr }, @@ -68,11 +85,11 @@ { "netconf", do_ipnetconf }, +#endif { "vrf", do_ipvrf}, + { "sr", do_seg6 }, { "help", do_help }, - { 0 } --- a/lib/utils.c +++ b/lib/utils.c -@@ -777,6 +777,7 @@ const char *rt_addr_n2a_r(int af, int le +@@ -817,6 +817,7 @@ const char *rt_addr_n2a_r(int af, int le return inet_ntop(af, addr, buf, buflen); case AF_MPLS: return mpls_ntop(af, addr, buf, buflen); @@ -80,7 +97,7 @@ case AF_IPX: return ipx_ntop(af, addr, buf, buflen); case AF_DECnet: -@@ -786,6 +787,7 @@ const char *rt_addr_n2a_r(int af, int le +@@ -826,6 +827,7 @@ const char *rt_addr_n2a_r(int af, int le memcpy(dna.a_addr, addr, 2); return dnet_ntop(af, &dna, buf, buflen); } @@ -90,14 +107,14 @@ default: --- a/lib/Makefile +++ b/lib/Makefile -@@ -4,6 +4,10 @@ ifeq ($(IP_CONFIG_SETNS),y) - CFLAGS += -DHAVE_SETNS - endif +@@ -2,6 +2,10 @@ include ../config.mk + + CFLAGS += $(FPIC) +ifeq ($(IP_CONFIG_TINY),y) + CFLAGS += -DIPROUTE2_TINY +endif + - CFLAGS += $(FPIC) - UTILOBJ = utils.o rt_names.o ll_types.o ll_proto.o ll_addr.o \ + inet_proto.o namespace.o json_writer.o json_print.o \ + names.o color.o bpf.o exec.o fs.o diff --git a/package/network/utils/iproute2/patches/900-drop_FAILED_POLICY.patch b/package/network/utils/iproute2/patches/900-drop_FAILED_POLICY.patch index 44f198f1bf9e30..1980f87107e7ba 100644 --- a/package/network/utils/iproute2/patches/900-drop_FAILED_POLICY.patch +++ b/package/network/utils/iproute2/patches/900-drop_FAILED_POLICY.patch @@ -9,29 +9,6 @@ Subject: [PATCH] add support for dropping with FAILED_POLICY ip/rtm_map.c | 4 ++++ 3 files changed, 9 insertions(+) ---- a/include/linux/fib_rules.h -+++ b/include/linux/fib_rules.h -@@ -72,6 +72,10 @@ enum { - FR_ACT_BLACKHOLE, /* Drop without notification */ - FR_ACT_UNREACHABLE, /* Drop with ENETUNREACH */ - FR_ACT_PROHIBIT, /* Drop with EACCES */ -+ FR_ACT_RES8, -+ FR_ACT_RES9, -+ FR_ACT_RES10, -+ FR_ACT_FAILED_POLICY, /* Drop with EPERM */ - __FR_ACT_MAX, - }; - ---- a/include/linux/rtnetlink.h -+++ b/include/linux/rtnetlink.h -@@ -215,6 +215,7 @@ enum { - RTN_THROW, /* Not in this table */ - RTN_NAT, /* Translate this address */ - RTN_XRESOLVE, /* Use external resolver */ -+ RTN_FAILED_POLICY, /* Source address failed policy */ - __RTN_MAX - }; - --- a/ip/rtm_map.c +++ b/ip/rtm_map.c @@ -49,6 +49,8 @@ char *rtnl_rtntype_n2a(int id, char *buf @@ -52,3 +29,13 @@ Subject: [PATCH] add support for dropping with FAILED_POLICY else { res = strtoul(arg, &end, 0); if (!end || end == arg || *end || res > 255) +--- a/include/uapi/linux/rtnetlink.h ++++ b/include/uapi/linux/rtnetlink.h +@@ -221,6 +221,7 @@ enum { + RTN_THROW, /* Not in this table */ + RTN_NAT, /* Translate this address */ + RTN_XRESOLVE, /* Use external resolver */ ++ RTN_FAILED_POLICY, /* Source address failed policy */ + __RTN_MAX + }; + diff --git a/package/network/utils/iproute2/patches/950-add-cake-to-tc.patch b/package/network/utils/iproute2/patches/950-add-cake-to-tc.patch index 0705eb12c52dc3..5e91cd7ed14e6b 100644 --- a/package/network/utils/iproute2/patches/950-add-cake-to-tc.patch +++ b/package/network/utils/iproute2/patches/950-add-cake-to-tc.patch @@ -1,6 +1,6 @@ ---- a/include/linux/pkt_sched.h -+++ b/include/linux/pkt_sched.h -@@ -863,4 +863,60 @@ struct tc_pie_xstats { +--- a/include/uapi/linux/pkt_sched.h ++++ b/include/uapi/linux/pkt_sched.h +@@ -872,4 +872,63 @@ struct tc_pie_xstats { __u32 maxq; /* maximum queue size */ __u32 ecn_mark; /* packets marked with ecn*/ }; @@ -21,6 +21,8 @@ + TCA_CAKE_ETHERNET, + TCA_CAKE_WASH, + TCA_CAKE_MPU, ++ TCA_CAKE_INGRESS, ++ TCA_CAKE_ACK_FILTER, + __TCA_CAKE_MAX +}; +#define TCA_CAKE_MAX (__TCA_CAKE_MAX - 1) @@ -33,12 +35,12 @@ + +#define TC_CAKE_MAX_TINS (8) +struct tc_cake_xstats { -+ __u16 version; /* == 4, increments when struct extended */ ++ __u16 version; /* == 5, increments when struct extended */ + __u8 max_tins; /* == TC_CAKE_MAX_TINS */ + __u8 tin_cnt; /* <= TC_CAKE_MAX_TINS */ + + __u32 threshold_rate [TC_CAKE_MAX_TINS]; -+ __u32 target_us [TC_CAKE_MAX_TINS]; ++ __u32 target_us [TC_CAKE_MAX_TINS]; + struct tc_cake_traffic_stats sent [TC_CAKE_MAX_TINS]; + struct tc_cake_traffic_stats dropped [TC_CAKE_MAX_TINS]; + struct tc_cake_traffic_stats ecn_marked[TC_CAKE_MAX_TINS]; @@ -47,23 +49,24 @@ + __u32 way_indirect_hits[TC_CAKE_MAX_TINS]; + __u32 way_misses [TC_CAKE_MAX_TINS]; + __u32 way_collisions [TC_CAKE_MAX_TINS]; -+ __u32 peak_delay_us [TC_CAKE_MAX_TINS]; /* ~= delay to bulk flows */ ++ __u32 peak_delay_us [TC_CAKE_MAX_TINS]; /* ~= bulk flow delay */ + __u32 avge_delay_us [TC_CAKE_MAX_TINS]; -+ __u32 base_delay_us [TC_CAKE_MAX_TINS]; /* ~= delay to sparse flows */ ++ __u32 base_delay_us [TC_CAKE_MAX_TINS]; /* ~= sparse flows delay */ + __u16 sparse_flows [TC_CAKE_MAX_TINS]; + __u16 bulk_flows [TC_CAKE_MAX_TINS]; -+ __u16 unresponse_flows [TC_CAKE_MAX_TINS]; /* v4 - was u32 last_len */ -+ __u16 spare [TC_CAKE_MAX_TINS]; /* v4 - split last_len */ ++ __u16 unresponse_flows [TC_CAKE_MAX_TINS]; /* v4 - was u32 last_len */ ++ __u16 spare [TC_CAKE_MAX_TINS]; /* v4 - split last_len */ + __u32 max_skblen [TC_CAKE_MAX_TINS]; + __u32 capacity_estimate; /* version 2 */ + __u32 memory_limit; /* version 3 */ -+ __u32 memory_used; /* version 3 */ ++ __u32 memory_used; /* version 3 */ ++ struct tc_cake_traffic_stats ack_drops [TC_CAKE_MAX_TINS]; /* v5 */ +}; + #endif --- a/tc/Makefile +++ b/tc/Makefile -@@ -67,6 +67,7 @@ TCMODULES += q_codel.o +@@ -65,6 +65,7 @@ TCMODULES += q_codel.o TCMODULES += q_fq_codel.o TCMODULES += q_fq.o TCMODULES += q_pie.o @@ -73,7 +76,7 @@ TCMODULES += e_bpf.o --- /dev/null +++ b/tc/q_cake.c -@@ -0,0 +1,692 @@ +@@ -0,0 +1,771 @@ +/* + * Common Applications Kept Enhanced -- CAKE + * @@ -137,9 +140,10 @@ +" dual-srchost | dual-dsthost | triple-isolate* ]\n" +" [ nat | nonat* ]\n" +" [ wash | nowash * ]\n" ++" [ ack-filter | ack-filter-aggressive | no-ack-filter * ]\n" +" [ memlimit LIMIT ]\n" +" [ ptm | atm | noatm* ] [ overhead N | conservative | raw* ]\n" -+" [ mpu N ]\n" ++" [ mpu N ] [ ingress | egress* ]\n" +" (* marks defaults)\n"); +} + @@ -155,12 +159,14 @@ + int overhead = 0; + bool overhead_set = false; + bool overhead_override = false; -+ int wash = -1; + int mpu = 0; + int flowmode = -1; + int nat = -1; + int atm = -1; + int autorate = -1; ++ int wash = -1; ++ int ingress = -1; ++ int ack_filter = -1; + struct rtattr *tail; + + while (argc > 0) { @@ -314,12 +320,22 @@ + /* Typical VDSL2 framing schemes, both over PTM */ + /* PTM has 64b/65b coding which absorbs some bandwidth */ + } else if (strcmp(*argv, "pppoe-ptm") == 0) { ++ /* 2B PPP + 6B PPPoE + 6B dest MAC + 6B src MAC ++ * + 2B ethertype + 4B Frame Check Sequence ++ * + 1B Start of Frame (S) + 1B End of Frame (Ck) ++ * + 2B TC-CRC (PTM-FCS) = 30B ++ */ + atm = 2; -+ overhead += 27; ++ overhead += 30; + overhead_set = true; + } else if (strcmp(*argv, "bridged-ptm") == 0) { ++ /* 6B dest MAC + 6B src MAC + 2B ethertype ++ * + 4B Frame Check Sequence ++ * + 1B Start of Frame (S) + 1B End of Frame (Ck) ++ * + 2B TC-CRC (PTM-FCS) = 22B ++ */ + atm = 2; -+ overhead += 19; ++ overhead += 22; + overhead_set = true; + + } else if (strcmp(*argv, "via-ethernet") == 0) { @@ -332,8 +348,26 @@ + * that automatically, and is thus ignored. + * + * It would be deleted entirely, but it appears in the -+ * stats output when the automatic compensation is active. ++ * stats output when the automatic compensation is ++ * active. ++ */ ++ ++ } else if (strcmp(*argv, "total_overhead") == 0) { ++ /* ++ * This is the overhead cake accounts for; added here so ++ * that cake's "tc -s qdisc" output can be directly ++ * pasted into the tc command to instantate a new cake.. ++ */ ++ NEXT_ARG(); ++ ++ } else if (strcmp(*argv, "hard_header_len") == 0) { ++ /* ++ * This is the overhead the kernel automatically ++ * accounted for; added here so that cake's "tc -s ++ * qdisc" output can be directly pasted into the tc ++ * command to instantiate a new cake.. + */ ++ NEXT_ARG(); + + } else if (strcmp(*argv, "ethernet") == 0) { + /* ethernet pre-amble & interframe gap & FCS @@ -350,7 +384,7 @@ + + /* + * DOCSIS cable shapers account for Ethernet frame with FCS, -+ * but not interframe gap nor preamble. ++ * but not interframe gap or preamble. + */ + } else if (strcmp(*argv, "docsis") == 0) { + atm = 0; @@ -377,6 +411,18 @@ + return -1; + } + ++ } else if (strcmp(*argv, "ingress") == 0) { ++ ingress = 1; ++ } else if (strcmp(*argv, "egress") == 0) { ++ ingress = 0; ++ ++ } else if (strcmp(*argv, "no-ack-filter") == 0) { ++ ack_filter = 0; ++ } else if (strcmp(*argv, "ack-filter") == 0) { ++ ack_filter = 0x0200; ++ } else if (strcmp(*argv, "ack-filter-aggressive") == 0) { ++ ack_filter = 0x0600; ++ + } else if (strcmp(*argv, "memlimit") == 0) { + NEXT_ARG(); + if(get_size(&memlimit, *argv)) { @@ -425,6 +471,10 @@ + addattr_l(n, 1024, TCA_CAKE_NAT, &nat, sizeof(nat)); + if (wash != -1) + addattr_l(n, 1024, TCA_CAKE_WASH, &wash, sizeof(wash)); ++ if (ingress != -1) ++ addattr_l(n, 1024, TCA_CAKE_INGRESS, &ingress, sizeof(ingress)); ++ if (ack_filter != -1) ++ addattr_l(n, 1024, TCA_CAKE_ACK_FILTER, &ack_filter, sizeof(ack_filter)); + + tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail; + return 0; @@ -446,6 +496,8 @@ + int nat = 0; + int autorate = 0; + int wash = 0; ++ int ingress = 0; ++ int ack_filter = 0; + SPRINT_BUF(b1); + SPRINT_BUF(b2); + @@ -551,6 +603,14 @@ + RTA_PAYLOAD(tb[TCA_CAKE_MPU]) >= sizeof(__u32)) { + mpu = rta_getattr_u32(tb[TCA_CAKE_MPU]); + } ++ if (tb[TCA_CAKE_INGRESS] && ++ RTA_PAYLOAD(tb[TCA_CAKE_INGRESS]) >= sizeof(__u32)) { ++ ingress = rta_getattr_u32(tb[TCA_CAKE_INGRESS]); ++ } ++ if (tb[TCA_CAKE_ACK_FILTER] && ++ RTA_PAYLOAD(tb[TCA_CAKE_ACK_FILTER]) >= sizeof(__u32)) { ++ ack_filter = rta_getattr_u32(tb[TCA_CAKE_ACK_FILTER]); ++ } + if (tb[TCA_CAKE_ETHERNET] && + RTA_PAYLOAD(tb[TCA_CAKE_ETHERNET]) >= sizeof(__u32)) { + ethernet = rta_getattr_u32(tb[TCA_CAKE_ETHERNET]); @@ -563,6 +623,14 @@ + if (wash) + fprintf(f,"wash "); + ++ if (ingress) ++ fprintf(f,"ingress "); ++ ++ if (ack_filter == 0x0600) ++ fprintf(f,"ack-filter-aggressive "); ++ else if (ack_filter) ++ fprintf(f,"ack-filter "); ++ + if (interval) + fprintf(f, "rtt %s ", sprint_time(interval, b2)); + @@ -578,12 +646,19 @@ + + fprintf(f, "overhead %d ", overhead); + -+ // This is actually the *amount* of automatic compensation, but we only report -+ // its presence as a boolean for now. ++ /* This is actually the *amount* of automatic compensation, but ++ * we only report its presence as a boolean for now. ++ */ + if (ethernet) + fprintf(f, "via-ethernet "); + } + ++ /* unconditionally report the overhead and hard_header_len overhead the ++ * kernel added automatically ++ */ ++ fprintf(f, "total_overhead %d ", overhead); ++ fprintf(f, "hard_header_len %d ", ethernet); ++ + if (mpu) { + fprintf(f, "mpu %d ", mpu); + } @@ -595,7 +670,7 @@ +} + +static int cake_print_xstats(struct qdisc_util *qu, FILE *f, -+ struct rtattr *xstats) ++ struct rtattr *xstats) +{ + /* fq_codel stats format borrowed */ + struct tc_fq_codel_xstats *st; @@ -650,109 +725,116 @@ + + switch(stnc->tin_cnt) { + case 3: -+ fprintf(f, " Bulk Best Effort Voice\n"); ++ fprintf(f, " Bulk Best Effort Voice\n"); + break; + + case 4: -+ fprintf(f, " Bulk Best Effort Video Voice\n"); ++ fprintf(f, " Bulk Best Effort Video Voice\n"); + break; + + case 5: -+ fprintf(f, " Low Loss Best Effort Low Delay Bulk Net Control\n"); ++ fprintf(f, " Low Loss Best Effort Low Delay Bulk Net Control\n"); + break; + + default: + fprintf(f, " "); + for(i=0; i < stnc->tin_cnt; i++) -+ fprintf(f, " Tin %u", i); ++ fprintf(f, " Tin %u", i); + fprintf(f, "\n"); + }; + + fprintf(f, " thresh "); + for(i=0; i < stnc->tin_cnt; i++) -+ fprintf(f, "%12s", sprint_rate(stnc->threshold_rate[i], b1)); ++ fprintf(f, " %12s", sprint_rate(stnc->threshold_rate[i], b1)); + fprintf(f, "\n"); + + fprintf(f, " target "); + for(i=0; i < stnc->tin_cnt; i++) -+ fprintf(f, "%12s", sprint_time(stnc->target_us[i], b1)); ++ fprintf(f, " %12s", sprint_time(stnc->target_us[i], b1)); + fprintf(f, "\n"); + + fprintf(f, " interval"); + for(i=0; i < stnc->tin_cnt; i++) -+ fprintf(f, "%12s", sprint_time(stnc->interval_us[i], b1)); ++ fprintf(f, " %12s", sprint_time(stnc->interval_us[i], b1)); + fprintf(f, "\n"); + + fprintf(f, " pk_delay"); + for(i=0; i < stnc->tin_cnt; i++) -+ fprintf(f, "%12s", sprint_time(stnc->peak_delay_us[i], b1)); ++ fprintf(f, " %12s", sprint_time(stnc->peak_delay_us[i], b1)); + fprintf(f, "\n"); + + fprintf(f, " av_delay"); + for(i=0; i < stnc->tin_cnt; i++) -+ fprintf(f, "%12s", sprint_time(stnc->avge_delay_us[i], b1)); ++ fprintf(f, " %12s", sprint_time(stnc->avge_delay_us[i], b1)); + fprintf(f, "\n"); + + fprintf(f, " sp_delay"); + for(i=0; i < stnc->tin_cnt; i++) -+ fprintf(f, "%12s", sprint_time(stnc->base_delay_us[i], b1)); ++ fprintf(f, " %12s", sprint_time(stnc->base_delay_us[i], b1)); + fprintf(f, "\n"); + + fprintf(f, " pkts "); + for(i=0; i < stnc->tin_cnt; i++) -+ fprintf(f, "%12u", stnc->sent[i].packets); ++ fprintf(f, " %12u", stnc->sent[i].packets); + fprintf(f, "\n"); + + fprintf(f, " bytes "); + for(i=0; i < stnc->tin_cnt; i++) -+ fprintf(f, "%12llu", stnc->sent[i].bytes); ++ fprintf(f, " %12llu", stnc->sent[i].bytes); + fprintf(f, "\n"); + + fprintf(f, " way_inds"); + for(i=0; i < stnc->tin_cnt; i++) -+ fprintf(f, "%12u", stnc->way_indirect_hits[i]); ++ fprintf(f, " %12u", stnc->way_indirect_hits[i]); + fprintf(f, "\n"); + + fprintf(f, " way_miss"); + for(i=0; i < stnc->tin_cnt; i++) -+ fprintf(f, "%12u", stnc->way_misses[i]); ++ fprintf(f, " %12u", stnc->way_misses[i]); + fprintf(f, "\n"); + + fprintf(f, " way_cols"); + for(i=0; i < stnc->tin_cnt; i++) -+ fprintf(f, "%12u", stnc->way_collisions[i]); ++ fprintf(f, " %12u", stnc->way_collisions[i]); + fprintf(f, "\n"); + + fprintf(f, " drops "); + for(i=0; i < stnc->tin_cnt; i++) -+ fprintf(f, "%12u", stnc->dropped[i].packets); ++ fprintf(f, " %12u", stnc->dropped[i].packets); + fprintf(f, "\n"); + + fprintf(f, " marks "); + for(i=0; i < stnc->tin_cnt; i++) -+ fprintf(f, "%12u", stnc->ecn_marked[i].packets); ++ fprintf(f, " %12u", stnc->ecn_marked[i].packets); + fprintf(f, "\n"); + ++ if(stnc->version >= 5) { ++ fprintf(f, " ack_drop"); ++ for(i=0; i < stnc->tin_cnt; i++) ++ fprintf(f, " %12u", stnc->ack_drops[i].packets); ++ fprintf(f, "\n"); ++ } ++ + fprintf(f, " sp_flows"); + for(i=0; i < stnc->tin_cnt; i++) -+ fprintf(f, "%12u", stnc->sparse_flows[i]); ++ fprintf(f, " %12u", stnc->sparse_flows[i]); + fprintf(f, "\n"); + + fprintf(f, " bk_flows"); + for(i=0; i < stnc->tin_cnt; i++) -+ fprintf(f, "%12u", stnc->bulk_flows[i]); ++ fprintf(f, " %12u", stnc->bulk_flows[i]); + fprintf(f, "\n"); + + if(stnc->version >= 4) { + fprintf(f, " un_flows"); + for(i=0; i < stnc->tin_cnt; i++) -+ fprintf(f, "%12u", stnc->unresponse_flows[i]); ++ fprintf(f, " %12u", stnc->unresponse_flows[i]); + fprintf(f, "\n"); + } + + fprintf(f, " max_len "); + for(i=0; i < stnc->tin_cnt; i++) -+ fprintf(f, "%12u", stnc->max_skblen[i]); ++ fprintf(f, " %12u", stnc->max_skblen[i]); + fprintf(f, "\n"); + } else { + return -1; diff --git a/package/network/utils/ipset/Makefile b/package/network/utils/ipset/Makefile index 66a987405557b2..55b7c493de2d4e 100644 --- a/package/network/utils/ipset/Makefile +++ b/package/network/utils/ipset/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ipset -PKG_VERSION:=6.32 -PKG_RELEASE:=2 +PKG_VERSION:=6.34 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://ipset.netfilter.org -PKG_HASH:=d9cbb49a4ae9e32d7808a604f1a37f359f9fc9064c210c4c5f35d629d49fb9fe +PKG_HASH:=d70e831b670b7aa25dde81fd994d3a7ce0c0e801559a557105576df66cd8d680 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/ipset/patches/001-Replace-the-last-reference-to-u_int8_t-with-uint8_t.patch b/package/network/utils/ipset/patches/001-Replace-the-last-reference-to-u_int8_t-with-uint8_t.patch new file mode 100644 index 00000000000000..745e9fa3b36990 --- /dev/null +++ b/package/network/utils/ipset/patches/001-Replace-the-last-reference-to-u_int8_t-with-uint8_t.patch @@ -0,0 +1,25 @@ +From a4212bf911026740afc7fce98d9100e2ef5dcea0 Mon Sep 17 00:00:00 2001 +From: Jozsef Kadlecsik +Date: Tue, 26 Sep 2017 07:00:13 +0200 +Subject: [PATCH] Replace the last reference to u_int8_t with uint8_t. + +--- + src/ipset.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ipset.c b/src/ipset.c +index 79f56b8..df0778a 100644 +--- a/src/ipset.c ++++ b/src/ipset.c +@@ -282,7 +282,7 @@ call_parser(int *argc, char *argv[], const struct ipset_type *type, + const struct ipset_arg *arg; + const char *optstr; + const struct ipset_type *t = type; +- u_int8_t revision = type->revision; ++ uint8_t revision = type->revision; + int ret = 0, i = 1; + + /* Currently CREATE and ADT may have got additional arguments */ +-- +2.13.5 + diff --git a/package/network/utils/iptables/Makefile b/package/network/utils/iptables/Makefile index 89f4354d07811a..e09c35c696a147 100644 --- a/package/network/utils/iptables/Makefile +++ b/package/network/utils/iptables/Makefile @@ -22,6 +22,7 @@ PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=GPL-2.0 +PKG_CPE_ID:=cpe:/a:netfilter_core_team:iptables include $(INCLUDE_DIR)/package.mk ifeq ($(DUMP),) @@ -216,6 +217,20 @@ define Package/iptables-mod-nflog/description endef +define Package/iptables-mod-trace +$(call Package/iptables/Module, +kmod-ipt-debug +kmod-ipt-raw) + TITLE:=Netfilter TRACE target +endef + +define Package/iptables-mod-trace/description + iptables extension for TRACE target + + Includes: + - libxt_TRACE + +endef + + define Package/iptables-mod-nfqueue $(call Package/iptables/Module, +kmod-nfnetlink-queue +kmod-ipt-nfqueue) TITLE:=Netfilter NFQUEUE target @@ -381,6 +396,15 @@ U32 iptables extensions. endef +define Package/iptables-mod-checksum +$(call Package/iptables/Module, +kmod-ipt-checksum) + TITLE:=IP CHECKSUM target extension +endef + +define Package/iptables-mod-checksum/description +iptables extension for the CHECKSUM calculation target +endef + define Package/ip6tables $(call Package/iptables/Default) DEPENDS:=@IPV6 +kmod-ip6tables +iptables @@ -584,7 +608,9 @@ $(eval $(call BuildPlugin,iptables-mod-tproxy,$(IPT_TPROXY-m))) $(eval $(call BuildPlugin,iptables-mod-tee,$(IPT_TEE-m))) $(eval $(call BuildPlugin,iptables-mod-u32,$(IPT_U32-m))) $(eval $(call BuildPlugin,iptables-mod-nflog,$(IPT_NFLOG-m))) +$(eval $(call BuildPlugin,iptables-mod-trace,$(IPT_DEBUG-m))) $(eval $(call BuildPlugin,iptables-mod-nfqueue,$(IPT_NFQUEUE-m))) +$(eval $(call BuildPlugin,iptables-mod-checksum,$(IPT_CHECKSUM-m))) $(eval $(call BuildPackage,ip6tables)) $(eval $(call BuildPlugin,ip6tables-extra,$(IPT_IPV6_EXTRA-m))) $(eval $(call BuildPlugin,ip6tables-mod-nat,$(IPT_NAT6-m))) diff --git a/package/network/utils/iptables/patches/600-shared-libext.patch b/package/network/utils/iptables/patches/600-shared-libext.patch index 6704af50107bfe..a906d40609b959 100644 --- a/package/network/utils/iptables/patches/600-shared-libext.patch +++ b/package/network/utils/iptables/patches/600-shared-libext.patch @@ -82,3 +82,23 @@ endif xtables_multi_SOURCES += xshared.c xtables_multi_LDADD += ../libxtables/libxtables.la -lm +@@ -32,7 +35,8 @@ if ENABLE_NFTABLES + BUILT_SOURCES += xtables-config-parser.h + xtables_compat_multi_SOURCES = xtables-compat-multi.c iptables-xml.c + xtables_compat_multi_CFLAGS = ${AM_CFLAGS} +-xtables_compat_multi_LDADD = ../extensions/libext.a ../extensions/libext_ebt.a ++xtables_compat_multi_LDADD = ++xtables_compat_multi_LDFLAGS = -L../extensions/ -liptext -liptext_ebt + if ENABLE_STATIC + xtables_compat_multi_CFLAGS += -DALL_INCLUSIVE + endif +@@ -45,7 +49,8 @@ xtables_compat_multi_SOURCES += xtables- + getethertype.c nft-bridge.c \ + xtables-eb-standalone.c xtables-eb.c \ + xtables-translate.c +-xtables_compat_multi_LDADD += ${libmnl_LIBS} ${libnftnl_LIBS} ${libnetfilter_conntrack_LIBS} ../extensions/libext4.a ../extensions/libext6.a ../extensions/libext_ebt.a ../extensions/libext_arpt.a ++xtables_compat_multi_LDADD += ${libmnl_LIBS} ${libnftnl_LIBS} ${libnetfilter_conntrack_LIBS} ++xtables_compat_multi_LDFLAGS += -liptext4 -liptext6 -liptext_arpt + # yacc and lex generate dirty code + xtables_compat_multi-xtables-config-parser.o xtables_compat_multi-xtables-config-syntax.o: AM_CFLAGS += -Wno-missing-prototypes -Wno-missing-declarations -Wno-implicit-function-declaration -Wno-nested-externs -Wno-undef -Wno-redundant-decls + xtables_compat_multi_SOURCES += xshared.c diff --git a/package/network/utils/iputils/Makefile b/package/network/utils/iputils/Makefile index b6799e68b5498c..344af07afd4c23 100644 --- a/package/network/utils/iputils/Makefile +++ b/package/network/utils/iputils/Makefile @@ -17,6 +17,7 @@ PKG_HASH:=fd3af46c80ebb99607c2ca1f2a3608b6fe828e25bbec6e54f2afd25f6ddb6ee7 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0+ +PKG_CPE_ID:=cpe:/a:skbuff:iputils PKG_BUILD_DEPENDS:=sysfsutils PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-s$(PKG_VERSION) diff --git a/package/network/utils/iw/Makefile b/package/network/utils/iw/Makefile index a578ddc98c03bc..9b3c12becabfed 100644 --- a/package/network/utils/iw/Makefile +++ b/package/network/utils/iw/Makefile @@ -30,8 +30,7 @@ endef define Build/Configure echo "const char iw_version[] = \"$(PKG_VERSION)\";" > $(PKG_BUILD_DIR)/version.c - rm -f $(PKG_BUILD_DIR)/version.sh - touch $(PKG_BUILD_DIR)/version.sh + echo "#!/bin/sh" > $(PKG_BUILD_DIR)/version.sh chmod +x $(PKG_BUILD_DIR)/version.sh endef diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile index a42aa13ee01b32..1b8a3ad2bc237d 100644 --- a/package/network/utils/iwinfo/Makefile +++ b/package/network/utils/iwinfo/Makefile @@ -13,6 +13,7 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/iwinfo.git PKG_SOURCE_DATE:=2017-08-23 PKG_SOURCE_VERSION:=c1a03e8231a5d8b348b70a182d256725c98a3b0b +PKG_MIRROR_HASH:=7bd294f50f8ec8c0497c5fbe5527f3ae098814cdfeecf4ccf78a2a8937611664 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/layerscape/restool/Makefile b/package/network/utils/layerscape/restool/Makefile new file mode 100644 index 00000000000000..988bc8075c6e4f --- /dev/null +++ b/package/network/utils/layerscape/restool/Makefile @@ -0,0 +1,38 @@ +# +# Copyright 2017 NXP +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=restool +PKG_SOURCE_DATE:=2017-10-23 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/qoriq-open-source/restool.git +PKG_SOURCE_VERSION:=8f08b9d499e84f9057784c2036f0ddf75ae3fc70 +PKG_MIRROR_HASH:=29f70ad27c7ab20bc018f0d0b11c680fcf8b829d10e5af5c30af4a3f9228a2fc + +include $(INCLUDE_DIR)/package.mk + +define Package/restool + SECTION:=net + CATEGORY:=Network + DEPENDS:=@TARGET_layerscape + TITLE:=Layerscape DPAA2 dynamical management tool +endef + +MAKE_FLAGS += \ + DESTDIR="$(PKG_BUILD_DIR)"/output/ \ + install + +define Package/restool/install + $(INSTALL_DIR) $(1)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/output/usr/local/bin/* $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,restool)) diff --git a/package/network/utils/layerscape/restool/patches/0001-scripts-move-shebang-on-the-first-line.patch b/package/network/utils/layerscape/restool/patches/0001-scripts-move-shebang-on-the-first-line.patch new file mode 100644 index 00000000000000..691e3bba512f74 --- /dev/null +++ b/package/network/utils/layerscape/restool/patches/0001-scripts-move-shebang-on-the-first-line.patch @@ -0,0 +1,35 @@ +From 978f00c0a9f17de9cf17b205a741222084261d3a Mon Sep 17 00:00:00 2001 +From: Ioana Ciornei +Date: Tue, 24 Oct 2017 16:29:17 +0000 +Subject: [PATCH 01/12] scripts: move shebang on the first line + +If the shebang is not placed on the first line of the shell script +it will be accounted only as a comment. + +Signed-off-by: Ioana Ciornei +--- + scripts/ls-main | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/scripts/ls-main b/scripts/ls-main +index 588c736..09bef5a 100755 +--- a/scripts/ls-main ++++ b/scripts/ls-main +@@ -1,3 +1,5 @@ ++#!/bin/bash ++ + # Copyright 2013-2016 Freescale Semiconductor Inc. + # Copyright 2017 NXP + +@@ -30,8 +32,6 @@ + # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + # POSSIBILITY OF SUCH DAMAGE. + +-#!/bin/bash +- + ## Restool wrapper script + # + # Prerequisites: +-- +2.14.1 + diff --git a/package/network/utils/layerscape/restool/patches/0002-dprc-add-full-path-option-to-dprc-list-command.patch b/package/network/utils/layerscape/restool/patches/0002-dprc-add-full-path-option-to-dprc-list-command.patch new file mode 100644 index 00000000000000..0e39ef72451088 --- /dev/null +++ b/package/network/utils/layerscape/restool/patches/0002-dprc-add-full-path-option-to-dprc-list-command.patch @@ -0,0 +1,151 @@ +From 6039bd1b7e5e71a0a171406cf980d2d61a6e79d4 Mon Sep 17 00:00:00 2001 +From: Ioana Ciornei +Date: Tue, 24 Oct 2017 16:29:37 +0000 +Subject: [PATCH 02/12] dprc: add --full-path option to dprc list command + +Instead of printing an indented dprc list, activating +the --full-path option restool will print the entire path +of the dprc. +Example: + +root@rodos:~# restool dprc list --full-path +dprc.1 +dprc.1/dprc.3 +dprc.1/dprc.2 +dprc.1/dprc.2/dprc.4 + +Signed-off-by: Ioana Ciornei +--- + dprc_commands.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++----------- + 1 file changed, 50 insertions(+), 11 deletions(-) + +diff --git a/dprc_commands.c b/dprc_commands.c +index e1a8f16..8de2f0e 100644 +--- a/dprc_commands.c ++++ b/dprc_commands.c +@@ -76,13 +76,16 @@ C_ASSERT(ARRAY_SIZE(dprc_sync_options) <= MAX_NUM_CMD_LINE_OPTIONS + 1); + */ + enum dprc_list_options { + LIST_OPT_HELP = 0, ++ LIST_OPT_FULL_PATH, + }; + + static struct option dprc_list_options[] = { + [LIST_OPT_HELP] = { + .name = "help", + }, +- ++ [LIST_OPT_FULL_PATH] = { ++ .name = "full-path", ++ }, + { 0 }, + }; + +@@ -421,17 +424,33 @@ static int cmd_dprc_sync(void) + * Lists nested DPRCs inside a given DPRC, recursively + */ + static int list_dprc(uint32_t dprc_id, uint16_t dprc_handle, +- int nesting_level, bool show_non_dprc_objects) ++ int nesting_level, bool show_non_dprc_objects, ++ char *full_path) + { ++ char *updated_full_path = NULL; + int num_child_devices; + int error = 0; ++ int full_path_len; + + assert(nesting_level <= MAX_DPRC_NESTING); + +- for (int i = 0; i < nesting_level; i++) +- printf(" "); +- +- printf("dprc.%u\n", dprc_id); ++ if (full_path) { ++ full_path_len = strlen(full_path); ++ updated_full_path = malloc(full_path_len + 10); ++ if (!updated_full_path) { ++ ERROR_PRINTF("Could not alloc memory for full-path!\n"); ++ return -ENOMEM; ++ } ++ if (full_path_len != 0) ++ sprintf(updated_full_path, "%s/dprc.%d", full_path, dprc_id); ++ else ++ sprintf(updated_full_path, "dprc.%d", dprc_id); ++ printf("%s\n", updated_full_path); ++ } else { ++ for (int i = 0; i < nesting_level; i++) ++ printf(" "); ++ printf("dprc.%u\n", dprc_id); ++ } + + error = dprc_get_obj_count(&restool.mc_io, 0, + dprc_handle, +@@ -475,8 +494,11 @@ static int list_dprc(uint32_t dprc_id, uint16_t dprc_handle, + if (error < 0) + goto out; + +- error = list_dprc(obj_desc.id, child_dprc_handle, +- nesting_level + 1, show_non_dprc_objects); ++ error = list_dprc(obj_desc.id, ++ child_dprc_handle, ++ nesting_level + 1, ++ show_non_dprc_objects, ++ updated_full_path); + + error2 = dprc_close(&restool.mc_io, 0, child_dprc_handle); + if (error2 < 0) { +@@ -491,6 +513,9 @@ static int list_dprc(uint32_t dprc_id, uint16_t dprc_handle, + } + + out: ++ if (full_path) ++ free(updated_full_path); ++ + return error; + } + +@@ -498,8 +523,14 @@ static int cmd_dprc_list(void) + { + static const char usage_msg[] = + "\n" +- "Usage: restool dprc list\n" ++ "Usage: restool dprc list [OPTIONS]\n" ++ "\n" ++ "OPTIONS:\n" ++ "--full-path\n" ++ " prints the dprc list in a full-path\n" ++ " format like: dprc.1/dprc.2\n" + "\n"; ++ bool full_path = false; + + if (restool.cmd_option_mask & ONE_BIT_MASK(LIST_OPT_HELP)) { + puts(usage_msg); +@@ -507,6 +538,12 @@ static int cmd_dprc_list(void) + return 0; + } + ++ ++ if (restool.cmd_option_mask & ONE_BIT_MASK(LIST_OPT_FULL_PATH)) { ++ restool.cmd_option_mask &= ~ONE_BIT_MASK(LIST_OPT_FULL_PATH); ++ full_path = true; ++ } ++ + if (restool.obj_name != NULL) { + ERROR_PRINTF( + "Unexpected argument: \'%s\'\n\n", restool.obj_name); +@@ -514,8 +551,10 @@ static int cmd_dprc_list(void) + return -EINVAL; + } + +- return list_dprc( +- restool.root_dprc_id, restool.root_dprc_handle, 0, false); ++ return list_dprc(restool.root_dprc_id, ++ restool.root_dprc_handle, ++ 0, false, ++ full_path ? "" : NULL); + } + + static int show_one_resource_type(uint16_t dprc_handle, +-- +2.14.1 + diff --git a/package/network/utils/layerscape/restool/patches/0003-scripts-remove-unnecessary-arrays.patch b/package/network/utils/layerscape/restool/patches/0003-scripts-remove-unnecessary-arrays.patch new file mode 100644 index 00000000000000..c846fbab5b687f --- /dev/null +++ b/package/network/utils/layerscape/restool/patches/0003-scripts-remove-unnecessary-arrays.patch @@ -0,0 +1,62 @@ +From e316b4c7d421afa6ca5f6b6ae86d0a8219a9bd56 Mon Sep 17 00:00:00 2001 +From: Ioana Ciornei +Date: Tue, 24 Oct 2017 16:29:42 +0000 +Subject: [PATCH 03/12] scripts: remove unnecessary arrays + +Signed-off-by: Ioana Ciornei +--- + scripts/ls-main | 22 ++-------------------- + 1 file changed, 2 insertions(+), 20 deletions(-) + +diff --git a/scripts/ls-main b/scripts/ls-main +index 09bef5a..ea0df92 100755 +--- a/scripts/ls-main ++++ b/scripts/ls-main +@@ -87,8 +87,6 @@ root_c= + # Type of endpoint object + toe= + +-dpnis=() +-dpmacs=() + containers=() + # Full path containers + fpc=() +@@ -944,16 +942,8 @@ process_listni() { + fi + fi + +- dpnis+=("$dpni $details") ++ echo "${i}/${dpni} ${details}" + done +- +- if [ -n "$dpnis" ]; then +- for j in "${dpnis[@]}"; do +- echo "$i/$j" +- done +- +- dpnis=() +- fi + done + } + +@@ -984,16 +974,8 @@ process_listmac() { + fi + fi + +- dpmacs+=("$dpmac $details") ++ echo "${i}/${dpmac} ${details}" + done +- +- if [ -n "$dpmacs" ]; then +- for j in "${dpmacs[@]}"; do +- echo "$i/$j" +- done +- +- dpmacs=() +- fi + done + } + +-- +2.14.1 + diff --git a/package/network/utils/layerscape/restool/patches/0004-scripts-use-restool-full-path-option.patch b/package/network/utils/layerscape/restool/patches/0004-scripts-use-restool-full-path-option.patch new file mode 100644 index 00000000000000..e1cc38f4818241 --- /dev/null +++ b/package/network/utils/layerscape/restool/patches/0004-scripts-use-restool-full-path-option.patch @@ -0,0 +1,111 @@ +From 09f840049d155fa4b681ece749feeff9a269ecde Mon Sep 17 00:00:00 2001 +From: Ioana Ciornei +Date: Tue, 24 Oct 2017 16:29:45 +0000 +Subject: [PATCH 04/12] scripts: use restool --full-path option + +Instead of constructing the the full path container list by +hand use the restool option newly added. + +Signed-off-by: Ioana Ciornei +--- + scripts/ls-main | 54 +++++++----------------------------------------------- + 1 file changed, 7 insertions(+), 47 deletions(-) + +diff --git a/scripts/ls-main b/scripts/ls-main +index ea0df92..72f6c77 100755 +--- a/scripts/ls-main ++++ b/scripts/ls-main +@@ -73,7 +73,6 @@ + ## + + shopt -s extglob +-shopt -s lastpipe + + # Intercept the Ctrl+C command but do not interrupt execution + trap ' ' INT +@@ -87,11 +86,6 @@ root_c= + # Type of endpoint object + toe= + +-containers=() +-# Full path containers +-fpc=() +-idx=0 +- + SYS_DPRC="/sys/bus/fsl-mc/drivers/fsl_mc_dprc" + + set -e +@@ -220,42 +214,6 @@ get_container() { + echo $(echo "$i" | sed "s/\(dprc.[0-9]*\/\)*//g") + } + +-build_fpc_list() { +- $restool dprc list | +- while IFS= read -r line +- do +- containers+=("$line") +- done +- +- for i in "${containers[@]}" +- do +- cnt=$(count_spaces "$i") +- +- if [ "$cnt" -gt 0 ]; then +- # Get index of the upper level container +- idx2=$((idx-1)) +- crt_ct="$i" +- +- while [ "$idx2" -ge 0 ] +- do +- cntp=$(count_spaces "${containers[idx2]}") +- +- if [ "$cntp" -lt "$cnt" ]; then +- upc=$(echo "${containers[idx2]}" | sed "s/ *$//") +- crt_ct=$upc"/""$(echo $crt_ct | sed 's/ *$//')" +- fi +- idx2=$((idx2-1)) +- done +- +- fpc+=($crt_ct) +- else +- fpc+=("$i") +- fi +- +- idx=$((idx+1)) +- done +-} +- + get_label() { + # Retrieve the type of the object + too=$(echo "$1" | sed "s/\(\.[0-9]*\)\(\.[0-9]*\)*$//g") +@@ -897,9 +855,9 @@ process_addni() { + } + + process_listni() { +- build_fpc_list +- +- for i in "${fpc[@]}" ++ dprc_list="$($restool dprc list --full-path)" ++ echo "${dprc_list}" | ++ while read -r i + do + crt_c=$(get_container "$i") + $restool dprc show "$crt_c" | grep dpni | +@@ -948,10 +906,12 @@ process_listni() { + } + + process_listmac() { +- build_fpc_list ++ dprc_list="$($restool dprc list --full-path)" + +- for i in "${fpc[@]}" ++ echo "${dprc_list}" | ++ while read -r i + do ++ + crt_c=$(get_container "$i") + $restool dprc show "$crt_c" | grep dpmac | + while IFS= read -r line +-- +2.14.1 + diff --git a/package/network/utils/layerscape/restool/patches/0005-scripts-use-proper-arithmetic-operation-syntax.patch b/package/network/utils/layerscape/restool/patches/0005-scripts-use-proper-arithmetic-operation-syntax.patch new file mode 100644 index 00000000000000..b34c6a31ad7736 --- /dev/null +++ b/package/network/utils/layerscape/restool/patches/0005-scripts-use-proper-arithmetic-operation-syntax.patch @@ -0,0 +1,26 @@ +From 899d6c74286cbc672e1bad1abd7eff15b1b7298d Mon Sep 17 00:00:00 2001 +From: Ioana Ciornei +Date: Tue, 24 Oct 2017 16:29:49 +0000 +Subject: [PATCH 05/12] scripts: use proper arithmetic operation syntax + +Signed-off-by: Ioana Ciornei +--- + scripts/ls-main | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/ls-main b/scripts/ls-main +index 72f6c77..a39df2c 100755 +--- a/scripts/ls-main ++++ b/scripts/ls-main +@@ -966,7 +966,7 @@ fi + + # Check compatibility with MC version + mc_major=$($restool --mc-version | cut -f2 -d':' | cut -f1 -d'.' | tr -d ' ') +-if (( $mc_major != 10 )); then ++if [ $mc_major != 10 ]; then + echo "Restool wrapper scripts only support the latest major MC version\n" + echo "that currently is MC10.x. Use with caution." + fi +-- +2.14.1 + diff --git a/package/network/utils/layerscape/restool/patches/0006-scripts-use-strings-instead-of-arrays.patch b/package/network/utils/layerscape/restool/patches/0006-scripts-use-strings-instead-of-arrays.patch new file mode 100644 index 00000000000000..a1217668f55f99 --- /dev/null +++ b/package/network/utils/layerscape/restool/patches/0006-scripts-use-strings-instead-of-arrays.patch @@ -0,0 +1,79 @@ +From 2127850302de2bd8dccff0e31415ce0218750773 Mon Sep 17 00:00:00 2001 +From: Ioana Ciornei +Date: Tue, 24 Oct 2017 16:29:53 +0000 +Subject: [PATCH 06/12] scripts: use strings instead of arrays + +Signed-off-by: Ioana Ciornei +--- + scripts/ls-main | 21 ++++++++++++++------- + 1 file changed, 14 insertions(+), 7 deletions(-) + +diff --git a/scripts/ls-main b/scripts/ls-main +index a39df2c..b0c742e 100755 +--- a/scripts/ls-main ++++ b/scripts/ls-main +@@ -485,7 +485,9 @@ create_dpsw() { + + # Make a link in case there is an end point specified + index=0 +- for i in "${endpoint[@]}"; do ++ echo "${endpoint}" | ++ while read -r i ++ do + connect $root_c "$dpsw.$index" "$i" + index=$((index + 1)) + done +@@ -519,8 +521,8 @@ process_addsw() { + max_fdb_mc_groups=32 + # dpsw object label + label= +- #Endpoint objects provided as argument +- endpoint=() ++ # Endpoint objects provided as argument ++ endpoint= + ifcnt=0 + container=$root_c + +@@ -559,7 +561,7 @@ process_addsw() { + container="${i#*=}" + ;; + @(dpni|dpmac).+([0-9])) +- endpoint[$ifcnt]="$(echo ${i#*=} | tr -d ,)" ++ endpoint="${endpoint}"$'\n'"${i}" + ifcnt=$((ifcnt + 1)) + ;; + *) +@@ -571,14 +573,19 @@ process_addsw() { + done + + # Check if there are more endpoints provided than the number of the interfaces +- if [ $num_ifs -lt ${#endpoint[@]} ]; then ++ if [ $num_ifs -lt $ifcnt ]; then + echo "Error: there are more endpoints provided than the number of the interfaces" + usage_addsw + exit 1 + fi + ++ # Delete first empty line from the endpoint string ++ endpoint="$(echo "${endpoint}" | tail -n +2)" ++ + # Check if the endpoints are valid +- for i in "${endpoint[@]}"; do ++ echo "${endpoint}" | ++ while read -r i ++ do + type_of_endpoint "$i" + check_endpoint "$i" + has_endpoint "$i" +@@ -592,7 +599,7 @@ process_addsw() { + if (( $object_exists_status == 1 )); then + echo "Created ETHSW object $dpsw with ${num_ifs} ports" + +- if [ $num_ifs -gt ${#endpoint[@]} ]; then ++ if [ $num_ifs -gt $ifcnt ]; then + echo "Do not forget to connect devices to interface(s)." + fi + fi +-- +2.14.1 + diff --git a/package/network/utils/layerscape/restool/patches/0007-scripts-use-Bourne-shell-s-pattern-matching.patch b/package/network/utils/layerscape/restool/patches/0007-scripts-use-Bourne-shell-s-pattern-matching.patch new file mode 100644 index 00000000000000..ed9d76d454fc9c --- /dev/null +++ b/package/network/utils/layerscape/restool/patches/0007-scripts-use-Bourne-shell-s-pattern-matching.patch @@ -0,0 +1,126 @@ +From e1036011baf9204d5fe6dd74e5a65f95b9681ebd Mon Sep 17 00:00:00 2001 +From: Ioana Ciornei +Date: Tue, 24 Oct 2017 16:29:56 +0000 +Subject: [PATCH 07/12] scripts: use Bourne shell's pattern matching + +Signed-off-by: Ioana Ciornei +--- + scripts/ls-main | 71 ++++++++++++++++++++++++++++----------------------------- + 1 file changed, 35 insertions(+), 36 deletions(-) + +diff --git a/scripts/ls-main b/scripts/ls-main +index b0c742e..a8b9573 100755 +--- a/scripts/ls-main ++++ b/scripts/ls-main +@@ -72,8 +72,6 @@ + # + ## + +-shopt -s extglob +- + # Intercept the Ctrl+C command but do not interrupt execution + trap ' ' INT + +@@ -370,15 +368,16 @@ process_addmux() { + -c=* | --container=*) + container="${i#*=}" + ;; +- *(dprc.+([0-9])/)dpmac.+([0-9])) +- endpoint="${i#*=}" +- ;; +- *(dprc.+([0-9])/)dpni.+([0-9])) +- endpoint="${i#*=}" +- ;; + *) +- usage_addmux +- exit 1 ++ arg_dpmac="$(echo $i | grep -x -E "(dprc.[0-9]+/)*dpmac.[0-9]+" || true )" ++ arg_dpni="$(echo $i | grep -x -E "(dprc.+[0-9]+/)*dpni.[0-9]+" || true )" ++ if [ "$i" = "$arg_dpmac" ] || ++ [ "$i" = "$arg_dpni" ]; then ++ endpoint="$i" ++ else ++ usage_addmux ++ exit 1 ++ fi + ;; + esac + done +@@ -560,14 +559,17 @@ process_addsw() { + -c=* | --container=*) + container="${i#*=}" + ;; +- @(dpni|dpmac).+([0-9])) +- endpoint="${endpoint}"$'\n'"${i}" +- ifcnt=$((ifcnt + 1)) +- ;; + *) +- echo "Error: $i argument is invalid" +- usage_addsw +- exit 1 ++ arg_dpmac="$(echo $i | grep -x -E "dpmac.[0-9]+" || true )" ++ arg_dpni="$(echo $i | grep -x -E "dpni.[0-9]+" || true )" ++ if [ "$i" = "$arg_dpmac" ] || ++ [ "$i" = "$arg_dpni" ]; then ++ endpoint="$i" ++ else ++ echo "Error: $i argument is invalid" ++ usage_addsw ++ exit 1 ++ fi + ;; + esac + done +@@ -704,7 +706,8 @@ process_addni() { + ;; + --mac-addr=*) + mac_addr="${i#*=}" +- if [[ ! "$mac_addr" =~ ^([a-fA-F0-9]{2}:){5}[a-fA-F0-9]{2}$ ]]; then ++ mac_addr_valid="$(echo $mac_addr | grep -x -E "^([a-fA-F0-9]{2}:){5}[a-fA-F0-9]{2}$" || true )" ++ if [ "$mac_addr" != "$mac_addr_valid" ]; then + echo "Invalid MAC address: $mac_addr" + exit 1 + fi +@@ -776,25 +779,21 @@ process_addni() { + -o=* | --options=*) + options="${i#*=}" + ;; +- *(dprc.+([0-9])/)dpmac.+([0-9])) +- no_link=0 +- endpoint="${i#*=}" +- ;; +- *(dprc.+([0-9])/)dpni.+([0-9])) +- no_link=0 +- endpoint="${i#*=}" +- ;; +- *(dprc.+([0-9])/)dpdmux.+([0-9]).+([0-9])) +- no_link=0 +- endpoint="${i#*=}" +- ;; +- *(dprc.+([0-9])/)dpsw.+([0-9]).+([0-9])) +- no_link=0 +- endpoint="${i#*=}" +- ;; + *) +- usage_addni +- exit 1 ++ arg_dpmac="$(echo $i | grep -x -E "(dprc.[0-9]+/)*dpmac.[0-9]+" || true )" ++ arg_dpni="$(echo $i | grep -x -E "(dprc.+[0-9]+/)*dpni.[0-9]+" || true )" ++ arg_dpdmux="$(echo $i | grep -x -E "(dprc.[0-9]+/)*dpdmux.[0-9]+.[0-9]+" || true )" ++ arg_dpsw="$(echo $i | grep -x -E "(dprc.[0-9]+/)*dpsw.[0-9]+.[0-9]+" || true )" ++ if [ "$i" = "$arg_dpmac" ] || ++ [ "$i" = "$arg_dpni" ] || ++ [ "$i" = "$arg_dpdmux" ] || ++ [ "$i" = "$arg_dpsw" ]; then ++ no_link=0 ++ endpoint="$i" ++ else ++ usage_addni ++ exit 1 ++ fi + ;; + esac + done +-- +2.14.1 + diff --git a/package/network/utils/layerscape/restool/patches/0008-scripts-use-Bourne-shell-instead-of-bash.patch b/package/network/utils/layerscape/restool/patches/0008-scripts-use-Bourne-shell-instead-of-bash.patch new file mode 100644 index 00000000000000..4921f63c9eec03 --- /dev/null +++ b/package/network/utils/layerscape/restool/patches/0008-scripts-use-Bourne-shell-instead-of-bash.patch @@ -0,0 +1,32 @@ +From 4a1df345edc59a7407b955529955d6799d974b70 Mon Sep 17 00:00:00 2001 +From: Ioana Ciornei +Date: Tue, 24 Oct 2017 16:30:00 +0000 +Subject: [PATCH 08/12] scripts: use Bourne shell instead of bash + +Signed-off-by: Ioana Ciornei +--- + scripts/ls-main | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/scripts/ls-main b/scripts/ls-main +index a8b9573..bd79295 100755 +--- a/scripts/ls-main ++++ b/scripts/ls-main +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + # Copyright 2013-2016 Freescale Semiconductor Inc. + # Copyright 2017 NXP +@@ -37,7 +37,7 @@ + # Prerequisites: + # - Management Complex version 10.x + # - restool version 1.4 or newer +-# - bash shell ++# - Bourne Shell (sh) + # + # + # The purpose of this script is to offer a user friendly way to create +-- +2.14.1 + diff --git a/package/network/utils/layerscape/restool/patches/0009-scripts-workaround-for-a-improper-sed-substitution-T.patch b/package/network/utils/layerscape/restool/patches/0009-scripts-workaround-for-a-improper-sed-substitution-T.patch new file mode 100644 index 00000000000000..c642afcafa0dce --- /dev/null +++ b/package/network/utils/layerscape/restool/patches/0009-scripts-workaround-for-a-improper-sed-substitution-T.patch @@ -0,0 +1,36 @@ +From ac387de9688099bca1fbdb587d078b369aaf2dab Mon Sep 17 00:00:00 2001 +From: Ioana Ciornei +Date: Wed, 25 Oct 2017 11:23:42 +0000 +Subject: [PATCH 09/12] scripts: workaround for a improper sed substitution + (TODO) + +Signed-off-by: Ioana Ciornei +--- + scripts/ls-main | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/scripts/ls-main b/scripts/ls-main +index bd79295..7ce73f0 100755 +--- a/scripts/ls-main ++++ b/scripts/ls-main +@@ -197,7 +197,7 @@ has_endpoint() { + ep=$($restool "$toe" info "$1" | grep "endpoint:" | sed "s/endpoint: \([^ ]*\)\,.*/\1/") + fi + +- if [[ "$ep" != *"No object associated"* && "$ep" != *"none"* ]]; then ++ if [[ "$ep" != "endpoint: No object associated" && "$ep" != *"none"* ]]; then + echo "$1 is already linked to $ep" + exit 1 + fi +@@ -230,7 +230,7 @@ get_endpoint() { + end_point=$($restool "$too" info "$1" | grep "endpoint:" | sed "s/endpoint: \([^ ]*\)\,.*/\1/") + fi + +- if [[ "$end_point" != *"No object associated"* && "$end_point" != *"none"* ]]; then ++ if [[ "$end_point" != "endpoint: No object associated" && "$end_point" != *"none"* ]]; then + echo "$end_point" + fi + } +-- +2.14.1 + diff --git a/package/network/utils/layerscape/restool/patches/0010-scripts-use-proper-arithmetic-operations.patch b/package/network/utils/layerscape/restool/patches/0010-scripts-use-proper-arithmetic-operations.patch new file mode 100644 index 00000000000000..9945cd438a6ee1 --- /dev/null +++ b/package/network/utils/layerscape/restool/patches/0010-scripts-use-proper-arithmetic-operations.patch @@ -0,0 +1,44 @@ +From 66ae6e5313da8be5742a502c0d7027689e84a17d Mon Sep 17 00:00:00 2001 +From: Ioana Ciornei +Date: Wed, 25 Oct 2017 11:30:08 +0000 +Subject: [PATCH 10/12] scripts: use proper arithmetic operations + +Signed-off-by: Ioana Ciornei +--- + scripts/ls-main | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/scripts/ls-main b/scripts/ls-main +index 7ce73f0..0dcd2fa 100755 +--- a/scripts/ls-main ++++ b/scripts/ls-main +@@ -409,7 +409,7 @@ process_addmux() { + + # check the status + object_exists $container $dpdmux +- if (( $object_exists_status == 1 )); then ++ if [ $object_exists_status == 1 ]; then + + if [ "$root_c" == "$container" ]; then + evb=$(ls $SYS_DPRC/"$root_c"/"$dpdmux"/net/ | grep -v "p") +@@ -598,7 +598,7 @@ process_addsw() { + + # check the status + object_exists $container $dpsw +- if (( $object_exists_status == 1 )); then ++ if [ $object_exists_status == 1 ]; then + echo "Created ETHSW object $dpsw with ${num_ifs} ports" + + if [ $num_ifs -gt $ifcnt ]; then +@@ -850,7 +850,7 @@ process_addni() { + + # check the status + object_exists $container $dpni +- if (( $object_exists_status == 1 )); then ++ if [ $object_exists_status == 1 ]; then + if [ "$root_c" == "$container" ]; then + ni=$(ls $SYS_DPRC/"$root_c"/"$dpni"/net/) + fi +-- +2.14.1 + diff --git a/package/network/utils/layerscape/restool/patches/0011-scripts-do-not-compare-strings-with-regexp-expressio.patch b/package/network/utils/layerscape/restool/patches/0011-scripts-do-not-compare-strings-with-regexp-expressio.patch new file mode 100644 index 00000000000000..1b6cc46a38202c --- /dev/null +++ b/package/network/utils/layerscape/restool/patches/0011-scripts-do-not-compare-strings-with-regexp-expressio.patch @@ -0,0 +1,27 @@ +From 6af86a65f2dcfd42f572e04207eef45da3573b92 Mon Sep 17 00:00:00 2001 +From: Ioana Ciornei +Date: Wed, 25 Oct 2017 11:30:33 +0000 +Subject: [PATCH 11/12] scripts: do not compare strings with regexp expressions + +Signed-off-by: Ioana Ciornei +--- + scripts/ls-main | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/scripts/ls-main b/scripts/ls-main +index 0dcd2fa..526c052 100755 +--- a/scripts/ls-main ++++ b/scripts/ls-main +@@ -805,7 +805,8 @@ process_addni() { + fi + + # if no --num-queues is specified then set it to number of cores +- if [[ $dpni_args != *"--num-queues"* ]]; then ++ num_queues_present=$(echo "$dpni_args" | grep -o "\-\-num-queues" || true) ++ if [[ -z "$num_queues_present" ]]; then + dpni_args=$dpni_args" --num-queues="$(nproc) + fi + +-- +2.14.1 + diff --git a/package/network/utils/layerscape/restool/patches/0012-scripts-replace-nproc-with-cross-platform-implementa.patch b/package/network/utils/layerscape/restool/patches/0012-scripts-replace-nproc-with-cross-platform-implementa.patch new file mode 100644 index 00000000000000..3acb3b5d83a63f --- /dev/null +++ b/package/network/utils/layerscape/restool/patches/0012-scripts-replace-nproc-with-cross-platform-implementa.patch @@ -0,0 +1,27 @@ +From 0e5f9f0a7f0ef1947984cd82ade9dbc14ba2c80d Mon Sep 17 00:00:00 2001 +From: Ioana Ciornei +Date: Wed, 25 Oct 2017 12:48:04 +0000 +Subject: [PATCH 12/12] scripts: replace 'nproc' with cross-platform + implementation + +Signed-off-by: Ioana Ciornei +--- + scripts/ls-main | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/ls-main b/scripts/ls-main +index 526c052..7d127f6 100755 +--- a/scripts/ls-main ++++ b/scripts/ls-main +@@ -807,7 +807,7 @@ process_addni() { + # if no --num-queues is specified then set it to number of cores + num_queues_present=$(echo "$dpni_args" | grep -o "\-\-num-queues" || true) + if [[ -z "$num_queues_present" ]]; then +- dpni_args=$dpni_args" --num-queues="$(nproc) ++ dpni_args=$dpni_args" --num-queues="$(grep -c ^processor /proc/cpuinfo) + fi + + # Check if --no-link the endpoint have been provided otherwise display the usage +-- +2.14.1 + diff --git a/package/network/utils/linux-atm/Makefile b/package/network/utils/linux-atm/Makefile index 3d3662264797b0..532a028218a832 100644 --- a/package/network/utils/linux-atm/Makefile +++ b/package/network/utils/linux-atm/Makefile @@ -19,6 +19,7 @@ PKG_HASH:=9645481a2b16476b59220aa2d6bc5bc41043f291326c9b37581018fbd16dd53a PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=GPL-2.0+ +PKG_CPE_ID:=cpe:/a:linux-atm:linux-atm PKG_FIXUP:=autoreconf include $(INCLUDE_DIR)/package.mk diff --git a/package/network/utils/nftables/Makefile b/package/network/utils/nftables/Makefile index b45440367d6036..5aaa1cbf4a35ca 100644 --- a/package/network/utils/nftables/Makefile +++ b/package/network/utils/nftables/Makefile @@ -10,10 +10,10 @@ PKG_NAME:=nftables PKG_VERSION:=0.7 PKG_RELEASE:=1 -PKG_SOURCE_URL:=git://git.netfilter.org/nftables +PKG_SOURCE_URL:=https://git.netfilter.org/nftables PKG_SOURCE_PROTO:=git PKG_SOURCE_VERSION:=79cbd19e7437680561b26109bbf4f48cb2e8e0a7 -PKG_MIRROR_HASH:=6b06a114c5a1b397b0ae616d5d292859611b0eb05b647182b3c00421909338b8 +PKG_MIRROR_HASH:=2c0af691948519556952097673ad1b57f888c8314b8eb15e83066951de01fc82 PKG_MAINTAINER:=Steven Barth PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/tcpdump/Makefile b/package/network/utils/tcpdump/Makefile index 92e08d58ce15d1..50919819b63f55 100644 --- a/package/network/utils/tcpdump/Makefile +++ b/package/network/utils/tcpdump/Makefile @@ -21,6 +21,7 @@ PKG_BUILD_PARALLEL:=1 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=BSD-3-Clause +PKG_CPE_ID:=cpe:/a:tcpdump:tcpdump PKG_INSTALL:=1 @@ -76,7 +77,6 @@ endif MAKE_FLAGS += \ CCOPT="$(TARGET_CFLAGS)" INCLS="-I. $(TARGET_CPPFLAGS)" - define Package/tcpdump/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tcpdump $(1)/usr/sbin/ diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh index 35de6c5ad5eb60..9c953ea6975798 100755 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh @@ -65,11 +65,12 @@ proto_qmi_setup() { [ -n "$delay" ] && sleep "$delay" while uqmi -s -d "$device" --get-pin-status | grep '"UIM uninitialized"' > /dev/null; do + [ -e "$device" ] || return 1 sleep 1; done [ -n "$pincode" ] && { - uqmi -s -d "$device" --verify-pin1 "$pincode" || { + uqmi -s -d "$device" --verify-pin1 "$pincode" || uqmi -s -d "$device" --uim-verify-pin1 "$pincode" || { echo "Unable to verify PIN" proto_notify_error "$interface" PIN_FAILED proto_block_restart "$interface" @@ -102,6 +103,7 @@ proto_qmi_setup() { echo "Waiting for network registration" while uqmi -s -d "$device" --get-serving-system | grep '"searching"' > /dev/null; do + [ -e "$device" ] || return 1 sleep 5; done @@ -109,7 +111,7 @@ proto_qmi_setup() { echo "Starting network $interface" - pdptype=`echo "$pdptype" | awk '{print tolower($0)}'` + pdptype=$(echo "$pdptype" | awk '{print tolower($0)}') [ "$pdptype" = "ip" -o "$pdptype" = "ipv6" -o "$pdptype" = "ipv4v6" ] || pdptype="ip" if [ "$pdptype" = "ip" ]; then @@ -120,7 +122,7 @@ proto_qmi_setup() { fi [ "$pdptype" = "ip" -o "$pdptype" = "ipv4v6" ] && { - cid_4=`uqmi -s -d "$device" --get-client-id wds` + cid_4=$(uqmi -s -d "$device" --get-client-id wds) [ $? -ne 0 ] && { echo "Unable to obtain client ID" proto_notify_error "$interface" NO_CID @@ -134,14 +136,14 @@ proto_qmi_setup() { --stop-network 0xffffffff \ --autoconnect > /dev/null - pdh_4=`uqmi -s -d "$device" --set-client-id wds,"$cid_4" \ + pdh_4=$(uqmi -s -d "$device" --set-client-id wds,"$cid_4" \ --start-network \ ${apn:+--apn $apn} \ ${profile:+--profile $profile} \ ${auth:+--auth-type $auth} \ ${username:+--username $username} \ ${password:+--password $password} \ - ${autoconnect:+--autoconnect}` + ${autoconnect:+--autoconnect}) [ $? -ne 0 ] && { echo "Unable to connect IPv4" uqmi -s -d "$device" --set-client-id wds,"$cid_4" --release-client-id wds @@ -151,7 +153,7 @@ proto_qmi_setup() { } [ "$pdptype" = "ipv6" -o "$pdptype" = "ipv4v6" ] && { - cid_6=`uqmi -s -d "$device" --get-client-id wds` + cid_6=$(uqmi -s -d "$device" --get-client-id wds) [ $? -ne 0 ] && { echo "Unable to obtain client ID" proto_notify_error "$interface" NO_CID @@ -165,14 +167,14 @@ proto_qmi_setup() { --stop-network 0xffffffff \ --autoconnect > /dev/null - pdh_6=`uqmi -s -d "$device" --set-client-id wds,"$cid_6" \ + pdh_6=$(uqmi -s -d "$device" --set-client-id wds,"$cid_6" \ --start-network \ ${apn:+--apn $apn} \ ${profile:+--profile $profile} \ ${auth:+--auth-type $auth} \ ${username:+--username $username} \ ${password:+--password $password} \ - ${autoconnect:+--autoconnect}` + ${autoconnect:+--autoconnect}) [ $? -ne 0 ] && { echo "Unable to connect IPv6" uqmi -s -d "$device" --set-client-id wds,"$cid_6" --release-client-id wds diff --git a/package/network/utils/wpan-tools/Makefile b/package/network/utils/wpan-tools/Makefile index ff65375724eee9..e57223dee40894 100644 --- a/package/network/utils/wpan-tools/Makefile +++ b/package/network/utils/wpan-tools/Makefile @@ -31,6 +31,7 @@ endef define Package/wpan-tools/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/iwpan $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/wpan-ping/wpan-ping $(1)/usr/sbin/ endef $(eval $(call BuildPackage,wpan-tools)) diff --git a/package/network/utils/wpan-tools/patches/001-src-nl_extras.h-fix-compatibility-with-libnl-3.3.0.patch b/package/network/utils/wpan-tools/patches/001-src-nl_extras.h-fix-compatibility-with-libnl-3.3.0.patch new file mode 100644 index 00000000000000..1370854b6b5606 --- /dev/null +++ b/package/network/utils/wpan-tools/patches/001-src-nl_extras.h-fix-compatibility-with-libnl-3.3.0.patch @@ -0,0 +1,44 @@ +From bb522bd584f05e6658d5dba97f48ca018f46394c Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 6 May 2017 14:36:08 +0200 +Subject: [PATCH] src/nl_extras.h: fix compatibility with libnl 3.3.0 + +nl_extras.h defines a set of nla_set_s*() functions if not provided by +libnl. They are provided by libnl since version 3.2.26. The test +(LIBNL_VER_MIC <= 26) was working fine while libnl was in the 3.2.x +series, but now that they have incremented the minor version, the +micro version was reset to 0, with the latest libnl version being +3.3.0. + +Due to this, the condition (LIBNL_VER_MIC <= 26) is true, and we get +redefinition errors because nl_extras.h redefines functions already +provided by libnl. + +This commit improves the condition so that nl_extras.h provides the +missing functions only if the minor version is < 2, or if minor is 2 +and micro is < 26. + +Signed-off-by: Thomas Petazzoni +--- + src/nl_extras.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/src/nl_extras.h ++++ b/src/nl_extras.h +@@ -1,7 +1,7 @@ + #ifndef __NL_EXTRAS_H + #define __NL_EXTRAS_H + +-#if LIBNL_VER_MIC <= 26 ++#if (LIBNL_VER_MIN < 2) || (LIBNL_VER_MIN == 2) && (LIBNL_VER_MIC <= 26) + + #ifndef NLA_S8 + +@@ -45,6 +45,6 @@ static inline int32_t nla_get_s32(struct + + #endif /* NLA_S64 */ + +-#endif /* LIBNL_VER_MIC */ ++#endif /* LIBNL_VER_* */ + + #endif /* __NL_EXTRAS_H */ diff --git a/package/network/utils/wwan/files/data/0421-03a7 b/package/network/utils/wwan/files/data/0421-03a7 index 131340135328f6..c2ce0082448922 100644 --- a/package/network/utils/wwan/files/data/0421-03a7 +++ b/package/network/utils/wwan/files/data/0421-03a7 @@ -1,6 +1,6 @@ { "desc": "Nokia C5-00 Mobile phone", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/0421-060d b/package/network/utils/wwan/files/data/0421-060d index a9ad650d6b4fa3..3ef6df4cc25da7 100644 --- a/package/network/utils/wwan/files/data/0421-060d +++ b/package/network/utils/wwan/files/data/0421-060d @@ -1,6 +1,6 @@ { "desc": "Nokia CS-10", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/0421-060e b/package/network/utils/wwan/files/data/0421-060e index a9ad650d6b4fa3..3ef6df4cc25da7 100644 --- a/package/network/utils/wwan/files/data/0421-060e +++ b/package/network/utils/wwan/files/data/0421-060e @@ -1,6 +1,6 @@ { "desc": "Nokia CS-10", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/0421-0612 b/package/network/utils/wwan/files/data/0421-0612 index bc3e780ba9ae88..d219e7a656b6cc 100644 --- a/package/network/utils/wwan/files/data/0421-0612 +++ b/package/network/utils/wwan/files/data/0421-0612 @@ -1,6 +1,6 @@ { "desc": "Nokia CS-15/CS-18", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/0421-0619 b/package/network/utils/wwan/files/data/0421-0619 index 52fbf58416f831..e61bb093b12610 100644 --- a/package/network/utils/wwan/files/data/0421-0619 +++ b/package/network/utils/wwan/files/data/0421-0619 @@ -1,6 +1,6 @@ { "desc": "Nokia CS-12", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/0421-061e b/package/network/utils/wwan/files/data/0421-061e index c1cb9f44d44bea..41c8afae437b0a 100644 --- a/package/network/utils/wwan/files/data/0421-061e +++ b/package/network/utils/wwan/files/data/0421-061e @@ -1,6 +1,6 @@ { "desc": "Nokia CS-11", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/0421-0623 b/package/network/utils/wwan/files/data/0421-0623 index f6674bac6a6340..14c2530f300ce1 100644 --- a/package/network/utils/wwan/files/data/0421-0623 +++ b/package/network/utils/wwan/files/data/0421-0623 @@ -1,6 +1,6 @@ { "desc": "Nokia CS-17", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/0421-0629 b/package/network/utils/wwan/files/data/0421-0629 index b637c344b40a78..0feb718baf516e 100644 --- a/package/network/utils/wwan/files/data/0421-0629 +++ b/package/network/utils/wwan/files/data/0421-0629 @@ -1,6 +1,6 @@ { "desc": "Nokia CS-18", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/0421-062d b/package/network/utils/wwan/files/data/0421-062d index a95192b8e5eebe..e9015899044199 100644 --- a/package/network/utils/wwan/files/data/0421-062d +++ b/package/network/utils/wwan/files/data/0421-062d @@ -1,6 +1,6 @@ { "desc": "Nokia CS-19", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/0421-062f b/package/network/utils/wwan/files/data/0421-062f index a95192b8e5eebe..e9015899044199 100644 --- a/package/network/utils/wwan/files/data/0421-062f +++ b/package/network/utils/wwan/files/data/0421-062f @@ -1,6 +1,6 @@ { "desc": "Nokia CS-19", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/0421-0638 b/package/network/utils/wwan/files/data/0421-0638 index 5fa7d4983e44e3..42ec6fe6a8790e 100644 --- a/package/network/utils/wwan/files/data/0421-0638 +++ b/package/network/utils/wwan/files/data/0421-0638 @@ -1,6 +1,6 @@ { "desc": "Nokia 21M-02", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/05c6-0016 b/package/network/utils/wwan/files/data/05c6-0016 index 1a4a796b7c2a37..b623ebff6b8856 100644 --- a/package/network/utils/wwan/files/data/05c6-0016 +++ b/package/network/utils/wwan/files/data/05c6-0016 @@ -1,6 +1,6 @@ { "desc": "iBall 3.5G Connect", "control": 2, - "data": 2 -} "generic": 1 + "data": 2, + "generic": 1 } diff --git a/package/network/utils/wwan/files/data/05c6-0023 b/package/network/utils/wwan/files/data/05c6-0023 index ce288ed48fbe58..a01dea80de2c43 100644 --- a/package/network/utils/wwan/files/data/05c6-0023 +++ b/package/network/utils/wwan/files/data/05c6-0023 @@ -2,4 +2,4 @@ "desc": "Leoxsys LN-72V", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/05c6-00a0 b/package/network/utils/wwan/files/data/05c6-00a0 index 0b9616025ed83e..33972528a5be36 100644 --- a/package/network/utils/wwan/files/data/05c6-00a0 +++ b/package/network/utils/wwan/files/data/05c6-00a0 @@ -1,6 +1,6 @@ { "desc": "Axesstel MV241", "control": 2, - "data": 0 -} "generic": 1 + "data": 0, + "generic": 1 } diff --git a/package/network/utils/wwan/files/data/05c6-6000 b/package/network/utils/wwan/files/data/05c6-6000 index e8863b9e15c368..217038fe82e3bf 100644 --- a/package/network/utils/wwan/files/data/05c6-6000 +++ b/package/network/utils/wwan/files/data/05c6-6000 @@ -2,4 +2,4 @@ "desc": "Siemens SG75", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/05c6-9000 b/package/network/utils/wwan/files/data/05c6-9000 index 6a72f4ff9c83a3..17cc41d4ff8f03 100644 --- a/package/network/utils/wwan/files/data/05c6-9000 +++ b/package/network/utils/wwan/files/data/05c6-9000 @@ -2,4 +2,4 @@ "desc": "Generic Qualcomm", "control": 1, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/07d1-3e01 b/package/network/utils/wwan/files/data/07d1-3e01 index b1da1770033a74..89447058d2980c 100644 --- a/package/network/utils/wwan/files/data/07d1-3e01 +++ b/package/network/utils/wwan/files/data/07d1-3e01 @@ -2,4 +2,4 @@ "desc": "D-Link DWM-152", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/07d1-3e02 b/package/network/utils/wwan/files/data/07d1-3e02 index cd1eceed9e750d..be0a89333c871f 100644 --- a/package/network/utils/wwan/files/data/07d1-3e02 +++ b/package/network/utils/wwan/files/data/07d1-3e02 @@ -2,4 +2,4 @@ "desc": "D-Link DWM-156", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/07d1-7e11 b/package/network/utils/wwan/files/data/07d1-7e11 index 84705b75191ffa..3da9895e561f4a 100644 --- a/package/network/utils/wwan/files/data/07d1-7e11 +++ b/package/network/utils/wwan/files/data/07d1-7e11 @@ -1,6 +1,6 @@ { "desc": "D-Link DWM-156", "control": 1, - "data": 2 -} "generic": 1 + "data": 2, + "generic": 1 } diff --git a/package/network/utils/wwan/files/data/0af0-6901 b/package/network/utils/wwan/files/data/0af0-6901 index 06b26643de9d55..a88c36dda1dc26 100644 --- a/package/network/utils/wwan/files/data/0af0-6901 +++ b/package/network/utils/wwan/files/data/0af0-6901 @@ -2,4 +2,4 @@ "desc": "Option GI0201", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/0af0-7201 b/package/network/utils/wwan/files/data/0af0-7201 index 20b18b76cc675c..fc84354c4b8ce3 100644 --- a/package/network/utils/wwan/files/data/0af0-7201 +++ b/package/network/utils/wwan/files/data/0af0-7201 @@ -2,4 +2,4 @@ "desc": "Option GTM380", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/0af0-9200 b/package/network/utils/wwan/files/data/0af0-9200 index 7e55a3661d308e..8230dd025b9ada 100644 --- a/package/network/utils/wwan/files/data/0af0-9200 +++ b/package/network/utils/wwan/files/data/0af0-9200 @@ -2,4 +2,4 @@ "desc": "Option GTM671WFS", "control": 2, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/0b3c-c003 b/package/network/utils/wwan/files/data/0b3c-c003 index 5b4ea480e3bfb1..77528b5be3a27b 100644 --- a/package/network/utils/wwan/files/data/0b3c-c003 +++ b/package/network/utils/wwan/files/data/0b3c-c003 @@ -2,4 +2,4 @@ "desc": "Olivetti Olicard 145", "control": 0, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/0bdb-1900 b/package/network/utils/wwan/files/data/0bdb-1900 index 84a9a9b7b0572d..e7d72f12122101 100644 --- a/package/network/utils/wwan/files/data/0bdb-1900 +++ b/package/network/utils/wwan/files/data/0bdb-1900 @@ -1,6 +1,6 @@ { "desc": "Ericsson F3507g", "control": 4, - "data": 1 -} "acm": 1 + "data": 1, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/0bdb-1902 b/package/network/utils/wwan/files/data/0bdb-1902 index 84a9a9b7b0572d..e7d72f12122101 100644 --- a/package/network/utils/wwan/files/data/0bdb-1902 +++ b/package/network/utils/wwan/files/data/0bdb-1902 @@ -1,6 +1,6 @@ { "desc": "Ericsson F3507g", "control": 4, - "data": 1 -} "acm": 1 + "data": 1, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/0bdb-190a b/package/network/utils/wwan/files/data/0bdb-190a index 2e826130b1a1f2..e5b16e34a3ab01 100644 --- a/package/network/utils/wwan/files/data/0bdb-190a +++ b/package/network/utils/wwan/files/data/0bdb-190a @@ -1,6 +1,6 @@ { "desc": "Ericsson F3307", "control": 4, - "data": 1 -} "acm": 1 + "data": 1, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/0bdb-190d b/package/network/utils/wwan/files/data/0bdb-190d index 2f725eb720f06c..126c09f1e1b384 100644 --- a/package/network/utils/wwan/files/data/0bdb-190d +++ b/package/network/utils/wwan/files/data/0bdb-190d @@ -1,6 +1,6 @@ { "desc": "Ericsson F5521gw", "control": 4, - "data": 1 -} "acm": 1 + "data": 1, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/0bdb-1910 b/package/network/utils/wwan/files/data/0bdb-1910 index 2f725eb720f06c..126c09f1e1b384 100644 --- a/package/network/utils/wwan/files/data/0bdb-1910 +++ b/package/network/utils/wwan/files/data/0bdb-1910 @@ -1,6 +1,6 @@ { "desc": "Ericsson F5521gw", "control": 4, - "data": 1 -} "acm": 1 + "data": 1, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/0c88-17da b/package/network/utils/wwan/files/data/0c88-17da index d5ca787a661ccf..fcdf611cba3a0a 100644 --- a/package/network/utils/wwan/files/data/0c88-17da +++ b/package/network/utils/wwan/files/data/0c88-17da @@ -2,4 +2,4 @@ "desc": "Kyocera KPC650", "control": 0, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/0c88-180a b/package/network/utils/wwan/files/data/0c88-180a index a2bee34e5660b7..e0426423c464c9 100644 --- a/package/network/utils/wwan/files/data/0c88-180a +++ b/package/network/utils/wwan/files/data/0c88-180a @@ -2,4 +2,4 @@ "desc": "Kyocera KPC680", "control": 0, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/0f3d-68aa b/package/network/utils/wwan/files/data/0f3d-68aa index 3a68c206484ea0..dab35fa74b99d6 100644 --- a/package/network/utils/wwan/files/data/0f3d-68aa +++ b/package/network/utils/wwan/files/data/0f3d-68aa @@ -2,4 +2,4 @@ "desc": "Sierra Wireless AC313U/320U/330U Direct IP", "control": 3, "data": 3 -}} +} diff --git a/package/network/utils/wwan/files/data/1004-6124 b/package/network/utils/wwan/files/data/1004-6124 index 471d8a5cf004c4..b6da8c49bf5dc6 100644 --- a/package/network/utils/wwan/files/data/1004-6124 +++ b/package/network/utils/wwan/files/data/1004-6124 @@ -1,6 +1,6 @@ { "desc": "LG L-05A", "control": 0, - "data": 2 -} "acm": 1 + "data": 2, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/1004-6141 b/package/network/utils/wwan/files/data/1004-6141 index 840dc64cf201b7..142d70fd46f89c 100644 --- a/package/network/utils/wwan/files/data/1004-6141 +++ b/package/network/utils/wwan/files/data/1004-6141 @@ -1,6 +1,6 @@ { "desc": "LG LUU-2100TI", "control": 0, - "data": 2 -} "acm": 1 + "data": 2, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/1004-6157 b/package/network/utils/wwan/files/data/1004-6157 index ec94956626fd51..842c0b4bda4df5 100644 --- a/package/network/utils/wwan/files/data/1004-6157 +++ b/package/network/utils/wwan/files/data/1004-6157 @@ -1,6 +1,6 @@ { "desc": "LG LUU-2110TI", "control": 0, - "data": 2 -} "acm": 1 + "data": 2, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/1004-618f b/package/network/utils/wwan/files/data/1004-618f index df98b66be0b732..bb4b534129d6a6 100644 --- a/package/network/utils/wwan/files/data/1004-618f +++ b/package/network/utils/wwan/files/data/1004-618f @@ -2,4 +2,4 @@ "desc": "LG L-02C", "control": 0, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/106c-3711 b/package/network/utils/wwan/files/data/106c-3711 index 4d22d4daa8b625..0198c33ff4b589 100644 --- a/package/network/utils/wwan/files/data/106c-3711 +++ b/package/network/utils/wwan/files/data/106c-3711 @@ -1,6 +1,6 @@ { "desc": "PANTECH UM-150", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/106c-3714 b/package/network/utils/wwan/files/data/106c-3714 index 5fa2a3a69c1f22..a735680ba9fa50 100644 --- a/package/network/utils/wwan/files/data/106c-3714 +++ b/package/network/utils/wwan/files/data/106c-3714 @@ -1,6 +1,6 @@ { "desc": "PANTECH UM-175", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/106c-3715 b/package/network/utils/wwan/files/data/106c-3715 index 8cbe23dad0db97..5a5194d550e195 100644 --- a/package/network/utils/wwan/files/data/106c-3715 +++ b/package/network/utils/wwan/files/data/106c-3715 @@ -1,6 +1,6 @@ { "desc": "PANTECH UM-175AL", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/106c-3716 b/package/network/utils/wwan/files/data/106c-3716 index 18bd074f9d4fc1..aa50f5d5457a8a 100644 --- a/package/network/utils/wwan/files/data/106c-3716 +++ b/package/network/utils/wwan/files/data/106c-3716 @@ -1,6 +1,6 @@ { "desc": "PANTECH UM-190", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/106c-3717 b/package/network/utils/wwan/files/data/106c-3717 index e028a4b410c927..fd80949d8caf49 100644 --- a/package/network/utils/wwan/files/data/106c-3717 +++ b/package/network/utils/wwan/files/data/106c-3717 @@ -1,6 +1,6 @@ { "desc": "PANTECH UM-185C/UM185E", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/1199-0017 b/package/network/utils/wwan/files/data/1199-0017 index a50654d7fe7d4e..532aaddc1c9758 100644 --- a/package/network/utils/wwan/files/data/1199-0017 +++ b/package/network/utils/wwan/files/data/1199-0017 @@ -2,4 +2,4 @@ "desc": "Sierra EM5625", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-0018 b/package/network/utils/wwan/files/data/1199-0018 index 02d7494aecbdee..71447d1b63a6d3 100644 --- a/package/network/utils/wwan/files/data/1199-0018 +++ b/package/network/utils/wwan/files/data/1199-0018 @@ -2,4 +2,4 @@ "desc": "Sierra MC5720", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-0019 b/package/network/utils/wwan/files/data/1199-0019 index 4d6d4a9db6c135..43ccfd09ca448f 100644 --- a/package/network/utils/wwan/files/data/1199-0019 +++ b/package/network/utils/wwan/files/data/1199-0019 @@ -2,4 +2,4 @@ "desc": "Sierra AC595U", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-0020 b/package/network/utils/wwan/files/data/1199-0020 index 3482db4d6689ae..d92732c668c57c 100644 --- a/package/network/utils/wwan/files/data/1199-0020 +++ b/package/network/utils/wwan/files/data/1199-0020 @@ -2,4 +2,4 @@ "desc": "Sierra MC5725", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-0021 b/package/network/utils/wwan/files/data/1199-0021 index 226c1b44ddd35b..d879a34dd78555 100644 --- a/package/network/utils/wwan/files/data/1199-0021 +++ b/package/network/utils/wwan/files/data/1199-0021 @@ -2,4 +2,4 @@ "desc": "Sierra AC597E", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-0022 b/package/network/utils/wwan/files/data/1199-0022 index dd089a37e455b9..b4780db9d73248 100644 --- a/package/network/utils/wwan/files/data/1199-0022 +++ b/package/network/utils/wwan/files/data/1199-0022 @@ -2,4 +2,4 @@ "desc": "Sierra EM5725", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-0023 b/package/network/utils/wwan/files/data/1199-0023 index 9c7e72b9b12d94..447f681a15f3f9 100644 --- a/package/network/utils/wwan/files/data/1199-0023 +++ b/package/network/utils/wwan/files/data/1199-0023 @@ -2,4 +2,4 @@ "desc": "Sierra AC597", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-0024 b/package/network/utils/wwan/files/data/1199-0024 index 425d4cccd2ee41..9617b69fd68175 100644 --- a/package/network/utils/wwan/files/data/1199-0024 +++ b/package/network/utils/wwan/files/data/1199-0024 @@ -2,4 +2,4 @@ "desc": "Sierra MC5727 CDMA", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-0025 b/package/network/utils/wwan/files/data/1199-0025 index 002d6fb18f4ad4..f0792c8ed726af 100644 --- a/package/network/utils/wwan/files/data/1199-0025 +++ b/package/network/utils/wwan/files/data/1199-0025 @@ -2,4 +2,4 @@ "desc": "Sierra AC598", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-0026 b/package/network/utils/wwan/files/data/1199-0026 index 13998dee99f967..ba1ea2a08e6a23 100644 --- a/package/network/utils/wwan/files/data/1199-0026 +++ b/package/network/utils/wwan/files/data/1199-0026 @@ -2,4 +2,4 @@ "desc": "Sierra T11", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-0027 b/package/network/utils/wwan/files/data/1199-0027 index af4824c9c5e133..b959eca4b8696b 100644 --- a/package/network/utils/wwan/files/data/1199-0027 +++ b/package/network/utils/wwan/files/data/1199-0027 @@ -2,4 +2,4 @@ "desc": "Sierra AC402", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-0028 b/package/network/utils/wwan/files/data/1199-0028 index 34c896e41d86fa..02967db89d635d 100644 --- a/package/network/utils/wwan/files/data/1199-0028 +++ b/package/network/utils/wwan/files/data/1199-0028 @@ -2,4 +2,4 @@ "desc": "Sierra MC5728", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-0112 b/package/network/utils/wwan/files/data/1199-0112 index 083baeea5fd587..900923c7b13d44 100644 --- a/package/network/utils/wwan/files/data/1199-0112 +++ b/package/network/utils/wwan/files/data/1199-0112 @@ -2,4 +2,4 @@ "desc": "Sierra CDMA 1xEVDO PC Card, AC580", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-0120 b/package/network/utils/wwan/files/data/1199-0120 index 4d6d4a9db6c135..43ccfd09ca448f 100644 --- a/package/network/utils/wwan/files/data/1199-0120 +++ b/package/network/utils/wwan/files/data/1199-0120 @@ -2,4 +2,4 @@ "desc": "Sierra AC595U", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-0218 b/package/network/utils/wwan/files/data/1199-0218 index 02d7494aecbdee..71447d1b63a6d3 100644 --- a/package/network/utils/wwan/files/data/1199-0218 +++ b/package/network/utils/wwan/files/data/1199-0218 @@ -2,4 +2,4 @@ "desc": "Sierra MC5720", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-0220 b/package/network/utils/wwan/files/data/1199-0220 index 3482db4d6689ae..d92732c668c57c 100644 --- a/package/network/utils/wwan/files/data/1199-0220 +++ b/package/network/utils/wwan/files/data/1199-0220 @@ -2,4 +2,4 @@ "desc": "Sierra MC5725", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-0224 b/package/network/utils/wwan/files/data/1199-0224 index a57e54a64754f4..b5b13cc4bf434d 100644 --- a/package/network/utils/wwan/files/data/1199-0224 +++ b/package/network/utils/wwan/files/data/1199-0224 @@ -2,4 +2,4 @@ "desc": "Sierra MC5727", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-0301 b/package/network/utils/wwan/files/data/1199-0301 index 13fd7da9f24351..2f3a6d00ff6e1f 100644 --- a/package/network/utils/wwan/files/data/1199-0301 +++ b/package/network/utils/wwan/files/data/1199-0301 @@ -2,4 +2,4 @@ "desc": "Sierra AC250U", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6802 b/package/network/utils/wwan/files/data/1199-6802 index d9bd29f9564841..497aff248d1b05 100644 --- a/package/network/utils/wwan/files/data/1199-6802 +++ b/package/network/utils/wwan/files/data/1199-6802 @@ -2,4 +2,4 @@ "desc": "Sierra MC8755", "control": 0, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6803 b/package/network/utils/wwan/files/data/1199-6803 index c694fa3e12bf51..0e3ebbb206e554 100644 --- a/package/network/utils/wwan/files/data/1199-6803 +++ b/package/network/utils/wwan/files/data/1199-6803 @@ -2,4 +2,4 @@ "desc": "Sierra MC8765", "control": 0, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6804 b/package/network/utils/wwan/files/data/1199-6804 index d9bd29f9564841..497aff248d1b05 100644 --- a/package/network/utils/wwan/files/data/1199-6804 +++ b/package/network/utils/wwan/files/data/1199-6804 @@ -2,4 +2,4 @@ "desc": "Sierra MC8755", "control": 0, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6805 b/package/network/utils/wwan/files/data/1199-6805 index c694fa3e12bf51..0e3ebbb206e554 100644 --- a/package/network/utils/wwan/files/data/1199-6805 +++ b/package/network/utils/wwan/files/data/1199-6805 @@ -2,4 +2,4 @@ "desc": "Sierra MC8765", "control": 0, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6808 b/package/network/utils/wwan/files/data/1199-6808 index d9bd29f9564841..497aff248d1b05 100644 --- a/package/network/utils/wwan/files/data/1199-6808 +++ b/package/network/utils/wwan/files/data/1199-6808 @@ -2,4 +2,4 @@ "desc": "Sierra MC8755", "control": 0, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6809 b/package/network/utils/wwan/files/data/1199-6809 index d9bd29f9564841..497aff248d1b05 100644 --- a/package/network/utils/wwan/files/data/1199-6809 +++ b/package/network/utils/wwan/files/data/1199-6809 @@ -2,4 +2,4 @@ "desc": "Sierra MC8755", "control": 0, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6813 b/package/network/utils/wwan/files/data/1199-6813 index f10c10449ae99c..4e667e76a31ff2 100644 --- a/package/network/utils/wwan/files/data/1199-6813 +++ b/package/network/utils/wwan/files/data/1199-6813 @@ -2,4 +2,4 @@ "desc": "Sierra MC8775", "control": 0, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6815 b/package/network/utils/wwan/files/data/1199-6815 index f10c10449ae99c..4e667e76a31ff2 100644 --- a/package/network/utils/wwan/files/data/1199-6815 +++ b/package/network/utils/wwan/files/data/1199-6815 @@ -2,4 +2,4 @@ "desc": "Sierra MC8775", "control": 0, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6816 b/package/network/utils/wwan/files/data/1199-6816 index f10c10449ae99c..4e667e76a31ff2 100644 --- a/package/network/utils/wwan/files/data/1199-6816 +++ b/package/network/utils/wwan/files/data/1199-6816 @@ -2,4 +2,4 @@ "desc": "Sierra MC8775", "control": 0, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6820 b/package/network/utils/wwan/files/data/1199-6820 index ce52c8f2ae992e..be1a6596e65334 100644 --- a/package/network/utils/wwan/files/data/1199-6820 +++ b/package/network/utils/wwan/files/data/1199-6820 @@ -2,4 +2,4 @@ "desc": "Sierra AC875", "control": 0, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6821 b/package/network/utils/wwan/files/data/1199-6821 index 3ebd0be1134e32..a912288511f79f 100644 --- a/package/network/utils/wwan/files/data/1199-6821 +++ b/package/network/utils/wwan/files/data/1199-6821 @@ -2,4 +2,4 @@ "desc": "Sierra AC875U", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6822 b/package/network/utils/wwan/files/data/1199-6822 index 35ee919cc7575d..90fe42bd8f6e08 100644 --- a/package/network/utils/wwan/files/data/1199-6822 +++ b/package/network/utils/wwan/files/data/1199-6822 @@ -2,4 +2,4 @@ "desc": "Sierra AC875E", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6833 b/package/network/utils/wwan/files/data/1199-6833 index 0fcd10e93a42a0..11859acd4e06e5 100644 --- a/package/network/utils/wwan/files/data/1199-6833 +++ b/package/network/utils/wwan/files/data/1199-6833 @@ -2,4 +2,4 @@ "desc": "Sierra MC8781", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6834 b/package/network/utils/wwan/files/data/1199-6834 index 0b9eadf708728e..e23f53e07a60ad 100644 --- a/package/network/utils/wwan/files/data/1199-6834 +++ b/package/network/utils/wwan/files/data/1199-6834 @@ -2,4 +2,4 @@ "desc": "Sierra MC8780", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6835 b/package/network/utils/wwan/files/data/1199-6835 index 0fcd10e93a42a0..11859acd4e06e5 100644 --- a/package/network/utils/wwan/files/data/1199-6835 +++ b/package/network/utils/wwan/files/data/1199-6835 @@ -2,4 +2,4 @@ "desc": "Sierra MC8781", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6838 b/package/network/utils/wwan/files/data/1199-6838 index 0b9eadf708728e..e23f53e07a60ad 100644 --- a/package/network/utils/wwan/files/data/1199-6838 +++ b/package/network/utils/wwan/files/data/1199-6838 @@ -2,4 +2,4 @@ "desc": "Sierra MC8780", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6839 b/package/network/utils/wwan/files/data/1199-6839 index 0fcd10e93a42a0..11859acd4e06e5 100644 --- a/package/network/utils/wwan/files/data/1199-6839 +++ b/package/network/utils/wwan/files/data/1199-6839 @@ -2,4 +2,4 @@ "desc": "Sierra MC8781", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-683a b/package/network/utils/wwan/files/data/1199-683a index 02da610cf22117..aca144df27fe13 100644 --- a/package/network/utils/wwan/files/data/1199-683a +++ b/package/network/utils/wwan/files/data/1199-683a @@ -2,4 +2,4 @@ "desc": "Sierra MC8785", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-683b b/package/network/utils/wwan/files/data/1199-683b index 0f2a133cf2195c..8df7e72d6aab5e 100644 --- a/package/network/utils/wwan/files/data/1199-683b +++ b/package/network/utils/wwan/files/data/1199-683b @@ -2,4 +2,4 @@ "desc": "Sierra MC8785 Composite", "control": 3, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6850 b/package/network/utils/wwan/files/data/1199-6850 index 1989d0abc31e0d..c8788251f1fc41 100644 --- a/package/network/utils/wwan/files/data/1199-6850 +++ b/package/network/utils/wwan/files/data/1199-6850 @@ -2,4 +2,4 @@ "desc": "Sierra AC880", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6851 b/package/network/utils/wwan/files/data/1199-6851 index 16d8ab4654c077..339f39a5e59fae 100644 --- a/package/network/utils/wwan/files/data/1199-6851 +++ b/package/network/utils/wwan/files/data/1199-6851 @@ -2,4 +2,4 @@ "desc": "Sierra AC 881", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6852 b/package/network/utils/wwan/files/data/1199-6852 index 65be37b7a1bbf4..6dcb045c5a99dc 100644 --- a/package/network/utils/wwan/files/data/1199-6852 +++ b/package/network/utils/wwan/files/data/1199-6852 @@ -2,4 +2,4 @@ "desc": "Sierra AC880E", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6853 b/package/network/utils/wwan/files/data/1199-6853 index a8aee6d9c40256..09b482cf79ade3 100644 --- a/package/network/utils/wwan/files/data/1199-6853 +++ b/package/network/utils/wwan/files/data/1199-6853 @@ -2,4 +2,4 @@ "desc": "Sierra AC881E", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6855 b/package/network/utils/wwan/files/data/1199-6855 index 24eddc6f1e537c..ad5f0491d85ce3 100644 --- a/package/network/utils/wwan/files/data/1199-6855 +++ b/package/network/utils/wwan/files/data/1199-6855 @@ -2,4 +2,4 @@ "desc": "Sierra AC880U", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6856 b/package/network/utils/wwan/files/data/1199-6856 index 415a80a153671b..9bc68721c3b354 100644 --- a/package/network/utils/wwan/files/data/1199-6856 +++ b/package/network/utils/wwan/files/data/1199-6856 @@ -2,4 +2,4 @@ "desc": "Sierra ATT USB Connect 881", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6859 b/package/network/utils/wwan/files/data/1199-6859 index 075cc6bcd1bc36..9383e6c0d4d5d9 100644 --- a/package/network/utils/wwan/files/data/1199-6859 +++ b/package/network/utils/wwan/files/data/1199-6859 @@ -2,4 +2,4 @@ "desc": "Sierra AC885E", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-685a b/package/network/utils/wwan/files/data/1199-685a index 075cc6bcd1bc36..9383e6c0d4d5d9 100644 --- a/package/network/utils/wwan/files/data/1199-685a +++ b/package/network/utils/wwan/files/data/1199-685a @@ -2,4 +2,4 @@ "desc": "Sierra AC885E", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6880 b/package/network/utils/wwan/files/data/1199-6880 index e188c03774d00f..bae654f5e8798c 100644 --- a/package/network/utils/wwan/files/data/1199-6880 +++ b/package/network/utils/wwan/files/data/1199-6880 @@ -2,4 +2,4 @@ "desc": "Sierra C885", "control": 3, "data": 3 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6890 b/package/network/utils/wwan/files/data/1199-6890 index 6d2f892a37da2b..7154b0ceb77f1a 100644 --- a/package/network/utils/wwan/files/data/1199-6890 +++ b/package/network/utils/wwan/files/data/1199-6890 @@ -2,4 +2,4 @@ "desc": "Sierra C888", "control": 3, "data": 3 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6891 b/package/network/utils/wwan/files/data/1199-6891 index fa866e2918e949..1e1c89c1e39aa5 100644 --- a/package/network/utils/wwan/files/data/1199-6891 +++ b/package/network/utils/wwan/files/data/1199-6891 @@ -2,4 +2,4 @@ "desc": "Sierra C22 and C33", "control": 3, "data": 3 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6892 b/package/network/utils/wwan/files/data/1199-6892 index 99a2bd2d6d838b..923302a4f1c542 100644 --- a/package/network/utils/wwan/files/data/1199-6892 +++ b/package/network/utils/wwan/files/data/1199-6892 @@ -2,4 +2,4 @@ "desc": "Sierra Compass HSPA", "control": 3, "data": 3 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-6893 b/package/network/utils/wwan/files/data/1199-6893 index 16f4dfda4ec562..9cd3ad09e5b5d8 100644 --- a/package/network/utils/wwan/files/data/1199-6893 +++ b/package/network/utils/wwan/files/data/1199-6893 @@ -2,4 +2,4 @@ "desc": "Sierra C889", "control": 3, "data": 3 -}} +} diff --git a/package/network/utils/wwan/files/data/1199-68aa b/package/network/utils/wwan/files/data/1199-68aa index 7c5a9f2bae0ca9..062c200f4e27d5 100644 --- a/package/network/utils/wwan/files/data/1199-68aa +++ b/package/network/utils/wwan/files/data/1199-68aa @@ -2,4 +2,4 @@ "desc": "Sierra AC320U/AC330U Direct IP", "control": 3, "data": 3 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-1035 b/package/network/utils/wwan/files/data/12d1-1035 index ad7025a1d32db3..1b595cd58e6c2c 100644 --- a/package/network/utils/wwan/files/data/12d1-1035 +++ b/package/network/utils/wwan/files/data/12d1-1035 @@ -2,4 +2,4 @@ "desc": "HUAWEI U8110", "control": 0, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-1406 b/package/network/utils/wwan/files/data/12d1-1406 index b1aa31783ec913..79619080701d73 100644 --- a/package/network/utils/wwan/files/data/12d1-1406 +++ b/package/network/utils/wwan/files/data/12d1-1406 @@ -2,4 +2,4 @@ "desc": "HUAWEI/Option newer modems", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-140b b/package/network/utils/wwan/files/data/12d1-140b index cc99898ae871e3..cd8cbdd51431a7 100644 --- a/package/network/utils/wwan/files/data/12d1-140b +++ b/package/network/utils/wwan/files/data/12d1-140b @@ -2,4 +2,4 @@ "desc": "HUAWEI/Option EC1260 Wireless Data Modem HSD USB Card", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-1412 b/package/network/utils/wwan/files/data/12d1-1412 index e6fb6cc7e037b2..342672a1d109b6 100644 --- a/package/network/utils/wwan/files/data/12d1-1412 +++ b/package/network/utils/wwan/files/data/12d1-1412 @@ -2,4 +2,4 @@ "desc": "HUAWEI/Option EC168", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-141b b/package/network/utils/wwan/files/data/12d1-141b index b1aa31783ec913..79619080701d73 100644 --- a/package/network/utils/wwan/files/data/12d1-141b +++ b/package/network/utils/wwan/files/data/12d1-141b @@ -2,4 +2,4 @@ "desc": "HUAWEI/Option newer modems", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-1433 b/package/network/utils/wwan/files/data/12d1-1433 index c5d86cb152e854..3159714747578e 100644 --- a/package/network/utils/wwan/files/data/12d1-1433 +++ b/package/network/utils/wwan/files/data/12d1-1433 @@ -2,4 +2,4 @@ "desc": "HUAWEI/Option E1756C", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-1436 b/package/network/utils/wwan/files/data/12d1-1436 index 7db8644b1596fd..a73fdc4c37cdc0 100644 --- a/package/network/utils/wwan/files/data/12d1-1436 +++ b/package/network/utils/wwan/files/data/12d1-1436 @@ -2,4 +2,4 @@ "desc": "HUAWEI/Option E1800", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-1444 b/package/network/utils/wwan/files/data/12d1-1444 index 500d775127e2bf..cbbf9d28f7a48c 100644 --- a/package/network/utils/wwan/files/data/12d1-1444 +++ b/package/network/utils/wwan/files/data/12d1-1444 @@ -2,4 +2,4 @@ "desc": "HUAWEI/Option E352-R1", "control": 0, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-144e b/package/network/utils/wwan/files/data/12d1-144e index a704946aa07656..c80d2e9b508c29 100644 --- a/package/network/utils/wwan/files/data/12d1-144e +++ b/package/network/utils/wwan/files/data/12d1-144e @@ -2,4 +2,4 @@ "desc": "Huawei K3806", "control": 0, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-1464 b/package/network/utils/wwan/files/data/12d1-1464 index 1b5397cd66ed0e..ffa690d8aafe71 100644 --- a/package/network/utils/wwan/files/data/12d1-1464 +++ b/package/network/utils/wwan/files/data/12d1-1464 @@ -2,4 +2,4 @@ "desc": "Huawei K4505", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-1465 b/package/network/utils/wwan/files/data/12d1-1465 index dbb20f7cc8294f..55696ffa41ccda 100644 --- a/package/network/utils/wwan/files/data/12d1-1465 +++ b/package/network/utils/wwan/files/data/12d1-1465 @@ -2,4 +2,4 @@ "desc": "Huawei K3765", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-1491 b/package/network/utils/wwan/files/data/12d1-1491 index c1ae9a568488f6..2228a909f879cb 100644 --- a/package/network/utils/wwan/files/data/12d1-1491 +++ b/package/network/utils/wwan/files/data/12d1-1491 @@ -2,4 +2,4 @@ "desc": "Huawei R201", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-14a5 b/package/network/utils/wwan/files/data/12d1-14a5 index 50ea079579dcb7..6eac38b53d1739 100644 --- a/package/network/utils/wwan/files/data/12d1-14a5 +++ b/package/network/utils/wwan/files/data/12d1-14a5 @@ -2,4 +2,4 @@ "desc": "Huawei E173", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-14a8 b/package/network/utils/wwan/files/data/12d1-14a8 index 50ea079579dcb7..6eac38b53d1739 100644 --- a/package/network/utils/wwan/files/data/12d1-14a8 +++ b/package/network/utils/wwan/files/data/12d1-14a8 @@ -2,4 +2,4 @@ "desc": "Huawei E173", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-14ae b/package/network/utils/wwan/files/data/12d1-14ae index e27a798ff8fd35..92f9b6a1c3aee7 100644 --- a/package/network/utils/wwan/files/data/12d1-14ae +++ b/package/network/utils/wwan/files/data/12d1-14ae @@ -2,4 +2,4 @@ "desc": "Huawei K3806", "control": 1, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-14cb b/package/network/utils/wwan/files/data/12d1-14cb index b496a60bc9b567..8419b69379fbf8 100644 --- a/package/network/utils/wwan/files/data/12d1-14cb +++ b/package/network/utils/wwan/files/data/12d1-14cb @@ -2,4 +2,4 @@ "desc": "Huawei K4510", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-14cf b/package/network/utils/wwan/files/data/12d1-14cf index 18e1e1e3a7c709..88a0f92dea889c 100644 --- a/package/network/utils/wwan/files/data/12d1-14cf +++ b/package/network/utils/wwan/files/data/12d1-14cf @@ -2,4 +2,4 @@ "desc": "Huawei K3772", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-1506 b/package/network/utils/wwan/files/data/12d1-1506 index 65760e8f9a6cc6..9e575afd9f206f 100644 --- a/package/network/utils/wwan/files/data/12d1-1506 +++ b/package/network/utils/wwan/files/data/12d1-1506 @@ -2,4 +2,4 @@ "desc": "Huawei E367/E398", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-151d b/package/network/utils/wwan/files/data/12d1-151d index e5eae2a88b9025..b5a3f104d20b47 100644 --- a/package/network/utils/wwan/files/data/12d1-151d +++ b/package/network/utils/wwan/files/data/12d1-151d @@ -2,4 +2,4 @@ "desc": "Huawei E3131", "control": 3, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-156c b/package/network/utils/wwan/files/data/12d1-156c index 3fc6b1b13c75e4..9a0a2927c90420 100644 --- a/package/network/utils/wwan/files/data/12d1-156c +++ b/package/network/utils/wwan/files/data/12d1-156c @@ -2,4 +2,4 @@ "desc": "Huawei E3276", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-1c05 b/package/network/utils/wwan/files/data/12d1-1c05 index c5612241bb84c2..6345f537d8588e 100644 --- a/package/network/utils/wwan/files/data/12d1-1c05 +++ b/package/network/utils/wwan/files/data/12d1-1c05 @@ -2,4 +2,4 @@ "desc": "Huawei E173s", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-1c07 b/package/network/utils/wwan/files/data/12d1-1c07 index cee727686be367..e8681e6230c952 100644 --- a/package/network/utils/wwan/files/data/12d1-1c07 +++ b/package/network/utils/wwan/files/data/12d1-1c07 @@ -2,4 +2,4 @@ "desc": "Huawei E188", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-1c08 b/package/network/utils/wwan/files/data/12d1-1c08 index 4f6fb21fa689f2..52df7e2a30b3ab 100644 --- a/package/network/utils/wwan/files/data/12d1-1c08 +++ b/package/network/utils/wwan/files/data/12d1-1c08 @@ -2,4 +2,4 @@ "desc": "Huawei E173s", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-1c10 b/package/network/utils/wwan/files/data/12d1-1c10 index 50ea079579dcb7..6eac38b53d1739 100644 --- a/package/network/utils/wwan/files/data/12d1-1c10 +++ b/package/network/utils/wwan/files/data/12d1-1c10 @@ -2,4 +2,4 @@ "desc": "Huawei E173", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-1c12 b/package/network/utils/wwan/files/data/12d1-1c12 index 50ea079579dcb7..6eac38b53d1739 100644 --- a/package/network/utils/wwan/files/data/12d1-1c12 +++ b/package/network/utils/wwan/files/data/12d1-1c12 @@ -2,4 +2,4 @@ "desc": "Huawei E173", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/12d1-1c23 b/package/network/utils/wwan/files/data/12d1-1c23 index d1043471be0cfe..41aef76b205544 100644 --- a/package/network/utils/wwan/files/data/12d1-1c23 +++ b/package/network/utils/wwan/files/data/12d1-1c23 @@ -2,4 +2,4 @@ "desc": "Huawei E173", "control": 0, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-1400 b/package/network/utils/wwan/files/data/1410-1400 index e2bda9674f8933..a36e1aa599cac5 100644 --- a/package/network/utils/wwan/files/data/1410-1400 +++ b/package/network/utils/wwan/files/data/1410-1400 @@ -2,4 +2,4 @@ "desc": "Novatel U730", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-1410 b/package/network/utils/wwan/files/data/1410-1410 index ba48aea923b7d3..0702468e51591a 100644 --- a/package/network/utils/wwan/files/data/1410-1410 +++ b/package/network/utils/wwan/files/data/1410-1410 @@ -2,4 +2,4 @@ "desc": "Novatel U740", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-1420 b/package/network/utils/wwan/files/data/1410-1420 index 5cc96b695a6ad0..f29b08faebd120 100644 --- a/package/network/utils/wwan/files/data/1410-1420 +++ b/package/network/utils/wwan/files/data/1410-1420 @@ -2,4 +2,4 @@ "desc": "Novatel U870", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-1430 b/package/network/utils/wwan/files/data/1410-1430 index 012f3ad9f973c5..275d3a70cb2c89 100644 --- a/package/network/utils/wwan/files/data/1410-1430 +++ b/package/network/utils/wwan/files/data/1410-1430 @@ -2,4 +2,4 @@ "desc": "Novatel XU870", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-1450 b/package/network/utils/wwan/files/data/1410-1450 index d1016773df44ef..a28901f004b7c0 100644 --- a/package/network/utils/wwan/files/data/1410-1450 +++ b/package/network/utils/wwan/files/data/1410-1450 @@ -2,4 +2,4 @@ "desc": "Novatel X950D", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-2100 b/package/network/utils/wwan/files/data/1410-2100 index a0328cf92b471d..4c8f576933e89f 100644 --- a/package/network/utils/wwan/files/data/1410-2100 +++ b/package/network/utils/wwan/files/data/1410-2100 @@ -2,4 +2,4 @@ "desc": "Novatel EV620", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-2110 b/package/network/utils/wwan/files/data/1410-2110 index 701bf424552e20..14012df7a6befa 100644 --- a/package/network/utils/wwan/files/data/1410-2110 +++ b/package/network/utils/wwan/files/data/1410-2110 @@ -2,4 +2,4 @@ "desc": "Novatel ES720", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-2120 b/package/network/utils/wwan/files/data/1410-2120 index 7ab3c9d78248ba..d1c7615c50da39 100644 --- a/package/network/utils/wwan/files/data/1410-2120 +++ b/package/network/utils/wwan/files/data/1410-2120 @@ -2,4 +2,4 @@ "desc": "Novatel E725", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-2130 b/package/network/utils/wwan/files/data/1410-2130 index 98006e20ecb97e..fc8404f3d2a545 100644 --- a/package/network/utils/wwan/files/data/1410-2130 +++ b/package/network/utils/wwan/files/data/1410-2130 @@ -2,4 +2,4 @@ "desc": "Novatel ES620", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-2400 b/package/network/utils/wwan/files/data/1410-2400 index cd9f2906910987..1f1871254359eb 100644 --- a/package/network/utils/wwan/files/data/1410-2400 +++ b/package/network/utils/wwan/files/data/1410-2400 @@ -2,4 +2,4 @@ "desc": "Novatel EU730", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-2410 b/package/network/utils/wwan/files/data/1410-2410 index 4635063b243125..fe656f56c3b4aa 100644 --- a/package/network/utils/wwan/files/data/1410-2410 +++ b/package/network/utils/wwan/files/data/1410-2410 @@ -2,4 +2,4 @@ "desc": "Novatel EU740", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-2420 b/package/network/utils/wwan/files/data/1410-2420 index 340666c7ca9211..db1c68fd5898aa 100644 --- a/package/network/utils/wwan/files/data/1410-2420 +++ b/package/network/utils/wwan/files/data/1410-2420 @@ -2,4 +2,4 @@ "desc": "Novatel EU870D", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-4100 b/package/network/utils/wwan/files/data/1410-4100 index 260a2891ad7082..6ec573596a3b74 100644 --- a/package/network/utils/wwan/files/data/1410-4100 +++ b/package/network/utils/wwan/files/data/1410-4100 @@ -2,4 +2,4 @@ "desc": "Novatel MC727/U727", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-4400 b/package/network/utils/wwan/files/data/1410-4400 index 838a7fbf9aa1bf..0ecddcf112eb0f 100644 --- a/package/network/utils/wwan/files/data/1410-4400 +++ b/package/network/utils/wwan/files/data/1410-4400 @@ -2,4 +2,4 @@ "desc": "Novatel Ovation MC930D/MC950D", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-6000 b/package/network/utils/wwan/files/data/1410-6000 index a12716e4b7c53e..861c992e01d17e 100644 --- a/package/network/utils/wwan/files/data/1410-6000 +++ b/package/network/utils/wwan/files/data/1410-6000 @@ -2,4 +2,4 @@ "desc": "Novatel USB760", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-6001 b/package/network/utils/wwan/files/data/1410-6001 index a12716e4b7c53e..861c992e01d17e 100644 --- a/package/network/utils/wwan/files/data/1410-6001 +++ b/package/network/utils/wwan/files/data/1410-6001 @@ -2,4 +2,4 @@ "desc": "Novatel USB760", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-6002 b/package/network/utils/wwan/files/data/1410-6002 index fce8e9bfd659c0..1c97f16dea3496 100644 --- a/package/network/utils/wwan/files/data/1410-6002 +++ b/package/network/utils/wwan/files/data/1410-6002 @@ -2,4 +2,4 @@ "desc": "Novatel USB760 3G", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-6010 b/package/network/utils/wwan/files/data/1410-6010 index d08c399a16cdf5..0b9b226d277f7a 100644 --- a/package/network/utils/wwan/files/data/1410-6010 +++ b/package/network/utils/wwan/files/data/1410-6010 @@ -2,4 +2,4 @@ "desc": "Novatel MC780", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-7001 b/package/network/utils/wwan/files/data/1410-7001 index 079c7d52c83f77..ac03ddc69176c1 100644 --- a/package/network/utils/wwan/files/data/1410-7001 +++ b/package/network/utils/wwan/files/data/1410-7001 @@ -2,4 +2,4 @@ "desc": "Novatel MiFi 2372", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-7003 b/package/network/utils/wwan/files/data/1410-7003 index 079c7d52c83f77..ac03ddc69176c1 100644 --- a/package/network/utils/wwan/files/data/1410-7003 +++ b/package/network/utils/wwan/files/data/1410-7003 @@ -2,4 +2,4 @@ "desc": "Novatel MiFi 2372", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-7030 b/package/network/utils/wwan/files/data/1410-7030 index 0fc402905d3e54..1ea46ea5d51577 100644 --- a/package/network/utils/wwan/files/data/1410-7030 +++ b/package/network/utils/wwan/files/data/1410-7030 @@ -2,4 +2,4 @@ "desc": "Novatel USB998", "control": 0, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-7031 b/package/network/utils/wwan/files/data/1410-7031 index e1ba049c132218..86d03cee041e66 100644 --- a/package/network/utils/wwan/files/data/1410-7031 +++ b/package/network/utils/wwan/files/data/1410-7031 @@ -1,6 +1,6 @@ { "desc": "Novatel USB679", "control": 0, - "data": 0 -} "generic": 1 + "data": 0, + "generic": 1 } diff --git a/package/network/utils/wwan/files/data/1410-7041 b/package/network/utils/wwan/files/data/1410-7041 index 03e8fcd5093fdb..203597dd7b4a7b 100644 --- a/package/network/utils/wwan/files/data/1410-7041 +++ b/package/network/utils/wwan/files/data/1410-7041 @@ -2,4 +2,4 @@ "desc": "Novatel MF3470", "control": 0, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1410-7042 b/package/network/utils/wwan/files/data/1410-7042 index 0bb9cdbd2b9cff..ea6d71fa237aae 100644 --- a/package/network/utils/wwan/files/data/1410-7042 +++ b/package/network/utils/wwan/files/data/1410-7042 @@ -2,4 +2,4 @@ "desc": "Novatel Ovation MC545/MC547", "control": 0, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1529-3100 b/package/network/utils/wwan/files/data/1529-3100 index 5e4fe34b5a06cc..afeb681a2c7474 100644 --- a/package/network/utils/wwan/files/data/1529-3100 +++ b/package/network/utils/wwan/files/data/1529-3100 @@ -1,6 +1,6 @@ { "desc": "UBIQUAM U-100/105/200/300/520", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/16d5-6202 b/package/network/utils/wwan/files/data/16d5-6202 index 1ba8a502b680f4..6225785211bf1e 100644 --- a/package/network/utils/wwan/files/data/16d5-6202 +++ b/package/network/utils/wwan/files/data/16d5-6202 @@ -2,4 +2,4 @@ "desc": "AnyData ADU-620UW", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/16d5-6501 b/package/network/utils/wwan/files/data/16d5-6501 index 09207df3b34bd0..96574f365c213c 100644 --- a/package/network/utils/wwan/files/data/16d5-6501 +++ b/package/network/utils/wwan/files/data/16d5-6501 @@ -2,4 +2,4 @@ "desc": "AnyData ADU-300A", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/16d5-6502 b/package/network/utils/wwan/files/data/16d5-6502 index 4bdbf899ac9eac..8607d41870dd65 100644 --- a/package/network/utils/wwan/files/data/16d5-6502 +++ b/package/network/utils/wwan/files/data/16d5-6502 @@ -2,4 +2,4 @@ "desc": "AnyData ADU-500A", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/16d5-6603 b/package/network/utils/wwan/files/data/16d5-6603 index 5c108a2d38954c..8f0ff3b0b0abad 100644 --- a/package/network/utils/wwan/files/data/16d5-6603 +++ b/package/network/utils/wwan/files/data/16d5-6603 @@ -1,6 +1,6 @@ { "desc": "AnyData ADU-890WH", "control": 0, - "data": 0 -} "generic": 1 + "data": 0, + "generic": 1 } diff --git a/package/network/utils/wwan/files/data/16d5-900d b/package/network/utils/wwan/files/data/16d5-900d index b1c486988b8245..4ac52bba629f88 100644 --- a/package/network/utils/wwan/files/data/16d5-900d +++ b/package/network/utils/wwan/files/data/16d5-900d @@ -1,6 +1,6 @@ { "desc": "AnyData ADU-890WH", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/16d8-5141 b/package/network/utils/wwan/files/data/16d8-5141 index bda356fda0f577..eeb3ea4f3bbcd2 100644 --- a/package/network/utils/wwan/files/data/16d8-5141 +++ b/package/network/utils/wwan/files/data/16d8-5141 @@ -1,6 +1,6 @@ { "desc": "Cmotech CNU-510", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/16d8-5533 b/package/network/utils/wwan/files/data/16d8-5533 index 185d257d4ea504..9fd23cdcd3b5a0 100644 --- a/package/network/utils/wwan/files/data/16d8-5533 +++ b/package/network/utils/wwan/files/data/16d8-5533 @@ -1,6 +1,6 @@ { "desc": "Cmotech CNU-550", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/16d8-5543 b/package/network/utils/wwan/files/data/16d8-5543 index 185d257d4ea504..9fd23cdcd3b5a0 100644 --- a/package/network/utils/wwan/files/data/16d8-5543 +++ b/package/network/utils/wwan/files/data/16d8-5543 @@ -1,6 +1,6 @@ { "desc": "Cmotech CNU-550", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/16d8-5553 b/package/network/utils/wwan/files/data/16d8-5553 index 2403381d1a5dd5..323ec28f82e425 100644 --- a/package/network/utils/wwan/files/data/16d8-5553 +++ b/package/network/utils/wwan/files/data/16d8-5553 @@ -1,6 +1,6 @@ { "desc": "Cmotech CDU-550", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/16d8-6002 b/package/network/utils/wwan/files/data/16d8-6002 index 715878c45cf04e..d779cdf8a9edd1 100644 --- a/package/network/utils/wwan/files/data/16d8-6002 +++ b/package/network/utils/wwan/files/data/16d8-6002 @@ -2,4 +2,4 @@ "desc": "Franklin U300", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/16d8-6006 b/package/network/utils/wwan/files/data/16d8-6006 index bb8f87e0ce57b3..92c5f0d8d0c5b5 100644 --- a/package/network/utils/wwan/files/data/16d8-6006 +++ b/package/network/utils/wwan/files/data/16d8-6006 @@ -2,4 +2,4 @@ "desc": "Cmotech CGU-628", "control": 0, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/16d8-6522 b/package/network/utils/wwan/files/data/16d8-6522 index 44343d002e8b9a..8301da18159e4b 100644 --- a/package/network/utils/wwan/files/data/16d8-6522 +++ b/package/network/utils/wwan/files/data/16d8-6522 @@ -1,6 +1,6 @@ { "desc": "Cmotech CDU-650", "control": 2, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/16d8-6523 b/package/network/utils/wwan/files/data/16d8-6523 index 406566b9a065c9..40ee5cbd67d628 100644 --- a/package/network/utils/wwan/files/data/16d8-6523 +++ b/package/network/utils/wwan/files/data/16d8-6523 @@ -1,6 +1,6 @@ { "desc": "Cmotech CCU-650U", "control": 2, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/16d8-6532 b/package/network/utils/wwan/files/data/16d8-6532 index 5b6a147ffc360e..e0cbfe2cb9c75a 100644 --- a/package/network/utils/wwan/files/data/16d8-6532 +++ b/package/network/utils/wwan/files/data/16d8-6532 @@ -1,6 +1,6 @@ { "desc": "Cmotech CCU-650", "control": 2, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/16d8-6533 b/package/network/utils/wwan/files/data/16d8-6533 index 07175f3180a0a8..f3866bbc329c75 100644 --- a/package/network/utils/wwan/files/data/16d8-6533 +++ b/package/network/utils/wwan/files/data/16d8-6533 @@ -1,6 +1,6 @@ { "desc": "Cmotech CNM-650", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/16d8-6543 b/package/network/utils/wwan/files/data/16d8-6543 index c518ca723d99d4..99fcedd6523c53 100644 --- a/package/network/utils/wwan/files/data/16d8-6543 +++ b/package/network/utils/wwan/files/data/16d8-6543 @@ -1,6 +1,6 @@ { "desc": "Cmotech CNU-650", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/16d8-680a b/package/network/utils/wwan/files/data/16d8-680a index 9b1c85fe8683c6..836092149eee63 100644 --- a/package/network/utils/wwan/files/data/16d8-680a +++ b/package/network/utils/wwan/files/data/16d8-680a @@ -1,6 +1,6 @@ { "desc": "Cmotech CDU-680", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-0001 b/package/network/utils/wwan/files/data/19d2-0001 index 31ee3fd3291f25..5b0d9622de2b81 100644 --- a/package/network/utils/wwan/files/data/19d2-0001 +++ b/package/network/utils/wwan/files/data/19d2-0001 @@ -2,4 +2,4 @@ "desc": "ONDA MT505UP/ZTE", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0015 b/package/network/utils/wwan/files/data/19d2-0015 index 31ee3fd3291f25..5b0d9622de2b81 100644 --- a/package/network/utils/wwan/files/data/19d2-0015 +++ b/package/network/utils/wwan/files/data/19d2-0015 @@ -2,4 +2,4 @@ "desc": "ONDA MT505UP/ZTE", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0016 b/package/network/utils/wwan/files/data/19d2-0016 index 48c5fefd3aac14..31c7421e0b54d5 100644 --- a/package/network/utils/wwan/files/data/19d2-0016 +++ b/package/network/utils/wwan/files/data/19d2-0016 @@ -2,4 +2,4 @@ "desc": "ONDA MF110/ZTE", "control": 1, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0018 b/package/network/utils/wwan/files/data/19d2-0018 index 76120d480e2bbb..35dc57ef9c6ac0 100644 --- a/package/network/utils/wwan/files/data/19d2-0018 +++ b/package/network/utils/wwan/files/data/19d2-0018 @@ -2,4 +2,4 @@ "desc": "ONDA MSA110UP/ZTE", "control": 1, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0022 b/package/network/utils/wwan/files/data/19d2-0022 index 7ed8ed1ca1cb2b..0d7b8264bc0faf 100644 --- a/package/network/utils/wwan/files/data/19d2-0022 +++ b/package/network/utils/wwan/files/data/19d2-0022 @@ -2,4 +2,4 @@ "desc": "ZTE K2525", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0024 b/package/network/utils/wwan/files/data/19d2-0024 index 5ae34af23e182a..128bd72ef4350a 100644 --- a/package/network/utils/wwan/files/data/19d2-0024 +++ b/package/network/utils/wwan/files/data/19d2-0024 @@ -2,4 +2,4 @@ "desc": "ONDA MT503HSA", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0033 b/package/network/utils/wwan/files/data/19d2-0033 index e99314e34df9ae..bcca7ffaa2201e 100644 --- a/package/network/utils/wwan/files/data/19d2-0033 +++ b/package/network/utils/wwan/files/data/19d2-0033 @@ -2,4 +2,4 @@ "desc": "ZTE MF636", "control": 1, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0037 b/package/network/utils/wwan/files/data/19d2-0037 index 8ee565d4277e86..0bc992ece380cf 100644 --- a/package/network/utils/wwan/files/data/19d2-0037 +++ b/package/network/utils/wwan/files/data/19d2-0037 @@ -2,4 +2,4 @@ "desc": "ONDA MT505UP/ZTE", "control": 2, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0039 b/package/network/utils/wwan/files/data/19d2-0039 index c80a51aefaa139..3a6e72e4061e61 100644 --- a/package/network/utils/wwan/files/data/19d2-0039 +++ b/package/network/utils/wwan/files/data/19d2-0039 @@ -2,4 +2,4 @@ "desc": "ZTE MF100", "control": 1, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0057 b/package/network/utils/wwan/files/data/19d2-0057 index 7800746132a5e5..1d0f0a159084d4 100644 --- a/package/network/utils/wwan/files/data/19d2-0057 +++ b/package/network/utils/wwan/files/data/19d2-0057 @@ -2,4 +2,4 @@ "desc": "AIKO 83D", "control": 0, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0064 b/package/network/utils/wwan/files/data/19d2-0064 index edb0efef052f27..2b4784134acfd7 100644 --- a/package/network/utils/wwan/files/data/19d2-0064 +++ b/package/network/utils/wwan/files/data/19d2-0064 @@ -2,4 +2,4 @@ "desc": "ZTE MF627", "control": 0, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0066 b/package/network/utils/wwan/files/data/19d2-0066 index c57d7aec18d365..f8bbdaef76043b 100644 --- a/package/network/utils/wwan/files/data/19d2-0066 +++ b/package/network/utils/wwan/files/data/19d2-0066 @@ -2,4 +2,4 @@ "desc": "ZTE MF626", "control": 1, "data": 3 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0073 b/package/network/utils/wwan/files/data/19d2-0073 index 0f9502f12206be..acd581c2af5877 100644 --- a/package/network/utils/wwan/files/data/19d2-0073 +++ b/package/network/utils/wwan/files/data/19d2-0073 @@ -2,4 +2,4 @@ "desc": "ZTE A580", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0079 b/package/network/utils/wwan/files/data/19d2-0079 index 569a9996cc12e1..c2d52de5f0bd5e 100644 --- a/package/network/utils/wwan/files/data/19d2-0079 +++ b/package/network/utils/wwan/files/data/19d2-0079 @@ -2,4 +2,4 @@ "desc": "ZTE A353", "control": 1, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0082 b/package/network/utils/wwan/files/data/19d2-0082 index ea4fcd94590460..2dbd3b51aab5ed 100644 --- a/package/network/utils/wwan/files/data/19d2-0082 +++ b/package/network/utils/wwan/files/data/19d2-0082 @@ -2,4 +2,4 @@ "desc": "ZTE MF668/MF190", "control": 1, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0086 b/package/network/utils/wwan/files/data/19d2-0086 index f25d77a60e7b8f..0527f6fed7bd6f 100644 --- a/package/network/utils/wwan/files/data/19d2-0086 +++ b/package/network/utils/wwan/files/data/19d2-0086 @@ -2,4 +2,4 @@ "desc": "ZTE MF645", "control": 1, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0091 b/package/network/utils/wwan/files/data/19d2-0091 index 4e429a6329246e..be9cb55bd60c21 100644 --- a/package/network/utils/wwan/files/data/19d2-0091 +++ b/package/network/utils/wwan/files/data/19d2-0091 @@ -2,4 +2,4 @@ "desc": "ZTE MF636", "control": 1, "data": 3 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0094 b/package/network/utils/wwan/files/data/19d2-0094 index 34a976ebae0325..ed2fd2637f0ae0 100644 --- a/package/network/utils/wwan/files/data/19d2-0094 +++ b/package/network/utils/wwan/files/data/19d2-0094 @@ -2,4 +2,4 @@ "desc": "ZTE AC581", "control": 3, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0108 b/package/network/utils/wwan/files/data/19d2-0108 index 369d70f09d7483..aac3158c372acc 100644 --- a/package/network/utils/wwan/files/data/19d2-0108 +++ b/package/network/utils/wwan/files/data/19d2-0108 @@ -2,4 +2,4 @@ "desc": "ONDA MT505UP/ZTE", "control": 1, "data": 3 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0116 b/package/network/utils/wwan/files/data/19d2-0116 index bfe9b5d44ad8da..974edf4e341848 100644 --- a/package/network/utils/wwan/files/data/19d2-0116 +++ b/package/network/utils/wwan/files/data/19d2-0116 @@ -1,6 +1,6 @@ { "desc": "ZTE MF651", "control": 1, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-0117 b/package/network/utils/wwan/files/data/19d2-0117 index 8610bbf4190ac3..0cb57d9b224161 100644 --- a/package/network/utils/wwan/files/data/19d2-0117 +++ b/package/network/utils/wwan/files/data/19d2-0117 @@ -2,4 +2,4 @@ "desc": "ZTE MF112", "control": 1, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0128 b/package/network/utils/wwan/files/data/19d2-0128 index 620eb90f058b50..078932e7b624a8 100644 --- a/package/network/utils/wwan/files/data/19d2-0128 +++ b/package/network/utils/wwan/files/data/19d2-0128 @@ -2,4 +2,4 @@ "desc": "ZTE MF651", "control": 1, "data": 3 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0142 b/package/network/utils/wwan/files/data/19d2-0142 index 6d19e3e8dda1fa..db865819b5f9ee 100644 --- a/package/network/utils/wwan/files/data/19d2-0142 +++ b/package/network/utils/wwan/files/data/19d2-0142 @@ -1,6 +1,6 @@ { "desc": "ZTE MF665C", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-0143 b/package/network/utils/wwan/files/data/19d2-0143 index 6885a9b2e1463f..4208016e0786d7 100644 --- a/package/network/utils/wwan/files/data/19d2-0143 +++ b/package/network/utils/wwan/files/data/19d2-0143 @@ -1,6 +1,6 @@ { "desc": "ZTE MF190B", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-0152 b/package/network/utils/wwan/files/data/19d2-0152 index 20047be7a99c56..f5b84eb3a943f0 100644 --- a/package/network/utils/wwan/files/data/19d2-0152 +++ b/package/network/utils/wwan/files/data/19d2-0152 @@ -2,4 +2,4 @@ "desc": "ZTE AC583", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-0170 b/package/network/utils/wwan/files/data/19d2-0170 index d7d6f97a5b0aee..e7eb5aa43345e0 100644 --- a/package/network/utils/wwan/files/data/19d2-0170 +++ b/package/network/utils/wwan/files/data/19d2-0170 @@ -1,6 +1,6 @@ { "desc": "ZTE A371", "control": 0, - "data": 1 -} "generic": 1 + "data": 1, + "generic": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1003 b/package/network/utils/wwan/files/data/19d2-1003 index a7d0eb5aa179e2..d91f388cddf096 100644 --- a/package/network/utils/wwan/files/data/19d2-1003 +++ b/package/network/utils/wwan/files/data/19d2-1003 @@ -1,6 +1,6 @@ { "desc": "ZTE K3805-Z", "control": 1, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1015 b/package/network/utils/wwan/files/data/19d2-1015 index a5eab00e93c5a0..5d3e5a6c238530 100644 --- a/package/network/utils/wwan/files/data/19d2-1015 +++ b/package/network/utils/wwan/files/data/19d2-1015 @@ -1,6 +1,6 @@ { "desc": "ZTE K3806-Z", "control": 1, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1172 b/package/network/utils/wwan/files/data/19d2-1172 index 1b4c728f960988..7f6805b4b17f01 100644 --- a/package/network/utils/wwan/files/data/19d2-1172 +++ b/package/network/utils/wwan/files/data/19d2-1172 @@ -1,6 +1,6 @@ { "desc": "ZTE K4510-Z", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1173 b/package/network/utils/wwan/files/data/19d2-1173 index 1b4c728f960988..7f6805b4b17f01 100644 --- a/package/network/utils/wwan/files/data/19d2-1173 +++ b/package/network/utils/wwan/files/data/19d2-1173 @@ -1,6 +1,6 @@ { "desc": "ZTE K4510-Z", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1177 b/package/network/utils/wwan/files/data/19d2-1177 index 3d196af4493346..b5113e98303bfd 100644 --- a/package/network/utils/wwan/files/data/19d2-1177 +++ b/package/network/utils/wwan/files/data/19d2-1177 @@ -1,6 +1,6 @@ { "desc": "ZTE K3770-Z", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1181 b/package/network/utils/wwan/files/data/19d2-1181 index 5ee7b2f2081a6a..bad2bd84a2ca69 100644 --- a/package/network/utils/wwan/files/data/19d2-1181 +++ b/package/network/utils/wwan/files/data/19d2-1181 @@ -1,6 +1,6 @@ { "desc": "ZTE K3772-Z", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1203 b/package/network/utils/wwan/files/data/19d2-1203 index 4502531243552b..7155ac70bffad8 100644 --- a/package/network/utils/wwan/files/data/19d2-1203 +++ b/package/network/utils/wwan/files/data/19d2-1203 @@ -1,6 +1,6 @@ { "desc": "ZTE MF691", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1208 b/package/network/utils/wwan/files/data/19d2-1208 index d8bc573a1f5c8e..9884b7d48eec7c 100644 --- a/package/network/utils/wwan/files/data/19d2-1208 +++ b/package/network/utils/wwan/files/data/19d2-1208 @@ -1,6 +1,6 @@ { "desc": "ZTE MF192", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1211 b/package/network/utils/wwan/files/data/19d2-1211 index 0df58f0aed2388..807068fa00ed51 100644 --- a/package/network/utils/wwan/files/data/19d2-1211 +++ b/package/network/utils/wwan/files/data/19d2-1211 @@ -1,6 +1,6 @@ { "desc": "ZTE MF195", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1212 b/package/network/utils/wwan/files/data/19d2-1212 index 0df58f0aed2388..807068fa00ed51 100644 --- a/package/network/utils/wwan/files/data/19d2-1212 +++ b/package/network/utils/wwan/files/data/19d2-1212 @@ -1,6 +1,6 @@ { "desc": "ZTE MF195", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1217 b/package/network/utils/wwan/files/data/19d2-1217 index d8bc573a1f5c8e..9884b7d48eec7c 100644 --- a/package/network/utils/wwan/files/data/19d2-1217 +++ b/package/network/utils/wwan/files/data/19d2-1217 @@ -1,6 +1,6 @@ { "desc": "ZTE MF192", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1218 b/package/network/utils/wwan/files/data/19d2-1218 index d8bc573a1f5c8e..9884b7d48eec7c 100644 --- a/package/network/utils/wwan/files/data/19d2-1218 +++ b/package/network/utils/wwan/files/data/19d2-1218 @@ -1,6 +1,6 @@ { "desc": "ZTE MF192", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1220 b/package/network/utils/wwan/files/data/19d2-1220 index d8bc573a1f5c8e..9884b7d48eec7c 100644 --- a/package/network/utils/wwan/files/data/19d2-1220 +++ b/package/network/utils/wwan/files/data/19d2-1220 @@ -1,6 +1,6 @@ { "desc": "ZTE MF192", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1222 b/package/network/utils/wwan/files/data/19d2-1222 index d8bc573a1f5c8e..9884b7d48eec7c 100644 --- a/package/network/utils/wwan/files/data/19d2-1222 +++ b/package/network/utils/wwan/files/data/19d2-1222 @@ -1,6 +1,6 @@ { "desc": "ZTE MF192", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1512 b/package/network/utils/wwan/files/data/19d2-1512 index 7e4bbf75038e62..fa2c87dbbc9aba 100644 --- a/package/network/utils/wwan/files/data/19d2-1512 +++ b/package/network/utils/wwan/files/data/19d2-1512 @@ -1,6 +1,6 @@ { "desc": "ZTE MFxxx", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1515 b/package/network/utils/wwan/files/data/19d2-1515 index d8bc573a1f5c8e..9884b7d48eec7c 100644 --- a/package/network/utils/wwan/files/data/19d2-1515 +++ b/package/network/utils/wwan/files/data/19d2-1515 @@ -1,6 +1,6 @@ { "desc": "ZTE MF192", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1518 b/package/network/utils/wwan/files/data/19d2-1518 index d8bc573a1f5c8e..9884b7d48eec7c 100644 --- a/package/network/utils/wwan/files/data/19d2-1518 +++ b/package/network/utils/wwan/files/data/19d2-1518 @@ -1,6 +1,6 @@ { "desc": "ZTE MF192", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1519 b/package/network/utils/wwan/files/data/19d2-1519 index d8bc573a1f5c8e..9884b7d48eec7c 100644 --- a/package/network/utils/wwan/files/data/19d2-1519 +++ b/package/network/utils/wwan/files/data/19d2-1519 @@ -1,6 +1,6 @@ { "desc": "ZTE MF192", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1522 b/package/network/utils/wwan/files/data/19d2-1522 index 4c926f01866a28..1e19b2c53989d7 100644 --- a/package/network/utils/wwan/files/data/19d2-1522 +++ b/package/network/utils/wwan/files/data/19d2-1522 @@ -1,6 +1,6 @@ { "desc": "ZTE MF652", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1525 b/package/network/utils/wwan/files/data/19d2-1525 index 7a37c432c855bb..58e392c79fa267 100644 --- a/package/network/utils/wwan/files/data/19d2-1525 +++ b/package/network/utils/wwan/files/data/19d2-1525 @@ -1,6 +1,6 @@ { "desc": "ZTE MF591", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1527 b/package/network/utils/wwan/files/data/19d2-1527 index 6b46c73d76ab9b..c622100106a1c2 100644 --- a/package/network/utils/wwan/files/data/19d2-1527 +++ b/package/network/utils/wwan/files/data/19d2-1527 @@ -1,6 +1,6 @@ { "desc": "ZTE MF196", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1537 b/package/network/utils/wwan/files/data/19d2-1537 index a62516407d1b60..b58df7056bd018 100644 --- a/package/network/utils/wwan/files/data/19d2-1537 +++ b/package/network/utils/wwan/files/data/19d2-1537 @@ -1,6 +1,6 @@ { "desc": "ZTE MF190J", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1538 b/package/network/utils/wwan/files/data/19d2-1538 index a62516407d1b60..b58df7056bd018 100644 --- a/package/network/utils/wwan/files/data/19d2-1538 +++ b/package/network/utils/wwan/files/data/19d2-1538 @@ -1,6 +1,6 @@ { "desc": "ZTE MF190J", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-1544 b/package/network/utils/wwan/files/data/19d2-1544 index a62516407d1b60..b58df7056bd018 100644 --- a/package/network/utils/wwan/files/data/19d2-1544 +++ b/package/network/utils/wwan/files/data/19d2-1544 @@ -1,6 +1,6 @@ { "desc": "ZTE MF190J", "control": 0, - "data": 0 -} "acm": 1 + "data": 0, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-2003 b/package/network/utils/wwan/files/data/19d2-2003 index a2a08808621938..ae1da49ef7ddbf 100644 --- a/package/network/utils/wwan/files/data/19d2-2003 +++ b/package/network/utils/wwan/files/data/19d2-2003 @@ -2,4 +2,4 @@ "desc": "ZTE MF180", "control": 1, "data": 3 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-ffdd b/package/network/utils/wwan/files/data/19d2-ffdd index 71d1050a9381c0..e1220283a54d6a 100644 --- a/package/network/utils/wwan/files/data/19d2-ffdd +++ b/package/network/utils/wwan/files/data/19d2-ffdd @@ -2,4 +2,4 @@ "desc": "ZTE AC682", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-ffe4 b/package/network/utils/wwan/files/data/19d2-ffe4 index 03a16bff542965..d561593b74a9d0 100644 --- a/package/network/utils/wwan/files/data/19d2-ffe4 +++ b/package/network/utils/wwan/files/data/19d2-ffe4 @@ -1,6 +1,6 @@ { "desc": "ZTE AC3781", "control": 1, - "data": 0 -} "generic": 1 + "data": 0, + "generic": 1 } diff --git a/package/network/utils/wwan/files/data/19d2-ffe9 b/package/network/utils/wwan/files/data/19d2-ffe9 index 57531e26e7751a..3fe5f4b8826886 100644 --- a/package/network/utils/wwan/files/data/19d2-ffe9 +++ b/package/network/utils/wwan/files/data/19d2-ffe9 @@ -2,4 +2,4 @@ "desc": "ZTE AC2738", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-fff1 b/package/network/utils/wwan/files/data/19d2-fff1 index 4347f288a2ae4b..adf579ccdf8f79 100644 --- a/package/network/utils/wwan/files/data/19d2-fff1 +++ b/package/network/utils/wwan/files/data/19d2-fff1 @@ -2,4 +2,4 @@ "desc": "ZTE generic", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-fffb b/package/network/utils/wwan/files/data/19d2-fffb index 4ff616a0c08c63..fb3d59780b2b47 100644 --- a/package/network/utils/wwan/files/data/19d2-fffb +++ b/package/network/utils/wwan/files/data/19d2-fffb @@ -2,4 +2,4 @@ "desc": "ZTE MG880", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-fffc b/package/network/utils/wwan/files/data/19d2-fffc index 4ff616a0c08c63..fb3d59780b2b47 100644 --- a/package/network/utils/wwan/files/data/19d2-fffc +++ b/package/network/utils/wwan/files/data/19d2-fffc @@ -2,4 +2,4 @@ "desc": "ZTE MG880", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-fffd b/package/network/utils/wwan/files/data/19d2-fffd index 4ff616a0c08c63..fb3d59780b2b47 100644 --- a/package/network/utils/wwan/files/data/19d2-fffd +++ b/package/network/utils/wwan/files/data/19d2-fffd @@ -2,4 +2,4 @@ "desc": "ZTE MG880", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-fffe b/package/network/utils/wwan/files/data/19d2-fffe index 4e6004981a7113..faf983243ddf0f 100644 --- a/package/network/utils/wwan/files/data/19d2-fffe +++ b/package/network/utils/wwan/files/data/19d2-fffe @@ -2,4 +2,4 @@ "desc": "ZTE AC8700", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/19d2-ffff b/package/network/utils/wwan/files/data/19d2-ffff index 747fa238d1b18e..517dbb88a97180 100644 --- a/package/network/utils/wwan/files/data/19d2-ffff +++ b/package/network/utils/wwan/files/data/19d2-ffff @@ -2,4 +2,4 @@ "desc": "ZTE AC8710", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1a8d-1002 b/package/network/utils/wwan/files/data/1a8d-1002 index 93388be2fd659e..bf67e6571b376e 100644 --- a/package/network/utils/wwan/files/data/1a8d-1002 +++ b/package/network/utils/wwan/files/data/1a8d-1002 @@ -2,4 +2,4 @@ "desc": "Bandrich C-100/C-120", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1a8d-1003 b/package/network/utils/wwan/files/data/1a8d-1003 index 93388be2fd659e..bf67e6571b376e 100644 --- a/package/network/utils/wwan/files/data/1a8d-1003 +++ b/package/network/utils/wwan/files/data/1a8d-1003 @@ -2,4 +2,4 @@ "desc": "Bandrich C-100/C-120", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1a8d-1007 b/package/network/utils/wwan/files/data/1a8d-1007 index f013968f943028..9e482b133fd353 100644 --- a/package/network/utils/wwan/files/data/1a8d-1007 +++ b/package/network/utils/wwan/files/data/1a8d-1007 @@ -2,4 +2,4 @@ "desc": "Bandrich C-270", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1a8d-1009 b/package/network/utils/wwan/files/data/1a8d-1009 index 82e4bf03abc7f4..b1838340d6982e 100644 --- a/package/network/utils/wwan/files/data/1a8d-1009 +++ b/package/network/utils/wwan/files/data/1a8d-1009 @@ -2,4 +2,4 @@ "desc": "Bandrich C-170/C-180", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1a8d-100c b/package/network/utils/wwan/files/data/1a8d-100c index 1acb9eec5f8174..6f19f1fb3a63af 100644 --- a/package/network/utils/wwan/files/data/1a8d-100c +++ b/package/network/utils/wwan/files/data/1a8d-100c @@ -2,4 +2,4 @@ "desc": "Bandrich C-320", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1a8d-100d b/package/network/utils/wwan/files/data/1a8d-100d index 67db2b46cc7180..e96c51a881ada2 100644 --- a/package/network/utils/wwan/files/data/1a8d-100d +++ b/package/network/utils/wwan/files/data/1a8d-100d @@ -2,4 +2,4 @@ "desc": "Bandrich C-508", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1a8d-2006 b/package/network/utils/wwan/files/data/1a8d-2006 index 78f36cef182480..8164eed0b32929 100644 --- a/package/network/utils/wwan/files/data/1a8d-2006 +++ b/package/network/utils/wwan/files/data/1a8d-2006 @@ -1,6 +1,6 @@ { "desc": "Bandrich C-33x", "control": 0, - "data": 1 -} "acm": 1 + "data": 1, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/1bbb-0000 b/package/network/utils/wwan/files/data/1bbb-0000 index 0be73afa18672b..5b445a35f66a45 100644 --- a/package/network/utils/wwan/files/data/1bbb-0000 +++ b/package/network/utils/wwan/files/data/1bbb-0000 @@ -2,4 +2,4 @@ "desc": "Alcatel X060S/X070S/X080S/X200", "control": 2, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/1bbb-0012 b/package/network/utils/wwan/files/data/1bbb-0012 index 3eecac0e5294d7..9ba190f2eedf69 100644 --- a/package/network/utils/wwan/files/data/1bbb-0012 +++ b/package/network/utils/wwan/files/data/1bbb-0012 @@ -1,6 +1,6 @@ { "desc": "Alcatel X085C", "control": 2, - "data": 2 -} "generic": 1 + "data": 2, + "generic": 1 } diff --git a/package/network/utils/wwan/files/data/1bbb-0017 b/package/network/utils/wwan/files/data/1bbb-0017 index 853c05c0b19927..ad488dde9de9be 100644 --- a/package/network/utils/wwan/files/data/1bbb-0017 +++ b/package/network/utils/wwan/files/data/1bbb-0017 @@ -2,4 +2,4 @@ "desc": "Alcatel X220L", "control": 4, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1bbb-0052 b/package/network/utils/wwan/files/data/1bbb-0052 index 853c05c0b19927..ad488dde9de9be 100644 --- a/package/network/utils/wwan/files/data/1bbb-0052 +++ b/package/network/utils/wwan/files/data/1bbb-0052 @@ -2,4 +2,4 @@ "desc": "Alcatel X220L", "control": 4, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1bbb-00b7 b/package/network/utils/wwan/files/data/1bbb-00b7 index 9eaffe6609d4d3..0fbf6de1afc554 100644 --- a/package/network/utils/wwan/files/data/1bbb-00b7 +++ b/package/network/utils/wwan/files/data/1bbb-00b7 @@ -2,4 +2,4 @@ "desc": "Alcatel X600", "control": 0, "data": 4 -}} +} diff --git a/package/network/utils/wwan/files/data/1bbb-00ca b/package/network/utils/wwan/files/data/1bbb-00ca index 80d71fad541cd5..e40cc863df403b 100644 --- a/package/network/utils/wwan/files/data/1bbb-00ca +++ b/package/network/utils/wwan/files/data/1bbb-00ca @@ -1,6 +1,6 @@ { "desc": "Alcatel X080C", "control": 0, - "data": 0 -} "generic": 1 + "data": 0, + "generic": 1 } diff --git a/package/network/utils/wwan/files/data/1c9e-6060 b/package/network/utils/wwan/files/data/1c9e-6060 index 6f77bb4b97c623..8786375330ab75 100644 --- a/package/network/utils/wwan/files/data/1c9e-6060 +++ b/package/network/utils/wwan/files/data/1c9e-6060 @@ -1,6 +1,6 @@ { "desc": "Alcatel X020 & X030", "control": 2, - "data": 0 -} "generic": 1 + "data": 0, + "generic": 1 } diff --git a/package/network/utils/wwan/files/data/1c9e-6061 b/package/network/utils/wwan/files/data/1c9e-6061 index 6f77bb4b97c623..8786375330ab75 100644 --- a/package/network/utils/wwan/files/data/1c9e-6061 +++ b/package/network/utils/wwan/files/data/1c9e-6061 @@ -1,6 +1,6 @@ { "desc": "Alcatel X020 & X030", "control": 2, - "data": 0 -} "generic": 1 + "data": 0, + "generic": 1 } diff --git a/package/network/utils/wwan/files/data/1c9e-9000 b/package/network/utils/wwan/files/data/1c9e-9000 index 39dcd776ea160e..28566b3118c41c 100644 --- a/package/network/utils/wwan/files/data/1c9e-9000 +++ b/package/network/utils/wwan/files/data/1c9e-9000 @@ -1,6 +1,6 @@ { "desc": "4G Systems XS Stick W14", "control": 0, - "data": 0 -} "generic": 1 + "data": 0, + "generic": 1 } diff --git a/package/network/utils/wwan/files/data/1c9e-9603 b/package/network/utils/wwan/files/data/1c9e-9603 index fd3f099d1ba0b5..44f62eb1ab4ba9 100644 --- a/package/network/utils/wwan/files/data/1c9e-9603 +++ b/package/network/utils/wwan/files/data/1c9e-9603 @@ -2,4 +2,4 @@ "desc": "4G Systems XS Stick W14", "control": 1, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/1c9e-9605 b/package/network/utils/wwan/files/data/1c9e-9605 index c2992c16eaca47..fafcefdfa2673d 100644 --- a/package/network/utils/wwan/files/data/1c9e-9605 +++ b/package/network/utils/wwan/files/data/1c9e-9605 @@ -2,4 +2,4 @@ "desc": "4G Systems XS Stick W14", "control": 1, "data": 3 -}} +} diff --git a/package/network/utils/wwan/files/data/1c9e-9607 b/package/network/utils/wwan/files/data/1c9e-9607 index c2992c16eaca47..fafcefdfa2673d 100644 --- a/package/network/utils/wwan/files/data/1c9e-9607 +++ b/package/network/utils/wwan/files/data/1c9e-9607 @@ -2,4 +2,4 @@ "desc": "4G Systems XS Stick W14", "control": 1, "data": 3 -}} +} diff --git a/package/network/utils/wwan/files/data/1c9e-9801 b/package/network/utils/wwan/files/data/1c9e-9801 index 40dcc760556471..dced60d9d41f7a 100644 --- a/package/network/utils/wwan/files/data/1c9e-9801 +++ b/package/network/utils/wwan/files/data/1c9e-9801 @@ -1,6 +1,6 @@ { "desc": "4G Systems XS Stick W21", "control": 2, - "data": 1 -} "generic": 1 + "data": 1, + "generic": 1 } diff --git a/package/network/utils/wwan/files/data/1c9e-9900 b/package/network/utils/wwan/files/data/1c9e-9900 index 42da3abaf15048..efbb056f23c22d 100644 --- a/package/network/utils/wwan/files/data/1c9e-9900 +++ b/package/network/utils/wwan/files/data/1c9e-9900 @@ -1,6 +1,6 @@ { "desc": "Softbank C02LC", "control": 1, - "data": 2 -} "generic": 1 + "data": 2, + "generic": 1 } diff --git a/package/network/utils/wwan/files/data/1e0e-9000 b/package/network/utils/wwan/files/data/1e0e-9000 index bdb159da1d5992..5b83213802bb21 100644 --- a/package/network/utils/wwan/files/data/1e0e-9000 +++ b/package/network/utils/wwan/files/data/1e0e-9000 @@ -2,4 +2,4 @@ "desc": "PROLink PHS100, Hyundai MB-810, A-Link 3GU", "control": 1, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/1e0e-9100 b/package/network/utils/wwan/files/data/1e0e-9100 index d1b2dda7be412f..b89257f5274723 100644 --- a/package/network/utils/wwan/files/data/1e0e-9100 +++ b/package/network/utils/wwan/files/data/1e0e-9100 @@ -2,4 +2,4 @@ "desc": "PROLink PHS300, A-Link 3GU", "control": 1, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/1e0e-9200 b/package/network/utils/wwan/files/data/1e0e-9200 index bdb159da1d5992..5b83213802bb21 100644 --- a/package/network/utils/wwan/files/data/1e0e-9200 +++ b/package/network/utils/wwan/files/data/1e0e-9200 @@ -2,4 +2,4 @@ "desc": "PROLink PHS100, Hyundai MB-810, A-Link 3GU", "control": 1, "data": 2 -}} +} diff --git a/package/network/utils/wwan/files/data/1e0e-ce16 b/package/network/utils/wwan/files/data/1e0e-ce16 index 93e0c3fa13fc3b..d9088e97c9576e 100644 --- a/package/network/utils/wwan/files/data/1e0e-ce16 +++ b/package/network/utils/wwan/files/data/1e0e-ce16 @@ -2,4 +2,4 @@ "desc": "D-Link DWM-162-U5, Micromax MMX 300c", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/1e0e-cefe b/package/network/utils/wwan/files/data/1e0e-cefe index ebc941dfb111a3..78d6148597c85b 100644 --- a/package/network/utils/wwan/files/data/1e0e-cefe +++ b/package/network/utils/wwan/files/data/1e0e-cefe @@ -1,6 +1,6 @@ { "desc": "D-Link DWM-162-U5, Micromax MMX 300c", "control": 1, - "data": 2 -} "generic": 1 + "data": 2, + "generic": 1 } diff --git a/package/network/utils/wwan/files/data/2001-7d00 b/package/network/utils/wwan/files/data/2001-7d00 index b0cc4791252855..3b5a3a2e53241d 100644 --- a/package/network/utils/wwan/files/data/2001-7d00 +++ b/package/network/utils/wwan/files/data/2001-7d00 @@ -1,6 +1,6 @@ { "desc": "D-Link DWM-156 A6", "control": 1, - "data": 0 -} "generic": 1 + "data": 0, + "generic": 1 } diff --git a/package/network/utils/wwan/files/data/2001-7d01 b/package/network/utils/wwan/files/data/2001-7d01 index ab8fd9ded71d33..9f039b12c0654c 100644 --- a/package/network/utils/wwan/files/data/2001-7d01 +++ b/package/network/utils/wwan/files/data/2001-7d01 @@ -2,4 +2,4 @@ "desc": "D-Link DWM-156 A7", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/2001-7d02 b/package/network/utils/wwan/files/data/2001-7d02 index ab8fd9ded71d33..9f039b12c0654c 100644 --- a/package/network/utils/wwan/files/data/2001-7d02 +++ b/package/network/utils/wwan/files/data/2001-7d02 @@ -2,4 +2,4 @@ "desc": "D-Link DWM-156 A7", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/2001-7d03 b/package/network/utils/wwan/files/data/2001-7d03 index ab8fd9ded71d33..9f039b12c0654c 100644 --- a/package/network/utils/wwan/files/data/2001-7d03 +++ b/package/network/utils/wwan/files/data/2001-7d03 @@ -2,4 +2,4 @@ "desc": "D-Link DWM-156 A7", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/211f-6801 b/package/network/utils/wwan/files/data/211f-6801 index 06cdddca9ead43..07f114847db6ed 100644 --- a/package/network/utils/wwan/files/data/211f-6801 +++ b/package/network/utils/wwan/files/data/211f-6801 @@ -2,4 +2,4 @@ "desc": "Celot K-3000/CT-650/CT-680", "control": 2, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/413c-8114 b/package/network/utils/wwan/files/data/413c-8114 index a3cb2cd7436853..c0b767840460c0 100644 --- a/package/network/utils/wwan/files/data/413c-8114 +++ b/package/network/utils/wwan/files/data/413c-8114 @@ -2,4 +2,4 @@ "desc": "Dell 5700", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/413c-8115 b/package/network/utils/wwan/files/data/413c-8115 index af27cbe0799b37..3f99a0bd8ed054 100644 --- a/package/network/utils/wwan/files/data/413c-8115 +++ b/package/network/utils/wwan/files/data/413c-8115 @@ -2,4 +2,4 @@ "desc": "Dell 5500", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/413c-8116 b/package/network/utils/wwan/files/data/413c-8116 index 31b79bf98f1c81..ff18d6a46b6f3a 100644 --- a/package/network/utils/wwan/files/data/413c-8116 +++ b/package/network/utils/wwan/files/data/413c-8116 @@ -2,4 +2,4 @@ "desc": "Dell 5505", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/413c-8117 b/package/network/utils/wwan/files/data/413c-8117 index a3cb2cd7436853..c0b767840460c0 100644 --- a/package/network/utils/wwan/files/data/413c-8117 +++ b/package/network/utils/wwan/files/data/413c-8117 @@ -2,4 +2,4 @@ "desc": "Dell 5700", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/413c-8118 b/package/network/utils/wwan/files/data/413c-8118 index b92d4151419635..0404557c60d480 100644 --- a/package/network/utils/wwan/files/data/413c-8118 +++ b/package/network/utils/wwan/files/data/413c-8118 @@ -2,4 +2,4 @@ "desc": "Dell 5510", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/413c-8128 b/package/network/utils/wwan/files/data/413c-8128 index a3cb2cd7436853..c0b767840460c0 100644 --- a/package/network/utils/wwan/files/data/413c-8128 +++ b/package/network/utils/wwan/files/data/413c-8128 @@ -2,4 +2,4 @@ "desc": "Dell 5700", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/413c-8129 b/package/network/utils/wwan/files/data/413c-8129 index a3cb2cd7436853..c0b767840460c0 100644 --- a/package/network/utils/wwan/files/data/413c-8129 +++ b/package/network/utils/wwan/files/data/413c-8129 @@ -2,4 +2,4 @@ "desc": "Dell 5700", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/413c-8133 b/package/network/utils/wwan/files/data/413c-8133 index 4ae84020fe0f8d..7940b3399f953b 100644 --- a/package/network/utils/wwan/files/data/413c-8133 +++ b/package/network/utils/wwan/files/data/413c-8133 @@ -2,4 +2,4 @@ "desc": "Dell 5720", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/413c-8134 b/package/network/utils/wwan/files/data/413c-8134 index 4ae84020fe0f8d..7940b3399f953b 100644 --- a/package/network/utils/wwan/files/data/413c-8134 +++ b/package/network/utils/wwan/files/data/413c-8134 @@ -2,4 +2,4 @@ "desc": "Dell 5720", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/413c-8135 b/package/network/utils/wwan/files/data/413c-8135 index 4ae84020fe0f8d..7940b3399f953b 100644 --- a/package/network/utils/wwan/files/data/413c-8135 +++ b/package/network/utils/wwan/files/data/413c-8135 @@ -2,4 +2,4 @@ "desc": "Dell 5720", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/413c-8136 b/package/network/utils/wwan/files/data/413c-8136 index d2bf508fe9b72e..fffa1e8582cbdb 100644 --- a/package/network/utils/wwan/files/data/413c-8136 +++ b/package/network/utils/wwan/files/data/413c-8136 @@ -2,4 +2,4 @@ "desc": "Dell 5520", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/413c-8137 b/package/network/utils/wwan/files/data/413c-8137 index d2bf508fe9b72e..fffa1e8582cbdb 100644 --- a/package/network/utils/wwan/files/data/413c-8137 +++ b/package/network/utils/wwan/files/data/413c-8137 @@ -2,4 +2,4 @@ "desc": "Dell 5520", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/413c-8138 b/package/network/utils/wwan/files/data/413c-8138 index d2bf508fe9b72e..fffa1e8582cbdb 100644 --- a/package/network/utils/wwan/files/data/413c-8138 +++ b/package/network/utils/wwan/files/data/413c-8138 @@ -2,4 +2,4 @@ "desc": "Dell 5520", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/413c-8147 b/package/network/utils/wwan/files/data/413c-8147 index f0b0638fd55b6d..e9aff093a0db79 100644 --- a/package/network/utils/wwan/files/data/413c-8147 +++ b/package/network/utils/wwan/files/data/413c-8147 @@ -1,6 +1,6 @@ { "desc": "Dell 5530", "control": 0, - "data": 1 -} "acm": 1 + "data": 1, + "acm": 1 } diff --git a/package/network/utils/wwan/files/data/413c-8180 b/package/network/utils/wwan/files/data/413c-8180 index 1ae44053c820e5..d3ac0d8cd62364 100644 --- a/package/network/utils/wwan/files/data/413c-8180 +++ b/package/network/utils/wwan/files/data/413c-8180 @@ -2,4 +2,4 @@ "desc": "Dell 5730", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/413c-8181 b/package/network/utils/wwan/files/data/413c-8181 index 1ae44053c820e5..d3ac0d8cd62364 100644 --- a/package/network/utils/wwan/files/data/413c-8181 +++ b/package/network/utils/wwan/files/data/413c-8181 @@ -2,4 +2,4 @@ "desc": "Dell 5730", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/413c-8182 b/package/network/utils/wwan/files/data/413c-8182 index 1ae44053c820e5..d3ac0d8cd62364 100644 --- a/package/network/utils/wwan/files/data/413c-8182 +++ b/package/network/utils/wwan/files/data/413c-8182 @@ -2,4 +2,4 @@ "desc": "Dell 5730", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/wwan/files/data/413c-819b b/package/network/utils/wwan/files/data/413c-819b index e66c3fc4c217d1..575410bdf4dd25 100644 --- a/package/network/utils/wwan/files/data/413c-819b +++ b/package/network/utils/wwan/files/data/413c-819b @@ -2,4 +2,4 @@ "desc": "Dell 5804", "control": 1, "data": 0 -}} +} diff --git a/package/network/utils/xtables-addons/Makefile b/package/network/utils/xtables-addons/Makefile index a1415fc18bbc7a..0c12d7464335e7 100644 --- a/package/network/utils/xtables-addons/Makefile +++ b/package/network/utils/xtables-addons/Makefile @@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=xtables-addons -PKG_VERSION:=2.13 +PKG_VERSION:=2.14 PKG_RELEASE:=1 -PKG_HASH:=d141879d438424764e953b97fbb16edafdf8ef6baa57f6e36e07b894a7775dfc +PKG_HASH:=d215a9a8b8e66aae04b982fa2e1228e8a71e7dfe42320df99e34e5000cbdf152 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@SF/xtables-addons @@ -43,8 +43,7 @@ CONFIGURE_ARGS+= \ define Build/Compile +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ + $(KERNEL_MAKE_FLAGS) \ DESTDIR="$(PKG_INSTALL_DIR)" \ DEPMOD="/bin/true" \ all @@ -52,8 +51,7 @@ endef define Build/Install $(MAKE) -C $(PKG_BUILD_DIR) \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ + $(KERNEL_MAKE_FLAGS) \ DESTDIR="$(PKG_INSTALL_DIR)" \ DEPMOD="/bin/true" \ install diff --git a/package/network/utils/xtables-addons/patches/201-fix-lua-packetscript.patch b/package/network/utils/xtables-addons/patches/201-fix-lua-packetscript.patch index 7599684bdb8858..a9fb796d0965fd 100644 --- a/package/network/utils/xtables-addons/patches/201-fix-lua-packetscript.patch +++ b/package/network/utils/xtables-addons/patches/201-fix-lua-packetscript.patch @@ -1,5 +1,14 @@ --- a/extensions/LUA/xt_LUA_target.c +++ b/extensions/LUA/xt_LUA_target.c +@@ -19,7 +19,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include "xt_LUA.h" @@ -64,10 +64,10 @@ uint32_t lua_state_refs[LUA_STATE_ARRAY * XT_CONTINUE inside the *register_lua_packet_lib* function. */ diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile index dd54d6b197a8e8..61fc5daa8bf1d7 100644 --- a/package/system/fstools/Makefile +++ b/package/system/fstools/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/fstools.git -PKG_SOURCE_DATE:=2017-07-31 -PKG_SOURCE_VERSION:=8ab4fda66a136f5b0f1e5dff9d3649961ffc9158 -PKG_MIRROR_HASH:=f04712fbefbcc2af1da9364310ac6dd771322c3ce2d920d2c003aaea97dbe4b4 +PKG_SOURCE_DATE:=2018-01-02 +PKG_SOURCE_VERSION:=11efbf3b90f031ce634fc38cad07a4aef2985777 +PKG_MIRROR_HASH:=35f14ea0ed799d2eb972f4901116a0e447d4bc1e37fb0edb239c44b270aeae18 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 diff --git a/package/system/opkg/Makefile b/package/system/opkg/Makefile index 499de217cc537c..f00e574de08d0f 100644 --- a/package/system/opkg/Makefile +++ b/package/system/opkg/Makefile @@ -7,33 +7,26 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -include $(INCLUDE_DIR)/version.mk -include $(INCLUDE_DIR)/feeds.mk PKG_NAME:=opkg -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_FLAGS:=essential PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://git.lede-project.org/project/opkg-lede.git -PKG_SOURCE_DATE:=2017-07-28 -PKG_SOURCE_VERSION:=4bd8601ebd95c130e504cc724b0c5eb163050982 -PKG_MIRROR_HASH:=adb2d610185a83fb630ccd3f0c80cb8acfd89260e0a5e598aadb8c8f0d903cf5 +PKG_SOURCE_URL:=https://git.openwrt.org/project/opkg-lede.git +PKG_SOURCE_DATE:=2017-12-07 +PKG_SOURCE_VERSION:=3b417b9f41b4ceb5912d82f867dd5534e5675b5c +PKG_MIRROR_HASH:=1c9c21e56186345d0034d15051c1d9c5ebb5aa6658d6ae8886d8403207a914a3 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING PKG_MAINTAINER:=Jo-Philipp Wich -PKG_FLAGS := nonshared - -PKG_CONFIG_DEPENDS := \ +# Extend depends from version.mk +PKG_CONFIG_DEPENDS += \ CONFIG_SIGNED_PACKAGES \ - CONFIG_TARGET_INIT_PATH \ - CONFIG_PER_FEED_REPO \ - CONFIG_PER_FEED_REPO_ADD_DISABLED \ - CONFIG_PER_FEED_REPO_ADD_COMMENTED \ - $(foreach feed,$(FEEDS_INSTALLED),CONFIG_FEED_$(feed)) + CONFIG_TARGET_INIT_PATH PKG_BUILD_PARALLEL:=1 HOST_BUILD_PARALLEL:=1 @@ -50,7 +43,7 @@ define Package/opkg CATEGORY:=Base system TITLE:=opkg package manager DEPENDS:=+uclient-fetch +libpthread +libubox - URL:=https://git.lede-project.org/?p=project/opkg-lede.git + URL:=$(PKG_SOURCE_URL) MENU:=1 endef @@ -93,8 +86,6 @@ define Package/opkg/install $(INSTALL_DIR) $(1)/etc/uci-defaults $(INSTALL_DATA) ./files/customfeeds.conf $(1)/etc/opkg/customfeeds.conf $(INSTALL_DATA) ./files/opkg$(2).conf $(1)/etc/opkg.conf - $(call FeedSourcesAppend,$(1)/etc/opkg/distfeeds.conf) - $(VERSION_SED) $(1)/etc/opkg/distfeeds.conf $(INSTALL_BIN) ./files/20_migrate-feeds $(1)/etc/uci-defaults/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/opkg-cl $(1)/bin/opkg ifneq ($(CONFIG_SIGNED_PACKAGES),) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 5f2d21c102c778..7c8a1669b0b97a 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=procd -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/procd.git -PKG_SOURCE_DATE:=2017-08-22 -PKG_SOURCE_VERSION:=54b46a351fab736a92221a6f9c750b5f9da499a1 -PKG_MIRROR_HASH:=dcbeea89910bbdf7d6cf20c38892d6c51de375c8b35c372a7106ae17090694f3 +PKG_SOURCE_DATE:=2018-12-02 +PKG_SOURCE_VERSION:=a5954cf302fe46d8e29770c818336763112b9a6e +PKG_MIRROR_HASH:=1afa1f0160dd8ffac310e75519601c1f9a6107d818f405bb3fe9ef3e7143c2e3 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 @@ -87,9 +87,8 @@ ifdef CONFIG_PACKAGE_procd-ujail CMAKE_OPTIONS += -DJAIL_SUPPORT=1 endif -ifdef CONFIG_PACKAGE_procd-seccomp - CMAKE_OPTIONS += -DSECCOMP_SUPPORT=1 -DUTRACE_SUPPORT=1 -endif +SECCOMP=$(if $(CONFIG_PACKAGE_procd-seccomp),1,0) +CMAKE_OPTIONS += -DSECCOMP_SUPPORT=$(SECCOMP) -DUTRACE_SUPPORT=$(SECCOMP) define Package/procd/install $(INSTALL_DIR) $(1)/sbin $(1)/etc $(1)/lib/functions @@ -110,6 +109,7 @@ define Package/procd-seccomp/install $(INSTALL_DIR) $(1)/sbin $(1)/lib $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libpreload-seccomp.so $(1)/lib $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/utrace $(1)/sbin/ + $(LN) utrace $(1)/sbin/seccomp-trace $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libpreload-trace.so $(1)/lib endef diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh index c23c37b83f00d7..b4b6faa6627af4 100644 --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -38,6 +38,20 @@ PROCD_RELOAD_DELAY=1000 _PROCD_SERVICE= +procd_lock() { + local basescript=$(readlink "$initscript") + local service_name="$(basename ${basescript:-$initscript})" + + flock -n 1000 &> /dev/null + if [ "$?" != "0" ]; then + exec 1000>/var/lock/procd_${service_name}.lock + flock 1000 + if [ "$?" != "0" ]; then + logger "warning: procd flock for $service_name failed" + fi + fi +} + _procd_call() { local old_cb @@ -47,6 +61,7 @@ _procd_call() { } _procd_wrapper() { + procd_lock while [ -n "$1" ]; do eval "$1() { _procd_call _$1 \"\$@\"; }" shift @@ -79,6 +94,9 @@ _procd_close_service() { _procd_open_trigger service_triggers _procd_close_trigger + _procd_open_data + service_data + _procd_close_data _procd_ubus_call ${1:-set} } @@ -134,6 +152,18 @@ _procd_close_trigger() { json_close_array } +_procd_open_data() { + let '_procd_data_open = _procd_data_open + 1' + [ "$_procd_data_open" -gt 1 ] && return + json_add_object "data" +} + +_procd_close_data() { + let '_procd_data_open = _procd_data_open - 1' + [ "$_procd_data_open" -lt 1 ] || return + json_close_object +} + _procd_open_validate() { json_select .. json_add_array "validate" @@ -383,6 +413,10 @@ _procd_send_signal() { local instance="$2" local signal="$3" + case "$signal" in + [A-Z]*) signal="$(kill -l "$signal" 2>/dev/null)" || return 1;; + esac + json_init json_add_string name "$service" [ -n "$instance" -a "$instance" != "*" ] && json_add_string instance "$instance" diff --git a/package/system/rpcd/Makefile b/package/system/rpcd/Makefile index d13f20eab41861..dc4bbb982931ea 100644 --- a/package/system/rpcd/Makefile +++ b/package/system/rpcd/Makefile @@ -12,10 +12,10 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/rpcd.git -PKG_SOURCE_DATE:=2016-12-03 -PKG_SOURCE_VERSION:=0577cfc1acdbaf30c31090e75045ba58d6dd8a78 +PKG_SOURCE_DATE:=2017-12-07 +PKG_SOURCE_VERSION:=cfe1e75c91bc1bac82e6caab3e652b0ebee59524 PKG_MAINTAINER:=Jo-Philipp Wich -PKG_MIRROR_HASH:=bbcd750df4867a57604e3b922e28f7a019cf940c3586d813d88001dc314e2a1c +PKG_MIRROR_HASH:=4857497c88115defbf6add68a37975ed79e8f992e65d7d0df56cd29288dea379 PKG_LICENSE:=ISC PKG_LICENSE_FILES:= diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile index d19f7551ae83c2..21119ee6dffd89 100644 --- a/package/system/ubox/Makefile +++ b/package/system/ubox/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/ubox.git -PKG_SOURCE_DATE:=2017-09-01 -PKG_SOURCE_VERSION:=b1bc8d5fb874cdd22701a08d0fb0de4330f86814 -PKG_MIRROR_HASH:=b07e750d941d691e2745aa3a058e504966b15d1db5636162dc686bad275eb296 +PKG_SOURCE_DATE:=2017-11-06 +PKG_SOURCE_VERSION:=2c0d9cfe05e9712d44622c6bb4558e97359bfb76 +PKG_MIRROR_HASH:=e545a29959a310fd7243ee2e799bf9f759894ea4e872010a781c3a65290377b6 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 diff --git a/package/system/ubus/Makefile b/package/system/ubus/Makefile index 4f3d4e8309d626..ce8b054b4edccc 100644 --- a/package/system/ubus/Makefile +++ b/package/system/ubus/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/ubus.git -PKG_SOURCE_DATE:=2017-02-18 -PKG_SOURCE_VERSION:=34c6e818e431cc53478a0f7c7c1eca07d194d692 -PKG_MIRROR_HASH:=fc4f1121faa4f5b8fa52ee25460b98b2e60e7d245aefa70e7f76c56ce5628fd5 +PKG_SOURCE_DATE:=2017-11-13 +PKG_SOURCE_VERSION:=5f87f5480ebf004d735dbf44259d08cf8affd305 +PKG_MIRROR_HASH:=a490348da86c6cdf0cbc8cc01b77fa6f708d86b94674fd312e0c822ca3d7eba0 CMAKE_INSTALL:=1 PKG_LICENSE:=LGPL-2.1 diff --git a/package/utils/adb/Makefile b/package/utils/adb/Makefile index 0861696527086c..c42c94d3a34e3a 100644 --- a/package/utils/adb/Makefile +++ b/package/utils/adb/Makefile @@ -28,7 +28,7 @@ define Package/adb DEPENDS:=+zlib +libopenssl +libpthread endef -define Package/bridge/description +define Package/adb/description Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device. endef diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in index 2a8d9dd3971466..4e429f43712cd7 100644 --- a/package/utils/busybox/Config-defaults.in +++ b/package/utils/busybox/Config-defaults.in @@ -1089,7 +1089,7 @@ config BUSYBOX_DEFAULT_FEATURE_FIND_MAXDEPTH default y config BUSYBOX_DEFAULT_FEATURE_FIND_NEWER bool - default n + default y config BUSYBOX_DEFAULT_FEATURE_FIND_INUM bool default n @@ -1497,7 +1497,7 @@ config BUSYBOX_DEFAULT_FINDFS default n config BUSYBOX_DEFAULT_FLOCK bool - default n + default y config BUSYBOX_DEFAULT_FDFLUSH bool default n diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile index 941e8283546686..8866756aeafe51 100644 --- a/package/utils/busybox/Makefile +++ b/package/utils/busybox/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=busybox PKG_VERSION:=1.27.2 -PKG_RELEASE:=1 +PKG_RELEASE:=3 PKG_FLAGS:=essential PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 @@ -20,9 +20,11 @@ PKG_HASH:=9d4be516b61e6480f156b11eb42577a13529f75d3383850bb75c50c285de63df PKG_BUILD_DEPENDS:=BUSYBOX_USE_LIBRPC:librpc BUSYBOX_CONFIG_PAM:libpam PKG_BUILD_PARALLEL:=1 PKG_CHECK_FORMAT_SECURITY:=0 +PKG_INSTALL:=1 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=LICENSE archival/libarchive/bz/LICENSE +PKG_CPE_ID:=cpe:/a:busybox:busybox include $(INCLUDE_DIR)/package.mk @@ -30,12 +32,6 @@ ifeq ($(DUMP),) STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell grep '^CONFIG_BUSYBOX_' $(TOPDIR)/.config | mkhash md5) endif -ifneq ($(findstring c,$(OPENWRT_VERBOSE)),) - BB_MAKE_VERBOSE := V=1 -else - BB_MAKE_VERBOSE := -endif - BUSYBOX_SYM=$(if $(CONFIG_BUSYBOX_CUSTOM),CONFIG,DEFAULT) BUSYBOX_IF_ENABLED=$(if $(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_$(1)),$(2)) @@ -47,6 +43,7 @@ define Package/busybox URL:=http://busybox.net/ DEPENDS:=+BUSYBOX_USE_LIBRPC:librpc +BUSYBOX_CONFIG_PAM:libpam +BUSYBOX_CONFIG_NTPD:jsonfilter MENU:=1 + PROVIDES:=ip ALTERNATIVES:=\ $(call BUSYBOX_IF_ENABLED,KILL, 100:/bin/kill:/bin/busybox) \ $(call BUSYBOX_IF_ENABLED,PS, 100:/bin/ps:/bin/busybox) \ @@ -74,59 +71,32 @@ endef # don't create a version string containing the actual timestamp export KCONFIG_NOTIMESTAMP=1 -define Build/Configure - rm -f $(PKG_BUILD_DIR)/.configured* - grep 'CONFIG_BUSYBOX_$(BUSYBOX_SYM)' $(TOPDIR)/.config | sed -e "s,\\(# \)\\?CONFIG_BUSYBOX_$(BUSYBOX_SYM)_\\(.*\\),\\1CONFIG_\\2,g" > $(PKG_BUILD_DIR)/.config - yes 'n' | $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - KBUILD_HAVE_NLS=no \ - ARCH="$(ARCH)" \ - $(BB_MAKE_VERBOSE) \ - oldconfig -endef LDLIBS:=m crypt +LDLIBS += $(call BUSYBOX_IF_ENABLED,PAM,pam pam_misc pthread) ifdef CONFIG_BUSYBOX_USE_LIBRPC - TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include - export LDFLAGS=$(TARGET_LDFLAGS) LDLIBS += rpc endif - -ifdef CONFIG_BUSYBOX_CONFIG_PAM - TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include - export LDFLAGS=$(TARGET_LDFLAGS) - LDLIBS += pam pam_misc pthread +ifeq ($(CONFIG_USE_GLIBC),y) + LDLIBS += $(call BUSYBOX_IF_ENABLED,NSLOOKUP_OPENWRT,resolv) endif -ifdef CONFIG_BUSYBOX_DEFAULT_NSLOOKUP_LEDE - ifeq ($(CONFIG_USE_GLIBC),y) - LDLIBS += resolv - endif +MAKE_VARS := +MAKE_FLAGS += \ + EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \ + LDLIBS="$(LDLIBS)" \ + SKIP_STRIP=y +ifneq ($(findstring c,$(OPENWRT_VERBOSE)),) + MAKE_FLAGS += V=1 endif -define Build/Compile - +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - KBUILD_HAVE_NLS=no \ - EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ - ARCH="$(ARCH)" \ - SKIP_STRIP=y \ - LDLIBS="$(LDLIBS)" \ - $(BB_MAKE_VERBOSE) \ - all - rm -rf $(PKG_INSTALL_DIR) - $(FIND) $(PKG_BUILD_DIR) -lname "*busybox" -exec rm \{\} \; - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ - ARCH="$(ARCH)" \ - CONFIG_PREFIX="$(PKG_INSTALL_DIR)" \ - LDLIBS="$(LDLIBS)" \ - $(BB_MAKE_VERBOSE) \ - install +MAKE_INSTALL_FLAGS += CONFIG_PREFIX="$(PKG_INSTALL_DIR)" + + +define Build/Configure + grep 'CONFIG_BUSYBOX_$(BUSYBOX_SYM)' $(TOPDIR)/.config | sed -e "s,\\(# \)\\?CONFIG_BUSYBOX_$(BUSYBOX_SYM)_\\(.*\\),\\1CONFIG_\\2,g" > $(PKG_BUILD_DIR)/.config + yes 'n' | $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) oldconfig endef define Package/busybox/install diff --git a/package/utils/busybox/patches/500-move-traceroute-applets-to-bin.patch b/package/utils/busybox/patches/500-move-traceroute-applets-to-bin.patch index 7fa06a68c7306f..3741e25c3f6e8c 100644 --- a/package/utils/busybox/patches/500-move-traceroute-applets-to-bin.patch +++ b/package/utils/busybox/patches/500-move-traceroute-applets-to-bin.patch @@ -1,7 +1,7 @@ --- a/networking/traceroute.c +++ b/networking/traceroute.c -@@ -239,8 +239,8 @@ - //config: Add option -I to use ICMP ECHO instead of UDP datagrams. +@@ -237,8 +237,8 @@ + //config: depends on TRACEROUTE || TRACEROUTE6 /* Needs socket(AF_INET, SOCK_RAW, IPPROTO_ICMP), therefore BB_SUID_MAYBE: */ -//applet:IF_TRACEROUTE(APPLET(traceroute, BB_DIR_USR_BIN, BB_SUID_MAYBE)) diff --git a/package/utils/busybox/patches/600-cve-2017-16544.patch b/package/utils/busybox/patches/600-cve-2017-16544.patch new file mode 100644 index 00000000000000..3b142bdd641441 --- /dev/null +++ b/package/utils/busybox/patches/600-cve-2017-16544.patch @@ -0,0 +1,35 @@ +From c3797d40a1c57352192c6106cc0f435e7d9c11e8 Mon Sep 17 00:00:00 2001 +From: Denys Vlasenko +Date: Tue, 7 Nov 2017 18:09:29 +0100 +Subject: lineedit: do not tab-complete any strings which have control + characters + +function old new delta +add_match 41 68 +27 + +Signed-off-by: Denys Vlasenko +--- + libbb/lineedit.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- a/libbb/lineedit.c ++++ b/libbb/lineedit.c +@@ -633,6 +633,18 @@ static void free_tab_completion_data(voi + + static void add_match(char *matched) + { ++ unsigned char *p = (unsigned char*)matched; ++ while (*p) { ++ /* ESC attack fix: drop any string with control chars */ ++ if (*p < ' ' ++ || (!ENABLE_UNICODE_SUPPORT && *p >= 0x7f) ++ || (ENABLE_UNICODE_SUPPORT && *p == 0x7f) ++ ) { ++ free(matched); ++ return; ++ } ++ p++; ++ } + matches = xrealloc_vector(matches, 4, num_matches); + matches[num_matches] = matched; + num_matches++; diff --git a/package/utils/bzip2/Makefile b/package/utils/bzip2/Makefile index 62c255a907e874..4c8b360de8b58a 100644 --- a/package/utils/bzip2/Makefile +++ b/package/utils/bzip2/Makefile @@ -18,6 +18,7 @@ PKG_MAINTAINER:=Steven Barth PKG_LICENSE:=BZIP2 PKG_LICENSE_FILES:=LICENSE +PKG_CPE_ID:=cpe:/a:bzip:bzip2 include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/utils/e2fsprogs/Makefile b/package/utils/e2fsprogs/Makefile index b10ba8a8624f28..068ce3edeccf6b 100644 --- a/package/utils/e2fsprogs/Makefile +++ b/package/utils/e2fsprogs/Makefile @@ -8,13 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=e2fsprogs -PKG_VERSION:=1.43.5 -PKG_HASH:=261f3d9ade383fbf032a19140c9c25e998cc0f71a1ae686614fb3ae0eb955a17 +PKG_VERSION:=1.43.7 +PKG_HASH:=2a6367289047d68d9ba6a46cf89ab9a1efd0556cde02a51ebaf414ff51edded9 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/tytso/e2fsprogs/v$(PKG_VERSION)/ PKG_LICENSE:=GPL-2.0 +PKG_CPE_ID:=cpe:/a:e2fsprogs_project:e2fsprogs PKG_BUILD_DEPENDS:=util-linux PKG_INSTALL:=1 @@ -45,7 +46,7 @@ define Package/libext2fs $(call Package/e2fsprogs/Default) SECTION:=libs CATEGORY:=Libraries - DEPENDS:=+libuuid + DEPENDS:=+libuuid +libblkid TITLE:=ext2/3/4 filesystem library endef @@ -109,18 +110,17 @@ endef TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections -CONFIGURE_VARS += \ - ac_cv_lib_pthread_sem_init=no - CONFIGURE_ARGS += \ --disable-testio-debug \ --enable-elf-shlibs \ --disable-libuuid \ - --enable-libblkid \ + --disable-libblkid \ --disable-uuidd \ --disable-tls \ --disable-nls \ - --disable-rpath + --disable-rpath \ + --disable-threads \ + --disable-fuse2fs define Build/Prepare $(call Build/Prepare/Default) @@ -139,7 +139,6 @@ define Build/Compile LDFLAGS=-Wl,--gc-sections \ BUILDCC="$(HOSTCC)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ - LIBBLKID="$(PKG_BUILD_DIR)/lib/libblkid.a -luuid" \ ELF_OTHER_LIBS="$(TARGET_LDFLAGS) -luuid" \ SYSLIBS="$(TARGET_LDFLAGS) -ldl -L$(PKG_BUILD_DIR)/lib/ -l:libcom_err.so.0.0" \ V=$(if $(findstring c,$(OPENWRT_VERBOSE)),1,) \ diff --git a/package/utils/f2fs-tools/Makefile b/package/utils/f2fs-tools/Makefile index 8a27c47adf13a1..3e8bf63f088c39 100644 --- a/package/utils/f2fs-tools/Makefile +++ b/package/utils/f2fs-tools/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=f2fs-tools -PKG_VERSION:=1.8.0 -PKG_RELEASE:=3 +PKG_VERSION:=1.9.0 +PKG_RELEASE:=1 PKG_LICENSE:=GPLv2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/ -PKG_HASH:=d4dbecf55560c548bf0758c9f641d1beec1e960b38cbbc19951195d5144d39ae +PKG_HASH:=77217562ae7011a6d81b7b3c43c42623db1796a57596408d6c8037def70d6cc7 PKG_FIXUP:=autoreconf PKG_BUILD_PARALLEL:=1 @@ -57,7 +57,8 @@ define Package/libf2fs endef CONFIGURE_ARGS += \ - --without-selinux + --without-selinux \ + --without-blkid CONFIGURE_VARS += \ ac_cv_file__git=no diff --git a/package/utils/f2fs-tools/patches/100-f2fs-WARNING-at-fs-f2fs-segment.c-718-update_sit_ent.patch b/package/utils/f2fs-tools/patches/100-f2fs-WARNING-at-fs-f2fs-segment.c-718-update_sit_ent.patch deleted file mode 100644 index d4e25397a30ead..00000000000000 --- a/package/utils/f2fs-tools/patches/100-f2fs-WARNING-at-fs-f2fs-segment.c-718-update_sit_ent.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 31873d5cdf8a97d5f7921451c54f6d293293c6cc Mon Sep 17 00:00:00 2001 -From: Jaegeuk Kim -Date: Wed, 23 Aug 2017 13:33:00 -0700 -Subject: [PATCH] mkfs.f2fs: fix missing cpu_to_le64 for checkpoint version - -The error on mips was reported by Stijn as follow. - -Commit 8399a29df92d6867d226df362edbf2e0efa527c1 in f2fs-tools -("mkfs.f2fs: give random checkpoint version") causes a bug when mounting -a filesystem created with it on a MIPS64 device running a 4.4(.83) -kernel. The following kernel warning appears several times per second, -for 30 seconds: - -[ 23.837262] ------------[ cut here ]------------ -[ 23.842039] WARNING: CPU: 0 PID: 935 at fs/f2fs/segment.c:718 -update_sit_entry+0x1c0/0x2b0() -[ 23.850507] Modules linked in: pppoe ppp_async l2tp_ppp iptable_nat -[ 24.174064] Call Trace: -[ 24.176527] [] show_stack+0x68/0xb4 -[ 24.181595] [] dump_stack+0x8c/0xc4 -[ 24.186660] [] warn_slowpath_common+0xa0/0xd0 -[ 24.192597] [] update_sit_entry+0x1c0/0x2b0 -[ 24.198353] [] refresh_sit_entry+0x70/0xf8 -[ 24.204022] [] allocate_data_block+0x1f0/0x310 -[ 24.210038] [] do_write_page+0x29c/0x2bc -[ 24.215532] [] write_data_page+0xa0/0xd8 -[ 24.221028] [] do_write_data_page+0xe4/0x384 -[ 24.226870] [] f2fs_write_data_page+0x208/0x464 -[ 24.232972] [] __f2fs_writepage+0x1c/0x74 -[ 24.238553] [] -f2fs_write_cache_pages.constprop.7+0x250/0x394 -[ 24.245869] [] f2fs_write_data_pages+0x130/0x1b0 -[ 24.252066] [] __filemap_fdatawrite_range+0xa0/0xd4 -[ 24.258515] [] sync_dirty_dir_inodes+0x94/0xd8 -[ 24.264530] [] write_checkpoint+0x108/0xb9c -[ 24.270283] [] f2fs_sync_fs+0x68/0xb0 -[ 24.275526] [] f2fs_sync_file+0x2e8/0x518 -[ 24.281107] [] do_fsync+0x38/0x70 -[ 24.285992] [] SyS_fsync+0x14/0x20 -[ 24.290972] [] syscall_common+0x34/0x58 -[ 24.296372] -[ 24.298096] ---[ end trace fd3ac44449b218ab ]--- - -Fix: 8399a29df92d68 ("mkfs.f2fs: give random checkpoint version") -Reported-And-Tested-by: Stijn Tintel -Signed-off-by: Jaegeuk Kim ---- - mkfs/f2fs_format.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c -index 92876b8..b379e80 100644 ---- a/mkfs/f2fs_format.c -+++ b/mkfs/f2fs_format.c -@@ -546,7 +546,7 @@ static int f2fs_write_check_point_pack(void) - } - - /* 1. cp page 1 of checkpoint pack 1 */ -- cp->checkpoint_ver = rand() | 0x1; -+ cp->checkpoint_ver = cpu_to_le64(rand() | 0x1); - set_cp(cur_node_segno[0], c.cur_seg[CURSEG_HOT_NODE]); - set_cp(cur_node_segno[1], c.cur_seg[CURSEG_WARM_NODE]); - set_cp(cur_node_segno[2], c.cur_seg[CURSEG_COLD_NODE]); --- -2.13.5 - diff --git a/package/utils/fuse/Makefile b/package/utils/fuse/Makefile index d0cefff1adc756..e853a8e0414114 100644 --- a/package/utils/fuse/Makefile +++ b/package/utils/fuse/Makefile @@ -18,6 +18,7 @@ PKG_HASH:=832432d1ad4f833c20e13b57cf40ce5277a9d33e483205fc63c78111b3358874 PKG_LICENSE:=LGPLv2.1 GPLv2 PKG_LICENSE_FILES:=COPYING.LIB COPYING +PKG_CPE_ID:=cpe:/a:fuse_project:fuse PKG_INSTALL:=1 diff --git a/package/utils/k3screenctrl/Makefile b/package/utils/k3screenctrl/Makefile deleted file mode 100644 index 6f862cec0d6128..00000000000000 --- a/package/utils/k3screenctrl/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=k3screenctrl -PKG_VERSION:=0.10 -PKG_RELEASE:=2 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/updateing/k3screenctrl.git -PKG_SOURCE_VERSION:=dd05ce9a5cb0cb6cebfc6b3b5823c7f6d75796ff -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) -PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) -PKG_MAINTAINER:=Hamster Tian - -include $(INCLUDE_DIR)/package.mk - -TARGET_CFLAGS+= -D_GNU_SOURCE - -define Package/k3screenctrl - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=@TARGET_bcm53xx_DEVICE_phicomm-k3 +@KERNEL_DEVMEM - TITLE:=LCD screen controller on PHICOMM K3 - URL:=https://github.com/updateing/k3-screen-ctrl -endef - -define Package/k3screenctrl/description - K3 Screen Controller (k3screenctrl) is a program utilizing -the LCD screen on PHICOMM K3 to display some stats. -endef - -define Package/k3screenctrl/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_DIR) $(1)/lib/k3screenctrl - $(INSTALL_DIR) $(1)/etc/init.d - - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/k3screenctrl $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/wan.sh $(1)/lib/k3screenctrl/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/wifi.sh $(1)/lib/k3screenctrl/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/port.sh $(1)/lib/k3screenctrl/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/basic.sh $(1)/lib/k3screenctrl/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/host.sh $(1)/lib/k3screenctrl/ - - $(INSTALL_BIN) ./files/k3screenctrl.init $(1)/etc/init.d/k3screenctrl -endef - -$(eval $(call BuildPackage,k3screenctrl)) diff --git a/package/utils/k3screenctrl/files/k3screenctrl.init b/package/utils/k3screenctrl/files/k3screenctrl.init deleted file mode 100755 index 5d3d190a28a4a1..00000000000000 --- a/package/utils/k3screenctrl/files/k3screenctrl.init +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=99 -STOP=99 - -SCRIPTS_BASE=/lib/k3screenctrl/ - -start() { - /usr/bin/k3screenctrl & -} - -stop() { - killall k3screenctrl -} diff --git a/package/utils/lua/patches/010-lua-5.1.3-lnum-full-260308.patch b/package/utils/lua/patches/010-lua-5.1.3-lnum-full-260308.patch index 74b8c6f8f07c82..ac0722c7073265 100644 --- a/package/utils/lua/patches/010-lua-5.1.3-lnum-full-260308.patch +++ b/package/utils/lua/patches/010-lua-5.1.3-lnum-full-260308.patch @@ -62,7 +62,7 @@ return (t == LUA_TNONE) ? "no value" : luaT_typenames[t]; } -@@ -264,6 +265,14 @@ LUA_API int lua_isnumber (lua_State *L, +@@ -264,6 +265,14 @@ LUA_API int lua_isnumber (lua_State *L, } @@ -77,7 +77,7 @@ LUA_API int lua_isstring (lua_State *L, int idx) { int t = lua_type(L, idx); return (t == LUA_TSTRING || t == LUA_TNUMBER); -@@ -309,31 +318,66 @@ LUA_API int lua_lessthan (lua_State *L, +@@ -309,31 +318,66 @@ LUA_API int lua_lessthan (lua_State *L, } @@ -162,7 +162,7 @@ case LUA_TNUMBER: { size_t l; lua_lock(L); /* `luaV_tostring' may create a new string */ -@@ -426,6 +471,8 @@ LUA_API void lua_pushnil (lua_State *L) +@@ -426,6 +471,8 @@ LUA_API void lua_pushnil (lua_State *L) } @@ -196,7 +196,7 @@ LUA_API void lua_pushlstring (lua_State *L, const char *s, size_t len) { -@@ -569,7 +626,7 @@ LUA_API void lua_rawgeti (lua_State *L, +@@ -569,7 +626,7 @@ LUA_API void lua_rawgeti (lua_State *L, lua_lock(L); o = index2adr(L, idx); api_check(L, ttistable(o)); @@ -205,7 +205,7 @@ api_incr_top(L); lua_unlock(L); } -@@ -597,6 +654,9 @@ LUA_API int lua_getmetatable (lua_State +@@ -597,6 +654,9 @@ LUA_API int lua_getmetatable (lua_State case LUA_TUSERDATA: mt = uvalue(obj)->metatable; break; @@ -215,7 +215,7 @@ default: mt = G(L)->mt[ttype(obj)]; break; -@@ -687,7 +747,7 @@ LUA_API void lua_rawseti (lua_State *L, +@@ -687,7 +747,7 @@ LUA_API void lua_rawseti (lua_State *L, api_checknelems(L, 1); o = index2adr(L, idx); api_check(L, ttistable(o)); @@ -224,7 +224,7 @@ luaC_barriert(L, hvalue(o), L->top-1); L->top--; lua_unlock(L); -@@ -721,7 +781,7 @@ LUA_API int lua_setmetatable (lua_State +@@ -721,7 +781,7 @@ LUA_API int lua_setmetatable (lua_State break; } default: { @@ -286,7 +286,7 @@ #define FREELIST_REF 0 /* free list of references */ -@@ -66,7 +66,7 @@ LUALIB_API int luaL_typerror (lua_State +@@ -66,7 +66,7 @@ LUALIB_API int luaL_typerror (lua_State static void tag_error (lua_State *L, int narg, int tag) { @@ -351,7 +351,7 @@ -@@ -54,20 +56,25 @@ static int luaB_tonumber (lua_State *L) +@@ -54,20 +56,25 @@ static int luaB_tonumber (lua_State *L) int base = luaL_optint(L, 2, 10); if (base == 10) { /* standard conversion */ luaL_checkany(L, 1); @@ -503,7 +503,7 @@ case VKNUM: case VTRUE: case VFALSE: -@@ -451,6 +489,10 @@ int luaK_exp2RK (FuncState *fs, expdesc +@@ -451,6 +489,10 @@ int luaK_exp2RK (FuncState *fs, expdesc if (fs->nk <= MAXINDEXRK) { /* constant fit in RK operand? */ e->u.s.info = (e->k == VNIL) ? nilK(fs) : (e->k == VKNUM) ? luaK_numberK(fs, e->u.nval) : @@ -896,7 +896,7 @@ lua_assert(isdigit(ls->current)); do { save_and_next(ls); -@@ -202,8 +215,9 @@ static void read_numeral (LexState *ls, +@@ -202,8 +215,9 @@ static void read_numeral (LexState *ls, save_and_next(ls); save(ls, '\0'); buffreplace(ls, '.', ls->decpoint); /* follow locale for decimal point */ @@ -1009,6 +1009,7 @@ -#define PI (3.14159265358979323846) -#define RADIANS_PER_DEGREE (PI/180.0) - +- +#ifdef LNUM_FLOAT +# define PI (3.14159265358979323846F) +#elif defined(M_PI) @@ -1017,7 +1018,7 @@ +# define PI (3.14159265358979323846264338327950288) +#endif +#define RADIANS_PER_DEGREE (PI/180) - ++ +#undef HUGE +#ifdef LNUM_FLOAT +# define HUGE HUGE_VALF @@ -2103,7 +2104,7 @@ case LUA_TBOOLEAN: return bvalue(t1) == bvalue(t2); /* boolean true must be 1 !! */ case LUA_TLIGHTUSERDATA: -@@ -86,21 +106,6 @@ int luaO_rawequalObj (const TValue *t1, +@@ -86,21 +106,6 @@ int luaO_rawequalObj (const TValue *t1, } } @@ -2606,7 +2607,7 @@ nums[ceillog2(k)]++; /* count as such */ return 1; } -@@ -308,7 +322,7 @@ static void resize (lua_State *L, Table +@@ -308,7 +322,7 @@ static void resize (lua_State *L, Table /* re-insert elements from vanishing slice */ for (i=nasize; iarray[i])) @@ -2650,7 +2651,7 @@ } while (n); return luaO_nilobject; } -@@ -470,14 +487,12 @@ const TValue *luaH_get (Table *t, const +@@ -470,14 +487,12 @@ const TValue *luaH_get (Table *t, const switch (ttype(key)) { case LUA_TNIL: return luaO_nilobject; case LUA_TSTRING: return luaH_getstr(t, rawtsvalue(key)); @@ -3061,7 +3062,7 @@ /* @@ LUAI_USER_ALIGNMENT_T is a type that requires maximum alignment. ** CHANGE it if your system requires alignments larger than double. (For -@@ -728,28 +652,6 @@ union luai_Cast { double l_d; long l_l; +@@ -728,28 +652,6 @@ union luai_Cast { double l_d; long l_l; #define luai_userstateyield(L,n) ((void)L) @@ -3092,7 +3093,7 @@ /* --- a/src/lundump.c +++ b/src/lundump.c -@@ -73,6 +73,13 @@ static lua_Number LoadNumber(LoadState* +@@ -73,6 +73,13 @@ static lua_Number LoadNumber(LoadState* return x; } @@ -3106,7 +3107,7 @@ static TString* LoadString(LoadState* S) { size_t size; -@@ -119,6 +126,9 @@ static void LoadConstants(LoadState* S, +@@ -119,6 +126,9 @@ static void LoadConstants(LoadState* S, case LUA_TNUMBER: setnvalue(o,LoadNumber(S)); break; @@ -3198,7 +3199,7 @@ setsvalue2s(L, obj, luaS_new(L, s)); return 1; } -@@ -222,59 +234,127 @@ static int l_strcmp (const TString *ls, +@@ -222,59 +234,127 @@ static int l_strcmp (const TString *ls, } @@ -3421,10 +3422,10 @@ + case TM_POW: if (try_powint( ri, ib, ic)) return; break; + case TM_UNM: if (try_unmint( ri, ib)) return; break; + default: lua_assert(0); -+ } + } + } + /* Fallback to floating point, when leaving range. */ -+ + +#ifdef LNUM_COMPLEX + if ((nvalue_img(b)!=0) || (nvalue_img(c)!=0)) { + lua_Complex r; @@ -3444,7 +3445,7 @@ + default: lua_assert(0); r=0; + } + setnvalue_complex( ra, r ); - } ++ } + return; + } +#endif @@ -3465,7 +3466,7 @@ + if (!call_binTM(L, rb, rc, ra, op)) + luaG_aritherror(L, rb, rc); +} - ++ +/* Helper macro to sort arithmetic operations into four categories: + * TK_INT: integer - integer operands + * TK_NUMBER: number - number (non complex, either may be integer) diff --git a/package/utils/lua/patches/012-lnum-fix-ltle-relational-operators.patch b/package/utils/lua/patches/012-lnum-fix-ltle-relational-operators.patch index 937fc137e85921..3d3d6850e215e4 100644 --- a/package/utils/lua/patches/012-lnum-fix-ltle-relational-operators.patch +++ b/package/utils/lua/patches/012-lnum-fix-ltle-relational-operators.patch @@ -1,6 +1,6 @@ --- a/src/lvm.c +++ b/src/lvm.c -@@ -284,7 +284,8 @@ int luaV_lessthan (lua_State *L, const T +@@ -281,7 +281,8 @@ int luaV_lessthan (lua_State *L, const T else return luai_numlt( nvalue_fast(l), cast_num(ivalue(r)) ); @@ -10,7 +10,7 @@ return res; return luaG_ordererror(L, l, r); -@@ -322,7 +323,8 @@ static int lessequal (lua_State *L, cons +@@ -319,7 +320,8 @@ static int lessequal (lua_State *L, cons else return luai_numle( nvalue_fast(l), cast_num(ivalue(r)) ); diff --git a/package/utils/lua/patches/020-shared_liblua.patch b/package/utils/lua/patches/020-shared_liblua.patch index bcd410f690b551..64f683ddbe0048 100644 --- a/package/utils/lua/patches/020-shared_liblua.patch +++ b/package/utils/lua/patches/020-shared_liblua.patch @@ -21,7 +21,7 @@ ranlib: --- a/src/ldo.h +++ b/src/ldo.h -@@ -46,7 +46,7 @@ LUAI_FUNC int luaD_pcall (lua_State *L, +@@ -46,7 +46,7 @@ LUAI_FUNC int luaD_pcall (lua_State *L, LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult); LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize); LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize); diff --git a/package/utils/lua/patches/050-honor-cflags.patch b/package/utils/lua/patches/050-honor-cflags.patch index dd65791482779e..d221c4ee9efefd 100644 --- a/package/utils/lua/patches/050-honor-cflags.patch +++ b/package/utils/lua/patches/050-honor-cflags.patch @@ -8,4 +8,4 @@ + $(CC) -o $@.$(PKG_VERSION) -Wl,-Bsymbolic-functions $(MYLDFLAGS) -shared -Wl,-soname="$@.$(PKG_VERSION)" $? ln -fs $@.$(PKG_VERSION) $@ - + $(LUA_T): $(LUA_O) $(LUA_SO) diff --git a/package/utils/lua/patches/300-opcode_performance.patch b/package/utils/lua/patches/300-opcode_performance.patch index 5fbb87388a6598..b971e0975cf70a 100644 --- a/package/utils/lua/patches/300-opcode_performance.patch +++ b/package/utils/lua/patches/300-opcode_performance.patch @@ -10,7 +10,7 @@ /* * If 'obj' is a string, it is tried to be interpreted as a number. -@@ -566,12 +569,63 @@ static inline int arith_mode( const TVal +@@ -568,12 +571,63 @@ static inline int arith_mode( const TVal ARITH_OP1_END #endif @@ -74,7 +74,7 @@ reentry: /* entry point */ lua_assert(isLua(L->ci)); pc = L->savedpc; -@@ -596,33 +650,33 @@ void luaV_execute (lua_State *L, int nex +@@ -598,33 +652,33 @@ void luaV_execute (lua_State *L, int nex lua_assert(base == L->base && L->base == L->ci->base); lua_assert(base <= L->top && L->top <= L->stack + L->stacksize); lua_assert(L->top == L->ci->top || luaG_checkopenop(i)); @@ -115,7 +115,7 @@ TValue g; TValue *rb = KBx(i); sethvalue(L, &g, cl->env); -@@ -630,88 +684,88 @@ void luaV_execute (lua_State *L, int nex +@@ -632,88 +686,88 @@ void luaV_execute (lua_State *L, int nex Protect(luaV_gettable(L, &g, rb, ra)); continue; } @@ -219,7 +219,7 @@ const TValue *rb = RB(i); switch (ttype(rb)) { case LUA_TTABLE: { -@@ -731,18 +785,18 @@ void luaV_execute (lua_State *L, int nex +@@ -733,18 +787,18 @@ void luaV_execute (lua_State *L, int nex } continue; } @@ -241,7 +241,7 @@ TValue *rb = RKB(i); TValue *rc = RKC(i); Protect( -@@ -752,7 +806,7 @@ void luaV_execute (lua_State *L, int nex +@@ -754,7 +808,7 @@ void luaV_execute (lua_State *L, int nex pc++; continue; } @@ -250,7 +250,7 @@ Protect( if (luaV_lessthan(L, RKB(i), RKC(i)) == GETARG_A(i)) dojump(L, pc, GETARG_sBx(*pc)); -@@ -760,7 +814,7 @@ void luaV_execute (lua_State *L, int nex +@@ -762,7 +816,7 @@ void luaV_execute (lua_State *L, int nex pc++; continue; } @@ -259,7 +259,7 @@ Protect( if (lessequal(L, RKB(i), RKC(i)) == GETARG_A(i)) dojump(L, pc, GETARG_sBx(*pc)); -@@ -768,13 +822,13 @@ void luaV_execute (lua_State *L, int nex +@@ -770,13 +824,13 @@ void luaV_execute (lua_State *L, int nex pc++; continue; } @@ -275,7 +275,7 @@ TValue *rb = RB(i); if (l_isfalse(rb) != GETARG_C(i)) { setobjs2s(L, ra, rb); -@@ -783,7 +837,7 @@ void luaV_execute (lua_State *L, int nex +@@ -785,7 +839,7 @@ void luaV_execute (lua_State *L, int nex pc++; continue; } @@ -284,7 +284,7 @@ int b = GETARG_B(i); int nresults = GETARG_C(i) - 1; if (b != 0) L->top = ra+b; /* else previous instruction set top */ -@@ -804,7 +858,7 @@ void luaV_execute (lua_State *L, int nex +@@ -806,7 +860,7 @@ void luaV_execute (lua_State *L, int nex } } } @@ -293,7 +293,7 @@ int b = GETARG_B(i); if (b != 0) L->top = ra+b; /* else previous instruction set top */ L->savedpc = pc; -@@ -836,7 +890,7 @@ void luaV_execute (lua_State *L, int nex +@@ -838,7 +892,7 @@ void luaV_execute (lua_State *L, int nex } } } @@ -302,7 +302,7 @@ int b = GETARG_B(i); if (b != 0) L->top = ra+b-1; if (L->openupval) luaF_close(L, base); -@@ -851,7 +905,7 @@ void luaV_execute (lua_State *L, int nex +@@ -853,7 +907,7 @@ void luaV_execute (lua_State *L, int nex goto reentry; } } @@ -311,7 +311,7 @@ /* If start,step and limit are all integers, we don't need to check * against overflow in the looping. */ -@@ -879,7 +933,7 @@ void luaV_execute (lua_State *L, int nex +@@ -881,7 +935,7 @@ void luaV_execute (lua_State *L, int nex } continue; } @@ -320,7 +320,7 @@ const TValue *init = ra; const TValue *plimit = ra+1; const TValue *pstep = ra+2; -@@ -902,7 +956,7 @@ void luaV_execute (lua_State *L, int nex +@@ -904,7 +958,7 @@ void luaV_execute (lua_State *L, int nex dojump(L, pc, GETARG_sBx(i)); continue; } @@ -329,7 +329,7 @@ StkId cb = ra + 3; /* call base */ setobjs2s(L, cb+2, ra+2); setobjs2s(L, cb+1, ra+1); -@@ -918,7 +972,7 @@ void luaV_execute (lua_State *L, int nex +@@ -920,7 +974,7 @@ void luaV_execute (lua_State *L, int nex pc++; continue; } @@ -338,7 +338,7 @@ int n = GETARG_B(i); int c = GETARG_C(i); int last; -@@ -940,11 +994,11 @@ void luaV_execute (lua_State *L, int nex +@@ -942,11 +996,11 @@ void luaV_execute (lua_State *L, int nex } continue; } @@ -352,7 +352,7 @@ Proto *p; Closure *ncl; int nup, j; -@@ -964,7 +1018,7 @@ void luaV_execute (lua_State *L, int nex +@@ -966,7 +1020,7 @@ void luaV_execute (lua_State *L, int nex Protect(luaC_checkGC(L)); continue; } diff --git a/package/utils/mdadm/Makefile b/package/utils/mdadm/Makefile index 1ed62d8174f835..2b44db284f4977 100644 --- a/package/utils/mdadm/Makefile +++ b/package/utils/mdadm/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mdadm PKG_VERSION:=4.0 -PKG_RELEASE:=2 +PKG_RELEASE:=4 PKG_SOURCE_URL:=@KERNEL/linux/utils/raid/mdadm PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz @@ -32,26 +32,29 @@ endef define Package/mdadm/description A tool for managing Linux Software RAID arrays. - RAID 0, 1 and 10 support included. - If you need RAID 4,5 or 6 functionality please + RAID 0, 1 and 10 support included. + If you need RAID 4,5 or 6 functionality please install kmod-md-raid456 . endef define Package/mdadm/conffiles -/etc/mdadm.conf /etc/config/mdadm endef -TARGET_CFLAGS += -ffunction-sections -fdata-sections -DNO_COROSYNC -DNO_DLM -DUSE_PTHREADS +TARGET_CFLAGS += \ + -ffunction-sections -fdata-sections \ + -DHAVE_STDINT_H -DNO_COROSYNC -DNO_DLM -DUSE_PTHREADS \ + -DCONFFILE='\"/var/etc/mdadm.conf\"' \ + -DMAP_DIR='\"/var/run/mdadm\"' \ + -DMDMON_DIR='\"/var/run/mdadm\"' \ + -DFAILED_SLOTS_DIR='\"/var/run/mdadm/failed-slots\"' + TARGET_LDFLAGS += -Wl,--gc-sections +MAKE_VARS += CHECK_RUN_DIR=0 + define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) -DHAVE_STDINT_H" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - CHECK_RUN_DIR=0 \ - mdadm + $(call Build/Compile/Default,mdadm) endef define Package/mdadm/install diff --git a/package/utils/mdadm/files/mdadm.init b/package/utils/mdadm/files/mdadm.init index e6624a776ed0f5..64a50b35de27d7 100644 --- a/package/utils/mdadm/files/mdadm.init +++ b/package/utils/mdadm/files/mdadm.init @@ -34,14 +34,13 @@ mdadm_common() { local cfg="$1" local email devices - if [ -x /sbin/sendmail ]; then - append_option email "$cfg" email "MAILADDR" - + if [ -x /usr/sbin/sendmail ]; then + config_get email "$cfg" email + [ -n "$email" ] && printf "MAILADDR %s\n" "$email" >> $CONF fi - append_option devices "$cfg" devices DEVICE " " - - printf "%s\n%s\n" "$email" "$devices" >> $CONF + config_list_foreach "$cfg" devices append_list_item devices " " + [ -n "$devices" ] && printf "DEVICE %s\n" "$devices" >> $CONF } mdadm_array() { diff --git a/package/utils/nvram/src/nvram.c b/package/utils/nvram/src/nvram.c index ca893921076ee1..d5e12ee69a3e78 100644 --- a/package/utils/nvram/src/nvram.c +++ b/package/utils/nvram/src/nvram.c @@ -47,6 +47,8 @@ static void _nvram_free(nvram_handle_t *h) for (i = 0; i < NVRAM_ARRAYSIZE(h->nvram_hash); i++) { for (t = h->nvram_hash[i]; t; t = next) { next = t->next; + if (t->value) + free(t->value); free(t); } h->nvram_hash[i] = NULL; @@ -55,6 +57,8 @@ static void _nvram_free(nvram_handle_t *h) /* Free dead table */ for (t = h->nvram_dead; t; t = next) { next = t->next; + if (t->value) + free(t->value); free(t); } diff --git a/package/utils/otrx/src/otrx.c b/package/utils/otrx/src/otrx.c index 101a31004dcd4e..223e032f2b5ed8 100644 --- a/package/utils/otrx/src/otrx.c +++ b/package/utils/otrx/src/otrx.c @@ -1,7 +1,7 @@ /* * otrx * - * Copyright (C) 2015 Rafał Miłecki + * Copyright (C) 2015-2017 Rafał Miłecki * * 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 @@ -124,9 +124,7 @@ static const uint32_t crc32_tbl[] = { 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d, }; -uint32_t otrx_crc32(uint8_t *buf, size_t len) { - uint32_t crc = 0xffffffff; - +uint32_t otrx_crc32(uint32_t crc, uint8_t *buf, size_t len) { while (len) { crc = crc32_tbl[(crc ^ *buf) & 0xff] ^ (crc >> 8); buf++; @@ -158,7 +156,6 @@ static int otrx_check(int argc, char **argv) { size_t bytes, length; uint8_t buf[1024]; uint32_t crc32; - int i; int err = 0; if (argc < 3) { @@ -203,8 +200,7 @@ static int otrx_check(int argc, char **argv) { fseek(trx, trx_offset + TRX_FLAGS_OFFSET, SEEK_SET); length -= TRX_FLAGS_OFFSET; while ((bytes = fread(buf, 1, otrx_min(sizeof(buf), length), trx)) > 0) { - for (i = 0; i < bytes; i++) - crc32 = crc32_tbl[(crc32 ^ buf[i]) & 0xff] ^ (crc32 >> 8); + crc32 = otrx_crc32(crc32, buf, bytes); length -= bytes; } @@ -232,14 +228,11 @@ static int otrx_check(int argc, char **argv) { * Create **************************************************/ -static void otrx_create_parse_options(int argc, char **argv) { -} - static ssize_t otrx_create_append_file(FILE *trx, const char *in_path) { FILE *in; size_t bytes; ssize_t length = 0; - uint8_t buf[128]; + uint8_t buf[1024]; in = fopen(in_path, "r"); if (!in) { @@ -271,9 +264,12 @@ static ssize_t otrx_create_append_zeros(FILE *trx, size_t length) { if (fwrite(buf, 1, length, trx) != length) { fprintf(stderr, "Couldn't write %zu B to %s\n", length, trx_path); + free(buf); return -EIO; } + free(buf); + return length; } @@ -288,7 +284,7 @@ static ssize_t otrx_create_align(FILE *trx, size_t curr_offset, size_t alignment static int otrx_create_write_hdr(FILE *trx, struct trx_header *hdr) { size_t bytes, length; - uint8_t *buf; + uint8_t buf[1024]; uint32_t crc32; hdr->magic = cpu_to_le32(TRX_MAGIC); @@ -303,20 +299,13 @@ static int otrx_create_write_hdr(FILE *trx, struct trx_header *hdr) { length = le32_to_cpu(hdr->length); - buf = malloc(length); - if (!buf) { - fprintf(stderr, "Couldn't alloc %zu B buffer\n", length); - return -ENOMEM; - } - - fseek(trx, 0, SEEK_SET); - bytes = fread(buf, 1, length, trx); - if (bytes != length) { - fprintf(stderr, "Couldn't read %zu B of data from %s\n", length, trx_path); - return -ENOMEM; + crc32 = 0xffffffff; + fseek(trx, TRX_FLAGS_OFFSET, SEEK_SET); + length -= TRX_FLAGS_OFFSET; + while ((bytes = fread(buf, 1, otrx_min(sizeof(buf), length), trx)) > 0) { + crc32 = otrx_crc32(crc32, buf, bytes); + length -= bytes; } - - crc32 = otrx_crc32(buf + TRX_FLAGS_OFFSET, length - TRX_FLAGS_OFFSET); hdr->crc32 = cpu_to_le32(crc32); fseek(trx, 0, SEEK_SET); @@ -345,9 +334,6 @@ static int otrx_create(int argc, char **argv) { } trx_path = argv[2]; - optind = 3; - otrx_create_parse_options(argc, argv); - trx = fopen(trx_path, "w+"); if (!trx) { fprintf(stderr, "Couldn't open %s\n", trx_path); @@ -357,7 +343,7 @@ static int otrx_create(int argc, char **argv) { fseek(trx, curr_offset, SEEK_SET); optind = 3; - while ((c = getopt(argc, argv, "f:b:")) != -1) { + while ((c = getopt(argc, argv, "f:A:a:b:")) != -1) { switch (c) { case 'f': if (curr_idx >= TRX_MAX_PARTS) { @@ -381,6 +367,27 @@ static int otrx_create(int argc, char **argv) { curr_offset += sbytes; break; + case 'A': + sbytes = otrx_create_append_file(trx, optarg); + if (sbytes < 0) { + fprintf(stderr, "Failed to append file %s\n", optarg); + } else { + curr_offset += sbytes; + } + + sbytes = otrx_create_align(trx, curr_offset, 4); + if (sbytes < 0) + fprintf(stderr, "Failed to append zeros\n"); + else + curr_offset += sbytes; + break; + case 'a': + sbytes = otrx_create_align(trx, curr_offset, strtol(optarg, NULL, 0)); + if (sbytes < 0) + fprintf(stderr, "Failed to append zeros\n"); + else + curr_offset += sbytes; + break; case 'b': sbytes = strtol(optarg, NULL, 0) - curr_offset; if (sbytes < 0) { @@ -398,6 +405,12 @@ static int otrx_create(int argc, char **argv) { break; } + sbytes = otrx_create_align(trx, curr_offset, 0x1000); + if (sbytes < 0) + fprintf(stderr, "Failed to append zeros\n"); + else + curr_offset += sbytes; + hdr.length = curr_offset; otrx_create_write_hdr(trx, &hdr); err_close: @@ -552,6 +565,8 @@ static void usage() { printf("Creating new TRX file:\n"); printf("\totrx create [options] [partitions]\n"); printf("\t-f file\t\t\t\t[partition] start new partition with content copied from file\n"); + printf("\t-A file\t\t\t\t[partition] append current partition with content copied from file\n"); + printf("\t-a alignment\t\t\t[partition] align current partition\n"); printf("\t-b offset\t\t\t[partition] append zeros to partition till reaching absolute offset\n"); printf("\n"); printf("Extracting from TRX file:\n"); diff --git a/package/utils/usbmode/Makefile b/package/utils/usbmode/Makefile index 1b1ef147b6eff2..2560f1c40968b8 100644 --- a/package/utils/usbmode/Makefile +++ b/package/utils/usbmode/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/usbmode.git -PKG_SOURCE_DATE:=2017-05-24 -PKG_SOURCE_VERSION:=453da8e540b1c53d357b897d6c70372cd4633390 -PKG_MIRROR_HASH:=b4a7132b940192f2e9a74bd890bd7008ede701e1d52284c3ade0cdc7d663929f +PKG_SOURCE_DATE:=2017-12-19 +PKG_SOURCE_VERSION:=f40f84c27534159066c94dadc0c08e0b255c3e26 +PKG_MIRROR_HASH:=840c7ee2843102b09d8943a20820025251cc259385e2b0bde6b7c8cce8190f83 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 diff --git a/package/utils/usbutils/Makefile b/package/utils/usbutils/Makefile index 29b1f85e1479d2..7f798954aefac8 100644 --- a/package/utils/usbutils/Makefile +++ b/package/utils/usbutils/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=usbutils PKG_VERSION:=007 -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils @@ -32,13 +32,13 @@ define Package/usbutils URL:=http://www.linux-usb.org/ endef -USB_IDS_REV:=ae25707c751fff79148328229a76fc44232abeae +USB_IDS_REV:=0a6be488b4c1485d30c9efee1cc895af5d4a1383 USB_IDS_FILE:=usb.ids.$(USB_IDS_REV) define Download/usb_ids FILE:=$(USB_IDS_FILE) URL_FILE:=usb.ids - URL:=@GITHUB/gentoo/hwids/ae25707c751fff79148328229a76fc44232abeae - HASH:=eca5d4b4b2c72e61d5d6d67b5dc6f75e92b4ac9cf9cdf1344f06622e0f57d82f + URL:=@GITHUB/gentoo/hwids/$(USB_IDS_REV) + HASH:=2d0403ffccc0ff7150e32c0bf8e2878816b76ba08d2c3bb1059f33627a3da30f endef $(eval $(call Download,usb_ids)) diff --git a/package/utils/util-linux/Makefile b/package/utils/util-linux/Makefile index 9ab5bfa6f887e9..88cb31477667fc 100644 --- a/package/utils/util-linux/Makefile +++ b/package/utils/util-linux/Makefile @@ -8,12 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=util-linux -PKG_VERSION:=2.30.1 -PKG_RELEASE:=2 +PKG_VERSION:=2.30.2 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.30 -PKG_HASH:=1be4363a91ac428c9e43fc04dc6d2c66a19ec1e36f1105bd4b481540be13b841 +PKG_HASH:=7b5be5489e9b5b7177832836467aba1c87bf0e9bcbcb5a6f35d76cd4782589dc +PKG_CPE_ID:=cpe:/a:kernel:util-linux PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:= COPYING \ diff --git a/package/utils/util-linux/patches/100-use_urandom.patch b/package/utils/util-linux/patches/100-use_urandom.patch new file mode 100644 index 00000000000000..848f2f40c2d22e --- /dev/null +++ b/package/utils/util-linux/patches/100-use_urandom.patch @@ -0,0 +1,14 @@ +--- a/lib/randutils.c ++++ b/lib/randutils.c +@@ -25,6 +25,11 @@ + #define THREAD_LOCAL static + #endif + ++/* force /dev/urandom to avoid hanging on early boot */ ++#undef HAVE_GETRANDOM ++#undef SYS_getrandom ++#undef __NR_getrandom ++ + #ifdef HAVE_GETRANDOM + # include + #elif defined (__linux__) diff --git a/package/utils/xfsprogs/Makefile b/package/utils/xfsprogs/Makefile index 486ded72d5605a..5cf1da240f260a 100644 --- a/package/utils/xfsprogs/Makefile +++ b/package/utils/xfsprogs/Makefile @@ -8,6 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xfsprogs +PKG_CPE_ID:=cpe:/a:sgi:xfsprogs PKG_RELEASE:=1 PKG_VERSION:=4.11.0 PKG_SOURCE_URL:=@KERNEL/linux/utils/fs/xfs/xfsprogs diff --git a/rules.mk b/rules.mk index ed796a54024adc..3558f2f0284eb0 100644 --- a/rules.mk +++ b/rules.mk @@ -21,6 +21,7 @@ DUMP:=1 endif export TMP_DIR:=$(TOPDIR)/tmp +export TMPDIR:=$(TMP_DIR) qstrip=$(strip $(subst ",,$(1))) #")) diff --git a/scripts/brcmImage.pl b/scripts/brcmImage.pl index aab86d6d912dec..60a59f2bf56140 100755 --- a/scripts/brcmImage.pl +++ b/scripts/brcmImage.pl @@ -33,7 +33,7 @@ my $version = "0.1"; my %arg = ( o => 'bcm963xx_fs_kernel', - b => 'LEDE', + b => 'OpenWrt', c => '6348', s => 64, f => 0xbfc00000, diff --git a/scripts/config/.gitignore b/scripts/config/.gitignore index 0326e060bb70de..1206e50229273b 100644 --- a/scripts/config/.gitignore +++ b/scripts/config/.gitignore @@ -7,3 +7,9 @@ mconf* !mconf*.h mconf_check *.*.c +qconf* +qconf*.moc +!qconf*.cc +!qconf*.h +!images*.c +.tmp_qtcheck diff --git a/scripts/config/Makefile b/scripts/config/Makefile index 3de98082b57931..96202732028d2a 100644 --- a/scripts/config/Makefile +++ b/scripts/config/Makefile @@ -7,6 +7,8 @@ # conf: Used for defconfig, oldconfig and related targets # mconf: Used for the mconfig target. # Utilizes the lxdialog package +# qconf: Used for the xconfig target +# Based on Qt which needs to be installed to compile it # object files used by all kconfig flavours @@ -16,20 +18,35 @@ check_lxdialog = $(shell $(SHELL) $(CURDIR)/lxdialog/check-lxdialog.sh -$(1)) export CFLAGS += -DKBUILD_NO_NLS -I. $(call check_lxdialog,ccflags) +export CXXFLAGS += -DKBUILD_NO_NLS + +DISTRO-PKG-CONFIG := $(shell which -a pkg-config | grep -E '\/usr' | head -n 1) conf-objs := conf.o zconf.tab.o mconf-objs := mconf.o zconf.tab.o +qconf-cxxobjs := qconf.o +qconf-objs := zconf.tab.o + lxdialog-objs := \ lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o \ lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o clean-files := zconf.tab.c lex.zconf.c zconf.hash.c +# Remove qconf junk files +clean-files += $(qconf-cxxobjs) qconf.moc .tmp_qtcheck all: conf mconf conf: $(conf-objs) mconf: $(mconf-objs) $(lxdialog-objs) $(CC) -o $@ $^ $(call check_lxdialog,ldflags $(CC)) +qconf: $(qconf-cxxobjs) $(qconf-objs) +ifneq ($(DISTRO-PKG-CONFIG),) + $(CXX) $(HOSTLOADLIBES_qconf) -o $@ $^ +else + echo "You don't have 'pkg-config' installed. Cannot continue" + echo "For now, you may use 'make menuconfig' instead of 'make xconfig'" +endif clean: rm -f *.o lxdialog/*.o $(clean-files) conf mconf @@ -50,3 +67,43 @@ zconf.hash.c: zconf.gperf %.hash.c: %.gperf cp $@_shipped $@ || gperf < $< > $@ + +ifeq ($(MAKECMDGOALS),qconf) +qconf.o: .tmp_qtcheck +.tmp_qtcheck: Makefile +-include .tmp_qtcheck + +# Qt needs some extra effort... +.tmp_qtcheck: + @set -e; echo " CHECK qt"; \ + if $(DISTRO-PKG-CONFIG) --exists Qt5Core; then \ + cflags="-std=c++11 -fPIC `$(DISTRO-PKG-CONFIG) --cflags Qt5Core Qt5Gui Qt5Widgets`"; \ + libs=`$(DISTRO-PKG-CONFIG) --libs Qt5Core Qt5Gui Qt5Widgets`; \ + moc=`$(DISTRO-PKG-CONFIG) --variable=host_bins Qt5Core`/moc; \ + elif $(DISTRO-PKG-CONFIG) --exists QtCore; then \ + cflags=`$(DISTRO-PKG-CONFIG) --cflags QtCore QtGui`; \ + libs=`$(DISTRO-PKG-CONFIG) --libs QtCore QtGui`; \ + moc=`$(DISTRO-PKG-CONFIG) --variable=moc_location QtCore`; \ + else \ + echo >&2 "*"; \ + echo >&2 "* Could not find Qt via $(DISTRO-PKG-CONFIG)."; \ + echo >&2 "* Please install either Qt 4.8 or 5.x. and make sure it's in PKG_CONFIG_PATH"; \ + echo >&2 "*"; \ + exit 1; \ + fi; \ + echo "KC_QT_CFLAGS=$$cflags" > $@; \ + echo "KC_QT_LIBS=$$libs" >> $@; \ + echo "KC_QT_MOC=$$moc" >> $@ +endif + +#Define compiler flags to build qconf +HOSTLOADLIBES_qconf = $(KC_QT_LIBS) +HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) + +qconf.o: qconf.moc +qconf.o: CXXFLAGS+=$(HOSTCXXFLAGS_qconf.o) + +moc = $(KC_QT_MOC) -i $< -o $@ + +%.moc: %.h .tmp_qtcheck + $(call moc) diff --git a/scripts/config/images.c b/scripts/config/images.c new file mode 100644 index 00000000000000..d4f84bd4a96b6f --- /dev/null +++ b/scripts/config/images.c @@ -0,0 +1,326 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +static const char *xpm_load[] = { +"22 22 5 1", +". c None", +"# c #000000", +"c c #838100", +"a c #ffff00", +"b c #ffffff", +"......................", +"......................", +"......................", +"............####....#.", +"...........#....##.##.", +"..................###.", +".................####.", +".####...........#####.", +"#abab##########.......", +"#babababababab#.......", +"#ababababababa#.......", +"#babababababab#.......", +"#ababab###############", +"#babab##cccccccccccc##", +"#abab##cccccccccccc##.", +"#bab##cccccccccccc##..", +"#ab##cccccccccccc##...", +"#b##cccccccccccc##....", +"###cccccccccccc##.....", +"##cccccccccccc##......", +"###############.......", +"......................"}; + +static const char *xpm_save[] = { +"22 22 5 1", +". c None", +"# c #000000", +"a c #838100", +"b c #c5c2c5", +"c c #cdb6d5", +"......................", +".####################.", +".#aa#bbbbbbbbbbbb#bb#.", +".#aa#bbbbbbbbbbbb#bb#.", +".#aa#bbbbbbbbbcbb####.", +".#aa#bbbccbbbbbbb#aa#.", +".#aa#bbbccbbbbbbb#aa#.", +".#aa#bbbbbbbbbbbb#aa#.", +".#aa#bbbbbbbbbbbb#aa#.", +".#aa#bbbbbbbbbbbb#aa#.", +".#aa#bbbbbbbbbbbb#aa#.", +".#aaa############aaa#.", +".#aaaaaaaaaaaaaaaaaa#.", +".#aaaaaaaaaaaaaaaaaa#.", +".#aaa#############aa#.", +".#aaa#########bbb#aa#.", +".#aaa#########bbb#aa#.", +".#aaa#########bbb#aa#.", +".#aaa#########bbb#aa#.", +".#aaa#########bbb#aa#.", +"..##################..", +"......................"}; + +static const char *xpm_back[] = { +"22 22 3 1", +". c None", +"# c #000083", +"a c #838183", +"......................", +"......................", +"......................", +"......................", +"......................", +"...........######a....", +"..#......##########...", +"..##...####......##a..", +"..###.###.........##..", +"..######..........##..", +"..#####...........##..", +"..######..........##..", +"..#######.........##..", +"..########.......##a..", +"...............a###...", +"...............###....", +"......................", +"......................", +"......................", +"......................", +"......................", +"......................"}; + +static const char *xpm_tree_view[] = { +"22 22 2 1", +". c None", +"# c #000000", +"......................", +"......................", +"......#...............", +"......#...............", +"......#...............", +"......#...............", +"......#...............", +"......########........", +"......#...............", +"......#...............", +"......#...............", +"......#...............", +"......#...............", +"......########........", +"......#...............", +"......#...............", +"......#...............", +"......#...............", +"......#...............", +"......########........", +"......................", +"......................"}; + +static const char *xpm_single_view[] = { +"22 22 2 1", +". c None", +"# c #000000", +"......................", +"......................", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"......................", +"......................"}; + +static const char *xpm_split_view[] = { +"22 22 2 1", +". c None", +"# c #000000", +"......................", +"......................", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......................", +"......................"}; + +static const char *xpm_symbol_no[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .......... ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" .......... ", +" "}; + +static const char *xpm_symbol_mod[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .......... ", +" . . ", +" . . ", +" . .. . ", +" . .... . ", +" . .... . ", +" . .. . ", +" . . ", +" . . ", +" .......... ", +" "}; + +static const char *xpm_symbol_yes[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .......... ", +" . . ", +" . . ", +" . . . ", +" . .. . ", +" . . .. . ", +" . .... . ", +" . .. . ", +" . . ", +" .......... ", +" "}; + +static const char *xpm_choice_no[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .... ", +" .. .. ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" .. .. ", +" .... ", +" "}; + +static const char *xpm_choice_yes[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .... ", +" .. .. ", +" . . ", +" . .. . ", +" . .... . ", +" . .... . ", +" . .. . ", +" . . ", +" .. .. ", +" .... ", +" "}; + +static const char *xpm_menu[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .......... ", +" . . ", +" . .. . ", +" . .... . ", +" . ...... . ", +" . ...... . ", +" . .... . ", +" . .. . ", +" . . ", +" .......... ", +" "}; + +static const char *xpm_menu_inv[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .......... ", +" .......... ", +" .. ...... ", +" .. .... ", +" .. .. ", +" .. .. ", +" .. .... ", +" .. ...... ", +" .......... ", +" .......... ", +" "}; + +static const char *xpm_menuback[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .......... ", +" . . ", +" . .. . ", +" . .... . ", +" . ...... . ", +" . ...... . ", +" . .... . ", +" . .. . ", +" . . ", +" .......... ", +" "}; + +static const char *xpm_void[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/scripts/config/qconf.cc b/scripts/config/qconf.cc new file mode 100644 index 00000000000000..fc555599222095 --- /dev/null +++ b/scripts/config/qconf.cc @@ -0,0 +1,1870 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Copyright (C) 2015 Boris Barbulovski + * Released under the terms of the GNU GPL v2.0. + */ + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "lkc.h" +#include "qconf.h" + +#include "qconf.moc" +#include "images.c" + +#ifdef _ +# undef _ +# define _ qgettext +#endif + +static QApplication *configApp; +static ConfigSettings *configSettings; + +QAction *ConfigMainWindow::saveAction; + +static inline QString qgettext(const char* str) +{ + return QString::fromLocal8Bit(gettext(str)); +} + +static inline QString qgettext(const QString& str) +{ + return QString::fromLocal8Bit(gettext(str.toLatin1())); +} + +ConfigSettings::ConfigSettings() + : QSettings("kernel.org", "qconf") +{ +} + +/** + * Reads a list of integer values from the application settings. + */ +QList ConfigSettings::readSizes(const QString& key, bool *ok) +{ + QList result; + QStringList entryList = value(key).toStringList(); + QStringList::Iterator it; + + for (it = entryList.begin(); it != entryList.end(); ++it) + result.push_back((*it).toInt()); + + return result; +} + +/** + * Writes a list of integer values to the application settings. + */ +bool ConfigSettings::writeSizes(const QString& key, const QList& value) +{ + QStringList stringList; + QList::ConstIterator it; + + for (it = value.begin(); it != value.end(); ++it) + stringList.push_back(QString::number(*it)); + setValue(key, stringList); + + return true; +} + + +/* + * set the new data + * TODO check the value + */ +void ConfigItem::okRename(int col) +{ +} + +/* + * update the displayed of a menu entry + */ +void ConfigItem::updateMenu(void) +{ + ConfigList* list; + struct symbol* sym; + struct property *prop; + QString prompt; + int type; + tristate expr; + + list = listView(); + if (goParent) { + setPixmap(promptColIdx, list->menuBackPix); + prompt = ".."; + goto set_prompt; + } + + sym = menu->sym; + prop = menu->prompt; + prompt = _(menu_get_prompt(menu)); + + if (prop) switch (prop->type) { + case P_MENU: + if (list->mode == singleMode || list->mode == symbolMode) { + /* a menuconfig entry is displayed differently + * depending whether it's at the view root or a child. + */ + if (sym && list->rootEntry == menu) + break; + setPixmap(promptColIdx, list->menuPix); + } else { + if (sym) + break; + setPixmap(promptColIdx, QIcon()); + } + goto set_prompt; + case P_COMMENT: + setPixmap(promptColIdx, QIcon()); + goto set_prompt; + default: + ; + } + if (!sym) + goto set_prompt; + + setText(nameColIdx, QString::fromLocal8Bit(sym->name)); + + type = sym_get_type(sym); + switch (type) { + case S_BOOLEAN: + case S_TRISTATE: + char ch; + + if (!sym_is_changable(sym) && list->optMode == normalOpt) { + setPixmap(promptColIdx, QIcon()); + setText(noColIdx, QString::null); + setText(modColIdx, QString::null); + setText(yesColIdx, QString::null); + break; + } + expr = sym_get_tristate_value(sym); + switch (expr) { + case yes: + if (sym_is_choice_value(sym) && type == S_BOOLEAN) + setPixmap(promptColIdx, list->choiceYesPix); + else + setPixmap(promptColIdx, list->symbolYesPix); + setText(yesColIdx, "Y"); + ch = 'Y'; + break; + case mod: + setPixmap(promptColIdx, list->symbolModPix); + setText(modColIdx, "M"); + ch = 'M'; + break; + default: + if (sym_is_choice_value(sym) && type == S_BOOLEAN) + setPixmap(promptColIdx, list->choiceNoPix); + else + setPixmap(promptColIdx, list->symbolNoPix); + setText(noColIdx, "N"); + ch = 'N'; + break; + } + if (expr != no) + setText(noColIdx, sym_tristate_within_range(sym, no) ? "_" : 0); + if (expr != mod) + setText(modColIdx, sym_tristate_within_range(sym, mod) ? "_" : 0); + if (expr != yes) + setText(yesColIdx, sym_tristate_within_range(sym, yes) ? "_" : 0); + + setText(dataColIdx, QChar(ch)); + break; + case S_INT: + case S_HEX: + case S_STRING: + const char* data; + + data = sym_get_string_value(sym); + + setText(dataColIdx, data); + if (type == S_STRING) + prompt = QString("%1: %2").arg(prompt).arg(data); + else + prompt = QString("(%2) %1").arg(prompt).arg(data); + break; + } + if (!sym_has_value(sym) && visible) + prompt += _(" (NEW)"); +set_prompt: + setText(promptColIdx, prompt); +} + +void ConfigItem::testUpdateMenu(bool v) +{ + ConfigItem* i; + + visible = v; + if (!menu) + return; + + sym_calc_value(menu->sym); + if (menu->flags & MENU_CHANGED) { + /* the menu entry changed, so update all list items */ + menu->flags &= ~MENU_CHANGED; + for (i = (ConfigItem*)menu->data; i; i = i->nextItem) + i->updateMenu(); + } else if (listView()->updateAll) + updateMenu(); +} + + +/* + * construct a menu entry + */ +void ConfigItem::init(void) +{ + if (menu) { + ConfigList* list = listView(); + nextItem = (ConfigItem*)menu->data; + menu->data = this; + + if (list->mode != fullMode) + setExpanded(true); + sym_calc_value(menu->sym); + } + updateMenu(); +} + +/* + * destruct a menu entry + */ +ConfigItem::~ConfigItem(void) +{ + if (menu) { + ConfigItem** ip = (ConfigItem**)&menu->data; + for (; *ip; ip = &(*ip)->nextItem) { + if (*ip == this) { + *ip = nextItem; + break; + } + } + } +} + +ConfigLineEdit::ConfigLineEdit(ConfigView* parent) + : Parent(parent) +{ + connect(this, SIGNAL(editingFinished()), SLOT(hide())); +} + +void ConfigLineEdit::show(ConfigItem* i) +{ + item = i; + if (sym_get_string_value(item->menu->sym)) + setText(QString::fromLocal8Bit(sym_get_string_value(item->menu->sym))); + else + setText(QString::null); + Parent::show(); + setFocus(); +} + +void ConfigLineEdit::keyPressEvent(QKeyEvent* e) +{ + switch (e->key()) { + case Qt::Key_Escape: + break; + case Qt::Key_Return: + case Qt::Key_Enter: + sym_set_string_value(item->menu->sym, text().toLatin1()); + parent()->updateList(item); + break; + default: + Parent::keyPressEvent(e); + return; + } + e->accept(); + parent()->list->setFocus(); + hide(); +} + +ConfigList::ConfigList(ConfigView* p, const char *name) + : Parent(p), + updateAll(false), + symbolYesPix(xpm_symbol_yes), symbolModPix(xpm_symbol_mod), symbolNoPix(xpm_symbol_no), + choiceYesPix(xpm_choice_yes), choiceNoPix(xpm_choice_no), + menuPix(xpm_menu), menuInvPix(xpm_menu_inv), menuBackPix(xpm_menuback), voidPix(xpm_void), + showName(false), showRange(false), showData(false), mode(singleMode), optMode(normalOpt), + rootEntry(0), headerPopup(0) +{ + int i; + + setObjectName(name); + setSortingEnabled(false); + setRootIsDecorated(true); + + setVerticalScrollMode(ScrollPerPixel); + setHorizontalScrollMode(ScrollPerPixel); + + setHeaderLabels(QStringList() << _("Option") << _("Name") << "N" << "M" << "Y" << _("Value")); + + connect(this, SIGNAL(itemSelectionChanged(void)), + SLOT(updateSelection(void))); + + if (name) { + configSettings->beginGroup(name); + showName = configSettings->value("/showName", false).toBool(); + showRange = configSettings->value("/showRange", false).toBool(); + showData = configSettings->value("/showData", false).toBool(); + optMode = (enum optionMode)configSettings->value("/optionMode", 0).toInt(); + configSettings->endGroup(); + connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); + } + + addColumn(promptColIdx); + + reinit(); +} + +bool ConfigList::menuSkip(struct menu *menu) +{ + if (optMode == normalOpt && menu_is_visible(menu)) + return false; + if (optMode == promptOpt && menu_has_prompt(menu)) + return false; + if (optMode == allOpt) + return false; + return true; +} + +void ConfigList::reinit(void) +{ + removeColumn(dataColIdx); + removeColumn(yesColIdx); + removeColumn(modColIdx); + removeColumn(noColIdx); + removeColumn(nameColIdx); + + if (showName) + addColumn(nameColIdx); + if (showRange) { + addColumn(noColIdx); + addColumn(modColIdx); + addColumn(yesColIdx); + } + if (showData) + addColumn(dataColIdx); + + updateListAll(); +} + +void ConfigList::saveSettings(void) +{ + if (!objectName().isEmpty()) { + configSettings->beginGroup(objectName()); + configSettings->setValue("/showName", showName); + configSettings->setValue("/showRange", showRange); + configSettings->setValue("/showData", showData); + configSettings->setValue("/optionMode", (int)optMode); + configSettings->endGroup(); + } +} + +ConfigItem* ConfigList::findConfigItem(struct menu *menu) +{ + ConfigItem* item = (ConfigItem*)menu->data; + + for (; item; item = item->nextItem) { + if (this == item->listView()) + break; + } + + return item; +} + +void ConfigList::updateSelection(void) +{ + struct menu *menu; + enum prop_type type; + + if (selectedItems().count() == 0) + return; + + ConfigItem* item = (ConfigItem*)selectedItems().first(); + if (!item) + return; + + menu = item->menu; + emit menuChanged(menu); + if (!menu) + return; + type = menu->prompt ? menu->prompt->type : P_UNKNOWN; + if (mode == menuMode && type == P_MENU) + emit menuSelected(menu); +} + +void ConfigList::updateList(ConfigItem* item) +{ + ConfigItem* last = 0; + + if (!rootEntry) { + if (mode != listMode) + goto update; + QTreeWidgetItemIterator it(this); + ConfigItem* item; + + while (*it) { + item = (ConfigItem*)(*it); + if (!item->menu) + continue; + item->testUpdateMenu(menu_is_visible(item->menu)); + + ++it; + } + return; + } + + if (rootEntry != &rootmenu && (mode == singleMode || + (mode == symbolMode && rootEntry->parent != &rootmenu))) { + item = (ConfigItem *)topLevelItem(0); + if (!item) + item = new ConfigItem(this, 0, true); + last = item; + } + if ((mode == singleMode || (mode == symbolMode && !(rootEntry->flags & MENU_ROOT))) && + rootEntry->sym && rootEntry->prompt) { + item = last ? last->nextSibling() : firstChild(); + if (!item) + item = new ConfigItem(this, last, rootEntry, true); + else + item->testUpdateMenu(true); + + updateMenuList(item, rootEntry); + update(); + resizeColumnToContents(0); + return; + } +update: + updateMenuList(this, rootEntry); + update(); + resizeColumnToContents(0); +} + +void ConfigList::setValue(ConfigItem* item, tristate val) +{ + struct symbol* sym; + int type; + tristate oldval; + + sym = item->menu ? item->menu->sym : 0; + if (!sym) + return; + + type = sym_get_type(sym); + switch (type) { + case S_BOOLEAN: + case S_TRISTATE: + oldval = sym_get_tristate_value(sym); + + if (!sym_set_tristate_value(sym, val)) + return; + if (oldval == no && item->menu->list) + item->setExpanded(true); + parent()->updateList(item); + break; + } +} + +void ConfigList::changeValue(ConfigItem* item) +{ + struct symbol* sym; + struct menu* menu; + int type, oldexpr, newexpr; + + menu = item->menu; + if (!menu) + return; + sym = menu->sym; + if (!sym) { + if (item->menu->list) + item->setExpanded(!item->isExpanded()); + return; + } + + type = sym_get_type(sym); + switch (type) { + case S_BOOLEAN: + case S_TRISTATE: + oldexpr = sym_get_tristate_value(sym); + newexpr = sym_toggle_tristate_value(sym); + if (item->menu->list) { + if (oldexpr == newexpr) + item->setExpanded(!item->isExpanded()); + else if (oldexpr == no) + item->setExpanded(true); + } + if (oldexpr != newexpr) + parent()->updateList(item); + break; + case S_INT: + case S_HEX: + case S_STRING: + parent()->lineEdit->show(item); + break; + } +} + +void ConfigList::setRootMenu(struct menu *menu) +{ + enum prop_type type; + + if (rootEntry == menu) + return; + type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN; + if (type != P_MENU) + return; + updateMenuList(this, 0); + rootEntry = menu; + updateListAll(); + if (currentItem()) { + currentItem()->setSelected(hasFocus()); + scrollToItem(currentItem()); + } +} + +void ConfigList::setParentMenu(void) +{ + ConfigItem* item; + struct menu *oldroot; + + oldroot = rootEntry; + if (rootEntry == &rootmenu) + return; + setRootMenu(menu_get_parent_menu(rootEntry->parent)); + + QTreeWidgetItemIterator it(this); + while (*it) { + item = (ConfigItem *)(*it); + if (item->menu == oldroot) { + setCurrentItem(item); + scrollToItem(item); + break; + } + + ++it; + } +} + +/* + * update all the children of a menu entry + * removes/adds the entries from the parent widget as necessary + * + * parent: either the menu list widget or a menu entry widget + * menu: entry to be updated + */ +void ConfigList::updateMenuList(ConfigItem *parent, struct menu* menu) +{ + struct menu* child; + ConfigItem* item; + ConfigItem* last; + bool visible; + enum prop_type type; + + if (!menu) { + while (parent->childCount() > 0) + { + delete parent->takeChild(0); + } + + return; + } + + last = parent->firstChild(); + if (last && !last->goParent) + last = 0; + for (child = menu->list; child; child = child->next) { + item = last ? last->nextSibling() : parent->firstChild(); + type = child->prompt ? child->prompt->type : P_UNKNOWN; + + switch (mode) { + case menuMode: + if (!(child->flags & MENU_ROOT)) + goto hide; + break; + case symbolMode: + if (child->flags & MENU_ROOT) + goto hide; + break; + default: + break; + } + + visible = menu_is_visible(child); + if (!menuSkip(child)) { + if (!child->sym && !child->list && !child->prompt) + continue; + if (!item || item->menu != child) + item = new ConfigItem(parent, last, child, visible); + else + item->testUpdateMenu(visible); + + if (mode == fullMode || mode == menuMode || type != P_MENU) + updateMenuList(item, child); + else + updateMenuList(item, 0); + last = item; + continue; + } + hide: + if (item && item->menu == child) { + last = parent->firstChild(); + if (last == item) + last = 0; + else while (last->nextSibling() != item) + last = last->nextSibling(); + delete item; + } + } +} + +void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu) +{ + struct menu* child; + ConfigItem* item; + ConfigItem* last; + bool visible; + enum prop_type type; + + if (!menu) { + while (parent->topLevelItemCount() > 0) + { + delete parent->takeTopLevelItem(0); + } + + return; + } + + last = (ConfigItem*)parent->topLevelItem(0); + if (last && !last->goParent) + last = 0; + for (child = menu->list; child; child = child->next) { + item = last ? last->nextSibling() : (ConfigItem*)parent->topLevelItem(0); + type = child->prompt ? child->prompt->type : P_UNKNOWN; + + switch (mode) { + case menuMode: + if (!(child->flags & MENU_ROOT)) + goto hide; + break; + case symbolMode: + if (child->flags & MENU_ROOT) + goto hide; + break; + default: + break; + } + + visible = menu_is_visible(child); + if (!menuSkip(child)) { + if (!child->sym && !child->list && !child->prompt) + continue; + if (!item || item->menu != child) + item = new ConfigItem(parent, last, child, visible); + else + item->testUpdateMenu(visible); + + if (mode == fullMode || mode == menuMode || type != P_MENU) + updateMenuList(item, child); + else + updateMenuList(item, 0); + last = item; + continue; + } + hide: + if (item && item->menu == child) { + last = (ConfigItem*)parent->topLevelItem(0); + if (last == item) + last = 0; + else while (last->nextSibling() != item) + last = last->nextSibling(); + delete item; + } + } +} + +void ConfigList::keyPressEvent(QKeyEvent* ev) +{ + QTreeWidgetItem* i = currentItem(); + ConfigItem* item; + struct menu *menu; + enum prop_type type; + + if (ev->key() == Qt::Key_Escape && mode != fullMode && mode != listMode) { + emit parentSelected(); + ev->accept(); + return; + } + + if (!i) { + Parent::keyPressEvent(ev); + return; + } + item = (ConfigItem*)i; + + switch (ev->key()) { + case Qt::Key_Return: + case Qt::Key_Enter: + if (item->goParent) { + emit parentSelected(); + break; + } + menu = item->menu; + if (!menu) + break; + type = menu->prompt ? menu->prompt->type : P_UNKNOWN; + if (type == P_MENU && rootEntry != menu && + mode != fullMode && mode != menuMode) { + emit menuSelected(menu); + break; + } + case Qt::Key_Space: + changeValue(item); + break; + case Qt::Key_N: + setValue(item, no); + break; + case Qt::Key_M: + setValue(item, mod); + break; + case Qt::Key_Y: + setValue(item, yes); + break; + default: + Parent::keyPressEvent(ev); + return; + } + ev->accept(); +} + +void ConfigList::mousePressEvent(QMouseEvent* e) +{ + //QPoint p(contentsToViewport(e->pos())); + //printf("contentsMousePressEvent: %d,%d\n", p.x(), p.y()); + Parent::mousePressEvent(e); +} + +void ConfigList::mouseReleaseEvent(QMouseEvent* e) +{ + QPoint p = e->pos(); + ConfigItem* item = (ConfigItem*)itemAt(p); + struct menu *menu; + enum prop_type ptype; + QIcon icon; + int idx, x; + + if (!item) + goto skip; + + menu = item->menu; + x = header()->offset() + p.x(); + idx = header()->logicalIndexAt(x); + switch (idx) { + case promptColIdx: + icon = item->pixmap(promptColIdx); + if (!icon.isNull()) { + int off = header()->sectionPosition(0) + visualRect(indexAt(p)).x() + 4; // 4 is Hardcoded image offset. There might be a way to do it properly. + if (x >= off && x < off + icon.availableSizes().first().width()) { + if (item->goParent) { + emit parentSelected(); + break; + } else if (!menu) + break; + ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; + if (ptype == P_MENU && rootEntry != menu && + mode != fullMode && mode != menuMode) + emit menuSelected(menu); + else + changeValue(item); + } + } + break; + case noColIdx: + setValue(item, no); + break; + case modColIdx: + setValue(item, mod); + break; + case yesColIdx: + setValue(item, yes); + break; + case dataColIdx: + changeValue(item); + break; + } + +skip: + //printf("contentsMouseReleaseEvent: %d,%d\n", p.x(), p.y()); + Parent::mouseReleaseEvent(e); +} + +void ConfigList::mouseMoveEvent(QMouseEvent* e) +{ + //QPoint p(contentsToViewport(e->pos())); + //printf("contentsMouseMoveEvent: %d,%d\n", p.x(), p.y()); + Parent::mouseMoveEvent(e); +} + +void ConfigList::mouseDoubleClickEvent(QMouseEvent* e) +{ + QPoint p = e->pos(); // TODO: Check if this works(was contentsToViewport). + ConfigItem* item = (ConfigItem*)itemAt(p); + struct menu *menu; + enum prop_type ptype; + + if (!item) + goto skip; + if (item->goParent) { + emit parentSelected(); + goto skip; + } + menu = item->menu; + if (!menu) + goto skip; + ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; + if (ptype == P_MENU && (mode == singleMode || mode == symbolMode)) + emit menuSelected(menu); + else if (menu->sym) + changeValue(item); + +skip: + //printf("contentsMouseDoubleClickEvent: %d,%d\n", p.x(), p.y()); + Parent::mouseDoubleClickEvent(e); +} + +void ConfigList::focusInEvent(QFocusEvent *e) +{ + struct menu *menu = NULL; + + Parent::focusInEvent(e); + + ConfigItem* item = (ConfigItem *)currentItem(); + if (item) { + item->setSelected(true); + menu = item->menu; + } + emit gotFocus(menu); +} + +void ConfigList::contextMenuEvent(QContextMenuEvent *e) +{ + if (e->y() <= header()->geometry().bottom()) { + if (!headerPopup) { + QAction *action; + + headerPopup = new QMenu(this); + action = new QAction(_("Show Name"), this); + action->setCheckable(true); + connect(action, SIGNAL(toggled(bool)), + parent(), SLOT(setShowName(bool))); + connect(parent(), SIGNAL(showNameChanged(bool)), + action, SLOT(setOn(bool))); + action->setChecked(showName); + headerPopup->addAction(action); + action = new QAction(_("Show Range"), this); + action->setCheckable(true); + connect(action, SIGNAL(toggled(bool)), + parent(), SLOT(setShowRange(bool))); + connect(parent(), SIGNAL(showRangeChanged(bool)), + action, SLOT(setOn(bool))); + action->setChecked(showRange); + headerPopup->addAction(action); + action = new QAction(_("Show Data"), this); + action->setCheckable(true); + connect(action, SIGNAL(toggled(bool)), + parent(), SLOT(setShowData(bool))); + connect(parent(), SIGNAL(showDataChanged(bool)), + action, SLOT(setOn(bool))); + action->setChecked(showData); + headerPopup->addAction(action); + } + headerPopup->exec(e->globalPos()); + e->accept(); + } else + e->ignore(); +} + +ConfigView*ConfigView::viewList; +QAction *ConfigView::showNormalAction; +QAction *ConfigView::showAllAction; +QAction *ConfigView::showPromptAction; + +ConfigView::ConfigView(QWidget* parent, const char *name) + : Parent(parent) +{ + setObjectName(name); + QVBoxLayout *verticalLayout = new QVBoxLayout(this); + verticalLayout->setContentsMargins(0, 0, 0, 0); + + list = new ConfigList(this); + verticalLayout->addWidget(list); + lineEdit = new ConfigLineEdit(this); + lineEdit->hide(); + verticalLayout->addWidget(lineEdit); + + this->nextView = viewList; + viewList = this; +} + +ConfigView::~ConfigView(void) +{ + ConfigView** vp; + + for (vp = &viewList; *vp; vp = &(*vp)->nextView) { + if (*vp == this) { + *vp = nextView; + break; + } + } +} + +void ConfigView::setOptionMode(QAction *act) +{ + if (act == showNormalAction) + list->optMode = normalOpt; + else if (act == showAllAction) + list->optMode = allOpt; + else + list->optMode = promptOpt; + + list->updateListAll(); +} + +void ConfigView::setShowName(bool b) +{ + if (list->showName != b) { + list->showName = b; + list->reinit(); + emit showNameChanged(b); + } +} + +void ConfigView::setShowRange(bool b) +{ + if (list->showRange != b) { + list->showRange = b; + list->reinit(); + emit showRangeChanged(b); + } +} + +void ConfigView::setShowData(bool b) +{ + if (list->showData != b) { + list->showData = b; + list->reinit(); + emit showDataChanged(b); + } +} + +void ConfigList::setAllOpen(bool open) +{ + QTreeWidgetItemIterator it(this); + + while (*it) { + (*it)->setExpanded(open); + + ++it; + } +} + +void ConfigView::updateList(ConfigItem* item) +{ + ConfigView* v; + + for (v = viewList; v; v = v->nextView) + v->list->updateList(item); +} + +void ConfigView::updateListAll(void) +{ + ConfigView* v; + + for (v = viewList; v; v = v->nextView) + v->list->updateListAll(); +} + +ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name) + : Parent(parent), sym(0), _menu(0) +{ + setObjectName(name); + + + if (!objectName().isEmpty()) { + configSettings->beginGroup(objectName()); + _showDebug = configSettings->value("/showDebug", false).toBool(); + configSettings->endGroup(); + connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); + } +} + +void ConfigInfoView::saveSettings(void) +{ + if (!objectName().isEmpty()) { + configSettings->beginGroup(objectName()); + configSettings->setValue("/showDebug", showDebug()); + configSettings->endGroup(); + } +} + +void ConfigInfoView::setShowDebug(bool b) +{ + if (_showDebug != b) { + _showDebug = b; + if (_menu) + menuInfo(); + else if (sym) + symbolInfo(); + emit showDebugChanged(b); + } +} + +void ConfigInfoView::setInfo(struct menu *m) +{ + if (_menu == m) + return; + _menu = m; + sym = NULL; + if (!_menu) + clear(); + else + menuInfo(); +} + +void ConfigInfoView::symbolInfo(void) +{ + QString str; + + str += "Symbol: "; + str += print_filter(sym->name); + str += "

value: "; + str += print_filter(sym_get_string_value(sym)); + str += "
visibility: "; + str += sym->visible == yes ? "y" : sym->visible == mod ? "m" : "n"; + str += "
"; + str += debug_info(sym); + + setText(str); +} + +void ConfigInfoView::menuInfo(void) +{ + struct symbol* sym; + QString head, debug, help; + + sym = _menu->sym; + if (sym) { + if (_menu->prompt) { + head += ""; + head += print_filter(_(_menu->prompt->text)); + head += ""; + if (sym->name) { + head += " ("; + if (showDebug()) + head += QString().sprintf("", sym); + head += print_filter(sym->name); + if (showDebug()) + head += ""; + head += ")"; + } + } else if (sym->name) { + head += ""; + if (showDebug()) + head += QString().sprintf("", sym); + head += print_filter(sym->name); + if (showDebug()) + head += ""; + head += ""; + } + head += "

"; + + if (showDebug()) + debug = debug_info(sym); + + struct gstr help_gstr = str_new(); + menu_get_ext_help(_menu, &help_gstr); + help = print_filter(str_get(&help_gstr)); + str_free(&help_gstr); + } else if (_menu->prompt) { + head += ""; + head += print_filter(_(_menu->prompt->text)); + head += "

"; + if (showDebug()) { + if (_menu->prompt->visible.expr) { + debug += "  dep: "; + expr_print(_menu->prompt->visible.expr, expr_print_help, &debug, E_NONE); + debug += "

"; + } + } + } + if (showDebug()) + debug += QString().sprintf("defined at %s:%d

", _menu->file->name, _menu->lineno); + + setText(head + debug + help); +} + +QString ConfigInfoView::debug_info(struct symbol *sym) +{ + QString debug; + + debug += "type: "; + debug += print_filter(sym_type_name(sym->type)); + if (sym_is_choice(sym)) + debug += " (choice)"; + debug += "
"; + if (sym->rev_dep.expr) { + debug += "reverse dep: "; + expr_print(sym->rev_dep.expr, expr_print_help, &debug, E_NONE); + debug += "
"; + } + for (struct property *prop = sym->prop; prop; prop = prop->next) { + switch (prop->type) { + case P_PROMPT: + case P_MENU: + debug += QString().sprintf("prompt: ", prop->menu); + debug += print_filter(_(prop->text)); + debug += "
"; + break; + case P_DEFAULT: + case P_SELECT: + case P_RANGE: + case P_ENV: + debug += prop_get_type_name(prop->type); + debug += ": "; + expr_print(prop->expr, expr_print_help, &debug, E_NONE); + debug += "
"; + break; + case P_CHOICE: + if (sym_is_choice(sym)) { + debug += "choice: "; + expr_print(prop->expr, expr_print_help, &debug, E_NONE); + debug += "
"; + } + break; + default: + debug += "unknown property: "; + debug += prop_get_type_name(prop->type); + debug += "
"; + } + if (prop->visible.expr) { + debug += "    dep: "; + expr_print(prop->visible.expr, expr_print_help, &debug, E_NONE); + debug += "
"; + } + } + debug += "
"; + + return debug; +} + +QString ConfigInfoView::print_filter(const QString &str) +{ + QRegExp re("[<>&\"\\n]"); + QString res = str; + for (int i = 0; (i = res.indexOf(re, i)) >= 0;) { + switch (res[i].toLatin1()) { + case '<': + res.replace(i, 1, "<"); + i += 4; + break; + case '>': + res.replace(i, 1, ">"); + i += 4; + break; + case '&': + res.replace(i, 1, "&"); + i += 5; + break; + case '"': + res.replace(i, 1, """); + i += 6; + break; + case '\n': + res.replace(i, 1, "
"); + i += 4; + break; + } + } + return res; +} + +void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char *str) +{ + QString* text = reinterpret_cast(data); + QString str2 = print_filter(str); + + if (sym && sym->name && !(sym->flags & SYMBOL_CONST)) { + *text += QString().sprintf("", sym); + *text += str2; + *text += ""; + } else + *text += str2; +} + +QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos) +{ + QMenu* popup = Parent::createStandardContextMenu(pos); + QAction* action = new QAction(_("Show Debug Info"), popup); + action->setCheckable(true); + connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool))); + connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool))); + action->setChecked(showDebug()); + popup->addSeparator(); + popup->addAction(action); + return popup; +} + +void ConfigInfoView::contextMenuEvent(QContextMenuEvent *e) +{ + Parent::contextMenuEvent(e); +} + +ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *name) + : Parent(parent), result(NULL) +{ + setObjectName(name); + setWindowTitle("Search Config"); + + QVBoxLayout* layout1 = new QVBoxLayout(this); + layout1->setContentsMargins(11, 11, 11, 11); + layout1->setSpacing(6); + QHBoxLayout* layout2 = new QHBoxLayout(0); + layout2->setContentsMargins(0, 0, 0, 0); + layout2->setSpacing(6); + layout2->addWidget(new QLabel(_("Find:"), this)); + editField = new QLineEdit(this); + connect(editField, SIGNAL(returnPressed()), SLOT(search())); + layout2->addWidget(editField); + searchButton = new QPushButton(_("Search"), this); + searchButton->setAutoDefault(false); + connect(searchButton, SIGNAL(clicked()), SLOT(search())); + layout2->addWidget(searchButton); + layout1->addLayout(layout2); + + split = new QSplitter(this); + split->setOrientation(Qt::Vertical); + list = new ConfigView(split, name); + list->list->mode = listMode; + info = new ConfigInfoView(split, name); + connect(list->list, SIGNAL(menuChanged(struct menu *)), + info, SLOT(setInfo(struct menu *))); + connect(list->list, SIGNAL(menuChanged(struct menu *)), + parent, SLOT(setMenuLink(struct menu *))); + + layout1->addWidget(split); + + if (name) { + QVariant x, y; + int width, height; + bool ok; + + configSettings->beginGroup(name); + width = configSettings->value("/window width", parent->width() / 2).toInt(); + height = configSettings->value("/window height", parent->height() / 2).toInt(); + resize(width, height); + x = configSettings->value("/window x"); + y = configSettings->value("/window y"); + if ((x.isValid())&&(y.isValid())) + move(x.toInt(), y.toInt()); + QList sizes = configSettings->readSizes("/split", &ok); + if (ok) + split->setSizes(sizes); + configSettings->endGroup(); + connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); + } +} + +void ConfigSearchWindow::saveSettings(void) +{ + if (!objectName().isEmpty()) { + configSettings->beginGroup(objectName()); + configSettings->setValue("/window x", pos().x()); + configSettings->setValue("/window y", pos().y()); + configSettings->setValue("/window width", size().width()); + configSettings->setValue("/window height", size().height()); + configSettings->writeSizes("/split", split->sizes()); + configSettings->endGroup(); + } +} + +void ConfigSearchWindow::search(void) +{ + struct symbol **p; + struct property *prop; + ConfigItem *lastItem = NULL; + + free(result); + list->list->clear(); + info->clear(); + + result = sym_re_search(editField->text().toLatin1()); + if (!result) + return; + for (p = result; *p; p++) { + for_all_prompts((*p), prop) + lastItem = new ConfigItem(list->list, lastItem, prop->menu, + menu_is_visible(prop->menu)); + } +} + +/* + * Construct the complete config widget + */ +ConfigMainWindow::ConfigMainWindow(void) + : searchWindow(0) +{ + QMenuBar* menu; + bool ok = true; + QVariant x, y; + int width, height; + char title[256]; + + QDesktopWidget *d = configApp->desktop(); + snprintf(title, sizeof(title), "%s%s", + rootmenu.prompt->text, + "" + ); + setWindowTitle(title); + + width = configSettings->value("/window width", d->width() - 64).toInt(); + height = configSettings->value("/window height", d->height() - 64).toInt(); + resize(width, height); + x = configSettings->value("/window x"); + y = configSettings->value("/window y"); + if ((x.isValid())&&(y.isValid())) + move(x.toInt(), y.toInt()); + + split1 = new QSplitter(this); + split1->setOrientation(Qt::Horizontal); + setCentralWidget(split1); + + menuView = new ConfigView(split1, "menu"); + menuList = menuView->list; + + split2 = new QSplitter(split1); + split2->setOrientation(Qt::Vertical); + + // create config tree + configView = new ConfigView(split2, "config"); + configList = configView->list; + + helpText = new ConfigInfoView(split2, "help"); + + setTabOrder(configList, helpText); + configList->setFocus(); + + menu = menuBar(); + toolBar = new QToolBar("Tools", this); + addToolBar(toolBar); + + backAction = new QAction(QPixmap(xpm_back), _("Back"), this); + connect(backAction, SIGNAL(triggered(bool)), SLOT(goBack())); + backAction->setEnabled(false); + QAction *quitAction = new QAction(_("&Quit"), this); + quitAction->setShortcut(Qt::CTRL + Qt::Key_Q); + connect(quitAction, SIGNAL(triggered(bool)), SLOT(close())); + QAction *loadAction = new QAction(QPixmap(xpm_load), _("&Load"), this); + loadAction->setShortcut(Qt::CTRL + Qt::Key_L); + connect(loadAction, SIGNAL(triggered(bool)), SLOT(loadConfig())); + saveAction = new QAction(QPixmap(xpm_save), _("&Save"), this); + saveAction->setShortcut(Qt::CTRL + Qt::Key_S); + connect(saveAction, SIGNAL(triggered(bool)), SLOT(saveConfig())); + conf_set_changed_callback(conf_changed); + // Set saveAction's initial state + conf_changed(); + QAction *saveAsAction = new QAction(_("Save &As..."), this); + connect(saveAsAction, SIGNAL(triggered(bool)), SLOT(saveConfigAs())); + QAction *searchAction = new QAction(_("&Find"), this); + searchAction->setShortcut(Qt::CTRL + Qt::Key_F); + connect(searchAction, SIGNAL(triggered(bool)), SLOT(searchConfig())); + singleViewAction = new QAction(QPixmap(xpm_single_view), _("Single View"), this); + singleViewAction->setCheckable(true); + connect(singleViewAction, SIGNAL(triggered(bool)), SLOT(showSingleView())); + splitViewAction = new QAction(QPixmap(xpm_split_view), _("Split View"), this); + splitViewAction->setCheckable(true); + connect(splitViewAction, SIGNAL(triggered(bool)), SLOT(showSplitView())); + fullViewAction = new QAction(QPixmap(xpm_tree_view), _("Full View"), this); + fullViewAction->setCheckable(true); + connect(fullViewAction, SIGNAL(triggered(bool)), SLOT(showFullView())); + + QAction *showNameAction = new QAction(_("Show Name"), this); + showNameAction->setCheckable(true); + connect(showNameAction, SIGNAL(toggled(bool)), configView, SLOT(setShowName(bool))); + showNameAction->setChecked(configView->showName()); + QAction *showRangeAction = new QAction(_("Show Range"), this); + showRangeAction->setCheckable(true); + connect(showRangeAction, SIGNAL(toggled(bool)), configView, SLOT(setShowRange(bool))); + QAction *showDataAction = new QAction(_("Show Data"), this); + showDataAction->setCheckable(true); + connect(showDataAction, SIGNAL(toggled(bool)), configView, SLOT(setShowData(bool))); + + QActionGroup *optGroup = new QActionGroup(this); + optGroup->setExclusive(true); + connect(optGroup, SIGNAL(triggered(QAction*)), configView, + SLOT(setOptionMode(QAction *))); + connect(optGroup, SIGNAL(triggered(QAction *)), menuView, + SLOT(setOptionMode(QAction *))); + + configView->showNormalAction = new QAction(_("Show Normal Options"), optGroup); + configView->showAllAction = new QAction(_("Show All Options"), optGroup); + configView->showPromptAction = new QAction(_("Show Prompt Options"), optGroup); + configView->showNormalAction->setCheckable(true); + configView->showAllAction->setCheckable(true); + configView->showPromptAction->setCheckable(true); + + QAction *showDebugAction = new QAction( _("Show Debug Info"), this); + showDebugAction->setCheckable(true); + connect(showDebugAction, SIGNAL(toggled(bool)), helpText, SLOT(setShowDebug(bool))); + showDebugAction->setChecked(helpText->showDebug()); + + QAction *showIntroAction = new QAction( _("Introduction"), this); + connect(showIntroAction, SIGNAL(triggered(bool)), SLOT(showIntro())); + QAction *showAboutAction = new QAction( _("About"), this); + connect(showAboutAction, SIGNAL(triggered(bool)), SLOT(showAbout())); + + // init tool bar + toolBar->addAction(backAction); + toolBar->addSeparator(); + toolBar->addAction(loadAction); + toolBar->addAction(saveAction); + toolBar->addSeparator(); + toolBar->addAction(singleViewAction); + toolBar->addAction(splitViewAction); + toolBar->addAction(fullViewAction); + + // create config menu + QMenu* config = menu->addMenu(_("&File")); + config->addAction(loadAction); + config->addAction(saveAction); + config->addAction(saveAsAction); + config->addSeparator(); + config->addAction(quitAction); + + // create edit menu + QMenu* editMenu = menu->addMenu(_("&Edit")); + editMenu->addAction(searchAction); + + // create options menu + QMenu* optionMenu = menu->addMenu(_("&Option")); + optionMenu->addAction(showNameAction); + optionMenu->addAction(showRangeAction); + optionMenu->addAction(showDataAction); + optionMenu->addSeparator(); + optionMenu->addActions(optGroup->actions()); + optionMenu->addSeparator(); + + // create help menu + menu->addSeparator(); + QMenu* helpMenu = menu->addMenu(_("&Help")); + helpMenu->addAction(showIntroAction); + helpMenu->addAction(showAboutAction); + + connect(configList, SIGNAL(menuChanged(struct menu *)), + helpText, SLOT(setInfo(struct menu *))); + connect(configList, SIGNAL(menuSelected(struct menu *)), + SLOT(changeMenu(struct menu *))); + connect(configList, SIGNAL(parentSelected()), + SLOT(goBack())); + connect(menuList, SIGNAL(menuChanged(struct menu *)), + helpText, SLOT(setInfo(struct menu *))); + connect(menuList, SIGNAL(menuSelected(struct menu *)), + SLOT(changeMenu(struct menu *))); + + connect(configList, SIGNAL(gotFocus(struct menu *)), + helpText, SLOT(setInfo(struct menu *))); + connect(menuList, SIGNAL(gotFocus(struct menu *)), + helpText, SLOT(setInfo(struct menu *))); + connect(menuList, SIGNAL(gotFocus(struct menu *)), + SLOT(listFocusChanged(void))); + connect(helpText, SIGNAL(menuSelected(struct menu *)), + SLOT(setMenuLink(struct menu *))); + + QString listMode = configSettings->value("/listMode", "symbol").toString(); + if (listMode == "single") + showSingleView(); + else if (listMode == "full") + showFullView(); + else /*if (listMode == "split")*/ + showSplitView(); + + // UI setup done, restore splitter positions + QList sizes = configSettings->readSizes("/split1", &ok); + if (ok) + split1->setSizes(sizes); + + sizes = configSettings->readSizes("/split2", &ok); + if (ok) + split2->setSizes(sizes); +} + +void ConfigMainWindow::loadConfig(void) +{ + QString s = QFileDialog::getOpenFileName(this, "", conf_get_configname()); + if (s.isNull()) + return; + if (conf_read(QFile::encodeName(s))) + QMessageBox::information(this, "qconf", _("Unable to load configuration!")); + ConfigView::updateListAll(); +} + +bool ConfigMainWindow::saveConfig(void) +{ + if (conf_write(NULL)) { + QMessageBox::information(this, "qconf", _("Unable to save configuration!")); + return false; + } + return true; +} + +void ConfigMainWindow::saveConfigAs(void) +{ + QString s = QFileDialog::getSaveFileName(this, "", conf_get_configname()); + if (s.isNull()) + return; + saveConfig(); +} + +void ConfigMainWindow::searchConfig(void) +{ + if (!searchWindow) + searchWindow = new ConfigSearchWindow(this, "search"); + searchWindow->show(); +} + +void ConfigMainWindow::changeMenu(struct menu *menu) +{ + configList->setRootMenu(menu); + if (configList->rootEntry->parent == &rootmenu) + backAction->setEnabled(false); + else + backAction->setEnabled(true); +} + +void ConfigMainWindow::setMenuLink(struct menu *menu) +{ + struct menu *parent; + ConfigList* list = NULL; + ConfigItem* item; + + if (configList->menuSkip(menu)) + return; + + switch (configList->mode) { + case singleMode: + list = configList; + parent = menu_get_parent_menu(menu); + if (!parent) + return; + list->setRootMenu(parent); + break; + case symbolMode: + if (menu->flags & MENU_ROOT) { + configList->setRootMenu(menu); + configList->clearSelection(); + list = menuList; + } else { + list = configList; + parent = menu_get_parent_menu(menu->parent); + if (!parent) + return; + item = menuList->findConfigItem(parent); + if (item) { + item->setSelected(true); + menuList->scrollToItem(item); + } + list->setRootMenu(parent); + } + break; + case fullMode: + list = configList; + break; + default: + break; + } + + if (list) { + item = list->findConfigItem(menu); + if (item) { + item->setSelected(true); + list->scrollToItem(item); + list->setFocus(); + } + } +} + +void ConfigMainWindow::listFocusChanged(void) +{ + if (menuList->mode == menuMode) + configList->clearSelection(); +} + +void ConfigMainWindow::goBack(void) +{ + ConfigItem* item, *oldSelection; + + configList->setParentMenu(); + if (configList->rootEntry == &rootmenu) + backAction->setEnabled(false); + + if (menuList->selectedItems().count() == 0) + return; + + item = (ConfigItem*)menuList->selectedItems().first(); + oldSelection = item; + while (item) { + if (item->menu == configList->rootEntry) { + oldSelection->setSelected(false); + item->setSelected(true); + break; + } + item = (ConfigItem*)item->parent(); + } +} + +void ConfigMainWindow::showSingleView(void) +{ + singleViewAction->setEnabled(false); + singleViewAction->setChecked(true); + splitViewAction->setEnabled(true); + splitViewAction->setChecked(false); + fullViewAction->setEnabled(true); + fullViewAction->setChecked(false); + + menuView->hide(); + menuList->setRootMenu(0); + configList->mode = singleMode; + if (configList->rootEntry == &rootmenu) + configList->updateListAll(); + else + configList->setRootMenu(&rootmenu); + configList->setFocus(); +} + +void ConfigMainWindow::showSplitView(void) +{ + singleViewAction->setEnabled(true); + singleViewAction->setChecked(false); + splitViewAction->setEnabled(false); + splitViewAction->setChecked(true); + fullViewAction->setEnabled(true); + fullViewAction->setChecked(false); + + configList->mode = symbolMode; + if (configList->rootEntry == &rootmenu) + configList->updateListAll(); + else + configList->setRootMenu(&rootmenu); + configList->setAllOpen(true); + configApp->processEvents(); + menuList->mode = menuMode; + menuList->setRootMenu(&rootmenu); + menuList->setAllOpen(true); + menuView->show(); + menuList->setFocus(); +} + +void ConfigMainWindow::showFullView(void) +{ + singleViewAction->setEnabled(true); + singleViewAction->setChecked(false); + splitViewAction->setEnabled(true); + splitViewAction->setChecked(false); + fullViewAction->setEnabled(false); + fullViewAction->setChecked(true); + + menuView->hide(); + menuList->setRootMenu(0); + configList->mode = fullMode; + if (configList->rootEntry == &rootmenu) + configList->updateListAll(); + else + configList->setRootMenu(&rootmenu); + configList->setFocus(); +} + +/* + * ask for saving configuration before quitting + * TODO ask only when something changed + */ +void ConfigMainWindow::closeEvent(QCloseEvent* e) +{ + if (!conf_get_changed()) { + e->accept(); + return; + } + QMessageBox mb("qconf", _("Save configuration?"), QMessageBox::Warning, + QMessageBox::Yes | QMessageBox::Default, QMessageBox::No, QMessageBox::Cancel | QMessageBox::Escape); + mb.setButtonText(QMessageBox::Yes, _("&Save Changes")); + mb.setButtonText(QMessageBox::No, _("&Discard Changes")); + mb.setButtonText(QMessageBox::Cancel, _("Cancel Exit")); + switch (mb.exec()) { + case QMessageBox::Yes: + if (saveConfig()) + e->accept(); + else + e->ignore(); + break; + case QMessageBox::No: + e->accept(); + break; + case QMessageBox::Cancel: + e->ignore(); + break; + } +} + +void ConfigMainWindow::showIntro(void) +{ + static const QString str = _("Welcome to the qconf graphical configuration tool.\n\n" + "For each option, a blank box indicates the feature is disabled, a check\n" + "indicates it is enabled, and a dot indicates that it is to be compiled\n" + "as a module. Clicking on the box will cycle through the three states.\n\n" + "If you do not see an option (e.g., a device driver) that you believe\n" + "should be present, try turning on Show All Options under the Options menu.\n" + "Although there is no cross reference yet to help you figure out what other\n" + "options must be enabled to support the option you are interested in, you can\n" + "still view the help of a grayed-out option.\n\n" + "Toggling Show Debug Info under the Options menu will show the dependencies,\n" + "which you can then match by examining other options.\n\n"); + + QMessageBox::information(this, "qconf", str); +} + +void ConfigMainWindow::showAbout(void) +{ + static const QString str = _("qconf is Copyright (C) 2002 Roman Zippel .\n" + "Copyright (C) 2015 Boris Barbulovski .\n\n" + "Bug reports and feature request can also be entered at http://bugzilla.kernel.org/\n"); + + QMessageBox::information(this, "qconf", str); +} + +void ConfigMainWindow::saveSettings(void) +{ + configSettings->setValue("/window x", pos().x()); + configSettings->setValue("/window y", pos().y()); + configSettings->setValue("/window width", size().width()); + configSettings->setValue("/window height", size().height()); + + QString entry; + switch(configList->mode) { + case singleMode : + entry = "single"; + break; + + case symbolMode : + entry = "split"; + break; + + case fullMode : + entry = "full"; + break; + + default: + break; + } + configSettings->setValue("/listMode", entry); + + configSettings->writeSizes("/split1", split1->sizes()); + configSettings->writeSizes("/split2", split2->sizes()); +} + +void ConfigMainWindow::conf_changed(void) +{ + if (saveAction) + saveAction->setEnabled(conf_get_changed()); +} + +void fixup_rootmenu(struct menu *menu) +{ + struct menu *child; + static int menu_cnt = 0; + + menu->flags |= MENU_ROOT; + for (child = menu->list; child; child = child->next) { + if (child->prompt && child->prompt->type == P_MENU) { + menu_cnt++; + fixup_rootmenu(child); + menu_cnt--; + } else if (!menu_cnt) + fixup_rootmenu(child); + } +} + +static const char *progname; + +static void usage(void) +{ + printf(_("%s [-s] \n").toLatin1().constData(), progname); + exit(0); +} + +int main(int ac, char** av) +{ + ConfigMainWindow* v; + const char *name; + + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + + progname = av[0]; + configApp = new QApplication(ac, av); + if (ac > 1 && av[1][0] == '-') { + switch (av[1][1]) { + case 's': + conf_set_message_callback(NULL); + break; + case 'h': + case '?': + usage(); + } + name = av[2]; + } else + name = av[1]; + if (!name) + usage(); + + conf_parse(name); + fixup_rootmenu(&rootmenu); + conf_read(NULL); + //zconfdump(stdout); + + configSettings = new ConfigSettings(); + configSettings->beginGroup("/kconfig/qconf"); + v = new ConfigMainWindow(); + + //zconfdump(stdout); + configApp->connect(configApp, SIGNAL(lastWindowClosed()), SLOT(quit())); + configApp->connect(configApp, SIGNAL(aboutToQuit()), v, SLOT(saveSettings())); + v->show(); + configApp->exec(); + + configSettings->endGroup(); + delete configSettings; + delete v; + delete configApp; + + return 0; +} diff --git a/scripts/config/qconf.h b/scripts/config/qconf.h new file mode 100644 index 00000000000000..a40036d1b05927 --- /dev/null +++ b/scripts/config/qconf.h @@ -0,0 +1,330 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "expr.h" + +class ConfigView; +class ConfigList; +class ConfigItem; +class ConfigLineEdit; +class ConfigMainWindow; + +class ConfigSettings : public QSettings { +public: + ConfigSettings(); + QList readSizes(const QString& key, bool *ok); + bool writeSizes(const QString& key, const QList& value); +}; + +enum colIdx { + promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx, colNr +}; +enum listMode { + singleMode, menuMode, symbolMode, fullMode, listMode +}; +enum optionMode { + normalOpt = 0, allOpt, promptOpt +}; + +class ConfigList : public QTreeWidget { + Q_OBJECT + typedef class QTreeWidget Parent; +public: + ConfigList(ConfigView* p, const char *name = 0); + void reinit(void); + ConfigView* parent(void) const + { + return (ConfigView*)Parent::parent(); + } + ConfigItem* findConfigItem(struct menu *); + +protected: + void keyPressEvent(QKeyEvent *e); + void mousePressEvent(QMouseEvent *e); + void mouseReleaseEvent(QMouseEvent *e); + void mouseMoveEvent(QMouseEvent *e); + void mouseDoubleClickEvent(QMouseEvent *e); + void focusInEvent(QFocusEvent *e); + void contextMenuEvent(QContextMenuEvent *e); + +public slots: + void setRootMenu(struct menu *menu); + + void updateList(ConfigItem *item); + void setValue(ConfigItem* item, tristate val); + void changeValue(ConfigItem* item); + void updateSelection(void); + void saveSettings(void); +signals: + void menuChanged(struct menu *menu); + void menuSelected(struct menu *menu); + void parentSelected(void); + void gotFocus(struct menu *); + +public: + void updateListAll(void) + { + updateAll = true; + updateList(NULL); + updateAll = false; + } + ConfigList* listView() + { + return this; + } + ConfigItem* firstChild() const + { + return (ConfigItem *)children().first(); + } + void addColumn(colIdx idx) + { + showColumn(idx); + } + void removeColumn(colIdx idx) + { + hideColumn(idx); + } + void setAllOpen(bool open); + void setParentMenu(void); + + bool menuSkip(struct menu *); + + void updateMenuList(ConfigItem *parent, struct menu*); + void updateMenuList(ConfigList *parent, struct menu*); + + bool updateAll; + + QPixmap symbolYesPix, symbolModPix, symbolNoPix; + QPixmap choiceYesPix, choiceNoPix; + QPixmap menuPix, menuInvPix, menuBackPix, voidPix; + + bool showName, showRange, showData; + enum listMode mode; + enum optionMode optMode; + struct menu *rootEntry; + QPalette disabledColorGroup; + QPalette inactivedColorGroup; + QMenu* headerPopup; +}; + +class ConfigItem : public QTreeWidgetItem { + typedef class QTreeWidgetItem Parent; +public: + ConfigItem(ConfigList *parent, ConfigItem *after, struct menu *m, bool v) + : Parent(parent, after), nextItem(0), menu(m), visible(v), goParent(false) + { + init(); + } + ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m, bool v) + : Parent(parent, after), nextItem(0), menu(m), visible(v), goParent(false) + { + init(); + } + ConfigItem(ConfigList *parent, ConfigItem *after, bool v) + : Parent(parent, after), nextItem(0), menu(0), visible(v), goParent(true) + { + init(); + } + ~ConfigItem(void); + void init(void); + void okRename(int col); + void updateMenu(void); + void testUpdateMenu(bool v); + ConfigList* listView() const + { + return (ConfigList*)Parent::treeWidget(); + } + ConfigItem* firstChild() const + { + return (ConfigItem *)Parent::child(0); + } + ConfigItem* nextSibling() + { + ConfigItem *ret = NULL; + ConfigItem *_parent = (ConfigItem *)parent(); + + if(_parent) { + ret = (ConfigItem *)_parent->child(_parent->indexOfChild(this)+1); + } else { + QTreeWidget *_treeWidget = treeWidget(); + ret = (ConfigItem *)_treeWidget->topLevelItem(_treeWidget->indexOfTopLevelItem(this)+1); + } + + return ret; + } + void setText(colIdx idx, const QString& text) + { + Parent::setText(idx, text); + } + QString text(colIdx idx) const + { + return Parent::text(idx); + } + void setPixmap(colIdx idx, const QIcon &icon) + { + Parent::setIcon(idx, icon); + } + const QIcon pixmap(colIdx idx) const + { + return icon(idx); + } + // TODO: Implement paintCell + + ConfigItem* nextItem; + struct menu *menu; + bool visible; + bool goParent; +}; + +class ConfigLineEdit : public QLineEdit { + Q_OBJECT + typedef class QLineEdit Parent; +public: + ConfigLineEdit(ConfigView* parent); + ConfigView* parent(void) const + { + return (ConfigView*)Parent::parent(); + } + void show(ConfigItem *i); + void keyPressEvent(QKeyEvent *e); + +public: + ConfigItem *item; +}; + +class ConfigView : public QWidget { + Q_OBJECT + typedef class QWidget Parent; +public: + ConfigView(QWidget* parent, const char *name = 0); + ~ConfigView(void); + static void updateList(ConfigItem* item); + static void updateListAll(void); + + bool showName(void) const { return list->showName; } + bool showRange(void) const { return list->showRange; } + bool showData(void) const { return list->showData; } +public slots: + void setShowName(bool); + void setShowRange(bool); + void setShowData(bool); + void setOptionMode(QAction *); +signals: + void showNameChanged(bool); + void showRangeChanged(bool); + void showDataChanged(bool); +public: + ConfigList* list; + ConfigLineEdit* lineEdit; + + static ConfigView* viewList; + ConfigView* nextView; + + static QAction *showNormalAction; + static QAction *showAllAction; + static QAction *showPromptAction; +}; + +class ConfigInfoView : public QTextBrowser { + Q_OBJECT + typedef class QTextBrowser Parent; +public: + ConfigInfoView(QWidget* parent, const char *name = 0); + bool showDebug(void) const { return _showDebug; } + +public slots: + void setInfo(struct menu *menu); + void saveSettings(void); + void setShowDebug(bool); + +signals: + void showDebugChanged(bool); + void menuSelected(struct menu *); + +protected: + void symbolInfo(void); + void menuInfo(void); + QString debug_info(struct symbol *sym); + static QString print_filter(const QString &str); + static void expr_print_help(void *data, struct symbol *sym, const char *str); + QMenu *createStandardContextMenu(const QPoint & pos); + void contextMenuEvent(QContextMenuEvent *e); + + struct symbol *sym; + struct menu *_menu; + bool _showDebug; +}; + +class ConfigSearchWindow : public QDialog { + Q_OBJECT + typedef class QDialog Parent; +public: + ConfigSearchWindow(ConfigMainWindow* parent, const char *name = 0); + +public slots: + void saveSettings(void); + void search(void); + +protected: + QLineEdit* editField; + QPushButton* searchButton; + QSplitter* split; + ConfigView* list; + ConfigInfoView* info; + + struct symbol **result; +}; + +class ConfigMainWindow : public QMainWindow { + Q_OBJECT + + static QAction *saveAction; + static void conf_changed(void); +public: + ConfigMainWindow(void); +public slots: + void changeMenu(struct menu *); + void setMenuLink(struct menu *); + void listFocusChanged(void); + void goBack(void); + void loadConfig(void); + bool saveConfig(void); + void saveConfigAs(void); + void searchConfig(void); + void showSingleView(void); + void showSplitView(void); + void showFullView(void); + void showIntro(void); + void showAbout(void); + void saveSettings(void); + +protected: + void closeEvent(QCloseEvent *e); + + ConfigSearchWindow *searchWindow; + ConfigView *menuView; + ConfigList *menuList; + ConfigView *configView; + ConfigList *configList; + ConfigInfoView *helpText; + QToolBar *toolBar; + QAction *backAction; + QAction *singleViewAction; + QAction *splitViewAction; + QAction *fullViewAction; + QSplitter *split1; + QSplitter *split2; +}; diff --git a/scripts/download.pl b/scripts/download.pl index 936bd0bddb768d..64e29392ab6ecb 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -88,6 +88,7 @@ ($) } my $hash_cmd = hash_cmd(); +$hash_cmd or ($file_hash eq "skip") or die "Cannot find appropriate hash command, ensure the provided hash is either a MD5 or SHA256 checksum.\n"; sub download { diff --git a/scripts/om-fwupgradecfg-gen.sh b/scripts/om-fwupgradecfg-gen.sh index a96adf9bc8b2fd..4960149f11f5f4 100755 --- a/scripts/om-fwupgradecfg-gen.sh +++ b/scripts/om-fwupgradecfg-gen.sh @@ -1,4 +1,4 @@ -#/bin/sh +#!/bin/sh # # Copyright (C) 2011 OpenWrt.org # diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 261490b8681601..fbd458bf2a1e8c 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -535,11 +535,6 @@ () $pkg->{makefile}, $pkg_dep->{src}, $deptype, $pkg_dep->{makefile}, $deptype; next; } - unless ($pkg->{src} ne $pkg_dep->{sec}.$suffix) { - warn sprintf "WARNING: Makefile '%s' has a build dependency on itself\n", - $pkg->{makefile}; - next; - } $idx = $pkg_dep->{subdir}.$pkg_dep->{src}; } elsif (defined($srcpackage{$dep})) { $idx = $subdir{$dep}.$dep; diff --git a/target/Config.in b/target/Config.in index cb876c6af2129d..3aef76890dba3c 100644 --- a/target/Config.in +++ b/target/Config.in @@ -199,6 +199,7 @@ config ARCH default "mips64" if mips64 default "mips64el" if mips64el default "powerpc" if powerpc + default "powerpc64" if powerpc64 default "sh3" if sh3 default "sh3eb" if sh3eb default "sh4" if sh4 diff --git a/target/linux/apm821xx/base-files/etc/board.d/01_leds b/target/linux/apm821xx/base-files/etc/board.d/01_leds index 3b5fb721ae38e6..c218efa49bddbf 100755 --- a/target/linux/apm821xx/base-files/etc/board.d/01_leds +++ b/target/linux/apm821xx/base-files/etc/board.d/01_leds @@ -7,7 +7,7 @@ board_config_update board=$(board_name) case "$board" in -mr24) +meraki,mr24) ucidef_set_led_netdev "wan" "WAN" "mr24:green:wan" "eth0" ucidef_set_led_wlan "wlan1" "WLAN1" "mr24:green:wifi1" "phy0assoc" ucidef_set_led_wlan "wlan2" "WLAN2" "mr24:green:wifi2" "phy0assoc" @@ -15,7 +15,7 @@ mr24) ucidef_set_led_wlan "wlan4" "WLAN4" "mr24:green:wifi4" "phy0tpt" ;; -mx60) +meraki,mx60) ucidef_set_led_switch "wan" "WAN" "mx60:green:wan" "switch0" "0x20" ucidef_set_led_switch "lan1" "LAN1" "mx60:green:lan1" "switch0" "0x10" ucidef_set_led_switch "lan2" "LAN2" "mx60:green:lan2" "switch0" "0x08" @@ -23,11 +23,12 @@ mx60) ucidef_set_led_switch "lan4" "LAN4" "mx60:green:lan4" "switch0" "0x02" ;; -mbl) +wd,mybooklive|\ +wd,mybooklive-duo) ucidef_set_led_ide "sata" "SATA" "mbl:blue:power" ;; -wndr4700) +netgear,wndr4700) ucidef_set_led_ide "sata" "SATA" "wndr4700:green:hd" ucidef_set_led_switch "wan_green" "WAN (green)" "wndr4700:green:wan" "switch0" "0x20" ucidef_set_led_netdev "wan_yellow" "WAN (yellow)" "wndr4700:yellow:wan" "eth0.2" "tx rx" diff --git a/target/linux/apm821xx/base-files/etc/board.d/02_network b/target/linux/apm821xx/base-files/etc/board.d/02_network index 03df7cb49f7aa5..6f4456e8a1e47c 100755 --- a/target/linux/apm821xx/base-files/etc/board.d/02_network +++ b/target/linux/apm821xx/base-files/etc/board.d/02_network @@ -8,13 +8,14 @@ board_config_update board=$(board_name) case "$board" in -mbl|\ -mr24) +meraki,mr24|\ +wd,mybooklive|\ +wd,mybooklive-duo) ucidef_set_interface_lan "eth0" ;; -mx60|\ -wndr4700) +meraki,mx60|\ +netgear,wndr4700) ucidef_add_switch "switch0" \ "0@eth0" "4:lan" "3:lan" "2:lan" "1:lan" "5:wan" ;; diff --git a/target/linux/apm821xx/base-files/etc/diag.sh b/target/linux/apm821xx/base-files/etc/diag.sh index eb9b04b52511f3..26c035c6f3f3ae 100755 --- a/target/linux/apm821xx/base-files/etc/diag.sh +++ b/target/linux/apm821xx/base-files/etc/diag.sh @@ -3,40 +3,42 @@ . /lib/functions.sh . /lib/functions/leds.sh -get_status_led() { - local board=$(board_name) - - case $board in - mbl|\ - mr24|\ - mx60|\ - wndr4700) - status_led="$board:green:power" - ;; - - *) - ;; - esac -} +boot="$(get_dt_led boot)" +failsafe="$(get_dt_led failsafe)" +running="$(get_dt_led running)" +upgrade="$(get_dt_led upgrade)" set_state() { - get_status_led + status_led="$boot" case "$1" in + preinit_regular) + status_led_blink_preinit_regular + ;; preinit) status_led_blink_preinit ;; - failsafe) + status_led_off + [ -n "$running" ] && { + status_led="$running" + status_led_off + } + status_led="$failsafe" status_led_blink_failsafe ;; - - preinit_regular) - status_led_blink_preinit_regular + upgrade) + [ -n "$running" ] && { + status_led="$upgrade" + status_led_blink_preinit_regular + } ;; - done) - status_led_on + status_led_off + [ -n "$running" ] && { + status_led="$running" + status_led_on + } ;; esac } diff --git a/target/linux/apm821xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/apm821xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 4a7e1c0b19ac94..7a13a0afa86569 100644 --- a/target/linux/apm821xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/apm821xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -52,7 +52,7 @@ board=$(board_name) case "$FIRMWARE" in "pci_wmac0.eeprom") case $board in - wndr4700) + netgear,wndr4700) . /lib/upgrade/nand.sh if [ -n "$(nand_find_volume ubi0 caldata)" ]; then @@ -70,7 +70,7 @@ case "$FIRMWARE" in "pci_wmac1.eeprom") case $board in - wndr4700) + netgear,wndr4700) . /lib/upgrade/nand.sh if [ -n "$(nand_find_volume ubi0 caldata)" ]; then diff --git a/target/linux/apm821xx/base-files/lib/apm821xx.sh b/target/linux/apm821xx/base-files/lib/apm821xx.sh deleted file mode 100755 index 8f0814b29636df..00000000000000 --- a/target/linux/apm821xx/base-files/lib/apm821xx.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -APM821XX_BOARD_NAME= -APM821XX_MODEL= - -apm821xx_board_detect() { - local model - local name - - model=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /model/ {print $2}' /proc/cpuinfo) - - case "$model" in - *"Meraki MR24 Access Point") - name="mr24" - ;; - - *"Meraki MX60/MX60W Security Appliance") - name="mx60" - ;; - - *"MyBook Live"*) - name="mbl" - ;; - - *"Netgear WNDR4700/WNDR4720 Series") - name="wndr4700" - ;; - - *) - name="unknown" - ;; - esac - - [ -z "$name" ] && name="unknown" - - [ -z "$APM821XX_BOARD_NAME" ] && APM821XX_BOARD_NAME="$name" - [ -z "$APM821XX_MODEL" ] && APM821XX_MODEL="$model" - - [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/" - - echo "$APM821XX_BOARD_NAME" > /tmp/sysinfo/board_name - echo "$APM821XX_MODEL" > /tmp/sysinfo/model -} diff --git a/target/linux/apm821xx/base-files/lib/preinit/01_preinit_do_apm821xx.sh b/target/linux/apm821xx/base-files/lib/preinit/01_preinit_do_apm821xx.sh deleted file mode 100644 index 5675357533b85e..00000000000000 --- a/target/linux/apm821xx/base-files/lib/preinit/01_preinit_do_apm821xx.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -do_apm821xx() { - . /lib/apm821xx.sh - - apm821xx_board_detect -} - -boot_hook_add preinit_main do_apm821xx diff --git a/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx b/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx index ec540feb846568..1a27930d24fef9 100644 --- a/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx +++ b/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx @@ -4,8 +4,8 @@ preinit_set_mac_address() { . /lib/functions.sh case $(board_name) in - mr24|\ - mx60) + meraki,mr24|\ + meraki,mx60) mac_lan=$(mtd_get_mac_binary_ubi board-config 102) [ -n "$mac_lan" ] && ifconfig eth0 hw ether "$mac_lan" ;; diff --git a/target/linux/apm821xx/base-files/lib/preinit/05_set_preinit_iface_apm821xx b/target/linux/apm821xx/base-files/lib/preinit/05_set_preinit_iface_apm821xx index 97ef6dc68f4a99..a15a055a25275f 100644 --- a/target/linux/apm821xx/base-files/lib/preinit/05_set_preinit_iface_apm821xx +++ b/target/linux/apm821xx/base-files/lib/preinit/05_set_preinit_iface_apm821xx @@ -1,7 +1,5 @@ #!/bin/sh -. /lib/apm821xx.sh - apm821xx_set_preinit_iface() { ifname=eth0 } diff --git a/target/linux/apm821xx/base-files/lib/preinit/79_move_config b/target/linux/apm821xx/base-files/lib/preinit/79_move_config index 3ca8b0a71cdbd2..5d33feb91601a7 100644 --- a/target/linux/apm821xx/base-files/lib/preinit/79_move_config +++ b/target/linux/apm821xx/base-files/lib/preinit/79_move_config @@ -5,12 +5,18 @@ BOOTPART=/dev/sda1 move_config() { . /lib/functions.sh - [ "$(board_name)" = "mbl" ] || return - if [ -b $BOOTPART ]; then - mkdir -p /boot - mount -t ext4 -o rw,noatime $BOOTPART /boot - [ -f /boot/sysupgrade.tgz ] && mv -f /boot/sysupgrade.tgz / - fi + case "$(board_name)" in + wd,mybooklive|\ + wd,mybooklive-duo) + if [ -b $BOOTPART ]; then + mkdir -p /boot + mount -t ext4 -o rw,noatime $BOOTPART /boot + [ -f /boot/sysupgrade.tgz ] && mv -f /boot/sysupgrade.tgz / + fi + ;; + *) + ;; + esac } boot_hook_add preinit_mount_root move_config diff --git a/target/linux/apm821xx/base-files/lib/upgrade/merakinand.sh b/target/linux/apm821xx/base-files/lib/upgrade/merakinand.sh deleted file mode 100755 index fb961b894540cd..00000000000000 --- a/target/linux/apm821xx/base-files/lib/upgrade/merakinand.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2016 Chris Blake -# -# Custom upgrade script for Meraki NAND devices (ex. MR24) -# Based on merakinand.sh from the ar71xx target -# -. /lib/apm821xx.sh -. /lib/functions.sh - -merakinand_do_kernel_check() { - local board_name="$1" - local tar_file="$2" - local image_magic_word=`(tar xf $tar_file sysupgrade-$board_name/kernel -O 2>/dev/null | dd bs=1 count=4 skip=0 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"')` - - # What is our kernel magic string? - case "$board_name" in - "mr24"|\ - "mx60") - [ "$image_magic_word" == "8e73ed8a" ] && { - echo "pass" && return 0 - } - ;; - esac - - exit 1 -} - -merakinand_do_platform_check() { - local board_name="$1" - local tar_file="$2" - local control_length=`(tar xf $tar_file sysupgrade-$board_name/CONTROL -O | wc -c) 2> /dev/null` - local file_type="$(identify_tar $2 sysupgrade-$board_name/root)" - local kernel_magic="$(merakinand_do_kernel_check $1 $2)" - - case "$board_name" in - "mr24"|\ - "mx60") - [ "$control_length" = 0 -o "$file_type" != "squashfs" -o "$kernel_magic" != "pass" ] && { - echo "Invalid sysupgrade file for $board_name" - return 1 - } - ;; - *) - echo "Unsupported device $board_name"; - return 1 - ;; - esac - - return 0 -} - -merakinand_do_upgrade() { - local tar_file="$1" - local board_name="$(board_name)" - - # Do we need to do any platform tweaks? - case "$board_name" in - "mr24"|\ - "mx60") - nand_do_upgrade $1 - ;; - *) - echo "Unsupported device $board_name"; - exit 1 - ;; - esac -} diff --git a/target/linux/apm821xx/base-files/lib/upgrade/platform.sh b/target/linux/apm821xx/base-files/lib/upgrade/platform.sh index 55f8ffa75d3901..5d2eee4ca35ea9 100755 --- a/target/linux/apm821xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/apm821xx/base-files/lib/upgrade/platform.sh @@ -1,47 +1,30 @@ #!/bin/sh PART_NAME=firmware +REQUIRE_IMAGE_METADATA=1 platform_check_image() { local board=$(board_name) - [ "$#" -gt 1 ] && return 1 - case "$board" in - mbl) - mbl_do_platform_check $board "$1" - return $?; - ;; - - mr24|\ - mx60) - merakinand_do_platform_check $board "$1" + wd,mybooklive|\ + wd,mybooklive-duo) + mbl_do_platform_check "$1" return $?; ;; - - wndr4700) - nand_do_platform_check $board "$1" - return $?; - ;; - *) + return 0 ;; esac - - echo "Sysupgrade is not yet supported on $board." - return 1 } platform_pre_upgrade() { local board=$(board_name) case "$board" in - mr24|\ - mx60) - merakinand_do_upgrade "$1" - ;; - - wndr4700) + meraki,mr24|\ + meraki,mx60|\ + netgear,wndr4700) nand_do_upgrade "$1" ;; @@ -54,7 +37,8 @@ platform_do_upgrade() { local board=$(board_name) case "$board" in - mbl) + wd,mybooklive|\ + wd,mybooklive-duo) mbl_do_upgrade "$ARGV" ;; @@ -68,7 +52,8 @@ platform_copy_config() { local board=$(board_name) case "$board" in - mbl) + wd,mybooklive|\ + wd,mybooklive-duo) mbl_copy_config ;; diff --git a/target/linux/apm821xx/base-files/lib/upgrade/wdbook.sh b/target/linux/apm821xx/base-files/lib/upgrade/wdbook.sh index d7347516cb9424..2287e0619df387 100644 --- a/target/linux/apm821xx/base-files/lib/upgrade/wdbook.sh +++ b/target/linux/apm821xx/base-files/lib/upgrade/wdbook.sh @@ -1,36 +1,99 @@ . /lib/functions.sh -get_magic_at() { - local file="$1" - local pos="$2" - get_image "$file" | dd bs=1 count=2 skip="$pos" 2>/dev/null | hexdump -v -n 2 -e '1/1 "%02x"' -} +# copied from x86's platform.sh mbl_do_platform_check() { - local board="$1" - local file="$2" - local magic + local diskdev partdev diff - magic=$(get_magic_at "$file" 510) + [ "$#" -gt 1 ] && return 1 - [ "$magic" != "55aa" ] && { - echo "Failed to verify MBR boot signature." + export_bootdevice && export_partdevice diskdev -2 || { + echo "Unable to determine upgrade device" return 1 } + get_partitions "/dev/$diskdev" bootdisk + + #extract the boot sector from the image + get_image "$@" | dd of=/tmp/image.bs count=1 bs=512b 2>/dev/null + + get_partitions /tmp/image.bs image + + #compare tables + diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)" + + rm -f /tmp/image.bs /tmp/partmap.bootdisk /tmp/partmap.image + + if [ -n "$diff" ]; then + echo "Partition layout has changed. Full image will be written." + ask_bool 0 "Abort" && exit 1 + return 0 + fi + return 0; } mbl_do_upgrade() { + local diskdev partdev diff + + export_bootdevice && export_partdevice diskdev -2 || { + echo "Unable to determine upgrade device" + return 1 + } + sync - get_image "$1" | dd of=/dev/sda bs=2M conv=fsync - sleep 1 + + if [ "$SAVE_PARTITIONS" = "1" ]; then + get_partitions "/dev/$diskdev" bootdisk + + #extract the boot sector from the image + get_image "$@" | dd of=/tmp/image.bs count=1 bs=512b + + get_partitions /tmp/image.bs image + + #compare tables + diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)" + else + diff=1 + fi + + if [ -n "$diff" ]; then + get_image "$@" | dd of="/dev/$diskdev" bs=4096 conv=fsync + + # Separate removal and addtion is necessary; otherwise, partition 1 + # will be missing if it overlaps with the old partition 2 + partx -d - "/dev/$diskdev" + partx -a - "/dev/$diskdev" + + return 0 + fi + + #iterate over each partition from the image and write it to the boot disk + while read part start size; do + # root is /dev/sd[a|b]2 and not /dev/sd[a|b] this causes some problem + # one of which is this offset, I'm not sure what's the best fix, so + # here's a WA. + let part=$((part - 2)) + if export_partdevice partdev $part; then + echo "Writing image to /dev/$partdev..." + get_image "$@" | dd of="/dev/$partdev" ibs="512" obs=1M skip="$start" count="$size" conv=fsync + else + echo "Unable to find partition $part device, skipped." + fi + done < /tmp/partmap.image + + #copy partition uuid + echo "Writing new UUID to /dev/$diskdev..." + get_image "$@" | dd of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync } mbl_copy_config() { - mkdir -p /boot - [ -f /boot/uImage ] || mount -t ext4 -o rw,noatime /dev/sda1 /boot - cp -af "$CONF_TAR" /boot/ - sync - umount /boot + local partdev + + # Same as above /dev/sd[a|b]2 is root, so /boot is -1 + if export_partdevice partdev -1; then + mount -t ext4 -o rw,noatime "/dev/$partdev" /mnt + cp -af "$CONF_TAR" /mnt/ + umount /mnt + fi } diff --git a/target/linux/apm821xx/dts/apollo3g.dtsi b/target/linux/apm821xx/dts/apollo3g.dtsi index 783348a6787b6c..e88973f8d2fca1 100644 --- a/target/linux/apm821xx/dts/apollo3g.dtsi +++ b/target/linux/apm821xx/dts/apollo3g.dtsi @@ -14,6 +14,10 @@ aliases { serial0 = &UART0; + led-boot = &status; + led-failsafe = &status; + led-running = &status; + led-upgrade = &status; }; }; @@ -113,13 +117,13 @@ gpio-leds { compatible = "gpio-leds"; - power-red { + failsafe: power-red { label = "mbl:red:power"; gpios = <&GPIO1 4 GPIO_ACTIVE_HIGH>; linux,default-trigger = "panic"; }; - power-green { + status: power-green { label = "mbl:green:power"; gpios = <&GPIO1 5 GPIO_ACTIVE_HIGH>; }; @@ -167,6 +171,17 @@ &EMAC0 { status = "okay"; + + phy-map = <0x2>; + phy-address = <0x1>; + phy-handle = <&phy>; + + mdio { + phy: phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; + }; }; &SATA1 { diff --git a/target/linux/apm821xx/dts/MR24.dts b/target/linux/apm821xx/dts/meraki-mr24.dts similarity index 91% rename from target/linux/apm821xx/dts/MR24.dts rename to target/linux/apm821xx/dts/meraki-mr24.dts index 8d20872c3f1a89..2c2f8d281b42ad 100644 --- a/target/linux/apm821xx/dts/MR24.dts +++ b/target/linux/apm821xx/dts/meraki-mr24.dts @@ -16,10 +16,14 @@ / { model = "Meraki MR24 Access Point"; - compatible = "meraki,ikarem"; + compatible = "meraki,mr24", "meraki,ikarem", "apm,bluestone"; aliases { serial0 = &UART1; + led-boot = &status; + led-failsafe = &failsafe; + led-running = &status; + led-upgrade = &status; }; chosen { @@ -91,12 +95,12 @@ gpio-leds { compatible = "gpio-leds"; - power-green { + status: power-green { label = "mr24:green:power"; gpios = <&GPIO0 18 GPIO_ACTIVE_LOW>; }; - power-orange { + failsafe: power-orange { label = "mr24:orange:power"; gpios = <&GPIO0 19 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/apm821xx/dts/MX60.dts b/target/linux/apm821xx/dts/meraki-mx60.dts similarity index 93% rename from target/linux/apm821xx/dts/MX60.dts rename to target/linux/apm821xx/dts/meraki-mx60.dts index 4ec0043f325833..32e5c859e85769 100644 --- a/target/linux/apm821xx/dts/MX60.dts +++ b/target/linux/apm821xx/dts/meraki-mx60.dts @@ -16,10 +16,14 @@ / { model = "Meraki MX60/MX60W Security Appliance"; - compatible = "meraki,buckminster"; + compatible = "meraki,mx60", "meraki,buckminster", "apm,bluestone"; aliases { serial0 = &UART1; + led-boot = &status; + led-failsafe = &failsafe; + led-running = &status; + led-upgrade = &status; }; chosen { @@ -120,12 +124,12 @@ gpio-leds { compatible = "gpio-leds"; - power-green { + status: power-green { label = "mx60:green:power"; gpios = <&GPIO0 18 GPIO_ACTIVE_LOW>; }; - power-orange { + failsafe: power-orange { label = "mx60:orange:power"; gpios = <&GPIO0 19 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/apm821xx/dts/wndr4700.dts b/target/linux/apm821xx/dts/netgear-wndr4700.dts similarity index 98% rename from target/linux/apm821xx/dts/wndr4700.dts rename to target/linux/apm821xx/dts/netgear-wndr4700.dts index d1a65f3e62a262..2e0addf74b0b49 100644 --- a/target/linux/apm821xx/dts/wndr4700.dts +++ b/target/linux/apm821xx/dts/netgear-wndr4700.dts @@ -19,6 +19,10 @@ aliases { serial0 = &UART0; + led-boot = &status; + led-failsafe = &failsafe; + led-running = &status; + led-upgrade = &status; }; chosen { @@ -348,12 +352,12 @@ gpio-leds { compatible = "gpio-leds"; - power-green { + status: power-green { label = "wndr4700:green:power"; gpios = <&GPIO0 8 GPIO_ACTIVE_HIGH>; }; - power-orange { + failsafe: power-orange { label = "wndr4700:orange:power"; gpios = <&GPIO0 9 GPIO_ACTIVE_LOW>; linux,default-trigger = "panic"; diff --git a/target/linux/apm821xx/dts/apollo3g-duo.dts b/target/linux/apm821xx/dts/wd-mybooklive-duo.dts similarity index 92% rename from target/linux/apm821xx/dts/apollo3g-duo.dts rename to target/linux/apm821xx/dts/wd-mybooklive-duo.dts index 53459b0cc04b5c..4f6cc506f57bf6 100644 --- a/target/linux/apm821xx/dts/apollo3g-duo.dts +++ b/target/linux/apm821xx/dts/wd-mybooklive-duo.dts @@ -14,6 +14,7 @@ #include "apollo3g.dtsi" / { + compatible = "wd,mybooklive-duo", "amcc,apollo3g"; model = "MyBook Live Duo"; }; diff --git a/target/linux/apm821xx/dts/apollo3g.dts b/target/linux/apm821xx/dts/wd-mybooklive.dts similarity index 89% rename from target/linux/apm821xx/dts/apollo3g.dts rename to target/linux/apm821xx/dts/wd-mybooklive.dts index 4d31edae4a2d36..d841352292f5d4 100644 --- a/target/linux/apm821xx/dts/apollo3g.dts +++ b/target/linux/apm821xx/dts/wd-mybooklive.dts @@ -12,5 +12,6 @@ #include "apollo3g.dtsi" / { + compatible = "wd,mybooklive", "amcc,apollo3g"; model = "MyBook Live"; }; diff --git a/target/linux/apm821xx/image/Makefile b/target/linux/apm821xx/image/Makefile index ee85292d57dd9a..c012906eafff35 100644 --- a/target/linux/apm821xx/image/Makefile +++ b/target/linux/apm821xx/image/Makefile @@ -5,16 +5,16 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk -DEVICE_VARS += DEVICE_PROFILE IMAGE_SIZE DTB_SIZE +DEVICE_VARS += IMAGE_SIZE DTB_SIZE define Device/Default PROFILES := Default KERNEL_DEPENDS = $$(wildcard ../dts/$$(DEVICE_DTS).dts) - DEVICE_PROFILE := DEVICE_DTS := KERNEL_ENTRY := 0x00000000 KERNEL_LOADADDR := 0x00000000 DEVICE_DTS_DIR := ../dts + SUPPORTED_DEVICES = $(subst _,$(comma),$(1)) endef define Build/dtb @@ -61,17 +61,17 @@ endef define Build/MerakiNAND -$(STAGING_DIR_HOST)/bin/mkmerakifw \ - -B $(DEVICE_PROFILE) -s \ + -B $(BOARD_NAME) -s \ -i $@ \ -o $@.new @cp $@.new $@ endef -define Device/mr24 +define Device/meraki_mr24 DEVICE_TITLE := Cisco Meraki MR24 DEVICE_PACKAGES := kmod-spi-gpio - DEVICE_PROFILE := MR24 - DEVICE_DTS := MR24 + BOARD_NAME := mr24 + DEVICE_DTS := meraki-mr24 BLOCKSIZE := 63k IMAGES := sysupgrade.tar DTB_SIZE := 64512 @@ -82,17 +82,18 @@ define Device/mr24 check-size $$(KERNEL_SIZE) | \ MerakiAdd-dtb | pad-to 2047k | MerakiAdd-initramfs | \ MerakiNAND - IMAGE/sysupgrade.tar := sysupgrade-tar + IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata UBINIZE_OPTS := -E 5 + SUPPORTED_DEVICES += mr24 endef -TARGET_DEVICES += mr24 +TARGET_DEVICES += meraki_mr24 -define Device/mx60 +define Device/meraki_mx60 DEVICE_TITLE := Cisco Meraki MX60/MX60W DEVICE_PACKAGES := kmod-spi-gpio kmod-usb-ledtrig-usbport kmod-usb-dwc2 \ kmod-usb-storage block-mount - DEVICE_PROFILE := MX60 - DEVICE_DTS := MX60 + BOARD_NAME := mx60 + DEVICE_DTS := meraki-mx60 BLOCKSIZE := 63k IMAGES := sysupgrade.tar DTB_SIZE := 64512 @@ -107,10 +108,11 @@ define Device/mx60 check-size $$(KERNEL_SIZE) | \ MerakiAdd-dtb | pad-to 2047k | MerakiAdd-initramfs | \ MerakiNAND - IMAGE/sysupgrade.tar := sysupgrade-tar + IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata UBINIZE_OPTS := -E 5 + SUPPORTED_DEVICES += mx60 endef -TARGET_DEVICES += mx60 +TARGET_DEVICES += meraki_mx60 define Build/create-uImage-dtb # flat_dt target expect FIT image - which WNDR4700's uboot doesn't support @@ -145,21 +147,20 @@ define Build/wndr4700-specialImage -$(STAGING_DIR_HOST)/bin/mkimage -A $(LINUX_KARCH) -O linux -T multi \ -C $(1) -a $(KERNEL_LOADADDR) -e $(KERNEL_ENTRY) \ - -n '$(DEVICE_PROFILE) initramfs' -d $@:$@.fakerd:$@.dtb $@.new + -n '$(BOARD_NAME) initramfs' -d $@:$@.fakerd:$@.dtb $@.new mv $@.new $@ rm -rf $@.fakerd endef -define Device/WNDR4700 +define Device/netgear_wndr4700 DEVICE_TITLE := Netgear Centria N900 WNDR4700/WNDR4720 DEVICE_PACKAGES := badblocks block-mount e2fsprogs \ kmod-dm kmod-fs-ext4 kmod-fs-vfat kmod-usb-ledtrig-usbport \ kmod-md-mod kmod-nls-cp437 kmod-nls-iso8859-1 kmod-nls-iso8859-15 \ kmod-nls-utf8 kmod-usb3 kmod-usb-dwc2 kmod-usb-storage \ partx-utils - DEVICE_NAME := wndr4700 - DEVICE_PROFILE := wndr4700 - DEVICE_DTS := wndr4700 + BOARD_NAME := wndr4700 + DEVICE_DTS := netgear-wndr4700 PAGESIZE := 2048 SUBPAGESIZE := 512 BLOCKSIZE := 128k @@ -172,13 +173,14 @@ define Device/WNDR4700 KERNEL_INITRAMFS := kernel-bin | gzip | dtb | wndr4700-specialImage gzip IMAGE/factory.img := create-uImage-dtb | append-kernel | pad-to 2M | append-ubi | \ netgear-dni | check-size $$$$(IMAGE_SIZE) - IMAGE/sysupgrade.tar := sysupgrade-tar + IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata IMAGE/kernel.dtb := export-dtb | uImage none NETGEAR_BOARD_ID := WNDR4700 NETGEAR_HW_ID := 29763875+128+256 UBINIZE_OPTS := -E 5 + SUPPORTED_DEVICES += wndr4700 endef -TARGET_DEVICES += WNDR4700 +TARGET_DEVICES += netgear_wndr4700 endif @@ -217,31 +219,31 @@ define Device/MyBookLiveDefault KERNEL := kernel-bin | dtb | gzip | uImage gzip KERNEL_INITRAMFS := kernel-bin | dtb | gzip | uImage gzip BOOT_SIZE := 8 - IMAGES := rootfs.img kernel.dtb + IMAGES := rootfs.img.gz kernel.dtb DEVICE_DTB := apollo3g.dtb FILESYSTEMS := ext4 IMAGE/kernel.dtb := export-dtb - IMAGE/rootfs.img := boot-script | boot-img | hdd-img + IMAGE/rootfs.img.gz := boot-script | boot-img | hdd-img | gzip | append-metadata endef -define Device/MyBookLiveSingle +define Device/wd_mybooklive $(Device/MyBookLiveDefault) DEVICE_TITLE := Western Digital My Book Live - DEVICE_DTS := apollo3g - DEVICE_PROFILE := apollo3g + DEVICE_DTS := wd-mybooklive + SUPPORTED_DEVICES += mbl endef -TARGET_DEVICES += MyBookLiveSingle +TARGET_DEVICES += wd_mybooklive -define Device/MyBookLiveDuo +define Device/wd_mybooklive-duo $(Device/MyBookLiveDefault) DEVICE_TITLE := Western Digital My Book Live Duo DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-fs-vfat wpad-mini - DEVICE_DTS := apollo3g-duo - DEVICE_PROFILE := ap2nc + DEVICE_DTS := wd-mybooklive-duo + SUPPORTED_DEVICES += mbl endef -TARGET_DEVICES += MyBookLiveDuo +TARGET_DEVICES += wd_mybooklive-duo endif diff --git a/target/linux/apm821xx/sata/config-default b/target/linux/apm821xx/sata/config-default index b8342de0498d6c..7ca6bd4d3d89a1 100644 --- a/target/linux/apm821xx/sata/config-default +++ b/target/linux/apm821xx/sata/config-default @@ -1,5 +1,6 @@ # CONFIG_IKAREM is not set CONFIG_APOLLO3G=y +CONFIG_BROADCOM_PHY=y CONFIG_EXT4_FS=y CONFIG_DMADEVICES=y CONFIG_DMA_ENGINE=y diff --git a/target/linux/arc770/generic/target.mk b/target/linux/arc770/generic/target.mk index 15f598ee16cc96..2ca59b579b2360 100644 --- a/target/linux/arc770/generic/target.mk +++ b/target/linux/arc770/generic/target.mk @@ -1,5 +1,5 @@ BOARDNAME:=Generic -FEATURES += ramdisk usb ext4 +FEATURES += ramdisk usb ext4 source-only define Target/Description Build firmware images for generic ARC 770D based boards. diff --git a/target/linux/armvirt/64/config-default b/target/linux/armvirt/64/config-default index 8a8c50bc27d99e..c58863dc8a95be 100644 --- a/target/linux/armvirt/64/config-default +++ b/target/linux/armvirt/64/config-default @@ -47,6 +47,7 @@ CONFIG_ARM64_VA_BITS_39=y CONFIG_ARM64_VHE=y # CONFIG_ARMV8_DEPRECATED is not set CONFIG_ARM_GIC_V3_ITS=y +CONFIG_ARM_PMU=y # CONFIG_ARM_SBSA_WATCHDOG is not set CONFIG_ATOMIC64_SELFTEST=y CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y @@ -115,7 +116,6 @@ CONFIG_HW_RANDOM=y # CONFIG_HW_RANDOM_CAVIUM is not set CONFIG_HW_RANDOM_VIRTIO=y CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 -# CONFIG_KASAN is not set CONFIG_LCD_CLASS_DEVICE=m # CONFIG_LCD_PLATFORM is not set # CONFIG_LIQUIDIO is not set diff --git a/target/linux/at91/Makefile b/target/linux/at91/Makefile index a3e0be7c8a1a1d..cae3c6278b5aa7 100644 --- a/target/linux/at91/Makefile +++ b/target/linux/at91/Makefile @@ -9,11 +9,11 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=at91 MAINTAINER:=Claudio Mignanti -BOARDNAME:=Atmel AT91 -FEATURES:=squashfs targz ext2 usb usbgadget ubifs -SUBTARGETS:=legacy sama5d3 +BOARDNAME:=Microchip (Atmel AT91) +FEATURES:=ext4 squashfs targz usb usbgadget ubifs +SUBTARGETS:=sama5 legacy -KERNEL_PATCHVER:=4.4 +KERNEL_PATCHVER:=4.9 include $(INCLUDE_DIR)/target.mk diff --git a/target/linux/at91/base-files/lib/at91.sh b/target/linux/at91/base-files/lib/at91.sh index 0fa2ee32515539..61921edd145a0b 100755 --- a/target/linux/at91/base-files/lib/at91.sh +++ b/target/linux/at91/base-files/lib/at91.sh @@ -43,6 +43,12 @@ at91_board_detect() { *"SAMA5D3 Xplained") name="sama5d3_xplained" ;; + *"SAMA5D2 Xplained") + name="sama5d2_xplained" + ;; + *"SAMA5D4 Xplained") + name="sama5d4_xplained" + ;; *"CalAmp LMU5000") name="lmu5000" ;; diff --git a/target/linux/at91/config-4.4 b/target/linux/at91/config-4.9 similarity index 93% rename from target/linux/at91/config-4.4 rename to target/linux/at91/config-4.9 index 4e3b0361100a3e..c0151a591699bb 100644 --- a/target/linux/at91/config-4.4 +++ b/target/linux/at91/config-4.9 @@ -1,6 +1,6 @@ CONFIG_ALIGNMENT_TRAP=y CONFIG_ARCH_AT91=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y +CONFIG_ARCH_CLOCKSOURCE_DATA=y CONFIG_ARCH_HAS_ELF_RANDOMIZE=y CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y CONFIG_ARCH_HAS_SG_CHAIN=y @@ -14,7 +14,6 @@ CONFIG_ARCH_MULTI_CPU_AUTO=y CONFIG_ARCH_MULTI_V4_V5=y CONFIG_ARCH_MULTI_V5=y CONFIG_ARCH_NR_GPIO=0 -CONFIG_ARCH_REQUIRE_GPIOLIB=y # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y @@ -24,7 +23,6 @@ CONFIG_ARCH_USE_BUILTIN_BSWAP=y CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y CONFIG_ARCH_WANT_GENERAL_HUGETLB=y CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y CONFIG_ARM=y CONFIG_ARM_APPENDED_DTB=y # CONFIG_ARM_ATAG_DTB_COMPAT is not set @@ -36,13 +34,15 @@ CONFIG_ARM_THUMB=y CONFIG_AT91SAM9X_WATCHDOG=y CONFIG_ATAGS=y CONFIG_ATMEL_AIC_IRQ=y +CONFIG_ATMEL_EBI=y CONFIG_ATMEL_PIT=y CONFIG_ATMEL_SDRAMC=y # CONFIG_ATMEL_TCLIB is not set +CONFIG_AT_HDMAC=y +# CONFIG_AT_XDMAC is not set CONFIG_AUTO_ZRELADDR=y # CONFIG_BLK_DEV_INITRD is not set # CONFIG_CACHE_L2X0 is not set -CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_CLKDEV_LOOKUP=y CONFIG_CLKSRC_OF=y CONFIG_CLKSRC_PROBE=y @@ -75,11 +75,14 @@ CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" # CONFIG_DEBUG_UART_8250 is not set # CONFIG_DEBUG_USER is not set -CONFIG_DEVPTS_MULTIPLE_INSTANCES=y +CONFIG_DMADEVICES=y +CONFIG_DMA_ENGINE=y +CONFIG_DMA_OF=y CONFIG_DTC=y CONFIG_EDAC_ATOMIC_SCRUB=y CONFIG_EDAC_SUPPORT=y CONFIG_EXT4_FS=y +CONFIG_FIXED_PHY=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_FRAME_POINTER=y CONFIG_FS_MBCACHE=y @@ -87,6 +90,7 @@ CONFIG_GENERIC_ALLOCATOR=y CONFIG_GENERIC_ATOMIC64=y CONFIG_GENERIC_BUG=y CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_EARLY_IOREMAP=y CONFIG_GENERIC_IDLE_POLL_SETUP=y CONFIG_GENERIC_IO=y CONFIG_GENERIC_IRQ_CHIP=y @@ -99,7 +103,6 @@ CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y -CONFIG_GPIO_DEVRES=y CONFIG_GPIO_SYSFS=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDIRQS_SW_RESEND=y @@ -118,7 +121,7 @@ CONFIG_HAVE_AT91_SMD=y CONFIG_HAVE_AT91_USB_CLK=y CONFIG_HAVE_AT91_UTMI=y # CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_HAVE_BPF_JIT=y +CONFIG_HAVE_CBPF_JIT=y CONFIG_HAVE_CC_STACKPROTECTOR=y CONFIG_HAVE_CLK=y CONFIG_HAVE_CLK_PREPARE=y @@ -126,7 +129,6 @@ CONFIG_HAVE_CONTEXT_TRACKING=y CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_HAVE_DEBUG_KMEMLEAK=y CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_DMA_ATTRS=y CONFIG_HAVE_DMA_CONTIGUOUS=y CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_FB_ATMEL=y @@ -135,12 +137,6 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_GENERIC_DMA_COHERENT=y CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZ4=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_LZO=y -CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_LATENCYTOP_SUPPORT=y CONFIG_HAVE_MEMBLOCK=y CONFIG_HAVE_MOD_ARCH_SPECIFIC=y CONFIG_HAVE_NET_DSA=y @@ -171,6 +167,7 @@ CONFIG_LZO_DECOMPRESS=y CONFIG_MACB=y CONFIG_MDIO_BOARDINFO=y CONFIG_MEMORY=y +CONFIG_MFD_SYSCON=y CONFIG_MICREL_PHY=y CONFIG_MIGHT_HAVE_PCI=y CONFIG_MMC=y @@ -186,7 +183,7 @@ CONFIG_MTD_NAND_ECC=y CONFIG_MTD_PHYSMAP=y CONFIG_MTD_UBI=y CONFIG_MTD_UBI_BEB_LIMIT=20 -# CONFIG_MTD_UBI_BLOCK is not set +CONFIG_MTD_UBI_BLOCK=y # CONFIG_MTD_UBI_FASTMAP is not set # CONFIG_MTD_UBI_GLUEBI is not set CONFIG_MTD_UBI_WL_THRESHOLD=4096 @@ -203,13 +200,11 @@ CONFIG_OF_FLATTREE=y CONFIG_OF_GPIO=y CONFIG_OF_IRQ=y CONFIG_OF_MDIO=y -CONFIG_OF_MTD=y CONFIG_OF_NET=y CONFIG_OF_RESERVED_MEM=y CONFIG_OLD_SIGACTION=y CONFIG_OLD_SIGSUSPEND3=y CONFIG_PAGE_OFFSET=0xC0000000 -# CONFIG_PCI is not set # CONFIG_PCI_DOMAINS_GENERIC is not set # CONFIG_PCI_SYSCALL is not set CONFIG_PERF_USE_VMALLOC=y @@ -222,13 +217,18 @@ CONFIG_PINCTRL_AT91=y CONFIG_POWER_RESET=y CONFIG_POWER_RESET_AT91_POWEROFF=y CONFIG_POWER_RESET_AT91_RESET=y +# CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC is not set CONFIG_POWER_SUPPLY=y CONFIG_RATIONAL=y # CONFIG_RCU_STALL_COMMON is not set +CONFIG_REGMAP=y +CONFIG_REGMAP_MMIO=y +CONFIG_REGMAP_SPI=y CONFIG_RTC_CLASS=y # CONFIG_RTC_DRV_AT91RM9200 is not set # CONFIG_RTC_DRV_AT91SAM9 is not set # CONFIG_RTC_DRV_CMOS is not set +CONFIG_RTC_I2C_AND_SPI=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y # CONFIG_SAMA5D4_WATCHDOG is not set # CONFIG_SCHED_INFO is not set @@ -251,6 +251,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=999999 CONFIG_SRCU=y # CONFIG_STAGING is not set CONFIG_SWIOTLB=y +CONFIG_SWPHY=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_UBIFS_FS=y @@ -270,4 +271,3 @@ CONFIG_ZBOOT_ROM_BSS=0 CONFIG_ZBOOT_ROM_TEXT=0 CONFIG_ZLIB_DEFLATE=y CONFIG_ZLIB_INFLATE=y -CONFIG_ZONE_DMA_FLAG=0 diff --git a/target/linux/at91/files/arch/arm/boot/dts/at91-q5xr5.dts b/target/linux/at91/files/arch/arm/boot/dts/at91-q5xr5.dts index 2aa04ca6f6ca35..728553bce0bf58 100644 --- a/target/linux/at91/files/arch/arm/boot/dts/at91-q5xr5.dts +++ b/target/linux/at91/files/arch/arm/boot/dts/at91-q5xr5.dts @@ -168,7 +168,7 @@ }; }; - usb0: ohci@00500000 { + usb0: ohci@500000 { num-ports = <2>; status = "okay"; }; diff --git a/target/linux/at91/files/arch/arm/boot/dts/lmu5000.dts b/target/linux/at91/files/arch/arm/boot/dts/lmu5000.dts index 921d44beec43e6..fb3dd565a31b29 100644 --- a/target/linux/at91/files/arch/arm/boot/dts/lmu5000.dts +++ b/target/linux/at91/files/arch/arm/boot/dts/lmu5000.dts @@ -117,7 +117,7 @@ }; }; - usb0: ohci@00500000 { + usb0: ohci@500000 { num-ports = <2>; status = "okay"; }; diff --git a/target/linux/at91/files/arch/arm/boot/dts/wb45n.dts b/target/linux/at91/files/arch/arm/boot/dts/wb45n.dts new file mode 100644 index 00000000000000..2d1fe0c0830a37 --- /dev/null +++ b/target/linux/at91/files/arch/arm/boot/dts/wb45n.dts @@ -0,0 +1,220 @@ +/* + * wb45n.dts - Device Tree file for WB45NBT board + * + * Copyright (C) 2015 Laird + * + * Licensed under GPLv2 or later. + */ +/dts-v1/; +#include "at91sam9g25.dtsi" + +/ { + model = "Laird Workgroup Bridge 45N - Atmel AT91SAM (dt)"; + compatible = "laird,wb45n", "laird,wbxx", "atmel,at91sam9x5", "atmel,at91sam9"; + + chosen { + bootargs = "console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs"; + }; + + memory { + reg = <0x20000000 0x4000000>; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + main_clock: clock@0 { + compatible = "atmel,osc", "fixed-clock"; + clock-frequency = <12000000>; + }; + + slow_xtal { + clock-frequency = <32768>; + }; + + main_xtal { + clock-frequency = <12000000>; + }; + }; + + ahb { + apb { + + rstc@fffffe00 { + compatible = "atmel,sama5d3-rstc"; + }; + + pinctrl@fffff400 { + nand { + pinctrl_nand: nand-0 { + atmel,pins = + ; /* PD5 gpio RDY/BUSY pin pull_up */ + }; + }; + + usb2 { + pinctrl_board_usb2: usb2-board { + atmel,pins = + ; /* PB11 gpio vbus sense, deglitch */ + }; + }; + }; + + dbgu: serial@fffff200 { + status = "okay"; + }; + + usart0: serial@f801c000 { + status = "okay"; + }; + + usart3: serial@f8028000 { + status = "okay"; + }; + + spi0: spi@f0000000 { + status = "okay"; + cs-gpios = <&pioA 14 0>, <&pioA 7 0>, <0>, <0>; + }; + + mmc0: mmc@f0008000 { + pinctrl-0 = < + &pinctrl_mmc0_slot0_clk_cmd_dat0 + &pinctrl_mmc0_slot0_dat1_3>; + status = "okay"; + /delete-property/dmas; + /delete-property/dma-names; + slot@0 { + reg = <0>; + bus-width = <4>; + }; + }; + + macb0: ethernet@f802c000 { + phy-mode = "rmii"; + status = "okay"; + }; + + usb2: gadget@f803c000 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_board_usb2>; + atmel,vbus-gpio = <&pioB 11 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; + + i2c1: i2c@f8014000 { + status = "okay"; + }; + + watchdog@fffffe40 { + status = "okay"; + }; + + shdwc@fffffe10 { + atmel,wakeup-mode = "low"; + }; + + rtc@fffffeb0 { + status = "okay"; + }; + }; + + usb0: ohci@00600000 { + status = "okay"; + num-ports = <2>; + atmel,vbus-gpio = < + &pioB 12 GPIO_ACTIVE_HIGH + &pioA 31 GPIO_ACTIVE_HIGH + >; + atmel,oc-gpio = <&pioB 13 GPIO_ACTIVE_LOW>; + }; + + usb1: ehci@00700000 { + status = "okay"; + }; + + nand0: nand@40000000 { + nand-bus-width = <8>; + nand-ecc-mode = "hw"; + atmel,has-pmecc; /* Enable PMECC */ + atmel,pmecc-cap = <4>; + atmel,pmecc-sector-size = <512>; + nand-on-flash-bbt; + status = "okay"; + + at91bootstrap@0 { + label = "at91bs"; + reg = <0x0 0x20000>; + }; + + uboot@20000 { + label = "u-boot"; + reg = <0x20000 0x80000>; + }; + + ubootenv@a0000 { + label = "u-boot-env"; + reg = <0xa0000 0x20000>; + }; + + ubootenv@c0000 { + label = "redund-env"; + reg = <0xc0000 0x20000>; + }; + + kernel-a@e0000 { + label = "kernel-a"; + reg = <0xe0000 0x280000>; + }; + + kernel-b@360000 { + label = "kernel-b"; + reg = <0x360000 0x280000>; + }; + + rootfs-a@5e0000 { + label = "rootfs-a"; + reg = <0x5e0000 0x2600000>; + }; + + rootfs-b@2be0000 { + label = "rootfs-b"; + reg = <0x2be0000 0x2600000>; + }; + + user@51e0000 { + label = "user"; + reg = <0x51e0000 0x2dc0000>; + }; + + logs@7fa0000 { + label = "logs"; + reg = <0x7fa0000 0x60000>; + }; + }; + }; + + atheros { + compatible = "atheros,ath6kl"; + atheros,board-id = "SD32"; + }; + + gpio_keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + irqbtn@pb18 { + label = "IRQBTN"; + linux,code = <99>; + gpios = <&pioB 18 GPIO_ACTIVE_LOW>; + gpio-key,wakeup = <1>; + }; + }; +}; diff --git a/target/linux/at91/files/arch/arm/boot/dts/wb50n.dts b/target/linux/at91/files/arch/arm/boot/dts/wb50n.dts new file mode 100644 index 00000000000000..9c28a2197c76d1 --- /dev/null +++ b/target/linux/at91/files/arch/arm/boot/dts/wb50n.dts @@ -0,0 +1,117 @@ +/* + * wb50n.dts - Device Tree file for wb50n board + * + * Copyright (C) 2015 Laird + * + * Licensed under GPLv2 or later. + */ +/dts-v1/; +#include "wb50n.dtsi" + +/ { + model = "Laird Workgroup Bridge 50N - Atmel SAMA5D"; + compatible = "laird,wb50n", "atmel,sama5d31ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5"; + + chosen { + bootargs = "console=ttyS0,115200 earlyprintk loglevel=4 mem=64M"; + }; + + ahb { + + apb { + mmc0: mmc@f0000000 { + status = "okay"; + }; + + macb1: ethernet@f802c000 { + status = "okay"; + }; + + dbgu: serial@ffffee00 { + status = "okay"; + }; + + /* On BB40 this port is labeled UART1 */ + usart0: serial@f001c000 { + status = "okay"; + }; + + /* On BB40 this port is labeled UART0 */ + usart1: serial@f0020000 { + status = "okay"; + }; + + i2c0: i2c@f0014000 { + status = "okay"; + }; + + spi1: spi@f8008000 { + status = "okay"; + + spidev@0 { + compatible = "spidev"; + reg = <0>; + spi-max-frequency = <8000000>; + }; + }; + + watchdog@fffffe40 { + status = "okay"; + }; + }; + + usb0: gadget@00500000 { + status = "okay"; + }; + + usb1: ohci@00600000 { + status = "okay"; + }; + + usb2: ehci@00700000 { + status = "okay"; + }; + + }; + + gpio_keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + btn0@pa10 { + label = "BTNESC"; + linux,code = <1>; /* ESC button */ + gpios = <&pioA 10 GPIO_ACTIVE_LOW>; + gpio-key,wakeup = <1>; + }; + + irqbtn@pe31 { + label = "IRQBTN"; + linux,code = <99>; /* SysReq button */ + gpios = <&pioE 31 GPIO_ACTIVE_LOW>; + gpio-key,wakeup = <1>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led0 { + label = "wb50n:blue:led0"; + gpios = <&pioA 12 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + led1 { + label = "wb50n:green:led1"; + gpios = <&pioA 24 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + led2 { + label = "wb50n:red:led2"; + gpios = <&pioA 26 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + }; +}; diff --git a/target/linux/at91/files/arch/arm/boot/dts/wb50n.dtsi b/target/linux/at91/files/arch/arm/boot/dts/wb50n.dtsi new file mode 100644 index 00000000000000..8d304244429089 --- /dev/null +++ b/target/linux/at91/files/arch/arm/boot/dts/wb50n.dtsi @@ -0,0 +1,205 @@ +/* + * wb50n.dts - Device Tree file for wb50n board + * + * Copyright (C) 2015 Laird + * + * Licensed under GPLv2 or later. + */ +#include "sama5d31.dtsi" + +/ { + model = "Laird Workgroup Bridge 50N - Atmel SAMA5D"; + compatible = "laird,wb50n", "atmel,sama5d31ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5"; + + chosen { + bootargs = "console=ttyS0,115200 earlyprintk loglevel=4 mem=64M"; + }; + + memory { + reg = <0x20000000 0x4000000>; + }; + + clocks { + slow_xtal { + clock-frequency = <32768>; + }; + + main_xtal { + clock-frequency = <12000000>; + }; + }; + + ahb { + + apb { + pmc: pmc@fffffc00 { + main: mainck { + clock-frequency = <12000000>; + }; + + periphck { + usart1_clk: usart1_clk { + #clock-cells = <0>; + reg = <13>; + atmel,clk-output-range = <0 132000000>; + }; + }; + }; + + pinctrl@fffff200 { + board { + pinctrl_mmc0_cd: mmc0_cd { + atmel,pins = + ; /* PC26 GPIO with pullup deglitch */ + }; + + pinctrl_usba_vbus: usba_vbus { + atmel,pins = + ; /* PB13 GPIO with deglitch */ + }; + }; + }; + + mmc0: mmc@f0000000 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_cd>; + cd-gpios = <&pioC 26 GPIO_ACTIVE_LOW>; + slot@0 { + reg = <0>; + bus-width = <4>; + }; + }; + + mmc1: mmc@f8000000 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3>; + status = "okay"; + slot@0 { + reg = <0>; + bus-width = <4>; + }; + }; + + macb1: ethernet@f802c000 { + phy-mode = "rmii"; + }; + + + dbgu: serial@ffffee00 { + dmas = <0>, <0>; /* Do not use DMA for dbgu */ + }; + + /* On BB40 this port is labeled UART1 */ + usart0: serial@f001c000 { + atmel,use-dma-rx; + atmel,use-dma-tx; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usart0 &pinctrl_usart0_rts_cts>; + }; + + /* On BB40 this port is labeled UART0 */ + usart1: serial@f0020000 { + atmel,use-dma-rx; + atmel,use-dma-tx; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts_cts>; + dtr-gpios = <&pioD 13 GPIO_ACTIVE_LOW>; + dsr-gpios = <&pioD 11 GPIO_ACTIVE_LOW>; + dcd-gpios = <&pioD 7 GPIO_ACTIVE_LOW>; + rng-gpios = <&pioD 8 GPIO_ACTIVE_LOW>; + }; + + /* USART3 is direct-connect to the Bluetooth UART on the radio SIP */ + usart3: serial@f8024000 { + atmel,use-dma-rx; + atmel,use-dma-tx; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usart3 &pinctrl_usart3_rts_cts>; + status = "okay"; + }; + + spi1: spi@f8008000 { + cs-gpios = <&pioC 25 0>, <0>, <0>, <0>; + }; + + sckc@fffffe50 { + slow_osc: slow_osc { + atmel,osc-bypass; + }; + }; + }; + + nand0: nand@60000000 { + nand-bus-width = <8>; + nand-ecc-mode = "hw"; + atmel,has-pmecc; + atmel,pmecc-cap = <8>; + atmel,pmecc-sector-size = <512>; + nand-on-flash-bbt; + status = "okay"; + + at91bootstrap@0 { + label = "at91bs"; + reg = <0x0 0x20000>; + }; + + uboot@20000 { + label = "u-boot"; + reg = <0x20000 0x80000>; + }; + + ubootenv@a0000 { + label = "u-boot-env"; + reg = <0xa0000 0x20000>; + }; + + ubootenv@c0000 { + label = "u-boot-env"; + reg = <0xc0000 0x20000>; + }; + + kernel-a@e0000 { + label = "kernel-a"; + reg = <0xe0000 0x500000>; + }; + + kernel-b@5e0000 { + label = "kernel-b"; + reg = <0x5e0000 0x500000>; + }; + + rootfs-a@ae0000 { + label = "rootfs-a"; + reg = <0xae0000 0x3000000>; + }; + + rootfs-b@3ae0000 { + label = "rootfs-b"; + reg = <0x3ae0000 0x3000000>; + }; + + user@6ae0000 { + label = "user"; + reg = <0x6ae0000 0x14e0000>; + }; + + }; + + usb0: gadget@00500000 { + atmel,vbus-gpio = <&pioB 13 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usba_vbus>; + }; + + usb1: ohci@00600000 { + num-ports = <3>; + atmel,vbus-gpio = <&pioA 2 GPIO_ACTIVE_LOW>; + atmel,oc-gpio = <&pioA 4 GPIO_ACTIVE_LOW>; + }; + }; + + atheros { + compatible = "atheros,ath6kl"; + atheros,board-id = "SD32"; + }; +}; diff --git a/target/linux/at91/files/drivers/mtd/at91part.c b/target/linux/at91/files/drivers/mtd/at91part.c deleted file mode 100644 index 31f3bbd69ddbb8..00000000000000 --- a/target/linux/at91/files/drivers/mtd/at91part.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - * - * Copyright (C) 2007 OpenWrt.org - * - * 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; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Atmel AT91 flash partition table. (Modified by Hamish Guthrie). - * Based on ar7 map by Felix Fietkau. - * - */ - -#include -#include - -#include -#include -#include -#include - -static struct mtd_partition at91_parts[6]; - -static int create_mtd_partitions(struct mtd_info *master, - struct mtd_partition **pparts, - unsigned long origin) -{ - unsigned int offset, len; - unsigned int pre_size = 0x42000, root_max = 0x362400; - unsigned char buf[512]; - struct squashfs_super_block *sb = (struct squashfs_super_block *) buf; - - printk("Parsing AT91 partition map...\n"); - - at91_parts[0].name = "loaders"; - at91_parts[0].offset = 0; - at91_parts[0].size = 0x21000; - at91_parts[0].mask_flags = MTD_WRITEABLE; - - at91_parts[1].name = "ubparams"; - at91_parts[1].offset = 0x21000; - at91_parts[1].size = 0x8400; - at91_parts[1].mask_flags = 0; - - at91_parts[2].name = "kernel"; - at91_parts[2].offset = pre_size; - at91_parts[2].size = 0; - at91_parts[2].mask_flags = 0; - - at91_parts[3].name = "rootfs"; - at91_parts[3].offset = 0; - at91_parts[3].size = 0; - at91_parts[3].mask_flags = 0; - - for(offset = pre_size; offset < root_max; offset += master->erasesize) { - - memset(&buf, 0xe5, sizeof(buf)); - - if (master->read(master, offset, sizeof(buf), &len, buf) || len != sizeof(buf)) - break; - - if (*((__u32 *) buf) == SQUASHFS_MAGIC) { - printk(KERN_INFO "%s: Filesystem type: squashfs, size=0x%x\n", - master->name, (u32) sb->bytes_used); - - at91_parts[3].size = sb->bytes_used; - at91_parts[3].offset = offset; - len = at91_parts[3].offset + at91_parts[3].size; - len = ((len / (master->erasesize * 8)) + 1) * master->erasesize * 8; - at91_parts[3].size = len - at91_parts[3].offset; - at91_parts[2].size = offset - at91_parts[2].offset; - break; - } - } - - if (at91_parts[3].size == 0) { - printk(KERN_NOTICE "%s: Couldn't find root filesystem\n", master->name); - return -1; - } - - at91_parts[4].name = "rootfs_data"; - at91_parts[4].offset = root_max; - at91_parts[4].size = master->size - root_max; - at91_parts[4].mask_flags = 0; - - at91_parts[5].name = "complete"; - at91_parts[5].offset = 0; - at91_parts[5].size = master->size; - at91_parts[5].mask_flags = 0; - - *pparts = at91_parts; - return 6; -} - -static struct mtd_part_parser at91_parser = { - .owner = THIS_MODULE, - .parse_fn = create_mtd_partitions, - .name = "at91part", -}; - -static int __init at91_parser_init(void) -{ - register_mtd_parser(&at91_parser); - - return 0; -} - -module_init(at91_parser_init); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Felix Fietkau, Eugene Konev, Hamish Guthrie"); -MODULE_DESCRIPTION("MTD partitioning for Atmel at91"); diff --git a/target/linux/at91/image/Makefile b/target/linux/at91/image/Makefile index d1ae61484a7134..12607073e4a756 100644 --- a/target/linux/at91/image/Makefile +++ b/target/linux/at91/image/Makefile @@ -11,24 +11,20 @@ KERNEL_LOADADDR := 0x20008000 ifeq ($(SUBTARGET),legacy) include ./legacy.mk -UBIFS_OPTS := -m 2048 -e 126KiB -c 2048 endif -ifeq ($(SUBTARGET),sama5d3) -include ./sama5d3.mk -UBIFS_OPTS := -m 2048 -e 124KiB -c 2048 +ifeq ($(SUBTARGET),sama5) +include ./sama5.mk endif define Device/Default + $(Device/default-nand) PROFILES := Default FILESYSTEMS := squashfs ubifs DEVICE_DTS := $(1) KERNEL_NAME := zImage KERNEL_SIZE := 4096k KERNEL := kernel-bin | append-dtb | lzma | uImage lzma - BLOCKSIZE := 128k - PAGESIZE := 2048 - SUBPAGESIZE := 512 - DTB_SIZE := + DTB_SIZE := 128k endef define Device/dtb @@ -42,13 +38,25 @@ define Device/evaluation IMAGE/root.ubi := append-ubi endef +define Device/evaluation-zImage + IMAGES += zImage + IMAGE/zImage := install-zImage +endef + define Device/evaluation-dtb $(Device/evaluation) $(Device/dtb) + $(Device/evaluation-zImage) IMAGES += dtb IMAGE/dtb := install-dtb endef +define Device/evaluation-fit + $(Device/evaluation) + KERNEL_SUFFIX := -fit-uImage.itb + KERNEL := kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb +endef + define Device/production UBINIZE_OPTS := -E 5 IMAGES := factory.bin @@ -58,7 +66,6 @@ endef define Device/production-dtb $(Device/production) $(Device/dtb) - DTB_SIZE := 128k IMAGE/factory.bin := append-dtb | pad-to $$$$(DTB_SIZE) \ | append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi endef diff --git a/target/linux/at91/image/gen_at91_sdcard_img.sh b/target/linux/at91/image/gen_at91_sdcard_img.sh new file mode 100755 index 00000000000000..316ecea2e40e6f --- /dev/null +++ b/target/linux/at91/image/gen_at91_sdcard_img.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +# +# Copyright (C) 2017 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +set -x +[ $# -eq 5 ] || { + echo "SYNTAX: $0 " + exit 1 +} + +OUTPUT="$1" +BOOTFS="$2" +ROOTFS="$3" +BOOTFSSIZE="$4" +ROOTFSSIZE="$5" + +head=4 +sect=2048 + +set `ptgen -o $OUTPUT -h $head -s $sect -l 1024 -t c -p ${BOOTFSSIZE}M -t 83 -p ${ROOTFSSIZE}M` + +BOOTOFFSET="$(($1 / 512))" +BOOTSIZE="$(($2 / 512))" +ROOTFSOFFSET="$(($3 / 512))" +ROOTFSSIZE="$(($4 / 512))" + +dd bs=512 if="$BOOTFS" of="$OUTPUT" seek="$BOOTOFFSET" conv=notrunc +dd bs=512 if="$ROOTFS" of="$OUTPUT" seek="$ROOTFSOFFSET" conv=notrunc diff --git a/target/linux/at91/image/legacy.mk b/target/linux/at91/image/legacy.mk index 7fe388135d5dd8..c6d9ed810826a0 100644 --- a/target/linux/at91/image/legacy.mk +++ b/target/linux/at91/image/legacy.mk @@ -1,3 +1,10 @@ +define Device/default-nand + BLOCKSIZE := 128k + PAGESIZE := 2048 + SUBPAGESIZE := 512 + MKUBIFS_OPTS := -m $$(PAGESIZE) -e 126KiB -c 2048 +endef + define Device/at91sam9263ek $(Device/evaluation-dtb) DEVICE_TITLE := Atmel AT91SAM9263-EK @@ -109,3 +116,18 @@ define Device/at91-q5xr5 KERNEL_SIZE := 2048k endef TARGET_DEVICES += at91-q5xr5 + +define Device/wb45n + $(Device/evaluation-fit) + DEVICE_TITLE := Laird WB45N + DEVICE_PACKAGES := \ + kmod-mmc-at91 kmod-ath6kl-sdio ath6k-firmware \ + kmod-usb-storage kmod-fs-vfat kmod-fs-msdos \ + kmod-leds-gpio + BLOCKSIZE := 128k + PAGESIZE := 2048 + SUBPAGESIZE := 2048 + MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB -c 955 +endef +TARGET_DEVICES += wb45n + diff --git a/target/linux/at91/image/sama5.mk b/target/linux/at91/image/sama5.mk new file mode 100644 index 00000000000000..d33a3986511e12 --- /dev/null +++ b/target/linux/at91/image/sama5.mk @@ -0,0 +1,91 @@ +AT91_SD_BOOT_PARTSIZE:=64 +FAT32_BLOCK_SIZE:=1024 +FAT32_BLOCKS:=$(shell echo \ + $$(($(AT91_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE)))) + +define Build/at91-sdcard + rm -f $@.boot + mkfs.fat -C $@.boot $(FAT32_BLOCKS) + + mcopy -i $@.boot $(KDIR)/zImage ::zImage + + $(foreach dts,$(DEVICE_DTS), \ + mcopy -i $@.boot $(DTS_DIR)/$(dts).dtb \ + ::$(dts).dtb; \ + mcopy -i $@.boot \ + $(BIN_DIR)/u-boot-$(dts:at91-%=%)_mmc/u-boot.bin \ + ::u-boot.bin; \ + $(CP) $(BIN_DIR)/at91bootstrap-$(dts:at91-%=%)sd_uboot*/*.bin \ + $(BIN_DIR)/BOOT.bin; \ + mcopy -i $@.boot $(BIN_DIR)/BOOT.bin ::BOOT.bin;) + + ./gen_at91_sdcard_img.sh \ + $(dir $@)$(IMG_PREFIX)-$(PROFILE_SANITIZED)-sdcard.img \ + $@.boot \ + $(KDIR)/root.ext4 \ + $(AT91_SD_BOOT_PARTSIZE) \ + $(CONFIG_TARGET_ROOTFS_PARTSIZE) + + gzip -nc9 $(dir $@)$(IMG_PREFIX)-$(PROFILE_SANITIZED)-sdcard.img \ + > $(dir $@)$(IMG_PREFIX)-$(PROFILE_SANITIZED)-sdcard.img.gz + + $(CP) $(dir $@)$(IMG_PREFIX)-$(PROFILE_SANITIZED)-sdcard.img.gz \ + $(BIN_DIR)/ + + rm -f $(BIN_DIR)/BOOT.bin + rm -f $@.boot +endef + +define Device/evaluation-sdimage + IMAGES += sdcard.img.gz + IMAGE/sdcard.img.gz := at91-sdcard +endef + +define Device/default-nand + BLOCKSIZE := 128k + PAGESIZE := 2048 + SUBPAGESIZE := 2048 + MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB -c 2048 +endef + +define Device/at91-sama5d3_xplained + $(Device/evaluation-dtb) + DEVICE_TITLE := Microchip(Atmel AT91) SAMA5D3 Xplained + KERNEL_SIZE := 6144k + $(Device/evaluation-sdimage) +endef +TARGET_DEVICES += at91-sama5d3_xplained + +define Device/at91-sama5d2_xplained + $(Device/evaluation-dtb) + DEVICE_TITLE := Microchip(Atmel AT91) SAMA5D2 Xplained + KERNEL_SIZE := 6144k + $(Device/evaluation-sdimage) +endef +TARGET_DEVICES += at91-sama5d2_xplained + +define Device/at91-sama5d4_xplained + $(Device/evaluation-dtb) + DEVICE_TITLE := Microchip(Atmel AT91) SAMA5D4 Xplained + KERNEL_SIZE := 6144k + BLOCKSIZE := 256k + PAGESIZE := 4096 + SUBPAGESIZE := 2048 + MKUBIFS_OPTS := -m $$(PAGESIZE) -e 248KiB -c 2082 -x lzo + $(Device/evaluation-sdimage) +endef +TARGET_DEVICES += at91-sama5d4_xplained + +define Device/wb50n + $(Device/evaluation-fit) + DEVICE_TITLE := Laird WB50N + DEVICE_PACKAGES := \ + kmod-mmc-at91 kmod-ath6kl-sdio ath6k-firmware \ + kmod-usb-storage kmod-fs-vfat kmod-fs-msdos \ + kmod-leds-gpio + BLOCKSIZE := 128k + PAGESIZE := 2048 + SUBPAGESIZE := 2048 + MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB -c 955 +endef +TARGET_DEVICES += wb50n diff --git a/target/linux/at91/image/sama5d3.mk b/target/linux/at91/image/sama5d3.mk deleted file mode 100644 index fb02ee1bc029ea..00000000000000 --- a/target/linux/at91/image/sama5d3.mk +++ /dev/null @@ -1,8 +0,0 @@ -define Device/at91-sama5d3_xplained - $(Device/evaluation-dtb) - DEVICE_TITLE := Atmel AT91SAMA5D3XPLAINED - KERNEL_SIZE := 6144k - SUBPAGESIZE := 2048 -endef -TARGET_DEVICES += at91-sama5d3_xplained - diff --git a/target/linux/at91/legacy/config-default b/target/linux/at91/legacy/config-default index 12beb46f6a3ec3..e69de29bb2d1d6 100644 --- a/target/linux/at91/legacy/config-default +++ b/target/linux/at91/legacy/config-default @@ -1,33 +0,0 @@ -# CONFIG_ARCH_AT91RM9200 is not set -# CONFIG_ARCH_AT91SAM9260 is not set -# CONFIG_ARCH_AT91SAM9261 is not set -# CONFIG_ARCH_AT91SAM9263 is not set -# CONFIG_ARCH_AT91SAM9G10 is not set -# CONFIG_ARCH_AT91SAM9G20 is not set -# CONFIG_ARCH_AT91SAM9G45 is not set -# CONFIG_ARCH_AT91SAM9RL is not set -CONFIG_ARCH_AT91_NONE=y -CONFIG_ARM_L1_CACHE_SHIFT=5 -CONFIG_CPU_32v5=y -CONFIG_CPU_ABRT_EV5TJ=y -CONFIG_CPU_ARM926T=y -# CONFIG_CPU_CACHE_ROUND_ROBIN is not set -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_COPY_V4WB=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y -# CONFIG_CPU_DCACHE_WRITETHROUGH is not set -# CONFIG_CPU_ICACHE_DISABLE is not set -CONFIG_CPU_PABRT_LEGACY=y -CONFIG_CPU_TLB_V4WBI=y -# CONFIG_SOC_AT91RM9200 is not set -CONFIG_SOC_AT91SAM9=y -CONFIG_SOC_AT91SAM9260=y -CONFIG_SOC_AT91SAM9261=y -CONFIG_SOC_AT91SAM9263=y -CONFIG_SOC_AT91SAM9G45=y -CONFIG_SOC_AT91SAM9N12=y -CONFIG_SOC_AT91SAM9RL=y -CONFIG_SOC_AT91SAM9X5=y -CONFIG_SOC_SAM_V4_V5=y -# CONFIG_SOC_SAM_V7 is not set diff --git a/target/linux/at91/patches-4.4/100-ARM-at91-build-dtb-for-LMU5000.patch b/target/linux/at91/patches-4.9/100-ARM-at91-build-dtb-for-LMU5000.patch similarity index 80% rename from target/linux/at91/patches-4.4/100-ARM-at91-build-dtb-for-LMU5000.patch rename to target/linux/at91/patches-4.9/100-ARM-at91-build-dtb-for-LMU5000.patch index aac5b3de534b58..2a64fb8a5c59b5 100644 --- a/target/linux/at91/patches-4.4/100-ARM-at91-build-dtb-for-LMU5000.patch +++ b/target/linux/at91/patches-4.9/100-ARM-at91-build-dtb-for-LMU5000.patch @@ -1,6 +1,6 @@ --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -27,6 +27,7 @@ dtb-$(CONFIG_SOC_SAM_V4_V5) += \ +@@ -32,6 +32,7 @@ dtb-$(CONFIG_SOC_AT91SAM9) += \ usb_a9g20.dtb \ usb_a9g20_lpw.dtb \ at91sam9m10g45ek.dtb \ diff --git a/target/linux/at91/patches-4.4/101-ARM-at91-build-dtb-for-q5xr5.patch b/target/linux/at91/patches-4.9/101-ARM-at91-build-dtb-for-q5xr5.patch similarity index 81% rename from target/linux/at91/patches-4.4/101-ARM-at91-build-dtb-for-q5xr5.patch rename to target/linux/at91/patches-4.9/101-ARM-at91-build-dtb-for-q5xr5.patch index d6bf7ae41f7ef5..1cee5588a071ac 100644 --- a/target/linux/at91/patches-4.4/101-ARM-at91-build-dtb-for-q5xr5.patch +++ b/target/linux/at91/patches-4.9/101-ARM-at91-build-dtb-for-q5xr5.patch @@ -1,6 +1,6 @@ --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -35,6 +35,7 @@ dtb-$(CONFIG_SOC_SAM_V4_V5) += \ +@@ -40,6 +40,7 @@ dtb-$(CONFIG_SOC_AT91SAM9) += \ at91-ariettag25.dtb \ at91-cosino_mega2560.dtb \ at91-kizboxmini.dtb \ diff --git a/target/linux/at91/patches-4.9/102-ARM-at91-build-dtb-for-wb45n.patch b/target/linux/at91/patches-4.9/102-ARM-at91-build-dtb-for-wb45n.patch new file mode 100644 index 00000000000000..aeb523a5b9434f --- /dev/null +++ b/target/linux/at91/patches-4.9/102-ARM-at91-build-dtb-for-wb45n.patch @@ -0,0 +1,12 @@ +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -45,7 +45,8 @@ dtb-$(CONFIG_SOC_AT91SAM9) += \ + at91sam9g25ek.dtb \ + at91sam9g35ek.dtb \ + at91sam9x25ek.dtb \ +- at91sam9x35ek.dtb ++ at91sam9x35ek.dtb \ ++ wb45n.dtb + dtb-$(CONFIG_SOC_SAM_V7) += \ + at91-kizbox2.dtb \ + at91-sama5d2_xplained.dtb \ diff --git a/target/linux/at91/patches-4.9/103-ARM-at91-build-dtb-for-wb50n.patch b/target/linux/at91/patches-4.9/103-ARM-at91-build-dtb-for-wb50n.patch new file mode 100644 index 00000000000000..a30a803c98cd61 --- /dev/null +++ b/target/linux/at91/patches-4.9/103-ARM-at91-build-dtb-for-wb50n.patch @@ -0,0 +1,12 @@ +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -59,7 +59,8 @@ dtb-$(CONFIG_SOC_SAM_V7) += \ + at91-sama5d4_ma5d4evk.dtb \ + at91-sama5d4_xplained.dtb \ + at91-sama5d4ek.dtb \ +- at91-vinco.dtb ++ at91-vinco.dtb \ ++ wb50n.dtb + dtb-$(CONFIG_ARCH_ATLAS6) += \ + atlas6-evb.dtb + dtb-$(CONFIG_ARCH_ATLAS7) += \ diff --git a/target/linux/at91/sama5/config-default b/target/linux/at91/sama5/config-default new file mode 100644 index 00000000000000..00d4cf930cacf3 --- /dev/null +++ b/target/linux/at91/sama5/config-default @@ -0,0 +1,52 @@ +# CONFIG_ARCH_MULTI_CPU_AUTO is not set +CONFIG_ARCH_MULTI_V6_V7=y +CONFIG_ARCH_MULTI_V7=y +CONFIG_ARM_HEAVY_MB=y +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_L1_CACHE_SHIFT_6=y +# CONFIG_ARM_LPAE is not set +CONFIG_ARM_PATCH_IDIV=y +# CONFIG_ARM_THUMBEE is not set +CONFIG_ARM_VIRT_EXT=y +CONFIG_ATMEL_AIC5_IRQ=y +CONFIG_CACHE_L2X0=y +CONFIG_CPU_32v6K=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_V7=y +CONFIG_DCACHE_WORD_ACCESS=y +CONFIG_GENERIC_PINCONF=y +CONFIG_HAVE_ARCH_BITREVERSE=y +CONFIG_HAVE_ARM_SMCCC=y +CONFIG_HAVE_AT91_GENERATED_CLK=y +CONFIG_HAVE_AT91_H32MX=y +CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y +CONFIG_HAVE_SMP=y +CONFIG_MIGHT_HAVE_CACHE_L2X0=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_IO_ACCESSORS=y +CONFIG_MMC_SDHCI_OF_AT91=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_OUTER_CACHE=y +CONFIG_OUTER_CACHE_SYNC=y +CONFIG_PINCTRL_AT91PIO4=y +CONFIG_PL310_ERRATA_588369=y +CONFIG_PL310_ERRATA_727915=y +CONFIG_PL310_ERRATA_753970=y +CONFIG_PL310_ERRATA_769419=y +CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC=y +CONFIG_SOC_SAMA5=y +CONFIG_SOC_SAMA5D2=y +CONFIG_SOC_SAMA5D3=y +CONFIG_SOC_SAMA5D4=y +CONFIG_SOC_SAM_V7=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_SWP_EMULATE is not set +# CONFIG_THUMB2_KERNEL is not set diff --git a/target/linux/at91/sama5/target.mk b/target/linux/at91/sama5/target.mk new file mode 100644 index 00000000000000..8ff6c761a92674 --- /dev/null +++ b/target/linux/at91/sama5/target.mk @@ -0,0 +1,11 @@ +BOARDNAME:=SAMA5 Xplained boards(Cortex-A5) +CPU_TYPE:=cortex-a5 +CPU_SUBTYPE:=neon-vfpv4 + +FEATURES+=fpu +DEFAULT_PACKAGES += kmod-usb2 + +define Target/Description + Build generic firmware for Microchip(Atmel AT91) SAMA5 MPU's + using the ARMv7 instruction set. +endef diff --git a/target/linux/at91/sama5d3/config-default b/target/linux/at91/sama5d3/config-default deleted file mode 100644 index 660e27e8aa5601..00000000000000 --- a/target/linux/at91/sama5d3/config-default +++ /dev/null @@ -1,20 +0,0 @@ -# CONFIG_ARCH_MULTI_V4_V5 is not set -# CONFIG_ARCH_MULTI_V5 is not set -CONFIG_ARCH_MULTI_V7=y -# CONFIG_ARM_LPAE is not set -# CONFIG_ARM_THUMBEE is not set -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_SOC_SAMA5=y -# CONFIG_SOC_SAM_V4_V5 is not set -CONFIG_SOC_SAM_V7=y -CONFIG_SOC_SAMA5D2=y -CONFIG_SOC_SAMA5D3=y -CONFIG_SOC_SAMA5D4=y -CONFIG_MACH_SAMA5_DT=y -CONFIG_PL310_ERRATA_588369=y -CONFIG_PL310_ERRATA_727915=y -CONFIG_PL310_ERRATA_753970=y -CONFIG_PL310_ERRATA_769419=y -# CONFIG_SWP_EMULATE is not set -# CONFIG_THUMB2_KERNEL is not set diff --git a/target/linux/at91/sama5d3/target.mk b/target/linux/at91/sama5d3/target.mk deleted file mode 100644 index 0319f4bf0d6968..00000000000000 --- a/target/linux/at91/sama5d3/target.mk +++ /dev/null @@ -1,9 +0,0 @@ -BOARDNAME:=SAMA5D3 (Cortex-A5) -CPU_TYPE:=cortex-a5 - -DEFAULT_PACKAGES += kmod-usb2 - -define Target/Description - Build generic firmware for SAMA5D3 AT91 platforms - using the ARMv7 instruction set. -endef diff --git a/target/linux/brcm2708/bcm2710/config-4.9 b/target/linux/brcm2708/bcm2710/config-4.9 index ae4a2c7bfcbd12..af69f080b0c1a6 100644 --- a/target/linux/brcm2708/bcm2710/config-4.9 +++ b/target/linux/brcm2708/bcm2710/config-4.9 @@ -276,7 +276,6 @@ CONFIG_IRQ_DOMAIN_HIERARCHY=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_IRQ_WORK=y CONFIG_JBD2=y -# CONFIG_KASAN is not set # CONFIG_LCD_CLASS_DEVICE is not set CONFIG_LEDS_GPIO=y CONFIG_LEDS_TRIGGER_INPUT=y diff --git a/target/linux/brcm47xx/base-files/etc/board.d/01_detect b/target/linux/brcm47xx/base-files/etc/board.d/01_detect index 04d13950a78ea4..18604072f3041d 100755 --- a/target/linux/brcm47xx/base-files/etc/board.d/01_detect +++ b/target/linux/brcm47xx/base-files/etc/board.d/01_detect @@ -145,9 +145,9 @@ detect_by_model() { ;; "Asus RT-N12"* | \ - "Asus RT-N16"* | \ "Asus WL500GP V2" | \ "Buffalo WHR-G125" | \ + "D-Link DIR-330" | \ "Motorola WR850G" | \ "Siemens SE505 V2") ucidef_add_switch "switch0" \ @@ -165,6 +165,7 @@ detect_by_model() { "0:lan" "1:lan" "2:lan" "3:lan" "5@eth0" ;; + "Asus RT-N16"* | \ "Linksys E3000 V1") ucidef_add_switch "switch0" \ "0:wan" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "8@eth0" diff --git a/target/linux/brcm47xx/image/Makefile b/target/linux/brcm47xx/image/Makefile index 8c681ac345a18e..47f031b8b4e16e 100644 --- a/target/linux/brcm47xx/image/Makefile +++ b/target/linux/brcm47xx/image/Makefile @@ -282,6 +282,14 @@ define Device/asus-wl-330ge endef TARGET_DEVICES += asus-wl-330ge +define Device/asus-wl-500gd + DEVICE_TITLE := Asus WL-500g Deluxe + DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES) + $(Device/asus) + PRODUCTID := "WL500gx " +endef +TARGET_DEVICES += asus-wl-500gd + define Device/asus-wl-500gp-v1 DEVICE_TITLE := Asus WL-500gP v1 DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES) @@ -701,14 +709,14 @@ define Device/linksys-e900-v1 endef TARGET_DEVICES += linksys-e900-v1 -define Device/linksys-e1000-v1-v2-v2.1 +define Device/linksys-e1000 DEVICE_TITLE := Linksys E1000 v1 v2 v2.1 DEVICE_PACKAGES := kmod-b43 $(Device/linksys) DEVICE_ID := E100 VERSION := 1.1.3 endef -TARGET_DEVICES += linksys-e1000-v1-v2-v2.1 +TARGET_DEVICES += linksys-e1000 define Device/linksys-e1200-v1 DEVICE_TITLE := Linksys E1200 v1 @@ -806,21 +814,21 @@ define Device/linksys-e4200-v1 endef TARGET_DEVICES += linksys-e4200-v1 -define Device/netgear-wgr614-v10_north-america +define Device/netgear-wgr614-v10-na DEVICE_TITLE := Netgear WGR614 v10 North America $(Device/netgear) NETGEAR_BOARD_ID := U12H139T01_NETGEAR NETGEAR_REGION := 2 endef -TARGET_DEVICES += netgear-wgr614-v10_north-america +TARGET_DEVICES += netgear-wgr614-v10-na -define Device/netgear-wgr614-v10_other-regions - DEVICE_TITLE := Netgear WGR614 v10 Other Regions +define Device/netgear-wgr614-v10 + DEVICE_TITLE := Netgear WGR614 v10 $(Device/netgear) NETGEAR_BOARD_ID := U12H139T01_NETGEAR NETGEAR_REGION := 1 endef -TARGET_DEVICES += netgear-wgr614-v10_other-regions +TARGET_DEVICES += netgear-wgr614-v10 define Device/netgear-wn2500rp-v1 DEVICE_TITLE := Netgear WN2500RP v1 @@ -910,23 +918,23 @@ define Device/netgear-wnr2000v2 endef TARGET_DEVICES += netgear-wnr2000v2 -define Device/netgear-wnr3500l-v1-north-america +define Device/netgear-wnr3500l-v1-na DEVICE_TITLE := Netgear WNR3500L v1 North America DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES) $(Device/netgear) NETGEAR_BOARD_ID := U12H136T99_NETGEAR NETGEAR_REGION := 2 endef -TARGET_DEVICES += netgear-wnr3500l-v1-north-america +TARGET_DEVICES += netgear-wnr3500l-v1-na -define Device/netgear-wnr3500l-v1-other-regions +define Device/netgear-wnr3500l-v1 DEVICE_TITLE := Netgear WNR3500L v1 Other Regions DEVICE_PACKAGES := kmod-b43 $(USB2_PACKAGES) $(Device/netgear) NETGEAR_BOARD_ID := U12H136T99_NETGEAR NETGEAR_REGION := 1 endef -TARGET_DEVICES += netgear-wnr3500l-v1-other-regions +TARGET_DEVICES += netgear-wnr3500l-v1 define Device/netgear-wnr3500l-v2 DEVICE_TITLE := Netgear WNR3500L v2 diff --git a/target/linux/brcm47xx/image/lzma-loader/src/Makefile b/target/linux/brcm47xx/image/lzma-loader/src/Makefile index 3320e565d0e898..a08fc05b9fc22d 100644 --- a/target/linux/brcm47xx/image/lzma-loader/src/Makefile +++ b/target/linux/brcm47xx/image/lzma-loader/src/Makefile @@ -18,7 +18,8 @@ # TEXT_START := 0x80001000 -BZ_TEXT_START := 0x80400000 +BZ_TEXT_START := 0x80600000 +BZ_STACK_START := 0x80700000 OBJCOPY := $(CROSS_COMPILE)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S @@ -28,9 +29,9 @@ CFLAGS = -D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -Os \ -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap CFLAGS += -DLOADADDR=$(TEXT_START) -D_LZMA_IN_CB -ASFLAGS = $(CFLAGS) -D__ASSEMBLY__ -DBZ_TEXT_START=$(BZ_TEXT_START) +ASFLAGS = $(CFLAGS) -D__ASSEMBLY__ -DBZ_TEXT_START=$(BZ_TEXT_START) -DBZ_STACK_START=$(BZ_STACK_START) -SEDFLAGS := s/BZ_TEXT_START/$(BZ_TEXT_START)/;s/TEXT_START/$(TEXT_START)/ +SEDFLAGS := s/BZ_TEXT_START/$(BZ_TEXT_START)/;s/BZ_STACK_START/$(BZ_STACK_START)/;s/TEXT_START/$(TEXT_START)/ OBJECTS := head.o data.o diff --git a/target/linux/brcm47xx/image/lzma-loader/src/head.S b/target/linux/brcm47xx/image/lzma-loader/src/head.S index 930c9ba2772841..50c159ce573509 100644 --- a/target/linux/brcm47xx/image/lzma-loader/src/head.S +++ b/target/linux/brcm47xx/image/lzma-loader/src/head.S @@ -38,6 +38,7 @@ .text LEAF(startup) .set noreorder + li sp, BZ_STACK_START addi sp, -48 sw a0, 16(sp) sw a1, 20(sp) diff --git a/target/linux/cns3xxx/config-4.9 b/target/linux/cns3xxx/config-4.9 index 4e5e016c11e44f..36b4857c235249 100644 --- a/target/linux/cns3xxx/config-4.9 +++ b/target/linux/cns3xxx/config-4.9 @@ -36,7 +36,6 @@ CONFIG_ATAGS=y CONFIG_ATA_VERBOSE_ERROR=y CONFIG_AUTO_ZRELADDR=y CONFIG_BCM_NET_PHYLIB=y -# CONFIG_BINFMT_FLAT is not set CONFIG_BLK_DEV_SD=y CONFIG_BLK_MQ_PCI=y CONFIG_BROADCOM_PHY=y @@ -173,12 +172,9 @@ CONFIG_LEDS_GPIO=y # CONFIG_LEDS_TRIGGER_NETDEV is not set CONFIG_LIBFDT=y CONFIG_LOCK_SPIN_ON_OWNER=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y # CONFIG_MACH_CNS3420VB is not set CONFIG_MACH_GW2388=y CONFIG_MDIO_BOARDINFO=y -# CONFIG_MFD_MAX77620 is not set CONFIG_MIGHT_HAVE_CACHE_L2X0=y CONFIG_MIGHT_HAVE_PCI=y CONFIG_MMC=y @@ -265,7 +261,6 @@ CONFIG_SMP_ON_UP=y CONFIG_SPARSE_IRQ=y CONFIG_SPI=y CONFIG_SPI_BITBANG=y -# CONFIG_SPI_CADENCE_QUADSPI is not set CONFIG_SPI_CNS3XXX=y CONFIG_SPI_MASTER=y CONFIG_SRCU=y @@ -288,7 +283,6 @@ CONFIG_USB_DWC2_HOST=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_HCD_PLATFORM=y CONFIG_USB_EHCI_PCI=y -# CONFIG_USB_ETH is not set CONFIG_USB_GADGET=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_OHCI_HCD_PLATFORM=y diff --git a/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/gpio.c b/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/gpio.c index 19de24c349094a..bdf930a79ebb35 100644 --- a/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/gpio.c +++ b/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/gpio.c @@ -273,10 +273,10 @@ void __init cns3xxx_gpio_init(int gpio_base, int ngpio, ct = gc->chip_types; ct->type = IRQ_TYPE_EDGE_FALLING; ct->regs.ack = GPIO_INTERRUPT_CLEAR; - ct->regs.enable = GPIO_INTERRUPT_ENABLE; ct->chip.irq_ack = irq_gc_ack_set_bit; - ct->chip.irq_enable = irq_gc_unmask_enable_reg; - ct->chip.irq_disable = irq_gc_mask_disable_reg; + ct->regs.mask = GPIO_INTERRUPT_ENABLE; + ct->chip.irq_enable = irq_gc_mask_set_bit; + ct->chip.irq_disable = irq_gc_mask_clr_bit; ct->chip.irq_set_type = cns3xxx_gpio_irq_set_type; ct->handler = handle_edge_irq; diff --git a/target/linux/gemini/image/Makefile b/target/linux/gemini/image/Makefile index 1c51b62f68636b..2cea8577704146 100644 --- a/target/linux/gemini/image/Makefile +++ b/target/linux/gemini/image/Makefile @@ -10,19 +10,19 @@ include $(INCLUDE_DIR)/image.mk ifeq ($(SUBTARGET),wiligear) define Image/Prepare # WBD111: mach id 1690 (0x69a) - echo -en "\x06\x1c\xa0\xe3\x9a\x10\x81\xe3" > $(KDIR)/$(IMG_PREFIX)-wbd111-zImage - cat $(KDIR)/zImage >> $(KDIR)/$(IMG_PREFIX)-wbd111-zImage + echo -en "\x06\x1c\xa0\xe3\x9a\x10\x81\xe3" > $(KDIR)/wbd111-zImage + cat $(KDIR)/zImage >> $(KDIR)/wbd111-zImage # WBD222: mach id 2753 (0xAC1) - echo -en "\x0a\x1c\xa0\xe3\xc1\x10\x81\xe3" > $(KDIR)/$(IMG_PREFIX)-wbd222-zImage - cat $(KDIR)/zImage >> $(KDIR)/$(IMG_PREFIX)-wbd222-zImage + echo -en "\x0a\x1c\xa0\xe3\xc1\x10\x81\xe3" > $(KDIR)/wbd222-zImage + cat $(KDIR)/zImage >> $(KDIR)/wbd222-zImage endef endif ifeq ($(SUBTARGET),raidsonic) define Image/Prepare # NAS4220: mach id 2038 (0x7F6) - echo -en "\x07\x1c\xa0\xe3\xf6\x10\x81\xe3" > $(KDIR)/$(IMG_PREFIX)-nas4220-zImage - cat $(KDIR)/zImage >> $(KDIR)/$(IMG_PREFIX)-nas4220-zImage + echo -en "\x07\x1c\xa0\xe3\xf6\x10\x81\xe3" > $(KDIR)/nas4220-zImage + cat $(KDIR)/zImage >> $(KDIR)/nas4220-zImage endef endif @@ -30,9 +30,9 @@ ifeq ($(SUBTARGET),wiligear) define Image/BuildKernel # workaround the bootloader's bug with extra nops echo -en "\x00\x00\xa0\xe1\x00\x00\xa0\xe1\x00\x00\xa0\xe1\x00\x00\xa0\xe1" > $(BIN_DIR)/$(IMG_PREFIX)-wbd111-zImage - cat $(KDIR)/$(IMG_PREFIX)-wbd111-zImage >> $(BIN_DIR)/$(IMG_PREFIX)-wbd111-zImage + cat $(KDIR)/wbd111-zImage >> $(BIN_DIR)/$(IMG_PREFIX)-wbd111-zImage echo -en "\x00\x00\xa0\xe1\x00\x00\xa0\xe1\x00\x00\xa0\xe1\x00\x00\xa0\xe1" > $(BIN_DIR)/$(IMG_PREFIX)-wbd222-zImage - cat $(KDIR)/$(IMG_PREFIX)-wbd222-zImage >> $(BIN_DIR)/$(IMG_PREFIX)-wbd222-zImage + cat $(KDIR)/wbd222-zImage >> $(BIN_DIR)/$(IMG_PREFIX)-wbd222-zImage endef endif @@ -74,7 +74,7 @@ define Image/Build dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img of=$(BIN_DIR)/rd.gz bs=6144k count=1 # dd if=/dev/zero of=$(BIN_DIR)/hddapp.tgz bs=6144k count=1 dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img of=$(BIN_DIR)/hddapp.tgz bs=6144k count=1 seek=1 - cp $(KDIR)/$(IMG_PREFIX)-nas4220-zImage $(BIN_DIR)/ + cp $(KDIR)/nas4220-zImage $(BIN_DIR)/$(IMG_PREFIX)-nas4220-zImage cp $(BIN_DIR)/$(IMG_PREFIX)-nas4220-zImage $(BIN_DIR)/zImage cp ./ImageInfo-ib4220 $(BIN_DIR)/ImageInfo (cd $(BIN_DIR); tar -czf $(IMG_PREFIX)-sysupgrade-ib4220.tar.gz ImageInfo zImage rd.gz hddapp.tgz) diff --git a/target/linux/generic/backport-4.14/011-kbuild-export-SUBARCH.patch b/target/linux/generic/backport-4.14/011-kbuild-export-SUBARCH.patch index 89665867296bbb..7080cd10a8dcfa 100644 --- a/target/linux/generic/backport-4.14/011-kbuild-export-SUBARCH.patch +++ b/target/linux/generic/backport-4.14/011-kbuild-export-SUBARCH.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -415,8 +415,8 @@ KERNELRELEASE = $(shell cat include/conf +@@ -410,8 +410,8 @@ KERNELRELEASE = $(shell cat include/conf KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION diff --git a/target/linux/generic/backport-4.14/040-crypto-fix-typo-in-KPP-dependency-of-CRYPTO_ECDH.patch b/target/linux/generic/backport-4.14/040-crypto-fix-typo-in-KPP-dependency-of-CRYPTO_ECDH.patch new file mode 100644 index 00000000000000..b3e272066b7b21 --- /dev/null +++ b/target/linux/generic/backport-4.14/040-crypto-fix-typo-in-KPP-dependency-of-CRYPTO_ECDH.patch @@ -0,0 +1,25 @@ +From 4b05f09db650d215632da97f2c25ceba8235102a Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Sun, 26 Nov 2017 00:09:45 +0100 +Subject: [PATCH] crypto: fix typo in KPP dependency of CRYPTO_ECDH + +This fixes a typo in the CRYPTO_KPP dependency of CRYPTO_ECDH. + +Fixes: 3c4b23901a0c ("crypto: ecdh - Add ECDH software support") +Cc: # v4.8+ +Signed-off-by: Hauke Mehrtens +--- + crypto/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/crypto/Kconfig ++++ b/crypto/Kconfig +@@ -130,7 +130,7 @@ config CRYPTO_DH + + config CRYPTO_ECDH + tristate "ECDH algorithm" +- select CRYTPO_KPP ++ select CRYPTO_KPP + select CRYPTO_RNG_DEFAULT + help + Generic implementation of the ECDH algorithm diff --git a/target/linux/generic/backport-4.9/040-crypto-fix-typo-in-KPP-dependency-of-CRYPTO_ECDH.patch b/target/linux/generic/backport-4.9/040-crypto-fix-typo-in-KPP-dependency-of-CRYPTO_ECDH.patch new file mode 100644 index 00000000000000..eaef5ca0e542dc --- /dev/null +++ b/target/linux/generic/backport-4.9/040-crypto-fix-typo-in-KPP-dependency-of-CRYPTO_ECDH.patch @@ -0,0 +1,25 @@ +From 4b05f09db650d215632da97f2c25ceba8235102a Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Sun, 26 Nov 2017 00:09:45 +0100 +Subject: [PATCH] crypto: fix typo in KPP dependency of CRYPTO_ECDH + +This fixes a typo in the CRYPTO_KPP dependency of CRYPTO_ECDH. + +Fixes: 3c4b23901a0c ("crypto: ecdh - Add ECDH software support") +Cc: # v4.8+ +Signed-off-by: Hauke Mehrtens +--- + crypto/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/crypto/Kconfig ++++ b/crypto/Kconfig +@@ -120,7 +120,7 @@ config CRYPTO_DH + + config CRYPTO_ECDH + tristate "ECDH algorithm" +- select CRYTPO_KPP ++ select CRYPTO_KPP + help + Generic implementation of the ECDH algorithm + diff --git a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch index 9da3f3e327aaf1..aa7c857b16bbd9 100644 --- a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch +++ b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch @@ -803,7 +803,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -2697,11 +2697,9 @@ static int mvneta_poll(struct napi_struc +@@ -2701,11 +2701,9 @@ static int mvneta_poll(struct napi_struc rx_done = mvneta_rx_swbm(pp, budget, &pp->rxqs[rx_queue]); } diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18 index 1e3f0b5abe8766..4909fa0cde403d 100644 --- a/target/linux/generic/config-3.18 +++ b/target/linux/generic/config-3.18 @@ -90,7 +90,7 @@ CONFIG_32BIT=y # CONFIG_ADM6996_PHY is not set # CONFIG_ADM8211 is not set # CONFIG_ADT7316 is not set -# CONFIG_ADVISE_SYSCALLS is not set +CONFIG_ADVISE_SYSCALLS=y # CONFIG_ADXRS450 is not set CONFIG_AEABI=y # CONFIG_AFFS_FS is not set diff --git a/target/linux/generic/config-4.14 b/target/linux/generic/config-4.14 index d1b41d3e2ebead..f156cda85c6b4b 100644 --- a/target/linux/generic/config-4.14 +++ b/target/linux/generic/config-4.14 @@ -809,6 +809,7 @@ CONFIG_CMDLINE="" # CONFIG_COMPILE_TEST is not set # CONFIG_CONFIGFS_FS is not set # CONFIG_CONNECTOR is not set +CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 CONFIG_CONSTRUCTORS=y # CONFIG_CONTEXT_SWITCH_TRACER is not set # CONFIG_COPS is not set @@ -2148,6 +2149,7 @@ CONFIG_JOLIET=y CONFIG_KALLSYMS_BASE_RELATIVE=y # CONFIG_KALLSYMS_UNCOMPRESSED is not set # CONFIG_KARMA_PARTITION is not set +# CONFIG_KASAN is not set # CONFIG_KCOV is not set # CONFIG_KERNEL_BZIP2 is not set # CONFIG_KERNEL_CAT is not set @@ -5593,4 +5595,3 @@ CONFIG_ZONE_DMA=y # CONFIG_ZRAM is not set # CONFIG_ZSMALLOC is not set # CONFIG_ZX_TDM is not set -# CONFIG_SHORTCUT_FE is not set \ No newline at end of file diff --git a/target/linux/generic/files/drivers/misc/owl-loader.c b/target/linux/generic/files/drivers/misc/owl-loader.c index 30340da486b947..f11cb2b49c5e5f 100644 --- a/target/linux/generic/files/drivers/misc/owl-loader.c +++ b/target/linux/generic/files/drivers/misc/owl-loader.c @@ -89,7 +89,7 @@ static int ath9k_pci_fixup(struct pci_dev *pdev, const u16 *cal_data, val = swahb32(val); } -#if CONFIG_LANTIQ +#ifdef CONFIG_LANTIQ val = swab32(val); #endif diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_tplink.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_tplink.c index 3a50250715bdec..c346aa8130ba62 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_tplink.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_tplink.c @@ -106,6 +106,7 @@ static int mtdsplit_parse_tplink(struct mtd_info *master, return -EINVAL; kernel_size = sizeof(hdr) + be32_to_cpu(hdr.v1.kernel_len); + rootfs_offset = be32_to_cpu(hdr.v1.rootfs_ofs); break; case 2: case 3: @@ -113,6 +114,7 @@ static int mtdsplit_parse_tplink(struct mtd_info *master, return -EINVAL; kernel_size = sizeof(hdr) + be32_to_cpu(hdr.v2.kernel_len); + rootfs_offset = be32_to_cpu(hdr.v2.rootfs_ofs); break; default: return -EINVAL; @@ -121,11 +123,9 @@ static int mtdsplit_parse_tplink(struct mtd_info *master, if (kernel_size > master->size) return -EINVAL; - /* Find the rootfs after the kernel. */ - err = mtd_check_rootfs_magic(master, kernel_size, NULL); - if (!err) { - rootfs_offset = kernel_size; - } else { + /* Find the rootfs */ + err = mtd_check_rootfs_magic(master, rootfs_offset, NULL); + if (err) { /* * The size in the header might cover the rootfs as well. * Start the search from an arbitrary offset. @@ -142,7 +142,7 @@ static int mtdsplit_parse_tplink(struct mtd_info *master, parts[0].name = KERNEL_PART_NAME; parts[0].offset = 0; - parts[0].size = rootfs_offset; + parts[0].size = kernel_size; parts[1].name = ROOTFS_PART_NAME; parts[1].offset = rootfs_offset; diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index 7f3d5115ab0979..61811370de6029 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -49,12 +49,6 @@ extern const struct ar8xxx_chip ar8337_chip; .name = (_n), \ } -#define AR8216_MIB_RXB_ID 14 /* RxGoodByte */ -#define AR8216_MIB_TXB_ID 29 /* TxByte */ - -#define AR8236_MIB_RXB_ID 15 /* RxGoodByte */ -#define AR8236_MIB_TXB_ID 31 /* TxByte */ - static const struct ar8xxx_mib_desc ar8216_mibs[] = { MIB_DESC(1, AR8216_STATS_RXBROAD, "RxBroad"), MIB_DESC(1, AR8216_STATS_RXPAUSE, "RxPause"), @@ -1587,56 +1581,6 @@ ar8xxx_sw_set_flush_port_arl_table(struct switch_dev *dev, return ret; } -int -ar8xxx_sw_get_port_stats(struct switch_dev *dev, int port, - struct switch_port_stats *stats) -{ - struct ar8xxx_priv *priv = swdev_to_ar8xxx(dev); - u64 *mib_stats; - int ret; - int mib_txb_id, mib_rxb_id; - - if (!ar8xxx_has_mib_counters(priv)) - return -EOPNOTSUPP; - - if (port >= dev->ports) - return -EINVAL; - - switch (priv->chip_ver) { - case AR8XXX_VER_AR8216: - mib_txb_id = AR8216_MIB_TXB_ID; - mib_rxb_id = AR8216_MIB_RXB_ID; - break; - case AR8XXX_VER_AR8236: - case AR8XXX_VER_AR8316: - case AR8XXX_VER_AR8327: - case AR8XXX_VER_AR8337: - mib_txb_id = AR8236_MIB_TXB_ID; - mib_rxb_id = AR8236_MIB_RXB_ID; - break; - default: - return -EOPNOTSUPP; - } - - mutex_lock(&priv->mib_lock); - ret = ar8xxx_mib_capture(priv); - if (ret) - goto unlock; - - ar8xxx_mib_fetch_port_stat(priv, port, false); - - mib_stats = &priv->mib_stats[port * priv->chip->num_mibs]; - - stats->tx_bytes = mib_stats[mib_txb_id]; - stats->rx_bytes = mib_stats[mib_rxb_id]; - - ret = 0; - -unlock: - mutex_unlock(&priv->mib_lock); - return ret; -} - static const struct switch_attr ar8xxx_sw_attr_globals[] = { { .type = SWITCH_TYPE_INT, @@ -1752,7 +1696,16 @@ static const struct switch_dev_ops ar8xxx_sw_ops = { .apply_config = ar8xxx_sw_hw_apply, .reset_switch = ar8xxx_sw_reset_switch, .get_port_link = ar8xxx_sw_get_port_link, +/* The following op is disabled as it hogs the CPU and degrades performance. + An implementation has been attempted in 4d8a66d but reading MIB data is slow + on ar8xxx switches. + + The high CPU load has been traced down to the ar8xxx_reg_wait() call in + ar8xxx_mib_op(), which has to usleep_range() till the MIB busy flag set by + the request to update the MIB counter is cleared. */ +#if 0 .get_port_stats = ar8xxx_sw_get_port_stats, +#endif }; static const struct ar8xxx_chip ar8216_chip = { diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h index 321eeb79231fbf..d9508b9ff83c4c 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.h +++ b/target/linux/generic/files/drivers/net/phy/ar8216.h @@ -566,9 +566,6 @@ ar8xxx_sw_set_flush_port_arl_table(struct switch_dev *dev, const struct switch_attr *attr, struct switch_val *val); int -ar8xxx_sw_get_port_stats(struct switch_dev *dev, int port, - struct switch_port_stats *stats); -int ar8216_wait_bit(struct ar8xxx_priv *priv, int reg, u32 mask, u32 val); static inline struct ar8xxx_priv * diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c index bae9744736c6d6..6ebd2e8aedf33f 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8327.c +++ b/target/linux/generic/files/drivers/net/phy/ar8327.c @@ -1411,7 +1411,16 @@ static const struct switch_dev_ops ar8327_sw_ops = { .apply_config = ar8327_sw_hw_apply, .reset_switch = ar8xxx_sw_reset_switch, .get_port_link = ar8xxx_sw_get_port_link, +/* The following op is disabled as it hogs the CPU and degrades performance. + An implementation has been attempted in 4d8a66d but reading MIB data is slow + on ar8xxx switches. + + The high CPU load has been traced down to the ar8xxx_reg_wait() call in + ar8xxx_mib_op(), which has to usleep_range() till the MIB busy flag set by + the request to update the MIB counter is cleared. */ +#if 0 .get_port_stats = ar8xxx_sw_get_port_stats, +#endif }; const struct ar8xxx_chip ar8327_chip = { diff --git a/target/linux/generic/hack-4.14/202-reduce_module_size.patch b/target/linux/generic/hack-4.14/202-reduce_module_size.patch index f85424d0c47c2c..d3e014f4171cb2 100644 --- a/target/linux/generic/hack-4.14/202-reduce_module_size.patch +++ b/target/linux/generic/hack-4.14/202-reduce_module_size.patch @@ -13,12 +13,12 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -408,7 +408,7 @@ KBUILD_CFLAGS_KERNEL := - KBUILD_AFLAGS := -D__ASSEMBLY__ $(call cc-option,-fno-PIE) +@@ -402,7 +402,7 @@ KBUILD_AFLAGS_KERNEL := + KBUILD_CFLAGS_KERNEL := KBUILD_AFLAGS_MODULE := -DMODULE KBUILD_CFLAGS_MODULE := -DMODULE -KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds +KBUILD_LDFLAGS_MODULE = -T $(srctree)/scripts/module-common.lds $(if $(CONFIG_PROFILING),,-s) + GCC_PLUGINS_CFLAGS := # Read KERNELRELEASE from include/config/kernel.release (if it exists) - KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) diff --git a/target/linux/generic/hack-4.14/207-disable-modorder.patch b/target/linux/generic/hack-4.14/207-disable-modorder.patch index a9e90dae80ac43..4afed16a080af1 100644 --- a/target/linux/generic/hack-4.14/207-disable-modorder.patch +++ b/target/linux/generic/hack-4.14/207-disable-modorder.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -1208,7 +1208,6 @@ all: modules +@@ -1212,7 +1212,6 @@ all: modules PHONY += modules modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin @@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau @$(kecho) ' Building modules, stage 2.'; $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost -@@ -1237,7 +1236,6 @@ _modinst_: +@@ -1241,7 +1240,6 @@ _modinst_: rm -f $(MODLIB)/build ; \ ln -s $(CURDIR) $(MODLIB)/build ; \ fi diff --git a/target/linux/generic/hack-4.14/211-host_tools_portability.patch b/target/linux/generic/hack-4.14/211-host_tools_portability.patch index 1434f1c4de7e24..59f1479436f022 100644 --- a/target/linux/generic/hack-4.14/211-host_tools_portability.patch +++ b/target/linux/generic/hack-4.14/211-host_tools_portability.patch @@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau ## HOSTCC C flags -host_c_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj)) -+host_c_flags = -MD -MF $(depfile) -Wp -MT $@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj)) ++host_c_flags = -MD -MF $(depfile) -MT $@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj)) --- a/tools/perf/pmu-events/jevents.c +++ b/tools/perf/pmu-events/jevents.c @@ -35,6 +35,7 @@ diff --git a/target/linux/generic/hack-4.14/220-gc_sections.patch b/target/linux/generic/hack-4.14/220-gc_sections.patch index 4463e2313ec5c8..e06ddb80d444f2 100644 --- a/target/linux/generic/hack-4.14/220-gc_sections.patch +++ b/target/linux/generic/hack-4.14/220-gc_sections.patch @@ -21,9 +21,9 @@ Signed-off-by: Gabor Juhos --- a/Makefile +++ b/Makefile -@@ -410,6 +410,11 @@ KBUILD_AFLAGS_MODULE := -DMODULE - KBUILD_CFLAGS_MODULE := -DMODULE +@@ -405,6 +405,11 @@ KBUILD_CFLAGS_MODULE := -DMODULE KBUILD_LDFLAGS_MODULE = -T $(srctree)/scripts/module-common.lds $(if $(CONFIG_PROFILING),,-s) + GCC_PLUGINS_CFLAGS := +ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION +KBUILD_CFLAGS_KERNEL += $(call cc-option,-ffunction-sections,) @@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos # Read KERNELRELEASE from include/config/kernel.release (if it exists) KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) -@@ -783,11 +788,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH +@@ -784,11 +789,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once) endif diff --git a/target/linux/generic/hack-4.14/721-phy_packets.patch b/target/linux/generic/hack-4.14/721-phy_packets.patch index f6ac7147f04ddc..07e6e9da6d43dd 100644 --- a/target/linux/generic/hack-4.14/721-phy_packets.patch +++ b/target/linux/generic/hack-4.14/721-phy_packets.patch @@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau */ --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2492,6 +2492,10 @@ static inline int pskb_trim(struct sk_bu +@@ -2494,6 +2494,10 @@ static inline int pskb_trim(struct sk_bu return (len < skb->len) ? __pskb_trim(skb, len) : 0; } @@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau /** * pskb_trim_unique - remove end from a paged unique (not cloned) buffer * @skb: buffer to alter -@@ -2622,16 +2626,6 @@ static inline struct sk_buff *dev_alloc_ +@@ -2624,16 +2628,6 @@ static inline struct sk_buff *dev_alloc_ } @@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau help --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -2974,10 +2974,20 @@ static int xmit_one(struct sk_buff *skb, +@@ -2975,10 +2975,20 @@ static int xmit_one(struct sk_buff *skb, if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all)) dev_queue_xmit_nit(skb, dev); diff --git a/target/linux/generic/hack-4.14/902-debloat_proc.patch b/target/linux/generic/hack-4.14/902-debloat_proc.patch index a624cb1c454c3f..e291da5163427e 100644 --- a/target/linux/generic/hack-4.14/902-debloat_proc.patch +++ b/target/linux/generic/hack-4.14/902-debloat_proc.patch @@ -63,7 +63,7 @@ Signed-off-by: Felix Fietkau } --- a/fs/proc/proc_tty.c +++ b/fs/proc/proc_tty.c -@@ -144,7 +144,10 @@ static const struct file_operations proc +@@ -145,7 +145,10 @@ static const struct file_operations proc void proc_tty_register_driver(struct tty_driver *driver) { struct proc_dir_entry *ent; @@ -75,7 +75,7 @@ Signed-off-by: Felix Fietkau if (!driver->driver_name || driver->proc_entry || !driver->ops->proc_fops) return; -@@ -161,6 +164,9 @@ void proc_tty_unregister_driver(struct t +@@ -162,6 +165,9 @@ void proc_tty_unregister_driver(struct t { struct proc_dir_entry *ent; @@ -85,7 +85,7 @@ Signed-off-by: Felix Fietkau ent = driver->proc_entry; if (!ent) return; -@@ -175,6 +181,9 @@ void proc_tty_unregister_driver(struct t +@@ -176,6 +182,9 @@ void proc_tty_unregister_driver(struct t */ void __init proc_tty_init(void) { diff --git a/target/linux/generic/hack-4.9/660-fq_codel_defaults.patch b/target/linux/generic/hack-4.9/660-fq_codel_defaults.patch index c91ea01b50bba3..3e6473056c5867 100644 --- a/target/linux/generic/hack-4.9/660-fq_codel_defaults.patch +++ b/target/linux/generic/hack-4.9/660-fq_codel_defaults.patch @@ -3,6 +3,9 @@ From: Felix Fietkau Date: Fri, 7 Jul 2017 17:21:53 +0200 Subject: hack: net: fq_codel: tune defaults for small devices +Assume that x86_64 devices always have a big memory and do not need this +optimization compared to devices with only 32 MB or 64 MB RAM. + Signed-off-by: Felix Fietkau --- net/sched/sch_fq_codel.c | 2 +- @@ -10,12 +13,15 @@ Signed-off-by: Felix Fietkau --- a/net/sched/sch_fq_codel.c +++ b/net/sched/sch_fq_codel.c -@@ -479,7 +479,7 @@ static int fq_codel_init(struct Qdisc *s +@@ -479,7 +479,11 @@ static int fq_codel_init(struct Qdisc *s sch->limit = 10*1024; q->flows_cnt = 1024; -- q->memory_limit = 32 << 20; /* 32 MBytes */ ++#ifdef CONFIG_X86_64 + q->memory_limit = 32 << 20; /* 32 MBytes */ ++#else + q->memory_limit = 4 << 20; /* 4 MBytes */ ++#endif q->drop_batch_size = 64; q->quantum = psched_mtu(qdisc_dev(sch)); q->perturbation = prandom_u32(); diff --git a/target/linux/generic/hack-4.9/661-use_fq_codel_by_default.patch b/target/linux/generic/hack-4.9/661-use_fq_codel_by_default.patch index 18a98b3aab4018..7a249e37f3c1a9 100644 --- a/target/linux/generic/hack-4.9/661-use_fq_codel_by_default.patch +++ b/target/linux/generic/hack-4.9/661-use_fq_codel_by_default.patch @@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau register_qdisc(&pfifo_head_drop_qdisc_ops); --- a/net/sched/sch_fq_codel.c +++ b/net/sched/sch_fq_codel.c -@@ -705,7 +705,7 @@ static const struct Qdisc_class_ops fq_c +@@ -709,7 +709,7 @@ static const struct Qdisc_class_ops fq_c .walk = fq_codel_walk, }; @@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau .cl_ops = &fq_codel_class_ops, .id = "fq_codel", .priv_size = sizeof(struct fq_codel_sched_data), -@@ -720,6 +720,7 @@ static struct Qdisc_ops fq_codel_qdisc_o +@@ -724,6 +724,7 @@ static struct Qdisc_ops fq_codel_qdisc_o .dump_stats = fq_codel_dump_stats, .owner = THIS_MODULE, }; diff --git a/target/linux/generic/pending-3.18/002-phy_drivers_backport.patch b/target/linux/generic/pending-3.18/002-phy_drivers_backport.patch index c97c759e7ee82a..63071c99974599 100644 --- a/target/linux/generic/pending-3.18/002-phy_drivers_backport.patch +++ b/target/linux/generic/pending-3.18/002-phy_drivers_backport.patch @@ -1,6 +1,6 @@ --- a/drivers/net/phy/adm6996.c +++ b/drivers/net/phy/adm6996.c -@@ -287,7 +287,7 @@ static u16 +@@ -289,7 +289,7 @@ static u16 adm6996_read_mii_reg(struct adm6996_priv *priv, enum admreg reg) { struct phy_device *phydev = priv->priv; @@ -9,7 +9,7 @@ return bus->read(bus, PHYADDR(reg)); } -@@ -296,7 +296,7 @@ static void +@@ -298,7 +298,7 @@ static void adm6996_write_mii_reg(struct adm6996_priv *priv, enum admreg reg, u16 val) { struct phy_device *phydev = priv->priv; @@ -18,7 +18,7 @@ bus->write(bus, PHYADDR(reg), val); } -@@ -1019,13 +1019,13 @@ static int adm6996_config_init(struct ph +@@ -1050,13 +1050,13 @@ static int adm6996_config_init(struct ph pdev->supported = ADVERTISED_100baseT_Full; pdev->advertising = ADVERTISED_100baseT_Full; @@ -35,7 +35,7 @@ if (!priv) return -ENOMEM; -@@ -1045,7 +1045,7 @@ static int adm6996_config_init(struct ph +@@ -1076,7 +1076,7 @@ static int adm6996_config_init(struct ph } /* @@ -44,7 +44,7 @@ */ static int adm6996_read_status(struct phy_device *phydev) { -@@ -1061,7 +1061,7 @@ static int adm6996_read_status(struct ph +@@ -1092,7 +1092,7 @@ static int adm6996_read_status(struct ph } /* @@ -53,7 +53,7 @@ */ static int adm6996_config_aneg(struct phy_device *phydev) { -@@ -1070,11 +1070,11 @@ static int adm6996_config_aneg(struct ph +@@ -1101,11 +1101,11 @@ static int adm6996_config_aneg(struct ph static int adm6996_fixup(struct phy_device *dev) { @@ -67,7 +67,7 @@ return 0; /* look for the switch on the bus */ -@@ -1121,6 +1121,7 @@ static struct phy_driver adm6996_phy_dri +@@ -1152,6 +1152,7 @@ static struct phy_driver adm6996_phy_dri .config_aneg = &adm6996_config_aneg, .read_status = &adm6996_read_status, .soft_reset = adm6996_soft_reset, @@ -75,7 +75,7 @@ }; static int adm6996_gpio_probe(struct platform_device *pdev) -@@ -1193,7 +1194,7 @@ static int __init adm6996_init(void) +@@ -1220,7 +1221,7 @@ static int __init adm6996_init(void) int err; phy_register_fixup_for_id(PHY_ANY_ID, adm6996_fixup); @@ -95,7 +95,7 @@ ret |= BMCR_ANENABLE | BMCR_ANRESTART; return phy_write(phydev, MII_BMCR, ret); } -@@ -1996,7 +1996,7 @@ ar8xxx_phy_config_init(struct phy_device +@@ -2007,7 +2007,7 @@ ar8xxx_phy_config_init(struct phy_device priv->phy = phydev; @@ -104,7 +104,7 @@ if (chip_is_ar8316(priv)) { /* switch device has been initialized, reinit */ priv->dev.ports = (AR8216_NUM_PORTS - 1); -@@ -2044,7 +2044,7 @@ ar8xxx_check_link_states(struct ar8xxx_p +@@ -2055,7 +2055,7 @@ ar8xxx_check_link_states(struct ar8xxx_p /* flush ARL entries for this port if it went down*/ if (!link_new) priv->chip->atu_flush_port(priv, i); @@ -113,7 +113,7 @@ i, link_new ? "up" : "down"); } -@@ -2063,10 +2063,10 @@ ar8xxx_phy_read_status(struct phy_device +@@ -2074,10 +2074,10 @@ ar8xxx_phy_read_status(struct phy_device if (phydev->state == PHY_CHANGELINK) ar8xxx_check_link_states(priv); @@ -126,7 +126,7 @@ phydev->link = !!link.link; if (!phydev->link) return 0; -@@ -2096,7 +2096,7 @@ ar8xxx_phy_read_status(struct phy_device +@@ -2107,7 +2107,7 @@ ar8xxx_phy_read_status(struct phy_device static int ar8xxx_phy_config_aneg(struct phy_device *phydev) { @@ -135,7 +135,7 @@ return 0; return genphy_config_aneg(phydev); -@@ -2151,15 +2151,15 @@ ar8xxx_phy_probe(struct phy_device *phyd +@@ -2162,15 +2162,15 @@ ar8xxx_phy_probe(struct phy_device *phyd int ret; /* skip PHYs at unused adresses */ @@ -154,7 +154,7 @@ goto found; priv = ar8xxx_create(); -@@ -2168,7 +2168,7 @@ ar8xxx_phy_probe(struct phy_device *phyd +@@ -2179,7 +2179,7 @@ ar8xxx_phy_probe(struct phy_device *phyd goto unlock; } @@ -163,7 +163,7 @@ ret = ar8xxx_probe_switch(priv); if (ret) -@@ -2189,7 +2189,7 @@ ar8xxx_phy_probe(struct phy_device *phyd +@@ -2200,7 +2200,7 @@ ar8xxx_phy_probe(struct phy_device *phyd found: priv->use_count++; @@ -172,7 +172,7 @@ if (ar8xxx_has_gige(priv)) { phydev->supported = SUPPORTED_1000baseT_Full; phydev->advertising = ADVERTISED_1000baseT_Full; -@@ -2277,21 +2277,33 @@ ar8xxx_phy_soft_reset(struct phy_device +@@ -2288,21 +2288,33 @@ ar8xxx_phy_soft_reset(struct phy_device return 0; } @@ -223,7 +223,7 @@ MODULE_LICENSE("GPL"); --- a/drivers/net/phy/ar8327.c +++ b/drivers/net/phy/ar8327.c -@@ -619,11 +619,11 @@ ar8327_hw_init(struct ar8xxx_priv *priv) +@@ -627,11 +627,11 @@ ar8327_hw_init(struct ar8xxx_priv *priv) if (!priv->chip_data) return -ENOMEM; @@ -363,7 +363,7 @@ } -@@ -392,13 +388,12 @@ mvswitch_probe(struct phy_device *pdev) +@@ -398,13 +394,12 @@ mvswitch_probe(struct phy_device *pdev) static int mvswitch_fixup(struct phy_device *dev) { @@ -379,9 +379,9 @@ if (reg != MV_IDENT_VALUE) return 0; -@@ -418,13 +413,14 @@ static struct phy_driver mvswitch_driver - .config_init = &mvswitch_config_init, +@@ -425,13 +420,14 @@ static struct phy_driver mvswitch_driver .config_aneg = &mvswitch_config_aneg, + .aneg_done = &mvswitch_aneg_done, .read_status = &mvswitch_read_status, + .driver = { .owner = THIS_MODULE,}, }; @@ -464,7 +464,7 @@ module_init(psb6970_init); --- a/drivers/net/phy/rtl8306.c +++ b/drivers/net/phy/rtl8306.c -@@ -872,7 +872,7 @@ rtl8306_config_init(struct phy_device *p +@@ -876,7 +876,7 @@ rtl8306_config_init(struct phy_device *p int err; /* Only init the switch for the primary PHY */ @@ -473,7 +473,7 @@ return 0; val.value.i = 1; -@@ -882,7 +882,7 @@ rtl8306_config_init(struct phy_device *p +@@ -886,7 +886,7 @@ rtl8306_config_init(struct phy_device *p priv->dev.ops = &rtl8306_ops; priv->do_cpu = 0; priv->page = -1; @@ -482,7 +482,7 @@ chipid = rtl_get(dev, RTL_REG_CHIPID); chipver = rtl_get(dev, RTL_REG_CHIPVER); -@@ -928,13 +928,13 @@ rtl8306_fixup(struct phy_device *pdev) +@@ -932,13 +932,13 @@ rtl8306_fixup(struct phy_device *pdev) u16 chipid; /* Attach to primary LAN port and WAN port */ @@ -498,7 +498,7 @@ chipid = rtl_get(&priv.dev, RTL_REG_CHIPID); if (chipid == 0x5988) pdev->phy_id = RTL8306_MAGIC; -@@ -952,14 +952,14 @@ rtl8306_probe(struct phy_device *pdev) +@@ -956,14 +956,14 @@ rtl8306_probe(struct phy_device *pdev) * share one rtl_priv instance between virtual phy * devices on the same bus */ @@ -515,7 +515,7 @@ found: pdev->priv = priv; -@@ -980,7 +980,7 @@ rtl8306_config_aneg(struct phy_device *p +@@ -984,7 +984,7 @@ rtl8306_config_aneg(struct phy_device *p struct rtl_priv *priv = pdev->priv; /* Only for WAN */ @@ -524,7 +524,7 @@ return 0; /* Restart autonegotiation */ -@@ -996,7 +996,7 @@ rtl8306_read_status(struct phy_device *p +@@ -1000,7 +1000,7 @@ rtl8306_read_status(struct phy_device *p struct rtl_priv *priv = pdev->priv; struct switch_dev *dev = &priv->dev; @@ -533,7 +533,7 @@ /* WAN */ pdev->speed = rtl_get(dev, RTL_PORT_REG(4, SPEED)) ? SPEED_100 : SPEED_10; pdev->duplex = rtl_get(dev, RTL_PORT_REG(4, DUPLEX)) ? DUPLEX_FULL : DUPLEX_HALF; -@@ -1037,6 +1037,7 @@ static struct phy_driver rtl8306_driver +@@ -1041,6 +1041,7 @@ static struct phy_driver rtl8306_driver .config_init = &rtl8306_config_init, .config_aneg = &rtl8306_config_aneg, .read_status = &rtl8306_read_status, @@ -541,7 +541,7 @@ }; -@@ -1044,7 +1045,7 @@ static int __init +@@ -1048,7 +1049,7 @@ static int __init rtl_init(void) { phy_register_fixup_for_id(PHY_ANY_ID, rtl8306_fixup); diff --git a/target/linux/generic/pending-3.18/041-mtd-bcm47xxpart-backports-from-3.20.patch b/target/linux/generic/pending-3.18/041-mtd-bcm47xxpart-backports-from-3.20.patch index 59180c2084dc4f..f3dfa901f1f75f 100644 --- a/target/linux/generic/pending-3.18/041-mtd-bcm47xxpart-backports-from-3.20.patch +++ b/target/linux/generic/pending-3.18/041-mtd-bcm47xxpart-backports-from-3.20.patch @@ -83,7 +83,7 @@ offset + trx->offset[i], 0); i++; -@@ -205,7 +235,8 @@ static int bcm47xxpart_parse(struct mtd_ +@@ -203,7 +233,8 @@ static int bcm47xxpart_parse(struct mtd_ } /* Squashfs on devices not using TRX */ diff --git a/target/linux/generic/pending-3.18/044-backport-m25p80-jedec-probe.patch b/target/linux/generic/pending-3.18/044-backport-m25p80-jedec-probe.patch index 41b912d5d454de..24c264ba974059 100644 --- a/target/linux/generic/pending-3.18/044-backport-m25p80-jedec-probe.patch +++ b/target/linux/generic/pending-3.18/044-backport-m25p80-jedec-probe.patch @@ -24,7 +24,7 @@ .probe = m25p_probe, --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -927,8 +927,11 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -934,8 +934,11 @@ int spi_nor_scan(struct spi_nor *nor, co if (ret) return ret; diff --git a/target/linux/generic/pending-3.18/070-bgmac-register-napi-before-the-device.patch b/target/linux/generic/pending-3.18/070-bgmac-register-napi-before-the-device.patch index aa45860e933a82..0e7e4f8b125c2c 100644 --- a/target/linux/generic/pending-3.18/070-bgmac-register-napi-before-the-device.patch +++ b/target/linux/generic/pending-3.18/070-bgmac-register-napi-before-the-device.patch @@ -13,7 +13,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/broadcom/bgmac.c +++ b/drivers/net/ethernet/broadcom/bgmac.c -@@ -1515,6 +1515,8 @@ static int bgmac_probe(struct bcma_devic +@@ -1521,6 +1521,8 @@ static int bgmac_probe(struct bcma_devic if (core->bus->sprom.boardflags_lo & BGMAC_BFL_ENETADM) bgmac_warn(bgmac, "Support for ADMtek ethernet switch not implemented\n"); @@ -22,7 +22,7 @@ Signed-off-by: David S. Miller err = bgmac_mii_register(bgmac); if (err) { bgmac_err(bgmac, "Cannot register MDIO\n"); -@@ -1529,8 +1531,6 @@ static int bgmac_probe(struct bcma_devic +@@ -1535,8 +1537,6 @@ static int bgmac_probe(struct bcma_devic netif_carrier_off(net_dev); @@ -31,7 +31,7 @@ Signed-off-by: David S. Miller return 0; err_mii_unregister: -@@ -1549,9 +1549,9 @@ static void bgmac_remove(struct bcma_dev +@@ -1555,9 +1555,9 @@ static void bgmac_remove(struct bcma_dev { struct bgmac *bgmac = bcma_get_drvdata(core); diff --git a/target/linux/generic/pending-3.18/072-bgmac-fix-device-initialization-on-Northstar-SoCs-co.patch b/target/linux/generic/pending-3.18/072-bgmac-fix-device-initialization-on-Northstar-SoCs-co.patch deleted file mode 100644 index 121d2f41224b50..00000000000000 --- a/target/linux/generic/pending-3.18/072-bgmac-fix-device-initialization-on-Northstar-SoCs-co.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 21697336d46b71dd031f29e426dda0b1e7f06cc0 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Wed, 11 Feb 2015 18:06:34 +0100 -Subject: [PATCH] bgmac: fix device initialization on Northstar SoCs (condition - typo) -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -On Northstar (Broadcom's ARM architecture) we need to manually enable -all cores. Code for that is already in place, but the condition for it -was wrong. - -Signed-off-by: Rafał Miłecki -Signed-off-by: David S. Miller ---- - drivers/net/ethernet/broadcom/bgmac.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - ---- a/drivers/net/ethernet/broadcom/bgmac.c -+++ b/drivers/net/ethernet/broadcom/bgmac.c -@@ -1412,6 +1412,7 @@ static void bgmac_mii_unregister(struct - /* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/chipattach */ - static int bgmac_probe(struct bcma_device *core) - { -+ struct bcma_chipinfo *ci = &core->bus->chipinfo; - struct net_device *net_dev; - struct bgmac *bgmac; - struct ssb_sprom *sprom = &core->bus->sprom; -@@ -1474,8 +1475,8 @@ static int bgmac_probe(struct bcma_devic - bgmac_chip_reset(bgmac); - - /* For Northstar, we have to take all GMAC core out of reset */ -- if (core->id.id == BCMA_CHIP_ID_BCM4707 || -- core->id.id == BCMA_CHIP_ID_BCM53018) { -+ if (ci->id == BCMA_CHIP_ID_BCM4707 || -+ ci->id == BCMA_CHIP_ID_BCM53018) { - struct bcma_device *ns_core; - int ns_gmac; - diff --git a/target/linux/generic/pending-3.18/077-03-bgmac-implement-scatter-gather-support.patch b/target/linux/generic/pending-3.18/077-03-bgmac-implement-scatter-gather-support.patch index ceb25e85ad87d2..642dd2ad73582d 100644 --- a/target/linux/generic/pending-3.18/077-03-bgmac-implement-scatter-gather-support.patch +++ b/target/linux/generic/pending-3.18/077-03-bgmac-implement-scatter-gather-support.patch @@ -254,7 +254,7 @@ Signed-off-by: Felix Fietkau } } -@@ -1583,6 +1657,10 @@ static int bgmac_probe(struct bcma_devic +@@ -1588,6 +1662,10 @@ static int bgmac_probe(struct bcma_devic goto err_dma_free; } diff --git a/target/linux/generic/pending-3.18/078-bgmac-reset-enable-Ethernet-core-before-using-it.patch b/target/linux/generic/pending-3.18/078-bgmac-reset-enable-Ethernet-core-before-using-it.patch index ca061a50d16ea4..a4c7876d7febd6 100644 --- a/target/linux/generic/pending-3.18/078-bgmac-reset-enable-Ethernet-core-before-using-it.patch +++ b/target/linux/generic/pending-3.18/078-bgmac-reset-enable-Ethernet-core-before-using-it.patch @@ -17,9 +17,9 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/broadcom/bgmac.c +++ b/drivers/net/ethernet/broadcom/bgmac.c -@@ -1564,6 +1564,11 @@ static int bgmac_probe(struct bcma_devic - dev_warn(&core->dev, "Using random MAC: %pM\n", mac); - } +@@ -1569,6 +1569,11 @@ static int bgmac_probe(struct bcma_devic + */ + bcma_core_enable(core, 0); + /* This (reset &) enable is not preset in specs or reference driver but + * Broadcom does it in arch PCI code when enabling fake PCI device. diff --git a/target/linux/generic/pending-3.18/080-11-fib_trie-Push-rcu_read_lock-unlock-to-callers.patch b/target/linux/generic/pending-3.18/080-11-fib_trie-Push-rcu_read_lock-unlock-to-callers.patch index fe55323a50e95d..29bec8387d78dc 100644 --- a/target/linux/generic/pending-3.18/080-11-fib_trie-Push-rcu_read_lock-unlock-to-callers.patch +++ b/target/linux/generic/pending-3.18/080-11-fib_trie-Push-rcu_read_lock-unlock-to-callers.patch @@ -172,7 +172,7 @@ Signed-off-by: David S. Miller u32 portid; net = sock_net(skb->sk); -@@ -971,9 +976,7 @@ static void nl_fib_input(struct sk_buff +@@ -972,9 +977,7 @@ static void nl_fib_input(struct sk_buff nlh = nlmsg_hdr(skb); frn = (struct fib_result_nl *) nlmsg_data(nlh); diff --git a/target/linux/generic/pending-3.18/082-ipv6-ip6_fragment-fix-headroom-tests-and-skb-leak.patch b/target/linux/generic/pending-3.18/082-ipv6-ip6_fragment-fix-headroom-tests-and-skb-leak.patch index d3da41e9180539..9f39e5ba5eaceb 100644 --- a/target/linux/generic/pending-3.18/082-ipv6-ip6_fragment-fix-headroom-tests-and-skb-leak.patch +++ b/target/linux/generic/pending-3.18/082-ipv6-ip6_fragment-fix-headroom-tests-and-skb-leak.patch @@ -44,7 +44,7 @@ Closes 20532 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c -@@ -597,20 +597,22 @@ int ip6_fragment(struct sk_buff *skb, in +@@ -600,20 +600,22 @@ int ip6_fragment(struct sk_buff *skb, in } mtu -= hlen + sizeof(struct frag_hdr); @@ -69,7 +69,7 @@ Closes 20532 goto slow_path_clean; /* Partially cloned skb? */ -@@ -627,8 +629,6 @@ int ip6_fragment(struct sk_buff *skb, in +@@ -630,8 +632,6 @@ int ip6_fragment(struct sk_buff *skb, in err = 0; offset = 0; @@ -78,7 +78,7 @@ Closes 20532 /* BUILD HEADER */ *prevhdr = NEXTHDR_FRAGMENT; -@@ -636,8 +636,11 @@ int ip6_fragment(struct sk_buff *skb, in +@@ -639,8 +639,11 @@ int ip6_fragment(struct sk_buff *skb, in if (!tmp_hdr) { IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), IPSTATS_MIB_FRAGFAILS); @@ -91,7 +91,7 @@ Closes 20532 __skb_pull(skb, hlen); fh = (struct frag_hdr *)__skb_push(skb, sizeof(struct frag_hdr)); -@@ -735,7 +738,6 @@ slow_path: +@@ -738,7 +741,6 @@ slow_path: */ *prevhdr = NEXTHDR_FRAGMENT; diff --git a/target/linux/generic/pending-3.18/090-overlayfs-fallback-to-readonly-when-full.patch b/target/linux/generic/pending-3.18/090-overlayfs-fallback-to-readonly-when-full.patch index c75af99c6049d6..6c26a47c5fb9e3 100644 --- a/target/linux/generic/pending-3.18/090-overlayfs-fallback-to-readonly-when-full.patch +++ b/target/linux/generic/pending-3.18/090-overlayfs-fallback-to-readonly-when-full.patch @@ -44,7 +44,7 @@ Miklos --- a/fs/overlayfs/copy_up.c +++ b/fs/overlayfs/copy_up.c -@@ -313,6 +313,9 @@ int ovl_copy_up_one(struct dentry *paren +@@ -315,6 +315,9 @@ int ovl_copy_up_one(struct dentry *paren struct cred *override_cred; char *link = NULL; diff --git a/target/linux/generic/pending-3.18/097-mm-remove-gup_flags-FOLL_WRITE-games-from-__get_user.patch b/target/linux/generic/pending-3.18/097-mm-remove-gup_flags-FOLL_WRITE-games-from-__get_user.patch deleted file mode 100644 index 213f85b0a92a40..00000000000000 --- a/target/linux/generic/pending-3.18/097-mm-remove-gup_flags-FOLL_WRITE-games-from-__get_user.patch +++ /dev/null @@ -1,90 +0,0 @@ -From e45a502bdeae5a075257c4f061d1ff4ff0821354 Mon Sep 17 00:00:00 2001 -From: Linus Torvalds -Date: Thu, 13 Oct 2016 13:07:36 -0700 -Subject: [PATCH] mm: remove gup_flags FOLL_WRITE games from __get_user_pages() - -[ Upstream commit 19be0eaffa3ac7d8eb6784ad9bdbc7d67ed8e619 ] - -This is an ancient bug that was actually attempted to be fixed once -(badly) by me eleven years ago in commit 4ceb5db9757a ("Fix -get_user_pages() race for write access") but that was then undone due to -problems on s390 by commit f33ea7f404e5 ("fix get_user_pages bug"). - -In the meantime, the s390 situation has long been fixed, and we can now -fix it by checking the pte_dirty() bit properly (and do it better). The -s390 dirty bit was implemented in abf09bed3cce ("s390/mm: implement -software dirty bits") which made it into v3.9. Earlier kernels will -have to look at the page state itself. - -Also, the VM has become more scalable, and what used a purely -theoretical race back then has become easier to trigger. - -To fix it, we introduce a new internal FOLL_COW flag to mark the "yes, -we already did a COW" rather than play racy games with FOLL_WRITE that -is very fundamental, and then use the pte dirty flag to validate that -the FOLL_COW flag is still valid. - -Reported-and-tested-by: Phil "not Paul" Oester -Acked-by: Hugh Dickins -Reviewed-by: Michal Hocko -Cc: Andy Lutomirski -Cc: Kees Cook -Cc: Oleg Nesterov -Cc: Willy Tarreau -Cc: Nick Piggin -Cc: Greg Thelen -Cc: stable@vger.kernel.org -Signed-off-by: Linus Torvalds -Signed-off-by: Sasha Levin ---- - include/linux/mm.h | 1 + - mm/gup.c | 14 ++++++++++++-- - 2 files changed, 13 insertions(+), 2 deletions(-) - ---- a/include/linux/mm.h -+++ b/include/linux/mm.h -@@ -2029,6 +2029,7 @@ static inline struct page *follow_page(s - #define FOLL_NUMA 0x200 /* force NUMA hinting page fault */ - #define FOLL_MIGRATION 0x400 /* wait for page to replace migration entry */ - #define FOLL_TRIED 0x800 /* a retry, previous pass started an IO */ -+#define FOLL_COW 0x4000 /* internal GUP flag */ - - typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr, - void *data); ---- a/mm/gup.c -+++ b/mm/gup.c -@@ -32,6 +32,16 @@ static struct page *no_page_table(struct - return NULL; - } - -+/* -+ * FOLL_FORCE can write to even unwritable pte's, but only -+ * after we've gone through a COW cycle and they are dirty. -+ */ -+static inline bool can_follow_write_pte(pte_t pte, unsigned int flags) -+{ -+ return pte_write(pte) || -+ ((flags & FOLL_FORCE) && (flags & FOLL_COW) && pte_dirty(pte)); -+} -+ - static struct page *follow_page_pte(struct vm_area_struct *vma, - unsigned long address, pmd_t *pmd, unsigned int flags) - { -@@ -66,7 +76,7 @@ retry: - } - if ((flags & FOLL_NUMA) && pte_numa(pte)) - goto no_page; -- if ((flags & FOLL_WRITE) && !pte_write(pte)) { -+ if ((flags & FOLL_WRITE) && !can_follow_write_pte(pte, flags)) { - pte_unmap_unlock(ptep, ptl); - return NULL; - } -@@ -315,7 +325,7 @@ static int faultin_page(struct task_stru - * reCOWed by userspace write). - */ - if ((ret & VM_FAULT_WRITE) && !(vma->vm_flags & VM_WRITE)) -- *flags &= ~FOLL_WRITE; -+ *flags |= FOLL_COW; - return 0; - } - diff --git a/target/linux/generic/pending-3.18/133-MIPS-UAPI-Ignore-__arch_swab-16-32-64-when-using-MIP.patch b/target/linux/generic/pending-3.18/133-MIPS-UAPI-Ignore-__arch_swab-16-32-64-when-using-MIP.patch deleted file mode 100644 index ebbe1bbaeea4a6..00000000000000 --- a/target/linux/generic/pending-3.18/133-MIPS-UAPI-Ignore-__arch_swab-16-32-64-when-using-MIP.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 71a0a72456b48de972d7ed613b06a22a3aa9057f Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Sat, 26 Sep 2015 13:41:43 +0800 -Subject: [PATCH] MIPS: UAPI: Ignore __arch_swab{16,32,64} when using MIPS16 - -Some GCC versions (e.g. 4.8.3) can incorrectly inline a function with -MIPS32 instructions into another function with MIPS16 code [1], causing -the assembler to genereate incorrect binary code or fail right away -complaining about unrecognized opcode. - -In the case of __arch_swab{16,32}, when inlined by the compiler with -flags `-mips32r2 -mips16 -Os', the assembler can fail with the following -error. - - {standard input}:79: Error: unrecognized opcode `wsbh $2,$2' - -For performance concerns and to workaround the issue already existing in -older compilers, just ignore these 2 functions when compiling with -mips16 enabled. - - [1] Inlining nomips16 function into mips16 function can result in - undefined builtins, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55777 - -Signed-off-by: Yousong Zhou -Cc: Maciej W. Rozycki -Cc: linux-mips@linux-mips.org -Patchwork: https://patchwork.linux-mips.org/patch/11241/ -Signed-off-by: Ralf Baechle ---- - arch/mips/include/uapi/asm/swab.h | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - ---- a/arch/mips/include/uapi/asm/swab.h -+++ b/arch/mips/include/uapi/asm/swab.h -@@ -13,8 +13,9 @@ - - #define __SWAB_64_THRU_32__ - --#if (defined(__mips_isa_rev) && (__mips_isa_rev >= 2)) || \ -- defined(_MIPS_ARCH_LOONGSON3A) -+#if !defined(__mips16) && \ -+ ((defined(__mips_isa_rev) && (__mips_isa_rev >= 2)) || \ -+ defined(_MIPS_ARCH_LOONGSON3A)) - - static inline __attribute_const__ __u16 __arch_swab16(__u16 x) - { -@@ -65,5 +66,5 @@ static inline __attribute_const__ __u64 - } - #define __arch_swab64 __arch_swab64 - #endif /* __mips64 */ --#endif /* MIPS R2 or newer or Loongson 3A */ -+#endif /* (not __mips16) and (MIPS R2 or newer or Loongson 3A) */ - #endif /* _ASM_SWAB_H */ diff --git a/target/linux/generic/pending-3.18/141-mtd-bcm47xxpart-limit-scanned-flash-area-on-BCM47XX-.patch b/target/linux/generic/pending-3.18/141-mtd-bcm47xxpart-limit-scanned-flash-area-on-BCM47XX-.patch deleted file mode 100644 index 761cff316d0426..00000000000000 --- a/target/linux/generic/pending-3.18/141-mtd-bcm47xxpart-limit-scanned-flash-area-on-BCM47XX-.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Sat, 5 Dec 2015 02:03:32 +0100 -Subject: [PATCH] mtd: bcm47xxpart: limit scanned flash area on BCM47XX (MIPS) - only -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -We allowed using bcm47xxpart on BCM5301X arch with commit: -9e3afa5f5c7 ("mtd: bcm47xxpart: allow enabling on ARCH_BCM_5301X") - -BCM5301X devices may contain some partitions in higher memory, e.g. -Netgear R8000 has board_data at 0x2600000. To detect them we should -use size limit on MIPS only. - -Signed-off-by: Rafał Miłecki ---- - drivers/mtd/bcm47xxpart.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/mtd/bcm47xxpart.c -+++ b/drivers/mtd/bcm47xxpart.c -@@ -118,8 +118,8 @@ static int bcm47xxpart_parse(struct mtd_ - /* Parse block by block looking for magics */ - for (offset = 0; offset <= master->size - blocksize; - offset += blocksize) { -- /* Nothing more in higher memory */ -- if (offset >= 0x2000000) -+ /* Nothing more in higher memory on BCM47XX (MIPS) */ -+ if (config_enabled(CONFIG_BCM47XX) && offset >= 0x2000000) - break; - - if (curr_part >= BCM47XXPART_MAX_PARTS) { diff --git a/target/linux/generic/pending-3.18/142-mtd-bcm47xxpart-don-t-fail-because-of-bit-flips.patch b/target/linux/generic/pending-3.18/142-mtd-bcm47xxpart-don-t-fail-because-of-bit-flips.patch index 9073f795e2e356..926de5fef73e8c 100644 --- a/target/linux/generic/pending-3.18/142-mtd-bcm47xxpart-don-t-fail-because-of-bit-flips.patch +++ b/target/linux/generic/pending-3.18/142-mtd-bcm47xxpart-don-t-fail-because-of-bit-flips.patch @@ -58,7 +58,7 @@ Signed-off-by: Rafał Miłecki continue; } -@@ -254,10 +258,11 @@ static int bcm47xxpart_parse(struct mtd_ +@@ -252,10 +256,11 @@ static int bcm47xxpart_parse(struct mtd_ } /* Read middle of the block */ @@ -74,7 +74,7 @@ Signed-off-by: Rafał Miłecki continue; } -@@ -277,10 +282,11 @@ static int bcm47xxpart_parse(struct mtd_ +@@ -275,10 +280,11 @@ static int bcm47xxpart_parse(struct mtd_ } offset = master->size - possible_nvram_sizes[i]; diff --git a/target/linux/generic/pending-3.18/190-cdc_ncm_add_support_for_moving_ndp_to_end_of_ncm_frame.patch b/target/linux/generic/pending-3.18/190-cdc_ncm_add_support_for_moving_ndp_to_end_of_ncm_frame.patch index 0b03963f0af51d..632384d56f4d96 100644 --- a/target/linux/generic/pending-3.18/190-cdc_ncm_add_support_for_moving_ndp_to_end_of_ncm_frame.patch +++ b/target/linux/generic/pending-3.18/190-cdc_ncm_add_support_for_moving_ndp_to_end_of_ncm_frame.patch @@ -79,21 +79,21 @@ Signed-off-by: David S. Miller /* override ethtool_ops */ dev->net->ethtool_ops = &cdc_ncm_ethtool_ops; -@@ -958,8 +971,11 @@ static int cdc_ncm_bind(struct usbnet *d +@@ -956,8 +969,11 @@ static int cdc_ncm_bind(struct usbnet *d if (cdc_ncm_select_altsetting(intf) != CDC_NCM_COMM_ALTSETTING_NCM) return -ENODEV; - /* The NCM data altsetting is fixed */ -- ret = cdc_ncm_bind_common(dev, intf, CDC_NCM_DATA_ALTSETTING_NCM); +- return cdc_ncm_bind_common(dev, intf, CDC_NCM_DATA_ALTSETTING_NCM); + /* The NCM data altsetting is fixed, so we hard-coded it. + * Additionally, generic NCM devices are assumed to accept arbitrarily + * placed NDP. + */ -+ ret = cdc_ncm_bind_common(dev, intf, CDC_NCM_DATA_ALTSETTING_NCM, 0); ++ return cdc_ncm_bind_common(dev, intf, CDC_NCM_DATA_ALTSETTING_NCM, 0); + } - /* - * We should get an event when network connection is "connected" or -@@ -990,6 +1006,14 @@ static struct usb_cdc_ncm_ndp16 *cdc_ncm + static void cdc_ncm_align_tail(struct sk_buff *skb, size_t modulus, size_t remainder, size_t max) +@@ -979,6 +995,14 @@ static struct usb_cdc_ncm_ndp16 *cdc_ncm struct usb_cdc_ncm_nth16 *nth16 = (void *)skb->data; size_t ndpoffset = le16_to_cpu(nth16->wNdpIndex); @@ -108,7 +108,7 @@ Signed-off-by: David S. Miller /* follow the chain of NDPs, looking for a match */ while (ndpoffset) { ndp16 = (struct usb_cdc_ncm_ndp16 *)(skb->data + ndpoffset); -@@ -999,7 +1023,8 @@ static struct usb_cdc_ncm_ndp16 *cdc_ncm +@@ -988,7 +1012,8 @@ static struct usb_cdc_ncm_ndp16 *cdc_ncm } /* align new NDP */ @@ -118,7 +118,7 @@ Signed-off-by: David S. Miller /* verify that there is room for the NDP and the datagram (reserve) */ if ((ctx->tx_max - skb->len - reserve) < ctx->max_ndp_size) -@@ -1012,7 +1037,11 @@ static struct usb_cdc_ncm_ndp16 *cdc_ncm +@@ -1001,7 +1026,11 @@ static struct usb_cdc_ncm_ndp16 *cdc_ncm nth16->wNdpIndex = cpu_to_le16(skb->len); /* push a new empty NDP */ @@ -131,7 +131,7 @@ Signed-off-by: David S. Miller ndp16->dwSignature = sign; ndp16->wLength = cpu_to_le16(sizeof(struct usb_cdc_ncm_ndp16) + sizeof(struct usb_cdc_ncm_dpe16)); return ndp16; -@@ -1027,6 +1056,15 @@ cdc_ncm_fill_tx_frame(struct usbnet *dev +@@ -1016,6 +1045,15 @@ cdc_ncm_fill_tx_frame(struct usbnet *dev struct sk_buff *skb_out; u16 n = 0, index, ndplen; u8 ready2send = 0; @@ -147,7 +147,7 @@ Signed-off-by: David S. Miller /* if there is a remaining skb, it gets priority */ if (skb != NULL) { -@@ -1081,7 +1119,7 @@ cdc_ncm_fill_tx_frame(struct usbnet *dev +@@ -1070,7 +1108,7 @@ cdc_ncm_fill_tx_frame(struct usbnet *dev cdc_ncm_align_tail(skb_out, ctx->tx_modulus, ctx->tx_remainder, ctx->tx_max); /* check if we had enough room left for both NDP and frame */ @@ -156,7 +156,7 @@ Signed-off-by: David S. Miller if (n == 0) { /* won't fit, MTU problem? */ dev_kfree_skb_any(skb); -@@ -1154,6 +1192,17 @@ cdc_ncm_fill_tx_frame(struct usbnet *dev +@@ -1143,6 +1181,17 @@ cdc_ncm_fill_tx_frame(struct usbnet *dev /* variables will be reset at next call */ } diff --git a/target/linux/generic/pending-3.18/191-usb-ehci-orion-fix-probe-for-GENERIC_PHY.patch b/target/linux/generic/pending-3.18/191-usb-ehci-orion-fix-probe-for-GENERIC_PHY.patch deleted file mode 100644 index 5a3dc06c14bf17..00000000000000 --- a/target/linux/generic/pending-3.18/191-usb-ehci-orion-fix-probe-for-GENERIC_PHY.patch +++ /dev/null @@ -1,35 +0,0 @@ -From a95f03e51471dbdbafd3391991d867ac2358ed02 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 23 Aug 2015 14:23:29 +0200 -Subject: [PATCH] usb: ehci-orion: fix probe for !GENERIC_PHY - -Commit d445913ce0ab7f ("usb: ehci-orion: add optional PHY support") -added support for optional phys, but devm_phy_optional_get returns --ENOSYS if GENERIC_PHY is not enabled. - -This causes probe failures, even when there are no phys specified: - -[ 1.443365] orion-ehci f1058000.usb: init f1058000.usb fail, -38 -[ 1.449403] orion-ehci: probe of f1058000.usb failed with error -38 - -Similar to dwc3, treat -ENOSYS as no phy. - -Fixes: d445913ce0ab7f ("usb: ehci-orion: add optional PHY support") - -Signed-off-by: Jonas Gorski ---- - drivers/usb/host/ehci-orion.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/drivers/usb/host/ehci-orion.c -+++ b/drivers/usb/host/ehci-orion.c -@@ -226,7 +226,8 @@ static int ehci_orion_drv_probe(struct p - priv->phy = devm_phy_optional_get(&pdev->dev, "usb"); - if (IS_ERR(priv->phy)) { - err = PTR_ERR(priv->phy); -- goto err_phy_get; -+ if (err != -ENOSYS) -+ goto err_phy_get; - } else { - err = phy_init(priv->phy); - if (err) diff --git a/target/linux/generic/pending-3.18/192-USB-qcserial-Add-support-for-Quectel-EC20-Mini-PCIe-.patch b/target/linux/generic/pending-3.18/192-USB-qcserial-Add-support-for-Quectel-EC20-Mini-PCIe-.patch index 7c49a6f11114b6..ae018cbab0c9c9 100644 --- a/target/linux/generic/pending-3.18/192-USB-qcserial-Add-support-for-Quectel-EC20-Mini-PCIe-.patch +++ b/target/linux/generic/pending-3.18/192-USB-qcserial-Add-support-for-Quectel-EC20-Mini-PCIe-.patch @@ -61,7 +61,7 @@ Signed-off-by: Petr Štetiar /* standard device layouts supported by this driver */ enum qcserial_layouts { QCSERIAL_G2K = 0, /* Gobi 2000 */ -@@ -171,6 +173,38 @@ static const struct usb_device_id id_tab +@@ -176,6 +178,38 @@ static const struct usb_device_id id_tab }; MODULE_DEVICE_TABLE(usb, id_table); @@ -100,7 +100,7 @@ Signed-off-by: Petr Štetiar static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id) { struct usb_host_interface *intf = serial->interface->cur_altsetting; -@@ -239,6 +273,11 @@ static int qcprobe(struct usb_serial *se +@@ -244,6 +278,11 @@ static int qcprobe(struct usb_serial *se altsetting = -1; break; case QCSERIAL_G2K: diff --git a/target/linux/generic/pending-3.18/193-USB-qmi_wwan-Add-quirk-for-Quectel-EC20-Mini-PCIe-mo.patch b/target/linux/generic/pending-3.18/193-USB-qmi_wwan-Add-quirk-for-Quectel-EC20-Mini-PCIe-mo.patch index 1b1afd5d31d06f..ee0d7b2cccba49 100644 --- a/target/linux/generic/pending-3.18/193-USB-qmi_wwan-Add-quirk-for-Quectel-EC20-Mini-PCIe-mo.patch +++ b/target/linux/generic/pending-3.18/193-USB-qmi_wwan-Add-quirk-for-Quectel-EC20-Mini-PCIe-mo.patch @@ -48,7 +48,7 @@ Signed-off-by: Petr Štetiar --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c -@@ -822,6 +822,7 @@ static const struct usb_device_id produc +@@ -825,6 +825,7 @@ static const struct usb_device_id produc {QMI_GOBI_DEVICE(0x05c6, 0x9245)}, /* Samsung Gobi 2000 Modem device (VL176) */ {QMI_GOBI_DEVICE(0x03f0, 0x251d)}, /* HP Gobi 2000 Modem device (VP412) */ {QMI_GOBI_DEVICE(0x05c6, 0x9215)}, /* Acer Gobi 2000 Modem device (VP413) */ @@ -56,7 +56,7 @@ Signed-off-by: Petr Štetiar {QMI_GOBI_DEVICE(0x05c6, 0x9265)}, /* Asus Gobi 2000 Modem device (VR305) */ {QMI_GOBI_DEVICE(0x05c6, 0x9235)}, /* Top Global Gobi 2000 Modem device (VR306) */ {QMI_GOBI_DEVICE(0x05c6, 0x9275)}, /* iRex Technologies Gobi 2000 Modem device (VR307) */ -@@ -853,10 +854,24 @@ static const struct usb_device_id produc +@@ -856,10 +857,24 @@ static const struct usb_device_id produc }; MODULE_DEVICE_TABLE(usb, products); @@ -81,7 +81,7 @@ Signed-off-by: Petr Štetiar /* Workaround to enable dynamic IDs. This disables usbnet * blacklisting functionality. Which, if required, can be -@@ -868,6 +883,12 @@ static int qmi_wwan_probe(struct usb_int +@@ -871,6 +886,12 @@ static int qmi_wwan_probe(struct usb_int id->driver_info = (unsigned long)&qmi_wwan_info; } diff --git a/target/linux/generic/pending-3.18/201-extra_optimization.patch b/target/linux/generic/pending-3.18/201-extra_optimization.patch index 7ec93a47f44e65..5a2396cfa377a8 100644 --- a/target/linux/generic/pending-3.18/201-extra_optimization.patch +++ b/target/linux/generic/pending-3.18/201-extra_optimization.patch @@ -1,7 +1,7 @@ --- a/Makefile +++ b/Makefile -@@ -612,9 +612,9 @@ include $(srctree)/arch/$(SRCARCH)/Makef - KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,) +@@ -618,9 +618,9 @@ KBUILD_CFLAGS += $(call cc-option,-fno-P + KBUILD_AFLAGS += $(call cc-option,-fno-PIE) ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE -KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,) diff --git a/target/linux/generic/pending-3.18/204-module_strip.patch b/target/linux/generic/pending-3.18/204-module_strip.patch index 844c3b550e2035..2df7ba01347ee7 100644 --- a/target/linux/generic/pending-3.18/204-module_strip.patch +++ b/target/linux/generic/pending-3.18/204-module_strip.patch @@ -28,8 +28,8 @@ Signed-off-by: Felix Fietkau +#if defined(MODULE) && !defined(CONFIG_MODULE_STRIPPED) /* Creates an alias so file2alias.c can find device table. */ #define MODULE_DEVICE_TABLE(type, name) \ - extern const struct type##_device_id __mod_##type##__##name##_device_table \ -@@ -159,7 +160,9 @@ void trim_init_extable(struct module *m) + extern const typeof(name) __mod_##type##__##name##_device_table \ +@@ -159,7 +160,9 @@ extern const typeof(name) __mod_##type## */ #if defined(MODULE) || !defined(CONFIG_SYSFS) @@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau #else #define MODULE_VERSION(_version) \ static struct module_version_attribute ___modver_attr = { \ -@@ -181,7 +184,7 @@ void trim_init_extable(struct module *m) +@@ -181,7 +184,7 @@ extern const typeof(name) __mod_##type## /* Optional firmware file (or files) needed by the module * format is simply firmware file name. Multiple firmware * files require multiple MODULE_FIRMWARE() specifiers */ @@ -123,7 +123,7 @@ Signed-off-by: Felix Fietkau set_license(mod, get_modinfo(info, "license")); --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c -@@ -1726,7 +1726,9 @@ static void read_symbols(char *modname) +@@ -1758,7 +1758,9 @@ static void read_symbols(char *modname) symname = remove_dot(info.strtab + sym->st_name); handle_modversions(mod, &info, sym, symname); @@ -133,7 +133,7 @@ Signed-off-by: Felix Fietkau } if (!is_vmlinux(modname) || (is_vmlinux(modname) && vmlinux_section_warnings)) -@@ -1870,7 +1872,9 @@ static void add_header(struct buffer *b, +@@ -1902,7 +1904,9 @@ static void add_header(struct buffer *b, buf_printf(b, "#include \n"); buf_printf(b, "#include \n"); buf_printf(b, "\n"); @@ -143,7 +143,7 @@ Signed-off-by: Felix Fietkau buf_printf(b, "\n"); buf_printf(b, "__visible struct module __this_module\n"); buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n"); -@@ -1887,16 +1891,20 @@ static void add_header(struct buffer *b, +@@ -1919,16 +1923,20 @@ static void add_header(struct buffer *b, static void add_intree_flag(struct buffer *b, int is_intree) { @@ -164,7 +164,7 @@ Signed-off-by: Felix Fietkau } /** -@@ -1989,11 +1997,13 @@ static void add_depends(struct buffer *b +@@ -2021,11 +2029,13 @@ static void add_depends(struct buffer *b static void add_srcversion(struct buffer *b, struct module *mod) { @@ -178,7 +178,7 @@ Signed-off-by: Felix Fietkau } static void write_if_changed(struct buffer *b, const char *fname) -@@ -2224,7 +2234,9 @@ int main(int argc, char **argv) +@@ -2256,7 +2266,9 @@ int main(int argc, char **argv) add_staging_flag(&buf, mod->name); err |= add_versions(&buf, mod); add_depends(&buf, mod, modules); diff --git a/target/linux/generic/pending-3.18/550-ubifs-symlink-xattr-support.patch b/target/linux/generic/pending-3.18/550-ubifs-symlink-xattr-support.patch index 42ae9cb84af13e..6e08ca302e56af 100644 --- a/target/linux/generic/pending-3.18/550-ubifs-symlink-xattr-support.patch +++ b/target/linux/generic/pending-3.18/550-ubifs-symlink-xattr-support.patch @@ -39,7 +39,7 @@ --- a/fs/ubifs/xattr.c +++ b/fs/ubifs/xattr.c -@@ -209,12 +209,12 @@ static int change_xattr(struct ubifs_inf +@@ -210,12 +210,12 @@ static int change_xattr(struct ubifs_inf goto out_free; } inode->i_size = ui->ui_size = size; diff --git a/target/linux/generic/pending-3.18/630-packet_socket_type.patch b/target/linux/generic/pending-3.18/630-packet_socket_type.patch index 61ddea84c6893a..ec7383e114a82a 100644 --- a/target/linux/generic/pending-3.18/630-packet_socket_type.patch +++ b/target/linux/generic/pending-3.18/630-packet_socket_type.patch @@ -26,7 +26,7 @@ Signed-off-by: Felix Fietkau #define PACKET_FANOUT_LB 1 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c -@@ -1530,6 +1530,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1529,6 +1529,7 @@ static int packet_rcv_spkt(struct sk_buf { struct sock *sk; struct sockaddr_pkt *spkt; @@ -34,7 +34,7 @@ Signed-off-by: Felix Fietkau /* * When we registered the protocol we saved the socket in the data -@@ -1537,6 +1538,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1536,6 +1537,7 @@ static int packet_rcv_spkt(struct sk_buf */ sk = pt->af_packet_priv; @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau /* * Yank back the headers [hope the device set this -@@ -1549,7 +1551,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1548,7 +1550,7 @@ static int packet_rcv_spkt(struct sk_buf * so that this procedure is noop. */ @@ -51,7 +51,7 @@ Signed-off-by: Felix Fietkau goto out; if (!net_eq(dev_net(dev), sock_net(sk))) -@@ -1748,12 +1750,12 @@ static int packet_rcv(struct sk_buff *sk +@@ -1747,12 +1749,12 @@ static int packet_rcv(struct sk_buff *sk int skb_len = skb->len; unsigned int snaplen, res; @@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -1873,12 +1875,12 @@ static int tpacket_rcv(struct sk_buff *s +@@ -1872,12 +1874,12 @@ static int tpacket_rcv(struct sk_buff *s BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32); BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48); @@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -2828,6 +2830,7 @@ static int packet_create(struct net *net +@@ -2831,6 +2833,7 @@ static int packet_create(struct net *net spin_lock_init(&po->bind_lock); mutex_init(&po->pg_vec_lock); po->prot_hook.func = packet_rcv; @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3409,6 +3412,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3425,6 +3428,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -108,7 +108,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -3460,6 +3473,13 @@ static int packet_getsockopt(struct sock +@@ -3476,6 +3489,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; diff --git a/target/linux/generic/pending-3.18/653-disable_netlink_trim.patch b/target/linux/generic/pending-3.18/653-disable_netlink_trim.patch index b38b87b48f8a89..fe62110f0659b2 100644 --- a/target/linux/generic/pending-3.18/653-disable_netlink_trim.patch +++ b/target/linux/generic/pending-3.18/653-disable_netlink_trim.patch @@ -1,15 +1,12 @@ --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c -@@ -1721,27 +1721,7 @@ void netlink_detachskb(struct sock *sk, +@@ -1107,23 +1107,7 @@ void netlink_detachskb(struct sock *sk, static struct sk_buff *netlink_trim(struct sk_buff *skb, gfp_t allocation) { - int delta; - WARN_ON(skb->sk != NULL); -- if (netlink_skb_is_mmaped(skb)) -- return skb; -- - delta = skb->end - skb->tail; - if (is_vmalloc_addr(skb->head) || delta * 2 < skb->truesize) - return skb; @@ -24,7 +21,6 @@ - - if (!pskb_expand_head(skb, 0, -delta, allocation)) - skb->truesize -= delta; -- + return skb; } - diff --git a/target/linux/generic/pending-3.18/655-increase_skb_pad.patch b/target/linux/generic/pending-3.18/655-increase_skb_pad.patch index 19344cca3f2396..96f81e9aa78b8c 100644 --- a/target/linux/generic/pending-3.18/655-increase_skb_pad.patch +++ b/target/linux/generic/pending-3.18/655-increase_skb_pad.patch @@ -1,6 +1,6 @@ --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2023,7 +2023,7 @@ static inline int pskb_network_may_pull( +@@ -2024,7 +2024,7 @@ static inline int pskb_network_may_pull( * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) */ #ifndef NET_SKB_PAD diff --git a/target/linux/generic/pending-3.18/656-skb_reduce_truesize-helper.patch b/target/linux/generic/pending-3.18/656-skb_reduce_truesize-helper.patch index b326a8b727894b..0fde9f6e629007 100644 --- a/target/linux/generic/pending-3.18/656-skb_reduce_truesize-helper.patch +++ b/target/linux/generic/pending-3.18/656-skb_reduce_truesize-helper.patch @@ -14,7 +14,7 @@ when needed. --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2068,6 +2068,24 @@ static inline void pskb_trim_unique(stru +@@ -2069,6 +2069,24 @@ static inline void pskb_trim_unique(stru BUG_ON(err); } diff --git a/target/linux/generic/pending-3.18/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/pending-3.18/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch index 000665f047655e..43bdbe456d9ddb 100644 --- a/target/linux/generic/pending-3.18/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch +++ b/target/linux/generic/pending-3.18/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch @@ -145,7 +145,7 @@ Signed-off-by: Steven Barth if (dev == ip6n->fb_tnl_dev) RCU_INIT_POINTER(ip6n->tnls_wc[0], NULL); else -@@ -771,6 +786,108 @@ int ip6_tnl_rcv_ctl(struct ip6_tnl *t, +@@ -781,6 +796,108 @@ int ip6_tnl_rcv_ctl(struct ip6_tnl *t, } EXPORT_SYMBOL_GPL(ip6_tnl_rcv_ctl); @@ -254,7 +254,7 @@ Signed-off-by: Steven Barth /** * ip6_tnl_rcv - decapsulate IPv6 packet and retransmit it locally * @skb: received socket buffer -@@ -815,6 +932,26 @@ static int ip6_tnl_rcv(struct sk_buff *s +@@ -825,6 +942,26 @@ static int ip6_tnl_rcv(struct sk_buff *s skb_reset_network_header(skb); skb->protocol = htons(protocol); memset(skb->cb, 0, sizeof(struct inet6_skb_parm)); @@ -281,7 +281,7 @@ Signed-off-by: Steven Barth __skb_tunnel_rx(skb, t->dev, t->net); -@@ -1076,6 +1213,7 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, str +@@ -1086,6 +1223,7 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, str __u8 dsfield; __u32 mtu; int err; @@ -289,7 +289,7 @@ Signed-off-by: Steven Barth if ((t->parms.proto != IPPROTO_IPIP && t->parms.proto != 0) || !ip6_tnl_xmit_ctl(t)) -@@ -1095,6 +1233,18 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, str +@@ -1105,6 +1243,18 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, str if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK) fl6.flowi6_mark = skb->mark; @@ -308,7 +308,7 @@ Signed-off-by: Steven Barth err = ip6_tnl_xmit2(skb, dev, dsfield, &fl6, encap_limit, &mtu); if (err != 0) { /* XXX: send ICMP error even if DF is not set. */ -@@ -1263,6 +1413,14 @@ ip6_tnl_change(struct ip6_tnl *t, const +@@ -1273,6 +1423,14 @@ ip6_tnl_change(struct ip6_tnl *t, const t->parms.flowinfo = p->flowinfo; t->parms.link = p->link; t->parms.proto = p->proto; @@ -323,7 +323,7 @@ Signed-off-by: Steven Barth ip6_tnl_dst_reset(t); ip6_tnl_link_config(t); return 0; -@@ -1293,6 +1451,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ +@@ -1303,6 +1461,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_ p->flowinfo = u->flowinfo; p->link = u->link; p->proto = u->proto; @@ -331,7 +331,7 @@ Signed-off-by: Steven Barth memcpy(p->name, u->name, sizeof(u->name)); } -@@ -1568,6 +1727,15 @@ static int ip6_tnl_validate(struct nlatt +@@ -1578,6 +1737,15 @@ static int ip6_tnl_validate(struct nlatt return 0; } @@ -347,7 +347,7 @@ Signed-off-by: Steven Barth static void ip6_tnl_netlink_parms(struct nlattr *data[], struct __ip6_tnl_parm *parms) { -@@ -1601,6 +1769,46 @@ static void ip6_tnl_netlink_parms(struct +@@ -1611,6 +1779,46 @@ static void ip6_tnl_netlink_parms(struct if (data[IFLA_IPTUN_PROTO]) parms->proto = nla_get_u8(data[IFLA_IPTUN_PROTO]); @@ -394,7 +394,7 @@ Signed-off-by: Steven Barth } static int ip6_tnl_newlink(struct net *src_net, struct net_device *dev, -@@ -1653,6 +1861,12 @@ static void ip6_tnl_dellink(struct net_d +@@ -1663,6 +1871,12 @@ static void ip6_tnl_dellink(struct net_d static size_t ip6_tnl_get_size(const struct net_device *dev) { @@ -407,7 +407,7 @@ Signed-off-by: Steven Barth return /* IFLA_IPTUN_LINK */ nla_total_size(4) + -@@ -1670,6 +1884,24 @@ static size_t ip6_tnl_get_size(const str +@@ -1680,6 +1894,24 @@ static size_t ip6_tnl_get_size(const str nla_total_size(4) + /* IFLA_IPTUN_PROTO */ nla_total_size(1) + @@ -432,7 +432,7 @@ Signed-off-by: Steven Barth 0; } -@@ -1677,6 +1909,9 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -1687,6 +1919,9 @@ static int ip6_tnl_fill_info(struct sk_b { struct ip6_tnl *tunnel = netdev_priv(dev); struct __ip6_tnl_parm *parm = &tunnel->parms; @@ -442,7 +442,7 @@ Signed-off-by: Steven Barth if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) || nla_put(skb, IFLA_IPTUN_LOCAL, sizeof(struct in6_addr), -@@ -1687,8 +1922,27 @@ static int ip6_tnl_fill_info(struct sk_b +@@ -1697,8 +1932,27 @@ static int ip6_tnl_fill_info(struct sk_b nla_put_u8(skb, IFLA_IPTUN_ENCAP_LIMIT, parm->encap_limit) || nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) || nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) || @@ -471,7 +471,7 @@ Signed-off-by: Steven Barth return 0; nla_put_failure: -@@ -1704,6 +1958,7 @@ static const struct nla_policy ip6_tnl_p +@@ -1714,6 +1968,7 @@ static const struct nla_policy ip6_tnl_p [IFLA_IPTUN_FLOWINFO] = { .type = NLA_U32 }, [IFLA_IPTUN_FLAGS] = { .type = NLA_U32 }, [IFLA_IPTUN_PROTO] = { .type = NLA_U8 }, diff --git a/target/linux/generic/pending-3.18/667-ipv6-Fixed-source-specific-default-route-handling.patch b/target/linux/generic/pending-3.18/667-ipv6-Fixed-source-specific-default-route-handling.patch index 0c951069c24e82..de8745cdc39d36 100644 --- a/target/linux/generic/pending-3.18/667-ipv6-Fixed-source-specific-default-route-handling.patch +++ b/target/linux/generic/pending-3.18/667-ipv6-Fixed-source-specific-default-route-handling.patch @@ -26,7 +26,7 @@ Signed-off-by: David S. Miller --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c -@@ -903,21 +903,45 @@ static int ip6_dst_lookup_tail(struct so +@@ -906,21 +906,45 @@ static int ip6_dst_lookup_tail(struct so #endif int err; @@ -81,7 +81,7 @@ Signed-off-by: David S. Miller * Here if the dst entry we've looked up --- a/net/ipv6/route.c +++ b/net/ipv6/route.c -@@ -2182,9 +2182,10 @@ int ip6_route_get_saddr(struct net *net, +@@ -2184,9 +2184,10 @@ int ip6_route_get_saddr(struct net *net, unsigned int prefs, struct in6_addr *saddr) { diff --git a/target/linux/generic/pending-3.18/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-3.18/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index 1bf9dc99dcbff9..f999d44df0b4eb 100644 --- a/target/linux/generic/pending-3.18/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-3.18/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -155,7 +155,7 @@ Signed-off-by: Jonas Gorski case RTN_THROW: default: rt->dst.error = (cfg->fc_type == RTN_THROW) ? -EAGAIN -@@ -2139,6 +2161,17 @@ static int ip6_pkt_prohibit_out(struct s +@@ -2141,6 +2163,17 @@ static int ip6_pkt_prohibit_out(struct s return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); } @@ -173,7 +173,7 @@ Signed-off-by: Jonas Gorski /* * Allocate a dst for local (unicast / anycast) address. */ -@@ -2363,7 +2396,8 @@ static int rtm_to_fib6_config(struct sk_ +@@ -2365,7 +2398,8 @@ static int rtm_to_fib6_config(struct sk_ if (rtm->rtm_type == RTN_UNREACHABLE || rtm->rtm_type == RTN_BLACKHOLE || rtm->rtm_type == RTN_PROHIBIT || @@ -183,7 +183,7 @@ Signed-off-by: Jonas Gorski cfg->fc_flags |= RTF_REJECT; if (rtm->rtm_type == RTN_LOCAL) -@@ -2565,6 +2599,9 @@ static int rt6_fill_node(struct net *net +@@ -2567,6 +2601,9 @@ static int rt6_fill_node(struct net *net case -EACCES: rtm->rtm_type = RTN_PROHIBIT; break; @@ -193,7 +193,7 @@ Signed-off-by: Jonas Gorski case -EAGAIN: rtm->rtm_type = RTN_THROW; break; -@@ -2818,6 +2855,8 @@ static int ip6_route_dev_notify(struct n +@@ -2825,6 +2862,8 @@ static int ip6_route_dev_notify(struct n #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.ip6_prohibit_entry->dst.dev = dev; net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); @@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); #endif -@@ -3034,6 +3073,17 @@ static int __net_init ip6_route_net_init +@@ -3047,6 +3086,17 @@ static int __net_init ip6_route_net_init net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, ip6_template_metrics, true); @@ -220,7 +220,7 @@ Signed-off-by: Jonas Gorski #endif net->ipv6.sysctl.flush_delay = 0; -@@ -3052,6 +3102,8 @@ out: +@@ -3065,6 +3115,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -229,7 +229,7 @@ Signed-off-by: Jonas Gorski out_ip6_prohibit_entry: kfree(net->ipv6.ip6_prohibit_entry); out_ip6_null_entry: -@@ -3069,6 +3121,7 @@ static void __net_exit ip6_route_net_exi +@@ -3082,6 +3134,7 @@ static void __net_exit ip6_route_net_exi #ifdef CONFIG_IPV6_MULTIPLE_TABLES kfree(net->ipv6.ip6_prohibit_entry); kfree(net->ipv6.ip6_blk_hole_entry); @@ -237,7 +237,7 @@ Signed-off-by: Jonas Gorski #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); } -@@ -3165,6 +3218,9 @@ int __init ip6_route_init(void) +@@ -3155,6 +3208,9 @@ void __init ip6_route_init_special_entri init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); @@ -245,5 +245,5 @@ Signed-off-by: Jonas Gorski + init_net.ipv6.ip6_policy_failed_entry->rt6i_idev = + in6_dev_get(init_net.loopback_dev); #endif - ret = fib6_init(); - if (ret) + } + diff --git a/target/linux/generic/pending-3.18/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-3.18/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index 714097bca066f4..da4b58883a70bf 100644 --- a/target/linux/generic/pending-3.18/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-3.18/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4002,6 +4002,9 @@ static enum gro_result dev_gro_receive(s +@@ -4006,6 +4006,9 @@ static enum gro_result dev_gro_receive(s enum gro_result ret; int grow; @@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau if (!(skb->dev->features & NETIF_F_GRO)) goto normal; -@@ -5067,6 +5070,48 @@ static void __netdev_adjacent_dev_unlink +@@ -5077,6 +5080,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *private) -@@ -5127,6 +5172,7 @@ static int __netdev_upper_dev_link(struc +@@ -5137,6 +5182,7 @@ static int __netdev_upper_dev_link(struc goto rollback_lower_mesh; } @@ -84,15 +84,15 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers(NETDEV_CHANGEUPPER, dev); return 0; -@@ -5244,6 +5290,7 @@ void netdev_upper_dev_unlink(struct net_ +@@ -5254,6 +5300,7 @@ void netdev_upper_dev_unlink(struct net_ list_for_each_entry(i, &upper_dev->all_adj_list.upper, list) - __netdev_adjacent_dev_unlink(dev, i->dev); + __netdev_adjacent_dev_unlink(dev, i->dev, i->ref_nr); + netdev_update_addr_mask(dev); call_netdevice_notifiers(NETDEV_CHANGEUPPER, dev); } EXPORT_SYMBOL(netdev_upper_dev_unlink); -@@ -5763,6 +5810,7 @@ int dev_set_mac_address(struct net_devic +@@ -5773,6 +5820,7 @@ int dev_set_mac_address(struct net_devic if (err) return err; dev->addr_assign_type = NET_ADDR_SET; @@ -113,7 +113,7 @@ Signed-off-by: Felix Fietkau #endif --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -597,7 +597,8 @@ struct sk_buff { +@@ -598,7 +598,8 @@ struct sk_buff { #endif __u8 ipvs_property:1; __u8 inner_protocol_type:1; diff --git a/target/linux/generic/pending-3.18/701-phy_extension.patch b/target/linux/generic/pending-3.18/701-phy_extension.patch index 5c63dbec62ae69..fa4542b88bcabd 100644 --- a/target/linux/generic/pending-3.18/701-phy_extension.patch +++ b/target/linux/generic/pending-3.18/701-phy_extension.patch @@ -53,7 +53,7 @@ * @phydev: the phy_device struct --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -748,6 +748,7 @@ void phy_start_machine(struct phy_device +@@ -752,6 +752,7 @@ void phy_start_machine(struct phy_device void phy_stop_machine(struct phy_device *phydev); int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd); int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd); diff --git a/target/linux/generic/pending-3.18/704-phy-no-genphy-soft-reset.patch b/target/linux/generic/pending-3.18/704-phy-no-genphy-soft-reset.patch deleted file mode 100644 index 0350f9efe4fbc2..00000000000000 --- a/target/linux/generic/pending-3.18/704-phy-no-genphy-soft-reset.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/drivers/net/phy/phy_device.c -+++ b/drivers/net/phy/phy_device.c -@@ -1133,7 +1133,7 @@ int genphy_config_init(struct phy_device - return 0; - } - --static int gen10g_soft_reset(struct phy_device *phydev) -+static int no_soft_reset(struct phy_device *phydev) - { - /* Do nothing for now */ - return 0; -@@ -1347,7 +1347,7 @@ static struct phy_driver genphy_driver[] - .phy_id = 0xffffffff, - .phy_id_mask = 0xffffffff, - .name = "Generic PHY", -- .soft_reset = genphy_soft_reset, -+ .soft_reset = no_soft_reset, - .config_init = genphy_config_init, - .features = PHY_GBIT_FEATURES | SUPPORTED_MII | - SUPPORTED_AUI | SUPPORTED_FIBRE | -@@ -1362,7 +1362,7 @@ static struct phy_driver genphy_driver[] - .phy_id = 0xffffffff, - .phy_id_mask = 0xffffffff, - .name = "Generic 10G PHY", -- .soft_reset = gen10g_soft_reset, -+ .soft_reset = no_soft_reset, - .config_init = gen10g_config_init, - .features = 0, - .config_aneg = gen10g_config_aneg, diff --git a/target/linux/generic/pending-3.18/710-phy-add-mdio_register_board_info.patch b/target/linux/generic/pending-3.18/710-phy-add-mdio_register_board_info.patch index cc3cb2445de683..424c63e31172b8 100644 --- a/target/linux/generic/pending-3.18/710-phy-add-mdio_register_board_info.patch +++ b/target/linux/generic/pending-3.18/710-phy-add-mdio_register_board_info.patch @@ -46,7 +46,7 @@ phy_device_free(phydev); --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -785,4 +785,22 @@ int __init mdio_bus_init(void); +@@ -789,4 +789,22 @@ int __init mdio_bus_init(void); void mdio_bus_exit(void); extern struct bus_type mdio_bus_type; diff --git a/target/linux/generic/pending-3.18/721-phy_packets.patch b/target/linux/generic/pending-3.18/721-phy_packets.patch index 99811c62428e3a..7235ab355f25c6 100644 --- a/target/linux/generic/pending-3.18/721-phy_packets.patch +++ b/target/linux/generic/pending-3.18/721-phy_packets.patch @@ -41,7 +41,7 @@ */ --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2054,6 +2054,10 @@ static inline int pskb_trim(struct sk_bu +@@ -2055,6 +2055,10 @@ static inline int pskb_trim(struct sk_bu return (len < skb->len) ? __pskb_trim(skb, len) : 0; } @@ -52,7 +52,7 @@ /** * pskb_trim_unique - remove end from a paged unique (not cloned) buffer * @skb: buffer to alter -@@ -2180,16 +2184,6 @@ static inline struct sk_buff *dev_alloc_ +@@ -2181,16 +2185,6 @@ static inline struct sk_buff *dev_alloc_ } @@ -86,7 +86,7 @@ help --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -2623,10 +2623,20 @@ static int xmit_one(struct sk_buff *skb, +@@ -2626,10 +2626,20 @@ static int xmit_one(struct sk_buff *skb, if (!list_empty(&ptype_all)) dev_queue_xmit_nit(skb, dev); @@ -121,7 +121,7 @@ #include #include -@@ -469,6 +470,22 @@ struct sk_buff *__netdev_alloc_skb(struc +@@ -471,6 +472,22 @@ struct sk_buff *__netdev_alloc_skb(struc } EXPORT_SYMBOL(__netdev_alloc_skb); diff --git a/target/linux/generic/pending-3.18/773-bgmac-add-srab-switch.patch b/target/linux/generic/pending-3.18/773-bgmac-add-srab-switch.patch index 52fc252447c90b..a93877b69ea2ab 100644 --- a/target/linux/generic/pending-3.18/773-bgmac-add-srab-switch.patch +++ b/target/linux/generic/pending-3.18/773-bgmac-add-srab-switch.patch @@ -30,7 +30,7 @@ Signed-off-by: Hauke Mehrtens /************************************************** * BCMA bus ops **************************************************/ -@@ -1666,6 +1678,16 @@ static int bgmac_probe(struct bcma_devic +@@ -1671,6 +1683,16 @@ static int bgmac_probe(struct bcma_devic net_dev->hw_features = net_dev->features; net_dev->vlan_features = net_dev->features; @@ -47,7 +47,7 @@ Signed-off-by: Hauke Mehrtens err = register_netdev(bgmac->net_dev); if (err) { bgmac_err(bgmac, "Cannot register net device\n"); -@@ -1692,6 +1714,10 @@ static void bgmac_remove(struct bcma_dev +@@ -1697,6 +1719,10 @@ static void bgmac_remove(struct bcma_dev { struct bgmac *bgmac = bcma_get_drvdata(core); diff --git a/target/linux/generic/pending-3.18/811-pci_disable_usb_common_quirks.patch b/target/linux/generic/pending-3.18/811-pci_disable_usb_common_quirks.patch index a7bf0bb9faad9c..ddc85496340712 100644 --- a/target/linux/generic/pending-3.18/811-pci_disable_usb_common_quirks.patch +++ b/target/linux/generic/pending-3.18/811-pci_disable_usb_common_quirks.patch @@ -1,7 +1,7 @@ --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c -@@ -97,6 +97,8 @@ struct amd_chipset_type { +@@ -98,6 +98,8 @@ struct amd_chipset_type { u8 rev; }; @@ -10,7 +10,7 @@ static struct amd_chipset_info { struct pci_dev *nb_dev; struct pci_dev *smbus_dev; -@@ -454,6 +456,10 @@ void usb_amd_dev_put(void) +@@ -462,6 +464,10 @@ void usb_amd_dev_put(void) } EXPORT_SYMBOL_GPL(usb_amd_dev_put); @@ -21,7 +21,7 @@ /* * Make sure the controller is completely inactive, unable to * generate interrupts or do DMA. -@@ -533,8 +539,17 @@ reset_needed: +@@ -541,8 +547,17 @@ reset_needed: uhci_reset_hc(pdev, base); return 1; } @@ -39,7 +39,7 @@ static inline int io_type_enabled(struct pci_dev *pdev, unsigned int mask) { u16 cmd; -@@ -1095,3 +1110,4 @@ static void quirk_usb_early_handoff(stru +@@ -1103,3 +1118,4 @@ static void quirk_usb_early_handoff(stru } DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_SERIAL_USB, 8, quirk_usb_early_handoff); diff --git a/target/linux/generic/pending-3.18/901-debloat_sock_diag.patch b/target/linux/generic/pending-3.18/901-debloat_sock_diag.patch index 99f23a027e286d..41c9220a608bf4 100644 --- a/target/linux/generic/pending-3.18/901-debloat_sock_diag.patch +++ b/target/linux/generic/pending-3.18/901-debloat_sock_diag.patch @@ -45,7 +45,7 @@ Support for UNIX socket monitoring interface used by the ss tool. --- a/net/netlink/Kconfig +++ b/net/netlink/Kconfig -@@ -13,6 +13,7 @@ config NETLINK_MMAP +@@ -4,6 +4,7 @@ config NETLINK_DIAG tristate "NETLINK: socket monitoring interface" diff --git a/target/linux/generic/pending-3.18/902-debloat_proc.patch b/target/linux/generic/pending-3.18/902-debloat_proc.patch index 79cecf90d4693d..596a84f8dde4bf 100644 --- a/target/linux/generic/pending-3.18/902-debloat_proc.patch +++ b/target/linux/generic/pending-3.18/902-debloat_proc.patch @@ -173,7 +173,7 @@ goto err; --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -2933,6 +2933,8 @@ static __net_initdata struct pernet_oper +@@ -2939,6 +2939,8 @@ static __net_initdata struct pernet_oper static int __init proto_init(void) { diff --git a/target/linux/generic/pending-3.18/997-device_tree_cmdline.patch b/target/linux/generic/pending-3.18/997-device_tree_cmdline.patch index dd725b01b1230b..61fe71b784bce2 100644 --- a/target/linux/generic/pending-3.18/997-device_tree_cmdline.patch +++ b/target/linux/generic/pending-3.18/997-device_tree_cmdline.patch @@ -1,6 +1,6 @@ --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c -@@ -903,6 +903,9 @@ int __init early_init_dt_scan_chosen(uns +@@ -909,6 +909,9 @@ int __init early_init_dt_scan_chosen(uns p = of_get_flat_dt_prop(node, "bootargs", &l); if (p != NULL && l > 0) strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); diff --git a/target/linux/generic/pending-4.14/201-extra_optimization.patch b/target/linux/generic/pending-4.14/201-extra_optimization.patch index 71883755cfdf28..81f7e2664ea8df 100644 --- a/target/linux/generic/pending-4.14/201-extra_optimization.patch +++ b/target/linux/generic/pending-4.14/201-extra_optimization.patch @@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau --- a/Makefile +++ b/Makefile -@@ -637,12 +637,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni +@@ -638,12 +638,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE KBUILD_CFLAGS += $(call cc-option,-Oz,-Os) diff --git a/target/linux/generic/pending-4.14/630-packet_socket_type.patch b/target/linux/generic/pending-4.14/630-packet_socket_type.patch index 7a0f924b8b3698..ed48128c9e4d6a 100644 --- a/target/linux/generic/pending-4.14/630-packet_socket_type.patch +++ b/target/linux/generic/pending-4.14/630-packet_socket_type.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau #define PACKET_FANOUT_LB 1 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c -@@ -1829,6 +1829,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1822,6 +1822,7 @@ static int packet_rcv_spkt(struct sk_buf { struct sock *sk; struct sockaddr_pkt *spkt; @@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau /* * When we registered the protocol we saved the socket in the data -@@ -1836,6 +1837,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1829,6 +1830,7 @@ static int packet_rcv_spkt(struct sk_buf */ sk = pt->af_packet_priv; @@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau /* * Yank back the headers [hope the device set this -@@ -1848,7 +1850,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1841,7 +1843,7 @@ static int packet_rcv_spkt(struct sk_buf * so that this procedure is noop. */ @@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau goto out; if (!net_eq(dev_net(dev), sock_net(sk))) -@@ -2075,12 +2077,12 @@ static int packet_rcv(struct sk_buff *sk +@@ -2068,12 +2070,12 @@ static int packet_rcv(struct sk_buff *sk unsigned int snaplen, res; bool is_drop_n_account = false; @@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -2206,12 +2208,12 @@ static int tpacket_rcv(struct sk_buff *s +@@ -2199,12 +2201,12 @@ static int tpacket_rcv(struct sk_buff *s BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32); BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48); @@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -3252,6 +3254,7 @@ static int packet_create(struct net *net +@@ -3251,6 +3253,7 @@ static int packet_create(struct net *net mutex_init(&po->pg_vec_lock); po->rollover = NULL; po->prot_hook.func = packet_rcv; @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3838,6 +3841,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3837,6 +3840,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -3891,6 +3904,13 @@ static int packet_getsockopt(struct sock +@@ -3889,6 +3902,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; @@ -128,7 +128,7 @@ Signed-off-by: Felix Fietkau break; --- a/net/packet/internal.h +++ b/net/packet/internal.h -@@ -132,6 +132,7 @@ struct packet_sock { +@@ -131,6 +131,7 @@ struct packet_sock { struct net_device __rcu *cached_dev; int (*xmit)(struct sk_buff *skb); struct packet_type prot_hook ____cacheline_aligned_in_smp; diff --git a/target/linux/generic/pending-4.14/655-increase_skb_pad.patch b/target/linux/generic/pending-4.14/655-increase_skb_pad.patch index 4bc8a5e1caea4f..515c69f8101887 100644 --- a/target/linux/generic/pending-4.14/655-increase_skb_pad.patch +++ b/target/linux/generic/pending-4.14/655-increase_skb_pad.patch @@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -2456,7 +2456,7 @@ static inline int pskb_network_may_pull( +@@ -2458,7 +2458,7 @@ static inline int pskb_network_may_pull( * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) */ #ifndef NET_SKB_PAD diff --git a/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index 82b9ba5354e271..9a088c461a1b6d 100644 --- a/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -191,7 +191,7 @@ Signed-off-by: Jonas Gorski case -EAGAIN: rtm->rtm_type = RTN_THROW; break; -@@ -3801,6 +3838,8 @@ static int ip6_route_dev_notify(struct n +@@ -3804,6 +3841,8 @@ static int ip6_route_dev_notify(struct n #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.ip6_prohibit_entry->dst.dev = dev; net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); @@ -200,7 +200,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); #endif -@@ -4028,6 +4067,17 @@ static int __net_init ip6_route_net_init +@@ -4031,6 +4070,17 @@ static int __net_init ip6_route_net_init net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, ip6_template_metrics, true); @@ -218,7 +218,7 @@ Signed-off-by: Jonas Gorski #endif net->ipv6.sysctl.flush_delay = 0; -@@ -4046,6 +4096,8 @@ out: +@@ -4049,6 +4099,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -227,7 +227,7 @@ Signed-off-by: Jonas Gorski out_ip6_prohibit_entry: kfree(net->ipv6.ip6_prohibit_entry); out_ip6_null_entry: -@@ -4063,6 +4115,7 @@ static void __net_exit ip6_route_net_exi +@@ -4066,6 +4118,7 @@ static void __net_exit ip6_route_net_exi #ifdef CONFIG_IPV6_MULTIPLE_TABLES kfree(net->ipv6.ip6_prohibit_entry); kfree(net->ipv6.ip6_blk_hole_entry); @@ -235,7 +235,7 @@ Signed-off-by: Jonas Gorski #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); } -@@ -4136,6 +4189,9 @@ void __init ip6_route_init_special_entri +@@ -4139,6 +4192,9 @@ void __init ip6_route_init_special_entri init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); diff --git a/target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index 4467975b9202be..e7fb83cee2886d 100644 --- a/target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau #endif --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h -@@ -778,6 +778,7 @@ struct sk_buff { +@@ -780,6 +780,7 @@ struct sk_buff { __u8 tc_redirected:1; __u8 tc_from_ingress:1; #endif @@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau __u16 tc_index; /* traffic control index */ --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4756,6 +4756,9 @@ static enum gro_result dev_gro_receive(s +@@ -4757,6 +4757,9 @@ static enum gro_result dev_gro_receive(s enum gro_result ret; int grow; @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau if (netif_elide_gro(skb->dev)) goto normal; -@@ -6226,6 +6229,48 @@ static void __netdev_adjacent_dev_unlink +@@ -6227,6 +6230,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *upper_priv, void *upper_info) -@@ -6341,6 +6386,8 @@ void netdev_upper_dev_unlink(struct net_ +@@ -6342,6 +6387,8 @@ void netdev_upper_dev_unlink(struct net_ __netdev_adjacent_dev_unlink_neighbour(dev, upper_dev); @@ -100,7 +100,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev, &changeupper_info.info); } -@@ -6911,6 +6958,7 @@ int dev_set_mac_address(struct net_devic +@@ -6912,6 +6959,7 @@ int dev_set_mac_address(struct net_devic if (err) return err; dev->addr_assign_type = NET_ADDR_SET; diff --git a/target/linux/generic/pending-4.14/920-mangle_bootargs.patch b/target/linux/generic/pending-4.14/920-mangle_bootargs.patch index be89441d30684a..ec5ec6b521d284 100644 --- a/target/linux/generic/pending-4.14/920-mangle_bootargs.patch +++ b/target/linux/generic/pending-4.14/920-mangle_bootargs.patch @@ -31,7 +31,7 @@ Signed-off-by: Imre Kaloz help --- a/init/main.c +++ b/init/main.c -@@ -359,6 +359,29 @@ static inline void setup_nr_cpu_ids(void +@@ -360,6 +360,29 @@ static inline void setup_nr_cpu_ids(void static inline void smp_prepare_cpus(unsigned int maxcpus) { } #endif @@ -61,7 +61,7 @@ Signed-off-by: Imre Kaloz /* * We need to store the untouched command line for future reference. * We also need to store the touched command line since the parameter -@@ -536,6 +559,7 @@ asmlinkage __visible void __init start_k +@@ -541,6 +564,7 @@ asmlinkage __visible void __init start_k add_device_randomness(command_line, strlen(command_line)); boot_init_stack_canary(); mm_init_cpumask(&init_mm); diff --git a/target/linux/generic/pending-4.4/001-mtdsplit_backport.patch b/target/linux/generic/pending-4.4/001-mtdsplit_backport.patch index 97cd62d75cd867..f0839b6b90a9e4 100644 --- a/target/linux/generic/pending-4.4/001-mtdsplit_backport.patch +++ b/target/linux/generic/pending-4.4/001-mtdsplit_backport.patch @@ -140,3 +140,14 @@ { struct wrgg03_header hdr; size_t hdr_len, retlen, kernel_ent_size; +--- a/drivers/mtd/mtdsplit/mtdsplit_minor.c ++++ b/drivers/mtd/mtdsplit/mtdsplit_minor.c +@@ -49,7 +49,7 @@ struct minor_header { + }; + + static int mtdsplit_parse_minor(struct mtd_info *master, +- const struct mtd_partition **pparts, ++ struct mtd_partition **pparts, + struct mtd_part_parser_data *data) + { + struct minor_header hdr; diff --git a/target/linux/generic/pending-4.4/704-phy-no-genphy-soft-reset.patch b/target/linux/generic/pending-4.4/704-phy-no-genphy-soft-reset.patch deleted file mode 100644 index 7cec6d32267104..00000000000000 --- a/target/linux/generic/pending-4.4/704-phy-no-genphy-soft-reset.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/drivers/net/phy/phy_device.c -+++ b/drivers/net/phy/phy_device.c -@@ -1465,7 +1465,7 @@ static struct phy_driver genphy_driver[] - .phy_id = 0xffffffff, - .phy_id_mask = 0xffffffff, - .name = "Generic 10G PHY", -- .soft_reset = gen10g_soft_reset, -+ .soft_reset = genphy_no_soft_reset, - .config_init = gen10g_config_init, - .features = 0, - .config_aneg = gen10g_config_aneg, diff --git a/target/linux/generic/pending-4.9/340-MIPS-mm-remove-mips_dma_mapping_error.patch b/target/linux/generic/pending-4.9/340-MIPS-mm-remove-mips_dma_mapping_error.patch new file mode 100644 index 00000000000000..4091542581a89e --- /dev/null +++ b/target/linux/generic/pending-4.9/340-MIPS-mm-remove-mips_dma_mapping_error.patch @@ -0,0 +1,32 @@ +From: Felix Fietkau +Date: Tue, 5 Dec 2017 12:34:31 +0100 +Subject: [PATCH] MIPS: mm: remove mips_dma_mapping_error + +dma_mapping_error() already checks if ops->mapping_error is a null +pointer + +Signed-off-by: Felix Fietkau +--- + +--- a/arch/mips/mm/dma-default.c ++++ b/arch/mips/mm/dma-default.c +@@ -394,11 +394,6 @@ static void mips_dma_sync_sg_for_device( + } + } + +-int mips_dma_mapping_error(struct device *dev, dma_addr_t dma_addr) +-{ +- return 0; +-} +- + int mips_dma_supported(struct device *dev, u64 mask) + { + return plat_dma_supported(dev, mask); +@@ -427,7 +422,6 @@ static struct dma_map_ops mips_default_d + .sync_single_for_device = mips_dma_sync_single_for_device, + .sync_sg_for_cpu = mips_dma_sync_sg_for_cpu, + .sync_sg_for_device = mips_dma_sync_sg_for_device, +- .mapping_error = mips_dma_mapping_error, + .dma_supported = mips_dma_supported + }; + diff --git a/target/linux/generic/pending-4.9/341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch b/target/linux/generic/pending-4.9/341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch new file mode 100644 index 00000000000000..5b237a6d2391da --- /dev/null +++ b/target/linux/generic/pending-4.9/341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch @@ -0,0 +1,140 @@ +From: Felix Fietkau +Date: Tue, 5 Dec 2017 12:46:01 +0100 +Subject: [PATCH] MIPS: mm: remove no-op dma_map_ops where possible + +If no post-DMA flush is required, and the platform does not provide +plat_unmap_dma_mem(), there is no need to include unmap or sync_for_cpu +ops. + +With this patch they are compiled out to improve icache footprint +on devices that handle lots of DMA traffic (especially network routers). + +Signed-off-by: Felix Fietkau +--- + +--- a/arch/mips/Kconfig ++++ b/arch/mips/Kconfig +@@ -213,6 +213,7 @@ config BMIPS_GENERIC + select BRCMSTB_L2_IRQ + select IRQ_MIPS_CPU + select DMA_NONCOHERENT ++ select DMA_UNMAP_POST_FLUSH + select SYS_SUPPORTS_32BIT_KERNEL + select SYS_SUPPORTS_LITTLE_ENDIAN + select SYS_SUPPORTS_BIG_ENDIAN +@@ -338,6 +339,7 @@ config MACH_JAZZ + select CSRC_R4K + select DEFAULT_SGI_PARTITION if CPU_BIG_ENDIAN + select GENERIC_ISA_DMA ++ select DMA_UNMAP_POST_FLUSH + select HAVE_PCSPKR_PLATFORM + select IRQ_MIPS_CPU + select I8253 +@@ -1125,6 +1127,9 @@ config DMA_NONCOHERENT + bool + select NEED_DMA_MAP_STATE + ++config DMA_UNMAP_POST_FLUSH ++ bool ++ + config NEED_DMA_MAP_STATE + bool + +@@ -1649,6 +1654,7 @@ config CPU_R10000 + select CPU_SUPPORTS_64BIT_KERNEL + select CPU_SUPPORTS_HIGHMEM + select CPU_SUPPORTS_HUGEPAGES ++ select DMA_UNMAP_POST_FLUSH + help + MIPS Technologies R10000-series processors. + +@@ -1894,9 +1900,11 @@ config SYS_HAS_CPU_MIPS32_R3_5 + bool + + config SYS_HAS_CPU_MIPS32_R5 ++ select DMA_UNMAP_POST_FLUSH + bool + + config SYS_HAS_CPU_MIPS32_R6 ++ select DMA_UNMAP_POST_FLUSH + bool + + config SYS_HAS_CPU_MIPS64_R1 +@@ -1906,6 +1914,7 @@ config SYS_HAS_CPU_MIPS64_R2 + bool + + config SYS_HAS_CPU_MIPS64_R6 ++ select DMA_UNMAP_POST_FLUSH + bool + + config SYS_HAS_CPU_R3000 +--- a/arch/mips/mm/dma-default.c ++++ b/arch/mips/mm/dma-default.c +@@ -290,8 +290,9 @@ static inline void __dma_sync(struct pag + } while (left); + } + +-static void mips_dma_unmap_page(struct device *dev, dma_addr_t dma_addr, +- size_t size, enum dma_data_direction direction, unsigned long attrs) ++static void __maybe_unused ++mips_dma_unmap_page(struct device *dev, dma_addr_t dma_addr, size_t size, ++ enum dma_data_direction direction, unsigned long attrs) + { + if (cpu_needs_post_dma_flush(dev)) + __dma_sync(dma_addr_to_page(dev, dma_addr), +@@ -330,9 +331,10 @@ static dma_addr_t mips_dma_map_page(stru + return plat_map_dma_mem_page(dev, page) + offset; + } + +-static void mips_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, +- int nhwentries, enum dma_data_direction direction, +- unsigned long attrs) ++static void __maybe_unused ++mips_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, ++ int nhwentries, enum dma_data_direction direction, ++ unsigned long attrs) + { + int i; + struct scatterlist *sg; +@@ -346,8 +348,9 @@ static void mips_dma_unmap_sg(struct dev + } + } + +-static void mips_dma_sync_single_for_cpu(struct device *dev, +- dma_addr_t dma_handle, size_t size, enum dma_data_direction direction) ++static void __maybe_unused ++mips_dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, ++ size_t size, enum dma_data_direction direction) + { + if (cpu_needs_post_dma_flush(dev)) + __dma_sync(dma_addr_to_page(dev, dma_handle), +@@ -363,9 +366,9 @@ static void mips_dma_sync_single_for_dev + dma_handle & ~PAGE_MASK, size, direction); + } + +-static void mips_dma_sync_sg_for_cpu(struct device *dev, +- struct scatterlist *sglist, int nelems, +- enum dma_data_direction direction) ++static void __maybe_unused ++mips_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sglist, ++ int nelems, enum dma_data_direction direction) + { + int i; + struct scatterlist *sg; +@@ -415,12 +418,14 @@ static struct dma_map_ops mips_default_d + .free = mips_dma_free_coherent, + .mmap = mips_dma_mmap, + .map_page = mips_dma_map_page, +- .unmap_page = mips_dma_unmap_page, + .map_sg = mips_dma_map_sg, ++#ifdef CONFIG_DMA_UNMAP_POST_FLUSH ++ .unmap_page = mips_dma_unmap_page, + .unmap_sg = mips_dma_unmap_sg, + .sync_single_for_cpu = mips_dma_sync_single_for_cpu, +- .sync_single_for_device = mips_dma_sync_single_for_device, + .sync_sg_for_cpu = mips_dma_sync_sg_for_cpu, ++#endif ++ .sync_single_for_device = mips_dma_sync_single_for_device, + .sync_sg_for_device = mips_dma_sync_sg_for_device, + .dma_supported = mips_dma_supported + }; diff --git a/target/linux/generic/pending-4.9/704-phy-no-genphy-soft-reset.patch b/target/linux/generic/pending-4.9/704-phy-no-genphy-soft-reset.patch deleted file mode 100644 index 4fad37ab304e13..00000000000000 --- a/target/linux/generic/pending-4.9/704-phy-no-genphy-soft-reset.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Felix Fietkau -Subject: net: phy: disable soft-reset for generic PHY devices to avoid accidentally clearing preinitialized state - -Signed-off-by: Felix Fietkau ---- - drivers/net/phy/phy_device.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/drivers/net/phy/phy_device.c -+++ b/drivers/net/phy/phy_device.c -@@ -1524,11 +1524,6 @@ int genphy_config_init(struct phy_device - return 0; - } - --static int gen10g_soft_reset(struct phy_device *phydev) --{ -- /* Do nothing for now */ -- return 0; --} - EXPORT_SYMBOL(genphy_config_init); - - static int gen10g_config_init(struct phy_device *phydev) -@@ -1811,7 +1806,7 @@ static struct phy_driver genphy_driver[] - .phy_id = 0xffffffff, - .phy_id_mask = 0xffffffff, - .name = "Generic 10G PHY", -- .soft_reset = gen10g_soft_reset, -+ .soft_reset = genphy_no_soft_reset, - .config_init = gen10g_config_init, - .features = 0, - .config_aneg = gen10g_config_aneg, diff --git a/target/linux/imx6/image/Makefile b/target/linux/imx6/image/Makefile index c3653cd6fc2c53..7f35c56b794ccb 100644 --- a/target/linux/imx6/image/Makefile +++ b/target/linux/imx6/image/Makefile @@ -104,6 +104,7 @@ define Device/ventana BLOCKSIZE := 128k MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB endef +TARGET_DEVICES += ventana define Device/ventana-large $(Device/ventana) @@ -114,14 +115,12 @@ define Device/ventana-large BLOCKSIZE := 256k MKUBIFS_OPTS := -m $$(PAGESIZE) -e 248KiB endef +TARGET_DEVICES += ventana-large define Device/wandboard DEVICE_TITLE := Wandboard Dual DEVICE_DTS := imx6dl-wandboard endef - -TARGET_DEVICES += \ - ventana ventana-large \ - wandboard +TARGET_DEVICES += wandboard $(eval $(call BuildImage)) diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile index fc21aa465707ac..77ef896796ae92 100644 --- a/target/linux/kirkwood/image/Makefile +++ b/target/linux/kirkwood/image/Makefile @@ -11,7 +11,6 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk KERNEL_LOADADDR:=0x8000 -TARGET_DEVICES = linksys-audi linksys-viper dockstar goflexnet goflexhome iconnect pogo_e02 ib62x0 nsa310b nsa325 on100 UBI_OPTS := -m 2048 -p 128KiB -s 512 UBIFS_OPTS := -m 2048 -e 126KiB -c 4096 @@ -39,18 +38,21 @@ define Device/dockstar IMAGE/factory.bin := append-ubi KERNEL_IN_UBI := 1 endef +TARGET_DEVICES += dockstar define Device/goflexnet $(Device/dockstar) DEVICE_TITLE := Seagate GoFlexNet DEVICE_DTS := kirkwood-goflexnet endef +TARGET_DEVICES += goflexnet define Device/goflexhome $(Device/dockstar) DEVICE_TITLE := Seagate GoFlexHome DEVICE_DTS := kirkwood-goflexhome endef +TARGET_DEVICES += goflexhome define Device/linksys-audi DEVICE_TITLE := Linksys EA3500 (Audi) @@ -62,6 +64,7 @@ define Device/linksys-audi UBINIZE_OPTS := -E 5 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi endef +TARGET_DEVICES += linksys-audi define Device/linksys-viper DEVICE_TITLE := Linksys E4200v2 / EA4500 (Viper) @@ -73,12 +76,14 @@ define Device/linksys-viper UBINIZE_OPTS := -E 5 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi endef +TARGET_DEVICES += linksys-viper define Device/iconnect $(Device/dockstar) DEVICE_TITLE := Iomega Iconnect DEVICE_DTS := kirkwood-iconnect endef +TARGET_DEVICES += iconnect define Device/nsa310b $(Device/dockstar) @@ -86,6 +91,7 @@ $(Device/dockstar) DEVICE_DTS := kirkwood-nsa310b DEVICE_PACKAGES := kmod-r8169 kmod-gpio-button-hotplug kmod-hwmon-lm85 endef +TARGET_DEVICES += nsa310b define Device/nsa325 $(Device/dockstar) @@ -93,6 +99,7 @@ $(Device/dockstar) DEVICE_DTS := kirkwood-nsa325 DEVICE_PACKAGES := kmod-gpio-button-hotplug kmod-rtc-pcf8563 kmod-usb3 endef +TARGET_DEVICES += nsa325 define Device/on100 DEVICE_TITLE := Cisco Systems ON100 @@ -104,17 +111,20 @@ define Device/on100 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi UBINIZE_OPTS := -E 5 endef +TARGET_DEVICES += on100 define Device/pogo_e02 $(Device/dockstar) DEVICE_TITLE := Cloud Engines Pogoplug E02 DEVICE_DTS := kirkwood-pogo_e02 endef +TARGET_DEVICES += pogo_e02 define Device/ib62x0 $(Device/dockstar) DEVICE_TITLE := RaidSonic ICY BOX IB-NAS62x0 DEVICE_DTS := kirkwood-ib62x0 endef +TARGET_DEVICES += ib62x0 $(eval $(call BuildImage)) diff --git a/target/linux/lantiq/ase/config-default b/target/linux/lantiq/ase/config-default index b6cd4f3910674d..b802509022b335 100644 --- a/target/linux/lantiq/ase/config-default +++ b/target/linux/lantiq/ase/config-default @@ -1,5 +1,4 @@ CONFIG_ADM6996_PHY=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_CPU_MIPS32_R1=y # CONFIG_CPU_MIPS32_R2 is not set CONFIG_CPU_MIPSR1=y @@ -9,18 +8,18 @@ CONFIG_FIRMWARE_IN_KERNEL=y CONFIG_FIRMWARE_MEMMAP=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_GENERIC_PLATFORM=y -CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y # CONFIG_ISDN is not set # CONFIG_LBDAF is not set CONFIG_LEDS_TRIGGER_HEARTBEAT=y CONFIG_MIPS_FPU_EMULATOR=y +CONFIG_NLS=y # CONFIG_PSB6970_PHY is not set # CONFIG_RTL8366_SMI is not set CONFIG_SOC_AMAZON_SE=y # CONFIG_SOC_XWAY is not set -# CONFIG_SPI is not set +CONFIG_USB=y +CONFIG_USB_COMMON=y +# CONFIG_USB_EHCI_HCD is not set CONFIG_USB_SUPPORT=y -# CONFIG_WIRELESS is not set -# CONFIG_WLAN is not set CONFIG_ZLIB_DEFLATE=y CONFIG_ZLIB_INFLATE=y diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index 817e2e91c5bdc0..0426fb18e6e182 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -4,68 +4,71 @@ # based on ar71xx # +. /lib/functions/leds.sh . /lib/functions/uci-defaults.sh -. /lib/functions/lantiq.sh board_config_update -led_wifi="$(lantiq_get_dt_led wifi)" +led_wifi="$(get_dt_led wifi)" [ -n "$led_wifi" ] && ucidef_set_led_wlan "wifi" "wifi" "$led_wifi" "phy0tpt" -led_usb="$(lantiq_get_dt_led usb)" +led_usb="$(get_dt_led usb)" [ -n "$led_usb" ] && ucidef_set_led_usbdev "usb" "usb" "$led_usb" "1-1" -led_usb2="$(lantiq_get_dt_led usb2)" +led_usb2="$(get_dt_led usb2)" [ -n "$led_usb2" ] && ucidef_set_led_usbdev "usb2" "usb2" "$led_usb2" "2-1" -led_dsl="$(lantiq_get_dt_led dsl)" +led_dsl="$(get_dt_led dsl)" [ -n "$led_dsl" ] && { - interface="nas0" - lantiq_is_vdsl_system && interface="ptm0" - - led_internet="$(lantiq_get_dt_led internet)" + led_internet="$(get_dt_led internet)" if [ -n "$led_internet" ]; then ucidef_set_led_default "dsl" "dsl" "$led_dsl" "0" ucidef_set_led_netdev "internet" "internet" "$led_internet" "pppoe-wan" else - ucidef_set_led_netdev "dsl" "dsl" "$led_dsl" "$interface" + ucidef_set_led_netdev "dsl" "dsl" "$led_dsl" "dsl0" fi } board=$(board_name) case "$board" in -ALL0333CJ) +allnet,all0333cj) ucidef_set_led_netdev "lan" "lan" "all0333cj:green:lan" "eth0.1" ;; -ARV4525PW) +arcadyan,arv4525pw) ucidef_set_led_netdev "wifi" "wifi" "arv4525pw:green:wlan" "wlan0" ;; -ARV7506PW11) +arcadyan,arv7506pw11) ucidef_set_led_wlan "wifi" "wifi" "arv7506pw11:green:wlan" "phy0radio" ;; -ARV7519RW22) +arcadyan,arv7519rw22) ucidef_set_led_netdev "lan" "lan" "arv7519rw22:green:lan" "eth0.1" ;; -BTHOMEHUBV5A) +arcadyan,arv752dpw22) + ucidef_set_led_wlan "wifi" "wifi" "arv752dpw22:red:wifi" "phy0radio" + ;; +bt,homehub-v5a) ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0" ;; -DM200) +netgear,dm200) ucidef_set_led_netdev "lan" "lan" "dm200:green:lan" "eth0" ;; -FRITZ7320) +avm,fritz7320) ucidef_set_led_netdev "wifi" "wifi" "fritz7320:green:wlan" "wlan0" ;; -P2812HNUF*) +zyxel,p-2812hnu-f1|\ +zyxel,p-2812hnu-f3) ucidef_set_led_wlan "wifi" "wifi" "p2812hnufx:green:wlan" "phy0radio" ;; -VGV7510KW22*) +arcadyan,vgv7510kw22-nor|\ +arcadyan,vgv7510kw22-brn) ucidef_set_led_wlan "wifi" "wifi" "vgv7510kw22:green:wlan" "phy0radio" ;; -VGV7519*) +arcadyan,vgv7519-nor|\ +arcadyan,vgv7519-brn) ucidef_set_led_wlan "wifi" "wifi" "vgv7519:green:wireless" "phy0radio" ;; -WBMR300) +buffalo,wbmr-300hpd) ucidef_set_led_switch "lan1" "LAN1" "wbmr300:green:lan1" "switch0" "0x08" ucidef_set_led_switch "lan2" "LAN2" "wbmr300:green:lan2" "switch0" "0x04" ucidef_set_led_switch "wan" "WAN" "wbmr300:green:wan" "switch0" "0x10" diff --git a/target/linux/lantiq/base-files/etc/board.d/02_network b/target/linux/lantiq/base-files/etc/board.d/02_network index 2feeb9c208b3ee..efe631c99e7c2f 100755 --- a/target/linux/lantiq/base-files/etc/board.d/02_network +++ b/target/linux/lantiq/base-files/etc/board.d/02_network @@ -18,171 +18,204 @@ encaps="llc" payload="bridged" lan_mac="" wan_mac="" -interface_wan="" +interface_wan="dsl0" board=$(board_name) case "$board" in -ACMP252|GIGASX76X) +audiocodes,mp-252) ucidef_add_switch "switch0" \ "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5t@eth0" ;; -ALL0333CJ) +allnet,all0333cj) annex="b" lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr) wan_mac=$(macaddr_add "$lan_mac" 1) ucidef_set_interface_lan 'eth0' ;; -ARV4510PW) +arcadyan,arv4510pw) lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr) wan_mac=$(macaddr_add "$lan_mac" 1) ucidef_add_switch "switch0" \ "0:lan:4" "2:lan:2" "1:lan:3" "3:lan:1" "5t@eth0" ;; -ARV4519PW|ARV7510PW22|ARV7518PW|ARV752DPW22|ARV8539PW22) +arcadyan,arv4519pw|arcadyan,arv7510pw22|arcadyan,arv7518pw) ucidef_add_switch "switch0" \ "0t@eth0" "2:lan" "3:lan" "4:lan" "5:lan" ;; -ARV4520PW) +arcadyan,arv4520pw) + annex="b" ucidef_add_switch "switch0" \ "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t@eth0" ;; -ARV7506PW11) +arcadyan,arv4525pw|arcadyan,arv452cqw|arcadyan,arv7525pw|arcadyan,arv752dpw) + annex="b" + ucidef_set_interface_lan 'eth0' + ;; + +arcadyan,arv7506pw11) + annex="b" wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 22)" 2) ucidef_add_switch "switch0" \ "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5t@eth0" ;; -ARV7519PW) +arcadyan,arv7519pw) wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 22)" 1) ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4t@eth0" ;; -ARV7519RW22) +arcadyan,arv7519rw22) wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 22)" 1) ucidef_add_switch "switch0" \ "0:lan:5" "2:lan:3" "3:lan:4" "4:lan:1" "5:lan:2" "6t@eth0" ;; -ASL56026) +arcadyan,arv752dpw22|arcadyan,arv8539pw22) + annex="b" + ucidef_add_switch "switch0" \ + "0t@eth0" "2:lan" "3:lan" "4:lan" "5:lan" + ;; + +alphanetworks,asl56026) lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr) wan_mac=$(mtd_get_mac_ascii uboot_env wanmac) ucidef_add_switch "switch0"\ "2:lan" "3:lan" "6t@eth0" ;; -BTHOMEHUBV2B) +bt,homehub-v2b) lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr) wan_mac=$(macaddr_add "$lan_mac" 1) ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "5t@eth0" ;; -BTHOMEHUBV3A) +bt,homehub-v3a) lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr) wan_mac=$(macaddr_add "$lan_mac" 1) ucidef_set_interface_lan 'eth0' ;; -BTHOMEHUBV5A) +bt,homehub-v5a) lan_mac=$(mtd_get_mac_binary_ubi caldata 4364) wan_mac=$(macaddr_add "$lan_mac" 1) ucidef_add_switch "switch0" \ "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0" ;; -DGN3500*) +netgear,dgn1000b) + annex="b" + ucidef_set_interface_lan 'eth0' + ;; + +netgear,dgn3500|netgear,dgn3500b) + lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr) + wan_mac=$(macaddr_add "$lan_mac" 1) ucidef_add_switch "switch0" \ "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t@eth0" ;; -DM200) +netgear,dm200) lan_mac=$(mtd_get_mac_binary ART 0) wan_mac=$(macaddr_add "$lan_mac" 1) ucidef_set_interface_lan 'eth0' ;; -EASY80920NAND|EASY80920NOR) +lantiq,easy80920-nand|lantiq,easy80920-nor) lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr) wan_mac=$(macaddr_add "$lan_mac" 1) ucidef_add_switch "switch0" \ "0:lan:4" "1:lan:3" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0" ;; -FRITZ3370) +avm,fritz3370) + annex="b" wan_mac=$(macaddr_add "$(mtd_get_mac_binary urlader 2439)" 1) + ucidef_set_interface_lan 'eth0' ;; -FRITZ7320) +avm,fritz7320) + annex="b" wan_mac=$(macaddr_add "$(mtd_get_mac_binary urlader 2705)" 1) + ucidef_set_interface_lan 'eth0' ;; -FRITZ7360SL) +avm,fritz7360sl) + annex="b" wan_mac=$(macaddr_add "$(mtd_get_mac_binary urlader 2705)" 1) ucidef_add_switch "switch0" \ "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "6t@eth0" ;; -H201L) +siemens,gigaset-sx76x) + annex="b" + ucidef_add_switch "switch0" \ + "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5t@eth0" + ;; + +zte,h201l) + annex="b" ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4t@eth0" ;; -P2601HNFX) +zyxel,p-2601hn) ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "5t@eth0" ;; -P2812HNUF*) +zyxel,p-2812hnu-f1|zyxel,p-2812hnu-f3) lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr) wan_mac=$(macaddr_add "$lan_mac" 1) ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "4:lan" "5:wan" "6t@eth0" ;; -TDW8970|TDW8980) +tplink,tdw8970|tplink,tdw8980) wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 61696)" 1) ucidef_add_switch "switch0" \ "0:lan:2" "2:lan:3" "4:lan:4" "5:lan:1" "6t@eth0" ;; -VG3503J) +arcadyan,vg3503j) lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr) wan_mac=$(macaddr_add "$lan_mac" 1) ucidef_add_switch "switch0" \ "2:lan:1" "4:lan:2" "6t@eth0" ;; -VR200v) +tplink,vr200v) wan_mac=$(macaddr_add "$(mtd_get_mac_binary romfile 61696)" 1) ucidef_add_switch "switch0" \ "0:lan" "2:lan" "4:lan" "5:lan" "6t@eth0" ;; -VGV7510KW22*) +arcadyan,vgv7510kw22-nor|arcadyan,vgv7510kw22-brn) + annex="b" wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 22)" 2) ucidef_add_switch "switch0" \ "2:lan:2" "3:lan:1" "4:lan:4" "5:lan:3" "0:wan:5" "6t@eth0" ;; -VGV7519*) +arcadyan,vgv7519-nor|arcadyan,vgv7519-brn) wan_mac=$(mtd_get_mac_binary board_config 22) ucidef_add_switch "switch0" \ "0:lan:4" "1:lan:3" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0" ;; -WBMR) +buffalo,wbmr-hp-g300h) ucidef_add_switch "switch0" \ "0t@eth0" "2:lan" "3:lan" "4:lan" "5:lan" ;; -WBMR300) +buffalo,wbmr-300hpd) lan_mac=$(mtd_get_mac_ascii ubootconfig ethaddr) wan_mac="$lan_mac" ucidef_add_switch "switch0" \ @@ -199,10 +232,8 @@ ls /lib/modules/$(uname -r)/ltq_atm* 1> /dev/null 2>&1 && \ ucidef_add_atm_bridge "$vpi" "$vci" "$encaps" "$payload" if lantiq_is_vdsl_system; then - interface_wan="ptm0" ucidef_add_vdsl_modem "$annex" "$tone" "$xfer_mode" else - interface_wan="nas0" ucidef_add_adsl_modem "$annex" "/lib/firmware/adsl.bin" fi diff --git a/target/linux/lantiq/base-files/etc/diag.sh b/target/linux/lantiq/base-files/etc/diag.sh index 70ed25cb807c6c..4fb47bd2731828 100644 --- a/target/linux/lantiq/base-files/etc/diag.sh +++ b/target/linux/lantiq/base-files/etc/diag.sh @@ -2,14 +2,13 @@ # Copyright (C) 2010-2015 OpenWrt.org . /lib/functions/leds.sh -. /lib/functions/lantiq.sh -boot="$(lantiq_get_dt_led boot)" -failsafe="$(lantiq_get_dt_led failsafe)" -running="$(lantiq_get_dt_led running)" +boot="$(get_dt_led boot)" +failsafe="$(get_dt_led failsafe)" +running="$(get_dt_led running)" set_state() { - status_led="$boot" + status_led="$boot" case "$1" in preinit) diff --git a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 1c2b8456fc143b..6b4d09dd333ba5 100644 --- a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -38,7 +38,7 @@ case "$FIRMWARE" in "ath10k/cal-pci-0000:02:00.0.bin") board=$(board_name) case $board in - BTHOMEHUBV5A) + bt,homehub-v5a) ath10k_caldata_extract_ubi "caldata" 20480 2116 ath10k_caldata_set_macaddr $(macaddr_add $(mtd_get_mac_binary_ubi caldata 4364) +3) ;; diff --git a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom index 7144423d433b2c..498a5090122fa4 100644 --- a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom +++ b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom @@ -116,32 +116,32 @@ case "$FIRMWARE" in board=$(board_name) case "$board" in - ARV7518PW) + arcadyan,arv7518pw) ath9k_eeprom_extract "boardconfig" 1024 1 ;; - ARV8539PW22) + arcadyan,arv8539pw22) ath9k_eeprom_extract "art" 1024 1 ;; - BTHOMEHUBV2B) + bt,homehub-v2b) ath9k_eeprom_extract "art" 0 1 ath9k_patch_fw_mac_crc "00:00:00:00:00:00" 524 ;; - BTHOMEHUBV3A) + bt,homehub-v3a) ath9k_eeprom_extract "art-copy" 0 1 ath9k_patch_fw_mac_crc $(macaddr_add $(mtd_get_mac_ascii uboot_env ethaddr) +2) 268 ;; - BTHOMEHUBV5A) + bt,homehub-v5a) ath9k_ubi_eeprom_extract "caldata" 4096 0 ath9k_patch_fw_mac_crc $(macaddr_add $(mtd_get_mac_binary_ubi caldata 4364) +2) 268 ;; - DGN3500*) + netgear,dgn3500|netgear,dgn3500b) ath9k_eeprom_extract "calibration" 61440 0 ath9k_patch_fw_mac_crc $(macaddr_add $(mtd_get_mac_ascii uboot-env ethaddr) +2) 524 ;; - FRITZ3370|FRITZ7320|FRITZ7360SL) + avm,fritz3370|avm,fritz7320|avm,fritz7360sl) ath9k_eeprom_extract "urlader" 2437 0 ;; - TDW8970|TDW8980) + tplink,tdw8970|tplink,tdw8980) ath9k_eeprom_extract "boardconfig" 135168 0 ;; *) diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration b/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration index 6ff4355853e2a7..dc594e35e9471b 100644 --- a/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration +++ b/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration @@ -56,20 +56,21 @@ migrate_leds() } case "$(board_name)" in -ARV452CQW|\ -ARV7510PW22|\ -ARV7519RW22|\ -ARV752DPW|\ -ARV752DPW22|\ -ASL56026|\ -BTHOMEHUBV2B|\ -BTHOMEHUBV3A|\ -BTHOMEHUBV5A|\ -FRTZ7360SL|\ -VG3503J) +arcadyan,arv452cqw|\ +arcadyan,arv7510pw22|\ +arcadyan,arv7519rw22|\ +arcadyan,arv752dpw|\ +arcadyan,arv752dpw22|\ +alphanetworks,asl56026|\ +bt,homehub-v2b|\ +bt,homehub-v3a|\ +bt,homehub-v5a|\ +avm,fritz7360sl|\ +arcadyan,vg3503j) do_internet_led_rename ;; -DGN3500*) +netgear,dgn3500|\ +netgear,dgn3500b) migrate_leds "dgn3500:blue:wireless=dgn3500:green:wireless" ;; *) diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/02_migrate_xdsl_iface b/target/linux/lantiq/base-files/etc/uci-defaults/02_migrate_xdsl_iface new file mode 100644 index 00000000000000..292d407c30bdf8 --- /dev/null +++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_migrate_xdsl_iface @@ -0,0 +1,55 @@ +#!/bin/sh + +. /lib/functions.sh +. /lib/functions/lantiq.sh + +IFNAME_CHANGED=0 + +rename_xdsl_ifname() +{ + local cfg="$1" + local section="$2" + local option="$3" + local name + + config_get name ${section} $option + case $name in + nas0*) + name=${name/nas0/dsl0} + ;; + ptm0*) + name=${name/ptm0/dsl0} + ;; + *) + return + ;; + esac + + uci set ${cfg}.${section}.$option=$name + IFNAME_CHANGED=1 +} + +migrate_network_xdsl_ifname() +{ + rename_xdsl_ifname network "$1" ifname + rename_xdsl_ifname network "$1" name +} + +migrate_led_xdsl_ifname() +{ + rename_xdsl_ifname system "$1" dev +} + +config_load network +config_foreach migrate_network_xdsl_ifname + +[ "$IFNAME_CHANGED" = "1" ] && uci commit network + +IFNAME_CHANGED=0 + +config_load system +config_foreach migrate_led_xdsl_ifname led + +[ "$IFNAME_CHANGED" = "1" ] && uci commit system + +exit 0 diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq.sh b/target/linux/lantiq/base-files/lib/functions/lantiq.sh index 8c2e0ce5c17931..62c7a6b66267df 100644 --- a/target/linux/lantiq/base-files/lib/functions/lantiq.sh +++ b/target/linux/lantiq/base-files/lib/functions/lantiq.sh @@ -1,17 +1,5 @@ #!/bin/sh -lantiq_get_dt_led() { - local label - local ledpath - local basepath="/proc/device-tree" - local nodepath="$basepath/aliases/led-$1" - - [ -f "$nodepath" ] && ledpath=$(cat "$nodepath") - [ -n "$ledpath" ] && label=$(cat "$basepath$ledpath/label") - - echo "$label" -} - lantiq_is_vdsl_system() { grep -qE "system type.*: (VR9|xRX200)" /proc/cpuinfo } diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh index 47f5b738148a8e..a76fec94edeb14 100755 --- a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh +++ b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh @@ -166,20 +166,18 @@ data_rates() { chipset() { local vig local cs - local csv vig=$(dsl_cmd vig) cs=$(dsl_val "$vig" DSL_ChipSetType) - csv=$(dsl_val "$vig" DSL_ChipSetHWVersion) csfw=$(dsl_val "$vig" DSL_ChipSetFWVersion) csapi=$(dsl_val "$vig" DSL_DriverVersionApi) if [ "$action" = "lucistat" ]; then - echo "dsl.chipset=\"${cs} ${csv}\"" + echo "dsl.chipset=\"${cs}\"" echo "dsl.firmware_version=\"${csfw}\"" echo "dsl.api_version=\"${csapi}\"" else - echo "Chipset: ${cs} ${csv}" + echo "Chipset: ${cs}" echo "Firmware Version: ${csfw}" echo "API Version: ${csapi}" fi diff --git a/target/linux/lantiq/base-files/lib/preinit/01_preinit_board.sh b/target/linux/lantiq/base-files/lib/preinit/01_preinit_board.sh deleted file mode 100755 index aef946036eb161..00000000000000 --- a/target/linux/lantiq/base-files/lib/preinit/01_preinit_board.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -lantiq_board_detect() { - name=`grep "^machine" /proc/cpuinfo | sed "s/machine.*: \(.*\)/\1/g" | sed "s/\(.*\) - .*/\1/g"` - model=`grep "^machine" /proc/cpuinfo | sed "s/machine.*: \(.*\)/\1/g" | sed "s/.* - \(.*\)/\1/g"` - [ -z "$name" ] && name="unknown" - [ -z "$model" ] && model="unknown" - [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/" - echo $name > /tmp/sysinfo/board_name - echo $model > /tmp/sysinfo/model -} - -do_lantiq() { - . /lib/functions/lantiq.sh - - lantiq_board_detect -} - -boot_hook_add preinit_main do_lantiq diff --git a/target/linux/lantiq/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/base-files/lib/upgrade/platform.sh index 9158fa742fdf1f..77b3868dc056cc 100755 --- a/target/linux/lantiq/base-files/lib/upgrade/platform.sh +++ b/target/linux/lantiq/base-files/lib/upgrade/platform.sh @@ -9,7 +9,7 @@ platform_pre_upgrade() { local board=$(board_name) case "$board" in - BTHOMEHUBV2B|BTHOMEHUBV3A|BTHOMEHUBV5A|P2812HNUF* ) + bt,homehub-v2b|bt,homehub-v3a|bt,homehub-v5a|zyxel,p-2812hnu-f1|zyxel,p-2812hnu-f3) nand_do_upgrade $1 ;; esac diff --git a/target/linux/lantiq/config-4.9 b/target/linux/lantiq/config-4.9 index 387a1893b8c8c4..a98509e5d660a7 100644 --- a/target/linux/lantiq/config-4.9 +++ b/target/linux/lantiq/config-4.9 @@ -12,7 +12,6 @@ CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARCH_USE_BUILTIN_BSWAP=y CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_BLK_MQ_PCI=y CONFIG_CEVT_R4K=y CONFIG_CLKDEV_LOOKUP=y CONFIG_CLONE_BACKWARDS=y @@ -151,20 +150,13 @@ CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y # CONFIG_NO_IOPORT_MAP is not set CONFIG_OF=y CONFIG_OF_ADDRESS=y -CONFIG_OF_ADDRESS_PCI=y CONFIG_OF_EARLY_FLATTREE=y CONFIG_OF_FLATTREE=y CONFIG_OF_GPIO=y CONFIG_OF_IRQ=y CONFIG_OF_MDIO=y CONFIG_OF_NET=y -CONFIG_OF_PCI=y -CONFIG_OF_PCI_IRQ=y -CONFIG_PCI=y -# CONFIG_PCIE_LANTIQ is not set -CONFIG_PCI_DOMAINS=y CONFIG_PCI_DRIVERS_LEGACY=y -CONFIG_PCI_LANTIQ=y CONFIG_PERF_USE_VMALLOC=y CONFIG_PGTABLE_LEVELS=2 CONFIG_PHYLIB=y diff --git a/target/linux/lantiq/dts/ACMP252.dts b/target/linux/lantiq/dts/ACMP252.dts index a94014b0f982bc..72947201173c1a 100644 --- a/target/linux/lantiq/dts/ACMP252.dts +++ b/target/linux/lantiq/dts/ACMP252.dts @@ -3,7 +3,8 @@ #include "danube.dtsi" / { - model = "ACMP252 - AudioCodes MediaPack MP-252"; + compatible = "audiocodes,mp-252", "lantiq,xway", "lantiq,danube"; + model = "AudioCodes MediaPack MP-252"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/ALL0333CJ.dts b/target/linux/lantiq/dts/ALL0333CJ.dts index 99174c53fbd560..16c5facb35abef 100644 --- a/target/linux/lantiq/dts/ALL0333CJ.dts +++ b/target/linux/lantiq/dts/ALL0333CJ.dts @@ -3,7 +3,8 @@ #include "amazonse.dtsi" / { - model = "ALL0333CJ - Allnet ALL0333CJ DSL Modem"; + compatible = "allnet,all0333cj", "lantiq,xway", "lantiq,ase"; + model = "Allnet ALL0333CJ DSL Modem"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/ARV4510PW.dts b/target/linux/lantiq/dts/ARV4510PW.dts index 17609e25ba6969..4720b57dd3e746 100644 --- a/target/linux/lantiq/dts/ARV4510PW.dts +++ b/target/linux/lantiq/dts/ARV4510PW.dts @@ -5,7 +5,8 @@ #include / { - model = "ARV4510PW - Wippies, Elisa"; + compatible = "arcadyan,arv4510pw", "lantiq,xway", "lantiq,danube"; + model = "Wippies, Elisa"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/ARV4518PWR01.dts b/target/linux/lantiq/dts/ARV4518PWR01.dts index 21a03dde484a06..34f868f484ad65 100644 --- a/target/linux/lantiq/dts/ARV4518PWR01.dts +++ b/target/linux/lantiq/dts/ARV4518PWR01.dts @@ -3,5 +3,6 @@ #include "ARV4518PWR01.dtsi" / { - model = "ARV4518PWR01 - SMC7908A-ISP"; + compatible = "arcadyan,arv4518pwr01", "lantiq,xway", "lantiq,danube"; + model = "SMC7908A-ISP"; }; diff --git a/target/linux/lantiq/dts/ARV4518PWR01A.dts b/target/linux/lantiq/dts/ARV4518PWR01A.dts index e94076b43da782..771d0146d8e091 100644 --- a/target/linux/lantiq/dts/ARV4518PWR01A.dts +++ b/target/linux/lantiq/dts/ARV4518PWR01A.dts @@ -3,7 +3,8 @@ #include "ARV4518PWR01.dtsi" / { - model = "ARV4518PWR01A - SMC7908A-ISP, Airties WAV-221"; + compatible = "arcadyan,arv4518pwr01a", "lantiq,xway", "lantiq,danube"; + model = "SMC7908A-ISP, Airties WAV-221"; fpi@10000000 { pci@E105400 { diff --git a/target/linux/lantiq/dts/ARV4519PW.dts b/target/linux/lantiq/dts/ARV4519PW.dts index 86c0d487634840..8f781760f94b84 100644 --- a/target/linux/lantiq/dts/ARV4519PW.dts +++ b/target/linux/lantiq/dts/ARV4519PW.dts @@ -5,7 +5,8 @@ #include / { - model = "ARV4519PW - Vodafone Netfaster IAD 2, Pirelli P.RG A4201G"; + compatible = "arcadyan,arv4519pw", "lantiq,xway", "lantiq,danube"; + model = "Vodafone Netfaster IAD 2, Pirelli P.RG A4201G"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/ARV4520PW.dts b/target/linux/lantiq/dts/ARV4520PW.dts index 030e316c87091b..05e0dfe048cf3c 100644 --- a/target/linux/lantiq/dts/ARV4520PW.dts +++ b/target/linux/lantiq/dts/ARV4520PW.dts @@ -5,7 +5,8 @@ #include / { - model = "ARV4520PW - Easybox 800, WAV-281"; + compatible = "arcadyan,arv4520pw", "lantiq,xway", "lantiq,danube"; + model = "Easybox 800, WAV-281"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/ARV4525PW.dts b/target/linux/lantiq/dts/ARV4525PW.dts index 64b45aedb71500..61548c793af65b 100644 --- a/target/linux/lantiq/dts/ARV4525PW.dts +++ b/target/linux/lantiq/dts/ARV4525PW.dts @@ -5,7 +5,8 @@ #include / { - model = "ARV4525PW - Speedport W501V Typ A"; + compatible = "arcadyan,arv4525pw", "lantiq,xway", "lantiq,danube"; + model = "Speedport W501V Typ A"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/ARV452CQW.dts b/target/linux/lantiq/dts/ARV452CQW.dts index e43bab3dd1ab31..d996e8b66f48c3 100644 --- a/target/linux/lantiq/dts/ARV452CQW.dts +++ b/target/linux/lantiq/dts/ARV452CQW.dts @@ -5,7 +5,8 @@ #include / { - model = "ARV452CQW - Arcor 801"; + compatible = "arcadyan,arv452cqw", "lantiq,xway", "lantiq,danube"; + model = "Arcor 801"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/ARV7506PW11.dts b/target/linux/lantiq/dts/ARV7506PW11.dts index 1a57d64cb9cdc1..3ec4bf41a05c2d 100644 --- a/target/linux/lantiq/dts/ARV7506PW11.dts +++ b/target/linux/lantiq/dts/ARV7506PW11.dts @@ -5,7 +5,8 @@ #include / { - model = "ARV7506PW11 - Alice/O2 IAD 4421"; + compatible = "arcadyan,arv7506pw11", "lantiq,xway", "lantiq,danube"; + model = "Alice/O2 IAD 4421"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/ARV7510PW22.dts b/target/linux/lantiq/dts/ARV7510PW22.dts index 6bad4e3e71cd6b..dc3f614b9dc9b9 100644 --- a/target/linux/lantiq/dts/ARV7510PW22.dts +++ b/target/linux/lantiq/dts/ARV7510PW22.dts @@ -5,7 +5,8 @@ #include / { - model = "ARV7510PW22 - Astoria Networks"; + compatible = "arcadyan,arv7510pw22", "lantiq,xway", "lantiq,danube"; + model = "Astoria Networks ARV7510PW22"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/ARV7518PW.dts b/target/linux/lantiq/dts/ARV7518PW.dts index a0544372581076..41b12493234b7b 100644 --- a/target/linux/lantiq/dts/ARV7518PW.dts +++ b/target/linux/lantiq/dts/ARV7518PW.dts @@ -5,7 +5,8 @@ #include / { - model = "ARV7518PW - Astoria Networks"; + compatible = "arcadyan,arv7518pw", "lantiq,xway", "lantiq,danube"; + model = "Astoria Networks ARV7518PW"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/ARV7519PW.dts b/target/linux/lantiq/dts/ARV7519PW.dts index cc6786833fd054..9983a7906fa68b 100644 --- a/target/linux/lantiq/dts/ARV7519PW.dts +++ b/target/linux/lantiq/dts/ARV7519PW.dts @@ -5,7 +5,8 @@ #include / { - model = "ARV7519PW - Astoria Networks"; + compatible = "arcadyan,arv7519pw", "lantiq,xway", "lantiq,danube"; + model = "Astoria Networks ARV7519PW"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/ARV7519RW22.dts b/target/linux/lantiq/dts/ARV7519RW22.dts index f31c03f451806e..9e2ae9d6f2d9ca 100644 --- a/target/linux/lantiq/dts/ARV7519RW22.dts +++ b/target/linux/lantiq/dts/ARV7519RW22.dts @@ -5,7 +5,8 @@ #include / { - model = "ARV7519RW22 - Orange Livebox 2.1"; + compatible = "arcadyan,arv7519rw22", "lantiq,xway", "lantiq,vr9"; + model = "Orange Livebox 2.1"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/ARV7525PW.dts b/target/linux/lantiq/dts/ARV7525PW.dts index 7d643be2fd7a96..0007535895473e 100644 --- a/target/linux/lantiq/dts/ARV7525PW.dts +++ b/target/linux/lantiq/dts/ARV7525PW.dts @@ -5,7 +5,8 @@ #include / { - model = "ARV7525PW - Speedport W303V Typ A"; + compatible = "arcadyan,arv7525pw", "lantiq,xway", "lantiq,danube"; + model = "Speedport W303V Typ A"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/ARV752DPW.dts b/target/linux/lantiq/dts/ARV752DPW.dts index 5069d0d748c16f..3591b436716d7f 100644 --- a/target/linux/lantiq/dts/ARV752DPW.dts +++ b/target/linux/lantiq/dts/ARV752DPW.dts @@ -5,7 +5,8 @@ #include / { - model = "ARV752DPW - Arcor 802"; + compatible = "arcadyan,arv752dpw", "lantiq,xway", "lantiq,danube"; + model = "Arcor 802"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/ARV752DPW22.dts b/target/linux/lantiq/dts/ARV752DPW22.dts index d5a6d3184a70ea..8b5be8b76c50d6 100644 --- a/target/linux/lantiq/dts/ARV752DPW22.dts +++ b/target/linux/lantiq/dts/ARV752DPW22.dts @@ -5,7 +5,8 @@ #include / { - model = "ARV752DPW22 - Arcor 803"; + compatible = "arcadyan,arv752dpw22", "lantiq,xway", "lantiq,danube"; + model = "Arcor 803"; chosen { bootargs = "console=ttyLTQ0,115200"; @@ -253,5 +254,6 @@ reg = <0x7000 0 0 0 0>; ralink,mtd-eeprom = <&boardconfig 0x410>; ralink,mtd-eeprom-swap; + mtd-mac-address = <&boardconfig 0x16>; }; }; diff --git a/target/linux/lantiq/dts/ARV8539PW22.dts b/target/linux/lantiq/dts/ARV8539PW22.dts index c55c9a61ebe5a8..4edcde97632416 100644 --- a/target/linux/lantiq/dts/ARV8539PW22.dts +++ b/target/linux/lantiq/dts/ARV8539PW22.dts @@ -5,7 +5,8 @@ #include / { - model = "ARV8539PW22 - Speedport W 504V Typ A"; + compatible = "arcadyan,arv8539pw22", "lantiq,xway", "lantiq,danube"; + model = "Speedport W 504V Typ A"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/ASL56026.dts b/target/linux/lantiq/dts/ASL56026.dts index e2990e4519a1f2..293a3e27de16ce 100644 --- a/target/linux/lantiq/dts/ASL56026.dts +++ b/target/linux/lantiq/dts/ASL56026.dts @@ -5,7 +5,8 @@ #include / { - model = "ASL56026 - BT OpenReach VDSL Modem"; + compatible = "alphanetworks,asl56026", "lantiq,xway", "lantiq,vr9"; + model = "BT OpenReach VDSL Modem"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/BTHOMEHUBV2B.dts b/target/linux/lantiq/dts/BTHOMEHUBV2B.dts index 87b4dfbd4af886..961fd9b9299a50 100644 --- a/target/linux/lantiq/dts/BTHOMEHUBV2B.dts +++ b/target/linux/lantiq/dts/BTHOMEHUBV2B.dts @@ -5,7 +5,8 @@ #include / { - model = "BTHOMEHUBV2B - BT Home Hub 2B"; /* SoC: Lantiq Danube-S PSB 50712 @ 333MHz V1.3/1.5 */ + compatible = "bt,homehub-v2b", "lantiq,xway", "lantiq,danube"; + model = "BT Home Hub 2B"; /* SoC: Lantiq Danube-S PSB 50712 @ 333MHz V1.3/1.5 */ chosen { bootargs = "console=ttyLTQ0,115200"; @@ -74,7 +75,7 @@ }; nand-parts@0 { /* NAND Flash: Samsung K9F5608U0D-JIB0 32MB */ - compatible = "gen_nand", "lantiq,nand-xway"; + compatible = "lantiq,nand-xway"; lantiq,cs = <1>; bank-width = <2>; reg = <1 0x0 0x2000000 >; diff --git a/target/linux/lantiq/dts/BTHOMEHUBV3A.dts b/target/linux/lantiq/dts/BTHOMEHUBV3A.dts index ca9020bf7331be..d37b9728d21d28 100644 --- a/target/linux/lantiq/dts/BTHOMEHUBV3A.dts +++ b/target/linux/lantiq/dts/BTHOMEHUBV3A.dts @@ -5,7 +5,8 @@ #include / { - model = "BTHOMEHUBV3A - BT Home Hub 3A"; /* SoC: Lantiq ar9 @ 333MHz */ + compatible = "bt,homehub-v3a", "lantiq,xway", "lantiq,ar9"; + model = "BT Home Hub 3A"; /* SoC: Lantiq ar9 @ 333MHz */ chosen { bootargs = "console=ttyLTQ0,115200"; @@ -34,7 +35,7 @@ fpi@10000000 { localbus@0 { nand-parts@0 { /* NAND Flash: Samsung K9F5608U0D-JIB0 32MB */ - compatible = "gen_nand", "lantiq,nand-xway"; + compatible = "lantiq,nand-xway"; lantiq,cs = <1>; bank-width = <2>; reg = <1 0x0 0x2000000 >; diff --git a/target/linux/lantiq/dts/BTHOMEHUBV5A.dts b/target/linux/lantiq/dts/BTHOMEHUBV5A.dts index a33690cef6a2d8..4bdeddcafa7e41 100644 --- a/target/linux/lantiq/dts/BTHOMEHUBV5A.dts +++ b/target/linux/lantiq/dts/BTHOMEHUBV5A.dts @@ -5,7 +5,8 @@ #include / { - model = "BTHOMEHUBV5A - BT Home Hub 5A"; + compatible = "bt,homehub-v5a", "lantiq,xway", "lantiq,vr9"; + model = "BT Home Hub 5A"; chosen { bootargs = "console=ttyLTQ0,115200"; @@ -27,7 +28,7 @@ fpi@10000000 { localbus@0 { nand-parts@0 { - compatible = "gen_nand", "lantiq,nand-xway"; + compatible = "lantiq,nand-xway"; lantiq,cs = <1>; bank-width = <2>; reg = <0x1 0x0 0x2000000>; diff --git a/target/linux/lantiq/dts/DGN1000B.dts b/target/linux/lantiq/dts/DGN1000B.dts index 558658292e9d18..e5637efca51609 100644 --- a/target/linux/lantiq/dts/DGN1000B.dts +++ b/target/linux/lantiq/dts/DGN1000B.dts @@ -5,7 +5,8 @@ #include / { - model = "DGN1000B - Netgear DGN1000B"; + compatible = "netgear,dgn1000b", "lantiq,xway", "lantiq,ase"; + model = "Netgear DGN1000B"; chosen { bootargs = "console=ttyLTQ0,115200"; @@ -60,6 +61,7 @@ }; spi@E100800 { + status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&pins_spi_default>; diff --git a/target/linux/lantiq/dts/DGN3500.dts b/target/linux/lantiq/dts/DGN3500.dts index 9017a427cc912c..98a2ebd98e05d7 100644 --- a/target/linux/lantiq/dts/DGN3500.dts +++ b/target/linux/lantiq/dts/DGN3500.dts @@ -3,5 +3,6 @@ #include "DGN3500.dtsi" / { - model = "DGN3500 - Netgear DGN3500"; + compatible = "netgear,dgn3500", "lantiq,xway", "lantiq,ar9"; + model = "Netgear DGN3500"; }; diff --git a/target/linux/lantiq/dts/DGN3500B.dts b/target/linux/lantiq/dts/DGN3500B.dts index d0ed5ebd53e525..d1d788cc7d5d6d 100644 --- a/target/linux/lantiq/dts/DGN3500B.dts +++ b/target/linux/lantiq/dts/DGN3500B.dts @@ -3,5 +3,6 @@ #include "DGN3500.dtsi" / { - model = "DGN3500B - Netgear DGN3500B"; + compatible = "netgear,dgn3500b", "lantiq,xway", "lantiq,ar9"; + model = "Netgear DGN3500B"; }; diff --git a/target/linux/lantiq/dts/DM200.dts b/target/linux/lantiq/dts/DM200.dts index 050d558a298902..eef4084915e946 100644 --- a/target/linux/lantiq/dts/DM200.dts +++ b/target/linux/lantiq/dts/DM200.dts @@ -5,7 +5,8 @@ #include / { - model = "DM200 - Netgear DM200"; + compatible = "netgear,dm200", "lantiq,xway", "lantiq,vr9"; + model = "Netgear DM200"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/EASY50712.dts b/target/linux/lantiq/dts/EASY50712.dts index ec3516ca8cc92f..ebd30a7c06614d 100644 --- a/target/linux/lantiq/dts/EASY50712.dts +++ b/target/linux/lantiq/dts/EASY50712.dts @@ -3,7 +3,8 @@ #include "danube.dtsi" / { - model = "EASY50712 - Intel EASY50712 Nand"; + compatible = "lantiq,easy50712", "lantiq,xway", "lantiq,danube"; + model = "Intel EASY50712 Nand"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/EASY50810.dts b/target/linux/lantiq/dts/EASY50810.dts index 7c274a15a65853..605eb826a20894 100644 --- a/target/linux/lantiq/dts/EASY50810.dts +++ b/target/linux/lantiq/dts/EASY50810.dts @@ -3,6 +3,9 @@ #include "ar9.dtsi" / { + compatible = "lantiq,easy50810", "lantiq,xway", "lantiq,ar9"; + model = "Lantiq EASY50810"; + chosen { bootargs = "console=ttyLTQ0,115200"; }; diff --git a/target/linux/lantiq/dts/EASY80920.dtsi b/target/linux/lantiq/dts/EASY80920.dtsi index 220916266039be..3565842f247218 100644 --- a/target/linux/lantiq/dts/EASY80920.dtsi +++ b/target/linux/lantiq/dts/EASY80920.dtsi @@ -3,6 +3,8 @@ #include / { + compatible = "lantiq,easy80920", "lantiq,xway", "lantiq,vr9"; + chosen { bootargs = "console=ttyLTQ0,115200"; }; diff --git a/target/linux/lantiq/dts/EASY80920NAND.dts b/target/linux/lantiq/dts/EASY80920NAND.dts index 332f2fb35c6573..095bd564da7457 100644 --- a/target/linux/lantiq/dts/EASY80920NAND.dts +++ b/target/linux/lantiq/dts/EASY80920NAND.dts @@ -4,7 +4,8 @@ #include "EASY80920.dtsi" / { - model = "EASY80920NAND - Intel EASY80920 Nand"; + compatible = "lantiq,easy80920-nand", "lantiq,easy80920", "lantiq,xway", "lantiq,vr9"; + model = "Intel EASY80920 Nand"; chosen { bootargs = "ubi.mtd=ubi ubi.block=0,rootfsA root=/dev/ubiblock0_1"; @@ -14,7 +15,7 @@ localbus@0 { ranges = <0 0 0x4000000 0x3ffffff>; nand-parts@0 { - compatible = "gen_nand", "lantiq,nand-xway"; + compatible = "lantiq,nand-xway"; lantiq,cs = <1>; bank-width = <2>; reg = <0 0x0 0x2000000>; diff --git a/target/linux/lantiq/dts/EASY80920NOR.dts b/target/linux/lantiq/dts/EASY80920NOR.dts index 6ad17d6fcc0d79..e273138d8a696b 100644 --- a/target/linux/lantiq/dts/EASY80920NOR.dts +++ b/target/linux/lantiq/dts/EASY80920NOR.dts @@ -4,7 +4,8 @@ #include "EASY80920.dtsi" / { - model = "EASY80920NOR - Intel EASY80920 Nor"; + compatible = "lantiq,easy80920-nor", "lantiq,easy80920", "lantiq,xway", "lantiq,vr9"; + model = "Intel EASY80920 Nor"; fpi@10000000 { localbus@0 { diff --git a/target/linux/lantiq/dts/EASY88388.dts b/target/linux/lantiq/dts/EASY88388.dts index a6382e785f9a77..a9c5b3c24b067c 100644 --- a/target/linux/lantiq/dts/EASY88388.dts +++ b/target/linux/lantiq/dts/EASY88388.dts @@ -5,8 +5,8 @@ #include "falcon-sflash-16M.dtsi" / { - model = "EASY88388 - Lantiq Falcon FTTDP8 Reference Board"; - compatible = "lantiq,falcon-easy88388", "lantiq,falcon"; + model = "Lantiq Falcon FTTDP8 Reference Board"; + compatible = "lantiq,easy88388", "lantiq,falcon"; aliases { spi0 = &ebu_cs0; diff --git a/target/linux/lantiq/dts/EASY88444.dts b/target/linux/lantiq/dts/EASY88444.dts index 583f5fbcd6e3a6..ceb81ea13b18de 100644 --- a/target/linux/lantiq/dts/EASY88444.dts +++ b/target/linux/lantiq/dts/EASY88444.dts @@ -5,8 +5,8 @@ #include "falcon-sflash-16M.dtsi" / { - model = "EASY88444 - Lantiq Falcon FTTdp G.FAST Reference Board"; - compatible = "lantiq,falcon-easy88444", "lantiq,falcon"; + model = "Lantiq Falcon FTTdp G.FAST Reference Board"; + compatible = "lantiq,easy88444", "lantiq,falcon"; aliases { spi0 = &ebu_cs0; diff --git a/target/linux/lantiq/dts/EASY98000-base.dtsi b/target/linux/lantiq/dts/EASY98000-base.dtsi index ccb96247e4d25b..cfe1140ac1474a 100644 --- a/target/linux/lantiq/dts/EASY98000-base.dtsi +++ b/target/linux/lantiq/dts/EASY98000-base.dtsi @@ -3,7 +3,7 @@ #include / { - compatible = "lantiq,falcon-easy98000", "lantiq,falcon"; + compatible = "lantiq,easy98000", "lantiq,falcon"; memory@0 { device_type = "memory"; diff --git a/target/linux/lantiq/dts/EASY98000NAND.dts b/target/linux/lantiq/dts/EASY98000NAND.dts index 0e5b89d50e16a7..a40cef39310a1c 100644 --- a/target/linux/lantiq/dts/EASY98000NAND.dts +++ b/target/linux/lantiq/dts/EASY98000NAND.dts @@ -4,8 +4,8 @@ #include "EASY98000-base.dtsi" / { - model = "EASY98000NAND - Lantiq Falcon (NAND)"; - compatible = "lantiq,falcon-easy98000-nand", "lantiq,falcon-easy98000", "lantiq,falcon"; + model = "Lantiq Falcon (NAND)"; + compatible = "lantiq,easy98000-nand", "lantiq,easy98000", "lantiq,falcon"; aliases { spi0 = &spi; diff --git a/target/linux/lantiq/dts/EASY98000NOR.dts b/target/linux/lantiq/dts/EASY98000NOR.dts index 812ffb6c5ccfd8..ad53bf96e99118 100644 --- a/target/linux/lantiq/dts/EASY98000NOR.dts +++ b/target/linux/lantiq/dts/EASY98000NOR.dts @@ -4,8 +4,8 @@ #include "EASY98000-base.dtsi" / { - model = "EASY98000NOR - Lantiq Falcon (NOR)"; - compatible = "lantiq,falcon-easy98000-nor", "lantiq,falcon-easy98000", "lantiq,falcon"; + model = "Lantiq Falcon (NOR)"; + compatible = "lantiq,easy98000-nor", "lantiq,easy98000", "lantiq,falcon"; aliases { spi0 = &spi; diff --git a/target/linux/lantiq/dts/EASY98000SFLASH.dts b/target/linux/lantiq/dts/EASY98000SFLASH.dts index 4fb5ba577df3e6..bbe524e94ef2fc 100644 --- a/target/linux/lantiq/dts/EASY98000SFLASH.dts +++ b/target/linux/lantiq/dts/EASY98000SFLASH.dts @@ -5,8 +5,8 @@ #include "falcon-sflash-16M.dtsi" / { - model = "EASY98000SFLASH - Lantiq Falcon (SFLASH)"; - compatible = "lantiq,falcon-easy98000-sflash", "lantiq,falcon-easy98000", "lantiq,falcon"; + model = "Lantiq Falcon (SFLASH)"; + compatible = "lantiq,easy98000-sflash", "lantiq,easy98000", "lantiq,falcon"; aliases { spi0 = &ebu_cs0; diff --git a/target/linux/lantiq/dts/EASY98020.dts b/target/linux/lantiq/dts/EASY98020.dts index 5e5e13017b2f45..c0970ef48cf42c 100644 --- a/target/linux/lantiq/dts/EASY98020.dts +++ b/target/linux/lantiq/dts/EASY98020.dts @@ -6,8 +6,8 @@ #include "falcon-sflash-16M.dtsi" / { - model = "EASY98020 - Lantiq Falcon Reference Board"; - compatible = "lantiq,falcon-easy98020", "lantiq,falcon"; + model = "Lantiq Falcon Reference Board"; + compatible = "lantiq,easy98020", "lantiq,falcon"; aliases { spi0 = &ebu_cs0; diff --git a/target/linux/lantiq/dts/EASY98020V18.dts b/target/linux/lantiq/dts/EASY98020V18.dts index 136f56c9ff2d6d..9aa1be91edcf64 100644 --- a/target/linux/lantiq/dts/EASY98020V18.dts +++ b/target/linux/lantiq/dts/EASY98020V18.dts @@ -6,8 +6,8 @@ #include "falcon-sflash-16M.dtsi" / { - model = "EASY98020V18 - Lantiq Falcon Reference Board V1.8"; - compatible = "lantiq,falcon-easy98020-V18", "lantiq,falcon-easy98020", "lantiq,falcon"; + model = "Lantiq Falcon Reference Board V1.8"; + compatible = "lantiq,easy98020-v18", "lantiq,easy98020", "lantiq,falcon"; aliases { spi0 = &ebu_cs0; diff --git a/target/linux/lantiq/dts/EASY98021.dts b/target/linux/lantiq/dts/EASY98021.dts index a7c5ad9bc0c0a5..7b2e490fcc0eed 100644 --- a/target/linux/lantiq/dts/EASY98021.dts +++ b/target/linux/lantiq/dts/EASY98021.dts @@ -6,8 +6,8 @@ #include "falcon-sflash-16M.dtsi" / { - model = "EASY98021 - Lantiq Falcon HGU Reference Board"; - compatible = "lantiq,falcon-easy98021", "lantiq,falcon-easy98020", "lantiq,falcon"; + model = "Lantiq Falcon HGU Reference Board"; + compatible = "lantiq,easy98021", "lantiq,easy98020", "lantiq,falcon"; aliases { spi0 = &ebu_cs0; diff --git a/target/linux/lantiq/dts/EASY98035SYNCE.dts b/target/linux/lantiq/dts/EASY98035SYNCE.dts index f6d98e79adba4f..df941cdb67acff 100644 --- a/target/linux/lantiq/dts/EASY98035SYNCE.dts +++ b/target/linux/lantiq/dts/EASY98035SYNCE.dts @@ -4,8 +4,8 @@ #include "falcon-sflash-16M.dtsi" / { - model = "EASY98035SYNCE - Lantiq Falcon SFP Stick with SyncE"; - compatible = "lantiq,falcon-easy98035synce", "lantiq,falcon-sfp", "lantiq,falcon"; + model = "Lantiq Falcon SFP Stick with SyncE"; + compatible = "lantiq,easy98035synce", "lantiq,falcon-sfp", "lantiq,falcon"; aliases { spi0 = &ebu_cs0; diff --git a/target/linux/lantiq/dts/EASY98035SYNCE1588.dts b/target/linux/lantiq/dts/EASY98035SYNCE1588.dts index 8cefef8c14687f..a3abc6e7078ea6 100644 --- a/target/linux/lantiq/dts/EASY98035SYNCE1588.dts +++ b/target/linux/lantiq/dts/EASY98035SYNCE1588.dts @@ -4,8 +4,8 @@ #include "falcon-sflash-16M.dtsi" / { - model = "EASY98035SYNCE1588 - Lantiq Falcon SFP Stick with SyncE/1588"; - compatible = "lantiq,falcon-easy98035synce1588", "lantiq,falcon-sfp", "lantiq,falcon"; + model = "Lantiq Falcon SFP Stick with SyncE/1588"; + compatible = "lantiq,easy98035synce1588", "lantiq,falcon-sfp", "lantiq,falcon"; aliases { spi0 = &ebu_cs0; diff --git a/target/linux/lantiq/dts/FALCON-MDU.dts b/target/linux/lantiq/dts/FALCON-MDU.dts index 32b7e235579fc9..6710bbe98e9482 100644 --- a/target/linux/lantiq/dts/FALCON-MDU.dts +++ b/target/linux/lantiq/dts/FALCON-MDU.dts @@ -6,7 +6,7 @@ #include "falcon-sflash-16M.dtsi" / { - model = "FALCON-MDU - Lantiq Falcon / Vinax MDU Board"; + model = "Lantiq Falcon / Vinax MDU Board"; compatible = "lantiq,falcon-mdu", "lantiq,falcon"; aliases { diff --git a/target/linux/lantiq/dts/FALCON-SFP.dts b/target/linux/lantiq/dts/FALCON-SFP.dts index bba52d87682a54..8d45de4ebe4e89 100644 --- a/target/linux/lantiq/dts/FALCON-SFP.dts +++ b/target/linux/lantiq/dts/FALCON-SFP.dts @@ -4,7 +4,7 @@ #include "falcon-sflash-16M.dtsi" / { - model = "FALCON-SFP - Lantiq Falcon SFP Stick"; + model = "Lantiq Falcon SFP Stick"; compatible = "lantiq,falcon-sfp", "lantiq,falcon"; aliases { diff --git a/target/linux/lantiq/dts/FRITZ3370.dts b/target/linux/lantiq/dts/FRITZ3370.dts index 3f57f45ee882c9..76f7f877bc7d8b 100644 --- a/target/linux/lantiq/dts/FRITZ3370.dts +++ b/target/linux/lantiq/dts/FRITZ3370.dts @@ -5,7 +5,8 @@ #include / { - model = "FRITZ3370 - Fritz!Box WLAN 3370"; + compatible = "avm,fritz3370", "lantiq,xway", "lantiq,vr9"; + model = "Fritz!Box WLAN 3370"; chosen { bootargs = "console=ttyLTQ0,115200 ubi.mtd=1,512 root=/dev/mtdblock9"; @@ -28,7 +29,7 @@ fpi@10000000 { localbus@0 { nand-parts@0 { - compatible = "gen_nand", "lantiq,nand-xway"; + compatible = "lantiq,nand-xway"; bank-width = <2>; reg = <1 0x0 0x2000000>; #address-cells = <1>; diff --git a/target/linux/lantiq/dts/FRITZ7320.dts b/target/linux/lantiq/dts/FRITZ7320.dts index 491baee7ea9a1c..34d0df9b3b39b7 100644 --- a/target/linux/lantiq/dts/FRITZ7320.dts +++ b/target/linux/lantiq/dts/FRITZ7320.dts @@ -5,7 +5,8 @@ #include / { - model = "FRITZ7320 - 1&1 HomeServer"; + compatible = "avm,fritz7320", "lantiq,xway", "lantiq,ar9"; + model = "1&1 HomeServer"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/FRITZ7360SL.dts b/target/linux/lantiq/dts/FRITZ7360SL.dts index 496fe2e96d4ab1..cf82451400f963 100644 --- a/target/linux/lantiq/dts/FRITZ7360SL.dts +++ b/target/linux/lantiq/dts/FRITZ7360SL.dts @@ -5,7 +5,8 @@ #include / { - model = "FRITZ7360SL - 1&1 HomeServer"; + compatible = "avm,fritz7360sl", "lantiq,xway", "lantiq,vr9"; + model = "1&1 HomeServer"; chosen { bootargs = "console=ttyLTQ0,115200"; @@ -191,12 +192,12 @@ compatible = "lantiq,xrx200-mdio"; phy0: ethernet-phy@0 { reg = <0x00>; - compatible = "ethernet-phy-id004d.d076", "ethernet-phy-ieee802.3-c22"; + compatible = "ethernet-phy-ieee802.3-c22"; reset-gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; phy1: ethernet-phy@1 { reg = <0x01>; - compatible = "ethernet-phy-id004d.d076", "ethernet-phy-ieee802.3-c22"; + compatible = "ethernet-phy-ieee802.3-c22"; reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; phy11: ethernet-phy@11 { diff --git a/target/linux/lantiq/dts/GIGASX76X.dts b/target/linux/lantiq/dts/GIGASX76X.dts index f5707e9c9b94bb..99ccbce296ce98 100644 --- a/target/linux/lantiq/dts/GIGASX76X.dts +++ b/target/linux/lantiq/dts/GIGASX76X.dts @@ -5,7 +5,8 @@ #include / { - model = "GIGASX76X - Gigaset SX761,SX762,SX763"; + compatible = "siemens,gigaset-sx76x", "lantiq,xway", "lantiq,danube"; + model = "Gigaset SX761,SX762,SX763"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/H201L.dts b/target/linux/lantiq/dts/H201L.dts index a24d7590e4a93d..01016f45c9ba42 100644 --- a/target/linux/lantiq/dts/H201L.dts +++ b/target/linux/lantiq/dts/H201L.dts @@ -5,7 +5,8 @@ #include / { - model = "H201L - ZTE H210L"; + compatible = "zte,h201l", "lantiq,xway", "lantiq,ar9"; + model = "ZTE H210L"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/P2601HNFX.dts b/target/linux/lantiq/dts/P2601HNFX.dts index 7bfd52cf571c72..1b885ad84135ec 100644 --- a/target/linux/lantiq/dts/P2601HNFX.dts +++ b/target/linux/lantiq/dts/P2601HNFX.dts @@ -5,7 +5,8 @@ #include / { - model = "P2601HNFX - ZyXEL P-2601HN-Fx"; + compatible = "zyxel,p-2601hn", "lantiq,xway", "lantiq,ar9"; + model = "ZyXEL P-2601HN-Fx"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/P2812HNUF1.dts b/target/linux/lantiq/dts/P2812HNUF1.dts index b1d9eedb35d769..4a29cd92960f22 100644 --- a/target/linux/lantiq/dts/P2812HNUF1.dts +++ b/target/linux/lantiq/dts/P2812HNUF1.dts @@ -3,7 +3,8 @@ #include "P2812HNUFX.dtsi" / { - model = "P2812HNUF1 - ZyXEL P-2812HNU-F1"; + compatible = "zyxel,p-2812hnu-f1", "zyxel,p-2812hnu", "lantiq,xway", "lantiq,vr9"; + model = "ZyXEL P-2812HNU-F1"; aliases { led-usb = &usb1; @@ -13,7 +14,7 @@ fpi@10000000 { localbus@0 { nand-parts@0 { - compatible = "gen_nand", "lantiq,nand-xway"; + compatible = "lantiq,nand-xway"; lantiq,cs = <1>; bank-width = <2>; reg = <0 0x0 0x2000000>; diff --git a/target/linux/lantiq/dts/P2812HNUF3.dts b/target/linux/lantiq/dts/P2812HNUF3.dts index 366d0346700bc3..d37ad0a8e52430 100644 --- a/target/linux/lantiq/dts/P2812HNUF3.dts +++ b/target/linux/lantiq/dts/P2812HNUF3.dts @@ -3,7 +3,8 @@ #include "P2812HNUFX.dtsi" / { - model = "P2812HNUF3 - ZyXEL P-2812HNU-F3"; + compatible = "zyxel,p-2812hnu-f3", "zyxel,p-2812hnu", "lantiq,xway", "lantiq,vr9"; + model = "ZyXEL P-2812HNU-F3"; fpi@10000000 { localbus@0 { @@ -36,7 +37,7 @@ }; nand-parts@0 { - compatible = "gen_nand", "lantiq,nand-xway"; + compatible = "lantiq,nand-xway"; lantiq,cs = <1>; bank-width = <2>; reg = <1 0x0 0x2000000>; diff --git a/target/linux/lantiq/dts/P2812HNUFX.dtsi b/target/linux/lantiq/dts/P2812HNUFX.dtsi index cc133f65ff177e..9429d5caf3f8aa 100644 --- a/target/linux/lantiq/dts/P2812HNUFX.dtsi +++ b/target/linux/lantiq/dts/P2812HNUFX.dtsi @@ -3,6 +3,8 @@ #include / { + compatible = "zyxel,p-2812hnu", "lantiq,xway", "lantiq,vr9"; + chosen { bootargs = "console=ttyLTQ0,115200"; }; diff --git a/target/linux/lantiq/dts/TDW8970.dts b/target/linux/lantiq/dts/TDW8970.dts index 6a376a05c516bd..25eb3dac67977d 100644 --- a/target/linux/lantiq/dts/TDW8970.dts +++ b/target/linux/lantiq/dts/TDW8970.dts @@ -3,5 +3,6 @@ #include "TDW89X0.dtsi" / { - model = "TDW8970 - TP-LINK TD-W8970"; + compatible = "tplink,tdw8970", "tplink,tdw89x0", "lantiq,xway", "lantiq,vr9"; + model = "TP-LINK TD-W8970"; }; diff --git a/target/linux/lantiq/dts/TDW8980.dts b/target/linux/lantiq/dts/TDW8980.dts index 0796b2b234a425..def34b55bb41db 100644 --- a/target/linux/lantiq/dts/TDW8980.dts +++ b/target/linux/lantiq/dts/TDW8980.dts @@ -3,7 +3,8 @@ #include "TDW89X0.dtsi" / { - model = "TDW8980 - TP-LINK TD-W8980"; + compatible = "tplink,tdw8980", "tplink,tdw89x0", "lantiq,xway", "lantiq,vr9"; + model = "TP-LINK TD-W8980"; fpi@10000000 { gpio: pinmux@E100B10 { diff --git a/target/linux/lantiq/dts/TDW89X0.dtsi b/target/linux/lantiq/dts/TDW89X0.dtsi index 4252297df766ca..79bcfc103b6001 100644 --- a/target/linux/lantiq/dts/TDW89X0.dtsi +++ b/target/linux/lantiq/dts/TDW89X0.dtsi @@ -3,6 +3,8 @@ #include / { + compatible = "tplink,tdw89x0", "lantiq,xway", "lantiq,vr9"; + chosen { bootargs = "console=ttyLTQ0,115200"; }; diff --git a/target/linux/lantiq/dts/VG3503J.dts b/target/linux/lantiq/dts/VG3503J.dts index 99fe486dc66124..cb0d5ddecd2f12 100644 --- a/target/linux/lantiq/dts/VG3503J.dts +++ b/target/linux/lantiq/dts/VG3503J.dts @@ -5,7 +5,8 @@ #include / { - model = "VG3503J - BT OpenReach VDSL Modem"; + compatible = "arcadyan,vg3503j", "lantiq,xway", "lantiq,vr9"; + model = "BT OpenReach VDSL Modem"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/VGV7510KW22.dtsi b/target/linux/lantiq/dts/VGV7510KW22.dtsi index 73240bf2bc3690..2d8e528f4e06f9 100644 --- a/target/linux/lantiq/dts/VGV7510KW22.dtsi +++ b/target/linux/lantiq/dts/VGV7510KW22.dtsi @@ -3,6 +3,8 @@ #include / { + compatible = "arcadyan,vgv7510kw22", "lantiq,xway", "lantiq,vr9"; + chosen { bootargs = "console=ttyLTQ0,115200 mem=62M vpe1_load_addr=0x83e00000 vpe1_mem=2M maxvpes=1 maxtcs=1 nosmp"; }; @@ -228,7 +230,7 @@ phy1: ethernet-phy@1 { reg = <0x1>; - compatible = "ethernet-phy-id0243.0c54", "ethernet-phy-ieee802.3-c22"; + compatible = "ethernet-phy-ieee802.3-c22"; }; phy11: ethernet-phy@11 { diff --git a/target/linux/lantiq/dts/VGV7510KW22BRN.dts b/target/linux/lantiq/dts/VGV7510KW22BRN.dts index 2fec1aeddea8e9..d0be62f632f580 100644 --- a/target/linux/lantiq/dts/VGV7510KW22BRN.dts +++ b/target/linux/lantiq/dts/VGV7510KW22BRN.dts @@ -3,7 +3,8 @@ #include "VGV7510KW22.dtsi" / { - model = "VGV7510KW22BRN - o2 Box 6431"; + compatible = "arcadyan,vgv7510kw22-brn", "arcadyan,vgv7510kw22", "lantiq,xway", "lantiq,vr9"; + model = "o2 Box 6431"; sram@1F000000 { cgu@103000 { diff --git a/target/linux/lantiq/dts/VGV7510KW22NOR.dts b/target/linux/lantiq/dts/VGV7510KW22NOR.dts index 5dfc149c3b9159..1d21e14f0ae841 100644 --- a/target/linux/lantiq/dts/VGV7510KW22NOR.dts +++ b/target/linux/lantiq/dts/VGV7510KW22NOR.dts @@ -3,7 +3,8 @@ #include "VGV7510KW22.dtsi" / { - model = "VGV7510KW22NOR - o2 Box 6431"; + compatible = "arcadyan,vgv7510kw22-nor", "arcadyan,vgv7510kw22", "lantiq,xway", "lantiq,vr9"; + model = "o2 Box 6431"; fpi@10000000 { localbus@0 { diff --git a/target/linux/lantiq/dts/VGV7519.dtsi b/target/linux/lantiq/dts/VGV7519.dtsi index 0c2da5279a361b..edff93cf479998 100644 --- a/target/linux/lantiq/dts/VGV7519.dtsi +++ b/target/linux/lantiq/dts/VGV7519.dtsi @@ -3,6 +3,8 @@ #include / { + compatible = "arcadyan,vgv7519", "lantiq,xway", "lantiq,vr9"; + chosen { bootargs = "console=ttyLTQ0,115200 mem=62M vpe1_load_addr=0x83e00000 vpe1_mem=2M maxvpes=1 maxtcs=1 nosmp"; }; diff --git a/target/linux/lantiq/dts/VGV7519BRN.dts b/target/linux/lantiq/dts/VGV7519BRN.dts index 3d51aaa43a85bb..f30d2f920ece76 100644 --- a/target/linux/lantiq/dts/VGV7519BRN.dts +++ b/target/linux/lantiq/dts/VGV7519BRN.dts @@ -4,7 +4,8 @@ #include "VGV7519.dtsi" / { - model = "VGV7519BRN - KPN Experiabox V8"; + compatible = "arcadyan,vgv7519-brn", "arcadyan,vgv7519", "lantiq,xway", "lantiq,vr9"; + model = "KPN Experiabox V8"; fpi@10000000 { localbus@0 { diff --git a/target/linux/lantiq/dts/VGV7519NOR.dts b/target/linux/lantiq/dts/VGV7519NOR.dts index 4ca820844bbd1b..ec548fbe728cb9 100644 --- a/target/linux/lantiq/dts/VGV7519NOR.dts +++ b/target/linux/lantiq/dts/VGV7519NOR.dts @@ -4,7 +4,8 @@ #include "VGV7519.dtsi" / { - model = "VGV7519NOR - KPN Experiabox V8"; + compatible = "arcadyan,vgv7519-nor", "arcadyan,vgv7519", "lantiq,xway", "lantiq,vr9"; + model = "KPN Experiabox V8"; fpi@10000000 { localbus@0 { diff --git a/target/linux/lantiq/dts/VR200v.dts b/target/linux/lantiq/dts/VR200v.dts index 11930ba67655d1..b063d758c3a63a 100644 --- a/target/linux/lantiq/dts/VR200v.dts +++ b/target/linux/lantiq/dts/VR200v.dts @@ -5,7 +5,8 @@ #include / { - model = "VR200v - TP-LINK Archer VR200v"; + compatible = "tplink,vr200v", "lantiq,xway", "lantiq,vr9"; + model = "TP-LINK Archer VR200v"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/WBMR.dts b/target/linux/lantiq/dts/WBMR.dts index 79d7b63bffd793..fab99d00e763de 100644 --- a/target/linux/lantiq/dts/WBMR.dts +++ b/target/linux/lantiq/dts/WBMR.dts @@ -5,7 +5,8 @@ #include / { - model = "WBMR - Buffalo WBMR-HP-G300H"; + compatible = "buffalo,wbmr-hp-g300h", "lantiq,xway", "lantiq,ar9"; + model = "Buffalo WBMR-HP-G300H"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/WBMR300.dts b/target/linux/lantiq/dts/WBMR300.dts index d89e8a19dbb5be..de2be582f575b7 100644 --- a/target/linux/lantiq/dts/WBMR300.dts +++ b/target/linux/lantiq/dts/WBMR300.dts @@ -5,7 +5,8 @@ #include / { - model = "WBMR300 - Buffalo WBMR-300HPD"; + compatible = "buffalo,wbmr-300hpd", "lantiq,xway", "lantiq,vr9"; + model = "Buffalo WBMR-300HPD"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/dts/amazonse.dtsi b/target/linux/lantiq/dts/amazonse.dtsi index e88fc161b73e0e..e6925a3adf5d57 100644 --- a/target/linux/lantiq/dts/amazonse.dtsi +++ b/target/linux/lantiq/dts/amazonse.dtsi @@ -104,6 +104,7 @@ "spi_frm"; #address-cells = <1>; #size-cells = <1>; + status = "disabled"; }; gptu@E100A00 { diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index f6795ee61a24d4..dcd0c710d10e41 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -60,10 +60,9 @@ define Device/Default KERNEL := kernel-bin | append-dtb | lzma | uImage lzma KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma FILESYSTEMS := squashfs - DEVICE_DTS := $(1) DEVICE_DTS_DIR := ../dts IMAGE_SIZE := - SUPPORTED_DEVICES = $$(DEVICE_DTS) + SUPPORTED_DEVICES := $(subst _,$(comma),$(1)) IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) endef @@ -97,8 +96,8 @@ DEVICE_VARS += SIGNATURE MAGIC CRC32_POLY define Device/lantiqFullImage KERNEL := kernel-bin | append-dtb | lzma | uImage lzma | pad-offset 4 0 - IMAGES := sysupgrade.bin fullimage.img - IMAGE/fullimage.img := fullimage | check-size $$$$(IMAGE_SIZE) + IMAGES := sysupgrade.bin fullimage.bin + IMAGE/fullimage.bin := fullimage | check-size $$$$(IMAGE_SIZE) endef define Device/AVM @@ -109,7 +108,7 @@ endef ifeq ($(SUBTARGET),ase) -define Device/ALL0333CJ +define Device/allnet_all0333cj IMAGE_SIZE := 3700k DEVICE_DTS := ALL0333CJ DEVICE_TITLE := Allnet ALL0333CJ @@ -117,75 +116,86 @@ define Device/ALL0333CJ kmod-ltq-adsl-ase-fw-b kmod-ltq-atm-ase \ ltq-adsl-app ppp-mod-pppoe endef -TARGET_DEVICES += ALL0333CJ +TARGET_DEVICES += allnet_all0333cj -define Device/DGN1000B +define Device/netgear_dgn1000b IMAGE_SIZE := 6000k DEVICE_DTS := DGN1000B DEVICE_TITLE := Netgear DGN1000B DEVICE_PACKAGES := kmod-ltq-adsl-ase kmod-ltq-adsl-ase-mei \ kmod-ltq-adsl-ase-fw-b kmod-ltq-atm-ase \ ltq-adsl-app ppp-mod-pppoe + SUPPORTED_DEVICES += DGN1000B endef -TARGET_DEVICES += DGN1000B +TARGET_DEVICES += netgear_dgn1000b endif ifeq ($(SUBTARGET),xway_legacy) -define Device/ARV4520PW +define Device/arcadyan_arv4520pw IMAGE_SIZE := 3648k + DEVICE_DTS := ARV4520PW DEVICE_TITLE := Easybox 800, WAV-281 - ARV4520PW DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ ltq-adsl-app ppp-mod-pppoa \ kmod-rt61-pci wpad-mini + SUPPORTED_DEVICES += ARV4520PW endef -TARGET_DEVICES += ARV4520PW +TARGET_DEVICES += arcadyan_arv4520pw -define Device/ARV4525PW +define Device/arcadyan_arv4525pw IMAGE_SIZE := 3776k + DEVICE_DTS := ARV4525PW DEVICE_TITLE := Speedport W502V Typ A - ARV4525PW DEVICE_PACKAGES := kmod-ath5k wpad-mini \ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ ltq-adsl-app ppp-mod-pppoa -swconfig + SUPPORTED_DEVICES += ARV4525PW endef -TARGET_DEVICES += ARV4525PW +TARGET_DEVICES += arcadyan_arv4525pw -define Device/ARV452CQW +define Device/arcadyan_arv452cqw IMAGE_SIZE := 3776k + DEVICE_DTS := ARV452CQW DEVICE_TITLE := Easybox 801 - ARV452CQW DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ kmod-ath5k wpad-mini \ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ ltq-adsl-app ppp-mod-pppoa + SUPPORTED_DEVICES += ARV452CQW endef -TARGET_DEVICES += ARV452CQW +TARGET_DEVICES += arcadyan_arv452cqw -define Device/ARV4518PWR01 +define Device/arcadyan_arv4518pwr01 IMAGE_SIZE := 3776k + DEVICE_DTS := ARV4518PWR01 DEVICE_TITLE := ARV4518PWR01 DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ ltq-adsl-app ppp-mod-pppoa \ kmod-ath5k wpad-mini + SUPPORTED_DEVICES += ARV4518PWR01 endef -TARGET_DEVICES += ARV4518PWR01 +TARGET_DEVICES += arcadyan_arv4518pwr01 -define Device/ARV4518PWR01A +define Device/arcadyan_arv4518pwr01a IMAGE_SIZE := 3776k + DEVICE_DTS := ARV4518PWR01A DEVICE_TITLE := ARV4518PWR01A DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ ltq-adsl-app ppp-mod-pppoa \ kmod-ath5k wpad-mini + SUPPORTED_DEVICES += ARV4518PWR01A endef -TARGET_DEVICES += ARV4518PWR01A +TARGET_DEVICES += arcadyan_arv4518pwr01a endif @@ -193,8 +203,10 @@ ifeq ($(SUBTARGET),xway) # Danube -define Device/BTHOMEHUBV2B +define Device/bt_homehub-v2b $(Device/NAND) + BOARD_NAME := BTHOMEHUBV2B + DEVICE_DTS := BTHOMEHUBV2B DEVICE_TITLE := BT Home Hub 2B DEVICE_PACKAGES := kmod-usb-dwc2 \ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ @@ -202,17 +214,20 @@ define Device/BTHOMEHUBV2B kmod-ltq-deu-danube \ ltq-adsl-app ppp-mod-pppoa \ kmod-ath9k kmod-owl-loader wpad-mini + SUPPORTED_DEVICES += BTHOMEHUBV2B endef -TARGET_DEVICES += BTHOMEHUBV2B +TARGET_DEVICES += bt_homehub-v2b -define Device/EASY50712 +define Device/lantiq_easy50712 + DEVICE_DTS := EASY50712 IMAGE_SIZE := 3776k DEVICE_TITLE := Lantiq Danube - EASY50712 endef -TARGET_DEVICES += EASY50712 +TARGET_DEVICES += lantiq_easy50712 -define Device/ACMP252 +define Device/audiocodes_mp-252 IMAGE_SIZE := 14848k + DEVICE_DTS := ACMP252 DEVICE_TITLE := AudioCodes MediaPack MP-252 DEVICE_PACKAGES := kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ @@ -221,11 +236,13 @@ define Device/ACMP252 kmod-rt2800-pci \ ltq-adsl-app ppp-mod-pppoa \ wpad-mini + SUPPORTED_DEVICES += ACMP252 endef -TARGET_DEVICES += ACMP252 +TARGET_DEVICES += audiocodes_mp-252 -define Device/ARV4510PW +define Device/arcadyan_arv4510pw IMAGE_SIZE := 15616k + DEVICE_DTS := ARV4510PW DEVICE_TITLE := Wippies, Elisa - ARV4510PW DEVICE_PACKAGES := kmod-usb-ledtrig-usbport kmod-usb2-pci kmod-usb-uhci \ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ @@ -233,41 +250,49 @@ define Device/ARV4510PW ltq-adsl-app ppp-mod-pppoa \ kmod-ltq-tapi kmod-ltq-vmmc \ kmod-rt2800-pci kmod-ath5k wpad-mini + SUPPORTED_DEVICES += ARV4510PW endef -TARGET_DEVICES += ARV4510PW +TARGET_DEVICES += arcadyan_arv4510pw -define Device/ARV7525PW +define Device/arcadyan_arv7525pw IMAGE_SIZE := 3776k + DEVICE_DTS := ARV4510PW DEVICE_TITLE := Speedport W303V Typ A - ARV7525PW DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini \ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ ltq-adsl-app ppp-mod-pppoa -swconfig + SUPPORTED_DEVICES += ARV4510PW endef -TARGET_DEVICES += ARV7525PW +TARGET_DEVICES += arcadyan_arv7525pw -define Device/ARV4519PW +define Device/arcadyan_arv4519pw IMAGE_SIZE := 3776k + DEVICE_DTS := ARV4519PW DEVICE_TITLE := Vodafone, Pirelli - ARV4519PW DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ ltq-adsl-app ppp-mod-pppoa + SUPPORTED_DEVICES += ARV4519PW endef -TARGET_DEVICES += ARV4519PW +TARGET_DEVICES += arcadyan_arv4519pw -define Device/ARV7506PW11 +define Device/arcadyan_arv7506pw11 IMAGE_SIZE := 7808k + DEVICE_DTS := ARV7506PW11 DEVICE_TITLE := Alice/O2 IAD 4421 - ARV7506PW11 DEVICE_PACKAGES := kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ ltq-adsl-app ppp-mod-pppoa \ kmod-rt2800-pci wpad-mini + SUPPORTED_DEVICES += ARV7506PW11 endef -TARGET_DEVICES += ARV7506PW11 +TARGET_DEVICES += arcadyan_arv7506pw11 -define Device/ARV7510PW22 +define Device/arcadyan_arv7510pw22 IMAGE_SIZE := 31232k + DEVICE_DTS := ARV7510PW22 DEVICE_TITLE := Astoria - ARV7510PW22 DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ @@ -276,33 +301,39 @@ define Device/ARV7510PW22 kmod-ltq-tapi kmod-ltq-vmmc \ kmod-rt2800-pci wpad-mini \ kmod-usb-uhci kmod-usb2 kmod-usb2-pci + SUPPORTED_DEVICES += ARV7510PW22 endef -TARGET_DEVICES += ARV7510PW22 +TARGET_DEVICES += arcadyan_arv7510pw22 -define Device/ARV7518PW +define Device/arcadyan_arv7518pw IMAGE_SIZE := 7872k + DEVICE_DTS := ARV7518PW DEVICE_TITLE := Astoria - ARV7518PW DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ ltq-adsl-app ppp-mod-pppoa \ kmod-ath9k kmod-owl-loader wpad-mini + SUPPORTED_DEVICES += ARV7518PW endef -TARGET_DEVICES += ARV7518PW +TARGET_DEVICES += arcadyan_arv7518pw -define Device/ARV7519PW +define Device/arcadyan_arv7519pw IMAGE_SIZE := 15488k + DEVICE_DTS := ARV7519PW DEVICE_TITLE := Astoria - ARV7519PW DEVICE_PACKAGES := kmod-usb-dwc2 \ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ ltq-adsl-app ppp-mod-pppoa \ kmod-rt2800-pci wpad-mini + SUPPORTED_DEVICES += ARV7519PW endef -TARGET_DEVICES += ARV7519PW +TARGET_DEVICES += arcadyan_arv7519pw -define Device/ARV752DPW +define Device/arcadyan_arv752dpw IMAGE_SIZE := 7872k + DEVICE_DTS := ARV752DPW DEVICE_TITLE := Easybox 802 - ARV752DPW DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ @@ -310,11 +341,13 @@ define Device/ARV752DPW ltq-adsl-app ppp-mod-pppoa \ kmod-ltq-tapi kmod-ltq-vmmc \ kmod-rt2800-pci wpad-mini + SUPPORTED_DEVICES += ARV752DPW endef -TARGET_DEVICES += ARV752DPW +TARGET_DEVICES += arcadyan_arv752dpw -define Device/ARV752DPW22 +define Device/arcadyan_arv752dpw22 IMAGE_SIZE := 7616k + DEVICE_DTS := ARV752DPW22 DEVICE_TITLE := Easybox 803 - ARV752DPW22 DEVICE_PACKAGES := kmod-usb2-pci kmod-usb-uhci kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ @@ -322,36 +355,43 @@ define Device/ARV752DPW22 ltq-adsl-app ppp-mod-pppoa \ kmod-ltq-tapi kmod-ltq-vmmc \ kmod-rt2800-pci wpad-mini + SUPPORTED_DEVICES += ARV752DPW22 endef -TARGET_DEVICES += ARV752DPW22 +TARGET_DEVICES += arcadyan_arv752dpw22 -define Device/ARV8539PW22 +define Device/arcadyan_arv8539pw22 IMAGE_SIZE := 7616k + DEVICE_DTS := ARV8539PW22 DEVICE_TITLE := Speedport W504V Typ A - ARV8539PW22 DEVICE_PACKAGES := kmod-usb-dwc2 \ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ ltq-adsl-app ppp-mod-pppoa \ kmod-ath9k kmod-owl-loader wpad-mini + SUPPORTED_DEVICES += ARV8539PW22 endef -TARGET_DEVICES += ARV8539PW22 +TARGET_DEVICES += arcadyan_arv8539pw22 -define Device/GIGASX76X +define Device/siemens_gigaset-sx76x IMAGE_SIZE := 7680k + DEVICE_DTS := GIGASX76X DEVICE_TITLE := Gigaset sx76x DEVICE_PACKAGES := kmod-usb-dwc2 \ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ ltq-adsl-app ppp-mod-pppoe \ kmod-ath5k wpad-mini + SUPPORTED_DEVICES += GIGASX76X endef -TARGET_DEVICES += GIGASX76X +TARGET_DEVICES += siemens_gigaset-sx76x # AR9 -define Device/BTHOMEHUBV3A +define Device/bt_homehub-v3a $(Device/NAND) + BOARD_NAME := BTHOMEHUBV3A + DEVICE_DTS := BTHOMEHUBV3A DEVICE_TITLE := BT Home Hub 3A DEVICE_PACKAGES := kmod-usb-dwc2 \ kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ @@ -360,27 +400,29 @@ define Device/BTHOMEHUBV3A ltq-adsl-app ppp-mod-pppoa \ kmod-ath9k kmod-owl-loader wpad-mini \ uboot-envtools + SUPPORTED_DEVICES += BTHOMEHUBV3A endef -TARGET_DEVICES += BTHOMEHUBV3A +TARGET_DEVICES += bt_homehub-v3a DGN3500_KERNEL_OFFSET_HEX=0x50000 DGN3500_KERNEL_OFFSET_DEC=327680 -define Device/DGN3500 +define Device/netgear_dgn3500 + DEVICE_DTS := DGN3500 IMAGE_SIZE := 16000k IMAGES := \ - sysupgrade-NA.bin sysupgrade-WW.bin \ - factory-NA.img factory-WW.img - IMAGE/sysupgrade-NA.bin := \ + sysupgrade-na.bin sysupgrade.bin \ + factory-na.img factory.img + IMAGE/sysupgrade-na.bin := \ append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "NA" | \ pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) - IMAGE/sysupgrade-WW.bin := \ + IMAGE/sysupgrade.bin := \ append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "WW" | \ pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) - IMAGE/factory-NA.img := \ + IMAGE/factory-na.img := \ pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \ dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "NA" | pad-rootfs | \ check-size 16320k | pad-to 16384k - IMAGE/factory-WW.img := \ + IMAGE/factory.img := \ pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \ dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "WW" | pad-rootfs | \ check-size 16320k | pad-to 16384k @@ -391,10 +433,12 @@ define Device/DGN3500 kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \ ltq-adsl-app ppp-mod-pppoa \ kmod-ltq-deu-ar9 + SUPPORTED_DEVICES += DGN3500 endef -TARGET_DEVICES += DGN3500 +TARGET_DEVICES += netgear_dgn3500 -define Device/DGN3500B +define Device/netgear_dgn3500b + DEVICE_DTS := DGN3500B IMAGE_SIZE := 16000k IMAGES += factory.img IMAGE/sysupgrade.bin := \ @@ -411,10 +455,11 @@ define Device/DGN3500B kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ ltq-adsl-app ppp-mod-pppoa \ kmod-ltq-deu-ar9 + SUPPORTED_DEVICES += DGN3500B endef -TARGET_DEVICES += DGN3500B +TARGET_DEVICES += netgear_dgn3500b -define Device/WBMRA +define Device/buffalo_wbmr-hp-g300h-a IMAGE_SIZE := 31488k DEVICE_DTS := WBMR DEVICE_TITLE := Buffalo WBMR-HP-G300H (A) - WBMR @@ -423,10 +468,11 @@ define Device/WBMRA kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \ ltq-adsl-app ppp-mod-pppoa \ kmod-ath9k kmod-owl-loader wpad-mini + SUPPORTED_DEVICES := WBMR buffalo,wbmr-hp-g300h endef -TARGET_DEVICES += WBMRA +TARGET_DEVICES += buffalo_wbmr-hp-g300h-a -define Device/WBMRB +define Device/buffalo_wbmr-hp-g300h-b IMAGE_SIZE := 31488k DEVICE_DTS := WBMR DEVICE_TITLE := Buffalo WBMR-HP-G300H (B) - WBMR @@ -435,11 +481,13 @@ define Device/WBMRB kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ ltq-adsl-app ppp-mod-pppoa \ kmod-ath9k kmod-owl-loader wpad-mini + SUPPORTED_DEVICES := WBMR buffalo,wbmr-hp-g300h endef -TARGET_DEVICES += WBMRB +TARGET_DEVICES += buffalo_wbmr-hp-g300h-b -define Device/FRITZ7320 +define Device/avm_fritz7320 $(Device/AVM) + DEVICE_DTS := FRITZ7320 IMAGE_SIZE := 15744k DEVICE_TITLE := 1&1 HomeServer - FRITZ7320 DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-mini \ @@ -447,11 +495,13 @@ define Device/FRITZ7320 kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ ltq-adsl-app ppp-mod-pppoa \ kmod-ltq-deu-ar9 kmod-usb-dwc2 -swconfig + SUPPORTED_DEVICES += FRITZ7320 endef -TARGET_DEVICES += FRITZ7320 +TARGET_DEVICES += avm_fritz7320 -define Device/H201L +define Device/zte_h201l IMAGE_SIZE := 7808k + DEVICE_DTS := H201L DEVICE_TITLE := ZTE H201L - H201L DEVICE_PACKAGES := kmod-ath9k-htc wpad-mini \ kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ @@ -459,19 +509,22 @@ define Device/H201L ltq-adsl-app ppp-mod-pppoe \ kmod-ltq-deu-ar9 kmod-usb-dwc2 kmod-usb-ledtrig-usbport \ kmod-ltq-tapi kmod-ltq-vmmc + SUPPORTED_DEVICES += H201L endef -TARGET_DEVICES += H201L +TARGET_DEVICES += zte_h201l -define Device/P2601HNFX +define Device/zyxel_p-2601hn IMAGE_SIZE := 15616k + DEVICE_DTS := P2601HNFX DEVICE_TITLE := ZyXEL P-2601HN-Fx DEVICE_PACKAGES := kmod-rt2800-usb wpad-mini \ kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ ltq-adsl-app ppp-mod-pppoe \ kmod-ltq-deu-ar9 kmod-usb-dwc2 + SUPPORTED_DEVICES += P2601HNFX endef -TARGET_DEVICES += P2601HNFX +TARGET_DEVICES += zyxel_p-2601hn endif @@ -481,42 +534,55 @@ ifeq ($(SUBTARGET),xrx200) # VR9 -define Device/P2812HNUF1 +define Device/zyxel_p-2812hnu-f1 $(Device/NAND) + BOARD_NAME := P2812HNUF1 + DEVICE_DTS := P2812HNUF1 DEVICE_TITLE := ZyXEL P-2812HNU-F1 DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini kmod-usb-dwc2 kmod-usb-ledtrig-usbport + SUPPORTED_DEVICES += P2812HNUF1 endef -TARGET_DEVICES += P2812HNUF1 +TARGET_DEVICES += zyxel_p-2812hnu-f1 -define Device/P2812HNUF3 +define Device/zyxel_p-2812hnu-f3 $(Device/NAND) + BOARD_NAME := P2812HNUF3 + DEVICE_DTS := P2812HNUF3 DEVICE_TITLE := ZyXEL P-2812HNU-F3 DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini kmod-usb-dwc2 + SUPPORTED_DEVICES += P2812HNUF3 endef -TARGET_DEVICES += P2812HNUF3 +TARGET_DEVICES += zyxel_p-2812hnu-f3 -define Device/ARV7519RW22 +define Device/arcadyan_arv7519rw22 IMAGE_SIZE := 31232k + DEVICE_DTS := ARV7519RW22 DEVICE_TITLE := Livebox Astoria ARV7519RW22 DEVICE_PACKAGES := kmod-usb-dwc2 + SUPPORTED_DEVICES += ARV7519RW22 endef -TARGET_DEVICES += ARV7519RW22 +TARGET_DEVICES += arcadyan_arv7519rw22 -define Device/ASL56026 +define Device/alphanetworks_asl56026 + DEVICE_DTS := ASL56026 IMAGE_SIZE := 7488k DEVICE_TITLE := BT OpenReach - ECI VDSL Modem V-2FUb/I endef -TARGET_DEVICES += ASL56026 +TARGET_DEVICES += alphanetworks_asl56026 -define Device/BTHOMEHUBV5A +define Device/bt_homehub-v5a $(Device/NAND) + BOARD_NAME := BTHOMEHUBV5A + DEVICE_DTS := BTHOMEHUBV5A DEVICE_TITLE := BT Home Hub 5A DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader \ kmod-ath10k ath10k-firmware-qca988x wpad-mini kmod-usb-dwc2 + SUPPORTED_DEVICES += BTHOMEHUBV5A endef -TARGET_DEVICES += BTHOMEHUBV5A +TARGET_DEVICES += bt_homehub-v5a -define Device/DM200 +define Device/netgear_dm200 + DEVICE_DTS := DM200 IMAGES := sysupgrade.bin factory.img IMAGE/factory.img := $$(IMAGE/sysupgrade.bin) | netgear-dni IMAGE_SIZE := 7872k @@ -525,169 +591,200 @@ define Device/DM200 NETGEAR_HW_ID := 29765233+8+0+64+0+0 endef DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID -TARGET_DEVICES += DM200 +TARGET_DEVICES += netgear_dm200 -define Device/EASY80920NAND +define Device/lantiq_easy80920-nand $(Device/lantiqFullImage) + DEVICE_DTS := EASY80920NAND IMAGE_SIZE := 64512k DEVICE_TITLE := Lantiq VR9 - EASY80920NAND DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-mini kmod-usb-dwc2 kmod-usb-ledtrig-usbport endef -TARGET_DEVICES += EASY80920NAND +TARGET_DEVICES += lantiq_easy80920-nand -define Device/EASY80920NOR +define Device/lantiq_easy80920-nor + DEVICE_DTS := EASY80920NOR IMAGE_SIZE := 7936k DEVICE_TITLE := Lantiq VR9 - EASY80920NOR DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-mini kmod-usb-dwc2 kmod-usb-ledtrig-usbport endef -TARGET_DEVICES += EASY80920NOR +TARGET_DEVICES += lantiq_easy80920-nor -define Device/FRITZ3370 +define Device/avm_fritz3370 $(Device/AVM) $(Device/NAND) + BOARD_NAME := FRITZ3370 + DEVICE_DTS := FRITZ3370 DEVICE_TITLE := Fritz!Box WLan - FRITZ3370 DEVICE_PACKAGES := kmod-ath9k wpad-mini kmod-usb-dwc2 + SUPPORTED_DEVICES += FRITZ3370 endef -TARGET_DEVICES += FRITZ3370 +TARGET_DEVICES += avm_fritz3370 -define Device/FRITZ7360SL +define Device/avm_fritz7360sl $(Device/AVM) IMAGE_SIZE := 15744k + DEVICE_DTS := FRITZ7360SL DEVICE_TITLE := 1&1 HomeServer - FRITZ7360SL DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-mini kmod-usb-dwc2 + SUPPORTED_DEVICES += FRITZ7360SL endef -TARGET_DEVICES += FRITZ7360SL +TARGET_DEVICES += avm_fritz7360sl -define Device/VG3503J +define Device/arcadyan_vg3503j IMAGE_SIZE := 8000k + DEVICE_DTS := VG3503J DEVICE_TITLE := BT OpenReach - ECI VDSL Modem V-2FUb/R + SUPPORTED_DEVICES += VG3503J endef -TARGET_DEVICES += VG3503J +TARGET_DEVICES += arcadyan_vg3503j include tp-link.mk -define Device/WBMR300 +define Device/buffalo_wbmr-300hpd IMAGE_SIZE := 15616k + DEVICE_DTS := WBMR300 DEVICE_TITLE := Buffalo WBMR-300HPD DEVICE_PACKAGES := kmod-mt7603 wpad-mini kmod-usb-dwc2 + SUPPORTED_DEVICES += WBMR300 endef -TARGET_DEVICES += WBMR300 +TARGET_DEVICES += buffalo_wbmr-300hpd -define Device/VGV7510KW22NOR +define Device/arcadyan_vgv7510kw22-nor IMAGE_SIZE := 15232k + DEVICE_DTS := VGV7510KW22NOR DEVICE_TITLE := o2 Box 6431 / Arcadyan VGV7510KW22 (NOR) DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc + SUPPORTED_DEVICES += VGV7510KW22NOR endef -TARGET_DEVICES += VGV7510KW22NOR +TARGET_DEVICES += arcadyan_vgv7510kw22-nor -define Device/VGV7510KW22BRN +define Device/arcadyan_vgv7510kw22-brn $(Device/lantiqBrnImage) IMAGE_SIZE := 7168k + DEVICE_DTS := VGV7510KW22BRN SIGNATURE := BRNDA6431 MAGIC := 0x12345678 CRC32_POLY := 0x04c11db7 DEVICE_TITLE := o2 Box 6431 / Arcadyan VGV7510KW22 (BRN) DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc + SUPPORTED_DEVICES += VGV7510KW22BRN endef -TARGET_DEVICES += VGV7510KW22BRN +TARGET_DEVICES += arcadyan_vgv7510kw22-brn -define Device/VGV7519NOR +define Device/arcadyan_vgv7519-nor IMAGE_SIZE := 15360k + DEVICE_DTS := VGV7519NOR DEVICE_TITLE := Experiabox 8 VGV7519 DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc + SUPPORTED_DEVICES += VGV7519NOR endef -TARGET_DEVICES += VGV7519NOR +TARGET_DEVICES += arcadyan_vgv7519-nor -define Device/VGV7519BRN +define Device/arcadyan_vgv7519-brn $(Device/lantiqBrnImage) IMAGE_SIZE := 7168k + DEVICE_DTS := VGV7519BRN SIGNATURE := 5D00008000 MAGIC := 0x12345678 CRC32_POLY := 0x2083b8ed DEVICE_TITLE := Experiabox 8 VGV7519 (BRN) DEVICE_PACKAGES := kmod-rt2800-pci wpad-mini kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc + SUPPORTED_DEVICES += VGV7519BRN endef -TARGET_DEVICES += VGV7519BRN +TARGET_DEVICES += arcadyan_vgv7519-brn endif ifeq ($(SUBTARGET),falcon) -define Device/EASY98000NOR +define Device/lantiq_easy98000-nor IMAGE_SIZE := 3904k + DEVICE_DTS := EASY98000NOR DEVICE_TITLE := EASY98000 - Lantiq Falcon Eval Board NOR DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24 endef -TARGET_DEVICES += EASY98000NOR +TARGET_DEVICES += lantiq_easy98000-nor -define Device/EASY98000NAND +define Device/lantiq_easy98000-nand IMAGE_SIZE := 3904k + DEVICE_DTS := EASY98000NAND DEVICE_TITLE := EASY98000 - Lantiq Falcon Eval Board NAND DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24 endef -TARGET_DEVICES += EASY98000NAND +TARGET_DEVICES += lantiq_easy98000-nand -define Device/EASY98000SFLASH +define Device/lantiq_easy98000-sflash IMAGE_SIZE := 7424k + DEVICE_DTS := EASY98000SFLASH DEVICE_TITLE := EASY98000 - Lantiq Falcon Eval Board SFLASH DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24 endef -TARGET_DEVICES += EASY98000SFLASH +TARGET_DEVICES += lantiq_easy98000-sflash -define Device/FALCON-MDU +define Device/lantiq_falcon-mdu IMAGE_SIZE := 7424k + DEVICE_DTS := FALCON-MDU DEVICE_TITLE := MDU - Lantiq Falcon / VINAXdp MDU Board endef -TARGET_DEVICES += FALCON-MDU +TARGET_DEVICES += lantiq_falcon-mdu -define Device/EASY88388 +define Device/lantiq_easy88388 IMAGE_SIZE := 7424k + DEVICE_DTS := EASY88388 DEVICE_TITLE := EASY88388 - Lantiq Falcon FTTDP8 Reference Board endef -TARGET_DEVICES += EASY88388 +TARGET_DEVICES += lantiq_easy88388 -define Device/EASY88444 +define Device/lantiq_easy88444 IMAGE_SIZE := 7424k + DEVICE_DTS := EASY88444 DEVICE_TITLE := EASY88444 - Lantiq Falcon FTTdp G.FAST Reference Board endef -TARGET_DEVICES += EASY88444 +TARGET_DEVICES += lantiq_easy88444 -define Device/FALCON-SFP +define Device/lantiq_falcon-sfp IMAGE_SIZE := 7424k + DEVICE_DTS := FALCON-SFP DEVICE_TITLE := SFP - Lantiq Falcon SFP Stick endef -TARGET_DEVICES += FALCON-SFP +TARGET_DEVICES += lantiq_falcon-sfp -define Device/EASY98035SYNCE +define Device/lantiq_easy98035synce IMAGE_SIZE := 7424k + DEVICE_DTS := EASY98035SYNCE DEVICE_TITLE := EASY98035SYNCE - Lantiq Falcon SFP Stick with Synchronous Ethernet endef -TARGET_DEVICES += EASY98035SYNCE +TARGET_DEVICES += lantiq_easy98035synce -define Device/EASY98035SYNCE1588 +define Device/lantiq_easy98035synce1588 IMAGE_SIZE := 7424k + DEVICE_DTS := EASY98035SYNCE1588 DEVICE_TITLE := EASY98035SYNCE1588 - Lantiq Falcon SFP Stick with SyncE and IEEE1588 endef -TARGET_DEVICES += EASY98035SYNCE1588 +TARGET_DEVICES += lantiq_easy98035synce1588 -define Device/EASY98020 +define Device/lantiq_easy98020 IMAGE_SIZE := 7424k + DEVICE_DTS := EASY98020 DEVICE_TITLE := EASY98020 - Lantiq Falcon SFU Reference Board endef -TARGET_DEVICES += EASY98020 +TARGET_DEVICES += lantiq_easy98020 -define Device/EASY98020V18 +define Device/lantiq_easy98020-v18 IMAGE_SIZE := 7424k + DEVICE_DTS := EASY98020V18 DEVICE_TITLE := EASY98020V18 - Lantiq Falcon SFU Reference Board V1.8 endef -TARGET_DEVICES += EASY98020V18 +TARGET_DEVICES += lantiq_easy98020-v18 -define Device/EASY98021 +define Device/lantiq_easy98021 IMAGE_SIZE := 7424k + DEVICE_DTS := EASY98021 DEVICE_TITLE := EASY98021 - Lantiq Falcon HGU Reference Board endef -TARGET_DEVICES += EASY98021 +TARGET_DEVICES += lantiq_easy98021 endif diff --git a/target/linux/lantiq/image/tp-link.mk b/target/linux/lantiq/image/tp-link.mk index 976184175a8087..561d390d8c6222 100644 --- a/target/linux/lantiq/image/tp-link.mk +++ b/target/linux/lantiq/image/tp-link.mk @@ -1,6 +1,8 @@ -DEVICE_VARS += TPLINK_BOARD_ID +DEVICE_VARS += TPLINK_FLASHLAYOUT TPLINK_HWID TPLINK_HWREV TPLINK_HWREVADD TPLINK_HVERSION define Device/lantiqTpLink + TPLINK_HWREVADD := 0 + TPLINK_HVERSION := 2 KERNEL := kernel-bin | append-dtb | lzma KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | \ tplink-v2-header -s -V "ver. 1.0" @@ -9,31 +11,42 @@ define Device/lantiqTpLink append-metadata | check-size $$$$(IMAGE_SIZE) endef -define Device/TDW8970 +define Device/tplink_tdw8970 $(Device/lantiqTpLink) - DEVICE_PROFILE := TDW8970 - TPLINK_BOARD_ID := TD-W8970v1 + DEVICE_DTS := TDW8970 + TPLINK_FLASHLAYOUT := 8Mltq + TPLINK_HWID := 0x89700001 + TPLINK_HWREV := 1 IMAGE_SIZE := 7680k DEVICE_TITLE := TP-LINK TD-W8970 DEVICE_PACKAGES:= kmod-ath9k wpad-mini kmod-usb-dwc2 kmod-usb-ledtrig-usbport + SUPPORTED_DEVICES += TDW8970 endef +TARGET_DEVICES += tplink_tdw8970 -define Device/TDW8980 +define Device/tplink_tdw8980 $(Device/lantiqTpLink) - DEVICE_PROFILE := TDW8980 - TPLINK_BOARD_ID := TD-W8980v1 + DEVICE_DTS := TDW8980 + TPLINK_FLASHLAYOUT := 8Mltq + TPLINK_HWID := 0x89800001 + TPLINK_HWREV := 14 IMAGE_SIZE := 7680k DEVICE_TITLE := TP-LINK TD-W8980 DEVICE_PACKAGES:= kmod-ath9k kmod-owl-loader wpad-mini kmod-usb-dwc2 kmod-usb-ledtrig-usbport + SUPPORTED_DEVICES += TDW8980 endef +TARGET_DEVICES += tplink_tdw8980 -define Device/VR200v +define Device/tplink_vr200v $(Device/lantiqTpLink) - DEVICE_PROFILE := VR200v + DEVICE_DTS := VR200v TPLINK_BOARD_ID := ArcherVR200V + TPLINK_FLASHLAYOUT := 16Mltq + TPLINK_HWID := 0x73b70801 + TPLINK_HWREV := 0x2f IMAGE_SIZE := 15808k DEVICE_TITLE := TP-LINK Archer VR200v DEVICE_PACKAGES:= kmod-usb-dwc2 kmod-usb-ledtrig-usbport + SUPPORTED_DEVICES += VR200v endef -TARGET_DEVICES += TDW8970 TDW8980 VR200v - +TARGET_DEVICES += tplink_vr200v diff --git a/target/linux/lantiq/patches-4.9/0028-NET-lantiq-various-etop-fixes.patch b/target/linux/lantiq/patches-4.9/0028-NET-lantiq-various-etop-fixes.patch index 4f3d46ce67253e..dc99f48eae7eb4 100644 --- a/target/linux/lantiq/patches-4.9/0028-NET-lantiq-various-etop-fixes.patch +++ b/target/linux/lantiq/patches-4.9/0028-NET-lantiq-various-etop-fixes.patch @@ -203,28 +203,27 @@ Signed-off-by: John Crispin } static int -@@ -156,8 +224,10 @@ ltq_etop_poll_rx(struct napi_struct *nap +@@ -156,7 +224,9 @@ ltq_etop_poll_rx(struct napi_struct *nap { struct ltq_etop_chan *ch = container_of(napi, struct ltq_etop_chan, napi); + struct ltq_etop_priv *priv = netdev_priv(ch->netdev); - int rx = 0; - int complete = 0; + int work_done = 0; + unsigned long flags; - while ((rx < budget) && !complete) { + while (work_done < budget) { struct ltq_dma_desc *desc = &ch->dma.desc_base[ch->dma.desc]; -@@ -171,7 +241,9 @@ ltq_etop_poll_rx(struct napi_struct *nap +@@ -168,7 +238,9 @@ ltq_etop_poll_rx(struct napi_struct *nap } - if (complete || !rx) { - napi_complete(&ch->napi); + if (work_done < budget) { + napi_complete_done(&ch->napi, work_done); + spin_lock_irqsave(&priv->lock, flags); ltq_dma_ack_irq(&ch->dma); + spin_unlock_irqrestore(&priv->lock, flags); } - return rx; + return work_done; } -@@ -183,12 +255,14 @@ ltq_etop_poll_tx(struct napi_struct *nap +@@ -180,12 +252,14 @@ ltq_etop_poll_tx(struct napi_struct *nap container_of(napi, struct ltq_etop_chan, napi); struct ltq_etop_priv *priv = netdev_priv(ch->netdev); struct netdev_queue *txq = @@ -240,7 +239,7 @@ Signed-off-by: John Crispin dev_kfree_skb_any(ch->skb[ch->tx_free]); ch->skb[ch->tx_free] = NULL; memset(&ch->dma.desc_base[ch->tx_free], 0, -@@ -201,7 +275,9 @@ ltq_etop_poll_tx(struct napi_struct *nap +@@ -198,7 +272,9 @@ ltq_etop_poll_tx(struct napi_struct *nap if (netif_tx_queue_stopped(txq)) netif_tx_start_queue(txq); napi_complete(&ch->napi); @@ -250,7 +249,7 @@ Signed-off-by: John Crispin return 1; } -@@ -209,9 +285,10 @@ static irqreturn_t +@@ -206,9 +282,10 @@ static irqreturn_t ltq_etop_dma_irq(int irq, void *_priv) { struct ltq_etop_priv *priv = _priv; @@ -264,7 +263,7 @@ Signed-off-by: John Crispin return IRQ_HANDLED; } -@@ -223,7 +300,7 @@ ltq_etop_free_channel(struct net_device +@@ -220,7 +297,7 @@ ltq_etop_free_channel(struct net_device ltq_dma_free(&ch->dma); if (ch->dma.irq) free_irq(ch->dma.irq, priv); @@ -273,7 +272,7 @@ Signed-off-by: John Crispin int desc; for (desc = 0; desc < LTQ_DESC_NUM; desc++) dev_kfree_skb_any(ch->skb[ch->dma.desc]); -@@ -234,65 +311,133 @@ static void +@@ -231,65 +308,133 @@ static void ltq_etop_hw_exit(struct net_device *dev) { struct ltq_etop_priv *priv = netdev_priv(dev); @@ -329,11 +328,10 @@ Signed-off-by: John Crispin struct ltq_etop_priv *priv = netdev_priv(dev); - int i; + int mii_mode = priv->mii_mode; - -- ltq_pmu_enable(PMU_PPE); ++ + clk_enable(priv->clk_ppe); -- switch (priv->pldata->mii_mode) { +- ltq_pmu_enable(PMU_PPE); + if (of_machine_is_compatible("lantiq,ar9")) { + ltq_etop_gbit_init(dev); + /* force the etops link to the gbit to MII */ @@ -342,7 +340,8 @@ Signed-off-by: John Crispin + ltq_etop_w32_mask(MDIO_CFG_MASK, 0, LTQ_ETOP_MDIO_CFG); + ltq_etop_w32_mask(MAC_CFG_MASK, MAC_CFG_CGEN | MAC_CFG_DUPLEX | + MAC_CFG_SPEED | MAC_CFG_LINK, LTQ_ETOP_MAC_CFG); -+ + +- switch (priv->pldata->mii_mode) { + switch (mii_mode) { case PHY_INTERFACE_MODE_RMII: - ltq_etop_w32_mask(ETOP_MII_MASK, @@ -441,7 +440,7 @@ Signed-off-by: John Crispin } static void -@@ -306,7 +451,10 @@ ltq_etop_get_drvinfo(struct net_device * +@@ -303,7 +448,10 @@ ltq_etop_get_drvinfo(struct net_device * static int ltq_etop_nway_reset(struct net_device *dev) { @@ -453,7 +452,7 @@ Signed-off-by: John Crispin } static const struct ethtool_ops ltq_etop_ethtool_ops = { -@@ -317,6 +465,39 @@ static const struct ethtool_ops ltq_etop +@@ -314,6 +462,39 @@ static const struct ethtool_ops ltq_etop }; static int @@ -493,7 +492,7 @@ Signed-off-by: John Crispin ltq_etop_mdio_wr(struct mii_bus *bus, int phy_addr, int phy_reg, u16 phy_data) { u32 val = MDIO_REQUEST | -@@ -324,9 +505,9 @@ ltq_etop_mdio_wr(struct mii_bus *bus, in +@@ -321,9 +502,9 @@ ltq_etop_mdio_wr(struct mii_bus *bus, in ((phy_reg & MDIO_REG_MASK) << MDIO_REG_OFFSET) | phy_data; @@ -505,7 +504,7 @@ Signed-off-by: John Crispin return 0; } -@@ -337,12 +518,12 @@ ltq_etop_mdio_rd(struct mii_bus *bus, in +@@ -334,12 +515,12 @@ ltq_etop_mdio_rd(struct mii_bus *bus, in ((phy_addr & MDIO_ADDR_MASK) << MDIO_ADDR_OFFSET) | ((phy_reg & MDIO_REG_MASK) << MDIO_REG_OFFSET); @@ -522,7 +521,7 @@ Signed-off-by: John Crispin return val; } -@@ -357,8 +538,18 @@ ltq_etop_mdio_probe(struct net_device *d +@@ -354,8 +535,18 @@ ltq_etop_mdio_probe(struct net_device *d { struct ltq_etop_priv *priv = netdev_priv(dev); struct phy_device *phydev; @@ -542,7 +541,7 @@ Signed-off-by: John Crispin if (!phydev) { netdev_err(dev, "no PHY found\n"); -@@ -366,21 +557,18 @@ ltq_etop_mdio_probe(struct net_device *d +@@ -363,21 +554,18 @@ ltq_etop_mdio_probe(struct net_device *d } phydev = phy_connect(dev, phydev_name(phydev), @@ -569,7 +568,7 @@ Signed-off-by: John Crispin phydev->advertising = phydev->supported; phy_attached_info(phydev); -@@ -401,8 +589,13 @@ ltq_etop_mdio_init(struct net_device *de +@@ -398,8 +586,13 @@ ltq_etop_mdio_init(struct net_device *de } priv->mii_bus->priv = dev; @@ -585,7 +584,7 @@ Signed-off-by: John Crispin priv->mii_bus->name = "ltq_mii"; snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x", priv->pdev->name, priv->pdev->id); -@@ -439,17 +632,19 @@ static int +@@ -436,17 +629,19 @@ static int ltq_etop_open(struct net_device *dev) { struct ltq_etop_priv *priv = netdev_priv(dev); @@ -614,7 +613,7 @@ Signed-off-by: John Crispin netif_tx_start_all_queues(dev); return 0; } -@@ -458,18 +653,19 @@ static int +@@ -455,18 +650,19 @@ static int ltq_etop_stop(struct net_device *dev) { struct ltq_etop_priv *priv = netdev_priv(dev); @@ -644,7 +643,7 @@ Signed-off-by: John Crispin return 0; } -@@ -479,16 +675,16 @@ ltq_etop_tx(struct sk_buff *skb, struct +@@ -476,16 +672,16 @@ ltq_etop_tx(struct sk_buff *skb, struct int queue = skb_get_queue_mapping(skb); struct netdev_queue *txq = netdev_get_tx_queue(dev, queue); struct ltq_etop_priv *priv = netdev_priv(dev); @@ -666,7 +665,7 @@ Signed-off-by: John Crispin netdev_err(dev, "tx ring full\n"); netif_tx_stop_queue(txq); return NETDEV_TX_BUSY; -@@ -496,7 +692,7 @@ ltq_etop_tx(struct sk_buff *skb, struct +@@ -493,7 +689,7 @@ ltq_etop_tx(struct sk_buff *skb, struct /* dma needs to start on a 16 byte aligned address */ byte_offset = CPHYSADDR(skb->data) % 16; @@ -675,7 +674,7 @@ Signed-off-by: John Crispin netif_trans_update(dev); -@@ -506,11 +702,11 @@ ltq_etop_tx(struct sk_buff *skb, struct +@@ -503,11 +699,11 @@ ltq_etop_tx(struct sk_buff *skb, struct wmb(); desc->ctl = LTQ_DMA_OWN | LTQ_DMA_SOP | LTQ_DMA_EOP | LTQ_DMA_TX_OFFSET(byte_offset) | (len & LTQ_DMA_SIZE_MASK); @@ -690,7 +689,7 @@ Signed-off-by: John Crispin netif_tx_stop_queue(txq); return NETDEV_TX_OK; -@@ -525,8 +721,10 @@ ltq_etop_change_mtu(struct net_device *d +@@ -522,8 +718,10 @@ ltq_etop_change_mtu(struct net_device *d struct ltq_etop_priv *priv = netdev_priv(dev); unsigned long flags; @@ -702,7 +701,7 @@ Signed-off-by: John Crispin LTQ_ETOP_IGPLEN); spin_unlock_irqrestore(&priv->lock, flags); } -@@ -595,6 +793,9 @@ ltq_etop_init(struct net_device *dev) +@@ -592,6 +790,9 @@ ltq_etop_init(struct net_device *dev) if (err) goto err_hw; ltq_etop_change_mtu(dev, 1500); @@ -712,7 +711,7 @@ Signed-off-by: John Crispin memcpy(&mac, &priv->pldata->mac, sizeof(struct sockaddr)); if (!is_valid_ether_addr(mac.sa_data)) { -@@ -612,9 +813,10 @@ ltq_etop_init(struct net_device *dev) +@@ -609,9 +810,10 @@ ltq_etop_init(struct net_device *dev) dev->addr_assign_type = NET_ADDR_RANDOM; ltq_etop_set_multicast_list(dev); @@ -726,7 +725,7 @@ Signed-off-by: John Crispin return 0; err_netdev: -@@ -634,6 +836,9 @@ ltq_etop_tx_timeout(struct net_device *d +@@ -631,6 +833,9 @@ ltq_etop_tx_timeout(struct net_device *d err = ltq_etop_hw_init(dev); if (err) goto err_hw; @@ -736,7 +735,7 @@ Signed-off-by: John Crispin netif_trans_update(dev); netif_wake_queue(dev); return; -@@ -657,14 +862,19 @@ static const struct net_device_ops ltq_e +@@ -654,14 +859,19 @@ static const struct net_device_ops ltq_e .ndo_tx_timeout = ltq_etop_tx_timeout, }; @@ -760,7 +759,7 @@ Signed-off-by: John Crispin res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) { -@@ -690,31 +900,62 @@ ltq_etop_probe(struct platform_device *p +@@ -687,31 +897,62 @@ ltq_etop_probe(struct platform_device *p goto err_out; } @@ -838,7 +837,7 @@ Signed-off-by: John Crispin err = register_netdev(dev); if (err) -@@ -743,31 +984,22 @@ ltq_etop_remove(struct platform_device * +@@ -740,31 +981,22 @@ ltq_etop_remove(struct platform_device * return 0; } diff --git a/target/linux/lantiq/patches-4.9/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch b/target/linux/lantiq/patches-4.9/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch index cef4c1e2a37b4f..a5ecd94c4a9c17 100644 --- a/target/linux/lantiq/patches-4.9/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch +++ b/target/linux/lantiq/patches-4.9/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch @@ -204,7 +204,7 @@ Signed-off-by: John Crispin +early_param("ethaddr", setup_ethaddr); --- a/drivers/net/ethernet/lantiq_etop.c +++ b/drivers/net/ethernet/lantiq_etop.c -@@ -797,7 +797,11 @@ ltq_etop_init(struct net_device *dev) +@@ -794,7 +794,11 @@ ltq_etop_init(struct net_device *dev) if (err) goto err_hw; diff --git a/target/linux/lantiq/xrx200/config-default b/target/linux/lantiq/xrx200/config-default index c307dc80296804..73ccaf34ab171f 100644 --- a/target/linux/lantiq/xrx200/config-default +++ b/target/linux/lantiq/xrx200/config-default @@ -1,21 +1,27 @@ CONFIG_ADM6996_PHY=y CONFIG_AR8216_PHY=y CONFIG_AT803X_PHY=y +CONFIG_BLK_MQ_PCI=y CONFIG_CPU_MIPSR2_IRQ_EI=y CONFIG_CPU_MIPSR2_IRQ_VI=y CONFIG_CPU_RMAP=y CONFIG_CRC16=y +CONFIG_CRYPTO_AEAD=y +CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_LZO=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_NULL2=y CONFIG_FIRMWARE_IN_KERNEL=y CONFIG_HWMON=y CONFIG_ICPLUS_PHY=y +CONFIG_IFX_VPE_EXT=y CONFIG_INPUT=y CONFIG_INPUT_EVDEV=y CONFIG_INPUT_POLLDEV=y CONFIG_INTEL_XWAY_PHY=y # CONFIG_ISDN is not set -CONFIG_LANTIQ_PHY=y CONFIG_LANTIQ_XRX200=y CONFIG_LEDS_TRIGGER_HEARTBEAT=y CONFIG_LZO_COMPRESS=y @@ -24,6 +30,11 @@ CONFIG_MIPS_MT=y # CONFIG_MIPS_MT_FPAFF is not set CONFIG_MIPS_MT_SMP=y CONFIG_MIPS_PERF_SHARED_TC_COUNTERS=y +CONFIG_MIPS_VPE_APSP_API=y +CONFIG_MIPS_VPE_APSP_API_MT=y +CONFIG_MIPS_VPE_LOADER=y +CONFIG_MIPS_VPE_LOADER_MT=y +CONFIG_MIPS_VPE_LOADER_TOM=y CONFIG_MTD_NAND=y CONFIG_MTD_NAND_ECC=y CONFIG_MTD_NAND_PLATFORM=y @@ -38,7 +49,14 @@ CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_NET_FLOW_LIMIT=y CONFIG_NLS=y CONFIG_NR_CPUS=2 +CONFIG_OF_ADDRESS_PCI=y +CONFIG_OF_PCI=y +CONFIG_OF_PCI_IRQ=y +CONFIG_PADATA=y +CONFIG_PCI=y CONFIG_PCIE_LANTIQ=y +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_LANTIQ=y CONFIG_POWER_RESET=y CONFIG_POWER_RESET_GPIO=y CONFIG_POWER_SUPPLY=y @@ -70,9 +88,3 @@ CONFIG_XPS=y CONFIG_XRX200_PHY_FW=y CONFIG_ZLIB_DEFLATE=y CONFIG_ZLIB_INFLATE=y -CONFIG_MIPS_VPE_LOADER=y -CONFIG_MIPS_VPE_LOADER_TOM=y -CONFIG_MIPS_VPE_APSP_API=y -CONFIG_IFX_VPE_EXT=y -CONFIG_PERFCTRS=n -# CONFIG_MTSCHED is not set diff --git a/target/linux/lantiq/xrx200/target.mk b/target/linux/lantiq/xrx200/target.mk index 9600f04fd2bf9d..fc8115e795885b 100644 --- a/target/linux/lantiq/xrx200/target.mk +++ b/target/linux/lantiq/xrx200/target.mk @@ -1,7 +1,7 @@ ARCH:=mips SUBTARGET:=xrx200 BOARDNAME:=XRX200 -FEATURES:=squashfs atm nand ubifs +FEATURES:=squashfs atm nand CPU_TYPE:=24kc DEFAULT_PACKAGES+=kmod-leds-gpio \ diff --git a/target/linux/lantiq/xway/config-default b/target/linux/lantiq/xway/config-default index bddf02763a1852..79064ccc02ed56 100644 --- a/target/linux/lantiq/xway/config-default +++ b/target/linux/lantiq/xway/config-default @@ -1,36 +1,15 @@ CONFIG_ADM6996_PHY=y CONFIG_AR8216_PHY=y -# CONFIG_ARCH_HAS_SG_CHAIN is not set -CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y -CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y -CONFIG_CPU_SUPPORTS_MSA=y +CONFIG_BLK_MQ_PCI=y CONFIG_CRC16=y CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_LZO=y CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_GPIO_DEVRES=y -CONFIG_HAS_IOPORT_MAP=y -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_HAVE_BPF_JIT=y -CONFIG_HAVE_CC_STACKPROTECTOR=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_DEBUG_STACKOVERFLOW=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HZ_PERIODIC=y CONFIG_INPUT=y CONFIG_INPUT_EVDEV=y CONFIG_INPUT_POLLDEV=y -CONFIG_IRQCHIP=y -CONFIG_IRQ_WORK=y # CONFIG_ISDN is not set CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LIBFDT=y CONFIG_LZO_COMPRESS=y CONFIG_LZO_DECOMPRESS=y CONFIG_MTD_NAND=y @@ -38,7 +17,6 @@ CONFIG_MTD_NAND_ECC=y CONFIG_MTD_NAND_PLATFORM=y CONFIG_MTD_NAND_XWAY=y # CONFIG_MTD_PHYSMAP_OF is not set -CONFIG_MTD_SPLIT_UIMAGE_FW=y CONFIG_MTD_UBI=y CONFIG_MTD_UBI_BEB_LIMIT=20 CONFIG_MTD_UBI_BLOCK=y @@ -46,17 +24,17 @@ CONFIG_MTD_UBI_BLOCK=y # CONFIG_MTD_UBI_GLUEBI is not set CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_NLS=y -# CONFIG_NO_IOPORT_MAP is not set CONFIG_OF_ADDRESS_PCI=y -# CONFIG_RCU_STALL_COMMON is not set +CONFIG_OF_PCI=y +CONFIG_OF_PCI_IRQ=y +CONFIG_PCI=y +# CONFIG_PCIE_LANTIQ is not set +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_LANTIQ=y CONFIG_RTL8306_PHY=y CONFIG_RTL8366S_PHY=y CONFIG_RTL8367B_PHY=y CONFIG_RTL8367_PHY=y -CONFIG_SPI=y -CONFIG_SPI_LANTIQ=y -CONFIG_SPI_MASTER=y -CONFIG_SYS_SUPPORTS_MIPS16=y CONFIG_UBIFS_FS=y CONFIG_UBIFS_FS_ADVANCED_COMPR=y CONFIG_UBIFS_FS_LZO=y @@ -66,6 +44,5 @@ CONFIG_USB_COMMON=y # CONFIG_USB_EHCI_HCD is not set CONFIG_USB_SUPPORT=y # CONFIG_USB_UHCI_HCD is not set -# CONFIG_XRX200_PHY_FW is not set CONFIG_ZLIB_DEFLATE=y CONFIG_ZLIB_INFLATE=y diff --git a/target/linux/lantiq/xway/target.mk b/target/linux/lantiq/xway/target.mk index 429be761c4e9bb..550c61edf0d7a3 100644 --- a/target/linux/lantiq/xway/target.mk +++ b/target/linux/lantiq/xway/target.mk @@ -1,7 +1,7 @@ ARCH:=mips SUBTARGET:=xway BOARDNAME:=XWAY -FEATURES:=squashfs atm nand ubifs ramdisk +FEATURES:=squashfs atm nand ramdisk CPU_TYPE:=24kc DEFAULT_PACKAGES+=kmod-leds-gpio kmod-gpio-button-hotplug swconfig diff --git a/target/linux/lantiq/xway_legacy/config-default b/target/linux/lantiq/xway_legacy/config-default index b838106ddce74b..c8aa63178755c2 100644 --- a/target/linux/lantiq/xway_legacy/config-default +++ b/target/linux/lantiq/xway_legacy/config-default @@ -1,5 +1,6 @@ CONFIG_ADM6996_PHY=y CONFIG_AR8216_PHY=y +CONFIG_BLK_MQ_PCI=y CONFIG_CRC16=y CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_LZO=y @@ -16,6 +17,13 @@ CONFIG_LZO_COMPRESS=y CONFIG_LZO_DECOMPRESS=y # CONFIG_MTD_PHYSMAP_OF is not set CONFIG_NLS=y +CONFIG_OF_ADDRESS_PCI=y +CONFIG_OF_PCI=y +CONFIG_OF_PCI_IRQ=y +CONFIG_PCI=y +# CONFIG_PCIE_LANTIQ is not set +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_LANTIQ=y CONFIG_RTL8306_PHY=y CONFIG_RTL8366S_PHY=y CONFIG_RTL8367B_PHY=y diff --git a/target/linux/layerscape/Makefile b/target/linux/layerscape/Makefile index 67da8449aac230..bd91556ef4f23d 100644 --- a/target/linux/layerscape/Makefile +++ b/target/linux/layerscape/Makefile @@ -10,7 +10,7 @@ BOARD:=layerscape BOARDNAME:=NXP Layerscape DEVICE_TYPE:=developerboard KERNEL_PATCHVER:=4.9 -FEATURES:=squashfs nand usb pcie gpio +FEATURES:=squashfs nand usb pcie gpio fpu SUBTARGETS:=armv8_64b armv8_32b MAINTAINER:=Yangbo Lu diff --git a/target/linux/layerscape/armv8_64b/config-4.9 b/target/linux/layerscape/armv8_64b/config-4.9 index 9e0c8e0324ab8a..546e589bebca17 100644 --- a/target/linux/layerscape/armv8_64b/config-4.9 +++ b/target/linux/layerscape/armv8_64b/config-4.9 @@ -702,7 +702,6 @@ CONFIG_JBD2=y CONFIG_JUMP_LABEL=y CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y -# CONFIG_KASAN is not set CONFIG_KEXEC=y CONFIG_KEXEC_CORE=y CONFIG_KEYBOARD_ATKBD=y diff --git a/target/linux/malta/Makefile b/target/linux/malta/Makefile index 34818f17baf5a6..c2b50f55bf9865 100644 --- a/target/linux/malta/Makefile +++ b/target/linux/malta/Makefile @@ -14,7 +14,7 @@ INITRAMFS_EXTRA_FILES:= MAINTAINER:=Florian Fainelli FEATURES:=ramdisk -KERNEL_PATCHVER:=4.4 +KERNEL_PATCHVER:=4.9 include $(INCLUDE_DIR)/target.mk diff --git a/target/linux/malta/README b/target/linux/malta/README index c34afe110e9354..e48665909ded50 100644 --- a/target/linux/malta/README +++ b/target/linux/malta/README @@ -4,10 +4,16 @@ troubleshoot MIPS applications without access to real hardware. To use the images built by OpenWrt with qemu, use the following commands: -For the little-endian image: +For the 32 bit little-endian image: qemu-system-mipsel -kernel bin/targets/malta/le/lede-malta-le-vmlinux-initramfs.elf -nographic -m 256 -For the big-endian image: +For the 32 bit big-endian image: qemu-system-mips -kernel bin/targets/malta/be/lede-malta-be-vmlinux-initramfs.elf -nographic -m 256 +For the 64 bit little-endian image: +qemu-system-mips64el -kernel bin/targets/malta/le64/lede-malta-le64-vmlinux-initramfs.elf -nographic -m 256 + +For the 64 bit big-endian image: +qemu-system-mips64 -kernel bin/targets/malta/be64/lede-malta-be64-vmlinux-initramfs.elf -nographic -m 256 + and enjoy the system bootin. diff --git a/target/linux/malta/be/config-default b/target/linux/malta/be/config-default index 2772ed75bdd821..f51301a05864c5 100644 --- a/target/linux/malta/be/config-default +++ b/target/linux/malta/be/config-default @@ -1,9 +1,3 @@ CONFIG_CPU_BIG_ENDIAN=y # CONFIG_CPU_LITTLE_ENDIAN is not set -CONFIG_CPU_MIPS32=y -# CONFIG_CPU_MIPS32_R1 is not set CONFIG_CPU_MIPS32_R2=y -# CONFIG_CPU_MIPS64_R1 is not set -# CONFIG_CPU_MIPS64_R2 is not set -CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set diff --git a/target/linux/malta/be64/config-default b/target/linux/malta/be64/config-default index 374e29a562283a..2c0c9d2db93946 100644 --- a/target/linux/malta/be64/config-default +++ b/target/linux/malta/be64/config-default @@ -1,6 +1,7 @@ # CONFIG_32BIT is not set CONFIG_64BIT=y CONFIG_ARCH_DMA_ADDR_T_64BIT=y +CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y CONFIG_BINFMT_ELF32=y @@ -8,15 +9,10 @@ CONFIG_BLOCK_COMPAT=y CONFIG_COMPAT=y CONFIG_COMPAT_NETLINK_MESSAGES=y CONFIG_CPU_BIG_ENDIAN=y -# CONFIG_LIQUIDIO is not set # CONFIG_CPU_LITTLE_ENDIAN is not set -# CONFIG_CPU_MIPS32_R1 is not set -# CONFIG_CPU_MIPS32_R2 is not set CONFIG_CPU_MIPS64=y CONFIG_CPU_MIPS64_R1=y -# CONFIG_CPU_MIPS64_R2 is not set CONFIG_CPU_MIPSR1=y -CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y CONFIG_CPU_SUPPORTS_HUGEPAGES=y CONFIG_HAVE_64BIT_ALIGNED_ACCESS=y @@ -25,13 +21,11 @@ CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y CONFIG_MIPS32_COMPAT=y CONFIG_MIPS32_N32=y CONFIG_MIPS32_O32=y +# CONFIG_MIPS_VA_BITS_48 is not set CONFIG_MODULES_USE_ELF_RELA=y CONFIG_PCI_BUS_ADDR_T_64BIT=y CONFIG_PGTABLE_LEVELS=3 CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_SYSVIPC_COMPAT=y CONFIG_SYS_SUPPORTS_HUGETLBFS=y -# CONFIG_THUNDER_NIC_BGX is not set -# CONFIG_THUNDER_NIC_PF is not set -# CONFIG_THUNDER_NIC_VF is not set CONFIG_ZONE_DMA32=y diff --git a/target/linux/malta/config-4.4 b/target/linux/malta/config-4.9 similarity index 90% rename from target/linux/malta/config-4.4 rename to target/linux/malta/config-4.9 index d027c9db93c82f..0e9daf6e0962d4 100644 --- a/target/linux/malta/config-4.4 +++ b/target/linux/malta/config-4.9 @@ -1,7 +1,6 @@ CONFIG_ARCH_BINFMT_ELF_STATE=y CONFIG_ARCH_CLOCKSOURCE_DATA=y CONFIG_ARCH_DISCARD_MEMBLOCK=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y CONFIG_ARCH_HAS_ELF_RANDOMIZE=y # CONFIG_ARCH_HAS_GCOV_PROFILE_ALL is not set # CONFIG_ARCH_HAS_SG_CHAIN is not set @@ -10,7 +9,6 @@ CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_ARCH_USE_BUILTIN_BSWAP=y -CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y CONFIG_ATA=y CONFIG_ATA_PIIX=y @@ -23,11 +21,11 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_SD=y +CONFIG_BLK_MQ_PCI=y CONFIG_BOARD_SCACHE=y CONFIG_BOOT_ELF32=y CONFIG_BOUNCE=y CONFIG_BUILTIN_DTB=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_CEVT_R4K=y CONFIG_CLKBLD_I8253=y CONFIG_CLKDEV_LOOKUP=y @@ -41,12 +39,18 @@ CONFIG_COMMON_CLK=y CONFIG_CONSOLE_TRANSLATIONS=y CONFIG_CPU_GENERIC_DUMP_TLB=y CONFIG_CPU_HAS_PREFETCH=y +CONFIG_CPU_HAS_RIXI=y # CONFIG_CPU_HAS_SMARTMIPS is not set CONFIG_CPU_HAS_SYNC=y # CONFIG_CPU_MICROMIPS is not set +CONFIG_CPU_MIPS32=y # CONFIG_CPU_MIPS32_3_5_FEATURES is not set +# CONFIG_CPU_MIPS32_R1 is not set +# CONFIG_CPU_MIPS32_R2 is not set # CONFIG_CPU_MIPS32_R5_FEATURES is not set # CONFIG_CPU_MIPS32_R6 is not set +# CONFIG_CPU_MIPS64_R1 is not set +# CONFIG_CPU_MIPS64_R2 is not set # CONFIG_CPU_MIPS64_R6 is not set CONFIG_CPU_MIPSR2=y CONFIG_CPU_MIPSR2_IRQ_EI=y @@ -57,16 +61,21 @@ CONFIG_CPU_R4K_CACHE_TLB=y CONFIG_CPU_R4K_FPU=y # CONFIG_CPU_RM7000 is not set CONFIG_CPU_RMAP=y +CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y CONFIG_CPU_SUPPORTS_HIGHMEM=y CONFIG_CPU_SUPPORTS_MSA=y CONFIG_CRC16=y +CONFIG_CRYPTO_AEAD=y +CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_CRC32C=y CONFIG_CRYPTO_HASH=y CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_WORKQUEUE=y CONFIG_CSRC_R4K=y -# CONFIG_DEBUG_FS is not set CONFIG_DMA_MAYBE_COHERENT=y CONFIG_DMA_NONCOHERENT=y CONFIG_DNOTIFY=y @@ -82,6 +91,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CMOS_UPDATE=y CONFIG_GENERIC_IO=y CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_GENERIC_IRQ_IPI=y CONFIG_GENERIC_IRQ_SHOW=y CONFIG_GENERIC_ISA_DMA=y CONFIG_GENERIC_PCI_IOMAP=y @@ -89,17 +99,19 @@ CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GLOB=y +CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDWARE_WATCHPOINTS=y CONFIG_HAS_DMA=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y +# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set # CONFIG_HAVE_ARCH_BITREVERSE is not set CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_ARCH_KGDB=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y CONFIG_HAVE_ARCH_TRACEHOOK=y # CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_HAVE_BPF_JIT=y +CONFIG_HAVE_CBPF_JIT=y CONFIG_HAVE_CC_STACKPROTECTOR=y CONFIG_HAVE_CLK=y CONFIG_HAVE_CLK_PREPARE=y @@ -108,7 +120,6 @@ CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_HAVE_DEBUG_KMEMLEAK=y CONFIG_HAVE_DEBUG_STACKOVERFLOW=y CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_DMA_ATTRS=y CONFIG_HAVE_DMA_CONTIGUOUS=y CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y @@ -116,13 +127,8 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_GENERIC_DMA_COHERENT=y CONFIG_HAVE_IDE=y +CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_HAVE_KERNEL_BZIP2=y -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZ4=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_LZO=y -CONFIG_HAVE_KERNEL_XZ=y CONFIG_HAVE_KVM=y CONFIG_HAVE_LATENCYTOP_SUPPORT=y CONFIG_HAVE_MEMBLOCK=y @@ -132,6 +138,7 @@ CONFIG_HAVE_NET_DSA=y CONFIG_HAVE_OPROFILE=y CONFIG_HAVE_PCSPKR_PLATFORM=y CONFIG_HAVE_PERF_EVENTS=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y CONFIG_HW_CONSOLE=y @@ -148,6 +155,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_IP_MROUTE is not set CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_DOMAIN_HIERARCHY=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_IRQ_MIPS_CPU=y CONFIG_IRQ_WORK=y @@ -155,7 +163,6 @@ CONFIG_ISA_DMA_API=y CONFIG_JBD2=y CONFIG_JFFS2_FS_POSIX_ACL=y CONFIG_JFFS2_FS_SECURITY=y -# CONFIG_JFFS2_SUMMARY is not set CONFIG_KALLSYMS=y CONFIG_KERNEL_GZIP=y # CONFIG_KERNEL_XZ is not set @@ -165,6 +172,8 @@ CONFIG_LEGACY_PTY_COUNT=256 CONFIG_LIBFDT=y CONFIG_MD=y CONFIG_MIPS=y +CONFIG_MIPS_ASID_BITS=8 +CONFIG_MIPS_ASID_SHIFT=0 CONFIG_MIPS_BONITO64=y CONFIG_MIPS_CLOCK_VSYSCALL=y CONFIG_MIPS_CM=y @@ -177,7 +186,6 @@ CONFIG_MIPS_CPU_SCACHE=y # CONFIG_MIPS_ELF_APPENDED_DTB is not set CONFIG_MIPS_EXTERNAL_TIMER=y CONFIG_MIPS_GIC=y -CONFIG_MIPS_GIC_IPI=y # CONFIG_MIPS_HUGE_TLB_SUPPORT is not set CONFIG_MIPS_L1_CACHE_SHIFT=6 CONFIG_MIPS_L1_CACHE_SHIFT_6=y @@ -193,7 +201,6 @@ CONFIG_MIPS_PERF_SHARED_TC_COUNTERS=y # CONFIG_MIPS_RAW_APPENDED_DTB is not set CONFIG_MIPS_SPRAM=y # CONFIG_MIPS_VPE_LOADER is not set -# CONFIG_MIPS_ZBOOT_APPENDED_DTB is not set CONFIG_MODULES_TREE_LOOKUP=y CONFIG_MODULES_USE_ELF_REL=y CONFIG_MODULE_FORCE_UNLOAD=y @@ -214,13 +221,14 @@ CONFIG_OF_ADDRESS_PCI=y CONFIG_OF_EARLY_FLATTREE=y CONFIG_OF_FLATTREE=y CONFIG_OF_IRQ=y -CONFIG_OF_MTD=y CONFIG_OF_NET=y CONFIG_OF_PCI=y CONFIG_OF_PCI_IRQ=y +CONFIG_PADATA=y # CONFIG_PARTITION_ADVANCED is not set CONFIG_PCI=y CONFIG_PCI_DOMAINS=y +CONFIG_PCI_DRIVERS_LEGACY=y CONFIG_PCI_GT64XXX_PCI0=y CONFIG_PCSPKR_PLATFORM=y CONFIG_PERF_EVENTS=y @@ -240,6 +248,7 @@ CONFIG_RELAY=y CONFIG_RFS_ACCEL=y CONFIG_RPS=y CONFIG_RTC_CLASS=y +CONFIG_RTC_MC146818_LIB=y # CONFIG_SCHED_INFO is not set CONFIG_SCSI=y CONFIG_SECCOMP=y @@ -249,11 +258,10 @@ CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 CONFIG_SERIO=y CONFIG_SERIO_SERPORT=y +CONFIG_SG_POOL=y CONFIG_SMP=y CONFIG_SMP_UP=y CONFIG_SRCU=y -# CONFIG_STAGING is not set -# CONFIG_SUNXI_SRAM is not set CONFIG_SWAP_IO_SPACE=y CONFIG_SYNC_R4K=y CONFIG_SYSCTL_EXCEPTION_TRACE=y @@ -280,11 +288,11 @@ CONFIG_SYS_SUPPORTS_MIPS16=y CONFIG_SYS_SUPPORTS_MIPS_CMP=y CONFIG_SYS_SUPPORTS_MIPS_CPS=y CONFIG_SYS_SUPPORTS_MULTITHREADING=y +CONFIG_SYS_SUPPORTS_RELOCATABLE=y CONFIG_SYS_SUPPORTS_SCHED_SMT=y CONFIG_SYS_SUPPORTS_SMARTMIPS=y CONFIG_SYS_SUPPORTS_SMP=y CONFIG_SYS_SUPPORTS_ZBOOT=y -# CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_TREE_RCU=y CONFIG_USB_SUPPORT=y @@ -296,5 +304,4 @@ CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_VXFS_FS=y -# CONFIG_WATCHDOG is not set CONFIG_XPS=y diff --git a/target/linux/malta/image/Makefile b/target/linux/malta/image/Makefile index 31eb7ca0bbd0fa..d49d4a762d6100 100644 --- a/target/linux/malta/image/Makefile +++ b/target/linux/malta/image/Makefile @@ -22,7 +22,6 @@ define MkuImage endef define Image/Prepare - cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf $(call CompressLzma,$(KDIR)/vmlinux,$(KDIR)/vmlinux.bin.lzma) $(call MkuImage,lzma,,$(KDIR)/vmlinux.bin.lzma,$(KDIR)/uImage.lzma) $(call CompressGzip,$(KDIR)/vmlinux,$(KDIR)/vmlinux.bin.gz) @@ -30,6 +29,7 @@ define Image/Prepare endef define Image/BuildKernel + cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf cp $(KDIR)/uImage.lzma $(BIN_DIR)/$(IMG_PREFIX)-uImage-lzma cp $(KDIR)/uImage.gz $(BIN_DIR)/$(IMG_PREFIX)-uImage-gzip endef diff --git a/target/linux/malta/le/config-default b/target/linux/malta/le/config-default index b5634c6756f29a..aab569be3bcbcb 100644 --- a/target/linux/malta/le/config-default +++ b/target/linux/malta/le/config-default @@ -1,9 +1,3 @@ # CONFIG_CPU_BIG_ENDIAN is not set CONFIG_CPU_LITTLE_ENDIAN=y -CONFIG_CPU_MIPS32=y -# CONFIG_CPU_MIPS32_R1 is not set CONFIG_CPU_MIPS32_R2=y -# CONFIG_CPU_MIPS64_R1 is not set -# CONFIG_CPU_MIPS64_R2 is not set -CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set diff --git a/target/linux/malta/le64/config-default b/target/linux/malta/le64/config-default index 725c3e4900678c..28954537a967e7 100644 --- a/target/linux/malta/le64/config-default +++ b/target/linux/malta/le64/config-default @@ -1,6 +1,7 @@ # CONFIG_32BIT is not set CONFIG_64BIT=y CONFIG_ARCH_DMA_ADDR_T_64BIT=y +CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y CONFIG_BINFMT_ELF32=y @@ -8,15 +9,10 @@ CONFIG_BLOCK_COMPAT=y CONFIG_COMPAT=y CONFIG_COMPAT_NETLINK_MESSAGES=y # CONFIG_CPU_BIG_ENDIAN is not set -# CONFIG_LIQUIDIO is not set CONFIG_CPU_LITTLE_ENDIAN=y -# CONFIG_CPU_MIPS32_R1 is not set -# CONFIG_CPU_MIPS32_R2 is not set CONFIG_CPU_MIPS64=y CONFIG_CPU_MIPS64_R1=y -# CONFIG_CPU_MIPS64_R2 is not set CONFIG_CPU_MIPSR1=y -CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y CONFIG_CPU_SUPPORTS_HUGEPAGES=y CONFIG_HAVE_64BIT_ALIGNED_ACCESS=y @@ -25,13 +21,11 @@ CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y CONFIG_MIPS32_COMPAT=y CONFIG_MIPS32_N32=y CONFIG_MIPS32_O32=y +# CONFIG_MIPS_VA_BITS_48 is not set CONFIG_MODULES_USE_ELF_RELA=y CONFIG_PCI_BUS_ADDR_T_64BIT=y CONFIG_PGTABLE_LEVELS=3 CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_SYSVIPC_COMPAT=y CONFIG_SYS_SUPPORTS_HUGETLBFS=y -# CONFIG_THUNDER_NIC_BGX is not set -# CONFIG_THUNDER_NIC_PF is not set -# CONFIG_THUNDER_NIC_VF is not set CONFIG_ZONE_DMA32=y diff --git a/target/linux/mpc85xx/Makefile b/target/linux/mpc85xx/Makefile index 8428bec6bc0d64..b181e67c0e5e12 100644 --- a/target/linux/mpc85xx/Makefile +++ b/target/linux/mpc85xx/Makefile @@ -16,17 +16,10 @@ SUBTARGETS:=generic p1020 KERNEL_PATCHVER:=4.9 -define Target/Description - Build images for the Freescale MPC85xx based boards. -endef +KERNELNAME:=zImage include $(INCLUDE_DIR)/target.mk -KERNEL_IMAGES := zImage -ifeq ($(SUBTARGET),generic) -KERNEL_IMAGES += cuImage.tl-wdr4900-v1 -endif - DEFAULT_PACKAGES += \ kmod-input-core kmod-input-gpio-keys kmod-button-hotplug \ kmod-leds-gpio swconfig kmod-ath9k wpad-mini diff --git a/target/linux/mpc85xx/base-files/etc/board.d/02_network b/target/linux/mpc85xx/base-files/etc/board.d/02_network index 511b56b1cc72ab..19f01a658970e4 100755 --- a/target/linux/mpc85xx/base-files/etc/board.d/02_network +++ b/target/linux/mpc85xx/base-files/etc/board.d/02_network @@ -10,7 +10,10 @@ board_config_update board=$(board_name) case "$board" in -tl-wdr4900-v1) +aerohive,hiveap-330) + ucidef_set_interfaces_lan_wan "eth1" "eth0" + ;; +tplink,tl-wdr4900-v1) ucidef_add_switch "switch0" \ "0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan" ucidef_set_interface_macaddr "wan" "$(mtd_get_mac_binary config 332)" diff --git a/target/linux/mpc85xx/base-files/etc/diag.sh b/target/linux/mpc85xx/base-files/etc/diag.sh index b269427a51640b..3d56d14b08d2d9 100644 --- a/target/linux/mpc85xx/base-files/etc/diag.sh +++ b/target/linux/mpc85xx/base-files/etc/diag.sh @@ -5,11 +5,14 @@ . /lib/functions/leds.sh get_status_led() { - case $(board_name) in - tl-wdr4900-v1) - status_led="tp-link:blue:system" - ;; - esac + case $(board_name) in + aerohive,hiveap-330) + status_led="hiveap-330:green:tricolor0" + ;; + tplink,tl-wdr4900-v1) + status_led="tp-link:blue:system" + ;; + esac } set_state() { diff --git a/target/linux/mpc85xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/mpc85xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 4b5b7a30ba9665..3e6488b4c7635b 100644 --- a/target/linux/mpc85xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/mpc85xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -42,7 +42,7 @@ board=$(board_name) case "$FIRMWARE" in "pci_wmac0.eeprom") case $board in - tl-wdr4900-v1) + tplink,tl-wdr4900-v1) ath9k_eeprom_extract "caldata" 4096 2048 tpl_set_wireless_mac 0 ;; @@ -54,7 +54,7 @@ case "$FIRMWARE" in "pci_wmac1.eeprom") case $board in - tl-wdr4900-v1) + tplink,tl-wdr4900-v1) ath9k_eeprom_extract "caldata" 20480 2048 tpl_set_wireless_mac -1 ;; diff --git a/target/linux/mpc85xx/base-files/lib/mpc85xx.sh b/target/linux/mpc85xx/base-files/lib/mpc85xx.sh deleted file mode 100755 index 1a2a671e28ed3b..00000000000000 --- a/target/linux/mpc85xx/base-files/lib/mpc85xx.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2013 OpenWrt.org -# - -MPC85XX_BOARD_NAME= -MPC85XX_MODEL= - -mpc85xx_board_detect() { - local model - local name - - model=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /model/ {print $2}' /proc/cpuinfo) - - case "$model" in - *"TL-WDR4900 v1") - name="tl-wdr4900-v1" - ;; - esac - - [ -z "$name" ] && name="unknown" - - [ -z "$MPC85XX_BOARD_NAME" ] && MPC85XX_BOARD_NAME="$name" - [ -z "$MPC85XX_MODEL" ] && MPC85XX_MODEL="$model" - - [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/" - - echo "$MPC85XX_BOARD_NAME" > /tmp/sysinfo/board_name - echo "$MPC85XX_MODEL" > /tmp/sysinfo/model -} diff --git a/target/linux/mpc85xx/base-files/lib/preinit/01_preinit_do_mpc85xx.sh b/target/linux/mpc85xx/base-files/lib/preinit/01_preinit_do_mpc85xx.sh deleted file mode 100644 index 88ba608379a8e5..00000000000000 --- a/target/linux/mpc85xx/base-files/lib/preinit/01_preinit_do_mpc85xx.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -do_mpc85xx() { - . /lib/mpc85xx.sh - - mpc85xx_board_detect -} - -boot_hook_add preinit_main do_mpc85xx diff --git a/target/linux/mpc85xx/base-files/lib/preinit/05_set_preinit_iface_mpc85xx b/target/linux/mpc85xx/base-files/lib/preinit/05_set_preinit_iface_mpc85xx index 22d7471dda0d72..748a87490e0930 100644 --- a/target/linux/mpc85xx/base-files/lib/preinit/05_set_preinit_iface_mpc85xx +++ b/target/linux/mpc85xx/base-files/lib/preinit/05_set_preinit_iface_mpc85xx @@ -3,8 +3,6 @@ # Copyright (C) 2013 OpenWrt.org # -. /lib/mpc85xx.sh - mpc85xx_set_preinit_iface() { ifname=eth0 } diff --git a/target/linux/mpc85xx/base-files/lib/upgrade/platform.sh b/target/linux/mpc85xx/base-files/lib/upgrade/platform.sh index 65b3674769c001..67e8324c2aa840 100755 --- a/target/linux/mpc85xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/mpc85xx/base-files/lib/upgrade/platform.sh @@ -3,73 +3,13 @@ # PART_NAME=firmware - -tplink_get_hwid() { - local part - - part=$(find_mtd_part u-boot) - [ -z "$part" ] && return 1 - - dd if=$part bs=4 count=1 skip=81728 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"' -} - -tplink_get_image_hwid() { - get_image "$@" | dd bs=4 count=1 skip=16 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"' -} - -tplink_get_image_boot_size() { - get_image "$@" | dd bs=4 count=1 skip=37 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"' -} +REQUIRE_IMAGE_METADATA=1 platform_check_image() { - local board=$(board_name) - local magic="$(get_magic_long "$1")" - - [ "$#" -gt 1 ] && return 1 - - case $board in - tl-wdr4900-v1) - [ "$magic" != "01000000" ] && { - echo "Invalid image type." - return 1 - } - - local hwid - local imageid - - hwid=$(tplink_get_hwid) - imageid=$(tplink_get_image_hwid "$1") - - [ "$hwid" != "$imageid" ] && { - echo "Invalid image, hardware ID mismatch, hw:$hwid image:$imageid." - return 1 - } - - local boot_size - - boot_size=$(tplink_get_image_boot_size "$1") - [ "$boot_size" != "00000000" ] && { - echo "Invalid image, it contains a bootloader." - return 1 - } - - return 0 - ;; - esac - - echo "Sysupgrade is not yet supported on $board." - return 1 + return 0 } -platform_do_upgrade() { - local board=$(board_name) - - case "$board" in - *) - default_do_upgrade "$ARGV" - ;; - esac -} +# use default for platform_do_upgrade() disable_watchdog() { killall watchdog diff --git a/target/linux/mpc85xx/config-4.9 b/target/linux/mpc85xx/config-4.9 index 64ab2396133079..f8114215fbfd82 100644 --- a/target/linux/mpc85xx/config-4.9 +++ b/target/linux/mpc85xx/config-4.9 @@ -37,6 +37,7 @@ CONFIG_CLONE_BACKWARDS=y CONFIG_CLZ_TAB=y CONFIG_CMDLINE="console=ttyS0,115200" CONFIG_CMDLINE_BOOL=y +# CONFIG_CMDLINE_OVERRIDE is not set # CONFIG_CORENET_GENERIC is not set # CONFIG_CPM2 is not set CONFIG_CPU_BIG_ENDIAN=y @@ -72,7 +73,7 @@ CONFIG_CRYPTO_RSA=y # CONFIG_CRYPTO_SHA256_PPC_SPE is not set CONFIG_CRYPTO_WORKQUEUE=y CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEFAULT_UIMAGE=y +# CONFIG_DEFAULT_UIMAGE is not set CONFIG_DNOTIFY=y CONFIG_DTC=y # CONFIG_E200 is not set @@ -95,7 +96,7 @@ CONFIG_FSL_PCI=y CONFIG_FSL_PQ_MDIO=y CONFIG_FSL_SOC=y CONFIG_FSL_SOC_BOOKE=y -CONFIG_FSL_ULI1575=y +# CONFIG_FSL_ULI1575 is not set CONFIG_GENERIC_ALLOCATOR=y CONFIG_GENERIC_ATOMIC64=y CONFIG_GENERIC_BUG=y @@ -125,7 +126,7 @@ CONFIG_GPIO_SYSFS=y CONFIG_HAS_DMA=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y -CONFIG_HAS_RAPIDIO=y +# CONFIG_HAS_RAPIDIO is not set # CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set CONFIG_HAVE_ARCH_AUDITSYSCALL=y # CONFIG_HAVE_ARCH_BITREVERSE is not set @@ -160,6 +161,7 @@ CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_VIRT_CPU_ACCOUNTING=y +# CONFIG_HIVEAP_330 is not set CONFIG_HW_RANDOM=y CONFIG_HZ=250 # CONFIG_HZ_100 is not set @@ -185,21 +187,18 @@ CONFIG_LIBFDT=y CONFIG_LOWMEM_CAM_NUM=3 CONFIG_LOWMEM_SIZE=0x30000000 CONFIG_LXT_PHY=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y # CONFIG_MATH_EMULATION is not set CONFIG_MDIO_BOARDINFO=y -# CONFIG_MFD_MAX77620 is not set CONFIG_MIGRATION=y # CONFIG_MMIO_NVRAM is not set CONFIG_MODULES_USE_ELF_RELA=y # CONFIG_MPC8536_DS is not set # CONFIG_MPC8540_ADS is not set # CONFIG_MPC8560_ADS is not set -CONFIG_MPC85xx_CDS=y +# CONFIG_MPC85xx_CDS is not set # CONFIG_MPC85xx_DS is not set -CONFIG_MPC85xx_MDS=y -CONFIG_MPC85xx_RDB=y +# CONFIG_MPC85xx_MDS is not set +# CONFIG_MPC85xx_RDB is not set CONFIG_MPIC=y # CONFIG_MPIC_MSGR is not set CONFIG_MPIC_TIMER=y @@ -232,7 +231,7 @@ CONFIG_OF_PCI_IRQ=y CONFIG_OF_RESERVED_MEM=y CONFIG_OLD_SIGACTION=y CONFIG_OLD_SIGSUSPEND=y -CONFIG_P1010_RDB=y +# CONFIG_P1010_RDB is not set # CONFIG_P1022_DS is not set # CONFIG_P1022_RDK is not set # CONFIG_P1023_RDB is not set @@ -274,7 +273,7 @@ CONFIG_PPC_DOORBELL=y # CONFIG_PPC_EARLY_DEBUG is not set # CONFIG_PPC_EPAPR_HV_PIC is not set CONFIG_PPC_FSL_BOOK3E=y -CONFIG_PPC_I8259=y +# CONFIG_PPC_I8259 is not set # CONFIG_PPC_ICP_HV is not set # CONFIG_PPC_ICP_NATIVE is not set # CONFIG_PPC_ICS_RTAS is not set @@ -332,7 +331,7 @@ CONFIG_SWPHY=y CONFIG_SYSCTL_EXCEPTION_TRACE=y CONFIG_TASK_SIZE=0xc0000000 CONFIG_TICK_CPU_ACCOUNTING=y -CONFIG_TL_WDR4900_V1=y +# CONFIG_TL_WDR4900_V1 is not set # CONFIG_TQM8540 is not set # CONFIG_TQM8541 is not set # CONFIG_TQM8548 is not set diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts new file mode 100644 index 00000000000000..5e732664aa7366 --- /dev/null +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts @@ -0,0 +1,228 @@ +/* + * Aerohive HiveAP-330 Device Tree Source + * + * Copyright (C) 2017 Chris Blake + * + * 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; either version 2 of the License, or (at your + * option) any later version. + */ + +/include/ "fsl/p1020si-pre.dtsi" +/ { + model = "Aerohive HiveAP-330"; + compatible = "aerohive,hiveap-330"; + + chosen { + bootargs-override = "console=ttyS0,9600"; + }; + + memory { + device_type = "memory"; + }; + + board_lbc: lbc: localbus@ffe05000 { + reg = <0 0xffe05000 0 0x1000>; + ranges = <0x0 0x0 0x0 0xec000000 0x4000000>; + + nor@0,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <0x0 0x0 0x4000000>; + bank-width = <2>; + device-width = <1>; + + partition@0 { + reg = <0x0 0x40000>; + label = "dtb"; + }; + + partition@40000 { + reg = <0x40000 0x40000>; + label = "initrd"; + }; + + partition@80000 { + reg = <0x80000 0x27c0000>; + label = "rootfs"; + }; + + partition@2840000 { + reg = <0x2840000 0x800000>; + label = "kernel"; + }; + + partition@3040000 { + reg = <0x3040000 0xec0000>; + label = "stock-jffs2"; + read-only; + }; + + hwinfo: partition@3f00000 { + reg = <0x3f00000 0x20000>; + label = "hw-info"; + read-only; + }; + + partition@3f20000 { + reg = <0x3f20000 0x20000>; + label = "boot-info"; + read-only; + }; + + partition@3f40000 { + reg = <0x3f40000 0x20000>; + label = "boot-info-backup"; + read-only; + }; + + partition@3f60000 { + reg = <0x3f60000 0x20000>; + label = "u-boot-env"; + }; + + partition@3f80000 { + reg = <0x3f80000 0x80000>; + label = "u-boot"; + read-only; + }; + + firmware@0 { + reg = <0x0 0x3040000>; + label = "firmware"; + }; + }; + }; + + board_soc: soc: soc@ffe00000 { + ranges = <0x0 0x0 0xffe00000 0x100000>; + + i2c@3100 { + tpm@29 { + compatible = "atmel,at97sc3204t"; + reg = <0x29>; + }; + + lp5521@32 { + compatible = "national,lp5521"; + reg = <0x32>; + clock-mode = /bits/ 8 <2>; + chan0 { + chan-name = "hiveap-330:red:tricolor0"; + led-cur = /bits/ 8 <0x2f>; + max-cur = /bits/ 8 <0x5f>; + }; + chan1 { + chan-name = "hiveap-330:green:tricolor0"; + led-cur = /bits/ 8 <0x2f>; + max-cur = /bits/ 8 <0x5f>; + }; + chan2 { + chan-name = "hiveap-330:blue:tricolor0"; + led-cur = /bits/ 8 <0x2f>; + max-cur = /bits/ 8 <0x5f>; + }; + }; + + /* Most likely SoC boot config */ + eeprom@51 { + compatible = "eeprom"; + reg = <0x51>; + }; + }; + + mdio@24000 { + phy0: ethernet-phy@0 { + interrupts = <3 1 0 0>; + reg = <0x1>; + }; + + phy1: ethernet-phy@1 { + interrupts = <2 1 0 0>; + reg = <0x2>; + }; + }; + + mdio@25000 { + status = "disabled"; + }; + + mdio@26000 { + status = "disabled"; + }; + + enet0: ethernet@b0000 { + status = "okay"; + phy-handle = <&phy0>; + phy-connection-type = "rgmii-id"; + mtd-mac-address = <&hwinfo 0>; + }; + + enet1: ethernet@b1000 { + status = "disabled"; + }; + + enet2: ethernet@b2000 { + status = "okay"; + phy-handle = <&phy1>; + phy-connection-type = "rgmii-id"; + mtd-mac-address = <&hwinfo 0>; + mtd-mac-address-increment = <1>; + }; + + gpio0: gpio-controller@fc00 { + }; + + usb@22000 { + phy_type = "ulpi"; + dr_mode = "host"; + }; + + usb@23000 { + status = "disabled"; + }; + }; + + pci0: pcie@ffe09000 { + reg = <0x0 0xffe09000 0x0 0x1000>; + ranges = <0x2000000 0x0 0xa0000000 0x0 0xa0000000 0x0 0x20000000 + 0x1000000 0x0 0x00000000 0x0 0xffc30000 0x0 0x10000>; + pcie@0 { + ranges = <0x2000000 0x0 0xa0000000 + 0x2000000 0x0 0xa0000000 + 0x0 0x20000000 + + 0x1000000 0x0 0x0 + 0x1000000 0x0 0x0 + 0x0 0x100000>; + }; + }; + + pci1: pcie@ffe0a000 { + reg = <0x0 0xffe0a000 0x0 0x1000>; + ranges = <0x2000000 0x0 0xc0000000 0x0 0xc0000000 0x0 0x20000000 + 0x1000000 0x0 0x00000000 0x0 0xffc20000 0x0 0x10000>; + pcie@0 { + ranges = <0x2000000 0x0 0xc0000000 + 0x2000000 0x0 0xc0000000 + 0x0 0x20000000 + + 0x1000000 0x0 0x0 + 0x1000000 0x0 0x0 + 0x0 0x100000>; + }; + }; + + buttons { + compatible = "gpio-keys"; + + reset { + label = "Reset button"; + gpios = <&gpio0 8 1>; /* active low */ + linux,code = <0x198>; /* KEY_RESTART */ + }; + }; +}; +/include/ "fsl/p1020si-post.dtsi" diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts index 2ad58d3fda14a3..c2444936b76b9e 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts @@ -13,7 +13,7 @@ / { model = "TP-Link TL-WDR4900 v1"; - compatible = "tp-link,TL-WDR4900v1"; + compatible = "tplink,tl-wdr4900-v1"; chosen { bootargs = "console=ttyS0,115200"; diff --git a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/hiveap-330.c b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/hiveap-330.c new file mode 100644 index 00000000000000..f325b32ce6bed3 --- /dev/null +++ b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/hiveap-330.c @@ -0,0 +1,89 @@ +/* + * Aerohive HiveAP-330 Board Setup + * + * Copyright (C) 2017 Chris Blake + * + * Based on: + * mpc85xx_rdb.c: + * MPC85xx RDB Board Setup + * Copyright 2013 Freescale Semiconductor Inc. + * + * 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; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include "smp.h" + +#include "mpc85xx.h" + +void __init hiveap_330_pic_init(void) +{ + struct mpic *mpic; + + mpic = mpic_alloc(NULL, 0, + MPIC_BIG_ENDIAN | + MPIC_SINGLE_DEST_CPU, + 0, 256, " OpenPIC "); + + BUG_ON(mpic == NULL); + mpic_init(mpic); +} + +/* + * Setup the architecture + */ +static void __init hiveap_330_setup_arch(void) +{ + if (ppc_md.progress) + ppc_md.progress("hiveap_330_setup_arch()", 0); + + mpc85xx_smp_init(); + + fsl_pci_assign_primary(); + + printk(KERN_INFO "HiveAP-330 board from Aerohive\n"); +} + +machine_arch_initcall(hiveap_330, mpc85xx_common_publish_devices); + +/* + * Called very early, device-tree isn't unflattened + */ +static int __init hiveap_330_probe(void) +{ + if (of_machine_is_compatible("aerohive,hiveap-330")) + return 1; + return 0; +} + +define_machine(hiveap_330) { + .name = "P1020 RDB", + .probe = hiveap_330_probe, + .setup_arch = hiveap_330_setup_arch, + .init_IRQ = hiveap_330_pic_init, +#ifdef CONFIG_PCI + .pcibios_fixup_bus = fsl_pcibios_fixup_bus, + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, +#endif + .get_irq = mpic_get_irq, + .calibrate_decr = generic_calibrate_decr, + .progress = udbg_progress, +}; diff --git a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/tl_wdr4900_v1.c b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/tl_wdr4900_v1.c index 1b6dc18ac2406f..9d7a22d1733708 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/tl_wdr4900_v1.c +++ b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/tl_wdr4900_v1.c @@ -124,7 +124,7 @@ static int __init tl_wdr4900_v1_probe(void) { unsigned long root = of_get_flat_dt_root(); - if (of_flat_dt_is_compatible(root, "tp-link,TL-WDR4900v1")) + if (of_flat_dt_is_compatible(root, "tplink,tl-wdr4900-v1")) return 1; return 0; diff --git a/target/linux/mpc85xx/generic/config-default b/target/linux/mpc85xx/generic/config-default index e69de29bb2d1d6..81bf934b33c1db 100644 --- a/target/linux/mpc85xx/generic/config-default +++ b/target/linux/mpc85xx/generic/config-default @@ -0,0 +1 @@ +CONFIG_TL_WDR4900_V1=y diff --git a/target/linux/mpc85xx/profiles/00-default.mk b/target/linux/mpc85xx/generic/profiles/00-default.mk similarity index 64% rename from target/linux/mpc85xx/profiles/00-default.mk rename to target/linux/mpc85xx/generic/profiles/00-default.mk index 7dcb8faaa3a0d1..67507ace8a34ef 100644 --- a/target/linux/mpc85xx/profiles/00-default.mk +++ b/target/linux/mpc85xx/generic/profiles/00-default.mk @@ -1,15 +1,15 @@ # -# Copyright (C) 2013 OpenWrt.org -# # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # define Profile/Default - NAME:=Default Profile (all drivers) + NAME:=Default Profile + PRIORITY:=1 endef define Profile/Default/Description - Default package set compatible with most boards. + Default package set compatible with most MPC85xx boards. endef + $(eval $(call Profile,Default)) diff --git a/target/linux/mpc85xx/generic/target.mk b/target/linux/mpc85xx/generic/target.mk index f8a79a7b903835..2620a228990a1b 100644 --- a/target/linux/mpc85xx/generic/target.mk +++ b/target/linux/mpc85xx/generic/target.mk @@ -1,4 +1,5 @@ BOARDNAME:=Generic +KERNELNAME:=cuImage.tl-wdr4900-v1 define Target/Description Build firmware images for generic MPC85xx based boards. diff --git a/target/linux/mpc85xx/image/Makefile b/target/linux/mpc85xx/image/Makefile index 25a9b070c5f9df..7ae6e27b35460f 100644 --- a/target/linux/mpc85xx/image/Makefile +++ b/target/linux/mpc85xx/image/Makefile @@ -1,77 +1,79 @@ # -# Copyright (C) 2010 OpenWrt.org -# # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk -define imgname -$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1))) -endef +DEVICE_VARS += TPLINK_HWID TPLINK_HWREV TPLINK_FLASHLAYOUT -define sysupname -$(call imgname,$(1),$(2))-sysupgrade.bin +define Device/Default + PROFILES := Default + DEVICE_DTS := $(1) + KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts) + KERNEL_ENTRY := 0x00000000 + KERNEL_LOADADDR := 0x00000000 + KERNEL := kernel-bin endef -define factoryname -$(call imgname,$(1),$(2))-factory.bin +define Build/append-uImage-fakeramdisk-hdr + rm -f $@.fakeramdisk + $(STAGING_DIR_HOST)/bin/mkimage \ + -A $(LINUX_KARCH) -O linux -T ramdisk -C none \ + -n 'fakeramdisk' \ + -s \ + $@.fakeramdisk + cat $@.fakeramdisk >> $@ endef -zImage:=$(BIN_DIR)/$(IMG_PREFIX)-zImage - -DTS_TARGETS = fsl/p1010rdb-pa tl-wdr4900-v1 fsl/p1020rdb - -define Image/BuildKernel - cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage - $(foreach dts,$(DTS_TARGETS), - $(LINUX_DIR)/scripts/dtc/dtc -I dts -O dtb $(DTS_DIR)/$(dts).dts > $(BIN_DIR)/$(IMG_PREFIX)-$(notdir $(dts)).fdt - ) +define Build/tplink-v1-image + $(STAGING_DIR_HOST)/bin/mktplinkfw \ + -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) \ + -N "$(VERSION_DIST)" -V $(REVISION) \ + -k $(IMAGE_KERNEL) \ + -r $(IMAGE_ROOTFS) \ + -j \ + $(1) \ + -o $@ endef -define Image/BuildKernel/Initramfs - cp $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-initramfs-zImage ifeq ($(SUBTARGET),generic) - cp $(KDIR)/cuImage.tl-wdr4900-v1-initramfs $(BIN_DIR)/$(IMG_PREFIX)-tl-wdr4900-v1-initramfs.uImage -endif -endef - -define Image/Build/TPLINK - -$(STAGING_DIR_HOST)/bin/mktplinkfw \ - -H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) $(7) \ - -k $(KDIR)/$(3) \ - -r $(KDIR)/root.$(1) \ - -o $(call factoryname,$(1),$(2)) - -$(STAGING_DIR_HOST)/bin/mktplinkfw \ - -H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) $(7) -s \ - -k $(KDIR)/$(3) \ - -r $(KDIR)/root.$(1) \ - -o $(call sysupname,$(1),$(2)) -endef -define Image/Build/Profile/TLWDR4900 - $(call Image/Build/TPLINK,$(1),tl-wdr4900-v1,cuImage.tl-wdr4900-v1,0x49000001,1,16Mppc) +define Device/tl-wdr4900-v1 + DEVICE_TITLE := TP-Link TL-WDR4900 + DEVICE_PACKAGES := kmod-ath9k wpad-mini + TPLINK_HWID := 0x49000001 + TPLINK_HWREV := 1 + TPLINK_FLASHLAYOUT := 16Mppc + KERNEL_NAME := cuImage.tl-wdr4900-v1 + SUPPORTED_DEVICES:=tl-wdr4900-v1 tplink,tl-wdr4900-v1 + IMAGES := fdt.bin factory.bin sysupgrade.bin + IMAGE/fdt.bin := append-dtb + IMAGE/factory.bin := tplink-v1-image + IMAGE/sysupgrade.bin := tplink-v1-image -s | append-metadata endef +TARGET_DEVICES += tl-wdr4900-v1 -define Image/Build/Profile/Default - $(call Image/Build/Profile/TLWDR4900,$(1)) -endef +endif -define Image/Build/ext2 - cp $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-ext2.img -endef +ifeq ($(SUBTARGET),p1020) -define Image/Build/squashfs - $(call prepare_generic_squashfs,$(KDIR)/root.squashfs) - cp $(KDIR)/root.squashfs $(BIN_DIR)/$(IMG_PREFIX)-root.squashfs +define Device/hiveap-330 + DEVICE_TITLE := Aerohive HiveAP-330 + DEVICE_PACKAGES := kmod-ath9k wpad-mini kmod-tpm-i2c-atmel + BLOCKSIZE := 128k + KERNEL_NAME := zImage + KERNEL_SIZE := 8m + SUPPORTED_DEVICES := aerohive,hiveap-330 + IMAGES := fdt.bin sysupgrade.bin + IMAGE/fdt.bin := append-dtb + IMAGE/sysupgrade.bin := append-dtb | pad-to 256k | check-size 256k | \ + append-uImage-fakeramdisk-hdr | pad-to 256k | check-size 512k | \ + append-rootfs | pad-rootfs $$(BLOCKSIZE) | pad-to 41216k | check-size 41216k | \ + append-kernel | append-metadata endef +TARGET_DEVICES += hiveap-330 -PROFILE ?= Default - -define Image/Build - $(call Image/Build/$(1),$(1)) - $(call Image/Build/Profile/$(PROFILE),$(1)) -endef +endif $(eval $(call BuildImage)) diff --git a/target/linux/mpc85xx/p1020/config-default b/target/linux/mpc85xx/p1020/config-default index 8fd795730ec741..fd9433b59a0e21 100644 --- a/target/linux/mpc85xx/p1020/config-default +++ b/target/linux/mpc85xx/p1020/config-default @@ -1,15 +1,31 @@ CONFIG_ARCH_HAS_TICK_BROADCAST=y +CONFIG_AT803X_PHY=y +CONFIG_CMDLINE_OVERRIDE=y CONFIG_CPU_RMAP=y +CONFIG_EEPROM_LEGACY=y CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y CONFIG_GENERIC_TBSYNC=y +# CONFIG_GPIO_MAX77620 is not set CONFIG_HAVE_RCU_TABLE_FREE=y +CONFIG_HIVEAP_330=y +CONFIG_I2C_CHARDEV=y +CONFIG_LEDS_LP5521=y +CONFIG_LEDS_LP55XX_COMMON=y CONFIG_LOCK_SPIN_ON_OWNER=y +# CONFIG_MAX77620_WATCHDOG is not set +CONFIG_MFD_CORE=y +CONFIG_MFD_MAX77620=y +CONFIG_MTD_CFI=y +CONFIG_MTD_PHYSMAP=y CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_NET_FLOW_LIMIT=y CONFIG_NR_CPUS=2 +CONFIG_PADATA=y CONFIG_RCU_STALL_COMMON=y +CONFIG_REGMAP_IRQ=y CONFIG_RFS_ACCEL=y CONFIG_RPS=y +# CONFIG_RTC_DRV_MAX77686 is not set CONFIG_RWSEM_SPIN_ON_OWNER=y CONFIG_SMP=y CONFIG_TREE_RCU=y diff --git a/target/linux/mpc85xx/p1020/profiles/00-default.mk b/target/linux/mpc85xx/p1020/profiles/00-default.mk new file mode 100644 index 00000000000000..67d43020a27522 --- /dev/null +++ b/target/linux/mpc85xx/p1020/profiles/00-default.mk @@ -0,0 +1,15 @@ +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/Default + NAME:=Default Profile + PRIORITY:=1 +endef + +define Profile/Default/Description + Default package set compatible with most P1020 boards. +endef + +$(eval $(call Profile,Default)) diff --git a/target/linux/mpc85xx/p1020/target.mk b/target/linux/mpc85xx/p1020/target.mk index c111d7a4af48a5..5d84d832056748 100644 --- a/target/linux/mpc85xx/p1020/target.mk +++ b/target/linux/mpc85xx/p1020/target.mk @@ -1,6 +1,6 @@ BOARDNAME:=P1020 +FEATURES += ramdisk define Target/Description Build firmware images for Freescale P1020 based boards. endef - diff --git a/target/linux/mpc85xx/patches-4.9/101-powerpc-85xx-hiveap-330-support.patch b/target/linux/mpc85xx/patches-4.9/101-powerpc-85xx-hiveap-330-support.patch new file mode 100644 index 00000000000000..ece8c7d80e2645 --- /dev/null +++ b/target/linux/mpc85xx/patches-4.9/101-powerpc-85xx-hiveap-330-support.patch @@ -0,0 +1,30 @@ +--- a/arch/powerpc/platforms/85xx/Kconfig ++++ b/arch/powerpc/platforms/85xx/Kconfig +@@ -48,6 +48,17 @@ config BSC9132_QDS + and dual StarCore SC3850 DSP cores. + Manufacturer : Freescale Semiconductor, Inc + ++config HIVEAP_330 ++ bool "Aerohive HiveAP-330" ++ select DEFAULT_UIMAGE ++ select ARCH_REQUIRE_GPIOLIB ++ select GPIO_MPC8XXX ++ help ++ This option enables support for the Aerohive HiveAP-330 board. ++ ++ This board is a Concurrent Dual-Band wireless access point with a ++ Freescale P1020 SoC. ++ + config MPC8540_ADS + bool "Freescale MPC8540 ADS" + select DEFAULT_UIMAGE +--- a/arch/powerpc/platforms/85xx/Makefile ++++ b/arch/powerpc/platforms/85xx/Makefile +@@ -9,6 +9,7 @@ obj-y += common.o + obj-$(CONFIG_BSC9131_RDB) += bsc913x_rdb.o + obj-$(CONFIG_BSC9132_QDS) += bsc913x_qds.o + obj-$(CONFIG_C293_PCIE) += c293pcie.o ++obj-$(CONFIG_HIVEAP_330) += hiveap-330.o + obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o + obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o + obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o diff --git a/target/linux/mpc85xx/patches-4.9/102-powerpc-add-cmdline-override.patch b/target/linux/mpc85xx/patches-4.9/102-powerpc-add-cmdline-override.patch new file mode 100644 index 00000000000000..3d59927d1dd4b7 --- /dev/null +++ b/target/linux/mpc85xx/patches-4.9/102-powerpc-add-cmdline-override.patch @@ -0,0 +1,37 @@ +--- a/arch/powerpc/Kconfig ++++ b/arch/powerpc/Kconfig +@@ -707,6 +707,14 @@ config CMDLINE_FORCE + This is useful if you cannot or don't want to change the + command-line options your boot loader passes to the kernel. + ++config CMDLINE_OVERRIDE ++ bool "Use alternative cmdline from device tree" ++ help ++ Some bootloaders may have uneditable bootargs. While CMDLINE_FORCE can ++ be used, this is not a good option for kernels that are shared across ++ devices. This setting enables using "chosen/cmdline-override" as the ++ cmdline if it exists in the device tree. ++ + config EXTRA_TARGETS + string "Additional default image types" + help +--- a/drivers/of/fdt.c ++++ b/drivers/of/fdt.c +@@ -1079,6 +1079,17 @@ int __init early_init_dt_scan_chosen(uns + if (p != NULL && l > 0) + strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); + ++ /* CONFIG_CMDLINE_OVERRIDE is used to fallback to a different ++ * device tree option of chosen/bootargs-override. This is ++ * helpful on boards where u-boot sets bootargs, and is unable ++ * to be modified. ++ */ ++#ifdef CONFIG_CMDLINE_OVERRIDE ++ p = of_get_flat_dt_prop(node, "bootargs-override", &l); ++ if (p != NULL && l > 0) ++ strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); ++#endif ++ + /* + * CONFIG_CMDLINE is meant to be a default in case nothing else + * managed to set the command line, unless CONFIG_CMDLINE_FORCE diff --git a/target/linux/mpc85xx/profiles/tp-link.mk b/target/linux/mpc85xx/profiles/tp-link.mk deleted file mode 100644 index 18a7cddd83fb93..00000000000000 --- a/target/linux/mpc85xx/profiles/tp-link.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/TLWDR4900 - NAME:=TP-Link TL-WDR4900 - PACKAGES:=kmod-ath9k wpad-mini -endef - -define Profile/TLWDR4900/Description - Package set optimized for the TP-Link TL-WDR4900. -endef -$(eval $(call Profile,TLWDR4900)) diff --git a/target/linux/octeon/config-4.14 b/target/linux/octeon/config-4.14 new file mode 100644 index 00000000000000..687b37f3c39eba --- /dev/null +++ b/target/linux/octeon/config-4.14 @@ -0,0 +1,322 @@ +CONFIG_64BIT=y +CONFIG_ARCH_BINFMT_ELF_STATE=y +CONFIG_ARCH_CLOCKSOURCE_DATA=y +CONFIG_ARCH_DISCARD_MEMBLOCK=y +CONFIG_ARCH_DMA_ADDR_T_64BIT=y +CONFIG_ARCH_HAS_ELF_RANDOMIZE=y +# CONFIG_ARCH_HAS_GCOV_PROFILE_ALL is not set +# CONFIG_ARCH_HAS_SG_CHAIN is not set +# CONFIG_ARCH_HAS_STRICT_KERNEL_RWX is not set +# CONFIG_ARCH_HAS_STRICT_MODULE_RWX is not set +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y +CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y +CONFIG_ARCH_MMAP_RND_BITS=12 +CONFIG_ARCH_MMAP_RND_BITS_MAX=18 +CONFIG_ARCH_MMAP_RND_BITS_MIN=12 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS=8 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15 +# CONFIG_ARCH_OPTIONAL_KERNEL_RWX is not set +# CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT is not set +CONFIG_ARCH_PHYS_ADDR_T_64BIT=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_SUPPORTS_UPROBES=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ARCH_USE_BUILTIN_BSWAP=y +CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y +CONFIG_ARCH_USE_QUEUED_RWLOCKS=y +CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y +# CONFIG_ARCH_WANTS_THP_SWAP is not set +CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y +CONFIG_BINFMT_ELF32=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_SD=y +CONFIG_BLK_MQ_PCI=y +CONFIG_BLK_SCSI_REQUEST=y +CONFIG_BLOCK_COMPAT=y +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 +CONFIG_BUILTIN_DTB=y +CONFIG_CAVIUM_CN63XXP1=y +CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE=2 +CONFIG_CAVIUM_OCTEON_LOCK_L2=y +CONFIG_CAVIUM_OCTEON_LOCK_L2_EXCEPTION=y +CONFIG_CAVIUM_OCTEON_LOCK_L2_INTERRUPT=y +CONFIG_CAVIUM_OCTEON_LOCK_L2_LOW_LEVEL_INTERRUPT=y +CONFIG_CAVIUM_OCTEON_LOCK_L2_MEMCPY=y +CONFIG_CAVIUM_OCTEON_LOCK_L2_TLB=y +CONFIG_CAVIUM_OCTEON_SOC=y +CONFIG_CEVT_R4K=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_COMPAT=y +CONFIG_COMPAT_BRK=y +CONFIG_COMPAT_NETLINK_MESSAGES=y +CONFIG_CPU_BIG_ENDIAN=y +CONFIG_CPU_CAVIUM_OCTEON=y +CONFIG_CPU_GENERIC_DUMP_TLB=y +CONFIG_CPU_HAS_PREFETCH=y +CONFIG_CPU_HAS_RIXI=y +CONFIG_CPU_HAS_SYNC=y +# CONFIG_CPU_LITTLE_ENDIAN is not set +CONFIG_CPU_MIPSR2=y +CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y +CONFIG_CPU_R4K_FPU=y +CONFIG_CPU_RMAP=y +CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y +CONFIG_CPU_SUPPORTS_HIGHMEM=y +CONFIG_CPU_SUPPORTS_HUGEPAGES=y +CONFIG_CRAMFS=y +CONFIG_CRASH_CORE=y +CONFIG_CRC16=y +CONFIG_CRYPTO_AEAD=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_CRC32=y +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +# CONFIG_CRYPTO_MD5_OCTEON is not set +CONFIG_CRYPTO_NULL2=y +CONFIG_CRYPTO_RNG2=y +# CONFIG_CRYPTO_SHA1_OCTEON is not set +# CONFIG_CRYPTO_SHA256_OCTEON is not set +# CONFIG_CRYPTO_SHA512_OCTEON is not set +CONFIG_CRYPTO_WORKQUEUE=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_SPINLOCK=y +CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 +CONFIG_DETECT_HUNG_TASK=y +CONFIG_DMA_COHERENT=y +# CONFIG_DMA_NOOP_OPS is not set +# CONFIG_DMA_VIRT_OPS is not set +CONFIG_DNOTIFY=y +# CONFIG_DRM_LIB_RANDOM is not set +CONFIG_DTC=y +CONFIG_EARLY_PRINTK=y +CONFIG_EDAC_ATOMIC_SCRUB=y +CONFIG_EDAC_SUPPORT=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_EXPORTFS=y +CONFIG_EXT4_FS=y +# CONFIG_F2FS_CHECK_FS is not set +CONFIG_F2FS_FS=y +# CONFIG_F2FS_FS_SECURITY is not set +CONFIG_F2FS_FS_XATTR=y +CONFIG_F2FS_STAT_FS=y +CONFIG_FAT_FS=y +CONFIG_FIXED_PHY=y +CONFIG_FRAME_WARN=2048 +CONFIG_FS_MBCACHE=y +CONFIG_FUTEX_PI=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_GENERIC_CPU_AUTOPROBE=y +CONFIG_GENERIC_IO=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_TIME_VSYSCALL=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_OCTEON=y +CONFIG_GPIO_SYSFS=y +# CONFIG_GRO_CELLS is not set +CONFIG_HANDLE_DOMAIN_IRQ=y +CONFIG_HARDWARE_WATCHPOINTS=y +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT_MAP=y +CONFIG_HAVE_64BIT_ALIGNED_ACCESS=y +# CONFIG_HAVE_ARCH_BITREVERSE is not set +CONFIG_HAVE_ARCH_JUMP_LABEL=y +CONFIG_HAVE_ARCH_KGDB=y +CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y +# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set +CONFIG_HAVE_CC_STACKPROTECTOR=y +CONFIG_HAVE_CONTEXT_TRACKING=y +CONFIG_HAVE_COPY_THREAD_TLS=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_HAVE_DEBUG_KMEMLEAK=y +CONFIG_HAVE_DEBUG_STACKOVERFLOW=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_DMA_CONTIGUOUS=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_EBPF_JIT=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_HAVE_IDE=y +CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y +CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y +CONFIG_HAVE_KVM=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_HAVE_MEMBLOCK_NODE_MAP=y +CONFIG_HAVE_MEMORY_PRESENT=y +CONFIG_HAVE_MOD_ARCH_SPECIFIC=y +CONFIG_HAVE_NET_DSA=y +CONFIG_HAVE_OPROFILE=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y +CONFIG_HOLES_IN_ZONE=y +# CONFIG_HUGETLBFS is not set +CONFIG_HW_HAS_PCI=y +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_OCTEON=y +CONFIG_HZ=250 +# CONFIG_HZ_100 is not set +CONFIG_HZ_250=y +CONFIG_HZ_PERIODIC=y +CONFIG_IMAGE_CMDLINE_HACK=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_IOMMU_HELPER=y +CONFIG_IRQCHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_IRQ_WORK=y +CONFIG_JBD2=y +CONFIG_KALLSYMS=y +CONFIG_KEXEC=y +CONFIG_KEXEC_CORE=y +CONFIG_LIBFDT=y +CONFIG_MDIO_BUS=y +CONFIG_MDIO_CAVIUM=y +CONFIG_MDIO_DEVICE=y +CONFIG_MDIO_OCTEON=y +CONFIG_MIPS=y +CONFIG_MIPS32_COMPAT=y +CONFIG_MIPS32_N32=y +CONFIG_MIPS32_O32=y +CONFIG_MIPS_ASID_BITS=8 +CONFIG_MIPS_ASID_SHIFT=0 +# CONFIG_MIPS_CLOCK_VSYSCALL is not set +# CONFIG_MIPS_CMDLINE_DTB_EXTEND is not set +CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER=y +# CONFIG_MIPS_CMDLINE_FROM_DTB is not set +# CONFIG_MIPS_ELF_APPENDED_DTB is not set +# CONFIG_MIPS_HUGE_TLB_SUPPORT is not set +CONFIG_MIPS_L1_CACHE_SHIFT=7 +CONFIG_MIPS_L1_CACHE_SHIFT_7=y +# CONFIG_MIPS_MACHINE is not set +# CONFIG_MIPS_NO_APPENDED_DTB is not set +CONFIG_MIPS_PGD_C0_CONTEXT=y +CONFIG_MIPS_RAW_APPENDED_DTB=y +CONFIG_MIPS_SPRAM=y +# CONFIG_MIPS_VA_BITS_48 is not set +CONFIG_MMC=y +CONFIG_MMC_BLOCK=y +CONFIG_MMC_CAVIUM_OCTEON=y +CONFIG_MMC_OCTEON=y +# CONFIG_MMC_TIFM_SD is not set +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_MODULES_USE_ELF_RELA=y +# CONFIG_MTD_CFI_INTELEXT is not set +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_PHYSMAP=y +CONFIG_NEED_SG_DMA_LENGTH=y +CONFIG_NET_FLOW_LIMIT=y +CONFIG_NLS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y +# CONFIG_NO_IOPORT_MAP is not set +CONFIG_NR_CPUS=16 +CONFIG_NR_CPUS_DEFAULT_16=y +CONFIG_OCTEON_ETHERNET=y +# CONFIG_OCTEON_ILM is not set +CONFIG_OCTEON_MGMT_ETHERNET=y +CONFIG_OCTEON_USB=y +CONFIG_OCTEON_WDT=y +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_ADDRESS_PCI=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IRQ=y +CONFIG_OF_MDIO=y +CONFIG_OF_NET=y +CONFIG_OF_PCI=y +CONFIG_OF_PCI_IRQ=y +CONFIG_PADATA=y +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_PCI=y +CONFIG_PCI_BUS_ADDR_T_64BIT=y +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_DRIVERS_LEGACY=y +CONFIG_PERF_USE_VMALLOC=y +CONFIG_PGTABLE_LEVELS=3 +CONFIG_PHYLIB=y +CONFIG_PHYS_ADDR_T_64BIT=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13 +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_QUEUED_RWLOCKS=y +CONFIG_QUEUED_SPINLOCKS=y +CONFIG_RCU_NEED_SEGCBLIST=y +CONFIG_RCU_STALL_COMMON=y +CONFIG_RELAY=y +CONFIG_RFS_ACCEL=y +CONFIG_RPS=y +CONFIG_SCHED_DEBUG=y +# CONFIG_SCHED_INFO is not set +CONFIG_SCSI=y +CONFIG_SECCOMP=y +CONFIG_SECCOMP_FILTER=y +CONFIG_SERIAL_8250_DW=y +# CONFIG_SERIAL_8250_FSL is not set +CONFIG_SG_POOL=y +CONFIG_SMP=y +CONFIG_SPARSEMEM=y +CONFIG_SPARSEMEM_STATIC=y +CONFIG_SRCU=y +CONFIG_SWIOTLB=y +CONFIG_SWPHY=y +CONFIG_SYSCTL_EXCEPTION_TRACE=y +CONFIG_SYSFS_DEPRECATED=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_SYSVIPC_COMPAT=y +CONFIG_SYS_HAS_CPU_CAVIUM_OCTEON=y +CONFIG_SYS_HAS_EARLY_PRINTK=y +CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y +CONFIG_SYS_SUPPORTS_ARBIT_HZ=y +CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y +CONFIG_SYS_SUPPORTS_HOTPLUG_CPU=y +CONFIG_SYS_SUPPORTS_HUGETLBFS=y +CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y +CONFIG_SYS_SUPPORTS_RELOCATABLE=y +CONFIG_SYS_SUPPORTS_SMP=y +CONFIG_THIN_ARCHIVES=y +CONFIG_TICK_CPU_ACCOUNTING=y +CONFIG_TREE_RCU=y +CONFIG_TREE_SRCU=y +CONFIG_UNINLINE_SPIN_UNLOCK=y +CONFIG_USB=y +CONFIG_USB_COMMON=y +CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_HCD_PLATFORM=y +CONFIG_USB_OCTEON_EHCI=y +CONFIG_USB_OCTEON_OHCI=y +CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_HCD_PLATFORM=y +CONFIG_USB_STORAGE=y +CONFIG_USB_SUPPORT=y +CONFIG_USE_OF=y +CONFIG_VFAT_FS=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_WATCHDOG_CORE=y +CONFIG_WEAK_ORDERING=y +CONFIG_XPS=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZONE_DMA32=y diff --git a/target/linux/octeon/patches-4.14/100-ubnt_edgerouter2_support.patch b/target/linux/octeon/patches-4.14/100-ubnt_edgerouter2_support.patch new file mode 100644 index 00000000000000..991eb56ce2d85a --- /dev/null +++ b/target/linux/octeon/patches-4.14/100-ubnt_edgerouter2_support.patch @@ -0,0 +1,31 @@ +--- a/arch/mips/include/asm/octeon/cvmx-bootinfo.h ++++ b/arch/mips/include/asm/octeon/cvmx-bootinfo.h +@@ -295,6 +295,8 @@ enum cvmx_board_types_enum { + */ + CVMX_BOARD_TYPE_CUST_PRIVATE_MIN = 20001, + CVMX_BOARD_TYPE_UBNT_E100 = 20002, ++ CVMX_BOARD_TYPE_UBNT_E200 = 20003, ++ CVMX_BOARD_TYPE_UBNT_E220 = 20005, + CVMX_BOARD_TYPE_CUST_DSR1000N = 20006, + CVMX_BOARD_TYPE_KONTRON_S1901 = 21901, + CVMX_BOARD_TYPE_CUST_PRIVATE_MAX = 30000, +@@ -396,6 +398,8 @@ static inline const char *cvmx_board_typ + /* Customer private range */ + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MIN) + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_UBNT_E100) ++ ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_UBNT_E200) ++ ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_UBNT_E220) + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_DSR1000N) + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_KONTRON_S1901) + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MAX) +--- a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c ++++ b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c +@@ -173,6 +173,8 @@ int cvmx_helper_board_get_mii_address(in + return 7 - ipd_port; + else + return -1; ++ case CVMX_BOARD_TYPE_UBNT_E200: ++ return -1; + case CVMX_BOARD_TYPE_KONTRON_S1901: + if (ipd_port == CVMX_HELPER_BOARD_MGMT_IPD_PORT) + return 1; diff --git a/target/linux/octeon/patches-4.14/110-er200-ethernet_probe_order.patch b/target/linux/octeon/patches-4.14/110-er200-ethernet_probe_order.patch new file mode 100644 index 00000000000000..1df3f6a67554e9 --- /dev/null +++ b/target/linux/octeon/patches-4.14/110-er200-ethernet_probe_order.patch @@ -0,0 +1,34 @@ +--- a/drivers/staging/octeon/ethernet.c ++++ b/drivers/staging/octeon/ethernet.c +@@ -684,6 +684,7 @@ static int cvm_oct_probe(struct platform + int interface; + int fau = FAU_NUM_PACKET_BUFFERS_TO_FREE; + int qos; ++ int i; + struct device_node *pip; + + octeon_mdiobus_force_mod_depencency(); +@@ -800,13 +801,19 @@ static int cvm_oct_probe(struct platform + } + + num_interfaces = cvmx_helper_get_number_of_interfaces(); +- for (interface = 0; interface < num_interfaces; interface++) { +- cvmx_helper_interface_mode_t imode = +- cvmx_helper_interface_get_mode(interface); +- int num_ports = cvmx_helper_ports_on_interface(interface); ++ for (i = 0; i < num_interfaces; i++) { ++ cvmx_helper_interface_mode_t imode; ++ int interface; ++ int num_ports; + int port; + int port_index; + ++ interface = i; ++ if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_UBNT_E200) ++ interface = num_interfaces - (i + 1); ++ ++ num_ports = cvmx_helper_ports_on_interface(interface); ++ imode = cvmx_helper_interface_get_mode(interface); + for (port_index = 0, + port = cvmx_helper_get_ipd_port(interface, 0); + port < cvmx_helper_get_ipd_port(interface, num_ports); diff --git a/target/linux/octeon/patches-4.14/160-cmdline-hack.patch b/target/linux/octeon/patches-4.14/160-cmdline-hack.patch new file mode 100644 index 00000000000000..2a4ad1dc73a1c6 --- /dev/null +++ b/target/linux/octeon/patches-4.14/160-cmdline-hack.patch @@ -0,0 +1,47 @@ +--- a/arch/mips/cavium-octeon/setup.c ++++ b/arch/mips/cavium-octeon/setup.c +@@ -656,6 +656,35 @@ void octeon_user_io_init(void) + write_c0_derraddr1(0); + } + ++#ifdef CONFIG_IMAGE_CMDLINE_HACK ++extern char __image_cmdline[]; ++ ++static int __init octeon_use_image_cmdline(void) ++{ ++ char *p = __image_cmdline; ++ int replace = 0; ++ ++ if (*p == '-') { ++ replace = 1; ++ p++; ++ } ++ ++ if (*p == '\0') ++ return 0; ++ ++ if (replace) { ++ strlcpy(arcs_cmdline, p, sizeof(arcs_cmdline)); ++ } else { ++ strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline)); ++ strlcat(arcs_cmdline, p, sizeof(arcs_cmdline)); ++ } ++ ++ return 1; ++} ++#else ++static inline int octeon_use_image_cmdline(void) { return 0; } ++#endif ++ + /** + * Early entry point for arch setup + */ +@@ -900,6 +929,8 @@ void __init prom_init(void) + } + } + ++ octeon_use_image_cmdline(); ++ + if (strstr(arcs_cmdline, "console=") == NULL) { + #ifdef CONFIG_CAVIUM_OCTEON_2ND_KERNEL + strcat(arcs_cmdline, " console=ttyS0,115200"); diff --git a/target/linux/octeon/patches-4.14/170-cisco-hack.patch b/target/linux/octeon/patches-4.14/170-cisco-hack.patch new file mode 100644 index 00000000000000..124bcfd7a7af7e --- /dev/null +++ b/target/linux/octeon/patches-4.14/170-cisco-hack.patch @@ -0,0 +1,31 @@ +From patchwork Wed Jun 8 13:49:26 2016 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 8bit +Subject: [LEDE-DEV] cavium: Ignore MEM boot param when too small +From: =?utf-8?q?Micha=C5=82_Osowiecki?= +X-Patchwork-Id: 632273 +Message-Id: <57582266.8020105@gmail.com> +To: lede-dev@lists.infradead.org +Date: Wed, 8 Jun 2016 15:49:26 +0200 + +Cisco RV0XX u-boot sets MEM=2048 as boot param. We assume that at least +4MB (mem_alloc_size) of ram is needed to run linux on cavium boards, so +if mem < 4M - ignore it and set default value + + +Signed-off-by: Michał Osowiecki + +--- a/arch/mips/cavium-octeon/setup.c ++++ b/arch/mips/cavium-octeon/setup.c +@@ -1005,6 +1005,10 @@ void __init plat_mem_setup(void) + if (mem_alloc_size > max_memory) + mem_alloc_size = max_memory; + ++ /* Ignore bootarg MEM <= 4MB - cisco uses a b0rked uboot env on their products */ ++ if (max_memory <= mem_alloc_size) ++ max_memory = 512ull << 20; ++ + /* Crashkernel ignores bootmem list. It relies on mem=X@Y option */ + #ifdef CONFIG_CRASH_DUMP + add_memory_region(reserve_low_mem, max_memory, BOOT_MEM_RAM); diff --git a/target/linux/omap/Makefile b/target/linux/omap/Makefile index 34dc9a4b5e7412..d8c0fd88e94b86 100644 --- a/target/linux/omap/Makefile +++ b/target/linux/omap/Makefile @@ -14,7 +14,7 @@ FEATURES:=usb usbgadget ext4 targz fpu audio display nand ubifs CPU_TYPE:=cortex-a8 CPU_SUBTYPE:=vfpv3 -KERNEL_PATCHVER:=4.4 +KERNEL_PATCHVER:=4.9 MAINTAINER:=Alexander Couzens diff --git a/target/linux/omap/config-4.9 b/target/linux/omap/config-4.9 new file mode 100644 index 00000000000000..d6f06490931ddd --- /dev/null +++ b/target/linux/omap/config-4.9 @@ -0,0 +1,730 @@ +CONFIG_ALIGNMENT_TRAP=y +CONFIG_AM335X_CONTROL_USB=y +CONFIG_AM335X_PHY_USB=y +CONFIG_ARCH_CLOCKSOURCE_DATA=y +CONFIG_ARCH_HAS_BANDGAP=y +CONFIG_ARCH_HAS_ELF_RANDOMIZE=y +CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y +CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y +CONFIG_ARCH_HAS_SG_CHAIN=y +CONFIG_ARCH_HAS_TICK_BROADCAST=y +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y +CONFIG_ARCH_MULTIPLATFORM=y +# CONFIG_ARCH_MULTI_CPU_AUTO is not set +CONFIG_ARCH_MULTI_V6_V7=y +CONFIG_ARCH_MULTI_V7=y +CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED=y +CONFIG_ARCH_NR_GPIO=0 +CONFIG_ARCH_OMAP=y +CONFIG_ARCH_OMAP2PLUS=y +CONFIG_ARCH_OMAP2PLUS_TYPICAL=y +CONFIG_ARCH_OMAP3=y +CONFIG_ARCH_OMAP4=y +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y +CONFIG_ARCH_SUPPORTS_UPROBES=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ARCH_USE_BUILTIN_BSWAP=y +CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y +CONFIG_ARCH_WANT_GENERAL_HUGETLB=y +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +CONFIG_ARM=y +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set +CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y +CONFIG_ARM_CPU_SUSPEND=y +CONFIG_ARM_ERRATA_430973=y +CONFIG_ARM_ERRATA_720789=y +CONFIG_ARM_ERRATA_754322=y +CONFIG_ARM_ERRATA_775420=y +CONFIG_ARM_GIC=y +CONFIG_ARM_HAS_SG_CHAIN=y +CONFIG_ARM_HEAVY_MB=y +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_L1_CACHE_SHIFT_6=y +# CONFIG_ARM_LPAE is not set +CONFIG_ARM_OMAP2PLUS_CPUFREQ=y +CONFIG_ARM_PATCH_IDIV=y +CONFIG_ARM_PATCH_PHYS_VIRT=y +CONFIG_ARM_THUMB=y +CONFIG_ARM_THUMBEE=y +CONFIG_ARM_VIRT_EXT=y +CONFIG_ASSOCIATIVE_ARRAY=y +CONFIG_AT803X_PHY=y +CONFIG_ATA=y +CONFIG_AUDIT=y +CONFIG_AUDITSYSCALL=y +CONFIG_AUDIT_GENERIC=y +CONFIG_AUDIT_TREE=y +CONFIG_AUDIT_WATCH=y +CONFIG_AUTO_ZRELADDR=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_BACKLIGHT_PWM is not set +# CONFIG_BACKLIGHT_TPS65217 is not set +CONFIG_BCH=y +CONFIG_BINFMT_MISC=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=16384 +CONFIG_BLK_DEV_SD=y +CONFIG_BOUNCE=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BUILD_BIN2C=y +CONFIG_CACHE_L2X0=y +# CONFIG_CHARGER_TPS65217 is not set +CONFIG_CLKDEV_LOOKUP=y +CONFIG_CLKSRC_MMIO=y +CONFIG_CLKSRC_OF=y +CONFIG_CLKSRC_PROBE=y +CONFIG_CLKSRC_TI_32K=y +CONFIG_CLK_TWL6040=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_CMA=y +CONFIG_CMA_ALIGNMENT=8 +CONFIG_CMA_AREAS=7 +# CONFIG_CMA_DEBUG is not set +# CONFIG_CMA_DEBUGFS is not set +CONFIG_CMA_SIZE_MBYTES=16 +# CONFIG_CMA_SIZE_SEL_MAX is not set +CONFIG_CMA_SIZE_SEL_MBYTES=y +# CONFIG_CMA_SIZE_SEL_MIN is not set +# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set +CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200" +CONFIG_COMMON_CLK=y +# CONFIG_COMMON_CLK_PALMAS is not set +# CONFIG_COMMON_CLK_TI_ADPLL is not set +CONFIG_CONFIGFS_FS=y +CONFIG_CONNECTOR=y +CONFIG_CPUFREQ_DT=y +CONFIG_CPUFREQ_DT_PLATDEV=y +CONFIG_CPU_32v6K=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +CONFIG_CPU_FREQ_GOV_ATTR_SET=y +CONFIG_CPU_FREQ_GOV_COMMON=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_FREQ_STAT_DETAILS=y +CONFIG_CPU_HAS_ASID=y +# CONFIG_CPU_ICACHE_DISABLE is not set +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_GOV_LADDER=y +CONFIG_CPU_IDLE_GOV_MENU=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_PM=y +CONFIG_CPU_RMAP=y +CONFIG_CPU_THERMAL=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_V7=y +CONFIG_CRAMFS=y +CONFIG_CRC16=y +CONFIG_CRC7=y +CONFIG_CRC_CCITT=y +CONFIG_CRC_ITU_T=y +CONFIG_CRC_T10DIF=y +CONFIG_CRYPTO_AEAD=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_CRCT10DIF=y +CONFIG_CRYPTO_CTR=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_DEV_OMAP_AES=y +CONFIG_CRYPTO_DEV_OMAP_DES=y +CONFIG_CRYPTO_DEV_OMAP_SHAM=y +CONFIG_CRYPTO_DRBG=y +CONFIG_CRYPTO_DRBG_HMAC=y +CONFIG_CRYPTO_DRBG_MENU=y +CONFIG_CRYPTO_ECB=y +CONFIG_CRYPTO_ENGINE=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_HW=y +CONFIG_CRYPTO_JITTERENTROPY=y +CONFIG_CRYPTO_LZO=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_NULL=y +CONFIG_CRYPTO_NULL2=y +CONFIG_CRYPTO_RNG=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_RNG_DEFAULT=y +CONFIG_CRYPTO_SEQIV=y +CONFIG_CRYPTO_SHA1=y +CONFIG_CRYPTO_SHA256=y +CONFIG_CRYPTO_SHA512=y +CONFIG_CRYPTO_WORKQUEUE=y +CONFIG_DCACHE_WORD_ACCESS=y +CONFIG_DDR=y +CONFIG_DEBUG_GPIO=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" +CONFIG_DEBUG_LOCK_ALLOC=y +CONFIG_DEBUG_MUTEXES=y +CONFIG_DEBUG_SPINLOCK=y +# CONFIG_DEBUG_UART_8250 is not set +# CONFIG_DEBUG_USER is not set +CONFIG_DM9000=y +# CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL is not set +CONFIG_DMADEVICES=y +CONFIG_DMA_CMA=y +CONFIG_DMA_ENGINE=y +CONFIG_DMA_OF=y +CONFIG_DMA_OMAP=y +CONFIG_DMA_SHARED_BUFFER=y +CONFIG_DMA_VIRTUAL_CHANNELS=y +CONFIG_DNS_RESOLVER=y +CONFIG_DRM=y +CONFIG_DRM_BRIDGE=y +CONFIG_DRM_KMS_HELPER=y +CONFIG_DRM_OMAP=y +CONFIG_DRM_OMAP_CONNECTOR_ANALOG_TV=y +CONFIG_DRM_OMAP_CONNECTOR_DVI=y +CONFIG_DRM_OMAP_CONNECTOR_HDMI=y +# CONFIG_DRM_OMAP_ENCODER_OPA362 is not set +CONFIG_DRM_OMAP_ENCODER_TFP410=y +CONFIG_DRM_OMAP_ENCODER_TPD12S015=y +CONFIG_DRM_OMAP_NUM_CRTCS=1 +CONFIG_DRM_OMAP_PANEL_DPI=y +CONFIG_DRM_OMAP_PANEL_DSI_CM=y +CONFIG_DRM_OMAP_PANEL_LGPHILIPS_LB035Q02=y +CONFIG_DRM_OMAP_PANEL_NEC_NL8048HL11=y +CONFIG_DRM_OMAP_PANEL_SHARP_LS037V7DW01=y +CONFIG_DRM_OMAP_PANEL_SONY_ACX565AKM=y +CONFIG_DRM_OMAP_PANEL_TPO_TD028TTEC1=y +CONFIG_DRM_OMAP_PANEL_TPO_TD043MTEA1=y +CONFIG_DTC=y +CONFIG_EDAC_ATOMIC_SCRUB=y +CONFIG_EDAC_SUPPORT=y +CONFIG_EEPROM_93CX6=y +CONFIG_EXPORTFS=y +CONFIG_EXT2_FS=y +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_EXT4_FS=y +CONFIG_EXTCON=y +CONFIG_EXTCON_PALMAS=y +CONFIG_EXTCON_USB_GPIO=y +CONFIG_FANOTIFY=y +CONFIG_FAT_FS=y +CONFIG_FB_CMDLINE=y +CONFIG_FHANDLE=y +CONFIG_FIXED_PHY=y +CONFIG_FIX_EARLYCON_MEM=y +CONFIG_FRAME_POINTER=y +CONFIG_FS_MBCACHE=y +CONFIG_FS_POSIX_ACL=y +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_GENERIC_BUG=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y +CONFIG_GENERIC_EARLY_IOREMAP=y +CONFIG_GENERIC_IDLE_POLL_SETUP=y +CONFIG_GENERIC_IO=y +CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_PHY=y +CONFIG_GENERIC_PINCONF=y +CONFIG_GENERIC_SCHED_CLOCK=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GLOB=y +CONFIG_GPIOLIB=y +CONFIG_GPIOLIB_IRQCHIP=y +CONFIG_GPIO_OMAP=y +CONFIG_GPIO_PALMAS=y +CONFIG_GPIO_PCA953X=y +CONFIG_GPIO_PCA953X_IRQ=y +CONFIG_GPIO_PCF857X=y +CONFIG_GPIO_SYSFS=y +# CONFIG_GPIO_TPS65218 is not set +CONFIG_GPIO_TPS65910=y +CONFIG_GPIO_TWL4030=y +CONFIG_GPIO_TWL6040=y +CONFIG_GRACE_PERIOD=y +CONFIG_HANDLE_DOMAIN_IRQ=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT_MAP=y +# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set +CONFIG_HAVE_ARCH_AUDITSYSCALL=y +CONFIG_HAVE_ARCH_BITREVERSE=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y +CONFIG_HAVE_ARCH_KGDB=y +CONFIG_HAVE_ARCH_PFN_VALID=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_ARM_SCU=y +CONFIG_HAVE_ARM_SMCCC=y +CONFIG_HAVE_ARM_TWD=y +# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set +CONFIG_HAVE_CBPF_JIT=y +CONFIG_HAVE_CC_STACKPROTECTOR=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_CLK_PREPARE=y +CONFIG_HAVE_CONTEXT_TRACKING=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_HAVE_DEBUG_KMEMLEAK=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_DMA_CONTIGUOUS=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_HAVE_MOD_ARCH_SPECIFIC=y +CONFIG_HAVE_NET_DSA=y +CONFIG_HAVE_OPROFILE=y +CONFIG_HAVE_OPTPROBES=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_HAVE_PERF_REGS=y +CONFIG_HAVE_PERF_USER_STACK_DUMP=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_SMP=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_UID16=y +CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y +CONFIG_HDMI=y +CONFIG_HIGHMEM=y +CONFIG_HIGHPTE=y +CONFIG_HSI=y +CONFIG_HSI_BOARDINFO=y +# CONFIG_HSI_CHAR is not set +CONFIG_HWMON=y +CONFIG_HZ_FIXED=0 +CONFIG_I2C=y +CONFIG_I2C_ALGOBIT=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_OMAP=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_IOMMU_HELPER=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_RARP=y +CONFIG_IRQCHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_DOMAIN_HIERARCHY=y +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_IRQ_WORK=y +CONFIG_JBD2=y +CONFIG_JFFS2_LZO=y +CONFIG_JFFS2_RUBIN=y +CONFIG_KALLSYMS=y +CONFIG_KALLSYMS_ALL=y +CONFIG_KEYS=y +CONFIG_KPROBES=y +CONFIG_KRETPROBES=y +CONFIG_KS8851=y +CONFIG_KS8851_MLL=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_LCD_PLATFORM=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PWM=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LIBCRC32C=y +CONFIG_LIBFDT=y +CONFIG_LOCKD=y +CONFIG_LOCKDEP=y +CONFIG_LOCK_SPIN_ON_OWNER=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +# CONFIG_MACH_OMAP3517EVM is not set +# CONFIG_MACH_OMAP3_PANDORA is not set +CONFIG_MACH_OMAP_GENERIC=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_MDIO_BOARDINFO=y +CONFIG_MEMORY=y +CONFIG_MEMORY_ISOLATION=y +CONFIG_MFD_CORE=y +CONFIG_MFD_PALMAS=y +CONFIG_MFD_SYSCON=y +CONFIG_MFD_TI_AM335X_TSCADC=y +CONFIG_MFD_TPS65217=y +CONFIG_MFD_TPS65218=y +CONFIG_MFD_TPS65910=y +CONFIG_MFD_TWL4030_AUDIO=y +CONFIG_MIGHT_HAVE_CACHE_L2X0=y +CONFIG_MIGHT_HAVE_PCI=y +CONFIG_MIGRATION=y +CONFIG_MMC=y +CONFIG_MMC_BLOCK=y +# CONFIG_MMC_OMAP is not set +CONFIG_MMC_OMAP_HS=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_MSDOS_FS=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_M25P80=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_BCH=y +CONFIG_MTD_NAND_ECC=y +CONFIG_MTD_NAND_ECC_BCH=y +CONFIG_MTD_NAND_OMAP2=y +CONFIG_MTD_NAND_OMAP_BCH=y +CONFIG_MTD_NAND_OMAP_BCH_BUILD=y +CONFIG_MTD_ONENAND=y +# CONFIG_MTD_ONENAND_2X_PROGRAM is not set +# CONFIG_MTD_ONENAND_GENERIC is not set +CONFIG_MTD_ONENAND_OMAP2=y +# CONFIG_MTD_ONENAND_OTP is not set +CONFIG_MTD_ONENAND_VERIFY_WRITE=y +CONFIG_MTD_OOPS=y +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_BEB_LIMIT=20 +# CONFIG_MTD_UBI_BLOCK is not set +# CONFIG_MTD_UBI_FASTMAP is not set +# CONFIG_MTD_UBI_GLUEBI is not set +CONFIG_MTD_UBI_WL_THRESHOLD=4096 +CONFIG_MULTI_IRQ_HANDLER=y +# CONFIG_MUSB_PIO_ONLY is not set +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NEON=y +CONFIG_NET_FLOW_LIMIT=y +CONFIG_NET_KEY=y +CONFIG_NET_KEY_MIGRATE=y +CONFIG_NET_PTP_CLASSIFY=y +CONFIG_NFS_ACL_SUPPORT=y +CONFIG_NFS_FS=y +CONFIG_NFS_USE_KERNEL_DNS=y +# CONFIG_NFS_USE_LEGACY_DNS is not set +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_NLS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NOP_USB_XCEIV=y +CONFIG_NO_BOOTMEM=y +CONFIG_NO_HZ=y +CONFIG_NO_HZ_COMMON=y +CONFIG_NO_HZ_IDLE=y +CONFIG_NR_CPUS=4 +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IRQ=y +CONFIG_OF_MDIO=y +CONFIG_OF_NET=y +CONFIG_OF_RESERVED_MEM=y +CONFIG_OID_REGISTRY=y +CONFIG_OLD_SIGACTION=y +CONFIG_OLD_SIGSUSPEND3=y +CONFIG_OMAP2_DSS=y +CONFIG_OMAP2_DSS_DPI=y +CONFIG_OMAP2_DSS_DSI=y +CONFIG_OMAP2_DSS_HDMI_COMMON=y +CONFIG_OMAP2_DSS_INIT=y +CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0 +CONFIG_OMAP2_DSS_SDI=y +CONFIG_OMAP2_DSS_SLEEP_AFTER_VENC_RESET=y +CONFIG_OMAP2_DSS_VENC=y +# CONFIG_OMAP3_L2_AUX_SECURE_SAVE_RESTORE is not set +# CONFIG_OMAP3_SDRC_AC_TIMING is not set +CONFIG_OMAP3_THERMAL=y +CONFIG_OMAP4_DSS_HDMI=y +CONFIG_OMAP4_THERMAL=y +CONFIG_OMAP5_DSS_HDMI=y +CONFIG_OMAP_32K_TIMER=y +CONFIG_OMAP_CONTROL_PHY=y +CONFIG_OMAP_DM_TIMER=y +CONFIG_OMAP_GPMC=y +# CONFIG_OMAP_GPMC_DEBUG is not set +CONFIG_OMAP_INTERCONNECT=y +CONFIG_OMAP_INTERCONNECT_BARRIER=y +CONFIG_OMAP_IRQCHIP=y +CONFIG_OMAP_MUX=y +CONFIG_OMAP_MUX_DEBUG=y +CONFIG_OMAP_MUX_WARNINGS=y +CONFIG_OMAP_OCP2SCP=y +CONFIG_OMAP_PM_NOOP=y +CONFIG_OMAP_RESET_CLOCKS=y +# CONFIG_OMAP_SSI is not set +CONFIG_OMAP_USB2=y +CONFIG_OMAP_WATCHDOG=y +CONFIG_OPROFILE=y +CONFIG_OPTPROBES=y +CONFIG_OUTER_CACHE=y +CONFIG_OUTER_CACHE_SYNC=y +CONFIG_PADATA=y +CONFIG_PAGE_OFFSET=0xC0000000 +# CONFIG_PCI_DOMAINS_GENERIC is not set +# CONFIG_PCI_SYSCALL is not set +CONFIG_PERF_USE_VMALLOC=y +CONFIG_PGTABLE_LEVELS=2 +CONFIG_PHYLIB=y +# CONFIG_PHY_DM816X_USB is not set +CONFIG_PINCTRL=y +# CONFIG_PINCTRL_PALMAS is not set +CONFIG_PL310_ERRATA_588369=y +CONFIG_PL310_ERRATA_727915=y +# CONFIG_PL310_ERRATA_753970 is not set +# CONFIG_PL310_ERRATA_769419 is not set +CONFIG_PM=y +# CONFIG_PM_ADVANCED_DEBUG is not set +CONFIG_PM_CLK=y +CONFIG_PM_DEBUG=y +CONFIG_PM_OPP=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_POWER_AVS=y +CONFIG_POWER_AVS_OMAP=y +CONFIG_POWER_AVS_OMAP_CLASS3=y +CONFIG_POWER_SUPPLY=y +CONFIG_PPS=y +CONFIG_PRINTK_TIME=y +CONFIG_PRINT_QUOTA_WARNING=y +CONFIG_PROC_EVENTS=y +CONFIG_PROFILING=y +CONFIG_PROVE_LOCKING=y +CONFIG_PROVE_RCU=y +CONFIG_PTP_1588_CLOCK=y +CONFIG_PWM=y +# CONFIG_PWM_OMAP_DMTIMER is not set +CONFIG_PWM_SYSFS=y +CONFIG_PWM_TIECAP=y +CONFIG_PWM_TIEHRPWM=y +CONFIG_PWM_TIPWMSS=y +# CONFIG_PWM_TWL is not set +# CONFIG_PWM_TWL_LED is not set +# CONFIG_QFMT_V1 is not set +CONFIG_QFMT_V2=y +CONFIG_QUOTA=y +CONFIG_QUOTACTL=y +# CONFIG_QUOTA_NETLINK_INTERFACE is not set +CONFIG_QUOTA_TREE=y +CONFIG_RATIONAL=y +CONFIG_RCU_STALL_COMMON=y +CONFIG_REGMAP=y +CONFIG_REGMAP_I2C=y +CONFIG_REGMAP_IRQ=y +CONFIG_REGMAP_MMIO=y +CONFIG_REGMAP_SPI=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_PALMAS=y +CONFIG_REGULATOR_PBIAS=y +CONFIG_REGULATOR_TI_ABB=y +CONFIG_REGULATOR_TPS62360=y +CONFIG_REGULATOR_TPS65023=y +CONFIG_REGULATOR_TPS6507X=y +CONFIG_REGULATOR_TPS65217=y +CONFIG_REGULATOR_TPS65218=y +CONFIG_REGULATOR_TPS65910=y +CONFIG_REGULATOR_TWL4030=y +CONFIG_RFS_ACCEL=y +CONFIG_RING_BUFFER=y +CONFIG_RING_BUFFER_ALLOW_SWAP=y +CONFIG_ROOT_NFS=y +CONFIG_RPS=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_DS1307=y +CONFIG_RTC_DRV_OMAP=y +CONFIG_RTC_DRV_PALMAS=y +# CONFIG_RTC_DRV_TPS65910 is not set +CONFIG_RTC_DRV_TWL4030=y +CONFIG_RTC_I2C_AND_SPI=y +CONFIG_RTC_MC146818_LIB=y +CONFIG_RWSEM_SPIN_ON_OWNER=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_SATA_AHCI_PLATFORM=y +CONFIG_SCHEDSTATS=y +CONFIG_SCHED_INFO=y +CONFIG_SCHED_MC=y +CONFIG_SCSI=y +CONFIG_SCSI_SCAN_ASYNC=y +CONFIG_SDIO_UART=y +CONFIG_SECCOMP=y +CONFIG_SECCOMP_FILTER=y +CONFIG_SENSORS_GPIO_FAN=y +CONFIG_SENSORS_LM75=y +CONFIG_SENSORS_TMP102=y +CONFIG_SENSORS_TSL2550=y +CONFIG_SERIAL_8250_DETECT_IRQ=y +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_FSL=y +CONFIG_SERIAL_8250_MANY_PORTS=y +CONFIG_SERIAL_8250_NR_UARTS=32 +# CONFIG_SERIAL_8250_OMAP is not set +CONFIG_SERIAL_8250_RSA=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SERIAL_OMAP=y +CONFIG_SERIAL_OMAP_CONSOLE=y +CONFIG_SERIO=y +CONFIG_SG_POOL=y +CONFIG_SG_SPLIT=y +CONFIG_SMC91X=y +CONFIG_SMP=y +CONFIG_SMP_ON_UP=y +CONFIG_SMSC911X=y +# CONFIG_SMSC911X_ARCH_HOOKS is not set +CONFIG_SMSC_PHY=y +CONFIG_SND=y +# CONFIG_SND_COMPRESS_OFFLOAD is not set +CONFIG_SND_DAVINCI_SOC_MCASP=y +CONFIG_SND_DMAENGINE_PCM=y +CONFIG_SND_JACK=y +CONFIG_SND_MIXER_OSS=y +CONFIG_SND_OMAP_SOC=y +CONFIG_SND_OMAP_SOC_DMIC=y +# CONFIG_SND_OMAP_SOC_HDMI_AUDIO is not set +CONFIG_SND_OMAP_SOC_MCBSP=y +CONFIG_SND_OMAP_SOC_MCPDM=y +CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=y +CONFIG_SND_OMAP_SOC_OMAP_TWL4030=y +# CONFIG_SND_OMAP_SOC_RX51 is not set +CONFIG_SND_PCM=y +CONFIG_SND_PCM_OSS=y +CONFIG_SND_SIMPLE_CARD=y +CONFIG_SND_SIMPLE_CARD_UTILS=y +CONFIG_SND_SOC=y +CONFIG_SND_SOC_DMIC=y +CONFIG_SND_SOC_I2C_AND_SPI=y +CONFIG_SND_SOC_TLV320AIC3X=y +CONFIG_SND_SOC_TWL4030=y +CONFIG_SND_SOC_TWL6040=y +CONFIG_SND_VERBOSE_PRINTK=y +CONFIG_SOC_AM33XX=y +CONFIG_SOC_AM43XX=y +CONFIG_SOC_BUS=y +CONFIG_SOC_HAS_OMAP2_SDRC=y +CONFIG_SOC_OMAP3430=y +# CONFIG_SOC_TI81XX is not set +CONFIG_SOUND=y +CONFIG_SOUND_OSS_CORE=y +CONFIG_SOUND_OSS_CORE_PRECLAIM=y +CONFIG_SPARSE_IRQ=y +CONFIG_SPI=y +CONFIG_SPI_MASTER=y +CONFIG_SPI_OMAP24XX=y +CONFIG_SPI_TI_QSPI=y +CONFIG_SRAM=y +CONFIG_SRCU=y +CONFIG_STACKTRACE=y +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_SWIOTLB=y +CONFIG_SWPHY=y +CONFIG_SWP_EMULATE=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_THERMAL=y +CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y +CONFIG_THERMAL_GOV_FAIR_SHARE=y +CONFIG_THERMAL_GOV_STEP_WISE=y +CONFIG_THERMAL_GOV_USER_SPACE=y +CONFIG_THERMAL_OF=y +# CONFIG_THUMB2_KERNEL is not set +CONFIG_TICK_CPU_ACCOUNTING=y +CONFIG_TIMER_STATS=y +CONFIG_TI_CPPI41=y +CONFIG_TI_CPSW=y +CONFIG_TI_CPSW_ALE=y +CONFIG_TI_CPSW_PHY_SEL=y +CONFIG_TI_CPTS=y +CONFIG_TI_DAVINCI_CPDMA=y +CONFIG_TI_DAVINCI_EMAC=y +CONFIG_TI_DAVINCI_MDIO=y +CONFIG_TI_DMA_CROSSBAR=y +CONFIG_TI_EDMA=y +CONFIG_TI_EMIF=y +CONFIG_TI_PIPE3=y +CONFIG_TI_SOC_THERMAL=y +CONFIG_TI_THERMAL=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_TRACE_CLOCK=y +CONFIG_TRACE_IRQFLAGS=y +CONFIG_TREE_RCU=y +CONFIG_TWL4030_CORE=y +CONFIG_TWL4030_POWER=y +CONFIG_TWL4030_USB=y +CONFIG_TWL4030_WATCHDOG=y +# CONFIG_TWL6030_USB is not set +CONFIG_TWL6040_CORE=y +CONFIG_UBIFS_FS=y +# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set +CONFIG_UBIFS_FS_LZO=y +CONFIG_UBIFS_FS_ZLIB=y +CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +CONFIG_UNINLINE_SPIN_UNLOCK=y +CONFIG_USB=y +CONFIG_USB_COMMON=y +CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_DUAL_ROLE=y +# CONFIG_USB_DWC3_GADGET is not set +# CONFIG_USB_DWC3_HOST is not set +CONFIG_USB_DWC3_OMAP=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_HCD_OMAP=y +# CONFIG_USB_EHCI_HCD_PLATFORM is not set +CONFIG_USB_GADGET=y +CONFIG_USB_INVENTRA_DMA=y +CONFIG_USB_MUSB_AM335X_CHILD=y +CONFIG_USB_MUSB_AM35X=y +CONFIG_USB_MUSB_DSPS=y +CONFIG_USB_MUSB_DUAL_ROLE=y +# CONFIG_USB_MUSB_GADGET is not set +CONFIG_USB_MUSB_HDRC=y +# CONFIG_USB_MUSB_HOST is not set +CONFIG_USB_MUSB_OMAP2PLUS=y +CONFIG_USB_MUSB_TUSB6010=y +CONFIG_USB_PHY=y +CONFIG_USB_SUPPORT=y +CONFIG_USB_TI_CPPI41_DMA=y +CONFIG_USB_TUSB_OMAP_DMA=y +# CONFIG_USERIO is not set +CONFIG_USE_OF=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_VFAT_FS=y +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_VIDEOMODE_HELPERS=y +CONFIG_WATCHDOG_CORE=y +# CONFIG_WKUP_M3_RPROC is not set +CONFIG_XFRM_ALGO=y +CONFIG_XFRM_MIGRATE=y +CONFIG_XPS=y +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZLIB_DEFLATE=y +CONFIG_ZLIB_INFLATE=y diff --git a/target/linux/omap/patches-4.9/001-omap4_pandaboard-wlan_fix.patch b/target/linux/omap/patches-4.9/001-omap4_pandaboard-wlan_fix.patch new file mode 100644 index 00000000000000..5a6f76fd1584a2 --- /dev/null +++ b/target/linux/omap/patches-4.9/001-omap4_pandaboard-wlan_fix.patch @@ -0,0 +1,10 @@ +--- a/arch/arm/mach-omap2/twl-common.c ++++ b/arch/arm/mach-omap2/twl-common.c +@@ -368,6 +368,7 @@ static struct regulator_init_data omap4_ + static struct regulator_init_data omap4_clk32kg_idata = { + .constraints = { + .valid_ops_mask = REGULATOR_CHANGE_STATUS, ++ .always_on = true, + }, + }; + diff --git a/target/linux/orion/Makefile b/target/linux/orion/Makefile index 5a541001f475a8..07583e485f23eb 100644 --- a/target/linux/orion/Makefile +++ b/target/linux/orion/Makefile @@ -13,7 +13,7 @@ FEATURES:=broken rtc SUBTARGETS:=generic harddisk MAINTAINER:=Imre Kaloz -KERNEL_PATCHVER:=4.4 +KERNEL_PATCHVER:=4.9 include $(INCLUDE_DIR)/target.mk diff --git a/target/linux/orion/config-4.9 b/target/linux/orion/config-4.9 new file mode 100644 index 00000000000000..56ae5ee98a2b50 --- /dev/null +++ b/target/linux/orion/config-4.9 @@ -0,0 +1,246 @@ +CONFIG_ALIGNMENT_TRAP=y +CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y +CONFIG_ARCH_HAS_ELF_RANDOMIZE=y +CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y +# CONFIG_ARCH_HAS_SG_CHAIN is not set +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y +# CONFIG_ARCH_MULTI_V4 is not set +# CONFIG_ARCH_MULTI_V4T is not set +CONFIG_ARCH_NR_GPIO=0 +CONFIG_ARCH_ORION5X=y +# CONFIG_ARCH_ORION5X_DT is not set +CONFIG_ARCH_REQUIRE_GPIOLIB=y +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y +CONFIG_ARCH_SUPPORTS_UPROBES=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ARCH_USE_BUILTIN_BSWAP=y +CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y +CONFIG_ARCH_WANT_GENERAL_HUGETLB=y +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +CONFIG_ARM=y +# CONFIG_ARM_CPU_SUSPEND is not set +CONFIG_ARM_L1_CACHE_SHIFT=5 +CONFIG_ARM_PATCH_PHYS_VIRT=y +# CONFIG_ARM_THUMB is not set +CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH=y +CONFIG_ATAGS=y +CONFIG_AUTO_ZRELADDR=y +# CONFIG_CACHE_L2X0 is not set +CONFIG_CLKDEV_LOOKUP=y +CONFIG_CLKSRC_MMIO=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_CMDLINE="rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200 earlyprintk" +CONFIG_CMDLINE_FORCE=y +CONFIG_COMMON_CLK=y +CONFIG_CPU_32v5=y +CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_COPY_FEROCEON=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y +CONFIG_CPU_FEROCEON=y +CONFIG_CPU_FEROCEON_OLD_ID=y +# CONFIG_CPU_ICACHE_DISABLE is not set +CONFIG_CPU_PABRT_LEGACY=y +CONFIG_CPU_TLB_FEROCEON=y +CONFIG_CPU_USE_DOMAINS=y +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_DEV_MARVELL_CESA=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_HW=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_WORKQUEUE=y +CONFIG_DEBUG_LL=y +CONFIG_DEBUG_LL_INCLUDE="debug/8250.S" +CONFIG_DEBUG_LL_UART_8250=y +CONFIG_DEBUG_UART_8250=y +# CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set +CONFIG_DEBUG_UART_8250_SHIFT=2 +# CONFIG_DEBUG_UART_8250_WORD is not set +CONFIG_DEBUG_UART_PHYS=0xf1012000 +CONFIG_DEBUG_UART_VIRT=0xfe012000 +# CONFIG_DEBUG_USER is not set +CONFIG_DMADEVICES=y +CONFIG_DMA_ENGINE=y +CONFIG_DMA_ENGINE_RAID=y +CONFIG_DMA_OF=y +CONFIG_DNOTIFY=y +CONFIG_DTC=y +CONFIG_EARLY_PRINTK=y +CONFIG_EDAC_ATOMIC_SCRUB=y +CONFIG_EDAC_SUPPORT=y +CONFIG_FIXED_PHY=y +CONFIG_FIX_EARLYCON_MEM=y +CONFIG_FRAME_POINTER=y +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_GENERIC_ATOMIC64=y +CONFIG_GENERIC_BUG=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_IDLE_POLL_SETUP=y +CONFIG_GENERIC_IO=y +CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_SCHED_CLOCK=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_DEVRES=y +CONFIG_GPIO_MVEBU=y +CONFIG_GPIO_SYSFS=y +CONFIG_HANDLE_DOMAIN_IRQ=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT_MAP=y +# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set +CONFIG_HAVE_ARCH_AUDITSYSCALL=y +# CONFIG_HAVE_ARCH_BITREVERSE is not set +CONFIG_HAVE_ARCH_JUMP_LABEL=y +CONFIG_HAVE_ARCH_KGDB=y +CONFIG_HAVE_ARCH_PFN_VALID=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set +CONFIG_HAVE_BPF_JIT=y +CONFIG_HAVE_CC_STACKPROTECTOR=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_CLK_PREPARE=y +CONFIG_HAVE_CONTEXT_TRACKING=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_HAVE_DEBUG_KMEMLEAK=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_DMA_CONTIGUOUS=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_HAVE_IDE=y +CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_HAVE_MOD_ARCH_SPECIFIC=y +CONFIG_HAVE_NET_DSA=y +CONFIG_HAVE_OPROFILE=y +CONFIG_HAVE_OPTPROBES=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_HAVE_PERF_REGS=y +CONFIG_HAVE_PERF_USER_STACK_DUMP=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_UID16=y +CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y +CONFIG_HZ_FIXED=0 +CONFIG_HZ_PERIODIC=y +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MV64XXX=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_IOMMU_HELPER=y +CONFIG_IRQCHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_IRQ_WORK=y +CONFIG_LEDS_GPIO=y +CONFIG_LIBFDT=y +# CONFIG_MACH_D2NET_DT is not set +# CONFIG_MACH_DB88F5281 is not set +# CONFIG_MACH_DNS323 is not set +# CONFIG_MACH_DT2 is not set +# CONFIG_MACH_KUROBOX_PRO is not set +# CONFIG_MACH_LINKSTATION_LSCHL is not set +# CONFIG_MACH_LINKSTATION_LS_HGL is not set +# CONFIG_MACH_LINKSTATION_MINI is not set +# CONFIG_MACH_LINKSTATION_PRO is not set +# CONFIG_MACH_MSS2_DT is not set +# CONFIG_MACH_MV2120 is not set +# CONFIG_MACH_NET2BIG is not set +# CONFIG_MACH_RD88F5181L_FXO is not set +# CONFIG_MACH_RD88F5181L_GE is not set +# CONFIG_MACH_RD88F5182 is not set +# CONFIG_MACH_RD88F5182_DT is not set +# CONFIG_MACH_RD88F6183AP_GE is not set +CONFIG_MACH_TERASTATION_PRO2=y +# CONFIG_MACH_TS209 is not set +# CONFIG_MACH_TS409 is not set +# CONFIG_MACH_TS78XX is not set +CONFIG_MACH_WN802T=y +CONFIG_MACH_WNR854T=y +CONFIG_MACH_WRT350N_V2=y +CONFIG_MDIO_BOARDINFO=y +CONFIG_MMC=y +CONFIG_MMC_MVSDIO=y +# CONFIG_MMC_TIFM_SD is not set +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_MTD_PHYSMAP=y +CONFIG_MULTI_IRQ_HANDLER=y +CONFIG_MV643XX_ETH=y +CONFIG_MVEBU_MBUS=y +CONFIG_MVMDIO=y +# CONFIG_MVNETA is not set +CONFIG_MV_XOR=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NEED_KUSER_HELPERS=y +CONFIG_NEED_PER_CPU_KM=y +# CONFIG_NET_VENDOR_AURORA is not set +CONFIG_NO_BOOTMEM=y +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_ADDRESS_PCI=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IRQ=y +CONFIG_OF_MDIO=y +CONFIG_OF_MTD=y +CONFIG_OF_NET=y +CONFIG_OF_PCI=y +CONFIG_OF_PCI_IRQ=y +CONFIG_OF_RESERVED_MEM=y +CONFIG_OLD_SIGACTION=y +CONFIG_OLD_SIGSUSPEND3=y +CONFIG_ORION_WATCHDOG=y +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_PCI=y +# CONFIG_PCI_DOMAINS_GENERIC is not set +CONFIG_PERF_USE_VMALLOC=y +CONFIG_PGTABLE_LEVELS=2 +CONFIG_PHYLIB=y +CONFIG_PLAT_ORION=y +CONFIG_PLAT_ORION_LEGACY=y +CONFIG_RATIONAL=y +# CONFIG_RCU_EXPERT is not set +# CONFIG_RCU_STALL_COMMON is not set +CONFIG_RTC_CLASS=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +# CONFIG_SCHED_INFO is not set +# CONFIG_SCSI_DMA is not set +CONFIG_SERIAL_8250_FSL=y +CONFIG_SPLIT_PTLOCK_CPUS=999999 +CONFIG_SRAM=y +CONFIG_SRCU=y +CONFIG_SWIOTLB=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_TICK_CPU_ACCOUNTING=y +CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" +CONFIG_USB_SUPPORT=y +CONFIG_USE_OF=y +CONFIG_VECTORS_BASE=0xffff0000 +# CONFIG_VFP is not set +CONFIG_WATCHDOG_CORE=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_BCJ=y +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZONE_DMA_FLAG=0 diff --git a/target/linux/orion/patches-4.9/000-arm_openwrt_machtypes.patch b/target/linux/orion/patches-4.9/000-arm_openwrt_machtypes.patch new file mode 100644 index 00000000000000..764f9922888127 --- /dev/null +++ b/target/linux/orion/patches-4.9/000-arm_openwrt_machtypes.patch @@ -0,0 +1,8 @@ +--- a/arch/arm/tools/mach-types ++++ b/arch/arm/tools/mach-types +@@ -1006,3 +1006,5 @@ eco5_bx2 MACH_ECO5_BX2 ECO5_BX2 4572 + eukrea_cpuimx28sd MACH_EUKREA_CPUIMX28SD EUKREA_CPUIMX28SD 4573 + domotab MACH_DOMOTAB DOMOTAB 4574 + pfla03 MACH_PFLA03 PFLA03 4575 ++dt2 MACH_DT2 DT2 1514 ++wn802t MACH_WN802T WN802T 3306 diff --git a/target/linux/orion/patches-4.9/100-wrt350nv2_openwrt_partition_map.patch b/target/linux/orion/patches-4.9/100-wrt350nv2_openwrt_partition_map.patch new file mode 100644 index 00000000000000..89c2c9420bf1aa --- /dev/null +++ b/target/linux/orion/patches-4.9/100-wrt350nv2_openwrt_partition_map.patch @@ -0,0 +1,32 @@ +--- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c ++++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c +@@ -134,11 +134,11 @@ static struct mtd_partition wrt350n_v2_n + { + .name = "kernel", + .offset = 0x00000000, +- .size = 0x00760000, ++ .size = 0x00140000, // change to kernel mtd size here (1/3) + }, { + .name = "rootfs", +- .offset = 0x001a0000, +- .size = 0x005c0000, ++ .offset = 0x00140000, // change to kernel mtd size here (2/3) ++ .size = 0x00610000, // adopt to kernel mtd size here (3/3) = 0x00750000 - + }, { + .name = "lang", + .offset = 0x00760000, +@@ -151,6 +151,14 @@ static struct mtd_partition wrt350n_v2_n + .name = "u-boot", + .offset = 0x007c0000, + .size = 0x00040000, ++ }, { ++ .name = "eRcOmM_do_not_touch", ++ .offset = 0x00750000, ++ .size = 0x00010000, // erasesize ++ }, { ++ .name = "image", // for sysupgrade ++ .offset = 0x00000000, ++ .size = 0x00750000, + }, + }; + diff --git a/target/linux/orion/patches-4.9/101-wnr854t_partition_map.patch b/target/linux/orion/patches-4.9/101-wnr854t_partition_map.patch new file mode 100644 index 00000000000000..881cfb773ea5d7 --- /dev/null +++ b/target/linux/orion/patches-4.9/101-wnr854t_partition_map.patch @@ -0,0 +1,25 @@ +--- a/arch/arm/mach-orion5x/wnr854t-setup.c ++++ b/arch/arm/mach-orion5x/wnr854t-setup.c +@@ -57,15 +57,19 @@ static struct mtd_partition wnr854t_nor_ + { + .name = "kernel", + .offset = 0x00000000, +- .size = 0x00100000, ++ .size = 0x00140000, + }, { + .name = "rootfs", +- .offset = 0x00100000, +- .size = 0x00660000, ++ .offset = 0x00140000, ++ .size = 0x00620000, + }, { + .name = "uboot", + .offset = 0x00760000, + .size = 0x00040000, ++ }, { ++ .name = "image", // for sysupgrade ++ .offset = 0x00000000, ++ .size = 0x00760000, + }, + }; + diff --git a/target/linux/orion/patches-4.9/200-dt2_board_support.patch b/target/linux/orion/patches-4.9/200-dt2_board_support.patch new file mode 100644 index 00000000000000..5528069cd5c1ac --- /dev/null +++ b/target/linux/orion/patches-4.9/200-dt2_board_support.patch @@ -0,0 +1,562 @@ +--- a/arch/arm/mach-orion5x/Kconfig ++++ b/arch/arm/mach-orion5x/Kconfig +@@ -48,6 +48,13 @@ config MACH_RD88F5182_DT + Say 'Y' here if you want your kernel to support the Marvell + Orion-NAS (88F5182) RD2, Flattened Device Tree. + ++config MACH_DT2 ++ bool "Freecom DataTank Gateway" ++ select I2C_BOARDINFO ++ help ++ Say 'Y' here if you want your kernel to support the ++ Freecom DataTank Gateway ++ + config MACH_KUROBOX_PRO + bool "KuroBox Pro" + select I2C_BOARDINFO if I2C +--- a/arch/arm/mach-orion5x/Makefile ++++ b/arch/arm/mach-orion5x/Makefile +@@ -15,6 +15,7 @@ obj-$(CONFIG_MACH_TS78XX) += ts78xx-setu + obj-$(CONFIG_MACH_MV2120) += mv2120-setup.o + obj-$(CONFIG_MACH_NET2BIG) += net2big-setup.o + obj-$(CONFIG_MACH_WNR854T) += wnr854t-setup.o ++obj-$(CONFIG_MACH_DT2) += dt2-setup.o + obj-$(CONFIG_MACH_RD88F5181L_GE) += rd88f5181l-ge-setup.o + obj-$(CONFIG_MACH_RD88F5181L_FXO) += rd88f5181l-fxo-setup.o + obj-$(CONFIG_MACH_RD88F6183AP_GE) += rd88f6183ap-ge-setup.o +--- /dev/null ++++ b/arch/arm/mach-orion5x/dt2-common.h +@@ -0,0 +1,82 @@ ++#ifndef __INC_DT2_COMMON_H ++#define __INC_DT2_COMMON_H ++ ++#define ATAG_MV_UBOOT 0x41000403 ++ ++struct tag_mv_uboot { ++ u32 uboot_version; ++ u32 tclk; ++ u32 sysclk; ++ u32 isUsbHost; ++ u32 overEthAddr; ++ u8 dt2_eeprom[256]; ++}; ++ ++#define DT2_EEPROM_ADDR 0x50 ++#define DT2_EEPROM_OFFSET 0 ++#define DT2_EEPROM_LENGTH 256 ++ ++#define DT2_SERIAL_NUMBER_DEFAULT "run on default\0" ++#define DT2_REVISION_DEFAULT_INIT 0xFF ++#define DT2_CONFIG_FLAGS_DEFAULT 0x00 ++ ++#define _PACKED_ __attribute__((packed)) ++ ++struct DT2_EEPROM_SD_CONFIG { ++ unsigned int ram_1; ++ unsigned int ram_2; ++ unsigned int ram_3; ++ unsigned int ram_4; ++ unsigned char ram_5; ++ unsigned char ram_6; ++ unsigned short ram_7; ++ unsigned int magic_id; ++ } _PACKED_; // 24 Bytes in total ++ ++struct DT2_EEPROM_FC_CONFIG { ++ unsigned char rtc_sts_mask; ++ unsigned char rtc_sts_init; ++ unsigned char rtc_int_mask; ++ unsigned char rtc_int_init; ++ unsigned char rtc_atrim_init; ++ unsigned char rtc_dtrim_init; ++ unsigned char dummy1; ++ unsigned char dummy2; ++ unsigned char dt2_config_flags; /* 0x80 to load rtc_values to RTC */ ++ unsigned char dt2_revision; /* upper nibble is HW, lower nibble is FW */ ++ unsigned char dt2_serial_number[16]; /* Serial number of DT-2 */ ++ } _PACKED_; // 26 Bytes in total ++ ++#define CFG_LOAD_RTC_VALUES 0x80 ++ ++struct DT2_EEPROM_GW_CONFIG { ++ unsigned int dummy1; ++ unsigned int dummy2; ++ unsigned int dummy3; ++ unsigned char dummy4; ++ unsigned char tos_video_val1; ++ unsigned char tos_video_val2; ++ unsigned char tos_voip_val; ++ unsigned char qos_igmp_cfg; ++ unsigned char num_of_ifs; ++ unsigned short vlan_ports_if[3]; ++ unsigned char mac_addr[3][6]; ++ } _PACKED_; // 42 Bytes in total ++ ++#define _SIZE_OF_ALL_STRUCTS_ (sizeof(struct DT2_EEPROM_SD_CONFIG) + sizeof(struct DT2_EEPROM_FC_CONFIG) + sizeof(struct DT2_EEPROM_GW_CONFIG)) ++ ++// MV = EEPROM - SD - FC - GW - CRC ++struct DT2_EEPROM_MV_CONFIG { ++ unsigned int reg_addr[(DT2_EEPROM_LENGTH - _SIZE_OF_ALL_STRUCTS_ - sizeof(unsigned int)) / (sizeof(unsigned int) * 2)]; ++ unsigned int reg_data[(DT2_EEPROM_LENGTH - _SIZE_OF_ALL_STRUCTS_ - sizeof(unsigned int)) / (sizeof(unsigned int) * 2)]; ++ } _PACKED_; ++ ++struct DT2_EEPROM_STRUCT { ++ struct DT2_EEPROM_MV_CONFIG mv; ++ struct DT2_EEPROM_SD_CONFIG sd; ++ struct DT2_EEPROM_FC_CONFIG fc; ++ struct DT2_EEPROM_GW_CONFIG gw; ++ unsigned int crc; ++ } _PACKED_; ++ ++#endif +--- /dev/null ++++ b/arch/arm/mach-orion5x/dt2-setup.c +@@ -0,0 +1,448 @@ ++/* ++ * arch/arm/mach-orion5x/dt2-setup.c ++ * ++ * Freecom DataTank Gateway Setup ++ * ++ * Copyright (C) 2009 Zintis Petersons ++ * ++ * This file is licensed under the terms of the GNU General Public ++ * License version 2. This program is licensed "as is" without any ++ * warranty of any kind, whether express or implied. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "orion5x.h" ++#include "common.h" ++#include "mpp.h" ++ ++/***************************************************************************** ++ * DT2 local ++ ****************************************************************************/ ++#include ++#include "dt2-common.h" ++ ++u32 mvUbootVer = 0; ++u32 mvTclk = 166666667; ++u32 mvSysclk = 200000000; ++u32 mvIsUsbHost = 1; ++u32 overEthAddr = 0; ++u32 gBoardId = -1; ++struct DT2_EEPROM_STRUCT dt2_eeprom; ++ ++/***************************************************************************** ++ * DT2 Info ++ ****************************************************************************/ ++/* ++ * PCI ++ */ ++ ++#define DT2_PCI_SLOT0_OFFS 7 ++#define DT2_PCI_SLOT0_IRQ_A_PIN 3 ++#define DT2_PCI_SLOT0_IRQ_B_PIN 2 ++ ++#define DT2_PIN_GPIO_SYNC 25 ++#define DT2_PIN_GPIO_POWER 24 ++#define DT2_PIN_GPIO_UNPLUG1 23 ++#define DT2_PIN_GPIO_UNPLUG2 22 ++#define DT2_PIN_GPIO_RESET 4 ++ ++#define DT2_NOR_BOOT_BASE 0xf4000000 ++#define DT2_NOR_BOOT_SIZE SZ_512K ++ ++#define DT2_LEDS_BASE 0xfa000000 ++#define DT2_LEDS_SIZE SZ_1K ++ ++/***************************************************************************** ++ * 512K NOR Flash on Device bus Boot CS ++ ****************************************************************************/ ++ ++static struct mtd_partition dt2_partitions[] = { ++ { ++ .name = "u-boot", ++ .size = 0x00080000, ++ .offset = 0, ++ }, ++}; ++ ++static struct physmap_flash_data dt2_nor_flash_data = { ++ .width = 1, /* 8 bit bus width */ ++ .parts = dt2_partitions, ++ .nr_parts = ARRAY_SIZE(dt2_partitions) ++}; ++ ++static struct resource dt2_nor_flash_resource = { ++ .flags = IORESOURCE_MEM, ++ .start = DT2_NOR_BOOT_BASE, ++ .end = DT2_NOR_BOOT_BASE + DT2_NOR_BOOT_SIZE - 1, ++}; ++ ++static struct platform_device dt2_nor_flash = { ++ .name = "physmap-flash", ++ .id = 0, ++ .dev = { ++ .platform_data = &dt2_nor_flash_data, ++ }, ++ .resource = &dt2_nor_flash_resource, ++ .num_resources = 1, ++}; ++ ++/***************************************************************************** ++ * PCI ++ ****************************************************************************/ ++ ++void __init dt2_pci_preinit(void) ++{ ++ int pin, irq; ++ ++ /* ++ * Configure PCI GPIO IRQ pins ++ */ ++ pin = DT2_PCI_SLOT0_IRQ_A_PIN; ++ if (gpio_request(pin, "PCI IntA") == 0) { ++ if (gpio_direction_input(pin) == 0) { ++ irq = gpio_to_irq(pin); ++ irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW); ++ printk (KERN_INFO "PCI IntA IRQ: %d\n", irq); ++ } else { ++ printk(KERN_ERR "dt2_pci_preinit failed to " ++ "irq_set_irq_type pin %d\n", pin); ++ gpio_free(pin); ++ } ++ } else { ++ printk(KERN_ERR "dt2_pci_preinit failed to request gpio %d\n", pin); ++ } ++ ++ pin = DT2_PCI_SLOT0_IRQ_B_PIN; ++ if (gpio_request(pin, "PCI IntB") == 0) { ++ if (gpio_direction_input(pin) == 0) { ++ irq = gpio_to_irq(pin); ++ irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW); ++ printk (KERN_INFO "PCI IntB IRQ: %d\n", irq); ++ } else { ++ printk(KERN_ERR "dt2_pci_preinit failed to " ++ "irq_set_irq_type pin %d\n", pin); ++ gpio_free(pin); ++ } ++ } else { ++ printk(KERN_ERR "dt2_pci_preinit failed to gpio_request %d\n", pin); ++ } ++} ++ ++static int __init dt2_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) ++{ ++ int irq; ++ ++ /* ++ * Check for devices with hard-wired IRQs. ++ */ ++ irq = orion5x_pci_map_irq(dev, slot, pin); ++ if (irq != -1){ ++ printk(KERN_INFO "orion5x_pci_map_irq: %d\n", irq); ++ return irq; ++ } ++ ++ /* ++ * PCI IRQs are connected via GPIOs ++ */ ++ switch (slot - DT2_PCI_SLOT0_OFFS) { ++ case 0: ++ if (pin == 1){ ++ irq = gpio_to_irq(DT2_PCI_SLOT0_IRQ_A_PIN); ++ printk(KERN_INFO "dt2_pci_map_irq DT2_PCI_SLOT0_IRQ_A_PIN: %d\n", irq); ++ } ++ else { ++ irq = gpio_to_irq(DT2_PCI_SLOT0_IRQ_B_PIN); ++ printk(KERN_INFO "dt2_pci_map_irq DT2_PCI_SLOT0_IRQ_B_PIN: %d\n", irq); ++ } ++ default: ++ irq = -1; ++ printk(KERN_INFO "dt2_pci_map_irq IRQ: %d\n", irq); ++ } ++ ++ return irq; ++} ++ ++static struct hw_pci dt2_pci __initdata = { ++ .nr_controllers = 2, ++ .preinit = dt2_pci_preinit, ++ .setup = orion5x_pci_sys_setup, ++ .scan = orion5x_pci_sys_scan_bus, ++ .map_irq = dt2_pci_map_irq, ++}; ++ ++static int __init dt2_pci_init(void) ++{ ++ if (machine_is_dt2()) ++ pci_common_init(&dt2_pci); ++ ++ return 0; ++} ++ ++subsys_initcall(dt2_pci_init); ++ ++/***************************************************************************** ++ * Ethernet ++ ****************************************************************************/ ++ ++static struct mv643xx_eth_platform_data dt2_eth_data = { ++ .phy_addr = MV643XX_ETH_PHY_NONE, ++ .speed = SPEED_1000, ++ .duplex = DUPLEX_FULL, ++}; ++ ++static struct dsa_chip_data dt2_switch_chip_data = { ++ .port_names[0] = "wan", ++ .port_names[1] = "lan1", ++ .port_names[2] = "lan2", ++ .port_names[3] = "cpu", ++ .port_names[4] = "lan3", ++ .port_names[5] = "lan4", ++}; ++ ++static struct dsa_platform_data dt2_switch_plat_data = { ++ .nr_chips = 1, ++ .chip = &dt2_switch_chip_data, ++}; ++ ++/***************************************************************************** ++ * RTC ISL1208 on I2C bus ++ ****************************************************************************/ ++static struct i2c_board_info __initdata dt2_i2c_rtc = { ++ I2C_BOARD_INFO("isl1208", 0x6F), ++}; ++ ++/***************************************************************************** ++ * Sata ++ ****************************************************************************/ ++static struct mv_sata_platform_data dt2_sata_data = { ++ .n_ports = 2, ++}; ++ ++/***************************************************************************** ++ * General Setup ++ ****************************************************************************/ ++static unsigned int dt2_mpp_modes[] __initdata = { ++ MPP0_GPIO, // RTC interrupt ++ MPP1_GPIO, // 88e6131 interrupt ++ MPP2_GPIO, // PCI_intB ++ MPP3_GPIO, // PCI_intA ++ MPP4_GPIO, // reset button switch ++ MPP5_GPIO, ++ MPP6_GPIO, ++ MPP7_GPIO, ++ MPP8_GPIO, ++ MPP9_GIGE, /* GE_RXERR */ ++ MPP10_GPIO, // usb ++ MPP11_GPIO, // usb ++ MPP12_GIGE, // GE_TXD[4] ++ MPP13_GIGE, // GE_TXD[5] ++ MPP14_GIGE, // GE_TXD[6] ++ MPP15_GIGE, // GE_TXD[7] ++ MPP16_GIGE, // GE_RXD[4] ++ MPP17_GIGE, // GE_RXD[5] ++ MPP18_GIGE, // GE_RXD[6] ++ MPP19_GIGE, // GE_RXD[7] ++ 0, ++}; ++ ++/***************************************************************************** ++ * LEDS ++ ****************************************************************************/ ++static struct platform_device dt2_leds = { ++ .name = "dt2-led", ++ .id = -1, ++}; ++ ++/**************************************************************************** ++ * GPIO key ++ ****************************************************************************/ ++static irqreturn_t dt2_reset_handler(int irq, void *dev_id) ++{ ++ /* This is the paper-clip reset which does an emergency reboot. */ ++ printk(KERN_INFO "Restarting system.\n"); ++ machine_restart(NULL); ++ ++ /* This should never be reached. */ ++ return IRQ_HANDLED; ++} ++ ++static irqreturn_t dt2_power_handler(int irq, void *dev_id) ++{ ++ printk(KERN_INFO "Shutting down system.\n"); ++ machine_power_off(); ++ return IRQ_HANDLED; ++} ++ ++static void __init dt2_init(void) ++{ ++ /* ++ * Setup basic Orion functions. Need to be called early. ++ */ ++ orion5x_init(); ++ ++ orion5x_mpp_conf(dt2_mpp_modes); ++ ++ /* ++ * Configure peripherals. ++ */ ++ ++ orion5x_uart0_init(); ++ orion5x_ehci0_init(); ++ orion5x_ehci1_init(); ++ orion5x_i2c_init(); ++ orion5x_sata_init(&dt2_sata_data); ++ orion5x_xor_init(); ++ ++ printk(KERN_INFO "U-Boot parameters:\n"); ++ printk(KERN_INFO "Sys Clk = %d, Tclk = %d, BoardID = 0x%02x\n", mvSysclk, mvTclk, gBoardId); ++ ++ printk(KERN_INFO "Serial: %s\n", dt2_eeprom.fc.dt2_serial_number); ++ printk(KERN_INFO "Revision: %016x\n", dt2_eeprom.fc.dt2_revision); ++ printk(KERN_INFO "DT2: Using MAC address %pM for port 0\n", ++ dt2_eeprom.gw.mac_addr[0]); ++ printk(KERN_INFO "DT2: Using MAC address %pM for port 1\n", ++ dt2_eeprom.gw.mac_addr[1]); ++ ++ orion5x_eth_init(&dt2_eth_data); ++ memcpy(dt2_eth_data.mac_addr, dt2_eeprom.gw.mac_addr[0], 6); ++ orion5x_eth_switch_init(&dt2_switch_plat_data); ++ ++ i2c_register_board_info(0, &dt2_i2c_rtc, 1); ++ ++ mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, ++ ORION_MBUS_DEVBUS_BOOT_ATTR, ++ DT2_NOR_BOOT_BASE, DT2_NOR_BOOT_SIZE); ++ ++ platform_device_register(&dt2_nor_flash); ++ ++ mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_TARGET(0), ++ ORION_MBUS_DEVBUS_ATTR(0), ++ DT2_LEDS_BASE, DT2_LEDS_SIZE); ++ platform_device_register(&dt2_leds); ++ ++ if (request_irq(gpio_to_irq(DT2_PIN_GPIO_RESET), &dt2_reset_handler, ++ IRQF_TRIGGER_LOW, ++ "DT2: Reset button", NULL) < 0) { ++ ++ printk("DT2: Reset Button IRQ %d not available\n", ++ gpio_to_irq(DT2_PIN_GPIO_RESET)); ++ } ++ ++ if (request_irq(gpio_to_irq(DT2_PIN_GPIO_POWER), &dt2_power_handler, ++ IRQF_TRIGGER_LOW, ++ "DT2: Power button", NULL) < 0) { ++ ++ printk(KERN_DEBUG "DT2: Power Button IRQ %d not available\n", ++ gpio_to_irq(DT2_PIN_GPIO_POWER)); ++ } ++} ++ ++static int __init parse_tag_dt2_uboot(const struct tag *t) ++{ ++ struct tag_mv_uboot *mv_uboot; ++ ++ // Get pointer to our block ++ mv_uboot = (struct tag_mv_uboot*)&t->u; ++ mvTclk = mv_uboot->tclk; ++ mvSysclk = mv_uboot->sysclk; ++ mvUbootVer = mv_uboot->uboot_version; ++ mvIsUsbHost = mv_uboot->isUsbHost; ++ ++ // Some clock fixups ++ if(mvTclk == 166000000) mvTclk = 166666667; ++ else if(mvTclk == 133000000) mvTclk = 133333333; ++ else if(mvSysclk == 166000000) mvSysclk = 166666667; ++ ++ gBoardId = (mvUbootVer & 0xff); ++ ++ //DT2 specific data ++ memcpy(&dt2_eeprom, mv_uboot->dt2_eeprom, sizeof(struct DT2_EEPROM_STRUCT)); ++ ++ return 0; ++} ++__tagtable(ATAG_MV_UBOOT, parse_tag_dt2_uboot); ++ ++/* ++ * This is OpenWrt specific fixup. It includes code from original "tag_fixup_mem32" to ++ * fixup bogus memory tags and also fixes kernel cmdline by adding " init=/etc/preinit" ++ * at the end. It is important to flash OpenWrt image from original Freecom firmware. ++ * ++ * Vanilla kernel should use "tag_fixup_mem32" function. ++ */ ++static void __init openwrt_fixup(struct tag *t, char **from) ++{ ++ char *p = NULL; ++ static char openwrt_init_tag[] __initdata = " init=/etc/preinit"; ++ ++ for (; t->hdr.size; t = tag_next(t)){ ++ /* Locate the Freecom cmdline */ ++ if (t->hdr.tag == ATAG_CMDLINE) { ++ p = t->u.cmdline.cmdline; ++ printk("%s(%d): Found cmdline '%s' at 0x%0lx\n", ++ __FUNCTION__, __LINE__, p, (unsigned long)p); ++ } ++ /* ++ * Many orion-based systems have buggy bootloader implementations. ++ * This is a common fixup for bogus memory tags. ++ */ ++ if (t->hdr.tag == ATAG_MEM && ++ (!t->u.mem.size || t->u.mem.size & ~PAGE_MASK || ++ t->u.mem.start & ~PAGE_MASK)) { ++ printk(KERN_WARNING ++ "Clearing invalid memory bank %dKB@0x%08x\n", ++ t->u.mem.size / 1024, t->u.mem.start); ++ t->hdr.tag = 0; ++ } ++ } ++ ++ printk("%s(%d): End of table at 0x%0lx\n", __FUNCTION__, __LINE__, (unsigned long)t); ++ ++ /* Overwrite the end of the table with a new cmdline tag. */ ++ t->hdr.tag = ATAG_CMDLINE; ++ t->hdr.size = ++ (sizeof (struct tag_header) + ++ strlen(p) + strlen(openwrt_init_tag) + 1 + 4) >> 2; ++ ++ strlcpy(t->u.cmdline.cmdline, p, COMMAND_LINE_SIZE); ++ strlcpy(t->u.cmdline.cmdline + strlen(p), openwrt_init_tag, ++ COMMAND_LINE_SIZE - strlen(p)); ++ ++ printk("%s(%d): New cmdline '%s' at 0x%0lx\n", ++ __FUNCTION__, __LINE__, ++ t->u.cmdline.cmdline, (unsigned long)t->u.cmdline.cmdline); ++ ++ t = tag_next(t); ++ ++ printk("%s(%d): New end of table at 0x%0lx\n", __FUNCTION__, __LINE__, (unsigned long)t); ++ ++ t->hdr.tag = ATAG_NONE; ++ t->hdr.size = 0; ++} ++ ++/* Warning: Freecom uses their own custom bootloader with mach-type (=1500) */ ++MACHINE_START(DT2, "Freecom DataTank Gateway") ++ /* Maintainer: Zintis Petersons */ ++ .atag_offset = 0x100, ++ .init_machine = dt2_init, ++ .map_io = orion5x_map_io, ++ .init_irq = orion5x_init_irq, ++ .init_time = orion5x_timer_init, ++ .fixup = openwrt_fixup, //tag_fixup_mem32, ++MACHINE_END diff --git a/target/linux/orion/patches-4.9/210-wn802t_support.patch b/target/linux/orion/patches-4.9/210-wn802t_support.patch new file mode 100644 index 00000000000000..a274beedc337ae --- /dev/null +++ b/target/linux/orion/patches-4.9/210-wn802t_support.patch @@ -0,0 +1,73 @@ +--- a/arch/arm/mach-orion5x/Kconfig ++++ b/arch/arm/mach-orion5x/Kconfig +@@ -159,10 +159,13 @@ config MACH_MSS2_DT + Maxtor Shared Storage II platform. + + config MACH_WNR854T +- bool "Netgear WNR854T" ++ bool "Netgear WNR854T / WN802T" + help + Say 'Y' here if you want your kernel to support the +- Netgear WNR854T platform. ++ Netgear WNR854T or WN802T platform. ++ ++config MACH_WN802T ++ def_bool MACH_WNR854T + + config MACH_RD88F5181L_GE + bool "Marvell Orion-VoIP GE Reference Design" +--- a/arch/arm/mach-orion5x/wnr854t-setup.c ++++ b/arch/arm/mach-orion5x/wnr854t-setup.c +@@ -115,6 +115,15 @@ static struct dsa_platform_data __initda + .chip = &wnr854t_switch_chip_data, + }; + ++static struct dsa_chip_data wn802t_switch_chip_data = { ++ .port_names[2] = "wan", ++ .port_names[3] = "cpu", ++}; ++ ++static struct dsa_platform_data wn802t_switch_plat_data = { ++ .nr_chips = 1, ++ .chip = &wn802t_switch_chip_data, ++}; + static void __init wnr854t_init(void) + { + /* +@@ -128,7 +137,10 @@ static void __init wnr854t_init(void) + * Configure peripherals. + */ + orion5x_eth_init(&wnr854t_eth_data); +- orion5x_eth_switch_init(&wnr854t_switch_plat_data); ++ if (machine_is_wn802t()) ++ orion5x_eth_switch_init(&wn802t_switch_plat_data); ++ else ++ orion5x_eth_switch_init(&wnr854t_switch_plat_data); + orion5x_uart0_init(); + + mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, +@@ -168,7 +180,7 @@ static struct hw_pci wnr854t_pci __initd + + static int __init wnr854t_pci_init(void) + { +- if (machine_is_wnr854t()) ++ if (machine_is_wnr854t() || machine_is_wn802t()) + pci_common_init(&wnr854t_pci); + + return 0; +@@ -187,3 +199,15 @@ MACHINE_START(WNR854T, "Netgear WNR854T" + .fixup = tag_fixup_mem32, + .restart = orion5x_restart, + MACHINE_END ++ ++MACHINE_START(WN802T, "Netgear WN802T") ++ /* Maintainer: Imre Kaloz */ ++ .atag_offset = 0x100, ++ .init_machine = wnr854t_init, ++ .map_io = orion5x_map_io, ++ .init_early = orion5x_init_early, ++ .init_irq = orion5x_init_irq, ++ .init_time = orion5x_timer_init, ++ .fixup = tag_fixup_mem32, ++ .restart = orion5x_restart, ++MACHINE_END diff --git a/target/linux/pistachio/config-4.9 b/target/linux/pistachio/config-4.9 index 121f6a8c1380a3..a417a6b064bfd9 100644 --- a/target/linux/pistachio/config-4.9 +++ b/target/linux/pistachio/config-4.9 @@ -216,6 +216,7 @@ CONFIG_MTD_SPI_NAND=y CONFIG_MTD_SPI_NAND_DEVICES=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y +CONFIG_MTD_SPI_NOR_USE_4K_SECTORS_LIMIT=16384 CONFIG_MTD_UBI=y CONFIG_MTD_UBI_BEB_LIMIT=20 CONFIG_MTD_UBI_BLOCK=y diff --git a/target/linux/rb532/Makefile b/target/linux/rb532/Makefile index e95524aed215de..7979bb4b85e432 100644 --- a/target/linux/rb532/Makefile +++ b/target/linux/rb532/Makefile @@ -10,8 +10,9 @@ ARCH:=mipsel BOARD:=rb532 BOARDNAME:=Mikrotik RouterBoard 532 FEATURES:=pci targz squashfs minor nand +MAINTAINER:=Roman Yeryomin -KERNEL_PATCHVER:=4.4 +KERNEL_PATCHVER:=4.9 include $(INCLUDE_DIR)/target.mk diff --git a/target/linux/rb532/base-files/etc/config/network b/target/linux/rb532/base-files/etc/config/network index 75a14a7308ea6c..c689d63278425d 100644 --- a/target/linux/rb532/base-files/etc/config/network +++ b/target/linux/rb532/base-files/etc/config/network @@ -11,6 +11,7 @@ config interface wan option proto dhcp config interface lan + option type bridge option ifname eth2 option proto static option ipaddr 192.168.1.1 diff --git a/target/linux/rb532/config-4.4 b/target/linux/rb532/config-4.9 similarity index 98% rename from target/linux/rb532/config-4.4 rename to target/linux/rb532/config-4.9 index 7d0bb3ab155642..9290a1869af418 100644 --- a/target/linux/rb532/config-4.4 +++ b/target/linux/rb532/config-4.9 @@ -61,7 +61,6 @@ CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GLOB=y CONFIG_GPIOLIB=y -CONFIG_GPIO_DEVRES=y CONFIG_GPIO_SYSFS=y CONFIG_HARDWARE_WATCHPOINTS=y CONFIG_HAS_DMA=y @@ -74,7 +73,6 @@ CONFIG_HAVE_ARCH_KGDB=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y CONFIG_HAVE_ARCH_TRACEHOOK=y # CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_HAVE_BPF_JIT=y CONFIG_HAVE_CC_STACKPROTECTOR=y CONFIG_HAVE_CONTEXT_TRACKING=y CONFIG_HAVE_C_RECORDMCOUNT=y @@ -89,7 +87,6 @@ CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_GENERIC_DMA_COHERENT=y CONFIG_HAVE_IDE=y -CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y CONFIG_HAVE_LATENCYTOP_SUPPORT=y CONFIG_HAVE_MEMBLOCK=y @@ -100,6 +97,7 @@ CONFIG_HAVE_OPROFILE=y CONFIG_HAVE_PERF_EVENTS=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y +# CONFIG_HIGH_RES_TIMERS is not set CONFIG_HW_HAS_PCI=y CONFIG_HW_RANDOM=y CONFIG_HZ=250 @@ -157,6 +155,7 @@ CONFIG_PERF_USE_VMALLOC=y CONFIG_PGTABLE_LEVELS=2 CONFIG_RC32434_WDT=y # CONFIG_RCU_STALL_COMMON is not set +# CONFIG_SCHED_HRTICK is not set # CONFIG_SCHED_INFO is not set CONFIG_SCSI=y # CONFIG_SCSI_LOWLEVEL is not set diff --git a/target/linux/rb532/image/Makefile b/target/linux/rb532/image/Makefile index 06255c60ed650b..12265fe2c6992d 100644 --- a/target/linux/rb532/image/Makefile +++ b/target/linux/rb532/image/Makefile @@ -85,7 +85,7 @@ define Image/Build $(CP) $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel $(STAGING_DIR_HOST)/bin/patch-cmdline $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel 'root=/dev/sda2 ' ./gen_image.sh $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).bin \ - 5 $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel \ + 6 $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel \ $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(KDIR)/root.$(1) \ 128 endef diff --git a/target/linux/rb532/patches-4.4/002-rb532_nand_fixup.patch b/target/linux/rb532/patches-4.4/002-rb532_nand_fixup.patch deleted file mode 100644 index 3172d0384a0e0d..00000000000000 --- a/target/linux/rb532/patches-4.4/002-rb532_nand_fixup.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- a/arch/mips/rb532/devices.c -+++ b/arch/mips/rb532/devices.c -@@ -141,6 +141,19 @@ static struct platform_device cf_slot0 = - }; - - /* Resources and device for NAND */ -+ -+/* -+ * We need to use the OLD Yaffs-1 OOB layout, otherwise the RB bootloader -+ * will not be able to find the kernel that we load. So set the oobinfo -+ * when creating the partitions -+ */ -+static struct nand_ecclayout rb532_nand_ecclayout = { -+ .eccbytes = 6, -+ .eccpos = { 8, 9, 10, 13, 14, 15 }, -+ .oobavail = 9, -+ .oobfree = { { 0, 4 }, { 6, 2 }, { 11, 2 }, { 4, 1 } } -+}; -+ - static int rb532_dev_ready(struct mtd_info *mtd) - { - return gpio_get_value(GPIO_RDY); -@@ -255,6 +268,16 @@ static struct platform_device *rb532_dev - /* NAND definitions */ - #define NAND_CHIP_DELAY 25 - -+static int rb532_nand_fixup(struct mtd_info *mtd) -+{ -+ struct nand_chip *chip = mtd->priv; -+ -+ if (mtd->writesize == 512) -+ chip->ecc.layout = &rb532_nand_ecclayout; -+ -+ return 0; -+} -+ - static void __init rb532_nand_setup(void) - { - switch (mips_machtype) { -@@ -273,6 +296,7 @@ static void __init rb532_nand_setup(void - rb532_nand_data.chip.nr_partitions = ARRAY_SIZE(rb532_partition_info); - rb532_nand_data.chip.partitions = rb532_partition_info; - rb532_nand_data.chip.chip_delay = NAND_CHIP_DELAY; -+ rb532_nand_data.chip.chip_fixup = &rb532_nand_fixup; - } - - diff --git a/target/linux/rb532/patches-4.4/001-cmdline_hack.patch b/target/linux/rb532/patches-4.9/001-cmdline_hack.patch similarity index 100% rename from target/linux/rb532/patches-4.4/001-cmdline_hack.patch rename to target/linux/rb532/patches-4.9/001-cmdline_hack.patch diff --git a/target/linux/rb532/patches-4.4/004-rb532-fix-partition-info.patch b/target/linux/rb532/patches-4.9/004-rb532-fix-partition-info.patch similarity index 85% rename from target/linux/rb532/patches-4.4/004-rb532-fix-partition-info.patch rename to target/linux/rb532/patches-4.9/004-rb532-fix-partition-info.patch index fd23e09e454d8f..5161a233dda623 100644 --- a/target/linux/rb532/patches-4.4/004-rb532-fix-partition-info.patch +++ b/target/linux/rb532/patches-4.9/004-rb532-fix-partition-info.patch @@ -1,6 +1,6 @@ --- a/arch/mips/rb532/devices.c +++ b/arch/mips/rb532/devices.c -@@ -199,11 +199,11 @@ static struct platform_device nand_slot0 +@@ -186,11 +186,11 @@ static struct platform_device nand_slot0 static struct mtd_partition rb532_partition_info[] = { { diff --git a/target/linux/rb532/patches-4.9/106-dont-use-rx-overflow-and-tx-underflow-interrupts.patch b/target/linux/rb532/patches-4.9/106-dont-use-rx-overflow-and-tx-underflow-interrupts.patch new file mode 100644 index 00000000000000..e75079b12f0781 --- /dev/null +++ b/target/linux/rb532/patches-4.9/106-dont-use-rx-overflow-and-tx-underflow-interrupts.patch @@ -0,0 +1,156 @@ +--- a/drivers/net/ethernet/korina.c ++++ b/drivers/net/ethernet/korina.c +@@ -122,8 +122,6 @@ struct korina_private { + + int rx_irq; + int tx_irq; +- int ovr_irq; +- int und_irq; + + spinlock_t lock; /* NIC xmit lock */ + +@@ -890,8 +888,6 @@ static void korina_restart_task(struct w + */ + disable_irq(lp->rx_irq); + disable_irq(lp->tx_irq); +- disable_irq(lp->ovr_irq); +- disable_irq(lp->und_irq); + + writel(readl(&lp->tx_dma_regs->dmasm) | + DMA_STAT_FINI | DMA_STAT_ERR, +@@ -910,40 +906,10 @@ static void korina_restart_task(struct w + } + korina_multicast_list(dev); + +- enable_irq(lp->und_irq); +- enable_irq(lp->ovr_irq); + enable_irq(lp->tx_irq); + enable_irq(lp->rx_irq); + } + +-static void korina_clear_and_restart(struct net_device *dev, u32 value) +-{ +- struct korina_private *lp = netdev_priv(dev); +- +- netif_stop_queue(dev); +- writel(value, &lp->eth_regs->ethintfc); +- schedule_work(&lp->restart_task); +-} +- +-/* Ethernet Tx Underflow interrupt */ +-static irqreturn_t korina_und_interrupt(int irq, void *dev_id) +-{ +- struct net_device *dev = dev_id; +- struct korina_private *lp = netdev_priv(dev); +- unsigned int und; +- +- spin_lock(&lp->lock); +- +- und = readl(&lp->eth_regs->ethintfc); +- +- if (und & ETH_INT_FC_UND) +- korina_clear_and_restart(dev, und & ~ETH_INT_FC_UND); +- +- spin_unlock(&lp->lock); +- +- return IRQ_HANDLED; +-} +- + static void korina_tx_timeout(struct net_device *dev) + { + struct korina_private *lp = netdev_priv(dev); +@@ -951,25 +917,6 @@ static void korina_tx_timeout(struct net + schedule_work(&lp->restart_task); + } + +-/* Ethernet Rx Overflow interrupt */ +-static irqreturn_t +-korina_ovr_interrupt(int irq, void *dev_id) +-{ +- struct net_device *dev = dev_id; +- struct korina_private *lp = netdev_priv(dev); +- unsigned int ovr; +- +- spin_lock(&lp->lock); +- ovr = readl(&lp->eth_regs->ethintfc); +- +- if (ovr & ETH_INT_FC_OVR) +- korina_clear_and_restart(dev, ovr & ~ETH_INT_FC_OVR); +- +- spin_unlock(&lp->lock); +- +- return IRQ_HANDLED; +-} +- + #ifdef CONFIG_NET_POLL_CONTROLLER + static void korina_poll_controller(struct net_device *dev) + { +@@ -992,8 +939,7 @@ static int korina_open(struct net_device + } + + /* Install the interrupt handler +- * that handles the Done Finished +- * Ovr and Und Events */ ++ * that handles the Done Finished */ + ret = request_irq(lp->rx_irq, korina_rx_dma_interrupt, + 0, "Korina ethernet Rx", dev); + if (ret < 0) { +@@ -1009,31 +955,10 @@ static int korina_open(struct net_device + goto err_free_rx_irq; + } + +- /* Install handler for overrun error. */ +- ret = request_irq(lp->ovr_irq, korina_ovr_interrupt, +- 0, "Ethernet Overflow", dev); +- if (ret < 0) { +- printk(KERN_ERR "%s: unable to get OVR IRQ %d\n", +- dev->name, lp->ovr_irq); +- goto err_free_tx_irq; +- } +- +- /* Install handler for underflow error. */ +- ret = request_irq(lp->und_irq, korina_und_interrupt, +- 0, "Ethernet Underflow", dev); +- if (ret < 0) { +- printk(KERN_ERR "%s: unable to get UND IRQ %d\n", +- dev->name, lp->und_irq); +- goto err_free_ovr_irq; +- } + mod_timer(&lp->media_check_timer, jiffies + 1); + out: + return ret; + +-err_free_ovr_irq: +- free_irq(lp->ovr_irq, dev); +-err_free_tx_irq: +- free_irq(lp->tx_irq, dev); + err_free_rx_irq: + free_irq(lp->rx_irq, dev); + err_release: +@@ -1051,8 +976,6 @@ static int korina_close(struct net_devic + /* Disable interrupts */ + disable_irq(lp->rx_irq); + disable_irq(lp->tx_irq); +- disable_irq(lp->ovr_irq); +- disable_irq(lp->und_irq); + + korina_abort_tx(dev); + tmp = readl(&lp->tx_dma_regs->dmasm); +@@ -1072,8 +995,6 @@ static int korina_close(struct net_devic + + free_irq(lp->rx_irq, dev); + free_irq(lp->tx_irq, dev); +- free_irq(lp->ovr_irq, dev); +- free_irq(lp->und_irq, dev); + + return 0; + } +@@ -1113,8 +1034,6 @@ static int korina_probe(struct platform_ + + lp->rx_irq = platform_get_irq_byname(pdev, "korina_rx"); + lp->tx_irq = platform_get_irq_byname(pdev, "korina_tx"); +- lp->ovr_irq = platform_get_irq_byname(pdev, "korina_ovr"); +- lp->und_irq = platform_get_irq_byname(pdev, "korina_und"); + + r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "korina_regs"); + dev->base_addr = r->start; diff --git a/target/linux/rb532/patches-4.9/107-korina-refactor-rx-descriptor-flags-processing.patch b/target/linux/rb532/patches-4.9/107-korina-refactor-rx-descriptor-flags-processing.patch new file mode 100644 index 00000000000000..80745f534dac5f --- /dev/null +++ b/target/linux/rb532/patches-4.9/107-korina-refactor-rx-descriptor-flags-processing.patch @@ -0,0 +1,110 @@ +--- a/drivers/net/ethernet/korina.c ++++ b/drivers/net/ethernet/korina.c +@@ -363,59 +363,60 @@ static int korina_rx(struct net_device * + if ((KORINA_RBSIZE - (u32)DMA_COUNT(rd->control)) == 0) + break; + +- /* Update statistics counters */ +- if (devcs & ETH_RX_CRC) +- dev->stats.rx_crc_errors++; +- if (devcs & ETH_RX_LOR) +- dev->stats.rx_length_errors++; +- if (devcs & ETH_RX_LE) +- dev->stats.rx_length_errors++; +- if (devcs & ETH_RX_OVR) +- dev->stats.rx_fifo_errors++; +- if (devcs & ETH_RX_CV) +- dev->stats.rx_frame_errors++; +- if (devcs & ETH_RX_CES) +- dev->stats.rx_length_errors++; +- if (devcs & ETH_RX_MP) +- dev->stats.multicast++; ++ /* check that this is a whole packet ++ * WARNING: DMA_FD bit incorrectly set ++ * in Rc32434 (errata ref #077) */ ++ if (!(devcs & ETH_RX_LD)) ++ goto next; + +- if ((devcs & ETH_RX_LD) != ETH_RX_LD) { +- /* check that this is a whole packet +- * WARNING: DMA_FD bit incorrectly set +- * in Rc32434 (errata ref #077) */ ++ if (!(devcs & ETH_RX_ROK)) { ++ /* Update statistics counters */ + dev->stats.rx_errors++; + dev->stats.rx_dropped++; +- } else if ((devcs & ETH_RX_ROK)) { +- pkt_len = RCVPKT_LENGTH(devcs); ++ if (devcs & ETH_RX_CRC) ++ dev->stats.rx_crc_errors++; ++ if (devcs & ETH_RX_LE) ++ dev->stats.rx_length_errors++; ++ if (devcs & ETH_RX_OVR) ++ dev->stats.rx_fifo_errors++; ++ if (devcs & ETH_RX_CV) ++ dev->stats.rx_frame_errors++; ++ if (devcs & ETH_RX_CES) ++ dev->stats.rx_frame_errors++; + +- /* must be the (first and) last +- * descriptor then */ +- pkt_buf = (u8 *)lp->rx_skb[lp->rx_next_done]->data; +- +- /* invalidate the cache */ +- dma_cache_inv((unsigned long)pkt_buf, pkt_len - 4); +- +- /* Malloc up new buffer. */ +- skb_new = netdev_alloc_skb_ip_align(dev, KORINA_RBSIZE); +- +- if (!skb_new) +- break; +- /* Do not count the CRC */ +- skb_put(skb, pkt_len - 4); +- skb->protocol = eth_type_trans(skb, dev); +- +- /* Pass the packet to upper layers */ +- netif_receive_skb(skb); +- dev->stats.rx_packets++; +- dev->stats.rx_bytes += pkt_len; +- +- /* Update the mcast stats */ +- if (devcs & ETH_RX_MP) +- dev->stats.multicast++; +- +- lp->rx_skb[lp->rx_next_done] = skb_new; ++ goto next; + } + ++ pkt_len = RCVPKT_LENGTH(devcs); ++ ++ /* must be the (first and) last ++ * descriptor then */ ++ pkt_buf = (u8 *)lp->rx_skb[lp->rx_next_done]->data; ++ ++ /* invalidate the cache */ ++ dma_cache_inv((unsigned long)pkt_buf, pkt_len - 4); ++ ++ /* Malloc up new buffer. */ ++ skb_new = netdev_alloc_skb_ip_align(dev, KORINA_RBSIZE); ++ ++ if (!skb_new) ++ break; ++ /* Do not count the CRC */ ++ skb_put(skb, pkt_len - 4); ++ skb->protocol = eth_type_trans(skb, dev); ++ ++ /* Pass the packet to upper layers */ ++ netif_receive_skb(skb); ++ dev->stats.rx_packets++; ++ dev->stats.rx_bytes += pkt_len; ++ ++ /* Update the mcast stats */ ++ if (devcs & ETH_RX_MP) ++ dev->stats.multicast++; ++ ++ lp->rx_skb[lp->rx_next_done] = skb_new; ++ ++next: + rd->devcs = 0; + + /* Restore descriptor's curr_addr */ diff --git a/target/linux/rb532/patches-4.9/107-use-NAPI_POLL_WEIGHT.patch b/target/linux/rb532/patches-4.9/107-use-NAPI_POLL_WEIGHT.patch new file mode 100644 index 00000000000000..d4af90636fa2b5 --- /dev/null +++ b/target/linux/rb532/patches-4.9/107-use-NAPI_POLL_WEIGHT.patch @@ -0,0 +1,11 @@ +--- a/drivers/net/ethernet/korina.c ++++ b/drivers/net/ethernet/korina.c +@@ -1082,7 +1082,7 @@ static int korina_probe(struct platform_ + dev->netdev_ops = &korina_netdev_ops; + dev->ethtool_ops = &netdev_ethtool_ops; + dev->watchdog_timeo = TX_TIMEOUT; +- netif_napi_add(dev, &lp->napi, korina_poll, 64); ++ netif_napi_add(dev, &lp->napi, korina_poll, NAPI_POLL_WEIGHT); + + lp->phy_addr = (((lp->rx_irq == 0x2c? 1:0) << 8) | 0x05); + lp->mii_if.dev = dev; diff --git a/target/linux/rb532/patches-4.9/108-korina-use-gro.patch b/target/linux/rb532/patches-4.9/108-korina-use-gro.patch new file mode 100644 index 00000000000000..8cbe2a0777ded1 --- /dev/null +++ b/target/linux/rb532/patches-4.9/108-korina-use-gro.patch @@ -0,0 +1,11 @@ +--- a/drivers/net/ethernet/korina.c ++++ b/drivers/net/ethernet/korina.c +@@ -406,7 +406,7 @@ static int korina_rx(struct net_device * + skb->protocol = eth_type_trans(skb, dev); + + /* Pass the packet to upper layers */ +- netif_receive_skb(skb); ++ napi_gro_receive(&lp->napi, skb); + dev->stats.rx_packets++; + dev->stats.rx_bytes += pkt_len; + diff --git a/target/linux/rb532/patches-4.9/109-korina-whitespace-cleanup-2.patch b/target/linux/rb532/patches-4.9/109-korina-whitespace-cleanup-2.patch new file mode 100644 index 00000000000000..0265433951b4e1 --- /dev/null +++ b/target/linux/rb532/patches-4.9/109-korina-whitespace-cleanup-2.patch @@ -0,0 +1,135 @@ +--- a/drivers/net/ethernet/korina.c ++++ b/drivers/net/ethernet/korina.c +@@ -64,9 +64,9 @@ + #include + #include + +-#define DRV_NAME "korina" +-#define DRV_VERSION "0.10" +-#define DRV_RELDATE "04Mar2008" ++#define DRV_NAME "korina" ++#define DRV_VERSION "0.10" ++#define DRV_RELDATE "04Mar2008" + + #define STATION_ADDRESS_HIGH(dev) (((dev)->dev_addr[0] << 8) | \ + ((dev)->dev_addr[1])) +@@ -75,7 +75,7 @@ + ((dev)->dev_addr[4] << 8) | \ + ((dev)->dev_addr[5])) + +-#define MII_CLOCK 1250000 /* no more than 2.5MHz */ ++#define MII_CLOCK 1250000 /* no more than 2.5MHz */ + + /* the following must be powers of two */ + #define KORINA_NUM_RDS 64 /* number of receive descriptors */ +@@ -87,15 +87,19 @@ + #define KORINA_RBSIZE 1536 /* size of one resource buffer = Ether MTU */ + #define KORINA_RDS_MASK (KORINA_NUM_RDS - 1) + #define KORINA_TDS_MASK (KORINA_NUM_TDS - 1) +-#define RD_RING_SIZE (KORINA_NUM_RDS * sizeof(struct dma_desc)) ++#define RD_RING_SIZE (KORINA_NUM_RDS * sizeof(struct dma_desc)) + #define TD_RING_SIZE (KORINA_NUM_TDS * sizeof(struct dma_desc)) + +-#define TX_TIMEOUT (6000 * HZ / 1000) ++#define TX_TIMEOUT (6000 * HZ / 1000) + +-enum chain_status { desc_filled, desc_empty }; +-#define IS_DMA_FINISHED(X) (((X) & (DMA_DESC_FINI)) != 0) +-#define IS_DMA_DONE(X) (((X) & (DMA_DESC_DONE)) != 0) +-#define RCVPKT_LENGTH(X) (((X) & ETH_RX_LEN) >> ETH_RX_LEN_BIT) ++enum chain_status { ++ desc_filled, ++ desc_empty ++}; ++ ++#define IS_DMA_FINISHED(X) (((X) & (DMA_DESC_FINI)) != 0) ++#define IS_DMA_DONE(X) (((X) & (DMA_DESC_DONE)) != 0) ++#define RCVPKT_LENGTH(X) (((X) & ETH_RX_LEN) >> ETH_RX_LEN_BIT) + + /* Information that need to be kept for each board. */ + struct korina_private { +@@ -123,7 +127,7 @@ struct korina_private { + int rx_irq; + int tx_irq; + +- spinlock_t lock; /* NIC xmit lock */ ++ spinlock_t lock; /* NIC xmit lock */ + + int dma_halt_cnt; + int dma_run_cnt; +@@ -146,17 +150,17 @@ static inline void korina_start_dma(stru + static inline void korina_abort_dma(struct net_device *dev, + struct dma_reg *ch) + { +- if (readl(&ch->dmac) & DMA_CHAN_RUN_BIT) { +- writel(0x10, &ch->dmac); ++ if (readl(&ch->dmac) & DMA_CHAN_RUN_BIT) { ++ writel(0x10, &ch->dmac); + +- while (!(readl(&ch->dmas) & DMA_STAT_HALT)) +- netif_trans_update(dev); ++ while (!(readl(&ch->dmas) & DMA_STAT_HALT)) ++ netif_trans_update(dev); + +- writel(0, &ch->dmas); +- } ++ writel(0, &ch->dmas); ++ } + +- writel(0, &ch->dmadptr); +- writel(0, &ch->dmandptr); ++ writel(0, &ch->dmadptr); ++ writel(0, &ch->dmandptr); + } + + static inline void korina_chain_dma(struct dma_reg *ch, u32 dma_addr) +@@ -685,7 +689,7 @@ static int korina_ioctl(struct net_devic + + /* ethtool helpers */ + static void netdev_get_drvinfo(struct net_device *dev, +- struct ethtool_drvinfo *info) ++ struct ethtool_drvinfo *info) + { + struct korina_private *lp = netdev_priv(dev); + +@@ -727,10 +731,10 @@ static u32 netdev_get_link(struct net_de + } + + static const struct ethtool_ops netdev_ethtool_ops = { +- .get_drvinfo = netdev_get_drvinfo, +- .get_settings = netdev_get_settings, +- .set_settings = netdev_set_settings, +- .get_link = netdev_get_link, ++ .get_drvinfo = netdev_get_drvinfo, ++ .get_settings = netdev_get_settings, ++ .set_settings = netdev_set_settings, ++ .get_link = netdev_get_link, + }; + + static int korina_alloc_ring(struct net_device *dev) +@@ -862,7 +866,7 @@ static int korina_init(struct net_device + /* Management Clock Prescaler Divisor + * Clock independent setting */ + writel(((idt_cpu_freq) / MII_CLOCK + 1) & ~1, +- &lp->eth_regs->ethmcp); ++ &lp->eth_regs->ethmcp); + + /* don't transmit until fifo contains 48b */ + writel(48, &lp->eth_regs->ethfifott); +@@ -945,14 +949,14 @@ static int korina_open(struct net_device + 0, "Korina ethernet Rx", dev); + if (ret < 0) { + printk(KERN_ERR "%s: unable to get Rx DMA IRQ %d\n", +- dev->name, lp->rx_irq); ++ dev->name, lp->rx_irq); + goto err_release; + } + ret = request_irq(lp->tx_irq, korina_tx_dma_interrupt, + 0, "Korina ethernet Tx", dev); + if (ret < 0) { + printk(KERN_ERR "%s: unable to get Tx DMA IRQ %d\n", +- dev->name, lp->tx_irq); ++ dev->name, lp->tx_irq); + goto err_free_rx_irq; + } + diff --git a/target/linux/rb532/patches-4.9/110-korina-update-authors.patch b/target/linux/rb532/patches-4.9/110-korina-update-authors.patch new file mode 100644 index 00000000000000..843397cf37d073 --- /dev/null +++ b/target/linux/rb532/patches-4.9/110-korina-update-authors.patch @@ -0,0 +1,17 @@ +--- a/drivers/net/ethernet/korina.c ++++ b/drivers/net/ethernet/korina.c +@@ -4,6 +4,7 @@ + * Copyright 2004 IDT Inc. (rischelp@idt.com) + * Copyright 2006 Felix Fietkau + * Copyright 2008 Florian Fainelli ++ * Copyright 2017 Roman Yeryomin + * + * 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 +@@ -1150,5 +1151,6 @@ module_platform_driver(korina_driver); + MODULE_AUTHOR("Philip Rischel "); + MODULE_AUTHOR("Felix Fietkau "); + MODULE_AUTHOR("Florian Fainelli "); ++MODULE_AUTHOR("Roman Yeryomin "); + MODULE_DESCRIPTION("IDT RC32434 (Korina) Ethernet driver"); + MODULE_LICENSE("GPL"); diff --git a/target/linux/rb532/patches-4.9/111-korina-version-bump.patch b/target/linux/rb532/patches-4.9/111-korina-version-bump.patch new file mode 100644 index 00000000000000..1501e174b15e1e --- /dev/null +++ b/target/linux/rb532/patches-4.9/111-korina-version-bump.patch @@ -0,0 +1,13 @@ +--- a/drivers/net/ethernet/korina.c ++++ b/drivers/net/ethernet/korina.c +@@ -66,8 +66,8 @@ + #include + + #define DRV_NAME "korina" +-#define DRV_VERSION "0.10" +-#define DRV_RELDATE "04Mar2008" ++#define DRV_VERSION "0.20" ++#define DRV_RELDATE "15Sep2017" + + #define STATION_ADDRESS_HIGH(dev) (((dev)->dev_addr[0] << 8) | \ + ((dev)->dev_addr[1])) diff --git a/target/linux/sunxi/base-files/lib/firmware/brcm/brcmfmac43430-sdio.txt b/target/linux/sunxi/base-files/lib/firmware/brcm/brcmfmac43430-sdio.txt new file mode 100644 index 00000000000000..9baa5c33bf26f3 --- /dev/null +++ b/target/linux/sunxi/base-files/lib/firmware/brcm/brcmfmac43430-sdio.txt @@ -0,0 +1,53 @@ +#AP6212_NVRAM_V1.0_20140603 +# 2.4 GHz, 20 MHz BW mode + +# The following parameter values are just placeholders, need to be updated. +manfid=0x2d0 +prodid=0x0726 +vendid=0x14e4 +devid=0x43e2 +boardtype=0x0726 +boardrev=0x1101 +boardnum=22 +macaddr=00:90:4c:c5:12:38 +sromrev=11 +boardflags=0x00404201 +xtalfreq=26000 +nocrc=1 +ag0=255 +aa2g=1 +ccode=ALL + +pa0itssit=0x20 +extpagain2g=0 + +#PA parameters for 2.4GHz, measured at CHIP OUTPUT +pa2ga0=-168,7161,-820 +AvVmid_c0=0x0,0xc8 +cckpwroffset0=5 + +# PPR params +maxp2ga0=90 +txpwrbckof=6 +cckbw202gpo=0x5555 +legofdmbw202gpo=0x77777777 +mcsbw202gpo=0xaaaaaaaa + +# OFDM IIR : +ofdmdigfilttype=7 +# PAPD mode: +papdmode=2 + +il0macaddr=00:90:4c:c5:12:38 +wl0id=0x431b + +#OOB parameters +hostwake=0x40 +hostrdy=0x41 +usbrdy=0x03 +usbrdydelay=100 +deadman_to=0xffffffff +# muxenab: 0x1 for UART enable, 0x10 for Host awake +muxenab=0x10 +# CLDO PWM voltage settings - 0x4 - 1.1 volt +#cldo_pwm=0x4 diff --git a/target/linux/sunxi/config-4.4 b/target/linux/sunxi/config-4.4 deleted file mode 100644 index 907fc509691140..00000000000000 --- a/target/linux/sunxi/config-4.4 +++ /dev/null @@ -1,549 +0,0 @@ -CONFIG_ADVISE_SYSCALLS=y -# CONFIG_AHCI_SUNXI is not set -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_APM_EMULATION is not set -# CONFIG_ARCH_AXXIA is not set -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -CONFIG_ARCH_HAS_ELF_RANDOMIZE=y -CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y -CONFIG_ARCH_HAS_RESET_CONTROLLER=y -CONFIG_ARCH_HAS_SG_CHAIN=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y -CONFIG_ARCH_MULTIPLATFORM=y -# CONFIG_ARCH_MULTI_CPU_AUTO is not set -CONFIG_ARCH_MULTI_V6_V7=y -CONFIG_ARCH_MULTI_V7=y -CONFIG_ARCH_NR_GPIO=416 -CONFIG_ARCH_PHYS_ADDR_T_64BIT=y -CONFIG_ARCH_REQUIRE_GPIOLIB=y -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -CONFIG_ARCH_SUNXI=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_ARCH_SUPPORTS_UPROBES=y -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARCH_USE_BUILTIN_BSWAP=y -CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y -CONFIG_ARCH_WANT_GENERAL_HUGETLB=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y -CONFIG_ARM=y -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ARCH_TIMER=y -CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set -CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARM_ERRATA_643719=y -CONFIG_ARM_GIC=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_ARM_HEAVY_MB=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_LPAE=y -CONFIG_ARM_PATCH_PHYS_VIRT=y -CONFIG_ARM_PMU=y -CONFIG_ARM_PSCI=y -CONFIG_ARM_PSCI_FW=y -CONFIG_ARM_THUMB=y -# CONFIG_ARM_THUMBEE is not set -CONFIG_ARM_UNWIND=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_ATA=y -CONFIG_ATAGS=y -# CONFIG_ATA_SFF is not set -CONFIG_AUDIT=y -# CONFIG_AUDITSYSCALL is not set -CONFIG_AUDIT_GENERIC=y -CONFIG_AUTO_ZRELADDR=y -CONFIG_AXP20X_POWER=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_PWM=y -CONFIG_BINFMT_MISC=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BOUNCE=y -# CONFIG_BPF_SYSCALL is not set -CONFIG_CACHE_L2X0=y -CONFIG_CAN=y -CONFIG_CLKDEV_LOOKUP=y -CONFIG_CLKSRC_MMIO=y -CONFIG_CLKSRC_OF=y -CONFIG_CLKSRC_PROBE=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_COMMON_CLK=y -CONFIG_COMPACTION=y -CONFIG_CONFIGFS_FS=y -CONFIG_CONNECTOR=y -CONFIG_CONSOLE_TRANSLATIONS=y -CONFIG_COREDUMP=y -CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y -CONFIG_CPUFREQ_DT=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -# CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_HAS_ASID=y -# CONFIG_CPU_ICACHE_DISABLE is not set -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_PM=y -CONFIG_CPU_RMAP=y -CONFIG_CPU_THERMAL=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_V7=y -CONFIG_CRC16=y -CONFIG_CRC_T10DIF=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_CRCT10DIF=y -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_DEV_SUN4I_SS=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_HW=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_NULL2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_WORKQUEUE=y -CONFIG_DCACHE_WORD_ACCESS=y -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_DEBUG_MEMORY_INIT=y -# CONFIG_DEBUG_UART_8250 is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_DMADEVICES=y -CONFIG_DMA_ENGINE=y -CONFIG_DMA_OF=y -CONFIG_DMA_SUN4I=y -CONFIG_DMA_SUN6I=y -CONFIG_DMA_VIRTUAL_CHANNELS=y -CONFIG_DNOTIFY=y -CONFIG_DTC=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_DWMAC_GENERIC=y -CONFIG_DWMAC_SUNXI=y -CONFIG_DYNAMIC_DEBUG=y -CONFIG_EDAC_ATOMIC_SCRUB=y -CONFIG_EDAC_SUPPORT=y -CONFIG_ELF_CORE=y -# CONFIG_EMBEDDED is not set -CONFIG_ENABLE_MUST_CHECK=y -# CONFIG_ENABLE_WARN_DEPRECATED is not set -CONFIG_EXT4_FS=y -CONFIG_EXTCON=y -# CONFIG_F2FS_CHECK_FS is not set -CONFIG_F2FS_FS=y -# CONFIG_F2FS_FS_SECURITY is not set -CONFIG_F2FS_FS_XATTR=y -CONFIG_F2FS_STAT_FS=y -CONFIG_FAT_FS=y -CONFIG_FB=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_IMAGEBLIT=y -CONFIG_FB_CMDLINE=y -CONFIG_FB_FOREIGN_ENDIAN=y -CONFIG_FB_LITTLE_ENDIAN=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_SIMPLE=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FIX_EARLYCON_MEM=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x16=y -CONFIG_FONT_8x8=y -CONFIG_FONT_SUPPORT=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -CONFIG_FRAME_WARN=2048 -CONFIG_FREEZER=y -CONFIG_FS_MBCACHE=y -CONFIG_FS_POSIX_ACL=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_GENERIC_BUG=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_GENERIC_IO=y -CONFIG_GENERIC_IRQ_CHIP=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_GENERIC_IRQ_SHOW_LEVEL=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_PHY=y -CONFIG_GENERIC_PINCONF=y -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GLOB=y -CONFIG_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIO_SYSFS=y -CONFIG_HANDLE_DOMAIN_IRQ=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_HAS_DMA=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT_MAP=y -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_ARCH_AUDITSYSCALL=y -CONFIG_HAVE_ARCH_BITREVERSE=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_HAVE_ARCH_KGDB=y -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y -CONFIG_HAVE_ARM_ARCH_TIMER=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_HAVE_BPF_JIT=y -CONFIG_HAVE_CC_STACKPROTECTOR=y -CONFIG_HAVE_CLK=y -CONFIG_HAVE_CLK_PREPARE=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_HAVE_DEBUG_KMEMLEAK=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_DMA_ATTRS=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_HAVE_GENERIC_RCU_GUP=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL=y -CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y -CONFIG_HAVE_KVM_EVENTFD=y -CONFIG_HAVE_KVM_IRQFD=y -CONFIG_HAVE_MEMBLOCK=y -CONFIG_HAVE_MOD_ARCH_SPECIFIC=y -CONFIG_HAVE_NET_DSA=y -CONFIG_HAVE_OPROFILE=y -CONFIG_HAVE_OPTPROBES=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_HAVE_PERF_REGS=y -CONFIG_HAVE_PERF_USER_STACK_DUMP=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_HAVE_RCU_TABLE_FREE=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_SMP=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_UID16=y -CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y -CONFIG_HIGHMEM=y -CONFIG_HIGHPTE=y -CONFIG_HOTPLUG_CPU=y -# CONFIG_HUGETLBFS is not set -CONFIG_HWMON=y -CONFIG_HW_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_TIMERIOMEM=y -CONFIG_HZ_FIXED=0 -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_COMPAT=y -CONFIG_I2C_HELPER_AUTO=y -CONFIG_I2C_MV64XXX=y -CONFIG_I2C_SUN6I_P2WI=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_INPUT=y -CONFIG_INPUT_AXP20X_PEK=y -CONFIG_INPUT_KEYBOARD=y -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_IOMMU_HELPER=y -CONFIG_IOSCHED_CFQ=y -CONFIG_IRQCHIP=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_HIERARCHY=y -CONFIG_IRQ_FORCED_THREADING=y -CONFIG_IRQ_WORK=y -CONFIG_JBD2=y -CONFIG_KALLSYMS=y -# CONFIG_KERNEL_MODE_NEON is not set -CONFIG_KEYBOARD_SUN4I_LRADC=y -CONFIG_KSM=y -CONFIG_KVM=y -CONFIG_KVM_ARM_HOST=y -CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y -CONFIG_KVM_MMIO=y -CONFIG_KVM_VFIO=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_PLATFORM=y -CONFIG_LEDS_GPIO=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -CONFIG_LIBFDT=y -CONFIG_LOCK_SPIN_ON_OWNER=y -CONFIG_LOGO=y -CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_LOGO_LINUX_MONO=y -CONFIG_LOGO_LINUX_VGA16=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -CONFIG_MACH_SUN4I=y -CONFIG_MACH_SUN5I=y -CONFIG_MACH_SUN6I=y -CONFIG_MACH_SUN7I=y -CONFIG_MACH_SUN8I=y -CONFIG_MACH_SUN9I=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_MDIO_BOARDINFO=y -CONFIG_MDIO_SUN4I=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_MFD_AXP20X=y -CONFIG_MFD_CORE=y -CONFIG_MFD_SUN6I_PRCM=y -CONFIG_MFD_SYSCON=y -CONFIG_MIGHT_HAVE_CACHE_L2X0=y -CONFIG_MIGHT_HAVE_PCI=y -CONFIG_MIGRATION=y -CONFIG_MMC=y -CONFIG_MMC_BLOCK=y -# CONFIG_MMC_BLOCK_BOUNCE is not set -CONFIG_MMC_SUNXI=y -CONFIG_MMU_NOTIFIER=y -CONFIG_MODULES_TREE_LOOKUP=y -CONFIG_MODULES_USE_ELF_REL=y -# CONFIG_MTD is not set -CONFIG_MULTI_IRQ_HANDLER=y -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_NEON=y -CONFIG_NET_FLOW_LIMIT=y -CONFIG_NET_PTP_CLASSIFY=y -CONFIG_NET_VENDOR_ALLWINNER=y -CONFIG_NLS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NO_BOOTMEM=y -CONFIG_NO_HZ=y -CONFIG_NO_HZ_COMMON=y -CONFIG_NO_HZ_IDLE=y -CONFIG_NR_CPUS=8 -CONFIG_NVMEM=y -CONFIG_NVMEM_SUNXI_SID=y -CONFIG_OF=y -CONFIG_OF_ADDRESS=y -CONFIG_OF_EARLY_FLATTREE=y -CONFIG_OF_FLATTREE=y -CONFIG_OF_GPIO=y -CONFIG_OF_IRQ=y -CONFIG_OF_MDIO=y -CONFIG_OF_NET=y -CONFIG_OF_RESERVED_MEM=y -CONFIG_OLD_SIGACTION=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OUTER_CACHE=y -CONFIG_OUTER_CACHE_SYNC=y -CONFIG_PADATA=y -CONFIG_PAGE_OFFSET=0xC0000000 -# CONFIG_PARTITION_ADVANCED is not set -# CONFIG_PCI is not set -# CONFIG_PCI_DOMAINS_GENERIC is not set -# CONFIG_PCI_SYSCALL is not set -CONFIG_PERF_EVENTS=y -CONFIG_PERF_USE_VMALLOC=y -CONFIG_PGTABLE_LEVELS=3 -CONFIG_PHYLIB=y -CONFIG_PHYS_ADDR_T_64BIT=y -CONFIG_PHY_SUN4I_USB=y -CONFIG_PHY_SUN9I_USB=y -CONFIG_PINCTRL=y -# CONFIG_PINCTRL_SINGLE is not set -CONFIG_PINCTRL_SUN4I_A10=y -CONFIG_PINCTRL_SUN5I_A10S=y -CONFIG_PINCTRL_SUN5I_A13=y -CONFIG_PINCTRL_SUN6I_A31=y -CONFIG_PINCTRL_SUN6I_A31S=y -CONFIG_PINCTRL_SUN6I_A31_R=y -CONFIG_PINCTRL_SUN7I_A20=y -CONFIG_PINCTRL_SUN8I_A23=y -CONFIG_PINCTRL_SUN8I_A23_R=y -CONFIG_PINCTRL_SUN8I_A33=y -CONFIG_PINCTRL_SUN8I_A83T=y -CONFIG_PINCTRL_SUN8I_H3=y -CONFIG_PINCTRL_SUN9I_A80=y -CONFIG_PINCTRL_SUNXI_COMMON=y -# CONFIG_PL310_ERRATA_588369 is not set -# CONFIG_PL310_ERRATA_727915 is not set -# CONFIG_PL310_ERRATA_753970 is not set -# CONFIG_PL310_ERRATA_769419 is not set -CONFIG_PM=y -CONFIG_PM_CLK=y -# CONFIG_PM_DEBUG is not set -CONFIG_PM_OPP=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_POWER_RESET=y -CONFIG_POWER_SUPPLY=y -CONFIG_PPS=y -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -# CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_NOTIFIERS=y -CONFIG_PREEMPT_RCU=y -CONFIG_PRINTK_TIME=y -CONFIG_PROC_EVENTS=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_PTP_1588_CLOCK=y -CONFIG_PWM=y -CONFIG_PWM_SUN4I=y -CONFIG_PWM_SYSFS=y -CONFIG_RATIONAL=y -# CONFIG_RCU_BOOST is not set -CONFIG_RCU_STALL_COMMON=y -CONFIG_REGMAP=y -CONFIG_REGMAP_I2C=y -CONFIG_REGMAP_IRQ=y -CONFIG_REGMAP_MMIO=y -CONFIG_REGMAP_SPI=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_AXP20X=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_GPIO=y -CONFIG_RELAY=y -CONFIG_RESET_CONTROLLER=y -CONFIG_RFS_ACCEL=y -CONFIG_RPS=y -CONFIG_RTC_CLASS=y -# CONFIG_RTC_DRV_SUNXI is not set -CONFIG_RWSEM_SPIN_ON_OWNER=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_SATA_PMP=y -# CONFIG_SCHED_INFO is not set -CONFIG_SCSI=y -CONFIG_SDIO_UART=y -CONFIG_SECURITYFS=y -CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y -CONFIG_SERIAL_8250_DW=y -CONFIG_SERIAL_8250_FSL=y -CONFIG_SERIAL_8250_NR_UARTS=8 -CONFIG_SERIAL_8250_RUNTIME_UARTS=8 -CONFIG_SERIAL_OF_PLATFORM=y -CONFIG_SERIO=y -CONFIG_SERIO_SERPORT=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_SND=y -CONFIG_SND_COMPRESS_OFFLOAD=y -CONFIG_SND_JACK=y -CONFIG_SND_PCM=y -CONFIG_SND_SOC=y -CONFIG_SND_SOC_I2C_AND_SPI=y -# CONFIG_SND_USB is not set -CONFIG_SOUND=y -CONFIG_SPARSE_IRQ=y -CONFIG_SPI=y -CONFIG_SPI_MASTER=y -CONFIG_SPI_SUN4I=y -CONFIG_SPI_SUN6I=y -CONFIG_SRCU=y -# CONFIG_STAGING is not set -CONFIG_STMMAC_ETH=y -CONFIG_STMMAC_PLATFORM=y -CONFIG_STRICT_DEVMEM=y -# CONFIG_SUN4I_EMAC is not set -CONFIG_SUN4I_TIMER=y -CONFIG_SUN5I_HSTIMER=y -CONFIG_SUNXI_RSB=y -CONFIG_SUNXI_SRAM=y -CONFIG_SUNXI_WATCHDOG=y -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_SWCONFIG=y -CONFIG_SWCONFIG_B53=y -# CONFIG_SWCONFIG_B53_MMAP_DRIVER is not set -CONFIG_SWCONFIG_B53_PHY_DRIVER=y -CONFIG_SWCONFIG_B53_PHY_FIXUP=y -# CONFIG_SWCONFIG_B53_SRAB_DRIVER is not set -CONFIG_SWIOTLB=y -CONFIG_SWP_EMULATE=y -CONFIG_SYSFS_SYSCALL=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_SYS_SUPPORTS_HUGETLBFS=y -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y -CONFIG_THERMAL_GOV_STEP_WISE=y -CONFIG_THERMAL_HWMON=y -CONFIG_THERMAL_OF=y -# CONFIG_THUMB2_KERNEL is not set -CONFIG_TICK_CPU_ACCOUNTING=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TOUCHSCREEN_PROPERTIES=y -CONFIG_TOUCHSCREEN_SUN4I=y -CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_USB=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -# CONFIG_USB_AUDIO is not set -CONFIG_USB_COMMON=y -CONFIG_USB_DWC2=y -CONFIG_USB_DWC2_HOST=y -# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_HCD_PLATFORM=y -# CONFIG_USB_ETH is not set -CONFIG_USB_GADGET=y -CONFIG_USB_NET_DRIVERS=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_OHCI_HCD_PLATFORM=y -CONFIG_USB_STORAGE=y -CONFIG_USB_SUPPORT=y -CONFIG_USERIO=y -CONFIG_USE_OF=y -CONFIG_VDSO=y -CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_VFAT_FS=y -CONFIG_VFP=y -CONFIG_VFPv3=y -CONFIG_VHOST=y -CONFIG_VHOST_NET=y -CONFIG_VHOST_RING=y -CONFIG_VIRTUALIZATION=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_VT_CONSOLE_SLEEP=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_WATCHDOG_CORE=y -# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set -CONFIG_XPS=y -CONFIG_XZ_DEC_ARM=y -CONFIG_XZ_DEC_BCJ=y -CONFIG_ZBOOT_ROM_BSS=0 -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZONE_DMA_FLAG=0 diff --git a/target/linux/sunxi/cortexa53/config-default b/target/linux/sunxi/cortexa53/config-default index 527a6f69797547..bb94574da7ffd0 100644 --- a/target/linux/sunxi/cortexa53/config-default +++ b/target/linux/sunxi/cortexa53/config-default @@ -61,7 +61,6 @@ CONFIG_HAVE_KVM_MSI=y CONFIG_HAVE_MEMORY_PRESENT=y CONFIG_HAVE_PATA_PLATFORM=y CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 -# CONFIG_KASAN is not set CONFIG_KERNEL_MODE_NEON=y CONFIG_KVM_ARM_PMU=y CONFIG_KVM_ARM_VGIC_V3_ITS=y diff --git a/target/linux/sunxi/image/cortex-a7.mk b/target/linux/sunxi/image/cortex-a7.mk index d0b7aa04b606f5..229b055e688b1f 100644 --- a/target/linux/sunxi/image/cortex-a7.mk +++ b/target/linux/sunxi/image/cortex-a7.mk @@ -118,6 +118,18 @@ endef TARGET_DEVICES += sun8i-h2-plus-orangepi-r1 +define Device/sun8i-h3-nanopi-m1-plus + DEVICE_TITLE:=FriendlyArm NanoPi M1 Plus + DEVICE_PACKAGES:=kmod-rtc-sunxi \ + kmod-leds-gpio kmod-ledtrig-heartbeat \ + kmod-brcmfmac brcmfmac-firmware-43430-sdio wpad-mini + SUPPORTED_DEVICES:=friendlyarm,nanopi-m1-plus + SUNXI_DTS:=sun8i-h3-nanopi-m1-plus +endef + +TARGET_DEVICES += sun8i-h3-nanopi-m1-plus + + define Device/sun8i-h3-nanopi-neo DEVICE_TITLE:=FriendlyARM NanoPi NEO SUPPORTED_DEVICES:=friendlyarm,nanopi-neo @@ -136,6 +148,15 @@ endef TARGET_DEVICES += sun8i-h3-orangepi-plus +define Device/sun8i-h3-orangepi-2 + DEVICE_TITLE:=Xunlong Orange Pi 2 + DEVICE_PACKAGES:=kmod-rtc-sunxi + SUPPORTED_DEVICES:=xunlong,orangepi-2 + SUNXI_DTS:=sun8i-h3-orangepi-2 +endef + +TARGET_DEVICES += sun8i-h3-orangepi-2 + define Device/sun7i-a20-pcduino3 DEVICE_TITLE:=LinkSprite pcDuino3 diff --git a/target/linux/sunxi/image/cortex-a8.mk b/target/linux/sunxi/image/cortex-a8.mk index 97e033dbb3c451..564a66f93861f7 100644 --- a/target/linux/sunxi/image/cortex-a8.mk +++ b/target/linux/sunxi/image/cortex-a8.mk @@ -56,4 +56,14 @@ endef TARGET_DEVICES += sun4i-a10-pcduino + +define Device/sun4i-a10-marsboard + DEVICE_TITLE:=HAOYU Electronics Marsboard A10 + DEVICE_PACKAGES:=mod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi sound-soc-sunxi + SUPPORTED_DEVICES:=marsboard,a10-marsboard + SUNXI_DTS:=sun4i-a10-marsboard +endef + +TARGET_DEVICES += sun4i-a10-marsboard + endif diff --git a/target/linux/sunxi/patches-4.4/100-clk-sunxi-add-dram-gates-support.patch b/target/linux/sunxi/patches-4.4/100-clk-sunxi-add-dram-gates-support.patch deleted file mode 100644 index a94e9b87783053..00000000000000 --- a/target/linux/sunxi/patches-4.4/100-clk-sunxi-add-dram-gates-support.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 6d3a47c29186aa8d26ff05a6209c94291ace0696 Mon Sep 17 00:00:00 2001 -From: Chen-Yu Tsai -Date: Sat, 5 Dec 2015 21:16:42 +0800 -Subject: [PATCH] clk: sunxi: Add DRAM gates support for sun4i-a10 - -The A10/A20 share the same set of DRAM clock gates, which controls -direct memory access for some peripherals. - -On the A10, bit 15 controls the system's DRAM clock output (possibly -to the DRAM chips), which we need to keep on. - -On the A20 this has been moved to the DRAM controller, becoming a no-op. -However it is still listed in the user manual, so add it anyway. - -Signed-off-by: Chen-Yu Tsai -Signed-off-by: Maxime Ripard ---- - Documentation/devicetree/bindings/clock/sunxi.txt | 1 + - drivers/clk/sunxi/clk-simple-gates.c | 12 ++++++++++++ - 2 files changed, 13 insertions(+) - ---- a/drivers/clk/sunxi/clk-simple-gates.c -+++ b/drivers/clk/sunxi/clk-simple-gates.c -@@ -160,3 +160,15 @@ CLK_OF_DECLARE(sun5i_a13_ahb, "allwinner - sun4i_a10_ahb_init); - CLK_OF_DECLARE(sun7i_a20_ahb, "allwinner,sun7i-a20-ahb-gates-clk", - sun4i_a10_ahb_init); -+ -+static const int sun4i_a10_dram_critical_clocks[] __initconst = { -+ 15, /* dram_output */ -+}; -+ -+static void __init sun4i_a10_dram_init(struct device_node *node) -+{ -+ sunxi_simple_gates_setup(node, sun4i_a10_dram_critical_clocks, -+ ARRAY_SIZE(sun4i_a10_dram_critical_clocks)); -+} -+CLK_OF_DECLARE(sun4i_a10_dram, "allwinner,sun4i-a10-dram-gates-clk", -+ sun4i_a10_dram_init); diff --git a/target/linux/sunxi/patches-4.4/101-dt-sun4i-add-dram-gates.patch b/target/linux/sunxi/patches-4.4/101-dt-sun4i-add-dram-gates.patch deleted file mode 100644 index e21eca4e1f66b6..00000000000000 --- a/target/linux/sunxi/patches-4.4/101-dt-sun4i-add-dram-gates.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 82f8582feef4c048ee7ef0155a71c23614a7856d Mon Sep 17 00:00:00 2001 -From: Chen-Yu Tsai -Date: Sat, 5 Dec 2015 21:16:44 +0800 -Subject: [PATCH] ARM: dts: sun4i: Add DRAM gates - -The DRAM gates controls direct memory access for some peripherals. -These peripherals include the display pipeline, so add the required -gates to the simplefb nodes as well. - -Signed-off-by: Chen-Yu Tsai -Signed-off-by: Maxime Ripard ---- - arch/arm/boot/dts/sun4i-a10.dtsi | 36 ++++++++++++++++++++++++++++++++---- - 1 file changed, 32 insertions(+), 4 deletions(-) - ---- a/arch/arm/boot/dts/sun4i-a10.dtsi -+++ b/arch/arm/boot/dts/sun4i-a10.dtsi -@@ -66,7 +66,7 @@ - "simple-framebuffer"; - allwinner,pipeline = "de_be0-lcd0-hdmi"; - clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>, -- <&ahb_gates 44>; -+ <&ahb_gates 44>, <&dram_gates 26>; - status = "disabled"; - }; - -@@ -75,7 +75,8 @@ - "simple-framebuffer"; - allwinner,pipeline = "de_fe0-de_be0-lcd0-hdmi"; - clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>, -- <&ahb_gates 44>, <&ahb_gates 46>; -+ <&ahb_gates 44>, <&ahb_gates 46>, -+ <&dram_gates 25>, <&dram_gates 26>; - status = "disabled"; - }; - -@@ -84,7 +85,8 @@ - "simple-framebuffer"; - allwinner,pipeline = "de_fe0-de_be0-lcd0"; - clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>, -- <&ahb_gates 46>; -+ <&ahb_gates 46>, <&dram_gates 25>, -+ <&dram_gates 26>; - status = "disabled"; - }; - -@@ -93,7 +95,8 @@ - "simple-framebuffer"; - allwinner,pipeline = "de_fe0-de_be0-lcd0-tve0"; - clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>, -- <&ahb_gates 44>, <&ahb_gates 46>; -+ <&ahb_gates 44>, <&ahb_gates 46>, -+ <&dram_gates 25>, <&dram_gates 26>; - status = "disabled"; - }; - }; -@@ -492,6 +495,31 @@ - clock-output-names = "spi3"; - }; - -+ dram_gates: clk@01c20100 { -+ #clock-cells = <1>; -+ compatible = "allwinner,sun4i-a10-dram-gates-clk"; -+ reg = <0x01c20100 0x4>; -+ clocks = <&pll5 0>; -+ clock-indices = <0>, -+ <1>, <2>, -+ <3>, -+ <4>, -+ <5>, <6>, -+ <15>, -+ <24>, <25>, -+ <26>, <27>, -+ <28>, <29>; -+ clock-output-names = "dram_ve", -+ "dram_csi0", "dram_csi1", -+ "dram_ts", -+ "dram_tvd", -+ "dram_tve0", "dram_tve1", -+ "dram_output", -+ "dram_de_fe1", "dram_de_fe0", -+ "dram_de_be0", "dram_de_be1", -+ "dram_de_mp", "dram_ace"; -+ }; -+ - codec_clk: clk@01c20140 { - #clock-cells = <0>; - compatible = "allwinner,sun4i-a10-codec-clk"; diff --git a/target/linux/sunxi/patches-4.4/102-dt-sun7i-add-dram-gates.patch b/target/linux/sunxi/patches-4.4/102-dt-sun7i-add-dram-gates.patch deleted file mode 100644 index 397269076cd85e..00000000000000 --- a/target/linux/sunxi/patches-4.4/102-dt-sun7i-add-dram-gates.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 0b4bf5a5200b9ac5ddf545665f171feb5594677d Mon Sep 17 00:00:00 2001 -From: Chen-Yu Tsai -Date: Sat, 5 Dec 2015 21:16:46 +0800 -Subject: [PATCH] ARM: dts: sun7i: Add DRAM gates - -The DRAM gates controls direct memory access for some peripherals. -These peripherals include the display pipeline, so add the required -gates to the simplefb nodes as well. - -Signed-off-by: Chen-Yu Tsai -Signed-off-by: Maxime Ripard ---- - arch/arm/boot/dts/sun7i-a20.dtsi | 32 +++++++++++++++++++++++++++++--- - 1 file changed, 29 insertions(+), 3 deletions(-) - ---- a/arch/arm/boot/dts/sun7i-a20.dtsi -+++ b/arch/arm/boot/dts/sun7i-a20.dtsi -@@ -68,7 +68,7 @@ - "simple-framebuffer"; - allwinner,pipeline = "de_be0-lcd0-hdmi"; - clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>, -- <&ahb_gates 44>; -+ <&ahb_gates 44>, <&dram_gates 26>; - status = "disabled"; - }; - -@@ -76,7 +76,8 @@ - compatible = "allwinner,simple-framebuffer", - "simple-framebuffer"; - allwinner,pipeline = "de_be0-lcd0"; -- clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>; -+ clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>, -+ <&dram_gates 26>; - status = "disabled"; - }; - -@@ -85,7 +86,7 @@ - "simple-framebuffer"; - allwinner,pipeline = "de_be0-lcd0-tve0"; - clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>, -- <&ahb_gates 44>; -+ <&ahb_gates 44>, <&dram_gates 26>; - status = "disabled"; - }; - }; -@@ -501,6 +502,31 @@ - clock-output-names = "spi3"; - }; - -+ dram_gates: clk@01c20100 { -+ #clock-cells = <1>; -+ compatible = "allwinner,sun4i-a10-dram-gates-clk"; -+ reg = <0x01c20100 0x4>; -+ clocks = <&pll5 0>; -+ clock-indices = <0>, -+ <1>, <2>, -+ <3>, -+ <4>, -+ <5>, <6>, -+ <15>, -+ <24>, <25>, -+ <26>, <27>, -+ <28>, <29>; -+ clock-output-names = "dram_ve", -+ "dram_csi0", "dram_csi1", -+ "dram_ts", -+ "dram_tvd", -+ "dram_tve0", "dram_tve1", -+ "dram_output", -+ "dram_de_fe1", "dram_de_fe0", -+ "dram_de_be0", "dram_de_be1", -+ "dram_de_mp", "dram_ace"; -+ }; -+ - codec_clk: clk@01c20140 { - #clock-cells = <0>; - compatible = "allwinner,sun4i-a10-codec-clk"; diff --git a/target/linux/sunxi/patches-4.4/103-clk-sunxi-add-h3-clksupport.patch b/target/linux/sunxi/patches-4.4/103-clk-sunxi-add-h3-clksupport.patch deleted file mode 100644 index 8bc66274c373d4..00000000000000 --- a/target/linux/sunxi/patches-4.4/103-clk-sunxi-add-h3-clksupport.patch +++ /dev/null @@ -1,180 +0,0 @@ -From ab6e23a4e388f5f2696b8e92c350f845142da118 Mon Sep 17 00:00:00 2001 -From: Jens Kuske -Date: Fri, 4 Dec 2015 22:24:40 +0100 -Subject: [PATCH] clk: sunxi: Add H3 clocks support - -The H3 clock control unit is similar to the those of other sun8i family -members like the A23. - -It adds a new bus gates clock similar to the simple gates, but with a -different parent clock for each single gate. -Some of the gates use the new AHB2 clock as parent, whose clock source -is muxable between AHB1 and PLL6/2. The documentation isn't totally clear -about which devices belong to AHB2 now, especially USB EHIC/OHIC, so it -is mostly based on Allwinner kernel source code. - -Signed-off-by: Jens Kuske -Acked-by: Rob Herring -Signed-off-by: Maxime Ripard ---- - Documentation/devicetree/bindings/clock/sunxi.txt | 2 + - drivers/clk/sunxi/Makefile | 1 + - drivers/clk/sunxi/clk-sun8i-bus-gates.c | 112 ++++++++++++++++++++++ - drivers/clk/sunxi/clk-sunxi.c | 6 ++ - 4 files changed, 121 insertions(+) - create mode 100644 drivers/clk/sunxi/clk-sun8i-bus-gates.c - ---- a/drivers/clk/sunxi/Makefile -+++ b/drivers/clk/sunxi/Makefile -@@ -10,6 +10,7 @@ obj-y += clk-a10-pll2.o - obj-y += clk-a20-gmac.o - obj-y += clk-mod0.o - obj-y += clk-simple-gates.o -+obj-y += clk-sun8i-bus-gates.o - obj-y += clk-sun8i-mbus.o - obj-y += clk-sun9i-core.o - obj-y += clk-sun9i-mmc.o ---- /dev/null -+++ b/drivers/clk/sunxi/clk-sun8i-bus-gates.c -@@ -0,0 +1,112 @@ -+/* -+ * Copyright (C) 2015 Jens Kuske -+ * -+ * Based on clk-simple-gates.c, which is: -+ * Copyright 2015 Maxime Ripard -+ * -+ * Maxime Ripard -+ * -+ * 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; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+static DEFINE_SPINLOCK(gates_lock); -+ -+static void __init sun8i_h3_bus_gates_init(struct device_node *node) -+{ -+ static const char * const names[] = { "ahb1", "ahb2", "apb1", "apb2" }; -+ enum { AHB1, AHB2, APB1, APB2, PARENT_MAX } clk_parent; -+ const char *parents[PARENT_MAX]; -+ struct clk_onecell_data *clk_data; -+ const char *clk_name; -+ struct property *prop; -+ struct resource res; -+ void __iomem *clk_reg; -+ void __iomem *reg; -+ const __be32 *p; -+ int number, i; -+ u8 clk_bit; -+ u32 index; -+ -+ reg = of_io_request_and_map(node, 0, of_node_full_name(node)); -+ if (IS_ERR(reg)) -+ return; -+ -+ for (i = 0; i < ARRAY_SIZE(names); i++) { -+ index = of_property_match_string(node, "clock-names", -+ names[i]); -+ if (index < 0) -+ return; -+ -+ parents[i] = of_clk_get_parent_name(node, index); -+ } -+ -+ clk_data = kmalloc(sizeof(struct clk_onecell_data), GFP_KERNEL); -+ if (!clk_data) -+ goto err_unmap; -+ -+ number = of_property_count_u32_elems(node, "clock-indices"); -+ of_property_read_u32_index(node, "clock-indices", number - 1, &number); -+ -+ clk_data->clks = kcalloc(number + 1, sizeof(struct clk *), GFP_KERNEL); -+ if (!clk_data->clks) -+ goto err_free_data; -+ -+ i = 0; -+ of_property_for_each_u32(node, "clock-indices", prop, p, index) { -+ of_property_read_string_index(node, "clock-output-names", -+ i, &clk_name); -+ -+ if (index == 17 || (index >= 29 && index <= 31)) -+ clk_parent = AHB2; -+ else if (index <= 63 || index >= 128) -+ clk_parent = AHB1; -+ else if (index >= 64 && index <= 95) -+ clk_parent = APB1; -+ else if (index >= 96 && index <= 127) -+ clk_parent = APB2; -+ -+ clk_reg = reg + 4 * (index / 32); -+ clk_bit = index % 32; -+ -+ clk_data->clks[index] = clk_register_gate(NULL, clk_name, -+ parents[clk_parent], -+ 0, clk_reg, clk_bit, -+ 0, &gates_lock); -+ i++; -+ -+ if (IS_ERR(clk_data->clks[index])) { -+ WARN_ON(true); -+ continue; -+ } -+ } -+ -+ clk_data->clk_num = number + 1; -+ of_clk_add_provider(node, of_clk_src_onecell_get, clk_data); -+ -+ return; -+ -+err_free_data: -+ kfree(clk_data); -+err_unmap: -+ iounmap(reg); -+ of_address_to_resource(node, 0, &res); -+ release_mem_region(res.start, resource_size(&res)); -+} -+ -+CLK_OF_DECLARE(sun8i_h3_bus_gates, "allwinner,sun8i-h3-bus-gates-clk", -+ sun8i_h3_bus_gates_init); ---- a/drivers/clk/sunxi/clk-sunxi.c -+++ b/drivers/clk/sunxi/clk-sunxi.c -@@ -778,6 +778,10 @@ static const struct mux_data sun6i_a31_a - .shift = 12, - }; - -+static const struct mux_data sun8i_h3_ahb2_mux_data __initconst = { -+ .shift = 0, -+}; -+ - static void __init sunxi_mux_clk_setup(struct device_node *node, - struct mux_data *data) - { -@@ -1130,6 +1134,7 @@ static const struct of_device_id clk_div - static const struct of_device_id clk_mux_match[] __initconst = { - {.compatible = "allwinner,sun4i-a10-cpu-clk", .data = &sun4i_cpu_mux_data,}, - {.compatible = "allwinner,sun6i-a31-ahb1-mux-clk", .data = &sun6i_a31_ahb1_mux_data,}, -+ {.compatible = "allwinner,sun8i-h3-ahb2-clk", .data = &sun8i_h3_ahb2_mux_data,}, - {} - }; - -@@ -1212,6 +1217,7 @@ CLK_OF_DECLARE(sun6i_a31_clk_init, "allw - CLK_OF_DECLARE(sun6i_a31s_clk_init, "allwinner,sun6i-a31s", sun6i_init_clocks); - CLK_OF_DECLARE(sun8i_a23_clk_init, "allwinner,sun8i-a23", sun6i_init_clocks); - CLK_OF_DECLARE(sun8i_a33_clk_init, "allwinner,sun8i-a33", sun6i_init_clocks); -+CLK_OF_DECLARE(sun8i_h3_clk_init, "allwinner,sun8i-h3", sun6i_init_clocks); - - static void __init sun9i_init_clocks(struct device_node *node) - { diff --git a/target/linux/sunxi/patches-4.4/104-1-dt-sunxi-add-h3-dtsi.patch b/target/linux/sunxi/patches-4.4/104-1-dt-sunxi-add-h3-dtsi.patch deleted file mode 100644 index 35a653c5fe3ad5..00000000000000 --- a/target/linux/sunxi/patches-4.4/104-1-dt-sunxi-add-h3-dtsi.patch +++ /dev/null @@ -1,515 +0,0 @@ -From 318d93bc41823e86967c8251eef0444a72e4d687 Mon Sep 17 00:00:00 2001 -From: Jens Kuske -Date: Fri, 4 Dec 2015 22:24:42 +0100 -Subject: [PATCH] ARM: dts: sunxi: Add Allwinner H3 DTSI - -The Allwinner H3 is a home entertainment system oriented SoC with -four Cortex-A7 cores and a Mali-400MP2 GPU. - -Signed-off-by: Jens Kuske -Signed-off-by: Maxime Ripard ---- - arch/arm/boot/dts/sun8i-h3.dtsi | 497 ++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 497 insertions(+) - create mode 100644 arch/arm/boot/dts/sun8i-h3.dtsi - ---- /dev/null -+++ b/arch/arm/boot/dts/sun8i-h3.dtsi -@@ -0,0 +1,497 @@ -+/* -+ * Copyright (C) 2015 Jens Kuske -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) This file 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; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+#include "skeleton.dtsi" -+ -+#include -+#include -+ -+/ { -+ interrupt-parent = <&gic>; -+ -+ cpus { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ cpu@0 { -+ compatible = "arm,cortex-a7"; -+ device_type = "cpu"; -+ reg = <0>; -+ }; -+ -+ cpu@1 { -+ compatible = "arm,cortex-a7"; -+ device_type = "cpu"; -+ reg = <1>; -+ }; -+ -+ cpu@2 { -+ compatible = "arm,cortex-a7"; -+ device_type = "cpu"; -+ reg = <2>; -+ }; -+ -+ cpu@3 { -+ compatible = "arm,cortex-a7"; -+ device_type = "cpu"; -+ reg = <3>; -+ }; -+ }; -+ -+ timer { -+ compatible = "arm,armv7-timer"; -+ interrupts = , -+ , -+ , -+ ; -+ }; -+ -+ clocks { -+ #address-cells = <1>; -+ #size-cells = <1>; -+ ranges; -+ -+ osc24M: osc24M_clk { -+ #clock-cells = <0>; -+ compatible = "fixed-clock"; -+ clock-frequency = <24000000>; -+ clock-output-names = "osc24M"; -+ }; -+ -+ osc32k: osc32k_clk { -+ #clock-cells = <0>; -+ compatible = "fixed-clock"; -+ clock-frequency = <32768>; -+ clock-output-names = "osc32k"; -+ }; -+ -+ pll1: clk@01c20000 { -+ #clock-cells = <0>; -+ compatible = "allwinner,sun8i-a23-pll1-clk"; -+ reg = <0x01c20000 0x4>; -+ clocks = <&osc24M>; -+ clock-output-names = "pll1"; -+ }; -+ -+ /* dummy clock until actually implemented */ -+ pll5: pll5_clk { -+ #clock-cells = <0>; -+ compatible = "fixed-clock"; -+ clock-frequency = <0>; -+ clock-output-names = "pll5"; -+ }; -+ -+ pll6: clk@01c20028 { -+ #clock-cells = <1>; -+ compatible = "allwinner,sun6i-a31-pll6-clk"; -+ reg = <0x01c20028 0x4>; -+ clocks = <&osc24M>; -+ clock-output-names = "pll6", "pll6x2"; -+ }; -+ -+ pll6d2: pll6d2_clk { -+ #clock-cells = <0>; -+ compatible = "fixed-factor-clock"; -+ clock-div = <2>; -+ clock-mult = <1>; -+ clocks = <&pll6 0>; -+ clock-output-names = "pll6d2"; -+ }; -+ -+ /* dummy clock until pll6 can be reused */ -+ pll8: pll8_clk { -+ #clock-cells = <0>; -+ compatible = "fixed-clock"; -+ clock-frequency = <1>; -+ clock-output-names = "pll8"; -+ }; -+ -+ cpu: cpu_clk@01c20050 { -+ #clock-cells = <0>; -+ compatible = "allwinner,sun4i-a10-cpu-clk"; -+ reg = <0x01c20050 0x4>; -+ clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>; -+ clock-output-names = "cpu"; -+ }; -+ -+ axi: axi_clk@01c20050 { -+ #clock-cells = <0>; -+ compatible = "allwinner,sun4i-a10-axi-clk"; -+ reg = <0x01c20050 0x4>; -+ clocks = <&cpu>; -+ clock-output-names = "axi"; -+ }; -+ -+ ahb1: ahb1_clk@01c20054 { -+ #clock-cells = <0>; -+ compatible = "allwinner,sun6i-a31-ahb1-clk"; -+ reg = <0x01c20054 0x4>; -+ clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6 0>; -+ clock-output-names = "ahb1"; -+ }; -+ -+ ahb2: ahb2_clk@01c2005c { -+ #clock-cells = <0>; -+ compatible = "allwinner,sun8i-h3-ahb2-clk"; -+ reg = <0x01c2005c 0x4>; -+ clocks = <&ahb1>, <&pll6d2>; -+ clock-output-names = "ahb2"; -+ }; -+ -+ apb1: apb1_clk@01c20054 { -+ #clock-cells = <0>; -+ compatible = "allwinner,sun4i-a10-apb0-clk"; -+ reg = <0x01c20054 0x4>; -+ clocks = <&ahb1>; -+ clock-output-names = "apb1"; -+ }; -+ -+ apb2: apb2_clk@01c20058 { -+ #clock-cells = <0>; -+ compatible = "allwinner,sun4i-a10-apb1-clk"; -+ reg = <0x01c20058 0x4>; -+ clocks = <&osc32k>, <&osc24M>, <&pll6 0>, <&pll6 0>; -+ clock-output-names = "apb2"; -+ }; -+ -+ bus_gates: clk@01c20060 { -+ #clock-cells = <1>; -+ compatible = "allwinner,sun8i-h3-bus-gates-clk"; -+ reg = <0x01c20060 0x14>; -+ clocks = <&ahb1>, <&ahb2>, <&apb1>, <&apb2>; -+ clock-names = "ahb1", "ahb2", "apb1", "apb2"; -+ clock-indices = <5>, <6>, <8>, -+ <9>, <10>, <13>, -+ <14>, <17>, <18>, -+ <19>, <20>, -+ <21>, <23>, -+ <24>, <25>, -+ <26>, <27>, -+ <28>, <29>, -+ <30>, <31>, <32>, -+ <35>, <36>, <37>, -+ <40>, <41>, <43>, -+ <44>, <52>, <53>, -+ <54>, <64>, -+ <65>, <69>, <72>, -+ <76>, <77>, <78>, -+ <96>, <97>, <98>, -+ <112>, <113>, -+ <114>, <115>, -+ <116>, <128>, <135>; -+ clock-output-names = "bus_ce", "bus_dma", "bus_mmc0", -+ "bus_mmc1", "bus_mmc2", "bus_nand", -+ "bus_sdram", "bus_gmac", "bus_ts", -+ "bus_hstimer", "bus_spi0", -+ "bus_spi1", "bus_otg", -+ "bus_otg_ehci0", "bus_ehci1", -+ "bus_ehci2", "bus_ehci3", -+ "bus_otg_ohci0", "bus_ohci1", -+ "bus_ohci2", "bus_ohci3", "bus_ve", -+ "bus_lcd0", "bus_lcd1", "bus_deint", -+ "bus_csi", "bus_tve", "bus_hdmi", -+ "bus_de", "bus_gpu", "bus_msgbox", -+ "bus_spinlock", "bus_codec", -+ "bus_spdif", "bus_pio", "bus_ths", -+ "bus_i2s0", "bus_i2s1", "bus_i2s2", -+ "bus_i2c0", "bus_i2c1", "bus_i2c2", -+ "bus_uart0", "bus_uart1", -+ "bus_uart2", "bus_uart3", -+ "bus_scr", "bus_ephy", "bus_dbg"; -+ }; -+ -+ mmc0_clk: clk@01c20088 { -+ #clock-cells = <1>; -+ compatible = "allwinner,sun4i-a10-mmc-clk"; -+ reg = <0x01c20088 0x4>; -+ clocks = <&osc24M>, <&pll6 0>, <&pll8>; -+ clock-output-names = "mmc0", -+ "mmc0_output", -+ "mmc0_sample"; -+ }; -+ -+ mmc1_clk: clk@01c2008c { -+ #clock-cells = <1>; -+ compatible = "allwinner,sun4i-a10-mmc-clk"; -+ reg = <0x01c2008c 0x4>; -+ clocks = <&osc24M>, <&pll6 0>, <&pll8>; -+ clock-output-names = "mmc1", -+ "mmc1_output", -+ "mmc1_sample"; -+ }; -+ -+ mmc2_clk: clk@01c20090 { -+ #clock-cells = <1>; -+ compatible = "allwinner,sun4i-a10-mmc-clk"; -+ reg = <0x01c20090 0x4>; -+ clocks = <&osc24M>, <&pll6 0>, <&pll8>; -+ clock-output-names = "mmc2", -+ "mmc2_output", -+ "mmc2_sample"; -+ }; -+ -+ mbus_clk: clk@01c2015c { -+ #clock-cells = <0>; -+ compatible = "allwinner,sun8i-a23-mbus-clk"; -+ reg = <0x01c2015c 0x4>; -+ clocks = <&osc24M>, <&pll6 1>, <&pll5>; -+ clock-output-names = "mbus"; -+ }; -+ }; -+ -+ soc { -+ compatible = "simple-bus"; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ ranges; -+ -+ dma: dma-controller@01c02000 { -+ compatible = "allwinner,sun8i-h3-dma"; -+ reg = <0x01c02000 0x1000>; -+ interrupts = ; -+ clocks = <&bus_gates 6>; -+ resets = <&ahb_rst 6>; -+ #dma-cells = <1>; -+ }; -+ -+ mmc0: mmc@01c0f000 { -+ compatible = "allwinner,sun5i-a13-mmc"; -+ reg = <0x01c0f000 0x1000>; -+ clocks = <&bus_gates 8>, -+ <&mmc0_clk 0>, -+ <&mmc0_clk 1>, -+ <&mmc0_clk 2>; -+ clock-names = "ahb", -+ "mmc", -+ "output", -+ "sample"; -+ resets = <&ahb_rst 8>; -+ reset-names = "ahb"; -+ interrupts = ; -+ status = "disabled"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ }; -+ -+ mmc1: mmc@01c10000 { -+ compatible = "allwinner,sun5i-a13-mmc"; -+ reg = <0x01c10000 0x1000>; -+ clocks = <&bus_gates 9>, -+ <&mmc1_clk 0>, -+ <&mmc1_clk 1>, -+ <&mmc1_clk 2>; -+ clock-names = "ahb", -+ "mmc", -+ "output", -+ "sample"; -+ resets = <&ahb_rst 9>; -+ reset-names = "ahb"; -+ interrupts = ; -+ status = "disabled"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ }; -+ -+ mmc2: mmc@01c11000 { -+ compatible = "allwinner,sun5i-a13-mmc"; -+ reg = <0x01c11000 0x1000>; -+ clocks = <&bus_gates 10>, -+ <&mmc2_clk 0>, -+ <&mmc2_clk 1>, -+ <&mmc2_clk 2>; -+ clock-names = "ahb", -+ "mmc", -+ "output", -+ "sample"; -+ resets = <&ahb_rst 10>; -+ reset-names = "ahb"; -+ interrupts = ; -+ status = "disabled"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ }; -+ -+ pio: pinctrl@01c20800 { -+ compatible = "allwinner,sun8i-h3-pinctrl"; -+ reg = <0x01c20800 0x400>; -+ interrupts = , -+ ; -+ clocks = <&bus_gates 69>; -+ gpio-controller; -+ #gpio-cells = <3>; -+ interrupt-controller; -+ #interrupt-cells = <2>; -+ -+ uart0_pins_a: uart0@0 { -+ allwinner,pins = "PA4", "PA5"; -+ allwinner,function = "uart0"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ mmc0_pins_a: mmc0@0 { -+ allwinner,pins = "PF0", "PF1", "PF2", "PF3", -+ "PF4", "PF5"; -+ allwinner,function = "mmc0"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ mmc0_cd_pin: mmc0_cd_pin@0 { -+ allwinner,pins = "PF6"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ mmc1_pins_a: mmc1@0 { -+ allwinner,pins = "PG0", "PG1", "PG2", "PG3", -+ "PG4", "PG5"; -+ allwinner,function = "mmc1"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ }; -+ -+ ahb_rst: reset@01c202c0 { -+ #reset-cells = <1>; -+ compatible = "allwinner,sun6i-a31-ahb1-reset"; -+ reg = <0x01c202c0 0xc>; -+ }; -+ -+ apb1_rst: reset@01c202d0 { -+ #reset-cells = <1>; -+ compatible = "allwinner,sun6i-a31-clock-reset"; -+ reg = <0x01c202d0 0x4>; -+ }; -+ -+ apb2_rst: reset@01c202d8 { -+ #reset-cells = <1>; -+ compatible = "allwinner,sun6i-a31-clock-reset"; -+ reg = <0x01c202d8 0x4>; -+ }; -+ -+ timer@01c20c00 { -+ compatible = "allwinner,sun4i-a10-timer"; -+ reg = <0x01c20c00 0xa0>; -+ interrupts = , -+ ; -+ clocks = <&osc24M>; -+ }; -+ -+ wdt0: watchdog@01c20ca0 { -+ compatible = "allwinner,sun6i-a31-wdt"; -+ reg = <0x01c20ca0 0x20>; -+ interrupts = ; -+ }; -+ -+ uart0: serial@01c28000 { -+ compatible = "snps,dw-apb-uart"; -+ reg = <0x01c28000 0x400>; -+ interrupts = ; -+ reg-shift = <2>; -+ reg-io-width = <4>; -+ clocks = <&bus_gates 112>; -+ resets = <&apb2_rst 16>; -+ dmas = <&dma 6>, <&dma 6>; -+ dma-names = "rx", "tx"; -+ status = "disabled"; -+ }; -+ -+ uart1: serial@01c28400 { -+ compatible = "snps,dw-apb-uart"; -+ reg = <0x01c28400 0x400>; -+ interrupts = ; -+ reg-shift = <2>; -+ reg-io-width = <4>; -+ clocks = <&bus_gates 113>; -+ resets = <&apb2_rst 17>; -+ dmas = <&dma 7>, <&dma 7>; -+ dma-names = "rx", "tx"; -+ status = "disabled"; -+ }; -+ -+ uart2: serial@01c28800 { -+ compatible = "snps,dw-apb-uart"; -+ reg = <0x01c28800 0x400>; -+ interrupts = ; -+ reg-shift = <2>; -+ reg-io-width = <4>; -+ clocks = <&bus_gates 114>; -+ resets = <&apb2_rst 18>; -+ dmas = <&dma 8>, <&dma 8>; -+ dma-names = "rx", "tx"; -+ status = "disabled"; -+ }; -+ -+ uart3: serial@01c28c00 { -+ compatible = "snps,dw-apb-uart"; -+ reg = <0x01c28c00 0x400>; -+ interrupts = ; -+ reg-shift = <2>; -+ reg-io-width = <4>; -+ clocks = <&bus_gates 115>; -+ resets = <&apb2_rst 19>; -+ dmas = <&dma 9>, <&dma 9>; -+ dma-names = "rx", "tx"; -+ status = "disabled"; -+ }; -+ -+ gic: interrupt-controller@01c81000 { -+ compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic"; -+ reg = <0x01c81000 0x1000>, -+ <0x01c82000 0x1000>, -+ <0x01c84000 0x2000>, -+ <0x01c86000 0x2000>; -+ interrupt-controller; -+ #interrupt-cells = <3>; -+ interrupts = ; -+ }; -+ -+ rtc: rtc@01f00000 { -+ compatible = "allwinner,sun6i-a31-rtc"; -+ reg = <0x01f00000 0x54>; -+ interrupts = , -+ ; -+ }; -+ }; -+}; diff --git a/target/linux/sunxi/patches-4.4/105-phy-use_of_match_node.patch b/target/linux/sunxi/patches-4.4/105-phy-use_of_match_node.patch deleted file mode 100644 index 7715b585d0a6bb..00000000000000 --- a/target/linux/sunxi/patches-4.4/105-phy-use_of_match_node.patch +++ /dev/null @@ -1,218 +0,0 @@ -From 5c627d8e7660c170c591ef281184fd11d0493440 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Fri, 11 Dec 2015 16:32:17 +0100 -Subject: [PATCH] phy-sun4i-usb: Use of_match_node to get model specific config - data - -Use of_match_node instead of calling of_device_is_compatible a ton of -times to get model specific config data. - -Signed-off-by: Hans de Goede -Signed-off-by: Kishon Vijay Abraham I ---- - drivers/phy/phy-sun4i-usb.c | 121 +++++++++++++++++++++++++++++--------------- - 1 file changed, 79 insertions(+), 42 deletions(-) - ---- a/drivers/phy/phy-sun4i-usb.c -+++ b/drivers/phy/phy-sun4i-usb.c -@@ -32,6 +32,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -88,12 +89,23 @@ - #define DEBOUNCE_TIME msecs_to_jiffies(50) - #define POLL_TIME msecs_to_jiffies(250) - -+enum sun4i_usb_phy_type { -+ sun4i_a10_phy, -+ sun8i_a33_phy, -+}; -+ -+struct sun4i_usb_phy_cfg { -+ int num_phys; -+ enum sun4i_usb_phy_type type; -+ u32 disc_thresh; -+ u8 phyctl_offset; -+ bool dedicated_clocks; -+}; -+ - struct sun4i_usb_phy_data { - void __iomem *base; -+ const struct sun4i_usb_phy_cfg *cfg; - struct mutex mutex; -- int num_phys; -- u32 disc_thresh; -- bool has_a33_phyctl; - struct sun4i_usb_phy { - struct phy *phy; - void __iomem *pmu; -@@ -159,17 +171,14 @@ static void sun4i_usb_phy_write(struct s - { - struct sun4i_usb_phy_data *phy_data = to_sun4i_usb_phy_data(phy); - u32 temp, usbc_bit = BIT(phy->index * 2); -- void *phyctl; -+ void *phyctl = phy_data->base + phy_data->cfg->phyctl_offset; - int i; - - mutex_lock(&phy_data->mutex); - -- if (phy_data->has_a33_phyctl) { -- phyctl = phy_data->base + REG_PHYCTL_A33; -+ if (phy_data->cfg->type == sun8i_a33_phy) { - /* A33 needs us to set phyctl to 0 explicitly */ - writel(0, phyctl); -- } else { -- phyctl = phy_data->base + REG_PHYCTL_A10; - } - - for (i = 0; i < len; i++) { -@@ -249,7 +258,8 @@ static int sun4i_usb_phy_init(struct phy - sun4i_usb_phy_write(phy, PHY_TX_AMPLITUDE_TUNE, 0x14, 5); - - /* Disconnect threshold adjustment */ -- sun4i_usb_phy_write(phy, PHY_DISCON_TH_SEL, data->disc_thresh, 2); -+ sun4i_usb_phy_write(phy, PHY_DISCON_TH_SEL, -+ data->cfg->disc_thresh, 2); - - sun4i_usb_phy_passby(phy, 1); - -@@ -476,7 +486,7 @@ static struct phy *sun4i_usb_phy_xlate(s - { - struct sun4i_usb_phy_data *data = dev_get_drvdata(dev); - -- if (args->args[0] >= data->num_phys) -+ if (args->args[0] >= data->cfg->num_phys) - return ERR_PTR(-ENODEV); - - return data->phys[args->args[0]].phy; -@@ -511,7 +521,6 @@ static int sun4i_usb_phy_probe(struct pl - struct device *dev = &pdev->dev; - struct device_node *np = dev->of_node; - struct phy_provider *phy_provider; -- bool dedicated_clocks; - struct resource *res; - int i, ret; - -@@ -522,29 +531,9 @@ static int sun4i_usb_phy_probe(struct pl - mutex_init(&data->mutex); - INIT_DELAYED_WORK(&data->detect, sun4i_usb_phy0_id_vbus_det_scan); - dev_set_drvdata(dev, data); -- -- if (of_device_is_compatible(np, "allwinner,sun5i-a13-usb-phy") || -- of_device_is_compatible(np, "allwinner,sun8i-a23-usb-phy") || -- of_device_is_compatible(np, "allwinner,sun8i-a33-usb-phy")) -- data->num_phys = 2; -- else -- data->num_phys = 3; -- -- if (of_device_is_compatible(np, "allwinner,sun5i-a13-usb-phy") || -- of_device_is_compatible(np, "allwinner,sun7i-a20-usb-phy")) -- data->disc_thresh = 2; -- else -- data->disc_thresh = 3; -- -- if (of_device_is_compatible(np, "allwinner,sun6i-a31-usb-phy") || -- of_device_is_compatible(np, "allwinner,sun8i-a23-usb-phy") || -- of_device_is_compatible(np, "allwinner,sun8i-a33-usb-phy")) -- dedicated_clocks = true; -- else -- dedicated_clocks = false; -- -- if (of_device_is_compatible(np, "allwinner,sun8i-a33-usb-phy")) -- data->has_a33_phyctl = true; -+ data->cfg = of_device_get_match_data(dev); -+ if (!data->cfg) -+ return -EINVAL; - - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "phy_ctrl"); - data->base = devm_ioremap_resource(dev, res); -@@ -590,7 +579,7 @@ static int sun4i_usb_phy_probe(struct pl - } - } - -- for (i = 0; i < data->num_phys; i++) { -+ for (i = 0; i < data->cfg->num_phys; i++) { - struct sun4i_usb_phy *phy = data->phys + i; - char name[16]; - -@@ -602,7 +591,7 @@ static int sun4i_usb_phy_probe(struct pl - phy->vbus = NULL; - } - -- if (dedicated_clocks) -+ if (data->cfg->dedicated_clocks) - snprintf(name, sizeof(name), "usb%d_phy", i); - else - strlcpy(name, "usb_phy", sizeof(name)); -@@ -689,13 +678,61 @@ static int sun4i_usb_phy_probe(struct pl - return 0; - } - -+static const struct sun4i_usb_phy_cfg sun4i_a10_cfg = { -+ .num_phys = 3, -+ .type = sun4i_a10_phy, -+ .disc_thresh = 3, -+ .phyctl_offset = REG_PHYCTL_A10, -+ .dedicated_clocks = false, -+}; -+ -+static const struct sun4i_usb_phy_cfg sun5i_a13_cfg = { -+ .num_phys = 2, -+ .type = sun4i_a10_phy, -+ .disc_thresh = 2, -+ .phyctl_offset = REG_PHYCTL_A10, -+ .dedicated_clocks = false, -+}; -+ -+static const struct sun4i_usb_phy_cfg sun6i_a31_cfg = { -+ .num_phys = 3, -+ .type = sun4i_a10_phy, -+ .disc_thresh = 3, -+ .phyctl_offset = REG_PHYCTL_A10, -+ .dedicated_clocks = true, -+}; -+ -+static const struct sun4i_usb_phy_cfg sun7i_a20_cfg = { -+ .num_phys = 3, -+ .type = sun4i_a10_phy, -+ .disc_thresh = 2, -+ .phyctl_offset = REG_PHYCTL_A10, -+ .dedicated_clocks = false, -+}; -+ -+static const struct sun4i_usb_phy_cfg sun8i_a23_cfg = { -+ .num_phys = 2, -+ .type = sun4i_a10_phy, -+ .disc_thresh = 3, -+ .phyctl_offset = REG_PHYCTL_A10, -+ .dedicated_clocks = true, -+}; -+ -+static const struct sun4i_usb_phy_cfg sun8i_a33_cfg = { -+ .num_phys = 2, -+ .type = sun8i_a33_phy, -+ .disc_thresh = 3, -+ .phyctl_offset = REG_PHYCTL_A33, -+ .dedicated_clocks = true, -+}; -+ - static const struct of_device_id sun4i_usb_phy_of_match[] = { -- { .compatible = "allwinner,sun4i-a10-usb-phy" }, -- { .compatible = "allwinner,sun5i-a13-usb-phy" }, -- { .compatible = "allwinner,sun6i-a31-usb-phy" }, -- { .compatible = "allwinner,sun7i-a20-usb-phy" }, -- { .compatible = "allwinner,sun8i-a23-usb-phy" }, -- { .compatible = "allwinner,sun8i-a33-usb-phy" }, -+ { .compatible = "allwinner,sun4i-a10-usb-phy", .data = &sun4i_a10_cfg }, -+ { .compatible = "allwinner,sun5i-a13-usb-phy", .data = &sun5i_a13_cfg }, -+ { .compatible = "allwinner,sun6i-a31-usb-phy", .data = &sun6i_a31_cfg }, -+ { .compatible = "allwinner,sun7i-a20-usb-phy", .data = &sun7i_a20_cfg }, -+ { .compatible = "allwinner,sun8i-a23-usb-phy", .data = &sun8i_a23_cfg }, -+ { .compatible = "allwinner,sun8i-a33-usb-phy", .data = &sun8i_a33_cfg }, - { }, - }; - MODULE_DEVICE_TABLE(of, sun4i_usb_phy_of_match); diff --git a/target/linux/sunxi/patches-4.4/106-phy-add-h3-usbphys.patch b/target/linux/sunxi/patches-4.4/106-phy-add-h3-usbphys.patch deleted file mode 100644 index 33943230e8efb8..00000000000000 --- a/target/linux/sunxi/patches-4.4/106-phy-add-h3-usbphys.patch +++ /dev/null @@ -1,124 +0,0 @@ -From 317c5224795b41a08ba8c08573d74ba95096faa5 Mon Sep 17 00:00:00 2001 -From: Reinder de Haan -Date: Fri, 11 Dec 2015 16:32:18 +0100 -Subject: [PATCH] phy-sun4i-usb: Add support for the host usb-phys found on the - H3 SoC - -Note this commit only adds support for phys 1-3, phy 0, the otg phy, is -not yet (fully) supported after this commit. - -Signed-off-by: Reinder de Haan -Signed-off-by: Hans de Goede -Acked-by: Rob Herring -Signed-off-by: Kishon Vijay Abraham I ---- - .../devicetree/bindings/phy/sun4i-usb-phy.txt | 1 + - drivers/phy/phy-sun4i-usb.c | 41 +++++++++++++++++----- - 2 files changed, 33 insertions(+), 9 deletions(-) - ---- a/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt -+++ b/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt -@@ -9,6 +9,7 @@ Required properties: - * allwinner,sun7i-a20-usb-phy - * allwinner,sun8i-a23-usb-phy - * allwinner,sun8i-a33-usb-phy -+ * allwinner,sun8i-h3-usb-phy - - reg : a list of offset + length pairs - - reg-names : - * "phy_ctrl" ---- a/drivers/phy/phy-sun4i-usb.c -+++ b/drivers/phy/phy-sun4i-usb.c -@@ -47,6 +47,9 @@ - #define REG_PHYBIST 0x08 - #define REG_PHYTUNE 0x0c - #define REG_PHYCTL_A33 0x10 -+#define REG_PHY_UNK_H3 0x20 -+ -+#define REG_PMU_UNK_H3 0x10 - - #define PHYCTL_DATA BIT(7) - -@@ -80,7 +83,7 @@ - #define PHY_DISCON_TH_SEL 0x2a - #define PHY_SQUELCH_DETECT 0x3c - --#define MAX_PHYS 3 -+#define MAX_PHYS 4 - - /* - * Note do not raise the debounce time, we must report Vusb high within 100ms -@@ -92,6 +95,7 @@ - enum sun4i_usb_phy_type { - sun4i_a10_phy, - sun8i_a33_phy, -+ sun8i_h3_phy, - }; - - struct sun4i_usb_phy_cfg { -@@ -239,6 +243,7 @@ static int sun4i_usb_phy_init(struct phy - struct sun4i_usb_phy *phy = phy_get_drvdata(_phy); - struct sun4i_usb_phy_data *data = to_sun4i_usb_phy_data(phy); - int ret; -+ u32 val; - - ret = clk_prepare_enable(phy->clk); - if (ret) -@@ -250,16 +255,26 @@ static int sun4i_usb_phy_init(struct phy - return ret; - } - -- /* Enable USB 45 Ohm resistor calibration */ -- if (phy->index == 0) -- sun4i_usb_phy_write(phy, PHY_RES45_CAL_EN, 0x01, 1); -- -- /* Adjust PHY's magnitude and rate */ -- sun4i_usb_phy_write(phy, PHY_TX_AMPLITUDE_TUNE, 0x14, 5); -- -- /* Disconnect threshold adjustment */ -- sun4i_usb_phy_write(phy, PHY_DISCON_TH_SEL, -- data->cfg->disc_thresh, 2); -+ if (data->cfg->type == sun8i_h3_phy) { -+ if (phy->index == 0) { -+ val = readl(data->base + REG_PHY_UNK_H3); -+ writel(val & ~1, data->base + REG_PHY_UNK_H3); -+ } -+ -+ val = readl(phy->pmu + REG_PMU_UNK_H3); -+ writel(val & ~2, phy->pmu + REG_PMU_UNK_H3); -+ } else { -+ /* Enable USB 45 Ohm resistor calibration */ -+ if (phy->index == 0) -+ sun4i_usb_phy_write(phy, PHY_RES45_CAL_EN, 0x01, 1); -+ -+ /* Adjust PHY's magnitude and rate */ -+ sun4i_usb_phy_write(phy, PHY_TX_AMPLITUDE_TUNE, 0x14, 5); -+ -+ /* Disconnect threshold adjustment */ -+ sun4i_usb_phy_write(phy, PHY_DISCON_TH_SEL, -+ data->cfg->disc_thresh, 2); -+ } - - sun4i_usb_phy_passby(phy, 1); - -@@ -726,6 +741,13 @@ static const struct sun4i_usb_phy_cfg su - .dedicated_clocks = true, - }; - -+static const struct sun4i_usb_phy_cfg sun8i_h3_cfg = { -+ .num_phys = 4, -+ .type = sun8i_h3_phy, -+ .disc_thresh = 3, -+ .dedicated_clocks = true, -+}; -+ - static const struct of_device_id sun4i_usb_phy_of_match[] = { - { .compatible = "allwinner,sun4i-a10-usb-phy", .data = &sun4i_a10_cfg }, - { .compatible = "allwinner,sun5i-a13-usb-phy", .data = &sun5i_a13_cfg }, -@@ -733,6 +755,7 @@ static const struct of_device_id sun4i_u - { .compatible = "allwinner,sun7i-a20-usb-phy", .data = &sun7i_a20_cfg }, - { .compatible = "allwinner,sun8i-a23-usb-phy", .data = &sun8i_a23_cfg }, - { .compatible = "allwinner,sun8i-a33-usb-phy", .data = &sun8i_a33_cfg }, -+ { .compatible = "allwinner,sun8i-h3-usb-phy", .data = &sun8i_h3_cfg }, - { }, - }; - MODULE_DEVICE_TABLE(of, sun4i_usb_phy_of_match); diff --git a/target/linux/sunxi/patches-4.4/107-clk-sunxi-add-h3-usbphy-clocks.patch b/target/linux/sunxi/patches-4.4/107-clk-sunxi-add-h3-usbphy-clocks.patch deleted file mode 100644 index c845d512e4304b..00000000000000 --- a/target/linux/sunxi/patches-4.4/107-clk-sunxi-add-h3-usbphy-clocks.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 7bec0200ac214b5cba44e2c2c4385815be4b9f00 Mon Sep 17 00:00:00 2001 -From: Reinder de Haan -Date: Sun, 15 Nov 2015 20:46:13 +0100 -Subject: [PATCH] clk: sunxi: Add support for the H3 usb phy clocks - -The H3 has a usb-phy clk register which is similar to that of earlier -SoCs, but with support for a larger number of phys. So we can simply add -a new set of clk-data and a new compatible and be done with it. - -Acked-by: Chen-Yu Tsai -Acked-by: Rob Herring -Signed-off-by: Reinder de Haan -Signed-off-by: Hans de Goede -Signed-off-by: Maxime Ripard ---- - Documentation/devicetree/bindings/clock/sunxi.txt | 1 + - drivers/clk/sunxi/clk-usb.c | 12 ++++++++++++ - 2 files changed, 13 insertions(+) - ---- a/Documentation/devicetree/bindings/clock/sunxi.txt -+++ b/Documentation/devicetree/bindings/clock/sunxi.txt -@@ -70,6 +70,7 @@ Required properties: - "allwinner,sun5i-a13-usb-clk" - for usb gates + resets on A13 - "allwinner,sun6i-a31-usb-clk" - for usb gates + resets on A31 - "allwinner,sun8i-a23-usb-clk" - for usb gates + resets on A23 -+ "allwinner,sun8i-h3-usb-clk" - for usb gates + resets on H3 - "allwinner,sun9i-a80-usb-mod-clk" - for usb gates + resets on A80 - "allwinner,sun9i-a80-usb-phy-clk" - for usb phy gates + resets on A80 - ---- a/drivers/clk/sunxi/clk-usb.c -+++ b/drivers/clk/sunxi/clk-usb.c -@@ -243,3 +243,15 @@ static void __init sun9i_a80_usb_phy_set - sunxi_usb_clk_setup(node, &sun9i_a80_usb_phy_data, &a80_usb_phy_lock); - } - CLK_OF_DECLARE(sun9i_a80_usb_phy, "allwinner,sun9i-a80-usb-phy-clk", sun9i_a80_usb_phy_setup); -+ -+static const struct usb_clk_data sun8i_h3_usb_clk_data __initconst = { -+ .clk_mask = BIT(19) | BIT(18) | BIT(17) | BIT(16) | -+ BIT(11) | BIT(10) | BIT(9) | BIT(8), -+ .reset_mask = BIT(3) | BIT(2) | BIT(1) | BIT(0), -+}; -+ -+static void __init sun8i_h3_usb_setup(struct device_node *node) -+{ -+ sunxi_usb_clk_setup(node, &sun8i_h3_usb_clk_data, &sun4i_a10_usb_lock); -+} -+CLK_OF_DECLARE(sun8i_h3_usb, "allwinner,sun8i-h3-usb-clk", sun8i_h3_usb_setup); diff --git a/target/linux/sunxi/patches-4.4/110-clk-sunxi-add-ve-for-sun457i.patch b/target/linux/sunxi/patches-4.4/110-clk-sunxi-add-ve-for-sun457i.patch deleted file mode 100644 index f929753d774479..00000000000000 --- a/target/linux/sunxi/patches-4.4/110-clk-sunxi-add-ve-for-sun457i.patch +++ /dev/null @@ -1,226 +0,0 @@ -From 3cdd9f5c4953465abb87ec757159cc0576ae6b0a Mon Sep 17 00:00:00 2001 -From: Chen-Yu Tsai -Date: Sat, 5 Dec 2015 21:16:43 +0800 -Subject: [PATCH] clk: sunxi: Add VE (Video Engine) module clock driver for - sun[457]i - -The video engine has its own special module clock, consisting of a clock -gate, configurable dividers, and a reset control. - -On later (sun[68]i) families, the reset control is moved out of this -piece of hardware and grouped with reset controls of other peripherals. - -Signed-off-by: Chen-Yu Tsai -Tested-by: Jens Kuske -Signed-off-by: Maxime Ripard ---- - Documentation/devicetree/bindings/clock/sunxi.txt | 4 + - drivers/clk/sunxi/Makefile | 1 + - drivers/clk/sunxi/clk-a10-ve.c | 171 ++++++++++++++++++++++ - 3 files changed, 176 insertions(+) - create mode 100644 drivers/clk/sunxi/clk-a10-ve.c - ---- a/Documentation/devicetree/bindings/clock/sunxi.txt -+++ b/Documentation/devicetree/bindings/clock/sunxi.txt -@@ -73,6 +73,7 @@ Required properties: - "allwinner,sun8i-h3-usb-clk" - for usb gates + resets on H3 - "allwinner,sun9i-a80-usb-mod-clk" - for usb gates + resets on A80 - "allwinner,sun9i-a80-usb-phy-clk" - for usb phy gates + resets on A80 -+ "allwinner,sun4i-a10-ve-clk" - for the Video Engine clock - - Required properties for all clocks: - - reg : shall be the control register address for the clock. -@@ -92,6 +93,9 @@ Required properties for all clocks: - And "allwinner,*-usb-clk" clocks also require: - - reset-cells : shall be set to 1 - -+The "allwinner,sun4i-a10-ve-clk" clock also requires: -+- reset-cells : shall be set to 0 -+ - The "allwinner,sun9i-a80-mmc-config-clk" clock also requires: - - #reset-cells : shall be set to 1 - - resets : shall be the reset control phandle for the mmc block. ---- a/drivers/clk/sunxi/Makefile -+++ b/drivers/clk/sunxi/Makefile -@@ -7,6 +7,7 @@ obj-y += clk-a10-codec.o - obj-y += clk-a10-hosc.o - obj-y += clk-a10-mod1.o - obj-y += clk-a10-pll2.o -+obj-y += clk-a10-ve.o - obj-y += clk-a20-gmac.o - obj-y += clk-mod0.o - obj-y += clk-simple-gates.o ---- /dev/null -+++ b/drivers/clk/sunxi/clk-a10-ve.c -@@ -0,0 +1,171 @@ -+/* -+ * Copyright 2015 Chen-Yu Tsai -+ * -+ * Chen-Yu Tsai -+ * -+ * 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; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+static DEFINE_SPINLOCK(ve_lock); -+ -+#define SUN4I_VE_ENABLE 31 -+#define SUN4I_VE_DIVIDER_SHIFT 16 -+#define SUN4I_VE_DIVIDER_WIDTH 3 -+#define SUN4I_VE_RESET 0 -+ -+/** -+ * sunxi_ve_reset... - reset bit in ve clk registers handling -+ */ -+ -+struct ve_reset_data { -+ void __iomem *reg; -+ spinlock_t *lock; -+ struct reset_controller_dev rcdev; -+}; -+ -+static int sunxi_ve_reset_assert(struct reset_controller_dev *rcdev, -+ unsigned long id) -+{ -+ struct ve_reset_data *data = container_of(rcdev, -+ struct ve_reset_data, -+ rcdev); -+ unsigned long flags; -+ u32 reg; -+ -+ spin_lock_irqsave(data->lock, flags); -+ -+ reg = readl(data->reg); -+ writel(reg & ~BIT(SUN4I_VE_RESET), data->reg); -+ -+ spin_unlock_irqrestore(data->lock, flags); -+ -+ return 0; -+} -+ -+static int sunxi_ve_reset_deassert(struct reset_controller_dev *rcdev, -+ unsigned long id) -+{ -+ struct ve_reset_data *data = container_of(rcdev, -+ struct ve_reset_data, -+ rcdev); -+ unsigned long flags; -+ u32 reg; -+ -+ spin_lock_irqsave(data->lock, flags); -+ -+ reg = readl(data->reg); -+ writel(reg | BIT(SUN4I_VE_RESET), data->reg); -+ -+ spin_unlock_irqrestore(data->lock, flags); -+ -+ return 0; -+} -+ -+static int sunxi_ve_of_xlate(struct reset_controller_dev *rcdev, -+ const struct of_phandle_args *reset_spec) -+{ -+ if (WARN_ON(reset_spec->args_count != 0)) -+ return -EINVAL; -+ -+ return 0; -+} -+ -+static struct reset_control_ops sunxi_ve_reset_ops = { -+ .assert = sunxi_ve_reset_assert, -+ .deassert = sunxi_ve_reset_deassert, -+}; -+ -+static void __init sun4i_ve_clk_setup(struct device_node *node) -+{ -+ struct clk *clk; -+ struct clk_divider *div; -+ struct clk_gate *gate; -+ struct ve_reset_data *reset_data; -+ const char *parent; -+ const char *clk_name = node->name; -+ void __iomem *reg; -+ int err; -+ -+ reg = of_io_request_and_map(node, 0, of_node_full_name(node)); -+ if (IS_ERR(reg)) -+ return; -+ -+ div = kzalloc(sizeof(*div), GFP_KERNEL); -+ if (!div) -+ goto err_unmap; -+ -+ gate = kzalloc(sizeof(*gate), GFP_KERNEL); -+ if (!gate) -+ goto err_free_div; -+ -+ of_property_read_string(node, "clock-output-names", &clk_name); -+ parent = of_clk_get_parent_name(node, 0); -+ -+ gate->reg = reg; -+ gate->bit_idx = SUN4I_VE_ENABLE; -+ gate->lock = &ve_lock; -+ -+ div->reg = reg; -+ div->shift = SUN4I_VE_DIVIDER_SHIFT; -+ div->width = SUN4I_VE_DIVIDER_WIDTH; -+ div->lock = &ve_lock; -+ -+ clk = clk_register_composite(NULL, clk_name, &parent, 1, -+ NULL, NULL, -+ &div->hw, &clk_divider_ops, -+ &gate->hw, &clk_gate_ops, -+ CLK_SET_RATE_PARENT); -+ if (IS_ERR(clk)) -+ goto err_free_gate; -+ -+ err = of_clk_add_provider(node, of_clk_src_simple_get, clk); -+ if (err) -+ goto err_unregister_clk; -+ -+ reset_data = kzalloc(sizeof(*reset_data), GFP_KERNEL); -+ if (!reset_data) -+ goto err_del_provider; -+ -+ reset_data->reg = reg; -+ reset_data->lock = &ve_lock; -+ reset_data->rcdev.nr_resets = 1; -+ reset_data->rcdev.ops = &sunxi_ve_reset_ops; -+ reset_data->rcdev.of_node = node; -+ reset_data->rcdev.of_xlate = sunxi_ve_of_xlate; -+ reset_data->rcdev.of_reset_n_cells = 0; -+ err = reset_controller_register(&reset_data->rcdev); -+ if (err) -+ goto err_free_reset; -+ -+ return; -+ -+err_free_reset: -+ kfree(reset_data); -+err_del_provider: -+ of_clk_del_provider(node); -+err_unregister_clk: -+ clk_unregister(clk); -+err_free_gate: -+ kfree(gate); -+err_free_div: -+ kfree(div); -+err_unmap: -+ iounmap(reg); -+} -+CLK_OF_DECLARE(sun4i_ve, "allwinner,sun4i-a10-ve-clk", -+ sun4i_ve_clk_setup); diff --git a/target/linux/sunxi/patches-4.4/111-1-dt-sun4i-add-ve-clock-module.patch b/target/linux/sunxi/patches-4.4/111-1-dt-sun4i-add-ve-clock-module.patch deleted file mode 100644 index cfcf9bfb409f3a..00000000000000 --- a/target/linux/sunxi/patches-4.4/111-1-dt-sun4i-add-ve-clock-module.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 1ccc4939220cf815c309feddcf82dba260499194 Mon Sep 17 00:00:00 2001 -From: Chen-Yu Tsai -Date: Sat, 5 Dec 2015 21:16:45 +0800 -Subject: [PATCH] ARM: dts: sun4i: Add VE (Video Engine) module clock node - -The video engine has its own module clock, which also includes a -reset control for it. - -Signed-off-by: Chen-Yu Tsai -Signed-off-by: Maxime Ripard ---- - arch/arm/boot/dts/sun4i-a10.dtsi | 9 +++++++++ - 1 file changed, 9 insertions(+) - ---- a/arch/arm/boot/dts/sun4i-a10.dtsi -+++ b/arch/arm/boot/dts/sun4i-a10.dtsi -@@ -520,6 +520,15 @@ - "dram_de_mp", "dram_ace"; - }; - -+ ve_clk: clk@01c2013c { -+ #clock-cells = <0>; -+ #reset-cells = <0>; -+ compatible = "allwinner,sun4i-a10-ve-clk"; -+ reg = <0x01c2013c 0x4>; -+ clocks = <&pll4>; -+ clock-output-names = "ve"; -+ }; -+ - codec_clk: clk@01c20140 { - #clock-cells = <0>; - compatible = "allwinner,sun4i-a10-codec-clk"; diff --git a/target/linux/sunxi/patches-4.4/111-2-dt-sun7i-add-ve-clock-module.patch b/target/linux/sunxi/patches-4.4/111-2-dt-sun7i-add-ve-clock-module.patch deleted file mode 100644 index 85d2d31615633c..00000000000000 --- a/target/linux/sunxi/patches-4.4/111-2-dt-sun7i-add-ve-clock-module.patch +++ /dev/null @@ -1,32 +0,0 @@ -From f0571ab140723f9a898d4a404118580534dcc468 Mon Sep 17 00:00:00 2001 -From: Chen-Yu Tsai -Date: Sat, 5 Dec 2015 21:16:47 +0800 -Subject: [PATCH] ARM: dts: sun7i: Add VE (Video Engine) module clock node - -The video engine has its own module clock, which also includes a -reset control for it. - -Signed-off-by: Chen-Yu Tsai -Signed-off-by: Maxime Ripard ---- - arch/arm/boot/dts/sun7i-a20.dtsi | 9 +++++++++ - 1 file changed, 9 insertions(+) - ---- a/arch/arm/boot/dts/sun7i-a20.dtsi -+++ b/arch/arm/boot/dts/sun7i-a20.dtsi -@@ -527,6 +527,15 @@ - "dram_de_mp", "dram_ace"; - }; - -+ ve_clk: clk@01c2013c { -+ #clock-cells = <0>; -+ #reset-cells = <0>; -+ compatible = "allwinner,sun4i-a10-ve-clk"; -+ reg = <0x01c2013c 0x4>; -+ clocks = <&pll4>; -+ clock-output-names = "ve"; -+ }; -+ - codec_clk: clk@01c20140 { - #clock-cells = <0>; - compatible = "allwinner,sun4i-a10-codec-clk"; diff --git a/target/linux/sunxi/patches-4.4/115-musb-ignore-vbus-errors.patch b/target/linux/sunxi/patches-4.4/115-musb-ignore-vbus-errors.patch deleted file mode 100644 index 49c7162a6ab4eb..00000000000000 --- a/target/linux/sunxi/patches-4.4/115-musb-ignore-vbus-errors.patch +++ /dev/null @@ -1,26 +0,0 @@ -From fce20ac5d8c98f1a8ea5298051d9fa669e455f04 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Tue, 4 Aug 2015 23:22:45 +0200 -Subject: [PATCH] musb: sunxi: Ignore VBus errors in host-only mode - -For some unclear reason sometimes we get VBus errors in host-only mode, -even though we do not have any vbus-detection then. Ignore these. - -Signed-off-by: Hans de Goede ---- - drivers/usb/musb/sunxi.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/drivers/usb/musb/sunxi.c -+++ b/drivers/usb/musb/sunxi.c -@@ -194,6 +194,10 @@ static irqreturn_t sunxi_musb_interrupt( - musb_writeb(musb->mregs, MUSB_FADDR, 0); - } - -+ /* Ignore Vbus errors when in host only mode */ -+ if (musb->port_mode == MUSB_PORT_MODE_HOST) -+ musb->int_usb &= ~MUSB_INTR_VBUSERROR; -+ - musb->int_tx = readw(musb->mregs + SUNXI_MUSB_INTRTX); - if (musb->int_tx) - writew(musb->int_tx, musb->mregs + SUNXI_MUSB_INTRTX); diff --git a/target/linux/sunxi/patches-4.4/130-pinctrl-sunxi-add-h3-pio.patch b/target/linux/sunxi/patches-4.4/130-pinctrl-sunxi-add-h3-pio.patch deleted file mode 100644 index 47dce12a9d3bc7..00000000000000 --- a/target/linux/sunxi/patches-4.4/130-pinctrl-sunxi-add-h3-pio.patch +++ /dev/null @@ -1,568 +0,0 @@ -From 03b83828e452418c18ba506e3e02b5deadbb53fa Mon Sep 17 00:00:00 2001 -From: Jens Kuske -Date: Tue, 27 Oct 2015 17:50:23 +0100 -Subject: [PATCH] pinctrl: sunxi: Add H3 PIO controller support - -The H3 uses the same pin controller as previous SoC's from Allwinner. -Add support for the pins controlled by the main PIO controller. - -Signed-off-by: Jens Kuske -Acked-by: Maxime Ripard ---- - .../bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 + - drivers/pinctrl/sunxi/Kconfig | 4 + - drivers/pinctrl/sunxi/Makefile | 1 + - drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c | 516 +++++++++++++++++++++ - 4 files changed, 522 insertions(+) - create mode 100644 drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c - ---- a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt -+++ b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt -@@ -18,6 +18,7 @@ Required properties: - "allwinner,sun8i-a23-r-pinctrl" - "allwinner,sun8i-a33-pinctrl" - "allwinner,sun8i-a83t-pinctrl" -+ "allwinner,sun8i-h3-pinctrl" - - - reg: Should contain the register physical address and length for the - pin controller. ---- a/drivers/pinctrl/sunxi/Kconfig -+++ b/drivers/pinctrl/sunxi/Kconfig -@@ -51,6 +51,10 @@ config PINCTRL_SUN8I_A23_R - depends on RESET_CONTROLLER - select PINCTRL_SUNXI_COMMON - -+config PINCTRL_SUN8I_H3 -+ def_bool MACH_SUN8I -+ select PINCTRL_SUNXI_COMMON -+ - config PINCTRL_SUN9I_A80 - def_bool MACH_SUN9I - select PINCTRL_SUNXI_COMMON ---- a/drivers/pinctrl/sunxi/Makefile -+++ b/drivers/pinctrl/sunxi/Makefile -@@ -13,4 +13,5 @@ obj-$(CONFIG_PINCTRL_SUN8I_A23) += pinc - obj-$(CONFIG_PINCTRL_SUN8I_A23_R) += pinctrl-sun8i-a23-r.o - obj-$(CONFIG_PINCTRL_SUN8I_A33) += pinctrl-sun8i-a33.o - obj-$(CONFIG_PINCTRL_SUN8I_A83T) += pinctrl-sun8i-a83t.o -+obj-$(CONFIG_PINCTRL_SUN8I_H3) += pinctrl-sun8i-h3.o - obj-$(CONFIG_PINCTRL_SUN9I_A80) += pinctrl-sun9i-a80.o ---- /dev/null -+++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c -@@ -0,0 +1,516 @@ -+/* -+ * Allwinner H3 SoCs pinctrl driver. -+ * -+ * Copyright (C) 2015 Jens Kuske -+ * -+ * Based on pinctrl-sun8i-a23.c, which is: -+ * Copyright (C) 2014 Chen-Yu Tsai -+ * Copyright (C) 2014 Maxime Ripard -+ * -+ * This file is licensed under the terms of the GNU General Public -+ * License version 2. This program is licensed "as is" without any -+ * warranty of any kind, whether express or implied. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include "pinctrl-sunxi.h" -+ -+static const struct sunxi_desc_pin sun8i_h3_pins[] = { -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 0), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "uart2"), /* TX */ -+ SUNXI_FUNCTION(0x3, "jtag"), /* MS */ -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 0)), /* PA_EINT0 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 1), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "uart2"), /* RX */ -+ SUNXI_FUNCTION(0x3, "jtag"), /* CK */ -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 1)), /* PA_EINT1 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 2), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "uart2"), /* RTS */ -+ SUNXI_FUNCTION(0x3, "jtag"), /* DO */ -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 2)), /* PA_EINT2 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 3), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "uart2"), /* CTS */ -+ SUNXI_FUNCTION(0x3, "jtag"), /* DI */ -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 3)), /* PA_EINT3 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 4), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "uart0"), /* TX */ -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 4)), /* PA_EINT4 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 5), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "uart0"), /* RX */ -+ SUNXI_FUNCTION(0x3, "pwm0"), -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 5)), /* PA_EINT5 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 6), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "sim"), /* PWREN */ -+ SUNXI_FUNCTION(0x3, "pwm1"), -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 6)), /* PA_EINT6 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 7), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "sim"), /* CLK */ -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 7)), /* PA_EINT7 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 8), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "sim"), /* DATA */ -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 8)), /* PA_EINT8 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 9), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "sim"), /* RST */ -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 9)), /* PA_EINT9 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 10), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "sim"), /* DET */ -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 10)), /* PA_EINT10 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 11), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "i2c0"), /* SCK */ -+ SUNXI_FUNCTION(0x3, "di"), /* TX */ -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 11)), /* PA_EINT11 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 12), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "i2c0"), /* SDA */ -+ SUNXI_FUNCTION(0x3, "di"), /* RX */ -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 12)), /* PA_EINT12 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 13), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "spi1"), /* CS */ -+ SUNXI_FUNCTION(0x3, "uart3"), /* TX */ -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 13)), /* PA_EINT13 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 14), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "spi1"), /* CLK */ -+ SUNXI_FUNCTION(0x3, "uart3"), /* RX */ -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 14)), /* PA_EINT14 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 15), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "spi1"), /* MOSI */ -+ SUNXI_FUNCTION(0x3, "uart3"), /* RTS */ -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 15)), /* PA_EINT15 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 16), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "spi1"), /* MISO */ -+ SUNXI_FUNCTION(0x3, "uart3"), /* CTS */ -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 16)), /* PA_EINT16 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 17), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "spdif"), /* OUT */ -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 17)), /* PA_EINT17 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 18), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "i2s0"), /* SYNC */ -+ SUNXI_FUNCTION(0x3, "i2c1"), /* SCK */ -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 18)), /* PA_EINT18 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 19), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "i2s0"), /* CLK */ -+ SUNXI_FUNCTION(0x3, "i2c1"), /* SDA */ -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 19)), /* PA_EINT19 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 20), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "i2s0"), /* DOUT */ -+ SUNXI_FUNCTION(0x3, "sim"), /* VPPEN */ -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 20)), /* PA_EINT20 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 21), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "i2s0"), /* DIN */ -+ SUNXI_FUNCTION(0x3, "sim"), /* VPPPP */ -+ SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 21)), /* PA_EINT21 */ -+ /* Hole */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 0), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "nand0"), /* WE */ -+ SUNXI_FUNCTION(0x3, "spi0")), /* MOSI */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 1), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "nand0"), /* ALE */ -+ SUNXI_FUNCTION(0x3, "spi0")), /* MISO */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 2), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "nand0"), /* CLE */ -+ SUNXI_FUNCTION(0x3, "spi0")), /* CLK */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 3), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "nand0"), /* CE1 */ -+ SUNXI_FUNCTION(0x3, "spi0")), /* CS */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 4), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "nand0")), /* CE0 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 5), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "nand0"), /* RE */ -+ SUNXI_FUNCTION(0x3, "mmc2")), /* CLK */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 6), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "nand0"), /* RB0 */ -+ SUNXI_FUNCTION(0x3, "mmc2")), /* CMD */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 7), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "nand0")), /* RB1 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 8), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "nand0"), /* DQ0 */ -+ SUNXI_FUNCTION(0x3, "mmc2")), /* D0 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 9), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "nand0"), /* DQ1 */ -+ SUNXI_FUNCTION(0x3, "mmc2")), /* D1 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 10), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "nand0"), /* DQ2 */ -+ SUNXI_FUNCTION(0x3, "mmc2")), /* D2 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 11), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "nand0"), /* DQ3 */ -+ SUNXI_FUNCTION(0x3, "mmc2")), /* D3 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 12), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "nand0"), /* DQ4 */ -+ SUNXI_FUNCTION(0x3, "mmc2")), /* D4 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 13), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "nand0"), /* DQ5 */ -+ SUNXI_FUNCTION(0x3, "mmc2")), /* D5 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 14), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "nand"), /* DQ6 */ -+ SUNXI_FUNCTION(0x3, "mmc2")), /* D6 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 15), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "nand"), /* DQ7 */ -+ SUNXI_FUNCTION(0x3, "mmc2")), /* D7 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 16), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "nand"), /* DQS */ -+ SUNXI_FUNCTION(0x3, "mmc2")), /* RST */ -+ /* Hole */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 0), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "emac")), /* RXD3 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 1), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "emac")), /* RXD2 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 2), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "emac")), /* RXD1 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 3), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "emac")), /* RXD0 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 4), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "emac")), /* RXCK */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 5), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "emac")), /* RXCTL/RCDV */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 6), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "emac")), /* RXERR */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 7), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "emac")), /* TXD3 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 8), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "emac")), /* TXD2L */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 9), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "emac")), /* TXD1 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 10), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "emac")), /* TXD0 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 11), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "emac")), /* CRS */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 12), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "emac")), /* TXCK */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 13), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "emac")), /* TXCTL/TXEN */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 14), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "emac")), /* TXERR */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 15), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "emac")), /* CLKIN/COL */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 16), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "emac")), /* MDC */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 17), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "emac")), /* MDIO */ -+ /* Hole */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 0), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "csi"), /* PCLK */ -+ SUNXI_FUNCTION(0x3, "ts")), /* CLK */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 1), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "csi"), /* MCLK */ -+ SUNXI_FUNCTION(0x3, "ts")), /* ERR */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 2), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "csi"), /* HSYNC */ -+ SUNXI_FUNCTION(0x3, "ts")), /* SYNC */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 3), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "csi"), /* VSYNC */ -+ SUNXI_FUNCTION(0x3, "ts")), /* DVLD */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 4), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "csi"), /* D0 */ -+ SUNXI_FUNCTION(0x3, "ts")), /* D0 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 5), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "csi"), /* D1 */ -+ SUNXI_FUNCTION(0x3, "ts")), /* D1 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 6), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "csi"), /* D2 */ -+ SUNXI_FUNCTION(0x3, "ts")), /* D2 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 7), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "csi"), /* D3 */ -+ SUNXI_FUNCTION(0x3, "ts")), /* D3 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 8), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "csi"), /* D4 */ -+ SUNXI_FUNCTION(0x3, "ts")), /* D4 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 9), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "csi"), /* D5 */ -+ SUNXI_FUNCTION(0x3, "ts")), /* D5 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 10), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "csi"), /* D6 */ -+ SUNXI_FUNCTION(0x3, "ts")), /* D6 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 11), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "csi"), /* D7 */ -+ SUNXI_FUNCTION(0x3, "ts")), /* D7 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 12), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "csi"), /* SCK */ -+ SUNXI_FUNCTION(0x3, "i2c2")), /* SCK */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 13), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "csi"), /* SDA */ -+ SUNXI_FUNCTION(0x3, "i2c2")), /* SDA */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 14), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out")), -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 15), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out")), -+ /* Hole */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 0), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "mmc0"), /* D1 */ -+ SUNXI_FUNCTION(0x3, "jtag")), /* MS */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 1), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "mmc0"), /* D0 */ -+ SUNXI_FUNCTION(0x3, "jtag")), /* DI */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 2), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "mmc0"), /* CLK */ -+ SUNXI_FUNCTION(0x3, "uart0")), /* TX */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 3), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "mmc0"), /* CMD */ -+ SUNXI_FUNCTION(0x3, "jtag")), /* DO */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 4), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "mmc0"), /* D3 */ -+ SUNXI_FUNCTION(0x3, "uart0")), /* RX */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 5), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "mmc0"), /* D2 */ -+ SUNXI_FUNCTION(0x3, "jtag")), /* CK */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 6), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "mmc0")), /* DET */ -+ /* Hole */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 0), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "mmc1"), /* CLK */ -+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 0)), /* PG_EINT0 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 1), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "mmc1"), /* CMD */ -+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 1)), /* PG_EINT1 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 2), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "mmc1"), /* D0 */ -+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 2)), /* PG_EINT2 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 3), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "mmc1"), /* D1 */ -+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 3)), /* PG_EINT3 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 4), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "mmc1"), /* D2 */ -+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 4)), /* PG_EINT4 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 5), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "mmc1"), /* D3 */ -+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 5)), /* PG_EINT5 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 6), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "uart1"), /* TX */ -+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 6)), /* PG_EINT6 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 7), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "uart1"), /* RX */ -+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 7)), /* PG_EINT7 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 8), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "uart1"), /* RTS */ -+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 8)), /* PG_EINT8 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 9), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "uart1"), /* CTS */ -+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 9)), /* PG_EINT9 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 10), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "i2s1"), /* SYNC */ -+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 10)), /* PG_EINT10 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 11), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "i2s1"), /* CLK */ -+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 11)), /* PG_EINT11 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 12), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "i2s1"), /* DOUT */ -+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 12)), /* PG_EINT12 */ -+ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 13), -+ SUNXI_FUNCTION(0x0, "gpio_in"), -+ SUNXI_FUNCTION(0x1, "gpio_out"), -+ SUNXI_FUNCTION(0x2, "i2s1"), /* DIN */ -+ SUNXI_FUNCTION_IRQ_BANK(0x4, 1, 13)), /* PG_EINT13 */ -+}; -+ -+static const struct sunxi_pinctrl_desc sun8i_h3_pinctrl_data = { -+ .pins = sun8i_h3_pins, -+ .npins = ARRAY_SIZE(sun8i_h3_pins), -+ .irq_banks = 2, -+}; -+ -+static int sun8i_h3_pinctrl_probe(struct platform_device *pdev) -+{ -+ return sunxi_pinctrl_init(pdev, -+ &sun8i_h3_pinctrl_data); -+} -+ -+static const struct of_device_id sun8i_h3_pinctrl_match[] = { -+ { .compatible = "allwinner,sun8i-h3-pinctrl", }, -+ {} -+}; -+ -+static struct platform_driver sun8i_h3_pinctrl_driver = { -+ .probe = sun8i_h3_pinctrl_probe, -+ .driver = { -+ .name = "sun8i-h3-pinctrl", -+ .of_match_table = sun8i_h3_pinctrl_match, -+ }, -+}; -+builtin_platform_driver(sun8i_h3_pinctrl_driver); diff --git a/target/linux/sunxi/patches-4.4/131-reset-add-h3-resets.patch b/target/linux/sunxi/patches-4.4/131-reset-add-h3-resets.patch deleted file mode 100644 index f8e599fbe39c3d..00000000000000 --- a/target/linux/sunxi/patches-4.4/131-reset-add-h3-resets.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 5f0bb9d0bc545ef53a83f7bd176fdc0736eed8e5 Mon Sep 17 00:00:00 2001 -From: Jens Kuske -Date: Tue, 27 Oct 2015 17:50:24 +0100 -Subject: [PATCH] reset: sunxi: Add Allwinner H3 bus resets - -The H3 bus resets have some holes between the registers, so we add -an of_xlate() function to skip them according to the datasheet. - -Signed-off-by: Jens Kuske ---- - .../bindings/reset/allwinner,sunxi-clock-reset.txt | 1 + - drivers/reset/reset-sunxi.c | 30 +++++++++++++++++++--- - 2 files changed, 28 insertions(+), 3 deletions(-) - ---- a/Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt -+++ b/Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt -@@ -8,6 +8,7 @@ Required properties: - - compatible: Should be one of the following: - "allwinner,sun6i-a31-ahb1-reset" - "allwinner,sun6i-a31-clock-reset" -+ "allwinner,sun8i-h3-bus-reset" - - reg: should be register base and length as documented in the - datasheet - - #reset-cells: 1, see below ---- a/drivers/reset/reset-sunxi.c -+++ b/drivers/reset/reset-sunxi.c -@@ -75,7 +75,9 @@ static struct reset_control_ops sunxi_re - .deassert = sunxi_reset_deassert, - }; - --static int sunxi_reset_init(struct device_node *np) -+static int sunxi_reset_init(struct device_node *np, -+ int (*of_xlate)(struct reset_controller_dev *rcdev, -+ const struct of_phandle_args *reset_spec)) - { - struct sunxi_reset_data *data; - struct resource res; -@@ -108,6 +110,7 @@ static int sunxi_reset_init(struct devic - data->rcdev.nr_resets = size * 32; - data->rcdev.ops = &sunxi_reset_ops; - data->rcdev.of_node = np; -+ data->rcdev.of_xlate = of_xlate; - reset_controller_register(&data->rcdev); - - return 0; -@@ -117,6 +120,21 @@ err_alloc: - return ret; - }; - -+static int sun8i_h3_bus_reset_xlate(struct reset_controller_dev *rcdev, -+ const struct of_phandle_args *reset_spec) -+{ -+ unsigned int index = reset_spec->args[0]; -+ -+ if (index < 96) -+ return index; -+ else if (index < 128) -+ return index + 32; -+ else if (index < 160) -+ return index + 64; -+ else -+ return -EINVAL; -+} -+ - /* - * These are the reset controller we need to initialize early on in - * our system, before we can even think of using a regular device -@@ -124,15 +142,21 @@ err_alloc: - */ - static const struct of_device_id sunxi_early_reset_dt_ids[] __initdata = { - { .compatible = "allwinner,sun6i-a31-ahb1-reset", }, -+ { .compatible = "allwinner,sun8i-h3-bus-reset", .data = sun8i_h3_bus_reset_xlate, }, - { /* sentinel */ }, - }; - - void __init sun6i_reset_init(void) - { - struct device_node *np; -- -- for_each_matching_node(np, sunxi_early_reset_dt_ids) -- sunxi_reset_init(np); -+ const struct of_device_id *match; -+ int (*of_xlate)(struct reset_controller_dev *rcdev, -+ const struct of_phandle_args *reset_spec); -+ -+ for_each_matching_node_and_match(np, sunxi_early_reset_dt_ids, &match) { -+ of_xlate = match->data; -+ sunxi_reset_init(np, of_xlate); -+ } - } - - /* diff --git a/target/linux/sunxi/patches-4.4/132-dt-sun8i-add-h3-usbclocks.patch b/target/linux/sunxi/patches-4.4/132-dt-sun8i-add-h3-usbclocks.patch deleted file mode 100644 index 13d44e44688e00..00000000000000 --- a/target/linux/sunxi/patches-4.4/132-dt-sun8i-add-h3-usbclocks.patch +++ /dev/null @@ -1,34 +0,0 @@ -From d6a71e3caae07fb2d98e93ee62477273abaceb27 Mon Sep 17 00:00:00 2001 -From: Reinder de Haan -Date: Tue, 3 Nov 2015 15:13:00 +0100 -Subject: [PATCH] ARM: dts: sun8i: Add support for H3 usb clocks - -Add a node describing the usb-clks found on the H3. - -Signed-off-by: Reinder de Haan -Signed-off-by: Hans de Goede ---- - arch/arm/boot/dts/sun8i-h3.dtsi | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - ---- a/arch/arm/boot/dts/sun8i-h3.dtsi -+++ b/arch/arm/boot/dts/sun8i-h3.dtsi -@@ -269,6 +269,18 @@ - "mmc2_sample"; - }; - -+ usb_clk: clk@01c200cc { -+ #clock-cells = <1>; -+ #reset-cells = <1>; -+ compatible = "allwinner,sun8i-h3-usb-clk"; -+ reg = <0x01c200cc 0x4>; -+ clocks = <&osc24M>; -+ clock-output-names = "usb_phy0", "usb_phy1", -+ "usb_phy2", "usb_phy3", -+ "usb_ohci0", "usb_ohci1", -+ "usb_ohci2", "usb_ohci3"; -+ }; -+ - mbus_clk: clk@01c2015c { - #clock-cells = <0>; - compatible = "allwinner,sun8i-a23-mbus-clk"; diff --git a/target/linux/sunxi/patches-4.4/133-dt-sun8i-add-usbphy-usbhost-ctrl-nodes.patch b/target/linux/sunxi/patches-4.4/133-dt-sun8i-add-usbphy-usbhost-ctrl-nodes.patch deleted file mode 100644 index 78dcaa9fec8465..00000000000000 --- a/target/linux/sunxi/patches-4.4/133-dt-sun8i-add-usbphy-usbhost-ctrl-nodes.patch +++ /dev/null @@ -1,123 +0,0 @@ -From 5971a2f283d21eab36d7de24d35301f081f83418 Mon Sep 17 00:00:00 2001 -From: Reinder de Haan -Date: Tue, 3 Nov 2015 15:14:20 +0100 -Subject: [PATCH] ARM: dts: sun8i: Add usbphy and usb host controller nodes - -Add nodes describing the H3's usbphy and usb host controller nodes. - -Signed-off-by: Reinder de Haan -Signed-off-by: Hans de Goede ---- - arch/arm/boot/dts/sun8i-h3.dtsi | 101 ++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 101 insertions(+) - ---- a/arch/arm/boot/dts/sun8i-h3.dtsi -+++ b/arch/arm/boot/dts/sun8i-h3.dtsi -@@ -362,6 +362,107 @@ - #size-cells = <0>; - }; - -+ usbphy: phy@01c19400 { -+ compatible = "allwinner,sun8i-h3-usb-phy"; -+ reg = <0x01c19400 0x2c>, -+ <0x01c1a800 0x4>, -+ <0x01c1b800 0x4>, -+ <0x01c1c800 0x4>, -+ <0x01c1d800 0x4>; -+ reg-names = "phy_ctrl", -+ "pmu0", -+ "pmu1", -+ "pmu2", -+ "pmu3"; -+ clocks = <&usb_clk 8>, -+ <&usb_clk 9>, -+ <&usb_clk 10>, -+ <&usb_clk 11>; -+ clock-names = "usb0_phy", -+ "usb1_phy", -+ "usb2_phy", -+ "usb3_phy"; -+ resets = <&usb_clk 0>, -+ <&usb_clk 1>, -+ <&usb_clk 2>, -+ <&usb_clk 3>; -+ reset-names = "usb0_reset", -+ "usb1_reset", -+ "usb2_reset", -+ "usb3_reset"; -+ status = "disabled"; -+ #phy-cells = <1>; -+ }; -+ -+ ehci1: usb@01c1b000 { -+ compatible = "allwinner,sun8i-h3-ehci", "generic-ehci"; -+ reg = <0x01c1b000 0x100>; -+ interrupts = ; -+ clocks = <&bus_gates 25>, <&bus_gates 29>; -+ resets = <&ahb_rst 25>, <&ahb_rst 29>; -+ phys = <&usbphy 1>; -+ phy-names = "usb"; -+ status = "disabled"; -+ }; -+ -+ ohci1: usb@01c1b400 { -+ compatible = "allwinner,sun8i-h3-ohci", "generic-ohci"; -+ reg = <0x01c1b400 0x100>; -+ interrupts = ; -+ clocks = <&bus_gates 29>, <&bus_gates 25>, -+ <&usb_clk 17>; -+ resets = <&ahb_rst 29>, <&ahb_rst 25>; -+ phys = <&usbphy 1>; -+ phy-names = "usb"; -+ status = "disabled"; -+ }; -+ -+ ehci2: usb@01c1c000 { -+ compatible = "allwinner,sun8i-h3-ehci", "generic-ehci"; -+ reg = <0x01c1c000 0x100>; -+ interrupts = ; -+ clocks = <&bus_gates 26>, <&bus_gates 30>; -+ resets = <&ahb_rst 26>, <&ahb_rst 30>; -+ phys = <&usbphy 2>; -+ phy-names = "usb"; -+ status = "disabled"; -+ }; -+ -+ ohci2: usb@01c1c400 { -+ compatible = "allwinner,sun8i-h3-ohci", "generic-ohci"; -+ reg = <0x01c1c400 0x100>; -+ interrupts = ; -+ clocks = <&bus_gates 30>, <&bus_gates 26>, -+ <&usb_clk 18>; -+ resets = <&ahb_rst 30>, <&ahb_rst 26>; -+ phys = <&usbphy 2>; -+ phy-names = "usb"; -+ status = "disabled"; -+ }; -+ -+ ehci3: usb@01c1d000 { -+ compatible = "allwinner,sun8i-h3-ehci", "generic-ehci"; -+ reg = <0x01c1d000 0x100>; -+ interrupts = ; -+ clocks = <&bus_gates 27>, <&bus_gates 31>; -+ resets = <&ahb_rst 27>, <&ahb_rst 31>; -+ phys = <&usbphy 3>; -+ phy-names = "usb"; -+ status = "disabled"; -+ }; -+ -+ ohci3: usb@01c1d400 { -+ compatible = "allwinner,sun8i-h3-ohci", "generic-ohci"; -+ reg = <0x01c1d400 0x100>; -+ interrupts = ; -+ clocks = <&bus_gates 31>, <&bus_gates 27>, -+ <&usb_clk 19>; -+ resets = <&ahb_rst 31>, <&ahb_rst 27>; -+ phys = <&usbphy 3>; -+ phy-names = "usb"; -+ status = "disabled"; -+ }; -+ - pio: pinctrl@01c20800 { - compatible = "allwinner,sun8i-h3-pinctrl"; - reg = <0x01c20800 0x400>; diff --git a/target/linux/sunxi/patches-4.4/134-dt-sun8i-orangepiplus-enable-usbhost.patch b/target/linux/sunxi/patches-4.4/134-dt-sun8i-orangepiplus-enable-usbhost.patch deleted file mode 100644 index 733639225c9b34..00000000000000 --- a/target/linux/sunxi/patches-4.4/134-dt-sun8i-orangepiplus-enable-usbhost.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 37e04fd781d3fc6d08116d38d34ec8124d916441 Mon Sep 17 00:00:00 2001 -From: Jens Kuske -Date: Tue, 17 Nov 2015 17:12:07 +0100 -Subject: [PATCH] ARM: dts: sun8i-h3-orangepi-plus: Enable USB host controllers - -Enable the 2 USB host controllers used on the Orange Pi Plus -and add the necessary regulators. - -Signed-off-by: Reinder de Haan -Signed-off-by: Hans de Goede -Signed-off-by: Jens Kuske ---- - arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 44 ++++++++++++++++++++++++++++ - 1 file changed, 44 insertions(+) - ---- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts -+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts -@@ -58,6 +58,35 @@ - chosen { - stdout-path = "serial0:115200n8"; - }; -+ -+ reg_usb3_vbus: usb3-vbus { -+ compatible = "regulator-fixed"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&usb3_vbus_pin_a>; -+ regulator-name = "usb3-vbus"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-boot-on; -+ enable-active-high; -+ gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; -+ }; -+}; -+ -+&ehci1 { -+ status = "okay"; -+}; -+ -+&ehci3 { -+ status = "okay"; -+}; -+ -+&pio { -+ usb3_vbus_pin_a: usb3_vbus_pin@0 { -+ allwinner,pins = "PG11"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; - }; - - &mmc0 { -@@ -70,8 +99,23 @@ - status = "okay"; - }; - -+®_usb1_vbus { -+ gpio = <&pio 6 13 GPIO_ACTIVE_HIGH>; -+ status = "okay"; -+}; -+ - &uart0 { - pinctrl-names = "default"; - pinctrl-0 = <&uart0_pins_a>; - status = "okay"; - }; -+ -+&usb1_vbus_pin_a { -+ allwinner,pins = "PG13"; -+}; -+ -+&usbphy { -+ usb1_vbus-supply = <®_usb1_vbus>; -+ usb3_vbus-supply = <®_usb3_vbus>; -+ status = "okay"; -+}; diff --git a/target/linux/sunxi/patches-4.4/135-clk-sunxi-fix-signedness-bug.patch b/target/linux/sunxi/patches-4.4/135-clk-sunxi-fix-signedness-bug.patch deleted file mode 100644 index a4b2af9e5a2fbd..00000000000000 --- a/target/linux/sunxi/patches-4.4/135-clk-sunxi-fix-signedness-bug.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b1558f168f4ef5956913d73fe330c4da85c74349 Mon Sep 17 00:00:00 2001 -From: Dan Carpenter -Date: Sat, 12 Dec 2015 15:43:46 +0300 -Subject: [PATCH] clk: sunxi: signedness bug in sun8i_h3_bus_gates_init() - -"index" needs to be signed for the error handling to work. - -Fixes: ab6e23a4e388 ('clk: sunxi: Add H3 clocks support') -Signed-off-by: Dan Carpenter -Signed-off-by: Maxime Ripard ---- - drivers/clk/sunxi/clk-sun8i-bus-gates.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/clk/sunxi/clk-sun8i-bus-gates.c -+++ b/drivers/clk/sunxi/clk-sun8i-bus-gates.c -@@ -40,7 +40,7 @@ static void __init sun8i_h3_bus_gates_in - const __be32 *p; - int number, i; - u8 clk_bit; -- u32 index; -+ int index; - - reg = of_io_request_and_map(node, 0, of_node_full_name(node)); - if (IS_ERR(reg)) diff --git a/target/linux/sunxi/patches-4.4/140-reset-add-of_reset_control_get_by_index.patch b/target/linux/sunxi/patches-4.4/140-reset-add-of_reset_control_get_by_index.patch deleted file mode 100644 index c7e0e2bf64cd9d..00000000000000 --- a/target/linux/sunxi/patches-4.4/140-reset-add-of_reset_control_get_by_index.patch +++ /dev/null @@ -1,109 +0,0 @@ -From b4faa163a7ebae9faab5d0aefe70143e3379178b Mon Sep 17 00:00:00 2001 -From: Vince Hsu -Date: Mon, 13 Jul 2015 13:39:39 +0100 -Subject: [PATCH] reset: add of_reset_control_get_by_index() - -Add of_reset_control_get_by_index() to allow the drivers to get reset -device without knowing its name. - -Signed-off-by: Vince Hsu -[jonathanh@nvidia.com: Updated stub function to return -ENOTSUPP instead - of -ENOSYS which should only be used for system calls.] -Signed-off-by: Jon Hunter -Signed-off-by: Philipp Zabel ---- - drivers/reset/core.c | 40 +++++++++++++++++++++++++++++----------- - include/linux/reset.h | 9 +++++++++ - 2 files changed, 38 insertions(+), 11 deletions(-) - ---- a/drivers/reset/core.c -+++ b/drivers/reset/core.c -@@ -141,27 +141,24 @@ int reset_control_status(struct reset_co - EXPORT_SYMBOL_GPL(reset_control_status); - - /** -- * of_reset_control_get - Lookup and obtain a reference to a reset controller. -+ * of_reset_control_get_by_index - Lookup and obtain a reference to a reset -+ * controller by index. - * @node: device to be reset by the controller -- * @id: reset line name -- * -- * Returns a struct reset_control or IS_ERR() condition containing errno. -+ * @index: index of the reset controller - * -- * Use of id names is optional. -+ * This is to be used to perform a list of resets for a device or power domain -+ * in whatever order. Returns a struct reset_control or IS_ERR() condition -+ * containing errno. - */ --struct reset_control *of_reset_control_get(struct device_node *node, -- const char *id) -+struct reset_control *of_reset_control_get_by_index(struct device_node *node, -+ int index) - { - struct reset_control *rstc = ERR_PTR(-EPROBE_DEFER); - struct reset_controller_dev *r, *rcdev; - struct of_phandle_args args; -- int index = 0; - int rstc_id; - int ret; - -- if (id) -- index = of_property_match_string(node, -- "reset-names", id); - ret = of_parse_phandle_with_args(node, "resets", "#reset-cells", - index, &args); - if (ret) -@@ -202,6 +199,27 @@ struct reset_control *of_reset_control_g - - return rstc; - } -+EXPORT_SYMBOL_GPL(of_reset_control_get_by_index); -+ -+/** -+ * of_reset_control_get - Lookup and obtain a reference to a reset controller. -+ * @node: device to be reset by the controller -+ * @id: reset line name -+ * -+ * Returns a struct reset_control or IS_ERR() condition containing errno. -+ * -+ * Use of id names is optional. -+ */ -+struct reset_control *of_reset_control_get(struct device_node *node, -+ const char *id) -+{ -+ int index = 0; -+ -+ if (id) -+ index = of_property_match_string(node, -+ "reset-names", id); -+ return of_reset_control_get_by_index(node, index); -+} - EXPORT_SYMBOL_GPL(of_reset_control_get); - - /** ---- a/include/linux/reset.h -+++ b/include/linux/reset.h -@@ -38,6 +38,9 @@ static inline struct reset_control *devm - struct reset_control *of_reset_control_get(struct device_node *node, - const char *id); - -+struct reset_control *of_reset_control_get_by_index( -+ struct device_node *node, int index); -+ - #else - - static inline int reset_control_reset(struct reset_control *rstc) -@@ -106,6 +109,12 @@ static inline struct reset_control *of_r - return ERR_PTR(-ENOSYS); - } - -+static inline struct reset_control *of_reset_control_get_by_index( -+ struct device_node *node, int index) -+{ -+ return ERR_PTR(-ENOTSUPP); -+} -+ - #endif /* CONFIG_RESET_CONTROLLER */ - - #endif diff --git a/target/linux/sunxi/patches-4.4/141-reset-fix-of_reset_control_get.patch b/target/linux/sunxi/patches-4.4/141-reset-fix-of_reset_control_get.patch deleted file mode 100644 index eeab4972bace20..00000000000000 --- a/target/linux/sunxi/patches-4.4/141-reset-fix-of_reset_control_get.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 7fd7a26b60090a7df15f30ba10b0d39cbbd6a94e Mon Sep 17 00:00:00 2001 -From: Alban Bedel -Date: Tue, 1 Sep 2015 17:28:31 +0200 -Subject: [PATCH] reset: Fix of_reset_control_get() for consistent return - values - -When of_reset_control_get() is called without connection ID it returns --ENOENT when the 'resets' property doesn't exists or is an empty entry. -However when a connection ID is given it returns -EINVAL when the 'resets' -property doesn't exists or the requested name can't be found. This is -because the error code returned by of_property_match_string() is just -passed down as an index to of_parse_phandle_with_args(), which then -returns -EINVAL. - -To get a consistent return value with both code paths we must return --ENOENT when of_property_match_string() fails. - -Signed-off-by: Alban Bedel -Signed-off-by: Philipp Zabel ---- - drivers/reset/core.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - ---- a/drivers/reset/core.c -+++ b/drivers/reset/core.c -@@ -215,9 +215,12 @@ struct reset_control *of_reset_control_g - { - int index = 0; - -- if (id) -+ if (id) { - index = of_property_match_string(node, - "reset-names", id); -+ if (index < 0) -+ return ERR_PTR(-ENOENT); -+ } - return of_reset_control_get_by_index(node, index); - } - EXPORT_SYMBOL_GPL(of_reset_control_get); diff --git a/target/linux/sunxi/patches-4.4/142-reset-use-ENOTSUPP-instead-of-ENOSYS.patch b/target/linux/sunxi/patches-4.4/142-reset-use-ENOTSUPP-instead-of-ENOSYS.patch deleted file mode 100644 index 665b15b00aea13..00000000000000 --- a/target/linux/sunxi/patches-4.4/142-reset-use-ENOTSUPP-instead-of-ENOSYS.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 5a819175b911ce33f3337e1e069d4bcea1ec4788 Mon Sep 17 00:00:00 2001 -From: Philipp Zabel -Date: Thu, 29 Oct 2015 09:55:00 +0100 -Subject: [PATCH] reset: use ENOTSUPP instead of ENOSYS - -ENOSYS is reserved to report invalid syscalls to userspace. -Consistently return ENOTSUPP to indicate that the driver doesn't support -the functionality or the reset framework is not enabled at all. - -Signed-off-by: Philipp Zabel ---- - drivers/reset/core.c | 8 ++++---- - include/linux/reset.h | 8 ++++---- - 2 files changed, 8 insertions(+), 8 deletions(-) - ---- a/drivers/reset/core.c -+++ b/drivers/reset/core.c -@@ -95,7 +95,7 @@ int reset_control_reset(struct reset_con - if (rstc->rcdev->ops->reset) - return rstc->rcdev->ops->reset(rstc->rcdev, rstc->id); - -- return -ENOSYS; -+ return -ENOTSUPP; - } - EXPORT_SYMBOL_GPL(reset_control_reset); - -@@ -108,7 +108,7 @@ int reset_control_assert(struct reset_co - if (rstc->rcdev->ops->assert) - return rstc->rcdev->ops->assert(rstc->rcdev, rstc->id); - -- return -ENOSYS; -+ return -ENOTSUPP; - } - EXPORT_SYMBOL_GPL(reset_control_assert); - -@@ -121,7 +121,7 @@ int reset_control_deassert(struct reset_ - if (rstc->rcdev->ops->deassert) - return rstc->rcdev->ops->deassert(rstc->rcdev, rstc->id); - -- return -ENOSYS; -+ return -ENOTSUPP; - } - EXPORT_SYMBOL_GPL(reset_control_deassert); - -@@ -136,7 +136,7 @@ int reset_control_status(struct reset_co - if (rstc->rcdev->ops->status) - return rstc->rcdev->ops->status(rstc->rcdev, rstc->id); - -- return -ENOSYS; -+ return -ENOTSUPP; - } - EXPORT_SYMBOL_GPL(reset_control_status); - ---- a/include/linux/reset.h -+++ b/include/linux/reset.h -@@ -74,7 +74,7 @@ static inline void reset_control_put(str - - static inline int device_reset_optional(struct device *dev) - { -- return -ENOSYS; -+ return -ENOTSUPP; - } - - static inline struct reset_control *__must_check reset_control_get( -@@ -94,19 +94,19 @@ static inline struct reset_control *__mu - static inline struct reset_control *reset_control_get_optional( - struct device *dev, const char *id) - { -- return ERR_PTR(-ENOSYS); -+ return ERR_PTR(-ENOTSUPP); - } - - static inline struct reset_control *devm_reset_control_get_optional( - struct device *dev, const char *id) - { -- return ERR_PTR(-ENOSYS); -+ return ERR_PTR(-ENOTSUPP); - } - - static inline struct reset_control *of_reset_control_get( - struct device_node *node, const char *id) - { -- return ERR_PTR(-ENOSYS); -+ return ERR_PTR(-ENOTSUPP); - } - - static inline struct reset_control *of_reset_control_get_by_index( diff --git a/target/linux/sunxi/patches-4.4/143-reset-add-shared-resetcontrol-asserts.patch b/target/linux/sunxi/patches-4.4/143-reset-add-shared-resetcontrol-asserts.patch deleted file mode 100644 index e1078e96961d8d..00000000000000 --- a/target/linux/sunxi/patches-4.4/143-reset-add-shared-resetcontrol-asserts.patch +++ /dev/null @@ -1,265 +0,0 @@ -From d25cfe9b4f9663216ce4e011e3f1e7fa669ab58a Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Fri, 27 Nov 2015 21:09:05 +0100 -Subject: [PATCH] reset: Add shared reset_control_[de]assert variants - -Add reset_control_deassert_shared / reset_control_assert_shared -functions which are intended for use by drivers for hw blocks which -(may) share a reset line with another driver / hw block. - -Unlike the regular reset_control_[de]assert functions these functions -keep track of how often deassert_shared / assert_shared have been called -and keep the line deasserted as long as deassert has been called more -times than assert. - -Signed-off-by: Hans de Goede ---- -Changes in v2: --This is a new patch in v2 of this patch-set ---- - drivers/reset/core.c | 121 ++++++++++++++++++++++++++++++++++++--- - include/linux/reset-controller.h | 2 + - include/linux/reset.h | 2 + - 3 files changed, 116 insertions(+), 9 deletions(-) - ---- a/drivers/reset/core.c -+++ b/drivers/reset/core.c -@@ -22,16 +22,29 @@ static DEFINE_MUTEX(reset_controller_lis - static LIST_HEAD(reset_controller_list); - - /** -+ * struct reset_line - a reset line -+ * @list: list entry for the reset controllers reset line list -+ * @id: ID of the reset line in the reset controller device -+ * @refcnt: Number of reset_control structs referencing this device -+ * @deassert_cnt: Number of times this reset line has been deasserted -+ */ -+struct reset_line { -+ struct list_head list; -+ unsigned int id; -+ unsigned int refcnt; -+ unsigned int deassert_cnt; -+}; -+ -+/** - * struct reset_control - a reset control - * @rcdev: a pointer to the reset controller device - * this reset control belongs to -- * @id: ID of the reset controller in the reset -- * controller device -+ * @line: reset line for this reset control - */ - struct reset_control { - struct reset_controller_dev *rcdev; -+ struct reset_line *line; - struct device *dev; -- unsigned int id; - }; - - /** -@@ -66,6 +79,8 @@ int reset_controller_register(struct res - rcdev->of_xlate = of_reset_simple_xlate; - } - -+ INIT_LIST_HEAD(&rcdev->reset_line_head); -+ - mutex_lock(&reset_controller_list_mutex); - list_add(&rcdev->list, &reset_controller_list); - mutex_unlock(&reset_controller_list_mutex); -@@ -93,7 +108,7 @@ EXPORT_SYMBOL_GPL(reset_controller_unreg - int reset_control_reset(struct reset_control *rstc) - { - if (rstc->rcdev->ops->reset) -- return rstc->rcdev->ops->reset(rstc->rcdev, rstc->id); -+ return rstc->rcdev->ops->reset(rstc->rcdev, rstc->line->id); - - return -ENOTSUPP; - } -@@ -106,7 +121,7 @@ EXPORT_SYMBOL_GPL(reset_control_reset); - int reset_control_assert(struct reset_control *rstc) - { - if (rstc->rcdev->ops->assert) -- return rstc->rcdev->ops->assert(rstc->rcdev, rstc->id); -+ return rstc->rcdev->ops->assert(rstc->rcdev, rstc->line->id); - - return -ENOTSUPP; - } -@@ -119,13 +134,55 @@ EXPORT_SYMBOL_GPL(reset_control_assert); - int reset_control_deassert(struct reset_control *rstc) - { - if (rstc->rcdev->ops->deassert) -- return rstc->rcdev->ops->deassert(rstc->rcdev, rstc->id); -+ return rstc->rcdev->ops->deassert(rstc->rcdev, rstc->line->id); - - return -ENOTSUPP; - } - EXPORT_SYMBOL_GPL(reset_control_deassert); - - /** -+ * reset_control_assert_shared - asserts a shared reset line -+ * @rstc: reset controller -+ * -+ * Assert a shared reset line, this functions decreases the deassert count -+ * of the line by one and asserts it if, and only if, the deassert count -+ * reaches 0. -+ */ -+int reset_control_assert_shared(struct reset_control *rstc) -+{ -+ if (!rstc->rcdev->ops->assert) -+ return -ENOTSUPP; -+ -+ rstc->line->deassert_cnt--; -+ if (rstc->line->deassert_cnt) -+ return 0; -+ -+ return rstc->rcdev->ops->assert(rstc->rcdev, rstc->line->id); -+} -+EXPORT_SYMBOL_GPL(reset_control_assert_shared); -+ -+/** -+ * reset_control_deassert_shared - deasserts a shared reset line -+ * @rstc: reset controller -+ * -+ * Assert a shared reset line, this functions increases the deassert count -+ * of the line by one and deasserts the reset line (if it was not already -+ * deasserted). -+ */ -+int reset_control_deassert_shared(struct reset_control *rstc) -+{ -+ if (!rstc->rcdev->ops->deassert) -+ return -ENOTSUPP; -+ -+ rstc->line->deassert_cnt++; -+ if (rstc->line->deassert_cnt != 1) -+ return 0; -+ -+ return rstc->rcdev->ops->deassert(rstc->rcdev, rstc->line->id); -+} -+EXPORT_SYMBOL_GPL(reset_control_deassert_shared); -+ -+/** - * reset_control_status - returns a negative errno if not supported, a - * positive value if the reset line is asserted, or zero if the reset - * line is not asserted. -@@ -134,12 +191,47 @@ EXPORT_SYMBOL_GPL(reset_control_deassert - int reset_control_status(struct reset_control *rstc) - { - if (rstc->rcdev->ops->status) -- return rstc->rcdev->ops->status(rstc->rcdev, rstc->id); -+ return rstc->rcdev->ops->status(rstc->rcdev, rstc->line->id); - - return -ENOTSUPP; - } - EXPORT_SYMBOL_GPL(reset_control_status); - -+static struct reset_line *reset_line_get(struct reset_controller_dev *rcdev, -+ unsigned int index) -+{ -+ struct reset_line *line; -+ -+ list_for_each_entry(line, &rcdev->reset_line_head, list) { -+ if (line->id == index) { -+ line->refcnt++; -+ return line; -+ } -+ } -+ -+ line = kzalloc(sizeof(*line), GFP_KERNEL); -+ if (!line) -+ return NULL; -+ -+ list_add(&line->list, &rcdev->reset_line_head); -+ line->id = index; -+ line->refcnt = 1; -+ -+ return line; -+} -+ -+static void reset_line_put(struct reset_line *line) -+{ -+ if (!line) -+ return; -+ -+ if (--line->refcnt) -+ return; -+ -+ list_del(&line->list); -+ kfree(line); -+} -+ - /** - * of_reset_control_get_by_index - Lookup and obtain a reference to a reset - * controller by index. -@@ -155,6 +247,7 @@ struct reset_control *of_reset_control_g - { - struct reset_control *rstc = ERR_PTR(-EPROBE_DEFER); - struct reset_controller_dev *r, *rcdev; -+ struct reset_line *line; - struct of_phandle_args args; - int rstc_id; - int ret; -@@ -186,16 +279,22 @@ struct reset_control *of_reset_control_g - } - - try_module_get(rcdev->owner); -+ -+ /* reset_controller_list_mutex also protects the reset_line list */ -+ line = reset_line_get(rcdev, rstc_id); -+ - mutex_unlock(&reset_controller_list_mutex); - - rstc = kzalloc(sizeof(*rstc), GFP_KERNEL); -- if (!rstc) { -+ if (!line || !rstc) { -+ kfree(rstc); -+ reset_line_put(line); - module_put(rcdev->owner); - return ERR_PTR(-ENOMEM); - } - - rstc->rcdev = rcdev; -- rstc->id = rstc_id; -+ rstc->line = line; - - return rstc; - } -@@ -259,6 +358,10 @@ void reset_control_put(struct reset_cont - if (IS_ERR(rstc)) - return; - -+ mutex_lock(&reset_controller_list_mutex); -+ reset_line_put(rstc->line); -+ mutex_unlock(&reset_controller_list_mutex); -+ - module_put(rstc->rcdev->owner); - kfree(rstc); - } ---- a/include/linux/reset-controller.h -+++ b/include/linux/reset-controller.h -@@ -31,6 +31,7 @@ struct of_phandle_args; - * @ops: a pointer to device specific struct reset_control_ops - * @owner: kernel module of the reset controller driver - * @list: internal list of reset controller devices -+ * @reset_line_head: head of internal list of reset lines - * @of_node: corresponding device tree node as phandle target - * @of_reset_n_cells: number of cells in reset line specifiers - * @of_xlate: translation function to translate from specifier as found in the -@@ -41,6 +42,7 @@ struct reset_controller_dev { - struct reset_control_ops *ops; - struct module *owner; - struct list_head list; -+ struct list_head reset_line_head; - struct device_node *of_node; - int of_reset_n_cells; - int (*of_xlate)(struct reset_controller_dev *rcdev, ---- a/include/linux/reset.h -+++ b/include/linux/reset.h -@@ -11,6 +11,8 @@ int reset_control_reset(struct reset_con - int reset_control_assert(struct reset_control *rstc); - int reset_control_deassert(struct reset_control *rstc); - int reset_control_status(struct reset_control *rstc); -+int reset_control_assert_shared(struct reset_control *rstc); -+int reset_control_deassert_shared(struct reset_control *rstc); - - struct reset_control *reset_control_get(struct device *dev, const char *id); - void reset_control_put(struct reset_control *rstc); diff --git a/target/linux/sunxi/patches-4.4/144-usb-ehci-plat-support-multiple-reset-ctrllines.patch b/target/linux/sunxi/patches-4.4/144-usb-ehci-plat-support-multiple-reset-ctrllines.patch deleted file mode 100644 index 73cd3027bf91c6..00000000000000 --- a/target/linux/sunxi/patches-4.4/144-usb-ehci-plat-support-multiple-reset-ctrllines.patch +++ /dev/null @@ -1,127 +0,0 @@ -From 957e8f96c67052ca843ea9ffc5223662b973e5de Mon Sep 17 00:00:00 2001 -From: Reinder de Haan -Date: Sun, 15 Nov 2015 14:24:46 +0100 -Subject: [PATCH] ehci-platform: Add support for controllers with multiple - reset lines - -At least the EHCI/OHCI found on the Allwinnner H3 SoC needs multiple -reset lines, the controller will not initialize while the reset for -its companion is still asserted, which means we need to de-assert -2 resets for the controller to work. - -Signed-off-by: Reinder de Haan -Signed-off-by: Hans de Goede ---- -Changes in v2: --Use the new reset_control_[de]assert_shared reset-controller functions ---- - Documentation/devicetree/bindings/usb/usb-ehci.txt | 2 +- - drivers/usb/host/ehci-platform.c | 47 +++++++++++++--------- - 2 files changed, 30 insertions(+), 19 deletions(-) - ---- a/Documentation/devicetree/bindings/usb/usb-ehci.txt -+++ b/Documentation/devicetree/bindings/usb/usb-ehci.txt -@@ -18,7 +18,7 @@ Optional properties: - - clocks : a list of phandle + clock specifier pairs - - phys : phandle + phy specifier pair - - phy-names : "usb" -- - resets : phandle + reset specifier pair -+ - resets : a list of phandle + reset specifier pairs - - Example (Sequoia 440EPx): - ehci@e0000300 { ---- a/drivers/usb/host/ehci-platform.c -+++ b/drivers/usb/host/ehci-platform.c -@@ -39,11 +39,12 @@ - - #define DRIVER_DESC "EHCI generic platform driver" - #define EHCI_MAX_CLKS 3 -+#define EHCI_MAX_RESETS 2 - #define hcd_to_ehci_priv(h) ((struct ehci_platform_priv *)hcd_to_ehci(h)->priv) - - struct ehci_platform_priv { - struct clk *clks[EHCI_MAX_CLKS]; -- struct reset_control *rst; -+ struct reset_control *resets[EHCI_MAX_RESETS]; - struct phy **phys; - int num_phys; - bool reset_on_resume; -@@ -149,7 +150,7 @@ static int ehci_platform_probe(struct pl - struct usb_ehci_pdata *pdata = dev_get_platdata(&dev->dev); - struct ehci_platform_priv *priv; - struct ehci_hcd *ehci; -- int err, irq, phy_num, clk = 0; -+ int err, irq, phy_num, clk = 0, rst = 0; - - if (usb_disabled()) - return -ENODEV; -@@ -232,18 +233,24 @@ static int ehci_platform_probe(struct pl - break; - } - } -- } - -- priv->rst = devm_reset_control_get_optional(&dev->dev, NULL); -- if (IS_ERR(priv->rst)) { -- err = PTR_ERR(priv->rst); -- if (err == -EPROBE_DEFER) -- goto err_put_clks; -- priv->rst = NULL; -- } else { -- err = reset_control_deassert(priv->rst); -- if (err) -- goto err_put_clks; -+ for (rst = 0; rst < EHCI_MAX_RESETS; rst++) { -+ priv->resets[rst] = -+ of_reset_control_get_by_index(dev->dev.of_node, -+ rst); -+ if (IS_ERR(priv->resets[rst])) { -+ err = PTR_ERR(priv->resets[rst]); -+ if (err == -EPROBE_DEFER) -+ goto err_reset; -+ priv->resets[rst] = NULL; -+ break; -+ } -+ err = reset_control_deassert_shared(priv->resets[rst]); -+ if (err) { -+ reset_control_put(priv->resets[rst]); -+ goto err_reset; -+ } -+ } - } - - if (pdata->big_endian_desc) -@@ -302,8 +309,10 @@ err_power: - if (pdata->power_off) - pdata->power_off(dev); - err_reset: -- if (priv->rst) -- reset_control_assert(priv->rst); -+ while (--rst >= 0) { -+ reset_control_assert_shared(priv->resets[rst]); -+ reset_control_put(priv->resets[rst]); -+ } - err_put_clks: - while (--clk >= 0) - clk_put(priv->clks[clk]); -@@ -321,15 +330,17 @@ static int ehci_platform_remove(struct p - struct usb_hcd *hcd = platform_get_drvdata(dev); - struct usb_ehci_pdata *pdata = dev_get_platdata(&dev->dev); - struct ehci_platform_priv *priv = hcd_to_ehci_priv(hcd); -- int clk; -+ int clk, rst; - - usb_remove_hcd(hcd); - - if (pdata->power_off) - pdata->power_off(dev); - -- if (priv->rst) -- reset_control_assert(priv->rst); -+ for (rst = 0; rst < EHCI_MAX_RESETS && priv->resets[rst]; rst++) { -+ reset_control_assert_shared(priv->resets[rst]); -+ reset_control_put(priv->resets[rst]); -+ } - - for (clk = 0; clk < EHCI_MAX_CLKS && priv->clks[clk]; clk++) - clk_put(priv->clks[clk]); diff --git a/target/linux/sunxi/patches-4.4/145-usb-ohci-plat-support-multiple-reset-ctrllines.patch b/target/linux/sunxi/patches-4.4/145-usb-ohci-plat-support-multiple-reset-ctrllines.patch deleted file mode 100644 index a25d487aad532b..00000000000000 --- a/target/linux/sunxi/patches-4.4/145-usb-ohci-plat-support-multiple-reset-ctrllines.patch +++ /dev/null @@ -1,128 +0,0 @@ -From 5f0c864c1f207dba1db587747a58ec6b362dadf8 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Sun, 29 Nov 2015 18:44:14 +0100 -Subject: [PATCH] ohci-platform: Add support for controllers with multiple - reset lines - -At least the EHCI/OHCI found on the Allwinnner H3 SoC needs multiple -reset lines, the controller will not initialize while the reset for -its companion is still asserted, which means we need to de-assert -2 resets for the controller to work. - -Signed-off-by: Hans de Goede ---- -Changes in v2: --New patch in v2 of this patch-set, to complement the identical patch for - the ehci-platform code ---- - Documentation/devicetree/bindings/usb/usb-ohci.txt | 2 +- - drivers/usb/host/ohci-platform.c | 49 +++++++++++++--------- - 2 files changed, 30 insertions(+), 21 deletions(-) - ---- a/Documentation/devicetree/bindings/usb/usb-ohci.txt -+++ b/Documentation/devicetree/bindings/usb/usb-ohci.txt -@@ -14,7 +14,7 @@ Optional properties: - - clocks : a list of phandle + clock specifier pairs - - phys : phandle + phy specifier pair - - phy-names : "usb" --- resets : phandle + reset specifier pair -+- resets : a list of phandle + reset specifier pairs - - Example: - ---- a/drivers/usb/host/ohci-platform.c -+++ b/drivers/usb/host/ohci-platform.c -@@ -33,11 +33,12 @@ - - #define DRIVER_DESC "OHCI generic platform driver" - #define OHCI_MAX_CLKS 3 -+#define OHCI_MAX_RESETS 2 - #define hcd_to_ohci_priv(h) ((struct ohci_platform_priv *)hcd_to_ohci(h)->priv) - - struct ohci_platform_priv { - struct clk *clks[OHCI_MAX_CLKS]; -- struct reset_control *rst; -+ struct reset_control *resets[OHCI_MAX_RESETS]; - struct phy **phys; - int num_phys; - }; -@@ -117,7 +118,7 @@ static int ohci_platform_probe(struct pl - struct usb_ohci_pdata *pdata = dev_get_platdata(&dev->dev); - struct ohci_platform_priv *priv; - struct ohci_hcd *ohci; -- int err, irq, phy_num, clk = 0; -+ int err, irq, phy_num, clk = 0, rst = 0; - - if (usb_disabled()) - return -ENODEV; -@@ -195,19 +196,23 @@ static int ohci_platform_probe(struct pl - break; - } - } -- -- } -- -- priv->rst = devm_reset_control_get_optional(&dev->dev, NULL); -- if (IS_ERR(priv->rst)) { -- err = PTR_ERR(priv->rst); -- if (err == -EPROBE_DEFER) -- goto err_put_clks; -- priv->rst = NULL; -- } else { -- err = reset_control_deassert(priv->rst); -- if (err) -- goto err_put_clks; -+ for (rst = 0; rst < OHCI_MAX_RESETS; rst++) { -+ priv->resets[rst] = -+ of_reset_control_get_by_index(dev->dev.of_node, -+ rst); -+ if (IS_ERR(priv->resets[rst])) { -+ err = PTR_ERR(priv->resets[rst]); -+ if (err == -EPROBE_DEFER) -+ goto err_reset; -+ priv->resets[rst] = NULL; -+ break; -+ } -+ err = reset_control_deassert_shared(priv->resets[rst]); -+ if (err) { -+ reset_control_put(priv->resets[rst]); -+ goto err_reset; -+ } -+ } - } - - if (pdata->big_endian_desc) -@@ -265,8 +270,10 @@ err_power: - if (pdata->power_off) - pdata->power_off(dev); - err_reset: -- if (priv->rst) -- reset_control_assert(priv->rst); -+ while (--rst >= 0) { -+ reset_control_assert_shared(priv->resets[rst]); -+ reset_control_put(priv->resets[rst]); -+ } - err_put_clks: - while (--clk >= 0) - clk_put(priv->clks[clk]); -@@ -284,15 +291,17 @@ static int ohci_platform_remove(struct p - struct usb_hcd *hcd = platform_get_drvdata(dev); - struct usb_ohci_pdata *pdata = dev_get_platdata(&dev->dev); - struct ohci_platform_priv *priv = hcd_to_ohci_priv(hcd); -- int clk; -+ int clk, rst; - - usb_remove_hcd(hcd); - - if (pdata->power_off) - pdata->power_off(dev); - -- if (priv->rst) -- reset_control_assert(priv->rst); -+ for (rst = 0; rst < OHCI_MAX_RESETS && priv->resets[rst]; rst++) { -+ reset_control_assert_shared(priv->resets[rst]); -+ reset_control_put(priv->resets[rst]); -+ } - - for (clk = 0; clk < OHCI_MAX_CLKS && priv->clks[clk]; clk++) - clk_put(priv->clks[clk]); diff --git a/target/linux/sunxi/patches-4.4/150-dt-sun7i-enable-codec-on-pcduino3.patch b/target/linux/sunxi/patches-4.4/150-dt-sun7i-enable-codec-on-pcduino3.patch deleted file mode 100644 index c967ca91a760a4..00000000000000 --- a/target/linux/sunxi/patches-4.4/150-dt-sun7i-enable-codec-on-pcduino3.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 5296d8ff65298091758aa8d50d00539cd3781042 Mon Sep 17 00:00:00 2001 -From: Jelle van der Waa -Date: Sun, 9 Aug 2015 18:51:22 +0200 -Subject: [PATCH] ARM: dts: sun7i: Enable audio codec on pcDuino - -Enable the on-chip audio codec - -Signed-off-by: Jelle van der Waa -Signed-off-by: Hans de Goede ---- - arch/arm/boot/dts/sun7i-a20-pcduino3.dts | 5 +++++ - 1 file changed, 5 insertions(+) - ---- a/arch/arm/boot/dts/sun7i-a20-pcduino3.dts -+++ b/arch/arm/boot/dts/sun7i-a20-pcduino3.dts -@@ -111,6 +111,11 @@ - allwinner,pins = "PH2"; - }; - -+ -+&codec { -+ status = "okay"; -+}; -+ - &cpu0 { - cpu-supply = <®_dcdc2>; - }; diff --git a/target/linux/sunxi/patches-4.4/200-dt-sun7i-add-lamobo-r1.patch b/target/linux/sunxi/patches-4.4/200-dt-sun7i-add-lamobo-r1.patch deleted file mode 100644 index b1e00b45ab3ccf..00000000000000 --- a/target/linux/sunxi/patches-4.4/200-dt-sun7i-add-lamobo-r1.patch +++ /dev/null @@ -1,330 +0,0 @@ -From 46662c86b453d7098ff22d6112d0481f07d523a1 Mon Sep 17 00:00:00 2001 -From: Jelle de Jong -Date: Sun, 18 Oct 2015 16:34:39 +0200 -Subject: [PATCH] ARM: dts: sun7i: Add dts file for the lamobo-r1 board - -The lamobo-r1 board, sometimes called the BPI-R1 but not labelled as such -on the PCB, is meant as a A20 based router board. As such the board comes -with a built-in switch chip giving it 5 gigabit ethernet boards, and it -has a large empty area on the pcb with mounting holes which will fit a -2.5 inch harddisk. To complete its networking features it has a -Realtek RTL8192CU for WiFi 802.11 b/g/n. - -Signed-off-by: Jelle de Jong -Signed-off-by: Hans de Goede ---- - arch/arm/boot/dts/Makefile | 1 + - arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts | 297 ++++++++++++++++++++++++++++++ - 2 files changed, 298 insertions(+) - create mode 100644 arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts - ---- a/arch/arm/boot/dts/Makefile -+++ b/arch/arm/boot/dts/Makefile -@@ -638,6 +638,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \ - sun7i-a20-cubietruck.dtb \ - sun7i-a20-hummingbird.dtb \ - sun7i-a20-i12-tvbox.dtb \ -+ sun7i-a20-lamobo-r1.dtb \ - sun7i-a20-m3.dtb \ - sun7i-a20-mk808c.dtb \ - sun7i-a20-olimex-som-evb.dtb \ ---- /dev/null -+++ b/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts -@@ -0,0 +1,297 @@ -+/* -+ * Copyright 2015 Jelle de Jong -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) This file 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; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+/dts-v1/; -+#include "sun7i-a20.dtsi" -+#include "sunxi-common-regulators.dtsi" -+ -+#include -+#include -+#include -+ -+/ { -+ model = "Lamobo R1"; -+ compatible = "lamobo,lamobo-r1", "allwinner,sun7i-a20"; -+ -+ aliases { -+ serial0 = &uart0; -+ serial1 = &uart3; -+ serial2 = &uart7; -+ }; -+ -+ chosen { -+ stdout-path = "serial0:115200n8"; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&led_pins_lamobo_r1>; -+ -+ green { -+ label = "lamobo_r1:green:usr"; -+ gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>; -+ }; -+ }; -+ -+ reg_gmac_3v3: gmac-3v3 { -+ compatible = "regulator-fixed"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&gmac_power_pin_lamobo_r1>; -+ regulator-name = "gmac-3v3"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ startup-delay-us = <100000>; -+ enable-active-high; -+ gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; /* PH23 */ -+ }; -+}; -+ -+&ahci_pwr_pin_a { -+ allwinner,pins = "PB3"; -+}; -+ -+&ahci { -+ target-supply = <®_ahci_5v>; -+ status = "okay"; -+}; -+ -+&cpu0 { -+ cpu-supply = <®_dcdc2>; -+ operating-points = < -+ /* kHz uV */ -+ 960000 1400000 -+ 912000 1400000 -+ 864000 1350000 -+ 720000 1250000 -+ 528000 1150000 -+ 312000 1100000 -+ 144000 1050000 -+ >; -+}; -+ -+&ehci0 { -+ status = "okay"; -+}; -+ -+&ehci1 { -+ status = "okay"; -+}; -+ -+&gmac { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&gmac_pins_rgmii_a>; -+ phy = <&phy1>; -+ phy-mode = "rgmii"; -+ phy-supply = <®_gmac_3v3>; -+ status = "okay"; -+ -+ phy1: ethernet-phy@1 { -+ reg = <1>; -+ }; -+}; -+ -+&i2c0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c0_pins_a>; -+ status = "okay"; -+ -+ axp209: pmic@34 { -+ reg = <0x34>; -+ interrupt-parent = <&nmi_intc>; -+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; -+ }; -+}; -+ -+&i2c2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c2_pins_a>; -+ status = "okay"; -+}; -+ -+&ir0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&ir0_rx_pins_a>; -+ status = "okay"; -+}; -+ -+&mmc0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_lamobo_r1>; -+ vmmc-supply = <®_vcc3v3>; -+ bus-width = <4>; -+ cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */ -+ cd-inverted; -+ status = "okay"; -+}; -+ -+&ohci0 { -+ status = "okay"; -+}; -+ -+&ohci1 { -+ status = "okay"; -+}; -+ -+&otg_sram { -+ status = "okay"; -+}; -+ -+&pio { -+ usb0_id_detect_pin: usb0_id_detect_pin@0 { -+ allwinner,pins = "PH4"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ mmc0_cd_pin_lamobo_r1: mmc0_cd_pin@0 { -+ allwinner,pins = "PH10"; -+ allwinner,function = "gpio_in"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ gmac_power_pin_lamobo_r1: gmac_power_pin@0 { -+ allwinner,pins = "PH23"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+ -+ led_pins_lamobo_r1: led_pins@0 { -+ allwinner,pins = "PH24"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; -+}; -+ -+#include "axp209.dtsi" -+ -+®_ahci_5v { -+ gpio = <&pio 1 3 0>; /* PB3 */ -+ status = "okay"; -+}; -+ -+®_dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-cpu"; -+}; -+ -+®_dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-name = "vdd-int-dll"; -+}; -+ -+®_ldo1 { -+ regulator-name = "vdd-rtc"; -+}; -+ -+®_ldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-name = "avcc"; -+}; -+ -+®_usb0_vbus { -+ status = "okay"; -+}; -+ -+®_usb1_vbus { -+ status = "okay"; -+}; -+ -+®_usb2_vbus { -+ status = "okay"; -+}; -+ -+&spi0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&spi0_pins_a>, -+ <&spi0_cs0_pins_a>, -+ <&spi0_cs1_pins_a>; -+ status = "okay"; -+}; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pins_a>; -+ status = "okay"; -+}; -+ -+&uart3 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart3_pins_b>; -+ status = "okay"; -+}; -+ -+&uart7 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart7_pins_a>; -+ status = "okay"; -+}; -+ -+&usb_otg { -+ dr_mode = "otg"; -+ status = "okay"; -+}; -+ -+&usb_power_supply { -+ status = "okay"; -+}; -+ -+&usbphy { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&usb0_id_detect_pin>; -+ usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ -+ usb0_vbus_power-supply = <&usb_power_supply>; -+ usb0_vbus-supply = <®_usb0_vbus>; -+ usb1_vbus-supply = <®_usb1_vbus>; -+ usb2_vbus-supply = <®_usb2_vbus>; -+ status = "okay"; -+}; diff --git a/target/linux/sunxi/patches-4.4/104-2-dt-sun8i-add-orangepi-plus.patch b/target/linux/sunxi/patches-4.9/0045-arm-dts-sun8i-add-common-dtsi-file-for-nanopi-SBCs.patch similarity index 59% rename from target/linux/sunxi/patches-4.4/104-2-dt-sun8i-add-orangepi-plus.patch rename to target/linux/sunxi/patches-4.9/0045-arm-dts-sun8i-add-common-dtsi-file-for-nanopi-SBCs.patch index 67094a4beb076c..c304f7937f3287 100644 --- a/target/linux/sunxi/patches-4.4/104-2-dt-sun8i-add-orangepi-plus.patch +++ b/target/linux/sunxi/patches-4.9/0045-arm-dts-sun8i-add-common-dtsi-file-for-nanopi-SBCs.patch @@ -1,39 +1,29 @@ -From dfcf8196de7411a5e7fd49795938b1bc8c56859c Mon Sep 17 00:00:00 2001 -From: Jens Kuske -Date: Fri, 4 Dec 2015 22:24:43 +0100 -Subject: [PATCH] ARM: dts: sun8i: Add Orange Pi Plus support +From 49f01c9e14b3476cbdf9623c4812c43f6485830b Mon Sep 17 00:00:00 2001 +From: Milo Kim +Date: Fri, 28 Oct 2016 15:59:01 +0900 +Subject: ARM: dts: sun8i: Add common dtsi file for NanoPi SBCs -The Orange Pi Plus is a SBC based on the Allwinner H3 SoC -with 8GB eMMC, multiple USB ports through a USB hub chip, SATA through -a USB-SATA bridge, one uSD slot, a 10/100/1000M ethernet port, -WiFi, HDMI, headphone jack, IR receiver, a microphone, a CSI connector -and a 40-pin GPIO header. +(backported from kernel 4.13) -Signed-off-by: Jens Kuske +This patch provides a common file for NanoPi M1 and Neo SBC. + +Those have common features below. + * UART0 + * 2 LEDs + * USB host (EHCI3, OHCI3) and PHY + * MicroSD + * GPIO key switch + +Cc: James Pettigrew +Signed-off-by: Milo Kim Signed-off-by: Maxime Ripard ---- - arch/arm/boot/dts/Makefile | 3 +- - arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 77 ++++++++++++++++++++++++++++ - 2 files changed, 79 insertions(+), 1 deletion(-) - create mode 100644 arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts ---- a/arch/arm/boot/dts/Makefile -+++ b/arch/arm/boot/dts/Makefile -@@ -660,7 +660,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \ - sun8i-a33-ga10h-v1.1.dtb \ - sun8i-a33-ippo-q8h-v1.2.dtb \ - sun8i-a33-q8-tablet.dtb \ -- sun8i-a33-sinlinx-sina33.dtb -+ sun8i-a33-sinlinx-sina33.dtb \ -+ sun8i-h3-orangepi-plus.dtb - dtb-$(CONFIG_MACH_SUN9I) += \ - sun9i-a80-optimus.dtb \ - sun9i-a80-cubieboard4.dtb --- /dev/null -+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts -@@ -0,0 +1,77 @@ ++++ b/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi +@@ -0,0 +1,137 @@ +/* -+ * Copyright (C) 2015 Jens Kuske ++ * Copyright (C) 2016 James Pettigrew ++ * Copyright (C) 2016 Milo Kim + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual @@ -79,12 +69,9 @@ Signed-off-by: Maxime Ripard +#include "sunxi-common-regulators.dtsi" + +#include -+#include ++#include + +/ { -+ model = "Xunlong Orange Pi Plus"; -+ compatible = "xunlong,orangepi-plus", "allwinner,sun8i-h3"; -+ + aliases { + serial0 = &uart0; + }; @@ -92,20 +79,82 @@ Signed-off-by: Maxime Ripard + chosen { + stdout-path = "serial0:115200n8"; + }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&leds_npi>, <&leds_r_npi>; ++ ++ status { ++ label = "nanopi:blue:status"; ++ gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "heartbeat"; ++ }; ++ ++ pwr { ++ label = "nanopi:green:pwr"; ++ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; ++ default-state = "on"; ++ }; ++ }; ++ ++ r_gpio_keys { ++ compatible = "gpio-keys"; ++ input-name = "k1"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sw_r_npi>; ++ ++ k1@0 { ++ label = "k1"; ++ linux,code = ; ++ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&ehci3 { ++ status = "okay"; +}; + +&mmc0 { ++ bus-width = <4>; ++ cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; ++ cd-inverted; + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; ++ status = "okay"; + vmmc-supply = <®_vcc3v3>; -+ bus-width = <4>; -+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ -+ cd-inverted; ++}; ++ ++&ohci3 { + status = "okay"; +}; + ++&pio { ++ leds_npi: led_pins@0 { ++ pins = "PA10"; ++ function = "gpio_out"; ++ }; ++}; ++ ++&r_pio { ++ leds_r_npi: led_pins@0 { ++ pins = "PL10"; ++ function = "gpio_out"; ++ }; ++ ++ sw_r_npi: key_pins@0 { ++ pins = "PL3"; ++ function = "gpio_in"; ++ }; ++}; ++ +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +}; ++ ++&usbphy { ++ status = "okay"; ++}; diff --git a/target/linux/sunxi/patches-4.9/090-sunxi-mmc-from-4-13.patch b/target/linux/sunxi/patches-4.9/090-sunxi-mmc-from-4-13.patch new file mode 100644 index 00000000000000..e64581ff836602 --- /dev/null +++ b/target/linux/sunxi/patches-4.9/090-sunxi-mmc-from-4-13.patch @@ -0,0 +1,288 @@ +--- a/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt ++++ b/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt +@@ -13,6 +13,7 @@ Required properties: + * "allwinner,sun5i-a13-mmc" + * "allwinner,sun7i-a20-mmc" + * "allwinner,sun9i-a80-mmc" ++ * "allwinner,sun50i-a64-emmc" + * "allwinner,sun50i-a64-mmc" + - reg : mmc controller base registers + - clocks : a list with 4 phandle + clock specifier pairs +--- a/drivers/mmc/host/sunxi-mmc.c ++++ b/drivers/mmc/host/sunxi-mmc.c +@@ -5,6 +5,7 @@ + * (C) Copyright 2013-2014 O2S GmbH + * (C) Copyright 2013-2014 David Lanzend�rfer + * (C) Copyright 2013-2014 Hans de Goede ++ * (C) Copyright 2017 Sootech SA + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as +@@ -101,6 +102,7 @@ + (SDXC_SOFT_RESET | SDXC_FIFO_RESET | SDXC_DMA_RESET) + + /* clock control bits */ ++#define SDXC_MASK_DATA0 BIT(31) + #define SDXC_CARD_CLOCK_ON BIT(16) + #define SDXC_LOW_POWER_ON BIT(17) + +@@ -253,6 +255,11 @@ struct sunxi_mmc_cfg { + + /* does the IP block support autocalibration? */ + bool can_calibrate; ++ ++ /* Does DATA0 needs to be masked while the clock is updated */ ++ bool mask_data0; ++ ++ bool needs_new_timings; + }; + + struct sunxi_mmc_host { +@@ -482,7 +489,7 @@ static void sunxi_mmc_dump_errinfo(struc + cmd->opcode == SD_IO_RW_DIRECT)) + return; + +- dev_err(mmc_dev(host->mmc), ++ dev_dbg(mmc_dev(host->mmc), + "smc %d err, cmd %d,%s%s%s%s%s%s%s%s%s%s !!\n", + host->mmc->index, cmd->opcode, + data ? (data->flags & MMC_DATA_WRITE ? " WR" : " RD") : "", +@@ -654,11 +661,16 @@ static int sunxi_mmc_oclk_onoff(struct s + unsigned long expire = jiffies + msecs_to_jiffies(750); + u32 rval; + ++ dev_dbg(mmc_dev(host->mmc), "%sabling the clock\n", ++ oclk_en ? "en" : "dis"); ++ + rval = mmc_readl(host, REG_CLKCR); +- rval &= ~(SDXC_CARD_CLOCK_ON | SDXC_LOW_POWER_ON); ++ rval &= ~(SDXC_CARD_CLOCK_ON | SDXC_LOW_POWER_ON | SDXC_MASK_DATA0); + + if (oclk_en) + rval |= SDXC_CARD_CLOCK_ON; ++ if (host->cfg->mask_data0) ++ rval |= SDXC_MASK_DATA0; + + mmc_writel(host, REG_CLKCR, rval); + +@@ -678,46 +690,29 @@ static int sunxi_mmc_oclk_onoff(struct s + return -EIO; + } + ++ if (host->cfg->mask_data0) { ++ rval = mmc_readl(host, REG_CLKCR); ++ mmc_writel(host, REG_CLKCR, rval & ~SDXC_MASK_DATA0); ++ } ++ + return 0; + } + + static int sunxi_mmc_calibrate(struct sunxi_mmc_host *host, int reg_off) + { +- u32 reg = readl(host->reg_base + reg_off); +- u32 delay; +- unsigned long timeout; +- + if (!host->cfg->can_calibrate) + return 0; + +- reg &= ~(SDXC_CAL_DL_MASK << SDXC_CAL_DL_SW_SHIFT); +- reg &= ~SDXC_CAL_DL_SW_EN; +- +- writel(reg | SDXC_CAL_START, host->reg_base + reg_off); +- +- dev_dbg(mmc_dev(host->mmc), "calibration started\n"); +- +- timeout = jiffies + HZ * SDXC_CAL_TIMEOUT; +- +- while (!((reg = readl(host->reg_base + reg_off)) & SDXC_CAL_DONE)) { +- if (time_before(jiffies, timeout)) +- cpu_relax(); +- else { +- reg &= ~SDXC_CAL_START; +- writel(reg, host->reg_base + reg_off); +- +- return -ETIMEDOUT; +- } +- } +- +- delay = (reg >> SDXC_CAL_DL_SHIFT) & SDXC_CAL_DL_MASK; +- +- reg &= ~SDXC_CAL_START; +- reg |= (delay << SDXC_CAL_DL_SW_SHIFT) | SDXC_CAL_DL_SW_EN; +- +- writel(reg, host->reg_base + reg_off); +- +- dev_dbg(mmc_dev(host->mmc), "calibration ended, reg is 0x%x\n", reg); ++ /* ++ * FIXME: ++ * This is not clear how the calibration is supposed to work ++ * yet. The best rate have been obtained by simply setting the ++ * delay to 0, as Allwinner does in its BSP. ++ * ++ * The only mode that doesn't have such a delay is HS400, that ++ * is in itself a TODO. ++ */ ++ writel(SDXC_CAL_DL_SW_EN, host->reg_base + reg_off); + + return 0; + } +@@ -745,6 +740,7 @@ static int sunxi_mmc_clk_set_phase(struc + index = SDXC_CLK_50M_DDR; + } + } else { ++ dev_dbg(mmc_dev(host->mmc), "Invalid clock... returning\n"); + return -EINVAL; + } + +@@ -757,10 +753,21 @@ static int sunxi_mmc_clk_set_phase(struc + static int sunxi_mmc_clk_set_rate(struct sunxi_mmc_host *host, + struct mmc_ios *ios) + { ++ struct mmc_host *mmc = host->mmc; + long rate; + u32 rval, clock = ios->clock; + int ret; + ++ ret = sunxi_mmc_oclk_onoff(host, 0); ++ if (ret) ++ return ret; ++ ++ /* Our clock is gated now */ ++ mmc->actual_clock = 0; ++ ++ if (!ios->clock) ++ return 0; ++ + /* 8 bit DDR requires a higher module clock */ + if (ios->timing == MMC_TIMING_MMC_DDR52 && + ios->bus_width == MMC_BUS_WIDTH_8) +@@ -768,25 +775,21 @@ static int sunxi_mmc_clk_set_rate(struct + + rate = clk_round_rate(host->clk_mmc, clock); + if (rate < 0) { +- dev_err(mmc_dev(host->mmc), "error rounding clk to %d: %ld\n", ++ dev_err(mmc_dev(mmc), "error rounding clk to %d: %ld\n", + clock, rate); + return rate; + } +- dev_dbg(mmc_dev(host->mmc), "setting clk to %d, rounded %ld\n", ++ dev_dbg(mmc_dev(mmc), "setting clk to %d, rounded %ld\n", + clock, rate); + + /* setting clock rate */ + ret = clk_set_rate(host->clk_mmc, rate); + if (ret) { +- dev_err(mmc_dev(host->mmc), "error setting clk to %ld: %d\n", ++ dev_err(mmc_dev(mmc), "error setting clk to %ld: %d\n", + rate, ret); + return ret; + } + +- ret = sunxi_mmc_oclk_onoff(host, 0); +- if (ret) +- return ret; +- + /* clear internal divider */ + rval = mmc_readl(host, REG_CLKCR); + rval &= ~0xff; +@@ -798,6 +801,13 @@ static int sunxi_mmc_clk_set_rate(struct + } + mmc_writel(host, REG_CLKCR, rval); + ++ if (host->cfg->needs_new_timings) { ++ /* Don't touch the delay bits */ ++ rval = mmc_readl(host, REG_SD_NTSR); ++ rval |= SDXC_2X_TIMING_MODE; ++ mmc_writel(host, REG_SD_NTSR, rval); ++ } ++ + ret = sunxi_mmc_clk_set_phase(host, ios, rate); + if (ret) + return ret; +@@ -806,9 +816,22 @@ static int sunxi_mmc_clk_set_rate(struct + if (ret) + return ret; + +- /* TODO: enable calibrate on sdc2 SDXC_REG_DS_DL_REG of A64 */ ++ /* ++ * FIXME: ++ * ++ * In HS400 we'll also need to calibrate the data strobe ++ * signal. This should only happen on the MMC2 controller (at ++ * least on the A64). ++ */ ++ ++ ret = sunxi_mmc_oclk_onoff(host, 1); ++ if (ret) ++ return ret; + +- return sunxi_mmc_oclk_onoff(host, 1); ++ /* And we just enabled our clock back */ ++ mmc->actual_clock = rate; ++ ++ return 0; + } + + static void sunxi_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) +@@ -822,10 +845,13 @@ static void sunxi_mmc_set_ios(struct mmc + break; + + case MMC_POWER_UP: +- host->ferror = mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, +- ios->vdd); +- if (host->ferror) +- return; ++ if (!IS_ERR(mmc->supply.vmmc)) { ++ host->ferror = mmc_regulator_set_ocr(mmc, ++ mmc->supply.vmmc, ++ ios->vdd); ++ if (host->ferror) ++ return; ++ } + + if (!IS_ERR(mmc->supply.vqmmc)) { + host->ferror = regulator_enable(mmc->supply.vqmmc); +@@ -847,7 +873,9 @@ static void sunxi_mmc_set_ios(struct mmc + case MMC_POWER_OFF: + dev_dbg(mmc_dev(mmc), "power off!\n"); + sunxi_mmc_reset_host(host); +- mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0); ++ if (!IS_ERR(mmc->supply.vmmc)) ++ mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0); ++ + if (!IS_ERR(mmc->supply.vqmmc) && host->vqmmc_enabled) + regulator_disable(mmc->supply.vqmmc); + host->vqmmc_enabled = false; +@@ -877,7 +905,7 @@ static void sunxi_mmc_set_ios(struct mmc + mmc_writel(host, REG_GCTRL, rval); + + /* set up clock */ +- if (ios->clock && ios->power_mode) { ++ if (ios->power_mode) { + host->ferror = sunxi_mmc_clk_set_rate(host, ios); + /* Android code had a usleep_range(50000, 55000); here */ + } +@@ -1084,6 +1112,14 @@ static const struct sunxi_mmc_cfg sun50i + .idma_des_size_bits = 16, + .clk_delays = NULL, + .can_calibrate = true, ++ .mask_data0 = true, ++ .needs_new_timings = true, ++}; ++ ++static const struct sunxi_mmc_cfg sun50i_a64_emmc_cfg = { ++ .idma_des_size_bits = 13, ++ .clk_delays = NULL, ++ .can_calibrate = true, + }; + + static const struct of_device_id sunxi_mmc_of_match[] = { +@@ -1092,6 +1128,7 @@ static const struct of_device_id sunxi_m + { .compatible = "allwinner,sun7i-a20-mmc", .data = &sun7i_a20_cfg }, + { .compatible = "allwinner,sun9i-a80-mmc", .data = &sun9i_a80_cfg }, + { .compatible = "allwinner,sun50i-a64-mmc", .data = &sun50i_a64_cfg }, ++ { .compatible = "allwinner,sun50i-a64-emmc", .data = &sun50i_a64_emmc_cfg }, + { /* sentinel */ } + }; + MODULE_DEVICE_TABLE(of, sunxi_mmc_of_match); diff --git a/target/linux/sunxi/patches-4.9/205-arm-dts-sun8i-add-support-for-nanopi-m1-plus-board.patch b/target/linux/sunxi/patches-4.9/205-arm-dts-sun8i-add-support-for-nanopi-m1-plus-board.patch new file mode 100644 index 00000000000000..d0ee8edd14ae79 --- /dev/null +++ b/target/linux/sunxi/patches-4.9/205-arm-dts-sun8i-add-support-for-nanopi-m1-plus-board.patch @@ -0,0 +1,168 @@ +From 2ed2388bc0c5b7d04c7b079d673ce61a0333c818 Mon Sep 17 00:00:00 2001 +From: Jagan Teki +Date: Tue, 30 May 2017 17:42:50 +0000 +Subject: ARM: dts: sun8i: h3: Add initial NanoPi M1 Plus support + +Backported support from kernel 4.13 with the following changes: +- Added WiFi node +- Added Ethernet node +- Added eMMC node + +Original commit message: +NanoPi M1 Plus is designed and developed by FriendlyElec +for professionals, enterprise users, makers and hobbyists +using the Allwinner H3 SOC. + +NanoPi M1 Plus key features +- Allwinner H3, Quad-core Cortex-A7@1.2GHz +- 1GB DDR3 RAM +- 8GB eMMC +- microSD slot +- 10/100/1000M Ethernet +- Serial Debug Port +- 5V 2A DC power-supply + +Signed-off-by: Jagan Teki +Signed-off-by: Maxime Ripard +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -821,6 +821,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ + sun8i-a83t-cubietruck-plus.dtb \ + sun8i-h2-plus-orangepi-r1.dtb \ + sun8i-h3-bananapi-m2-plus.dtb \ ++ sun8i-h3-nanopi-m1-plus.dtb \ + sun8i-h3-nanopi-neo.dtb \ + sun8i-h3-orangepi-2.dtb \ + sun8i-h3-orangepi-lite.dtb \ +--- /dev/null ++++ b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts +@@ -0,0 +1,129 @@ ++/* ++ * Copyright (C) 2017 Jagan Teki ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) This file 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; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This file is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * Or, alternatively, ++ * ++ * b) Permission is hereby granted, free of charge, to any person ++ * obtaining a copy of this software and associated documentation ++ * files (the "Software"), to deal in the Software without ++ * restriction, including without limitation the rights to use, ++ * copy, modify, merge, publish, distribute, sublicense, and/or ++ * sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following ++ * conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT ++ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, ++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++#include "sun8i-h3-nanopi.dtsi" ++ ++/ { ++ model = "FriendlyArm NanoPi M1 Plus"; ++ compatible = "friendlyarm,nanopi-m1-plus", "allwinner,sun8i-h3"; ++ ++ aliases { ++ ethernet0 = &emac; ++ }; ++ ++ pwrseq_wifi: pwrseq0 { ++ compatible = "mmc-pwrseq-simple"; ++ pinctrl-names = "default"; ++ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ ++ }; ++ ++ reg_gmac_3v3: gmac-3v3 { ++ compatible = "regulator-fixed"; ++ regulator-name = "gmac-3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ startup-delay-us = <100000>; ++ enable-active-high; ++ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */ ++ }; ++}; ++ ++&ehci1 { ++ status = "okay"; ++}; ++ ++&ehci2 { ++ status = "okay"; ++}; ++ ++&emac { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&emac_rgmii_pins>; ++ phy-supply = <®_gmac_3v3>; ++ phy-handle = <&ext_rgmii_phy>; ++ phy-mode = "rgmii"; ++ status = "okay"; ++}; ++ ++&mdio { ++ ext_rgmii_phy: ethernet-phy@7 { ++ compatible = "ethernet-phy-ieee802.3-c22"; ++ reg = <7>; ++ }; ++}; ++ ++&mmc1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc1_pins_a>; ++ vmmc-supply = <®_vcc3v3>; ++ vqmmc-supply = <®_vcc3v3>; ++ mmc-pwrseq = <&pwrseq_wifi>; ++ bus-width = <4>; ++ non-removable; ++ status = "okay"; ++ ++ brcmf: wifi@1 { ++ reg = <1>; ++ compatible = "brcm,bcm4329-fmac"; ++ interrupt-parent = <&pio>; ++ interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */ ++ interrupt-names = "host-wake"; ++ }; ++}; ++ ++&mmc2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc2_8bit_pins>; ++ vmmc-supply = <®_vcc3v3>; ++ vqmmc-supply = <®_vcc3v3>; ++ bus-width = <8>; ++ non-removable; ++ status = "okay"; ++}; ++ ++&ohci1 { ++ status = "okay"; ++}; ++ ++&ohci2 { ++ status = "okay"; ++}; diff --git a/target/linux/x86/64/config-default b/target/linux/x86/64/config-default index 55b69cec8ab9a5..faaba8064ec691 100644 --- a/target/linux/x86/64/config-default +++ b/target/linux/x86/64/config-default @@ -253,9 +253,9 @@ CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_NET_FLOW_LIMIT=y CONFIG_NR_CPUS=8 # CONFIG_NUMA is not set -# CONFIG_ORC_UNWINDER is not set CONFIG_OUTPUT_FORMAT="elf64-x86-64" CONFIG_PADATA=y +CONFIG_PAGE_TABLE_ISOLATION=y CONFIG_PARAVIRT=y CONFIG_PARAVIRT_CLOCK=y # CONFIG_PARAVIRT_DEBUG is not set @@ -330,6 +330,7 @@ CONFIG_THERMAL_WRITABLE_TRIPS=y # CONFIG_TOSHIBA_BT_RFKILL is not set CONFIG_TREE_RCU=y CONFIG_TREE_SRCU=y +# CONFIG_UNWINDER_ORC is not set CONFIG_UCS2_STRING=y # CONFIG_UNISYSSPAR is not set CONFIG_USB_OHCI_HCD_PCI=y diff --git a/target/linux/x86/base-files/lib/preinit/01_sysinfo b/target/linux/x86/base-files/lib/preinit/01_sysinfo index cb63a040142b3d..466c831e7e6c0d 100644 --- a/target/linux/x86/base-files/lib/preinit/01_sysinfo +++ b/target/linux/x86/base-files/lib/preinit/01_sysinfo @@ -1,3 +1,12 @@ +sanitize_name_x86() { + sed -e ' + y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/; + s/[^a-z0-9_-]\+/-/g; + s/^-//; + s/-$//; + ' "$@" +} + do_sysinfo_x86() { local vendor product file @@ -8,7 +17,14 @@ do_sysinfo_x86() { for file in product_name board_name; do product="$(cat /sys/devices/virtual/dmi/id/$file 2>/dev/null)" - [ -n "$product" ] && break + case "$vendor:$product" in + "Supermicro:Super Server") + continue + ;; + ?*:?*) + break + ;; + esac done [ -n "$vendor" -a -n "$product" ] || return @@ -17,12 +33,7 @@ do_sysinfo_x86() { echo "$vendor $product" > /tmp/sysinfo/model - sed -e ' - y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/; - s/[^a-z0-9_-]\+/-/g; - s/^-//; - s/-$//; - ' /tmp/sysinfo/model > /tmp/sysinfo/board_name + sanitize_name_x86 /tmp/sysinfo/model > /tmp/sysinfo/board_name } boot_hook_add preinit_main do_sysinfo_x86 diff --git a/target/linux/x86/config-4.14 b/target/linux/x86/config-4.14 index 9b2f5e3d36bed8..b88fa77e13af84 100644 --- a/target/linux/x86/config-4.14 +++ b/target/linux/x86/config-4.14 @@ -72,7 +72,6 @@ CONFIG_CLONE_BACKWARDS=y CONFIG_COMMON_CLK=y CONFIG_COMPAT_32=y # CONFIG_COMPAT_VDSO is not set -CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 CONFIG_CONSOLE_TRANSLATIONS=y # CONFIG_CPU5_WDT is not set CONFIG_CPU_FREQ=y @@ -146,7 +145,6 @@ CONFIG_FIRMWARE_IN_KERNEL=y CONFIG_FIRMWARE_MEMMAP=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_FRAME_POINTER=y -CONFIG_FRAME_POINTER_UNWINDER=y CONFIG_FS_MBCACHE=y CONFIG_FUSION=y # CONFIG_FUSION_CTL is not set @@ -177,7 +175,6 @@ CONFIG_GENERIC_TIME_VSYSCALL=y # CONFIG_GEOS is not set CONFIG_GLOB=y # CONFIG_GRO_CELLS is not set -# CONFIG_GUESS_UNWINDER is not set # CONFIG_HANGCHECK_TIMER is not set CONFIG_HAS_DMA=y CONFIG_HAS_IOMEM=y @@ -435,6 +432,8 @@ CONFIG_THREAD_INFO_IN_TASK=y CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_TINY_SRCU=y # CONFIG_TOSHIBA is not set +# CONFIG_UNWINDER_GUESS is not set +CONFIG_UNWINDER_FRAME_POINTER=y CONFIG_UP_LATE_INIT=y CONFIG_USB=y CONFIG_USB_COMMON=y @@ -523,4 +522,3 @@ CONFIG_X86_VERBOSE_BOOTUP=y CONFIG_XZ_DEC_BCJ=y CONFIG_XZ_DEC_X86=y CONFIG_ZLIB_INFLATE=y -CONFIG_PAGE_TABLE_ISOLATION=n \ No newline at end of file diff --git a/target/linux/x86/config-4.9 b/target/linux/x86/config-4.9 index 1e478e181e826a..b5003546c98ab7 100644 --- a/target/linux/x86/config-4.9 +++ b/target/linux/x86/config-4.9 @@ -1,31 +1,6 @@ # CONFIG_60XX_WDT is not set # CONFIG_64BIT is not set -CONFIG_ACPI=y -CONFIG_ACPI_AC=y -CONFIG_ACPI_BATTERY=y -# CONFIG_ACPI_CMPC is not set -# CONFIG_ACPI_CONTAINER is not set -CONFIG_ACPI_CPU_FREQ_PSS=y -# CONFIG_ACPI_CUSTOM_DSDT is not set -# CONFIG_ACPI_DEBUG is not set -# CONFIG_ACPI_DEBUGGER is not set -# CONFIG_ACPI_DOCK is not set -# CONFIG_ACPI_EC_DEBUGFS is not set -CONFIG_ACPI_FAN=y -CONFIG_ACPI_HOTPLUG_IOAPIC=y -CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y -CONFIG_ACPI_NFIT=y -# CONFIG_ACPI_PCI_SLOT is not set -CONFIG_ACPI_PROCESSOR=y -# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set -CONFIG_ACPI_PROCESSOR_CSTATE=y -CONFIG_ACPI_PROCESSOR_IDLE=y -# CONFIG_ACPI_PROCFS_POWER is not set -CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y -# CONFIG_ACPI_SBS is not set -CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y -CONFIG_ACPI_THERMAL=y -# CONFIG_ACPI_WMI is not set +# CONFIG_ACPI is not set # CONFIG_ACQUIRE_WDT is not set # CONFIG_ADVANTECH_WDT is not set # CONFIG_ALIM1535_WDT is not set @@ -37,7 +12,6 @@ CONFIG_ARCH_DISCARD_MEMBLOCK=y CONFIG_ARCH_DMA_ADDR_T_64BIT=y CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y -CONFIG_ARCH_HAS_ACPI_TABLE_UPGRADE=y CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y CONFIG_ARCH_HAS_CPU_RELAX=y CONFIG_ARCH_HAS_ELF_RANDOMIZE=y @@ -48,7 +22,6 @@ CONFIG_ARCH_HAS_SG_CHAIN=y CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y CONFIG_ARCH_PHYS_ADDR_T_64BIT=y @@ -71,14 +44,13 @@ CONFIG_ARCH_WANT_FRAME_POINTERS=y CONFIG_ARCH_WANT_GENERAL_HUGETLB=y CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -# CONFIG_ARM_SCPI_PROTOCOL is not set CONFIG_ATA=y CONFIG_ATA_GENERIC=y CONFIG_ATA_PIIX=y CONFIG_BINFMT_MISC=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_NVME=y -CONFIG_BLK_DEV_NVME_SCSI=y +# CONFIG_BLK_DEV_NVME_SCSI is not set CONFIG_BLK_DEV_SD=y CONFIG_BLK_MQ_PCI=y CONFIG_BOUNCE=y @@ -142,7 +114,6 @@ CONFIG_DMIID=y CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y CONFIG_DMI_SYSFS=y CONFIG_DNOTIFY=y -# CONFIG_DPTF_POWER is not set CONFIG_DUMMY_CONSOLE=y CONFIG_EARLY_PRINTK=y # CONFIG_EARLY_PRINTK_DBGP is not set @@ -189,15 +160,11 @@ CONFIG_GENERIC_TIME_VSYSCALL=y # CONFIG_GEOS is not set CONFIG_GLOB=y # CONFIG_GOOGLE_FIRMWARE is not set -# CONFIG_GPIO_AMDPT is not set -# CONFIG_GPIO_F7188X is not set # CONFIG_HANGCHECK_TIMER is not set CONFIG_HAS_DMA=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y # CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_ACPI_APEI=y -CONFIG_HAVE_ACPI_APEI_NMI=y CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y CONFIG_HAVE_AOUT=y CONFIG_HAVE_ARCH_AUDITSYSCALL=y @@ -256,10 +223,8 @@ CONFIG_HIGHMEM=y # CONFIG_HIGHMEM4G is not set CONFIG_HIGHMEM64G=y # CONFIG_HIGHPTE is not set -# CONFIG_HPET is not set CONFIG_HPET_EMULATE_RTC=y CONFIG_HPET_TIMER=y -# CONFIG_HP_ACCEL is not set # CONFIG_HP_WATCHDOG is not set CONFIG_HT_IRQ=y # CONFIG_HUGETLBFS is not set @@ -280,11 +245,7 @@ CONFIG_INITRAMFS_SOURCE="" CONFIG_INPUT=y CONFIG_INPUT_KEYBOARD=y CONFIG_INSTRUCTION_DECODER=y -CONFIG_INTEL_IDLE=y -# CONFIG_INTEL_IPS is not set -# CONFIG_INTEL_MENLOW is not set # CONFIG_INTEL_PCH_THERMAL is not set -# CONFIG_INTEL_PMC_IPC is not set # CONFIG_INTEL_POWERCLAMP is not set # CONFIG_INTEL_SOC_DTS_THERMAL is not set CONFIG_IOMMU_HELPER=y @@ -304,7 +265,6 @@ CONFIG_IRQ_FORCED_THREADING=y CONFIG_IRQ_WORK=y # CONFIG_ISA is not set CONFIG_ISA_DMA_API=y -# CONFIG_ISCSI_IBFT_FIND is not set # CONFIG_IT8712F_WDT is not set # CONFIG_IT87_WDT is not set # CONFIG_ITCO_WDT is not set @@ -315,7 +275,6 @@ CONFIG_KEXEC_CORE=y CONFIG_KEYBOARD_ATKBD=y # CONFIG_LEDS_CLEVO_MAIL is not set CONFIG_LIBNVDIMM=y -# CONFIG_LIQUIDIO is not set # CONFIG_M486 is not set # CONFIG_M586 is not set CONFIG_M586MMX=y @@ -328,7 +287,6 @@ CONFIG_M586MMX=y # CONFIG_MCYRIXIII is not set # CONFIG_MEFFICEON is not set # CONFIG_MELAN is not set -# CONFIG_MFD_INTEL_LPSS_ACPI is not set # CONFIG_MFD_INTEL_LPSS_PCI is not set # CONFIG_MGEODEGX1 is not set # CONFIG_MGEODE_LX is not set @@ -387,7 +345,6 @@ CONFIG_PCI_GOANY=y # CONFIG_PCI_GODIRECT is not set # CONFIG_PCI_GOMMCONFIG is not set CONFIG_PCI_LABEL=y -CONFIG_PCI_MMCONFIG=y CONFIG_PCI_MSI=y CONFIG_PCI_MSI_IRQ_DOMAIN=y CONFIG_PCSPKR_PLATFORM=y @@ -400,23 +357,17 @@ CONFIG_PHYSICAL_ALIGN=0x100000 CONFIG_PHYSICAL_START=0x1000000 CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_PMC_ATOM=y -# CONFIG_PMIC_OPREGION is not set -CONFIG_PNP=y -CONFIG_PNPACPI=y -CONFIG_PNP_DEBUG_MESSAGES=y CONFIG_POWER_SUPPLY=y # CONFIG_PROCESSOR_SELECT is not set CONFIG_PROC_PAGE_MONITOR=y # CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set # CONFIG_PUNIT_ATOM_DEBUG is not set -# CONFIG_PVPANIC is not set # CONFIG_RCU_STALL_COMMON is not set CONFIG_RD_BZIP2=y CONFIG_RD_GZIP=y CONFIG_RTC_CLASS=y CONFIG_RTC_MC146818_LIB=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y -# CONFIG_SAMSUNG_Q10 is not set # CONFIG_SBC7240_WDT is not set # CONFIG_SBC8360_WDT is not set # CONFIG_SBC_EPX_C3_WATCHDOG is not set @@ -428,10 +379,8 @@ CONFIG_SCx200=y CONFIG_SCx200HR_TIMER=y # CONFIG_SCx200_GPIO is not set # CONFIG_SCx200_WDT is not set -# CONFIG_SENSORS_XGENE is not set # CONFIG_SERIAL_8250_FSL is not set CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_PNP=y CONFIG_SERIO=y # CONFIG_SERIO_CT82C710 is not set CONFIG_SERIO_I8042=y @@ -444,7 +393,6 @@ CONFIG_SPARSEMEM_STATIC=y CONFIG_SPARSE_IRQ=y CONFIG_SRCU=y CONFIG_STRICT_DEVMEM=y -# CONFIG_SURFACE_PRO3_BUTTON is not set CONFIG_SWIOTLB=y CONFIG_SYSCTL_EXCEPTION_TRACE=y # CONFIG_TELCLOCK is not set @@ -452,13 +400,8 @@ CONFIG_THERMAL=y CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y CONFIG_THERMAL_GOV_STEP_WISE=y CONFIG_THREAD_INFO_IN_TASK=y -CONFIG_THUNDER_NIC_BGX=y -CONFIG_THUNDER_NIC_PF=y -CONFIG_THUNDER_NIC_RGX=y -CONFIG_THUNDER_NIC_VF=y CONFIG_TICK_CPU_ACCOUNTING=y # CONFIG_TOSHIBA is not set -# CONFIG_TOSHIBA_BT_RFKILL is not set CONFIG_UP_LATE_INIT=y CONFIG_USB=y CONFIG_USB_COMMON=y @@ -488,9 +431,7 @@ CONFIG_X86=y CONFIG_X86_32=y # CONFIG_X86_32_IRIS is not set CONFIG_X86_32_LAZY_GS=y -# CONFIG_X86_ACPI_CPUFREQ is not set CONFIG_X86_ALIGNMENT_16=y -# CONFIG_X86_AMD_PLATFORM_DEVICE is not set # CONFIG_X86_ANCIENT_MCE is not set # CONFIG_X86_CHECK_BIOS_CORRUPTION is not set CONFIG_X86_CMPXCHG64=y @@ -498,13 +439,11 @@ CONFIG_X86_CMPXCHG64=y # CONFIG_X86_CPUID is not set # CONFIG_X86_DEBUG_FPU is not set # CONFIG_X86_EXTENDED_PLATFORM is not set -# CONFIG_X86_E_POWERSAVER is not set CONFIG_X86_F00F_BUG=y CONFIG_X86_FAST_FEATURE_TESTS=y CONFIG_X86_FEATURE_NAMES=y CONFIG_X86_GENERIC=y # CONFIG_X86_GX_SUSPMOD is not set -# CONFIG_X86_INTEL_LPSS is not set # CONFIG_X86_INTEL_MPX is not set # CONFIG_X86_INTEL_PSTATE is not set CONFIG_X86_INTEL_USERCOPY=y @@ -513,7 +452,6 @@ CONFIG_X86_IO_APIC=y CONFIG_X86_L1_CACHE_SHIFT=6 # CONFIG_X86_LEGACY_VM86 is not set CONFIG_X86_LOCAL_APIC=y -# CONFIG_X86_LONGHAUL is not set # CONFIG_X86_LONGRUN is not set CONFIG_X86_MCE=y CONFIG_X86_MCE_AMD=y @@ -526,11 +464,9 @@ CONFIG_X86_MSR=y # CONFIG_X86_P4_CLOCKMOD is not set CONFIG_X86_PAE=y CONFIG_X86_PAT=y -# CONFIG_X86_PCC_CPUFREQ is not set CONFIG_X86_PLATFORM_DEVICES=y CONFIG_X86_PMEM_LEGACY=y CONFIG_X86_PMEM_LEGACY_DEVICE=y -CONFIG_X86_PM_TIMER=y # CONFIG_X86_POWERNOW_K6 is not set # CONFIG_X86_POWERNOW_K7 is not set CONFIG_X86_PPRO_FENCE=y diff --git a/target/linux/x86/geode/config-default b/target/linux/x86/geode/config-default index 446f7d2758aaf0..b564b940eab298 100644 --- a/target/linux/x86/geode/config-default +++ b/target/linux/x86/geode/config-default @@ -51,14 +51,8 @@ CONFIG_GPIOLIB=y # CONFIG_GPIO_104_IDIO_16 is not set # CONFIG_GPIO_104_IDI_48 is not set CONFIG_GPIO_ACPI=y -# CONFIG_GPIO_AMDPT is not set CONFIG_GPIO_CS5535=y -# CONFIG_GPIO_F7188X is not set -# CONFIG_GPIO_GPIO_MM is not set -# CONFIG_GPIO_IT87 is not set -# CONFIG_GPIO_LYNXPOINT is not set CONFIG_GPIO_SYSFS=y -# CONFIG_GPIO_WS16C48 is not set CONFIG_HAVE_ACPI_APEI=y CONFIG_HAVE_ACPI_APEI_NMI=y CONFIG_HIGHMEM4G=y diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile index 3b5e642d1b10a7..8a3cb327e3ccae 100644 --- a/target/linux/x86/image/Makefile +++ b/target/linux/x86/image/Makefile @@ -10,9 +10,6 @@ include $(INCLUDE_DIR)/image.mk export PATH=$(TARGET_PATH):/sbin GRUB2_MODULES = biosdisk boot chain configfile ext2 linux ls part_msdos reboot serial vga -GRUB2_MODULES_LEGACY = $(GRUB2_MODULES) -GRUB2_MODULES_LEGACY += part_gpt search fat exfat -GRUB2_MODULES_EFI = boot chain configfile ext2 linux ls part_msdos reboot serial part_gpt part_msdos search fat exfat ext2 efi_gop efi_uga gfxterm GRUB2_MODULES_ISO = biosdisk boot chain configfile iso9660 linux ls part_msdos reboot serial vga GRUB_TERMINALS = GRUB_SERIAL_CONFIG = @@ -45,8 +42,6 @@ ifneq ($(GRUB_TERMINALS),) endif SIGNATURE:=$(shell perl -e 'printf("%08x", rand(0xFFFFFFFF))') -EFI_SIGNATURE:=$(shell perl -e 'printf("%08x-%04x-%04x-%04x-%06x%06x", rand(0xFFFFFFFF), rand(0xFFFF), rand(0xFFFF), rand(0xFFFF), rand(0xFFFFFF), rand(0xFFFFFF))') - ROOTPART:=$(call qstrip,$(CONFIG_TARGET_ROOTFS_PARTNAME)) ROOTPART:=$(if $(ROOTPART),$(ROOTPART),PARTUUID=$(SIGNATURE)-02) @@ -56,7 +51,7 @@ ifneq ($(CONFIG_TARGET_x86_xen_domu),) GRUB_ROOT = xen/xvda,msdos1 endif -ifneq ($(CONFIG_GRUB_IMAGES)$(CONFIG_EFI_IMAGES),) +ifneq ($(CONFIG_GRUB_IMAGES),) BOOTOPTS:=$(call qstrip,$(CONFIG_GRUB_BOOTOPTS)) @@ -68,90 +63,6 @@ ifneq ($(CONFIG_GRUB_IMAGES)$(CONFIG_EFI_IMAGES),) root=$(ROOTPART) rootfstype=squashfs rootwait endef - ifneq ($(CONFIG_EFI_IMAGES),) - - define Image/cmdline/efi - $(subst $(SIGNATURE)-02,$2,$(call Image/cmdline/$(1))) - endef - - define Image/Build/efi - # left here because the image builder doesnt need these - rm -rf $(KDIR)/root.grub/ || true - $(INSTALL_DIR) $(KDIR)/root.grub/boot/grub $(KDIR)/grub2 - $(CP) $(KDIR)/bzImage $(KDIR)/root.grub/boot/vmlinuz - echo '(hd0) $(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img' > $(KDIR)/grub2/device.map - sed \ - -e 's#@SERIAL_CONFIG@#$(strip $(GRUB_SERIAL_CONFIG))#g' \ - -e 's#@TERMINAL_CONFIG@#$(strip $(GRUB_TERMINAL_CONFIG))#g' \ - -e 's#@CMDLINE@#$(strip $(call Image/cmdline/efi,$(1),$(EFI_SIGNATURE)) $(BOOTOPTS) $(GRUB_CONSOLE_CMDLINE))#g' \ - -e 's#@TIMEOUT@#$(GRUB_TIMEOUT)#g' \ - -e 's#set root.*#search --file /boot/grub/$(SIGNATURE).cfg --set=root#g' \ - ./grub.cfg > $(KDIR)/root.grub/boot/grub/grub.cfg - $(CP) $(KDIR)/root.grub/boot/grub/grub.cfg $(KDIR)/root.grub/boot/grub/$(SIGNATURE).cfg - grub-mkimage \ - -d $(STAGING_DIR_HOST)/lib/grub/i386-pc \ - -o $(KDIR)/grub2/core.img \ - -O i386-pc \ - -p '(hd0,gpt1)/boot/grub' \ - -c $(KDIR)/root.grub/boot/grub/grub.cfg \ - $(GRUB2_MODULES_LEGACY) - $(CP) $(STAGING_DIR_HOST)/lib/grub/i386-pc/*.img $(KDIR)/grub2/ - - # Build the efi grub version - rm -rf $(KDIR)/grub2.efi/ || true - $(INSTALL_DIR) $(KDIR)/grub2.efi/efi/boot/ - - # Generate the grub search root config (grub will search for the $(SIGNATURE).cfg file placed on the boot partition as grub does not support search of GPT UUID yet) - echo "search --file /boot/grub/$(SIGNATURE).cfg --set=root" > $(KDIR)/grub2.efi/efi/boot/grub.cfg - echo "configfile /boot/grub/grub.cfg" >> $(KDIR)/grub2.efi/efi/boot/grub.cfg - - # Create the EFI grub binary - grub-mkimage-efi \ - -d $(STAGING_DIR_HOST)/lib/grub/x86_64-efi \ - -o $(KDIR)/grub2.efi/efi/boot/bootx64.efi \ - -O x86_64-efi \ - -p /efi/boot \ - -c $(KDIR)/grub2.efi/efi/boot/grub.cfg \ - $(GRUB2_MODULES_EFI) - - # Generate the EFI VFAT bootfs - rm $(KDIR)/kernel.efi || true - mkfs.fat -C $(KDIR)/kernel.efi -S 512 1024 - mcopy -s -i "$(KDIR)/kernel.efi" $(KDIR)/grub2.efi/* ::/ - - SIGNATURE="$(SIGNATURE)" PATH="$(TARGET_PATH)" ./gen_image_efi.sh \ - $(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img \ - $(CONFIG_TARGET_KERNEL_PARTSIZE) $(KDIR)/root.grub \ - 1 $(KDIR)/kernel.efi \ - 1 \ - $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(KDIR)/root.$(1) \ - 256 - - # Setup legacy bios for hybrid MBR (optional) - grub-bios-setup \ - --device-map="$(KDIR)/grub2/device.map" \ - -d "$(KDIR)/grub2" \ - -r "hd0,msdos1" \ - "$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img" - - # Convert the MBR partition to GPT and set EFI ROOTFS signature - dd if=/dev/zero of="$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img" bs=512 count=33 conv=notrunc oflag=append - sgdisk -g "$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img" - sgdisk -t 2:EF00 "$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img" - sgdisk -t 3:EF02 "$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img" - sgdisk -u 4:$(EFI_SIGNATURE) "$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img" - sgdisk -h "$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img" - - # Setup EFI grub - grub-bios-setup-efi \ - --device-map="$(KDIR)/grub2/device.map" \ - -d "$(KDIR)/grub2" \ - -r "hd0,gpt1" \ - "$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img" - endef - endif - - ifneq ($(CONFIG_GRUB_IMAGES),) define Image/Build/grub2 # left here because the image builder doesnt need these $(INSTALL_DIR) $(KDIR)/root.grub/boot/grub $(KDIR)/grub2 @@ -183,8 +94,6 @@ ifneq ($(CONFIG_GRUB_IMAGES)$(CONFIG_EFI_IMAGES),) -r "hd0,msdos1" \ "$(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img" endef - endif - endif define Image/Build/squashfs @@ -224,14 +133,6 @@ ifneq ($(CONFIG_VDI_IMAGES),) # XXX: VBoxManage insists on setting perms to 0600 chmod 0644 $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).vdi endef - define Image/Build/vdi_efi - rm $(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).vdi || true - qemu-img convert -f raw -O vdi \ - $(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img \ - $(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).vdi - # XXX: VBoxManage insists on setting perms to 0600 - chmod 0644 $(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).vdi - endef endif ifneq ($(CONFIG_VMDK_IMAGES),) @@ -241,22 +142,11 @@ ifneq ($(CONFIG_VMDK_IMAGES),) $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \ $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).vmdk endef - define Image/Build/vmdk_efi - rm $(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).vmdk || true - qemu-img convert -f raw -O vmdk \ - $(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img \ - $(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).vmdk - endef endif define Image/Build/gzip - gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img -ifneq ($(CONFIG_GRUB_IMAGES),) gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img -endif -ifneq ($(CONFIG_EFI_IMAGES),) - gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img -endif + gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img endef ifneq ($(CONFIG_TARGET_IMAGES_GZIP),) @@ -284,15 +174,8 @@ define Image/Build $(call Image/Build/$(1)) ifneq ($(1),iso) $(call Image/Build/grub2,$(1)) - $(call Image/Build/efi,$(1)) -ifneq ($(CONFIG_GRUB_IMAGES),) $(call Image/Build/vdi,$(1)) $(call Image/Build/vmdk,$(1)) -endif -ifneq ($(CONFIG_EFI_IMAGES),) - $(call Image/Build/vdi_efi,$(1)) - $(call Image/Build/vmdk_efi,$(1)) -endif $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img else $(CP) $(KDIR)/root.iso $(BIN_DIR)/$(IMG_PREFIX).iso diff --git a/target/linux/x86/image/gen_image_efi.sh b/target/linux/x86/image/gen_image_efi.sh deleted file mode 100755 index 3ecb25fed96aa9..00000000000000 --- a/target/linux/x86/image/gen_image_efi.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash -set -x -[ $# == 8 -o $# == 9 ] || { - echo "SYNTAX: $0 []" - exit 1 -} - -OUTPUT="$1" -KERNELSIZE="$2" -KERNELDIR="$3" -EFISIZE="$4" -EFIIMAGE="$5" -EFIGRUBSIZE="$6" -ROOTFSSIZE="$7" -ROOTFSIMAGE="$8" -ALIGN="$9" - -rm -f "$OUTPUT" - -head=16 -sect=63 -cyl=$(( ($KERNELSIZE + $EFISIZE + $EFIGRUBSIZE + $ROOTFSSIZE) * 1024 * 1024 / ($head * $sect * 512) )) - -# create partition table -set `ptgen -o "$OUTPUT" -h $head -s $sect -p ${KERNELSIZE}m -p ${EFISIZE}m -p ${EFIGRUBSIZE}m -p ${ROOTFSSIZE}m ${ALIGN:+-l $ALIGN} ${SIGNATURE:+-S 0x$SIGNATURE}` - -KERNELOFFSET="$(($1 / 512))" -KERNELSIZE="$2" -EFIOFFSET="$(($3 / 512))" -EFISIZE="$(($4 / 512))" -EFIGRUBOFFSET="$(($5 / 512))" -EFIGRUBSIZE="$(($6 / 512))" -ROOTFSOFFSET="$(($7 / 512))" -ROOTFSSIZE="$(($8 / 512))" - -dd if=/dev/zero of="$OUTPUT" bs=512 seek="$ROOTFSOFFSET" conv=notrunc count="$ROOTFSSIZE" -dd if="$ROOTFSIMAGE" of="$OUTPUT" bs=512 seek="$ROOTFSOFFSET" conv=notrunc -dd if="$EFIIMAGE" of="$OUTPUT" bs=512 seek="$EFIOFFSET" conv=notrunc - -[ -n "$NOGRUB" ] && exit 0 - -make_ext4fs -J -l "$KERNELSIZE" "$OUTPUT.kernel" "$KERNELDIR" -dd if="$OUTPUT.kernel" of="$OUTPUT" bs=512 seek="$KERNELOFFSET" conv=notrunc -rm -f "$OUTPUT.kernel" diff --git a/target/linux/x86/patches-4.9/200-pcengines-apu2-reboot.patch b/target/linux/x86/patches-4.9/200-pcengines-apu2-reboot.patch new file mode 100644 index 00000000000000..f4f4860e5adae8 --- /dev/null +++ b/target/linux/x86/patches-4.9/200-pcengines-apu2-reboot.patch @@ -0,0 +1,19 @@ +--- a/arch/x86/kernel/reboot.c ++++ b/arch/x86/kernel/reboot.c +@@ -443,6 +443,16 @@ static struct dmi_system_id __initdata r + }, + }, + ++ /* PC Engines */ ++ { /* Handle problems with rebooting on PC Engines apu2 */ ++ .callback = set_pci_reboot, ++ .ident = "PC Engines apu2", ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "PC Engines"), ++ DMI_MATCH(DMI_BOARD_NAME, "apu2"), ++ }, ++ }, ++ + /* Sony */ + { /* Handle problems with rebooting on Sony VGN-Z540N */ + .callback = set_bios_reboot, diff --git a/target/sdk/Makefile b/target/sdk/Makefile index ae65fd1c8f4a43..ba2867406cf872 100644 --- a/target/sdk/Makefile +++ b/target/sdk/Makefile @@ -36,7 +36,8 @@ SDK_DIRS = \ $(STAGING_SUBDIR_HOST) \ $(STAGING_SUBDIR_TOOLCHAIN) -GIT_URL:=$(filter git://% http://% https://%,$(shell git config --get remote.origin.url 2>/dev/null)) +GIT_URL:=$(shell git config --get remote.origin.url 2>/dev/null) +GIT_URL:=$(if $(CONFIG_BUILDBOT),$(filter git://% http://% https://%,$(GIT_URL)),$(GIT_URL)) GIT_COMMIT:=$(shell git rev-parse HEAD 2>/dev/null) GIT_BRANCH:=$(filter-out master HEAD,$(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)) GIT_TAGNAME:=$(shell git show-ref --tags --dereference 2>/dev/null | sed -ne '/^$(GIT_COMMIT) / { s|^.*/||; s|\^.*||; p }') @@ -44,7 +45,7 @@ GIT_TAGNAME:=$(shell git show-ref --tags --dereference 2>/dev/null | sed -ne '/^ BASE_FEED:=$(if $(GIT_URL),src-git base $(GIT_URL)$(if $(GIT_BRANCH),;$(GIT_BRANCH),$(if $(GIT_TAGNAME),;$(GIT_TAGNAME)))) BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),$(shell cd $(TOPDIR); LC_ALL=C git svn info 2>/dev/null | sed -ne 's/^URL: /src-gitsvn base /p')) BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),$(shell cd $(TOPDIR); LC_ALL=C svn info 2>/dev/null | sed -ne 's/^URL: /src-svn base /p')) -BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),src-git base https://git.lede-project.org/source.git$(if $(GIT_BRANCH),;$(GIT_BRANCH),$(if $(GIT_TAGNAME),;$(GIT_TAGNAME)))) +BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),src-git base https://git.openwrt.org/source.git$(if $(GIT_BRANCH),;$(GIT_BRANCH),$(if $(GIT_TAGNAME),;$(GIT_TAGNAME)))) KDIR_BASE = $(patsubst $(TOPDIR)/%,%,$(LINUX_DIR)) diff --git a/toolchain-old/Config.in b/toolchain-old/Config.in deleted file mode 100644 index f6753ad8ba92d6..00000000000000 --- a/toolchain-old/Config.in +++ /dev/null @@ -1,318 +0,0 @@ -# Copyright (C) 2006-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -menuconfig TARGET_OPTIONS - bool "Target Options" if DEVEL - - config TARGET_OPTIMIZATION - string "Target Optimizations" if TARGET_OPTIONS - default DEFAULT_TARGET_OPTIMIZATION - help - Optimizations to use when building for the target host. - - config SOFT_FLOAT - bool "Use software floating point by default" if TARGET_OPTIONS - default y if !HAS_FPU - depends on arm || armeb || powerpc || mipsel || mips || mips64el || mips64 - help - If your target CPU does not have a Floating Point Unit (FPU) or a - kernel FPU emulator, but you still wish to support floating point - functions, then everything will need to be compiled with soft floating - point support (-msoft-float). - - Most people will answer N. - - config USE_MIPS16 - bool "Build packages with MIPS16 instructions" if TARGET_OPTIONS - depends on HAS_MIPS16 - default y - help - If your target CPU does support the MIPS16 instruction set - and you want to use it for packages, enable this option. - MIPS16 produces smaller binaries thus reducing pressure on - caches and TLB. - - Most people will answer N. - - -menuconfig EXTERNAL_TOOLCHAIN - bool - prompt "Use external toolchain" if DEVEL - help - If enabled, LEDE will compile using an existing toolchain instead of - compiling one. - - config NATIVE_TOOLCHAIN - bool - prompt "Use host's toolchain" if DEVEL - depends on EXTERNAL_TOOLCHAIN - select NO_STRIP - help - If enabled, LEDE will compile using the native toolchain for your - host instead of compiling one. - - config TARGET_NAME - string - prompt "Target name" if DEVEL - depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN - default "aarch64-unknown-linux-gnu" if aarch64 - default "aarch64_be-unknown-linux-gnu" if aarch64_be - default "arm-unknown-linux-gnu" if arm - default "armeb-unknown-linux-gnu" if armeb - default "i486-unknown-linux-gnu" if i386 - default "mips-unknown-linux-gnu" if mips - default "mipsel-unknown-linux-gnu" if mipsel - default "powerpc-unknown-linux-gnu" if powerpc - default "x86_64-unknown-linux-gnu" if x86_64 - - config TOOLCHAIN_PREFIX - string - prompt "Toolchain prefix" if DEVEL - depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN - default "aarch64-unknown-linux-gnu" if aarch64 - default "aarch64_be-unknown-linux-gnu" if aarch64_be - default "arm-unknown-linux-gnu-" if arm - default "armeb-unknown-linux-gnu-" if armeb - default "i486-unknown-linux-gnu-" if i386 - default "mips-unknown-linux-gnu-" if mips - default "mipsel-unknown-linux-gnu-" if mipsel - default "powerpc-unknown-linux-gnu-" if powerpc - default "x86_64-unknown-linux-gnu-" if x86_64 - - config TOOLCHAIN_ROOT - string - prompt "Toolchain root" if DEVEL - depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN - default "/opt/cross/aarch64-unknown-linux-gnu" if aarch64 - default "/opt/cross/aarch64_be-unknown-linux-gnu" if aarch64_be - default "/opt/cross/arm-unknown-linux-gnu" if arm - default "/opt/cross/armeb-unknown-linux-gnu" if armeb - default "/opt/cross/i486-unknown-linux-gnu" if i386 - default "/opt/cross/mips-unknown-linux-gnu" if mips - default "/opt/cross/mipsel-unknown-linux-gnu" if mipsel - default "/opt/cross/powerpc-unknown-linux-gnu" if powerpc - default "/opt/cross/x86_64-unknown-linux-gnu" if x86_64 - - choice TOOLCHAIN_LIBC_TYPE - prompt "Toolchain libc" if DEVEL - depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN - default EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL - help - Specify the libc type used by the external toolchain. The given value - is passed as -m flag to all gcc and g++ invocations. This is mainly - intended for multilib toolchains which support glibc and uclibc at - the same time. If no value is specified, no -m flag is passed. - - config EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC - bool "glibc" - select USE_GLIBC - - config EXTERNAL_TOOLCHAIN_LIBC_USE_UCLIBC - bool "uClibc" - select USE_UCLIBC - depends on !(aarch64 || aarch64_be) - - config EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL - bool "musl" - select USE_MUSL - - endchoice - - config TOOLCHAIN_LIBC - string - depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN - default "glibc" if EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC - default "uclibc" if EXTERNAL_TOOLCHAIN_LIBC_USE_UCLIBC - default "musl" if EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL - - config TOOLCHAIN_BIN_PATH - string - prompt "Toolchain program path" if DEVEL - depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN - default "./usr/bin ./bin" - help - Specify additional directories searched for toolchain binaries - (override PATH). Use ./DIR for directories relative to the root above. - - config TOOLCHAIN_INC_PATH - string - prompt "Toolchain include path" if DEVEL - depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN - default "./usr/include ./include" - help - Specify additional directories searched for header files (override - CPPFLAGS). Use ./DIR for directories relative to the root above. - - config TOOLCHAIN_LIB_PATH - string - prompt "Toolchain library path" if DEVEL - depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN - default "./usr/lib ./lib" - help - Specify additional directories searched for libraries (override LDFLAGS). - Use ./DIR for directories relative to the root above. - -config NEED_TOOLCHAIN - bool - depends on DEVEL - default y if !EXTERNAL_TOOLCHAIN - -menuconfig TOOLCHAINOPTS - bool "Toolchain Options" if DEVEL - depends on NEED_TOOLCHAIN - -menuconfig EXTRA_TARGET_ARCH - bool - prompt "Enable an extra toolchain target architecture" if TOOLCHAINOPTS - depends on !sparc - default y if powerpc64 - default n - help - Some builds may require a 'biarch' toolchain. This option - allows you to specify an additional target arch. - - Most people will answer N here. - - config EXTRA_TARGET_ARCH_NAME - string - default "powerpc64" if powerpc64 - prompt "Extra architecture name" if EXTRA_TARGET_ARCH - help - Specify the cpu name (eg powerpc64 or x86_64) of the - additional target architecture. - - config EXTRA_TARGET_ARCH_OPTS - string - default "-m64" if powerpc64 - prompt "Extra architecture compiler options" if EXTRA_TARGET_ARCH - help - If you're specifying an addition target architecture, - you'll probably need to also provide options to make - the compiler use this alternate arch. - - For example, if you're building a compiler that can build - both powerpc and powerpc64 binaries, you'll need to - specify -m64 here. - - - choice - prompt "MIPS64 user-land ABI" if TOOLCHAINOPTS && (mips64 || mips64el) - default MIPS64_ABI_N64 - help - MIPS64 supports 3 different user-land ABIs: o32 (legacy), - n32 and n64. - - config MIPS64_ABI_N64 - bool "n64" - - config MIPS64_ABI_N32 - depends on !LIBC_USE_MUSL - bool "n32" - - config MIPS64_ABI_O32 - bool "o32" - - endchoice - -comment "Binary tools" - depends on TOOLCHAINOPTS - -source "toolchain/binutils/Config.in" - -comment "Compiler" - depends on TOOLCHAINOPTS - -source "toolchain/gcc/Config.in" - -config YASM - bool - depends on ( i386 || x86_64 ) - prompt "Build yasm" if TOOLCHAINOPTS - default y - help - Enable if you want to build yasm - -comment "C Library" - depends on TOOLCHAINOPTS - -choice - prompt "C Library implementation" if TOOLCHAINOPTS - default LIBC_USE_UCLIBC if arc - default LIBC_USE_MUSL - help - Select the C library implementation. - - config LIBC_USE_GLIBC - bool "Use glibc" - select USE_GLIBC - depends on !arc - - config LIBC_USE_UCLIBC - select USE_UCLIBC - bool "Use uClibc" - depends on !(aarch64 || aarch64_be) - depends on BROKEN || !(arm || armeb || i386 || x86_64 || mips || mipsel || mips64 || mips64el || powerpc) - - config LIBC_USE_MUSL - select USE_MUSL - bool "Use musl" - depends on !(arc) - -endchoice - -source "toolchain/uClibc/Config.in" - -comment "Debuggers" - depends on TOOLCHAINOPTS - -config GDB - bool - depends on !(aarch64 || aarch64_be) - prompt "Build gdb" if TOOLCHAINOPTS - default y if !EXTERNAL_TOOLCHAIN - help - Enable if you want to build the gdb. - -config USE_GLIBC - bool - -config USE_UCLIBC - default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (arc) - bool - -config USE_MUSL - default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc) - bool - -config USE_EXTERNAL_LIBC - bool - default y if EXTERNAL_TOOLCHAIN || NATIVE_TOOLCHAIN - -source "toolchain/binutils/Config.version" -source "toolchain/gcc/Config.version" - -config LIBC - string - default "glibc" if USE_GLIBC - default "uClibc" if USE_UCLIBC - default "musl" if USE_MUSL - -config TARGET_SUFFIX - string - default "gnueabi" if USE_GLIBC && (arm || armeb) - default "gnu" if USE_GLIBC && !(arm || armeb) - default "uclibcgnueabi" if USE_UCLIBC && (arm || armeb) - default "uclibc" if USE_UCLIBC && !(arm || armeb) - default "muslgnueabi" if USE_MUSL && (arm || armeb) - default "musl" if USE_MUSL && !(arm || armeb) - -config MIPS64_ABI - depends on mips64 || mips64el - string - default "64" if MIPS64_ABI_N64 - default "n32" if MIPS64_ABI_N32 - default "32" if MIPS64_ABI_O32 - default "64" diff --git a/toolchain-old/Makefile b/toolchain-old/Makefile deleted file mode 100644 index 409955c23a9c94..00000000000000 --- a/toolchain-old/Makefile +++ /dev/null @@ -1,97 +0,0 @@ -# -# Copyright (C) 2007-2009 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -# Main makefile for the toolchain -# -# Steps: -# 1) toolchain/binutils/compile -# build & install binutils -# 2) toolchain/gcc/minimal/compile -# build & install a minimal gcc, needed for steps 3 & 4 -# 3) toolchain/kernel-headers/compile -# install kernel headers, needed for step 4 -# 4) toolchain/libc/headers/compile -# build & install libc headers & support files, needed for step 5 -# 5) toolchain/gcc/initial/compile -# build & install an initial gcc, needed for step 6 -# 6) toolchain/libc/compile -# build & install the final libc -# 7) toolchain/gcc/final/compile -# build & install the final gcc -# 8) toolchain/libc/utils/compile -# build & install libc utilities -# -# For musl, steps 2 and 4 are skipped, and step 3 is done after 5 - -curdir:=toolchain - -# subdirectories to descend into -$(curdir)/builddirs := $(if $(CONFIG_GDB),gdb) $(if $(CONFIG_EXTERNAL_TOOLCHAIN),wrapper,kernel-headers binutils gcc/initial gcc/final $(LIBC) fortify-headers) $(if $(CONFIG_YASM),yasm) -ifdef CONFIG_USE_UCLIBC - $(curdir)/builddirs += $(LIBC)/utils -endif - -# builddir dependencies -ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) - ifdef CONFIG_USE_MUSL - $(curdir)/kernel-headers/compile:=$(curdir)/gcc/initial/compile - $(curdir)/$(LIBC)/compile:=$(curdir)/kernel-headers/compile - else - $(curdir)/builddirs += $(LIBC)/headers gcc/minimal - $(curdir)/gcc/minimal/compile:=$(curdir)/binutils/compile - $(curdir)/kernel-headers/compile:=$(curdir)/gcc/minimal/compile - $(curdir)/$(LIBC)/headers/compile:=$(curdir)/kernel-headers/compile - $(curdir)/gcc/initial/compile:=$(curdir)/$(LIBC)/headers/compile - endif - - $(curdir)/gcc/initial/compile+=$(curdir)/binutils/compile - $(curdir)/$(LIBC)/compile:=$(curdir)/gcc/initial/compile - $(curdir)/gcc/final/compile:=$(curdir)/$(LIBC)/compile - $(curdir)/$(LIBC)/utils/compile:=$(curdir)/gcc/final/compile -endif - -ifndef DUMP_TARGET_DB -ifneq ($(ARCH),) - $(TOOLCHAIN_DIR)/info.mk: .config - @for dir in $(TOOLCHAIN_DIR); do ( \ - $(if $(QUIET),,set -x;) \ - mkdir -p "$$dir"; \ - cd "$$dir"; \ - ln -nsf lib lib64; \ - ln -nsf lib lib32; \ - mkdir -p stamp lib usr/include usr/lib ; \ - ); done - @grep GCC_VERSION $@ >/dev/null 2>&1 || $(INSTALL_DATA) $(TOPDIR)/toolchain/info.mk $@ - @touch $@ -endif -endif - -ifdef CONFIG_BUILDBOT - $(TOOLCHAIN_DIR)/stamp/.ver_check: $(TMP_DIR)/.build - cd "$(TOPDIR)"; git log --format=%h -1 toolchain > $(TMP_DIR)/.ver_check - cmp -s $(TMP_DIR)/.ver_check $@ || { \ - rm -rf $(BUILD_DIR) $(STAGING_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR_TOOLCHAIN); \ - mkdir -p $(TOOLCHAIN_DIR)/stamp; \ - mv $(TMP_DIR)/.ver_check $@; \ - } - -$(TOOLCHAIN_DIR)/info.mk $(STAGING_DIR)/.prepared: $(TOOLCHAIN_DIR)/stamp/.ver_check -endif - -# prerequisites for the individual targets -$(curdir)/ := .config prereq -$(curdir)//compile = $(STAGING_DIR)/.prepared $(TOOLCHAIN_DIR)/info.mk $(tools/stamp-compile) - -ifndef DUMP_TARGET_DB -$(TOOLCHAIN_DIR)/stamp/.gcc-initial_installed: -endif - -$(curdir)/install: $(curdir)/compile - -$(eval $(call stampfile,$(curdir),toolchain,compile,$(TOOLCHAIN_DIR)/stamp/.gcc-initial_installed,,$(TOOLCHAIN_DIR))) -$(eval $(call stampfile,$(curdir),toolchain,check,$(TMP_DIR)/.build)) -$(eval $(call subdir,$(curdir))) - diff --git a/toolchain-old/binutils/Config.in b/toolchain-old/binutils/Config.in deleted file mode 100644 index 8fe33fb6b703dc..00000000000000 --- a/toolchain-old/binutils/Config.in +++ /dev/null @@ -1,32 +0,0 @@ -# Choose binutils version. - -choice - prompt "Binutils Version" if TOOLCHAINOPTS - default BINUTILS_USE_VERSION_2_28 if !arc - default BINUTILS_USE_VERSION_2_28_ARC if arc - help - Select the version of binutils you wish to use. - - config BINUTILS_USE_VERSION_2_27 - depends on !arc - bool "Binutils 2.27" - select BINUTILS_VERSION_2_27 - - config BINUTILS_USE_VERSION_2_28 - depends on !arc - bool "Binutils 2.28" - select BINUTILS_VERSION_2_28 - - config BINUTILS_USE_VERSION_2_28_ARC - depends on arc - bool "ARC binutils 2.28" - select BINUTILS_VERSION_2_28_ARC - -endchoice - -config EXTRA_BINUTILS_CONFIG_OPTIONS - string - prompt "Additional binutils configure options" if TOOLCHAINOPTS - default "" - help - Any additional binutils options you may want to include.... diff --git a/toolchain-old/binutils/Config.version b/toolchain-old/binutils/Config.version deleted file mode 100644 index 1b223e41096bf0..00000000000000 --- a/toolchain-old/binutils/Config.version +++ /dev/null @@ -1,16 +0,0 @@ -config BINUTILS_VERSION_2_27 - bool - -config BINUTILS_VERSION_2_28 - default y if (!TOOLCHAINOPTS && !arc) - bool - -config BINUTILS_VERSION_2_28_ARC - default y if (!TOOLCHAINOPTS && arc) - bool - -config BINUTILS_VERSION - string - default "2.27" if BINUTILS_VERSION_2_27 - default "2.28" if BINUTILS_VERSION_2_28 - default "arc-2017.03" if BINUTILS_VERSION_2_28_ARC diff --git a/toolchain-old/binutils/Makefile b/toolchain-old/binutils/Makefile deleted file mode 100644 index 6df11fbd3c5f94..00000000000000 --- a/toolchain-old/binutils/Makefile +++ /dev/null @@ -1,112 +0,0 @@ -# -# Copyright (C) 2006-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -include $(TOPDIR)/rules.mk - -PKG_NAME:=binutils -PKG_VERSION:=$(call qstrip,$(CONFIG_BINUTILS_VERSION)) -BIN_VERSION:=$(PKG_VERSION) - -PKG_SOURCE_URL:=@GNU/binutils/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 - -ifeq ($(PKG_VERSION),2.27) - PKG_HASH:=369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88 -endif - -ifeq ($(PKG_VERSION),2.28) - PKG_HASH:=6297433ee120b11b4b0a1c8f3512d7d73501753142ab9e2daa13c5a3edd32a72 -endif - -ifneq ($(CONFIG_BINUTILS_VERSION_2_28_ARC),) - PKG_REV:=arc-2017.03-release - PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/$(PKG_REV)/ - PKG_SOURCE:=$(PKG_NAME)-$(PKG_REV).tar.gz - PKG_HASH:=f9c1e09ef10aaf9619181f49587f464ba0a70d29b7f6f879047140acac852409 - BINUTILS_DIR:=$(PKG_NAME)-gdb-$(PKG_REV) - HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(BINUTILS_DIR) -endif - -HOST_BUILD_PARALLEL:=1 - -PATCH_DIR:=./patches/$(PKG_VERSION) - -include $(INCLUDE_DIR)/toolchain-build.mk - -BINUTILS_CONFIGURE:= \ - ./configure \ - --prefix=$(TOOLCHAIN_DIR) \ - --build=$(GNU_HOST_NAME) \ - --host=$(GNU_HOST_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --with-sysroot=$(TOOLCHAIN_DIR) \ - --enable-deterministic-archives \ - --enable-plugins \ - --disable-multilib \ - --disable-werror \ - --disable-nls \ - --disable-sim \ - --disable-gdb \ - $(GRAPHITE_CONFIGURE) \ - $(SOFT_FLOAT_CONFIG_OPTION) \ - $(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS)) - -ifneq ($(CONFIG_SSP_SUPPORT),) - BINUTILS_CONFIGURE+= \ - --enable-libssp -else - BINUTILS_CONFIGURE+= \ - --disable-libssp -endif - -ifneq ($(CONFIG_EXTRA_TARGET_ARCH),) - BINUTILS_CONFIGURE+= \ - --enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-$(TARGET_SUFFIX) -endif - -define Host/Prepare - $(call Host/Prepare/Default) - ln -snf $(notdir $(HOST_BUILD_DIR)) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) - $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_BUILD_DIR)/ - $(SED) 's, " Linaro.*,,' $(HOST_BUILD_DIR)/bfd/version.h -endef - -define Host/Configure - (cd $(HOST_BUILD_DIR); \ - $(BINUTILS_CONFIGURE) \ - ); -endef - -define Host/Compile - +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) all -endef - -define Host/Install - mkdir -p $(TOOLCHAIN_DIR)/initial - $(MAKE) -C $(HOST_BUILD_DIR) \ - prefix=$(TOOLCHAIN_DIR)/initial \ - install - $(MAKE) -C $(HOST_BUILD_DIR) \ - prefix=$(TOOLCHAIN_DIR) \ - install - $(call FixupLibdir,$(TOOLCHAIN_DIR)/initial) - $(RM) $(TOOLCHAIN_DIR)/initial/lib/libiberty.a - $(CP) $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-readelf $(HOST_BUILD_PREFIX)/bin/readelf - # ARC gcc requires extlib. - # If extlib is not available in "initial" folder - # initial gcc will fail to build libc. - if [ -d $(TOOLCHAIN_DIR)/extlib ]; then \ - $(CP) -r $(TOOLCHAIN_DIR)/extlib $(TOOLCHAIN_DIR)/initial/; \ - fi -endef - -define Host/Clean - rm -rf \ - $(HOST_BUILD_DIR) \ - $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) -endef - -$(eval $(call HostBuild)) diff --git a/toolchain-old/binutils/patches/2.27/001-MIPS_BFD_Remove_EI_ABIVERSION_5.patch b/toolchain-old/binutils/patches/2.27/001-MIPS_BFD_Remove_EI_ABIVERSION_5.patch deleted file mode 100644 index 36e09b1bba7cb6..00000000000000 --- a/toolchain-old/binutils/patches/2.27/001-MIPS_BFD_Remove_EI_ABIVERSION_5.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 4d4f40e041ce7c8c7c8e50f957e0440b64ab7e95 Mon Sep 17 00:00:00 2001 -From: "Maciej W. Rozycki" -Date: Fri, 23 Dec 2016 20:03:36 +0000 -Subject: [PATCH] MIPS/BFD: Remove EI_ABIVERSION 5 allocation for PT_GNU_STACK - support - -Revert commit 17733f5be961 ("Increment the ABIVERSION to 5 for MIPS -objects with non-executable stacks.") and remove EI_ABIVERSION 5 -allocation for PT_GNU_STACK support, which has not made it to glibc -and will be reassigned. - - bfd/ - * bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Revert - 2016-02-23 change and remove EI_ABIVERSION 5 support. ---- - bfd/ChangeLog | 5 +++++ - bfd/elfxx-mips.c | 3 --- - 2 files changed, 5 insertions(+), 3 deletions(-) - -diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c -index d649676..486607c 100644 ---- a/bfd/elfxx-mips.c -+++ b/bfd/elfxx-mips.c -@@ -16358,9 +16358,6 @@ _bfd_mips_post_process_headers (bfd *abfd, struct bfd_link_info *link_info) - if (mips_elf_tdata (abfd)->abiflags.fp_abi == Val_GNU_MIPS_ABI_FP_64 - || mips_elf_tdata (abfd)->abiflags.fp_abi == Val_GNU_MIPS_ABI_FP_64A) - i_ehdrp->e_ident[EI_ABIVERSION] = 3; -- -- if (elf_stack_flags (abfd) && !(elf_stack_flags (abfd) & PF_X)) -- i_ehdrp->e_ident[EI_ABIVERSION] = 5; - } - - int --- -2.9.3 - diff --git a/toolchain-old/binutils/patches/2.27/300-001_ld_makefile_patch.patch b/toolchain-old/binutils/patches/2.27/300-001_ld_makefile_patch.patch deleted file mode 100644 index e4cec7f69e3bbb..00000000000000 --- a/toolchain-old/binutils/patches/2.27/300-001_ld_makefile_patch.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/ld/Makefile.am -+++ b/ld/Makefile.am -@@ -57,7 +57,7 @@ endif - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ ---- a/ld/Makefile.in -+++ b/ld/Makefile.in -@@ -451,7 +451,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - BASEDIR = $(srcdir)/.. - BFDDIR = $(BASEDIR)/bfd - INCDIR = $(BASEDIR)/include diff --git a/toolchain-old/binutils/patches/2.27/300-012_check_ldrunpath_length.patch b/toolchain-old/binutils/patches/2.27/300-012_check_ldrunpath_length.patch deleted file mode 100644 index 95d3f75b85bd3f..00000000000000 --- a/toolchain-old/binutils/patches/2.27/300-012_check_ldrunpath_length.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/ld/emultempl/elf32.em -+++ b/ld/emultempl/elf32.em -@@ -1244,6 +1244,8 @@ fragment <link.next) - if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/toolchain-old/binutils/patches/2.27/400-mips_no_dynamic_linking_sym.patch b/toolchain-old/binutils/patches/2.27/400-mips_no_dynamic_linking_sym.patch deleted file mode 100644 index b7458e58aaf67a..00000000000000 --- a/toolchain-old/binutils/patches/2.27/400-mips_no_dynamic_linking_sym.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/bfd/elfxx-mips.c -+++ b/bfd/elfxx-mips.c -@@ -7713,6 +7713,7 @@ _bfd_mips_elf_create_dynamic_sections (b - - name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING"; - bh = NULL; -+ if (0) { - if (!(_bfd_generic_link_add_one_symbol - (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0, - NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh))) -@@ -7725,6 +7726,7 @@ _bfd_mips_elf_create_dynamic_sections (b - - if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; -+ } - - if (! mips_elf_hash_table (info)->use_rld_obj_head) - { diff --git a/toolchain-old/binutils/patches/2.27/500-Change-default-emulation-for-mips64-linux.patch b/toolchain-old/binutils/patches/2.27/500-Change-default-emulation-for-mips64-linux.patch deleted file mode 100644 index 7a8f0ae13a9709..00000000000000 --- a/toolchain-old/binutils/patches/2.27/500-Change-default-emulation-for-mips64-linux.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- a/bfd/config.bfd -+++ b/bfd/config.bfd -@@ -1101,12 +1101,12 @@ case "${targ}" in - targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec" - ;; - mips64*el-*-linux*) -- targ_defvec=mips_elf32_ntrad_le_vec -- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" -+ targ_defvec=mips_elf64_trad_le_vec -+ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec" - ;; - mips64*-*-linux*) -- targ_defvec=mips_elf32_ntrad_be_vec -- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" -+ targ_defvec=mips_elf64_trad_be_vec -+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec" - ;; - mips*el-*-linux*) - targ_defvec=mips_elf32_trad_le_vec ---- a/ld/configure.tgt -+++ b/ld/configure.tgt -@@ -513,11 +513,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmip - mips*-*-vxworks*) targ_emul=elf32ebmipvxworks - targ_extra_emuls="elf32elmipvxworks" ;; - mips*-*-windiss) targ_emul=elf32mipswindiss ;; --mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 -- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" -+mips64*el-*-linux-*) targ_emul=elf64ltsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" - targ_extra_libpath=$targ_extra_emuls ;; --mips64*-*-linux-*) targ_emul=elf32btsmipn32 -- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" -+mips64*-*-linux-*) targ_emul=elf64btsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" - targ_extra_libpath=$targ_extra_emuls ;; - mips*el-*-linux-*) targ_emul=elf32ltsmip - targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" diff --git a/toolchain-old/binutils/patches/2.28/300-001_ld_makefile_patch.patch b/toolchain-old/binutils/patches/2.28/300-001_ld_makefile_patch.patch deleted file mode 100644 index e4cec7f69e3bbb..00000000000000 --- a/toolchain-old/binutils/patches/2.28/300-001_ld_makefile_patch.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/ld/Makefile.am -+++ b/ld/Makefile.am -@@ -57,7 +57,7 @@ endif - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ ---- a/ld/Makefile.in -+++ b/ld/Makefile.in -@@ -451,7 +451,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - BASEDIR = $(srcdir)/.. - BFDDIR = $(BASEDIR)/bfd - INCDIR = $(BASEDIR)/include diff --git a/toolchain-old/binutils/patches/2.28/300-012_check_ldrunpath_length.patch b/toolchain-old/binutils/patches/2.28/300-012_check_ldrunpath_length.patch deleted file mode 100644 index 95d3f75b85bd3f..00000000000000 --- a/toolchain-old/binutils/patches/2.28/300-012_check_ldrunpath_length.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/ld/emultempl/elf32.em -+++ b/ld/emultempl/elf32.em -@@ -1244,6 +1244,8 @@ fragment <link.next) - if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/toolchain-old/binutils/patches/2.28/400-mips_no_dynamic_linking_sym.patch b/toolchain-old/binutils/patches/2.28/400-mips_no_dynamic_linking_sym.patch deleted file mode 100644 index b7458e58aaf67a..00000000000000 --- a/toolchain-old/binutils/patches/2.28/400-mips_no_dynamic_linking_sym.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/bfd/elfxx-mips.c -+++ b/bfd/elfxx-mips.c -@@ -7713,6 +7713,7 @@ _bfd_mips_elf_create_dynamic_sections (b - - name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING"; - bh = NULL; -+ if (0) { - if (!(_bfd_generic_link_add_one_symbol - (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0, - NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh))) -@@ -7725,6 +7726,7 @@ _bfd_mips_elf_create_dynamic_sections (b - - if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; -+ } - - if (! mips_elf_hash_table (info)->use_rld_obj_head) - { diff --git a/toolchain-old/binutils/patches/2.28/500-Change-default-emulation-for-mips64-linux.patch b/toolchain-old/binutils/patches/2.28/500-Change-default-emulation-for-mips64-linux.patch deleted file mode 100644 index 7a8f0ae13a9709..00000000000000 --- a/toolchain-old/binutils/patches/2.28/500-Change-default-emulation-for-mips64-linux.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- a/bfd/config.bfd -+++ b/bfd/config.bfd -@@ -1101,12 +1101,12 @@ case "${targ}" in - targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec" - ;; - mips64*el-*-linux*) -- targ_defvec=mips_elf32_ntrad_le_vec -- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" -+ targ_defvec=mips_elf64_trad_le_vec -+ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec" - ;; - mips64*-*-linux*) -- targ_defvec=mips_elf32_ntrad_be_vec -- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" -+ targ_defvec=mips_elf64_trad_be_vec -+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec" - ;; - mips*el-*-linux*) - targ_defvec=mips_elf32_trad_le_vec ---- a/ld/configure.tgt -+++ b/ld/configure.tgt -@@ -513,11 +513,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmip - mips*-*-vxworks*) targ_emul=elf32ebmipvxworks - targ_extra_emuls="elf32elmipvxworks" ;; - mips*-*-windiss) targ_emul=elf32mipswindiss ;; --mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 -- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" -+mips64*el-*-linux-*) targ_emul=elf64ltsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" - targ_extra_libpath=$targ_extra_emuls ;; --mips64*-*-linux-*) targ_emul=elf32btsmipn32 -- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" -+mips64*-*-linux-*) targ_emul=elf64btsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" - targ_extra_libpath=$targ_extra_emuls ;; - mips*el-*-linux-*) targ_emul=elf32ltsmip - targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" diff --git a/toolchain-old/binutils/patches/arc-2016.09-release/300-001_ld_makefile_patch.patch b/toolchain-old/binutils/patches/arc-2016.09-release/300-001_ld_makefile_patch.patch deleted file mode 100644 index e4cec7f69e3bbb..00000000000000 --- a/toolchain-old/binutils/patches/arc-2016.09-release/300-001_ld_makefile_patch.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/ld/Makefile.am -+++ b/ld/Makefile.am -@@ -57,7 +57,7 @@ endif - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ ---- a/ld/Makefile.in -+++ b/ld/Makefile.in -@@ -451,7 +451,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - BASEDIR = $(srcdir)/.. - BFDDIR = $(BASEDIR)/bfd - INCDIR = $(BASEDIR)/include diff --git a/toolchain-old/binutils/patches/arc-2016.09-release/300-012_check_ldrunpath_length.patch b/toolchain-old/binutils/patches/arc-2016.09-release/300-012_check_ldrunpath_length.patch deleted file mode 100644 index 95d3f75b85bd3f..00000000000000 --- a/toolchain-old/binutils/patches/arc-2016.09-release/300-012_check_ldrunpath_length.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/ld/emultempl/elf32.em -+++ b/ld/emultempl/elf32.em -@@ -1244,6 +1244,8 @@ fragment <link.next) - if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/toolchain-old/fortify-headers/Makefile b/toolchain-old/fortify-headers/Makefile deleted file mode 100644 index 8caf8c84ce1836..00000000000000 --- a/toolchain-old/fortify-headers/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/target.mk - -PKG_NAME:=fortify-headers -PKG_VERSION:=0.8 -PKG_RELEASE=1 - -PKG_SOURCE_URL:=http://dl.2f30.org/releases -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=afcd073d6d8d175eede2a28a7dd71b7150cb03290f99102261892c793f6b4cb1 - -include $(INCLUDE_DIR)/toolchain-build.mk - -define Host/Compile - true -endef - -define Host/Install - $(MAKE) -C $(HOST_BUILD_DIR) PREFIX="" DESTDIR="$(TOOLCHAIN_DIR)" install -endef - -$(eval $(call HostBuild)) diff --git a/toolchain-old/gcc/Config.in b/toolchain-old/gcc/Config.in deleted file mode 100644 index ea33ac29c17a20..00000000000000 --- a/toolchain-old/gcc/Config.in +++ /dev/null @@ -1,78 +0,0 @@ -# Choose gcc version. - -choice - prompt "GCC compiler Version" if TOOLCHAINOPTS - default GCC_USE_VERSION_6_3_ARC if arc - default GCC_USE_VERSION_5 - help - Select the version of gcc you wish to use. - - config GCC_USE_VERSION_6_3_ARC - select GCC_VERSION_6_3_ARC - bool "gcc 6.3.x with support of ARC cores" - depends on arc - - config GCC_USE_VERSION_5 - bool "gcc 5.x" - depends on !arc - - config GCC_USE_VERSION_6 - bool "gcc 6.x" - depends on !arc - - config GCC_USE_VERSION_7 - bool "gcc 7.x" - depends on !arc - -endchoice - -config GCC_USE_GRAPHITE - bool - prompt "Compile in support for the new Graphite framework in GCC 4.4+" if TOOLCHAINOPTS - -config EXTRA_GCC_CONFIG_OPTIONS - string - prompt "Additional gcc configure options" if TOOLCHAINOPTS - default "" - help - Any additional gcc options you may want to include.... - -config SSP_SUPPORT - bool - prompt "Enable Stack-Smashing Protection support" if TOOLCHAINOPTS - depends on !USE_MUSL - default y if !USE_MUSL - help - Enable Stack-Smashing Protection support - -config SJLJ_EXCEPTIONS - bool - prompt "Use setjump()/longjump() exceptions" if TOOLCHAINOPTS - default n - help - Use old setjump()/longjump() exceptions instead of the newer - frame unwinding exceptions handling routines. Warning: increases - code size and runtime memory usage. - -config INSTALL_LIBGCJ - bool - prompt "Build/install java compiler and GNU classpath ?" if TOOLCHAINOPTS - default n - help - Build/install java compiler and GNU classpath ? - - -config INSTALL_GFORTRAN - bool - prompt "Build/install fortran compiler?" if TOOLCHAINOPTS - default n - help - Build/install GNU fortran compiler ? - -config INSTALL_GCCGO - bool - prompt "Build/install Go compiler?" if TOOLCHAINOPTS - depends on USE_GLIBC || BROKEN - default n - help - Build/install GNU gccgo compiler ? diff --git a/toolchain-old/gcc/Config.version b/toolchain-old/gcc/Config.version deleted file mode 100644 index 86c723dc9ad8dd..00000000000000 --- a/toolchain-old/gcc/Config.version +++ /dev/null @@ -1,14 +0,0 @@ -config GCC_VERSION_6_3_ARC - default y if (!TOOLCHAINOPTS && arc) - bool - -config GCC_VERSION - string - default "arc-2017.03-release" if GCC_VERSION_6_3_ARC - default "6.3.0" if GCC_USE_VERSION_6 - default "7.1.0" if GCC_USE_VERSION_7 - default "5.4.0" - -config GCC_VERSION_6_3 - bool - default y if GCC_VERSION_6_3_ARC diff --git a/toolchain-old/gcc/common.mk b/toolchain-old/gcc/common.mk deleted file mode 100644 index abf69bfdc1d7f9..00000000000000 --- a/toolchain-old/gcc/common.mk +++ /dev/null @@ -1,228 +0,0 @@ -# -# Copyright (C) 2002-2003 Erik Andersen -# Copyright (C) 2004 Manuel Novoa III -# Copyright (C) 2005-2006 Felix Fietkau -# Copyright (C) 2006-2014 OpenWrt.org -# -# 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; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gcc -GCC_VERSION:=$(call qstrip,$(CONFIG_GCC_VERSION)) -PKG_VERSION:=$(firstword $(subst +, ,$(GCC_VERSION))) -GCC_DIR:=$(PKG_NAME)-$(PKG_VERSION) - -PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 - -ifeq ($(PKG_VERSION),5.4.0) - PKG_HASH:=608df76dec2d34de6558249d8af4cbee21eceddbcb580d666f7a5a583ca3303a -endif - -ifeq ($(PKG_VERSION),6.3.0) - PKG_HASH:=f06ae7f3f790fbf0f018f6d40e844451e6bc3b7bc96e128e63b09825c1f8b29f -endif - -ifeq ($(PKG_VERSION),7.1.0) - PKG_HASH:=8a8136c235f64c6fef69cac0d73a46a1a09bb250776a050aec8f9fc880bebc17 -endif - -ifneq ($(CONFIG_GCC_VERSION_6_3_ARC),) - PKG_VERSION:=6.3.0 - PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/archive/$(GCC_VERSION) - PKG_SOURCE:=$(PKG_NAME)-$(GCC_VERSION).tar.gz - PKG_HASH:=b7223e134199b1a6f71de629da6aa845790e55d28e9892143dde09b1bc878110 - PKG_REV:=2017.03-release - GCC_DIR:=gcc-arc-$(PKG_REV) - HOST_BUILD_DIR = $(BUILD_DIR_HOST)/$(PKG_NAME)-$(GCC_VERSION) -endif - -PATCH_DIR=../patches/$(GCC_VERSION) - -BUGURL=http://www.lede-project.org/bugs/ -PKGVERSION=OpenWrt GCC $(PKG_VERSION) $(REVISION) - -HOST_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/toolchain-build.mk - -HOST_SOURCE_DIR:=$(HOST_BUILD_DIR) -ifeq ($(GCC_VARIANT),minimal) - GCC_BUILD_DIR:=$(HOST_BUILD_DIR)-$(GCC_VARIANT) -else - HOST_BUILD_DIR:=$(HOST_BUILD_DIR)-$(GCC_VARIANT) - GCC_BUILD_DIR:=$(HOST_BUILD_DIR) -endif - -HOST_STAMP_PREPARED:=$(HOST_BUILD_DIR)/.prepared -HOST_STAMP_BUILT:=$(GCC_BUILD_DIR)/.built -HOST_STAMP_CONFIGURED:=$(GCC_BUILD_DIR)/.configured -HOST_STAMP_INSTALLED:=$(HOST_BUILD_PREFIX)/stamp/.gcc_$(GCC_VARIANT)_installed - -SEP:=, -TARGET_LANGUAGES:="c,c++$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)$(if $(CONFIG_INSTALL_GFORTRAN),$(SEP)fortran)$(if $(CONFIG_INSTALL_GCCGO),$(SEP)go)" - -TAR_OPTIONS += \ - --exclude-from='$(CURDIR)/../exclude-testsuite' --exclude=gcc/ada/*.ad* \ - -ifndef CONFIG_INSTALL_LIBGCJ - TAR_OPTIONS += --exclude=libjava -endif - -export libgcc_cv_fixed_point=no -ifdef CONFIG_USE_UCLIBC - export glibcxx_cv_c99_math_tr1=no -endif -ifdef CONFIG_INSTALL_GCCGO - export libgo_cv_c_split_stack_supported=no -endif - -ifdef CONFIG_GCC_USE_GRAPHITE - GRAPHITE_CONFIGURE:= --with-isl=$(TOPDIR)/staging_dir/host -else - GRAPHITE_CONFIGURE:= --without-isl --without-cloog -endif - -GCC_CONFIGURE:= \ - SHELL="$(BASH)" \ - $(if $(shell gcc --version 2>&1 | grep LLVM), \ - CFLAGS="-O2 -fbracket-depth=512 -pipe" \ - CXXFLAGS="-O2 -fbracket-depth=512 -pipe" \ - ) \ - $(HOST_SOURCE_DIR)/configure \ - --with-bugurl=$(BUGURL) \ - --with-pkgversion="$(PKGVERSION)" \ - --prefix=$(TOOLCHAIN_DIR) \ - --build=$(GNU_HOST_NAME) \ - --host=$(GNU_HOST_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --with-gnu-ld \ - --enable-target-optspace \ - --disable-libgomp \ - --disable-libmudflap \ - --disable-multilib \ - --disable-libmpx \ - --disable-nls \ - $(GRAPHITE_CONFIGURE) \ - --with-host-libstdcxx=-lstdc++ \ - $(SOFT_FLOAT_CONFIG_OPTION) \ - $(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \ - $(if $(CONFIG_mips64)$(CONFIG_mips64el),--with-arch=mips64 \ - --with-abi=$(call qstrip,$(CONFIG_MIPS64_ABI))) \ - $(if $(CONFIG_arc),--with-cpu=$(CONFIG_CPU_TYPE)) \ - --with-gmp=$(TOPDIR)/staging_dir/host \ - --with-mpfr=$(TOPDIR)/staging_dir/host \ - --with-mpc=$(TOPDIR)/staging_dir/host \ - --disable-decimal-float -ifneq ($(CONFIG_mips)$(CONFIG_mipsel),) - GCC_CONFIGURE += --with-mips-plt -endif - -ifndef GCC_VERSION_4_8 - GCC_CONFIGURE += --with-diagnostics-color=auto-if-env -endif - -ifneq ($(CONFIG_SSP_SUPPORT),) - GCC_CONFIGURE+= \ - --enable-libssp -else - GCC_CONFIGURE+= \ - --disable-libssp -endif - -ifneq ($(CONFIG_EXTRA_TARGET_ARCH),) - GCC_CONFIGURE+= \ - --enable-biarch \ - --enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-$(TARGET_SUFFIX) -endif - -ifdef CONFIG_sparc - GCC_CONFIGURE+= \ - --enable-targets=all \ - --with-long-double-128 -endif - -ifeq ($(LIBC),uClibc) - GCC_CONFIGURE+= \ - --disable-__cxa_atexit -else - GCC_CONFIGURE+= \ - --enable-__cxa_atexit -endif - -ifneq ($(GCC_ARCH),) - GCC_CONFIGURE+= --with-arch=$(GCC_ARCH) -endif - -ifneq ($(CONFIG_SOFT_FLOAT),y) - ifeq ($(CONFIG_arm),y) - GCC_CONFIGURE+= \ - --with-float=hard - endif -endif - -ifeq ($(CONFIG_TARGET_x86)$(CONFIG_USE_GLIBC)$(CONFIG_INSTALL_GCCGO),yyy) - TARGET_CFLAGS+=-fno-split-stack -endif - -GCC_MAKE:= \ - export SHELL="$(BASH)"; \ - $(MAKE) \ - CFLAGS="$(HOST_CFLAGS)" \ - CFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" \ - CXXFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" \ - GOCFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" - -define Host/SetToolchainInfo - $(SED) 's,TARGET_CROSS=.*,TARGET_CROSS=$(REAL_GNU_TARGET_NAME)-,' $(TOOLCHAIN_DIR)/info.mk - $(SED) 's,GCC_VERSION=.*,GCC_VERSION=$(GCC_VERSION),' $(TOOLCHAIN_DIR)/info.mk -endef - -ifneq ($(GCC_PREPARE),) - define Host/Prepare - $(call Host/SetToolchainInfo) - $(call Host/Prepare/Default) - ln -snf $(GCC_DIR) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) - $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_SOURCE_DIR)/ - $(SED) 's,^MULTILIB_OSDIRNAMES,# MULTILIB_OSDIRNAMES,' $(HOST_SOURCE_DIR)/gcc/config/*/t-* - $(SED) 'd' $(HOST_SOURCE_DIR)/gcc/DEV-PHASE - $(SED) 's, DATESTAMP,,' $(HOST_SOURCE_DIR)/gcc/version.c - #(cd $(HOST_SOURCE_DIR)/libstdc++-v3; autoconf;); - $(SED) 's,gcc_no_link=yes,gcc_no_link=no,' $(HOST_SOURCE_DIR)/libstdc++-v3/configure - mkdir -p $(GCC_BUILD_DIR) - endef -else - define Host/Prepare - mkdir -p $(GCC_BUILD_DIR) - endef -endif - -define Host/Configure - (cd $(GCC_BUILD_DIR) && rm -f config.cache; \ - $(GCC_CONFIGURE) \ - ); -endef - -define Host/Clean - rm -rf $(if $(GCC_PREPARE),$(HOST_SOURCE_DIR)) \ - $(HOST_BUILD_PREFIX)/stamp/.gcc_* \ - $(HOST_BUILD_PREFIX)/stamp/.binutils_* \ - $(GCC_BUILD_DIR) \ - $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) \ - $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME) \ - $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gc* \ - $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-c* -endef diff --git a/toolchain-old/gcc/exclude-testsuite b/toolchain-old/gcc/exclude-testsuite deleted file mode 100644 index 37a8f2476e8428..00000000000000 --- a/toolchain-old/gcc/exclude-testsuite +++ /dev/null @@ -1,9 +0,0 @@ -gcc-*/gcc/testsuite/ada -gcc-*/gcc/testsuite/brig.dg -gcc-*/gcc/testsuite/c-c++-common -gcc-*/gcc/testsuite/ChangeLog* -gcc-*/gcc/testsuite/config -gcc-*/gcc/testsuite/g* -gcc-*/gcc/testsuite/jit.dg -gcc-*/gcc/testsuite/lib -gcc-*/gcc/testsuite/o* diff --git a/toolchain-old/gcc/files/alternate-arch-cc.in b/toolchain-old/gcc/files/alternate-arch-cc.in deleted file mode 100644 index e169951ebe9961..00000000000000 --- a/toolchain-old/gcc/files/alternate-arch-cc.in +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -exec @CC_BASE@ @EXTRA_ARCH_OPTS@ "$@" diff --git a/toolchain-old/gcc/final/Makefile b/toolchain-old/gcc/final/Makefile deleted file mode 100644 index b815f677d669c8..00000000000000 --- a/toolchain-old/gcc/final/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -GCC_VARIANT:=final - -include ../common.mk - -GCC_CONFIGURE += \ - --with-headers=$(TOOLCHAIN_DIR)/include \ - --disable-libsanitizer \ - --enable-languages=$(TARGET_LANGUAGES) \ - --enable-shared \ - --enable-threads \ - --with-slibdir=$(TOOLCHAIN_DIR)/lib \ - --enable-lto \ - --with-libelf=$(TOPDIR)/staging_dir/host - -ifdef CONFIG_USE_MUSL - GCC_MAKE += gcc_cv_libc_provides_ssp=yes -endif - -ifneq ($(CONFIG_SJLJ_EXCEPTIONS),) - GCC_CONFIGURE += \ - --enable-sjlj-exceptions -endif - -define CleanupToolchain - $(INSTALL_DIR) $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME) - # Important! Required for limits.h to be fixed. - rm -rf $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include - ln -sf ../include $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include - rm -rf $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib - ln -sf ../lib $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib - $(if $(CONFIG_ARCH_64BIT),ln -sf ../lib64 $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib64) -endef - -define Host/Configure - $(CleanupToolchain) - mkdir -p $(GCC_BUILD_DIR) - (cd $(GCC_BUILD_DIR) && rm -f config.cache; \ - $(GCC_CONFIGURE) \ - ); -endef - -ifeq ($(CONFIG_USE_GLIBC)$(CONFIG_INSTALL_GCCGO),yy) -define FixGogccCrt - # link crtX.o for gotools - mkdir -p $(GCC_BUILD_DIR)/gotools - $(foreach crt, i 1 n, ln -sf ../../glibc-dev/lib/crt$(crt).o $(GCC_BUILD_DIR)/gotools/ ; ) -endef -endif - -define Host/Compile - $(FixGogccCrt) - +$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) all -endef - -define SetupExtraArch - for app in $(TOOLCHAIN_DIR)/bin/$(OPTIMIZE_FOR_CPU)*-{gcc,gcc-*,g++}; do \ - [ -e $$$$app ] || continue; \ - old_base=$$$$(basename $$$$app); \ - new_base=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-$$$${old_base##$(OPTIMIZE_FOR_CPU)-}; \ - sed -e "s/@CC_BASE@/$$$$old_base/" \ - -e 's/@EXTRA_ARCH_OPTS@/$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_OPTS))/' \ - ../files/alternate-arch-cc.in > \ - $(TOOLCHAIN_DIR)/bin/$$$$new_base; \ - chmod a+x $(TOOLCHAIN_DIR)/bin/$$$$new_base; \ - done -endef - -define Host/Install - $(CleanupToolchain) - +$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) install - # Set up the symlinks to enable lying about target name. - set -e; \ - (cd $(TOOLCHAIN_DIR); \ - ln -sf $(REAL_GNU_TARGET_NAME) $(GNU_TARGET_NAME); \ - cd bin; \ - for app in $(REAL_GNU_TARGET_NAME)-* ; do \ - ln -sf $$$${app} \ - $(GNU_TARGET_NAME)$$$${app##$(REAL_GNU_TARGET_NAME)}; \ - done; \ - ); - $(if $(CONFIG_EXTRA_TARGET_ARCH),$(call SetupExtraArch)) - $(RM) $(TOOLCHAIN_DIR)/lib/libiberty.a - $(SCRIPT_DIR)/patch-specs.sh "$(TOOLCHAIN_DIR)" -endef - -$(eval $(call HostBuild)) - diff --git a/toolchain-old/gcc/initial/Makefile b/toolchain-old/gcc/initial/Makefile deleted file mode 100644 index c71b17dd87b105..00000000000000 --- a/toolchain-old/gcc/initial/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -GCC_VARIANT:=initial -GCC_PREPARE=$(CONFIG_USE_MUSL) - -include ../common.mk - -GCC_CONFIGURE += \ - --with-newlib \ - --with-sysroot=$(TOOLCHAIN_DIR) \ - --enable-languages=c \ - --disable-shared \ - --disable-threads \ - -define Host/Compile - +$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) \ - all-build-libiberty \ - all-gcc \ - all-target-libgcc -endef - -define Host/Install - +$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) \ - prefix="$(TOOLCHAIN_DIR)/initial" \ - install-gcc \ - install-target-libgcc - - # XXX: glibc insists on linking against libgcc_eh - ( cd $(TOOLCHAIN_DIR)/initial/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) ; \ - [ -e libgcc_eh.a ] || ln -sf libgcc.a libgcc_eh.a ; \ - cp libgcc.a libgcc_initial.a; \ - ) - - $(call FixupLibdir,$(TOOLCHAIN_DIR)/initial) - $$(call file_copy,$(TOOLCHAIN_DIR)/initial/.,$(TOOLCHAIN_DIR)/) -endef - -$(eval $(call HostBuild)) diff --git a/toolchain-old/gcc/minimal/Makefile b/toolchain-old/gcc/minimal/Makefile deleted file mode 100644 index 31d6f675abe134..00000000000000 --- a/toolchain-old/gcc/minimal/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -GCC_VARIANT:=minimal -GCC_PREPARE=$(if $(CONFIG_USE_MUSL),,1) - -include ../common.mk - -GCC_CONFIGURE += \ - --with-newlib \ - --without-headers \ - --enable-languages=c \ - --disable-libsanitizer \ - --disable-libssp \ - --disable-shared \ - --disable-threads - -define Host/Compile - +$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) all-gcc all-target-libgcc -endef - -define Host/Install - $(GCC_MAKE) -C $(GCC_BUILD_DIR) install-gcc install-target-libgcc -endef - -define Host/Clean - rm -rf \ - $(HOST_BUILD_DIR) \ - $(GCC_BUILD_DIR) -endef - -$(eval $(call HostBuild)) diff --git a/toolchain-old/gcc/patches/5.4.0/001-revert_register_mode_search.patch b/toolchain-old/gcc/patches/5.4.0/001-revert_register_mode_search.patch deleted file mode 100644 index 06373eb6a0d026..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/001-revert_register_mode_search.patch +++ /dev/null @@ -1,65 +0,0 @@ -Revert of: - -commit 275035b56823b26d5fb7e90fad945b998648edf2 -Author: bergner -Date: Thu Sep 5 14:09:07 2013 +0000 - - PR target/58139 - * reginfo.c (choose_hard_reg_mode): Scan through all mode classes - looking for widest mode. - - - git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202286 138bc75d-0d04-0410-961f-82ee72b054a4 - - ---- a/gcc/reginfo.c -+++ b/gcc/reginfo.c -@@ -665,35 +665,40 @@ choose_hard_reg_mode (unsigned int regno - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - - if (found_mode != VOIDmode) diff --git a/toolchain-old/gcc/patches/5.4.0/002-case_insensitive.patch b/toolchain-old/gcc/patches/5.4.0/002-case_insensitive.patch deleted file mode 100644 index b3d2dbe291f5a5..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/002-case_insensitive.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/include/filenames.h -+++ b/include/filenames.h -@@ -43,11 +43,6 @@ extern "C" { - # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) - #else /* not DOSish */ --# if defined(__APPLE__) --# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM --# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 --# endif --# endif /* __APPLE__ */ - # define HAS_DRIVE_SPEC(f) (0) - # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/toolchain-old/gcc/patches/5.4.0/010-documentation.patch b/toolchain-old/gcc/patches/5.4.0/010-documentation.patch deleted file mode 100644 index 07064a97bc1c47..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/010-documentation.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -2941,18 +2941,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) - doc/gccint.info: $(TEXI_GCCINT_FILES) - doc/cppinternals.info: $(TEXI_CPPINT_FILES) - --doc/%.info: %.texi -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/%.info: - - # Duplicate entry to handle renaming of gccinstall.info --doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/gccinstall.info: - - doc/cpp.dvi: $(TEXI_CPP_FILES) - doc/gcc.dvi: $(TEXI_GCC_FILES) diff --git a/toolchain-old/gcc/patches/5.4.0/020-no-plt-backport.patch b/toolchain-old/gcc/patches/5.4.0/020-no-plt-backport.patch deleted file mode 100644 index b9702c9520a008..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/020-no-plt-backport.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/gcc/calls.c -+++ b/gcc/calls.c -@@ -225,6 +225,12 @@ prepare_call_address (tree fndecl_or_typ - && targetm.small_register_classes_for_mode_p (FUNCTION_MODE)) - ? force_not_mem (memory_address (FUNCTION_MODE, funexp)) - : memory_address (FUNCTION_MODE, funexp)); -+ else if (flag_pic && !flag_plt && fndecl_or_type -+ && TREE_CODE (fndecl_or_type) == FUNCTION_DECL -+ && !targetm.binds_local_p (fndecl_or_type)) -+ { -+ funexp = force_reg (Pmode, funexp); -+ } - else if (! sibcallp) - { - #ifndef NO_FUNCTION_CSE ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -1779,6 +1779,10 @@ fpie - Common Report Var(flag_pie,1) Negative(fPIC) - Generate position-independent code for executables if possible (small mode) - -+fplt -+Common Report Var(flag_plt) Init(1) -+Use PLT for PIC calls (-fno-plt: load the address from GOT at call site) -+ - fplugin= - Common Joined RejectNegative Var(common_deferred_options) Defer - Specify a plugin to load diff --git a/toolchain-old/gcc/patches/5.4.0/040-fix-mips-ICE-PR-68400.patch b/toolchain-old/gcc/patches/5.4.0/040-fix-mips-ICE-PR-68400.patch deleted file mode 100644 index e88af34032513b..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/040-fix-mips-ICE-PR-68400.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -8001,9 +8001,17 @@ mask_low_and_shift_p (machine_mode mode, - bool - and_operands_ok (machine_mode mode, rtx op1, rtx op2) - { -- return (memory_operand (op1, mode) -- ? and_load_operand (op2, mode) -- : and_reg_operand (op2, mode)); -+ if (!memory_operand (op1, mode)) -+ return and_reg_operand (op2, mode); -+ -+ if (!and_load_operand (op2, mode)) -+ return false; -+ -+ if (!TARGET_MIPS16 || si_mask_operand(op2, mode)) -+ return true; -+ -+ op1 = XEXP (op1, 0); -+ return !(REG_P (op1) && REGNO (op1) == STACK_POINTER_REGNUM); - } - - /* The canonical form of a mask-low-and-shift-left operation is diff --git a/toolchain-old/gcc/patches/5.4.0/200-musl_config.patch b/toolchain-old/gcc/patches/5.4.0/200-musl_config.patch deleted file mode 100644 index b9a5b28274634e..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/200-musl_config.patch +++ /dev/null @@ -1,309 +0,0 @@ -From: ktkachov -Date: Fri, 8 May 2015 08:25:47 +0000 (+0000) -Subject: [PATCH 2/13] musl libc config -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a9173ceabaf29c16f8ef226fbf98af373a4b2ceb - -[PATCH 2/13] musl libc config - -2015-05-08 Gregor Richards - Szabolcs Nagy - - * config.gcc (LIBC_MUSL): New tm_defines macro. - * config/linux.h (OPTION_MUSL): Define. - (MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER32,) - (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32,) - (INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,) - (INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,) - (INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define. - * config/linux.opt (mmusl): New option. - * doc/invoke.texi (GNU/Linux Options): Document -mmusl. - * configure.ac (gcc_cv_libc_provides_ssp): Add *-*-musl*. - (gcc_cv_target_dl_iterate_phdr): Add *-linux-musl*. - * configure: Regenerate. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222904 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -575,7 +575,7 @@ case ${target} in - esac - - # Common C libraries. --tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3" -+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" - - # 32-bit x86 processors supported by --with-arch=. Each processor - # MUST be separated by exactly one space. -@@ -720,6 +720,9 @@ case ${target} in - *-*-*uclibc*) - tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" - ;; -+ *-*-*musl*) -+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL" -+ ;; - *) - tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" - ;; ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -32,10 +32,12 @@ see the files COPYING3 and COPYING.RUNTI - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ -@@ -50,21 +52,25 @@ see the files COPYING3 and COPYING.RUNTI - } while (0) - - /* Determine which dynamic linker to use depending on whether GLIBC or -- uClibc or Bionic is the default C library and whether -- -muclibc or -mglibc or -mbionic has been passed to change the default. */ -+ uClibc or Bionic or musl is the default C library and whether -+ -muclibc or -mglibc or -mbionic or -mmusl has been passed to change -+ the default. */ - --#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \ -- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}" -+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \ -+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}" - - #if DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M) - #elif DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M) - #elif DEFAULT_LIBC == LIBC_BIONIC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M) -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B) - #else - #error "Unsupported DEFAULT_LIBC" - #endif /* DEFAULT_LIBC */ -@@ -81,24 +87,100 @@ see the files COPYING3 and COPYING.RUNTI - #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" - #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" - #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32" -+/* Should be redefined for each target that supports musl. */ -+#define MUSL_DYNAMIC_LINKER "/dev/null" -+#define MUSL_DYNAMIC_LINKER32 "/dev/null" -+#define MUSL_DYNAMIC_LINKER64 "/dev/null" -+#define MUSL_DYNAMIC_LINKERX32 "/dev/null" - - #define GNU_USER_DYNAMIC_LINKER \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ -- BIONIC_DYNAMIC_LINKER) -+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) - #define GNU_USER_DYNAMIC_LINKER32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \ -- BIONIC_DYNAMIC_LINKER32) -+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) - #define GNU_USER_DYNAMIC_LINKER64 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \ -- BIONIC_DYNAMIC_LINKER64) -+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) - #define GNU_USER_DYNAMIC_LINKERX32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \ -- BIONIC_DYNAMIC_LINKERX32) -+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32) - - /* Whether we have Bionic libc runtime */ - #undef TARGET_HAS_BIONIC - #define TARGET_HAS_BIONIC (OPTION_BIONIC) - -+/* musl avoids problematic includes by rearranging the include directories. -+ * Unfortunately, this is mostly duplicated from cppdefault.c */ -+#if DEFAULT_LIBC == LIBC_MUSL -+#define INCLUDE_DEFAULTS_MUSL_GPP \ -+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ -+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ -+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, -+ -+#ifdef LOCAL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_LOCAL \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_LOCAL -+#endif -+ -+#ifdef PREFIX_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_PREFIX -+#endif -+ -+#ifdef CROSS_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_CROSS \ -+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#ifdef TOOL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_TOOL \ -+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_TOOL -+#endif -+ -+#ifdef NATIVE_SYSTEM_HEADER_DIR -+#define INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_NATIVE -+#endif -+ -+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) -+# undef INCLUDE_DEFAULTS_MUSL_LOCAL -+# define INCLUDE_DEFAULTS_MUSL_LOCAL -+# undef INCLUDE_DEFAULTS_MUSL_NATIVE -+# define INCLUDE_DEFAULTS_MUSL_NATIVE -+#else -+# undef INCLUDE_DEFAULTS_MUSL_CROSS -+# define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#undef INCLUDE_DEFAULTS -+#define INCLUDE_DEFAULTS \ -+ { \ -+ INCLUDE_DEFAULTS_MUSL_GPP \ -+ INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ INCLUDE_DEFAULTS_MUSL_CROSS \ -+ INCLUDE_DEFAULTS_MUSL_TOOL \ -+ INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ -+ { 0, 0, 0, 0, 0, 0 } \ -+ } -+#endif -+ - #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */ - /* This is a *uclinux* target. We don't define below macros to normal linux - versions, because doing so would require *uclinux* targets to include ---- a/gcc/config/linux.opt -+++ b/gcc/config/linux.opt -@@ -28,5 +28,9 @@ Target Report RejectNegative Var(linux_l - Use GNU C library - - muclibc --Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) -+Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mmusl) - Use uClibc C library -+ -+mmusl -+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mbionic) -+Use musl C library ---- a/gcc/configure -+++ b/gcc/configure -@@ -27833,6 +27833,9 @@ if test "${gcc_cv_libc_provides_ssp+set} - else - gcc_cv_libc_provides_ssp=no - case "$target" in -+ *-*-musl*) -+ # All versions of musl provide stack protector -+ gcc_cv_libc_provides_ssp=yes;; - *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) - # glibc 2.4 and later provides __stack_chk_fail and - # either __stack_chk_guard, or TLS access to stack guard canary. -@@ -27865,6 +27868,7 @@ fi - # ) and for now - # simply assert that glibc does provide this, which is true for all - # realistically usable GNU/Hurd configurations. -+ # All supported versions of musl provide it as well - gcc_cv_libc_provides_ssp=yes;; - *-*-darwin* | *-*-freebsd*) - ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail" -@@ -27961,6 +27965,9 @@ case "$target" in - gcc_cv_target_dl_iterate_phdr=no - fi - ;; -+ *-linux-musl*) -+ gcc_cv_target_dl_iterate_phdr=yes -+ ;; - esac - - if test x$gcc_cv_target_dl_iterate_phdr = xyes; then ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -5287,6 +5287,9 @@ AC_CACHE_CHECK(__stack_chk_fail in targe - gcc_cv_libc_provides_ssp, - [gcc_cv_libc_provides_ssp=no - case "$target" in -+ *-*-musl*) -+ # All versions of musl provide stack protector -+ gcc_cv_libc_provides_ssp=yes;; - *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) - # glibc 2.4 and later provides __stack_chk_fail and - # either __stack_chk_guard, or TLS access to stack guard canary. -@@ -5313,6 +5316,7 @@ AC_CACHE_CHECK(__stack_chk_fail in targe - # ) and for now - # simply assert that glibc does provide this, which is true for all - # realistically usable GNU/Hurd configurations. -+ # All supported versions of musl provide it as well - gcc_cv_libc_provides_ssp=yes;; - *-*-darwin* | *-*-freebsd*) - AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes], -@@ -5386,6 +5390,9 @@ case "$target" in - gcc_cv_target_dl_iterate_phdr=no - fi - ;; -+ *-linux-musl*) -+ gcc_cv_target_dl_iterate_phdr=yes -+ ;; - esac - GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR]) - if test x$gcc_cv_target_dl_iterate_phdr = xyes; then ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -667,7 +667,7 @@ Objective-C and Objective-C++ Dialects}. - -mcpu=@var{cpu}} - - @emph{GNU/Linux Options} --@gccoptlist{-mglibc -muclibc -mbionic -mandroid @gol -+@gccoptlist{-mglibc -muclibc -mmusl -mbionic -mandroid @gol - -tno-android-cc -tno-android-ld} - - @emph{H8/300 Options} -@@ -15340,13 +15340,19 @@ These @samp{-m} options are defined for - @item -mglibc - @opindex mglibc - Use the GNU C library. This is the default except --on @samp{*-*-linux-*uclibc*} and @samp{*-*-linux-*android*} targets. -+on @samp{*-*-linux-*uclibc*}, @samp{*-*-linux-*musl*} and -+@samp{*-*-linux-*android*} targets. - - @item -muclibc - @opindex muclibc - Use uClibc C library. This is the default on - @samp{*-*-linux-*uclibc*} targets. - -+@item -mmusl -+@opindex mmusl -+Use the musl C library. This is the default on -+@samp{*-*-linux-*musl*} targets. -+ - @item -mbionic - @opindex mbionic - Use Bionic C library. This is the default on diff --git a/toolchain-old/gcc/patches/5.4.0/201-musl_arm.patch b/toolchain-old/gcc/patches/5.4.0/201-musl_arm.patch deleted file mode 100644 index 27a26afc05c220..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/201-musl_arm.patch +++ /dev/null @@ -1,43 +0,0 @@ -From: ktkachov -Date: Wed, 27 May 2015 13:17:11 +0000 (+0000) -Subject: [PATCH 4/13] arm musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=de799bd087ab9a179768fea75bd195a31d3432a4 - -[PATCH 4/13] arm musl support - -On behalf of szabolcs.nagy@arm.com - -2015-05-27 Gregor Richards - - * config/arm/linux-eabi.h (MUSL_DYNAMIC_LINKER): Define. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223749 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -77,6 +77,23 @@ - %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ - %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" - -+/* For ARM musl currently supports four dynamic linkers: -+ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI -+ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI -+ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB -+ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB -+ musl does not support the legacy OABI mode. -+ All the dynamic linkers live in /lib. -+ We default to soft-float, EL. */ -+#undef MUSL_DYNAMIC_LINKER -+#if TARGET_BIG_ENDIAN_DEFAULT -+#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}" -+#else -+#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" -+#endif -+#define MUSL_DYNAMIC_LINKER \ -+ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC diff --git a/toolchain-old/gcc/patches/5.4.0/202-musl_mips.patch b/toolchain-old/gcc/patches/5.4.0/202-musl_mips.patch deleted file mode 100644 index 816dd8d101312d..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/202-musl_mips.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: ktkachov -Date: Fri, 8 May 2015 15:16:50 +0000 (+0000) -Subject: [PATCH 6/13] mips musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2550b6a866c887472b587bef87d433c51cf1ebc8 - -[PATCH 6/13] mips musl support - -2015-05-08 Gregor Richards - Szabolcs Nagy - - * config/mips/linux.h (MUSL_DYNAMIC_LINKER32): Define. - (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERN32): Define. - (GNU_USER_DYNAMIC_LINKERN32): Update. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222915 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config/mips/linux.h -+++ b/gcc/config/mips/linux.h -@@ -37,7 +37,13 @@ along with GCC; see the file COPYING3. - #define UCLIBC_DYNAMIC_LINKERN32 \ - "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}" - -+#undef MUSL_DYNAMIC_LINKER32 -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1" -+#undef MUSL_DYNAMIC_LINKER64 -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips64%{EL:el}%{msoft-float:-sf}.so.1" -+#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mipsn32%{EL:el}%{msoft-float:-sf}.so.1" -+ - #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" - #define GNU_USER_DYNAMIC_LINKERN32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ -- BIONIC_DYNAMIC_LINKERN32) -+ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32) diff --git a/toolchain-old/gcc/patches/5.4.0/203-musl_powerpc.patch b/toolchain-old/gcc/patches/5.4.0/203-musl_powerpc.patch deleted file mode 100644 index b4f34e81ca942b..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/203-musl_powerpc.patch +++ /dev/null @@ -1,209 +0,0 @@ - -gcc/Changelog: - -2015-04-24 Gregor Richards - Szabolcs Nagy - - * config.gcc (secure_plt): Add *-linux*-musl*. - * config/rs6000/linux64.h (MUSL_DYNAMIC_LINKER32): Define. - (MUSL_DYNAMIC_LINKER64): Define. - (GNU_USER_DYNAMIC_LINKER32): Update. - (GNU_USER_DYNAMIC_LINKER64): Update. - (CHOOSE_DYNAMIC_LINKER): Update. - - * config/rs6000/secureplt.h (LINK_SECURE_PLT_DEFAULT_SPEC): Define. - * config/rs6000/sysv4.h (GNU_USER_DYNAMIC_LINKER): Update. - (MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER_E,) - (INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,) - (INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,) - (INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define. - (LINK_SECURE_PLT_DEFAULT_SPEC): Define. - (CHOOSE_DYNAMIC_LINKER, LINK_TARGET_SPEC, LINK_OS_LINUX_SPEC): Update. - - * config/rs6000/sysv4le.h (MUSL_DYNAMIC_LINKER_E): Define. - ---- a/gcc/config/rs6000/linux64.h -+++ b/gcc/config/rs6000/linux64.h -@@ -365,17 +365,21 @@ extern int dot_symbols; - #endif - #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" - #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1" -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E ".so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" - #elif DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" - #else - #error "Unsupported DEFAULT_LIBC" - #endif - #define GNU_USER_DYNAMIC_LINKER32 \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) - #define GNU_USER_DYNAMIC_LINKER64 \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) - - #undef DEFAULT_ASM_ENDIAN - #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) ---- a/gcc/config/rs6000/secureplt.h -+++ b/gcc/config/rs6000/secureplt.h -@@ -18,3 +18,4 @@ along with GCC; see the file COPYING3. - . */ - - #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt" -+#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt" ---- a/gcc/config/rs6000/sysv4.h -+++ b/gcc/config/rs6000/sysv4.h -@@ -537,6 +537,9 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF - #ifndef CC1_SECURE_PLT_DEFAULT_SPEC - #define CC1_SECURE_PLT_DEFAULT_SPEC "" - #endif -+#ifndef LINK_SECURE_PLT_DEFAULT_SPEC -+#define LINK_SECURE_PLT_DEFAULT_SPEC "" -+#endif - - /* Pass -G xxx to the compiler. */ - #undef CC1_SPEC -@@ -574,7 +577,8 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF - %{R*} \ - %(link_shlib) \ - %{!T*: %(link_start) } \ --%(link_os)" -+%(link_os)" \ -+"%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}" - - /* Shared libraries are not default. */ - #define LINK_SHLIB_SPEC "\ -@@ -757,17 +761,22 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF - - #define LINK_START_LINUX_SPEC "" - -+#define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","") -+ - #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" - #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" - #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" - #else - #error "Unsupported DEFAULT_LIBC" - #endif - #define GNU_USER_DYNAMIC_LINKER \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) - - #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ - %{rdynamic:-export-dynamic} \ -@@ -889,6 +898,7 @@ ncrtn.o%s" - { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ - { "link_os_default", LINK_OS_DEFAULT_SPEC }, \ - { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \ -+ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \ - { "cpp_os_ads", CPP_OS_ADS_SPEC }, \ - { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \ - { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \ -@@ -943,3 +953,72 @@ ncrtn.o%s" - /* This target uses the sysv4.opt file. */ - #define TARGET_USES_SYSV4_OPT 1 - -+/* Include order changes for musl, same as in generic linux.h. */ -+#if DEFAULT_LIBC == LIBC_MUSL -+#define INCLUDE_DEFAULTS_MUSL_GPP \ -+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ -+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ -+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, -+ -+#ifdef LOCAL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_LOCAL \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_LOCAL -+#endif -+ -+#ifdef PREFIX_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_PREFIX -+#endif -+ -+#ifdef CROSS_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_CROSS \ -+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#ifdef TOOL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_TOOL \ -+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_TOOL -+#endif -+ -+#ifdef NATIVE_SYSTEM_HEADER_DIR -+#define INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_NATIVE -+#endif -+ -+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) -+# undef INCLUDE_DEFAULTS_MUSL_LOCAL -+# define INCLUDE_DEFAULTS_MUSL_LOCAL -+# undef INCLUDE_DEFAULTS_MUSL_NATIVE -+# define INCLUDE_DEFAULTS_MUSL_NATIVE -+#else -+# undef INCLUDE_DEFAULTS_MUSL_CROSS -+# define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#undef INCLUDE_DEFAULTS -+#define INCLUDE_DEFAULTS \ -+ { \ -+ INCLUDE_DEFAULTS_MUSL_GPP \ -+ INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ INCLUDE_DEFAULTS_MUSL_CROSS \ -+ INCLUDE_DEFAULTS_MUSL_TOOL \ -+ INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ -+ { 0, 0, 0, 0, 0, 0 } \ -+ } -+#endif ---- a/gcc/config/rs6000/sysv4le.h -+++ b/gcc/config/rs6000/sysv4le.h -@@ -31,3 +31,5 @@ - /* Little-endian PowerPC64 Linux uses the ELF v2 ABI by default. */ - #define LINUX64_DEFAULT_ABI_ELFv2 - -+#undef MUSL_DYNAMIC_LINKER_E -+#define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","le") ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -2416,6 +2416,10 @@ powerpc*-*-linux*) - powerpc*-*-linux*paired*) - tm_file="${tm_file} rs6000/750cl.h" ;; - esac -+ case ${target} in -+ *-linux*-musl*) -+ enable_secureplt=yes ;; -+ esac - if test x${enable_secureplt} = xyes; then - tm_file="rs6000/secureplt.h ${tm_file}" - fi diff --git a/toolchain-old/gcc/patches/5.4.0/204-musl_sh.patch b/toolchain-old/gcc/patches/5.4.0/204-musl_sh.patch deleted file mode 100644 index 8c3753d5301281..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/204-musl_sh.patch +++ /dev/null @@ -1,39 +0,0 @@ -gcc/Changelog: - -2015-04-27 Gregor Richards - Szabolcs Nagy - - * config/sh/linux.h (MUSL_DYNAMIC_LINKER): Define. - (MUSL_DYNAMIC_LINKER_E, MUSL_DYNAMIC_LINKER_FP): Define. - ---- a/gcc/config/sh/linux.h -+++ b/gcc/config/sh/linux.h -@@ -43,6 +43,28 @@ along with GCC; see the file COPYING3. - - #define TARGET_ASM_FILE_END file_end_indicate_exec_stack - -+#if TARGET_ENDIAN_DEFAULT == MASK_LITTLE_ENDIAN -+#define MUSL_DYNAMIC_LINKER_E "%{mb:eb}" -+#else -+#define MUSL_DYNAMIC_LINKER_E "%{!ml:eb}" -+#endif -+ -+#if TARGET_CPU_DEFAULT & ( MASK_HARD_SH2A_DOUBLE | MASK_SH4 ) -+/* "-nofpu" if any nofpu option is specified */ -+#define MUSL_DYNAMIC_LINKER_FP \ -+ "%{m1|m2|m2a-nofpu|m3|m4-nofpu|m4-100-nofpu|m4-200-nofpu|m4-300-nofpu|" \ -+ "m4-340|m4-400|m4-500|m4al|m5-32media-nofpu|m5-64media-nofpu|" \ -+ "m5-compact-nofpu:-nofpu}" -+#else -+/* "-nofpu" if none of the hard fpu options are specified */ -+#define MUSL_DYNAMIC_LINKER_FP \ -+ "%{m2a|m4|m4-100|m4-200|m4-300|m4a|m5-32media|m5-64media|m5-compact:;:-nofpu}" -+#endif -+ -+#undef MUSL_DYNAMIC_LINKER -+#define MUSL_DYNAMIC_LINKER \ -+ "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP ".so.1" -+ - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #undef SUBTARGET_LINK_EMUL_SUFFIX diff --git a/toolchain-old/gcc/patches/5.4.0/205-musl_x86.patch b/toolchain-old/gcc/patches/5.4.0/205-musl_x86.patch deleted file mode 100644 index 8772328d64d296..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/205-musl_x86.patch +++ /dev/null @@ -1,41 +0,0 @@ -From: ktkachov -Date: Fri, 15 May 2015 13:20:01 +0000 (+0000) -Subject: [PATCH 9/13] x86 musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=5551c8d927c17f60837f15f8dfe46f945ba3fa9c - -[PATCH 9/13] x86 musl support - -On behalf of Szabolcs Nagy. - -2015-05-15 Gregor Richards - - * config/i386/linux.h (MUSL_DYNAMIC_LINKER): Define. - * config/i386/linux64.h (MUSL_DYNAMIC_LINKER32): Define. - (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32): Define. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223218 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config/i386/linux.h -+++ b/gcc/config/i386/linux.h -@@ -21,3 +21,6 @@ along with GCC; see the file COPYING3. - - #define GNU_USER_LINK_EMULATION "elf_i386" - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+ -+#undef MUSL_DYNAMIC_LINKER -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" ---- a/gcc/config/i386/linux64.h -+++ b/gcc/config/i386/linux64.h -@@ -30,3 +30,10 @@ see the files COPYING3 and COPYING.RUNTI - #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" - #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" - #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" -+ -+#undef MUSL_DYNAMIC_LINKER32 -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" -+#undef MUSL_DYNAMIC_LINKER64 -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" -+#undef MUSL_DYNAMIC_LINKERX32 -+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" diff --git a/toolchain-old/gcc/patches/5.4.0/206-musl_aarch64.patch b/toolchain-old/gcc/patches/5.4.0/206-musl_aarch64.patch deleted file mode 100644 index 6925a026e7e3e2..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/206-musl_aarch64.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: jgreenhalgh -Date: Wed, 27 May 2015 16:46:39 +0000 (+0000) -Subject: [PATCH 3/13] aarch64 musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=b3ff21cf0531be91bc3fb8200296a7633090ec78 - -[PATCH 3/13] aarch64 musl support - -gcc/Changelog: - -2015-05-27 Gregor Richards - Szabolcs Nagy - - * config/aarch64/aarch64-linux.h (MUSL_DYNAMIC_LINKER): Define. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223766 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config/aarch64/aarch64-linux.h -+++ b/gcc/config/aarch64/aarch64-linux.h -@@ -23,6 +23,9 @@ - - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" - -+#undef MUSL_DYNAMIC_LINKER -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" -+ - #undef ASAN_CC1_SPEC - #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}" - diff --git a/toolchain-old/gcc/patches/5.4.0/207-musl_fixincludes.patch b/toolchain-old/gcc/patches/5.4.0/207-musl_fixincludes.patch deleted file mode 100644 index 0ff33d39d8c515..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/207-musl_fixincludes.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: ktkachov -Date: Wed, 22 Apr 2015 14:18:16 +0000 (+0000) -Subject: fixincludes update for musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2dc727de2e87c2756a514cbb43cea23c99deaa3d - -fixincludes update for musl support - -On behalf of Szabolcs.Nagy@arm.com - -2015-04-22 Gregor Richards - - * mkfixinc.sh: Add *-musl* with no fixes. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222327 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/fixincludes/mkfixinc.sh -+++ b/fixincludes/mkfixinc.sh -@@ -19,7 +19,8 @@ case $machine in - powerpc-*-eabi* | \ - powerpc-*-rtems* | \ - powerpcle-*-eabisim* | \ -- powerpcle-*-eabi* ) -+ powerpcle-*-eabi* | \ -+ *-musl* ) - # IF there is no include fixing, - # THEN create a no-op fixer and exit - (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} diff --git a/toolchain-old/gcc/patches/5.4.0/209-musl_libstdc++.patch b/toolchain-old/gcc/patches/5.4.0/209-musl_libstdc++.patch deleted file mode 100644 index d2414d0232643f..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/209-musl_libstdc++.patch +++ /dev/null @@ -1,72 +0,0 @@ -From: ktkachov -Date: Wed, 22 Apr 2015 14:24:11 +0000 (+0000) -Subject: libstdc++, libgfortran gthr workaround for musl -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=1e5f711c11cb80ce609db9e9c1d8b2da0f7b5b61 - -libstdc++, libgfortran gthr workaround for musl - -On behalf of szabolcs.nagy@arm.com - -[libstdc++-v3/] -2015-04-22 Szabolcs Nagy - - * config/os/generic/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK): Define. - * configure.host (os_include_dir): Set to "os/generic" for linux-musl*. - -[libgfortran/] -2015-04-22 Szabolcs Nagy - - * acinclude.m4 (GTHREAD_USE_WEAK): Define as 0 for *-*-musl*. - * configure: Regenerate. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222329 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/libgfortran/acinclude.m4 -+++ b/libgfortran/acinclude.m4 -@@ -100,7 +100,7 @@ void foo (void); - [Define to 1 if the target supports #pragma weak]) - fi - case "$host" in -- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) -+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) - AC_DEFINE(GTHREAD_USE_WEAK, 0, - [Define to 0 if the target shouldn't use #pragma weak]) - ;; ---- a/libgfortran/configure -+++ b/libgfortran/configure -@@ -26456,7 +26456,7 @@ $as_echo "#define SUPPORTS_WEAK 1" >>con - - fi - case "$host" in -- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) -+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) - - $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h - ---- a/libstdc++-v3/config/os/generic/os_defines.h -+++ b/libstdc++-v3/config/os/generic/os_defines.h -@@ -33,4 +33,9 @@ - // System-specific #define, typedefs, corrections, etc, go here. This - // file will come before all others. - -+// Disable the weak reference logic in gthr.h for os/generic because it -+// is broken on every platform unless there is implementation specific -+// workaround in gthr-posix.h and at link-time for static linking. -+#define _GLIBCXX_GTHREAD_USE_WEAK 0 -+ - #endif ---- a/libstdc++-v3/configure.host -+++ b/libstdc++-v3/configure.host -@@ -273,6 +273,9 @@ case "${host_os}" in - freebsd*) - os_include_dir="os/bsd/freebsd" - ;; -+ linux-musl*) -+ os_include_dir="os/generic" -+ ;; - gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) - if [ "$uclibc" = "yes" ]; then - os_include_dir="os/uclibc" diff --git a/toolchain-old/gcc/patches/5.4.0/230-musl_libssp.patch b/toolchain-old/gcc/patches/5.4.0/230-musl_libssp.patch deleted file mode 100644 index 30f42e9f7c7feb..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/230-musl_libssp.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -727,7 +727,9 @@ proper position among the other output f - #endif - - #ifndef LINK_SSP_SPEC --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if DEFAULT_LIBC == LIBC_MUSL -+#define LINK_SSP_SPEC "-lssp_nonshared" -+#elif defined(TARGET_LIBC_PROVIDES_SSP) - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit:}" - #else diff --git a/toolchain-old/gcc/patches/5.4.0/240-musl-libitm-fixes.patch b/toolchain-old/gcc/patches/5.4.0/240-musl-libitm-fixes.patch deleted file mode 100644 index 533cb68499daf9..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/240-musl-libitm-fixes.patch +++ /dev/null @@ -1,61 +0,0 @@ -From: ktkachov -Date: Wed, 22 Apr 2015 14:11:25 +0000 (+0000) -Subject: libitm fixes for musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=e53a4d49c3d03ab8eaddb073cf972c1c46d75338 - -libitm fixes for musl support - -On behalf of Szabolcs.Nagy@arm.com - -2015-04-22 Gregor Richards - - * config/arm/hwcap.cc: Use fcntl.h instead of sys/fcntl.h. - * config/linux/x86/tls.h: Only use __GLIBC_PREREQ if defined. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222325 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/libitm/config/arm/hwcap.cc -+++ b/libitm/config/arm/hwcap.cc -@@ -40,7 +40,7 @@ int GTM_hwcap HIDDEN = 0 - - #ifdef __linux__ - #include --#include -+#include - #include - - static void __attribute__((constructor)) ---- a/libitm/config/linux/x86/tls.h -+++ b/libitm/config/linux/x86/tls.h -@@ -25,16 +25,19 @@ - #ifndef LIBITM_X86_TLS_H - #define LIBITM_X86_TLS_H 1 - --#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) -+#if defined(__GLIBC_PREREQ) -+#if __GLIBC_PREREQ(2, 10) - /* Use slots in the TCB head rather than __thread lookups. - GLIBC has reserved words 10 through 13 for TM. */ - #define HAVE_ARCH_GTM_THREAD 1 - #define HAVE_ARCH_GTM_THREAD_DISP 1 - #endif -+#endif - - #include "config/generic/tls.h" - --#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) -+#if defined(__GLIBC_PREREQ) -+#if __GLIBC_PREREQ(2, 10) - namespace GTM HIDDEN { - - #ifdef __x86_64__ -@@ -101,5 +104,6 @@ static inline void set_abi_disp(struct a - - } // namespace GTM - #endif /* >= GLIBC 2.10 */ -+#endif - - #endif // LIBITM_X86_TLS_H diff --git a/toolchain-old/gcc/patches/5.4.0/250-add-musl.patch b/toolchain-old/gcc/patches/5.4.0/250-add-musl.patch deleted file mode 100644 index 8cbeddea33f878..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/250-add-musl.patch +++ /dev/null @@ -1,120 +0,0 @@ -From: ktkachov -Date: Fri, 8 May 2015 08:30:40 +0000 (+0000) -Subject: [PATCH 0/13] Add musl support to GCC -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=f2d678afa5b8385d763b93772d73d6bf80a9739e - -[PATCH 0/13] Add musl support to GCC - -2015-05-08 Szabolcs Nagy - - * config/glibc-stdint.h (OPTION_MUSL): Define. - (INT_FAST16_TYPE, INT_FAST32_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE): - Change the definition based on OPTION_MUSL for 64 bit targets. - * config/linux.h (OPTION_MUSL): Redefine. - * config/alpha/linux.h (OPTION_MUSL): Redefine. - * config/rs6000/linux.h (OPTION_MUSL): Redefine. - * config/rs6000/linux64.h (OPTION_MUSL): Redefine. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222905 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config/alpha/linux.h -+++ b/gcc/config/alpha/linux.h -@@ -61,10 +61,14 @@ along with GCC; see the file COPYING3. - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - /* Determine what functions are present at the runtime; ---- a/gcc/config/glibc-stdint.h -+++ b/gcc/config/glibc-stdint.h -@@ -22,6 +22,12 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+/* Systems using musl libc should use this header and make sure -+ OPTION_MUSL is defined correctly before using the TYPE macros. */ -+#ifndef OPTION_MUSL -+#define OPTION_MUSL 0 -+#endif -+ - #define SIG_ATOMIC_TYPE "int" - - #define INT8_TYPE "signed char" -@@ -43,12 +49,12 @@ see the files COPYING3 and COPYING.RUNTI - #define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") - - #define INT_FAST8_TYPE "signed char" --#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") --#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") -+#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int") -+#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int") - #define INT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int") - #define UINT_FAST8_TYPE "unsigned char" --#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int") --#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int") -+#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int") -+#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int") - #define UINT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") - - #define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -32,11 +32,13 @@ see the files COPYING3 and COPYING.RUNTI - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#undef OPTION_MUSL - #define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#undef OPTION_MUSL - #define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -30,10 +30,14 @@ - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - /* Determine what functions are present at the runtime; ---- a/gcc/config/rs6000/linux64.h -+++ b/gcc/config/rs6000/linux64.h -@@ -299,10 +299,14 @@ extern int dot_symbols; - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - /* Determine what functions are present at the runtime; diff --git a/toolchain-old/gcc/patches/5.4.0/260-musl-add-unwind-fix.patch b/toolchain-old/gcc/patches/5.4.0/260-musl-add-unwind-fix.patch deleted file mode 100644 index a3b83e2074619e..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/260-musl-add-unwind-fix.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: ktkachov -Date: Wed, 22 Apr 2015 14:20:01 +0000 (+0000) -Subject: unwind fix for musl -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a2e31d0681d8a47389b8a3552622fbd9827bcef4 - -unwind fix for musl - -On behalf of szabolcs.nagy@arm.com - -2015-04-22 Gregor Richards - Szabolcs Nagy - - * unwind-dw2-fde-dip.c (USE_PT_GNU_EH_FRAME): Define it on - Linux if target provides dl_iterate_phdr. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222328 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/libgcc/unwind-dw2-fde-dip.c -+++ b/libgcc/unwind-dw2-fde-dip.c -@@ -59,6 +59,12 @@ - - #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ - && defined(TARGET_DL_ITERATE_PHDR) \ -+ && defined(__linux__) -+# define USE_PT_GNU_EH_FRAME -+#endif -+ -+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -+ && defined(TARGET_DL_ITERATE_PHDR) \ - && (defined(__DragonFly__) || defined(__FreeBSD__)) - # define ElfW __ElfN - # define USE_PT_GNU_EH_FRAME diff --git a/toolchain-old/gcc/patches/5.4.0/270-musl-add-powerpc-softfloat-fix.patch b/toolchain-old/gcc/patches/5.4.0/270-musl-add-powerpc-softfloat-fix.patch deleted file mode 100644 index bdebf6c01f4c6d..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/270-musl-add-powerpc-softfloat-fix.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/gcc/config/rs6000/linux64.h -+++ b/gcc/config/rs6000/linux64.h -@@ -369,8 +369,8 @@ extern int dot_symbols; - #endif - #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" - #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" --#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1" --#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E ".so.1" -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC - #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" - #elif DEFAULT_LIBC == LIBC_GLIBC ---- a/gcc/config/rs6000/sysv4.h -+++ b/gcc/config/rs6000/sysv4.h -@@ -765,7 +765,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF - - #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" - #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" --#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC - #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" - #elif DEFAULT_LIBC == LIBC_MUSL diff --git a/toolchain-old/gcc/patches/5.4.0/280-musl-disable-ifunc-by-default.patch b/toolchain-old/gcc/patches/5.4.0/280-musl-disable-ifunc-by-default.patch deleted file mode 100644 index af5acf8cc9078d..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/280-musl-disable-ifunc-by-default.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 450fb05e2a7510d37744f044009f8237d902f65c Mon Sep 17 00:00:00 2001 -From: nsz -Date: Tue, 30 Aug 2016 10:26:22 +0000 -Subject: [PATCH] disable ifunc on *-musl by default - -gcc/ - * config.gcc (*-*-*musl*): Disable gnu-indirect-function. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239859 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - gcc/ChangeLog | 4 ++++ - gcc/config.gcc | 4 ++-- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/gcc/config.gcc b/gcc/config.gcc -index 8827dc8..e544d76 100644 ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -1465,7 +1465,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-gnu* | i[34567]8 - extra_options="${extra_options} linux-android.opt" - # Assume modern glibc if not targeting Android nor uclibc. - case ${target} in -- *-*-*android*|*-*-*uclibc*) -+ *-*-*android*|*-*-*uclibc*|*-*-*musl*) - ;; - *) - default_gnu_indirect_function=yes -@@ -1531,7 +1531,7 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu) - extra_options="${extra_options} linux-android.opt" - # Assume modern glibc if not targeting Android nor uclibc. - case ${target} in -- *-*-*android*|*-*-*uclibc*) -+ *-*-*android*|*-*-*uclibc*|*-*-*musl*) - ;; - *) - default_gnu_indirect_function=yes diff --git a/toolchain-old/gcc/patches/5.4.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain-old/gcc/patches/5.4.0/300-mips_Os_cpu_rtx_cost_model.patch deleted file mode 100644 index 1743658ac6ca3a..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/300-mips_Os_cpu_rtx_cost_model.patch +++ /dev/null @@ -1,14 +0,0 @@ -Use the proper rtx cost model for the selected CPU, even when optimizing -for size. This generates better code. - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -17483,7 +17483,7 @@ mips_option_override (void) - flag_pcc_struct_return = 0; - - /* Decide which rtx_costs structure to use. */ -- if (optimize_size) -+ if (0 && optimize_size) - mips_cost = &mips_rtx_cost_optimize_size; - else - mips_cost = &mips_rtx_cost_data[mips_tune]; diff --git a/toolchain-old/gcc/patches/5.4.0/800-arm_v5te_no_ldrd_strd.patch b/toolchain-old/gcc/patches/5.4.0/800-arm_v5te_no_ldrd_strd.patch deleted file mode 100644 index 0edeb13c7517ab..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/800-arm_v5te_no_ldrd_strd.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/arm/arm.h -+++ b/gcc/config/arm/arm.h -@@ -285,7 +285,7 @@ extern void (*arm_lang_output_object_att - /* Thumb-1 only. */ - #define TARGET_THUMB1_ONLY (TARGET_THUMB1 && !arm_arch_notm) - --#define TARGET_LDRD (arm_arch5e && ARM_DOUBLEWORD_ALIGN \ -+#define TARGET_LDRD (arm_arch6 && ARM_DOUBLEWORD_ALIGN \ - && !TARGET_THUMB1) - - #define TARGET_CRC32 (arm_arch_crc) diff --git a/toolchain-old/gcc/patches/5.4.0/810-arm-softfloat-libgcc.patch b/toolchain-old/gcc/patches/5.4.0/810-arm-softfloat-libgcc.patch deleted file mode 100644 index 1d06f5b2ec03a0..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/libgcc/config/arm/t-linux -+++ b/libgcc/config/arm/t-linux -@@ -1,6 +1,10 @@ - LIB1ASMSRC = arm/lib1funcs.S - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ -- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 -+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ -+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ -+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ -+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ -+ _arm_fixsfsi _arm_fixunssfsi - - # Just for these, we omit the frame pointer since it makes such a big - # difference. ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -60,8 +60,6 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" -- - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ diff --git a/toolchain-old/gcc/patches/5.4.0/820-libgcc_pic.patch b/toolchain-old/gcc/patches/5.4.0/820-libgcc_pic.patch deleted file mode 100644 index 42bf0c8cccf13e..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/820-libgcc_pic.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/libgcc/Makefile.in -+++ b/libgcc/Makefile.in -@@ -887,11 +887,12 @@ $(libgcov-driver-objects): %$(objext): $ - - # Static libraries. - libgcc.a: $(libgcc-objects) -+libgcc_pic.a: $(libgcc-s-objects) - libgcov.a: $(libgcov-objects) - libunwind.a: $(libunwind-objects) - libgcc_eh.a: $(libgcc-eh-objects) - --libgcc.a libgcov.a libunwind.a libgcc_eh.a: -+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: - -rm -f $@ - - objects="$(objects)"; \ -@@ -913,7 +914,7 @@ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_E - endif - - ifeq ($(enable_shared),yes) --all: libgcc_eh.a libgcc_s$(SHLIB_EXT) -+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) - ifneq ($(LIBUNWIND),) - all: libunwind$(SHLIB_EXT) - endif -@@ -1108,6 +1109,10 @@ install-shared: - chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a - $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a - -+ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ -+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ - $(subst @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) diff --git a/toolchain-old/gcc/patches/5.4.0/830-arm_unbreak_armv4t.patch b/toolchain-old/gcc/patches/5.4.0/830-arm_unbreak_armv4t.patch deleted file mode 100644 index 37f8f2a54de669..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/830-arm_unbreak_armv4t.patch +++ /dev/null @@ -1,13 +0,0 @@ -http://sourceware.org/ml/crossgcc/2008-05/msg00009.html - ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -45,7 +45,7 @@ - The ARM10TDMI core is the default for armv5t, so set - SUBTARGET_CPU_DEFAULT to achieve this. */ - #undef SUBTARGET_CPU_DEFAULT --#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi -+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi - - /* TARGET_BIG_ENDIAN_DEFAULT is set in - config.gcc for big endian configurations. */ diff --git a/toolchain-old/gcc/patches/5.4.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain-old/gcc/patches/5.4.0/840-armv4_pass_fix-v4bx_to_ld.patch deleted file mode 100644 index cb1fb982356a1b..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/840-armv4_pass_fix-v4bx_to_ld.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -94,10 +94,15 @@ - #define MUSL_DYNAMIC_LINKER \ - "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" - -+/* For armv4 we pass --fix-v4bx to linker to support EABI */ -+#undef TARGET_FIX_V4BX_SPEC -+#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\ -+ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC --#define LINK_SPEC EABI_LINK_SPEC \ -+#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ - LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) - diff --git a/toolchain-old/gcc/patches/5.4.0/850-use_shared_libgcc.patch b/toolchain-old/gcc/patches/5.4.0/850-use_shared_libgcc.patch deleted file mode 100644 index 5818cf4da0ab83..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/850-use_shared_libgcc.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -131,10 +131,6 @@ - #define ENDFILE_SPEC \ - LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) - --/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we -- do not use -lfloat. */ --#undef LIBGCC_SPEC -- - /* Clear the instruction cache from `beg' to `end'. This is - implemented in lib1funcs.S, so ensure an error if this definition - is used. */ ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -53,6 +53,10 @@ see the files COPYING3 and COPYING.RUNTI - builtin_assert ("system=posix"); \ - } while (0) - -+#ifndef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" -+#endif -+ - /* Determine which dynamic linker to use depending on whether GLIBC or - uClibc or Bionic or musl is the default C library and whether - -muclibc or -mglibc or -mbionic or -mmusl has been passed to change ---- a/libgcc/mkmap-symver.awk -+++ b/libgcc/mkmap-symver.awk -@@ -132,5 +132,5 @@ function output(lib) { - else if (inherit[lib]) - printf("} %s;\n", inherit[lib]); - else -- printf ("\n local:\n\t*;\n};\n"); -+ printf ("\n\t*;\n};\n"); - } ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -60,6 +60,9 @@ - #undef CPP_OS_DEFAULT_SPEC - #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" - -+#undef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" -+ - #undef LINK_SHLIB_SPEC - #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}" - diff --git a/toolchain-old/gcc/patches/5.4.0/851-libgcc_no_compat.patch b/toolchain-old/gcc/patches/5.4.0/851-libgcc_no_compat.patch deleted file mode 100644 index 80c34768414653..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/851-libgcc_no_compat.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/libgcc/config/t-libunwind -+++ b/libgcc/config/t-libunwind -@@ -2,8 +2,7 @@ - - HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER - --LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ -- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - - # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/toolchain-old/gcc/patches/5.4.0/870-ppc_no_crtsavres.patch b/toolchain-old/gcc/patches/5.4.0/870-ppc_no_crtsavres.patch deleted file mode 100644 index 0e64a4164b6f0a..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/870-ppc_no_crtsavres.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/rs6000/rs6000.c -+++ b/gcc/config/rs6000/rs6000.c -@@ -21500,7 +21500,7 @@ rs6000_savres_strategy (rs6000_stack_t * - /* Define cutoff for using out-of-line functions to save registers. */ - if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) - { -- if (!optimize_size) -+ if (1) - { - strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; - strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; diff --git a/toolchain-old/gcc/patches/5.4.0/880-no_java_section.patch b/toolchain-old/gcc/patches/5.4.0/880-no_java_section.patch deleted file mode 100644 index def6c9f4a0ed9e..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/880-no_java_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/defaults.h -+++ b/gcc/defaults.h -@@ -380,7 +380,7 @@ see the files COPYING3 and COPYING.RUNTI - /* If we have named section and we support weak symbols, then use the - .jcr section for recording java classes which need to be registered - at program start-up time. */ --#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK -+#if 0 && defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK - #ifndef JCR_SECTION_NAME - #define JCR_SECTION_NAME ".jcr" - #endif diff --git a/toolchain-old/gcc/patches/5.4.0/881-no_tm_section.patch b/toolchain-old/gcc/patches/5.4.0/881-no_tm_section.patch deleted file mode 100644 index fab5db3be55cf1..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/881-no_tm_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgcc/crtstuff.c -+++ b/libgcc/crtstuff.c -@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ - #endif - - #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) --# define USE_TM_CLONE_REGISTRY 1 -+# define USE_TM_CLONE_REGISTRY 0 - #endif - - /* We do not want to add the weak attribute to the declarations of these diff --git a/toolchain-old/gcc/patches/5.4.0/900-bad-mips16-crt.patch b/toolchain-old/gcc/patches/5.4.0/900-bad-mips16-crt.patch deleted file mode 100644 index dd6e9dc889ad07..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/900-bad-mips16-crt.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/libgcc/config/mips/t-mips16 -+++ b/libgcc/config/mips/t-mips16 -@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16 - - # Version these symbols if building libgcc.so. - SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver -+ -+CRTSTUFF_T_CFLAGS += -mno-mips16 -+CRTSTUFF_T_CFLAGS_S += -mno-mips16 diff --git a/toolchain-old/gcc/patches/5.4.0/910-mbsd_multi.patch b/toolchain-old/gcc/patches/5.4.0/910-mbsd_multi.patch deleted file mode 100644 index 2d7272ef951c2c..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/910-mbsd_multi.patch +++ /dev/null @@ -1,222 +0,0 @@ - - This patch brings over a few features from MirBSD: - * -fhonour-copts - If this option is not given, it's warned (depending - on environment variables). This is to catch errors - of misbuilt packages which override CFLAGS themselves. - * -Werror-maybe-reset - Has the effect of -Wno-error if GCC_NO_WERROR is - set and not '0', a no-operation otherwise. This is - to be able to use -Werror in "make" but prevent - GNU autoconf generated configure scripts from - freaking out. - - This patch was authored by Thorsten Glaser - with copyright assignment to the FSF in effect. - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -122,6 +122,9 @@ static int class_dump_flags; - /* Whether any standard preincluded header has been preincluded. */ - static bool done_preinclude; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); - static void set_std_cxx11 (int); -@@ -449,6 +452,12 @@ c_common_handle_option (size_t scode, co - flag_no_builtin = !value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fconstant_string_class_: - constant_string_class_name = arg; - break; -@@ -1034,6 +1043,47 @@ c_common_init (void) - return false; - } - -+ if (c_language == clk_c) { -+ char *ev = getenv ("GCC_HONOUR_COPTS"); -+ int evv; -+ if (ev == NULL) -+ evv = -1; -+ else if ((*ev == '0') || (*ev == '\0')) -+ evv = 0; -+ else if (*ev == '1') -+ evv = 1; -+ else if (*ev == '2') -+ evv = 2; -+ else if (*ev == 's') -+ evv = -1; -+ else { -+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); -+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ -+ } -+ if (evv == 1) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in lenient mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ warning (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } else if (evv == 2) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in strict mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ error ("someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ return false; -+ } -+ } else if (evv == 0) { -+ if (honour_copts != 1) -+ inform (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } -+ - return true; - } - ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -431,6 +431,10 @@ Wfloat-conversion - C ObjC C++ ObjC++ Var(warn_float_conversion) LangEnabledBy(C ObjC C++ ObjC++,Wconversion) - Warn for implicit type conversions that cause loss of floating point precision - -+Werror-maybe-reset -+C ObjC C++ ObjC++ -+; Documented in common.opt -+ - Wfloat-equal - C ObjC C++ ObjC++ Var(warn_float_equal) Warning - Warn if testing floating point numbers for equality -@@ -1161,6 +1165,9 @@ C++ ObjC++ Optimization Alias(fexception - fhonor-std - C++ ObjC++ Ignore Warn(switch %qs is no longer supported) - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -561,6 +561,10 @@ Werror= - Common Joined - Treat specified warning as error - -+Werror-maybe-reset -+Common -+If environment variable GCC_NO_WERROR is set, act as -Wno-error -+ - Wextra - Common Var(extra_warnings) Warning - Print extra (possibly unwanted) warnings -@@ -1360,6 +1364,9 @@ fguess-branch-probability - Common Report Var(flag_guess_branch_prob) Optimization - Enable guessing of branch probabilities - -+fhonour-copts -+Common RejectNegative -+ - ; Nonzero means ignore `#ident' directives. 0 means handle them. - ; Generate position-independent code for executables if possible - ; On SVR4 targets, it also controls whether or not to emit a ---- a/gcc/opts.c -+++ b/gcc/opts.c -@@ -1699,6 +1699,17 @@ common_handle_option (struct gcc_options - opts, opts_set, loc, dc); - break; - -+ case OPT_Werror_maybe_reset: -+ { -+ char *ev = getenv ("GCC_NO_WERROR"); -+ if ((ev != NULL) && (*ev != '0')) -+ warnings_are_errors = 0; -+ } -+ break; -+ -+ case OPT_fhonour_copts: -+ break; -+ - case OPT_Wlarger_than_: - opts->x_larger_than_size = value; - opts->x_warn_larger_than = value != -1; ---- a/gcc/doc/cppopts.texi -+++ b/gcc/doc/cppopts.texi -@@ -163,6 +163,11 @@ in older programs. This warning is on b - Make all warnings into hard errors. Source code which triggers warnings - will be rejected. - -+@item -Werror-maybe-reset -+@opindex Werror-maybe-reset -+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment -+variable is set to anything other than 0 or empty. -+ - @item -Wsystem-headers - @opindex Wsystem-headers - Issue warnings for code in system headers. These are normally unhelpful ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -251,7 +251,7 @@ Objective-C and Objective-C++ Dialects}. - -Wdisabled-optimization @gol - -Wno-discarded-qualifiers -Wno-discarded-array-qualifiers @gol - -Wno-div-by-zero -Wdouble-promotion -Wempty-body -Wenum-compare @gol ---Wno-endif-labels -Werror -Werror=* @gol -+-Wno-endif-labels -Werror -Werror=* -Werror-maybe-reset @gol - -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol - -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol - -Wformat-security -Wformat-signedness -Wformat-y2k @gol -@@ -5382,6 +5382,22 @@ This option is only supported for C and - @option{-Wall} and by @option{-Wpedantic}, which can be disabled with - @option{-Wno-pointer-sign}. - -+@item -Werror-maybe-reset -+@opindex Werror-maybe-reset -+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment -+variable is set to anything other than 0 or empty. -+ -+@item -fhonour-copts -+@opindex fhonour-copts -+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not -+given at least once, and warn if it is given more than once. -+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not -+given exactly once. -+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option -+is not given exactly once. -+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. -+This flag and environment variable only affect the C language. -+ - @item -Wstack-protector - @opindex Wstack-protector - @opindex Wno-stack-protector -@@ -7860,7 +7876,7 @@ so, the first branch is redirected to ei - second branch or a point immediately following it, depending on whether - the condition is known to be true or false. - --Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -+Enabled at levels @option{-O3}. - - @item -fsplit-wide-types - @opindex fsplit-wide-types ---- a/gcc/java/jvspec.c -+++ b/gcc/java/jvspec.c -@@ -629,6 +629,7 @@ lang_specific_pre_link (void) - class name. Append dummy `.c' that can be stripped by set_input so %b - is correct. */ - set_input (concat (main_class_name, "main.c", NULL)); -+ putenv ("GCC_HONOUR_COPTS=s"); /* XXX hack! */ - err = do_spec (jvgenmain_spec); - if (err == 0) - { diff --git a/toolchain-old/gcc/patches/5.4.0/920-specs_nonfatal_getenv.patch b/toolchain-old/gcc/patches/5.4.0/920-specs_nonfatal_getenv.patch deleted file mode 100644 index 3d708f24c31c36..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/920-specs_nonfatal_getenv.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -8807,8 +8807,10 @@ getenv_spec_function (int argc, const ch - - value = getenv (argv[0]); - if (!value) -- fatal_error (input_location, -- "environment variable %qs not defined", argv[0]); -+ { -+ warning (input_location, "environment variable %qs not defined", argv[0]); -+ value = ""; -+ } - - /* We have to escape every character of the environment variable so - they are not interpreted as active spec characters. A diff --git a/toolchain-old/gcc/patches/5.4.0/930-fix-mips-noexecstack.patch b/toolchain-old/gcc/patches/5.4.0/930-fix-mips-noexecstack.patch deleted file mode 100644 index c05844d2e461e6..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/930-fix-mips-noexecstack.patch +++ /dev/null @@ -1,111 +0,0 @@ -From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001 -From: Andrew McDonnell -Date: Fri, 3 Oct 2014 19:09:00 +0930 -Subject: Add .note.GNU-stack section - -See http://lists.busybox.net/pipermail/uclibc/2014-October/048671.html -Below copied from https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02430.html - -Re: [Patch, MIPS] Add .note.GNU-stack section - - From: Steve Ellcey - -On Wed, 2014-09-10 at 10:15 -0700, Eric Christopher wrote: -> -> -> On Wed, Sep 10, 2014 at 9:27 AM, wrote: - -> This works except you did not update the assembly files in -> libgcc or glibc. We (Cavium) have the same patch in our tree -> for a few released versions. - -> Mind just checking yours in then Andrew? - -> Thanks! -> -eric - -I talked to Andrew about what files he changed in GCC and created and -tested this new patch. Andrew also mentioned changing some assembly -files in glibc but I don't see any use of '.section .note.GNU-stack' in -any assembly files in glibc (for any platform) so I wasn't planning on -creating a glibc to add them to mips glibc assembly language files. - -OK to check in this patch? - -Steve Ellcey -sellcey@mips.com - - - -2014-09-26 Steve Ellcey ---- - gcc/config/mips/mips.c | 3 +++ - libgcc/config/mips/crti.S | 4 ++++ - libgcc/config/mips/crtn.S | 3 +++ - libgcc/config/mips/mips16.S | 4 ++++ - libgcc/config/mips/vr4120-div.S | 4 ++++ - 5 files changed, 18 insertions(+) - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -19629,6 +19629,9 @@ mips_lra_p (void) - #undef TARGET_LRA_P - #define TARGET_LRA_P mips_lra_p - -+#undef TARGET_ASM_FILE_END -+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack -+ - struct gcc_target targetm = TARGET_INITIALIZER; - - #include "gt-mips.h" ---- a/libgcc/config/mips/crti.S -+++ b/libgcc/config/mips/crti.S -@@ -21,6 +21,10 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+ -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/crtn.S -+++ b/libgcc/config/mips/crtn.S -@@ -21,6 +21,9 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/mips16.S -+++ b/libgcc/config/mips/mips16.S -@@ -48,6 +48,10 @@ see the files COPYING3 and COPYING.RUNTI - values using the soft-float calling convention, but do the actual - operation using the hard floating point instructions. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - #if defined _MIPS_SIM && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64) - - /* This file contains 32-bit assembly code. */ ---- a/libgcc/config/mips/vr4120-div.S -+++ b/libgcc/config/mips/vr4120-div.S -@@ -26,6 +26,10 @@ see the files COPYING3 and COPYING.RUNTI - -mfix-vr4120. div and ddiv do not give the correct result when one - of the operands is negative. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - .set nomips16 - - #define DIV \ diff --git a/toolchain-old/gcc/patches/5.4.0/931-fix-MIPS-softfloat-build-issue.patch b/toolchain-old/gcc/patches/5.4.0/931-fix-MIPS-softfloat-build-issue.patch deleted file mode 100644 index c8461a9618c413..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/931-fix-MIPS-softfloat-build-issue.patch +++ /dev/null @@ -1,174 +0,0 @@ -From 2b46f9187b6f994fc450628a7cd97fc703dd23e0 Mon Sep 17 00:00:00 2001 -From: BangLang Huang -Date: Wed, 9 Nov 2016 10:36:49 +0800 -Subject: [PATCH] fix MIPS softfloat build issue - - This patch is backport from github/libffi #272 - -Signed-off-by: BangLang Huang ---- - libffi/src/mips/n32.S | 17 +++++++++++++++++ - libffi/src/mips/o32.S | 17 +++++++++++++++++ - 2 files changed, 34 insertions(+) - -diff --git a/libffi/src/mips/n32.S b/libffi/src/mips/n32.S -index c6985d3..8f25994 100644 ---- a/libffi/src/mips/n32.S -+++ b/libffi/src/mips/n32.S -@@ -107,6 +107,16 @@ loadregs: - - REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6. - -+#ifdef __mips_soft_float -+ REG_L a0, 0*FFI_SIZEOF_ARG(t9) -+ REG_L a1, 1*FFI_SIZEOF_ARG(t9) -+ REG_L a2, 2*FFI_SIZEOF_ARG(t9) -+ REG_L a3, 3*FFI_SIZEOF_ARG(t9) -+ REG_L a4, 4*FFI_SIZEOF_ARG(t9) -+ REG_L a5, 5*FFI_SIZEOF_ARG(t9) -+ REG_L a6, 6*FFI_SIZEOF_ARG(t9) -+ REG_L a7, 7*FFI_SIZEOF_ARG(t9) -+#else - and t4, t6, ((1</dev/null -+ @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null - @$(STAMP) stamp-bits-sup - - stamp-c_base: ${c_base_headers} diff --git a/toolchain-old/gcc/patches/5.4.0/950-cpp_file_path_translation.patch b/toolchain-old/gcc/patches/5.4.0/950-cpp_file_path_translation.patch deleted file mode 100644 index dc0938ab63417d..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/950-cpp_file_path_translation.patch +++ /dev/null @@ -1,182 +0,0 @@ -Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47047 - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -581,6 +581,10 @@ c_common_handle_option (size_t scode, co - add_path (xstrdup (arg), SYSTEM, 0, true); - break; - -+ case OPT_iremap: -+ add_cpp_remap_path (arg); -+ break; -+ - case OPT_iwithprefix: - add_prefixed_path (arg, SYSTEM); - break; ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1528,6 +1528,10 @@ iquote - C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) - -iquote Add to the end of the quote include path - -+iremap -+C ObjC C++ ObjC++ Joined Separate -+-iremap Convert to if it occurs as prefix in __FILE__. -+ - iwithprefix - C ObjC C++ ObjC++ Joined Separate - -iwithprefix Add to the end of the system include path ---- a/gcc/doc/cpp.texi -+++ b/gcc/doc/cpp.texi -@@ -4441,6 +4441,7 @@ without notice. - @c man begin SYNOPSIS - cpp [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}] - [@option{-I}@var{dir}@dots{}] [@option{-iquote}@var{dir}@dots{}] -+ [@option{-iremap}@var{src}:@var{dst}] - [@option{-W}@var{warn}@dots{}] - [@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}] - [@option{-MP}] [@option{-MQ} @var{target}@dots{}] ---- a/gcc/doc/cppopts.texi -+++ b/gcc/doc/cppopts.texi -@@ -532,6 +532,12 @@ Search @var{dir} only for header files r - If @var{dir} begins with @code{=}, then the @code{=} will be replaced - by the sysroot prefix; see @option{--sysroot} and @option{-isysroot}. - -+@item -iremap @var{src}:@var{dst} -+@opindex iremap -+Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. -+This option can be specified more than once. Processing stops at the first -+match. -+ - @item -fdirectives-only - @opindex fdirectives-only - When preprocessing, handle directives, but do not expand macros. ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -494,8 +494,8 @@ Objective-C and Objective-C++ Dialects}. - @item Directory Options - @xref{Directory Options,,Options for Directory Search}. - @gccoptlist{-B@var{prefix} -I@var{dir} -iplugindir=@var{dir} @gol ---iquote@var{dir} -L@var{dir} -specs=@var{file} -I- @gol ----sysroot=@var{dir} --no-sysroot-suffix} -+-iquote@var{dir} -iremap@var{src}:@var{dst} -L@var{dir} -specs=@var{file} @gol -+-I- --sysroot=@var{dir} --no-sysroot-suffix} - - @item Machine Dependent Options - @xref{Submodel Options,,Hardware Models and Configurations}. -@@ -11479,6 +11479,12 @@ be searched for header files only for th - "@var{file}"}; they are not searched for @code{#include <@var{file}>}, - otherwise just like @option{-I}. - -+@item -iremap @var{src}:@var{dst} -+@opindex iremap -+Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. -+This option can be specified more than once. Processing stops at the first -+match. -+ - @item -L@var{dir} - @opindex L - Add directory @var{dir} to the list of directories to be searched ---- a/libcpp/include/cpplib.h -+++ b/libcpp/include/cpplib.h -@@ -751,6 +751,9 @@ extern void cpp_set_lang (cpp_reader *, - /* Set the include paths. */ - extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int); - -+/* Provide src:dst pair for __FILE__ remapping. */ -+extern void add_cpp_remap_path (const char *); -+ - /* Call these to get pointers to the options, callback, and deps - structures for a given reader. These pointers are good until you - call cpp_finish on that reader. You can either edit the callbacks ---- a/libcpp/macro.c -+++ b/libcpp/macro.c -@@ -224,6 +224,64 @@ static const char * const monthnames[] = - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" - }; - -+static size_t remap_pairs; -+static char **remap_src; -+static char **remap_dst; -+ -+void -+add_cpp_remap_path (const char *arg) -+{ -+ const char *arg_dst; -+ size_t len; -+ -+ arg_dst = strchr(arg, ':'); -+ if (arg_dst == NULL) -+ { -+ fprintf(stderr, "Invalid argument for -iremap\n"); -+ exit(1); -+ } -+ -+ len = arg_dst - arg; -+ ++arg_dst; -+ -+ remap_src = (char **) xrealloc(remap_src, sizeof(char *) * (remap_pairs + 1)); -+ remap_dst = (char **) xrealloc(remap_dst, sizeof(char *) * (remap_pairs + 1)); -+ -+ remap_src[remap_pairs] = (char *) xmalloc(len + 1); -+ memcpy(remap_src[remap_pairs], arg, len); -+ remap_src[remap_pairs][len] = '\0'; -+ remap_dst[remap_pairs] = xstrdup(arg_dst); -+ ++remap_pairs; -+} -+ -+static const char * -+cpp_remap_file (const char *arg, char **tmp_name) -+{ -+ char *result; -+ size_t i, len; -+ -+ for (i = 0; i < remap_pairs; ++i) -+ { -+ len = strlen (remap_src[i]); -+ if (strncmp (remap_src[i], arg, len)) -+ continue; -+ if (arg[len] == '\0') -+ return xstrdup (remap_dst[i]); -+ if (arg[len] != '/') -+ continue; -+ arg += len; -+ len = strlen (remap_dst[i]); -+ result = (char *) xmalloc (len + strlen (arg) + 1); -+ memcpy(result, remap_dst[i], len); -+ strcpy(result + len, arg); -+ *tmp_name = result; -+ -+ return result; -+ } -+ -+ return arg; -+} -+ - /* Helper function for builtin_macro. Returns the text generated by - a builtin macro. */ - const uchar * -@@ -286,6 +344,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - { - unsigned int len; - const char *name; -+ char *tmp_name = NULL; - uchar *buf; - - if (node->value.builtin == BT_FILE) -@@ -297,6 +356,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - if (!name) - abort (); - } -+ name = cpp_remap_file (name, &tmp_name); - len = strlen (name); - buf = _cpp_unaligned_alloc (pfile, len * 2 + 3); - result = buf; -@@ -304,6 +364,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - buf = cpp_quote_string (buf + 1, (const unsigned char *) name, len); - *buf++ = '"'; - *buf = '\0'; -+ free (tmp_name); - } - break; - diff --git a/toolchain-old/gcc/patches/5.4.0/960-go_libm.patch b/toolchain-old/gcc/patches/5.4.0/960-go_libm.patch deleted file mode 100644 index d16b0200c06fb5..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/960-go_libm.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/go/Make-lang.in -+++ b/gcc/go/Make-lang.in -@@ -74,7 +74,7 @@ go_OBJS = $(GO_OBJS) go/gospec.o - - go1$(exeext): $(GO_OBJS) attribs.o $(BACKEND) $(LIBDEPS) - +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ -- $(GO_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS) -+ $(GO_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS) -lm - - # Documentation. - diff --git a/toolchain-old/gcc/patches/5.4.0/970-warn_bug.patch b/toolchain-old/gcc/patches/5.4.0/970-warn_bug.patch deleted file mode 100644 index 2c5cf9be208ef6..00000000000000 --- a/toolchain-old/gcc/patches/5.4.0/970-warn_bug.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgo/runtime/mprof.goc -+++ b/libgo/runtime/mprof.goc -@@ -403,7 +403,7 @@ func ThreadCreateProfile(p Slice) (n int - - func Stack(b Slice, all bool) (n int) { - byte *pc, *sp; -- bool enablegc; -+ bool enablegc = false; /* workaround GCC bug #36550 */ - - sp = runtime_getcallersp(&b); - pc = (byte*)(uintptr)runtime_getcallerpc(&b); diff --git a/toolchain-old/gcc/patches/6.3.0/001-revert_register_mode_search.patch b/toolchain-old/gcc/patches/6.3.0/001-revert_register_mode_search.patch deleted file mode 100644 index bd6fbdb4a9dcb0..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/001-revert_register_mode_search.patch +++ /dev/null @@ -1,65 +0,0 @@ -Revert of: - -commit 275035b56823b26d5fb7e90fad945b998648edf2 -Author: bergner -Date: Thu Sep 5 14:09:07 2013 +0000 - - PR target/58139 - * reginfo.c (choose_hard_reg_mode): Scan through all mode classes - looking for widest mode. - - - git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202286 138bc75d-0d04-0410-961f-82ee72b054a4 - - ---- a/gcc/reginfo.c -+++ b/gcc/reginfo.c -@@ -625,35 +625,40 @@ choose_hard_reg_mode (unsigned int regno - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - - if (found_mode != VOIDmode) diff --git a/toolchain-old/gcc/patches/6.3.0/002-case_insensitive.patch b/toolchain-old/gcc/patches/6.3.0/002-case_insensitive.patch deleted file mode 100644 index b3d2dbe291f5a5..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/002-case_insensitive.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/include/filenames.h -+++ b/include/filenames.h -@@ -43,11 +43,6 @@ extern "C" { - # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) - #else /* not DOSish */ --# if defined(__APPLE__) --# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM --# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 --# endif --# endif /* __APPLE__ */ - # define HAS_DRIVE_SPEC(f) (0) - # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/toolchain-old/gcc/patches/6.3.0/010-documentation.patch b/toolchain-old/gcc/patches/6.3.0/010-documentation.patch deleted file mode 100644 index 2adb28c83ded42..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/010-documentation.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -3021,18 +3021,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) - doc/gccint.info: $(TEXI_GCCINT_FILES) - doc/cppinternals.info: $(TEXI_CPPINT_FILES) - --doc/%.info: %.texi -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/%.info: - - # Duplicate entry to handle renaming of gccinstall.info --doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/gccinstall.info: - - doc/cpp.dvi: $(TEXI_CPP_FILES) - doc/gcc.dvi: $(TEXI_GCC_FILES) diff --git a/toolchain-old/gcc/patches/6.3.0/230-musl_libssp.patch b/toolchain-old/gcc/patches/6.3.0/230-musl_libssp.patch deleted file mode 100644 index 8dfd1fc28747b3..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/230-musl_libssp.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -858,7 +858,9 @@ proper position among the other output f - #endif - - #ifndef LINK_SSP_SPEC --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if DEFAULT_LIBC == LIBC_MUSL -+#define LINK_SSP_SPEC "-lssp_nonshared" -+#elif defined(TARGET_LIBC_PROVIDES_SSP) - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit:}" - #else diff --git a/toolchain-old/gcc/patches/6.3.0/280-musl-disable-ifunc-by-default.patch b/toolchain-old/gcc/patches/6.3.0/280-musl-disable-ifunc-by-default.patch deleted file mode 100644 index df09e4f6366317..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/280-musl-disable-ifunc-by-default.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 450fb05e2a7510d37744f044009f8237d902f65c Mon Sep 17 00:00:00 2001 -From: nsz -Date: Tue, 30 Aug 2016 10:26:22 +0000 -Subject: [PATCH] disable ifunc on *-musl by default - -gcc/ - * config.gcc (*-*-*musl*): Disable gnu-indirect-function. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239859 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - gcc/ChangeLog | 4 ++++ - gcc/config.gcc | 4 ++-- - 2 files changed, 6 insertions(+), 2 deletions(-) - ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -1495,7 +1495,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfree - extra_options="${extra_options} linux-android.opt" - # Assume modern glibc if not targeting Android nor uclibc. - case ${target} in -- *-*-*android*|*-*-*uclibc*) -+ *-*-*android*|*-*-*uclibc*|*-*-*musl*) - ;; - *) - default_gnu_indirect_function=yes -@@ -1564,7 +1564,7 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu - extra_options="${extra_options} linux-android.opt" - # Assume modern glibc if not targeting Android nor uclibc. - case ${target} in -- *-*-*android*|*-*-*uclibc*) -+ *-*-*android*|*-*-*uclibc*|*-*-*musl*) - ;; - *) - default_gnu_indirect_function=yes diff --git a/toolchain-old/gcc/patches/6.3.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain-old/gcc/patches/6.3.0/300-mips_Os_cpu_rtx_cost_model.patch deleted file mode 100644 index d76bd8cb1dcb49..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/300-mips_Os_cpu_rtx_cost_model.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -17928,7 +17928,7 @@ mips_option_override (void) - flag_pcc_struct_return = 0; - - /* Decide which rtx_costs structure to use. */ -- if (optimize_size) -+ if (0 && optimize_size) - mips_cost = &mips_rtx_cost_optimize_size; - else - mips_cost = &mips_rtx_cost_data[mips_tune]; diff --git a/toolchain-old/gcc/patches/6.3.0/800-arm_v5te_no_ldrd_strd.patch b/toolchain-old/gcc/patches/6.3.0/800-arm_v5te_no_ldrd_strd.patch deleted file mode 100644 index 2e7c23f85137a7..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/800-arm_v5te_no_ldrd_strd.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/arm/arm.h -+++ b/gcc/config/arm/arm.h -@@ -166,7 +166,7 @@ extern void (*arm_lang_output_object_att - /* Thumb-1 only. */ - #define TARGET_THUMB1_ONLY (TARGET_THUMB1 && !arm_arch_notm) - --#define TARGET_LDRD (arm_arch5e && ARM_DOUBLEWORD_ALIGN \ -+#define TARGET_LDRD (arm_arch6 && ARM_DOUBLEWORD_ALIGN \ - && !TARGET_THUMB1) - - #define TARGET_CRC32 (arm_arch_crc) diff --git a/toolchain-old/gcc/patches/6.3.0/810-arm-softfloat-libgcc.patch b/toolchain-old/gcc/patches/6.3.0/810-arm-softfloat-libgcc.patch deleted file mode 100644 index 1d06f5b2ec03a0..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/libgcc/config/arm/t-linux -+++ b/libgcc/config/arm/t-linux -@@ -1,6 +1,10 @@ - LIB1ASMSRC = arm/lib1funcs.S - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ -- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 -+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ -+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ -+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ -+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ -+ _arm_fixsfsi _arm_fixunssfsi - - # Just for these, we omit the frame pointer since it makes such a big - # difference. ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -60,8 +60,6 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" -- - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ diff --git a/toolchain-old/gcc/patches/6.3.0/820-libgcc_pic.patch b/toolchain-old/gcc/patches/6.3.0/820-libgcc_pic.patch deleted file mode 100644 index f925d96f66f64a..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/820-libgcc_pic.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/libgcc/Makefile.in -+++ b/libgcc/Makefile.in -@@ -888,11 +888,12 @@ $(libgcov-driver-objects): %$(objext): $ - - # Static libraries. - libgcc.a: $(libgcc-objects) -+libgcc_pic.a: $(libgcc-s-objects) - libgcov.a: $(libgcov-objects) - libunwind.a: $(libunwind-objects) - libgcc_eh.a: $(libgcc-eh-objects) - --libgcc.a libgcov.a libunwind.a libgcc_eh.a: -+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: - -rm -f $@ - - objects="$(objects)"; \ -@@ -913,7 +914,7 @@ all: libunwind.a - endif - - ifeq ($(enable_shared),yes) --all: libgcc_eh.a libgcc_s$(SHLIB_EXT) -+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) - ifneq ($(LIBUNWIND),) - all: libunwind$(SHLIB_EXT) - libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) -@@ -1115,6 +1116,10 @@ install-shared: - chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a - $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a - -+ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ -+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ - $(subst @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) diff --git a/toolchain-old/gcc/patches/6.3.0/830-arm_unbreak_armv4t.patch b/toolchain-old/gcc/patches/6.3.0/830-arm_unbreak_armv4t.patch deleted file mode 100644 index 37f8f2a54de669..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/830-arm_unbreak_armv4t.patch +++ /dev/null @@ -1,13 +0,0 @@ -http://sourceware.org/ml/crossgcc/2008-05/msg00009.html - ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -45,7 +45,7 @@ - The ARM10TDMI core is the default for armv5t, so set - SUBTARGET_CPU_DEFAULT to achieve this. */ - #undef SUBTARGET_CPU_DEFAULT --#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi -+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi - - /* TARGET_BIG_ENDIAN_DEFAULT is set in - config.gcc for big endian configurations. */ diff --git a/toolchain-old/gcc/patches/6.3.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain-old/gcc/patches/6.3.0/840-armv4_pass_fix-v4bx_to_ld.patch deleted file mode 100644 index cb1fb982356a1b..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/840-armv4_pass_fix-v4bx_to_ld.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -94,10 +94,15 @@ - #define MUSL_DYNAMIC_LINKER \ - "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" - -+/* For armv4 we pass --fix-v4bx to linker to support EABI */ -+#undef TARGET_FIX_V4BX_SPEC -+#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\ -+ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC --#define LINK_SPEC EABI_LINK_SPEC \ -+#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ - LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) - diff --git a/toolchain-old/gcc/patches/6.3.0/850-use_shared_libgcc.patch b/toolchain-old/gcc/patches/6.3.0/850-use_shared_libgcc.patch deleted file mode 100644 index cd20244c690f54..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/850-use_shared_libgcc.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -132,10 +132,6 @@ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \ - LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) - --/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we -- do not use -lfloat. */ --#undef LIBGCC_SPEC -- - /* Clear the instruction cache from `beg' to `end'. This is - implemented in lib1funcs.S, so ensure an error if this definition - is used. */ ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -53,6 +53,10 @@ see the files COPYING3 and COPYING.RUNTI - builtin_assert ("system=posix"); \ - } while (0) - -+#ifndef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" -+#endif -+ - /* Determine which dynamic linker to use depending on whether GLIBC or - uClibc or Bionic or musl is the default C library and whether - -muclibc or -mglibc or -mbionic or -mmusl has been passed to change ---- a/libgcc/mkmap-symver.awk -+++ b/libgcc/mkmap-symver.awk -@@ -132,5 +132,5 @@ function output(lib) { - else if (inherit[lib]) - printf("} %s;\n", inherit[lib]); - else -- printf ("\n local:\n\t*;\n};\n"); -+ printf ("\n\t*;\n};\n"); - } ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -60,6 +60,9 @@ - #undef CPP_OS_DEFAULT_SPEC - #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" - -+#undef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" -+ - #undef LINK_SHLIB_SPEC - #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}" - diff --git a/toolchain-old/gcc/patches/6.3.0/851-libgcc_no_compat.patch b/toolchain-old/gcc/patches/6.3.0/851-libgcc_no_compat.patch deleted file mode 100644 index 80c34768414653..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/851-libgcc_no_compat.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/libgcc/config/t-libunwind -+++ b/libgcc/config/t-libunwind -@@ -2,8 +2,7 @@ - - HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER - --LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ -- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - - # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/toolchain-old/gcc/patches/6.3.0/870-ppc_no_crtsavres.patch b/toolchain-old/gcc/patches/6.3.0/870-ppc_no_crtsavres.patch deleted file mode 100644 index 9e543a0fc20150..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/870-ppc_no_crtsavres.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/rs6000/rs6000.c -+++ b/gcc/config/rs6000/rs6000.c -@@ -24171,7 +24171,7 @@ rs6000_savres_strategy (rs6000_stack_t * - /* Define cutoff for using out-of-line functions to save registers. */ - if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) - { -- if (!optimize_size) -+ if (1) - { - strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; - strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; diff --git a/toolchain-old/gcc/patches/6.3.0/880-no_java_section.patch b/toolchain-old/gcc/patches/6.3.0/880-no_java_section.patch deleted file mode 100644 index 0fa9e627c2a0b4..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/880-no_java_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/defaults.h -+++ b/gcc/defaults.h -@@ -395,7 +395,7 @@ see the files COPYING3 and COPYING.RUNTI - /* If we have named section and we support weak symbols, then use the - .jcr section for recording java classes which need to be registered - at program start-up time. */ --#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK -+#if 0 && defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK - #ifndef JCR_SECTION_NAME - #define JCR_SECTION_NAME ".jcr" - #endif diff --git a/toolchain-old/gcc/patches/6.3.0/881-no_tm_section.patch b/toolchain-old/gcc/patches/6.3.0/881-no_tm_section.patch deleted file mode 100644 index fab5db3be55cf1..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/881-no_tm_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgcc/crtstuff.c -+++ b/libgcc/crtstuff.c -@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ - #endif - - #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) --# define USE_TM_CLONE_REGISTRY 1 -+# define USE_TM_CLONE_REGISTRY 0 - #endif - - /* We do not want to add the weak attribute to the declarations of these diff --git a/toolchain-old/gcc/patches/6.3.0/900-bad-mips16-crt.patch b/toolchain-old/gcc/patches/6.3.0/900-bad-mips16-crt.patch deleted file mode 100644 index dd6e9dc889ad07..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/900-bad-mips16-crt.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/libgcc/config/mips/t-mips16 -+++ b/libgcc/config/mips/t-mips16 -@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16 - - # Version these symbols if building libgcc.so. - SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver -+ -+CRTSTUFF_T_CFLAGS += -mno-mips16 -+CRTSTUFF_T_CFLAGS_S += -mno-mips16 diff --git a/toolchain-old/gcc/patches/6.3.0/910-mbsd_multi.patch b/toolchain-old/gcc/patches/6.3.0/910-mbsd_multi.patch deleted file mode 100644 index b747935f0f8047..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/910-mbsd_multi.patch +++ /dev/null @@ -1,222 +0,0 @@ - - This patch brings over a few features from MirBSD: - * -fhonour-copts - If this option is not given, it's warned (depending - on environment variables). This is to catch errors - of misbuilt packages which override CFLAGS themselves. - * -Werror-maybe-reset - Has the effect of -Wno-error if GCC_NO_WERROR is - set and not '0', a no-operation otherwise. This is - to be able to use -Werror in "make" but prevent - GNU autoconf generated configure scripts from - freaking out. - - This patch was authored by Thorsten Glaser - with copyright assignment to the FSF in effect. - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -107,6 +107,9 @@ static int class_dump_flags; - /* Whether any standard preincluded header has been preincluded. */ - static bool done_preinclude; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); - static void set_std_cxx11 (int); -@@ -442,6 +445,12 @@ c_common_handle_option (size_t scode, co - flag_no_builtin = !value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fconstant_string_class_: - constant_string_class_name = arg; - break; -@@ -1041,6 +1050,47 @@ c_common_init (void) - return false; - } - -+ if (c_language == clk_c) { -+ char *ev = getenv ("GCC_HONOUR_COPTS"); -+ int evv; -+ if (ev == NULL) -+ evv = -1; -+ else if ((*ev == '0') || (*ev == '\0')) -+ evv = 0; -+ else if (*ev == '1') -+ evv = 1; -+ else if (*ev == '2') -+ evv = 2; -+ else if (*ev == 's') -+ evv = -1; -+ else { -+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); -+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ -+ } -+ if (evv == 1) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in lenient mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ warning (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } else if (evv == 2) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in strict mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ error ("someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ return false; -+ } -+ } else if (evv == 0) { -+ if (honour_copts != 1) -+ inform (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } -+ - return true; - } - ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -438,6 +438,10 @@ Wfloat-conversion - C ObjC C++ ObjC++ Var(warn_float_conversion) Warning LangEnabledBy(C ObjC C++ ObjC++,Wconversion) - Warn for implicit type conversions that cause loss of floating point precision. - -+Werror-maybe-reset -+C ObjC C++ ObjC++ -+; Documented in common.opt -+ - Wfloat-equal - C ObjC C++ ObjC++ Var(warn_float_equal) Warning - Warn if testing floating point numbers for equality. -@@ -1252,6 +1256,9 @@ C++ ObjC++ Optimization Alias(fexception - fhonor-std - C++ ObjC++ Ignore Warn(switch %qs is no longer supported) - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment. ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -581,6 +581,10 @@ Werror= - Common Joined - Treat specified warning as error. - -+Werror-maybe-reset -+Common -+If environment variable GCC_NO_WERROR is set, act as -Wno-error -+ - Wextra - Common Var(extra_warnings) Warning - Print extra (possibly unwanted) warnings. -@@ -1432,6 +1436,9 @@ fguess-branch-probability - Common Report Var(flag_guess_branch_prob) Optimization - Enable guessing of branch probabilities. - -+fhonour-copts -+Common RejectNegative -+ - ; Nonzero means ignore `#ident' directives. 0 means handle them. - ; Generate position-independent code for executables if possible - ; On SVR4 targets, it also controls whether or not to emit a ---- a/gcc/opts.c -+++ b/gcc/opts.c -@@ -1783,6 +1783,17 @@ common_handle_option (struct gcc_options - opts, opts_set, loc, dc); - break; - -+ case OPT_Werror_maybe_reset: -+ { -+ char *ev = getenv ("GCC_NO_WERROR"); -+ if ((ev != NULL) && (*ev != '0')) -+ warnings_are_errors = 0; -+ } -+ break; -+ -+ case OPT_fhonour_copts: -+ break; -+ - case OPT_Wlarger_than_: - opts->x_larger_than_size = value; - opts->x_warn_larger_than = value != -1; ---- a/gcc/doc/cppopts.texi -+++ b/gcc/doc/cppopts.texi -@@ -163,6 +163,11 @@ in older programs. This warning is on b - Make all warnings into hard errors. Source code which triggers warnings - will be rejected. - -+@item -Werror-maybe-reset -+@opindex Werror-maybe-reset -+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment -+variable is set to anything other than 0 or empty. -+ - @item -Wsystem-headers - @opindex Wsystem-headers - Issue warnings for code in system headers. These are normally unhelpful ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -263,7 +263,7 @@ Objective-C and Objective-C++ Dialects}. - -Wno-discarded-qualifiers -Wno-discarded-array-qualifiers @gol - -Wno-div-by-zero -Wdouble-promotion -Wduplicated-cond @gol - -Wempty-body -Wenum-compare -Wno-endif-labels @gol ---Werror -Werror=* -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol -+-Werror -Werror=* -Werror-maybe-reset -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol - -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol - -Wformat-security -Wformat-signedness -Wformat-y2k -Wframe-address @gol - -Wframe-larger-than=@var{len} -Wno-free-nonheap-object -Wjump-misses-init @gol -@@ -5737,6 +5737,22 @@ This option is only supported for C and - @option{-Wall} and by @option{-Wpedantic}, which can be disabled with - @option{-Wno-pointer-sign}. - -+@item -Werror-maybe-reset -+@opindex Werror-maybe-reset -+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment -+variable is set to anything other than 0 or empty. -+ -+@item -fhonour-copts -+@opindex fhonour-copts -+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not -+given at least once, and warn if it is given more than once. -+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not -+given exactly once. -+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option -+is not given exactly once. -+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. -+This flag and environment variable only affect the C language. -+ - @item -Wstack-protector - @opindex Wstack-protector - @opindex Wno-stack-protector -@@ -6605,7 +6621,7 @@ so, the first branch is redirected to ei - second branch or a point immediately following it, depending on whether - the condition is known to be true or false. - --Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -+Enabled at levels @option{-O3}. - - @item -fsplit-wide-types - @opindex fsplit-wide-types ---- a/gcc/java/jvspec.c -+++ b/gcc/java/jvspec.c -@@ -629,6 +629,7 @@ lang_specific_pre_link (void) - class name. Append dummy `.c' that can be stripped by set_input so %b - is correct. */ - set_input (concat (main_class_name, "main.c", NULL)); -+ putenv ("GCC_HONOUR_COPTS=s"); /* XXX hack! */ - err = do_spec (jvgenmain_spec); - if (err == 0) - { diff --git a/toolchain-old/gcc/patches/6.3.0/920-specs_nonfatal_getenv.patch b/toolchain-old/gcc/patches/6.3.0/920-specs_nonfatal_getenv.patch deleted file mode 100644 index dc0acb95a8e748..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/920-specs_nonfatal_getenv.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -9198,8 +9198,10 @@ getenv_spec_function (int argc, const ch - value = varname; - - if (!value) -- fatal_error (input_location, -- "environment variable %qs not defined", varname); -+ { -+ warning (input_location, "environment variable %qs not defined", varname); -+ value = ""; -+ } - - /* We have to escape every character of the environment variable so - they are not interpreted as active spec characters. A diff --git a/toolchain-old/gcc/patches/6.3.0/930-fix-mips-noexecstack.patch b/toolchain-old/gcc/patches/6.3.0/930-fix-mips-noexecstack.patch deleted file mode 100644 index 2a99840b636a49..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/930-fix-mips-noexecstack.patch +++ /dev/null @@ -1,111 +0,0 @@ -From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001 -From: Andrew McDonnell -Date: Fri, 3 Oct 2014 19:09:00 +0930 -Subject: Add .note.GNU-stack section - -See http://lists.busybox.net/pipermail/uclibc/2014-October/048671.html -Below copied from https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02430.html - -Re: [Patch, MIPS] Add .note.GNU-stack section - - From: Steve Ellcey - -On Wed, 2014-09-10 at 10:15 -0700, Eric Christopher wrote: -> -> -> On Wed, Sep 10, 2014 at 9:27 AM, wrote: - -> This works except you did not update the assembly files in -> libgcc or glibc. We (Cavium) have the same patch in our tree -> for a few released versions. - -> Mind just checking yours in then Andrew? - -> Thanks! -> -eric - -I talked to Andrew about what files he changed in GCC and created and -tested this new patch. Andrew also mentioned changing some assembly -files in glibc but I don't see any use of '.section .note.GNU-stack' in -any assembly files in glibc (for any platform) so I wasn't planning on -creating a glibc to add them to mips glibc assembly language files. - -OK to check in this patch? - -Steve Ellcey -sellcey@mips.com - - - -2014-09-26 Steve Ellcey ---- - gcc/config/mips/mips.c | 3 +++ - libgcc/config/mips/crti.S | 4 ++++ - libgcc/config/mips/crtn.S | 3 +++ - libgcc/config/mips/mips16.S | 4 ++++ - libgcc/config/mips/vr4120-div.S | 4 ++++ - 5 files changed, 18 insertions(+) - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -20228,6 +20228,9 @@ mips_promote_function_mode (const_tree t - #undef TARGET_HARD_REGNO_SCRATCH_OK - #define TARGET_HARD_REGNO_SCRATCH_OK mips_hard_regno_scratch_ok - -+#undef TARGET_ASM_FILE_END -+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack -+ - struct gcc_target targetm = TARGET_INITIALIZER; - - #include "gt-mips.h" ---- a/libgcc/config/mips/crti.S -+++ b/libgcc/config/mips/crti.S -@@ -21,6 +21,10 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+ -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/crtn.S -+++ b/libgcc/config/mips/crtn.S -@@ -21,6 +21,9 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/mips16.S -+++ b/libgcc/config/mips/mips16.S -@@ -48,6 +48,10 @@ see the files COPYING3 and COPYING.RUNTI - values using the soft-float calling convention, but do the actual - operation using the hard floating point instructions. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - #if defined _MIPS_SIM && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64) - - /* This file contains 32-bit assembly code. */ ---- a/libgcc/config/mips/vr4120-div.S -+++ b/libgcc/config/mips/vr4120-div.S -@@ -26,6 +26,10 @@ see the files COPYING3 and COPYING.RUNTI - -mfix-vr4120. div and ddiv do not give the correct result when one - of the operands is negative. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - .set nomips16 - - #define DIV \ diff --git a/toolchain-old/gcc/patches/6.3.0/940-no-clobber-stamp-bits.patch b/toolchain-old/gcc/patches/6.3.0/940-no-clobber-stamp-bits.patch deleted file mode 100644 index 68e62865b1269c..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/940-no-clobber-stamp-bits.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libstdc++-v3/include/Makefile.in -+++ b/libstdc++-v3/include/Makefile.in -@@ -1459,7 +1459,7 @@ stamp-bits: ${bits_headers} - @$(STAMP) stamp-bits - - stamp-bits-sup: stamp-bits ${bits_sup_headers} -- @-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null -+ @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null - @$(STAMP) stamp-bits-sup - - stamp-c_base: ${c_base_headers} diff --git a/toolchain-old/gcc/patches/6.3.0/950-cpp_file_path_translation.patch b/toolchain-old/gcc/patches/6.3.0/950-cpp_file_path_translation.patch deleted file mode 100644 index d467eb7c9a1ef6..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/950-cpp_file_path_translation.patch +++ /dev/null @@ -1,182 +0,0 @@ -Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47047 - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -574,6 +574,10 @@ c_common_handle_option (size_t scode, co - add_path (xstrdup (arg), SYSTEM, 0, true); - break; - -+ case OPT_iremap: -+ add_cpp_remap_path (arg); -+ break; -+ - case OPT_iwithprefix: - add_prefixed_path (arg, SYSTEM); - break; ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1632,6 +1632,10 @@ iquote - C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) - -iquote Add to the end of the quote include path. - -+iremap -+C ObjC C++ ObjC++ Joined Separate -+-iremap Convert to if it occurs as prefix in __FILE__. -+ - iwithprefix - C ObjC C++ ObjC++ Joined Separate - -iwithprefix Add to the end of the system include path. ---- a/gcc/doc/cpp.texi -+++ b/gcc/doc/cpp.texi -@@ -4444,6 +4444,7 @@ without notice. - @c man begin SYNOPSIS - cpp [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}] - [@option{-I}@var{dir}@dots{}] [@option{-iquote}@var{dir}@dots{}] -+ [@option{-iremap}@var{src}:@var{dst}] - [@option{-W}@var{warn}@dots{}] - [@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}] - [@option{-MP}] [@option{-MQ} @var{target}@dots{}] ---- a/gcc/doc/cppopts.texi -+++ b/gcc/doc/cppopts.texi -@@ -532,6 +532,12 @@ Search @var{dir} only for header files r - If @var{dir} begins with @code{=}, then the @code{=} will be replaced - by the sysroot prefix; see @option{--sysroot} and @option{-isysroot}. - -+@item -iremap @var{src}:@var{dst} -+@opindex iremap -+Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. -+This option can be specified more than once. Processing stops at the first -+match. -+ - @item -fdirectives-only - @opindex fdirectives-only - When preprocessing, handle directives, but do not expand macros. ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -476,8 +476,8 @@ Objective-C and Objective-C++ Dialects}. - @item Directory Options - @xref{Directory Options,,Options for Directory Search}. - @gccoptlist{-B@var{prefix} -I@var{dir} -iplugindir=@var{dir} @gol ---iquote@var{dir} -L@var{dir} -no-canonical-prefixes -I- @gol ----sysroot=@var{dir} --no-sysroot-suffix} -+-iquote@var{dir} -iremap@var{src}:@var{dst} -L@var{dir} -no-canonical-prefixes @gol -+-I- --sysroot=@var{dir} --no-sysroot-suffix} - - @item Code Generation Options - @xref{Code Gen Options,,Options for Code Generation Conventions}. -@@ -10861,6 +10861,12 @@ be searched for header files only for th - "@var{file}"}; they are not searched for @code{#include <@var{file}>}, - otherwise just like @option{-I}. - -+@item -iremap @var{src}:@var{dst} -+@opindex iremap -+Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. -+This option can be specified more than once. Processing stops at the first -+match. -+ - @item -L@var{dir} - @opindex L - Add directory @var{dir} to the list of directories to be searched ---- a/libcpp/include/cpplib.h -+++ b/libcpp/include/cpplib.h -@@ -760,6 +760,9 @@ extern void cpp_set_lang (cpp_reader *, - /* Set the include paths. */ - extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int); - -+/* Provide src:dst pair for __FILE__ remapping. */ -+extern void add_cpp_remap_path (const char *); -+ - /* Call these to get pointers to the options, callback, and deps - structures for a given reader. These pointers are good until you - call cpp_finish on that reader. You can either edit the callbacks ---- a/libcpp/macro.c -+++ b/libcpp/macro.c -@@ -227,6 +227,64 @@ static const char * const monthnames[] = - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" - }; - -+static size_t remap_pairs; -+static char **remap_src; -+static char **remap_dst; -+ -+void -+add_cpp_remap_path (const char *arg) -+{ -+ const char *arg_dst; -+ size_t len; -+ -+ arg_dst = strchr(arg, ':'); -+ if (arg_dst == NULL) -+ { -+ fprintf(stderr, "Invalid argument for -iremap\n"); -+ exit(1); -+ } -+ -+ len = arg_dst - arg; -+ ++arg_dst; -+ -+ remap_src = (char **) xrealloc(remap_src, sizeof(char *) * (remap_pairs + 1)); -+ remap_dst = (char **) xrealloc(remap_dst, sizeof(char *) * (remap_pairs + 1)); -+ -+ remap_src[remap_pairs] = (char *) xmalloc(len + 1); -+ memcpy(remap_src[remap_pairs], arg, len); -+ remap_src[remap_pairs][len] = '\0'; -+ remap_dst[remap_pairs] = xstrdup(arg_dst); -+ ++remap_pairs; -+} -+ -+static const char * -+cpp_remap_file (const char *arg, char **tmp_name) -+{ -+ char *result; -+ size_t i, len; -+ -+ for (i = 0; i < remap_pairs; ++i) -+ { -+ len = strlen (remap_src[i]); -+ if (strncmp (remap_src[i], arg, len)) -+ continue; -+ if (arg[len] == '\0') -+ return xstrdup (remap_dst[i]); -+ if (arg[len] != '/') -+ continue; -+ arg += len; -+ len = strlen (remap_dst[i]); -+ result = (char *) xmalloc (len + strlen (arg) + 1); -+ memcpy(result, remap_dst[i], len); -+ strcpy(result + len, arg); -+ *tmp_name = result; -+ -+ return result; -+ } -+ -+ return arg; -+} -+ - /* Helper function for builtin_macro. Returns the text generated by - a builtin macro. */ - const uchar * -@@ -290,6 +348,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - { - unsigned int len; - const char *name; -+ char *tmp_name = NULL; - uchar *buf; - - if (node->value.builtin == BT_FILE) -@@ -301,6 +360,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - if (!name) - abort (); - } -+ name = cpp_remap_file (name, &tmp_name); - len = strlen (name); - buf = _cpp_unaligned_alloc (pfile, len * 2 + 3); - result = buf; -@@ -308,6 +368,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - buf = cpp_quote_string (buf + 1, (const unsigned char *) name, len); - *buf++ = '"'; - *buf = '\0'; -+ free (tmp_name); - } - break; - diff --git a/toolchain-old/gcc/patches/6.3.0/960-fix-ubsan-defref.patch b/toolchain-old/gcc/patches/6.3.0/960-fix-ubsan-defref.patch deleted file mode 100644 index 72d86c14984c12..00000000000000 --- a/toolchain-old/gcc/patches/6.3.0/960-fix-ubsan-defref.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/ubsan.c -+++ b/gcc/ubsan.c -@@ -1471,7 +1471,7 @@ ubsan_use_new_style_p (location_t loc) - - expanded_location xloc = expand_location (loc); - if (xloc.file == NULL || strncmp (xloc.file, "\1", 2) == 0 -- || xloc.file == '\0' || xloc.file[0] == '\xff' -+ || xloc.file[0] == '\0' || xloc.file[0] == '\xff' - || xloc.file[1] == '\xff') - return false; - diff --git a/toolchain-old/gcc/patches/7.1.0/001-revert_register_mode_search.patch b/toolchain-old/gcc/patches/7.1.0/001-revert_register_mode_search.patch deleted file mode 100644 index adcc7c3c549c2b..00000000000000 --- a/toolchain-old/gcc/patches/7.1.0/001-revert_register_mode_search.patch +++ /dev/null @@ -1,65 +0,0 @@ -Revert of: - -commit 275035b56823b26d5fb7e90fad945b998648edf2 -Author: bergner -Date: Thu Sep 5 14:09:07 2013 +0000 - - PR target/58139 - * reginfo.c (choose_hard_reg_mode): Scan through all mode classes - looking for widest mode. - - - git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202286 138bc75d-0d04-0410-961f-82ee72b054a4 - - ---- a/gcc/reginfo.c -+++ b/gcc/reginfo.c -@@ -637,35 +637,40 @@ choose_hard_reg_mode (unsigned int regno - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - - if (found_mode != VOIDmode) diff --git a/toolchain-old/gcc/patches/7.1.0/002-case_insensitive.patch b/toolchain-old/gcc/patches/7.1.0/002-case_insensitive.patch deleted file mode 100644 index b3d2dbe291f5a5..00000000000000 --- a/toolchain-old/gcc/patches/7.1.0/002-case_insensitive.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/include/filenames.h -+++ b/include/filenames.h -@@ -43,11 +43,6 @@ extern "C" { - # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) - #else /* not DOSish */ --# if defined(__APPLE__) --# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM --# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 --# endif --# endif /* __APPLE__ */ - # define HAS_DRIVE_SPEC(f) (0) - # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/toolchain-old/gcc/patches/7.1.0/010-documentation.patch b/toolchain-old/gcc/patches/7.1.0/010-documentation.patch deleted file mode 100644 index 46fe81f1299a0d..00000000000000 --- a/toolchain-old/gcc/patches/7.1.0/010-documentation.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -3120,18 +3120,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) - doc/gccint.info: $(TEXI_GCCINT_FILES) - doc/cppinternals.info: $(TEXI_CPPINT_FILES) - --doc/%.info: %.texi -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/%.info: - - # Duplicate entry to handle renaming of gccinstall.info --doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/gccinstall.info: - - doc/cpp.dvi: $(TEXI_CPP_FILES) - doc/gcc.dvi: $(TEXI_GCC_FILES) diff --git a/toolchain-old/gcc/patches/7.1.0/230-musl_libssp.patch b/toolchain-old/gcc/patches/7.1.0/230-musl_libssp.patch deleted file mode 100644 index 65b5710d6f6b12..00000000000000 --- a/toolchain-old/gcc/patches/7.1.0/230-musl_libssp.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -861,7 +861,9 @@ proper position among the other output f - #endif - - #ifndef LINK_SSP_SPEC --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if DEFAULT_LIBC == LIBC_MUSL -+#define LINK_SSP_SPEC "-lssp_nonshared" -+#elif defined(TARGET_LIBC_PROVIDES_SSP) - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit:}" - #else diff --git a/toolchain-old/gcc/patches/7.1.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain-old/gcc/patches/7.1.0/300-mips_Os_cpu_rtx_cost_model.patch deleted file mode 100644 index 21cff871c0547d..00000000000000 --- a/toolchain-old/gcc/patches/7.1.0/300-mips_Os_cpu_rtx_cost_model.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -19784,7 +19784,7 @@ mips_option_override (void) - flag_pcc_struct_return = 0; - - /* Decide which rtx_costs structure to use. */ -- if (optimize_size) -+ if (0 && optimize_size) - mips_cost = &mips_rtx_cost_optimize_size; - else - mips_cost = &mips_rtx_cost_data[mips_tune]; diff --git a/toolchain-old/gcc/patches/7.1.0/800-arm_v5te_no_ldrd_strd.patch b/toolchain-old/gcc/patches/7.1.0/800-arm_v5te_no_ldrd_strd.patch deleted file mode 100644 index 435f5715b59250..00000000000000 --- a/toolchain-old/gcc/patches/7.1.0/800-arm_v5te_no_ldrd_strd.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/arm/arm.h -+++ b/gcc/config/arm/arm.h -@@ -150,7 +150,7 @@ extern tree arm_fp16_type_node; - /* Thumb-1 only. */ - #define TARGET_THUMB1_ONLY (TARGET_THUMB1 && !arm_arch_notm) - --#define TARGET_LDRD (arm_arch5e && ARM_DOUBLEWORD_ALIGN \ -+#define TARGET_LDRD (arm_arch6 && ARM_DOUBLEWORD_ALIGN \ - && !TARGET_THUMB1) - - #define TARGET_CRC32 (arm_arch_crc) diff --git a/toolchain-old/gcc/patches/7.1.0/810-arm-softfloat-libgcc.patch b/toolchain-old/gcc/patches/7.1.0/810-arm-softfloat-libgcc.patch deleted file mode 100644 index a437d81511b0e3..00000000000000 --- a/toolchain-old/gcc/patches/7.1.0/810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/libgcc/config/arm/t-linux -+++ b/libgcc/config/arm/t-linux -@@ -1,6 +1,10 @@ - LIB1ASMSRC = arm/lib1funcs.S - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ -- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 -+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ -+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ -+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ -+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ -+ _arm_fixsfsi _arm_fixunssfsi - - # Just for these, we omit the frame pointer since it makes such a big - # difference. ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -58,8 +58,6 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" -- - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ diff --git a/toolchain-old/gcc/patches/7.1.0/820-libgcc_pic.patch b/toolchain-old/gcc/patches/7.1.0/820-libgcc_pic.patch deleted file mode 100644 index cd539d865c1a26..00000000000000 --- a/toolchain-old/gcc/patches/7.1.0/820-libgcc_pic.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/libgcc/Makefile.in -+++ b/libgcc/Makefile.in -@@ -920,11 +920,12 @@ $(libgcov-driver-objects): %$(objext): $ - - # Static libraries. - libgcc.a: $(libgcc-objects) -+libgcc_pic.a: $(libgcc-s-objects) - libgcov.a: $(libgcov-objects) - libunwind.a: $(libunwind-objects) - libgcc_eh.a: $(libgcc-eh-objects) - --libgcc.a libgcov.a libunwind.a libgcc_eh.a: -+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: - -rm -f $@ - - objects="$(objects)"; \ -@@ -945,7 +946,7 @@ all: libunwind.a - endif - - ifeq ($(enable_shared),yes) --all: libgcc_eh.a libgcc_s$(SHLIB_EXT) -+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) - ifneq ($(LIBUNWIND),) - all: libunwind$(SHLIB_EXT) - libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) -@@ -1151,6 +1152,10 @@ install-shared: - chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a - $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a - -+ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ -+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ - $(subst @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) diff --git a/toolchain-old/gcc/patches/7.1.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain-old/gcc/patches/7.1.0/840-armv4_pass_fix-v4bx_to_ld.patch deleted file mode 100644 index 9cae1c9d1c831f..00000000000000 --- a/toolchain-old/gcc/patches/7.1.0/840-armv4_pass_fix-v4bx_to_ld.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -88,10 +88,15 @@ - #define MUSL_DYNAMIC_LINKER \ - "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" - -+/* For armv4 we pass --fix-v4bx to linker to support EABI */ -+#undef TARGET_FIX_V4BX_SPEC -+#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\ -+ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC --#define LINK_SPEC EABI_LINK_SPEC \ -+#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ - LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) - diff --git a/toolchain-old/gcc/patches/7.1.0/850-use_shared_libgcc.patch b/toolchain-old/gcc/patches/7.1.0/850-use_shared_libgcc.patch deleted file mode 100644 index 5d09d6e2d2bed9..00000000000000 --- a/toolchain-old/gcc/patches/7.1.0/850-use_shared_libgcc.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -126,10 +126,6 @@ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \ - LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) - --/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we -- do not use -lfloat. */ --#undef LIBGCC_SPEC -- - /* Clear the instruction cache from `beg' to `end'. This is - implemented in lib1funcs.S, so ensure an error if this definition - is used. */ ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -53,6 +53,10 @@ see the files COPYING3 and COPYING.RUNTI - builtin_assert ("system=posix"); \ - } while (0) - -+#ifndef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" -+#endif -+ - /* Determine which dynamic linker to use depending on whether GLIBC or - uClibc or Bionic or musl is the default C library and whether - -muclibc or -mglibc or -mbionic or -mmusl has been passed to change ---- a/libgcc/mkmap-symver.awk -+++ b/libgcc/mkmap-symver.awk -@@ -136,5 +136,5 @@ function output(lib) { - else if (inherit[lib]) - printf("} %s;\n", inherit[lib]); - else -- printf ("\n local:\n\t*;\n};\n"); -+ printf ("\n\t*;\n};\n"); - } ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -60,6 +60,9 @@ - #undef CPP_OS_DEFAULT_SPEC - #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" - -+#undef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" -+ - #undef LINK_SHLIB_SPEC - #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}" - diff --git a/toolchain-old/gcc/patches/7.1.0/851-libgcc_no_compat.patch b/toolchain-old/gcc/patches/7.1.0/851-libgcc_no_compat.patch deleted file mode 100644 index 80c34768414653..00000000000000 --- a/toolchain-old/gcc/patches/7.1.0/851-libgcc_no_compat.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/libgcc/config/t-libunwind -+++ b/libgcc/config/t-libunwind -@@ -2,8 +2,7 @@ - - HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER - --LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ -- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - - # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/toolchain-old/gcc/patches/7.1.0/870-ppc_no_crtsavres.patch b/toolchain-old/gcc/patches/7.1.0/870-ppc_no_crtsavres.patch deleted file mode 100644 index 332b8b62a66c6a..00000000000000 --- a/toolchain-old/gcc/patches/7.1.0/870-ppc_no_crtsavres.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/rs6000/rs6000.c -+++ b/gcc/config/rs6000/rs6000.c -@@ -26889,7 +26889,7 @@ rs6000_savres_strategy (rs6000_stack_t * - /* Define cutoff for using out-of-line functions to save registers. */ - if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) - { -- if (!optimize_size) -+ if (1) - { - strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; - strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; diff --git a/toolchain-old/gcc/patches/7.1.0/881-no_tm_section.patch b/toolchain-old/gcc/patches/7.1.0/881-no_tm_section.patch deleted file mode 100644 index fab5db3be55cf1..00000000000000 --- a/toolchain-old/gcc/patches/7.1.0/881-no_tm_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgcc/crtstuff.c -+++ b/libgcc/crtstuff.c -@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ - #endif - - #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) --# define USE_TM_CLONE_REGISTRY 1 -+# define USE_TM_CLONE_REGISTRY 0 - #endif - - /* We do not want to add the weak attribute to the declarations of these diff --git a/toolchain-old/gcc/patches/7.1.0/900-bad-mips16-crt.patch b/toolchain-old/gcc/patches/7.1.0/900-bad-mips16-crt.patch deleted file mode 100644 index dd6e9dc889ad07..00000000000000 --- a/toolchain-old/gcc/patches/7.1.0/900-bad-mips16-crt.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/libgcc/config/mips/t-mips16 -+++ b/libgcc/config/mips/t-mips16 -@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16 - - # Version these symbols if building libgcc.so. - SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver -+ -+CRTSTUFF_T_CFLAGS += -mno-mips16 -+CRTSTUFF_T_CFLAGS_S += -mno-mips16 diff --git a/toolchain-old/gcc/patches/7.1.0/910-mbsd_multi.patch b/toolchain-old/gcc/patches/7.1.0/910-mbsd_multi.patch deleted file mode 100644 index 5b664ff2278d0e..00000000000000 --- a/toolchain-old/gcc/patches/7.1.0/910-mbsd_multi.patch +++ /dev/null @@ -1,140 +0,0 @@ - - This patch brings over a feature from MirBSD: - * -fhonour-copts - If this option is not given, it's warned (depending - on environment variables). This is to catch errors - of misbuilt packages which override CFLAGS themselves. - - This patch was authored by Thorsten Glaser - with copyright assignment to the FSF in effect. - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -108,6 +108,9 @@ static int class_dump_flags; - /* Whether any standard preincluded header has been preincluded. */ - static bool done_preinclude; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); - static void set_std_cxx11 (int); -@@ -456,6 +459,12 @@ c_common_handle_option (size_t scode, co - flag_no_builtin = !value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fconstant_string_class_: - constant_string_class_name = arg; - break; -@@ -1084,6 +1093,47 @@ c_common_init (void) - return false; - } - -+ if (c_language == clk_c) { -+ char *ev = getenv ("GCC_HONOUR_COPTS"); -+ int evv; -+ if (ev == NULL) -+ evv = -1; -+ else if ((*ev == '0') || (*ev == '\0')) -+ evv = 0; -+ else if (*ev == '1') -+ evv = 1; -+ else if (*ev == '2') -+ evv = 2; -+ else if (*ev == 's') -+ evv = -1; -+ else { -+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); -+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ -+ } -+ if (evv == 1) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in lenient mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ warning (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } else if (evv == 2) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in strict mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ error ("someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ return false; -+ } -+ } else if (evv == 0) { -+ if (honour_copts != 1) -+ inform (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } -+ - return true; - } - ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1412,6 +1412,9 @@ C++ ObjC++ Optimization Alias(fexception - fhonor-std - C++ ObjC++ Ignore Warn(switch %qs is no longer supported) - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment. ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -1510,6 +1510,9 @@ fguess-branch-probability - Common Report Var(flag_guess_branch_prob) Optimization - Enable guessing of branch probabilities. - -+fhonour-copts -+Common RejectNegative -+ - ; Nonzero means ignore `#ident' directives. 0 means handle them. - ; Generate position-independent code for executables if possible - ; On SVR4 targets, it also controls whether or not to emit a ---- a/gcc/opts.c -+++ b/gcc/opts.c -@@ -1921,6 +1921,9 @@ common_handle_option (struct gcc_options - opts, opts_set, loc, dc); - break; - -+ case OPT_fhonour_copts: -+ break; -+ - case OPT_Wlarger_than_: - opts->x_larger_than_size = value; - opts->x_warn_larger_than = value != -1; ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -6565,6 +6565,17 @@ This option is only supported for C and - @option{-Wall} and by @option{-Wpedantic}, which can be disabled with - @option{-Wno-pointer-sign}. - -+@item -fhonour-copts -+@opindex fhonour-copts -+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not -+given at least once, and warn if it is given more than once. -+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not -+given exactly once. -+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option -+is not given exactly once. -+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. -+This flag and environment variable only affect the C language. -+ - @item -Wstack-protector - @opindex Wstack-protector - @opindex Wno-stack-protector - diff --git a/toolchain-old/gcc/patches/7.1.0/920-specs_nonfatal_getenv.patch b/toolchain-old/gcc/patches/7.1.0/920-specs_nonfatal_getenv.patch deleted file mode 100644 index 56dbe33c394515..00000000000000 --- a/toolchain-old/gcc/patches/7.1.0/920-specs_nonfatal_getenv.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -9277,8 +9277,10 @@ getenv_spec_function (int argc, const ch - value = varname; - - if (!value) -- fatal_error (input_location, -- "environment variable %qs not defined", varname); -+ { -+ warning (input_location, "environment variable %qs not defined", varname); -+ value = ""; -+ } - - /* We have to escape every character of the environment variable so - they are not interpreted as active spec characters. A diff --git a/toolchain-old/gcc/patches/7.1.0/930-fix-mips-noexecstack.patch b/toolchain-old/gcc/patches/7.1.0/930-fix-mips-noexecstack.patch deleted file mode 100644 index 90d10f11e40d47..00000000000000 --- a/toolchain-old/gcc/patches/7.1.0/930-fix-mips-noexecstack.patch +++ /dev/null @@ -1,111 +0,0 @@ -From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001 -From: Andrew McDonnell -Date: Fri, 3 Oct 2014 19:09:00 +0930 -Subject: Add .note.GNU-stack section - -See http://lists.busybox.net/pipermail/uclibc/2014-October/048671.html -Below copied from https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02430.html - -Re: [Patch, MIPS] Add .note.GNU-stack section - - From: Steve Ellcey - -On Wed, 2014-09-10 at 10:15 -0700, Eric Christopher wrote: -> -> -> On Wed, Sep 10, 2014 at 9:27 AM, wrote: - -> This works except you did not update the assembly files in -> libgcc or glibc. We (Cavium) have the same patch in our tree -> for a few released versions. - -> Mind just checking yours in then Andrew? - -> Thanks! -> -eric - -I talked to Andrew about what files he changed in GCC and created and -tested this new patch. Andrew also mentioned changing some assembly -files in glibc but I don't see any use of '.section .note.GNU-stack' in -any assembly files in glibc (for any platform) so I wasn't planning on -creating a glibc to add them to mips glibc assembly language files. - -OK to check in this patch? - -Steve Ellcey -sellcey@mips.com - - - -2014-09-26 Steve Ellcey ---- - gcc/config/mips/mips.c | 3 +++ - libgcc/config/mips/crti.S | 4 ++++ - libgcc/config/mips/crtn.S | 3 +++ - libgcc/config/mips/mips16.S | 4 ++++ - libgcc/config/mips/vr4120-div.S | 4 ++++ - 5 files changed, 18 insertions(+) - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -22561,6 +22561,9 @@ mips_promote_function_mode (const_tree t - #undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS - #define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 2 - -+#undef TARGET_ASM_FILE_END -+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack -+ - struct gcc_target targetm = TARGET_INITIALIZER; - - #include "gt-mips.h" ---- a/libgcc/config/mips/crti.S -+++ b/libgcc/config/mips/crti.S -@@ -21,6 +21,10 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+ -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/crtn.S -+++ b/libgcc/config/mips/crtn.S -@@ -21,6 +21,9 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/mips16.S -+++ b/libgcc/config/mips/mips16.S -@@ -48,6 +48,10 @@ see the files COPYING3 and COPYING.RUNTI - values using the soft-float calling convention, but do the actual - operation using the hard floating point instructions. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - #if defined _MIPS_SIM && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64) - - /* This file contains 32-bit assembly code. */ ---- a/libgcc/config/mips/vr4120-div.S -+++ b/libgcc/config/mips/vr4120-div.S -@@ -26,6 +26,10 @@ see the files COPYING3 and COPYING.RUNTI - -mfix-vr4120. div and ddiv do not give the correct result when one - of the operands is negative. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - .set nomips16 - - #define DIV \ diff --git a/toolchain-old/gcc/patches/7.1.0/940-no-clobber-stamp-bits.patch b/toolchain-old/gcc/patches/7.1.0/940-no-clobber-stamp-bits.patch deleted file mode 100644 index 9e5e59970e57da..00000000000000 --- a/toolchain-old/gcc/patches/7.1.0/940-no-clobber-stamp-bits.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libstdc++-v3/include/Makefile.in -+++ b/libstdc++-v3/include/Makefile.in -@@ -1475,7 +1475,7 @@ stamp-bits: ${bits_headers} - @$(STAMP) stamp-bits - - stamp-bits-sup: stamp-bits ${bits_sup_headers} -- @-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null -+ @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null - @$(STAMP) stamp-bits-sup - - stamp-c_base: ${c_base_headers} diff --git a/toolchain-old/gcc/patches/7.1.0/950-cpp_file_path_translation.patch b/toolchain-old/gcc/patches/7.1.0/950-cpp_file_path_translation.patch deleted file mode 100644 index ac85c1d6aaf51c..00000000000000 --- a/toolchain-old/gcc/patches/7.1.0/950-cpp_file_path_translation.patch +++ /dev/null @@ -1,171 +0,0 @@ -Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47047 - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -588,6 +588,10 @@ c_common_handle_option (size_t scode, co - add_path (xstrdup (arg), SYSTEM, 0, true); - break; - -+ case OPT_iremap: -+ add_cpp_remap_path (arg); -+ break; -+ - case OPT_iwithprefix: - add_prefixed_path (arg, SYSTEM); - break; ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1825,6 +1825,10 @@ iquote - C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) - -iquote Add to the end of the quote include path. - -+iremap -+C ObjC C++ ObjC++ Joined Separate -+-iremap Convert to if it occurs as prefix in __FILE__. -+ - iwithprefix - C ObjC C++ ObjC++ Joined Separate - -iwithprefix Add to the end of the system include path. ---- a/gcc/doc/cpp.texi -+++ b/gcc/doc/cpp.texi -@@ -4272,6 +4272,7 @@ Refer to the GCC manual for full documen - @c man begin SYNOPSIS - cpp [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}] - [@option{-I}@var{dir}@dots{}] [@option{-iquote}@var{dir}@dots{}] -+ [@option{-iremap}@var{src}:@var{dst}] - [@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}] - [@option{-MP}] [@option{-MQ} @var{target}@dots{}] - [@option{-MT} @var{target}@dots{}] ---- a/gcc/doc/cppopts.texi -+++ b/gcc/doc/cppopts.texi -@@ -220,6 +220,12 @@ extensions @samp{.i}, @samp{.ii} or @sam - extensions that GCC uses for preprocessed files created by - @option{-save-temps}. - -+@item -iremap @var{src}:@var{dst} -+@opindex iremap -+Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. -+This option can be specified more than once. Processing stops at the first -+match. -+ - @item -fdirectives-only - @opindex fdirectives-only - When preprocessing, handle directives, but do not expand macros. ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -11861,6 +11861,12 @@ by @option{-fplugin=@var{name}} instead - @option{-fplugin=@var{path}/@var{name}.so}. This option is not meant - to be used by the user, but only passed by the driver. - -+@item -iremap @var{src}:@var{dst} -+@opindex iremap -+Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. -+This option can be specified more than once. Processing stops at the first -+match. -+ - @item -L@var{dir} - @opindex L - Add directory @var{dir} to the list of directories to be searched ---- a/libcpp/include/cpplib.h -+++ b/libcpp/include/cpplib.h -@@ -820,6 +820,9 @@ extern void cpp_set_lang (cpp_reader *, - /* Set the include paths. */ - extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int); - -+/* Provide src:dst pair for __FILE__ remapping. */ -+extern void add_cpp_remap_path (const char *); -+ - /* Call these to get pointers to the options, callback, and deps - structures for a given reader. These pointers are good until you - call cpp_finish on that reader. You can either edit the callbacks ---- a/libcpp/macro.c -+++ b/libcpp/macro.c -@@ -227,6 +227,64 @@ static const char * const monthnames[] = - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" - }; - -+static size_t remap_pairs; -+static char **remap_src; -+static char **remap_dst; -+ -+void -+add_cpp_remap_path (const char *arg) -+{ -+ const char *arg_dst; -+ size_t len; -+ -+ arg_dst = strchr(arg, ':'); -+ if (arg_dst == NULL) -+ { -+ fprintf(stderr, "Invalid argument for -iremap\n"); -+ exit(1); -+ } -+ -+ len = arg_dst - arg; -+ ++arg_dst; -+ -+ remap_src = (char **) xrealloc(remap_src, sizeof(char *) * (remap_pairs + 1)); -+ remap_dst = (char **) xrealloc(remap_dst, sizeof(char *) * (remap_pairs + 1)); -+ -+ remap_src[remap_pairs] = (char *) xmalloc(len + 1); -+ memcpy(remap_src[remap_pairs], arg, len); -+ remap_src[remap_pairs][len] = '\0'; -+ remap_dst[remap_pairs] = xstrdup(arg_dst); -+ ++remap_pairs; -+} -+ -+static const char * -+cpp_remap_file (const char *arg, char **tmp_name) -+{ -+ char *result; -+ size_t i, len; -+ -+ for (i = 0; i < remap_pairs; ++i) -+ { -+ len = strlen (remap_src[i]); -+ if (strncmp (remap_src[i], arg, len)) -+ continue; -+ if (arg[len] == '\0') -+ return xstrdup (remap_dst[i]); -+ if (arg[len] != '/') -+ continue; -+ arg += len; -+ len = strlen (remap_dst[i]); -+ result = (char *) xmalloc (len + strlen (arg) + 1); -+ memcpy(result, remap_dst[i], len); -+ strcpy(result + len, arg); -+ *tmp_name = result; -+ -+ return result; -+ } -+ -+ return arg; -+} -+ - /* Helper function for builtin_macro. Returns the text generated by - a builtin macro. */ - const uchar * -@@ -290,6 +348,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - { - unsigned int len; - const char *name; -+ char *tmp_name = NULL; - uchar *buf; - - if (node->value.builtin == BT_FILE) -@@ -301,6 +360,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - if (!name) - abort (); - } -+ name = cpp_remap_file (name, &tmp_name); - len = strlen (name); - buf = _cpp_unaligned_alloc (pfile, len * 2 + 3); - result = buf; -@@ -308,6 +368,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - buf = cpp_quote_string (buf + 1, (const unsigned char *) name, len); - *buf++ = '"'; - *buf = '\0'; -+ free (tmp_name); - } - break; - diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/001-revert_register_mode_search.patch b/toolchain-old/gcc/patches/arc-2017.03-release/001-revert_register_mode_search.patch deleted file mode 100644 index bd6fbdb4a9dcb0..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/001-revert_register_mode_search.patch +++ /dev/null @@ -1,65 +0,0 @@ -Revert of: - -commit 275035b56823b26d5fb7e90fad945b998648edf2 -Author: bergner -Date: Thu Sep 5 14:09:07 2013 +0000 - - PR target/58139 - * reginfo.c (choose_hard_reg_mode): Scan through all mode classes - looking for widest mode. - - - git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202286 138bc75d-0d04-0410-961f-82ee72b054a4 - - ---- a/gcc/reginfo.c -+++ b/gcc/reginfo.c -@@ -625,35 +625,40 @@ choose_hard_reg_mode (unsigned int regno - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - - if (found_mode != VOIDmode) diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/002-case_insensitive.patch b/toolchain-old/gcc/patches/arc-2017.03-release/002-case_insensitive.patch deleted file mode 100644 index b3d2dbe291f5a5..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/002-case_insensitive.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/include/filenames.h -+++ b/include/filenames.h -@@ -43,11 +43,6 @@ extern "C" { - # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) - #else /* not DOSish */ --# if defined(__APPLE__) --# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM --# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 --# endif --# endif /* __APPLE__ */ - # define HAS_DRIVE_SPEC(f) (0) - # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/010-documentation.patch b/toolchain-old/gcc/patches/arc-2017.03-release/010-documentation.patch deleted file mode 100644 index 2adb28c83ded42..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/010-documentation.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -3021,18 +3021,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) - doc/gccint.info: $(TEXI_GCCINT_FILES) - doc/cppinternals.info: $(TEXI_CPPINT_FILES) - --doc/%.info: %.texi -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/%.info: - - # Duplicate entry to handle renaming of gccinstall.info --doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/gccinstall.info: - - doc/cpp.dvi: $(TEXI_CPP_FILES) - doc/gcc.dvi: $(TEXI_GCC_FILES) diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/230-musl_libssp.patch b/toolchain-old/gcc/patches/arc-2017.03-release/230-musl_libssp.patch deleted file mode 100644 index 8dfd1fc28747b3..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/230-musl_libssp.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -858,7 +858,9 @@ proper position among the other output f - #endif - - #ifndef LINK_SSP_SPEC --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if DEFAULT_LIBC == LIBC_MUSL -+#define LINK_SSP_SPEC "-lssp_nonshared" -+#elif defined(TARGET_LIBC_PROVIDES_SSP) - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit:}" - #else diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/280-musl-disable-ifunc-by-default.patch b/toolchain-old/gcc/patches/arc-2017.03-release/280-musl-disable-ifunc-by-default.patch deleted file mode 100644 index df09e4f6366317..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/280-musl-disable-ifunc-by-default.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 450fb05e2a7510d37744f044009f8237d902f65c Mon Sep 17 00:00:00 2001 -From: nsz -Date: Tue, 30 Aug 2016 10:26:22 +0000 -Subject: [PATCH] disable ifunc on *-musl by default - -gcc/ - * config.gcc (*-*-*musl*): Disable gnu-indirect-function. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239859 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - gcc/ChangeLog | 4 ++++ - gcc/config.gcc | 4 ++-- - 2 files changed, 6 insertions(+), 2 deletions(-) - ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -1495,7 +1495,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfree - extra_options="${extra_options} linux-android.opt" - # Assume modern glibc if not targeting Android nor uclibc. - case ${target} in -- *-*-*android*|*-*-*uclibc*) -+ *-*-*android*|*-*-*uclibc*|*-*-*musl*) - ;; - *) - default_gnu_indirect_function=yes -@@ -1564,7 +1564,7 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu - extra_options="${extra_options} linux-android.opt" - # Assume modern glibc if not targeting Android nor uclibc. - case ${target} in -- *-*-*android*|*-*-*uclibc*) -+ *-*-*android*|*-*-*uclibc*|*-*-*musl*) - ;; - *) - default_gnu_indirect_function=yes diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain-old/gcc/patches/arc-2017.03-release/300-mips_Os_cpu_rtx_cost_model.patch deleted file mode 100644 index d76bd8cb1dcb49..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/300-mips_Os_cpu_rtx_cost_model.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -17928,7 +17928,7 @@ mips_option_override (void) - flag_pcc_struct_return = 0; - - /* Decide which rtx_costs structure to use. */ -- if (optimize_size) -+ if (0 && optimize_size) - mips_cost = &mips_rtx_cost_optimize_size; - else - mips_cost = &mips_rtx_cost_data[mips_tune]; diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/800-arm_v5te_no_ldrd_strd.patch b/toolchain-old/gcc/patches/arc-2017.03-release/800-arm_v5te_no_ldrd_strd.patch deleted file mode 100644 index 2e7c23f85137a7..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/800-arm_v5te_no_ldrd_strd.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/arm/arm.h -+++ b/gcc/config/arm/arm.h -@@ -166,7 +166,7 @@ extern void (*arm_lang_output_object_att - /* Thumb-1 only. */ - #define TARGET_THUMB1_ONLY (TARGET_THUMB1 && !arm_arch_notm) - --#define TARGET_LDRD (arm_arch5e && ARM_DOUBLEWORD_ALIGN \ -+#define TARGET_LDRD (arm_arch6 && ARM_DOUBLEWORD_ALIGN \ - && !TARGET_THUMB1) - - #define TARGET_CRC32 (arm_arch_crc) diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/810-arm-softfloat-libgcc.patch b/toolchain-old/gcc/patches/arc-2017.03-release/810-arm-softfloat-libgcc.patch deleted file mode 100644 index 1d06f5b2ec03a0..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/libgcc/config/arm/t-linux -+++ b/libgcc/config/arm/t-linux -@@ -1,6 +1,10 @@ - LIB1ASMSRC = arm/lib1funcs.S - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ -- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 -+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ -+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ -+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ -+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ -+ _arm_fixsfsi _arm_fixunssfsi - - # Just for these, we omit the frame pointer since it makes such a big - # difference. ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -60,8 +60,6 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" -- - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/820-libgcc_pic.patch b/toolchain-old/gcc/patches/arc-2017.03-release/820-libgcc_pic.patch deleted file mode 100644 index f925d96f66f64a..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/820-libgcc_pic.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/libgcc/Makefile.in -+++ b/libgcc/Makefile.in -@@ -888,11 +888,12 @@ $(libgcov-driver-objects): %$(objext): $ - - # Static libraries. - libgcc.a: $(libgcc-objects) -+libgcc_pic.a: $(libgcc-s-objects) - libgcov.a: $(libgcov-objects) - libunwind.a: $(libunwind-objects) - libgcc_eh.a: $(libgcc-eh-objects) - --libgcc.a libgcov.a libunwind.a libgcc_eh.a: -+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: - -rm -f $@ - - objects="$(objects)"; \ -@@ -913,7 +914,7 @@ all: libunwind.a - endif - - ifeq ($(enable_shared),yes) --all: libgcc_eh.a libgcc_s$(SHLIB_EXT) -+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) - ifneq ($(LIBUNWIND),) - all: libunwind$(SHLIB_EXT) - libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) -@@ -1115,6 +1116,10 @@ install-shared: - chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a - $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a - -+ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ -+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ - $(subst @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/830-arm_unbreak_armv4t.patch b/toolchain-old/gcc/patches/arc-2017.03-release/830-arm_unbreak_armv4t.patch deleted file mode 100644 index 37f8f2a54de669..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/830-arm_unbreak_armv4t.patch +++ /dev/null @@ -1,13 +0,0 @@ -http://sourceware.org/ml/crossgcc/2008-05/msg00009.html - ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -45,7 +45,7 @@ - The ARM10TDMI core is the default for armv5t, so set - SUBTARGET_CPU_DEFAULT to achieve this. */ - #undef SUBTARGET_CPU_DEFAULT --#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi -+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi - - /* TARGET_BIG_ENDIAN_DEFAULT is set in - config.gcc for big endian configurations. */ diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain-old/gcc/patches/arc-2017.03-release/840-armv4_pass_fix-v4bx_to_ld.patch deleted file mode 100644 index cb1fb982356a1b..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/840-armv4_pass_fix-v4bx_to_ld.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -94,10 +94,15 @@ - #define MUSL_DYNAMIC_LINKER \ - "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" - -+/* For armv4 we pass --fix-v4bx to linker to support EABI */ -+#undef TARGET_FIX_V4BX_SPEC -+#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\ -+ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC --#define LINK_SPEC EABI_LINK_SPEC \ -+#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ - LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) - diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/850-use_shared_libgcc.patch b/toolchain-old/gcc/patches/arc-2017.03-release/850-use_shared_libgcc.patch deleted file mode 100644 index cd20244c690f54..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/850-use_shared_libgcc.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -132,10 +132,6 @@ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \ - LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) - --/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we -- do not use -lfloat. */ --#undef LIBGCC_SPEC -- - /* Clear the instruction cache from `beg' to `end'. This is - implemented in lib1funcs.S, so ensure an error if this definition - is used. */ ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -53,6 +53,10 @@ see the files COPYING3 and COPYING.RUNTI - builtin_assert ("system=posix"); \ - } while (0) - -+#ifndef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" -+#endif -+ - /* Determine which dynamic linker to use depending on whether GLIBC or - uClibc or Bionic or musl is the default C library and whether - -muclibc or -mglibc or -mbionic or -mmusl has been passed to change ---- a/libgcc/mkmap-symver.awk -+++ b/libgcc/mkmap-symver.awk -@@ -132,5 +132,5 @@ function output(lib) { - else if (inherit[lib]) - printf("} %s;\n", inherit[lib]); - else -- printf ("\n local:\n\t*;\n};\n"); -+ printf ("\n\t*;\n};\n"); - } ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -60,6 +60,9 @@ - #undef CPP_OS_DEFAULT_SPEC - #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" - -+#undef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" -+ - #undef LINK_SHLIB_SPEC - #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}" - diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/851-libgcc_no_compat.patch b/toolchain-old/gcc/patches/arc-2017.03-release/851-libgcc_no_compat.patch deleted file mode 100644 index 80c34768414653..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/851-libgcc_no_compat.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/libgcc/config/t-libunwind -+++ b/libgcc/config/t-libunwind -@@ -2,8 +2,7 @@ - - HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER - --LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ -- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - - # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/870-ppc_no_crtsavres.patch b/toolchain-old/gcc/patches/arc-2017.03-release/870-ppc_no_crtsavres.patch deleted file mode 100644 index 9e543a0fc20150..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/870-ppc_no_crtsavres.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/rs6000/rs6000.c -+++ b/gcc/config/rs6000/rs6000.c -@@ -24171,7 +24171,7 @@ rs6000_savres_strategy (rs6000_stack_t * - /* Define cutoff for using out-of-line functions to save registers. */ - if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) - { -- if (!optimize_size) -+ if (1) - { - strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; - strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/880-no_java_section.patch b/toolchain-old/gcc/patches/arc-2017.03-release/880-no_java_section.patch deleted file mode 100644 index 0fa9e627c2a0b4..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/880-no_java_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/defaults.h -+++ b/gcc/defaults.h -@@ -395,7 +395,7 @@ see the files COPYING3 and COPYING.RUNTI - /* If we have named section and we support weak symbols, then use the - .jcr section for recording java classes which need to be registered - at program start-up time. */ --#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK -+#if 0 && defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK - #ifndef JCR_SECTION_NAME - #define JCR_SECTION_NAME ".jcr" - #endif diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/881-no_tm_section.patch b/toolchain-old/gcc/patches/arc-2017.03-release/881-no_tm_section.patch deleted file mode 100644 index fab5db3be55cf1..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/881-no_tm_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgcc/crtstuff.c -+++ b/libgcc/crtstuff.c -@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ - #endif - - #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) --# define USE_TM_CLONE_REGISTRY 1 -+# define USE_TM_CLONE_REGISTRY 0 - #endif - - /* We do not want to add the weak attribute to the declarations of these diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/900-bad-mips16-crt.patch b/toolchain-old/gcc/patches/arc-2017.03-release/900-bad-mips16-crt.patch deleted file mode 100644 index dd6e9dc889ad07..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/900-bad-mips16-crt.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/libgcc/config/mips/t-mips16 -+++ b/libgcc/config/mips/t-mips16 -@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16 - - # Version these symbols if building libgcc.so. - SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver -+ -+CRTSTUFF_T_CFLAGS += -mno-mips16 -+CRTSTUFF_T_CFLAGS_S += -mno-mips16 diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/910-mbsd_multi.patch b/toolchain-old/gcc/patches/arc-2017.03-release/910-mbsd_multi.patch deleted file mode 100644 index 62203dfcf6aa9e..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/910-mbsd_multi.patch +++ /dev/null @@ -1,222 +0,0 @@ - - This patch brings over a few features from MirBSD: - * -fhonour-copts - If this option is not given, it's warned (depending - on environment variables). This is to catch errors - of misbuilt packages which override CFLAGS themselves. - * -Werror-maybe-reset - Has the effect of -Wno-error if GCC_NO_WERROR is - set and not '0', a no-operation otherwise. This is - to be able to use -Werror in "make" but prevent - GNU autoconf generated configure scripts from - freaking out. - - This patch was authored by Thorsten Glaser - with copyright assignment to the FSF in effect. - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -107,6 +107,9 @@ static int class_dump_flags; - /* Whether any standard preincluded header has been preincluded. */ - static bool done_preinclude; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); - static void set_std_cxx11 (int); -@@ -442,6 +445,12 @@ c_common_handle_option (size_t scode, co - flag_no_builtin = !value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fconstant_string_class_: - constant_string_class_name = arg; - break; -@@ -1041,6 +1050,47 @@ c_common_init (void) - return false; - } - -+ if (c_language == clk_c) { -+ char *ev = getenv ("GCC_HONOUR_COPTS"); -+ int evv; -+ if (ev == NULL) -+ evv = -1; -+ else if ((*ev == '0') || (*ev == '\0')) -+ evv = 0; -+ else if (*ev == '1') -+ evv = 1; -+ else if (*ev == '2') -+ evv = 2; -+ else if (*ev == 's') -+ evv = -1; -+ else { -+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); -+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ -+ } -+ if (evv == 1) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in lenient mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ warning (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } else if (evv == 2) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in strict mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ error ("someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ return false; -+ } -+ } else if (evv == 0) { -+ if (honour_copts != 1) -+ inform (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } -+ - return true; - } - ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -438,6 +438,10 @@ Wfloat-conversion - C ObjC C++ ObjC++ Var(warn_float_conversion) Warning LangEnabledBy(C ObjC C++ ObjC++,Wconversion) - Warn for implicit type conversions that cause loss of floating point precision. - -+Werror-maybe-reset -+C ObjC C++ ObjC++ -+; Documented in common.opt -+ - Wfloat-equal - C ObjC C++ ObjC++ Var(warn_float_equal) Warning - Warn if testing floating point numbers for equality. -@@ -1252,6 +1256,9 @@ C++ ObjC++ Optimization Alias(fexception - fhonor-std - C++ ObjC++ Ignore Warn(switch %qs is no longer supported) - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment. ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -581,6 +581,10 @@ Werror= - Common Joined - Treat specified warning as error. - -+Werror-maybe-reset -+Common -+If environment variable GCC_NO_WERROR is set, act as -Wno-error -+ - Wextra - Common Var(extra_warnings) Warning - Print extra (possibly unwanted) warnings. -@@ -1432,6 +1436,9 @@ fguess-branch-probability - Common Report Var(flag_guess_branch_prob) Optimization - Enable guessing of branch probabilities. - -+fhonour-copts -+Common RejectNegative -+ - ; Nonzero means ignore `#ident' directives. 0 means handle them. - ; Generate position-independent code for executables if possible - ; On SVR4 targets, it also controls whether or not to emit a ---- a/gcc/opts.c -+++ b/gcc/opts.c -@@ -1783,6 +1783,17 @@ common_handle_option (struct gcc_options - opts, opts_set, loc, dc); - break; - -+ case OPT_Werror_maybe_reset: -+ { -+ char *ev = getenv ("GCC_NO_WERROR"); -+ if ((ev != NULL) && (*ev != '0')) -+ warnings_are_errors = 0; -+ } -+ break; -+ -+ case OPT_fhonour_copts: -+ break; -+ - case OPT_Wlarger_than_: - opts->x_larger_than_size = value; - opts->x_warn_larger_than = value != -1; ---- a/gcc/doc/cppopts.texi -+++ b/gcc/doc/cppopts.texi -@@ -163,6 +163,11 @@ in older programs. This warning is on b - Make all warnings into hard errors. Source code which triggers warnings - will be rejected. - -+ at item -Werror-maybe-reset -+ at opindex Werror-maybe-reset -+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment -+variable is set to anything other than 0 or empty. -+ - @item -Wsystem-headers - @opindex Wsystem-headers - Issue warnings for code in system headers. These are normally unhelpful ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -263,7 +263,7 @@ Objective-C and Objective-C++ Dialects}. - -Wno-discarded-qualifiers -Wno-discarded-array-qualifiers @gol - -Wno-div-by-zero -Wdouble-promotion -Wduplicated-cond @gol - -Wempty-body -Wenum-compare -Wno-endif-labels @gol ---Werror -Werror=* -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol -+-Werror -Werror=* -Werror-maybe-reset -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol - -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol - -Wformat-security -Wformat-signedness -Wformat-y2k -Wframe-address @gol - -Wframe-larger-than=@var{len} -Wno-free-nonheap-object -Wjump-misses-init @gol -@@ -5737,6 +5737,22 @@ This option is only supported for C and - @option{-Wall} and by @option{-Wpedantic}, which can be disabled with - @option{-Wno-pointer-sign}. - -+ at item -Werror-maybe-reset -+ at opindex Werror-maybe-reset -+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment -+variable is set to anything other than 0 or empty. -+ -+ at item -fhonour-copts -+ at opindex fhonour-copts -+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not -+given at least once, and warn if it is given more than once. -+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not -+given exactly once. -+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option -+is not given exactly once. -+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. -+This flag and environment variable only affect the C language. -+ - @item -Wstack-protector - @opindex Wstack-protector - @opindex Wno-stack-protector -@@ -6605,7 +6621,7 @@ so, the first branch is redirected to ei - second branch or a point immediately following it, depending on whether - the condition is known to be true or false. - --Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -+Enabled at levels @option{-O3}. - - @item -fsplit-wide-types - @opindex fsplit-wide-types ---- a/gcc/java/jvspec.c -+++ b/gcc/java/jvspec.c -@@ -629,6 +629,7 @@ lang_specific_pre_link (void) - class name. Append dummy `.c' that can be stripped by set_input so %b - is correct. */ - set_input (concat (main_class_name, "main.c", NULL)); -+ putenv ("GCC_HONOUR_COPTS=s"); /* XXX hack! */ - err = do_spec (jvgenmain_spec); - if (err == 0) - { diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/920-specs_nonfatal_getenv.patch b/toolchain-old/gcc/patches/arc-2017.03-release/920-specs_nonfatal_getenv.patch deleted file mode 100644 index dc0acb95a8e748..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/920-specs_nonfatal_getenv.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -9198,8 +9198,10 @@ getenv_spec_function (int argc, const ch - value = varname; - - if (!value) -- fatal_error (input_location, -- "environment variable %qs not defined", varname); -+ { -+ warning (input_location, "environment variable %qs not defined", varname); -+ value = ""; -+ } - - /* We have to escape every character of the environment variable so - they are not interpreted as active spec characters. A diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/930-fix-mips-noexecstack.patch b/toolchain-old/gcc/patches/arc-2017.03-release/930-fix-mips-noexecstack.patch deleted file mode 100644 index 2a99840b636a49..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/930-fix-mips-noexecstack.patch +++ /dev/null @@ -1,111 +0,0 @@ -From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001 -From: Andrew McDonnell -Date: Fri, 3 Oct 2014 19:09:00 +0930 -Subject: Add .note.GNU-stack section - -See http://lists.busybox.net/pipermail/uclibc/2014-October/048671.html -Below copied from https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02430.html - -Re: [Patch, MIPS] Add .note.GNU-stack section - - From: Steve Ellcey - -On Wed, 2014-09-10 at 10:15 -0700, Eric Christopher wrote: -> -> -> On Wed, Sep 10, 2014 at 9:27 AM, wrote: - -> This works except you did not update the assembly files in -> libgcc or glibc. We (Cavium) have the same patch in our tree -> for a few released versions. - -> Mind just checking yours in then Andrew? - -> Thanks! -> -eric - -I talked to Andrew about what files he changed in GCC and created and -tested this new patch. Andrew also mentioned changing some assembly -files in glibc but I don't see any use of '.section .note.GNU-stack' in -any assembly files in glibc (for any platform) so I wasn't planning on -creating a glibc to add them to mips glibc assembly language files. - -OK to check in this patch? - -Steve Ellcey -sellcey@mips.com - - - -2014-09-26 Steve Ellcey ---- - gcc/config/mips/mips.c | 3 +++ - libgcc/config/mips/crti.S | 4 ++++ - libgcc/config/mips/crtn.S | 3 +++ - libgcc/config/mips/mips16.S | 4 ++++ - libgcc/config/mips/vr4120-div.S | 4 ++++ - 5 files changed, 18 insertions(+) - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -20228,6 +20228,9 @@ mips_promote_function_mode (const_tree t - #undef TARGET_HARD_REGNO_SCRATCH_OK - #define TARGET_HARD_REGNO_SCRATCH_OK mips_hard_regno_scratch_ok - -+#undef TARGET_ASM_FILE_END -+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack -+ - struct gcc_target targetm = TARGET_INITIALIZER; - - #include "gt-mips.h" ---- a/libgcc/config/mips/crti.S -+++ b/libgcc/config/mips/crti.S -@@ -21,6 +21,10 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+ -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/crtn.S -+++ b/libgcc/config/mips/crtn.S -@@ -21,6 +21,9 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/mips16.S -+++ b/libgcc/config/mips/mips16.S -@@ -48,6 +48,10 @@ see the files COPYING3 and COPYING.RUNTI - values using the soft-float calling convention, but do the actual - operation using the hard floating point instructions. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - #if defined _MIPS_SIM && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64) - - /* This file contains 32-bit assembly code. */ ---- a/libgcc/config/mips/vr4120-div.S -+++ b/libgcc/config/mips/vr4120-div.S -@@ -26,6 +26,10 @@ see the files COPYING3 and COPYING.RUNTI - -mfix-vr4120. div and ddiv do not give the correct result when one - of the operands is negative. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - .set nomips16 - - #define DIV \ diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/940-no-clobber-stamp-bits.patch b/toolchain-old/gcc/patches/arc-2017.03-release/940-no-clobber-stamp-bits.patch deleted file mode 100644 index 68e62865b1269c..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/940-no-clobber-stamp-bits.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libstdc++-v3/include/Makefile.in -+++ b/libstdc++-v3/include/Makefile.in -@@ -1459,7 +1459,7 @@ stamp-bits: ${bits_headers} - @$(STAMP) stamp-bits - - stamp-bits-sup: stamp-bits ${bits_sup_headers} -- @-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null -+ @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null - @$(STAMP) stamp-bits-sup - - stamp-c_base: ${c_base_headers} diff --git a/toolchain-old/gcc/patches/arc-2017.03-release/950-cpp_file_path_translation.patch b/toolchain-old/gcc/patches/arc-2017.03-release/950-cpp_file_path_translation.patch deleted file mode 100644 index d467eb7c9a1ef6..00000000000000 --- a/toolchain-old/gcc/patches/arc-2017.03-release/950-cpp_file_path_translation.patch +++ /dev/null @@ -1,182 +0,0 @@ -Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47047 - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -574,6 +574,10 @@ c_common_handle_option (size_t scode, co - add_path (xstrdup (arg), SYSTEM, 0, true); - break; - -+ case OPT_iremap: -+ add_cpp_remap_path (arg); -+ break; -+ - case OPT_iwithprefix: - add_prefixed_path (arg, SYSTEM); - break; ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1632,6 +1632,10 @@ iquote - C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) - -iquote Add to the end of the quote include path. - -+iremap -+C ObjC C++ ObjC++ Joined Separate -+-iremap Convert to if it occurs as prefix in __FILE__. -+ - iwithprefix - C ObjC C++ ObjC++ Joined Separate - -iwithprefix Add to the end of the system include path. ---- a/gcc/doc/cpp.texi -+++ b/gcc/doc/cpp.texi -@@ -4444,6 +4444,7 @@ without notice. - @c man begin SYNOPSIS - cpp [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}] - [@option{-I}@var{dir}@dots{}] [@option{-iquote}@var{dir}@dots{}] -+ [@option{-iremap}@var{src}:@var{dst}] - [@option{-W}@var{warn}@dots{}] - [@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}] - [@option{-MP}] [@option{-MQ} @var{target}@dots{}] ---- a/gcc/doc/cppopts.texi -+++ b/gcc/doc/cppopts.texi -@@ -532,6 +532,12 @@ Search @var{dir} only for header files r - If @var{dir} begins with @code{=}, then the @code{=} will be replaced - by the sysroot prefix; see @option{--sysroot} and @option{-isysroot}. - -+@item -iremap @var{src}:@var{dst} -+@opindex iremap -+Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. -+This option can be specified more than once. Processing stops at the first -+match. -+ - @item -fdirectives-only - @opindex fdirectives-only - When preprocessing, handle directives, but do not expand macros. ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -476,8 +476,8 @@ Objective-C and Objective-C++ Dialects}. - @item Directory Options - @xref{Directory Options,,Options for Directory Search}. - @gccoptlist{-B@var{prefix} -I@var{dir} -iplugindir=@var{dir} @gol ---iquote@var{dir} -L@var{dir} -no-canonical-prefixes -I- @gol ----sysroot=@var{dir} --no-sysroot-suffix} -+-iquote@var{dir} -iremap@var{src}:@var{dst} -L@var{dir} -no-canonical-prefixes @gol -+-I- --sysroot=@var{dir} --no-sysroot-suffix} - - @item Code Generation Options - @xref{Code Gen Options,,Options for Code Generation Conventions}. -@@ -10861,6 +10861,12 @@ be searched for header files only for th - "@var{file}"}; they are not searched for @code{#include <@var{file}>}, - otherwise just like @option{-I}. - -+@item -iremap @var{src}:@var{dst} -+@opindex iremap -+Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. -+This option can be specified more than once. Processing stops at the first -+match. -+ - @item -L@var{dir} - @opindex L - Add directory @var{dir} to the list of directories to be searched ---- a/libcpp/include/cpplib.h -+++ b/libcpp/include/cpplib.h -@@ -760,6 +760,9 @@ extern void cpp_set_lang (cpp_reader *, - /* Set the include paths. */ - extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int); - -+/* Provide src:dst pair for __FILE__ remapping. */ -+extern void add_cpp_remap_path (const char *); -+ - /* Call these to get pointers to the options, callback, and deps - structures for a given reader. These pointers are good until you - call cpp_finish on that reader. You can either edit the callbacks ---- a/libcpp/macro.c -+++ b/libcpp/macro.c -@@ -227,6 +227,64 @@ static const char * const monthnames[] = - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" - }; - -+static size_t remap_pairs; -+static char **remap_src; -+static char **remap_dst; -+ -+void -+add_cpp_remap_path (const char *arg) -+{ -+ const char *arg_dst; -+ size_t len; -+ -+ arg_dst = strchr(arg, ':'); -+ if (arg_dst == NULL) -+ { -+ fprintf(stderr, "Invalid argument for -iremap\n"); -+ exit(1); -+ } -+ -+ len = arg_dst - arg; -+ ++arg_dst; -+ -+ remap_src = (char **) xrealloc(remap_src, sizeof(char *) * (remap_pairs + 1)); -+ remap_dst = (char **) xrealloc(remap_dst, sizeof(char *) * (remap_pairs + 1)); -+ -+ remap_src[remap_pairs] = (char *) xmalloc(len + 1); -+ memcpy(remap_src[remap_pairs], arg, len); -+ remap_src[remap_pairs][len] = '\0'; -+ remap_dst[remap_pairs] = xstrdup(arg_dst); -+ ++remap_pairs; -+} -+ -+static const char * -+cpp_remap_file (const char *arg, char **tmp_name) -+{ -+ char *result; -+ size_t i, len; -+ -+ for (i = 0; i < remap_pairs; ++i) -+ { -+ len = strlen (remap_src[i]); -+ if (strncmp (remap_src[i], arg, len)) -+ continue; -+ if (arg[len] == '\0') -+ return xstrdup (remap_dst[i]); -+ if (arg[len] != '/') -+ continue; -+ arg += len; -+ len = strlen (remap_dst[i]); -+ result = (char *) xmalloc (len + strlen (arg) + 1); -+ memcpy(result, remap_dst[i], len); -+ strcpy(result + len, arg); -+ *tmp_name = result; -+ -+ return result; -+ } -+ -+ return arg; -+} -+ - /* Helper function for builtin_macro. Returns the text generated by - a builtin macro. */ - const uchar * -@@ -290,6 +348,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - { - unsigned int len; - const char *name; -+ char *tmp_name = NULL; - uchar *buf; - - if (node->value.builtin == BT_FILE) -@@ -301,6 +360,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - if (!name) - abort (); - } -+ name = cpp_remap_file (name, &tmp_name); - len = strlen (name); - buf = _cpp_unaligned_alloc (pfile, len * 2 + 3); - result = buf; -@@ -308,6 +368,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - buf = cpp_quote_string (buf + 1, (const unsigned char *) name, len); - *buf++ = '"'; - *buf = '\0'; -+ free (tmp_name); - } - break; - diff --git a/toolchain-old/gdb/Makefile b/toolchain-old/gdb/Makefile deleted file mode 100644 index 77e24f46097ded..00000000000000 --- a/toolchain-old/gdb/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -include $(TOPDIR)/rules.mk - -PKG_NAME:=gdb - -ifeq ($(CONFIG_arc),y) -PKG_VERSION:=arc-2017.03-gdb - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/arc-2017.03-gdb -PKG_HASH:=f47930161e9e99c46ab018dabbf56024739dda29c51f92495eaa0d4d7e3511f6 -GDB_DIR:=binutils-$(PKG_NAME)-$(PKG_VERSION) -PATCH_DIR:=./patches-arc -else -PKG_VERSION:=7.12.1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@GNU/gdb -PKG_HASH:=4607680b973d3ec92c30ad029f1b7dbde3876869e6b3a117d8a7e90081113186 -GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION) -endif - -HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(GDB_DIR) - -HOST_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/toolchain-build.mk - -HOST_CONFIGURE_VARS += \ - gdb_cv_func_sigsetjmp=yes - -HOST_CONFIGURE_ARGS = \ - --prefix=$(TOOLCHAIN_DIR) \ - --build=$(GNU_HOST_NAME) \ - --host=$(GNU_HOST_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --disable-werror \ - --without-uiout \ - --disable-tui --disable-gdbtk --without-x \ - --without-included-gettext \ - --enable-threads \ - --with-expat \ - --without-python \ - --disable-binutils \ - --disable-ld \ - --disable-gas \ - --disable-sim - -define Host/Install - mkdir -p $(TOOLCHAIN_DIR)/bin - $(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb - ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb - strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb -endef - -define Host/Clean - rm -rf \ - $(HOST_BUILD_DIR) \ - $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb \ - $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb -endef - -$(eval $(call HostBuild)) diff --git a/toolchain-old/gdb/patches-arc/100-no_extern_inline.patch b/toolchain-old/gdb/patches-arc/100-no_extern_inline.patch deleted file mode 100644 index 8c18c6e2e746a8..00000000000000 --- a/toolchain-old/gdb/patches-arc/100-no_extern_inline.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/sim/common/sim-arange.c -+++ b/sim/common/sim-arange.c -@@ -280,11 +280,7 @@ sim_addr_range_delete (ADDR_RANGE *ar, a - build_search_tree (ar); - } - --#endif /* DEFINE_NON_INLINE_P */ -- --#if DEFINE_INLINE_P -- --SIM_ARANGE_INLINE int -+int - sim_addr_range_hit_p (ADDR_RANGE *ar, address_word addr) - { - ADDR_RANGE_TREE *t = ar->range_tree; -@@ -301,4 +297,4 @@ sim_addr_range_hit_p (ADDR_RANGE *ar, ad - return 0; - } - --#endif /* DEFINE_INLINE_P */ -+#endif /* DEFINE_NON_INLINE_P */ ---- a/sim/common/sim-arange.h -+++ b/sim/common/sim-arange.h -@@ -73,7 +73,7 @@ extern void sim_addr_range_delete (ADDR_ - - /* Return non-zero if ADDR is in range AR, traversing the entire tree. - If no range is specified, that is defined to mean "everything". */ --SIM_ARANGE_INLINE int -+extern int - sim_addr_range_hit_p (ADDR_RANGE * /*ar*/, address_word /*addr*/); - #define ADDR_RANGE_HIT_P(ar, addr) \ - ((ar)->range_tree == NULL || sim_addr_range_hit_p ((ar), (addr))) diff --git a/toolchain-old/gdb/patches-arc/110-no_testsuite.patch b/toolchain-old/gdb/patches-arc/110-no_testsuite.patch deleted file mode 100644 index 1b284ea7675a90..00000000000000 --- a/toolchain-old/gdb/patches-arc/110-no_testsuite.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/gdb/configure -+++ b/gdb/configure -@@ -870,8 +870,7 @@ MAKEINFOFLAGS - YACC - YFLAGS - XMKMF' --ac_subdirs_all='testsuite --gdbtk -+ac_subdirs_all='gdbtk - multi-ice - gdbserver' - -@@ -5610,7 +5610,7 @@ $as_echo "$with_auto_load_safe_path" >&6 - - - --subdirs="$subdirs testsuite" -+subdirs="$subdirs" - - - # Check whether to support alternative target configurations diff --git a/toolchain-old/gdb/patches-arc/120-fix-compile-flag-mismatch.patch b/toolchain-old/gdb/patches-arc/120-fix-compile-flag-mismatch.patch deleted file mode 100644 index c8b41f264a0c2d..00000000000000 --- a/toolchain-old/gdb/patches-arc/120-fix-compile-flag-mismatch.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gdb/gdbserver/configure -+++ b/gdb/gdbserver/configure -@@ -2468,7 +2468,7 @@ $as_echo "$as_me: error: \`$ac_var' was - ac_cache_corrupted=: ;; - ,);; - *) -- if test "x$ac_old_val" != "x$ac_new_val"; then -+ if test "`echo x$ac_old_val`" != "`echo x$ac_new_val`"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` diff --git a/toolchain-old/gdb/patches/100-no_extern_inline.patch b/toolchain-old/gdb/patches/100-no_extern_inline.patch deleted file mode 100644 index 8c18c6e2e746a8..00000000000000 --- a/toolchain-old/gdb/patches/100-no_extern_inline.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/sim/common/sim-arange.c -+++ b/sim/common/sim-arange.c -@@ -280,11 +280,7 @@ sim_addr_range_delete (ADDR_RANGE *ar, a - build_search_tree (ar); - } - --#endif /* DEFINE_NON_INLINE_P */ -- --#if DEFINE_INLINE_P -- --SIM_ARANGE_INLINE int -+int - sim_addr_range_hit_p (ADDR_RANGE *ar, address_word addr) - { - ADDR_RANGE_TREE *t = ar->range_tree; -@@ -301,4 +297,4 @@ sim_addr_range_hit_p (ADDR_RANGE *ar, ad - return 0; - } - --#endif /* DEFINE_INLINE_P */ -+#endif /* DEFINE_NON_INLINE_P */ ---- a/sim/common/sim-arange.h -+++ b/sim/common/sim-arange.h -@@ -73,7 +73,7 @@ extern void sim_addr_range_delete (ADDR_ - - /* Return non-zero if ADDR is in range AR, traversing the entire tree. - If no range is specified, that is defined to mean "everything". */ --SIM_ARANGE_INLINE int -+extern int - sim_addr_range_hit_p (ADDR_RANGE * /*ar*/, address_word /*addr*/); - #define ADDR_RANGE_HIT_P(ar, addr) \ - ((ar)->range_tree == NULL || sim_addr_range_hit_p ((ar), (addr))) diff --git a/toolchain-old/gdb/patches/110-no_testsuite.patch b/toolchain-old/gdb/patches/110-no_testsuite.patch deleted file mode 100644 index 68d1c90359d174..00000000000000 --- a/toolchain-old/gdb/patches/110-no_testsuite.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/gdb/configure -+++ b/gdb/configure -@@ -874,8 +874,7 @@ MAKEINFOFLAGS - YACC - YFLAGS - XMKMF' --ac_subdirs_all='testsuite --gdbtk -+ac_subdirs_all='gdbtk - multi-ice - gdbserver' - -@@ -5617,7 +5616,7 @@ $as_echo "$with_auto_load_safe_path" >&6 - - - --subdirs="$subdirs testsuite" -+subdirs="$subdirs" - - - # Check whether to support alternative target configurations diff --git a/toolchain-old/gdb/patches/120-fix-compile-flag-mismatch.patch b/toolchain-old/gdb/patches/120-fix-compile-flag-mismatch.patch deleted file mode 100644 index 562902c50f2e61..00000000000000 --- a/toolchain-old/gdb/patches/120-fix-compile-flag-mismatch.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gdb/gdbserver/configure -+++ b/gdb/gdbserver/configure -@@ -2476,7 +2476,7 @@ $as_echo "$as_me: error: \`$ac_var' was - ac_cache_corrupted=: ;; - ,);; - *) -- if test "x$ac_old_val" != "x$ac_new_val"; then -+ if test "`echo x$ac_old_val`" != "`echo x$ac_new_val`"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` diff --git a/toolchain-old/glibc/Makefile b/toolchain-old/glibc/Makefile deleted file mode 100644 index 24526ceec2c92c..00000000000000 --- a/toolchain-old/glibc/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -PATH_PREFIX := . -VARIANT:=final -HOST_BUILD_PARALLEL:=1 - -include ./common.mk - -define Host/Compile - +$(MAKE) -C $(CUR_BUILD_DIR) \ - PARALLELMFLAGS="$(HOST_JOBS)" \ - BUILD_CFLAGS="$(HOST_CFLAGS)" \ - default-rpath="/lib:/usr/lib" \ - all -endef - -define Host/Install - $(call Host/SetToolchainInfo) - $(MAKE) -C $(CUR_BUILD_DIR) \ - BUILD_CFLAGS="$(HOST_CFLAGS)" \ - install_root="$(TOOLCHAIN_DIR)" \ - install - ( cd $(TOOLCHAIN_DIR) ; \ - for d in lib usr/lib ; do \ - for f in libc.so libpthread.so libgcc_s.so ; do \ - if [ -f $$$$d/$$$$f -a ! -L $$$$d/$$$$f ] ; then \ - $(SED) 's,/usr/lib/,,g;s,/lib/,,g' $$$$d/$$$$f ; \ - fi \ - done \ - done \ - ) -endef - -$(eval $(call HostBuild)) diff --git a/toolchain-old/glibc/common.mk b/toolchain-old/glibc/common.mk deleted file mode 100644 index 0ea166e77dfe3a..00000000000000 --- a/toolchain-old/glibc/common.mk +++ /dev/null @@ -1,94 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -include $(TOPDIR)/rules.mk - -PKG_NAME:=glibc -PKG_VERSION:=2.25 - -PKG_SOURCE_URL:=@GNU/libc -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=067bd9bb3390e79aa45911537d13c3721f1d9d3769931a30c2681bfee66f23a0 - -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_SOURCE_SUBDIR) -CUR_BUILD_DIR:=$(HOST_BUILD_DIR)-$(VARIANT) - -include $(INCLUDE_DIR)/toolchain-build.mk - -HOST_STAMP_PREPARED:=$(HOST_BUILD_DIR)/.prepared -HOST_STAMP_CONFIGURED:=$(CUR_BUILD_DIR)/.configured -HOST_STAMP_BUILT:=$(CUR_BUILD_DIR)/.built -HOST_STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.glibc_$(VARIANT)_installed - -ifeq ($(ARCH),mips64) - ifdef CONFIG_MIPS64_ABI_N64 - TARGET_CFLAGS += -mabi=64 - endif - ifdef CONFIG_MIPS64_ABI_N32 - TARGET_CFLAGS += -mabi=n32 - endif - ifdef CONFIG_MIPS64_ABI_O32 - TARGET_CFLAGS += -mabi=32 - endif -endif - - -# -Os miscompiles w. 2.24 gcc5/gcc6 -# only -O2 tested by upstream changeset -# "Optimize i386 syscall inlining for GCC 5" -GLIBC_CONFIGURE:= \ - BUILD_CC="$(HOSTCC)" \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="-O2 $(filter-out -Os,$(call qstrip,$(TARGET_CFLAGS)))" \ - libc_cv_slibdir="/lib" \ - use_ldconfig=no \ - $(HOST_BUILD_DIR)/$(GLIBC_PATH)configure \ - --prefix= \ - --build=$(GNU_HOST_NAME) \ - --host=$(REAL_GNU_TARGET_NAME) \ - --with-headers=$(TOOLCHAIN_DIR)/include \ - --disable-profile \ - --disable-werror \ - --without-gd \ - --without-cvs \ - --enable-add-ons \ - --$(if $(CONFIG_SOFT_FLOAT),without,with)-fp - -export libc_cv_ssp=no -export libc_cv_ssp_strong=no -export ac_cv_header_cpuid_h=yes -export HOST_CFLAGS := $(HOST_CFLAGS) -idirafter $(CURDIR)/$(PATH_PREFIX)/include - -define Host/SetToolchainInfo - $(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk - $(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.gnu.org/software/libc/,' $(TOOLCHAIN_DIR)/info.mk - $(SED) 's,^\(LIBC_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk - $(SED) 's,^\(LIBC_SO_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk -endef - -define Host/Configure - [ -f $(HOST_BUILD_DIR)/.autoconf ] || { \ - cd $(HOST_BUILD_DIR)/; \ - autoconf --force && \ - touch $(HOST_BUILD_DIR)/.autoconf; \ - } - mkdir -p $(CUR_BUILD_DIR) - ( cd $(CUR_BUILD_DIR); rm -f config.cache; \ - $(GLIBC_CONFIGURE) \ - ); -endef - -define Host/Prepare - $(call Host/Prepare/Default) - ln -snf $(PKG_SOURCE_SUBDIR) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) -endef - -define Host/Clean - rm -rf $(CUR_BUILD_DIR)* \ - $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev \ - $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) -endef diff --git a/toolchain-old/glibc/headers/Makefile b/toolchain-old/glibc/headers/Makefile deleted file mode 100644 index f1d8a8bc61e573..00000000000000 --- a/toolchain-old/glibc/headers/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -PATH_PREFIX:=.. -VARIANT:=headers - -include ../common.mk - -define Host/Compile - -endef - -define Host/Install - $(call Host/SetToolchainInfo) - mkdir -p $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/{include,lib} - $(MAKE) -C $(CUR_BUILD_DIR) \ - BUILD_CFLAGS="$(HOST_CFLAGS)" \ - install_root="$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev" \ - install-bootstrap-headers=yes \ - install-headers - $(CP) $(BUILD_DIR_TOOLCHAIN)/linux-dev/* $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/ - $(MAKE) -C $(CUR_BUILD_DIR) \ - csu/subdir_lib - ( cd $(CUR_BUILD_DIR); \ - $(CP) csu/crt1.o csu/crti.o csu/crtn.o $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/lib/ \ - ) - $(TARGET_CC) -nostdlib -nostartfiles -shared -x c /dev/null \ - -o $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/lib/libc.so -endef - -$(eval $(call HostBuild)) diff --git a/toolchain-old/glibc/include/libintl.h b/toolchain-old/glibc/include/libintl.h deleted file mode 100644 index 69cb887a26e732..00000000000000 --- a/toolchain-old/glibc/include/libintl.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __FAKE_LIBINTL_H -#define __FAKE_LIBINTL_H - -#define _(X) (X) - -#endif diff --git a/toolchain-old/glibc/patches/100-fix_cross_rpcgen.patch b/toolchain-old/glibc/patches/100-fix_cross_rpcgen.patch deleted file mode 100644 index 6a5e537b77a6a7..00000000000000 --- a/toolchain-old/glibc/patches/100-fix_cross_rpcgen.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- a/sunrpc/rpc/types.h -+++ b/sunrpc/rpc/types.h -@@ -75,18 +75,23 @@ typedef unsigned long rpcport_t; - #endif - - #ifndef __u_char_defined --typedef __u_char u_char; --typedef __u_short u_short; --typedef __u_int u_int; --typedef __u_long u_long; --typedef __quad_t quad_t; --typedef __u_quad_t u_quad_t; --typedef __fsid_t fsid_t; -+typedef unsigned char u_char; -+typedef unsigned short u_short; -+typedef unsigned int u_int; -+typedef unsigned long u_long; -+#if __WORDSIZE == 64 -+typedef long int quad_t; -+typedef unsigned long int u_quad_t; -+#elif defined __GLIBC_HAVE_LONG_LONG -+typedef long long int quad_t; -+typedef unsigned long long int u_quad_t; -+#endif -+typedef u_quad_t fsid_t; - # define __u_char_defined - #endif --#ifndef __daddr_t_defined --typedef __daddr_t daddr_t; --typedef __caddr_t caddr_t; -+#if !defined(__daddr_t_defined) && defined(linux) -+typedef long int daddr_t; -+typedef char *caddr_t; - # define __daddr_t_defined - #endif - ---- a/sunrpc/rpc_main.c -+++ b/sunrpc/rpc_main.c -@@ -958,9 +958,10 @@ mkfile_output (struct commandline *cmd) - abort (); - temp = rindex (cmd->infile, '.'); - cp = stpcpy (mkfilename, "Makefile."); -- if (temp != NULL) -- *((char *) stpncpy (cp, cmd->infile, temp - cmd->infile)) = '\0'; -- else -+ if (temp != NULL) { -+ strncpy(cp, cmd->infile, temp - cmd->infile); -+ cp[temp - cmd->infile - 1] = 0; -+ } else - stpcpy (cp, cmd->infile); - - } diff --git a/toolchain-old/glibc/patches/200-add-dl-search-paths.patch b/toolchain-old/glibc/patches/200-add-dl-search-paths.patch deleted file mode 100644 index 8f720cb9fd9524..00000000000000 --- a/toolchain-old/glibc/patches/200-add-dl-search-paths.patch +++ /dev/null @@ -1,14 +0,0 @@ -add /usr/lib to default search path for the dynamic linker - ---- a/Makeconfig -+++ b/Makeconfig -@@ -571,6 +571,9 @@ else - default-rpath = $(libdir) - endif - -+# Add /usr/lib to default search path for the dynamic linker -+user-defined-trusted-dirs := /usr/lib -+ - ifndef link-extra-libs - link-extra-libs = $(LDLIBS-$(@F)) - link-extra-libs-static = $(link-extra-libs) diff --git a/toolchain-old/info.mk b/toolchain-old/info.mk deleted file mode 100644 index 4f311c55064f44..00000000000000 --- a/toolchain-old/info.mk +++ /dev/null @@ -1,6 +0,0 @@ -TARGET_CROSS= -GCC_VERSION=unknown -LIBC_TYPE=unknown -LIBC_URL=unknown -LIBC_VERSION=unknown -LIBC_SO_VERSION=unknown diff --git a/toolchain-old/kernel-headers/Makefile b/toolchain-old/kernel-headers/Makefile deleted file mode 100644 index 1bf5598d6fd628..00000000000000 --- a/toolchain-old/kernel-headers/Makefile +++ /dev/null @@ -1,102 +0,0 @@ -# -# Copyright (C) 2006-2009 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -include $(TOPDIR)/rules.mk - -KERNEL_BUILD_DIR := $(BUILD_DIR_TOOLCHAIN) -BUILD_DIR := $(KERNEL_BUILD_DIR) - -override QUILT:= -override HOST_QUILT:= - -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=linux -PKG_VERSION:=$(LINUX_VERSION) -PKG_SOURCE:=$(LINUX_SOURCE) -PKG_SOURCE_URL:=$(LINUX_SITE) -HOST_BUILD_DIR:=$(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) -PKG_HASH:=$(LINUX_KERNEL_HASH) -LINUX_DIR := $(HOST_BUILD_DIR) -FILES_DIR := -PATCH_DIR := ./patches$(if $(wildcard ./patches-$(LINUX_VERSION)),-$(LINUX_VERSION)) - -include $(INCLUDE_DIR)/toolchain-build.mk -include $(INCLUDE_DIR)/kernel-defaults.mk - -ifeq ($(strip $(BOARD)),uml) - LINUX_KARCH:=$(subst x86_64,x86,$(subst i386,x86,$(ARCH))) -endif - -HOST_EXTRACFLAGS= - -LINUX_HAS_HEADERS_INSTALL:=y - -KMAKE := $(MAKE) -C $(HOST_BUILD_DIR) \ - HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \ - ARCH=$(LINUX_KARCH) \ - CC="$(KERNEL_CC)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - CROSS_COMPILE=$(TARGET_CROSS) \ - KBUILD_HAVE_NLS=no \ - CONFIG_SHELL=$(BASH) - -define Host/Configure/all - mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev - $(KMAKE) \ - INSTALL_HDR_PATH="$(BUILD_DIR_TOOLCHAIN)/linux-dev/" \ - headers_install -endef - -# XXX: the following is needed to build lzma-loader -ifneq ($(CONFIG_mips)$(CONFIG_mipsel),) - define Host/Configure/lzma - $(CP) \ - $(HOST_BUILD_DIR)/arch/mips/include/asm/asm.h \ - $(HOST_BUILD_DIR)/arch/mips/include/asm/regdef.h \ - $(HOST_BUILD_DIR)/arch/mips/include/asm/asm-eva.h \ - $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/asm/ - endef -endif - -define Host/Configure/post/mips - $(call Host/Configure/lzma) -endef - -define Host/Configure/post/mipsel - $(call Host/Configure/lzma) -endef - -define Host/Prepare - rm -rf $(BUILD_DIR_TOOLCHAIN)/linux-* - $(call Kernel/Prepare/Default) - rm -f $(BUILD_DIR_TOOLCHAIN)/linux - ln -s linux-$(LINUX_VERSION) $(BUILD_DIR_TOOLCHAIN)/linux - $(SED) 's/@expr length/@-expr length/' $(HOST_BUILD_DIR)/Makefile -endef - -define Host/Configure - env - yes '' | $(KMAKE) oldconfig - $(call Host/Configure/all) - $(call Host/Configure/post/$(ARCH)) -endef - -define Host/Compile -endef - -define Host/Install - $(CP) $(BUILD_DIR_TOOLCHAIN)/linux-dev/* $(TOOLCHAIN_DIR)/ -endef - -define Host/Clean - rm -rf \ - $(HOST_BUILD_DIR) \ - $(BUILD_DIR_TOOLCHAIN)/linux \ - $(BUILD_DIR_TOOLCHAIN)/linux-dev -endef - -$(eval $(call HostBuild)) diff --git a/toolchain-old/musl/Makefile b/toolchain-old/musl/Makefile deleted file mode 100644 index 2b9312bcbf123c..00000000000000 --- a/toolchain-old/musl/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -PATH_PREFIX=. - -include ./common.mk - -HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built -HOST_STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.musl_installed - -HOST_BUILD_PARALLEL:=1 - -MUSL_MAKEOPTS = -C $(HOST_BUILD_DIR) \ - DESTDIR="$(TOOLCHAIN_DIR)/" \ - LIBCC="$(subst libgcc.a,libgcc_initial.a,$(shell $(TARGET_CC) -print-libgcc-file-name))" - -define Host/SetToolchainInfo - $(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk - $(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.musl-libc.org/,' $(TOOLCHAIN_DIR)/info.mk - $(SED) 's,^\(LIBC_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk - $(SED) 's,^\(LIBC_SO_VERSION\)=.*,\1=$(LIBC_SO_VERSION),' $(TOOLCHAIN_DIR)/info.mk -endef - -define Host/Compile - +$(MAKE) $(HOST_JOBS) $(MUSL_MAKEOPTS) all -endef - -define Host/Install - $(call Host/SetToolchainInfo) - +$(MAKE) $(HOST_JOBS) $(MUSL_MAKEOPTS) DESTDIR="$(TOOLCHAIN_DIR)/" install - $(CP) ./include $(TOOLCHAIN_DIR)/ -endef - -$(eval $(call HostBuild)) diff --git a/toolchain-old/musl/common.mk b/toolchain-old/musl/common.mk deleted file mode 100644 index 0a45828f792cd7..00000000000000 --- a/toolchain-old/musl/common.mk +++ /dev/null @@ -1,62 +0,0 @@ -# -# Copyright (C) 2012-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/target.mk - -PKG_NAME:=musl -PKG_VERSION:=1.1.16 -PKG_RELEASE=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=5f7efb87a28a311ad377dd26adf53715dedb096d -PKG_MIRROR_HASH:=da18ef24f270e5cae6bc4c440479da17bec1949ae5a1bc990352ca04f24c4378 -PKG_SOURCE_URL:=git://git.musl-libc.org/musl -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz - -LIBC_SO_VERSION:=$(PKG_VERSION) -PATCH_DIR:=$(PATH_PREFIX)/patches - -HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/toolchain-build.mk -include $(INCLUDE_DIR)/hardening.mk - -MUSL_CONFIGURE:= \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - $(HOST_BUILD_DIR)/configure \ - --prefix=/ \ - --host=$(GNU_HOST_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --disable-gcc-wrapper \ - --enable-debug - -define Host/Prepare - $(call Host/Prepare/Default) - $(if $(strip $(QUILT)), \ - cd $(HOST_BUILD_DIR); \ - if $(QUILT_CMD) next >/dev/null 2>&1; then \ - $(QUILT_CMD) push -a; \ - fi - ) - ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) -endef - -define Host/Configure - ( cd $(HOST_BUILD_DIR); rm -f config.cache; \ - $(MUSL_CONFIGURE) \ - ); -endef - -define Host/Clean - rm -rf \ - $(HOST_BUILD_DIR) \ - $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) \ - $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev -endef diff --git a/toolchain-old/musl/include/bits/wordsize.h b/toolchain-old/musl/include/bits/wordsize.h deleted file mode 100644 index 2d4cbe8317fc25..00000000000000 --- a/toolchain-old/musl/include/bits/wordsize.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/toolchain-old/musl/include/features.h b/toolchain-old/musl/include/features.h deleted file mode 100644 index edb8cc72d4cd44..00000000000000 --- a/toolchain-old/musl/include/features.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef _FEATURES_H -#define _FEATURES_H - -#ifdef _ALL_SOURCE -#define _GNU_SOURCE 1 -#endif - -#if !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) \ - && !defined(_XOPEN_SOURCE) && !defined(_GNU_SOURCE) \ - && !defined(_BSD_SOURCE) && !defined(__STRICT_ANSI__) -#define _BSD_SOURCE 1 -#define _XOPEN_SOURCE 700 -#endif - -#if __STDC_VERSION__ >= 199901L -#define __restrict restrict -#elif !defined(__GNUC__) -#define __restrict -#endif - -#if __STDC_VERSION__ >= 199901L || defined(__cplusplus) -#define __inline inline -#endif - -#if __STDC_VERSION__ >= 201112L -#elif defined(__GNUC__) -#define _Noreturn __attribute__((__noreturn__)) -#else -#define _Noreturn -#endif - -/* Convenience macros to test the versions of glibc and gcc. - Use them like this: - #if __GNUC_PREREQ (2,8) - ... code requiring gcc 2.8 or later ... - #endif - Note - they won't work for gcc1 or glibc1, since the _MINOR macros - were not defined then. */ -#if defined __GNUC__ && defined __GNUC_MINOR__ -# define __GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -# define __GNUC_PREREQ(maj, min) 0 -#endif - -#include - -#endif diff --git a/toolchain-old/musl/include/sgidefs.h b/toolchain-old/musl/include/sgidefs.h deleted file mode 100644 index 74509fdbd043d0..00000000000000 --- a/toolchain-old/musl/include/sgidefs.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998, 2003, 2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ralf Baechle . - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SGIDEFS_H -#define _SGIDEFS_H 1 - -/* - * A crude hack to stop - */ -#undef __ASM_SGIDEFS_H -#define __ASM_SGIDEFS_H - -/* - * And remove any damage it might have already done - */ -#undef _MIPS_ISA_MIPS1 -#undef _MIPS_ISA_MIPS2 -#undef _MIPS_ISA_MIPS3 -#undef _MIPS_ISA_MIPS4 -#undef _MIPS_ISA_MIPS5 -#undef _MIPS_ISA_MIPS32 -#undef _MIPS_ISA_MIPS64 - -#undef _MIPS_SIM_ABI32 -#undef _MIPS_SIM_NABI32 -#undef _MIPS_SIM_ABI64 - -/* - * Definitions for the ISA level - */ -#define _MIPS_ISA_MIPS1 1 -#define _MIPS_ISA_MIPS2 2 -#define _MIPS_ISA_MIPS3 3 -#define _MIPS_ISA_MIPS4 4 -#define _MIPS_ISA_MIPS5 5 -#define _MIPS_ISA_MIPS32 6 -#define _MIPS_ISA_MIPS64 7 - -/* - * Subprogram calling convention - */ -#ifndef _ABIO32 -# define _ABIO32 1 -#endif -#define _MIPS_SIM_ABI32 _ABIO32 - -#ifndef _ABIN32 -# define _ABIN32 2 -#endif -#define _MIPS_SIM_NABI32 _ABIN32 - -#ifndef _ABI64 -# define _ABI64 3 -#endif -#define _MIPS_SIM_ABI64 _ABI64 - -#endif /* sgidefs.h */ diff --git a/toolchain-old/musl/include/sys/cdefs.h b/toolchain-old/musl/include/sys/cdefs.h deleted file mode 100644 index e9866700d0ccd6..00000000000000 --- a/toolchain-old/musl/include/sys/cdefs.h +++ /dev/null @@ -1,378 +0,0 @@ -/* Copyright (C) 1992-2002, 2004, 2005, 2006, 2007, 2009, 2011, 2012 - Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#ifndef _SYS_CDEFS_H -#define _SYS_CDEFS_H 1 - -/* We are almost always included from features.h. */ -#ifndef _FEATURES_H -# include -#endif - -/* The GNU libc does not support any K&R compilers or the traditional mode - of ISO C compilers anymore. Check for some of the combinations not - anymore supported. */ -#if defined __GNUC__ && !defined __STDC__ -# error "You need a ISO C conforming compiler to use the glibc headers" -#endif - -/* Some user header file might have defined this before. */ -#undef __P -#undef __PMT - -#ifdef __GNUC__ - -/* All functions, except those with callbacks or those that - synchronize memory, are leaf functions. */ -# if __GNUC_PREREQ (4, 6) && !defined _LIBC -# define __LEAF , __leaf__ -# define __LEAF_ATTR __attribute__ ((__leaf__)) -# else -# define __LEAF -# define __LEAF_ATTR -# endif - -/* GCC can always grok prototypes. For C++ programs we add throw() - to help it optimize the function calls. But this works only with - gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions - as non-throwing using a function attribute since programs can use - the -fexceptions options for C code as well. */ -# if !defined __cplusplus && __GNUC_PREREQ (3, 3) -# define __THROW __attribute__ ((__nothrow__ __LEAF)) -# define __THROWNL __attribute__ ((__nothrow__)) -# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct -# else -# if defined __cplusplus && __GNUC_PREREQ (2,8) -# define __THROW throw () -# define __THROWNL throw () -# define __NTH(fct) __LEAF_ATTR fct throw () -# else -# define __THROW -# define __THROWNL -# define __NTH(fct) fct -# endif -# endif - -#else /* Not GCC. */ - -# define __inline /* No inline functions. */ - -# define __THROW -# define __THROWNL -# define __NTH(fct) fct - -#endif /* GCC. */ - -/* These two macros are not used in glibc anymore. They are kept here - only because some other projects expect the macros to be defined. */ -#define __P(args) args -#define __PMT(args) args - -/* For these things, GCC behaves the ANSI way normally, - and the non-ANSI way under -traditional. */ - -#define __CONCAT(x,y) x ## y -#define __STRING(x) #x - -/* This is not a typedef so `const __ptr_t' does the right thing. */ -#define __ptr_t void * -#define __long_double_t long double - - -/* C++ needs to know that types and declarations are C, not C++. */ -#ifdef __cplusplus -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS } -#else -# define __BEGIN_DECLS -# define __END_DECLS -#endif - - -/* The standard library needs the functions from the ISO C90 standard - in the std namespace. At the same time we want to be safe for - future changes and we include the ISO C99 code in the non-standard - namespace __c99. The C++ wrapper header take case of adding the - definitions to the global namespace. */ -#if defined __cplusplus && defined _GLIBCPP_USE_NAMESPACES -# define __BEGIN_NAMESPACE_STD namespace std { -# define __END_NAMESPACE_STD } -# define __USING_NAMESPACE_STD(name) using std::name; -# define __BEGIN_NAMESPACE_C99 namespace __c99 { -# define __END_NAMESPACE_C99 } -# define __USING_NAMESPACE_C99(name) using __c99::name; -#else -/* For compatibility we do not add the declarations into any - namespace. They will end up in the global namespace which is what - old code expects. */ -# define __BEGIN_NAMESPACE_STD -# define __END_NAMESPACE_STD -# define __USING_NAMESPACE_STD(name) -# define __BEGIN_NAMESPACE_C99 -# define __END_NAMESPACE_C99 -# define __USING_NAMESPACE_C99(name) -#endif - - -/* Support for bounded pointers. */ -#ifndef __BOUNDED_POINTERS__ -# define __bounded /* nothing */ -# define __unbounded /* nothing */ -# define __ptrvalue /* nothing */ -#endif - - -/* Fortify support. */ -#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) -#define __bos0(ptr) __builtin_object_size (ptr, 0) -#define __fortify_function __extern_always_inline __attribute_artificial__ - -#if __GNUC_PREREQ (4,3) -# define __warndecl(name, msg) \ - extern void name (void) __attribute__((__warning__ (msg))) -# define __warnattr(msg) __attribute__((__warning__ (msg))) -# define __errordecl(name, msg) \ - extern void name (void) __attribute__((__error__ (msg))) -#else -# define __warndecl(name, msg) extern void name (void) -# define __warnattr(msg) -# define __errordecl(name, msg) extern void name (void) -#endif - -/* Support for flexible arrays. */ -#if __GNUC_PREREQ (2,97) -/* GCC 2.97 supports C99 flexible array members. */ -# define __flexarr [] -#else -# ifdef __GNUC__ -# define __flexarr [0] -# else -# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L -# define __flexarr [] -# else -/* Some other non-C99 compiler. Approximate with [1]. */ -# define __flexarr [1] -# endif -# endif -#endif - - -/* __asm__ ("xyz") is used throughout the headers to rename functions - at the assembly language level. This is wrapped by the __REDIRECT - macro, in order to support compilers that can do this some other - way. When compilers don't support asm-names at all, we have to do - preprocessor tricks instead (which don't have exactly the right - semantics, but it's the best we can do). - - Example: - int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */ - -#if defined __GNUC__ && __GNUC__ >= 2 - -# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias)) -# ifdef __cplusplus -# define __REDIRECT_NTH(name, proto, alias) \ - name proto __THROW __asm__ (__ASMNAME (#alias)) -# define __REDIRECT_NTHNL(name, proto, alias) \ - name proto __THROWNL __asm__ (__ASMNAME (#alias)) -# else -# define __REDIRECT_NTH(name, proto, alias) \ - name proto __asm__ (__ASMNAME (#alias)) __THROW -# define __REDIRECT_NTHNL(name, proto, alias) \ - name proto __asm__ (__ASMNAME (#alias)) __THROWNL -# endif -# define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) -# define __ASMNAME2(prefix, cname) __STRING (prefix) cname - -/* -#elif __SOME_OTHER_COMPILER__ - -# define __REDIRECT(name, proto, alias) name proto; \ - _Pragma("let " #name " = " #alias) -*/ -#endif - -/* GCC has various useful declarations that can be made with the - `__attribute__' syntax. All of the ways we use this do fine if - they are omitted for compilers that don't understand it. */ -#if !defined __GNUC__ || __GNUC__ < 2 -# define __attribute__(xyz) /* Ignore */ -#endif - -/* At some point during the gcc 2.96 development the `malloc' attribute - for functions was introduced. We don't want to use it unconditionally - (although this would be possible) since it generates warnings. */ -#if __GNUC_PREREQ (2,96) -# define __attribute_malloc__ __attribute__ ((__malloc__)) -#else -# define __attribute_malloc__ /* Ignore */ -#endif - -/* At some point during the gcc 2.96 development the `pure' attribute - for functions was introduced. We don't want to use it unconditionally - (although this would be possible) since it generates warnings. */ -#if __GNUC_PREREQ (2,96) -# define __attribute_pure__ __attribute__ ((__pure__)) -#else -# define __attribute_pure__ /* Ignore */ -#endif - -/* This declaration tells the compiler that the value is constant. */ -#if __GNUC_PREREQ (2,5) -# define __attribute_const__ __attribute__ ((__const__)) -#else -# define __attribute_const__ /* Ignore */ -#endif - -/* At some point during the gcc 3.1 development the `used' attribute - for functions was introduced. We don't want to use it unconditionally - (although this would be possible) since it generates warnings. */ -#if __GNUC_PREREQ (3,1) -# define __attribute_used__ __attribute__ ((__used__)) -# define __attribute_noinline__ __attribute__ ((__noinline__)) -#else -# define __attribute_used__ __attribute__ ((__unused__)) -# define __attribute_noinline__ /* Ignore */ -#endif - -/* gcc allows marking deprecated functions. */ -#if __GNUC_PREREQ (3,2) -# define __attribute_deprecated__ __attribute__ ((__deprecated__)) -#else -# define __attribute_deprecated__ /* Ignore */ -#endif - -/* At some point during the gcc 2.8 development the `format_arg' attribute - for functions was introduced. We don't want to use it unconditionally - (although this would be possible) since it generates warnings. - If several `format_arg' attributes are given for the same function, in - gcc-3.0 and older, all but the last one are ignored. In newer gccs, - all designated arguments are considered. */ -#if __GNUC_PREREQ (2,8) -# define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x))) -#else -# define __attribute_format_arg__(x) /* Ignore */ -#endif - -/* At some point during the gcc 2.97 development the `strfmon' format - attribute for functions was introduced. We don't want to use it - unconditionally (although this would be possible) since it - generates warnings. */ -#if __GNUC_PREREQ (2,97) -# define __attribute_format_strfmon__(a,b) \ - __attribute__ ((__format__ (__strfmon__, a, b))) -#else -# define __attribute_format_strfmon__(a,b) /* Ignore */ -#endif - -/* The nonull function attribute allows to mark pointer parameters which - must not be NULL. */ -#if __GNUC_PREREQ (3,3) -# define __nonnull(params) __attribute__ ((__nonnull__ params)) -#else -# define __nonnull(params) -#endif - -/* If fortification mode, we warn about unused results of certain - function calls which can lead to problems. */ -#if __GNUC_PREREQ (3,4) -# define __attribute_warn_unused_result__ \ - __attribute__ ((__warn_unused_result__)) -# if __USE_FORTIFY_LEVEL > 0 -# define __wur __attribute_warn_unused_result__ -# endif -#else -# define __attribute_warn_unused_result__ /* empty */ -#endif -#ifndef __wur -# define __wur /* Ignore */ -#endif - -/* Forces a function to be always inlined. */ -#if __GNUC_PREREQ (3,2) -# define __always_inline __inline __attribute__ ((__always_inline__)) -#else -# define __always_inline __inline -#endif - -/* Associate error messages with the source location of the call site rather - than with the source location inside the function. */ -#if __GNUC_PREREQ (4,3) -# define __attribute_artificial__ __attribute__ ((__artificial__)) -#else -# define __attribute_artificial__ /* Ignore */ -#endif - -/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#if !defined __cplusplus || __GNUC_PREREQ (4,3) -# if defined __GNUC_STDC_INLINE__ || defined __cplusplus -# define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) -# define __extern_always_inline \ - extern __always_inline __attribute__ ((__gnu_inline__)) -# else -# define __extern_inline extern __inline -# define __extern_always_inline extern __always_inline -# endif -#endif - -/* GCC 4.3 and above allow passing all anonymous arguments of an - __extern_always_inline function to some other vararg function. */ -#if __GNUC_PREREQ (4,3) -# define __va_arg_pack() __builtin_va_arg_pack () -# define __va_arg_pack_len() __builtin_va_arg_pack_len () -#endif - -/* It is possible to compile containing GCC extensions even if GCC is - run in pedantic mode if the uses are carefully marked using the - `__extension__' keyword. But this is not generally available before - version 2.8. */ -#if !__GNUC_PREREQ (2,8) -# define __extension__ /* Ignore */ -#endif - -/* __restrict is known in EGCS 1.2 and above. */ -#if !__GNUC_PREREQ (2,92) -# define __restrict /* Ignore */ -#endif - -/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is - array_name[restrict] - GCC 3.1 supports this. */ -#if __GNUC_PREREQ (3,1) && !defined __GNUG__ -# define __restrict_arr __restrict -#else -# ifdef __GNUC__ -# define __restrict_arr /* Not supported in old GCC. */ -# else -# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L -# define __restrict_arr restrict -# else -/* Some other non-C99 compiler. */ -# define __restrict_arr /* Not supported. */ -# endif -# endif -#endif - -#if __GNUC__ >= 3 -# define __glibc_unlikely(cond) __builtin_expect((cond), 0) -#else -# define __glibc_unlikely(cond) (cond) -#endif - -#endif /* sys/cdefs.h */ diff --git a/toolchain-old/musl/include/sys/glibc-types.h b/toolchain-old/musl/include/sys/glibc-types.h deleted file mode 100644 index fa0684ced299f2..00000000000000 --- a/toolchain-old/musl/include/sys/glibc-types.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef __MUSL_GLIBC_TYPES_H -#define __MUSL_GLIBC_TYPES_H - -#include - -/* Convenience types. */ -typedef unsigned char __u_char; -typedef unsigned short int __u_short; -typedef unsigned int __u_int; -typedef unsigned long int __u_long; - -/* Fixed-size types, underlying types depend on word size and compiler. */ -typedef signed char __int8_t; -typedef unsigned char __uint8_t; -typedef signed short int __int16_t; -typedef unsigned short int __uint16_t; -typedef signed int __int32_t; -typedef unsigned int __uint32_t; -#if __WORDSIZE == 64 -typedef signed long int __int64_t; -typedef unsigned long int __uint64_t; -#else -__extension__ typedef signed long long int __int64_t; -__extension__ typedef unsigned long long int __uint64_t; -#endif - -#define __off64_t off_t -#define __loff_t off_t -typedef char *__caddr_t; -#define __locale_t locale_t - -#define __gid_t gid_t -#define __uid_t uid_t - -#endif diff --git a/toolchain-old/musl/include/sys/queue.h b/toolchain-old/musl/include/sys/queue.h deleted file mode 100644 index daf4553d33e9a2..00000000000000 --- a/toolchain-old/musl/include/sys/queue.h +++ /dev/null @@ -1,574 +0,0 @@ -/* - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)queue.h 8.5 (Berkeley) 8/20/94 - */ - -#ifndef _SYS_QUEUE_H_ -#define _SYS_QUEUE_H_ - -/* - * This file defines five types of data structures: singly-linked lists, - * lists, simple queues, tail queues, and circular queues. - * - * A singly-linked list is headed by a single forward pointer. The - * elements are singly linked for minimum space and pointer manipulation - * overhead at the expense of O(n) removal for arbitrary elements. New - * elements can be added to the list after an existing element or at the - * head of the list. Elements being removed from the head of the list - * should use the explicit macro for this purpose for optimum - * efficiency. A singly-linked list may only be traversed in the forward - * direction. Singly-linked lists are ideal for applications with large - * datasets and few or no removals or for implementing a LIFO queue. - * - * A list is headed by a single forward pointer (or an array of forward - * pointers for a hash table header). The elements are doubly linked - * so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list before - * or after an existing element or at the head of the list. A list - * may only be traversed in the forward direction. - * - * A simple queue is headed by a pair of pointers, one the head of the - * list and the other to the tail of the list. The elements are singly - * linked to save space, so elements can only be removed from the - * head of the list. New elements can be added to the list after - * an existing element, at the head of the list, or at the end of the - * list. A simple queue may only be traversed in the forward direction. - * - * A tail queue is headed by a pair of pointers, one to the head of the - * list and the other to the tail of the list. The elements are doubly - * linked so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list before or - * after an existing element, at the head of the list, or at the end of - * the list. A tail queue may be traversed in either direction. - * - * A circle queue is headed by a pair of pointers, one to the head of the - * list and the other to the tail of the list. The elements are doubly - * linked so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list before or after - * an existing element, at the head of the list, or at the end of the list. - * A circle queue may be traversed in either direction, but has a more - * complex end of list detection. - * - * For details on the use of these macros, see the queue(3) manual page. - */ - -/* - * List definitions. - */ -#define LIST_HEAD(name, type) \ -struct name { \ - struct type *lh_first; /* first element */ \ -} - -#define LIST_HEAD_INITIALIZER(head) \ - { NULL } - -#define LIST_ENTRY(type) \ -struct { \ - struct type *le_next; /* next element */ \ - struct type **le_prev; /* address of previous next element */ \ -} - -/* - * List functions. - */ -#define LIST_INIT(head) do { \ - (head)->lh_first = NULL; \ -} while (/*CONSTCOND*/0) - -#define LIST_INSERT_AFTER(listelm, elm, field) do { \ - if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \ - (listelm)->field.le_next->field.le_prev = \ - &(elm)->field.le_next; \ - (listelm)->field.le_next = (elm); \ - (elm)->field.le_prev = &(listelm)->field.le_next; \ -} while (/*CONSTCOND*/0) - -#define LIST_INSERT_BEFORE(listelm, elm, field) do { \ - (elm)->field.le_prev = (listelm)->field.le_prev; \ - (elm)->field.le_next = (listelm); \ - *(listelm)->field.le_prev = (elm); \ - (listelm)->field.le_prev = &(elm)->field.le_next; \ -} while (/*CONSTCOND*/0) - -#define LIST_INSERT_HEAD(head, elm, field) do { \ - if (((elm)->field.le_next = (head)->lh_first) != NULL) \ - (head)->lh_first->field.le_prev = &(elm)->field.le_next;\ - (head)->lh_first = (elm); \ - (elm)->field.le_prev = &(head)->lh_first; \ -} while (/*CONSTCOND*/0) - -#define LIST_REMOVE(elm, field) do { \ - if ((elm)->field.le_next != NULL) \ - (elm)->field.le_next->field.le_prev = \ - (elm)->field.le_prev; \ - *(elm)->field.le_prev = (elm)->field.le_next; \ -} while (/*CONSTCOND*/0) - -#define LIST_FOREACH(var, head, field) \ - for ((var) = ((head)->lh_first); \ - (var); \ - (var) = ((var)->field.le_next)) - -/* - * List access methods. - */ -#define LIST_EMPTY(head) ((head)->lh_first == NULL) -#define LIST_FIRST(head) ((head)->lh_first) -#define LIST_NEXT(elm, field) ((elm)->field.le_next) - - -/* - * Singly-linked List definitions. - */ -#define SLIST_HEAD(name, type) \ -struct name { \ - struct type *slh_first; /* first element */ \ -} - -#define SLIST_HEAD_INITIALIZER(head) \ - { NULL } - -#define SLIST_ENTRY(type) \ -struct { \ - struct type *sle_next; /* next element */ \ -} - -/* - * Singly-linked List functions. - */ -#define SLIST_INIT(head) do { \ - (head)->slh_first = NULL; \ -} while (/*CONSTCOND*/0) - -#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ - (elm)->field.sle_next = (slistelm)->field.sle_next; \ - (slistelm)->field.sle_next = (elm); \ -} while (/*CONSTCOND*/0) - -#define SLIST_INSERT_HEAD(head, elm, field) do { \ - (elm)->field.sle_next = (head)->slh_first; \ - (head)->slh_first = (elm); \ -} while (/*CONSTCOND*/0) - -#define SLIST_REMOVE_HEAD(head, field) do { \ - (head)->slh_first = (head)->slh_first->field.sle_next; \ -} while (/*CONSTCOND*/0) - -#define SLIST_REMOVE(head, elm, type, field) do { \ - if ((head)->slh_first == (elm)) { \ - SLIST_REMOVE_HEAD((head), field); \ - } \ - else { \ - struct type *curelm = (head)->slh_first; \ - while(curelm->field.sle_next != (elm)) \ - curelm = curelm->field.sle_next; \ - curelm->field.sle_next = \ - curelm->field.sle_next->field.sle_next; \ - } \ -} while (/*CONSTCOND*/0) - -#define SLIST_FOREACH(var, head, field) \ - for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) - -/* - * Singly-linked List access methods. - */ -#define SLIST_EMPTY(head) ((head)->slh_first == NULL) -#define SLIST_FIRST(head) ((head)->slh_first) -#define SLIST_NEXT(elm, field) ((elm)->field.sle_next) - - -/* - * Singly-linked Tail queue declarations. - */ -#define STAILQ_HEAD(name, type) \ -struct name { \ - struct type *stqh_first; /* first element */ \ - struct type **stqh_last; /* addr of last next element */ \ -} - -#define STAILQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).stqh_first } - -#define STAILQ_ENTRY(type) \ -struct { \ - struct type *stqe_next; /* next element */ \ -} - -/* - * Singly-linked Tail queue functions. - */ -#define STAILQ_INIT(head) do { \ - (head)->stqh_first = NULL; \ - (head)->stqh_last = &(head)->stqh_first; \ -} while (/*CONSTCOND*/0) - -#define STAILQ_INSERT_HEAD(head, elm, field) do { \ - if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \ - (head)->stqh_last = &(elm)->field.stqe_next; \ - (head)->stqh_first = (elm); \ -} while (/*CONSTCOND*/0) - -#define STAILQ_INSERT_TAIL(head, elm, field) do { \ - (elm)->field.stqe_next = NULL; \ - *(head)->stqh_last = (elm); \ - (head)->stqh_last = &(elm)->field.stqe_next; \ -} while (/*CONSTCOND*/0) - -#define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ - (head)->stqh_last = &(elm)->field.stqe_next; \ - (listelm)->field.stqe_next = (elm); \ -} while (/*CONSTCOND*/0) - -#define STAILQ_REMOVE_HEAD(head, field) do { \ - if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \ - (head)->stqh_last = &(head)->stqh_first; \ -} while (/*CONSTCOND*/0) - -#define STAILQ_REMOVE(head, elm, type, field) do { \ - if ((head)->stqh_first == (elm)) { \ - STAILQ_REMOVE_HEAD((head), field); \ - } else { \ - struct type *curelm = (head)->stqh_first; \ - while (curelm->field.stqe_next != (elm)) \ - curelm = curelm->field.stqe_next; \ - if ((curelm->field.stqe_next = \ - curelm->field.stqe_next->field.stqe_next) == NULL) \ - (head)->stqh_last = &(curelm)->field.stqe_next; \ - } \ -} while (/*CONSTCOND*/0) - -#define STAILQ_FOREACH(var, head, field) \ - for ((var) = ((head)->stqh_first); \ - (var); \ - (var) = ((var)->field.stqe_next)) - -#define STAILQ_CONCAT(head1, head2) do { \ - if (!STAILQ_EMPTY((head2))) { \ - *(head1)->stqh_last = (head2)->stqh_first; \ - (head1)->stqh_last = (head2)->stqh_last; \ - STAILQ_INIT((head2)); \ - } \ -} while (/*CONSTCOND*/0) - -/* - * Singly-linked Tail queue access methods. - */ -#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL) -#define STAILQ_FIRST(head) ((head)->stqh_first) -#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) - - -/* - * Simple queue definitions. - */ -#define SIMPLEQ_HEAD(name, type) \ -struct name { \ - struct type *sqh_first; /* first element */ \ - struct type **sqh_last; /* addr of last next element */ \ -} - -#define SIMPLEQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).sqh_first } - -#define SIMPLEQ_ENTRY(type) \ -struct { \ - struct type *sqe_next; /* next element */ \ -} - -/* - * Simple queue functions. - */ -#define SIMPLEQ_INIT(head) do { \ - (head)->sqh_first = NULL; \ - (head)->sqh_last = &(head)->sqh_first; \ -} while (/*CONSTCOND*/0) - -#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \ - if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \ - (head)->sqh_last = &(elm)->field.sqe_next; \ - (head)->sqh_first = (elm); \ -} while (/*CONSTCOND*/0) - -#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ - (elm)->field.sqe_next = NULL; \ - *(head)->sqh_last = (elm); \ - (head)->sqh_last = &(elm)->field.sqe_next; \ -} while (/*CONSTCOND*/0) - -#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\ - (head)->sqh_last = &(elm)->field.sqe_next; \ - (listelm)->field.sqe_next = (elm); \ -} while (/*CONSTCOND*/0) - -#define SIMPLEQ_REMOVE_HEAD(head, field) do { \ - if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \ - (head)->sqh_last = &(head)->sqh_first; \ -} while (/*CONSTCOND*/0) - -#define SIMPLEQ_REMOVE(head, elm, type, field) do { \ - if ((head)->sqh_first == (elm)) { \ - SIMPLEQ_REMOVE_HEAD((head), field); \ - } else { \ - struct type *curelm = (head)->sqh_first; \ - while (curelm->field.sqe_next != (elm)) \ - curelm = curelm->field.sqe_next; \ - if ((curelm->field.sqe_next = \ - curelm->field.sqe_next->field.sqe_next) == NULL) \ - (head)->sqh_last = &(curelm)->field.sqe_next; \ - } \ -} while (/*CONSTCOND*/0) - -#define SIMPLEQ_FOREACH(var, head, field) \ - for ((var) = ((head)->sqh_first); \ - (var); \ - (var) = ((var)->field.sqe_next)) - -/* - * Simple queue access methods. - */ -#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == NULL) -#define SIMPLEQ_FIRST(head) ((head)->sqh_first) -#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) - - -/* - * Tail queue definitions. - */ -#define _TAILQ_HEAD(name, type, qual) \ -struct name { \ - qual type *tqh_first; /* first element */ \ - qual type *qual *tqh_last; /* addr of last next element */ \ -} -#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,) - -#define TAILQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).tqh_first } - -#define _TAILQ_ENTRY(type, qual) \ -struct { \ - qual type *tqe_next; /* next element */ \ - qual type *qual *tqe_prev; /* address of previous next element */\ -} -#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,) - -/* - * Tail queue functions. - */ -#define TAILQ_INIT(head) do { \ - (head)->tqh_first = NULL; \ - (head)->tqh_last = &(head)->tqh_first; \ -} while (/*CONSTCOND*/0) - -#define TAILQ_INSERT_HEAD(head, elm, field) do { \ - if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \ - (head)->tqh_first->field.tqe_prev = \ - &(elm)->field.tqe_next; \ - else \ - (head)->tqh_last = &(elm)->field.tqe_next; \ - (head)->tqh_first = (elm); \ - (elm)->field.tqe_prev = &(head)->tqh_first; \ -} while (/*CONSTCOND*/0) - -#define TAILQ_INSERT_TAIL(head, elm, field) do { \ - (elm)->field.tqe_next = NULL; \ - (elm)->field.tqe_prev = (head)->tqh_last; \ - *(head)->tqh_last = (elm); \ - (head)->tqh_last = &(elm)->field.tqe_next; \ -} while (/*CONSTCOND*/0) - -#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\ - (elm)->field.tqe_next->field.tqe_prev = \ - &(elm)->field.tqe_next; \ - else \ - (head)->tqh_last = &(elm)->field.tqe_next; \ - (listelm)->field.tqe_next = (elm); \ - (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ -} while (/*CONSTCOND*/0) - -#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ - (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ - (elm)->field.tqe_next = (listelm); \ - *(listelm)->field.tqe_prev = (elm); \ - (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ -} while (/*CONSTCOND*/0) - -#define TAILQ_REMOVE(head, elm, field) do { \ - if (((elm)->field.tqe_next) != NULL) \ - (elm)->field.tqe_next->field.tqe_prev = \ - (elm)->field.tqe_prev; \ - else \ - (head)->tqh_last = (elm)->field.tqe_prev; \ - *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ -} while (/*CONSTCOND*/0) - -#define TAILQ_FOREACH(var, head, field) \ - for ((var) = ((head)->tqh_first); \ - (var); \ - (var) = ((var)->field.tqe_next)) - -#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ - for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ - (var); \ - (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) - -#define TAILQ_CONCAT(head1, head2, field) do { \ - if (!TAILQ_EMPTY(head2)) { \ - *(head1)->tqh_last = (head2)->tqh_first; \ - (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \ - (head1)->tqh_last = (head2)->tqh_last; \ - TAILQ_INIT((head2)); \ - } \ -} while (/*CONSTCOND*/0) - -/* - * Tail queue access methods. - */ -#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) -#define TAILQ_FIRST(head) ((head)->tqh_first) -#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) - -#define TAILQ_LAST(head, headname) \ - (*(((struct headname *)((head)->tqh_last))->tqh_last)) -#define TAILQ_PREV(elm, headname, field) \ - (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) - - -/* - * Circular queue definitions. - */ -#define CIRCLEQ_HEAD(name, type) \ -struct name { \ - struct type *cqh_first; /* first element */ \ - struct type *cqh_last; /* last element */ \ -} - -#define CIRCLEQ_HEAD_INITIALIZER(head) \ - { (void *)&head, (void *)&head } - -#define CIRCLEQ_ENTRY(type) \ -struct { \ - struct type *cqe_next; /* next element */ \ - struct type *cqe_prev; /* previous element */ \ -} - -/* - * Circular queue functions. - */ -#define CIRCLEQ_INIT(head) do { \ - (head)->cqh_first = (void *)(head); \ - (head)->cqh_last = (void *)(head); \ -} while (/*CONSTCOND*/0) - -#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ - (elm)->field.cqe_next = (listelm)->field.cqe_next; \ - (elm)->field.cqe_prev = (listelm); \ - if ((listelm)->field.cqe_next == (void *)(head)) \ - (head)->cqh_last = (elm); \ - else \ - (listelm)->field.cqe_next->field.cqe_prev = (elm); \ - (listelm)->field.cqe_next = (elm); \ -} while (/*CONSTCOND*/0) - -#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ - (elm)->field.cqe_next = (listelm); \ - (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \ - if ((listelm)->field.cqe_prev == (void *)(head)) \ - (head)->cqh_first = (elm); \ - else \ - (listelm)->field.cqe_prev->field.cqe_next = (elm); \ - (listelm)->field.cqe_prev = (elm); \ -} while (/*CONSTCOND*/0) - -#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ - (elm)->field.cqe_next = (head)->cqh_first; \ - (elm)->field.cqe_prev = (void *)(head); \ - if ((head)->cqh_last == (void *)(head)) \ - (head)->cqh_last = (elm); \ - else \ - (head)->cqh_first->field.cqe_prev = (elm); \ - (head)->cqh_first = (elm); \ -} while (/*CONSTCOND*/0) - -#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ - (elm)->field.cqe_next = (void *)(head); \ - (elm)->field.cqe_prev = (head)->cqh_last; \ - if ((head)->cqh_first == (void *)(head)) \ - (head)->cqh_first = (elm); \ - else \ - (head)->cqh_last->field.cqe_next = (elm); \ - (head)->cqh_last = (elm); \ -} while (/*CONSTCOND*/0) - -#define CIRCLEQ_REMOVE(head, elm, field) do { \ - if ((elm)->field.cqe_next == (void *)(head)) \ - (head)->cqh_last = (elm)->field.cqe_prev; \ - else \ - (elm)->field.cqe_next->field.cqe_prev = \ - (elm)->field.cqe_prev; \ - if ((elm)->field.cqe_prev == (void *)(head)) \ - (head)->cqh_first = (elm)->field.cqe_next; \ - else \ - (elm)->field.cqe_prev->field.cqe_next = \ - (elm)->field.cqe_next; \ -} while (/*CONSTCOND*/0) - -#define CIRCLEQ_FOREACH(var, head, field) \ - for ((var) = ((head)->cqh_first); \ - (var) != (const void *)(head); \ - (var) = ((var)->field.cqe_next)) - -#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ - for ((var) = ((head)->cqh_last); \ - (var) != (const void *)(head); \ - (var) = ((var)->field.cqe_prev)) - -/* - * Circular queue access methods. - */ -#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head)) -#define CIRCLEQ_FIRST(head) ((head)->cqh_first) -#define CIRCLEQ_LAST(head) ((head)->cqh_last) -#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) -#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) - -#define CIRCLEQ_LOOP_NEXT(head, elm, field) \ - (((elm)->field.cqe_next == (void *)(head)) \ - ? ((head)->cqh_first) \ - : (elm->field.cqe_next)) -#define CIRCLEQ_LOOP_PREV(head, elm, field) \ - (((elm)->field.cqe_prev == (void *)(head)) \ - ? ((head)->cqh_last) \ - : (elm->field.cqe_prev)) - -#endif /* sys/queue.h */ diff --git a/toolchain-old/musl/patches/100-add_glob_onlydir.patch b/toolchain-old/musl/patches/100-add_glob_onlydir.patch deleted file mode 100644 index db0bc22afa4192..00000000000000 --- a/toolchain-old/musl/patches/100-add_glob_onlydir.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/include/glob.h -+++ b/include/glob.h -@@ -31,6 +31,8 @@ void globfree(glob_t *); - #define GLOB_NOESCAPE 0x40 - #define GLOB_PERIOD 0x80 - -+#define GLOB_ONLYDIR 0x100 -+ - #define GLOB_NOSPACE 1 - #define GLOB_ABORTED 2 - #define GLOB_NOMATCH 3 diff --git a/toolchain-old/musl/patches/110-read_timezone_from_fs.patch b/toolchain-old/musl/patches/110-read_timezone_from_fs.patch deleted file mode 100644 index b4349e73676d6a..00000000000000 --- a/toolchain-old/musl/patches/110-read_timezone_from_fs.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/src/time/__tz.c -+++ b/src/time/__tz.c -@@ -23,6 +23,9 @@ static int r0[5], r1[5]; - static const unsigned char *zi, *trans, *index, *types, *abbrevs, *abbrevs_end; - static size_t map_size; - -+static const char *tzfile; -+static size_t tzfile_size; -+ - static char old_tz_buf[32]; - static char *old_tz = old_tz_buf; - static size_t old_tz_size = sizeof old_tz_buf; -@@ -125,6 +128,15 @@ static void do_tzset() - "/usr/share/zoneinfo/\0/share/zoneinfo/\0/etc/zoneinfo/\0"; - - s = getenv("TZ"); -+ -+ /* if TZ is empty try to read it from /etc/TZ */ -+ if (!s || !*s) { -+ if (tzfile) -+ __munmap((void*)tzfile, tzfile_size); -+ -+ s = tzfile = (void *)__map_file("/etc/TZ", &tzfile_size); -+ } -+ - if (!s) s = "/etc/localtime"; - if (!*s) s = __gmt; - diff --git a/toolchain-old/musl/patches/200-add_libssp_nonshared.patch b/toolchain-old/musl/patches/200-add_libssp_nonshared.patch deleted file mode 100644 index 218ca41402233a..00000000000000 --- a/toolchain-old/musl/patches/200-add_libssp_nonshared.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 7ec87fbbc3cac99b4173d082dd6195f47c9a32e7 Mon Sep 17 00:00:00 2001 -From: Steven Barth -Date: Mon, 22 Jun 2015 11:01:56 +0200 -Subject: [PATCH] Add libssp_nonshared.a so GCC's is not needed - -Signed-off-by: Steven Barth ---- - Makefile | 10 ++++++++-- - libssp_nonshared/__stack_chk_fail_local.c | 2 ++ - 2 files changed, 10 insertions(+), 2 deletions(-) - create mode 100644 libssp_nonshared/__stack_chk_fail_local.c - ---- a/Makefile -+++ b/Makefile -@@ -66,7 +66,7 @@ CRT_LIBS = $(addprefix lib/,$(notdir $(C - STATIC_LIBS = lib/libc.a - SHARED_LIBS = lib/libc.so - TOOL_LIBS = lib/musl-gcc.specs --ALL_LIBS = $(CRT_LIBS) $(STATIC_LIBS) $(SHARED_LIBS) $(EMPTY_LIBS) $(TOOL_LIBS) -+ALL_LIBS = $(CRT_LIBS) $(STATIC_LIBS) $(SHARED_LIBS) $(EMPTY_LIBS) $(TOOL_LIBS) lib/libssp_nonshared.a - ALL_TOOLS = obj/musl-gcc - - WRAPCC_GCC = gcc -@@ -129,7 +129,8 @@ NOSSP_SRCS = $(wildcard crt/*.c) \ - src/thread/__set_thread_area.c src/thread/$(ARCH)/__set_thread_area.c \ - src/string/memset.c src/string/$(ARCH)/memset.c \ - src/string/memcpy.c src/string/$(ARCH)/memcpy.c \ -- ldso/dlstart.c ldso/dynlink.c -+ ldso/dlstart.c ldso/dynlink.c \ -+ src/libssp_nonshared/__stack_chk_fail_local.c - $(NOSSP_SRCS:%.c=obj/%.o) $(NOSSP_SRCS:%.c=obj/%.lo): CFLAGS_ALL += $(CFLAGS_NOSSP) - - $(CRT_OBJS): CFLAGS_ALL += -DCRT -@@ -172,6 +173,11 @@ lib/libc.a: $(AOBJS) - $(AR) rc $@ $(AOBJS) - $(RANLIB) $@ - -+lib/libssp_nonshared.a: obj/src/libssp_nonshared/__stack_chk_fail_local.o -+ rm -f $@ -+ $(AR) rc $@ $< -+ $(RANLIB) $@ -+ - $(EMPTY_LIBS): - rm -f $@ - $(AR) rc $@ ---- /dev/null -+++ b/src/libssp_nonshared/__stack_chk_fail_local.c -@@ -0,0 +1,2 @@ -+#include "atomic.h" -+void __attribute__((visibility ("hidden"))) __stack_chk_fail_local(void) { a_crash(); } diff --git a/toolchain-old/musl/patches/300-relative.patch b/toolchain-old/musl/patches/300-relative.patch deleted file mode 100644 index 6e30e0a88f17bf..00000000000000 --- a/toolchain-old/musl/patches/300-relative.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -221,7 +221,7 @@ $(DESTDIR)$(includedir)/%: $(srcdir)/inc - $(INSTALL) -D -m 644 $< $@ - - $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so -- $(INSTALL) -D -l $(libdir)/libc.so $@ || true -+ $(INSTALL) -D -l libc.so $@ || true - - install-libs: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(if $(SHARED_LIBS),$(DESTDIR)$(LDSO_PATHNAME),) - diff --git a/toolchain-old/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch b/toolchain-old/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch deleted file mode 100644 index c495d67e0805af..00000000000000 --- a/toolchain-old/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch +++ /dev/null @@ -1,197 +0,0 @@ -From e6683d001a95d7c3d4d992496f00f77e01fcd268 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 22 Nov 2015 15:04:23 +0100 -Subject: [PATCH v2] Add format attribute to some function declarations - -GCC and Clang are able to check the format arguments given to a -function and warn the user if there is a error in the format arguments -or if there is a potential uncontrolled format string security problem -in the code. GCC does this automatically for some functions like -printf(), but it is also possible to annotate other functions in a way -that it will check them too. This feature is used by glibc for many -functions. This patch adds the attribute to the some functions of musl -expect for these functions where gcc automatically adds it. - -GCC automatically adds checks for these functions: printf, fprintf, -sprintf, scanf, fscanf, sscanf, strftime, vprintf, vfprintf and -vsprintf. - -The documentation from gcc is here: -https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html - -The documentation from Clang is here: -http://clang.llvm.org/docs/AttributeReference.html#format-gnu-format - -Signed-off-by: Hauke Mehrtens ---- - include/err.h | 26 +++++++++++++++++--------- - include/monetary.h | 12 ++++++++++-- - include/stdio.h | 29 ++++++++++++++++++++--------- - include/syslog.h | 12 ++++++++++-- - 4 files changed, 57 insertions(+), 22 deletions(-) - ---- a/include/err.h -+++ b/include/err.h -@@ -8,15 +8,23 @@ - extern "C" { - #endif - --void warn(const char *, ...); --void vwarn(const char *, va_list); --void warnx(const char *, ...); --void vwarnx(const char *, va_list); -+#if __GNUC__ >= 3 -+#define __fp(x, y) __attribute__ ((__format__ (__printf__, x, y))) -+#else -+#define __fp(x, y) -+#endif - --_Noreturn void err(int, const char *, ...); --_Noreturn void verr(int, const char *, va_list); --_Noreturn void errx(int, const char *, ...); --_Noreturn void verrx(int, const char *, va_list); -+void warn(const char *, ...) __fp(1, 2); -+void vwarn(const char *, va_list) __fp(1, 0); -+void warnx(const char *, ...) __fp(1, 2); -+void vwarnx(const char *, va_list) __fp(1, 0); -+ -+_Noreturn void err(int, const char *, ...) __fp(2, 3); -+_Noreturn void verr(int, const char *, va_list) __fp(2, 0); -+_Noreturn void errx(int, const char *, ...) __fp(2, 3); -+_Noreturn void verrx(int, const char *, va_list) __fp(2, 0); -+ -+#undef __fp - - #ifdef __cplusplus - } ---- a/include/monetary.h -+++ b/include/monetary.h -@@ -13,8 +13,16 @@ extern "C" { - - #include - --ssize_t strfmon(char *__restrict, size_t, const char *__restrict, ...); --ssize_t strfmon_l(char *__restrict, size_t, locale_t, const char *__restrict, ...); -+#if __GNUC__ >= 3 -+#define __fsfm(x, y) __attribute__ ((__format__ (__strfmon__, x, y))) -+#else -+#define __fsfm(x, y) -+#endif -+ -+ssize_t strfmon(char *__restrict, size_t, const char *__restrict, ...) __fsfm(3, 4); -+ssize_t strfmon_l(char *__restrict, size_t, locale_t, const char *__restrict, ...) __fsfm(4, 5); -+ -+#undef __fsfm - - #ifdef __cplusplus - } ---- a/include/stdio.h -+++ b/include/stdio.h -@@ -21,6 +21,14 @@ extern "C" { - - #include - -+#if __GNUC__ >= 3 -+#define __fp(x, y) __attribute__ ((__format__ (__printf__, x, y))) -+#define __fs(x, y) __attribute__ ((__format__ (__scanf__, x, y))) -+#else -+#define __fp(x, y) -+#define __fs(x, y) -+#endif -+ - #ifdef __cplusplus - #define NULL 0L - #else -@@ -102,19 +110,19 @@ int puts(const char *); - int printf(const char *__restrict, ...); - int fprintf(FILE *__restrict, const char *__restrict, ...); - int sprintf(char *__restrict, const char *__restrict, ...); --int snprintf(char *__restrict, size_t, const char *__restrict, ...); -+int snprintf(char *__restrict, size_t, const char *__restrict, ...) __fp(3, 4); - - int vprintf(const char *__restrict, __isoc_va_list); - int vfprintf(FILE *__restrict, const char *__restrict, __isoc_va_list); - int vsprintf(char *__restrict, const char *__restrict, __isoc_va_list); --int vsnprintf(char *__restrict, size_t, const char *__restrict, __isoc_va_list); -+int vsnprintf(char *__restrict, size_t, const char *__restrict, __isoc_va_list) __fp(3, 0); - - int scanf(const char *__restrict, ...); - int fscanf(FILE *__restrict, const char *__restrict, ...); - int sscanf(const char *__restrict, const char *__restrict, ...); --int vscanf(const char *__restrict, __isoc_va_list); --int vfscanf(FILE *__restrict, const char *__restrict, __isoc_va_list); --int vsscanf(const char *__restrict, const char *__restrict, __isoc_va_list); -+int vscanf(const char *__restrict, __isoc_va_list) __fs(1, 0); -+int vfscanf(FILE *__restrict, const char *__restrict, __isoc_va_list) __fs(2, 0); -+int vsscanf(const char *__restrict, const char *__restrict, __isoc_va_list) __fs(2, 0); - - void perror(const char *); - -@@ -135,8 +143,8 @@ int pclose(FILE *); - int fileno(FILE *); - int fseeko(FILE *, off_t, int); - off_t ftello(FILE *); --int dprintf(int, const char *__restrict, ...); --int vdprintf(int, const char *__restrict, __isoc_va_list); -+int dprintf(int, const char *__restrict, ...) __fp(2, 3); -+int vdprintf(int, const char *__restrict, __isoc_va_list) __fp(2, 0); - void flockfile(FILE *); - int ftrylockfile(FILE *); - void funlockfile(FILE *); -@@ -175,8 +183,8 @@ int fileno_unlocked(FILE *); - int getw(FILE *); - int putw(int, FILE *); - char *fgetln(FILE *, size_t *); --int asprintf(char **, const char *, ...); --int vasprintf(char **, const char *, __isoc_va_list); -+int asprintf(char **, const char *, ...) __fp(2, 3); -+int vasprintf(char **, const char *, __isoc_va_list) __fp(2, 0); - #endif - - #ifdef _GNU_SOURCE -@@ -184,6 +192,9 @@ char *fgets_unlocked(char *, int, FILE * - int fputs_unlocked(const char *, FILE *); - #endif - -+#undef __fp -+#undef __fs -+ - #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) - #define tmpfile64 tmpfile - #define fopen64 fopen ---- a/include/syslog.h -+++ b/include/syslog.h -@@ -56,16 +56,22 @@ extern "C" { - #define LOG_NOWAIT 0x10 - #define LOG_PERROR 0x20 - -+#if __GNUC__ >= 3 -+#define __fp(x, y) __attribute__ ((__format__ (__printf__, x, y))) -+#else -+#define __fp(x, y) -+#endif -+ - void closelog (void); - void openlog (const char *, int, int); - int setlogmask (int); --void syslog (int, const char *, ...); -+void syslog (int, const char *, ...) __fp(2, 3); - - #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) - #define _PATH_LOG "/dev/log" - #define __NEED_va_list - #include --void vsyslog (int, const char *, va_list); -+void vsyslog (int, const char *, va_list) __fp(2, 0); - #if defined(SYSLOG_NAMES) - #define INTERNAL_NOPRI 0x10 - #define INTERNAL_MARK (LOG_NFACILITIES<<3) -@@ -93,6 +99,8 @@ typedef struct { - #endif - #endif - -+#undef __fp -+ - #ifdef __cplusplus - } - #endif diff --git a/toolchain-old/musl/patches/900-iconv_size_hack.patch b/toolchain-old/musl/patches/900-iconv_size_hack.patch deleted file mode 100644 index 343915fb062baa..00000000000000 --- a/toolchain-old/musl/patches/900-iconv_size_hack.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- a/src/locale/iconv.c -+++ b/src/locale/iconv.c -@@ -39,6 +39,7 @@ static const unsigned char charmaps[] = - "ucs4\0ucs4be\0utf32\0utf32be\0\0\300" - "ucs4le\0utf32le\0\0\303" - "ascii\0usascii\0iso646\0iso646us\0\0\307" -+#ifdef FULL_ICONV - "eucjp\0\0\320" - "shiftjis\0sjis\0\0\321" - "gb18030\0\0\330" -@@ -46,6 +47,7 @@ static const unsigned char charmaps[] = - "gb2312\0\0\332" - "big5\0bigfive\0cp950\0big5hkscs\0\0\340" - "euckr\0ksc5601\0ksx1001\0cp949\0\0\350" -+#endif - #include "codepages.h" - ; - -@@ -53,6 +55,7 @@ static const unsigned short legacy_chars - #include "legacychars.h" - }; - -+#ifdef FULL_ICONV - static const unsigned short jis0208[84][94] = { - #include "jis0208.h" - }; -@@ -72,6 +75,7 @@ static const unsigned short hkscs[] = { - static const unsigned short ksc[93][94] = { - #include "ksc.h" - }; -+#endif - - static int fuzzycmp(const unsigned char *a, const unsigned char *b) - { -@@ -216,6 +220,7 @@ size_t iconv(iconv_t cd0, char **restric - c = ((c-0xd7c0)<<10) + (d-0xdc00); - } - break; -+#ifdef FULL_ICONV - case SHIFT_JIS: - if (c-0xa1 <= 0xdf-0xa1) { - c += 0xff61-0xa1; -@@ -362,6 +367,7 @@ size_t iconv(iconv_t cd0, char **restric - c = ksc[c][d]; - if (!c) goto ilseq; - break; -+#endif - default: - if (c < 128+type) break; - c -= 128+type; ---- a/src/locale/codepages.h -+++ b/src/locale/codepages.h -@@ -118,6 +118,7 @@ - "\0\0\0\100\15\0\344\0\0\0\0\0\0\0\0\0\0\0\0\0\103\270\1\0\0\0\340\1\200\40" - "\230\0\0\0\0\0\44\341\12\0" - -+#ifdef FULL_ICONV - "cp1250\0" - "windows1250\0" - "\0\0" -@@ -214,6 +215,7 @@ - "\0\0\0\0\0\0\0\0\0\15\0\0\0\0\0\0\0\0\0\0\266\0\0\0\0\102\0\220\13\0" - "\0\234\2\0\0\0\0\0\0\0\0\244\202\13\0\0\0\0\100\15\0\0\0\0\0\0\0\0\0\0" - "\267\0\0\0\0\103\0\240\13\0\0\240\2\0\0\0\0\0\0\0\0\250\62\45\0" -+#endif - - "koi8r\0" - "\0\0" diff --git a/toolchain-old/musl/patches/901-crypt_size_hack.patch b/toolchain-old/musl/patches/901-crypt_size_hack.patch deleted file mode 100644 index 8cd7b1989ca6e9..00000000000000 --- a/toolchain-old/musl/patches/901-crypt_size_hack.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- a/src/crypt/crypt_r.c -+++ b/src/crypt/crypt_r.c -@@ -19,12 +19,6 @@ char *__crypt_r(const char *key, const c - if (salt[0] == '$' && salt[1] && salt[2]) { - if (salt[1] == '1' && salt[2] == '$') - return __crypt_md5(key, salt, output); -- if (salt[1] == '2' && salt[3] == '$') -- return __crypt_blowfish(key, salt, output); -- if (salt[1] == '5' && salt[2] == '$') -- return __crypt_sha256(key, salt, output); -- if (salt[1] == '6' && salt[2] == '$') -- return __crypt_sha512(key, salt, output); - } - return __crypt_des(key, salt, output); - } ---- a/src/crypt/crypt_sha512.c -+++ b/src/crypt/crypt_sha512.c -@@ -12,6 +12,7 @@ - #include - #include - #include -+#if 0 - - /* public domain sha512 implementation based on fips180-3 */ - /* >=2^64 bits messages are not supported (about 2000 peta bytes) */ -@@ -369,3 +370,4 @@ char *__crypt_sha512(const char *key, co - return "*"; - return p; - } -+#endif ---- a/src/crypt/crypt_blowfish.c -+++ b/src/crypt/crypt_blowfish.c -@@ -50,6 +50,7 @@ - #include - #include - -+#if 0 - typedef uint32_t BF_word; - typedef int32_t BF_word_signed; - -@@ -796,3 +797,4 @@ char *__crypt_blowfish(const char *key, - - return "*"; - } -+#endif ---- a/src/crypt/crypt_sha256.c -+++ b/src/crypt/crypt_sha256.c -@@ -13,6 +13,7 @@ - #include - #include - -+#if 0 - /* public domain sha256 implementation based on fips180-3 */ - - struct sha256 { -@@ -320,3 +321,4 @@ char *__crypt_sha256(const char *key, co - return "*"; - return p; - } -+#endif diff --git a/toolchain-old/uClibc/Config.in b/toolchain-old/uClibc/Config.in deleted file mode 100644 index 3bcb0037e9f603..00000000000000 --- a/toolchain-old/uClibc/Config.in +++ /dev/null @@ -1,6 +0,0 @@ -# Debug version. - -config UCLIBC_ENABLE_DEBUG - bool "Build with debug information" - depends on TOOLCHAINOPTS && USE_UCLIBC && !EXTERNAL_TOOLCHAIN - default n diff --git a/toolchain-old/uClibc/Makefile b/toolchain-old/uClibc/Makefile deleted file mode 100644 index 4764f2fa1d70f6..00000000000000 --- a/toolchain-old/uClibc/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -PATH_PREFIX=. - -include ./common.mk - -HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built -HOST_STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.uclibc_installed - -HOST_BUILD_PARALLEL:=1 - -define Host/SetToolchainInfo - $(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk - $(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.uclibc.org/,' $(TOOLCHAIN_DIR)/info.mk - $(SED) 's,^\(LIBC_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk - $(SED) 's,^\(LIBC_SO_VERSION\)=.*,\1=$(LIBC_SO_VERSION),' $(TOOLCHAIN_DIR)/info.mk -endef - -define Host/Compile - $(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(HOST_BUILD_DIR)/Rules.mak - $(UCLIBC_MAKE) PREFIX= all -endef - -define Host/Install - $(call Host/SetToolchainInfo) - $(UCLIBC_MAKE) PREFIX="$(TOOLCHAIN_DIR)/" install_runtime install_dev - $(CP) $(HOST_BUILD_DIR)/libc/libc_so.a $(TOOLCHAIN_DIR)/lib/ - ( cd $(TOOLCHAIN_DIR) ; \ - for d in lib usr/lib ; do \ - for f in libc.so libgcc_s.so ; do \ - if [ -f $$$$d/$$$$f -a ! -L $$$$d/$$$$f ] ; then \ - $(SED) 's,/usr/lib/,,g;s,/lib/,,g' $$$$d/$$$$f ; \ - fi \ - done \ - done \ - ) -endef - -$(eval $(call HostBuild)) diff --git a/toolchain-old/uClibc/common.mk b/toolchain-old/uClibc/common.mk deleted file mode 100644 index 384d73233a51d6..00000000000000 --- a/toolchain-old/uClibc/common.mk +++ /dev/null @@ -1,97 +0,0 @@ -# -# Copyright (C) 2006-2012 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/target.mk - -PKG_VERSION:=1.0.22 - -PKG_NAME:=uClibc-ng -PKG_SOURCE_URL = http://downloads.uclibc-ng.org/releases/$(PKG_VERSION)/ -PATCH_DIR:=$(PATH_PREFIX)/patches -CONFIG_DIR:=$(PATH_PREFIX)/config -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -LIBC_SO_VERSION:=$(PKG_VERSION) - -PKG_HASH:=f2004c85db8e07e9f1c2e8b7c513fa7c237bc9f9685d8e1bfc89535b8a85449b - -HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/toolchain-build.mk - -UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \ - -e 's/arc.*/arc/' \ - -e 's/i.86/i386/' \ - -e 's/sparc.*/sparc/' \ - -e 's/arm.*/arm/g' \ - -e 's/m68k.*/m68k/' \ - -e 's/ppc/powerpc/g' \ - -e 's/v850.*/v850/g' \ - -e 's/sh64/sh/' \ - -e 's/sh[234].*/sh/' \ - -e 's/mips.*/mips/' \ - -e 's/mipsel.*/mips/' \ -) - -GEN_CONFIG=$(SCRIPT_DIR)/kconfig.pl -n \ - $(if $(wildcard $(CONFIG_DIR)/common),'+' $(CONFIG_DIR)/common) \ - $(if $(CONFIG_UCLIBC_ENABLE_DEBUG),$(if $(wildcard $(CONFIG_DIR)/debug),'+' $(CONFIG_DIR)/debug)) \ - $(CONFIG_DIR)/$(ARCH)$(strip \ - $(if $(wildcard $(CONFIG_DIR)/$(ARCH).$(BOARD)),.$(BOARD), \ - $(if $(filter archs,$(subst ",,$(CONFIG_CPU_TYPE))),hs, \ - $(if $(CONFIG_MIPS64_ABI),.$(subst ",,$(CONFIG_MIPS64_ABI)), \ - $(if $(CONFIG_HAS_SPE_FPU),$(if $(wildcard $(CONFIG_DIR)/$(ARCH).e500),.e500)))))) - -CPU_CFLAGS = \ - -funsigned-char -fno-builtin -fno-asm \ - --std=gnu99 -ffunction-sections -fdata-sections \ - -Wno-unused-but-set-variable \ - $(TARGET_CFLAGS) -ggdb - -UCLIBC_MAKE = PATH='$(TOOLCHAIN_DIR)/initial/bin:$(TARGET_PATH)' $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - DEVEL_PREFIX=/ \ - RUNTIME_PREFIX=/ \ - HOSTCC="$(HOSTCC)" \ - CPU_CFLAGS="$(CPU_CFLAGS)" \ - ARCH="$(CONFIG_ARCH)" \ - LIBGCC="$(subst libgcc.a,libgcc_initial.a,$(shell $(TARGET_CC) -print-libgcc-file-name))" \ - DOSTRIP="" - -define Host/Prepare - $(call Host/Prepare/Default) - $(if $(strip $(QUILT)), \ - cd $(HOST_BUILD_DIR); \ - if $(QUILT_CMD) next >/dev/null 2>&1; then \ - $(QUILT_CMD) push -a; \ - fi - ) - ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) -endef - -define Host/Configure - $(GEN_CONFIG) > $(HOST_BUILD_DIR)/.config.new - $(SED) 's,^KERNEL_HEADERS=.*,KERNEL_HEADERS=\"$(BUILD_DIR_TOOLCHAIN)/linux-dev/include\",g' \ - -e 's,^.*UCLIBC_HAS_FPU.*,UCLIBC_HAS_FPU=$(if $(CONFIG_SOFT_FLOAT),n,y),g' \ - -e 's,^.*UCLIBC_HAS_SOFT_FLOAT.*,UCLIBC_HAS_SOFT_FLOAT=$(if $(CONFIG_SOFT_FLOAT),y,n),g' \ - -e 's,^.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=$(if $(CONFIG_BUILD_NLS),y,n),g' \ - -e 's,^.*UCLIBC_BUILD_ALL_LOCALE.*,UCLIBC_BUILD_ALL_LOCALE=$(if $(CONFIG_BUILD_NLS),y,n),g' \ - -e 's,^.*UCLIBC_HAS_SSP[^_].*,UCLIBC_HAS_SSP=$(if $(or $(CONFIG_PKG_CC_STACKPROTECTOR_REGULAR),$(CONFIG_PKG_CC_STACKPROTECTOR_STRONG)),y,n),g' \ - $(HOST_BUILD_DIR)/.config.new - cmp -s $(HOST_BUILD_DIR)/.config.new $(HOST_BUILD_DIR)/.config.last || { \ - cp $(HOST_BUILD_DIR)/.config.new $(HOST_BUILD_DIR)/.config && \ - $(MAKE) -C $(HOST_BUILD_DIR) olddefconfig KBUILD_HAVE_NLS= HOSTCFLAGS="-DKBUILD_NO_NLS" && \ - $(MAKE) -C $(HOST_BUILD_DIR)/extra/config conf KBUILD_HAVE_NLS= HOSTCFLAGS="-DKBUILD_NO_NLS" && \ - cp $(HOST_BUILD_DIR)/.config.new $(HOST_BUILD_DIR)/.config.last; \ - } -endef - -define Host/Clean - rm -rf \ - $(HOST_BUILD_DIR) \ - $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) \ - $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev -endef diff --git a/toolchain-old/uClibc/config/arc b/toolchain-old/uClibc/config/arc deleted file mode 100644 index de1ffc4415301d..00000000000000 --- a/toolchain-old/uClibc/config/arc +++ /dev/null @@ -1,10 +0,0 @@ -ARCH_ANY_ENDIAN=y -ARCH_LITTLE_ENDIAN=y -ARCH_WANTS_LITTLE_ENDIAN=y -TARGET_ARCH="arc" -TARGET_arc=y -CONFIG_ARC_CPU_700=y -# CONFIG_ARC_CPU_HS is not set -CONFIG_ARC_PAGE_SIZE_8K=y -# CONFIG_ARC_PAGE_SIZE_16K is not set -# CONFIG_ARC_PAGE_SIZE_4K is not set diff --git a/toolchain-old/uClibc/config/archs b/toolchain-old/uClibc/config/archs deleted file mode 100644 index 961628ed8c7630..00000000000000 --- a/toolchain-old/uClibc/config/archs +++ /dev/null @@ -1,10 +0,0 @@ -ARCH_ANY_ENDIAN=y -ARCH_LITTLE_ENDIAN=y -ARCH_WANTS_LITTLE_ENDIAN=y -TARGET_ARCH="arc" -TARGET_arc=y -# CONFIG_ARC_CPU_700 is not set -CONFIG_ARC_CPU_HS=y -CONFIG_ARC_PAGE_SIZE_8K=y -# CONFIG_ARC_PAGE_SIZE_16K is not set -# CONFIG_ARC_PAGE_SIZE_4K is not set diff --git a/toolchain-old/uClibc/config/arm b/toolchain-old/uClibc/config/arm deleted file mode 100644 index 41a60b1c384e2c..00000000000000 --- a/toolchain-old/uClibc/config/arm +++ /dev/null @@ -1,9 +0,0 @@ -ARCH_ANY_ENDIAN=y -ARCH_LITTLE_ENDIAN=y -ARCH_WANTS_LITTLE_ENDIAN=y -# COMPILE_IN_THUMB_MODE is not set -TARGET_ARCH="arm" -TARGET_arm=y -# USE_BX is not set -CONFIG_ARM_EABI=y - diff --git a/toolchain-old/uClibc/config/armeb b/toolchain-old/uClibc/config/armeb deleted file mode 100644 index 2e46dd67d92285..00000000000000 --- a/toolchain-old/uClibc/config/armeb +++ /dev/null @@ -1,9 +0,0 @@ -ARCH_ANY_ENDIAN=y -ARCH_BIG_ENDIAN=y -ARCH_WANTS_BIG_ENDIAN=y -# COMPILE_IN_THUMB_MODE is not set -TARGET_ARCH="arm" -TARGET_arm=y -# USE_BX is not set -CONFIG_ARM_EABI=y - diff --git a/toolchain-old/uClibc/config/common b/toolchain-old/uClibc/config/common deleted file mode 100644 index b679c0a1ec2afa..00000000000000 --- a/toolchain-old/uClibc/config/common +++ /dev/null @@ -1,226 +0,0 @@ -# ARCH_ANY_ENDIAN is not set -ARCH_HAS_MMU=y -# ARCH_HAS_NO_LDSO is not set -# ARCH_HAS_NO_SHARED is not set -# ARCH_LITTLE_ENDIAN is not set -ARCH_USE_MMU=y -# ARCH_WANTS_BIG_ENDIAN is not set -# ARCH_WANTS_LITTLE_ENDIAN is not set -ASSUME_DEVPTS=y -# COMPAT_ATEXIT is not set -CROSS_COMPILER_PREFIX="" -DEVEL_PREFIX="/usr/" -# DOASSERTS is not set -# DODEBUG is not set -# DODEBUG_PT is not set -# DOMULTI is not set -DOPIC=y -DOSTRIP=y -DO_C99_MATH=y -# DO_XSI_MATH is not set -# EXTRA_WARNINGS is not set -FORCE_OPTIONS_FOR_ARCH=y -# FORCE_SHAREABLE_TEXT_SEGMENTS is not set -# HARDWIRED_ABSPATH is not set -# HAS_NO_THREADS is not set -HAVE_DOT_CONFIG=y -# HAVE_NO_PIC is not set -# HAVE_NO_SSP is not set -HAVE_SHARED=y -KERNEL_HEADERS="." -LDSO_BASE_FILENAME="ld.so" -LDSO_CACHE_SUPPORT=y -# LDSO_GNU_HASH_SUPPORT is not set -LDSO_LD_LIBRARY_PATH=y -LDSO_LDD_SUPPORT=y -# LDSO_NO_CLEANUP is not set -# LDSO_PRELINK_SUPPORT is not set -# LDSO_PRELOAD_FILE_SUPPORT is not set -LDSO_PRELOAD_ENV_SUPPORT=y -LDSO_RUNPATH=y -LDSO_SAFE_RUNPATH=y -# LDSO_RUNPATH_OF_EXECUTABLE is not set -# LDSO_SEARCH_INTERP_PATH is not set -# LDSO_STANDALONE_SUPPORT is not set -# LINUXTHREADS_NEW is not set -# LINUXTHREADS_OLD is not set -# UCLIBC_HAS_BACKTRACE is not set -UCLIBC_HAS_THREADS_NATIVE=y -# MALLOC is not set -MALLOC_GLIBC_COMPAT=y -# MALLOC_SIMPLE is not set -MALLOC_STANDARD=y -MULTILIB_DIR="lib" -PTHREADS_DEBUG_SUPPORT=y -RUNTIME_PREFIX="/" -# SUPPORT_LD_DEBUG is not set -# SUPPORT_LD_DEBUG_EARLY is not set -TARGET_SUBARCH="" -# TARGET_alpha is not set -# TARGET_arc is not set -# TARGET_arm is not set -# TARGET_avr32 is not set -# TARGET_bfin is not set -# TARGET_c6x is not set -# TARGET_cris is not set -# TARGET_e1 is not set -# TARGET_frv is not set -# TARGET_h8300 is not set -# TARGET_hppa is not set -# TARGET_i386 is not set -# TARGET_i960 is not set -# TARGET_ia64 is not set -# TARGET_lm32 is not set -# TARGET_m68k is not set -# TARGET_metag is not set -# TARGET_microblaze is not set -# TARGET_mips is not set -# TARGET_nios is not set -# TARGET_nios2 is not set -# TARGET_or1k is not set -# TARGET_powerpc is not set -# TARGET_sh is not set -# TARGET_sh64 is not set -# TARGET_sparc is not set -# TARGET_v850 is not set -# TARGET_vax is not set -# TARGET_x86_64 is not set -# TARGET_xtensa is not set -UCLIBC_BSD_SPECIFIC=y -UCLIBC_BUILD_NOEXECSTACK=y -# UCLIBC_BUILD_NOW is not set -# UCLIBC_BUILD_PIE is not set -UCLIBC_BUILD_RELRO=y -UCLIBC_CTOR_DTOR=y -UCLIBC_DYNAMIC_ATEXIT=y -UCLIBC_EXTRA_CFLAGS="" -UCLIBC_GRP_BUFFER_SIZE=256 -UCLIBC_HAS_ADVANCED_REALTIME=y -# UCLIBC_HAS_ARC4RANDOM is not set -# UCLIBC_HAS_ARGP is not set -UCLIBC_HAS_BSD_ERR=y -UCLIBC_HAS_BSD_RES_CLOSE=y -# UCLIBC_HAS_COMPAT_RES_STATE is not set -UCLIBC_HAS_CRYPT=y -UCLIBC_HAS_CRYPT_IMPL=y -UCLIBC_HAS_CTYPE_CHECKED=y -# UCLIBC_HAS_CTYPE_ENFORCED is not set -UCLIBC_HAS_CTYPE_SIGNED=y -UCLIBC_HAS_CTYPE_TABLES=y -# UCLIBC_HAS_CTYPE_UNSAFE is not set -UCLIBC_HAS_EPOLL=y -UCLIBC_HAS_ERRNO_MESSAGES=y -# UCLIBC_HAS_EXTRA_COMPAT_RES_STATE is not set -# UCLIBC_HAS_FENV is not set -UCLIBC_HAS_FLOATS=y -UCLIBC_HAS_FNMATCH=y -UCLIBC_HAS_FNMATCH_OLD=y -# UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE is not set -UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y -# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set -# UCLIBC_HAS_FPU is not set -UCLIBC_HAS_FTS=y -UCLIBC_HAS_FTW=y -# UCLIBC_HAS_FULL_RPC is not set -UCLIBC_HAS_GETPT=y -UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y -UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y -# UCLIBC_HAS_GLIBC_DIGIT_GROUPING is not set -UCLIBC_HAS_GLOB=y -UCLIBC_HAS_GNU_ERROR=y -UCLIBC_HAS_GNU_GETOPT=y -UCLIBC_HAS_GNU_GETSUBOPT=y -UCLIBC_HAS_GNU_GLOB=y -UCLIBC_HAS_HEXADECIMAL_FLOATS=y -UCLIBC_HAS_IPV4=y -UCLIBC_HAS_IPV6=y -UCLIBC_HAS_LFS=y -UCLIBC_HAS_LIBNSL_STUB=y -UCLIBC_HAS_LIBRESOLV_STUB=y -UCLIBC_HAS_LIBUTIL=y -# UCLIBC_HAS_LOCALE is not set -# UCLIBC_BUILD_ALL_LOCALE is not set -# UCLIBC_BUILD_MINIMAL_LOCALE is not set -# UCLIBC_PREGENERATED_LOCALE_DATA is not set -UCLIBC_HAS_LONG_DOUBLE_MATH=y -UCLIBC_HAS_NETWORK_SUPPORT=y -UCLIBC_HAS_NFTW=y -UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y -# UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set -UCLIBC_HAS_PRINTF_M_SPEC=y -# UCLIBC_HAS_PROFILING is not set -UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y -UCLIBC_HAS_PTY=y -UCLIBC_HAS_REALTIME=y -# UCLIBC_HAS_REENTRANT_RPC is not set -UCLIBC_HAS_REGEX=y -UCLIBC_HAS_REGEX_OLD=y -UCLIBC_HAS_RESOLVER_SUPPORT=y -# UCLIBC_HAS_RPC is not set -UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y -# UCLIBC_HAS_SHA256_CRYPT_IMPL is not set -# UCLIBC_HAS_SHA512_CRYPT_IMPL is not set -UCLIBC_HAS_SHADOW=y -UCLIBC_HAS_SIGNUM_MESSAGES=y -UCLIBC_HAS_SOCKET=y -UCLIBC_HAS_SOFT_FLOAT=y -# UCLIBC_HAS_SSP is not set -# UCLIBC_HAS_SSP_COMPAT is not set -UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y -# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set -UCLIBC_HAS_STDIO_BUFSIZ_4096=y -# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set -# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set -# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set -UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y -UCLIBC_HAS_STDIO_GETC_MACRO=y -UCLIBC_HAS_STDIO_PUTC_MACRO=y -# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set -UCLIBC_HAS_STRING_ARCH_OPT=y -UCLIBC_HAS_STRING_GENERIC_OPT=y -# UCLIBC_HAS_STUBS is not set -UCLIBC_HAS_SYSLOG=y -# UCLIBC_HAS_SYS_ERRLIST is not set -# UCLIBC_HAS_SYS_SIGLIST is not set -UCLIBC_HAS_THREADS=y -UCLIBC_HAS_TM_EXTENSIONS=y -UCLIBC_HAS_TZ_CACHING=y -UCLIBC_HAS_TZ_FILE=y -UCLIBC_HAS_TZ_FILE_READ_MANY=y -UCLIBC_HAS_UTMPX=y -UCLIBC_HAS_UTMP=y -UCLIBC_HAS_WCHAR=y -UCLIBC_HAS_WORDEXP=y -UCLIBC_HAS_XATTR=y -# UCLIBC_HAS_XLOCALE is not set -UCLIBC_HAS___PROGNAME=y -# UCLIBC_LINUX_MODULE_24 is not set -UCLIBC_LINUX_MODULE_26=y -UCLIBC_LINUX_SPECIFIC=y -# UCLIBC_MALLOC_DEBUGGING is not set -# UCLIBC_MJN3_ONLY is not set -# UCLIBC_NTP_LEGACY is not set -# USE_OLD_VFPRINTF is not set -UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9 -UCLIBC_PWD_BUFFER_SIZE=256 -# UCLIBC_STATIC_LDCONFIG is not set -# UCLIBC_STRICT_HEADERS is not set -UCLIBC_SUPPORT_AI_ADDRCONFIG=y -UCLIBC_SUSV3_LEGACY=y -UCLIBC_SUSV3_LEGACY_MACROS=y -UCLIBC_SUSV4_LEGACY=y -# UCLIBC_SV4_DEPRECATED is not set -UCLIBC_TZ_FILE_PATH="/etc/TZ" -# UCLIBC_FALLBACK_TO_ETC_LOCALTIME is not set -UCLIBC_USE_NETLINK=y -# UNIX98PTY_ONLY is not set -USE_BX=y -WARNINGS="-Wall" -# UCLIBC_HAS_OBSTACK is not set -# UCLIBC_SUSV2_LEGACY is not set -# UCLIBC_HAS_CONTEXT_FUNCS is not set -UCLIBC_HAS_GETOPT_LONG=y diff --git a/toolchain-old/uClibc/config/debug b/toolchain-old/uClibc/config/debug deleted file mode 100644 index b366e66e390631..00000000000000 --- a/toolchain-old/uClibc/config/debug +++ /dev/null @@ -1,6 +0,0 @@ -DODEBUG=y -DODEBUG_PT=y -PTHREADS_DEBUG_SUPPORT=y -SUPPORT_LD_DEBUG=y -SUPPORT_LD_DEBUG_EARLY=y -UCLIBC_MALLOC_DEBUGGING=y diff --git a/toolchain-old/uClibc/config/i386 b/toolchain-old/uClibc/config/i386 deleted file mode 100644 index 5ef264c271dcdd..00000000000000 --- a/toolchain-old/uClibc/config/i386 +++ /dev/null @@ -1,21 +0,0 @@ -ARCH_LITTLE_ENDIAN=y -# CONFIG_386 is not set -CONFIG_486=y -# CONFIG_586 is not set -# CONFIG_586MMX is not set -# CONFIG_686 is not set -# CONFIG_CRUSOE is not set -# CONFIG_CYRIXIII is not set -# CONFIG_ELAN is not set -# CONFIG_GENERIC_386 is not set -# CONFIG_K6 is not set -# CONFIG_K7 is not set -# CONFIG_NEHEMIAH is not set -# CONFIG_PENTIUM4 is not set -# CONFIG_PENTIUMII is not set -# CONFIG_PENTIUMIII is not set -# CONFIG_WINCHIP2 is not set -# CONFIG_WINCHIPC6 is not set -TARGET_ARCH="i386" -TARGET_i386=y -UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/i686 b/toolchain-old/uClibc/config/i686 deleted file mode 100644 index ba615f6b86a812..00000000000000 --- a/toolchain-old/uClibc/config/i686 +++ /dev/null @@ -1,21 +0,0 @@ -ARCH_LITTLE_ENDIAN=y -# CONFIG_386 is not set -# CONFIG_486 is not set -# CONFIG_586 is not set -# CONFIG_586MMX is not set -CONFIG_686=y -# CONFIG_CRUSOE is not set -# CONFIG_CYRIXIII is not set -# CONFIG_ELAN is not set -# CONFIG_GENERIC_386 is not set -# CONFIG_K6 is not set -# CONFIG_K7 is not set -# CONFIG_NEHEMIAH is not set -# CONFIG_PENTIUM4 is not set -# CONFIG_PENTIUMII is not set -# CONFIG_PENTIUMIII is not set -# CONFIG_WINCHIP2 is not set -# CONFIG_WINCHIPC6 is not set -TARGET_ARCH="i386" -TARGET_i386=y -UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/m68k b/toolchain-old/uClibc/config/m68k deleted file mode 100644 index 14ce5aef7bb80a..00000000000000 --- a/toolchain-old/uClibc/config/m68k +++ /dev/null @@ -1,6 +0,0 @@ -ARCH_BIG_ENDIAN=y -LINUXTHREADS_OLD=y -TARGET_ARCH="m68k" -TARGET_SUBARCH="" -TARGET_m68k=y -# UCLIBC_HAS_THREADS_NATIVE is not set diff --git a/toolchain-old/uClibc/config/mips b/toolchain-old/uClibc/config/mips deleted file mode 100644 index 8cec22f4defc5d..00000000000000 --- a/toolchain-old/uClibc/config/mips +++ /dev/null @@ -1,18 +0,0 @@ -ARCH_ANY_ENDIAN=y -ARCH_BIG_ENDIAN=y -ARCH_CFLAGS="-mno-split-addresses" -ARCH_WANTS_BIG_ENDIAN=y -# CONFIG_MIPS_ISA_1 is not set -# CONFIG_MIPS_ISA_2 is not set -# CONFIG_MIPS_ISA_3 is not set -# CONFIG_MIPS_ISA_4 is not set -CONFIG_MIPS_ISA_MIPS32=y -# CONFIG_MIPS_ISA_MIPS32R2 is not set -# CONFIG_MIPS_ISA_MIPS64 is not set -# CONFIG_MIPS_ISA_MIPS64R2 is not set -# CONFIG_MIPS_N32_ABI is not set -# CONFIG_MIPS_N64_ABI is not set -CONFIG_MIPS_O32_ABI=y -TARGET_ARCH="mips" -TARGET_mips=y -UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/mips64 b/toolchain-old/uClibc/config/mips64 deleted file mode 100644 index 566d87a6e4bbc2..00000000000000 --- a/toolchain-old/uClibc/config/mips64 +++ /dev/null @@ -1,18 +0,0 @@ -ARCH_ANY_ENDIAN=y -ARCH_BIG_ENDIAN=y -ARCH_CFLAGS="-mno-split-addresses" -ARCH_WANTS_BIG_ENDIAN=y -# CONFIG_MIPS_ISA_1 is not set -# CONFIG_MIPS_ISA_2 is not set -# CONFIG_MIPS_ISA_3 is not set -# CONFIG_MIPS_ISA_4 is not set -# CONFIG_MIPS_ISA_MIPS32 is not set -# CONFIG_MIPS_ISA_MIPS32R2 is not set -CONFIG_MIPS_ISA_MIPS64=y -# CONFIG_MIPS_ISA_MIPS64R2 is not set -# CONFIG_MIPS_N32_ABI is not set -CONFIG_MIPS_N64_ABI=y -# CONFIG_MIPS_O32_ABI is not set -TARGET_ARCH="mips" -TARGET_mips=y -UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/mips64.32 b/toolchain-old/uClibc/config/mips64.32 deleted file mode 100644 index b7ea8f457e8619..00000000000000 --- a/toolchain-old/uClibc/config/mips64.32 +++ /dev/null @@ -1,19 +0,0 @@ -ARCH_ANY_ENDIAN=y -ARCH_BIG_ENDIAN=y -ARCH_CFLAGS="-mno-split-addresses" -ARCH_WANTS_BIG_ENDIAN=y -# CONFIG_MIPS_ISA_1 is not set -# CONFIG_MIPS_ISA_2 is not set -# CONFIG_MIPS_ISA_3 is not set -# CONFIG_MIPS_ISA_4 is not set -# CONFIG_MIPS_ISA_MIPS32 is not set -# CONFIG_MIPS_ISA_MIPS32R2 is not set -CONFIG_MIPS_ISA_MIPS64=y -# CONFIG_MIPS_ISA_MIPS64R2 is not set -# CONFIG_MIPS_N32_ABI is not set -# CONFIG_MIPS_N64_ABI is not set -CONFIG_MIPS_O32_ABI=y -TARGET_ARCH="mips" -TARGET_mips=y -TARGET_SUBARCH="mips64" -UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/mips64.64 b/toolchain-old/uClibc/config/mips64.64 deleted file mode 100644 index 2a0b755a73119e..00000000000000 --- a/toolchain-old/uClibc/config/mips64.64 +++ /dev/null @@ -1,19 +0,0 @@ -ARCH_ANY_ENDIAN=y -ARCH_BIG_ENDIAN=y -ARCH_CFLAGS="-mno-split-addresses" -ARCH_WANTS_BIG_ENDIAN=y -# CONFIG_MIPS_ISA_1 is not set -# CONFIG_MIPS_ISA_2 is not set -# CONFIG_MIPS_ISA_3 is not set -# CONFIG_MIPS_ISA_4 is not set -# CONFIG_MIPS_ISA_MIPS32 is not set -# CONFIG_MIPS_ISA_MIPS32R2 is not set -CONFIG_MIPS_ISA_MIPS64=y -# CONFIG_MIPS_ISA_MIPS64R2 is not set -# CONFIG_MIPS_N32_ABI is not set -CONFIG_MIPS_N64_ABI=y -# CONFIG_MIPS_O32_ABI is not set -TARGET_ARCH="mips" -TARGET_mips=y -TARGET_SUBARCH="mips64" -UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/mips64.n32 b/toolchain-old/uClibc/config/mips64.n32 deleted file mode 100644 index f8def5837f0e13..00000000000000 --- a/toolchain-old/uClibc/config/mips64.n32 +++ /dev/null @@ -1,19 +0,0 @@ -ARCH_ANY_ENDIAN=y -ARCH_BIG_ENDIAN=y -ARCH_CFLAGS="-mno-split-addresses" -ARCH_WANTS_BIG_ENDIAN=y -# CONFIG_MIPS_ISA_1 is not set -# CONFIG_MIPS_ISA_2 is not set -# CONFIG_MIPS_ISA_3 is not set -# CONFIG_MIPS_ISA_4 is not set -# CONFIG_MIPS_ISA_MIPS32 is not set -# CONFIG_MIPS_ISA_MIPS32R2 is not set -CONFIG_MIPS_ISA_MIPS64=y -# CONFIG_MIPS_ISA_MIPS64R2 is not set -CONFIG_MIPS_N32_ABI=y -# CONFIG_MIPS_N64_ABI is not set -# CONFIG_MIPS_O32_ABI is not set -TARGET_ARCH="mips" -TARGET_mips=y -TARGET_SUBARCH="mips64" -UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/mips64el b/toolchain-old/uClibc/config/mips64el deleted file mode 100644 index 53580787b54bbe..00000000000000 --- a/toolchain-old/uClibc/config/mips64el +++ /dev/null @@ -1,18 +0,0 @@ -ARCH_ANY_ENDIAN=y -ARCH_CFLAGS="-mno-split-addresses" -ARCH_LITTLE_ENDIAN=y -ARCH_WANTS_LITTLE_ENDIAN=y -# CONFIG_MIPS_ISA_1 is not set -# CONFIG_MIPS_ISA_2 is not set -# CONFIG_MIPS_ISA_3 is not set -# CONFIG_MIPS_ISA_4 is not set -# CONFIG_MIPS_ISA_MIPS32 is not set -# CONFIG_MIPS_ISA_MIPS32R2 is not set -CONFIG_MIPS_ISA_MIPS64=y -# CONFIG_MIPS_ISA_MIPS64R2 is not set -# CONFIG_MIPS_N32_ABI is not set -CONFIG_MIPS_N64_ABI=y -# CONFIG_MIPS_O32_ABI is not set -TARGET_ARCH="mips" -TARGET_mips=y -UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/mips64el.32 b/toolchain-old/uClibc/config/mips64el.32 deleted file mode 100644 index a10840bf96f57c..00000000000000 --- a/toolchain-old/uClibc/config/mips64el.32 +++ /dev/null @@ -1,19 +0,0 @@ -ARCH_ANY_ENDIAN=y -ARCH_CFLAGS="-mno-split-addresses" -ARCH_LITTLE_ENDIAN=y -ARCH_WANTS_LITTLE_ENDIAN=y -# CONFIG_MIPS_ISA_1 is not set -# CONFIG_MIPS_ISA_2 is not set -# CONFIG_MIPS_ISA_3 is not set -# CONFIG_MIPS_ISA_4 is not set -# CONFIG_MIPS_ISA_MIPS32 is not set -# CONFIG_MIPS_ISA_MIPS32R2 is not set -CONFIG_MIPS_ISA_MIPS64=y -# CONFIG_MIPS_ISA_MIPS64R2 is not set -# CONFIG_MIPS_N32_ABI is not set -# CONFIG_MIPS_N64_ABI is not set -CONFIG_MIPS_O32_ABI=y -TARGET_ARCH="mips" -TARGET_mips=y -TARGET_SUBARCH="mips64" -UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/mips64el.64 b/toolchain-old/uClibc/config/mips64el.64 deleted file mode 100644 index 8b90a54a57d9ad..00000000000000 --- a/toolchain-old/uClibc/config/mips64el.64 +++ /dev/null @@ -1,19 +0,0 @@ -ARCH_ANY_ENDIAN=y -ARCH_CFLAGS="-mno-split-addresses" -ARCH_LITTLE_ENDIAN=y -ARCH_WANTS_LITTLE_ENDIAN=y -# CONFIG_MIPS_ISA_1 is not set -# CONFIG_MIPS_ISA_2 is not set -# CONFIG_MIPS_ISA_3 is not set -# CONFIG_MIPS_ISA_4 is not set -# CONFIG_MIPS_ISA_MIPS32 is not set -# CONFIG_MIPS_ISA_MIPS32R2 is not set -CONFIG_MIPS_ISA_MIPS64=y -# CONFIG_MIPS_ISA_MIPS64R2 is not set -# CONFIG_MIPS_N32_ABI is not set -CONFIG_MIPS_N64_ABI=y -# CONFIG_MIPS_O32_ABI is not set -TARGET_ARCH="mips" -TARGET_mips=y -TARGET_SUBARCH="mips64" -UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/mips64el.n32 b/toolchain-old/uClibc/config/mips64el.n32 deleted file mode 100644 index 4ac4d06c0dee13..00000000000000 --- a/toolchain-old/uClibc/config/mips64el.n32 +++ /dev/null @@ -1,19 +0,0 @@ -ARCH_ANY_ENDIAN=y -ARCH_CFLAGS="-mno-split-addresses" -ARCH_LITTLE_ENDIAN=y -ARCH_WANTS_LITTLE_ENDIAN=y -# CONFIG_MIPS_ISA_1 is not set -# CONFIG_MIPS_ISA_2 is not set -# CONFIG_MIPS_ISA_3 is not set -# CONFIG_MIPS_ISA_4 is not set -# CONFIG_MIPS_ISA_MIPS32 is not set -# CONFIG_MIPS_ISA_MIPS32R2 is not set -CONFIG_MIPS_ISA_MIPS64=y -# CONFIG_MIPS_ISA_MIPS64R2 is not set -CONFIG_MIPS_N32_ABI=y -# CONFIG_MIPS_N64_ABI is not set -# CONFIG_MIPS_O32_ABI is not set -TARGET_ARCH="mips" -TARGET_mips=y -TARGET_SUBARCH="mips64" -UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/mipsel b/toolchain-old/uClibc/config/mipsel deleted file mode 100644 index d9dedbb02ccc06..00000000000000 --- a/toolchain-old/uClibc/config/mipsel +++ /dev/null @@ -1,18 +0,0 @@ -ARCH_ANY_ENDIAN=y -ARCH_CFLAGS="-mno-split-addresses" -ARCH_LITTLE_ENDIAN=y -ARCH_WANTS_LITTLE_ENDIAN=y -# CONFIG_MIPS_ISA_1 is not set -# CONFIG_MIPS_ISA_2 is not set -# CONFIG_MIPS_ISA_3 is not set -# CONFIG_MIPS_ISA_4 is not set -CONFIG_MIPS_ISA_MIPS32=y -# CONFIG_MIPS_ISA_MIPS32R2 is not set -# CONFIG_MIPS_ISA_MIPS64 is not set -# CONFIG_MIPS_ISA_MIPS64R2 is not set -# CONFIG_MIPS_N32_ABI is not set -# CONFIG_MIPS_N64_ABI is not set -CONFIG_MIPS_O32_ABI=y -TARGET_ARCH="mips" -TARGET_mips=y -UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/mipsel.cobalt b/toolchain-old/uClibc/config/mipsel.cobalt deleted file mode 100644 index 1d42a70f234205..00000000000000 --- a/toolchain-old/uClibc/config/mipsel.cobalt +++ /dev/null @@ -1,18 +0,0 @@ -ARCH_ANY_ENDIAN=y -ARCH_CFLAGS="-mno-split-addresses" -ARCH_LITTLE_ENDIAN=y -ARCH_WANTS_LITTLE_ENDIAN=y -# CONFIG_MIPS_ISA_1 is not set -# CONFIG_MIPS_ISA_2 is not set -CONFIG_MIPS_ISA_3=y -# CONFIG_MIPS_ISA_4 is not set -# CONFIG_MIPS_ISA_MIPS32 is not set -# CONFIG_MIPS_ISA_MIPS32R2 is not set -# CONFIG_MIPS_ISA_MIPS64 is not set -# CONFIG_MIPS_ISA_MIPS64R2 is not set -# CONFIG_MIPS_N32_ABI is not set -# CONFIG_MIPS_N64_ABI is not set -CONFIG_MIPS_O32_ABI=y -TARGET_ARCH="mips" -TARGET_mips=y -UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/config/powerpc b/toolchain-old/uClibc/config/powerpc deleted file mode 100644 index 5b1292d12e52fe..00000000000000 --- a/toolchain-old/uClibc/config/powerpc +++ /dev/null @@ -1,6 +0,0 @@ -ARCH_BIG_ENDIAN=y -CONFIG_CLASSIC=y -# CONFIG_E500 is not set -TARGET_ARCH="powerpc" -TARGET_SUBARCH="classic" -TARGET_powerpc=y diff --git a/toolchain-old/uClibc/config/powerpc.e500 b/toolchain-old/uClibc/config/powerpc.e500 deleted file mode 100644 index a835c3d5e74ada..00000000000000 --- a/toolchain-old/uClibc/config/powerpc.e500 +++ /dev/null @@ -1,6 +0,0 @@ -ARCH_BIG_ENDIAN=y -# CONFIG_CLASSIC is not set -CONFIG_E500=y -TARGET_ARCH="powerpc" -TARGET_SUBARCH="classic" -TARGET_powerpc=y diff --git a/toolchain-old/uClibc/config/sparc b/toolchain-old/uClibc/config/sparc deleted file mode 100644 index e1596c4100904c..00000000000000 --- a/toolchain-old/uClibc/config/sparc +++ /dev/null @@ -1,8 +0,0 @@ -ARCH_BIG_ENDIAN=y -# CONFIG_SPARC_V7 is not set -# CONFIG_SPARC_V8 is not set -CONFIG_SPARC_V9=y -# CONFIG_SPARC_V9B is not set -TARGET_ARCH="sparc" -TARGET_sparc=y -UCLIBC_HAS_LONG_DOUBLE_MATH=y diff --git a/toolchain-old/uClibc/config/sparc.leon b/toolchain-old/uClibc/config/sparc.leon deleted file mode 100644 index eb725ac05dff12..00000000000000 --- a/toolchain-old/uClibc/config/sparc.leon +++ /dev/null @@ -1,8 +0,0 @@ -ARCH_BIG_ENDIAN=y -# CONFIG_SPARC_V7 is not set -CONFIG_SPARC_V8=y -# CONFIG_SPARC_V9 is not set -# CONFIG_SPARC_V9B is not set -TARGET_ARCH="sparc" -TARGET_sparc=y -UCLIBC_HAS_LONG_DOUBLE_MATH=y diff --git a/toolchain-old/uClibc/config/x86_64 b/toolchain-old/uClibc/config/x86_64 deleted file mode 100644 index b6dc2c2afe0eda..00000000000000 --- a/toolchain-old/uClibc/config/x86_64 +++ /dev/null @@ -1,6 +0,0 @@ -ARCH_LITTLE_ENDIAN=y -# LINUXTHREADS_NEW is not set -TARGET_ARCH="x86_64" -TARGET_x86_64=y -UCLIBC_BSD_SPECIFIC=y -UCLIBC_HAS_FPU=y diff --git a/toolchain-old/uClibc/headers/Makefile b/toolchain-old/uClibc/headers/Makefile deleted file mode 100644 index abd3620d33edcb..00000000000000 --- a/toolchain-old/uClibc/headers/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -PATH_PREFIX:=.. - -include ../common.mk - -HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.headers_built -HOST_STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.uclibc_headers_installed - -define Host/Compile - -endef - -define Host/Install - PATH='$(TARGET_PATH)' $(MAKE) -C $(HOST_BUILD_DIR) \ - PREFIX="$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/" \ - DEVEL_PREFIX=/ \ - RUNTIME_PREFIX="$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/" \ - HOSTCC="$(HOSTCC)" \ - CC="$(TARGET_CC)" \ - CPU_CFLAGS="$(TARGET_CFLAGS)" \ - ARCH="$(CONFIG_ARCH)" \ - pregen \ - install_headers - $(CP) $(BUILD_DIR_TOOLCHAIN)/linux-dev/* $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/ -endef - -$(eval $(call HostBuild)) - diff --git a/toolchain-old/uClibc/utils/Makefile b/toolchain-old/uClibc/utils/Makefile deleted file mode 100644 index 83100d70c14390..00000000000000 --- a/toolchain-old/uClibc/utils/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -PATH_PREFIX=.. - -include ../common.mk - -HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.utils_built -HOST_STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.uclibc_utils_installed - -define Host/Compile - $(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(HOST_BUILD_DIR)/Rules.mak - $(UCLIBC_MAKE) PREFIX= utils -endef - -define Host/Install - $(INSTALL_DIR) $(TOOLCHAIN_DIR)/bin - $(INSTALL_BIN) \ - $(HOST_BUILD_DIR)/utils/ldd \ - $(TOOLCHAIN_DIR)/bin/ - $(INSTALL_DIR) $(TOOLCHAIN_DIR)/sbin - $(INSTALL_BIN) \ - $(HOST_BUILD_DIR)/utils/ldconfig \ - $(TOOLCHAIN_DIR)/sbin/ -endef - -$(eval $(call HostBuild)) diff --git a/toolchain-old/wrapper/Makefile b/toolchain-old/wrapper/Makefile deleted file mode 100644 index 3398e407c9f2b2..00000000000000 --- a/toolchain-old/wrapper/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# -# Copyright (C) 2012 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=wrapper -PKG_VERSION:=1 - -include $(INCLUDE_DIR)/toolchain-build.mk - - -# 1: args -define toolchain_util -$(strip $(SCRIPT_DIR)/ext-toolchain.sh --toolchain $(CONFIG_TOOLCHAIN_ROOT) \ - --cflags $(CONFIG_TARGET_OPTIMIZATION) \ - --cflags "$(if $(call qstrip,$(CONFIG_TOOLCHAIN_LIBC)),-m$(call qstrip,$(CONFIG_TOOLCHAIN_LIBC))) $(if $(CONFIG_SOFT_FLOAT),-msoft-float)" \ - --cflags "$(patsubst ./%,-I$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_INC_PATH)))" \ - --cflags "$(patsubst ./%,-L$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_LIB_PATH)))" \ - $(1)) -endef - -# 1: config symbol -# 2: feature -define toolchain_test -$$(if $$($(1)), \ - @echo -n "Testing external toolchain for $(2) support ... "; \ - if $(call toolchain_util,--test "$(2)"); then \ - echo "ok"; exit 0; \ - else \ - echo "failed"; \ - echo "ERROR: $(1) is enabled but the external toolchain does not support it"; \ - exit 1; \ - fi) -endef - - -define Host/Prepare - $(call toolchain_test,CONFIG_SOFT_FLOAT,softfloat) - $(call toolchain_test,CONFIG_IPV6,ipv6) - $(call toolchain_test,CONFIG_NLS,wchar) - $(call toolchain_test,CONFIG_PACKAGE_libpthread,threads) -endef - -define Host/Configure -endef - -define Host/Compile -endef - -define Host/Install - $(call toolchain_util,--wrap "$(TOOLCHAIN_DIR)/bin") -endef - -define Host/Clean - rm -rf $(TOOLCHAIN_DIR)/bin -endef - -$(eval $(call HostBuild)) diff --git a/toolchain-old/yasm/Makefile b/toolchain-old/yasm/Makefile deleted file mode 100644 index e5cdac6fe9898d..00000000000000 --- a/toolchain-old/yasm/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# -# Copyright (C) 2016 Daniel Golle -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -include $(TOPDIR)/rules.mk - -PKG_NAME:=yasm -PKG_VERSION:=1.3.0 - -PKG_SOURCE_URL:=http://www.tortall.net/projects/yasm/releases/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz - -PKG_HASH:=3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f - -HOST_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/toolchain-build.mk - -YASM_CONFIGURE:= \ - ./configure \ - --prefix=$(TOOLCHAIN_DIR) \ - --build=$(GNU_HOST_NAME) \ - --host=$(GNU_HOST_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --with-sysroot=$(TOOLCHAIN_DIR) \ - --disable-multilib \ - --disable-werror \ - --disable-nls \ - --disable-sim \ - --disable-gdb \ - $(SOFT_FLOAT_CONFIG_OPTION) \ - -define Host/Prepare - $(call Host/Prepare/Default) - ln -snf $(notdir $(HOST_BUILD_DIR)) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) - $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_BUILD_DIR)/ -endef - -define Host/Configure - (cd $(HOST_BUILD_DIR); \ - $(YASM_CONFIGURE) \ - ); -endef - -define Host/Compile - +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) all -endef - -define Host/Install - $(MAKE) -C $(HOST_BUILD_DIR) \ - prefix=$(TOOLCHAIN_DIR) \ - install -endef - -define Host/Clean - rm -rf \ - $(HOST_BUILD_DIR) \ - $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) -endef - -$(eval $(call HostBuild)) diff --git a/tools/Makefile b/tools/Makefile index a95342f50e7a15..50bd552d75c91e 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -29,7 +29,6 @@ tools-y += mm-macros missing-macros cmake scons bc findutils gengetopt patchelf tools-y += mtools dosfstools libressl tools-$(CONFIG_TARGET_orion_generic) += wrt350nv2-builder upslug2 tools-$(CONFIG_TARGET_x86) += qemu -tools-$(CONFIG_EFI_IMAGES) += popt gptfdisk tools-$(CONFIG_TARGET_mxs) += elftosb sdimage tools-$(CONFIG_TARGET_ar71xx) += lzma-old squashfs tools-$(CONFIG_USES_MINOR) += kernel2minor @@ -72,7 +71,6 @@ $(curdir)/libressl/compile := $(curdir)/pkg-config/compile $(curdir)/mkimage/compile += $(curdir)/libressl/compile $(curdir)/firmware-utils/compile += $(curdir)/libressl/compile $(curdir)/cmake/compile += $(curdir)/libressl/compile -$(curdir)/gptfdisk/compile += $(curdir)/popt/compile $(curdir)/e2fsprogs/compile ifneq ($(HOST_OS),Linux) tools-y += coreutils diff --git a/tools/automake/Makefile b/tools/automake/Makefile index 2e618f9974aae5..c016f1d76a6ef9 100644 --- a/tools/automake/Makefile +++ b/tools/automake/Makefile @@ -7,6 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=automake +PKG_CPE_ID:=cpe:/a:gnu:automake PKG_VERSION:=1.15.1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz diff --git a/tools/cmake/Makefile b/tools/cmake/Makefile index a94942f84c9953..22e5d3e858ef79 100644 --- a/tools/cmake/Makefile +++ b/tools/cmake/Makefile @@ -7,12 +7,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cmake -PKG_VERSION:=3.8.1 +PKG_VERSION:=3.9.3 +PKG_CPE_ID:=cpe:/a:kitware:cmake PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://cmake.org/files/v3.8/ \ +PKG_SOURCE_URL:=https://cmake.org/files/v3.9/ \ https://fossies.org/linux/misc/ -PKG_HASH:=ce5d9161396e06501b00e52933783150a87c33080d4bdcef461b5b7fd24ac228 +PKG_HASH:=8eaf75e1e932159aae98ab5e7491499545554be62a08cbcbc7c75c84b999f28a HOST_BUILD_PARALLEL:=1 HOST_CONFIGURE_PARALLEL:=1 diff --git a/tools/cmake/patches/010-backport-macos-fix.patch b/tools/cmake/patches/010-backport-macos-fix.patch new file mode 100644 index 00000000000000..76e92dcb0ef332 --- /dev/null +++ b/tools/cmake/patches/010-backport-macos-fix.patch @@ -0,0 +1,15 @@ +--- a/Source/kwsys/kwsysPlatformTestsCXX.cxx ++++ b/Source/kwsys/kwsysPlatformTestsCXX.cxx +@@ -265,6 +265,12 @@ int main() + #ifdef TEST_KWSYS_CXX_HAS_UTIMENSAT + #include + #include ++#if defined(__APPLE__) ++#include ++#if MAC_OS_X_VERSION_MIN_REQUIRED < 101300 ++#error "utimensat not available on macOS < 10.13" ++#endif ++#endif + int main() + { + struct timespec times[2] = { { 0, UTIME_OMIT }, { 0, UTIME_NOW } }; diff --git a/tools/cmake/patches/100-disable_qt_tests.patch b/tools/cmake/patches/100-disable_qt_tests.patch index 54a75bc7762f44..f8baafe3331bf9 100644 --- a/tools/cmake/patches/100-disable_qt_tests.patch +++ b/tools/cmake/patches/100-disable_qt_tests.patch @@ -1,6 +1,6 @@ --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt -@@ -244,15 +244,6 @@ add_RunCMake_test(no_install_prefix) +@@ -246,15 +246,6 @@ add_RunCMake_test(no_install_prefix) add_RunCMake_test(configure_file) add_RunCMake_test(CTestTimeoutAfterMatch) @@ -18,7 +18,7 @@ add_RunCMake_test(FindPkgConfig) --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt -@@ -398,10 +398,6 @@ if(BUILD_TESTING) +@@ -403,10 +403,6 @@ if(BUILD_TESTING) list(APPEND TEST_BUILD_DIRS ${CMake_TEST_INSTALL_PREFIX}) diff --git a/tools/cmake/patches/120-alpine_musl-compat.patch b/tools/cmake/patches/110-alpine_musl-compat.patch similarity index 100% rename from tools/cmake/patches/120-alpine_musl-compat.patch rename to tools/cmake/patches/110-alpine_musl-compat.patch diff --git a/tools/cmake/patches/110-freebsd-compat.patch b/tools/cmake/patches/110-freebsd-compat.patch deleted file mode 100644 index 4f110784612934..00000000000000 --- a/tools/cmake/patches/110-freebsd-compat.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 6eab64c3adc7a38c322cd4d9a1a1881f2d49cb9c Mon Sep 17 00:00:00 2001 -From: Raphael Kubo da Costa -Date: Tue, 15 Oct 2013 00:10:56 +0300 -Subject: [PATCH] SystemInformation: Include backtrace-related headers on - FreeBSD - -This was probably broken for a long while, but the problem was not apparent -because the check for execinfo.h would fail by default because --I/usr/local/include was not being passed to the compiler when making the -checks for the header's existence. - -Now that very recent FreeBSD versions (ie. 10-CURRENT) have NetBSD's -libexecinfo in base (and it is thus installed into /usr), the -backtrace-related checks would pass, but the required headers were not being -included in SystemInformation.cxx. - -Change-Id: I3b91ed7ac0e6878035aee202b3336c536cc6d2ff ---- - Source/kwsys/SystemInformation.cxx | 9 +++++++++ - 1 file changed, 9 insertions(+) - ---- a/Source/kwsys/SystemInformation.cxx -+++ b/Source/kwsys/SystemInformation.cxx -@@ -82,6 +82,15 @@ typedef int siginfo_t; - #include - #define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN - #endif -+# if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE) -+# include -+# if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE) -+# include -+# endif -+# if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP) -+# include -+# endif -+# endif - #endif - - #if defined(KWSYS_SYS_HAS_MACHINE_CPU_H) diff --git a/tools/cmake/patches/130-libarchive-fix-libressl-compat.patch b/tools/cmake/patches/120-libarchive-fix-libressl-compat.patch similarity index 100% rename from tools/cmake/patches/130-libarchive-fix-libressl-compat.patch rename to tools/cmake/patches/120-libarchive-fix-libressl-compat.patch diff --git a/tools/cmake/patches/140-curl-fix-libressl-linking.patch b/tools/cmake/patches/130-curl-fix-libressl-linking.patch similarity index 69% rename from tools/cmake/patches/140-curl-fix-libressl-linking.patch rename to tools/cmake/patches/130-curl-fix-libressl-linking.patch index c16e927ff3fb8a..b5ee61b58a4af1 100644 --- a/tools/cmake/patches/140-curl-fix-libressl-linking.patch +++ b/tools/cmake/patches/130-curl-fix-libressl-linking.patch @@ -17,16 +17,17 @@ Modify the cmcurl CMakeLists.txt to check for clock_gettime() in librt and unconditionally link the rt library when the symbol is found. Signed-off-by: Jo-Philipp Wich +--- --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt -@@ -374,6 +374,10 @@ set(HAVE_LIBSSL OFF) - if(CMAKE_USE_OPENSSL) - find_package(OpenSSL) - if(OPENSSL_FOUND) -+ check_library_exists("rt" clock_gettime "" HAVE_LIBRT) -+ if(HAVE_LIBRT) -+ list(APPEND OPENSSL_LIBRARIES rt) -+ endif() - list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES}) - set(USE_OPENSSL ON) - set(HAVE_LIBCRYPTO ON) +@@ -456,6 +456,10 @@ if(CMAKE_USE_OPENSSL) + set(USE_OPENSSL ON) + set(HAVE_LIBCRYPTO ON) + set(HAVE_LIBSSL ON) ++ check_library_exists("rt" clock_gettime "" HAVE_LIBRT) ++ if(HAVE_LIBRT) ++ list(APPEND OPENSSL_LIBRARIES rt) ++ endif() + list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES}) + include_directories(${OPENSSL_INCLUDE_DIR}) + set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) diff --git a/tools/cmake/patches/150-bootstrap_parallel_make_flag.patch b/tools/cmake/patches/140-bootstrap_parallel_make_flag.patch similarity index 89% rename from tools/cmake/patches/150-bootstrap_parallel_make_flag.patch rename to tools/cmake/patches/140-bootstrap_parallel_make_flag.patch index 4d432dcc1ef8d7..734e8cb1cc8170 100644 --- a/tools/cmake/patches/150-bootstrap_parallel_make_flag.patch +++ b/tools/cmake/patches/140-bootstrap_parallel_make_flag.patch @@ -1,6 +1,6 @@ --- a/bootstrap +++ b/bootstrap -@@ -1046,7 +1046,10 @@ int main(){ printf("1%c", (char)0x0a); r +@@ -1094,7 +1094,10 @@ int main(){ printf("1%c", (char)0x0a); r ' > "test.c" cmake_original_make_flags="${cmake_make_flags}" if [ "x${cmake_parallel_make}" != "x" ]; then diff --git a/tools/coreutils/Makefile b/tools/coreutils/Makefile index 1acdfb91604915..4109fd77b37374 100644 --- a/tools/coreutils/Makefile +++ b/tools/coreutils/Makefile @@ -7,6 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=coreutils +PKG_CPE_ID:=cpe:/a:gnu:coreutils PKG_VERSION:=8.27 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz @@ -15,14 +16,14 @@ PKG_HASH:=8891d349ee87b9ff7870f52b6d9312a9db672d2439d289bc57084771ca21656b HOST_BUILD_PARALLEL := 1 -BUILD_PROGRAMS = date +BUILD_PROGRAMS = date readlink include $(INCLUDE_DIR)/host-build.mk BUILD_BINS = $(patsubst %,src/%,$(BUILD_PROGRAMS)) HOST_CONFIGURE_ARGS += \ - --enable-install-program=date + --enable-install-program=$(subst $(space),$(comma),$(strip $(BUILD_PROGRAMS))) HOST_MAKE_FLAGS += \ PROGRAMS="$(BUILD_BINS)" \ diff --git a/tools/dosfstools/Makefile b/tools/dosfstools/Makefile index 861dcbf1c74932..e34ceaf32be68c 100644 --- a/tools/dosfstools/Makefile +++ b/tools/dosfstools/Makefile @@ -8,6 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dosfstools +PKG_CPE_ID:=cpe:/a:dosfstools_project:dosfstools PKG_VERSION:=4.1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz diff --git a/tools/e2fsprogs/Makefile b/tools/e2fsprogs/Makefile index 04befc9c809da0..36f5c547b880b2 100644 --- a/tools/e2fsprogs/Makefile +++ b/tools/e2fsprogs/Makefile @@ -8,8 +8,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=e2fsprogs -PKG_VERSION:=1.43.5 -PKG_HASH:=261f3d9ade383fbf032a19140c9c25e998cc0f71a1ae686614fb3ae0eb955a17 +PKG_CPE_ID:=cpe:/a:e2fsprogs_project:e2fsprogs +PKG_VERSION:=1.43.7 +PKG_HASH:=2a6367289047d68d9ba6a46cf89ab9a1efd0556cde02a51ebaf414ff51edded9 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz diff --git a/tools/e2fsprogs/patches/005-darwin-compat.patch b/tools/e2fsprogs/patches/004-darwin-compat.patch similarity index 100% rename from tools/e2fsprogs/patches/005-darwin-compat.patch rename to tools/e2fsprogs/patches/004-darwin-compat.patch diff --git a/tools/e2fsprogs/patches/004-freebsd-compat.patch b/tools/e2fsprogs/patches/004-freebsd-compat.patch deleted file mode 100644 index d102e1cd9c0966..00000000000000 --- a/tools/e2fsprogs/patches/004-freebsd-compat.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/lib/ext2fs/tdb.c -+++ b/lib/ext2fs/tdb.c -@@ -58,7 +58,9 @@ Last Changed Date: 2007-06-22 13:36:10 - - #include - #endif - #include -+#ifndef __FreeBSD__ - #include -+#endif - #include - - #ifdef HAVE_SYS_MMAN_H diff --git a/tools/e2fsprogs/patches/010-old-libmagic.patch b/tools/e2fsprogs/patches/010-old-libmagic.patch deleted file mode 100644 index 11a7e180be8cb5..00000000000000 --- a/tools/e2fsprogs/patches/010-old-libmagic.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b482eb7af94885b6bbad9329e40702c958d5b448 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Thu, 30 Jun 2016 19:53:03 +0200 -Subject: [PATCH] fix build problem with very old libmagic - -The libmagic shipped with RedHat 5 does not define -MAGIC_NO_CHECK_ELF and MAGIC_NO_CHECK_COMPRESS. e2fsprogs should -check for that otherwise the build will fail. - -Signed-off-by: Hauke Mehrtens ---- - lib/support/plausible.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/lib/support/plausible.c -+++ b/lib/support/plausible.c -@@ -258,7 +258,7 @@ int check_plausibility(const char *devic - return 0; - } - --#ifdef HAVE_MAGIC_H -+#if defined(HAVE_MAGIC_H) && defined(MAGIC_NO_CHECK_ELF) && defined(MAGIC_NO_CHECK_COMPRESS) - if ((flags & CHECK_FS_EXIST) && - !getenv("E2FSPROGS_LIBMAGIC_SUPPRESS") && - magic_library_available()) { diff --git a/tools/expat/Makefile b/tools/expat/Makefile index 1f856c9117bad9..fab04e011faad0 100644 --- a/tools/expat/Makefile +++ b/tools/expat/Makefile @@ -8,10 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=expat -PKG_VERSION:=2.2.3 +PKG_CPE_ID:=cpe:/a:libexpat:expat +PKG_VERSION:=2.2.5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_HASH:=b31890fb02f85c002a67491923f89bda5028a880fd6c374f707193ad81aace5f +PKG_HASH:=d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6 PKG_SOURCE_URL:=@SF/expat HOST_BUILD_PARALLEL:=1 diff --git a/tools/findutils/Makefile b/tools/findutils/Makefile index b07c53d9f674e8..c1c45eeaabd052 100644 --- a/tools/findutils/Makefile +++ b/tools/findutils/Makefile @@ -7,6 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=findutils +PKG_CPE_ID:=cpe:/a:gnu:findutils PKG_VERSION:=4.6.0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz diff --git a/tools/findutils/patches/100-include_sysmacros.patch b/tools/findutils/patches/100-include_sysmacros.patch new file mode 100644 index 00000000000000..82b1ee9a42b572 --- /dev/null +++ b/tools/findutils/patches/100-include_sysmacros.patch @@ -0,0 +1,13 @@ +--- a/gl/lib/mountlist.c ++++ b/gl/lib/mountlist.c +@@ -17,6 +17,10 @@ + + #include + ++#ifdef MAJOR_IN_SYSMACROS ++# include ++#endif ++ + #include "mountlist.h" + + #include diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile index 4f1f8d70f5fd9b..ca41387b5eb8e2 100644 --- a/tools/firmware-utils/Makefile +++ b/tools/firmware-utils/Makefile @@ -20,6 +20,7 @@ define Host/Compile $(call cc,addpattern) $(call cc,asustrx) $(call cc,trx) + $(call cc,otrx) $(call cc,motorola-bin) $(call cc,dgfirmware) $(call cc,mksenaofw md5) @@ -39,8 +40,8 @@ define Host/Compile $(call cc,encode_crc) $(call cc,nand_ecc) $(call cc,mkplanexfw sha1) - $(call cc,mktplinkfw md5, -Wall) - $(call cc,mktplinkfw2 md5) + $(call cc,mktplinkfw mktplinkfw-lib md5, -Wall -fgnu89-inline) + $(call cc,mktplinkfw2 mktplinkfw-lib md5, -fgnu89-inline) $(call cc,tplink-safeloader md5, -Wall) $(call cc,pc1crypt) $(call cc,osbridge-crc) diff --git a/tools/firmware-utils/src/mktplinkfw-lib.c b/tools/firmware-utils/src/mktplinkfw-lib.c new file mode 100644 index 00000000000000..e3213274c19c57 --- /dev/null +++ b/tools/firmware-utils/src/mktplinkfw-lib.c @@ -0,0 +1,265 @@ +/* + * Copyright (C) 2009 Gabor Juhos + * + * This tool was based on: + * TP-Link WR941 V2 firmware checksum fixing tool. + * Copyright (C) 2008,2009 Wang Jian + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + * + */ + +#include +#include +#include +#include +#include /* for unlink() */ +#include +#include /* for getopt() */ +#include +#include +#include +#include +#include + +#include +#include + +#include "mktplinkfw-lib.h" +#include "md5.h" + +extern char *ofname; +extern char *progname; +extern uint32_t kernel_len; +extern struct file_info kernel_info; +extern struct file_info rootfs_info; +extern struct flash_layout *layout; +extern uint32_t rootfs_ofs; +extern uint32_t rootfs_align; +extern int combined; +extern int strip_padding; +extern int add_jffs2_eof; + +static unsigned char jffs2_eof_mark[4] = {0xde, 0xad, 0xc0, 0xde}; + +void fill_header(char *buf, int len); + +struct flash_layout *find_layout(struct flash_layout *layouts, const char *id) +{ + struct flash_layout *ret; + struct flash_layout *l; + + ret = NULL; + for (l = layouts; l->id != NULL; l++){ + if (strcasecmp(id, l->id) == 0) { + ret = l; + break; + } + }; + + return ret; +} + +void get_md5(const char *data, int size, uint8_t *md5) +{ + MD5_CTX ctx; + + MD5_Init(&ctx); + MD5_Update(&ctx, data, size); + MD5_Final(md5, &ctx); +} + +int get_file_stat(struct file_info *fdata) +{ + struct stat st; + int res; + + if (fdata->file_name == NULL) + return 0; + + res = stat(fdata->file_name, &st); + if (res){ + ERRS("stat failed on %s", fdata->file_name); + return res; + } + + fdata->file_size = st.st_size; + return 0; +} + +int read_to_buf(const struct file_info *fdata, char *buf) +{ + FILE *f; + int ret = EXIT_FAILURE; + + f = fopen(fdata->file_name, "r"); + if (f == NULL) { + ERRS("could not open \"%s\" for reading", fdata->file_name); + goto out; + } + + errno = 0; + fread(buf, fdata->file_size, 1, f); + if (errno != 0) { + ERRS("unable to read from file \"%s\"", fdata->file_name); + goto out_close; + } + + ret = EXIT_SUCCESS; + +out_close: + fclose(f); +out: + return ret; +} + +static int pad_jffs2(char *buf, int currlen, int maxlen) +{ + int len; + uint32_t pad_mask; + + len = currlen; + pad_mask = (4 * 1024) | (64 * 1024); /* EOF at 4KB and at 64KB */ + while ((len < maxlen) && (pad_mask != 0)) { + uint32_t mask; + int i; + + for (i = 10; i < 32; i++) { + mask = 1 << i; + if (pad_mask & mask) + break; + } + + len = ALIGN(len, mask); + + for (i = 10; i < 32; i++) { + mask = 1 << i; + if ((len & (mask - 1)) == 0) + pad_mask &= ~mask; + } + + for (i = 0; i < sizeof(jffs2_eof_mark); i++) + buf[len + i] = jffs2_eof_mark[i]; + + len += sizeof(jffs2_eof_mark); + } + + return len; +} + +int write_fw(const char *ofname, const char *data, int len) +{ + FILE *f; + int ret = EXIT_FAILURE; + + f = fopen(ofname, "w"); + if (f == NULL) { + ERRS("could not open \"%s\" for writing", ofname); + goto out; + } + + errno = 0; + fwrite(data, len, 1, f); + if (errno) { + ERRS("unable to write output file"); + goto out_flush; + } + + DBG("firmware file \"%s\" completed", ofname); + + ret = EXIT_SUCCESS; + +out_flush: + fflush(f); + fclose(f); + if (ret != EXIT_SUCCESS) { + unlink(ofname); + } +out: + return ret; +} + +/* Helper functions to inspect_fw() representing different output formats */ +inline void inspect_fw_pstr(const char *label, const char *str) +{ + printf("%-23s: %s\n", label, str); +} + +inline void inspect_fw_phex(const char *label, uint32_t val) +{ + printf("%-23s: 0x%08x\n", label, val); +} + +inline void inspect_fw_phexdec(const char *label, uint32_t val) +{ + printf("%-23s: 0x%08x / %8u bytes\n", label, val, val); +} + +inline void inspect_fw_pmd5sum(const char *label, const uint8_t *val, const char *text) +{ + int i; + + printf("%-23s:", label); + for (i=0; ifw_max_len; + + buf = malloc(buflen); + if (!buf) { + ERR("no memory for buffer\n"); + goto out; + } + + memset(buf, 0xff, buflen); + p = buf + header_size; + ret = read_to_buf(&kernel_info, p); + if (ret) + goto out_free_buf; + + if (!combined) { + p = buf + rootfs_ofs; + + ret = read_to_buf(&rootfs_info, p); + if (ret) + goto out_free_buf; + + writelen = rootfs_ofs + rootfs_info.file_size; + + if (add_jffs2_eof) + writelen = pad_jffs2(buf, writelen, layout->fw_max_len); + } + + if (!strip_padding) + writelen = buflen; + + fill_header(buf, writelen); + ret = write_fw(ofname, buf, writelen); + if (ret) + goto out_free_buf; + + ret = EXIT_SUCCESS; + +out_free_buf: + free(buf); +out: + return ret; +} diff --git a/tools/firmware-utils/src/mktplinkfw-lib.h b/tools/firmware-utils/src/mktplinkfw-lib.h new file mode 100644 index 00000000000000..31e6d0b1e6b224 --- /dev/null +++ b/tools/firmware-utils/src/mktplinkfw-lib.h @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2009 Gabor Juhos + * + * This tool was based on: + * TP-Link WR941 V2 firmware checksum fixing tool. + * Copyright (C) 2008,2009 Wang Jian + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + * + */ + + +#ifndef mktplinkfw_lib_h +#define mktplinkfw_lib_h + +#define ALIGN(x,a) ({ typeof(a) __a = (a); (((x) + __a - 1) & ~(__a - 1)); }) +#define ARRAY_SIZE(a) (sizeof((a)) / sizeof((a)[0])) + +#define MD5SUM_LEN 16 + +/* + * Message macros + */ +#define ERR(fmt, ...) do { \ + fflush(0); \ + fprintf(stderr, "[%s] *** error: " fmt "\n", \ + progname, ## __VA_ARGS__ ); \ +} while (0) + +#define ERRS(fmt, ...) do { \ + int save = errno; \ + fflush(0); \ + fprintf(stderr, "[%s] *** error: " fmt ": %s\n", \ + progname, ## __VA_ARGS__, strerror(save)); \ +} while (0) + +#define DBG(fmt, ...) do { \ + fprintf(stderr, "[%s] " fmt "\n", progname, ## __VA_ARGS__ ); \ +} while (0) + + +struct file_info { + char *file_name; /* name of the file */ + uint32_t file_size; /* length of the file */ +}; + +struct flash_layout { + char *id; + uint32_t fw_max_len; + uint32_t kernel_la; + uint32_t kernel_ep; + uint32_t rootfs_ofs; +}; + +struct flash_layout *find_layout(struct flash_layout *layouts, const char *id); +void get_md5(const char *data, int size, uint8_t *md5); +int get_file_stat(struct file_info *fdata); +int read_to_buf(const struct file_info *fdata, char *buf); +int write_fw(const char *ofname, const char *data, int len); +inline void inspect_fw_pstr(const char *label, const char *str); +inline void inspect_fw_phex(const char *label, uint32_t val); +inline void inspect_fw_phexdec(const char *label, uint32_t val); +inline void inspect_fw_pmd5sum(const char *label, const uint8_t *val, const char *text); +int build_fw(size_t header_size); + +#endif /* mktplinkfw_lib_h */ diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c index c5378620500b60..ab5fd6d58b1ebe 100644 --- a/tools/firmware-utils/src/mktplinkfw.c +++ b/tools/firmware-utils/src/mktplinkfw.c @@ -28,20 +28,11 @@ #include #include "md5.h" - -#define ALIGN(x,a) ({ typeof(a) __a = (a); (((x) + __a - 1) & ~(__a - 1)); }) -#define ARRAY_SIZE(a) (sizeof((a)) / sizeof((a)[0])) +#include "mktplinkfw-lib.h" #define HEADER_VERSION_V1 0x01000000 #define HEADER_VERSION_V2 0x02000000 -#define MD5SUM_LEN 16 - -struct file_info { - char *file_name; /* name of the file */ - uint32_t file_size; /* length of the file */ -}; - struct fw_header { uint32_t version; /* header version */ char vendor_name[24]; @@ -71,14 +62,6 @@ struct fw_header { uint8_t pad2[160]; } __attribute__ ((packed)); -struct flash_layout { - char *id; - uint32_t fw_max_len; - uint32_t kernel_la; - uint32_t kernel_ep; - uint32_t rootfs_ofs; -}; - struct fw_region { char name[4]; uint32_t code; @@ -88,15 +71,15 @@ struct fw_region { /* * Globals */ -static char *ofname; -static char *progname; +char *ofname; +char *progname; static char *vendor = "TP-LINK Technologies"; static char *version = "ver. 1.0"; static char *fw_ver = "0.0.0"; static uint32_t hdr_ver = HEADER_VERSION_V1; static char *layout_id; -static struct flash_layout *layout; +struct flash_layout *layout; static char *opt_hw_id; static uint32_t hw_id; static char *opt_hw_rev; @@ -107,18 +90,17 @@ static const struct fw_region *region; static int fw_ver_lo; static int fw_ver_mid; static int fw_ver_hi; -static struct file_info kernel_info; +struct file_info kernel_info; static uint32_t kernel_la = 0; static uint32_t kernel_ep = 0; -static uint32_t kernel_len = 0; -static struct file_info rootfs_info; -static uint32_t rootfs_ofs = 0; -static uint32_t rootfs_align; +uint32_t kernel_len = 0; +struct file_info rootfs_info; +uint32_t rootfs_ofs = 0; +uint32_t rootfs_align; static struct file_info boot_info; -static int combined; -static int strip_padding; -static int add_jffs2_eof; -static unsigned char jffs2_eof_mark[4] = {0xde, 0xad, 0xc0, 0xde}; +int combined; +int strip_padding; +int add_jffs2_eof; static uint32_t fw_max_len; static uint32_t reserved_space; @@ -188,44 +170,9 @@ static const struct fw_region regions[] = { /* Default region (universal) uses code 0 as well */ {"US", 1}, {"EU", 0}, + {"BR", 0}, }; -/* - * Message macros - */ -#define ERR(fmt, ...) do { \ - fflush(0); \ - fprintf(stderr, "[%s] *** error: " fmt "\n", \ - progname, ## __VA_ARGS__ ); \ -} while (0) - -#define ERRS(fmt, ...) do { \ - int save = errno; \ - fflush(0); \ - fprintf(stderr, "[%s] *** error: " fmt ": %s\n", \ - progname, ## __VA_ARGS__, strerror(save)); \ -} while (0) - -#define DBG(fmt, ...) do { \ - fprintf(stderr, "[%s] " fmt "\n", progname, ## __VA_ARGS__ ); \ -} while (0) - -static struct flash_layout *find_layout(const char *id) -{ - struct flash_layout *ret; - struct flash_layout *l; - - ret = NULL; - for (l = layouts; l->id != NULL; l++){ - if (strcasecmp(id, l->id) == 0) { - ret = l; - break; - } - }; - - return ret; -} - static const struct fw_region * find_region(const char *country) { size_t i; @@ -271,59 +218,6 @@ static void usage(int status) exit(status); } -static void get_md5(const char *data, int size, uint8_t *md5) -{ - MD5_CTX ctx; - - MD5_Init(&ctx); - MD5_Update(&ctx, data, size); - MD5_Final(md5, &ctx); -} - -static int get_file_stat(struct file_info *fdata) -{ - struct stat st; - int res; - - if (fdata->file_name == NULL) - return 0; - - res = stat(fdata->file_name, &st); - if (res){ - ERRS("stat failed on %s", fdata->file_name); - return res; - } - - fdata->file_size = st.st_size; - return 0; -} - -static int read_to_buf(const struct file_info *fdata, char *buf) -{ - FILE *f; - int ret = EXIT_FAILURE; - - f = fopen(fdata->file_name, "r"); - if (f == NULL) { - ERRS("could not open \"%s\" for reading", fdata->file_name); - goto out; - } - - errno = 0; - fread(buf, fdata->file_size, 1, f); - if (errno != 0) { - ERRS("unable to read from file \"%s\"", fdata->file_name); - goto out_close; - } - - ret = EXIT_SUCCESS; - - out_close: - fclose(f); - out: - return ret; -} - static int check_options(void) { int ret; @@ -370,7 +264,7 @@ static int check_options(void) return -1; } } else { - layout = find_layout(layout_id); + layout = find_layout(layouts, layout_id); if (layout == NULL) { ERR("unknown flash layout \"%s\"", layout_id); return -1; @@ -414,10 +308,10 @@ static int check_options(void) if (rootfs_align) { kernel_len += sizeof(struct fw_header); - kernel_len = ALIGN(kernel_len, rootfs_align); + rootfs_ofs = ALIGN(kernel_len, rootfs_align); kernel_len -= sizeof(struct fw_header); - DBG("kernel length aligned to %u", kernel_len); + DBG("rootfs offset aligned to 0x%u", rootfs_ofs); exceed_bytes = kernel_len + rootfs_info.file_size - (fw_max_len - sizeof(struct fw_header)); if (exceed_bytes > 0) { @@ -462,7 +356,7 @@ static int check_options(void) return 0; } -static void fill_header(char *buf, int len) +void fill_header(char *buf, int len) { struct fw_header *hdr = (struct fw_header *)buf; @@ -515,161 +409,6 @@ static void fill_header(char *buf, int len) get_md5(buf, len, hdr->md5sum1); } -static int pad_jffs2(char *buf, int currlen) -{ - int len; - uint32_t pad_mask; - - len = currlen; - pad_mask = (64 * 1024); - while ((len < layout->fw_max_len) && (pad_mask != 0)) { - uint32_t mask; - int i; - - for (i = 10; i < 32; i++) { - mask = 1 << i; - if (pad_mask & mask) - break; - } - - len = ALIGN(len, mask); - - for (i = 10; i < 32; i++) { - mask = 1 << i; - if ((len & (mask - 1)) == 0) - pad_mask &= ~mask; - } - - for (i = 0; i < sizeof(jffs2_eof_mark); i++) - buf[len + i] = jffs2_eof_mark[i]; - - len += sizeof(jffs2_eof_mark); - } - - return len; -} - -static int write_fw(const char *data, int len) -{ - FILE *f; - int ret = EXIT_FAILURE; - - f = fopen(ofname, "w"); - if (f == NULL) { - ERRS("could not open \"%s\" for writing", ofname); - goto out; - } - - errno = 0; - fwrite(data, len, 1, f); - if (errno) { - ERRS("unable to write output file"); - goto out_flush; - } - - DBG("firmware file \"%s\" completed", ofname); - - ret = EXIT_SUCCESS; - - out_flush: - fflush(f); - fclose(f); - if (ret != EXIT_SUCCESS) { - unlink(ofname); - } - out: - return ret; -} - -static int build_fw(void) -{ - int buflen; - char *buf; - char *p; - int ret = EXIT_FAILURE; - int writelen = 0; - - writelen = sizeof(struct fw_header) + kernel_len; - - if (combined) - buflen = writelen; - else - buflen = layout->fw_max_len; - - buf = malloc(buflen); - if (!buf) { - ERR("no memory for buffer\n"); - goto out; - } - - memset(buf, 0xff, buflen); - p = buf + sizeof(struct fw_header); - ret = read_to_buf(&kernel_info, p); - if (ret) - goto out_free_buf; - - - if (!combined) { - if (rootfs_align) - p = buf + writelen; - else - p = buf + rootfs_ofs; - - ret = read_to_buf(&rootfs_info, p); - if (ret) - goto out_free_buf; - - if (rootfs_align) - writelen += rootfs_info.file_size; - else - writelen = rootfs_ofs + rootfs_info.file_size; - - if (add_jffs2_eof) - writelen = pad_jffs2(buf, writelen); - } - - if (!strip_padding) - writelen = buflen; - - fill_header(buf, writelen); - ret = write_fw(buf, writelen); - if (ret) - goto out_free_buf; - - ret = EXIT_SUCCESS; - - out_free_buf: - free(buf); - out: - return ret; -} - -/* Helper functions to inspect_fw() representing different output formats */ -static inline void inspect_fw_pstr(const char *label, const char *str) -{ - printf("%-23s: %s\n", label, str); -} - -static inline void inspect_fw_phex(const char *label, uint32_t val) -{ - printf("%-23s: 0x%08x\n", label, val); -} - -static inline void inspect_fw_phexdec(const char *label, uint32_t val) -{ - printf("%-23s: 0x%08x / %8u bytes\n", label, val, val); -} - -static inline void inspect_fw_pmd5sum(const char *label, const uint8_t *val, const char *text) -{ - int i; - - printf("%-23s:", label); - for (i=0; i #include "md5.h" - -#define ALIGN(x,a) ({ typeof(a) __a = (a); (((x) + __a - 1) & ~(__a - 1)); }) - -#define MD5SUM_LEN 16 - -struct file_info { - char *file_name; /* name of the file */ - uint32_t file_size; /* length of the file */ -}; +#include "mktplinkfw-lib.h" struct fw_header { uint32_t version; /* 0x00: header version */ @@ -68,14 +60,6 @@ struct fw_header { uint8_t pad[364]; } __attribute__ ((packed)); -struct flash_layout { - char *id; - uint32_t fw_max_len; - uint32_t kernel_la; - uint32_t kernel_ep; - uint32_t rootfs_ofs; -}; - #define FLAG_LE_KERNEL_LA_EP 0x00000001 /* Little-endian used for kernel load address & entry point */ struct board_info { @@ -91,8 +75,8 @@ struct board_info { /* * Globals */ -static char *ofname; -static char *progname; +char *ofname; +char *progname; static char *vendor = "TP-LINK Technologies"; static char *version = "ver. 1.0"; static char *fw_ver = "0.0.0"; @@ -101,10 +85,9 @@ static uint32_t hdr_ver = 2; static struct board_info custom_board; -static char *board_id; static struct board_info *board; static char *layout_id; -static struct flash_layout *layout; +struct flash_layout *layout; static char *opt_hw_id; static char *opt_hw_rev; static char *opt_hw_ver_add; @@ -113,18 +96,17 @@ static int fw_ver_mid; static int fw_ver_hi; static int sver_lo; static int sver_hi; -static struct file_info kernel_info; +struct file_info kernel_info; static uint32_t kernel_la = 0; static uint32_t kernel_ep = 0; -static uint32_t kernel_len = 0; -static struct file_info rootfs_info; -static uint32_t rootfs_ofs = 0; -static uint32_t rootfs_align; +uint32_t kernel_len = 0; +struct file_info rootfs_info; +uint32_t rootfs_ofs = 0; +uint32_t rootfs_align; static struct file_info boot_info; -static int combined; -static int strip_padding; -static int add_jffs2_eof; -static unsigned char jffs2_eof_mark[4] = {0xde, 0xad, 0xc0, 0xde}; +int combined; +int strip_padding; +int add_jffs2_eof; static struct file_info inspect_info; static int extract = 0; @@ -141,6 +123,12 @@ char md5salt_boot[MD5SUM_LEN] = { static struct flash_layout layouts[] = { { + .id = "4Mmtk", + .fw_max_len = 0x3c0000, + .kernel_la = 0x80000000, + .kernel_ep = 0x80000000, + .rootfs_ofs = 0x140000, + }, { .id = "8Mltq", .fw_max_len = 0x7a0000, .kernel_la = 0x80002000, @@ -169,129 +157,6 @@ static struct flash_layout layouts[] = { } }; -static struct board_info boards[] = { - { - .id = "TD-W8970v1", - .hw_id = 0x89700001, - .hw_rev = 1, - .layout_id = "8Mltq", - }, { - .id = "TD-W8980v1", - .hw_id = 0x89800001, - .hw_rev = 14, - .layout_id = "8Mltq", - }, { - .id = "ArcherC20i", - .hw_id = 0xc2000001, - .hw_rev = 58, - .layout_id = "8Mmtk", - .hdr_ver = 3, - .flags = FLAG_LE_KERNEL_LA_EP, - }, { - .id = "ArcherVR200V", - .hw_id = 0x73b70801, - .hw_rev = 0x2f, - .layout_id = "16Mltq", - .hdr_ver = 2, - }, { - .id = "ArcherC50", - .hw_id = 0xc7500001, - .hw_rev = 69, - .layout_id = "8Mmtk", - .hdr_ver = 3, - .flags = FLAG_LE_KERNEL_LA_EP, - }, { - .id = "ArcherMR200", - .hw_id = 0xd7500001, - .hw_rev = 0x4a, - .layout_id = "8MLmtk", - .hdr_ver = 3, - .flags = FLAG_LE_KERNEL_LA_EP, - }, { - .id = "TL-WR840NV4", - .hw_id = 0x08400004, - .hw_rev = 0x1, - .hw_ver_add = 0x4, - .layout_id = "8Mmtk", - .hdr_ver = 3, - .flags = FLAG_LE_KERNEL_LA_EP, - }, { - .id = "TL-WR841NV13", - .hw_id = 0x08410013, - .hw_rev = 0x268, - .hw_ver_add = 0x13, - .layout_id = "8Mmtk", - .hdr_ver = 3, - .flags = FLAG_LE_KERNEL_LA_EP, - }, { - /* terminating entry */ - } -}; - -/* - * Message macros - */ -#define ERR(fmt, ...) do { \ - fflush(0); \ - fprintf(stderr, "[%s] *** error: " fmt "\n", \ - progname, ## __VA_ARGS__ ); \ -} while (0) - -#define ERRS(fmt, ...) do { \ - int save = errno; \ - fflush(0); \ - fprintf(stderr, "[%s] *** error: " fmt ": %s\n", \ - progname, ## __VA_ARGS__, strerror(save)); \ -} while (0) - -#define DBG(fmt, ...) do { \ - fprintf(stderr, "[%s] " fmt "\n", progname, ## __VA_ARGS__ ); \ -} while (0) - -static struct board_info *find_board(char *id) -{ - struct board_info *ret; - struct board_info *board; - - ret = NULL; - for (board = boards; board->id != NULL; board++){ - if (strcasecmp(id, board->id) == 0) { - ret = board; - break; - } - }; - - return ret; -} - -static struct board_info *find_board_by_hwid(uint32_t hw_id) -{ - struct board_info *board; - - for (board = boards; board->id != NULL; board++) { - if (hw_id == board->hw_id) - return board; - }; - - return NULL; -} - -static struct flash_layout *find_layout(char *id) -{ - struct flash_layout *ret; - struct flash_layout *l; - - ret = NULL; - for (l = layouts; l->id != NULL; l++){ - if (strcasecmp(id, l->id) == 0) { - ret = l; - break; - } - }; - - return ret; -} - static void usage(int status) { FILE *stream = (status != EXIT_SUCCESS) ? stderr : stdout; @@ -301,7 +166,6 @@ static void usage(int status) fprintf(stream, "\n" "Options:\n" -" -B create image for the board specified with \n" " -c use combined kernel image\n" " -e swap endianness in kernel load address and entry point\n" " -E overwrite kernel entry point with (hexval prefixed with 0x)\n" @@ -330,59 +194,6 @@ static void usage(int status) exit(status); } -static int get_md5(char *data, int size, char *md5) -{ - MD5_CTX ctx; - - MD5_Init(&ctx); - MD5_Update(&ctx, data, size); - MD5_Final(md5, &ctx); -} - -static int get_file_stat(struct file_info *fdata) -{ - struct stat st; - int res; - - if (fdata->file_name == NULL) - return 0; - - res = stat(fdata->file_name, &st); - if (res){ - ERRS("stat failed on %s", fdata->file_name); - return res; - } - - fdata->file_size = st.st_size; - return 0; -} - -static int read_to_buf(struct file_info *fdata, char *buf) -{ - FILE *f; - int ret = EXIT_FAILURE; - - f = fopen(fdata->file_name, "r"); - if (f == NULL) { - ERRS("could not open \"%s\" for reading", fdata->file_name); - goto out; - } - - errno = 0; - fread(buf, fdata->file_size, 1, f); - if (errno != 0) { - ERRS("unable to read from file \"%s\"", fdata->file_name); - goto out_close; - } - - ret = EXIT_SUCCESS; - - out_close: - fclose(f); - out: - return ret; -} - static int check_options(void) { int ret; @@ -398,42 +209,29 @@ static int check_options(void) return -1; } - if (board_id == NULL && opt_hw_id == NULL) { - ERR("either board or hardware id must be specified"); + if (opt_hw_id == NULL) { + ERR("hardware id must be specified"); return -1; } - if (board_id) { - board = find_board(board_id); - if (board == NULL) { - ERR("unknown/unsupported board id \"%s\"", board_id); - return -1; - } - if (layout_id == NULL) - layout_id = board->layout_id; - - if (board->hdr_ver) - hdr_ver = board->hdr_ver; - } else { - board = &custom_board; + board = &custom_board; - if (layout_id == NULL) { - ERR("flash layout is not specified"); - return -1; - } + if (layout_id == NULL) { + ERR("flash layout is not specified"); + return -1; + } - board->hw_id = strtoul(opt_hw_id, NULL, 0); + board->hw_id = strtoul(opt_hw_id, NULL, 0); - board->hw_rev = 1; - board->hw_ver_add = 0; - } + board->hw_rev = 1; + board->hw_ver_add = 0; if (opt_hw_rev) board->hw_rev = strtoul(opt_hw_rev, NULL, 0); if (opt_hw_ver_add) board->hw_ver_add = strtoul(opt_hw_ver_add, NULL, 0); - layout = find_layout(layout_id); + layout = find_layout(layouts, layout_id); if (layout == NULL) { ERR("unknown flash layout \"%s\"", layout_id); return -1; @@ -475,10 +273,10 @@ static int check_options(void) if (rootfs_align) { kernel_len += sizeof(struct fw_header); - kernel_len = ALIGN(kernel_len, rootfs_align); + rootfs_ofs = ALIGN(kernel_len, rootfs_align); kernel_len -= sizeof(struct fw_header); - DBG("kernel length aligned to %u", kernel_len); + DBG("rootfs offset aligned to 0x%u", rootfs_ofs); if (kernel_len + rootfs_info.file_size > layout->fw_max_len - sizeof(struct fw_header)) { @@ -520,7 +318,7 @@ static int check_options(void) return 0; } -static void fill_header(char *buf, int len) +void fill_header(char *buf, int len) { struct fw_header *hdr = (struct fw_header *)buf; unsigned ver_len; @@ -582,196 +380,6 @@ static void fill_header(char *buf, int len) get_md5(buf, len, hdr->md5sum1); } -static int pad_jffs2(char *buf, int currlen) -{ - int len; - uint32_t pad_mask; - - len = currlen; - pad_mask = (64 * 1024); - while ((len < layout->fw_max_len) && (pad_mask != 0)) { - uint32_t mask; - int i; - - for (i = 10; i < 32; i++) { - mask = 1 << i; - if (pad_mask & mask) - break; - } - - len = ALIGN(len, mask); - - for (i = 10; i < 32; i++) { - mask = 1 << i; - if ((len & (mask - 1)) == 0) - pad_mask &= ~mask; - } - - for (i = 0; i < sizeof(jffs2_eof_mark); i++) - buf[len + i] = jffs2_eof_mark[i]; - - len += sizeof(jffs2_eof_mark); - } - - return len; -} - -static int write_fw(char *data, int len) -{ - FILE *f; - int ret = EXIT_FAILURE; - - f = fopen(ofname, "w"); - if (f == NULL) { - ERRS("could not open \"%s\" for writing", ofname); - goto out; - } - - errno = 0; - fwrite(data, len, 1, f); - if (errno) { - ERRS("unable to write output file"); - goto out_flush; - } - - DBG("firmware file \"%s\" completed", ofname); - - ret = EXIT_SUCCESS; - - out_flush: - fflush(f); - fclose(f); - if (ret != EXIT_SUCCESS) { - unlink(ofname); - } - out: - return ret; -} - -static int build_fw(void) -{ - int buflen; - char *buf; - char *p; - int ret = EXIT_FAILURE; - int writelen = 0; - - buflen = layout->fw_max_len; - - buf = malloc(buflen); - if (!buf) { - ERR("no memory for buffer\n"); - goto out; - } - - memset(buf, 0xff, buflen); - p = buf + sizeof(struct fw_header); - ret = read_to_buf(&kernel_info, p); - if (ret) - goto out_free_buf; - - writelen = sizeof(struct fw_header) + kernel_len; - - if (!combined) { - if (rootfs_align) - p = buf + writelen; - else - p = buf + rootfs_ofs; - - ret = read_to_buf(&rootfs_info, p); - if (ret) - goto out_free_buf; - - if (rootfs_align) - writelen += rootfs_info.file_size; - else - writelen = rootfs_ofs + rootfs_info.file_size; - - if (add_jffs2_eof) - writelen = pad_jffs2(buf, writelen); - } - - if (!strip_padding) - writelen = buflen; - - fill_header(buf, writelen); - ret = write_fw(buf, writelen); - if (ret) - goto out_free_buf; - - ret = EXIT_SUCCESS; - - out_free_buf: - free(buf); - out: - return ret; -} - -/* Helper functions to inspect_fw() representing different output formats */ -static inline void inspect_fw_pstr(char *label, char *str) -{ - printf("%-23s: %s\n", label, str); -} - -static inline void inspect_fw_phex(char *label, uint32_t val) -{ - printf("%-23s: 0x%08x\n", label, val); -} - -static inline void inspect_fw_phexpost(char *label, - uint32_t val, char *post) -{ - printf("%-23s: 0x%08x (%s)\n", label, val, post); -} - -static inline void inspect_fw_phexdef(char *label, - uint32_t val, uint32_t defval) -{ - printf("%-23s: 0x%08x ", label, val); - - if (val == defval) - printf("(== OpenWrt default)\n"); - else - printf("(OpenWrt default: 0x%08x)\n", defval); -} - -static inline void inspect_fw_phexexp(char *label, - uint32_t val, uint32_t expval) -{ - printf("%-23s: 0x%08x ", label, val); - - if (val == expval) - printf("(ok)\n"); - else - printf("(expected: 0x%08x)\n", expval); -} - -static inline void inspect_fw_phexdec(char *label, uint32_t val) -{ - printf("%-23s: 0x%08x / %8u bytes\n", label, val, val); -} - -static inline void inspect_fw_phexdecdef(char *label, - uint32_t val, uint32_t defval) -{ - printf("%-23s: 0x%08x / %8u bytes ", label, val, val); - - if (val == defval) - printf("(== OpenWrt default)\n"); - else - printf("(OpenWrt default: 0x%08x)\n", defval); -} - -static inline void inspect_fw_pmd5sum(char *label, uint8_t *val, char *text) -{ - int i; - - printf("%-23s:", label); - for (i=0; ihw_id)); - if (!board) - board = &custom_board; + board = &custom_board; if (board->flags & FLAG_LE_KERNEL_LA_EP) { hdr->kernel_la = bswap_32(hdr->kernel_la); @@ -844,23 +450,11 @@ static int inspect_fw(void) printf("\n"); inspect_fw_pstr("Firmware version", hdr->fw_version); - - if (board != &custom_board) { - layout = find_layout(board->layout_id); - inspect_fw_phexpost("Hardware ID", - ntohl(hdr->hw_id), board->id); - inspect_fw_phexexp("Hardware Revision", - ntohl(hdr->hw_rev), board->hw_rev); - inspect_fw_phexexp("Additional HW Version", - ntohl(hdr->hw_ver_add), board->hw_ver_add); - } else { - inspect_fw_phexpost("Hardware ID", - ntohl(hdr->hw_id), "unknown"); - inspect_fw_phex("Hardware Revision", - ntohl(hdr->hw_rev)); - inspect_fw_phex("Additional HW Version", - ntohl(hdr->hw_ver_add)); - } + inspect_fw_phex("Hardware ID", ntohl(hdr->hw_id)); + inspect_fw_phex("Hardware Revision", + ntohl(hdr->hw_rev)); + inspect_fw_phex("Additional HW Version", + ntohl(hdr->hw_ver_add)); printf("%-23s: %d.%d.%d-%d.%d\n", "Software version", hdr->ver_hi, hdr->ver_mid, hdr->ver_lo, @@ -872,24 +466,12 @@ static int inspect_fw(void) ntohl(hdr->kernel_ofs)); inspect_fw_phexdec("Kernel data length", ntohl(hdr->kernel_len)); - if (board != &custom_board) { - inspect_fw_phexdef("Kernel load address", - ntohl(hdr->kernel_la), - layout ? layout->kernel_la : 0xffffffff); - inspect_fw_phexdef("Kernel entry point", - ntohl(hdr->kernel_ep), - layout ? layout->kernel_ep : 0xffffffff); - inspect_fw_phexdecdef("Rootfs data offset", - ntohl(hdr->rootfs_ofs), - layout ? layout->rootfs_ofs : 0xffffffff); - } else { - inspect_fw_phex("Kernel load address", - ntohl(hdr->kernel_la)); - inspect_fw_phex("Kernel entry point", - ntohl(hdr->kernel_ep)); - inspect_fw_phexdec("Rootfs data offset", - ntohl(hdr->rootfs_ofs)); - } + inspect_fw_phex("Kernel load address", + ntohl(hdr->kernel_la)); + inspect_fw_phex("Kernel entry point", + ntohl(hdr->kernel_ep)); + inspect_fw_phexdec("Rootfs data offset", + ntohl(hdr->rootfs_ofs)); inspect_fw_phexdec("Rootfs data length", ntohl(hdr->rootfs_len)); inspect_fw_phexdec("Boot loader data offset", @@ -945,16 +527,13 @@ static int inspect_fw(void) int main(int argc, char *argv[]) { int ret = EXIT_FAILURE; - int err; - - FILE *outfile; progname = basename(argv[0]); while ( 1 ) { int c; - c = getopt(argc, argv, "a:B:H:E:F:L:V:N:W:w:ci:k:r:R:o:xhsjv:y:T:e"); + c = getopt(argc, argv, "a:H:E:F:L:V:N:W:w:ci:k:r:R:o:xhsjv:y:T:e"); if (c == -1) break; @@ -962,9 +541,6 @@ int main(int argc, char *argv[]) case 'a': sscanf(optarg, "0x%x", &rootfs_align); break; - case 'B': - board_id = optarg; - break; case 'H': opt_hw_id = optarg; break; @@ -1042,7 +618,7 @@ int main(int argc, char *argv[]) goto out; if (!inspect_info.file_name) - ret = build_fw(); + ret = build_fw(sizeof(struct fw_header)); else ret = inspect_fw(); diff --git a/tools/firmware-utils/src/otrx.c b/tools/firmware-utils/src/otrx.c new file mode 100644 index 00000000000000..223e032f2b5ed8 --- /dev/null +++ b/tools/firmware-utils/src/otrx.c @@ -0,0 +1,592 @@ +/* + * otrx + * + * Copyright (C) 2015-2017 Rafał Miłecki + * + * 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; either version 2 of the License, or (at your option) + * any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(__BYTE_ORDER) +#error "Unknown byte order" +#endif + +#if __BYTE_ORDER == __BIG_ENDIAN +#define cpu_to_le32(x) bswap_32(x) +#define le32_to_cpu(x) bswap_32(x) +#elif __BYTE_ORDER == __LITTLE_ENDIAN +#define cpu_to_le32(x) (x) +#define le32_to_cpu(x) (x) +#else +#error "Unsupported endianness" +#endif + +#define TRX_MAGIC 0x30524448 +#define TRX_FLAGS_OFFSET 12 +#define TRX_MAX_PARTS 3 + +struct trx_header { + uint32_t magic; + uint32_t length; + uint32_t crc32; + uint16_t flags; + uint16_t version; + uint32_t offset[3]; +}; + +char *trx_path; +size_t trx_offset = 0; +char *partition[TRX_MAX_PARTS] = {}; + +static inline size_t otrx_min(size_t x, size_t y) { + return x < y ? x : y; +} + +/************************************************** + * CRC32 + **************************************************/ + +static const uint32_t crc32_tbl[] = { + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, + 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, + 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, + 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, + 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, + 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, + 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, + 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, + 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, + 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, + 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, + 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, + 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, + 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, + 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, + 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, + 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, + 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, + 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, + 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, + 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, + 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, + 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, + 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, + 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, + 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, + 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, + 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, + 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, + 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, + 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, + 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, + 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, + 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, + 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, + 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, + 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, + 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, + 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, + 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, + 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, + 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, + 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, + 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, + 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, + 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, + 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, + 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, + 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, + 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, + 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, + 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d, +}; + +uint32_t otrx_crc32(uint32_t crc, uint8_t *buf, size_t len) { + while (len) { + crc = crc32_tbl[(crc ^ *buf) & 0xff] ^ (crc >> 8); + buf++; + len--; + } + + return crc; +} + +/************************************************** + * Check + **************************************************/ + +static void otrx_check_parse_options(int argc, char **argv) { + int c; + + while ((c = getopt(argc, argv, "o:")) != -1) { + switch (c) { + case 'o': + trx_offset = atoi(optarg); + break; + } + } +} + +static int otrx_check(int argc, char **argv) { + FILE *trx; + struct trx_header hdr; + size_t bytes, length; + uint8_t buf[1024]; + uint32_t crc32; + int err = 0; + + if (argc < 3) { + fprintf(stderr, "No TRX file passed\n"); + err = -EINVAL; + goto out; + } + trx_path = argv[2]; + + optind = 3; + otrx_check_parse_options(argc, argv); + + trx = fopen(trx_path, "r"); + if (!trx) { + fprintf(stderr, "Couldn't open %s\n", trx_path); + err = -EACCES; + goto out; + } + + fseek(trx, trx_offset, SEEK_SET); + bytes = fread(&hdr, 1, sizeof(hdr), trx); + if (bytes != sizeof(hdr)) { + fprintf(stderr, "Couldn't read %s header\n", trx_path); + err = -EIO; + goto err_close; + } + + if (le32_to_cpu(hdr.magic) != TRX_MAGIC) { + fprintf(stderr, "Invalid TRX magic: 0x%08x\n", le32_to_cpu(hdr.magic)); + err = -EINVAL; + goto err_close; + } + + length = le32_to_cpu(hdr.length); + if (length < sizeof(hdr)) { + fprintf(stderr, "Length read from TRX too low (%zu B)\n", length); + err = -EINVAL; + goto err_close; + } + + crc32 = 0xffffffff; + fseek(trx, trx_offset + TRX_FLAGS_OFFSET, SEEK_SET); + length -= TRX_FLAGS_OFFSET; + while ((bytes = fread(buf, 1, otrx_min(sizeof(buf), length), trx)) > 0) { + crc32 = otrx_crc32(crc32, buf, bytes); + length -= bytes; + } + + if (length) { + fprintf(stderr, "Couldn't read last %zd B of data from %s\n", length, trx_path); + err = -EIO; + goto err_close; + } + + if (crc32 != le32_to_cpu(hdr.crc32)) { + fprintf(stderr, "Invalid data crc32: 0x%08x instead of 0x%08x\n", crc32, le32_to_cpu(hdr.crc32)); + err = -EINVAL; + goto err_close; + } + + printf("Found a valid TRX version %d\n", le32_to_cpu(hdr.version)); + +err_close: + fclose(trx); +out: + return err; +} + +/************************************************** + * Create + **************************************************/ + +static ssize_t otrx_create_append_file(FILE *trx, const char *in_path) { + FILE *in; + size_t bytes; + ssize_t length = 0; + uint8_t buf[1024]; + + in = fopen(in_path, "r"); + if (!in) { + fprintf(stderr, "Couldn't open %s\n", in_path); + return -EACCES; + } + + while ((bytes = fread(buf, 1, sizeof(buf), in)) > 0) { + if (fwrite(buf, 1, bytes, trx) != bytes) { + fprintf(stderr, "Couldn't write %zu B to %s\n", bytes, trx_path); + length = -EIO; + break; + } + length += bytes; + } + + fclose(in); + + return length; +} + +static ssize_t otrx_create_append_zeros(FILE *trx, size_t length) { + uint8_t *buf; + + buf = malloc(length); + if (!buf) + return -ENOMEM; + memset(buf, 0, length); + + if (fwrite(buf, 1, length, trx) != length) { + fprintf(stderr, "Couldn't write %zu B to %s\n", length, trx_path); + free(buf); + return -EIO; + } + + free(buf); + + return length; +} + +static ssize_t otrx_create_align(FILE *trx, size_t curr_offset, size_t alignment) { + if (curr_offset & (alignment - 1)) { + size_t length = alignment - (curr_offset % alignment); + return otrx_create_append_zeros(trx, length); + } + + return 0; +} + +static int otrx_create_write_hdr(FILE *trx, struct trx_header *hdr) { + size_t bytes, length; + uint8_t buf[1024]; + uint32_t crc32; + + hdr->magic = cpu_to_le32(TRX_MAGIC); + hdr->version = 1; + + fseek(trx, 0, SEEK_SET); + bytes = fwrite(hdr, 1, sizeof(struct trx_header), trx); + if (bytes != sizeof(struct trx_header)) { + fprintf(stderr, "Couldn't write TRX header to %s\n", trx_path); + return -EIO; + } + + length = le32_to_cpu(hdr->length); + + crc32 = 0xffffffff; + fseek(trx, TRX_FLAGS_OFFSET, SEEK_SET); + length -= TRX_FLAGS_OFFSET; + while ((bytes = fread(buf, 1, otrx_min(sizeof(buf), length), trx)) > 0) { + crc32 = otrx_crc32(crc32, buf, bytes); + length -= bytes; + } + hdr->crc32 = cpu_to_le32(crc32); + + fseek(trx, 0, SEEK_SET); + bytes = fwrite(hdr, 1, sizeof(struct trx_header), trx); + if (bytes != sizeof(struct trx_header)) { + fprintf(stderr, "Couldn't write TRX header to %s\n", trx_path); + return -EIO; + } + + return 0; +} + +static int otrx_create(int argc, char **argv) { + FILE *trx; + struct trx_header hdr = {}; + ssize_t sbytes; + size_t curr_idx = 0; + size_t curr_offset = sizeof(hdr); + int c; + int err = 0; + + if (argc < 3) { + fprintf(stderr, "No TRX file passed\n"); + err = -EINVAL; + goto out; + } + trx_path = argv[2]; + + trx = fopen(trx_path, "w+"); + if (!trx) { + fprintf(stderr, "Couldn't open %s\n", trx_path); + err = -EACCES; + goto out; + } + fseek(trx, curr_offset, SEEK_SET); + + optind = 3; + while ((c = getopt(argc, argv, "f:A:a:b:")) != -1) { + switch (c) { + case 'f': + if (curr_idx >= TRX_MAX_PARTS) { + err = -ENOSPC; + fprintf(stderr, "Reached TRX partitions limit, no place for %s\n", optarg); + goto err_close; + } + + sbytes = otrx_create_append_file(trx, optarg); + if (sbytes < 0) { + fprintf(stderr, "Failed to append file %s\n", optarg); + } else { + hdr.offset[curr_idx++] = curr_offset; + curr_offset += sbytes; + } + + sbytes = otrx_create_align(trx, curr_offset, 4); + if (sbytes < 0) + fprintf(stderr, "Failed to append zeros\n"); + else + curr_offset += sbytes; + + break; + case 'A': + sbytes = otrx_create_append_file(trx, optarg); + if (sbytes < 0) { + fprintf(stderr, "Failed to append file %s\n", optarg); + } else { + curr_offset += sbytes; + } + + sbytes = otrx_create_align(trx, curr_offset, 4); + if (sbytes < 0) + fprintf(stderr, "Failed to append zeros\n"); + else + curr_offset += sbytes; + break; + case 'a': + sbytes = otrx_create_align(trx, curr_offset, strtol(optarg, NULL, 0)); + if (sbytes < 0) + fprintf(stderr, "Failed to append zeros\n"); + else + curr_offset += sbytes; + break; + case 'b': + sbytes = strtol(optarg, NULL, 0) - curr_offset; + if (sbytes < 0) { + fprintf(stderr, "Current TRX length is 0x%zx, can't pad it with zeros to 0x%lx\n", curr_offset, strtol(optarg, NULL, 0)); + } else { + sbytes = otrx_create_append_zeros(trx, sbytes); + if (sbytes < 0) + fprintf(stderr, "Failed to append zeros\n"); + else + curr_offset += sbytes; + } + break; + } + if (err) + break; + } + + sbytes = otrx_create_align(trx, curr_offset, 0x1000); + if (sbytes < 0) + fprintf(stderr, "Failed to append zeros\n"); + else + curr_offset += sbytes; + + hdr.length = curr_offset; + otrx_create_write_hdr(trx, &hdr); +err_close: + fclose(trx); +out: + return err; +} + +/************************************************** + * Extract + **************************************************/ + +static void otrx_extract_parse_options(int argc, char **argv) { + int c; + + while ((c = getopt(argc, argv, "c:e:o:1:2:3:")) != -1) { + switch (c) { + case 'o': + trx_offset = atoi(optarg); + break; + case '1': + partition[0] = optarg; + break; + case '2': + partition[1] = optarg; + break; + case '3': + partition[2] = optarg; + break; + } + } +} + +static int otrx_extract_copy(FILE *trx, size_t offset, size_t length, char *out_path) { + FILE *out; + size_t bytes; + uint8_t *buf; + int err = 0; + + out = fopen(out_path, "w"); + if (!out) { + fprintf(stderr, "Couldn't open %s\n", out_path); + err = -EACCES; + goto out; + } + + buf = malloc(length); + if (!buf) { + fprintf(stderr, "Couldn't alloc %zu B buffer\n", length); + err = -ENOMEM; + goto err_close; + } + + fseek(trx, offset, SEEK_SET); + bytes = fread(buf, 1, length, trx); + if (bytes != length) { + fprintf(stderr, "Couldn't read %zu B of data from %s\n", length, trx_path); + err = -ENOMEM; + goto err_free_buf; + }; + + bytes = fwrite(buf, 1, length, out); + if (bytes != length) { + fprintf(stderr, "Couldn't write %zu B to %s\n", length, out_path); + err = -ENOMEM; + goto err_free_buf; + } + + printf("Extracted 0x%zx bytes into %s\n", length, out_path); + +err_free_buf: + free(buf); +err_close: + fclose(out); +out: + return err; +} + +static int otrx_extract(int argc, char **argv) { + FILE *trx; + struct trx_header hdr; + size_t bytes; + int i; + int err = 0; + + if (argc < 3) { + fprintf(stderr, "No TRX file passed\n"); + err = -EINVAL; + goto out; + } + trx_path = argv[2]; + + optind = 3; + otrx_extract_parse_options(argc, argv); + + trx = fopen(trx_path, "r"); + if (!trx) { + fprintf(stderr, "Couldn't open %s\n", trx_path); + err = -EACCES; + goto out; + } + + fseek(trx, trx_offset, SEEK_SET); + bytes = fread(&hdr, 1, sizeof(hdr), trx); + if (bytes != sizeof(hdr)) { + fprintf(stderr, "Couldn't read %s header\n", trx_path); + err = -EIO; + goto err_close; + } + + if (le32_to_cpu(hdr.magic) != TRX_MAGIC) { + fprintf(stderr, "Invalid TRX magic: 0x%08x\n", le32_to_cpu(hdr.magic)); + err = -EINVAL; + goto err_close; + } + + for (i = 0; i < TRX_MAX_PARTS; i++) { + size_t length; + + if (!partition[i]) + continue; + if (!hdr.offset[i]) { + printf("TRX doesn't contain partition %d, can't extract %s\n", i + 1, partition[i]); + continue; + } + + if (i + 1 >= TRX_MAX_PARTS || !hdr.offset[i + 1]) + length = le32_to_cpu(hdr.length) - le32_to_cpu(hdr.offset[i]); + else + length = le32_to_cpu(hdr.offset[i + 1]) - le32_to_cpu(hdr.offset[i]); + + otrx_extract_copy(trx, trx_offset + le32_to_cpu(hdr.offset[i]), length, partition[i]); + } + +err_close: + fclose(trx); +out: + return err; +} + +/************************************************** + * Start + **************************************************/ + +static void usage() { + printf("Usage:\n"); + printf("\n"); + printf("Checking TRX file:\n"); + printf("\totrx check [options]\tcheck if file is a valid TRX\n"); + printf("\t-o offset\t\t\toffset of TRX data in file (default: 0)\n"); + printf("\n"); + printf("Creating new TRX file:\n"); + printf("\totrx create [options] [partitions]\n"); + printf("\t-f file\t\t\t\t[partition] start new partition with content copied from file\n"); + printf("\t-A file\t\t\t\t[partition] append current partition with content copied from file\n"); + printf("\t-a alignment\t\t\t[partition] align current partition\n"); + printf("\t-b offset\t\t\t[partition] append zeros to partition till reaching absolute offset\n"); + printf("\n"); + printf("Extracting from TRX file:\n"); + printf("\totrx extract [options]\textract partitions from TRX file\n"); + printf("\t-o offset\t\t\toffset of TRX data in file (default: 0)\n"); + printf("\t-1 file\t\t\t\tfile to extract 1st partition to (optional)\n"); + printf("\t-2 file\t\t\t\tfile to extract 2nd partition to (optional)\n"); + printf("\t-3 file\t\t\t\tfile to extract 3rd partition to (optional)\n"); +} + +int main(int argc, char **argv) { + if (argc > 1) { + if (!strcmp(argv[1], "check")) + return otrx_check(argc, argv); + else if (!strcmp(argv[1], "create")) + return otrx_create(argc, argv); + else if (!strcmp(argv[1], "extract")) + return otrx_extract(argc, argv); + } + + usage(); + return 0; +} diff --git a/tools/firmware-utils/src/ptgen.c b/tools/firmware-utils/src/ptgen.c index 8466d35bcc3f53..13e0eda6222a33 100644 --- a/tools/firmware-utils/src/ptgen.c +++ b/tools/firmware-utils/src/ptgen.c @@ -1,4 +1,4 @@ -/* +/* * ptgen - partition table generator * Copyright (C) 2006 by Felix Fietkau * @@ -9,12 +9,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA @@ -63,25 +63,26 @@ struct partinfo parts[4]; char *filename = NULL; -/* +/* * parse the size argument, which is either * a simple number (K assumed) or * K, M or G * * returns the size in KByte */ -static long to_kbytes(const char *string) { +static long to_kbytes(const char *string) +{ int exp = 0; long result; char *end; result = strtoul(string, &end, 0); switch (tolower(*end)) { - case 'k' : - case '\0' : exp = 0; break; - case 'm' : exp = 1; break; - case 'g' : exp = 2; break; - default: return 0; + case 'k' : + case '\0' : exp = 0; break; + case 'm' : exp = 1; break; + case 'g' : exp = 2; break; + default: return 0; } if (*end) @@ -99,9 +100,10 @@ static long to_kbytes(const char *string) { } /* convert the sector number into a CHS value for the partition table */ -static void to_chs(long sect, unsigned char chs[3]) { +static void to_chs(long sect, unsigned char chs[3]) +{ int c,h,s; - + s = (sect % sectors) + 1; sect = sect / sectors; h = sect % heads; @@ -116,10 +118,11 @@ static void to_chs(long sect, unsigned char chs[3]) { } /* round the sector number up to the next cylinder */ -static inline unsigned long round_to_cyl(long sect) { +static inline unsigned long round_to_cyl(long sect) +{ int cyl_size = heads * sectors; - return sect + cyl_size - (sect % cyl_size); + return sect + cyl_size - (sect % cyl_size); } /* round the sector number up to the kb_align boundary */ @@ -131,7 +134,7 @@ static inline unsigned long round_to_kb(long sect) { static int gen_ptable(uint32_t signature, int nr) { struct pte pte[4]; - unsigned long sect = 0; + unsigned long sect = 0; int i, fd, ret = -1, start, len; memset(pte, 0, sizeof(struct pte) * 4); @@ -140,22 +143,27 @@ static int gen_ptable(uint32_t signature, int nr) fprintf(stderr, "Invalid size in partition %d!\n", i); return -1; } + pte[i].active = ((i + 1) == active) ? 0x80 : 0; pte[i].type = parts[i].type; + start = sect + sectors; if (kb_align != 0) start = round_to_kb(start); pte[i].start = cpu_to_le32(start); + sect = start + parts[i].size * 2; if (kb_align == 0) sect = round_to_cyl(sect); pte[i].length = cpu_to_le32(len = sect - start); + to_chs(start, pte[i].chs_start); to_chs(start + len - 1, pte[i].chs_end); + if (verbose) - fprintf(stderr, "Partition %d: start=%ld, end=%ld, size=%ld\n", i, (long) start * 512, ((long) start + (long) len) * 512, (long) len * 512); - printf("%ld\n", ((long) start * 512)); - printf("%ld\n", ((long) len * 512)); + fprintf(stderr, "Partition %d: start=%ld, end=%ld, size=%ld\n", i, (long)start * 512, ((long)start + (long)len) * 512, (long)len * 512); + printf("%ld\n", (long)start * 512); + printf("%ld\n", (long)len * 512); } if ((fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, 0644)) < 0) { @@ -179,7 +187,7 @@ static int gen_ptable(uint32_t signature, int nr) fprintf(stderr, "write failed.\n"); goto fail; } - + ret = 0; fail: close(fd); @@ -188,8 +196,8 @@ static int gen_ptable(uint32_t signature, int nr) static void usage(char *prog) { - fprintf(stderr, "Usage: %s [-v] -h -s -o [-a 0..4] [-l ] [[-t ] -p ...] \n", prog); - exit(1); + fprintf(stderr, "Usage: %s [-v] -h -s -o [-a 0..4] [-l ] [[-t ] -p ...] \n", prog); + exit(EXIT_FAILURE); } int main (int argc, char **argv) @@ -208,29 +216,29 @@ int main (int argc, char **argv) verbose++; break; case 'h': - heads = (int) strtoul(optarg, NULL, 0); + heads = (int)strtoul(optarg, NULL, 0); break; case 's': - sectors = (int) strtoul(optarg, NULL, 0); + sectors = (int)strtoul(optarg, NULL, 0); break; case 'p': if (part > 3) { fprintf(stderr, "Too many partitions\n"); - exit(1); + exit(EXIT_FAILURE); } parts[part].size = to_kbytes(optarg); parts[part++].type = type; break; case 't': - type = (char) strtoul(optarg, NULL, 16); + type = (char)strtoul(optarg, NULL, 16); break; case 'a': - active = (int) strtoul(optarg, NULL, 0); + active = (int)strtoul(optarg, NULL, 0); if ((active < 0) || (active > 4)) active = 0; break; case 'l': - kb_align = (int) strtoul(optarg, NULL, 0) * 2; + kb_align = (int)strtoul(optarg, NULL, 0) * 2; break; case 'S': signature = strtoul(optarg, NULL, 0); @@ -241,8 +249,8 @@ int main (int argc, char **argv) } } argc -= optind; - if (argc || (heads <= 0) || (sectors <= 0) || !filename) + if (argc || (heads <= 0) || (sectors <= 0) || !filename) usage(argv[0]); - return gen_ptable(signature, part); + return gen_ptable(signature, part) ? EXIT_FAILURE : EXIT_SUCCESS; } diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 219d1985acfd7f..88e2e88bdf3072 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -365,8 +365,8 @@ static struct device_info boards[] = { {"profile", 0x11700, 0x03900}, {"default-config", 0x15000, 0x04000}, {"user-config", 0x19000, 0x04000}, - {"os-image", 0x20000, 0x150000}, - {"file-system", 0x170000, 0x678000}, + {"os-image", 0x20000, 0x180000}, + {"file-system", 0x1a0000, 0x648000}, {"certyficate", 0x7e8000, 0x08000}, {"radio", 0x7f0000, 0x10000}, {NULL, 0, 0} @@ -439,8 +439,8 @@ static struct device_info boards[] = { {"profile", 0x11700, 0x03900}, {"default-config", 0x15000, 0x04000}, {"user-config", 0x19000, 0x04000}, - {"os-image", 0x20000, 0x150000}, - {"file-system", 0x170000, 0x678000}, + {"os-image", 0x20000, 0x180000}, + {"file-system", 0x1a0000, 0x648000}, {"certyficate", 0x7e8000, 0x08000}, {"radio", 0x7f0000, 0x10000}, {NULL, 0, 0} @@ -490,7 +490,14 @@ static struct device_info boards[] = { .id = "ARCHER-C7-V4", .support_list = "SupportList:\n" + "{product_name:Archer C7,product_ver:4.0.0,special_id:00000000}\n" + "{product_name:Archer C7,product_ver:4.0.0,special_id:41550000}\n" "{product_name:Archer C7,product_ver:4.0.0,special_id:45550000}\n" + "{product_name:Archer C7,product_ver:4.0.0,special_id:4B520000}\n" + "{product_name:Archer C7,product_ver:4.0.0,special_id:42520000}\n" + "{product_name:Archer C7,product_ver:4.0.0,special_id:4A500000}\n" + "{product_name:Archer C7,product_ver:4.0.0,special_id:52550000}\n" + "{product_name:Archer C7,product_ver:4.0.0,special_id:54570000}\n" "{product_name:Archer C7,product_ver:4.0.0,special_id:55530000}\n" "{product_name:Archer C7,product_ver:4.0.0,special_id:43410000}\n", .support_trail = '\x00', @@ -676,6 +683,42 @@ static struct device_info boards[] = { .last_sysupgrade_partition = "file-system" }, + /** Firmware layout for the TL-WR1043 v5 */ + { + .id = "TLWR1043NV5", + .vendor = "", + .support_list = + "SupportList:\n" + "{product_name:TL-WR1043N,product_ver:5.0.0,special_id:45550000}\n" + "{product_name:TL-WR1043N,product_ver:5.0.0,special_id:55530000}\n", + .support_trail = '\x00', + .soft_ver = "soft_ver:1.0.0\n", + .partitions = { + {"factory-boot", 0x00000, 0x20000}, + {"fs-uboot", 0x20000, 0x20000}, + {"os-image", 0x40000, 0x180000}, + {"file-system", 0x1c0000, 0xd40000}, + {"default-mac", 0xf00000, 0x00200}, + {"pin", 0xf00200, 0x00200}, + {"device-id", 0xf00400, 0x00100}, + {"product-info", 0xf00500, 0x0fb00}, + {"soft-version", 0xf10000, 0x01000}, + {"extra-para", 0xf11000, 0x01000}, + {"support-list", 0xf12000, 0x0a000}, + {"profile", 0xf1c000, 0x04000}, + {"default-config", 0xf20000, 0x10000}, + {"user-config", 0xf30000, 0x40000}, + {"qos-db", 0xf70000, 0x40000}, + {"certificate", 0xfb0000, 0x10000}, + {"partition-table", 0xfc0000, 0x10000}, + {"log", 0xfd0000, 0x20000}, + {"radio", 0xff0000, 0x10000}, + {NULL, 0, 0} + }, + .first_sysupgrade_partition = "os-image", + .last_sysupgrade_partition = "file-system" + }, + /** Firmware layout for the TL-WR1043 v4 */ { .id = "TLWR1043NDV4", @@ -730,8 +773,8 @@ static struct device_info boards[] = { */ .partitions = { {"fs-uboot", 0x00000, 0x20000}, - {"os-image", 0x20000, 0x160000}, - {"file-system", 0x180000, 0x5d0000}, + {"os-image", 0x20000, 0x180000}, + {"file-system", 0x1a0000, 0x5b0000}, {"default-mac", 0x750000, 0x00200}, {"pin", 0x750200, 0x00200}, {"product-info", 0x750400, 0x0fc00}, @@ -763,8 +806,8 @@ static struct device_info boards[] = { .partitions = { {"fs-uboot", 0x00000, 0x20000}, - {"os-image", 0x20000, 0x150000}, - {"file-system", 0x170000, 0xcd0000}, + {"os-image", 0x20000, 0x180000}, + {"file-system", 0x1a0000, 0xca0000}, {"default-mac", 0xe40000, 0x00200}, {"pin", 0xe40200, 0x00200}, {"product-info", 0xe40400, 0x0fc00}, @@ -852,8 +895,8 @@ static struct device_info boards[] = { */ .partitions = { {"fs-uboot", 0x00000, 0x20000}, - {"os-image", 0x20000, 0x150000}, - {"file-system", 0x170000, 0x4a0000}, + {"os-image", 0x20000, 0x180000}, + {"file-system", 0x1a0000, 0x460000}, {"partition-table", 0x600000, 0x02000}, {"default-mac", 0x610000, 0x00020}, {"pin", 0x610100, 0x00020}, @@ -1254,7 +1297,9 @@ static void build_image(const char *output, parts[3] = read_file("os-image", kernel_image, false); parts[4] = read_file("file-system", rootfs_image, add_jffs2_eof); - if (strcasecmp(info->id, "ARCHER-C25-V1") == 0) { + /* Some devices need the extra-para partition to accept the firmware */ + if (strcasecmp(info->id, "ARCHER-C25-V1") == 0 || + strcasecmp(info->id, "TLWR1043NV5") == 0) { const char mdat[11] = {0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00}; parts[5] = put_data("extra-para", mdat, 11); } else if (strcasecmp(info->id, "ARCHER-C7-V4") == 0) { diff --git a/tools/flex/Makefile b/tools/flex/Makefile index 1398b1ae51a527..1eff81f3451584 100644 --- a/tools/flex/Makefile +++ b/tools/flex/Makefile @@ -7,6 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=flex +PKG_CPE_ID:=cpe:/a:flex_project:flex PKG_VERSION:=2.6.4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz diff --git a/tools/flex/patches/200-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch b/tools/flex/patches/200-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch new file mode 100644 index 00000000000000..7c3645c4747bcb --- /dev/null +++ b/tools/flex/patches/200-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch @@ -0,0 +1,27 @@ +From 24fd0551333e7eded87b64dd36062da3df2f6380 Mon Sep 17 00:00:00 2001 +From: Explorer09 +Date: Mon, 4 Sep 2017 10:47:33 +0800 +Subject: [PATCH] build: AC_USE_SYSTEM_EXTENSIONS in configure.ac. + +This would, e.g. define _GNU_SOURCE in config.h, enabling the +reallocarray() prototype in glibc 2.26+ on Linux systems with that +version of glibc. + +Fixes #241. +--- + configure.ac | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/configure.ac ++++ b/configure.ac +@@ -25,8 +25,10 @@ + # autoconf requirements and initialization + + AC_INIT([the fast lexical analyser generator],[2.6.4],[flex-help@lists.sourceforge.net],[flex]) ++AC_PREREQ([2.60]) + AC_CONFIG_SRCDIR([src/scan.l]) + AC_CONFIG_AUX_DIR([build-aux]) ++AC_USE_SYSTEM_EXTENSIONS + LT_INIT + AM_INIT_AUTOMAKE([1.11.3 -Wno-portability foreign check-news std-options dist-lzip parallel-tests subdir-objects]) + AC_CONFIG_HEADER([src/config.h]) diff --git a/tools/gptfdisk/Makefile b/tools/gptfdisk/Makefile deleted file mode 100644 index dc5a5eb0d6165c..00000000000000 --- a/tools/gptfdisk/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=gptfdisk -PKG_VERSION:=1.0.1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.rodsbooks.com/gdisk/ -PKG_HASH:=864c8aee2efdda50346804d7e6230407d5f42a8ae754df70404dd8b2fdfaeac7 - -HOST_BUILD_PARALLEL := 1 - -include $(INCLUDE_DIR)/host-build.mk - -HOST_CONFIGURE_VARS += \ - MAKEFLAGS="$(HOST_JOBS)" \ - CXXFLAGS="$(HOST_CFLAGS)" - -HOST_CONFIGURE_ARGS := \ - $(if $(MAKE_JOBSERVER),--parallel="$(MAKE_JOBSERVER)") \ - --prefix=$(STAGING_DIR_HOST) - -define Host/Compile - $(MAKE) LDFLAGS="$(HOST_LDFLAGS)" CXXFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOST)/include/e2fsprogs" -C $(HOST_BUILD_DIR) sgdisk -endef - -define Host/Install - $(INSTALL_BIN) $(HOST_BUILD_DIR)/sgdisk $(STAGING_DIR_HOST)/bin/ -endef - -define Host/Clean - rm -f $(STAGING_DIR_HOST)/bin/sgdisk -endef - -HOSTCC := $(HOSTCC_NOCACHE) -HOSTCXX := $(HOSTCXX_NOCACHE) - -$(eval $(call HostBuild)) diff --git a/tools/libtool/Makefile b/tools/libtool/Makefile index 6526b28b1d173e..dd4a7f63809a00 100644 --- a/tools/libtool/Makefile +++ b/tools/libtool/Makefile @@ -7,6 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libtool +PKG_CPE_ID:=cpe:/a:gnu:libtool PKG_VERSION:=2.4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz diff --git a/tools/m4/Makefile b/tools/m4/Makefile index aa3c382f5bb38b..a6d931b0fd51ef 100644 --- a/tools/m4/Makefile +++ b/tools/m4/Makefile @@ -7,6 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=m4 +PKG_CPE_ID:=cpe:/a:gnu:m4 PKG_VERSION:=1.4.18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz diff --git a/tools/mm-macros/Makefile b/tools/mm-macros/Makefile index a8a7bc137f5125..d8f4a520b27622 100644 --- a/tools/mm-macros/Makefile +++ b/tools/mm-macros/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mm-macros -PKG_VERSION:=0.9.10 +PKG_VERSION:=0.9.11 PKG_SOURCE_URL:=@GNOME/mm-common/0.9 PKG_SOURCE:=mm-common-$(PKG_VERSION).tar.xz -PKG_HASH:=16c0e2bc196b67fbc145edaecb5dbe5818386504fe5703de27002d77140fa217 +PKG_HASH:=20d1e7466ca4c83c92e29f9e8dfcc8e5721fdf1337f53157bed97be3b73b32a8 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/mm-common-$(PKG_VERSION) diff --git a/tools/mpfr/Makefile b/tools/mpfr/Makefile index 91b5986f6c3f7c..f3e337ada271fd 100644 --- a/tools/mpfr/Makefile +++ b/tools/mpfr/Makefile @@ -7,12 +7,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mpfr -PKG_VERSION:=3.1.5 +PKG_VERSION:=3.1.6 +PKG_CPE_ID:=cpe:/a:mpfr:gnu_mpfr PKG_SOURCE_URL:=http://www.mpfr.org/mpfr-$(PKG_VERSION) \ @GNU/mpfr PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=015fde82b3979fbe5f83501986d328331ba8ddf008c1ff3da3c238f49ca062bc +PKG_HASH:=7a62ac1a04408614fccdc506e4844b10cf0ad2c2b1677097f8f35d3a1344a950 HOST_BUILD_PARALLEL:=1 HOST_FIXUP:=autoreconf diff --git a/tools/mtd-utils/patches/120-include_sysmacros.patch b/tools/mtd-utils/patches/120-include_sysmacros.patch new file mode 100644 index 00000000000000..81ba1cfb2b875c --- /dev/null +++ b/tools/mtd-utils/patches/120-include_sysmacros.patch @@ -0,0 +1,25 @@ +From 9a06f45ec71116d76ee4b268ebe1b33d45b06fc0 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Sat, 16 Apr 2016 22:10:43 -0400 +Subject: [PATCH mtd-utils] include sys/sysmacros.h for major/minor/makedev + +These functions have always been defined in sys/sysmacros.h under +Linux C libraries. For some, including sys/types.h implicitly +includes that as well, but glibc wants to deprecate that, and some +others already have. Include the header explicitly for the funcs. + +Signed-off-by: Mike Frysinger +--- + include/common.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/include/common.h ++++ b/include/common.h +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include "version.h" + + #ifndef PROGRAM_NAME diff --git a/tools/mtd-utils/patches/320-mkfs.jffs2-SOURCE_DATE_EPOCH.patch b/tools/mtd-utils/patches/320-mkfs.jffs2-SOURCE_DATE_EPOCH.patch index 46014e7a323a45..70e6a7e3601a4d 100644 --- a/tools/mtd-utils/patches/320-mkfs.jffs2-SOURCE_DATE_EPOCH.patch +++ b/tools/mtd-utils/patches/320-mkfs.jffs2-SOURCE_DATE_EPOCH.patch @@ -1,7 +1,5 @@ -Index: mtd-utils-1.5.2/mkfs.jffs2.c -=================================================================== ---- mtd-utils-1.5.2.orig/mkfs.jffs2.c -+++ mtd-utils-1.5.2/mkfs.jffs2.c +--- a/mkfs.jffs2.c ++++ b/mkfs.jffs2.c @@ -108,7 +108,7 @@ static char *rootdir = default_rootdir; static int verbose = 0; static int squash_uids = 0; diff --git a/tools/popt/Makefile b/tools/popt/Makefile deleted file mode 100644 index 7d1a1f8ef35ce9..00000000000000 --- a/tools/popt/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=popt -PKG_VERSION:=1.16 -PKG_HASH:=e728ed296fe9f069a0e005003c3d6b2dde3d9cad453422a10d6558616d304cc8 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://rpm5.org/files/popt/ -PKG_LICENSE:=MIT - -HOST_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/host-build.mk - -HOST_CONFIGURE_ARGS += --disable-shared --disable-nls -HOST_CFLAGS += $(FPIC) - -$(eval $(call HostBuild)) - diff --git a/tools/qemu/Makefile b/tools/qemu/Makefile index 3eac66f01e949d..d63ab3482ebb5e 100644 --- a/tools/qemu/Makefile +++ b/tools/qemu/Makefile @@ -7,6 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=qemu +PKG_CPE_ID:=cpe:/a:qemu:qemu PKG_VERSION:=0.14.1 PKG_RELEASE:=1 diff --git a/tools/squashfs/Makefile b/tools/squashfs/Makefile index 87f6e8fd993199..385cf69d9d795d 100644 --- a/tools/squashfs/Makefile +++ b/tools/squashfs/Makefile @@ -7,6 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=squashfs +PKG_CPE_ID:=cpe:/a:phillip_lougher:squashfs PKG_VERSION:=3.0 PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION).tar.gz diff --git a/tools/squashfs/patches/130-include_sysmacros.patch b/tools/squashfs/patches/130-include_sysmacros.patch new file mode 100644 index 00000000000000..f0149d6f65f08c --- /dev/null +++ b/tools/squashfs/patches/130-include_sysmacros.patch @@ -0,0 +1,20 @@ +--- a/squashfs-tools/mksquashfs.c ++++ b/squashfs-tools/mksquashfs.c +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- a/squashfs-tools/unsquashfs.c ++++ b/squashfs-tools/unsquashfs.c +@@ -25,6 +25,7 @@ + #define FALSE 0 + #include + #include ++#include + #include + #include + #include diff --git a/tools/squashfs4/Makefile b/tools/squashfs4/Makefile index e2c9fc91ccb934..e9e2b7ca9a9a06 100644 --- a/tools/squashfs4/Makefile +++ b/tools/squashfs4/Makefile @@ -7,6 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=squashfs4 +PKG_CPE_ID:=cpe:/a:phillip_lougher:squashfs PKG_VERSION:=4.2 PKG_SOURCE:=squashfs$(PKG_VERSION).tar.gz diff --git a/tools/squashfs4/patches/130-include_sysmacros.patch b/tools/squashfs4/patches/130-include_sysmacros.patch new file mode 100644 index 00000000000000..e8845130ef71d0 --- /dev/null +++ b/tools/squashfs4/patches/130-include_sysmacros.patch @@ -0,0 +1,20 @@ +--- a/squashfs-tools/mksquashfs.c ++++ b/squashfs-tools/mksquashfs.c +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- a/squashfs-tools/unsquashfs.c ++++ b/squashfs-tools/unsquashfs.c +@@ -30,6 +30,7 @@ + #include "xattr.h" + + #include ++#include + + struct cache *fragment_cache, *data_cache; + struct queue *to_reader, *to_deflate, *to_writer, *from_writer; diff --git a/tools/squashfs4/patches/170-add_support_for_LZMA_MAGIC_to_unsqashfs.patch b/tools/squashfs4/patches/170-add_support_for_LZMA_MAGIC_to_unsqashfs.patch index ad69b190ea9f1d..bc7d6c7a4a06b7 100644 --- a/tools/squashfs4/patches/170-add_support_for_LZMA_MAGIC_to_unsqashfs.patch +++ b/tools/squashfs4/patches/170-add_support_for_LZMA_MAGIC_to_unsqashfs.patch @@ -16,7 +16,7 @@ #define SQUASHFS_METADATA_LOG 13 --- a/squashfs-tools/unsquashfs.c +++ b/squashfs-tools/unsquashfs.c -@@ -1463,10 +1463,12 @@ int read_super(char *source) +@@ -1464,10 +1464,12 @@ int read_super(char *source) */ read_fs_bytes(fd, SQUASHFS_START, sizeof(struct squashfs_super_block), &sBlk_4); @@ -31,7 +31,7 @@ sBlk_4.s_minor == 0) { s_ops.squashfs_opendir = squashfs_opendir_4; s_ops.read_fragment = read_fragment_4; -@@ -1479,7 +1481,11 @@ int read_super(char *source) +@@ -1480,7 +1482,11 @@ int read_super(char *source) /* * Check the compression type */ @@ -44,7 +44,7 @@ return TRUE; } -@@ -1494,8 +1500,10 @@ int read_super(char *source) +@@ -1495,8 +1501,10 @@ int read_super(char *source) * Check it is a SQUASHFS superblock */ swap = 0; @@ -57,7 +57,7 @@ squashfs_super_block_3 sblk; ERROR("Reading a different endian SQUASHFS filesystem " "on %s\n", source); -@@ -1573,7 +1581,11 @@ int read_super(char *source) +@@ -1574,7 +1582,11 @@ int read_super(char *source) /* * 1.x, 2.x and 3.x filesystems use gzip compression. */ diff --git a/tools/squashfs4/patches/180-openbsd_compat.patch b/tools/squashfs4/patches/180-openbsd_compat.patch index b9c1b5925d8526..4f7afd89cc914a 100644 --- a/tools/squashfs4/patches/180-openbsd_compat.patch +++ b/tools/squashfs4/patches/180-openbsd_compat.patch @@ -8,8 +8,8 @@ +#include +#endif #include + #include #include - #include --- a/squashfs-tools/unsquashfs.h +++ b/squashfs-tools/unsquashfs.h @@ -25,6 +25,9 @@ diff --git a/tools/squashfs4/patches/190-no_nonstatic_inline.patch b/tools/squashfs4/patches/190-no_nonstatic_inline.patch index 27ebc6a2639be8..8cab1208325949 100644 --- a/tools/squashfs4/patches/190-no_nonstatic_inline.patch +++ b/tools/squashfs4/patches/190-no_nonstatic_inline.patch @@ -1,6 +1,6 @@ --- a/squashfs-tools/mksquashfs.c +++ b/squashfs-tools/mksquashfs.c -@@ -735,13 +735,13 @@ void cache_block_put(struct file_buffer +@@ -736,13 +736,13 @@ void cache_block_put(struct file_buffer + (((char *)A) - data_cache))) @@ -16,7 +16,7 @@ { pthread_mutex_lock(&progress_mutex); pthread_cond_signal(&progress_wait); -@@ -749,7 +749,7 @@ inline void update_progress_bar() +@@ -750,7 +750,7 @@ inline void update_progress_bar() } @@ -25,7 +25,7 @@ { TRACE("Waiting for thread %d\n", i); while(thread[i] != 0) -@@ -3358,7 +3358,7 @@ struct inode_info *lookup_inode(struct s +@@ -3359,7 +3359,7 @@ struct inode_info *lookup_inode(struct s } diff --git a/tools/squashfs4/patches/200-add-fixed-timestamp-option.patch b/tools/squashfs4/patches/200-add-fixed-timestamp-option.patch index 5cec51f7b7ea71..7411b97844978d 100644 --- a/tools/squashfs4/patches/200-add-fixed-timestamp-option.patch +++ b/tools/squashfs4/patches/200-add-fixed-timestamp-option.patch @@ -1,6 +1,6 @@ --- a/squashfs-tools/mksquashfs.c +++ b/squashfs-tools/mksquashfs.c -@@ -175,6 +175,9 @@ unsigned int cache_bytes = 0, cache_size +@@ -176,6 +176,9 @@ unsigned int cache_bytes = 0, cache_size /* inode lookup table */ squashfs_inode *inode_lookup_table = NULL; @@ -10,7 +10,7 @@ /* in memory directory data */ #define I_COUNT_SIZE 128 #define DIR_ENTRIES 32 -@@ -2452,6 +2455,8 @@ again: +@@ -2453,6 +2456,8 @@ again: restat: fstat(file, &buf2); close(file); @@ -19,7 +19,7 @@ if(read_size != buf2.st_size) { memcpy(buf, &buf2, sizeof(struct stat)); file_buffer->error = 2; -@@ -3612,7 +3617,7 @@ void dir_scan(squashfs_inode *inode, cha +@@ -3613,7 +3618,7 @@ void dir_scan(squashfs_inode *inode, cha buf.st_mode = S_IRWXU | S_IRWXG | S_IRWXO | S_IFDIR; buf.st_uid = getuid(); buf.st_gid = getgid(); @@ -28,7 +28,7 @@ buf.st_dev = 0; buf.st_ino = 0; dir_ent->inode = lookup_inode(&buf); -@@ -3623,6 +3628,8 @@ void dir_scan(squashfs_inode *inode, cha +@@ -3624,6 +3629,8 @@ void dir_scan(squashfs_inode *inode, cha pathname, strerror(errno)); return; } @@ -37,7 +37,7 @@ dir_ent->inode = lookup_inode(&buf); } -@@ -3677,6 +3684,8 @@ struct dir_info *dir_scan1(char *pathnam +@@ -3678,6 +3685,8 @@ struct dir_info *dir_scan1(char *pathnam filename, strerror(errno)); continue; } @@ -46,7 +46,7 @@ if((buf.st_mode & S_IFMT) != S_IFREG && (buf.st_mode & S_IFMT) != S_IFDIR && -@@ -3795,7 +3804,7 @@ struct dir_info *dir_scan2(struct dir_in +@@ -3796,7 +3805,7 @@ struct dir_info *dir_scan2(struct dir_in buf.st_gid = pseudo_ent->dev->gid; buf.st_rdev = makedev(pseudo_ent->dev->major, pseudo_ent->dev->minor); @@ -55,7 +55,7 @@ buf.st_ino = pseudo_ino ++; if(pseudo_ent->dev->type == 'f') { -@@ -4674,6 +4683,15 @@ int main(int argc, char *argv[]) +@@ -4675,6 +4684,15 @@ int main(int argc, char *argv[]) progress = FALSE; else if(strcmp(argv[i], "-no-exports") == 0) exportable = FALSE; @@ -71,7 +71,7 @@ else if(strcmp(argv[i], "-processors") == 0) { if((++i == argc) || (processors = strtol(argv[i], &b, 10), *b != '\0')) { -@@ -5314,7 +5332,7 @@ printOptions: +@@ -5315,7 +5333,7 @@ printOptions: sBlk.flags = SQUASHFS_MKFLAGS(noI, noD, noF, noX, no_fragments, always_use_fragments, duplicate_checking, exportable, no_xattrs, comp_opts); diff --git a/tools/sstrip/src/sstrip.c b/tools/sstrip/src/sstrip.c index 0508aaac81ec0a..12cf12e0958825 100644 --- a/tools/sstrip/src/sstrip.c +++ b/tools/sstrip/src/sstrip.c @@ -59,6 +59,7 @@ #include #include #include +#include #ifndef TRUE #define TRUE 1 @@ -103,7 +104,7 @@ static int do_reverse_endian; } else if (sizeof(X) == 8) { \ __res = bswap_64((X)); \ } else { \ - fprintf(stderr, "%s: %s: EGET failed for size %d\n", \ + fprintf(stderr, "%s: %s: EGET failed for size %zu\n", \ progname, filename, sizeof(X)); \ exit(EXIT_FAILURE); \ } \ @@ -124,7 +125,7 @@ static int do_reverse_endian; } else if (sizeof(Y) == 8) { \ Y = bswap_64((uint64_t)(X)); \ } else { \ - fprintf(stderr, "%s: %s: ESET failed for size %d\n", \ + fprintf(stderr, "%s: %s: ESET failed for size %zu\n", \ progname, filename, sizeof(Y)); \ exit(EXIT_FAILURE); \ } while (0) @@ -197,7 +198,7 @@ static int getmemorysize ## CLASS (Elf ## CLASS ## _Ehdr const *ehdr, \ { \ Elf ## CLASS ## _Phdr const *phdr; \ unsigned long size, n; \ - int i; \ + size_t i; \ \ /* Start by setting the size to include the ELF header and the \ * complete program segment header table. \ @@ -230,7 +231,7 @@ static int modifyheaders ## CLASS (Elf ## CLASS ## _Ehdr *ehdr, \ unsigned long newsize) \ { \ Elf ## CLASS ## _Phdr *phdr; \ - int i; \ + size_t i; \ \ /* If the section header table is gone, then remove all references \ * to it in the ELF header. \ diff --git a/tools/tar/Makefile b/tools/tar/Makefile index 5cb695f8bdc0bd..10a4a897800568 100644 --- a/tools/tar/Makefile +++ b/tools/tar/Makefile @@ -7,6 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tar +PKG_CPE_ID:=cpe:/a:gnu:tar PKG_VERSION:=1.29 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2