mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-15 18:03:30 +00:00
Merge branch master of https://github.com/coolsnowwolf/lede
This commit is contained in:
parent
1afb013dfe
commit
347daa04b2
4
Makefile
4
Makefile
@ -97,8 +97,8 @@ prepare: .config $(tools/stamp-compile) $(toolchain/stamp-compile)
|
||||
$(_SINGLE)$(SUBMAKE) -r diffconfig
|
||||
|
||||
world: prepare $(target/stamp-compile) $(package/stamp-compile) $(package/stamp-install) $(target/stamp-install) FORCE
|
||||
# $(_SINGLE)$(SUBMAKE) -r package/index
|
||||
# $(_SINGLE)$(SUBMAKE) -r checksum
|
||||
$(_SINGLE)$(SUBMAKE) -r package/index
|
||||
$(_SINGLE)$(SUBMAKE) -r checksum
|
||||
|
||||
.PHONY: clean dirclean prereq prepare world package/symlinks package/symlinks-install package/symlinks-clean
|
||||
|
||||
|
@ -234,6 +234,14 @@ menu "Global build settings"
|
||||
bool "Strong"
|
||||
endchoice
|
||||
|
||||
config KERNEL_STACKPROTECTOR
|
||||
bool
|
||||
default KERNEL_CC_STACKPROTECTOR_REGULAR || KERNEL_CC_STACKPROTECTOR_STRONG
|
||||
|
||||
config KERNEL_STACKPROTECTOR_STRONG
|
||||
bool
|
||||
default KERNEL_CC_STACKPROTECTOR_STRONG
|
||||
|
||||
choice
|
||||
prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)"
|
||||
default PKG_FORTIFY_SOURCE_1
|
||||
|
@ -18,7 +18,6 @@ menu "Target Images"
|
||||
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_LZMA if TARGET_ipq40xx
|
||||
default TARGET_INITRAMFS_COMPRESSION_NONE
|
||||
depends on TARGET_ROOTFS_INITRAMFS
|
||||
help
|
||||
@ -70,7 +69,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.
|
||||
|
||||
@ -78,7 +77,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.
|
||||
|
||||
@ -150,6 +149,7 @@ menu "Target Images"
|
||||
int "Block size (in KiB)"
|
||||
depends on TARGET_ROOTFS_SQUASHFS
|
||||
default 64 if LOW_MEMORY_FOOTPRINT
|
||||
default 1024 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
|
||||
default 256
|
||||
|
||||
menuconfig TARGET_ROOTFS_UBIFS
|
||||
@ -193,30 +193,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
|
||||
|
||||
@ -227,58 +219,48 @@ 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 GRUB_TITLE
|
||||
string "Title for the menu entry in GRUB"
|
||||
depends on GRUB_IMAGES
|
||||
default "OpenWrt"
|
||||
help
|
||||
This is the title of the GRUB menu entry.
|
||||
If unspecified, it defaults to OpenWrt.
|
||||
|
||||
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 VHD_IMAGES
|
||||
bool "Build Hyper-V image files (VHDX)"
|
||||
depends on TARGET_x86 || TARGET_x86_64
|
||||
default n
|
||||
depends on GRUB_IMAGES || EFI_IMAGES
|
||||
select TARGET_IMAGES_PAD
|
||||
select PACKAGE_kmod-tulip
|
||||
|
||||
config QCOW2_IMAGES
|
||||
bool "Build PVE/KVM image files (QCOW2)"
|
||||
depends on TARGET_x86 || TARGET_x86_64
|
||||
default n
|
||||
depends on GRUB_IMAGES || EFI_IMAGES
|
||||
select TARGET_IMAGES_PAD
|
||||
select PACKAGE_kmod-e1000
|
||||
|
||||
config TARGET_IMAGES_PAD
|
||||
bool "Pad images to filesystem size (for JFFS2)"
|
||||
depends on GRUB_IMAGES
|
||||
default y
|
||||
|
||||
config TARGET_IMAGES_GZIP
|
||||
bool "GZip images"
|
||||
depends on TARGET_IMAGES_PAD || TARGET_ROOTFS_EXT4FS || TARGET_x86
|
||||
default n
|
||||
default y
|
||||
|
||||
comment "Image Options"
|
||||
|
||||
@ -286,19 +268,20 @@ menu "Target Images"
|
||||
|
||||
config TARGET_KERNEL_PARTSIZE
|
||||
int "Kernel partition size (in MB)"
|
||||
depends on GRUB_IMAGES || EFI_IMAGES
|
||||
depends on GRUB_IMAGES || USES_BOOT_PART
|
||||
default 8 if TARGET_apm821xx_sata
|
||||
default 16
|
||||
|
||||
config TARGET_ROOTFS_PARTSIZE
|
||||
int "Root filesystem partition size (in MB)"
|
||||
depends on GRUB_IMAGES || USES_ROOTFS_PART || EFI_IMAGES || TARGET_ROOTFS_EXT4FS || TARGET_mvebu || TARGET_rb532 || TARGET_sunxi || TARGET_uml
|
||||
default 90
|
||||
depends on GRUB_IMAGES || USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_mvebu || TARGET_rb532 || TARGET_sunxi || 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
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
config KERNEL_BUILD_USER
|
||||
string "Custom Kernel Build User Name"
|
||||
default "lean"
|
||||
default ""
|
||||
help
|
||||
Sets the Kernel build user string, which for example will be returned
|
||||
by 'uname -a' on running systems.
|
||||
@ -27,7 +27,7 @@ config KERNEL_PRINTK
|
||||
config KERNEL_CRASHLOG
|
||||
bool "Crash logging"
|
||||
depends on !(arm || powerpc || sparc || TARGET_uml || i386 || x86_64)
|
||||
default n
|
||||
default y
|
||||
|
||||
config KERNEL_SWAP
|
||||
bool "Support for paging of anonymous memory (swap)"
|
||||
@ -35,7 +35,7 @@ config KERNEL_SWAP
|
||||
|
||||
config KERNEL_DEBUG_FS
|
||||
bool "Compile the kernel with debug filesystem enabled"
|
||||
default n
|
||||
default y
|
||||
help
|
||||
debugfs is a virtual file system that kernel developers use to put
|
||||
debugging files into. Enable this option to be able to read and
|
||||
@ -44,7 +44,7 @@ config KERNEL_DEBUG_FS
|
||||
|
||||
config KERNEL_MIPS_FPU_EMULATOR
|
||||
bool "Compile the kernel with MIPS FPU Emulator"
|
||||
default y
|
||||
default y if TARGET_pistachio
|
||||
depends on (mips || mipsel || mips64 || mips64el)
|
||||
|
||||
config KERNEL_ARM_PMU
|
||||
@ -88,7 +88,7 @@ endif
|
||||
|
||||
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.
|
||||
|
||||
@ -133,7 +133,7 @@ config KERNEL_DEBUG_KERNEL
|
||||
|
||||
config KERNEL_DEBUG_INFO
|
||||
bool "Compile the kernel with debug information"
|
||||
default n
|
||||
default y if !SMALL_FLASH
|
||||
select KERNEL_DEBUG_KERNEL
|
||||
help
|
||||
This will compile your kernel and modules with debug information.
|
||||
@ -210,7 +210,7 @@ config KERNEL_BLK_DEV_BSG
|
||||
|
||||
config KERNEL_MAGIC_SYSRQ
|
||||
bool "Compile the kernel with SysRq support"
|
||||
default n
|
||||
default y
|
||||
|
||||
config KERNEL_DEBUG_PINCTRL
|
||||
bool "Compile the kernel with pinctrl debugging"
|
||||
@ -226,7 +226,7 @@ config KERNEL_COREDUMP
|
||||
config KERNEL_ELF_CORE
|
||||
bool "Enable process core dump support"
|
||||
select KERNEL_COREDUMP
|
||||
default n
|
||||
default y if !SMALL_FLASH
|
||||
|
||||
config KERNEL_PROVE_LOCKING
|
||||
bool "Enable kernel lock checking"
|
||||
@ -817,7 +817,7 @@ config KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE
|
||||
#
|
||||
choice
|
||||
prompt "Compiler optimization level"
|
||||
default KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE if !SMALL_FLASH
|
||||
default KERNEL_CC_OPTIMIZE_FOR_SIZE if SMALL_FLASH
|
||||
|
||||
config KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE
|
||||
bool "Optimize for performance"
|
||||
|
@ -7,8 +7,8 @@ ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
|
||||
endif
|
||||
|
||||
CMAKE_BINARY_DIR = $(PKG_BUILD_DIR)$(if $(CMAKE_BINARY_SUBDIR),/$(CMAKE_BINARY_SUBDIR))
|
||||
CMAKE_SOURCE_DIR = $(PKG_BUILD_DIR)
|
||||
HOST_CMAKE_SOURCE_DIR = $(HOST_BUILD_DIR)
|
||||
CMAKE_SOURCE_DIR = $(PKG_BUILD_DIR)$(if $(CMAKE_SOURCE_SUBDIR),/$(CMAKE_SOURCE_SUBDIR))
|
||||
HOST_CMAKE_SOURCE_DIR = $(HOST_BUILD_DIR)$(if $(CMAKE_SOURCE_SUBDIR),/$(CMAKE_SOURCE_SUBDIR))
|
||||
MAKE_PATH = $(firstword $(CMAKE_BINARY_SUBDIR) .)
|
||||
|
||||
ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
|
||||
|
@ -49,6 +49,18 @@ define Build/eva-image
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/seama
|
||||
$(STAGING_DIR_HOST)/bin/seama -i $@ \
|
||||
-m "dev=/dev/mtdblock/$(SEAMA_MTDBLOCK)" -m "type=firmware"
|
||||
mv $@.seama $@
|
||||
endef
|
||||
|
||||
define Build/seama-seal
|
||||
$(STAGING_DIR_HOST)/bin/seama -i $@ -s $@.seama \
|
||||
-m "signature=$(SEAMA_SIGNATURE)"
|
||||
mv $@.seama $@
|
||||
endef
|
||||
|
||||
define Build/zyxel-ras-image
|
||||
let \
|
||||
newsize="$(subst k,* 1024,$(RAS_ROOTFS_SIZE))"; \
|
||||
@ -62,14 +74,6 @@ define Build/zyxel-ras-image
|
||||
&& mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/mkbuffaloimg
|
||||
$(STAGING_DIR_HOST)/bin/mkbuffaloimg -B $(BOARDNAME) \
|
||||
-R $$(($(subst k, * 1024,$(ROOTFS_SIZE)))) \
|
||||
-K $$(($(subst k, * 1024,$(KERNEL_SIZE)))) \
|
||||
-i $@ -o $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/netgear-chk
|
||||
$(STAGING_DIR_HOST)/bin/mkchkimg \
|
||||
-o $@.new \
|
||||
@ -98,6 +102,10 @@ define Build/append-squashfs-fakeroot-be
|
||||
cat $@.fakesquashfs >> $@
|
||||
endef
|
||||
|
||||
define Build/append-string
|
||||
echo -n $(1) >> $@
|
||||
endef
|
||||
|
||||
# append a fake/empty uImage header, to fool bootloaders rootfs integrity check
|
||||
# for example
|
||||
define Build/append-uImage-fakehdr
|
||||
@ -246,6 +254,11 @@ define Build/pad-offset
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/xor-image
|
||||
$(STAGING_DIR_HOST)/bin/xorimage -i $@ -o $@.xor $(1)
|
||||
mv $@.xor $@
|
||||
endef
|
||||
|
||||
define Build/check-size
|
||||
@[ $$(($(subst k,* 1024,$(subst m, * 1024k,$(1))))) -ge "$$(stat -c%s $@)" ] || { \
|
||||
echo "WARNING: Image file $@ is too big" >&2; \
|
||||
@ -332,7 +345,7 @@ metadata_json = \
|
||||
|
||||
define Build/append-metadata
|
||||
$(if $(SUPPORTED_DEVICES),-echo $(call metadata_json,$(SUPPORTED_DEVICES)) | fwtool -I - $@)
|
||||
[ ! -s "$(BUILD_KEY)" -o ! -s "$(BUILD_KEY).ucert" ] || { \
|
||||
[ ! -s "$(BUILD_KEY)" -o ! -s "$(BUILD_KEY).ucert" -o ! -s "$@" ] || { \
|
||||
cp "$(BUILD_KEY).ucert" "$@.ucert" ;\
|
||||
usign -S -m "$@" -s "$(BUILD_KEY)" -x "$@.sig" ;\
|
||||
ucert -A -c "$@.ucert" -x "$@.sig" ;\
|
||||
|
@ -321,6 +321,7 @@ define Device/Init
|
||||
CMDLINE:=
|
||||
|
||||
IMAGES :=
|
||||
ARTIFACTS :=
|
||||
IMAGE_PREFIX := $(IMG_PREFIX)-$(1)
|
||||
IMAGE_NAME = $$(IMAGE_PREFIX)-$$(1)-$$(2)
|
||||
KERNEL_PREFIX = $$(IMAGE_PREFIX)
|
||||
@ -498,6 +499,19 @@ define Device/Build/image
|
||||
|
||||
endef
|
||||
|
||||
define Device/Build/artifact
|
||||
$$(_TARGET): $(BIN_DIR)/$(IMAGE_PREFIX)-$(1)
|
||||
$(KDIR)/tmp/$(IMAGE_PREFIX)-$(1): $$(KDIR_KERNEL_IMAGE)
|
||||
@rm -f $$@
|
||||
$$(call concat_cmd,$(ARTIFACT/$(1)))
|
||||
|
||||
.IGNORE: $(BIN_DIR)/$(IMAGE_PREFIX)-$(1)
|
||||
|
||||
$(BIN_DIR)/$(IMAGE_PREFIX)-$(1): $(KDIR)/tmp/$(IMAGE_PREFIX)-$(1)
|
||||
cp $$^ $$@
|
||||
|
||||
endef
|
||||
|
||||
define Device/Build
|
||||
$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call Device/Build/initramfs,$(1)))
|
||||
$(call Device/Build/kernel,$(1))
|
||||
@ -508,6 +522,10 @@ define Device/Build
|
||||
$$(eval $$(foreach image,$$(IMAGES), \
|
||||
$$(foreach fs,$$(filter $(TARGET_FILESYSTEMS),$$(FILESYSTEMS)), \
|
||||
$$(call Device/Build/image,$$(fs),$$(image),$(1)))))
|
||||
|
||||
$$(eval $$(foreach artifact,$$(ARTIFACTS), \
|
||||
$$(call Device/Build/artifact,$$(artifact))))
|
||||
|
||||
endef
|
||||
|
||||
define Device/DumpInfo
|
||||
|
@ -21,16 +21,22 @@ export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include
|
||||
# defined in quilt.mk
|
||||
Kernel/Patch:=$(Kernel/Patch/Default)
|
||||
|
||||
ifneq (,$(findstring .xz,$(LINUX_SOURCE)))
|
||||
LINUX_CAT:=xzcat
|
||||
else
|
||||
LINUX_CAT:=zcat
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
|
||||
ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
|
||||
define Kernel/Prepare/Default
|
||||
xzcat $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
|
||||
$(LINUX_CAT) $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
|
||||
$(Kernel/Patch)
|
||||
$(if $(QUILT),touch $(LINUX_DIR)/.quilt_used)
|
||||
endef
|
||||
else
|
||||
define Kernel/Prepare/Default
|
||||
xzcat $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
|
||||
$(LINUX_CAT) $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
|
||||
endef
|
||||
endif
|
||||
else
|
||||
|
@ -4,12 +4,12 @@ LINUX_RELEASE?=1
|
||||
|
||||
LINUX_VERSION-3.18 = .130
|
||||
LINUX_VERSION-4.9 = .146
|
||||
LINUX_VERSION-4.14 = .89
|
||||
LINUX_VERSION-4.14 = .90
|
||||
LINUX_VERSION-4.19 = .9
|
||||
|
||||
LINUX_KERNEL_HASH-3.18.130 = d1bf85ed3fd0067b1134178ed5492ae0053cb3fdd5361986fe0b85234fc82723
|
||||
LINUX_KERNEL_HASH-4.9.146 = 58195a8be3085d117c83a2ed1caa3b46ea7c1614c75f951b9f13f7adb03f8e59
|
||||
LINUX_KERNEL_HASH-4.14.89 = ce6e16ac44dddd0d6a232bf2ce03e8bf8beca19f9b84503684466d140a1a0b25
|
||||
LINUX_KERNEL_HASH-4.14.90 = 0c1ed0c93085e44ad89cd279647b0e4617d06ce5a482213b5481b612ffa186ca
|
||||
LINUX_KERNEL_HASH-4.19.9 = fc116cc6829c73944215d3b3ac0fc368dde9e8235b456744afffde001269dbf2
|
||||
|
||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||
|
@ -59,10 +59,16 @@ else
|
||||
|
||||
LINUX_KERNEL:=$(KERNEL_BUILD_DIR)/vmlinux
|
||||
|
||||
LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.xz
|
||||
TESTING:=$(if $(findstring -rc,$(LINUX_VERSION)),/testing,)
|
||||
ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
|
||||
LINUX_SITE:=@KERNEL/linux/kernel/v$(word 1,$(subst ., ,$(KERNEL_BASE))).x$(TESTING)
|
||||
ifneq (,$(findstring -rc,$(LINUX_VERSION)))
|
||||
LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.gz
|
||||
else
|
||||
LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.xz
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring -rc,$(LINUX_VERSION)))
|
||||
LINUX_SITE:=https://git.kernel.org/torvalds/t
|
||||
else ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
|
||||
LINUX_SITE:=@KERNEL/linux/kernel/v$(word 1,$(subst ., ,$(KERNEL_BASE))).x
|
||||
else
|
||||
LINUX_UNAME_VERSION:=$(strip $(shell cat $(LINUX_DIR)/include/config/kernel.release 2>/dev/null))
|
||||
endif
|
||||
@ -97,7 +103,7 @@ endif
|
||||
|
||||
KERNEL_MAKE = $(MAKE) $(KERNEL_MAKEOPTS)
|
||||
|
||||
KERNEL_MAKE_FLAGS := \
|
||||
KERNEL_MAKE_FLAGS = \
|
||||
HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \
|
||||
CROSS_COMPILE="$(KERNEL_CROSS)" \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
@ -253,8 +259,8 @@ $(call KernelPackage/$(1)/config)
|
||||
endif
|
||||
$$(eval $$(call BuildPackage,kmod-$(1)))
|
||||
|
||||
$$(IPKG_kmod-$(1)): $$(wildcard $$(FILES))
|
||||
|
||||
$$(IPKG_kmod-$(1)): $$(wildcard $$(call version_filter,$$(FILES)))
|
||||
|
||||
endef
|
||||
|
||||
version_filter=$(if $(findstring @,$(1)),$(shell $(SCRIPT_DIR)/package-metadata.pl version_filter $(KERNEL_PATCHVER) $(1)),$(1))
|
||||
|
@ -80,6 +80,7 @@ $(eval $(call nf_add,IPT_CONNTRACK,CONFIG_NETFILTER_XT_MATCH_CONNTRACK, $(P_XT)x
|
||||
|
||||
$(eval $(call nf_add,IPT_CONNTRACK_EXTRA,CONFIG_NETFILTER_XT_MATCH_CONNBYTES, $(P_XT)xt_connbytes))
|
||||
$(eval $(call nf_add,IPT_CONNTRACK_EXTRA,CONFIG_NETFILTER_XT_MATCH_CONNLIMIT, $(P_XT)xt_connlimit))
|
||||
$(eval $(call nf_add,IPT_CONNTRACK_EXTRA,CONFIG_NETFILTER_CONNCOUNT, $(P_XT)nf_conncount))
|
||||
$(eval $(call nf_add,IPT_CONNTRACK_EXTRA,CONFIG_NETFILTER_XT_CONNMARK, $(P_XT)xt_connmark))
|
||||
$(eval $(call nf_add,IPT_CONNTRACK_EXTRA,CONFIG_NETFILTER_XT_MATCH_HELPER, $(P_XT)xt_helper))
|
||||
$(eval $(call nf_add,IPT_CONNTRACK_EXTRA,CONFIG_NETFILTER_XT_MATCH_RECENT, $(P_XT)xt_recent))
|
||||
@ -156,7 +157,8 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NF_REJECT6,CONFIG_NF_REJECT_IPV6, $(P_V6)nf
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_IPT6,CONFIG_IP6_NF_IPTABLES, $(P_V6)ip6_tables),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK6,CONFIG_NF_DEFRAG_IPV6, $(P_V6)nf_defrag_ipv6),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_DEFRAG_IPV6, $(P_V6)nf_defrag_ipv6, ge 4.19),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK6,CONFIG_NF_DEFRAG_IPV6, $(P_V6)nf_defrag_ipv6, lt 4.19),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK6,CONFIG_NF_CONNTRACK_IPV6, $(P_V6)nf_conntrack_ipv6),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_FILTER, $(P_V6)ip6table_filter),))
|
||||
@ -185,10 +187,10 @@ $(eval $(call nf_add,IPT_IPV6_EXTRA,CONFIG_IP6_NF_MATCH_RT, $(P_V6)ip6t_rt))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT, $(P_XT)nf_nat),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_REDIRECT, $(P_XT)nf_nat_redirect, ge 3.19.0),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_IPV4, $(P_V4)nf_nat_ipv4),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_MASQUERADE_IPV4, $(P_V4)nf_nat_masquerade_ipv4),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_MASQUERADE_IPV4, $(P_V4)nf_nat_masquerade_ipv4, lt 4.18),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT6,CONFIG_NF_NAT_IPV6, $(P_V6)nf_nat_ipv6),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT6,CONFIG_NF_NAT_MASQUERADE_IPV6, $(P_V6)nf_nat_masquerade_ipv6),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT6,CONFIG_NF_NAT_MASQUERADE_IPV6, $(P_V6)nf_nat_masquerade_ipv6, lt 4.18),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT,CONFIG_NETFILTER_XT_NAT, $(P_XT)xt_nat),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT,CONFIG_IP_NF_NAT, $(P_V4)iptable_nat),))
|
||||
@ -258,7 +260,11 @@ $(eval $(call nf_add,IPT_DEBUG,CONFIG_NETFILTER_XT_TARGET_TRACE, $(P_XT)xt_TRACE
|
||||
# tproxy
|
||||
|
||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NETFILTER_XT_MATCH_SOCKET, $(P_XT)xt_socket))
|
||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV4, $(P_V4)nf_socket_ipv4, ge 4.10))
|
||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV6, $(P_V6)nf_socket_ipv6, ge 4.10))
|
||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NETFILTER_XT_TARGET_TPROXY, $(P_XT)xt_TPROXY))
|
||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_TPROXY_IPV4, $(P_V4)nf_tproxy_ipv4, ge 4.18))
|
||||
$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_TPROXY_IPV6, $(P_V6)nf_tproxy_ipv6, ge 4.18))
|
||||
|
||||
# led
|
||||
$(eval $(call nf_add,IPT_LED,CONFIG_NETFILTER_XT_TARGET_LED, $(P_XT)xt_LED))
|
||||
@ -328,7 +334,7 @@ $(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_NFQUEUE, $(P_EBT)ebt_nf
|
||||
|
||||
# nftables
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES, $(P_XT)nf_tables),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_INET, $(P_XT)nf_tables_inet),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_INET, $(P_XT)nf_tables_inet, lt 4.17),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_EXTHDR, $(P_XT)nft_exthdr),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_META, $(P_XT)nft_meta),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_NUMGEN, $(P_XT)nft_numgen, ge 4.9.0),))
|
||||
@ -342,16 +348,16 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_LOG, $(P_XT)nft_log),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_LIMIT, $(P_XT)nft_limit),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_REJECT, $(P_XT)nft_reject $(P_V4)nft_reject_ipv4 $(P_V6)nft_reject_ipv6),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_REJECT_INET, $(P_XT)nft_reject_inet),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_IPV4, $(P_V4)nf_tables_ipv4),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_IPV4, $(P_V4)nf_tables_ipv4, lt 4.17),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_CHAIN_ROUTE_IPV4, $(P_V4)nft_chain_route_ipv4),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_IPV6, $(P_V6)nf_tables_ipv6),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NF_TABLES_IPV6, $(P_V6)nf_tables_ipv6, lt 4.17),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_CHAIN_ROUTE_IPV6, $(P_V6)nft_chain_route_ipv6),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_REDIR, $(P_XT)nft_redir, ge 3.19.0),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CORE,CONFIG_NFT_QUOTA, $(P_XT)nft_quota, ge 4.9.0),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_ARP,CONFIG_NF_TABLES_ARP, $(P_V4)nf_tables_arp),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_ARP,CONFIG_NF_TABLES_ARP, $(P_V4)nf_tables_arp, lt 4.17),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_BRIDGE,CONFIG_NF_TABLES_BRIDGE, $(P_EBT)nf_tables_bridge),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_BRIDGE,CONFIG_NF_TABLES_BRIDGE, $(P_EBT)nf_tables_bridge, lt 4.17),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_BRIDGE,CONFIG_NFT_BRIDGE_META, $(P_EBT)nft_meta_bridge),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_BRIDGE,CONFIG_NFT_BRIDGE_REJECT, $(P_EBT)nft_reject_bridge),))
|
||||
|
||||
@ -365,6 +371,11 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT6,CONFIG_NFT_REDIR_IPV6, $(P_V6)nft_
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT6,CONFIG_NFT_CHAIN_NAT_IPV6, $(P_V6)nft_chain_nat_ipv6),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT6,CONFIG_NFT_MASQ_IPV6, $(P_V6)nft_masq_ipv6),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_FIB,CONFIG_NFT_FIB, $(P_XT)nft_fib),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_FIB,CONFIG_NFT_FIB_INET, $(P_XT)nft_fib_inet),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_FIB,CONFIG_NFT_FIB_IPV4, $(P_V4)nft_fib_ipv4),))
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_FIB,CONFIG_NFT_FIB_IPV6, $(P_V6)nft_fib_ipv6),))
|
||||
|
||||
|
||||
# userland only
|
||||
IPT_BUILTIN += $(NF_IPT-y) $(NF_IPT-m)
|
||||
|
@ -90,6 +90,7 @@ define prepare_rootfs
|
||||
rm -f $(1)/usr/lib/opkg/lists/*
|
||||
rm -f $(1)/usr/lib/opkg/info/*.postinst*
|
||||
rm -f $(1)/var/lock/*.lock
|
||||
rm -rf $(1)/boot
|
||||
$(call clean_ipkg,$(1))
|
||||
$(call mklibs,$(1))
|
||||
endef
|
||||
|
@ -26,13 +26,13 @@ PKG_CONFIG_DEPENDS += \
|
||||
sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
|
||||
|
||||
VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),18.06.1)
|
||||
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),SNAPSHOT)
|
||||
|
||||
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
|
||||
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))
|
||||
|
||||
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),http://downloads.openwrt.org/releases/18.06.1)
|
||||
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),http://downloads.openwrt.org/snapshots)
|
||||
|
||||
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
|
||||
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)
|
||||
|
@ -1,4 +1,50 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2006-2009 OpenWrt.org
|
||||
# Copyright (C) 2006-2019 OpenWrt.org
|
||||
|
||||
set_state() { :; }
|
||||
. /lib/functions/leds.sh
|
||||
|
||||
boot="$(get_dt_led boot)"
|
||||
failsafe="$(get_dt_led failsafe)"
|
||||
running="$(get_dt_led running)"
|
||||
upgrade="$(get_dt_led upgrade)"
|
||||
|
||||
set_led_state() {
|
||||
status_led="$boot"
|
||||
|
||||
case "$1" in
|
||||
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="$running"
|
||||
status_led_off
|
||||
}
|
||||
status_led="$upgrade"
|
||||
status_led_blink_preinit_regular
|
||||
;;
|
||||
done)
|
||||
status_led_off
|
||||
[ -n "$running" ] && {
|
||||
status_led="$running"
|
||||
status_led_on
|
||||
}
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
set_state() {
|
||||
[ -n "$boot" -o -n "$failsafe" -o -n "$running" -o -n "$upgrade" ] && set_led_state "$1"
|
||||
}
|
||||
|
@ -14,6 +14,4 @@ boot() {
|
||||
# set leds to normal state
|
||||
. /etc/diag.sh
|
||||
set_state done
|
||||
|
||||
sync
|
||||
}
|
||||
|
@ -71,7 +71,10 @@ load_led() {
|
||||
"netdev")
|
||||
[ -n "$dev" ] && {
|
||||
echo $dev > /sys/class/leds/${sysfs}/device_name
|
||||
echo "${mode:-link}" > /sys/class/leds/${sysfs}/mode
|
||||
for m in $mode; do
|
||||
[ -e "/sys/class/leds/${sysfs}/$m" ] && \
|
||||
echo 1 > /sys/class/leds/${sysfs}/$m
|
||||
done
|
||||
echo $interval > /sys/class/leds/${sysfs}/interval
|
||||
}
|
||||
;;
|
||||
|
8
package/base-files/files/etc/iproute2/ematch_map
Normal file
8
package/base-files/files/etc/iproute2/ematch_map
Normal file
@ -0,0 +1,8 @@
|
||||
# lookup table for ematch kinds
|
||||
1 cmp
|
||||
2 nbyte
|
||||
3 u32
|
||||
4 meta
|
||||
7 canid
|
||||
8 ipset
|
||||
9 ipt
|
@ -23,6 +23,7 @@ reload() {
|
||||
restart() {
|
||||
trap '' TERM
|
||||
stop "$@"
|
||||
trap - TERM
|
||||
start "$@"
|
||||
}
|
||||
|
||||
|
@ -152,22 +152,27 @@ config_list_foreach() {
|
||||
|
||||
default_prerm() {
|
||||
local root="${IPKG_INSTROOT}"
|
||||
local name
|
||||
local pkgname="$(basename ${1%.*})"
|
||||
local ret=0
|
||||
|
||||
name=$(basename ${1%.*})
|
||||
[ -f "$root/usr/lib/opkg/info/${name}.prerm-pkg" ] && . "$root/usr/lib/opkg/info/${name}.prerm-pkg"
|
||||
if [ -f "$root/usr/lib/opkg/info/${pkgname}.prerm-pkg" ]; then
|
||||
( . "$root/usr/lib/opkg/info/${pkgname}.prerm-pkg" )
|
||||
ret=$?
|
||||
fi
|
||||
|
||||
local shell="$(which bash)"
|
||||
for i in `cat "$root/usr/lib/opkg/info/${name}.list" | grep "^/etc/init.d/"`; do
|
||||
for i in $(grep -s "^/etc/init.d/" "$root/usr/lib/opkg/info/${pkgname}.list"); do
|
||||
if [ -n "$root" ]; then
|
||||
${shell:-/bin/sh} "$root/etc/rc.common" "$root$i" disable
|
||||
else
|
||||
if [ "$PKG_UPGRADE" != "1" ]; then
|
||||
"$i" disable
|
||||
fi
|
||||
"$i" stop || /bin/true
|
||||
"$i" stop
|
||||
fi
|
||||
done
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
add_group_and_user() {
|
||||
|
@ -82,7 +82,7 @@ fs_wait_for_key () {
|
||||
|
||||
failsafe_wait() {
|
||||
FAILSAFE=
|
||||
[ "$pi_preinit_no_failsafe" == "y" ] && {
|
||||
[ "$pi_preinit_no_failsafe" = "y" ] && {
|
||||
fs_wait_for_key "" "" $fs_failsafe_wait_timeout
|
||||
return
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ do_urandom_seed() {
|
||||
_do_urandom_seed "/etc/urandom.seed"
|
||||
|
||||
SEED="$(uci -q get system.@system[0].urandom_seed)"
|
||||
[ "${SEED:0:1}" == "/" -a "$SEED" != "/etc/urandom.seed" ] && _do_urandom_seed "$SEED"
|
||||
[ "${SEED:0:1}" = "/" -a "$SEED" != "/etc/urandom.seed" ] && _do_urandom_seed "$SEED"
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main do_urandom_seed
|
||||
|
@ -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}"
|
||||
@ -182,7 +164,7 @@ export_partdevice() {
|
||||
}
|
||||
|
||||
hex_le32_to_cpu() {
|
||||
[ "$(echo 01 | hexdump -v -n 2 -e '/2 "%x"')" == "3031" ] && {
|
||||
[ "$(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
|
||||
}
|
||||
|
@ -10,6 +10,9 @@ CI_KERNPART="${CI_KERNPART:-kernel}"
|
||||
# 'ubi' partition on NAND contains UBI
|
||||
CI_UBIPART="${CI_UBIPART:-ubi}"
|
||||
|
||||
# 'rootfs' partition on NAND contains the rootfs
|
||||
CI_ROOTPART="${CI_ROOTPART:-rootfs}"
|
||||
|
||||
ubi_mknod() {
|
||||
local dir="$1"
|
||||
local dev="/dev/$(basename $dir)"
|
||||
@ -99,7 +102,7 @@ nand_restore_config() {
|
||||
local ubidev=$( nand_find_ubi $CI_UBIPART )
|
||||
local ubivol="$( nand_find_volume $ubidev rootfs_data )"
|
||||
[ ! "$ubivol" ] &&
|
||||
ubivol="$( nand_find_volume $ubidev rootfs )"
|
||||
ubivol="$( nand_find_volume $ubidev $CI_ROOTPART )"
|
||||
mkdir /tmp/new_root
|
||||
if ! mount -t ubifs /dev/$ubivol /tmp/new_root; then
|
||||
echo "mounting ubifs $ubivol failed"
|
||||
@ -143,7 +146,7 @@ nand_upgrade_prepare_ubi() {
|
||||
fi
|
||||
|
||||
local kern_ubivol="$( nand_find_volume $ubidev $CI_KERNPART )"
|
||||
local root_ubivol="$( nand_find_volume $ubidev rootfs )"
|
||||
local root_ubivol="$( nand_find_volume $ubidev $CI_ROOTPART )"
|
||||
local data_ubivol="$( nand_find_volume $ubidev rootfs_data )"
|
||||
|
||||
# remove ubiblock device of rootfs
|
||||
@ -158,7 +161,7 @@ nand_upgrade_prepare_ubi() {
|
||||
|
||||
# kill volumes
|
||||
[ "$kern_ubivol" ] && ubirmvol /dev/$ubidev -N $CI_KERNPART || true
|
||||
[ "$root_ubivol" ] && ubirmvol /dev/$ubidev -N rootfs || true
|
||||
[ "$root_ubivol" ] && ubirmvol /dev/$ubidev -N $CI_ROOTPART || true
|
||||
[ "$data_ubivol" ] && ubirmvol /dev/$ubidev -N rootfs_data || true
|
||||
|
||||
# update kernel
|
||||
@ -176,7 +179,7 @@ nand_upgrade_prepare_ubi() {
|
||||
else
|
||||
root_size_param="-s $rootfs_length"
|
||||
fi
|
||||
if ! ubimkvol /dev/$ubidev -N rootfs $root_size_param; then
|
||||
if ! ubimkvol /dev/$ubidev -N $CI_ROOTPART $root_size_param; then
|
||||
echo "cannot create rootfs volume"
|
||||
return 1;
|
||||
fi
|
||||
@ -233,7 +236,7 @@ nand_upgrade_ubifs() {
|
||||
nand_upgrade_prepare_ubi "$rootfs_length" "ubifs" "0" "0"
|
||||
|
||||
local ubidev="$( nand_find_ubi "$CI_UBIPART" )"
|
||||
local root_ubivol="$(nand_find_volume $ubidev rootfs)"
|
||||
local root_ubivol="$(nand_find_volume $ubidev $CI_ROOTPART)"
|
||||
ubiupdatevol /dev/$root_ubivol -s $rootfs_length $1
|
||||
|
||||
nand_do_upgrade_success
|
||||
@ -268,7 +271,7 @@ nand_upgrade_tar() {
|
||||
ubiupdatevol /dev/$kern_ubivol -s $kernel_length -
|
||||
}
|
||||
|
||||
local root_ubivol="$(nand_find_volume $ubidev rootfs)"
|
||||
local root_ubivol="$(nand_find_volume $ubidev $CI_ROOTPART)"
|
||||
tar xf $tar_file ${board_dir}/root -O | \
|
||||
ubiupdatevol /dev/$root_ubivol -s $rootfs_length -
|
||||
|
||||
|
@ -9,7 +9,10 @@ export INTERACTIVE=0
|
||||
export VERBOSE=1
|
||||
export SAVE_CONFIG=1
|
||||
export SAVE_OVERLAY=0
|
||||
export SAVE_OVERLAY_PATH=
|
||||
export SAVE_PARTITIONS=1
|
||||
export SAVE_INSTALLED_PKGS=0
|
||||
export SKIP_UNCHANGED=0
|
||||
export CONF_IMAGE=
|
||||
export CONF_BACKUP_LIST=0
|
||||
export CONF_BACKUP=
|
||||
@ -18,6 +21,7 @@ export NEED_IMAGE=
|
||||
export HELP=0
|
||||
export FORCE=0
|
||||
export TEST=0
|
||||
export UMOUNT_ETCBACKUP_DIR=0
|
||||
|
||||
# parse options
|
||||
while [ -n "$1" ]; do
|
||||
@ -26,17 +30,20 @@ while [ -n "$1" ]; do
|
||||
-v) export VERBOSE="$(($VERBOSE + 1))";;
|
||||
-q) export VERBOSE="$(($VERBOSE - 1))";;
|
||||
-n) export SAVE_CONFIG=0;;
|
||||
-c) export SAVE_OVERLAY=1;;
|
||||
-c) export SAVE_OVERLAY=1 SAVE_OVERLAY_PATH=/etc;;
|
||||
-o) export SAVE_OVERLAY=1 SAVE_OVERLAY_PATH=/;;
|
||||
-p) export SAVE_PARTITIONS=0;;
|
||||
-k) export SAVE_INSTALLED_PKGS=1;;
|
||||
-u) export SKIP_UNCHANGED=1;;
|
||||
-b|--create-backup) export CONF_BACKUP="$2" NEED_IMAGE=1; shift;;
|
||||
-r|--restore-backup) export CONF_RESTORE="$2" NEED_IMAGE=1; shift;;
|
||||
-l|--list-backup) export CONF_BACKUP_LIST=1; break;;
|
||||
-l|--list-backup) export CONF_BACKUP_LIST=1;;
|
||||
-f) export CONF_IMAGE="$2"; shift;;
|
||||
-F|--force) export FORCE=1;;
|
||||
-T|--test) export TEST=1;;
|
||||
-h|--help) export HELP=1; break;;
|
||||
-*)
|
||||
echo "Invalid option: $1"
|
||||
echo "Invalid option: $1" >&2
|
||||
exit 1
|
||||
;;
|
||||
*) break;;
|
||||
@ -46,20 +53,27 @@ done
|
||||
|
||||
export CONFFILES=/tmp/sysupgrade.conffiles
|
||||
export CONF_TAR=/tmp/sysupgrade.tgz
|
||||
export ETCBACKUP_DIR=/etc/backup
|
||||
export INSTALLED_PACKAGES=${ETCBACKUP_DIR}/installed_packages.txt
|
||||
|
||||
IMAGE="$1"
|
||||
|
||||
[ -z "$IMAGE" -a -z "$NEED_IMAGE" -o $HELP -gt 0 ] && {
|
||||
[ -z "$IMAGE" -a -z "$NEED_IMAGE" -a $CONF_BACKUP_LIST -eq 0 -o $HELP -gt 0 ] && {
|
||||
cat <<EOF
|
||||
Usage: $0 [<upgrade-option>...] <image file or URL>
|
||||
$0 [-q] [-i] <backup-command> <file>
|
||||
$0 [-q] [-i] [-c] [-u] [-o] [-k] <backup-command> <file>
|
||||
|
||||
upgrade-option:
|
||||
-f <config> restore configuration from .tar.gz (file or url)
|
||||
-i interactive mode
|
||||
-c attempt to preserve all changed files in /etc/
|
||||
-o attempt to preserve all changed files in /, except those
|
||||
from packages but including changed confs.
|
||||
-u skip from backup files that are equal to those in /rom
|
||||
-n do not save configuration over reflash
|
||||
-p do not attempt to restore the partition table after flash.
|
||||
-k include in backup a list of current installed packages at
|
||||
$INSTALLED_PACKAGES
|
||||
-T | --test
|
||||
Verify image and config .tar.gz but do not actually flash.
|
||||
-F | --force
|
||||
@ -115,23 +129,64 @@ list_changed_conffiles() {
|
||||
done
|
||||
}
|
||||
|
||||
add_uci_conffiles() {
|
||||
add_conffiles() {
|
||||
local file="$1"
|
||||
( find $(sed -ne '/^[[:space:]]*$/d; /^#/d; p' \
|
||||
/etc/sysupgrade.conf /lib/upgrade/keep.d/* 2>/dev/null) \
|
||||
-type f -o -type l 2>/dev/null;
|
||||
\( -type f -o -type l \) $find_filter 2>/dev/null;
|
||||
list_changed_conffiles ) | sort -u > "$file"
|
||||
return 0
|
||||
}
|
||||
|
||||
add_overlayfiles() {
|
||||
local file="$1"
|
||||
find /overlay/upper/etc/ -type f -o -type l | sed \
|
||||
-e 's,^/overlay\/upper/,/,' \
|
||||
-e '\,/META_[a-zA-Z0-9]*$,d' \
|
||||
-e '\,/functions.sh$,d' \
|
||||
|
||||
local packagesfiles=$1.packagesfiles
|
||||
touch "$packagesfiles"
|
||||
|
||||
if [ "$SAVE_OVERLAY_PATH" = / ]; then
|
||||
local conffiles=$1.conffiles
|
||||
local keepfiles=$1.keepfiles
|
||||
|
||||
list_conffiles | cut -f2 -d ' ' | sort -u > "$conffiles"
|
||||
|
||||
# backup files from /etc/sysupgrade.conf and /lib/upgrade/keep.d, but
|
||||
# ignore those aready controlled by opkg conffiles
|
||||
find $(sed -ne '/^[[:space:]]*$/d; /^#/d; p' \
|
||||
/etc/sysupgrade.conf /lib/upgrade/keep.d/* 2>/dev/null) \
|
||||
\( -type f -o -type l \) 2>/dev/null | sort -u |
|
||||
grep -h -v -x -F -f $conffiles > "$keepfiles"
|
||||
|
||||
# backup conffiles, but only those changed if '-u'
|
||||
[ $SKIP_UNCHANGED = 1 ] &&
|
||||
list_changed_conffiles | sort -u > "$conffiles"
|
||||
|
||||
# do not backup files from packages, except those listed
|
||||
# in conffiles and keep.d
|
||||
{
|
||||
find /usr/lib/opkg/info -type f -name "*.list" -exec cat {} \;
|
||||
find /usr/lib/opkg/info -type f -name "*.control" -exec sed \
|
||||
-ne '/^Alternatives/{s/^Alternatives: //;s/, /\n/g;p}' {} \; |
|
||||
cut -f2 -d:
|
||||
} | grep -v -x -F -f $conffiles |
|
||||
grep -v -x -F -f $keepfiles | sort -u > "$packagesfiles"
|
||||
rm -f "$keepfiles" "$conffiles"
|
||||
fi
|
||||
|
||||
# busybox grep bug when file is empty
|
||||
[ -s "$packagesfiles" ] || echo > $packagesfiles
|
||||
|
||||
( cd /overlay/upper/; find .$SAVE_OVERLAY_PATH \( -type f -o -type l \) $find_filter | sed \
|
||||
-e 's,^\.,,' \
|
||||
-e '\,^/etc/board.json$,d' \
|
||||
-e '\,/[^/]*-opkg$,d' \
|
||||
> "$file"
|
||||
-e '\,^/etc/urandom.seed$,d' \
|
||||
-e "\,^$INSTALLED_PACKAGES$,d" \
|
||||
-e '\,^/usr/lib/opkg/.*,d' \
|
||||
) | grep -v -x -F -f $packagesfiles > "$file"
|
||||
|
||||
rm -f "$packagesfiles"
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
@ -140,21 +195,30 @@ sysupgrade_image_check="fwtool_check_signature fwtool_check_image platform_check
|
||||
|
||||
if [ $SAVE_OVERLAY = 1 ]; then
|
||||
[ ! -d /overlay/upper/etc ] && {
|
||||
echo "Cannot find '/overlay/upper/etc', required for '-c'"
|
||||
echo "Cannot find '/overlay/upper/etc', required for '-c'" >&2
|
||||
exit 1
|
||||
}
|
||||
sysupgrade_init_conffiles="add_overlayfiles"
|
||||
else
|
||||
sysupgrade_init_conffiles="add_uci_conffiles"
|
||||
sysupgrade_init_conffiles="add_conffiles"
|
||||
fi
|
||||
|
||||
find_filter=""
|
||||
if [ $SKIP_UNCHANGED = 1 ]; then
|
||||
[ ! -d /rom/ ] && {
|
||||
echo "'/rom/' is required by '-u'"
|
||||
exit 1
|
||||
}
|
||||
find_filter='( ( -exec test -e /rom/{} ; -exec cmp -s /{} /rom/{} ; ) -o -print )'
|
||||
fi
|
||||
|
||||
include /lib/upgrade
|
||||
|
||||
do_save_conffiles() {
|
||||
local conf_tar="${1:-$CONF_TAR}"
|
||||
local conf_tar="$1"
|
||||
|
||||
[ -z "$(rootfs_type)" ] && {
|
||||
echo "Cannot save config while running from ramdisk."
|
||||
echo "Cannot save config while running from ramdisk." >&2
|
||||
ask_bool 0 "Abort" && exit
|
||||
rm -f "$conf_tar"
|
||||
return 0
|
||||
@ -162,6 +226,27 @@ do_save_conffiles() {
|
||||
run_hooks "$CONFFILES" $sysupgrade_init_conffiles
|
||||
ask_bool 0 "Edit config file list" && vi "$CONFFILES"
|
||||
|
||||
if [ "$SAVE_INSTALLED_PKGS" -eq 1 ]; then
|
||||
echo "${INSTALLED_PACKAGES}" >> "$CONFFILES"
|
||||
mkdir -p "$ETCBACKUP_DIR"
|
||||
# Avoid touching filesystem on each backup
|
||||
RAMFS="$(mktemp -d -t sysupgrade.XXXXXX)"
|
||||
mkdir -p "$RAMFS/upper" "$RAMFS/work"
|
||||
mount -t overlay overlay -o lowerdir=$ETCBACKUP_DIR,upperdir=$RAMFS/upper,workdir=$RAMFS/work $ETCBACKUP_DIR &&
|
||||
UMOUNT_ETCBACKUP_DIR=1 || {
|
||||
echo "Cannot mount '$ETCBACKUP_DIR' as tmpfs to avoid touching disk while saving the list of installed packages." >&2
|
||||
ask_bool 0 "Abort" && exit
|
||||
}
|
||||
|
||||
# Format: pkg-name<TAB>{rom,overlay,unkown}
|
||||
# rom is used for pkgs in /rom, even if updated later
|
||||
find /usr/lib/opkg/info -name "*.control" \( \
|
||||
\( -exec test -f /rom/{} \; -exec echo {} rom \; \) -o \
|
||||
\( -exec test -f /overlay/upper/{} \; -exec echo {} overlay \; \) -o \
|
||||
\( -exec echo {} unknown \; \) \
|
||||
\) | sed -e 's,.*/,,;s/\.control /\t/' > ${INSTALLED_PACKAGES}
|
||||
fi
|
||||
|
||||
v "Saving config files..."
|
||||
[ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V=""
|
||||
tar c${TAR_V}zf "$conf_tar" -T "$CONFFILES" 2>/dev/null
|
||||
@ -171,11 +256,16 @@ do_save_conffiles() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ "$UMOUNT_ETCBACKUP_DIR" -eq 1 ] && {
|
||||
umount "$ETCBACKUP_DIR"
|
||||
rm -rf "$RAMFS"
|
||||
}
|
||||
rm -f "$CONFFILES"
|
||||
}
|
||||
|
||||
if [ $CONF_BACKUP_LIST -eq 1 ]; then
|
||||
run_hooks "$CONFFILES" $sysupgrade_init_conffiles
|
||||
[ "$SAVE_INSTALLED_PKGS" -eq 1 ] && echo ${INSTALLED_PACKAGES} >> "$CONFFILES"
|
||||
cat "$CONFFILES"
|
||||
rm -f "$CONFFILES"
|
||||
exit 0
|
||||
@ -188,7 +278,7 @@ fi
|
||||
|
||||
if [ -n "$CONF_RESTORE" ]; then
|
||||
if [ "$CONF_RESTORE" != "-" ] && [ ! -f "$CONF_RESTORE" ]; then
|
||||
echo "Backup archive '$CONF_RESTORE' not found."
|
||||
echo "Backup archive '$CONF_RESTORE' not found." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -198,12 +288,13 @@ if [ -n "$CONF_RESTORE" ]; then
|
||||
fi
|
||||
|
||||
type platform_check_image >/dev/null 2>/dev/null || {
|
||||
echo "Firmware upgrade is not implemented for this platform."
|
||||
echo "Firmware upgrade is not implemented for this platform." >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
case "$IMAGE" in
|
||||
http://*)
|
||||
http://*|\
|
||||
https://*)
|
||||
wget -O/tmp/sysupgrade.img "$IMAGE"
|
||||
IMAGE=/tmp/sysupgrade.img
|
||||
;;
|
||||
@ -213,7 +304,7 @@ IMAGE="$(readlink -f "$IMAGE")"
|
||||
|
||||
case "$IMAGE" in
|
||||
'')
|
||||
echo "Image file not found."
|
||||
echo "Image file not found." >&2
|
||||
exit 1
|
||||
;;
|
||||
/tmp/*) ;;
|
||||
@ -230,10 +321,10 @@ export ARGC=1
|
||||
for check in $sysupgrade_image_check; do
|
||||
( $check "$IMAGE" ) || {
|
||||
if [ $FORCE -eq 1 ]; then
|
||||
echo "Image check '$check' failed but --force given - will update anyway!"
|
||||
echo "Image check '$check' failed but --force given - will update anyway!" >&2
|
||||
break
|
||||
else
|
||||
echo "Image check '$check' failed."
|
||||
echo "Image check '$check' failed." >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
@ -244,14 +335,14 @@ if [ -n "$CONF_IMAGE" ]; then
|
||||
# .gz files
|
||||
1f8b) ;;
|
||||
*)
|
||||
echo "Invalid config file. Please use only .tar.gz files"
|
||||
echo "Invalid config file. Please use only .tar.gz files" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
get_image "$CONF_IMAGE" "cat" > "$CONF_TAR"
|
||||
export SAVE_CONFIG=1
|
||||
elif ask_bool $SAVE_CONFIG "Keep config files over reflash"; then
|
||||
[ $TEST -eq 1 ] || do_save_conffiles
|
||||
[ $TEST -eq 1 ] || do_save_conffiles "$CONF_TAR"
|
||||
export SAVE_CONFIG=1
|
||||
else
|
||||
[ $TEST -eq 1 ] || rm -f "$CONF_TAR"
|
||||
|
@ -13,7 +13,7 @@ save() {
|
||||
}
|
||||
|
||||
SEED="$(uci -q get system.@system[0].urandom_seed || true)"
|
||||
[ "${SEED:0:1}" == "/" ] && save "$SEED"
|
||||
[ "${SEED:0:1}" = "/" ] && save "$SEED"
|
||||
|
||||
SEED=/etc/urandom.seed
|
||||
[ ! -f $SEED ] && save "$SEED"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$(uci -q get system.@system[0].ttylogin)" == 1 ] || exec /bin/ash --login
|
||||
[ "$(uci -q get system.@system[0].ttylogin)" = 1 ] || exec /bin/ash --login
|
||||
|
||||
exec /bin/login
|
||||
|
@ -8,29 +8,27 @@
|
||||
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:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
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
|
||||
HOST_BUILD_DIR := $(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
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
|
||||
@ -38,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 += \
|
||||
@ -72,3 +83,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))
|
@ -1,23 +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
|
||||
HOST_BUILD_DIR := $(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
define Package/grub2-efi
|
||||
$(call Package/grub2/Default)
|
||||
HIDDEN:=1
|
||||
TITLE += (with EFI support)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
$(eval $(call BuildPackage,grub2-efi))
|
@ -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))
|
75
package/boot/grub2/patches/400-R_X86_64_PLT32.patch
Normal file
75
package/boot/grub2/patches/400-R_X86_64_PLT32.patch
Normal file
@ -0,0 +1,75 @@
|
||||
From 02702bdfe14d8a04643a45b03715f734ae34dbac Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Sat, 17 Feb 2018 06:47:28 -0800
|
||||
Subject: x86-64: Treat R_X86_64_PLT32 as R_X86_64_PC32
|
||||
|
||||
Starting from binutils commit bd7ab16b4537788ad53521c45469a1bdae84ad4a:
|
||||
|
||||
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=bd7ab16b4537788ad53521c45469a1bdae84ad4a
|
||||
|
||||
x86-64 assembler generates R_X86_64_PLT32, instead of R_X86_64_PC32, for
|
||||
32-bit PC-relative branches. Grub2 should treat R_X86_64_PLT32 as
|
||||
R_X86_64_PC32.
|
||||
|
||||
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
|
||||
Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=842c390469e2c2e10b5aa36700324cd3bde25875
|
||||
Last-Update: 2018-07-30
|
||||
|
||||
Patch-Name: R_X86_64_PLT32.patch
|
||||
---
|
||||
grub-core/efiemu/i386/loadcore64.c | 1 +
|
||||
grub-core/kern/x86_64/dl.c | 1 +
|
||||
util/grub-mkimagexx.c | 1 +
|
||||
util/grub-module-verifier.c | 1 +
|
||||
4 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/grub-core/efiemu/i386/loadcore64.c b/grub-core/efiemu/i386/loadcore64.c
|
||||
index e49d0b6ff..18facf47f 100644
|
||||
--- a/grub-core/efiemu/i386/loadcore64.c
|
||||
+++ b/grub-core/efiemu/i386/loadcore64.c
|
||||
@@ -98,6 +98,7 @@ grub_arch_efiemu_relocate_symbols64 (grub_efiemu_segment_t segs,
|
||||
break;
|
||||
|
||||
case R_X86_64_PC32:
|
||||
+ case R_X86_64_PLT32:
|
||||
err = grub_efiemu_write_value (addr,
|
||||
*addr32 + rel->r_addend
|
||||
+ sym.off
|
||||
diff --git a/grub-core/kern/x86_64/dl.c b/grub-core/kern/x86_64/dl.c
|
||||
index 440690673..3a73e6e6c 100644
|
||||
--- a/grub-core/kern/x86_64/dl.c
|
||||
+++ b/grub-core/kern/x86_64/dl.c
|
||||
@@ -70,6 +70,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
|
||||
break;
|
||||
|
||||
case R_X86_64_PC32:
|
||||
+ case R_X86_64_PLT32:
|
||||
{
|
||||
grub_int64_t value;
|
||||
value = ((grub_int32_t) *addr32) + rel->r_addend + sym->st_value -
|
||||
diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c
|
||||
index e63f148e4..f20255a28 100644
|
||||
--- a/util/grub-mkimagexx.c
|
||||
+++ b/util/grub-mkimagexx.c
|
||||
@@ -832,6 +832,7 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections,
|
||||
break;
|
||||
|
||||
case R_X86_64_PC32:
|
||||
+ case R_X86_64_PLT32:
|
||||
{
|
||||
grub_uint32_t *t32 = (grub_uint32_t *) target;
|
||||
*t32 = grub_host_to_target64 (grub_target_to_host32 (*t32)
|
||||
diff --git a/util/grub-module-verifier.c b/util/grub-module-verifier.c
|
||||
index 9179285a5..a79271f66 100644
|
||||
--- a/util/grub-module-verifier.c
|
||||
+++ b/util/grub-module-verifier.c
|
||||
@@ -19,6 +19,7 @@ struct grub_module_verifier_arch archs[] = {
|
||||
-1
|
||||
}, (int[]){
|
||||
R_X86_64_PC32,
|
||||
+ R_X86_64_PLT32,
|
||||
-1
|
||||
}
|
||||
},
|
@ -28,6 +28,7 @@ cpe830|\
|
||||
cpe870|\
|
||||
cr3000|\
|
||||
cr5000|\
|
||||
dw33d|\
|
||||
e1700ac-v2|\
|
||||
e600g-v2|\
|
||||
e600gac-v2|\
|
||||
|
@ -17,7 +17,8 @@ buffalo,wzr-hp-ag300h)
|
||||
ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
|
||||
;;
|
||||
buffalo,bhr-4grv2|\
|
||||
glinet,ar300m|\
|
||||
glinet,gl-ar300m-nand|\
|
||||
glinet,gl-ar300m-nor|\
|
||||
ocedo,koala|\
|
||||
ocedo,raccoon|\
|
||||
openmesh,om5p-ac-v2)
|
||||
|
@ -31,6 +31,7 @@ ubootenv_mtdinfo () {
|
||||
}
|
||||
|
||||
case "$board" in
|
||||
glinet,gl-b1300 |\
|
||||
openmesh,a42 |\
|
||||
openmesh,a62)
|
||||
ubootenv_add_uci_config "/dev/mtd5" "0x0" "0x10000" "0x10000"
|
||||
|
@ -10,9 +10,9 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/chunkeey/FritzBox-4040-UBOOT
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=6946ebbaf7b12a4a092d763c8f0c87a25984f103
|
||||
PKG_SOURCE_DATE:=2017-01-29
|
||||
PKG_MIRROR_HASH:=5c2394f51a083dca2a2bf9cb36fa717f252112fc792c9eeae64f6383ad08987b
|
||||
PKG_SOURCE_VERSION:=5da78cca60814ea31065a50376d9c905425b03a1
|
||||
PKG_SOURCE_DATE:=2018-12-09
|
||||
PKG_MIRROR_HASH:=ff7bc2498de1066dde24d7ef68e440c3847244a5b8bb35ce4275e3918f230aa3
|
||||
|
||||
PKG_RELEASE:=1
|
||||
|
||||
@ -34,10 +34,9 @@ export DTC
|
||||
|
||||
define Build/Configure
|
||||
$(Build/Configure/U-Boot)
|
||||
$(HOSTCC) -o $(PKG_BUILD_DIR)/fritz/lzma2eva $(PKG_BUILD_DIR)/fritz/src/lzma2eva.c -lz
|
||||
$(HOSTCC) -o $(PKG_BUILD_DIR)/fritz/lzma2eva $(PKG_BUILD_DIR)/fritz/src/lzma2eva.c
|
||||
$(HOSTCC) -o $(PKG_BUILD_DIR)/fritz/tichksum $(PKG_BUILD_DIR)/fritz/src/tichksum.c
|
||||
ln -sf $(STAGING_DIR_HOST)/bin/lzma $(PKG_BUILD_DIR)/fritz
|
||||
ln -sf compiler-gcc5.h $(PKG_BUILD_DIR)/include/linux/compiler-gcc7.h
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
@ -47,7 +46,7 @@ endef
|
||||
|
||||
define Package/u-boot/install
|
||||
$(Package/u-boot/install/default)
|
||||
$(INSTALL_BIN) ./files/upload-to-f4040.sh $(1)/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/upload-to-f4040.sh $(1)/
|
||||
endef
|
||||
|
||||
UBOOT_TARGETS := fritz4040
|
||||
|
@ -1,41 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
die() {
|
||||
echo $1
|
||||
exit 1
|
||||
}
|
||||
|
||||
FRITZBOX='192.168.178.1'
|
||||
USER='adam2'
|
||||
PASSWD='adam2'
|
||||
FILE='uboot-fritz4040.bin'
|
||||
|
||||
ping -q -4 -w 1 -c 1 "$FRITZBOX" &> /dev/null || die "Fritzbox at $FRITZBOX is not reachable. aborting"
|
||||
|
||||
cat << EOS
|
||||
|
||||
This will take ages (2 minutes)! If you want a
|
||||
status bar: Attach a serial to the device and look there.
|
||||
|
||||
Note: If this fails, you need to use AVM\' recover
|
||||
utility to get your box back. However this step
|
||||
should not damage your box....
|
||||
|
||||
Also it doesn't terminate.. :/
|
||||
|
||||
(Note: Make sure that you connected the router on
|
||||
the yellow LAN ports and not the blue WAN).
|
||||
|
||||
EOS
|
||||
|
||||
ftp -n -4 "$FRITZBOX" << END_SCRIPT
|
||||
quote USER $USER
|
||||
quote PASS $PASSWD
|
||||
quote MEDIA FLSH
|
||||
binary
|
||||
passive
|
||||
put $FILE mtd1
|
||||
quote check mtd1
|
||||
bye
|
||||
END_SCRIPT
|
||||
exit 0
|
@ -1,274 +0,0 @@
|
||||
--- a/arch/arm/lib/Makefile
|
||||
+++ b/arch/arm/lib/Makefile
|
||||
@@ -26,7 +26,6 @@ include $(TOPDIR)/config.mk
|
||||
LIB = $(obj)lib$(ARCH).o
|
||||
LIBGCC = $(obj)libgcc.o
|
||||
|
||||
-ifndef CONFIG_SPL_BUILD
|
||||
GLSOBJS += _ashldi3.o
|
||||
GLSOBJS += _ashrdi3.o
|
||||
GLSOBJS += _divsi3.o
|
||||
@@ -34,9 +33,11 @@ GLSOBJS += _lshrdi3.o
|
||||
GLSOBJS += _modsi3.o
|
||||
GLSOBJS += _udivsi3.o
|
||||
GLSOBJS += _umodsi3.o
|
||||
+GLSOBJS += uldivmod.o
|
||||
|
||||
GLCOBJS += div0.o
|
||||
|
||||
+ifndef CONFIG_SPL_BUILD
|
||||
COBJS-y += board.o
|
||||
COBJS-y += bootm.o
|
||||
COBJS-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/lib/uldivmod.S
|
||||
@@ -0,0 +1,249 @@
|
||||
+/*
|
||||
+ * Copyright 2010, Google Inc.
|
||||
+ *
|
||||
+ * Brought in from coreboot uldivmod.S
|
||||
+ *
|
||||
+ * SPDX-License-Identifier: GPL-2.0
|
||||
+ */
|
||||
+
|
||||
+#include <linux/linkage.h>
|
||||
+#include <asm/assembler.h>
|
||||
+
|
||||
+/*
|
||||
+ * A, Q = r0 + (r1 << 32)
|
||||
+ * B, R = r2 + (r3 << 32)
|
||||
+ * A / B = Q ... R
|
||||
+ */
|
||||
+
|
||||
+#define ARM(x...) x
|
||||
+#define THUMB(x...)
|
||||
+
|
||||
+A_0 .req r0
|
||||
+A_1 .req r1
|
||||
+B_0 .req r2
|
||||
+B_1 .req r3
|
||||
+C_0 .req r4
|
||||
+C_1 .req r5
|
||||
+D_0 .req r6
|
||||
+D_1 .req r7
|
||||
+
|
||||
+Q_0 .req r0
|
||||
+Q_1 .req r1
|
||||
+R_0 .req r2
|
||||
+R_1 .req r3
|
||||
+
|
||||
+THUMB(
|
||||
+TMP .req r8
|
||||
+)
|
||||
+
|
||||
+.pushsection .text.__aeabi_uldivmod, "ax"
|
||||
+ENTRY(__aeabi_uldivmod)
|
||||
+
|
||||
+ stmfd sp!, {r4, r5, r6, r7, THUMB(TMP,) lr}
|
||||
+ @ Test if B == 0
|
||||
+ orrs ip, B_0, B_1 @ Z set -> B == 0
|
||||
+ beq L_div_by_0
|
||||
+ @ Test if B is power of 2: (B & (B - 1)) == 0
|
||||
+ subs C_0, B_0, #1
|
||||
+ sbc C_1, B_1, #0
|
||||
+ tst C_0, B_0
|
||||
+ tsteq B_1, C_1
|
||||
+ beq L_pow2
|
||||
+ @ Test if A_1 == B_1 == 0
|
||||
+ orrs ip, A_1, B_1
|
||||
+ beq L_div_32_32
|
||||
+
|
||||
+L_div_64_64:
|
||||
+/* CLZ only exists in ARM architecture version 5 and above. */
|
||||
+#ifdef HAVE_CLZ
|
||||
+ mov C_0, #1
|
||||
+ mov C_1, #0
|
||||
+ @ D_0 = clz A
|
||||
+ teq A_1, #0
|
||||
+ clz D_0, A_1
|
||||
+ clzeq ip, A_0
|
||||
+ addeq D_0, D_0, ip
|
||||
+ @ D_1 = clz B
|
||||
+ teq B_1, #0
|
||||
+ clz D_1, B_1
|
||||
+ clzeq ip, B_0
|
||||
+ addeq D_1, D_1, ip
|
||||
+ @ if clz B - clz A > 0
|
||||
+ subs D_0, D_1, D_0
|
||||
+ bls L_done_shift
|
||||
+ @ B <<= (clz B - clz A)
|
||||
+ subs D_1, D_0, #32
|
||||
+ rsb ip, D_0, #32
|
||||
+ movmi B_1, B_1, lsl D_0
|
||||
+ARM( orrmi B_1, B_1, B_0, lsr ip )
|
||||
+THUMB( lsrmi TMP, B_0, ip )
|
||||
+THUMB( orrmi B_1, B_1, TMP )
|
||||
+ movpl B_1, B_0, lsl D_1
|
||||
+ mov B_0, B_0, lsl D_0
|
||||
+ @ C = 1 << (clz B - clz A)
|
||||
+ movmi C_1, C_1, lsl D_0
|
||||
+ARM( orrmi C_1, C_1, C_0, lsr ip )
|
||||
+THUMB( lsrmi TMP, C_0, ip )
|
||||
+THUMB( orrmi C_1, C_1, TMP )
|
||||
+ movpl C_1, C_0, lsl D_1
|
||||
+ mov C_0, C_0, lsl D_0
|
||||
+L_done_shift:
|
||||
+ mov D_0, #0
|
||||
+ mov D_1, #0
|
||||
+ @ C: current bit; D: result
|
||||
+#else
|
||||
+ @ C: current bit; D: result
|
||||
+ mov C_0, #1
|
||||
+ mov C_1, #0
|
||||
+ mov D_0, #0
|
||||
+ mov D_1, #0
|
||||
+L_lsl_4:
|
||||
+ cmp B_1, #0x10000000
|
||||
+ cmpcc B_1, A_1
|
||||
+ cmpeq B_0, A_0
|
||||
+ bcs L_lsl_1
|
||||
+ @ B <<= 4
|
||||
+ mov B_1, B_1, lsl #4
|
||||
+ orr B_1, B_1, B_0, lsr #28
|
||||
+ mov B_0, B_0, lsl #4
|
||||
+ @ C <<= 4
|
||||
+ mov C_1, C_1, lsl #4
|
||||
+ orr C_1, C_1, C_0, lsr #28
|
||||
+ mov C_0, C_0, lsl #4
|
||||
+ b L_lsl_4
|
||||
+L_lsl_1:
|
||||
+ cmp B_1, #0x80000000
|
||||
+ cmpcc B_1, A_1
|
||||
+ cmpeq B_0, A_0
|
||||
+ bcs L_subtract
|
||||
+ @ B <<= 1
|
||||
+ mov B_1, B_1, lsl #1
|
||||
+ orr B_1, B_1, B_0, lsr #31
|
||||
+ mov B_0, B_0, lsl #1
|
||||
+ @ C <<= 1
|
||||
+ mov C_1, C_1, lsl #1
|
||||
+ orr C_1, C_1, C_0, lsr #31
|
||||
+ mov C_0, C_0, lsl #1
|
||||
+ b L_lsl_1
|
||||
+#endif
|
||||
+L_subtract:
|
||||
+ @ if A >= B
|
||||
+ cmp A_1, B_1
|
||||
+ cmpeq A_0, B_0
|
||||
+ bcc L_update
|
||||
+ @ A -= B
|
||||
+ subs A_0, A_0, B_0
|
||||
+ sbc A_1, A_1, B_1
|
||||
+ @ D |= C
|
||||
+ orr D_0, D_0, C_0
|
||||
+ orr D_1, D_1, C_1
|
||||
+L_update:
|
||||
+ @ if A == 0: break
|
||||
+ orrs ip, A_1, A_0
|
||||
+ beq L_exit
|
||||
+ @ C >>= 1
|
||||
+ movs C_1, C_1, lsr #1
|
||||
+ movs C_0, C_0, rrx
|
||||
+ @ if C == 0: break
|
||||
+ orrs ip, C_1, C_0
|
||||
+ beq L_exit
|
||||
+ @ B >>= 1
|
||||
+ movs B_1, B_1, lsr #1
|
||||
+ mov B_0, B_0, rrx
|
||||
+ b L_subtract
|
||||
+L_exit:
|
||||
+ @ Note: A, B & Q, R are aliases
|
||||
+ mov R_0, A_0
|
||||
+ mov R_1, A_1
|
||||
+ mov Q_0, D_0
|
||||
+ mov Q_1, D_1
|
||||
+ ldmfd sp!, {r4, r5, r6, r7, THUMB(TMP,) pc}
|
||||
+
|
||||
+L_div_32_32:
|
||||
+ @ Note: A_0 & r0 are aliases
|
||||
+ @ Q_1 r1
|
||||
+ mov r1, B_0
|
||||
+ bl __aeabi_uidivmod
|
||||
+ mov R_0, r1
|
||||
+ mov R_1, #0
|
||||
+ mov Q_1, #0
|
||||
+ ldmfd sp!, {r4, r5, r6, r7, THUMB(TMP,) pc}
|
||||
+
|
||||
+L_pow2:
|
||||
+#ifdef HAVE_CLZ
|
||||
+ @ Note: A, B and Q, R are aliases
|
||||
+ @ R = A & (B - 1)
|
||||
+ and C_0, A_0, C_0
|
||||
+ and C_1, A_1, C_1
|
||||
+ @ Q = A >> log2(B)
|
||||
+ @ Note: B must not be 0 here!
|
||||
+ clz D_0, B_0
|
||||
+ add D_1, D_0, #1
|
||||
+ rsbs D_0, D_0, #31
|
||||
+ bpl L_1
|
||||
+ clz D_0, B_1
|
||||
+ rsb D_0, D_0, #31
|
||||
+ mov A_0, A_1, lsr D_0
|
||||
+ add D_0, D_0, #32
|
||||
+L_1:
|
||||
+ movpl A_0, A_0, lsr D_0
|
||||
+ARM( orrpl A_0, A_0, A_1, lsl D_1 )
|
||||
+THUMB( lslpl TMP, A_1, D_1 )
|
||||
+THUMB( orrpl A_0, A_0, TMP )
|
||||
+ mov A_1, A_1, lsr D_0
|
||||
+ @ Mov back C to R
|
||||
+ mov R_0, C_0
|
||||
+ mov R_1, C_1
|
||||
+ ldmfd sp!, {r4, r5, r6, r7, THUMB(TMP,) pc}
|
||||
+#else
|
||||
+ @ Note: A, B and Q, R are aliases
|
||||
+ @ R = A & (B - 1)
|
||||
+ and C_0, A_0, C_0
|
||||
+ and C_1, A_1, C_1
|
||||
+ @ Q = A >> log2(B)
|
||||
+ @ Note: B must not be 0 here!
|
||||
+ @ Count the leading zeroes in B.
|
||||
+ mov D_0, #0
|
||||
+ orrs B_0, B_0, B_0
|
||||
+ @ If B is greater than 1 << 31, divide A and B by 1 << 32.
|
||||
+ moveq A_0, A_1
|
||||
+ moveq A_1, #0
|
||||
+ moveq B_0, B_1
|
||||
+ @ Count the remaining leading zeroes in B.
|
||||
+ movs B_1, B_0, lsl #16
|
||||
+ addeq D_0, #16
|
||||
+ moveq B_0, B_0, lsr #16
|
||||
+ tst B_0, #0xff
|
||||
+ addeq D_0, #8
|
||||
+ moveq B_0, B_0, lsr #8
|
||||
+ tst B_0, #0xf
|
||||
+ addeq D_0, #4
|
||||
+ moveq B_0, B_0, lsr #4
|
||||
+ tst B_0, #0x3
|
||||
+ addeq D_0, #2
|
||||
+ moveq B_0, B_0, lsr #2
|
||||
+ tst B_0, #0x1
|
||||
+ addeq D_0, #1
|
||||
+ @ Shift A to the right by the appropriate amount.
|
||||
+ rsb D_1, D_0, #32
|
||||
+ mov Q_0, A_0, lsr D_0
|
||||
+ ARM( orr Q_0, Q_0, A_1, lsl D_1 )
|
||||
+ THUMB( lsl A_1, D_1 )
|
||||
+ THUMB( orr Q_0, A_1 )
|
||||
+ mov Q_1, A_1, lsr D_0
|
||||
+ @ Move C to R
|
||||
+ mov R_0, C_0
|
||||
+ mov R_1, C_1
|
||||
+ ldmfd sp!, {r4, r5, r6, r7, THUMB(TMP,) pc}
|
||||
+#endif
|
||||
+
|
||||
+L_div_by_0:
|
||||
+ bl __div0
|
||||
+ @ As wrong as it could be
|
||||
+ mov Q_0, #0
|
||||
+ mov Q_1, #0
|
||||
+ mov R_0, #0
|
||||
+ mov R_1, #0
|
||||
+ ldmfd sp!, {r4, r5, r6, r7, THUMB(TMP,) pc}
|
||||
+ENDPROC(__aeabi_uldivmod)
|
||||
+.popsection
|
@ -1,32 +0,0 @@
|
||||
Index: u-boot-2017-01-29-6946ebba/fritz/fritzcreator.sh
|
||||
===================================================================
|
||||
--- u-boot-2017-01-29-6946ebba.orig/fritz/fritzcreator.sh
|
||||
+++ u-boot-2017-01-29-6946ebba/fritz/fritzcreator.sh
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh -xe
|
||||
+#!/bin/bash -xe
|
||||
|
||||
# A helpful
|
||||
#
|
||||
@@ -11,6 +11,7 @@ UBOOT_FRITZ4040="uboot-fritz4040.bin"
|
||||
FRITZ_DTS="fritz/fritz4040.dts"
|
||||
FRITZ_DTB="fritz4040.dtb"
|
||||
UBOOT_LOADADDR=0x841FFFF8
|
||||
+DTC="${DTC:-dtc}"
|
||||
|
||||
rm -f "$UBOOT_FRITZ4040"
|
||||
|
||||
@@ -44,11 +45,11 @@ printf "\x00\x00\x00\xea\xf8\x01\x33\xc4
|
||||
cat "$UBOOT_BIN" >> "$UBOOT_FRITZ4040"
|
||||
|
||||
# Pad file to 1M
|
||||
-dd if="$UBOOT_FRITZ4040" of="$UBOOT_FRITZ4040.new" bs=1M count=1 conv=sync
|
||||
+dd if="$UBOOT_FRITZ4040" of="$UBOOT_FRITZ4040.new" bs=1024k count=1 conv=sync
|
||||
mv "$UBOOT_FRITZ4040.new" "$UBOOT_FRITZ4040"
|
||||
|
||||
# Compile DTS
|
||||
-dtc "$FRITZ_DTS" -o "$FRITZ_DTB" --space 49152
|
||||
+$DTC "$FRITZ_DTS" -o "$FRITZ_DTB" --space 49152
|
||||
|
||||
# Append the compiled DTBs
|
||||
cat "$FRITZ_DTB" "$FRITZ_DTB" "$FRITZ_DTB" "$FRITZ_DTB" >> $UBOOT_FRITZ4040
|
@ -0,0 +1,142 @@
|
||||
From 704f3acfcf55343043bbed01c5fb0a0094a68e8a Mon Sep 17 00:00:00 2001
|
||||
From: Denis Pynkin <denis.pynkin@collabora.com>
|
||||
Date: Fri, 21 Jul 2017 19:28:42 +0300
|
||||
Subject: [PATCH] net: Use packed structures for networking
|
||||
|
||||
PXE boot is broken with GCC 7.1 due option '-fstore-merging' enabled
|
||||
by default for '-O2':
|
||||
|
||||
BOOTP broadcast 1
|
||||
data abort
|
||||
pc : [<8ff8bb30>] lr : [<00004f1f>]
|
||||
reloc pc : [<17832b30>] lr : [<878abf1f>]
|
||||
sp : 8f558bc0 ip : 00000000 fp : 8ffef5a4
|
||||
r10: 8ffed248 r9 : 8f558ee0 r8 : 8ffef594
|
||||
r7 : 0000000e r6 : 8ffed700 r5 : 00000000 r4 : 8ffed74e
|
||||
r3 : 00060101 r2 : 8ffed230 r1 : 8ffed706 r0 : 00000ddd
|
||||
Flags: nzcv IRQs off FIQs off Mode SVC_32
|
||||
Resetting CPU ...
|
||||
|
||||
Core reason is usage of structures for network headers without packed
|
||||
attribute.
|
||||
|
||||
Reviewed-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
|
||||
Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
|
||||
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
|
||||
---
|
||||
include/net.h | 14 +++++++-------
|
||||
net/bootp.h | 2 +-
|
||||
net/dns.h | 2 +-
|
||||
net/nfs.h | 2 +-
|
||||
net/sntp.h | 2 +-
|
||||
5 files changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
--- a/include/net.h
|
||||
+++ b/include/net.h
|
||||
@@ -203,7 +203,7 @@ struct ethernet_hdr {
|
||||
uchar et_dest[6]; /* Destination node */
|
||||
uchar et_src[6]; /* Source node */
|
||||
ushort et_protlen; /* Protocol or length */
|
||||
-};
|
||||
+} __attribute__((packed));
|
||||
|
||||
/* Ethernet header size */
|
||||
#define ETHER_HDR_SIZE (sizeof(struct ethernet_hdr))
|
||||
@@ -219,7 +219,7 @@ struct e802_hdr {
|
||||
uchar et_snap2;
|
||||
uchar et_snap3;
|
||||
ushort et_prot; /* 802 protocol */
|
||||
-};
|
||||
+} __attribute__((packed));
|
||||
|
||||
/* 802 + SNAP + ethernet header size */
|
||||
#define E802_HDR_SIZE (sizeof(struct e802_hdr))
|
||||
@@ -233,7 +233,7 @@ struct vlan_ethernet_hdr {
|
||||
ushort vet_vlan_type; /* PROT_VLAN */
|
||||
ushort vet_tag; /* TAG of VLAN */
|
||||
ushort vet_type; /* protocol type */
|
||||
-};
|
||||
+} __attribute__((packed));
|
||||
|
||||
/* VLAN Ethernet header size */
|
||||
#define VLAN_ETHER_HDR_SIZE (sizeof(struct vlan_ethernet_hdr))
|
||||
@@ -260,7 +260,7 @@ struct ip_hdr {
|
||||
ushort ip_sum; /* checksum */
|
||||
IPaddr_t ip_src; /* Source IP address */
|
||||
IPaddr_t ip_dst; /* Destination IP address */
|
||||
-};
|
||||
+} __attribute__((packed));
|
||||
|
||||
#define IP_OFFS 0x1fff /* ip offset *= 8 */
|
||||
#define IP_FLAGS 0xe000 /* first 3 bits */
|
||||
@@ -288,7 +288,7 @@ struct ip_udp_hdr {
|
||||
ushort udp_dst; /* UDP destination port */
|
||||
ushort udp_len; /* Length of UDP packet */
|
||||
ushort udp_xsum; /* Checksum */
|
||||
-};
|
||||
+} __attribute__((packed));
|
||||
|
||||
#define IP_UDP_HDR_SIZE (sizeof(struct ip_udp_hdr))
|
||||
#define UDP_HDR_SIZE (IP_UDP_HDR_SIZE - IP_HDR_SIZE)
|
||||
@@ -327,7 +327,7 @@ struct arp_hdr {
|
||||
uchar ar_tha[]; /* Target hardware address */
|
||||
uchar ar_tpa[]; /* Target protocol address */
|
||||
#endif /* 0 */
|
||||
-};
|
||||
+} __attribute__((packed));
|
||||
|
||||
#define ARP_HDR_SIZE (8+20) /* Size assuming ethernet */
|
||||
|
||||
@@ -362,7 +362,7 @@ struct icmp_hdr {
|
||||
} frag;
|
||||
uchar data[0];
|
||||
} un;
|
||||
-};
|
||||
+} __attribute__((packed));
|
||||
|
||||
#define ICMP_HDR_SIZE (sizeof(struct icmp_hdr))
|
||||
#define IP_ICMP_HDR_SIZE (IP_HDR_SIZE + ICMP_HDR_SIZE)
|
||||
--- a/net/bootp.h
|
||||
+++ b/net/bootp.h
|
||||
@@ -49,7 +49,7 @@ struct Bootp_t {
|
||||
char bp_sname[64]; /* Server host name */
|
||||
char bp_file[128]; /* Boot file name */
|
||||
char bp_vend[OPT_FIELD_SIZE]; /* Vendor information */
|
||||
-};
|
||||
+} __attribute__((packed));
|
||||
|
||||
#define BOOTP_HDR_SIZE sizeof(struct Bootp_t)
|
||||
|
||||
--- a/net/dns.h
|
||||
+++ b/net/dns.h
|
||||
@@ -29,7 +29,7 @@ struct header {
|
||||
uint16_t nauth; /* Authority PRs */
|
||||
uint16_t nother; /* Other PRs */
|
||||
unsigned char data[1]; /* Data, variable length */
|
||||
-};
|
||||
+} __attribute__((packed));
|
||||
|
||||
extern void DnsStart(void); /* Begin DNS */
|
||||
|
||||
--- a/net/sntp.h
|
||||
+++ b/net/sntp.h
|
||||
@@ -51,7 +51,7 @@ struct sntp_pkt_t {
|
||||
unsigned long long originate_timestamp;
|
||||
unsigned long long receive_timestamp;
|
||||
unsigned long long transmit_timestamp;
|
||||
-};
|
||||
+} __attribute__((packed));
|
||||
|
||||
extern void SntpStart(void); /* Begin SNTP */
|
||||
|
||||
--- a/net/nfs.h
|
||||
+++ b/net/nfs.h
|
||||
@@ -68,7 +68,7 @@ struct rpc_t {
|
||||
uint32_t data[19];
|
||||
} reply;
|
||||
} u;
|
||||
-};
|
||||
+} __attribute__((packed));
|
||||
extern void NfsStart(void); /* Begin NFS */
|
||||
|
||||
|
@ -0,0 +1,19 @@
|
||||
--- a/include/libfdt_env.h
|
||||
+++ b/include/libfdt_env.h
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#ifndef _LIBFDT_ENV_H
|
||||
#define _LIBFDT_ENV_H
|
||||
+#define LIBFDT_ENV_H
|
||||
|
||||
#include "compiler.h"
|
||||
#include "linux/types.h"
|
||||
--- a/include/libfdt.h
|
||||
+++ b/include/libfdt.h
|
||||
@@ -1,5 +1,6 @@
|
||||
#ifndef _LIBFDT_H
|
||||
#define _LIBFDT_H
|
||||
+#define LIBFDT_H
|
||||
/*
|
||||
* libfdt - Flat Device Tree manipulation
|
||||
* Copyright (C) 2006 David Gibson, IBM Corporation.
|
@ -8,7 +8,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=uboot-layerscape-armv8_32b
|
||||
PKG_SOURCE_DATE:=2018-01-22
|
||||
PKG_VERSION:=lsdk-1806
|
||||
PKG_RELEASE:=1
|
||||
|
||||
# Layerscape ARMv8 platforms use 64-bit u-boot to support both 32-bit and 64-bit
|
||||
@ -17,37 +17,68 @@ PKG_RELEASE:=1
|
||||
# uboot-layerscape's source code.
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/yangbolu1991/u-boot-lede.git
|
||||
PKG_SOURCE_VERSION:=40a40dfd8136fcc314dd442a3b24a41b1e5652dd
|
||||
PKG_MIRROR_HASH:=3dde5a33d19c573cbdce74f5d7edb6c5ca2a26a39d503c3efe5d5ad06f01e9f5
|
||||
|
||||
PKG_MAINTAINER:=Yangbo Lu <yangbo.lu@nxp.com>
|
||||
PKG_SOURCE_VERSION:=a2a01facee0918bf724b4f0aec6746e2f1271519
|
||||
PKG_MIRROR_HASH:=5fcb58c14cdc934793ff315e178ad1d9d2ff55fcaac394b48ec116d1b11ca324
|
||||
|
||||
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
|
||||
define Package/uboot-layerscape-armv8_32b/Config
|
||||
define Package/u-boot-$(1)-image
|
||||
SECTION:=boot
|
||||
CATEGORY:=Boot Loaders
|
||||
TITLE:=$(2)
|
||||
DEPENDS:=@TARGET_layerscape_armv8_32b
|
||||
CONFIG:=$(3)
|
||||
ENV_SIZE:=$(4)
|
||||
endef
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
define Package/uboot-layerscape-armv8_32b/ls1012ardb
|
||||
TITLE:=U-Boot image for NXP LS1012ARDB
|
||||
CONFIG:=ls1012ardb-uboot.bin
|
||||
ENV_SIZE:=0x40000
|
||||
endef
|
||||
|
||||
define Package/uboot-layerscape-armv8_32b/ls1012afrwy
|
||||
TITLE:=U-Boot image for NXP LS1012FRWY
|
||||
CONFIG:=ls1012afrwy-uboot.bin
|
||||
ENV_SIZE:=0x10000
|
||||
endef
|
||||
|
||||
define Package/uboot-layerscape-armv8_32b/ls1043ardb
|
||||
TITLE:=U-Boot image for NXP LS1043ARDB
|
||||
CONFIG:=ls1043ardb-uboot.bin
|
||||
ENV_SIZE:=0x20000
|
||||
endef
|
||||
|
||||
define Package/uboot-layerscape-armv8_32b/ls1046ardb
|
||||
TITLE:=U-Boot image for NXP LS1046ARDB
|
||||
CONFIG:=ls1046ardb-uboot.bin
|
||||
ENV_SIZE:=0x2000
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
define Package/uboot-layerscape-armv8_32b/Install
|
||||
define Package/u-boot-$(1)-image/install
|
||||
$(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
|
||||
$(CP) $(PKG_BUILD_DIR)/$(CONFIG) $(STAGING_DIR_IMAGE)/
|
||||
$(PKG_BUILD_DIR)/tools/mkenvimage -s $(ENV_SIZE) \
|
||||
-o $(STAGING_DIR_IMAGE)/$(1)-uboot-env.bin \
|
||||
../uboot-layerscape/files/$(1)-uEnv.txt
|
||||
endef
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,uboot-layerscape-armv8_32b))
|
||||
UBOOTS := \
|
||||
ls1012ardb \
|
||||
ls1012afrwy \
|
||||
ls1043ardb \
|
||||
ls1046ardb
|
||||
|
||||
$(foreach u,$(UBOOTS), \
|
||||
$(eval $(Package/uboot-layerscape-armv8_32b/$(u))) \
|
||||
$(eval $(call Package/uboot-layerscape-armv8_32b/Config,$(u),$(TITLE),$(CONFIG),$(ENV_SIZE))) \
|
||||
$(eval $(call Package/uboot-layerscape-armv8_32b/Install,$(u))) \
|
||||
$(eval $(call BuildPackage,u-boot-$(u)-image)) \
|
||||
)
|
||||
|
@ -6,16 +6,15 @@
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=uboot-layerscape
|
||||
PKG_SOURCE_DATE:=2017-12-07
|
||||
PKG_VERSION:=lsdk-1806
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/qoriq-open-source/u-boot.git
|
||||
PKG_SOURCE_VERSION:=9f7df1b406ff11409021cd2112beedd6b57bb600
|
||||
PKG_MIRROR_HASH:=b3756f814b731af2d03b0582ece90b2de564955b778f341fbfc34fa9bd849819
|
||||
PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot
|
||||
PKG_SOURCE_VERSION:=b3f98d438eefd1b355efdec0b50af5813ff8d0e1
|
||||
PKG_MIRROR_HASH:=59e35957055658e7fdefb16b92f954356985a8191942d93f254861c75c47b32b
|
||||
|
||||
include $(INCLUDE_DIR)/u-boot.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
@ -25,49 +24,104 @@ define U-Boot/Default
|
||||
BUILD_SUBTARGET:=armv8_64b
|
||||
BUILD_DEVICES:=$(1)
|
||||
UBOOT_IMAGE:=u-boot-dtb.bin
|
||||
HIDDEN:=y
|
||||
endef
|
||||
|
||||
define U-Boot/ls1043ardb
|
||||
NAME:=NXP ls1043ardb 64b Dev Board
|
||||
endef
|
||||
|
||||
define U-Boot/ls1046ardb
|
||||
NAME:=NXP ls1046ardb 64b Dev Board
|
||||
UBOOT_CONFIG:=ls1046ardb_qspi
|
||||
ENV_SIZE:=0x2000
|
||||
endef
|
||||
|
||||
define U-Boot/ls1012ardb
|
||||
NAME:=NXP ls1012ardb 64b Dev Board
|
||||
NAME:=NXP LS1012ARDB
|
||||
UBOOT_CONFIG:=ls1012ardb_qspi
|
||||
ENV_SIZE:=0x40000
|
||||
endef
|
||||
|
||||
define U-Boot/ls1012afrwy
|
||||
NAME:=NXP LS1012AFRWY
|
||||
UBOOT_CONFIG:=ls1012afrwy_qspi
|
||||
ENV_SIZE:=0x10000
|
||||
endef
|
||||
|
||||
define U-Boot/ls1043ardb
|
||||
NAME:=NXP LS1043ARDB
|
||||
ENV_SIZE:=0x20000
|
||||
endef
|
||||
|
||||
define U-Boot/ls1043ardb-sdboot
|
||||
NAME:=NXP LS1043ARDB SD Card Boot
|
||||
UBOOT_CONFIG:=ls1043ardb_sdcard
|
||||
UBOOT_IMAGE:=u-boot-with-spl-pbl.bin
|
||||
endef
|
||||
|
||||
define U-Boot/ls1046ardb
|
||||
NAME:=NXP LS1046ARDB
|
||||
UBOOT_CONFIG:=ls1046ardb_qspi
|
||||
endef
|
||||
|
||||
define U-Boot/ls1046ardb-sdboot
|
||||
NAME:=NXP LS1046ARDB SD Card Boot
|
||||
UBOOT_CONFIG:=ls1046ardb_sdcard
|
||||
UBOOT_IMAGE:=u-boot-with-spl-pbl.bin
|
||||
endef
|
||||
|
||||
define U-Boot/ls1088ardb
|
||||
NAME:=NXP ls1088ardb 64b Dev Board
|
||||
NAME:=NXP LS1088ARDB
|
||||
UBOOT_CONFIG:=ls1088ardb_qspi
|
||||
endef
|
||||
|
||||
define U-Boot/ls1088ardb-sdboot
|
||||
NAME:=NXP LS1088ARDB SD Card Boot
|
||||
UBOOT_CONFIG:=ls1088ardb_sdcard_qspi
|
||||
UBOOT_IMAGE:=u-boot-with-spl.bin
|
||||
endef
|
||||
|
||||
define U-Boot/ls2088ardb
|
||||
NAME:=NXP ls2088ardb 64b Dev Board
|
||||
NAME:=NXP LS2088ARDB
|
||||
UBOOT_CONFIG:=ls2080ardb
|
||||
endef
|
||||
|
||||
define U-Boot/ls1012afrdm
|
||||
NAME:=NXP ls1012afrdm 64b Dev Board
|
||||
UBOOT_CONFIG:=ls1012afrdm_qspi
|
||||
define U-Boot/ls1021atwr
|
||||
NAME:=NXP LS1021ATWR
|
||||
BUILD_SUBTARGET:=armv7
|
||||
UBOOT_CONFIG:=ls1021atwr_nor
|
||||
ENV_SIZE:=0x20000
|
||||
endef
|
||||
|
||||
define U-Boot/ls1021atwr-sdboot
|
||||
NAME:=NXP LS1021ATWR SD Card Boot
|
||||
BUILD_SUBTARGET:=armv7
|
||||
UBOOT_CONFIG:=ls1021atwr_sdcard_ifc
|
||||
UBOOT_IMAGE:=u-boot-with-spl-pbl.bin
|
||||
ENV_SIZE:=0x20000
|
||||
endef
|
||||
|
||||
define U-Boot/ls1021aiot-sdboot
|
||||
NAME:=NXP LS1021AIOT SD Card Boot
|
||||
BUILD_SUBTARGET:=armv7
|
||||
UBOOT_CONFIG:=ls1021aiot_sdcard
|
||||
UBOOT_IMAGE:=u-boot-with-spl-pbl.bin
|
||||
ENV_SIZE:=0x2000
|
||||
endef
|
||||
|
||||
|
||||
UBOOT_TARGETS := \
|
||||
ls1043ardb \
|
||||
ls1046ardb \
|
||||
ls1012ardb \
|
||||
ls1088ardb \
|
||||
ls2088ardb \
|
||||
ls1012afrdm
|
||||
ls1012ardb \
|
||||
ls1012afrwy \
|
||||
ls1043ardb \
|
||||
ls1043ardb-sdboot \
|
||||
ls1046ardb \
|
||||
ls1046ardb-sdboot \
|
||||
ls1088ardb \
|
||||
ls1088ardb-sdboot \
|
||||
ls2088ardb \
|
||||
ls1021atwr \
|
||||
ls1021atwr-sdboot \
|
||||
ls1021aiot-sdboot
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-$(BUILD_SUBTARGET)-uboot.bin
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) \
|
||||
$(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-uboot.bin
|
||||
$(PKG_BUILD_DIR)/tools/mkenvimage -s $(ENV_SIZE) \
|
||||
-o $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-uboot-env.bin \
|
||||
files/$(BUILD_VARIANT)-uEnv.txt
|
||||
endef
|
||||
|
||||
define Package/u-boot/install/default
|
||||
|
8
package/boot/uboot-layerscape/files/ls1012afrwy-uEnv.txt
Normal file
8
package/boot/uboot-layerscape/files/ls1012afrwy-uEnv.txt
Normal file
@ -0,0 +1,8 @@
|
||||
fdtaddr=0x8f000000
|
||||
loadaddr=0x81000000
|
||||
fdt_high=0xffffffffffffffff
|
||||
initrd_high=0xffffffffffffffff
|
||||
sd_boot=mmc read $fdtaddr 7800 800;mmc read $loadaddr 8000 8000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200
|
||||
bootcmd=echo starting openwrt ...;pfe stop;run sd_boot
|
||||
bootdelay=3
|
8
package/boot/uboot-layerscape/files/ls1012ardb-uEnv.txt
Normal file
8
package/boot/uboot-layerscape/files/ls1012ardb-uEnv.txt
Normal file
@ -0,0 +1,8 @@
|
||||
fdtaddr=0x8f000000
|
||||
loadaddr=0x81000000
|
||||
fdt_high=0xffffffffffffffff
|
||||
initrd_high=0xffffffffffffffff
|
||||
qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=ubi.mtd=9 root=ubi0:rootfs rw rootfstype=ubifs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.quadspi:1m(rcw),2m(u-boot),1m(u-boot-env),2m(ppa),4m(reserved-1),3m(pfe),2m(reserved-2),1m(dtb),16m(kernel),32m(ubifs)
|
||||
bootcmd=echo starting openwrt ...;pfe stop;run qspi_boot
|
||||
bootdelay=3
|
@ -0,0 +1,8 @@
|
||||
fdtaddr=0x8f000000
|
||||
loadaddr=0x81000000
|
||||
fdt_high=0xffffffff
|
||||
initrd_high=0xffffffff
|
||||
sd_boot=mmc read ${fdtaddr} 7800 800;mmc read ${loadaddr} 8000 8000;bootm ${loadaddr} - ${fdtaddr}
|
||||
bootargs=root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200
|
||||
bootcmd=echo starting openwrt ...;run sd_boot
|
||||
bootdelay=3
|
@ -0,0 +1,8 @@
|
||||
fdtaddr=0x8f000000
|
||||
loadaddr=0x81000000
|
||||
fdt_high=0xffffffff
|
||||
initrd_high=0xffffffff
|
||||
sd_boot=mmc read $fdtaddr 7800 800;mmc read $loadaddr 8000 8000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200
|
||||
bootcmd=echo starting openwrt ...;run sd_boot
|
||||
bootdelay=3
|
8
package/boot/uboot-layerscape/files/ls1021atwr-uEnv.txt
Normal file
8
package/boot/uboot-layerscape/files/ls1021atwr-uEnv.txt
Normal file
@ -0,0 +1,8 @@
|
||||
fdtaddr=0x8f000000
|
||||
loadaddr=0x81000000
|
||||
fdt_high=0xffffffff
|
||||
initrd_high=0xffffffff
|
||||
nor_boot=cp.b 60f00000 $fdtaddr 100000;cp.b 61000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=root=/dev/mtdblock6 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(rcw),2m(u-boot),1m(u-boot-env),11m(reserved-1),1m(dtb),16m(kernel),32m(rootfs)
|
||||
bootcmd=echo starting openwrt ...;run nor_boot
|
||||
bootdelay=3
|
@ -0,0 +1,9 @@
|
||||
fdtaddr=0x8f000000
|
||||
loadaddr=0x81000000
|
||||
fdt_high=0xffffffffffffffff
|
||||
initrd_high=0xffffffffffffffff
|
||||
hwconfig=fsl_ddr:bank_intlv=auto
|
||||
sd_boot=mmc read $fdtaddr 7800 800;mmc read $loadaddr 8000 8000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200
|
||||
bootcmd=echo starting openwrt ...;run sd_boot
|
||||
bootdelay=3
|
9
package/boot/uboot-layerscape/files/ls1043ardb-uEnv.txt
Normal file
9
package/boot/uboot-layerscape/files/ls1043ardb-uEnv.txt
Normal file
@ -0,0 +1,9 @@
|
||||
fdtaddr=0x8f000000
|
||||
loadaddr=0x81000000
|
||||
fdt_high=0xffffffffffffffff
|
||||
initrd_high=0xffffffffffffffff
|
||||
hwconfig=fsl_ddr:bank_intlv=auto
|
||||
nor_boot=cp.b 60f00000 $fdtaddr 100000;cp.b 61000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=root=/dev/mtdblock9 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(rcw),2m(u-boot),1m(u-boot-env),2m(ppa),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs)
|
||||
bootcmd=echo starting openwrt ...;run nor_boot
|
||||
bootdelay=3
|
@ -0,0 +1,9 @@
|
||||
fdtaddr=0x8f000000
|
||||
loadaddr=0x81000000
|
||||
fdt_high=0xffffffffffffffff
|
||||
initrd_high=0xffffffffffffffff
|
||||
hwconfig=fsl_ddr:bank_intlv=auto
|
||||
sd_boot=mmc read $fdtaddr 7800 800;mmc read $loadaddr 8000 8000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200
|
||||
bootcmd=echo starting openwrt ...;run sd_boot
|
||||
bootdelay=3
|
9
package/boot/uboot-layerscape/files/ls1046ardb-uEnv.txt
Normal file
9
package/boot/uboot-layerscape/files/ls1046ardb-uEnv.txt
Normal file
@ -0,0 +1,9 @@
|
||||
fdtaddr=0x8f000000
|
||||
loadaddr=0x81000000
|
||||
fdt_high=0xffffffffffffffff
|
||||
initrd_high=0xffffffffffffffff
|
||||
hwconfig=fsl_ddr:bank_intlv=auto
|
||||
qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=ubi.mtd=10 root=ubi0:rootfs rw rootfstype=ubifs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.quadspi:1m(rcw),2m(u-boot),1m(u-boot-env),2m(ppa),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(ubifs)
|
||||
bootcmd=echo starting openwrt ...;run qspi_boot
|
||||
bootdelay=3
|
@ -0,0 +1,10 @@
|
||||
fdtaddr=0x8f000000
|
||||
loadaddr=0x81000000
|
||||
fdt_high=0xa0000000
|
||||
initrd_high=0xffffffffffffffff
|
||||
hwconfig=fsl_ddr:bank_intlv=auto
|
||||
mc_init=mmc read 80000000 5000 1800;mmc read 80300000 7000 800;fsl_mc start mc 80000000 80300000;mmc read 80400000 6800 800;fsl_mc apply dpl 80400000
|
||||
sd_boot=mmc read $fdtaddr 7800 800;mmc read $loadaddr 8000 8000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200
|
||||
bootcmd=echo starting openwrt ...;run mc_init;run sd_boot
|
||||
bootdelay=3
|
10
package/boot/uboot-layerscape/files/ls1088ardb-uEnv.txt
Normal file
10
package/boot/uboot-layerscape/files/ls1088ardb-uEnv.txt
Normal file
@ -0,0 +1,10 @@
|
||||
fdtaddr=0x8f000000
|
||||
loadaddr=0x81000000
|
||||
fdt_high=0xa0000000
|
||||
initrd_high=0xffffffffffffffff
|
||||
hwconfig=fsl_ddr:bank_intlv=auto
|
||||
mc_init=sf probe 0:0;sf read 80000000 a00000 300000;sf read 80300000 e00000 100000;fsl_mc start mc 80000000 80300000;sf read 80400000 d00000 100000;fsl_mc apply dpl 80400000
|
||||
qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=ubi.mtd=11 root=ubi0:rootfs rw rootfstype=ubifs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=20c0000.quadspi:1m(rcw),2m(u-boot),1m(u-boot-env),2m(ppa),4m(reserved-1),3m(mc),1m(dpl),1m(dpc),1m(dtb),16m(kernel),32m(ubifs)
|
||||
bootcmd=echo starting openwrt ...;run mc_init;run qspi_boot
|
||||
bootdelay=3
|
10
package/boot/uboot-layerscape/files/ls2088ardb-uEnv.txt
Normal file
10
package/boot/uboot-layerscape/files/ls2088ardb-uEnv.txt
Normal file
@ -0,0 +1,10 @@
|
||||
fdtaddr=0x8f000000
|
||||
loadaddr=0x81000000
|
||||
fdt_high=0xa0000000
|
||||
initrd_high=0xffffffffffffffff
|
||||
hwconfig=fsl_ddr:bank_intlv=auto
|
||||
mc_init=fsl_mc start mc 580a00000 580e00000;fsl_mc apply dpl 580d00000
|
||||
nor_boot=cp.b 580f00000 $fdtaddr 100000;cp.b 581000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr
|
||||
bootargs=root=/dev/mtdblock10 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS1,115200 mtdparts=580000000.nor:1m(rcw),2m(u-boot),1m(u-boot-env),2m(ppa),4m(reserved-1),3m(mc),1m(dpl),1m(dpc),1m(dtb),16m(kernel),32m(rootfs)
|
||||
bootcmd=echo starting openwrt ...;run mc_init;run nor_boot
|
||||
bootdelay=3
|
@ -1,51 +0,0 @@
|
||||
From d1b42455f62baefe7fb782d0d7100715b0fdb41f Mon Sep 17 00:00:00 2001
|
||||
From: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
Date: Fri, 19 Jan 2018 10:16:57 +0800
|
||||
Subject: [PATCH] armv8: ls1043a: add LEDE boot support in environment
|
||||
|
||||
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
---
|
||||
include/configs/ls1043a_common.h | 20 +++++++++++++++++++-
|
||||
1 files changed, 19 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
|
||||
index c437ce5..48ecff5 100644
|
||||
--- a/include/configs/ls1043a_common.h
|
||||
+++ b/include/configs/ls1043a_common.h
|
||||
@@ -341,7 +341,19 @@
|
||||
"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/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
|
||||
@@ -356,6 +368,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
|
||||
--
|
||||
1.7.1
|
||||
|
@ -1,57 +0,0 @@
|
||||
From a5293c6d5fdacf84fdd4772d0532aa5478df4d3c Mon Sep 17 00:00:00 2001
|
||||
From: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
Date: Fri, 19 Jan 2018 10:18:47 +0800
|
||||
Subject: [PATCH] armv8: ls1046ardb: add LEDE boot support in environment
|
||||
|
||||
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
---
|
||||
include/configs/ls1046a_common.h | 15 ++++++++++++++-
|
||||
include/configs/ls1046ardb.h | 6 ++++++
|
||||
2 files changed, 20 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h
|
||||
index d163347..d26147b 100644
|
||||
--- a/include/configs/ls1046a_common.h
|
||||
+++ b/include/configs/ls1046a_common.h
|
||||
@@ -281,7 +281,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 ubi.mtd=9 root=ubi0:rootfs rw " \
|
||||
+ "rootfstype=ubifs 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),32M(ubifs)\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 4475ac7..15e7858 100644
|
||||
--- a/include/configs/ls1046ardb.h
|
||||
+++ b/include/configs/ls1046ardb.h
|
||||
@@ -253,6 +253,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)," \
|
||||
--
|
||||
1.7.1
|
||||
|
@ -1,51 +0,0 @@
|
||||
From 8d6efca7eb2de012b98493206c87f31ee9b9e967 Mon Sep 17 00:00:00 2001
|
||||
From: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
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 <yangbo.lu@nxp.com>
|
||||
---
|
||||
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 ubi.mtd=8 root=ubi0:rootfs rw " \
|
||||
+ "rootfstype=ubifs 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),32M(ubifs)\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 <asm/fsl_secure_boot.h>
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,58 +0,0 @@
|
||||
From 479bf0c0bec2e99442214facf0f414c2c737ac7b Mon Sep 17 00:00:00 2001
|
||||
From: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
Date: Mon, 16 Oct 2017 11:57:36 +0800
|
||||
Subject: [PATCH] armv8: ls1088ardb: add LEDE boot support in environment
|
||||
|
||||
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
---
|
||||
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 ubi.mtd=10 root=ubi0:rootfs rw " \
|
||||
+ "rootfstype=ubifs 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),32M(ubifs)\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
|
||||
|
@ -1,54 +0,0 @@
|
||||
From 20f270670d1d5e14f3fd128f359535300a955ac8 Mon Sep 17 00:00:00 2001
|
||||
From: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
Date: Mon, 16 Oct 2017 12:37:05 +0800
|
||||
Subject: [PATCH] armv8: ls2088ardb: add LEDE boot support in environment
|
||||
|
||||
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
---
|
||||
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
|
||||
|
@ -1,49 +0,0 @@
|
||||
From a5e454a3bb33a456655f08592606e4df34e40110 Mon Sep 17 00:00:00 2001
|
||||
From: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
Date: Tue, 24 Oct 2017 17:48:08 +0800
|
||||
Subject: [PATCH] armv8: ls1012afrdm: add LEDE boot support in environment
|
||||
|
||||
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
---
|
||||
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 ubi.mtd=8 root=ubi0:rootfs rw " \
|
||||
+ "rootfstype=ubifs 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),32M(ubifs)\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
|
||||
|
@ -8,10 +8,10 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_VERSION:=2017.11
|
||||
PKG_VERSION:=2018.09
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_HASH:=6a018fd3caf58f3dcfa23ee989a82bd35df03af71872b9dca8c6d758a0d26c05
|
||||
PKG_HASH:=839bf23cfe8ce613a77e583a60375179d0ad324e92c82fbdd07bebf0fd142268
|
||||
|
||||
include $(INCLUDE_DIR)/u-boot.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
@ -1,6 +1,6 @@
|
||||
From 25de6430219d3f3698d709c10358fbea17b24cf1 Mon Sep 17 00:00:00 2001
|
||||
From 7b919a74c562ca33ae28c9214f225a79b57209e4 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Heimpold <mhei@heimpold.de>
|
||||
Date: Fri, 21 Apr 2017 11:08:19 +0200
|
||||
Date: Thu, 13 Sep 2018 21:40:19 +0200
|
||||
Subject: [PATCH] arm: mxs: add support for I2SE's Duckbill boards
|
||||
|
||||
The Duckbill devices are small, pen-drive sized boards based on
|
||||
@ -8,7 +8,7 @@ NXP's i.MX28 SoC. While the initial variants (Duckbill series) were
|
||||
equipped with a micro SD card slot only, the latest generation
|
||||
(Duckbill 2 series) have an additional internal eMMC onboard.
|
||||
|
||||
Both device generations consists of four "family members":
|
||||
Both device generations consist of four "family members":
|
||||
|
||||
- Duckbill/Duckbill 2: generic board, intended to be used as
|
||||
baseboard for custom designs and/or as development board
|
||||
@ -26,15 +26,15 @@ Both device generations consists of four "family members":
|
||||
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
|
||||
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
---
|
||||
arch/arm/Kconfig | 9 +-
|
||||
arch/arm/mach-imx/mxs/Kconfig | 5 +
|
||||
board/i2se/duckbill/Kconfig | 15 +++
|
||||
board/i2se/duckbill/MAINTAINERS | 6 ++
|
||||
board/i2se/duckbill/Makefile | 12 +++
|
||||
board/i2se/duckbill/duckbill.c | 181 ++++++++++++++++++++++++++++++++++++
|
||||
board/i2se/duckbill/iomux.c | 157 +++++++++++++++++++++++++++++++
|
||||
configs/duckbill_defconfig | 31 +++++++
|
||||
include/configs/duckbill.h | 199 ++++++++++++++++++++++++++++++++++++++++
|
||||
8 files changed, 609 insertions(+), 1 deletion(-)
|
||||
board/i2se/duckbill/Makefile | 10 ++
|
||||
board/i2se/duckbill/duckbill.c | 186 ++++++++++++++++++++++++++++++++
|
||||
board/i2se/duckbill/iomux.c | 156 +++++++++++++++++++++++++++
|
||||
configs/duckbill_defconfig | 38 +++++++
|
||||
include/configs/duckbill.h | 179 ++++++++++++++++++++++++++++++
|
||||
8 files changed, 595 insertions(+)
|
||||
create mode 100644 board/i2se/duckbill/Kconfig
|
||||
create mode 100644 board/i2se/duckbill/MAINTAINERS
|
||||
create mode 100644 board/i2se/duckbill/Makefile
|
||||
@ -43,38 +43,27 @@ Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
create mode 100644 configs/duckbill_defconfig
|
||||
create mode 100644 include/configs/duckbill.h
|
||||
|
||||
--- a/arch/arm/Kconfig
|
||||
+++ b/arch/arm/Kconfig
|
||||
@@ -373,6 +373,12 @@ config TARGET_MX28EVK
|
||||
select SUPPORT_SPL
|
||||
select BOARD_EARLY_INIT_F
|
||||
--- a/arch/arm/mach-imx/mxs/Kconfig
|
||||
+++ b/arch/arm/mach-imx/mxs/Kconfig
|
||||
@@ -50,6 +50,10 @@ config TARGET_APX4DEVKIT
|
||||
config TARGET_BG0900
|
||||
bool "Support bg0900"
|
||||
|
||||
+config TARGET_DUCKBILL
|
||||
+ bool "Support duckbill"
|
||||
+ select CPU_ARM926EJS
|
||||
+ select SUPPORT_SPL
|
||||
+ select BOARD_EARLY_INIT_F
|
||||
+
|
||||
config TARGET_MX23_OLINUXINO
|
||||
bool "Support mx23_olinuxino"
|
||||
select CPU_ARM926EJS
|
||||
@@ -1250,6 +1256,7 @@ source "board/gumstix/pepper/Kconfig"
|
||||
source "board/h2200/Kconfig"
|
||||
source "board/hisilicon/hikey/Kconfig"
|
||||
source "board/hisilicon/poplar/Kconfig"
|
||||
config TARGET_MX28EVK
|
||||
bool "Support mx28evk"
|
||||
select BOARD_EARLY_INIT_F
|
||||
@@ -67,6 +71,7 @@ config SYS_SOC
|
||||
|
||||
source "board/bluegiga/apx4devkit/Kconfig"
|
||||
source "board/freescale/mx28evk/Kconfig"
|
||||
+source "board/i2se/duckbill/Kconfig"
|
||||
source "board/imx31_phycore/Kconfig"
|
||||
source "board/isee/igep003x/Kconfig"
|
||||
source "board/olimex/mx23_olinuxino/Kconfig"
|
||||
@@ -1279,7 +1286,7 @@ source "arch/arm/Kconfig.debug"
|
||||
endmenu
|
||||
|
||||
config SPL_LDSCRIPT
|
||||
- default "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" if TARGET_APX4DEVKIT || TARGET_BG0900 || TARGET_M28EVK || TARGET_MX23_OLINUXINO || TARGET_MX23EVK || TARGET_MX28EVK || TARGET_SANSA_FUZE_PLUS || TARGET_SC_SPS_1 || TARGET_TS4600 || TARGET_XFI3
|
||||
+ default "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" if TARGET_APX4DEVKIT || TARGET_BG0900 || TARGET_M28EVK || TARGET_MX23_OLINUXINO || TARGET_MX23EVK || TARGET_MX28EVK || TARGET_DUCKBILL || TARGET_SANSA_FUZE_PLUS || TARGET_SC_SPS_1 || TARGET_TS4600 || TARGET_XFI3
|
||||
default "arch/arm/cpu/arm1136/u-boot-spl.lds" if CPU_ARM1136
|
||||
default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64
|
||||
|
||||
source "board/ppcag/bg0900/Kconfig"
|
||||
source "board/schulercontrol/sc_sps_1/Kconfig"
|
||||
source "board/technologic/ts4600/Kconfig"
|
||||
--- /dev/null
|
||||
+++ b/board/i2se/duckbill/Kconfig
|
||||
@@ -0,0 +1,15 @@
|
||||
@ -104,13 +93,11 @@ Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
+F: configs/duckbill_defconfig
|
||||
--- /dev/null
|
||||
+++ b/board/i2se/duckbill/Makefile
|
||||
@@ -0,0 +1,12 @@
|
||||
@@ -0,0 +1,10 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0+
|
||||
+#
|
||||
+# (C) Copyright 2014-2017
|
||||
+# (C) Copyright 2014-2018
|
||||
+# Michael Heimpold, mhei@heimpold.de.
|
||||
+#
|
||||
+# SPDX-License-Identifier: GPL-2.0+
|
||||
+#
|
||||
+
|
||||
+ifndef CONFIG_SPL_BUILD
|
||||
+obj-y := duckbill.o
|
||||
@ -119,13 +106,12 @@ Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
+endif
|
||||
--- /dev/null
|
||||
+++ b/board/i2se/duckbill/duckbill.c
|
||||
@@ -0,0 +1,181 @@
|
||||
@@ -0,0 +1,186 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * I2SE Duckbill board
|
||||
+ *
|
||||
+ * (C) Copyright 2014-2017 Michael Heimpold <mhei@heimpold.de>
|
||||
+ *
|
||||
+ * SPDX-License-Identifier: GPL-2.0+
|
||||
+ * (C) Copyright 2014-2018 Michael Heimpold <mhei@heimpold.de>
|
||||
+ */
|
||||
+
|
||||
+#include <common.h>
|
||||
@ -205,7 +191,7 @@ Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
+ /* give PHY some time to get out of the reset */
|
||||
+ udelay(10000);
|
||||
+
|
||||
+ ret = fecmxc_initialize(bis);
|
||||
+ ret = fecmxc_initialize_multi(bis, 0, 0, MXS_ENET0_BASE);
|
||||
+ if (ret) {
|
||||
+ puts("FEC MXS: Unable to init FEC\n");
|
||||
+ return ret;
|
||||
@ -228,22 +214,20 @@ Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
+ uint8_t enetaddr[6];
|
||||
+ u32 mac = 0;
|
||||
+
|
||||
+ enetaddr[0] = 0x00;
|
||||
+ enetaddr[1] = 0x01;
|
||||
+ enetaddr[2] = 0x87;
|
||||
+
|
||||
+#ifdef CONFIG_MXS_OCOTP
|
||||
+ /* only Duckbill SPI has a MAC for the QCA7k */
|
||||
+ fuse_read(0, 1, &mac);
|
||||
+#endif
|
||||
+
|
||||
+ if (mac != 0) {
|
||||
+ enetaddr[0] = 0x00;
|
||||
+ enetaddr[1] = 0x01;
|
||||
+ enetaddr[2] = 0x87;
|
||||
+ enetaddr[3] = (mac >> 16) & 0xff;
|
||||
+ enetaddr[4] = (mac >> 8) & 0xff;
|
||||
+ enetaddr[5] = mac & 0xff;
|
||||
+
|
||||
+ fdt_find_and_setprop(blob,
|
||||
+ "/apb@80000000/apbh@80000000/ssp@80014000/ethernet@0",
|
||||
+ fdt_find_and_setprop(blob, "spi1/ethernet@0",
|
||||
+ "local-mac-address", enetaddr, 6, 1);
|
||||
+ }
|
||||
+
|
||||
@ -279,6 +263,14 @@ Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
+ gpio_get_value(MX28_PAD_LCD_D17__GPIO_1_17);
|
||||
+ system_rev += 1;
|
||||
+
|
||||
+ /* guess DT blob if not set in environment */
|
||||
+ if (!env_get("fdt_file")) {
|
||||
+ if (system_rev == 1)
|
||||
+ env_set("fdt_file", "imx28-duckbill.dtb");
|
||||
+ else
|
||||
+ env_set("fdt_file", "imx28-duckbill-2.dtb");
|
||||
+ }
|
||||
+
|
||||
+ /* enable red LED to indicate a running bootloader */
|
||||
+ if (system_rev == 1)
|
||||
+ led_red_gpio = MX28_PAD_AUART1_RX__GPIO_3_4;
|
||||
@ -303,13 +295,12 @@ Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/board/i2se/duckbill/iomux.c
|
||||
@@ -0,0 +1,157 @@
|
||||
@@ -0,0 +1,156 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * I2SE Duckbill IOMUX setup
|
||||
+ *
|
||||
+ * Copyright (C) 2013-2017 Michael Heimpold <mhei@heimpold.de>
|
||||
+ *
|
||||
+ * SPDX-License-Identifier: GPL-2.0+
|
||||
+ * Copyright (C) 2013-2018 Michael Heimpold <mhei@heimpold.de>
|
||||
+ */
|
||||
+
|
||||
+#include <common.h>
|
||||
@ -463,63 +454,64 @@ Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/configs/duckbill_defconfig
|
||||
@@ -0,0 +1,31 @@
|
||||
@@ -0,0 +1,38 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_TARGET_DUCKBILL=y
|
||||
+CONFIG_ARCH_MX28=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x40002000
|
||||
+CONFIG_SPL_GPIO_SUPPORT=y
|
||||
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
|
||||
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
||||
+CONFIG_TARGET_DUCKBILL=y
|
||||
+CONFIG_SPL_SERIAL_SUPPORT=y
|
||||
+CONFIG_SPL=y
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_BOOTDELAY=1
|
||||
+# CONFIG_CONSOLE_MUX is not set
|
||||
+CONFIG_SYS_CONSOLE_IS_IN_ENV=y
|
||||
+CONFIG_VERSION_VARIABLE=y
|
||||
+# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
+# CONFIG_EFI_LOADER is not set
|
||||
+CONFIG_ARCH_MISC_INIT=y
|
||||
+CONFIG_SPL=y
|
||||
+# CONFIG_SPL_FRAMEWORK is not set
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+# CONFIG_CMD_IMLS is not set
|
||||
+# CONFIG_CMD_ELF is not set
|
||||
+CONFIG_CMD_UNZIP=y
|
||||
+# CONFIG_CMD_FLASH is not set
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_FUSE=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_MMC_SWRITE=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_MII=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_EXT4=y
|
||||
+CONFIG_CMD_EXT4_WRITE=y
|
||||
+CONFIG_CMD_FAT=y
|
||||
+CONFIG_CMD_FS_GENERIC=y
|
||||
+CONFIG_DOS_PARTITION=y
|
||||
+CONFIG_ENV_IS_IN_MMC=y
|
||||
+CONFIG_MMC_MXS=y
|
||||
+CONFIG_MII=y
|
||||
+CONFIG_CONS_INDEX=0
|
||||
+CONFIG_OF_LIBFDT=y
|
||||
+# CONFIG_EFI_LOADER is not set
|
||||
--- /dev/null
|
||||
+++ b/include/configs/duckbill.h
|
||||
@@ -0,0 +1,199 @@
|
||||
@@ -0,0 +1,179 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
+/*
|
||||
+ * Copyright (C) 2014-2015 Michael Heimpold <mhei@heimpold.de>
|
||||
+ * Copyright (C) 2014-2018 Michael Heimpold <mhei@heimpold.de>
|
||||
+ *
|
||||
+ * SPDX-License-Identifier: GPL-2.0+
|
||||
+ */
|
||||
+#ifndef __CONFIGS_DUCKBILL_H__
|
||||
+#define __CONFIGS_DUCKBILL_H__
|
||||
+
|
||||
+/* System configurations */
|
||||
+#define CONFIG_MX28 /* i.MX28 SoC */
|
||||
+#define CONFIG_MACH_TYPE MACH_TYPE_DUCKBILL
|
||||
+
|
||||
+#define CONFIG_MISC_INIT_R
|
||||
+
|
||||
+#define CONFIG_SYS_MXS_VDD5V_ONLY
|
||||
+
|
||||
+/* U-Boot Commands */
|
||||
+#define CONFIG_CMD_FUSE
|
||||
+#define CONFIG_CMD_UNZIP
|
||||
+
|
||||
+/* Memory configuration */
|
||||
+#define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */
|
||||
+#define PHYS_SDRAM_1 0x40000000 /* Base address */
|
||||
+#define PHYS_SDRAM_1_SIZE 0x40000000 /* Max 1 GB RAM */
|
||||
+#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
|
||||
@ -533,12 +525,10 @@ Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
|
||||
+
|
||||
+/* FEC Ethernet on SoC */
|
||||
+#ifdef CONFIG_CMD_NET
|
||||
+#ifdef CONFIG_CMD_NET
|
||||
+#define CONFIG_FEC_MXC
|
||||
+#define CONFIG_NET_MULTI
|
||||
+#define CONFIG_MX28_FEC_MAC_IN_OCOTP
|
||||
+#define CONFIG_FEC_MXC_PHYADDR 1
|
||||
+#define IMX_FEC_BASE MXS_ENET0_BASE
|
||||
+#define CONFIG_FEC_MXC_MDIO_BASE MXS_ENET0_BASE
|
||||
+#endif
|
||||
+
|
||||
+#define CONFIG_IPADDR 192.168.1.10
|
||||
@ -546,17 +536,6 @@ Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
+#define CONFIG_NETMASK 255.255.255.0
|
||||
+#define CONFIG_GATEWAYIP 192.168.1.254
|
||||
+
|
||||
+/* BOOTP options */
|
||||
+#define CONFIG_BOOTP_SUBNETMASK
|
||||
+#define CONFIG_BOOTP_GATEWAY
|
||||
+#define CONFIG_BOOTP_HOSTNAME
|
||||
+
|
||||
+/* SPI */
|
||||
+#ifdef CONFIG_CMD_SPI
|
||||
+#define CONFIG_DEFAULT_SPI_BUS 2
|
||||
+#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_0
|
||||
+#endif
|
||||
+
|
||||
+/* Boot Linux */
|
||||
+#define CONFIG_BOOTDELAY 1
|
||||
+#define CONFIG_BOOTFILE "zImage"
|
||||
@ -596,7 +575,7 @@ Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
+ "setexpr i ${update_fw_parts}; setexpr error 0; " \
|
||||
+ "while itest ${i} -gt 0; do " \
|
||||
+ "echo Transfering firmware image part ${i} of ${update_fw_parts}; " \
|
||||
+ "if itest ${i} -le 9; then " \
|
||||
+ "if itest ${i} -le f; then " \
|
||||
+ "setenv j 0${i}; " \
|
||||
+ "else " \
|
||||
+ "setenv j ${i}; " \
|
||||
@ -625,7 +604,6 @@ Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
+ "erase_env2=mmc erase 200 100\0" \
|
||||
+ "image=zImage\0" \
|
||||
+ "console=ttyAMA0\0" \
|
||||
+ "fdt_file=imx28-duckbill-2.dtb\0" \
|
||||
+ "fdt_addr=0x41000000\0" \
|
||||
+ "boot_fdt=try\0" \
|
||||
+ "ip_dyn=yes\0" \
|
||||
|
@ -1,36 +0,0 @@
|
||||
From c5b0bca4c3ca5c3d1d8ee99fdbf3b494a3986dbd Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Sun, 18 Mar 2018 16:03:47 +0100
|
||||
Subject: [PATCH] tools/mxsimage: Support building with LibreSSL
|
||||
|
||||
The mxsimage utility fails to compile against LibreSSL version < 2.7.0
|
||||
because LibreSSL says it is OpenSSL 2.0, but it does not support the
|
||||
complete OpenSSL 1.1 interface.
|
||||
|
||||
LibreSSL defines OPENSSL_VERSION_NUMBER with 0x20000000L and therefor
|
||||
claims to have an API compatible with OpenSSL 2.0, but it implements
|
||||
EVP_MD_CTX_new(), EVP_MD_CTX_free() and EVP_CIPHER_CTX_reset() only
|
||||
starting with version 2.7.0, which is not yet released. OpenSSL
|
||||
implements this function since version 1.1.0.
|
||||
|
||||
This commit will activate the compatibility code meant for
|
||||
OpenSSL < 1.1.0 also for LibreSSL version < 2.7.0.
|
||||
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Reviewed-by: Jonathan Gray <jsg@jsg.id.au>
|
||||
---
|
||||
tools/mxsimage.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/tools/mxsimage.c
|
||||
+++ b/tools/mxsimage.c
|
||||
@@ -26,7 +26,8 @@
|
||||
* OpenSSL 1.1.0 and newer compatibility functions:
|
||||
* https://wiki.openssl.org/index.php/1.1_API_Changes
|
||||
*/
|
||||
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
|
||||
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
|
||||
static void *OPENSSL_zalloc(size_t num)
|
||||
{
|
||||
void *ret = OPENSSL_malloc(num);
|
@ -3,7 +3,7 @@ needed dependencies are added too.
|
||||
|
||||
--- a/tools/Makefile
|
||||
+++ b/tools/Makefile
|
||||
@@ -163,7 +163,7 @@ endif
|
||||
@@ -147,7 +147,7 @@ endif
|
||||
# MXSImage needs LibSSL
|
||||
ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_ARMADA_38X)$(CONFIG_ARMADA_39X)$(CONFIG_FIT_SIGNATURE),)
|
||||
HOSTLOADLIBES_mkimage += \
|
||||
|
@ -150,6 +150,12 @@ define U-Boot/orangepi_r1
|
||||
BUILD_DEVICES:=sun8i-h2-plus-orangepi-r1
|
||||
endef
|
||||
|
||||
define U-Boot/orangepi_zero
|
||||
BUILD_SUBTARGET:=cortexa7
|
||||
NAME:=Orange Pi Zero (H2+)
|
||||
BUILD_DEVICES:=sun8i-h2-plus-orangepi-zero
|
||||
endef
|
||||
|
||||
define U-Boot/orangepi_pc
|
||||
BUILD_SUBTARGET:=cortexa7
|
||||
NAME:=Orange Pi PC (H3)
|
||||
@ -182,6 +188,14 @@ define U-Boot/nanopi_neo_plus2
|
||||
UENV:=a64
|
||||
endef
|
||||
|
||||
define U-Boot/nanopi_neo2
|
||||
BUILD_SUBTARGET:=cortexa53
|
||||
NAME:=NanoPi NEO2 (H5)
|
||||
BUILD_DEVICES:=sun50i-h5-nanopi-neo2
|
||||
DEPENDS:=+PACKAGE_u-boot-nanopi_neo2:arm-trusted-firmware-sunxi
|
||||
UENV:=a64
|
||||
endef
|
||||
|
||||
define U-Boot/pine64_plus
|
||||
BUILD_SUBTARGET:=cortexa53
|
||||
NAME:=Pine64 Plus A64
|
||||
@ -237,6 +251,8 @@ UBOOT_TARGETS := \
|
||||
nanopi_m1_plus \
|
||||
nanopi_neo \
|
||||
nanopi_neo_plus2 \
|
||||
nanopi_neo2 \
|
||||
orangepi_zero \
|
||||
orangepi_r1 \
|
||||
orangepi_pc \
|
||||
orangepi_plus \
|
||||
|
@ -20,26 +20,28 @@ define U-Boot/Default
|
||||
BUILD_TARGET:=zynq
|
||||
UBOOT_IMAGE:=spl/boot.bin u-boot.img
|
||||
UBOOT_CONFIG:=zynq_$(1)
|
||||
UENV:=default
|
||||
HIDDEN:=1
|
||||
endef
|
||||
|
||||
define U-Boot/zc702
|
||||
NAME:=Xilinx ZC702 Dev Board
|
||||
endef
|
||||
|
||||
define U-Boot/zc706
|
||||
NAME:=Xilinx ZC706 Dev Board
|
||||
BUILD_DEVICES:=xlnx_zynq-zc702
|
||||
endef
|
||||
|
||||
define U-Boot/zed
|
||||
NAME:=Avnet Digilent ZedBoard Dev Board
|
||||
BUILD_DEVICES:=avnet_zynq-zed
|
||||
endef
|
||||
|
||||
define U-Boot/zybo
|
||||
NAME:=Digilent Zybo Dev Board
|
||||
BUILD_DEVICES:=digilent_zynq-zybo
|
||||
endef
|
||||
|
||||
define U-Boot/zybo_z7
|
||||
NAME:=Digilent Zybo Z7 board
|
||||
BUILD_DEVICES:=digilent_zynq-zybo-z7
|
||||
endef
|
||||
|
||||
UBOOT_TARGETS := \
|
||||
@ -48,6 +50,16 @@ UBOOT_TARGETS := \
|
||||
zybo \
|
||||
zybo_z7
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
$(CP) $(PKG_BUILD_DIR)/spl/boot.bin $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-boot.bin
|
||||
$(CP) $(PKG_BUILD_DIR)/u-boot.img $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-u-boot.img
|
||||
$(CP) ./files/uEnv-$(UENV).txt $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-uEnv.txt
|
||||
endef
|
||||
|
||||
define Package/u-boot/install/default
|
||||
endef
|
||||
|
||||
Build/Exports:=$(Host/Exports)
|
||||
|
||||
$(eval $(call BuildPackage/U-Boot))
|
||||
|
1
package/boot/uboot-zynq/files/uEnv-default.txt
Normal file
1
package/boot/uboot-zynq/files/uEnv-default.txt
Normal file
@ -0,0 +1 @@
|
||||
bootargs=console=ttyPS0,115200n8 root=/dev/mmcblk0p2 rootwait earlyprintk
|
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gdb
|
||||
PKG_VERSION:=8.1.1
|
||||
PKG_VERSION:=8.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@GNU/gdb
|
||||
PKG_HASH:=97dcc3169bd430270fc29adb65145846a58c1b55cdbb73382a4a89307bdad03c
|
||||
PKG_HASH:=c3a441a29c7c89720b734e5a9c6289c0a06be7e0c76ef538f7bbcef389347c39
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
@ -49,5 +49,5 @@
|
||||
#include <asm/ptrace.h>
|
||||
+#undef pt_regs
|
||||
|
||||
#include "nat/ppc-linux.h"
|
||||
#include "linux-ppc-tdesc.h"
|
||||
#include "arch/ppc-linux-common.h"
|
||||
#include "arch/ppc-linux-tdesc.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1293,13 +1293,13 @@ if test -z "$LD"; then
|
||||
@@ -1277,13 +1277,13 @@ if test -z "$LD"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -15,9 +15,9 @@
|
||||
+ LDFLAGS="$LDFLAGS -static-libstdc++"
|
||||
+ AC_MSG_CHECKING([whether g++ accepts -static-libstdc++])
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_LINK_IFELSE([
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||
#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
|
||||
@@ -1625,7 +1625,7 @@ AC_ARG_WITH(stage1-ldflags,
|
||||
@@ -1609,7 +1609,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)
|
||||
|
||||
@@ -1654,7 +1654,7 @@ AC_ARG_WITH(boot-ldflags,
|
||||
@@ -1638,7 +1638,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
|
||||
@@ -4998,14 +4998,14 @@ if test -z "$LD"; then
|
||||
@@ -5043,14 +5043,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'
|
||||
@@ -5788,7 +5788,7 @@ else
|
||||
@@ -5833,7 +5833,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
|
||||
|
||||
@@ -5824,7 +5824,7 @@ else
|
||||
@@ -5869,7 +5869,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
|
||||
|
@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=strace
|
||||
PKG_VERSION:=4.24
|
||||
PKG_VERSION:=4.25
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION)
|
||||
PKG_HASH:=1f4e59fc1edfa2bfb4adf2a748623dc25b105ec79713dd84404199f91b0b0634
|
||||
PKG_HASH:=d685f8e65470b7832c3aff60c57ab4459f26ff89f07c10f92bd70ee89efac701
|
||||
|
||||
PKG_LICENSE:=BSD-3c
|
||||
PKG_LICENSE_FILES:=COPYRIGHT
|
||||
@ -54,12 +54,18 @@ system calls a program makes while it is running.
|
||||
endef
|
||||
|
||||
define Package/strace/config
|
||||
config PACKAGE_strace_libdw
|
||||
bool "Enable stack tracing support using libdw"
|
||||
default n
|
||||
config PACKAGE_strace_libunwind
|
||||
bool "Enable stack tracing support using libunwind (experimental)"
|
||||
default n
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += --with-libunwind=$(if $(CONFIG_PACKAGE_strace_libunwind),yes,no)
|
||||
CONFIGURE_ARGS += \
|
||||
--with-libdw=$(if $(CONFIG_PACKAGE_strace_libdw),yes,no) \
|
||||
--with-libunwind=$(if $(CONFIG_PACKAGE_strace_libunwind),yes,no)
|
||||
|
||||
MAKE_FLAGS := \
|
||||
CCOPT="$(TARGET_CFLAGS)"
|
||||
|
||||
|
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=valgrind
|
||||
PKG_VERSION:=3.13.0
|
||||
PKG_VERSION:=3.14.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=http://sourceware.org/pub/valgrind/
|
||||
PKG_HASH:=d76680ef03f00cd5e970bbdcd4e57fb1f6df7d2e2c071635ef2be74790190c3b
|
||||
PKG_HASH:=037c11bfefd477cc6e9ebe8f193bb237fe397f7ce791b4a4ce3fa1c6a520baa5
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=GPL-2.0+
|
||||
@ -105,6 +105,7 @@ CONFIGURE_ARGS += \
|
||||
--disable-valgrindtk \
|
||||
--without-included-gettext \
|
||||
--with-pagesize=4 \
|
||||
--enable-lto
|
||||
|
||||
define Package/valgrind/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -323,7 +323,7 @@ case "${host_os}" in
|
||||
@@ -341,7 +341,7 @@ case "${host_os}" in
|
||||
# Ok, this is linux. Check the kernel version
|
||||
AC_MSG_CHECKING([for the kernel version])
|
||||
|
||||
|
@ -6,7 +6,7 @@ Last-Update: 2013-11-30
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -234,7 +234,7 @@ case "${host_cpu}" in
|
||||
@@ -252,7 +252,7 @@ case "${host_cpu}" in
|
||||
ARCH_MAX="s390x"
|
||||
;;
|
||||
|
||||
|
@ -606,13 +606,13 @@ define Package/ath10k-firmware-qca9888-ct-htt/install
|
||||
$(1)/lib/firmware/ath10k/QCA9888/hw2.0/ct-firmware-5.bin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ath10k-firmware-qca9887))
|
||||
$(eval $(call BuildPackage,ath10k-firmware-qca9888))
|
||||
$(eval $(call BuildPackage,ath10k-firmware-qca988x))
|
||||
$(eval $(call BuildPackage,ath10k-firmware-qca99x0))
|
||||
$(eval $(call BuildPackage,ath10k-firmware-qca6174))
|
||||
$(eval $(call BuildPackage,ath10k-firmware-qca9984))
|
||||
$(eval $(call BuildPackage,ath10k-firmware-qca4019))
|
||||
#$(eval $(call BuildPackage,ath10k-firmware-qca9887))
|
||||
#$(eval $(call BuildPackage,ath10k-firmware-qca9888))
|
||||
#$(eval $(call BuildPackage,ath10k-firmware-qca988x))
|
||||
#$(eval $(call BuildPackage,ath10k-firmware-qca99x0))
|
||||
#$(eval $(call BuildPackage,ath10k-firmware-qca6174))
|
||||
#$(eval $(call BuildPackage,ath10k-firmware-qca9984))
|
||||
#$(eval $(call BuildPackage,ath10k-firmware-qca4019))
|
||||
|
||||
$(eval $(call BuildPackage,ath10k-firmware-qca9887-ct))
|
||||
$(eval $(call BuildPackage,ath10k-firmware-qca9887-ct-htt))
|
||||
|
@ -30,7 +30,7 @@ define Package/intel-microcode
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
URL:=$(PKG_SOURCE_URL)
|
||||
DEPENDS:=@TARGET_x86 +iucode-tool
|
||||
DEPENDS:=@TARGET_x86
|
||||
TITLE:=Intel x86 CPU microcode
|
||||
endef
|
||||
|
||||
|
@ -17,7 +17,7 @@ endef
|
||||
# Please send a mail with your device-specific board files upstream.
|
||||
# You can find instructions and examples on the linux-wireless wiki:
|
||||
# <https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles>
|
||||
ALLWIFIBOARDS:=rt-acrh17 zyxel_nbg6617 zyxel_wre6606
|
||||
ALLWIFIBOARDS:=engenius_eap1300
|
||||
ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD))
|
||||
|
||||
define Package/ipq-wifi-default
|
||||
@ -51,9 +51,7 @@ Don't install it for any other device!
|
||||
PREV_BOARD+=ipq-wifi-$(1)
|
||||
endef
|
||||
|
||||
$(eval $(call generate-ipq-wifi-package,rt-acrh17,board-rt-acrh17.bin,ASUS RT-ACRH17/RT-AC82U/RT-AC42U))
|
||||
$(eval $(call generate-ipq-wifi-package,zyxel_wre6606,board-zyxel_wre6606.bin,ZyXEL WRE6606))
|
||||
#$(eval $(call generate-ipq-wifi-package,<devicename>,<filename>,<displayname>))
|
||||
$(eval $(call generate-ipq-wifi-package,zyxel_nbg6617,board-zyxel_nbg6617.bin,ZyXEL NBG6617))
|
||||
$(eval $(call generate-ipq-wifi-package,engenius_eap1300,board-engenius_eap1300.bin,EnGenius EAP1300))
|
||||
|
||||
$(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE))))
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
105
package/firmware/linux-firmware/qca_ath10k.mk
Normal file
105
package/firmware/linux-firmware/qca_ath10k.mk
Normal file
@ -0,0 +1,105 @@
|
||||
QCA99X0_BOARD_REV:=ddcec9efd245da9365c474f513a855a55f3ac7fe
|
||||
QCA99X0_BOARD_FILE:=board-2.bin.$(QCA99X0_BOARD_REV)
|
||||
|
||||
define Download/qca99x0-board
|
||||
URL:=https://source.codeaurora.org/quic/qsdk/oss/firmware/ath10k-firmware/plain/ath10k/QCA99X0/hw2.0
|
||||
URL_FILE:=board-2.bin?id=$(QCA99X0_BOARD_REV)
|
||||
FILE:=$(QCA99X0_BOARD_FILE)
|
||||
HASH:=03711ac21e60ef59d3815e235eb721c0c22851b5410299411085aa6f2af45401
|
||||
endef
|
||||
$(eval $(call Download,qca99x0-board))
|
||||
|
||||
Package/ath10k-firmware-qca4019 = $(call Package/firmware-default,ath10k qca4019 firmware)
|
||||
define Package/ath10k-firmware-qca4019/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/ath10k/QCA4019/hw1.0/board-2.bin \
|
||||
$(1)/lib/firmware/ath10k/QCA4019/hw1.0/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/ath10k/QCA4019/hw1.0/firmware-5.bin \
|
||||
$(1)/lib/firmware/ath10k/QCA4019/hw1.0/firmware-5.bin
|
||||
endef
|
||||
$(eval $(call BuildPackage,ath10k-firmware-qca4019))
|
||||
|
||||
Package/ath10k-firmware-qca9887 = $(call Package/firmware-default,ath10k qca9887 firmware)
|
||||
define Package/ath10k-firmware-qca9887/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/ath10k/QCA9887/hw1.0/firmware-5.bin \
|
||||
$(1)/lib/firmware/ath10k/QCA9887/hw1.0/firmware-5.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/ath10k/QCA9887/hw1.0/board.bin \
|
||||
$(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin
|
||||
endef
|
||||
$(eval $(call BuildPackage,ath10k-firmware-qca9887))
|
||||
|
||||
Package/ath10k-firmware-qca9888 = $(call Package/firmware-default,ath10k qca9888 firmware)
|
||||
define Package/ath10k-firmware-qca9888/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/ath10k/QCA9888/hw2.0/board-2.bin \
|
||||
$(1)/lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/ath10k/QCA9888/hw2.0/firmware-5.bin \
|
||||
$(1)/lib/firmware/ath10k/QCA9888/hw2.0/firmware-5.bin
|
||||
endef
|
||||
$(eval $(call BuildPackage,ath10k-firmware-qca9888))
|
||||
|
||||
Package/ath10k-firmware-qca988x = $(call Package/firmware-default,ath10k qca988x firmware)
|
||||
define Package/ath10k-firmware-qca988x/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/ath10k/QCA988X/hw2.0/board.bin \
|
||||
$(1)/lib/firmware/ath10k/QCA988X/hw2.0/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/ath10k/QCA988X/hw2.0/firmware-5.bin \
|
||||
$(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
|
||||
endef
|
||||
$(eval $(call BuildPackage,ath10k-firmware-qca988x))
|
||||
|
||||
Package/ath10k-firmware-qca6174 = $(call Package/firmware-default,ath10k qca6174 firmware)
|
||||
define Package/ath10k-firmware-qca6174/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA6174/hw2.1
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/ath10k/QCA6174/hw2.1/board-2.bin \
|
||||
$(1)/lib/firmware/ath10k/QCA6174/hw2.1/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/ath10k/QCA6174/hw2.1/firmware-5.bin \
|
||||
$(1)/lib/firmware/ath10k/QCA6174/hw2.1/firmware-5.bin
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA6174/hw3.0
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/ath10k/QCA6174/hw3.0/board-2.bin \
|
||||
$(1)/lib/firmware/ath10k/QCA6174/hw3.0/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/ath10k/QCA6174/hw3.0/firmware-6.bin \
|
||||
$(1)/lib/firmware/ath10k/QCA6174/hw3.0/firmware-6.bin
|
||||
endef
|
||||
$(eval $(call BuildPackage,ath10k-firmware-qca6174))
|
||||
|
||||
Package/ath10k-firmware-qca99x0 = $(call Package/firmware-default,ath10k qca99x0 firmware)
|
||||
define Package/ath10k-firmware-qca99x0/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
|
||||
$(INSTALL_DATA) \
|
||||
$(DL_DIR)/$(QCA99X0_BOARD_FILE) \
|
||||
$(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/ath10k/QCA99X0/hw2.0/board.bin \
|
||||
$(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/ath10k/QCA99X0/hw2.0/firmware-5.bin \
|
||||
$(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin
|
||||
endef
|
||||
$(eval $(call BuildPackage,ath10k-firmware-qca99x0))
|
||||
|
||||
Package/ath10k-firmware-qca9984 = $(call Package/firmware-default,ath10k qca9984 firmware)
|
||||
define Package/ath10k-firmware-qca9984/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/ath10k/QCA9984/hw1.0/board-2.bin \
|
||||
$(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/ath10k/QCA9984/hw1.0/firmware-5.bin \
|
||||
$(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin
|
||||
endef
|
||||
$(eval $(call BuildPackage,ath10k-firmware-qca9984))
|
||||
|
@ -1,41 +0,0 @@
|
||||
From 7eb6313910023f1be6015a8cd9e1b380ae01af64 Mon Sep 17 00:00:00 2001
|
||||
From: Chen Minqiang <ptpt52@gmail.com>
|
||||
Date: Sun, 7 Jan 2018 14:38:36 +0800
|
||||
Subject: [PATCH] custom fix txpower and dfs
|
||||
|
||||
---
|
||||
db.txt | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/db.txt b/db.txt
|
||||
index 75dc0a3..24989ad 100644
|
||||
--- a/db.txt
|
||||
+++ b/db.txt
|
||||
@@ -277,9 +277,9 @@ country CL: DFS-JP
|
||||
(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
|
||||
+ (2402 - 2482 @ 40), (30)
|
||||
+ (5170 - 5250 @ 80), (30), AUTO-BW
|
||||
+ (5250 - 5330 @ 80), (30), 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
|
||||
@@ -1238,9 +1238,9 @@ country UG: DFS-FCC
|
||||
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
|
||||
+ (5170 - 5250 @ 80), (30), AUTO-BW
|
||||
+ (5250 - 5330 @ 80), (30), AUTO-BW
|
||||
+ (5490 - 5730 @ 160), (30)
|
||||
(5735 - 5835 @ 80), (30)
|
||||
# 60g band
|
||||
# reference: http://cfr.regstoday.com/47cfr15.aspx#47_CFR_15p255
|
||||
--
|
||||
2.7.4
|
60
package/kernel/cryptodev-linux/Makefile
Normal file
60
package/kernel/cryptodev-linux/Makefile
Normal file
@ -0,0 +1,60 @@
|
||||
#
|
||||
# Copyright (C) 2014 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# $Id$
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=cryptodev-linux
|
||||
PKG_VERSION:=1.9.git-2018-11-02
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/cryptodev-linux/cryptodev-linux
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=f1a693000d116718379f8b53ed7bc6b9c0f7de27
|
||||
PKG_MIRROR_HASH:=340d314e2a88bf2449ccee906b141e085d376f6e2a94a64e36254e8376323169
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_MAINTAINER:=Ansuel Smith <ansuelsmth@gmail.com>
|
||||
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/cryptodev
|
||||
SUBMENU:=Cryptographic API modules
|
||||
DEFAULT:=m if ALL
|
||||
TITLE:=Driver for cryptographic acceleration
|
||||
URL:=http://cryptodev-linux.org/
|
||||
VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
|
||||
DEPENDS:=+kmod-crypto-authenc +kmod-crypto-hash
|
||||
FILES:=$(PKG_BUILD_DIR)/cryptodev.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,50,cryptodev)
|
||||
MODPARAMS.cryptodev:=cryptodev_verbosity=-1
|
||||
endef
|
||||
|
||||
define KernelPackage/cryptodev/description
|
||||
This is a driver for that allows to use the Linux kernel supported
|
||||
hardware ciphers by user-space applications.
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
KERNEL_DIR="$(LINUX_DIR)"
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/crypto
|
||||
$(CP) $(PKG_BUILD_DIR)/crypto/cryptodev.h $(STAGING_DIR)/usr/include/crypto/
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,cryptodev))
|
@ -16,7 +16,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define KernelPackage/i2c-gpio-custom
|
||||
SUBMENU:=I2C support
|
||||
TITLE:=Custom GPIO-based I2C device
|
||||
DEPENDS:=@GPIO_SUPPORT +kmod-i2c-core +kmod-i2c-gpio
|
||||
DEPENDS:=@GPIO_SUPPORT +kmod-i2c-core +kmod-i2c-gpio @!LINUX_4_19
|
||||
FILES:=$(PKG_BUILD_DIR)/i2c-gpio-custom.ko
|
||||
KCONFIG:=
|
||||
endef
|
||||
|
@ -47,7 +47,12 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <linux/version.h>
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0)
|
||||
#include <linux/i2c-gpio.h>
|
||||
#else
|
||||
#include <linux/platform_data/i2c-gpio.h>
|
||||
#endif
|
||||
|
||||
#define DRV_NAME "i2c-gpio-custom"
|
||||
#define DRV_DESC "Custom GPIO-based I2C driver"
|
||||
|
@ -804,7 +804,7 @@ define KernelPackage/tcp-bbr
|
||||
DEPENDS:=@!LINUX_3_18 +LINUX_4_9:kmod-sched
|
||||
KCONFIG:= \
|
||||
CONFIG_TCP_CONG_ADVANCED=y \
|
||||
CONFIG_TCP_CONG_BBR=m
|
||||
CONFIG_TCP_CONG_BBR
|
||||
FILES:=$(LINUX_DIR)/net/ipv4/tcp_bbr.ko
|
||||
AUTOLOAD:=$(call AutoLoad,74,tcp_bbr)
|
||||
endef
|
||||
|
@ -113,7 +113,7 @@ detect_mac80211() {
|
||||
set wireless.radio${devidx}.hwmode=11${mode_band}
|
||||
${dev_id}
|
||||
${ht_capab}
|
||||
set wireless.radio${devidx}.disabled=0
|
||||
set wireless.radio${devidx}.disabled=1
|
||||
|
||||
set wireless.default_radio${devidx}=wifi-iface
|
||||
set wireless.default_radio${devidx}.device=radio${devidx}
|
||||
|
@ -1,45 +0,0 @@
|
||||
--- a/net/wireless/util.c 2018-01-22 23:10:57.014111703 -0500
|
||||
+++ b/net/wireless/util.c 2018-01-22 23:14:53.458313048 -0500
|
||||
@@ -1018,7 +1018,6 @@
|
||||
/* if it's part of a bridge, reject changing type to station/ibss */
|
||||
if ((dev->priv_flags & IFF_BRIDGE_PORT) &&
|
||||
(ntype == NL80211_IFTYPE_ADHOC ||
|
||||
- ntype == NL80211_IFTYPE_STATION ||
|
||||
ntype == NL80211_IFTYPE_P2P_CLIENT))
|
||||
return -EBUSY;
|
||||
|
||||
@@ -1063,11 +1062,6 @@
|
||||
if (!err) {
|
||||
dev->priv_flags &= ~IFF_DONT_BRIDGE;
|
||||
switch (ntype) {
|
||||
- case NL80211_IFTYPE_STATION:
|
||||
- if (dev->ieee80211_ptr->use_4addr)
|
||||
- break;
|
||||
- /* fall through */
|
||||
- case NL80211_IFTYPE_OCB:
|
||||
case NL80211_IFTYPE_P2P_CLIENT:
|
||||
case NL80211_IFTYPE_ADHOC:
|
||||
dev->priv_flags |= IFF_DONT_BRIDGE;
|
||||
--- a/net/wireless/core.c 2018-01-22 23:10:57.002111693 -0500
|
||||
+++ b/net/wireless/core.c 2018-01-22 23:16:14.930379807 -0500
|
||||
@@ -1112,8 +1112,7 @@
|
||||
/* allow mac80211 to determine the timeout */
|
||||
wdev->ps_timeout = -1;
|
||||
|
||||
- if ((wdev->iftype == NL80211_IFTYPE_STATION ||
|
||||
- wdev->iftype == NL80211_IFTYPE_P2P_CLIENT ||
|
||||
+ if ((wdev->iftype == NL80211_IFTYPE_P2P_CLIENT ||
|
||||
wdev->iftype == NL80211_IFTYPE_ADHOC) && !wdev->use_4addr)
|
||||
dev->priv_flags |= IFF_DONT_BRIDGE;
|
||||
|
||||
--- a/net/wireless/nl80211.c 2018-01-22 23:10:57.010111699 -0500
|
||||
+++ b/net/wireless/nl80211.c 2018-01-22 23:17:24.366435886 -0500
|
||||
@@ -2695,8 +2695,6 @@
|
||||
enum nl80211_iftype iftype)
|
||||
{
|
||||
if (!use_4addr) {
|
||||
- if (netdev && (netdev->priv_flags & IFF_BRIDGE_PORT))
|
||||
- return -EBUSY;
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,13 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/regd.c
|
||||
+++ b/drivers/net/wireless/ath/regd.c
|
||||
@@ -511,6 +511,10 @@ static int __ath_reg_dyn_country(struct
|
||||
|
||||
ath_reg_apply_world_flags(wiphy, request->initiator, reg);
|
||||
|
||||
+ // apply regulatory to phy devices
|
||||
+ if (regulatory_hint(wiphy, reg->alpha2))
|
||||
+ printk(KERN_DEBUG "ath: regulatory_hint error!\n");
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
@ -0,0 +1,73 @@
|
||||
ath9k: Avoid OF no-EEPROM quirks without qca,no-eeprom
|
||||
|
||||
ath9k_of_init() function[0] was initially written on the assumption that
|
||||
if someone had an explicit ath9k OF node that "there must be something
|
||||
wrong, why would someone add an OF node if everything is fine"[1]
|
||||
(Quoting Martin Blumenstingl)
|
||||
|
||||
"it turns out it's not that simple. with your requirements I'm now aware
|
||||
of two use-cases where the current code in ath9k_of_init() doesn't work
|
||||
without modifications"[1]
|
||||
|
||||
The "your requirements" Martin speaks of is the result of the fact that I
|
||||
have a device (PowerCloud Systems CR5000) that uses the EEPROM for
|
||||
caldata and firmware but for which the MAC address is take from the MTD
|
||||
"art" partition[2], or more succinctly:
|
||||
|
||||
"some cards come with a physical EEPROM chip so "qca,no-eeprom" should not
|
||||
be set (your use-case). in this case AH_USE_EEPROM should be set (which
|
||||
is the default when there is no OF node)"[1]
|
||||
|
||||
The other use case is:
|
||||
|
||||
the firmware on some PowerMac G5 seems to add a OF node for the ath9k
|
||||
card automatically. depending on the EEPROM on the card AH_NO_EEP_SWAP
|
||||
should be unset (which is the default when there is no OF node). see [3]
|
||||
|
||||
After this patch to ath9k_of_init() the new behavior will be:
|
||||
|
||||
if there's no OF node then everything is the same as before
|
||||
if there's an empty OF node then ath9k will use the hardware EEPROM
|
||||
(before ath9k would fail to initialize because no EEPROM data was
|
||||
provided by userspace)
|
||||
if there's an OF node with only a MAC address then ath9k will use
|
||||
the MAC address and the hardware EEPROM (see the case above)
|
||||
with "qca,no-eeprom" EEPROM data from userspace will be requested.
|
||||
the behavior here will not change
|
||||
[1]
|
||||
|
||||
Martin provides additional background on EEPROM swapping[1] which I have
|
||||
included in the patch annotation but not the commit message.
|
||||
|
||||
Thanks to Christian Lampartar <chunkeey@gmail.com> for all his help on
|
||||
troubleshooting this issue and the basis for this patch.
|
||||
|
||||
Fixes: 138b41253d9c ("ath9k: parse the device configuration from an OF node")
|
||||
|
||||
[0]https://elixir.bootlin.com/linux/v4.20-rc7/source/drivers/net/wireless/ath/ath9k/init.c#L615
|
||||
[1]https://github.com/openwrt/openwrt/pull/1645#issuecomment-448027058
|
||||
[2]https://github.com/openwrt/openwrt/pull/1613
|
||||
[3]https://patchwork.kernel.org/patch/10241731/
|
||||
|
||||
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -642,15 +642,15 @@ static int ath9k_of_init(struct ath_soft
|
||||
ret = ath9k_eeprom_request(sc, eeprom_name);
|
||||
if (ret)
|
||||
return ret;
|
||||
+
|
||||
+ ah->ah_flags &= ~AH_USE_EEPROM;
|
||||
+ ah->ah_flags |= AH_NO_EEP_SWAP;
|
||||
}
|
||||
|
||||
mac = of_get_mac_address(np);
|
||||
if (mac)
|
||||
ether_addr_copy(common->macaddr, mac);
|
||||
|
||||
- ah->ah_flags &= ~AH_USE_EEPROM;
|
||||
- ah->ah_flags |= AH_NO_EEP_SWAP;
|
||||
-
|
||||
return 0;
|
||||
}
|
||||
|
@ -0,0 +1,60 @@
|
||||
From a50e5fb8db83c5b57392204c21ea6c5c4ccefde6 Mon Sep 17 00:00:00 2001
|
||||
From: Sara Sharon <sara.sharon@intel.com>
|
||||
Date: Sat, 15 Dec 2018 11:03:10 +0200
|
||||
Subject: [PATCH 1/3] mac80211: fix a kernel panic when TXing after TXQ
|
||||
teardown
|
||||
|
||||
Recently TXQ teardown was moved earlier in ieee80211_unregister_hw(),
|
||||
to avoid a use-after-free of the netdev data. However, interfaces
|
||||
aren't fully removed at the point, and cfg80211_shutdown_all_interfaces
|
||||
can for example, TX a deauth frame. Move the TXQ teardown to the
|
||||
point between cfg80211_shutdown_all_interfaces and the free of
|
||||
netdev queues, so we can be sure they are torn down before netdev
|
||||
is freed, but after there is no ongoing TX.
|
||||
|
||||
Fixes: 77cfaf52eca5 ("mac80211: Run TXQ teardown code before de-registering interfaces")
|
||||
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
|
||||
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
net/mac80211/iface.c | 3 +++
|
||||
net/mac80211/main.c | 2 --
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/net/mac80211/iface.c
|
||||
+++ b/net/mac80211/iface.c
|
||||
@@ -7,6 +7,7 @@
|
||||
* Copyright 2008, Johannes Berg <johannes@sipsolutions.net>
|
||||
* Copyright 2013-2014 Intel Mobile Communications GmbH
|
||||
* Copyright (c) 2016 Intel Deutschland GmbH
|
||||
+ * Copyright (C) 2018 Intel Corporation
|
||||
*
|
||||
* 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
|
||||
@@ -2035,6 +2036,8 @@ void ieee80211_remove_interfaces(struct
|
||||
WARN(local->open_count, "%s: open count remains %d\n",
|
||||
wiphy_name(local->hw.wiphy), local->open_count);
|
||||
|
||||
+ ieee80211_txq_teardown_flows(local);
|
||||
+
|
||||
mutex_lock(&local->iflist_mtx);
|
||||
list_for_each_entry_safe(sdata, tmp, &local->interfaces, list) {
|
||||
list_del(&sdata->list);
|
||||
--- a/net/mac80211/main.c
|
||||
+++ b/net/mac80211/main.c
|
||||
@@ -1200,7 +1200,6 @@ int ieee80211_register_hw(struct ieee802
|
||||
rtnl_unlock();
|
||||
ieee80211_led_exit(local);
|
||||
ieee80211_wep_free(local);
|
||||
- ieee80211_txq_teardown_flows(local);
|
||||
fail_flows:
|
||||
destroy_workqueue(local->workqueue);
|
||||
fail_workqueue:
|
||||
@@ -1226,7 +1225,6 @@ void ieee80211_unregister_hw(struct ieee
|
||||
#if IS_ENABLED(__disabled__CONFIG_IPV6)
|
||||
unregister_inet6addr_notifier(&local->ifa6_notifier);
|
||||
#endif
|
||||
- ieee80211_txq_teardown_flows(local);
|
||||
|
||||
rtnl_lock();
|
||||
|
@ -0,0 +1,29 @@
|
||||
From d350a0f431189517b1af0dbbb605c273231a8966 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Berg <johannes.berg@intel.com>
|
||||
Date: Sat, 15 Dec 2018 11:03:22 +0200
|
||||
Subject: [PATCH 2/3] nl80211: fix memory leak if validate_pae_over_nl80211()
|
||||
fails
|
||||
|
||||
If validate_pae_over_nl80211() were to fail in nl80211_crypto_settings(),
|
||||
we might leak the 'connkeys' allocation. Fix this.
|
||||
|
||||
Fixes: 64bf3d4bc2b0 ("nl80211: Add CONTROL_PORT_OVER_NL80211 attribute")
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
net/wireless/nl80211.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -9002,8 +9002,10 @@ static int nl80211_join_ibss(struct sk_b
|
||||
if (info->attrs[NL80211_ATTR_CONTROL_PORT_OVER_NL80211]) {
|
||||
int r = validate_pae_over_nl80211(rdev, info);
|
||||
|
||||
- if (r < 0)
|
||||
+ if (r < 0) {
|
||||
+ kzfree(connkeys);
|
||||
return r;
|
||||
+ }
|
||||
|
||||
ibss.control_port_over_nl80211 = true;
|
||||
}
|
@ -16,7 +16,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define KernelPackage/rotary-gpio-custom
|
||||
SUBMENU:=Other modules
|
||||
TITLE:=Custom GPIO-based rotary encoder device
|
||||
DEPENDS:=@GPIO_SUPPORT +kmod-input-gpio-encoder @LINUX_3_18||LINUX_4_4
|
||||
DEPENDS:=@GPIO_SUPPORT +kmod-input-gpio-encoder @LINUX_3_18
|
||||
FILES:=$(PKG_BUILD_DIR)/rotary-gpio-custom.ko
|
||||
KCONFIG:=
|
||||
endef
|
||||
|
53
package/kernel/rtl8812au-ct/Makefile
Normal file
53
package/kernel/rtl8812au-ct/Makefile
Normal file
@ -0,0 +1,53 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=rtl8812au-ct
|
||||
PKG_RELEASE=1
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/greearb/rtl8812AU_8821AU_linux.git
|
||||
PKG_MIRROR_HASH:=42b32c56cf31bdf3c9cd4e304c9aac761b623c8737d8c57518117acdc5a84cfe
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2018-11-16
|
||||
PKG_SOURCE_VERSION:=661268fd174d4a74834c82d7d3987b0a560e6c57
|
||||
|
||||
PKG_MAINTAINER:=Ben Greear <greearb@candelatech.com>
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
#PKG_EXTMOD_SUBDIRS:=rtl8812au-ct
|
||||
|
||||
STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/rtl8812au-ct
|
||||
SUBMENU:=Wireless Drivers
|
||||
TITLE:=Driver for Realtek 8812 AU devices comfast 912-ac, etc
|
||||
DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT @!LINUX_3_18 @!LINUX_4_9
|
||||
FILES:=\
|
||||
$(PKG_BUILD_DIR)/rtl8812au.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtl8812au)
|
||||
PROVIDES:=kmod-rtl8812au
|
||||
endef
|
||||
|
||||
NOSTDINC_FLAGS = \
|
||||
-I$(PKG_BUILD_DIR) \
|
||||
-I$(PKG_BUILD_DIR)/include \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211-backport \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211 \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211/uapi \
|
||||
-include backport/backport.h
|
||||
|
||||
NOSTDINC_FLAGS+=-DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -DBUILD_OPENWRT
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
SUBDIRS="$(PKG_BUILD_DIR)" \
|
||||
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtl8812au-ct))
|
@ -0,0 +1,15 @@
|
||||
Fix compile problem when rtw_byteorder.h and asm/byteorder.h gets
|
||||
included in addition for example indirectly, do not use realtek own copy
|
||||
of the byteorder headers.
|
||||
|
||||
--- a/include/drv_types.h
|
||||
+++ b/include/drv_types.h
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <drv_conf.h>
|
||||
#include <basic_types.h>
|
||||
#include <osdep_service.h>
|
||||
-#include <rtw_byteorder.h>
|
||||
+#include <asm/byteorder.h>
|
||||
#include <wlan_bssdef.h>
|
||||
#include <wifi.h>
|
||||
#include <ieee80211.h>
|
@ -16,7 +16,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define KernelPackage/spi-gpio-custom
|
||||
SUBMENU:=SPI Support
|
||||
TITLE:=Custom GPIO-based SPI device
|
||||
DEPENDS:=@GPIO_SUPPORT +kmod-spi-bitbang +kmod-spi-gpio +kmod-spi-dev
|
||||
DEPENDS:=@GPIO_SUPPORT +kmod-spi-bitbang +kmod-spi-gpio +kmod-spi-dev @!LINUX_4_19
|
||||
FILES:=$(PKG_BUILD_DIR)/spi-gpio-custom.ko
|
||||
KCONFIG:=
|
||||
endef
|
||||
|
@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=trelay
|
||||
PKG_VERSION:=0.1
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@ -41,9 +41,9 @@ endef
|
||||
|
||||
define KernelPackage/trelay/install
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/net $(1)/etc/init.d $(1)/etc/config
|
||||
$(INSTALL_DATA) ./files/trelay.hotplug $(1)/etc/hotplug.d/net/50-trelay
|
||||
$(INSTALL_CONF) ./files/trelay.hotplug $(1)/etc/hotplug.d/net/50-trelay
|
||||
$(INSTALL_BIN) ./files/trelay.init $(1)/etc/init.d/trelay
|
||||
$(INSTALL_DATA) ./files/trelay.config $(1)/etc/config/trelay
|
||||
$(INSTALL_CONF) ./files/trelay.config $(1)/etc/config/trelay
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,trelay))
|
||||
|
@ -16,7 +16,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define KernelPackage/w1-gpio-custom
|
||||
SUBMENU:=W1 support
|
||||
TITLE:=Custom GPIO-based 1-wire device
|
||||
DEPENDS:=kmod-w1 +kmod-w1-master-gpio
|
||||
DEPENDS:=kmod-w1 +kmod-w1-master-gpio @!LINUX_4_19
|
||||
FILES:=$(PKG_BUILD_DIR)/w1-gpio-custom.ko
|
||||
KCONFIG:=
|
||||
endef
|
||||
|
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=elfutils
|
||||
PKG_VERSION:=0.173
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=0.174
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
|
||||
PKG_HASH:=b76d8c133f68dad46250f5c223482c8299d454a69430d9aa5c19123345a000ff
|
||||
PKG_HASH:=cdf27e70076e10a29539d89e367101d516bc4aa11b0d7777fe52139e3fcad08a
|
||||
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
||||
PKG_LICENSE:=GPL-3.0+
|
||||
PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
|
||||
@ -54,12 +54,13 @@ define Package/libelf1
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_BUILD_NLS),y)
|
||||
TARGET_LDFLAGS += "-lintl"
|
||||
TARGET_LDFLAGS += -lintl
|
||||
else
|
||||
CONFIGURE_ARGS += --disable-nls
|
||||
endif
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--program-prefix=eu- \
|
||||
--disable-nls \
|
||||
--without-lzma
|
||||
|
||||
TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral
|
||||
@ -71,6 +72,9 @@ define Build/InstallDev
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm*.{a,so*} $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw*.{a,so*} $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf*.{a,so*} $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libelf.pc $(1)/usr/lib/pkgconfig/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libdw.pc $(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
define Package/libasm/install
|
||||
|
@ -47,3 +47,26 @@
|
||||
/* gettext helper macros. */
|
||||
#define _(Str) dgettext ("elfutils", Str)
|
||||
|
||||
--- a/config/libelf.pc.in
|
||||
+++ b/config/libelf.pc.in
|
||||
@@ -8,7 +8,7 @@ Description: elfutils libelf library to
|
||||
Version: @VERSION@
|
||||
URL: http://elfutils.org/
|
||||
|
||||
-Libs: -L${libdir} -lelf
|
||||
+Libs: -L${libdir} -lelf @intl_LDFLAGS@
|
||||
Cflags: -I${includedir}
|
||||
|
||||
Requires.private: zlib
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -538,6 +538,9 @@ AC_CONFIG_FILES([config/libelf.pc config
|
||||
AC_SUBST(USE_NLS, yes)
|
||||
AM_PO_SUBDIRS
|
||||
|
||||
+case "$USE_NLS" in yes) intl_LDFLAGS="-lintl" ;; esac
|
||||
+AC_SUBST([intl_LDFLAGS])
|
||||
+
|
||||
dnl Appended to the config.h file.
|
||||
dnl We hide all kinds of configuration magic in lib/eu-config.h.
|
||||
AH_BOTTOM([#include <eu-config.h>])
|
@ -2,26 +2,27 @@ https://sourceware.org/bugzilla/show_bug.cgi?id=21002
|
||||
|
||||
--- a/lib/system.h
|
||||
+++ b/lib/system.h
|
||||
@@ -29,7 +29,18 @@
|
||||
#ifndef LIB_SYSTEM_H
|
||||
@@ -30,7 +30,18 @@
|
||||
#define LIB_SYSTEM_H 1
|
||||
|
||||
#include <errno.h>
|
||||
-#include <error.h>
|
||||
+#ifdef HAVE_ERROR_H
|
||||
+#include "error.h"
|
||||
+#else
|
||||
+#include "err.h"
|
||||
#include <errno.h>
|
||||
+#include <stdio.h>
|
||||
+#define error(status, errno, ...) \
|
||||
+ fflush(stdout); \
|
||||
+ warn(__VA_ARGS__); \
|
||||
+ if (status) exit(status)
|
||||
+#define error(status, errno, ...) \
|
||||
+ do { \
|
||||
+ fflush(stdout); \
|
||||
+ warn(__VA_ARGS__); \
|
||||
+ if (status) exit(status); \
|
||||
+ } while(0)
|
||||
+#endif
|
||||
+
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/param.h>
|
||||
@@ -37,6 +48,10 @@
|
||||
@@ -38,6 +49,10 @@
|
||||
#include <byteswap.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@ -32,540 +33,15 @@ https://sourceware.org/bugzilla/show_bug.cgi?id=21002
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define LE32(n) (n)
|
||||
# define LE64(n) (n)
|
||||
--- a/lib/color.c
|
||||
+++ b/lib/color.c
|
||||
@@ -32,13 +32,13 @@
|
||||
#endif
|
||||
|
||||
#include <argp.h>
|
||||
-#include <error.h>
|
||||
#include <libintl.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "libeu.h"
|
||||
#include "color.h"
|
||||
+#include "system.h"
|
||||
|
||||
/* Prototype for option handler. */
|
||||
static error_t parse_opt (int key, char *arg, struct argp_state *state);
|
||||
--- a/lib/xmalloc.c
|
||||
+++ b/lib/xmalloc.c
|
||||
@@ -30,7 +30,6 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
-#include <error.h>
|
||||
#include <libintl.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
--- a/src/addr2line.c
|
||||
+++ b/src/addr2line.c
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <argp.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
-#include <error.h>
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include <libdwfl.h>
|
||||
--- a/src/ar.c
|
||||
+++ b/src/ar.c
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#include <argp.h>
|
||||
#include <assert.h>
|
||||
-#include <error.h>
|
||||
#include <fcntl.h>
|
||||
#include <gelf.h>
|
||||
#include <libintl.h>
|
||||
--- a/src/arlib2.c
|
||||
+++ b/src/arlib2.c
|
||||
@@ -20,7 +20,6 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
-#include <error.h>
|
||||
#include <libintl.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
--- a/src/arlib.c
|
||||
+++ b/src/arlib.c
|
||||
@@ -21,7 +21,6 @@
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
-#include <error.h>
|
||||
#include <gelf.h>
|
||||
#include <inttypes.h>
|
||||
#include <libintl.h>
|
||||
--- a/src/elfcmp.c
|
||||
+++ b/src/elfcmp.c
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <argp.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
-#include <error.h>
|
||||
#include <fcntl.h>
|
||||
#include <locale.h>
|
||||
#include <libintl.h>
|
||||
--- a/src/elflint.c
|
||||
+++ b/src/elflint.c
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <assert.h>
|
||||
#include <byteswap.h>
|
||||
#include <endian.h>
|
||||
-#include <error.h>
|
||||
#include <fcntl.h>
|
||||
#include <gelf.h>
|
||||
#include <inttypes.h>
|
||||
--- a/src/findtextrel.c
|
||||
+++ b/src/findtextrel.c
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <argp.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
-#include <error.h>
|
||||
#include <fcntl.h>
|
||||
#include <gelf.h>
|
||||
#include <libdw.h>
|
||||
--- a/src/nm.c
|
||||
+++ b/src/nm.c
|
||||
@@ -26,7 +26,6 @@
|
||||
#include <ctype.h>
|
||||
#include <dwarf.h>
|
||||
#include <errno.h>
|
||||
-#include <error.h>
|
||||
#include <fcntl.h>
|
||||
#include <gelf.h>
|
||||
#include <inttypes.h>
|
||||
--- a/src/objdump.c
|
||||
+++ b/src/objdump.c
|
||||
@@ -21,7 +21,6 @@
|
||||
#endif
|
||||
|
||||
#include <argp.h>
|
||||
-#include <error.h>
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include <libintl.h>
|
||||
--- a/src/ranlib.c
|
||||
+++ b/src/ranlib.c
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <argp.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
-#include <error.h>
|
||||
#include <fcntl.h>
|
||||
#include <gelf.h>
|
||||
#include <libintl.h>
|
||||
--- a/src/readelf.c
|
||||
+++ b/src/readelf.c
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <ctype.h>
|
||||
#include <dwarf.h>
|
||||
#include <errno.h>
|
||||
-#include <error.h>
|
||||
#include <fcntl.h>
|
||||
#include <gelf.h>
|
||||
#include <inttypes.h>
|
||||
--- a/src/size.c
|
||||
+++ b/src/size.c
|
||||
@@ -21,7 +21,6 @@
|
||||
#endif
|
||||
|
||||
#include <argp.h>
|
||||
-#include <error.h>
|
||||
#include <fcntl.h>
|
||||
#include <gelf.h>
|
||||
#include <inttypes.h>
|
||||
--- a/src/stack.c
|
||||
+++ b/src/stack.c
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <config.h>
|
||||
#include <assert.h>
|
||||
#include <argp.h>
|
||||
-#include <error.h>
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
--- a/src/strings.c
|
||||
+++ b/src/strings.c
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <ctype.h>
|
||||
#include <endian.h>
|
||||
#include <errno.h>
|
||||
-#include <error.h>
|
||||
#include <fcntl.h>
|
||||
#include <gelf.h>
|
||||
#include <inttypes.h>
|
||||
--- a/src/strip.c
|
||||
+++ b/src/strip.c
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <assert.h>
|
||||
#include <byteswap.h>
|
||||
#include <endian.h>
|
||||
-#include <error.h>
|
||||
#include <fcntl.h>
|
||||
#include <fnmatch.h>
|
||||
#include <gelf.h>
|
||||
--- a/src/unstrip.c
|
||||
+++ b/src/unstrip.c
|
||||
@@ -31,7 +31,6 @@
|
||||
#include <argp.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
-#include <error.h>
|
||||
#include <fcntl.h>
|
||||
#include <fnmatch.h>
|
||||
#include <libintl.h>
|
||||
--- a/tests/addrscopes.c
|
||||
+++ b/tests/addrscopes.c
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <stdio_ext.h>
|
||||
#include <locale.h>
|
||||
#include <stdlib.h>
|
||||
-#include <error.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
--- a/tests/allregs.c
|
||||
+++ b/tests/allregs.c
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
-#include <error.h>
|
||||
#include <locale.h>
|
||||
#include <argp.h>
|
||||
#include <assert.h>
|
||||
--- a/tests/backtrace.c
|
||||
+++ b/tests/backtrace.c
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <dirent.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
-#include <error.h>
|
||||
#include <unistd.h>
|
||||
#include <dwarf.h>
|
||||
#ifdef __linux__
|
||||
--- a/tests/backtrace-data.c
|
||||
+++ b/tests/backtrace-data.c
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <dirent.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
-#include <error.h>
|
||||
#include <unistd.h>
|
||||
#include <dwarf.h>
|
||||
#if defined(__x86_64__) && defined(__linux__)
|
||||
--- a/tests/buildid.c
|
||||
+++ b/tests/buildid.c
|
||||
@@ -23,7 +23,6 @@
|
||||
#include ELFUTILS_HEADER(elf)
|
||||
#include ELFUTILS_HEADER(dwelf)
|
||||
#include <stdio.h>
|
||||
-#include <error.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
--- a/tests/debugaltlink.c
|
||||
+++ b/tests/debugaltlink.c
|
||||
@@ -23,7 +23,6 @@
|
||||
#include ELFUTILS_HEADER(dw)
|
||||
#include ELFUTILS_HEADER(dwelf)
|
||||
#include <stdio.h>
|
||||
-#include <error.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
--- a/tests/debuglink.c
|
||||
+++ b/tests/debuglink.c
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <errno.h>
|
||||
#include ELFUTILS_HEADER(dwelf)
|
||||
#include <stdio.h>
|
||||
-#include <error.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
--- a/tests/dwfl-addr-sect.c
|
||||
+++ b/tests/dwfl-addr-sect.c
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <stdio_ext.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
-#include <error.h>
|
||||
#include <locale.h>
|
||||
#include <argp.h>
|
||||
#include ELFUTILS_HEADER(dwfl)
|
||||
--- a/tests/dwfl-bug-addr-overflow.c
|
||||
+++ b/tests/dwfl-bug-addr-overflow.c
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <stdio_ext.h>
|
||||
-#include <error.h>
|
||||
#include <locale.h>
|
||||
#include ELFUTILS_HEADER(dwfl)
|
||||
|
||||
--- a/tests/dwfl-bug-fd-leak.c
|
||||
+++ b/tests/dwfl-bug-fd-leak.c
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <dirent.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
-#include <error.h>
|
||||
#include <unistd.h>
|
||||
#include <dwarf.h>
|
||||
|
||||
--- a/tests/dwfl-bug-getmodules.c
|
||||
+++ b/tests/dwfl-bug-getmodules.c
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <config.h>
|
||||
#include ELFUTILS_HEADER(dwfl)
|
||||
|
||||
-#include <error.h>
|
||||
|
||||
static const Dwfl_Callbacks callbacks =
|
||||
{
|
||||
--- a/tests/dwfllines.c
|
||||
+++ b/tests/dwfllines.c
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
-#include <error.h>
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
--- a/tests/dwflmodtest.c
|
||||
+++ b/tests/dwflmodtest.c
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <stdio_ext.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
-#include <error.h>
|
||||
#include <locale.h>
|
||||
#include <argp.h>
|
||||
#include ELFUTILS_HEADER(dwfl)
|
||||
--- a/tests/dwfl-report-elf-align.c
|
||||
+++ b/tests/dwfl-report-elf-align.c
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <stdio_ext.h>
|
||||
-#include <error.h>
|
||||
#include <locale.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
--- a/tests/dwflsyms.c
|
||||
+++ b/tests/dwflsyms.c
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdio_ext.h>
|
||||
#include <stdlib.h>
|
||||
-#include <error.h>
|
||||
#include <string.h>
|
||||
|
||||
static const char *
|
||||
--- a/tests/early-offscn.c
|
||||
+++ b/tests/early-offscn.c
|
||||
@@ -19,7 +19,6 @@
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
-#include <error.h>
|
||||
#include <fcntl.h>
|
||||
#include <gelf.h>
|
||||
#include <stdio.h>
|
||||
--- a/tests/ecp.c
|
||||
+++ b/tests/ecp.c
|
||||
@@ -20,7 +20,6 @@
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
-#include <error.h>
|
||||
#include <fcntl.h>
|
||||
#include <gelf.h>
|
||||
#include <stdlib.h>
|
||||
--- a/tests/find-prologues.c
|
||||
+++ b/tests/find-prologues.c
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <stdio_ext.h>
|
||||
#include <locale.h>
|
||||
#include <stdlib.h>
|
||||
-#include <error.h>
|
||||
#include <string.h>
|
||||
#include <fnmatch.h>
|
||||
|
||||
--- a/tests/funcretval.c
|
||||
+++ b/tests/funcretval.c
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <stdio_ext.h>
|
||||
#include <locale.h>
|
||||
#include <stdlib.h>
|
||||
-#include <error.h>
|
||||
#include <string.h>
|
||||
#include <fnmatch.h>
|
||||
|
||||
--- a/tests/funcscopes.c
|
||||
+++ b/tests/funcscopes.c
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <stdio_ext.h>
|
||||
#include <locale.h>
|
||||
#include <stdlib.h>
|
||||
-#include <error.h>
|
||||
#include <string.h>
|
||||
#include <fnmatch.h>
|
||||
|
||||
--- a/tests/line2addr.c
|
||||
+++ b/tests/line2addr.c
|
||||
@@ -26,7 +26,6 @@
|
||||
#include <locale.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
-#include <error.h>
|
||||
|
||||
|
||||
static void
|
||||
--- a/tests/low_high_pc.c
|
||||
+++ b/tests/low_high_pc.c
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <stdio_ext.h>
|
||||
#include <locale.h>
|
||||
#include <stdlib.h>
|
||||
-#include <error.h>
|
||||
#include <string.h>
|
||||
#include <fnmatch.h>
|
||||
|
||||
--- a/tests/rdwrmmap.c
|
||||
+++ b/tests/rdwrmmap.c
|
||||
@@ -19,7 +19,6 @@
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
-#include <error.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
--- a/tests/saridx.c
|
||||
+++ b/tests/saridx.c
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
-#include <error.h>
|
||||
#include <fcntl.h>
|
||||
#include <gelf.h>
|
||||
#include <stdio.h>
|
||||
--- a/tests/sectiondump.c
|
||||
+++ b/tests/sectiondump.c
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <config.h>
|
||||
|
||||
#include <errno.h>
|
||||
-#include <error.h>
|
||||
#include <fcntl.h>
|
||||
#include <gelf.h>
|
||||
#include <inttypes.h>
|
||||
--- a/tests/varlocs.c
|
||||
+++ b/tests/varlocs.c
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <dwarf.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
-#include <error.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
--- a/libasm/asm_end.c
|
||||
+++ b/libasm/asm_end.c
|
||||
@@ -32,7 +32,6 @@
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
-#include <error.h>
|
||||
#include <libintl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
--- a/libasm/asm_newscn.c
|
||||
+++ b/libasm/asm_newscn.c
|
||||
@@ -32,7 +32,6 @@
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
-#include <error.h>
|
||||
#include <libintl.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
--- a/libcpu/i386_gendis.c
|
||||
+++ b/libcpu/i386_gendis.c
|
||||
@@ -31,7 +31,6 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
-#include <error.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
--- a/libcpu/i386_lex.c
|
||||
+++ b/libcpu/i386_lex.c
|
||||
@@ -808,7 +808,6 @@ char *yytext;
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
-#include <error.h>
|
||||
#include <libintl.h>
|
||||
|
||||
#include <libeu.h>
|
||||
--- a/libcpu/i386_lex.l
|
||||
+++ b/libcpu/i386_lex.l
|
||||
@@ -31,7 +31,6 @@
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
-#include <error.h>
|
||||
#include <libintl.h>
|
||||
|
||||
#include <libeu.h>
|
||||
--- a/libcpu/i386_parse.c
|
||||
+++ b/libcpu/i386_parse.c
|
||||
@@ -107,7 +107,6 @@
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
-#include <error.h>
|
||||
#include <inttypes.h>
|
||||
#include <libintl.h>
|
||||
#include <math.h>
|
||||
--- a/libdw/libdw_alloc.c
|
||||
+++ b/libdw/libdw_alloc.c
|
||||
@@ -31,7 +31,6 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
-#include <error.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include "libdwP.h"
|
||||
@@ -74,5 +73,5 @@ __attribute ((noreturn)) attribute_hidde
|
||||
@@ -73,5 +73,5 @@ __attribute ((noreturn)) attribute_hidde
|
||||
__libdw_oom (void)
|
||||
{
|
||||
while (1)
|
||||
- error (EXIT_FAILURE, ENOMEM, "libdw");
|
||||
+ error (EXIT_FAILURE, errno, gettext ("cannot allocate memory"));
|
||||
}
|
||||
--- a/libebl/eblopenbackend.c
|
||||
+++ b/libebl/eblopenbackend.c
|
||||
@@ -32,7 +32,6 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <dlfcn.h>
|
||||
-#include <error.h>
|
||||
#include <libelfP.h>
|
||||
#include <dwarf.h>
|
||||
#include <stdlib.h>
|
||||
--- a/libdwfl/dwfl_error.c
|
||||
+++ b/libdwfl/dwfl_error.c
|
||||
@@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user