Merge Official Source
This commit is contained in:
commit
2fabe3d8ac
6
Makefile
6
Makefile
@ -82,12 +82,6 @@ endif
|
||||
|
||||
# check prerequisites before starting to build
|
||||
prereq: $(target/stamp-prereq) tmp/.prereq_packages
|
||||
@if [ ! -f "$(INCLUDE_DIR)/site/$(ARCH)" ]; then \
|
||||
echo 'ERROR: Missing site config for architecture "$(ARCH)" !'; \
|
||||
echo ' The missing file will cause configure scripts to fail during compilation.'; \
|
||||
echo ' Please provide a "$(INCLUDE_DIR)/site/$(ARCH)" file and restart the build.'; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
$(BIN_DIR)/profiles.json: FORCE
|
||||
$(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \
|
||||
|
||||
@ -17,7 +17,7 @@ menu "Target Images"
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_lantiq
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_mpc85xx
|
||||
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips
|
||||
default TARGET_INITRAMFS_COMPRESSION_XZ if USES_SEPERATE_INITRAMFS
|
||||
default TARGET_INITRAMFS_COMPRESSION_XZ if USES_SEPARATE_INITRAMFS
|
||||
default TARGET_INITRAMFS_COMPRESSION_NONE
|
||||
depends on TARGET_ROOTFS_INITRAMFS
|
||||
help
|
||||
@ -36,11 +36,11 @@ menu "Target Images"
|
||||
bool "lzma"
|
||||
|
||||
config TARGET_INITRAMFS_COMPRESSION_LZO
|
||||
depends on !TARGET_ROOTFS_INITRAMFS_SEPERATE
|
||||
depends on !TARGET_ROOTFS_INITRAMFS_SEPARATE
|
||||
bool "lzo"
|
||||
|
||||
config TARGET_INITRAMFS_COMPRESSION_LZ4
|
||||
depends on !TARGET_ROOTFS_INITRAMFS_SEPERATE
|
||||
depends on !TARGET_ROOTFS_INITRAMFS_SEPARATE
|
||||
bool "lz4"
|
||||
|
||||
config TARGET_INITRAMFS_COMPRESSION_XZ
|
||||
@ -65,12 +65,12 @@ menu "Target Images"
|
||||
help
|
||||
Ignore the initramfs passed by the bootloader.
|
||||
|
||||
config TARGET_ROOTFS_INITRAMFS_SEPERATE
|
||||
bool "seperate ramdisk"
|
||||
depends on USES_SEPERATE_INITRAMFS && TARGET_ROOTFS_INITRAMFS && !TARGET_INITRAMFS_FORCE
|
||||
default y if USES_SEPERATE_INITRAMFS
|
||||
config TARGET_ROOTFS_INITRAMFS_SEPARATE
|
||||
bool "separate ramdisk"
|
||||
depends on USES_SEPARATE_INITRAMFS && TARGET_ROOTFS_INITRAMFS && !TARGET_INITRAMFS_FORCE
|
||||
default y if USES_SEPARATE_INITRAMFS
|
||||
help
|
||||
Generate seperate initrd.cpio instead of embedding it.
|
||||
Generate separate initrd.cpio instead of embedding it.
|
||||
This is useful for generating images with a dedicated
|
||||
ramdisk e.g. in U-Boot's uImage and uImage.FIT formats.
|
||||
|
||||
|
||||
@ -210,7 +210,7 @@ define Build/fit
|
||||
$(if $(word 2,$(1)),-d $(word 2,$(1))) -C $(word 1,$(1)) \
|
||||
$(if $(findstring with-rootfs,$(word 3,$(1))),-r $(IMAGE_ROOTFS)) \
|
||||
$(if $(findstring with-initrd,$(word 3,$(1))), \
|
||||
$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPERATE), \
|
||||
$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE), \
|
||||
-i $(KERNEL_BUILD_DIR)/initrd.cpio$(strip $(call Build/initrd_compression)))) \
|
||||
-a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
|
||||
$(if $(DEVICE_FDT_NUM),-n $(DEVICE_FDT_NUM)) \
|
||||
|
||||
@ -301,7 +301,7 @@ endif
|
||||
|
||||
ifdef CONFIG_TARGET_ROOTFS_CPIOGZ
|
||||
define Image/Build/cpiogz
|
||||
( cd $(TARGET_DIR); find . | cpio -o -H newc -R root:root | gzip -9n >$(BIN_DIR)/$(IMG_ROOTFS).cpio.gz )
|
||||
( cd $(TARGET_DIR); find . | $(STAGING_DIR_HOST)/bin/cpio -o -H newc -R root:root | gzip -9n >$(BIN_DIR)/$(IMG_ROOTFS).cpio.gz )
|
||||
endef
|
||||
endif
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ else
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
|
||||
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPERATE),y)
|
||||
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y)
|
||||
define Kernel/SetInitramfs/PreConfigure
|
||||
grep -v -e CONFIG_BLK_DEV_INITRD $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config
|
||||
echo 'CONFIG_BLK_DEV_INITRD=y' >> $(LINUX_DIR)/.config
|
||||
@ -73,7 +73,7 @@ endif
|
||||
rm -f $(LINUX_DIR)/.config.prev
|
||||
mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old
|
||||
$(call Kernel/SetInitramfs/PreConfigure)
|
||||
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPERATE),y)
|
||||
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y)
|
||||
echo 'CONFIG_INITRAMFS_ROOT_UID=$(shell id -u)' >> $(LINUX_DIR)/.config
|
||||
echo 'CONFIG_INITRAMFS_ROOT_GID=$(shell id -g)' >> $(LINUX_DIR)/.config
|
||||
echo "$(if $(CONFIG_TARGET_INITRAMFS_FORCE),CONFIG_INITRAMFS_FORCE=y,# CONFIG_INITRAMFS_FORCE is not set)" >> $(LINUX_DIR)/.config
|
||||
@ -159,11 +159,11 @@ define Kernel/CompileImage/Initramfs
|
||||
$(CP) $(GENERIC_PLATFORM_DIR)/other-files/init $(TARGET_DIR)/init
|
||||
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR)/init)
|
||||
rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio*
|
||||
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPERATE),y)
|
||||
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y)
|
||||
ifeq ($(CONFIG_EXTERNAL_CPIO),y)
|
||||
$(CP) $(CONFIG_EXTERNAL_CPIO) $(KERNEL_BUILD_DIR)/initrd.cpio
|
||||
else
|
||||
( cd $(TARGET_DIR); find . | cpio -o -H newc -R root:root > $(KERNEL_BUILD_DIR)/initrd.cpio )
|
||||
( cd $(TARGET_DIR); find . | $(STAGING_DIR_HOST)/bin/cpio -o -H newc -R root:root > $(KERNEL_BUILD_DIR)/initrd.cpio )
|
||||
endif
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),bzip2 -9 -c < $(KERNEL_BUILD_DIR)/initrd.cpio > $(KERNEL_BUILD_DIR)/initrd.cpio.bzip2)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),gzip -f -S .gzip -9n $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
|
||||
@ -116,7 +116,7 @@ include $(INCLUDE_DIR)/autotools.mk
|
||||
_pkg_target:=$(if $(QUILT),,.)
|
||||
|
||||
override MAKEFLAGS=
|
||||
CONFIG_SITE:=$(INCLUDE_DIR)/site/$(ARCH)
|
||||
CONFIG_SITE:=$(TOOLCHAIN_DIR)/config.site
|
||||
CUR_MAKEFILE:=$(filter-out Makefile,$(firstword $(MAKEFILE_LIST)))
|
||||
SUBMAKE:=$(NO_TRACE_MAKE) $(if $(CUR_MAKEFILE),-f $(CUR_MAKEFILE))
|
||||
PKG_CONFIG_PATH=$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $TOPDIR/include/site/linux
|
||||
ac_cv_c_littleendian=${ac_cv_c_littleendian=yes}
|
||||
ac_cv_c_bigendian=${ac_cv_c_bigendian=no}
|
||||
|
||||
ac_cv_sizeof___int64=8
|
||||
ac_cv_sizeof_char=1
|
||||
ac_cv_sizeof_int=4
|
||||
ac_cv_sizeof_int16_t=2
|
||||
ac_cv_sizeof_int32_t=4
|
||||
ac_cv_sizeof_int64_t=8
|
||||
ac_cv_sizeof_long_int=8
|
||||
ac_cv_sizeof_long_long=8
|
||||
ac_cv_sizeof_long=8
|
||||
ac_cv_sizeof_off_t=8
|
||||
ac_cv_sizeof_short_int=2
|
||||
ac_cv_sizeof_short=2
|
||||
ac_cv_sizeof_size_t=8
|
||||
ac_cv_sizeof_ssize_t=8
|
||||
ac_cv_sizeof_u_int16_t=2
|
||||
ac_cv_sizeof_u_int32_t=4
|
||||
ac_cv_sizeof_u_int64_t=8
|
||||
ac_cv_sizeof_uint16_t=2
|
||||
ac_cv_sizeof_uint32_t=4
|
||||
ac_cv_sizeof_uint64_t=8
|
||||
ac_cv_sizeof_unsigned_int=4
|
||||
ac_cv_sizeof_unsigned_long=8
|
||||
ac_cv_sizeof_unsigned_long_long=8
|
||||
ac_cv_sizeof_unsigned_short=2
|
||||
ac_cv_sizeof_void_p=8
|
||||
@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $TOPDIR/include/site/linux
|
||||
ac_cv_c_littleendian=${ac_cv_c_littleendian=no}
|
||||
ac_cv_c_bigendian=${ac_cv_c_bigendian=yes}
|
||||
|
||||
ac_cv_sizeof___int64=8
|
||||
ac_cv_sizeof_char=1
|
||||
ac_cv_sizeof_int=4
|
||||
ac_cv_sizeof_int16_t=2
|
||||
ac_cv_sizeof_int32_t=4
|
||||
ac_cv_sizeof_int64_t=8
|
||||
ac_cv_sizeof_long_int=8
|
||||
ac_cv_sizeof_long_long=8
|
||||
ac_cv_sizeof_long=8
|
||||
ac_cv_sizeof_off_t=8
|
||||
ac_cv_sizeof_short_int=2
|
||||
ac_cv_sizeof_short=2
|
||||
ac_cv_sizeof_size_t=8
|
||||
ac_cv_sizeof_ssize_t=8
|
||||
ac_cv_sizeof_u_int16_t=2
|
||||
ac_cv_sizeof_u_int32_t=4
|
||||
ac_cv_sizeof_u_int64_t=8
|
||||
ac_cv_sizeof_uint16_t=2
|
||||
ac_cv_sizeof_uint32_t=4
|
||||
ac_cv_sizeof_uint64_t=8
|
||||
ac_cv_sizeof_unsigned_int=4
|
||||
ac_cv_sizeof_unsigned_long=8
|
||||
ac_cv_sizeof_unsigned_long_long=8
|
||||
ac_cv_sizeof_unsigned_short=2
|
||||
ac_cv_sizeof_void_p=8
|
||||
@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $TOPDIR/include/site/linux
|
||||
ac_cv_c_littleendian=${ac_cv_c_littleendian=yes}
|
||||
ac_cv_c_bigendian=${ac_cv_c_bigendian=no}
|
||||
|
||||
ac_cv_sizeof___int64=0
|
||||
ac_cv_sizeof_char=1
|
||||
ac_cv_sizeof_int=4
|
||||
ac_cv_sizeof_int16_t=2
|
||||
ac_cv_sizeof_int32_t=4
|
||||
ac_cv_sizeof_int64_t=8
|
||||
ac_cv_sizeof_long_int=4
|
||||
ac_cv_sizeof_long_long=8
|
||||
ac_cv_sizeof_long=4
|
||||
ac_cv_sizeof_off_t=8
|
||||
ac_cv_sizeof_short_int=2
|
||||
ac_cv_sizeof_short=2
|
||||
ac_cv_sizeof_size_t=4
|
||||
ac_cv_sizeof_ssize_t=4
|
||||
ac_cv_sizeof_u_int16_t=2
|
||||
ac_cv_sizeof_u_int32_t=4
|
||||
ac_cv_sizeof_u_int64_t=8
|
||||
ac_cv_sizeof_uint16_t=2
|
||||
ac_cv_sizeof_uint32_t=4
|
||||
ac_cv_sizeof_uint64_t=8
|
||||
ac_cv_sizeof_unsigned_int=4
|
||||
ac_cv_sizeof_unsigned_long=4
|
||||
ac_cv_sizeof_unsigned_long_long=8
|
||||
ac_cv_sizeof_unsigned_short=2
|
||||
ac_cv_sizeof_void_p=4
|
||||
@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $TOPDIR/include/site/linux
|
||||
ac_cv_c_littleendian=${ac_cv_c_littleendian=yes}
|
||||
ac_cv_c_bigendian=${ac_cv_c_bigendian=no}
|
||||
|
||||
ac_cv_sizeof___int64=0
|
||||
ac_cv_sizeof_char=1
|
||||
ac_cv_sizeof_int=4
|
||||
ac_cv_sizeof_int16_t=2
|
||||
ac_cv_sizeof_int32_t=4
|
||||
ac_cv_sizeof_int64_t=8
|
||||
ac_cv_sizeof_long_int=4
|
||||
ac_cv_sizeof_long_long=8
|
||||
ac_cv_sizeof_long=4
|
||||
ac_cv_sizeof_off_t=8
|
||||
ac_cv_sizeof_short_int=2
|
||||
ac_cv_sizeof_short=2
|
||||
ac_cv_sizeof_size_t=4
|
||||
ac_cv_sizeof_ssize_t=4
|
||||
ac_cv_sizeof_u_int16_t=2
|
||||
ac_cv_sizeof_u_int32_t=4
|
||||
ac_cv_sizeof_u_int64_t=8
|
||||
ac_cv_sizeof_uint16_t=2
|
||||
ac_cv_sizeof_uint32_t=4
|
||||
ac_cv_sizeof_uint64_t=8
|
||||
ac_cv_sizeof_unsigned_int=4
|
||||
ac_cv_sizeof_unsigned_long=4
|
||||
ac_cv_sizeof_unsigned_long_long=8
|
||||
ac_cv_sizeof_unsigned_short=2
|
||||
ac_cv_sizeof_void_p=4
|
||||
@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $TOPDIR/include/site/linux
|
||||
ac_cv_c_littleendian=${ac_cv_c_littleendian=no}
|
||||
ac_cv_c_bigendian=${ac_cv_c_bigendian=yes}
|
||||
|
||||
ac_cv_sizeof___int64=0
|
||||
ac_cv_sizeof_char=1
|
||||
ac_cv_sizeof_int=4
|
||||
ac_cv_sizeof_int16_t=2
|
||||
ac_cv_sizeof_int32_t=4
|
||||
ac_cv_sizeof_int64_t=8
|
||||
ac_cv_sizeof_long_int=4
|
||||
ac_cv_sizeof_long_long=8
|
||||
ac_cv_sizeof_long=4
|
||||
ac_cv_sizeof_off_t=8
|
||||
ac_cv_sizeof_short_int=2
|
||||
ac_cv_sizeof_short=2
|
||||
ac_cv_sizeof_size_t=4
|
||||
ac_cv_sizeof_ssize_t=4
|
||||
ac_cv_sizeof_u_int16_t=2
|
||||
ac_cv_sizeof_u_int32_t=4
|
||||
ac_cv_sizeof_u_int64_t=8
|
||||
ac_cv_sizeof_uint16_t=2
|
||||
ac_cv_sizeof_uint32_t=4
|
||||
ac_cv_sizeof_uint64_t=8
|
||||
ac_cv_sizeof_unsigned_int=4
|
||||
ac_cv_sizeof_unsigned_long=4
|
||||
ac_cv_sizeof_unsigned_long_long=8
|
||||
ac_cv_sizeof_unsigned_short=2
|
||||
ac_cv_sizeof_void_p=4
|
||||
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $TOPDIR/include/site/i486
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $TOPDIR/include/site/linux
|
||||
ac_cv_c_littleendian=${ac_cv_c_littleendian=yes}
|
||||
ac_cv_c_bigendian=${ac_cv_c_bigendian=no}
|
||||
|
||||
ac_cv_sizeof___int64=0
|
||||
ac_cv_sizeof_char=1
|
||||
ac_cv_sizeof_int=4
|
||||
ac_cv_sizeof_int16_t=2
|
||||
ac_cv_sizeof_int32_t=4
|
||||
ac_cv_sizeof_int64_t=8
|
||||
ac_cv_sizeof_long_int=4
|
||||
ac_cv_sizeof_long_long=8
|
||||
ac_cv_sizeof_long=4
|
||||
ac_cv_sizeof_off_t=8
|
||||
ac_cv_sizeof_short_int=2
|
||||
ac_cv_sizeof_short=2
|
||||
ac_cv_sizeof_size_t=4
|
||||
ac_cv_sizeof_ssize_t=4
|
||||
ac_cv_sizeof_u_int16_t=2
|
||||
ac_cv_sizeof_u_int32_t=4
|
||||
ac_cv_sizeof_u_int64_t=8
|
||||
ac_cv_sizeof_uint16_t=2
|
||||
ac_cv_sizeof_uint32_t=4
|
||||
ac_cv_sizeof_uint64_t=8
|
||||
ac_cv_sizeof_unsigned_int=4
|
||||
ac_cv_sizeof_unsigned_long=4
|
||||
ac_cv_sizeof_unsigned_long_long=8
|
||||
ac_cv_sizeof_unsigned_short=2
|
||||
ac_cv_sizeof_void_p=4
|
||||
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $TOPDIR/include/site/i486
|
||||
|
||||
@ -1,78 +0,0 @@
|
||||
ac_atomic_add=yes
|
||||
ac_atomic_sub=yes
|
||||
ac_cv_c_gettext_without_libintl=yes
|
||||
ac_cv_c_long_double=no
|
||||
ac_cv_conv_longlong_to_float=yes
|
||||
ac_cv_file__dev_zero=yes
|
||||
ac_cv_func___va_copy=no
|
||||
ac_cv_func__exit=yes
|
||||
ac_cv_func_bcopy=yes
|
||||
ac_cv_func_bzero=yes
|
||||
ac_cv_func_bcmp=yes
|
||||
ac_cv_func_creal=yes
|
||||
ac_cv_func_cimag=yes
|
||||
ac_cv_func_fchmod=yes
|
||||
ac_cv_func_getaddrinfo=yes
|
||||
ac_cv_func_getcwd=yes
|
||||
ac_cv_func_getdomainname=yes
|
||||
ac_cv_func_getpgrp_void=yes
|
||||
ac_cv_func_getpwuid_r=yes
|
||||
ac_cv_func_gettimeofday=yes
|
||||
ac_cv_func_index=yes
|
||||
ac_cv_func_lstat_dereferences_slashed_symlink=yes
|
||||
ac_cv_func_lstat_empty_string_bug=no
|
||||
ac_cv_func_lstat=yes
|
||||
ac_cv_func_malloc_0_nonnull=yes
|
||||
ac_cv_func_malloc_works=yes
|
||||
ac_cv_func_memcmp_clean=yes
|
||||
ac_cv_func_memcmp_working=yes
|
||||
ac_cv_func_posix_getgrgid_r=yes
|
||||
ac_cv_func_posix_getpwuid_r=yes
|
||||
ac_cv_func_psignal=yes
|
||||
ac_cv_func_pthread_key_delete=yes
|
||||
ac_cv_func_realloc_0_nonnull=yes
|
||||
ac_cv_func_realloc_works=yes
|
||||
ac_cv_func_rename=yes
|
||||
ac_cv_func_rindex=yes
|
||||
ac_cv_func_setlocale=yes
|
||||
ac_cv_func_setgrent_void=yes
|
||||
ac_cv_func_setpgrp_void=yes
|
||||
ac_cv_func_setresuid=no
|
||||
ac_cv_func_setvbuf_reversed=no
|
||||
ac_cv_func_stat_empty_string_bug=no
|
||||
ac_cv_func_stat_ignores_trailing_slash=no
|
||||
ac_cv_func_strerror=yes
|
||||
ac_cv_func_strftime=yes
|
||||
ac_cv_func_utimes=yes
|
||||
ac_cv_func___adjtimex=yes
|
||||
ac_cv_func_va_copy=no
|
||||
ac_cv_func_vsnprintf=yes
|
||||
ac_cv_have_accrights_in_msghdr=no
|
||||
ac_cv_have_broken_snprintf=no
|
||||
ac_cv_have_control_in_msghdr=yes
|
||||
ac_cv_have_decl_sys_siglist=no
|
||||
ac_cv_have_openpty_ctty_bug=yes
|
||||
ac_cv_have_space_d_name_in_struct_dirent=yes
|
||||
ac_cv_header_netinet_sctp_h=no
|
||||
ac_cv_header_netinet_sctp_uio_h=no
|
||||
ac_cv_int64_t=yes
|
||||
ac_cv_lbl_unaligned_fail=no
|
||||
ac_cv_linux_kernel_pppoe=yes
|
||||
ac_cv_linux_vers=2
|
||||
ac_cv_pack_bitfields_reversed=yes
|
||||
ac_cv_path_LDCONFIG=
|
||||
ac_cv_regexec_segfault_emptystr=no
|
||||
ac_cv_sctp=no
|
||||
ac_cv_sys_restartable_syscalls=yes
|
||||
ac_cv_time_r_type=POSIX
|
||||
ac_cv_type_suseconds_t=yes
|
||||
ac_cv_uchar=no
|
||||
ac_cv_uint=yes
|
||||
ac_cv_uint64_t=yes
|
||||
ac_cv_ulong=yes
|
||||
ac_cv_ushort=yes
|
||||
ac_cv_va_copy=C99
|
||||
ac_cv_va_val_copy=yes
|
||||
as_cv_unaligned_access=yes
|
||||
ac_cv_func_malloc_0_nonnull=yes
|
||||
ac_cv_func_realloc_0_nonnull=yes
|
||||
@ -1,28 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $TOPDIR/include/site/linux
|
||||
ac_cv_c_littleendian=${ac_cv_c_littleendian=no}
|
||||
ac_cv_c_bigendian=${ac_cv_c_bigendian=yes}
|
||||
|
||||
ac_cv_sizeof___int64=0
|
||||
ac_cv_sizeof_char=1
|
||||
ac_cv_sizeof_int=4
|
||||
ac_cv_sizeof_int16_t=2
|
||||
ac_cv_sizeof_int32_t=4
|
||||
ac_cv_sizeof_int64_t=8
|
||||
ac_cv_sizeof_long_int=4
|
||||
ac_cv_sizeof_long_long=8
|
||||
ac_cv_sizeof_long=4
|
||||
ac_cv_sizeof_off_t=8
|
||||
ac_cv_sizeof_short_int=2
|
||||
ac_cv_sizeof_short=2
|
||||
ac_cv_sizeof_size_t=4
|
||||
ac_cv_sizeof_u_int16_t=2
|
||||
ac_cv_sizeof_u_int32_t=4
|
||||
ac_cv_sizeof_u_int64_t=8
|
||||
ac_cv_sizeof_uint16_t=2
|
||||
ac_cv_sizeof_uint32_t=4
|
||||
ac_cv_sizeof_uint64_t=8
|
||||
ac_cv_sizeof_unsigned_int=4
|
||||
ac_cv_sizeof_unsigned_long=4
|
||||
ac_cv_sizeof_unsigned_short=2
|
||||
ac_cv_sizeof_void_p=4
|
||||
@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $TOPDIR/include/site/linux
|
||||
ac_cv_c_littleendian=${ac_cv_c_littleendian=no}
|
||||
ac_cv_c_bigendian=${ac_cv_c_bigendian=yes}
|
||||
|
||||
ac_cv_sizeof___int64=0
|
||||
ac_cv_sizeof_char=1
|
||||
ac_cv_sizeof_int=4
|
||||
ac_cv_sizeof_int16_t=2
|
||||
ac_cv_sizeof_int32_t=4
|
||||
ac_cv_sizeof_int64_t=8
|
||||
ac_cv_sizeof_long_int=4
|
||||
ac_cv_sizeof_long_long=8
|
||||
ac_cv_sizeof_long=4
|
||||
ac_cv_sizeof_off_t=8
|
||||
ac_cv_sizeof_short_int=2
|
||||
ac_cv_sizeof_short=2
|
||||
ac_cv_sizeof_size_t=4
|
||||
ac_cv_sizeof_ssize_t=4
|
||||
ac_cv_sizeof_u_int16_t=2
|
||||
ac_cv_sizeof_u_int32_t=4
|
||||
ac_cv_sizeof_u_int64_t=8
|
||||
ac_cv_sizeof_uint16_t=2
|
||||
ac_cv_sizeof_uint32_t=4
|
||||
ac_cv_sizeof_uint64_t=8
|
||||
ac_cv_sizeof_unsigned_int=4
|
||||
ac_cv_sizeof_unsigned_long=4
|
||||
ac_cv_sizeof_unsigned_long_long=8
|
||||
ac_cv_sizeof_unsigned_short=2
|
||||
ac_cv_sizeof_void_p=4
|
||||
@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $TOPDIR/include/site/linux
|
||||
ac_cv_c_littleendian=${ac_cv_c_littleendian=no}
|
||||
ac_cv_c_bigendian=${ac_cv_c_bigendian=yes}
|
||||
|
||||
ac_cv_sizeof___int64=8
|
||||
ac_cv_sizeof_char=1
|
||||
ac_cv_sizeof_int=4
|
||||
ac_cv_sizeof_int16_t=2
|
||||
ac_cv_sizeof_int32_t=4
|
||||
ac_cv_sizeof_int64_t=8
|
||||
ac_cv_sizeof_long_int=8
|
||||
ac_cv_sizeof_long_long=8
|
||||
ac_cv_sizeof_long=8
|
||||
ac_cv_sizeof_off_t=8
|
||||
ac_cv_sizeof_short_int=2
|
||||
ac_cv_sizeof_short=2
|
||||
ac_cv_sizeof_size_t=8
|
||||
ac_cv_sizeof_ssize_t=8
|
||||
ac_cv_sizeof_u_int16_t=2
|
||||
ac_cv_sizeof_u_int32_t=4
|
||||
ac_cv_sizeof_u_int64_t=8
|
||||
ac_cv_sizeof_uint16_t=2
|
||||
ac_cv_sizeof_uint32_t=4
|
||||
ac_cv_sizeof_uint64_t=8
|
||||
ac_cv_sizeof_unsigned_int=4
|
||||
ac_cv_sizeof_unsigned_long=8
|
||||
ac_cv_sizeof_unsigned_long_long=8
|
||||
ac_cv_sizeof_unsigned_short=2
|
||||
ac_cv_sizeof_void_p=8
|
||||
@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $TOPDIR/include/site/linux
|
||||
ac_cv_c_littleendian=${ac_cv_c_littleendian=yes}
|
||||
ac_cv_c_bigendian=${ac_cv_c_bigendian=no}
|
||||
|
||||
ac_cv_sizeof___int64=8
|
||||
ac_cv_sizeof_char=1
|
||||
ac_cv_sizeof_int=4
|
||||
ac_cv_sizeof_int16_t=2
|
||||
ac_cv_sizeof_int32_t=4
|
||||
ac_cv_sizeof_int64_t=8
|
||||
ac_cv_sizeof_long_int=8
|
||||
ac_cv_sizeof_long_long=8
|
||||
ac_cv_sizeof_long=8
|
||||
ac_cv_sizeof_off_t=8
|
||||
ac_cv_sizeof_short_int=2
|
||||
ac_cv_sizeof_short=2
|
||||
ac_cv_sizeof_size_t=8
|
||||
ac_cv_sizeof_ssize_t=8
|
||||
ac_cv_sizeof_u_int16_t=2
|
||||
ac_cv_sizeof_u_int32_t=4
|
||||
ac_cv_sizeof_u_int64_t=8
|
||||
ac_cv_sizeof_uint16_t=2
|
||||
ac_cv_sizeof_uint32_t=4
|
||||
ac_cv_sizeof_uint64_t=8
|
||||
ac_cv_sizeof_unsigned_int=4
|
||||
ac_cv_sizeof_unsigned_long=8
|
||||
ac_cv_sizeof_unsigned_long_long=8
|
||||
ac_cv_sizeof_unsigned_short=2
|
||||
ac_cv_sizeof_void_p=8
|
||||
@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $TOPDIR/include/site/linux
|
||||
ac_cv_c_littleendian=${ac_cv_c_littleendian=yes}
|
||||
ac_cv_c_bigendian=${ac_cv_c_bigendian=no}
|
||||
|
||||
ac_cv_sizeof___int64=0
|
||||
ac_cv_sizeof_char=1
|
||||
ac_cv_sizeof_int=4
|
||||
ac_cv_sizeof_int16_t=2
|
||||
ac_cv_sizeof_int32_t=4
|
||||
ac_cv_sizeof_int64_t=8
|
||||
ac_cv_sizeof_long_int=4
|
||||
ac_cv_sizeof_long_long=8
|
||||
ac_cv_sizeof_long=4
|
||||
ac_cv_sizeof_off_t=8
|
||||
ac_cv_sizeof_short_int=2
|
||||
ac_cv_sizeof_short=2
|
||||
ac_cv_sizeof_size_t=4
|
||||
ac_cv_sizeof_ssize_t=4
|
||||
ac_cv_sizeof_u_int16_t=2
|
||||
ac_cv_sizeof_u_int32_t=4
|
||||
ac_cv_sizeof_u_int64_t=8
|
||||
ac_cv_sizeof_uint16_t=2
|
||||
ac_cv_sizeof_uint32_t=4
|
||||
ac_cv_sizeof_uint64_t=8
|
||||
ac_cv_sizeof_unsigned_int=4
|
||||
ac_cv_sizeof_unsigned_long=4
|
||||
ac_cv_sizeof_unsigned_long_long=8
|
||||
ac_cv_sizeof_unsigned_short=2
|
||||
ac_cv_sizeof_void_p=4
|
||||
@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $TOPDIR/include/site/linux
|
||||
ac_cv_c_littleendian=${ac_cv_c_littleendian=no}
|
||||
ac_cv_c_bigendian=${ac_cv_c_bigendian=yes}
|
||||
|
||||
ac_cv_sizeof___int64=0
|
||||
ac_cv_sizeof_char=1
|
||||
ac_cv_sizeof_int=4
|
||||
ac_cv_sizeof_int16_t=2
|
||||
ac_cv_sizeof_int32_t=4
|
||||
ac_cv_sizeof_int64_t=8
|
||||
ac_cv_sizeof_long_int=4
|
||||
ac_cv_sizeof_long_long=8
|
||||
ac_cv_sizeof_long=4
|
||||
ac_cv_sizeof_off_t=8
|
||||
ac_cv_sizeof_short_int=2
|
||||
ac_cv_sizeof_short=2
|
||||
ac_cv_sizeof_size_t=4
|
||||
ac_cv_sizeof_ssize_t=4
|
||||
ac_cv_sizeof_u_int16_t=2
|
||||
ac_cv_sizeof_u_int32_t=4
|
||||
ac_cv_sizeof_u_int64_t=8
|
||||
ac_cv_sizeof_uint16_t=2
|
||||
ac_cv_sizeof_uint32_t=4
|
||||
ac_cv_sizeof_uint64_t=8
|
||||
ac_cv_sizeof_unsigned_int=4
|
||||
ac_cv_sizeof_unsigned_long=4
|
||||
ac_cv_sizeof_unsigned_long_long=8
|
||||
ac_cv_sizeof_unsigned_short=2
|
||||
ac_cv_sizeof_void_p=4
|
||||
@ -1,26 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $TOPDIR/include/site/linux
|
||||
ac_cv_c_littleendian=${ac_cv_c_littleendian=no}
|
||||
ac_cv_c_bigendian=${ac_cv_c_bigendian=yes}
|
||||
|
||||
ac_cv_sizeof_char=1
|
||||
ac_cv_sizeof_char_p=8
|
||||
ac_cv_sizeof_double=8
|
||||
ac_cv_sizeof_float=4
|
||||
ac_cv_sizeof_int=4
|
||||
ac_cv_sizeof_long=8
|
||||
ac_cv_sizeof_long_double=16
|
||||
ac_cv_sizeof_long_int=8
|
||||
ac_cv_sizeof_long_long=8
|
||||
ac_cv_sizeof_long_long_int=8
|
||||
ac_cv_sizeof_short=2
|
||||
ac_cv_sizeof_short_int=2
|
||||
ac_cv_sizeof_signed_char=1
|
||||
ac_cv_sizeof_unsigned_char=1
|
||||
ac_cv_sizeof_unsigned_int=4
|
||||
ac_cv_sizeof_unsigned_long=8
|
||||
ac_cv_sizeof_unsigned_long_int=8
|
||||
ac_cv_sizeof_unsigned_long_long_int=8
|
||||
ac_cv_sizeof_unsigned_short=2
|
||||
ac_cv_sizeof_unsigned_short_int=2
|
||||
ac_cv_sizeof_void_p=8
|
||||
@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $TOPDIR/include/site/linux
|
||||
ac_cv_c_littleendian=${ac_cv_c_littleendian=no}
|
||||
ac_cv_c_bigendian=${ac_cv_c_bigendian=yes}
|
||||
|
||||
ac_cv_sizeof___int64=0
|
||||
ac_cv_sizeof_char=1
|
||||
ac_cv_sizeof_int=4
|
||||
ac_cv_sizeof_int16_t=2
|
||||
ac_cv_sizeof_int32_t=4
|
||||
ac_cv_sizeof_int64_t=8
|
||||
ac_cv_sizeof_long_int=4
|
||||
ac_cv_sizeof_long_long=8
|
||||
ac_cv_sizeof_long=4
|
||||
ac_cv_sizeof_off_t=8
|
||||
ac_cv_sizeof_short_int=2
|
||||
ac_cv_sizeof_short=2
|
||||
ac_cv_sizeof_size_t=4
|
||||
ac_cv_sizeof_ssize_t=4
|
||||
ac_cv_sizeof_u_int16_t=2
|
||||
ac_cv_sizeof_u_int32_t=4
|
||||
ac_cv_sizeof_u_int64_t=8
|
||||
ac_cv_sizeof_uint16_t=2
|
||||
ac_cv_sizeof_uint32_t=4
|
||||
ac_cv_sizeof_uint64_t=8
|
||||
ac_cv_sizeof_unsigned_int=4
|
||||
ac_cv_sizeof_unsigned_long=4
|
||||
ac_cv_sizeof_unsigned_long_long=8
|
||||
ac_cv_sizeof_unsigned_short=2
|
||||
ac_cv_sizeof_void_p=4
|
||||
@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $TOPDIR/include/site/linux
|
||||
ac_cv_c_littleendian=${ac_cv_c_littleendian=yes}
|
||||
ac_cv_c_bigendian=${ac_cv_c_bigendian=no}
|
||||
|
||||
ac_cv_sizeof___int64=0
|
||||
ac_cv_sizeof_char=1
|
||||
ac_cv_sizeof_int=4
|
||||
ac_cv_sizeof_int16_t=2
|
||||
ac_cv_sizeof_int32_t=4
|
||||
ac_cv_sizeof_int64_t=8
|
||||
ac_cv_sizeof_long_int=8
|
||||
ac_cv_sizeof_long_long=8
|
||||
ac_cv_sizeof_long=8
|
||||
ac_cv_sizeof_off_t=8
|
||||
ac_cv_sizeof_short_int=2
|
||||
ac_cv_sizeof_short=2
|
||||
ac_cv_sizeof_size_t=8
|
||||
ac_cv_sizeof_ssize_t=8
|
||||
ac_cv_sizeof_u_int16_t=2
|
||||
ac_cv_sizeof_u_int32_t=4
|
||||
ac_cv_sizeof_u_int64_t=8
|
||||
ac_cv_sizeof_uint16_t=2
|
||||
ac_cv_sizeof_uint32_t=4
|
||||
ac_cv_sizeof_uint64_t=8
|
||||
ac_cv_sizeof_unsigned_int=4
|
||||
ac_cv_sizeof_unsigned_long=8
|
||||
ac_cv_sizeof_unsigned_long_long=8
|
||||
ac_cv_sizeof_unsigned_short=2
|
||||
ac_cv_sizeof_void_p=8
|
||||
@ -40,7 +40,7 @@ ifeq ($(strip $(UNPACK_CMD)),)
|
||||
UNPACK_CMD=$(DECOMPRESS_CMD) $(TAR_CMD)
|
||||
endif
|
||||
ifeq ($(EXT),cpio)
|
||||
UNPACK_CMD=$(DECOMPRESS_CMD) (cd $(1)/..; cpio -i -d)
|
||||
UNPACK_CMD=$(DECOMPRESS_CMD) (cd $(1)/..; $(STAGING_DIR_HOST)/bin/cpio -i -d)
|
||||
endif
|
||||
ifeq ($(EXT),zip)
|
||||
UNPACK_CMD=$(UNZIP_CMD)
|
||||
|
||||
@ -17,11 +17,12 @@ missing_lines() {
|
||||
do_mount_root() {
|
||||
mount_root
|
||||
boot_run_hook preinit_mount_root
|
||||
[ -f /sysupgrade.tgz ] && {
|
||||
[ -f /sysupgrade.tgz -o -f /tmp/sysupgrade.tar ] && {
|
||||
echo "- config restore -"
|
||||
cp /etc/passwd /etc/group /etc/shadow /tmp
|
||||
cd /
|
||||
tar xzf /sysupgrade.tgz
|
||||
[ -f /sysupgrade.tgz ] && tar xzf /sysupgrade.tgz
|
||||
[ -f /tmp/sysupgrade.tar ] && tar xf /tmp/sysupgrade.tar
|
||||
missing_lines /tmp/passwd /etc/passwd >> /etc/passwd
|
||||
missing_lines /tmp/group /etc/group >> /etc/group
|
||||
missing_lines /tmp/shadow /etc/shadow >> /etc/shadow
|
||||
|
||||
@ -119,7 +119,7 @@ menuconfig INITOPT
|
||||
prompt "Environment variables to set when starting init (start with none)" if INITOPT
|
||||
default ""
|
||||
help
|
||||
Should be a space seperated list of variable assignments. These
|
||||
Should be a space separated list of variable assignments. These
|
||||
variables will be present in the environment. Spaces may not be
|
||||
present (including through expansion) even in a quoted string
|
||||
(env doesn't understanding quoting).
|
||||
|
||||
@ -0,0 +1,24 @@
|
||||
--- a/plat/mediatek/common/drivers/nandx/core/nand/device_spi.c
|
||||
+++ b/plat/mediatek/common/drivers/nandx/core/nand/device_spi.c
|
||||
@@ -150,6 +150,21 @@ static struct device_spi spi_nand[] = {
|
||||
&spi_extend_cmds, 0xff, 0xff
|
||||
},
|
||||
{
|
||||
+ NAND_DEVICE("FM35X1GA",
|
||||
+ NAND_PACK_ID(0xe5, 0x71, 0, 0, 0, 0, 0, 0),
|
||||
+ 2, 0, 3, 3,
|
||||
+ 1, 1, 1, 1024, KB(128), KB(2), 64, 1,
|
||||
+ &spi_cmds, &spi_addressing, &spi_status[0],
|
||||
+ &spi_endurance, &spi_array_timing),
|
||||
+ {
|
||||
+ NAND_SPI_PROTECT(0xa0, 1, 2, 6),
|
||||
+ NAND_SPI_CONFIG(0xb0, 4, 6, 1),
|
||||
+ NAND_SPI_STATUS(0xc0, 4, 5),
|
||||
+ NAND_SPI_CHARACTER(0xff, 0xff, 0xff, 0xff)
|
||||
+ },
|
||||
+ &spi_extend_cmds, 0xff, 0xff
|
||||
+ },
|
||||
+ {
|
||||
NAND_DEVICE("NO-DEVICE",
|
||||
NAND_PACK_ID(0, 0, 0, 0, 0, 0, 0, 0), 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 1,
|
||||
@ -51,23 +51,10 @@ define Package/mt7623n-preloader/description
|
||||
Preloader image for mt7623n based boards like Banana Pi R2.
|
||||
endef
|
||||
|
||||
define Package/mt7622-preloader
|
||||
SECTION:=boot
|
||||
CATEGORY:=Boot Loaders
|
||||
DEPENDS:=@TARGET_mediatek_mt7622
|
||||
TITLE:=mt7622-preloader
|
||||
DEFAULT:=y if TARGET_mediatek
|
||||
endef
|
||||
|
||||
define Package/mt7622-preloader/description
|
||||
Preloader image for mt7622 based boards like Banana Pi R64.
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
rm -rf $(PKG_BUILD_DIR)
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
cp $(DL_DIR)/$(BPI_PRELOADER_PREFIX)-BPI-R2-preloader-DDR1600-20191024-2k.img.gz $(PKG_BUILD_DIR)/mt7623n_bpir2-preloader.bin.gz
|
||||
cp $(DL_DIR)/$(BPI_PRELOADER_PREFIX)-BPI-R64-preloader-2k.img.gz $(PKG_BUILD_DIR)/mt7622_bpir64-preloader.bin.gz
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
@ -80,4 +67,3 @@ define Build/InstallDev
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,mt7623n-preloader))
|
||||
$(eval $(call BuildPackage,mt7622-preloader))
|
||||
|
||||
32
package/boot/uboot-envtools/files/mediatek
Normal file
32
package/boot/uboot-envtools/files/mediatek
Normal file
@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2021 OpenWrt.org
|
||||
#
|
||||
|
||||
[ -e /etc/config/ubootenv ] && exit 0
|
||||
|
||||
touch /etc/config/ubootenv
|
||||
|
||||
. /lib/uboot-envtools.sh
|
||||
. /lib/functions.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
"linksys,e8450-ubi")
|
||||
ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000" "0x1f000" "1"
|
||||
ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" "1"
|
||||
;;
|
||||
"bananapi,bpi-r64")
|
||||
. /lib/upgrade/platform.sh
|
||||
local rootdev=$(get_rootdev)
|
||||
local envdev=/dev/$(get_partition $rootdev ubootenv)
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x80000" "0x80000" "1"
|
||||
ubootenv_add_uci_config "$envdev" "0x80000" "0x80000" "0x80000" "1"
|
||||
;;
|
||||
esac
|
||||
|
||||
config_load ubootenv
|
||||
config_foreach ubootenv_add_app_config ubootenv
|
||||
|
||||
exit 0
|
||||
@ -5,10 +5,10 @@
|
||||
override HOSTCC = $(CC)
|
||||
|
||||
+ifneq ($(TARGET_CFLAGS),)
|
||||
+HOSTCFLAGS = $(TARGET_CFLAGS)
|
||||
+KBUILD_HOSTCFLAGS = $(TARGET_CFLAGS)
|
||||
+endif
|
||||
+ifneq ($(TARGET_LDFLAGS),)
|
||||
+HOSTLDFLAGS = $(TARGET_LDFLAGS)
|
||||
+KBUILD_HOSTLDFLAGS = $(TARGET_LDFLAGS)
|
||||
+endif
|
||||
+
|
||||
# Compile for a hosted environment on the target
|
||||
|
||||
@ -3,6 +3,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_VERSION:=2020.10
|
||||
PKG_HASH:=0d481bbdc05c0ee74908ec2f56a6daa53166cc6a78a0e4fac2ac5d025770a622
|
||||
PKG_BUILD_DEPENDS:=arm-trusted-firmware-tools/host
|
||||
|
||||
include $(INCLUDE_DIR)/u-boot.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
@ -14,12 +15,42 @@ define U-Boot/Default
|
||||
DEFAULT:=y
|
||||
endef
|
||||
|
||||
define U-Boot/mt7622
|
||||
NAME:=MT7622
|
||||
define U-Boot/mt7622_rfb1
|
||||
NAME:=MT7622 Reference Board 1
|
||||
BUILD_SUBTARGET:=mt7622
|
||||
UBOOT_CONFIG:=mt7622_rfb
|
||||
endef
|
||||
|
||||
define U-Boot/mt7622_linksys_e8450
|
||||
NAME:=Linksys E8450
|
||||
BUILD_SUBTARGET:=mt7622
|
||||
UBOOT_CONFIG:=mt7622_linksys_e8450
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=snand
|
||||
BL2_DDRBLOB:=1
|
||||
DEPENDS:=+trusted-firmware-a-mt7622-snand-1ddr
|
||||
endef
|
||||
|
||||
define U-Boot/mt7622_bananapi_bpi-r64-emmc
|
||||
NAME:=BananaPi R64 (eMMC)
|
||||
BUILD_SUBTARGET:=mt7622
|
||||
UBOOT_CONFIG:=mt7622_bananapi_bpi-r64-emmc
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=emmc
|
||||
BL2_DDRBLOB:=2
|
||||
DEPENDS:=+trusted-firmware-a-mt7622-emmc-2ddr
|
||||
endef
|
||||
|
||||
define U-Boot/mt7622_bananapi_bpi-r64-sdmmc
|
||||
NAME:=BananaPi R64 (SDMMC)
|
||||
BUILD_SUBTARGET:=mt7622
|
||||
UBOOT_CONFIG:=mt7622_bananapi_bpi-r64-sdmmc
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=sdmmc
|
||||
BL2_DDRBLOB:=2
|
||||
DEPENDS:=+trusted-firmware-a-mt7622-sdmmc-2ddr
|
||||
endef
|
||||
|
||||
define U-Boot/mt7623a_unielec_u7623
|
||||
NAME:=UniElec U7623 (mt7623)
|
||||
BUILD_SUBTARGET:=mt7623
|
||||
@ -39,15 +70,40 @@ define U-Boot/mt7629
|
||||
UBOOT_CONFIG:=mt7629_rfb
|
||||
endef
|
||||
|
||||
UBOOT_TARGETS := mt7629 mt7622 mt7623n_bpir2 mt7623a_unielec_u7623
|
||||
UBOOT_TARGETS := \
|
||||
mt7629 \
|
||||
mt7622_bananapi_bpi-r64-emmc \
|
||||
mt7622_bananapi_bpi-r64-sdmmc \
|
||||
mt7622_linksys_e8450 \
|
||||
mt7622_rfb1 \
|
||||
mt7623n_bpir2 \
|
||||
mt7623a_unielec_u7623
|
||||
|
||||
UBOOT_MAKE_FLAGS += $(UBOOT_IMAGE)
|
||||
UBOOT_MAKE_FLAGS += $(UBOOT_IMAGE:.fip=.bin)
|
||||
|
||||
Build/Exports:=$(Host/Exports)
|
||||
|
||||
define Build/fip-image
|
||||
$(STAGING_DIR_HOST)/bin/fiptool create \
|
||||
--soc-fw $(STAGING_DIR_IMAGE)/$(BUILD_SUBTARGET)-$(BL2_BOOTDEV)-$(BL2_DDRBLOB)ddr-bl31.bin \
|
||||
--nt-fw $(PKG_BUILD_DIR)/u-boot.bin \
|
||||
$(PKG_BUILD_DIR)/u-boot.fip
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(call Build/Compile/U-Boot)
|
||||
ifeq ($(UBOOT_IMAGE),u-boot.fip))
|
||||
$(call Build/fip-image)
|
||||
endif
|
||||
endef
|
||||
|
||||
# don't stage files to bindir, let target/linux/mediatek/image/*.mk do that
|
||||
define Package/u-boot/install
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-$(UBOOT_IMAGE)
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-$(UBOOT_IMAGE)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage/U-Boot))
|
||||
|
||||
@ -85,11 +85,9 @@ Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
|
||||
create mode 100644 drivers/mtd/nandx/include/internal/nandx_util.h
|
||||
create mode 100644 drivers/mtd/nandx/include/uboot/nandx_os.h
|
||||
|
||||
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
|
||||
index 5e7571cf3d..34a59b44b9 100644
|
||||
--- a/drivers/mtd/Kconfig
|
||||
+++ b/drivers/mtd/Kconfig
|
||||
@@ -101,6 +101,13 @@ config HBMC_AM654
|
||||
@@ -108,6 +108,13 @@ config HBMC_AM654
|
||||
This is the driver for HyperBus controller on TI's AM65x and
|
||||
other SoCs
|
||||
|
||||
@ -103,11 +101,9 @@ index 5e7571cf3d..34a59b44b9 100644
|
||||
source "drivers/mtd/nand/Kconfig"
|
||||
|
||||
source "drivers/mtd/spi/Kconfig"
|
||||
diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
|
||||
index 318788c5e2..1df1031b23 100644
|
||||
--- a/drivers/mtd/Makefile
|
||||
+++ b/drivers/mtd/Makefile
|
||||
@@ -41,3 +41,7 @@ obj-$(CONFIG_$(SPL_TPL_)SPI_FLASH_SUPPORT) += spi/
|
||||
@@ -41,3 +41,7 @@ obj-$(CONFIG_$(SPL_TPL_)SPI_FLASH_SUPPOR
|
||||
obj-$(CONFIG_SPL_UBI) += ubispl/
|
||||
|
||||
endif
|
||||
@ -115,8 +111,6 @@ index 318788c5e2..1df1031b23 100644
|
||||
+ifeq ($(CONFIG_MTK_SPI_NAND), y)
|
||||
+include $(srctree)/drivers/mtd/nandx/Nandx.mk
|
||||
+endif
|
||||
diff --git a/drivers/mtd/nand/raw/nand.c b/drivers/mtd/nand/raw/nand.c
|
||||
index 026419e4e6..4be0c7d8f3 100644
|
||||
--- a/drivers/mtd/nand/raw/nand.c
|
||||
+++ b/drivers/mtd/nand/raw/nand.c
|
||||
@@ -91,8 +91,10 @@ static void nand_init_chip(int i)
|
||||
@ -130,9 +124,6 @@ index 026419e4e6..4be0c7d8f3 100644
|
||||
|
||||
nand_register(i, mtd);
|
||||
}
|
||||
diff --git a/drivers/mtd/nandx/NOTICE b/drivers/mtd/nandx/NOTICE
|
||||
new file mode 100644
|
||||
index 0000000000..1a06ca3867
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/NOTICE
|
||||
@@ -0,0 +1,52 @@
|
||||
@ -189,9 +180,6 @@ index 0000000000..1a06ca3867
|
||||
+
|
||||
+####################################################################################################
|
||||
\ No newline at end of file
|
||||
diff --git a/drivers/mtd/nandx/Nandx.config b/drivers/mtd/nandx/Nandx.config
|
||||
new file mode 100644
|
||||
index 0000000000..35705ee28d
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/Nandx.config
|
||||
@@ -0,0 +1,17 @@
|
||||
@ -212,9 +200,6 @@ index 0000000000..35705ee28d
|
||||
+NANDX_NFI_BASE := y
|
||||
+NANDX_NFI_ECC := y
|
||||
+NANDX_NFI_SPI := y
|
||||
diff --git a/drivers/mtd/nandx/Nandx.mk b/drivers/mtd/nandx/Nandx.mk
|
||||
new file mode 100644
|
||||
index 0000000000..f5a6f2a628
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/Nandx.mk
|
||||
@@ -0,0 +1,91 @@
|
||||
@ -309,9 +294,6 @@ index 0000000000..f5a6f2a628
|
||||
+clean:
|
||||
+ rm -rf $(sim-obj) nandx
|
||||
+endif
|
||||
diff --git a/drivers/mtd/nandx/README b/drivers/mtd/nandx/README
|
||||
new file mode 100644
|
||||
index 0000000000..0feaeaeb88
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/README
|
||||
@@ -0,0 +1,31 @@
|
||||
@ -346,9 +328,6 @@ index 0000000000..0feaeaeb88
|
||||
+ Any block of above graph can be extended at your will, if you
|
||||
+want add new feature into this code, please make sure that your code
|
||||
+would follow the framework, and we will be appreciated about it.
|
||||
diff --git a/drivers/mtd/nandx/core/Nandx.mk b/drivers/mtd/nandx/core/Nandx.mk
|
||||
new file mode 100644
|
||||
index 0000000000..7a5661c044
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/Nandx.mk
|
||||
@@ -0,0 +1,38 @@
|
||||
@ -390,9 +369,6 @@ index 0000000000..7a5661c044
|
||||
+nandx-header-$(NANDX_NFI_ECC) += nfi/nfiecc_regs.h
|
||||
+nandx-header-$(NANDX_NFI_SPI) += nfi/nfi_spi.h
|
||||
+nandx-header-$(NANDX_NFI_SPI) += nfi/nfi_spi_regs.h
|
||||
diff --git a/drivers/mtd/nandx/core/core_io.c b/drivers/mtd/nandx/core/core_io.c
|
||||
new file mode 100644
|
||||
index 0000000000..716eeed38d
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/core_io.c
|
||||
@@ -0,0 +1,735 @@
|
||||
@ -1131,9 +1107,6 @@ index 0000000000..716eeed38d
|
||||
+ return ret;
|
||||
+}
|
||||
+#endif
|
||||
diff --git a/drivers/mtd/nandx/core/core_io.h b/drivers/mtd/nandx/core/core_io.h
|
||||
new file mode 100644
|
||||
index 0000000000..edcb60908a
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/core_io.h
|
||||
@@ -0,0 +1,39 @@
|
||||
@ -1176,9 +1149,6 @@ index 0000000000..edcb60908a
|
||||
+};
|
||||
+
|
||||
+#endif /* __CORE_IO_H__ */
|
||||
diff --git a/drivers/mtd/nandx/core/nand/device_spi.c b/drivers/mtd/nandx/core/nand/device_spi.c
|
||||
new file mode 100644
|
||||
index 0000000000..db338c28c2
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/nand/device_spi.c
|
||||
@@ -0,0 +1,200 @@
|
||||
@ -1382,9 +1352,6 @@ index 0000000000..db338c28c2
|
||||
+ return &spi_nand[index].dev;
|
||||
+}
|
||||
+
|
||||
diff --git a/drivers/mtd/nandx/core/nand/device_spi.h b/drivers/mtd/nandx/core/nand/device_spi.h
|
||||
new file mode 100644
|
||||
index 0000000000..1676b61fc8
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/nand/device_spi.h
|
||||
@@ -0,0 +1,132 @@
|
||||
@ -1520,9 +1487,6 @@ index 0000000000..1676b61fc8
|
||||
+u8 spi_replace_tx_col_cycle(u8 mode);
|
||||
+
|
||||
+#endif /* __DEVICE_SPI_H__ */
|
||||
diff --git a/drivers/mtd/nandx/core/nand/nand_spi.c b/drivers/mtd/nandx/core/nand/nand_spi.c
|
||||
new file mode 100644
|
||||
index 0000000000..2ae03e1cf4
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/nand/nand_spi.c
|
||||
@@ -0,0 +1,526 @@
|
||||
@ -2052,9 +2016,6 @@ index 0000000000..2ae03e1cf4
|
||||
+ nand_base_exit(spi->parent);
|
||||
+ mem_free(spi);
|
||||
+}
|
||||
diff --git a/drivers/mtd/nandx/core/nand/nand_spi.h b/drivers/mtd/nandx/core/nand/nand_spi.h
|
||||
new file mode 100644
|
||||
index 0000000000..e55e4de6f7
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/nand/nand_spi.h
|
||||
@@ -0,0 +1,35 @@
|
||||
@ -2093,9 +2054,6 @@ index 0000000000..e55e4de6f7
|
||||
+}
|
||||
+
|
||||
+#endif /* __NAND_SPI_H__ */
|
||||
diff --git a/drivers/mtd/nandx/core/nand_base.c b/drivers/mtd/nandx/core/nand_base.c
|
||||
new file mode 100644
|
||||
index 0000000000..65998e5460
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/nand_base.c
|
||||
@@ -0,0 +1,304 @@
|
||||
@ -2403,9 +2361,6 @@ index 0000000000..65998e5460
|
||||
+ nfi_exit(base->nfi);
|
||||
+ mem_free(base);
|
||||
+}
|
||||
diff --git a/drivers/mtd/nandx/core/nand_base.h b/drivers/mtd/nandx/core/nand_base.h
|
||||
new file mode 100644
|
||||
index 0000000000..13217978e5
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/nand_base.h
|
||||
@@ -0,0 +1,71 @@
|
||||
@ -2480,9 +2435,6 @@ index 0000000000..13217978e5
|
||||
+int nand_detect_device(struct nand_base *nand);
|
||||
+
|
||||
+#endif /* __NAND_BASE_H__ */
|
||||
diff --git a/drivers/mtd/nandx/core/nand_chip.c b/drivers/mtd/nandx/core/nand_chip.c
|
||||
new file mode 100644
|
||||
index 0000000000..02adc6f52e
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/nand_chip.c
|
||||
@@ -0,0 +1,272 @@
|
||||
@ -2758,9 +2710,6 @@ index 0000000000..02adc6f52e
|
||||
+ nand_exit(chip->nand);
|
||||
+ mem_free(chip);
|
||||
+}
|
||||
diff --git a/drivers/mtd/nandx/core/nand_chip.h b/drivers/mtd/nandx/core/nand_chip.h
|
||||
new file mode 100644
|
||||
index 0000000000..3e9c8e6ca3
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/nand_chip.h
|
||||
@@ -0,0 +1,103 @@
|
||||
@ -2867,9 +2816,6 @@ index 0000000000..3e9c8e6ca3
|
||||
+struct nand_chip *nand_chip_init(struct nfi_resource *res);
|
||||
+void nand_chip_exit(struct nand_chip *chip);
|
||||
+#endif /* __NAND_CHIP_H__ */
|
||||
diff --git a/drivers/mtd/nandx/core/nand_device.c b/drivers/mtd/nandx/core/nand_device.c
|
||||
new file mode 100644
|
||||
index 0000000000..9f6764d1bc
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/nand_device.c
|
||||
@@ -0,0 +1,285 @@
|
||||
@ -3158,9 +3104,6 @@ index 0000000000..9f6764d1bc
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
diff --git a/drivers/mtd/nandx/core/nand_device.h b/drivers/mtd/nandx/core/nand_device.h
|
||||
new file mode 100644
|
||||
index 0000000000..e142cf529d
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/nand_device.h
|
||||
@@ -0,0 +1,608 @@
|
||||
@ -3772,9 +3715,6 @@ index 0000000000..e142cf529d
|
||||
+
|
||||
+struct nand_device *nand_get_device(int index);
|
||||
+#endif /* __NAND_DEVICE_H__ */
|
||||
diff --git a/drivers/mtd/nandx/core/nfi.h b/drivers/mtd/nandx/core/nfi.h
|
||||
new file mode 100644
|
||||
index 0000000000..ba84e73ccc
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/nfi.h
|
||||
@@ -0,0 +1,51 @@
|
||||
@ -3829,9 +3769,6 @@ index 0000000000..ba84e73ccc
|
||||
+void nfi_exit(struct nfi *nfi);
|
||||
+
|
||||
+#endif /* __NFI_H__ */
|
||||
diff --git a/drivers/mtd/nandx/core/nfi/nfi_base.c b/drivers/mtd/nandx/core/nfi/nfi_base.c
|
||||
new file mode 100644
|
||||
index 0000000000..d8679d7aa3
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/nfi/nfi_base.c
|
||||
@@ -0,0 +1,1357 @@
|
||||
@ -5192,9 +5129,6 @@ index 0000000000..d8679d7aa3
|
||||
+ nfi_extend_exit(nb);
|
||||
+}
|
||||
+
|
||||
diff --git a/drivers/mtd/nandx/core/nfi/nfi_base.h b/drivers/mtd/nandx/core/nfi/nfi_base.h
|
||||
new file mode 100644
|
||||
index 0000000000..ae894eaa31
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/nfi/nfi_base.h
|
||||
@@ -0,0 +1,95 @@
|
||||
@ -5293,9 +5227,6 @@ index 0000000000..ae894eaa31
|
||||
+void nfi_extend_exit(struct nfi_base *nb);
|
||||
+
|
||||
+#endif /* __NFI_BASE_H__ */
|
||||
diff --git a/drivers/mtd/nandx/core/nfi/nfi_regs.h b/drivers/mtd/nandx/core/nfi/nfi_regs.h
|
||||
new file mode 100644
|
||||
index 0000000000..ba4868acc8
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/nfi/nfi_regs.h
|
||||
@@ -0,0 +1,114 @@
|
||||
@ -5413,9 +5344,6 @@ index 0000000000..ba4868acc8
|
||||
+
|
||||
+#endif /* __NFI_REGS_H__ */
|
||||
+
|
||||
diff --git a/drivers/mtd/nandx/core/nfi/nfi_spi.c b/drivers/mtd/nandx/core/nfi/nfi_spi.c
|
||||
new file mode 100644
|
||||
index 0000000000..67cd0aaad9
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/nfi/nfi_spi.c
|
||||
@@ -0,0 +1,689 @@
|
||||
@ -6108,9 +6036,6 @@ index 0000000000..67cd0aaad9
|
||||
+ mem_free(nfi_spi);
|
||||
+}
|
||||
+
|
||||
diff --git a/drivers/mtd/nandx/core/nfi/nfi_spi.h b/drivers/mtd/nandx/core/nfi/nfi_spi.h
|
||||
new file mode 100644
|
||||
index 0000000000..a52255663a
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/nfi/nfi_spi.h
|
||||
@@ -0,0 +1,44 @@
|
||||
@ -6158,9 +6083,6 @@ index 0000000000..a52255663a
|
||||
+};
|
||||
+
|
||||
+#endif /* __NFI_SPI_H__ */
|
||||
diff --git a/drivers/mtd/nandx/core/nfi/nfi_spi_regs.h b/drivers/mtd/nandx/core/nfi/nfi_spi_regs.h
|
||||
new file mode 100644
|
||||
index 0000000000..77adf46782
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/nfi/nfi_spi_regs.h
|
||||
@@ -0,0 +1,64 @@
|
||||
@ -6228,9 +6150,6 @@ index 0000000000..77adf46782
|
||||
+#define SPI_GPRAM_ADDR 0x800
|
||||
+
|
||||
+#endif /* __NFI_SPI_REGS_H__ */
|
||||
diff --git a/drivers/mtd/nandx/core/nfi/nfiecc.c b/drivers/mtd/nandx/core/nfi/nfiecc.c
|
||||
new file mode 100644
|
||||
index 0000000000..14246fbc3e
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/nfi/nfiecc.c
|
||||
@@ -0,0 +1,510 @@
|
||||
@ -6744,9 +6663,6 @@ index 0000000000..14246fbc3e
|
||||
+ mem_free(ecc);
|
||||
+}
|
||||
+
|
||||
diff --git a/drivers/mtd/nandx/core/nfi/nfiecc.h b/drivers/mtd/nandx/core/nfi/nfiecc.h
|
||||
new file mode 100644
|
||||
index 0000000000..b02a5c3534
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/nfi/nfiecc.h
|
||||
@@ -0,0 +1,90 @@
|
||||
@ -6840,9 +6756,6 @@ index 0000000000..b02a5c3534
|
||||
+void nfiecc_exit(struct nfiecc *ecc);
|
||||
+
|
||||
+#endif /* __NFIECC_H__ */
|
||||
diff --git a/drivers/mtd/nandx/core/nfi/nfiecc_regs.h b/drivers/mtd/nandx/core/nfi/nfiecc_regs.h
|
||||
new file mode 100644
|
||||
index 0000000000..96564cf872
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/core/nfi/nfiecc_regs.h
|
||||
@@ -0,0 +1,51 @@
|
||||
@ -6897,9 +6810,6 @@ index 0000000000..96564cf872
|
||||
+#define NFIECC_DECEL(x) (0x120 + (x) * 4)
|
||||
+
|
||||
+#endif /* __NFIECC_REGS_H__ */
|
||||
diff --git a/drivers/mtd/nandx/driver/Nandx.mk b/drivers/mtd/nandx/driver/Nandx.mk
|
||||
new file mode 100644
|
||||
index 0000000000..3fb93d37c5
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/driver/Nandx.mk
|
||||
@@ -0,0 +1,18 @@
|
||||
@ -6921,9 +6831,6 @@ index 0000000000..3fb93d37c5
|
||||
+nandx-$(NANDX_KERNEL_SUPPORT) += kernel/driver.c
|
||||
+nandx-$(NANDX_LK_SUPPORT) += lk/driver.c
|
||||
+nandx-$(NANDX_UBOOT_SUPPORT) += uboot/driver.c
|
||||
diff --git a/drivers/mtd/nandx/driver/bbt/bbt.c b/drivers/mtd/nandx/driver/bbt/bbt.c
|
||||
new file mode 100644
|
||||
index 0000000000..c9d4823e09
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/driver/bbt/bbt.c
|
||||
@@ -0,0 +1,408 @@
|
||||
@ -7335,9 +7242,6 @@ index 0000000000..c9d4823e09
|
||||
+
|
||||
+ return get_bbt_mark(g_bbt_manager.bbt, block) != BBT_BLOCK_GOOD;
|
||||
+}
|
||||
diff --git a/drivers/mtd/nandx/driver/uboot/driver.c b/drivers/mtd/nandx/driver/uboot/driver.c
|
||||
new file mode 100644
|
||||
index 0000000000..7bd3342452
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/driver/uboot/driver.c
|
||||
@@ -0,0 +1,574 @@
|
||||
@ -7915,9 +7819,6 @@ index 0000000000..7bd3342452
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
+MODULE_DESCRIPTION("MTK Nand Flash Controller Driver");
|
||||
+MODULE_AUTHOR("MediaTek");
|
||||
diff --git a/drivers/mtd/nandx/include/Nandx.mk b/drivers/mtd/nandx/include/Nandx.mk
|
||||
new file mode 100644
|
||||
index 0000000000..667402790e
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/include/Nandx.mk
|
||||
@@ -0,0 +1,16 @@
|
||||
@ -7937,9 +7838,6 @@ index 0000000000..667402790e
|
||||
+nandx-header-$(NANDX_LK_SUPPORT) += lk/nandx_os.h
|
||||
+nandx-header-$(NANDX_KERNEL_SUPPORT) += kernel/nandx_os.h
|
||||
+nandx-header-$(NANDX_UBOOT_SUPPORT) += uboot/nandx_os.h
|
||||
diff --git a/drivers/mtd/nandx/include/internal/bbt.h b/drivers/mtd/nandx/include/internal/bbt.h
|
||||
new file mode 100644
|
||||
index 0000000000..4676def1f5
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/include/internal/bbt.h
|
||||
@@ -0,0 +1,62 @@
|
||||
@ -8005,9 +7903,6 @@ index 0000000000..4676def1f5
|
||||
+int bbt_is_bad(struct nandx_info *nand, off_t offset);
|
||||
+
|
||||
+#endif /*__BBT_H__*/
|
||||
diff --git a/drivers/mtd/nandx/include/internal/nandx_core.h b/drivers/mtd/nandx/include/internal/nandx_core.h
|
||||
new file mode 100644
|
||||
index 0000000000..09aff72224
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/include/internal/nandx_core.h
|
||||
@@ -0,0 +1,250 @@
|
||||
@ -8261,9 +8156,6 @@ index 0000000000..09aff72224
|
||||
+#endif
|
||||
+
|
||||
+#endif /* __NANDX_CORE_H__ */
|
||||
diff --git a/drivers/mtd/nandx/include/internal/nandx_errno.h b/drivers/mtd/nandx/include/internal/nandx_errno.h
|
||||
new file mode 100644
|
||||
index 0000000000..51fb299c03
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/include/internal/nandx_errno.h
|
||||
@@ -0,0 +1,40 @@
|
||||
@ -8307,9 +8199,6 @@ index 0000000000..51fb299c03
|
||||
+#endif
|
||||
+
|
||||
+#endif /* __NANDX_ERRNO_H__ */
|
||||
diff --git a/drivers/mtd/nandx/include/internal/nandx_util.h b/drivers/mtd/nandx/include/internal/nandx_util.h
|
||||
new file mode 100644
|
||||
index 0000000000..1990b000ee
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/include/internal/nandx_util.h
|
||||
@@ -0,0 +1,221 @@
|
||||
@ -8534,9 +8423,6 @@ index 0000000000..1990b000ee
|
||||
+}
|
||||
+
|
||||
+#endif /* __NANDX_UTIL_H__ */
|
||||
diff --git a/drivers/mtd/nandx/include/uboot/nandx_os.h b/drivers/mtd/nandx/include/uboot/nandx_os.h
|
||||
new file mode 100644
|
||||
index 0000000000..8ea53378bf
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nandx/include/uboot/nandx_os.h
|
||||
@@ -0,0 +1,78 @@
|
||||
@ -8618,8 +8504,6 @@ index 0000000000..8ea53378bf
|
||||
+}
|
||||
+
|
||||
+#endif /* __NANDX_OS_H__ */
|
||||
diff --git a/include/configs/mt7622.h b/include/configs/mt7622.h
|
||||
index dfd506ed24..6d0c956484 100644
|
||||
--- a/include/configs/mt7622.h
|
||||
+++ b/include/configs/mt7622.h
|
||||
@@ -11,6 +11,31 @@
|
||||
@ -8654,6 +8538,3 @@ index dfd506ed24..6d0c956484 100644
|
||||
#define CONFIG_SYS_MAXARGS 8
|
||||
#define CONFIG_SYS_BOOTM_LEN SZ_64M
|
||||
#define CONFIG_SYS_CBSIZE SZ_1K
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@ -11,11 +11,9 @@ Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
|
||||
arch/arm/dts/mt7622.dtsi | 20 ++++++++++++++++++++
|
||||
2 files changed, 26 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/dts/mt7622-rfb.dts b/arch/arm/dts/mt7622-rfb.dts
|
||||
index f05c3fe14d..05502bddec 100644
|
||||
--- a/arch/arm/dts/mt7622-rfb.dts
|
||||
+++ b/arch/arm/dts/mt7622-rfb.dts
|
||||
@@ -143,6 +143,12 @@
|
||||
@@ -174,6 +174,12 @@
|
||||
};
|
||||
};
|
||||
|
||||
@ -28,11 +26,9 @@ index f05c3fe14d..05502bddec 100644
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins>;
|
||||
diff --git a/arch/arm/dts/mt7622.dtsi b/arch/arm/dts/mt7622.dtsi
|
||||
index 1e8ec9b48b..63fdb63d4a 100644
|
||||
--- a/arch/arm/dts/mt7622.dtsi
|
||||
+++ b/arch/arm/dts/mt7622.dtsi
|
||||
@@ -52,6 +52,26 @@
|
||||
@@ -53,6 +53,26 @@
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
@ -59,6 +55,3 @@ index 1e8ec9b48b..63fdb63d4a 100644
|
||||
timer {
|
||||
compatible = "arm,armv8-timer";
|
||||
interrupt-parent = <&gic>;
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@ -10,8 +10,6 @@ Signed-off-by: Sam Shih <sam.shih@mediatek.com>
|
||||
configs/mt7622_rfb_defconfig | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/configs/mt7622_rfb_defconfig b/configs/mt7622_rfb_defconfig
|
||||
index 1ce6ebdfeb..816126267b 100644
|
||||
--- a/configs/mt7622_rfb_defconfig
|
||||
+++ b/configs/mt7622_rfb_defconfig
|
||||
@@ -13,6 +13,7 @@ CONFIG_DEFAULT_FDT_FILE="mt7622-rfb"
|
||||
@ -22,18 +20,3 @@ index 1ce6ebdfeb..816126267b 100644
|
||||
CONFIG_CMD_PCI=y
|
||||
CONFIG_CMD_SF_TEST=y
|
||||
CONFIG_CMD_PING=y
|
||||
CONFIG_CMD_SMC=y
|
||||
@@ -25,6 +26,10 @@ CONFIG_CLK=y
|
||||
CONFIG_DM_MMC=y
|
||||
CONFIG_MMC_HS200_SUPPORT=y
|
||||
CONFIG_MMC_MTK=y
|
||||
+CONFIG_MTD=y
|
||||
+CONFIG_DM_MTD=y
|
||||
+CONFIG_MTK_SPI_NAND=y
|
||||
+CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_DM_SPI_FLASH=y
|
||||
CONFIG_SPI_FLASH_EON=y
|
||||
CONFIG_SPI_FLASH_GIGADEVICE=y
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
diff --git a/configs/mt7623n_bpir2_defconfig b/configs/mt7623n_bpir2_defconfig
|
||||
index 6b9fbd7e22..fb2a004803 100644
|
||||
--- a/configs/mt7623n_bpir2_defconfig
|
||||
+++ b/configs/mt7623n_bpir2_defconfig
|
||||
@@ -52,3 +52,13 @@ CONFIG_TIMER=y
|
||||
CONFIG_WDT_MTK=y
|
||||
CONFIG_LZMA=y
|
||||
@@ -51,5 +51,15 @@ CONFIG_SYSRESET=y
|
||||
CONFIG_SYSRESET_WATCHDOG=y
|
||||
CONFIG_TIMER=y
|
||||
CONFIG_MTK_TIMER=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+#enables savenenv-command
|
||||
@ -15,3 +14,5 @@ index 6b9fbd7e22..fb2a004803 100644
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_ENV_SIZE=0x2000
|
||||
+CONFIG_CMD_SETEXPR=y
|
||||
CONFIG_WDT_MTK=y
|
||||
CONFIG_LZMA=y
|
||||
|
||||
@ -0,0 +1,38 @@
|
||||
From a6bfd71a96201127836d59736abcb54dc2d5e1a5 Mon Sep 17 00:00:00 2001
|
||||
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
||||
Date: Mon, 14 Sep 2020 12:50:56 +0200
|
||||
Subject: [PATCH] cmd/button: return button status
|
||||
|
||||
To make the button command useful in a shell script it should return the
|
||||
status of the button:
|
||||
|
||||
* 0 (true) - pressed, on
|
||||
* 1 (false) - not pressed, off
|
||||
|
||||
The button command takes only one argument. Correct maxargs.
|
||||
|
||||
Adjust the Python unit test.
|
||||
|
||||
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
||||
Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
|
||||
---
|
||||
cmd/button.c | 4 ++--
|
||||
test/py/tests/test_button.py | 34 ++++++++++++++++++++++++++--------
|
||||
2 files changed, 28 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/cmd/button.c
|
||||
+++ b/cmd/button.c
|
||||
@@ -75,11 +75,11 @@ int do_button(struct cmd_tbl *cmdtp, int
|
||||
|
||||
ret = show_button_state(dev);
|
||||
|
||||
- return 0;
|
||||
+ return !ret;
|
||||
}
|
||||
|
||||
U_BOOT_CMD(
|
||||
- button, 4, 1, do_button,
|
||||
+ button, 2, 1, do_button,
|
||||
"manage buttons",
|
||||
"<button_label> \tGet button state\n"
|
||||
"button list\t\tShow a list of buttons"
|
||||
116
package/boot/uboot-mediatek/patches/007-env-readmem.patch
Normal file
116
package/boot/uboot-mediatek/patches/007-env-readmem.patch
Normal file
@ -0,0 +1,116 @@
|
||||
--- a/cmd/Kconfig
|
||||
+++ b/cmd/Kconfig
|
||||
@@ -571,6 +571,12 @@ config CMD_ENV_EXISTS
|
||||
Check if a variable is defined in the environment for use in
|
||||
shell scripting.
|
||||
|
||||
+config CMD_ENV_READMEM
|
||||
+ bool "env readmem"
|
||||
+ default y
|
||||
+ help
|
||||
+ Store memory content into environment variable.
|
||||
+
|
||||
config CMD_ENV_CALLBACK
|
||||
bool "env callbacks - print callbacks and their associated variables"
|
||||
help
|
||||
--- a/cmd/nvedit.c
|
||||
+++ b/cmd/nvedit.c
|
||||
@@ -469,6 +469,60 @@ int do_env_ask(struct cmd_tbl *cmdtp, in
|
||||
}
|
||||
#endif
|
||||
|
||||
+#if defined(CONFIG_CMD_ENV_READMEM)
|
||||
+int do_env_readmem(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||
+{
|
||||
+ char varstr[CONFIG_SYS_CBSIZE];
|
||||
+ const void *buf;
|
||||
+ char *local_args[4];
|
||||
+ ulong addr, bytes = 6;
|
||||
+ int hexdump = 0;
|
||||
+
|
||||
+ /*
|
||||
+ * Check the syntax:
|
||||
+ *
|
||||
+ * readmem [-b] name address [size]
|
||||
+ */
|
||||
+ if (argc < 3)
|
||||
+ return CMD_RET_USAGE;
|
||||
+
|
||||
+ local_args[0] = argv[0];
|
||||
+
|
||||
+ if (!strncmp(argv[1], "-b", 3))
|
||||
+ hexdump = 1;
|
||||
+
|
||||
+ local_args[1] = argv[hexdump + 1];
|
||||
+ local_args[2] = varstr;
|
||||
+ local_args[3] = NULL;
|
||||
+
|
||||
+ addr = simple_strtoul(argv[hexdump + 2], NULL, 16);
|
||||
+
|
||||
+ if (!hexdump)
|
||||
+ bytes = simple_strtoul(argv[hexdump + 3], NULL, 16);
|
||||
+
|
||||
+ if (bytes < 1)
|
||||
+ return 1;
|
||||
+
|
||||
+ if ((hexdump * 3) * bytes >= CONFIG_SYS_CBSIZE)
|
||||
+ return 1;
|
||||
+
|
||||
+ buf = map_sysmem(addr, bytes);
|
||||
+ if (!buf)
|
||||
+ return 1;
|
||||
+
|
||||
+ if (hexdump) {
|
||||
+ sprintf(varstr, "%pM", buf);
|
||||
+ } else {
|
||||
+ memcpy(varstr, buf, bytes);
|
||||
+ varstr[bytes] = '\0';
|
||||
+ }
|
||||
+ unmap_sysmem(buf);
|
||||
+
|
||||
+ /* Continue calling setenv code */
|
||||
+ return _do_env_set(flag, 3, local_args, H_INTERACTIVE);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#if defined(CONFIG_CMD_ENV_CALLBACK)
|
||||
static int print_static_binding(const char *var_name, const char *callback_name,
|
||||
void *priv)
|
||||
@@ -1373,6 +1427,9 @@ static struct cmd_tbl cmd_env_sub[] = {
|
||||
U_BOOT_CMD_MKENT(load, 1, 0, do_env_load, "", ""),
|
||||
#endif
|
||||
U_BOOT_CMD_MKENT(print, CONFIG_SYS_MAXARGS, 1, do_env_print, "", ""),
|
||||
+#if defined(CONFIG_CMD_ENV_READMEM)
|
||||
+ U_BOOT_CMD_MKENT(readmem, CONFIG_SYS_MAXARGS, 3, do_env_readmem, "", ""),
|
||||
+#endif
|
||||
#if defined(CONFIG_CMD_RUN)
|
||||
U_BOOT_CMD_MKENT(run, CONFIG_SYS_MAXARGS, 1, do_run, "", ""),
|
||||
#endif
|
||||
@@ -1461,6 +1518,9 @@ static char env_help_text[] =
|
||||
#if defined(CONFIG_CMD_NVEDIT_EFI)
|
||||
"env print -e [-guid guid] [-n] [name ...] - print UEFI environment\n"
|
||||
#endif
|
||||
+#if defined(CONFIG_CMD_ENV_READMEM)
|
||||
+ "env readmem [-b] name address size - read variable from memory\n"
|
||||
+#endif
|
||||
#if defined(CONFIG_CMD_RUN)
|
||||
"env run var [...] - run commands in an environment variable\n"
|
||||
#endif
|
||||
@@ -1570,6 +1630,17 @@ U_BOOT_CMD(
|
||||
);
|
||||
#endif
|
||||
|
||||
+#if defined(CONFIG_CMD_ENV_READMEM)
|
||||
+U_BOOT_CMD_COMPLETE(
|
||||
+ readmem, CONFIG_SYS_MAXARGS, 3, do_env_readmem,
|
||||
+ "get environment variable from memory address",
|
||||
+ "name [-b] address size\n"
|
||||
+ " - store memory address to env variable\n"
|
||||
+ " \"-b\": read binary ethaddr",
|
||||
+ var_complete
|
||||
+);
|
||||
+#endif
|
||||
+
|
||||
#if defined(CONFIG_CMD_RUN)
|
||||
U_BOOT_CMD_COMPLETE(
|
||||
run, CONFIG_SYS_MAXARGS, 1, do_run,
|
||||
@ -0,0 +1,32 @@
|
||||
--- a/cmd/bootmenu.c
|
||||
+++ b/cmd/bootmenu.c
|
||||
@@ -38,6 +38,7 @@ struct bootmenu_data {
|
||||
int active; /* active menu entry */
|
||||
int count; /* total count of menu entries */
|
||||
struct bootmenu_entry *first; /* first menu entry */
|
||||
+ char *mtitle; /* custom menu title */
|
||||
};
|
||||
|
||||
enum bootmenu_key {
|
||||
@@ -380,7 +381,12 @@ static void menu_display_statusline(stru
|
||||
printf(ANSI_CURSOR_POSITION, 1, 1);
|
||||
puts(ANSI_CLEAR_LINE);
|
||||
printf(ANSI_CURSOR_POSITION, 2, 1);
|
||||
- puts(" *** U-Boot Boot Menu ***");
|
||||
+
|
||||
+ if (menu->mtitle)
|
||||
+ puts(menu->mtitle);
|
||||
+ else
|
||||
+ puts(" *** U-Boot Boot Menu ***");
|
||||
+
|
||||
puts(ANSI_CLEAR_LINE_TO_END);
|
||||
printf(ANSI_CURSOR_POSITION, 3, 1);
|
||||
puts(ANSI_CLEAR_LINE);
|
||||
@@ -434,6 +440,7 @@ static void bootmenu_show(int delay)
|
||||
return;
|
||||
}
|
||||
|
||||
+ bootmenu->mtitle = env_get("bootmenu_title");
|
||||
for (iter = bootmenu->first; iter; iter = iter->next) {
|
||||
if (!menu_item_add(menu, iter->key, iter))
|
||||
goto cleanup;
|
||||
@ -0,0 +1,35 @@
|
||||
--- a/board/mediatek/mt7622/mt7622_rfb.c
|
||||
+++ b/board/mediatek/mt7622/mt7622_rfb.c
|
||||
@@ -6,9 +6,15 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <config.h>
|
||||
+#include <dm.h>
|
||||
+#include <button.h>
|
||||
#include <env.h>
|
||||
#include <init.h>
|
||||
|
||||
+#ifndef CONFIG_RESET_BUTTON_LABEL
|
||||
+#define CONFIG_RESET_BUTTON_LABEL "reset"
|
||||
+#endif
|
||||
+
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int board_init(void)
|
||||
@@ -19,7 +25,15 @@ int board_init(void)
|
||||
|
||||
int board_late_init(void)
|
||||
{
|
||||
- gd->env_valid = 1; //to load environment variable from persistent store
|
||||
+ struct udevice *dev;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = !!button_get_by_label(CONFIG_RESET_BUTTON_LABEL, &dev);
|
||||
+
|
||||
+ if (!ret)
|
||||
+ ret = !button_get_state(dev);
|
||||
+
|
||||
+ gd->env_valid = ret; //to load environment variable from persistent store
|
||||
env_relocate();
|
||||
return 0;
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/Makefile 2020-10-13 13:39:06.471438591 +0800
|
||||
+++ b/Makefile 2020-10-13 13:39:39.190798462 +0800
|
||||
@@ -1725,6 +1725,10 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1716,6 +1716,10 @@ u-boot-elf.lds: arch/u-boot-elf.lds prep
|
||||
|
||||
ifeq ($(CONFIG_SPL),y)
|
||||
spl/u-boot-spl-mtk.bin: spl/u-boot-spl
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
diff --git a/configs/mt7623n_bpir2_defconfig b/configs/mt7623n_bpir2_defconfig
|
||||
index 6b9fbd7e22..fb2a004803 100644
|
||||
--- a/configs/mt7623a_unielec_u7623_02_defconfig
|
||||
+++ b/configs/mt7623a_unielec_u7623_02_defconfig
|
||||
@@ -52,3 +52,12 @@ CONFIG_TIMER=y
|
||||
|
||||
@ -0,0 +1,95 @@
|
||||
--- a/arch/arm/dts/mt7622-bananapi-bpi-r64.dts
|
||||
+++ b/arch/arm/dts/mt7622-bananapi-bpi-r64.dts
|
||||
@@ -27,6 +27,42 @@
|
||||
reg = <0x40000000 0x40000000>;
|
||||
};
|
||||
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+
|
||||
+ reset {
|
||||
+ label = "reset";
|
||||
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ wps {
|
||||
+ label = "wps";
|
||||
+ gpios = <&gpio 102 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+/*
|
||||
+ * red {
|
||||
+ * label = "bpi-r64:pio:red";
|
||||
+ * gpios = <&gpio 88 GPIO_ACTIVE_HIGH>;
|
||||
+ * default-state = "off";
|
||||
+ * };
|
||||
+ */
|
||||
+ green {
|
||||
+ label = "bpi-r64:pio:green";
|
||||
+ gpios = <&gpio 89 GPIO_ACTIVE_HIGH>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+
|
||||
+ blue {
|
||||
+ label = "bpi-r64:pio:blue";
|
||||
+ gpios = <&gpio 85 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
reg_1p8v: regulator-1p8v {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "fixed-1.8V";
|
||||
@@ -139,11 +163,12 @@
|
||||
|
||||
};
|
||||
|
||||
- mmc1_pins_default: mmc1default {
|
||||
+ sd0_pins_default: sd0-pins-default {
|
||||
mux {
|
||||
function = "sd";
|
||||
- groups = "sd_0";
|
||||
+ groups = "sd_0";
|
||||
};
|
||||
+
|
||||
/* "I2S2_OUT, "I2S4_IN"", "I2S3_IN", "I2S2_IN",
|
||||
* "I2S4_OUT", "I2S3_OUT" are used as DAT0, DAT1,
|
||||
* DAT2, DAT3, CMD, CLK for SD respectively.
|
||||
@@ -164,7 +189,6 @@
|
||||
pins = "TXD3";
|
||||
bias-pull-up;
|
||||
};
|
||||
-
|
||||
};
|
||||
};
|
||||
|
||||
@@ -199,7 +223,7 @@
|
||||
status = "okay";
|
||||
bus-width = <8>;
|
||||
max-frequency = <50000000>;
|
||||
- cap-sd-highspeed;
|
||||
+ cap-mmc-highspeed;
|
||||
vmmc-supply = <®_3p3v>;
|
||||
vqmmc-supply = <®_3p3v>;
|
||||
non-removable;
|
||||
@@ -207,14 +231,15 @@
|
||||
|
||||
&mmc1 {
|
||||
pinctrl-names = "default";
|
||||
- pinctrl-0 = <&mmc1_pins_default>;
|
||||
+ pinctrl-0 = <&sd0_pins_default>;
|
||||
status = "okay";
|
||||
bus-width = <4>;
|
||||
- max-frequency = <50000000>;
|
||||
+ max-frequency = <20000000>;
|
||||
cap-sd-highspeed;
|
||||
r_smpl = <1>;
|
||||
vmmc-supply = <®_3p3v>;
|
||||
vqmmc-supply = <®_3p3v>;
|
||||
+ cd-gpios = <&gpio 81 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
&watchdog {
|
||||
132
package/boot/uboot-mediatek/patches/016-fit-totalsize.patch
Normal file
132
package/boot/uboot-mediatek/patches/016-fit-totalsize.patch
Normal file
@ -0,0 +1,132 @@
|
||||
--- a/cmd/bootm.c
|
||||
+++ b/cmd/bootm.c
|
||||
@@ -227,6 +227,65 @@ U_BOOT_CMD(
|
||||
/* iminfo - print header info for a requested image */
|
||||
/*******************************************************************/
|
||||
#if defined(CONFIG_CMD_IMI)
|
||||
+#define SECTOR_SHIFT 9
|
||||
+static int image_totalsize(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
+ char *const argv[], short int in_blocks)
|
||||
+{
|
||||
+ ulong addr;
|
||||
+ void *fit;
|
||||
+ int bsize, tsize, maxhdrsize;
|
||||
+ char buf[16];
|
||||
+
|
||||
+ if (argc >= 2)
|
||||
+ addr = simple_strtoul(argv[1], NULL, 16);
|
||||
+ else
|
||||
+ addr = image_load_addr;
|
||||
+
|
||||
+ fit = (void *)map_sysmem(addr, 0);
|
||||
+ tsize = fit_get_totalsize(fit);
|
||||
+ unmap_sysmem(fit);
|
||||
+ if (tsize == 0)
|
||||
+ return 1;
|
||||
+
|
||||
+ bsize = (tsize >> SECTOR_SHIFT) + ((tsize & ((1 << SECTOR_SHIFT) - 1))?1:0);
|
||||
+
|
||||
+ if (!in_blocks)
|
||||
+ snprintf(buf, sizeof(buf), "%x", tsize);
|
||||
+ else
|
||||
+ snprintf(buf, sizeof(buf), "%x", bsize);
|
||||
+
|
||||
+ if (argc >= 3)
|
||||
+ return env_set(argv[2], buf);
|
||||
+ else
|
||||
+ printf("%s\n", buf);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int do_imsz(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
+ char *const argv[])
|
||||
+{
|
||||
+ return image_totalsize(cmdtp, flag, argc, argv, 0);
|
||||
+}
|
||||
+
|
||||
+static int do_imszb(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
+ char *const argv[])
|
||||
+{
|
||||
+ return image_totalsize(cmdtp, flag, argc, argv, 1);
|
||||
+}
|
||||
+
|
||||
+U_BOOT_CMD(
|
||||
+ imsz, CONFIG_SYS_MAXARGS, 1, do_imsz,
|
||||
+ "get image total size (in bytes)",
|
||||
+ "addr [maxhdrlen] [varname]\n"
|
||||
+);
|
||||
+
|
||||
+U_BOOT_CMD(
|
||||
+ imszb, CONFIG_SYS_MAXARGS, 1, do_imszb,
|
||||
+ "get image total size (in blocks)",
|
||||
+ "addr [maxhdrlen] [varname]\n"
|
||||
+);
|
||||
+
|
||||
static int do_iminfo(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
{
|
||||
--- a/common/image-fit.c
|
||||
+++ b/common/image-fit.c
|
||||
@@ -1878,6 +1878,51 @@ static const char *fit_get_image_type_pr
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
+size_t fit_get_totalsize(const void *fit)
|
||||
+{
|
||||
+ int ret, ndepth, noffset, images_noffset;
|
||||
+ size_t data_size, hdrsize, img_total, max_size = 0;
|
||||
+ const void *data;
|
||||
+
|
||||
+ ret = fdt_check_header(fit);
|
||||
+ if (ret) {
|
||||
+ debug("Wrong FIT format: not a flattened device tree (err=%d)\n",
|
||||
+ ret);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ hdrsize = fdt_totalsize(fit);
|
||||
+
|
||||
+ /* simple FIT with internal images */
|
||||
+ if (hdrsize > 0x1000)
|
||||
+ return hdrsize;
|
||||
+
|
||||
+ images_noffset = fdt_path_offset(fit, FIT_IMAGES_PATH);
|
||||
+ if (images_noffset < 0) {
|
||||
+ printf("Can't find images parent node '%s' (%s)\n",
|
||||
+ FIT_IMAGES_PATH, fdt_strerror(images_noffset));
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ for (ndepth = 0,
|
||||
+ noffset = fdt_next_node(fit, images_noffset, &ndepth);
|
||||
+ (noffset >= 0) && (ndepth > 0);
|
||||
+ noffset = fdt_next_node(fit, noffset, &ndepth)) {
|
||||
+ if (ndepth == 1) {
|
||||
+ ret = fit_image_get_data_and_size(fit, noffset, &data, &data_size);
|
||||
+ if (ret)
|
||||
+ return 0;
|
||||
+
|
||||
+ img_total = data_size + (data - fit);
|
||||
+
|
||||
+ max_size = (max_size > img_total) ? max_size : img_total;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return max_size;
|
||||
+}
|
||||
+
|
||||
+
|
||||
int fit_image_load(bootm_headers_t *images, ulong addr,
|
||||
const char **fit_unamep, const char **fit_uname_configp,
|
||||
int arch, int image_type, int bootstage_id,
|
||||
--- a/include/image.h
|
||||
+++ b/include/image.h
|
||||
@@ -1027,6 +1027,7 @@ int fit_parse_subimage(const char *spec,
|
||||
ulong *addr, const char **image_name);
|
||||
|
||||
int fit_get_subimage_count(const void *fit, int images_noffset);
|
||||
+size_t fit_get_totalsize(const void *fit);
|
||||
void fit_print_contents(const void *fit);
|
||||
void fit_image_print(const void *fit, int noffset, const char *p);
|
||||
|
||||
@ -0,0 +1,351 @@
|
||||
--- /dev/null
|
||||
+++ b/configs/mt7622_bananapi_bpi-r64-sdmmc_defconfig
|
||||
@@ -0,0 +1,123 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_POSITION_INDEPENDENT=y
|
||||
+CONFIG_ARCH_MEDIATEK=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x41e00000
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
+CONFIG_USE_DEFAULT_ENV_FILE=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_BOOTP_SEND_HOSTNAME=y
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="mt7622-bananapi-bpi-r64"
|
||||
+CONFIG_DEFAULT_ENV_FILE="bananapi_bpi-r64-sdmmc_env"
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_SMBIOS_PRODUCT_NAME=""
|
||||
+CONFIG_AUTOBOOT_KEYED=y
|
||||
+CONFIG_BOOTDELAY=30
|
||||
+CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||
+CONFIG_CFB_CONSOLE_ANSI=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+CONFIG_LOGLEVEL=7
|
||||
+CONFIG_LOG=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="mt7622-bananapi-bpi-r64"
|
||||
+CONFIG_SYS_PROMPT="MT7622> "
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_BOOTP=y
|
||||
+CONFIG_CMD_BUTTON=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_ECHO=y
|
||||
+CONFIG_CMD_ENV_READMEM=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_EXT4=y
|
||||
+CONFIG_CMD_FAT=y
|
||||
+CONFIG_CMD_FS_GENERIC=y
|
||||
+CONFIG_CMD_FS_UUID=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_ITEST=y
|
||||
+CONFIG_CMD_LED=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+CONFIG_CMD_MBR=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_PCI=y
|
||||
+CONFIG_CMD_SF_TEST=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
+CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_TFTPBOOT=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_PART=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_SETEXPR=y
|
||||
+CONFIG_CMD_SLEEP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_SOURCE=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_DISPLAY_CPUINFO=y
|
||||
+CONFIG_DM_MMC=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_REGULATOR_GPIO=y
|
||||
+CONFIG_DM_USB=y
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_ENV_IS_IN_MMC=y
|
||||
+CONFIG_SYS_MMC_ENV_DEV=1
|
||||
+CONFIG_ENV_OFFSET=0x400000
|
||||
+CONFIG_ENV_OFFSET_REDUND=0x480000
|
||||
+CONFIG_ENV_SIZE=0x80000
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_VERSION_VARIABLE=y
|
||||
+CONFIG_PARTITION_UUIDS=y
|
||||
+CONFIG_NETCONSOLE=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PCI=y
|
||||
+CONFIG_DM_PCI=y
|
||||
+CONFIG_PCIE_MEDIATEK=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7622=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_PRE_CONSOLE_BUFFER=y
|
||||
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_RAM=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_MMC=y
|
||||
+CONFIG_MMC_DEFAULT_DEV=1
|
||||
+CONFIG_MMC_MTK=y
|
||||
+CONFIG_SUPPORT_EMMC_BOOT=y
|
||||
+CONFIG_SYSRESET_WATCHDOG=y
|
||||
+CONFIG_TIMER=y
|
||||
+CONFIG_MTK_TIMER=y
|
||||
+CONFIG_WDT_MTK=y
|
||||
+CONFIG_LZO=y
|
||||
+CONFIG_ZSTD=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_RANDOM_UUID=y
|
||||
+CONFIG_REGEX=y
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_USB_HOST=y
|
||||
+CONFIG_USB_XHCI_HCD=y
|
||||
+CONFIG_USB_XHCI_MTK=y
|
||||
+CONFIG_USB_STORAGE=y
|
||||
--- /dev/null
|
||||
+++ b/bananapi_bpi-r64-sdmmc_env
|
||||
@@ -0,0 +1,50 @@
|
||||
+ipaddr=192.168.1.1
|
||||
+serverip=192.168.1.254
|
||||
+loadaddr=0x4007ff28
|
||||
+bootcmd=run boot_sdmmc
|
||||
+bootargs=earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n1 swiotlb=512 root=/dev/mmcblk1p6
|
||||
+bootdelay=0
|
||||
+bootfile=openwrt-mediatek-mt7622-bananapi_bpi-r64-initramfs-recovery.itb
|
||||
+bootfile_upg=openwrt-mediatek-mt7622-bananapi_bpi-r64-squashfs-sysupgrade.itb
|
||||
+bootfile_emmcbl3=openwrt-mediatek-mt7622-bananapi_bpi-r64-boot-emmc.img
|
||||
+bootfile_emmcbl2=openwrt-mediatek-mt7622-bananapi_bpi-r64-bl2-emmc.bin
|
||||
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu
|
||||
+bootmenu_default=0
|
||||
+bootmenu_delay=0
|
||||
+bootmenu_title= [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) ) [0;36m[SD card][0m
|
||||
+bootmenu_0=0. Initialize environment.=run _firstboot
|
||||
+bootmenu_0d=0. Run default boot command.=run boot_default
|
||||
+bootmenu_1=1. Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
|
||||
+bootmenu_2=2. Boot production system from SD card.=run boot_production ; run bootmenu_confirm_return
|
||||
+bootmenu_3=3. Boot recovery system from SD card.=run boot_recovery ; run bootmenu_confirm_return
|
||||
+bootmenu_4=4. Load production system via TFTP then write to SD card.=setenv noboot 1 ; run boot_tftp_production ; setenv noboot ; run bootmenu_confirm_return
|
||||
+bootmenu_5=5. Load recovery system via TFTP then write to SD card.=setenv noboot 1 ; run boot_tftp_recovery ; setenv noboot ; run bootmenu_confirm_return
|
||||
+bootmenu_6=[31m6. Load bootloader via TFTP then write to eMMC.[0m=run emmc_init ; run bootmenu_confirm_return
|
||||
+bootmenu_7=7. Reboot.=reset
|
||||
+bootmenu_8=8. Reset all settings to factory defaults.=run reset_factory ; reset
|
||||
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; run boot_tftp_forever
|
||||
+boot_first=if button reset ; then run boot_tftp_forever ; fi ; setenv flag_recover 1 ; bootmenu
|
||||
+boot_production=led bpi-r64:pio:green on ; run sdmmc_read_production && bootm $loadaddr
|
||||
+boot_recovery=led bpi-r64:pio:green off ; run sdmmc_read_recovery && bootm $loadaddr
|
||||
+boot_sdmmc=run boot_production ; run boot_recovery
|
||||
+boot_tftp_forever=led bpi-r64:pio:blue on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
|
||||
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && run sdmmc_write_production ; if env exists noboot ; then else bootm $loadaddr ; fi
|
||||
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && run sdmmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr ; fi
|
||||
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr
|
||||
+emmc_init_bl3=mmc dev 0 0 && tftpboot $loadaddr $bootfile_emmcbl3 && mmc erase 0x0 0x3000 && mmc write $loadaddr 0x0 0x3000
|
||||
+emmc_init_bl2=mmc dev 0 1 && tftpboot $loadaddr $bootfile_emmcbl2 && mmc partconf 0 1 1 1 && mmc erase 0x0 0x400 && mmc write ${loadaddr} 0x0 0x400 ; mmc partconf 0 1 1 0
|
||||
+emmc_write_recovery=iminfo $fileaddr && mmc dev 0 && part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol
|
||||
+emmc_init=run emmc_init_bl2 ; run emmc_init_bl3 ; run sdmmc_read_recovery && run emmc_write_recovery
|
||||
+sdmmc_write_production=iminfo $fileaddr && mmc dev 1 && part start mmc 1 $part_default part_addr && part size mmc 1 $part_default part_size && run mmc_write_vol
|
||||
+sdmmc_write_recovery=iminfo $fileaddr && mmc dev 1 && part start mmc 1 $part_recovery part_addr && part size mmc 1 $part_recovery part_size && run mmc_write_vol
|
||||
+sdmmc_read_production=mmc dev 1 && part start mmc 1 $part_default part_addr && part size mmc 1 $part_default part_size && run mmc_read_vol
|
||||
+sdmmc_read_recovery=mmc dev 1 && part start mmc 1 $part_recovery part_addr && part size mmc 1 $part_recovery part_size && run mmc_read_vol
|
||||
+mmc_write_vol=imszb $fileaddr image_size && test 0x$image_size -le 0x$part_size && mmc erase 0x$part_addr 0x$part_size && mmc write $fileaddr 0x$part_addr 0x$image_size
|
||||
+mmc_read_vol=mmc read $loadaddr $part_addr 0x8 && imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc read $loadaddr 0x$part_addr 0x$image_size
|
||||
+part_default=production
|
||||
+part_recovery=recovery
|
||||
+reset_factory=mmc dev 1 && mmc erase 0x2000 0x800 && reset
|
||||
+_init_env=setenv _init_env ; setenv _create_env ; saveenv ; saveenv
|
||||
+_firstboot=setenv _firstboot ; led bpi-r64:pio:blue on ; run _switch_to_menu ; run _init_env ; run boot_first
|
||||
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
|
||||
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title [33m$ver[0m"
|
||||
--- /dev/null
|
||||
+++ b/configs/mt7622_bananapi_bpi-r64-emmc_defconfig
|
||||
@@ -0,0 +1,123 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_POSITION_INDEPENDENT=y
|
||||
+CONFIG_ARCH_MEDIATEK=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x41e00000
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
+CONFIG_USE_DEFAULT_ENV_FILE=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_BOOTP_SEND_HOSTNAME=y
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="mt7622-bananapi-bpi-r64"
|
||||
+CONFIG_DEFAULT_ENV_FILE="bananapi_bpi-r64-emmc_env"
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_SMBIOS_PRODUCT_NAME=""
|
||||
+CONFIG_AUTOBOOT_KEYED=y
|
||||
+CONFIG_BOOTDELAY=30
|
||||
+CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||
+CONFIG_CFB_CONSOLE_ANSI=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+CONFIG_LOGLEVEL=7
|
||||
+CONFIG_LOG=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="mt7622-bananapi-bpi-r64"
|
||||
+CONFIG_SYS_PROMPT="MT7622> "
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_BOOTP=y
|
||||
+CONFIG_CMD_BUTTON=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_ECHO=y
|
||||
+CONFIG_CMD_ENV_READMEM=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_EXT4=y
|
||||
+CONFIG_CMD_FAT=y
|
||||
+CONFIG_CMD_FS_GENERIC=y
|
||||
+CONFIG_CMD_FS_UUID=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_ITEST=y
|
||||
+CONFIG_CMD_LED=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+CONFIG_CMD_MBR=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_PCI=y
|
||||
+CONFIG_CMD_SF_TEST=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
+CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_TFTPBOOT=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_PART=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_SETEXPR=y
|
||||
+CONFIG_CMD_SLEEP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_SOURCE=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_DISPLAY_CPUINFO=y
|
||||
+CONFIG_DM_MMC=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_REGULATOR_GPIO=y
|
||||
+CONFIG_DM_USB=y
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_ENV_IS_IN_MMC=y
|
||||
+CONFIG_SYS_MMC_ENV_DEV=0
|
||||
+CONFIG_ENV_OFFSET=0x400000
|
||||
+CONFIG_ENV_OFFSET_REDUND=0x480000
|
||||
+CONFIG_ENV_SIZE=0x80000
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_VERSION_VARIABLE=y
|
||||
+CONFIG_PARTITION_UUIDS=y
|
||||
+CONFIG_NETCONSOLE=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PCI=y
|
||||
+CONFIG_DM_PCI=y
|
||||
+CONFIG_PCIE_MEDIATEK=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7622=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_PRE_CONSOLE_BUFFER=y
|
||||
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_RAM=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_MMC=y
|
||||
+CONFIG_MMC_DEFAULT_DEV=0
|
||||
+CONFIG_MMC_MTK=y
|
||||
+CONFIG_SUPPORT_EMMC_BOOT=y
|
||||
+CONFIG_SYSRESET_WATCHDOG=y
|
||||
+CONFIG_TIMER=y
|
||||
+CONFIG_MTK_TIMER=y
|
||||
+CONFIG_WDT_MTK=y
|
||||
+CONFIG_LZO=y
|
||||
+CONFIG_ZSTD=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_RANDOM_UUID=y
|
||||
+CONFIG_REGEX=y
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_USB_HOST=y
|
||||
+CONFIG_USB_XHCI_HCD=y
|
||||
+CONFIG_USB_XHCI_MTK=y
|
||||
+CONFIG_USB_STORAGE=y
|
||||
--- /dev/null
|
||||
+++ b/bananapi_bpi-r64-emmc_env
|
||||
@@ -0,0 +1,43 @@
|
||||
+ipaddr=192.168.1.1
|
||||
+serverip=192.168.1.254
|
||||
+loadaddr=0x4007ff28
|
||||
+bootcmd=run boot_emmc
|
||||
+bootargs=earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n1 swiotlb=512 root=/dev/mmcblk0p5
|
||||
+bootdelay=0
|
||||
+bootfile=openwrt-mediatek-mt7622-bananapi_bpi-r64-initramfs-recovery.itb
|
||||
+bootfile_upg=openwrt-mediatek-mt7622-bananapi_bpi-r64-squashfs-sysupgrade.itb
|
||||
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu
|
||||
+bootmenu_default=0
|
||||
+bootmenu_delay=0
|
||||
+bootmenu_title= [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) ) [0;36m[eMMC][0m
|
||||
+bootmenu_0=0. Initialize environment.=run _firstboot
|
||||
+bootmenu_0d=0. Run default boot command.=run boot_default
|
||||
+bootmenu_1=1. Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
|
||||
+bootmenu_2=2. Boot production system from eMMC.=run boot_production ; run bootmenu_confirm_return
|
||||
+bootmenu_3=3. Boot recovery system from eMMC.=run boot_recovery ; run bootmenu_confirm_return
|
||||
+bootmenu_4=4. Load production system via TFTP then write to eMMC.=setenv noboot 1 ; run boot_tftp_production ; setenv noboot ; run bootmenu_confirm_return
|
||||
+bootmenu_5=5. Load recovery system via TFTP then write to eMMC.=setenv noboot 1 ; run boot_tftp_recovery ; setenv noboot ; run bootmenu_confirm_return
|
||||
+bootmenu_6=6. Reboot.=reset
|
||||
+bootmenu_7=7. Reset all settings to factory defaults.=run reset_factory ; reset
|
||||
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; run boot_tftp_forever
|
||||
+boot_first=if button reset ; then run boot_tftp_forever ; fi ; setenv flag_recover 1 ; bootmenu
|
||||
+boot_production=led bpi-r64:pio:green on ; run emmc_read_production && bootm $loadaddr
|
||||
+boot_recovery=led bpi-r64:pio:green off ; run emmc_read_recovery && bootm $loadaddr
|
||||
+boot_emmc=run boot_production ; run boot_recovery
|
||||
+boot_tftp_forever=led bpi-r64:pio:blue on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
|
||||
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && run emmc_write_production ; if env exists noboot ; then else bootm $loadaddr ; fi
|
||||
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && run emmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr ; fi
|
||||
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr
|
||||
+emmc_write_production=iminfo $fileaddr && mmc dev 0 && part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol
|
||||
+emmc_write_recovery=iminfo $fileaddr && mmc dev 0 && part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol
|
||||
+emmc_read_production=mmc dev 0 && part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_read_vol
|
||||
+emmc_read_recovery=mmc dev 0 && part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_read_vol
|
||||
+mmc_write_vol=imszb $fileaddr image_size && test 0x$image_size -le 0x$part_size && mmc erase 0x$part_addr 0x$part_size && mmc write $fileaddr 0x$part_addr 0x$image_size
|
||||
+mmc_read_vol=mmc read $loadaddr $part_addr 0x8 && imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc read $loadaddr 0x$part_addr 0x$image_size
|
||||
+part_default=production
|
||||
+part_recovery=recovery
|
||||
+reset_factory=mmc dev 0 && mmc erase 0x2000 0x800 && reset
|
||||
+_init_env=setenv _init_env ; setenv _create_env ; saveenv ; saveenv
|
||||
+_firstboot=setenv _firstboot ; led bpi-r64:pio:blue on ; run _switch_to_menu ; run _init_env ; run boot_first
|
||||
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
|
||||
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title [33m$ver[0m"
|
||||
436
package/boot/uboot-mediatek/patches/020-add-linksys-e8450.patch
Normal file
436
package/boot/uboot-mediatek/patches/020-add-linksys-e8450.patch
Normal file
@ -0,0 +1,436 @@
|
||||
--- /dev/null
|
||||
+++ b/configs/mt7622_linksys_e8450_defconfig
|
||||
@@ -0,0 +1,130 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_POSITION_INDEPENDENT=y
|
||||
+CONFIG_ARCH_MEDIATEK=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x41e00000
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
+CONFIG_USE_DEFAULT_ENV_FILE=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_BOOTP_SEND_HOSTNAME=y
|
||||
+CONFIG_DEFAULT_ENV_FILE="linksys_e8450_env"
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="mt7622-linksys-e8450-ubi"
|
||||
+CONFIG_SMBIOS_PRODUCT_NAME=""
|
||||
+CONFIG_AUTOBOOT_KEYED=y
|
||||
+CONFIG_BOOTDELAY=30
|
||||
+CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||
+CONFIG_CFB_CONSOLE_ANSI=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+CONFIG_LOGLEVEL=7
|
||||
+CONFIG_LOG=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="mt7622-linksys-e8450"
|
||||
+CONFIG_SYS_PROMPT="MT7622> "
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_BOOTP=y
|
||||
+CONFIG_CMD_BUTTON=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_ECHO=y
|
||||
+CONFIG_CMD_ENV_READMEM=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_EXT4=y
|
||||
+CONFIG_CMD_FAT=y
|
||||
+CONFIG_CMD_FS_GENERIC=y
|
||||
+CONFIG_CMD_FS_UUID=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_ITEST=y
|
||||
+CONFIG_CMD_LED=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+CONFIG_CMD_MBR=y
|
||||
+CONFIG_CMD_MTD=y
|
||||
+CONFIG_CMD_MTDPART=y
|
||||
+CONFIG_CMD_NAND=y
|
||||
+CONFIG_CMD_PCI=y
|
||||
+CONFIG_CMD_SF_TEST=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
+CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_TFTPBOOT=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_UBI=y
|
||||
+CONFIG_CMD_UBI_RENAME=y
|
||||
+CONFIG_CMD_UBIFS=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_PART=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_SETEXPR=y
|
||||
+CONFIG_CMD_SLEEP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_SOURCE=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_DISPLAY_CPUINFO=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_REGULATOR_GPIO=y
|
||||
+CONFIG_DM_USB=y
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_ENV_IS_IN_UBI=y
|
||||
+CONFIG_ENV_UBI_PART="ubi"
|
||||
+CONFIG_ENV_UBI_VOLUME="ubootenv"
|
||||
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_VERSION_VARIABLE=y
|
||||
+CONFIG_PARTITION_UUIDS=y
|
||||
+CONFIG_NETCONSOLE=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_DM_MTD=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PCI=y
|
||||
+CONFIG_MTD=y
|
||||
+CONFIG_MTD_RAW_NAND=y
|
||||
+CONFIG_MTD_UBI_FASTMAP=y
|
||||
+CONFIG_DM_PCI=y
|
||||
+CONFIG_PCIE_MEDIATEK=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7622=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_PRE_CONSOLE_BUFFER=y
|
||||
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_RAM=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_SPI=y
|
||||
+CONFIG_DM_SPI=y
|
||||
+CONFIG_MTK_SNFI_SPI=y
|
||||
+CONFIG_MTK_SPI_NAND=y
|
||||
+CONFIG_NAND_SUPPORT=y
|
||||
+CONFIG_SYSRESET_WATCHDOG=y
|
||||
+CONFIG_TIMER=y
|
||||
+CONFIG_MTK_TIMER=y
|
||||
+CONFIG_WDT_MTK=y
|
||||
+CONFIG_LZO=y
|
||||
+CONFIG_ZSTD=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_RANDOM_UUID=y
|
||||
+CONFIG_REGEX=y
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_USB_HOST=y
|
||||
+CONFIG_USB_XHCI_HCD=y
|
||||
+CONFIG_USB_XHCI_MTK=y
|
||||
+CONFIG_USB_STORAGE=y
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/mt7622-linksys-e8450-ubi.dts
|
||||
@@ -0,0 +1,206 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * Copyright (c) 2019 MediaTek Inc.
|
||||
+ * Author: Sam Shih <sam.shih@mediatek.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "mt7622.dtsi"
|
||||
+#include "mt7622-u-boot.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ model = "mt7622-linksys-e8450-ubi";
|
||||
+ compatible = "mediatek,mt7622", "linksys,e8450-ubi";
|
||||
+ chosen {
|
||||
+ stdout-path = &uart0;
|
||||
+ tick-timer = &timer0;
|
||||
+ };
|
||||
+
|
||||
+ aliases {
|
||||
+ spi0 = &snfi;
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+
|
||||
+ factory {
|
||||
+ label = "reset";
|
||||
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ wps {
|
||||
+ label = "wps";
|
||||
+ gpios = <&gpio 102 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ led_power: power_blue {
|
||||
+ label = "power:blue";
|
||||
+ gpios = <&gpio 95 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "on";
|
||||
+ };
|
||||
+
|
||||
+ power_orange {
|
||||
+ label = "power:orange";
|
||||
+ gpios = <&gpio 96 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+
|
||||
+ inet_blue {
|
||||
+ label = "inet:blue";
|
||||
+ gpios = <&gpio 97 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+
|
||||
+ inet_orange {
|
||||
+ label = "inet:orange";
|
||||
+ gpios = <&gpio 98 GPIO_ACTIVE_LOW>;
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ memory@40000000 {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x40000000 0x20000000>;
|
||||
+ };
|
||||
+
|
||||
+ reg_1p8v: regulator-1p8v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "fixed-1.8V";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ reg_3p3v: regulator-3p3v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "fixed-3.3V";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ reg_5v: regulator-5v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "fixed-5V";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pcie {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pcie0_pins>, <&pcie1_pins>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ pcie@0,0 {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ pcie@1,0 {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ pcie0_pins: pcie0-pins {
|
||||
+ mux {
|
||||
+ function = "pcie";
|
||||
+ groups = "pcie0_pad_perst",
|
||||
+ "pcie0_1_waken",
|
||||
+ "pcie0_1_clkreq";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pcie1_pins: pcie1-pins {
|
||||
+ mux {
|
||||
+ function = "pcie";
|
||||
+ groups = "pcie1_pad_perst",
|
||||
+ "pcie1_0_waken",
|
||||
+ "pcie1_0_clkreq";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ snfi_pins: snfi-pins {
|
||||
+ mux {
|
||||
+ function = "flash";
|
||||
+ groups = "snfi";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ uart0_pins: uart0 {
|
||||
+ mux {
|
||||
+ function = "uart";
|
||||
+ groups = "uart0_0_tx_rx" ;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ watchdog_pins: watchdog-default {
|
||||
+ mux {
|
||||
+ function = "watchdog";
|
||||
+ groups = "watchdog";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&snfi {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&snfi_pins>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ mediatek,bmt-v2;
|
||||
+
|
||||
+ spi-flash@0{
|
||||
+ compatible = "jedec,spi-nor";
|
||||
+ reg = <0>;
|
||||
+ u-boot,dm-pre-reloc;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&nandc {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&watchdog {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&watchdog_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+ð {
|
||||
+ status = "okay";
|
||||
+ mediatek,gmac-id = <0>;
|
||||
+ phy-mode = "sgmii";
|
||||
+ mediatek,switch = "mt7531";
|
||||
+ reset-gpios = <&gpio 54 GPIO_ACTIVE_HIGH>;
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&ssusb {
|
||||
+ vusb33-supply = <®_3p3v>;
|
||||
+ vbus-supply = <®_5v>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u3phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -963,6 +963,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
|
||||
mt7622-rfb.dtb \
|
||||
mt7623a-unielec-u7623-02-emmc.dtb \
|
||||
mt7622-bananapi-bpi-r64.dtb \
|
||||
+ mt7622-linksys-e8450-ubi.dtb \
|
||||
mt7623n-bananapi-bpi-r2.dtb \
|
||||
mt7629-rfb.dtb \
|
||||
mt8512-bm1-emmc.dtb \
|
||||
--- a/drivers/mtd/nandx/core/nand/device_spi.c
|
||||
+++ b/drivers/mtd/nandx/core/nand/device_spi.c
|
||||
@@ -150,6 +150,21 @@ static struct device_spi spi_nand[] = {
|
||||
&spi_extend_cmds, 0xff, 0xff
|
||||
},
|
||||
{
|
||||
+ NAND_DEVICE("FM35X1GA",
|
||||
+ NAND_PACK_ID(0xe5, 0x71, 0, 0, 0, 0, 0, 0),
|
||||
+ 2, 0, 3, 3,
|
||||
+ 1, 1, 1, 1024, KB(128), KB(2), 64, 1,
|
||||
+ &spi_cmds, &spi_addressing, &spi_status[0],
|
||||
+ &spi_endurance, &spi_array_timing),
|
||||
+ {
|
||||
+ NAND_SPI_PROTECT(0xa0, 1, 2, 6),
|
||||
+ NAND_SPI_CONFIG(0xb0, 4, 6, 1),
|
||||
+ NAND_SPI_STATUS(0xc0, 4, 5),
|
||||
+ NAND_SPI_CHARACTER(0xff, 0xff, 0xff, 0xff)
|
||||
+ },
|
||||
+ &spi_extend_cmds, 0xff, 0xff
|
||||
+ },
|
||||
+ {
|
||||
NAND_DEVICE("NO-DEVICE",
|
||||
NAND_PACK_ID(0, 0, 0, 0, 0, 0, 0, 0), 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 1,
|
||||
--- /dev/null
|
||||
+++ b/linksys_e8450_env
|
||||
@@ -0,0 +1,57 @@
|
||||
+mtdparts=nand0:512k(bl2),1280k(fip),1024k(factory),256k(reserved),-(ubi)
|
||||
+ethaddr_factory=nand read 0x40080000 0x220000 0x20000 && env readmem -b ethaddr 0x4009fff4 0x6 ; setenv ethaddr_factory
|
||||
+ipaddr=192.168.1.1
|
||||
+serverip=192.168.1.254
|
||||
+loadaddr=0x4007ff28
|
||||
+bootcmd=run boot_ubi
|
||||
+bootdelay=0
|
||||
+bootfile=openwrt-mediatek-mt7622-linksys_e8450-ubi-initramfs-recovery.itb
|
||||
+bootfile_bl2=openwrt-mediatek-mt7622-linksys_e8450-ubi-preloader.bin
|
||||
+bootfile_fip=openwrt-mediatek-mt7622-linksys_e8450-ubi-bl31-uboot.fip
|
||||
+bootfile_upg=openwrt-mediatek-mt7622-linksys_e8450-ubi-squashfs-sysupgrade.itb
|
||||
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu
|
||||
+bootmenu_default=0
|
||||
+bootmenu_delay=0
|
||||
+bootmenu_title= [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )[0m
|
||||
+bootmenu_0=0. Initialize environment.=run _firstboot
|
||||
+bootmenu_0d=0. Run default boot command.=run boot_default
|
||||
+bootmenu_1=1. Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
|
||||
+bootmenu_3=2. Boot production system from flash.=run boot_production ; run bootmenu_confirm_return
|
||||
+bootmenu_2=3. Boot recovery system from flash.=run boot_recovery ; run bootmenu_confirm_return
|
||||
+bootmenu_5=4. Load production system via TFTP then write to flash.=setenv noboot 1 ; run boot_tftp_production ; setenv noboot ; run bootmenu_confirm_return
|
||||
+bootmenu_4=5. Load recovery system via TFTP then write to flash.=setenv noboot 1 ; run boot_tftp_recovery ; setenv noboot ; run bootmenu_confirm_return
|
||||
+bootmenu_6=[31m6. Load BL31+U-Boot FIP via TFTP then write to flash.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
|
||||
+bootmenu_7=[31m7. Load BL2 preloader via TFTP then write to flash.[0m=run boot_tftp_write_preloader ; run bootmenu_confirm_return
|
||||
+bootmenu_8=8. Reboot.=reset
|
||||
+bootmenu_9=9. Reset all settings to factory defaults.=run reset_factory ; reset
|
||||
+boot_first=if button reset ; then run boot_tftp_forever ; fi ; setenv flag_recover 1 ; bootmenu
|
||||
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; run boot_tftp_forever
|
||||
+boot_production=led power:blue on ; run ubi_read_production && bootm $loadaddr
|
||||
+boot_production_or_recovery=run boot_production ; run boot_recovery
|
||||
+boot_recovery=led power:blue off ; led power:orange on ; run check_recovery
|
||||
+boot_serial_write_fip=loadx $loadaddr 115200 && run boot_write_fip
|
||||
+boot_serial_write_preloader=loadx $loadaddr 115200 && run boot_write_preloader
|
||||
+boot_tftp_forever=led inet:blue on ; while true ; do run boot_tftp_recovery ; led inet:blue off ; led inet:orange on ; sleep 1 ; done
|
||||
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && iminfo $loadaddr && ubi part ubi && run ubi_write_production ubi_prepare_rootfs ; if env exists noboot ; then else bootm $loadaddr ; fi
|
||||
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && ubi part ubi && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr ; fi
|
||||
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr
|
||||
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run boot_write_fip
|
||||
+boot_tftp_write_preloader=tftpboot $loadaddr $bootfile_bl2 && run boot_write_preloader
|
||||
+boot_ubi=ubi part ubi && run boot_production_or_recovery
|
||||
+boot_write_fip=nand erase 0x80000 0x140000 && nand write $loadaddr 0x80000 0x140000
|
||||
+boot_write_preloader=nand erase 0x0 0x80000 && nand write $loadaddr 0x0 0x20000 && nand write $loadaddr 0x20000 0x20000 && nand write $loadaddr 0x40000 0x20000 && nand write $loadaddr 0x60000 0x20000
|
||||
+check_recovery=run ubi_read_recovery ; if iminfo $loadaddr ; then bootm $loadaddr ; else ubi remove recovery ; fi
|
||||
+check_ubi=ubi part ubi || run ubi_format
|
||||
+reset_factory=ubi part ubi ; ubi write 0x0 ubootenv 0x0 ; ubi write 0x0 ubootenv2 0x0 ; ubi remove rootfs_data
|
||||
+ubi_format=ubi detach ; nand erase 0x300000 0x7D00000 && ubi part ubi ; reset
|
||||
+ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
|
||||
+ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
|
||||
+ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
|
||||
+ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
|
||||
+ubi_write_production=run ubi_remove_rootfs ; ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
|
||||
+ubi_write_recovery=run ubi_remove_rootfs ; ubi check recovery && ubi remove recovery; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
|
||||
+_create_env=ubi create ubootenv 0x100000 dynamic ; ubi create ubootenv2 0x100000 dynamic
|
||||
+_init_env=setenv _init_env ; if ubi check ubootenv && ubi check ubootenv2 ; then else run _create_env ; fi ; setenv _create_env ; saveenv || run ubi_format ; saveenv || run ubi_format
|
||||
+_firstboot=setenv _firstboot ; led power:orange on ; run _switch_to_menu ; run ethaddr_factory ; run check_ubi ; run _init_env ; run boot_first
|
||||
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
|
||||
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title [33m$ver[0m"
|
||||
@ -0,0 +1,11 @@
|
||||
--- a/include/configs/mt7622.h
|
||||
+++ b/include/configs/mt7622.h
|
||||
@@ -37,7 +37,7 @@
|
||||
#endif
|
||||
|
||||
#define CONFIG_SYS_MAXARGS 8
|
||||
-#define CONFIG_SYS_BOOTM_LEN SZ_64M
|
||||
+#define CONFIG_SYS_BOOTM_LEN SZ_128M
|
||||
#define CONFIG_SYS_CBSIZE SZ_1K
|
||||
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
|
||||
sizeof(CONFIG_SYS_PROMPT) + 16)
|
||||
@ -0,0 +1,10 @@
|
||||
--- a/include/linux/types.h
|
||||
+++ b/include/linux/types.h
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef _LINUX_TYPES_H
|
||||
#define _LINUX_TYPES_H
|
||||
|
||||
+typedef unsigned long long __u64;
|
||||
#include <linux/posix_types.h>
|
||||
#include <asm/types.h>
|
||||
#include <stdbool.h>
|
||||
@ -42,7 +42,7 @@ define Package/b43legacy-firmware/config
|
||||
depends on B43LEGACY_FW_SQUASH
|
||||
default "1,2,3,4"
|
||||
help
|
||||
This is a comma seperated list of core revision numbers.
|
||||
This is a comma separated list of core revision numbers.
|
||||
|
||||
Example (keep files for rev4 only):
|
||||
4
|
||||
|
||||
@ -32,7 +32,7 @@ config VOICE_CPE_TAPI_DECT
|
||||
config VOICE_CPE_TAPI_KPI
|
||||
bool "KPI (Kernel Packet Interface)"
|
||||
depends on PACKAGE_kmod-ltq-tapi
|
||||
default y
|
||||
default n
|
||||
help
|
||||
Option to enable the generic kernel level packet interface
|
||||
which allows accelerated packet transfer for various purposes.
|
||||
@ -43,7 +43,7 @@ config VOICE_CPE_TAPI_KPI
|
||||
config VOICE_CPE_TAPI_QOS
|
||||
bool "QOS for accelerated RTP packet handling"
|
||||
depends on PACKAGE_kmod-ltq-tapi
|
||||
default y
|
||||
default n
|
||||
help
|
||||
Option to enable an accelerated RTP packet transfer inside
|
||||
the LINUX kernel space. This option requires the KPI2UDP
|
||||
|
||||
@ -56,6 +56,15 @@ MAKE_FLAGS += \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
SHELL="$(BASH)"
|
||||
|
||||
# ltq-vdsl-app uses a header provided by the MEI driver which has some
|
||||
# conditionals.
|
||||
# Define the conditionals here to have the same view on both sides. If you
|
||||
# change them, you need to change them for the ltq-vdsl-app as well
|
||||
MEI_DRV_CFLAGS = \
|
||||
-DMEI_DRV_ATM_PTM_INTERFACE_ENABLE=1 \
|
||||
-DMEI_SUPPORT_DEBUG_STREAMS=1 \
|
||||
-DMEI_SUPPORT_OPTIMIZED_FW_DL=1
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-kernelincl="$(LINUX_DIR)/include" \
|
||||
--enable-device=vr9 \
|
||||
@ -65,7 +74,7 @@ CONFIGURE_ARGS += \
|
||||
--enable-error_print \
|
||||
--enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos/" \
|
||||
--enable-ifxos-library="-L$(STAGING_DIR)/usr/lib" \
|
||||
--enable-add_drv_cflags="-DMEI_DRV_ATM_PTM_INTERFACE_ENABLE=1" \
|
||||
--enable-add_drv_cflags="$(MEI_DRV_CFLAGS)" \
|
||||
--enable-linux-26 \
|
||||
--enable-kernelbuild="$(LINUX_DIR)" \
|
||||
--enable-drv_test_appl=yes \
|
||||
|
||||
@ -919,7 +919,6 @@ define KernelPackage/zram
|
||||
CONFIG_ZSMALLOC \
|
||||
CONFIG_ZRAM \
|
||||
CONFIG_ZRAM_DEBUG=n \
|
||||
CONFIG_PGTABLE_MAPPING=n \
|
||||
CONFIG_ZRAM_WRITEBACK=n \
|
||||
CONFIG_ZSMALLOC_STAT=n
|
||||
FILES:= \
|
||||
|
||||
@ -209,7 +209,7 @@ config PACKAGE_B43_USE_BCMA
|
||||
default "16,28,29,30" if TARGET_bcm47xx_mips74k
|
||||
default "5,6,7,8,9,10,11,13,15,16,28,29,30"
|
||||
help
|
||||
This is a comma seperated list of core revision numbers.
|
||||
This is a comma separated list of core revision numbers.
|
||||
|
||||
Example (keep files for rev5 only):
|
||||
5
|
||||
@ -224,7 +224,7 @@ config PACKAGE_B43_USE_BCMA
|
||||
default "N,HT" if TARGET_bcm47xx_mips74k
|
||||
default "G,N,LP,HT"
|
||||
help
|
||||
This is a comma seperated list of PHY types:
|
||||
This is a comma separated list of PHY types:
|
||||
A => A-PHY
|
||||
AG => Dual A-PHY G-PHY
|
||||
G => G-PHY
|
||||
|
||||
@ -8,22 +8,21 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libpcap
|
||||
PKG_VERSION:=1.9.1
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=1.10.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://www.us.tcpdump.org/release/ \
|
||||
http://www.tcpdump.org/release/
|
||||
PKG_HASH:=635237637c5b619bcceba91900666b64d56ecb7be63f298f601ec786ce087094
|
||||
PKG_HASH:=8d12b42623eeefee872f123bd0dc85d535b00df4d42e865f993c40f7bfc92b1e
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_ASLR_PIE_REGULAR:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
@ -48,11 +47,16 @@ endef
|
||||
CMAKE_OPTIONS += \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_WITH_LIBNL=OFF \
|
||||
-DINET6=O$(if $(CONFIG_IPV6),N,FF) \
|
||||
-DPCAP_SUPPORT_NETFILTER=O$(if $(CONFIG_PCAP_HAS_NETFILTER),N,FF)
|
||||
|
||||
# grep 'option(DISABLE_' CMakeLists.txt | cut -f2 -d'(' | cut -f1 -d' ' | sort --unique
|
||||
CMAKE_OPTIONS += \
|
||||
-DDISABLE_BLUETOOTH=O$(if $(CONFIG_PCAP_HAS_BT),FF,N) \
|
||||
-DDISABLE_DAG=ON \
|
||||
-DDISABLE_DBUS=ON \
|
||||
-DDISABLE_DPDK=ON \
|
||||
-DDISABLE_LINUX_USBMON=O$(if $(CONFIG_PCAP_HAS_USB),FF,N) \
|
||||
-DDISABLE_NETMAP=ON \
|
||||
-DDISABLE_RDMA=ON \
|
||||
-DDISABLE_SEPTEL=ON \
|
||||
@ -64,12 +68,6 @@ CMAKE_OPTIONS += \
|
||||
-DBDEBUG=OFF \
|
||||
-DYYDEBUG=OFF \
|
||||
|
||||
CMAKE_OPTIONS += $(if $(CONFIG_PCAP_HAS_USB) ,,-DDISABLE_USB=ON)
|
||||
CMAKE_OPTIONS += $(if $(CONFIG_PCAP_HAS_BT) ,,-DDISABLE_BLUETOOTH=ON)
|
||||
CMAKE_OPTIONS += $(if $(CONFIG_PCAP_HAS_NETFILTER) ,,-DPCAP_SUPPORT_NETFILTER=OFF)
|
||||
|
||||
CMAKE_OPTIONS += $(if $(CONFIG_IPV6),-DINET6=ON,-DINET6=OFF)
|
||||
|
||||
define Build/InstallDev
|
||||
$(call Build/InstallDev/cmake,$(1))
|
||||
$(SED) \
|
||||
|
||||
10
package/libs/libpcap/patches/100-no-openssl.patch
Normal file
10
package/libs/libpcap/patches/100-no-openssl.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1006,7 +1006,6 @@ endif()
|
||||
#
|
||||
# OpenSSL/libressl.
|
||||
#
|
||||
-find_package(OpenSSL)
|
||||
if(OPENSSL_FOUND)
|
||||
#
|
||||
# We have OpenSSL.
|
||||
@ -7,69 +7,63 @@ Subject: [PATCH] skip manpages
|
||||
CMakeLists.txt | 55 --------------------------------------------------
|
||||
1 file changed, 55 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 55b93f14..acf1a904 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -2397,61 +2397,6 @@ if(NOT MSVC)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpcap.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc @ONLY)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pcap-config DESTINATION bin)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc DESTINATION lib/pkgconfig)
|
||||
@@ -2701,57 +2701,6 @@ if(NOT MSVC)
|
||||
if(MINGW)
|
||||
find_program(LINK_EXECUTABLE ln)
|
||||
endif(MINGW)
|
||||
- if(UNIX OR (MINGW AND LINK_EXECUTABLE))
|
||||
- set(MAN1 "")
|
||||
- foreach(MANPAGE ${MAN1_NOEXPAND})
|
||||
- set(MAN1 ${MAN1} ${CMAKE_CURRENT_SOURCE_DIR}/${MANPAGE})
|
||||
- endforeach(MANPAGE)
|
||||
- install(FILES ${MAN1} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
||||
-
|
||||
- #
|
||||
- # Man pages.
|
||||
- #
|
||||
- # For each section of the manual for which we have man pages
|
||||
- # that require macro expansion, do the expansion.
|
||||
- #
|
||||
- set(MAN1 "")
|
||||
- foreach(MANPAGE ${MAN1_NOEXPAND})
|
||||
- set(MAN1 ${MAN1} ${CMAKE_CURRENT_SOURCE_DIR}/${MANPAGE})
|
||||
- endforeach(MANPAGE)
|
||||
- install(FILES ${MAN1} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
||||
- set(MAN3PCAP "")
|
||||
- foreach(MANPAGE ${MAN3PCAP_NOEXPAND})
|
||||
- set(MAN3PCAP ${MAN3PCAP} ${CMAKE_CURRENT_SOURCE_DIR}/${MANPAGE})
|
||||
- endforeach(MANPAGE)
|
||||
- foreach(TEMPLATE_MANPAGE ${MAN3PCAP_EXPAND})
|
||||
- string(REPLACE ".in" "" MANPAGE ${TEMPLATE_MANPAGE})
|
||||
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE} @ONLY)
|
||||
- set(MAN3PCAP ${MAN3PCAP} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE})
|
||||
- endforeach(TEMPLATE_MANPAGE)
|
||||
- install(FILES ${MAN3PCAP} DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_datalink_val_to_name.3pcap pcap_datalink_val_to_description.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_datalink_val_to_name.3pcap pcap_datalink_val_to_description_or_dlt.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_dump_open.3pcap pcap_dump_fopen.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_findalldevs.3pcap pcap_freealldevs.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_geterr.3pcap pcap_perror.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_inject.3pcap pcap_sendpacket.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_list_datalinks.3pcap pcap_free_datalinks.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_list_tstamp_types.3pcap pcap_free_tstamp_types.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_loop.3pcap pcap_dispatch.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_major_version.3pcap pcap_minor_version.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_next_ex.3pcap pcap_next.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_open_dead.3pcap pcap_open_dead_with_tstamp_precision.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_open_offline.3pcap pcap_open_offline_with_tstamp_precision.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_open_offline.3pcap pcap_fopen_offline.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_open_offline.3pcap pcap_fopen_offline_with_tstamp_precision.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_tstamp_type_val_to_name.3pcap pcap_tstamp_type_val_to_description.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_setnonblock.3pcap pcap_getnonblock.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
-
|
||||
- set(MAN3PCAP "")
|
||||
- foreach(MANPAGE ${MAN3PCAP_NOEXPAND})
|
||||
- set(MAN3PCAP ${MAN3PCAP} ${CMAKE_CURRENT_SOURCE_DIR}/${MANPAGE})
|
||||
- endforeach(MANPAGE)
|
||||
- foreach(TEMPLATE_MANPAGE ${MAN3PCAP_EXPAND})
|
||||
- string(REPLACE ".in" "" MANPAGE ${TEMPLATE_MANPAGE})
|
||||
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE} @ONLY)
|
||||
- set(MAN3PCAP ${MAN3PCAP} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE})
|
||||
- endforeach(TEMPLATE_MANPAGE)
|
||||
- install(FILES ${MAN3PCAP} DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_datalink_val_to_name.3pcap pcap_datalink_val_to_description.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_dump_open.3pcap pcap_dump_fopen.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_findalldevs.3pcap pcap_freealldevs.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_geterr.3pcap pcap_perror.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_inject.3pcap pcap_sendpacket.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_list_datalinks.3pcap pcap_free_datalinks.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_list_tstamp_types.3pcap pcap_free_tstamp_types.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_loop.3pcap pcap_dispatch.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_major_version.3pcap pcap_minor_version.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_next_ex.3pcap pcap_next.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_open_dead.3pcap pcap_open_dead_with_tstamp_precision.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_open_offline.3pcap pcap_open_offline_with_tstamp_precision.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_open_offline.3pcap pcap_fopen_offline.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_open_offline.3pcap pcap_fopen_offline_with_tstamp_precision.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_tstamp_type_val_to_name.3pcap pcap_tstamp_type_val_to_description.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- install_manpage_symlink(pcap_setnonblock.3pcap pcap_getnonblock.3pcap ${CMAKE_INSTALL_MANDIR}/man3)
|
||||
- set(MANFILE "")
|
||||
- foreach(TEMPLATE_MANPAGE ${MANFILE_EXPAND})
|
||||
- string(REPLACE ".manfile.in" ".${MAN_FILE_FORMATS}" MANPAGE ${TEMPLATE_MANPAGE})
|
||||
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE} @ONLY)
|
||||
- set(MANFILE ${MANFILE} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE})
|
||||
- endforeach(TEMPLATE_MANPAGE)
|
||||
- install(FILES ${MANFILE} DESTINATION ${CMAKE_INSTALL_MANDIR}/man${MAN_FILE_FORMATS})
|
||||
-
|
||||
- set(MANFILE "")
|
||||
- foreach(TEMPLATE_MANPAGE ${MANFILE_EXPAND})
|
||||
- string(REPLACE ".manfile.in" ".${MAN_FILE_FORMATS}" MANPAGE ${TEMPLATE_MANPAGE})
|
||||
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE} @ONLY)
|
||||
- set(MANFILE ${MANFILE} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE})
|
||||
- endforeach(TEMPLATE_MANPAGE)
|
||||
- install(FILES ${MANFILE} DESTINATION ${CMAKE_INSTALL_MANDIR}/man${MAN_FILE_FORMATS})
|
||||
-
|
||||
- set(MANMISC "")
|
||||
- foreach(TEMPLATE_MANPAGE ${MANMISC_EXPAND})
|
||||
- string(REPLACE ".manmisc.in" ".${MAN_MISC_INFO}" MANPAGE ${TEMPLATE_MANPAGE})
|
||||
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE} @ONLY)
|
||||
- set(MANMISC ${MANMISC} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE})
|
||||
- endforeach(TEMPLATE_MANPAGE)
|
||||
- install(FILES ${MANMISC} DESTINATION ${CMAKE_INSTALL_MANDIR}/man${MAN_MISC_INFO})
|
||||
- set(MANMISC "")
|
||||
- foreach(TEMPLATE_MANPAGE ${MANMISC_EXPAND})
|
||||
- string(REPLACE ".manmisc.in" ".${MAN_MISC_INFO}" MANPAGE ${TEMPLATE_MANPAGE})
|
||||
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE} @ONLY)
|
||||
- set(MANMISC ${MANMISC} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE})
|
||||
- endforeach(TEMPLATE_MANPAGE)
|
||||
- install(FILES ${MANMISC} DESTINATION ${CMAKE_INSTALL_MANDIR}/man${MAN_MISC_INFO})
|
||||
- endif(UNIX OR (MINGW AND LINK_EXECUTABLE))
|
||||
endif(NOT MSVC)
|
||||
|
||||
# uninstall target
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
|
||||
Copyright (C) 2006 Markus Wigge
|
||||
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -59,7 +59,7 @@ MKDEP = @MKDEP@
|
||||
CCOPT = @V_CCOPT@
|
||||
SHLIB_CCOPT = @V_SHLIB_CCOPT@
|
||||
INCLS = -I. @V_INCLS@
|
||||
-DEFS = -DBUILDING_PCAP -Dpcap_EXPORTS @DEFS@ @V_DEFS@
|
||||
+DEFS = -DBUILDING_PCAP -D_BSD_SOURCE -Dpcap_EXPORTS @DEFS@ @V_DEFS@
|
||||
ADDLOBJS = @ADDLOBJS@
|
||||
ADDLARCHIVEOBJS = @ADDLARCHIVEOBJS@
|
||||
LIBS = @LIBS@
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/pcap-common.c
|
||||
+++ b/pcap-common.c
|
||||
@@ -1570,14 +1570,23 @@ swap_pseudo_headers(int linktype, struct
|
||||
@@ -1662,14 +1662,23 @@ swap_pseudo_headers(int linktype, struct
|
||||
break;
|
||||
|
||||
case DLT_USB_LINUX:
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
--- a/pcap-linux.c
|
||||
+++ b/pcap-linux.c
|
||||
@@ -263,6 +263,8 @@
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
|
||||
+#undef IW_MODE_MONITOR
|
||||
+
|
||||
#ifndef MSG_TRUNC
|
||||
/*
|
||||
* This is being compiled on a system that lacks MSG_TRUNC; define it
|
||||
@ -1,13 +0,0 @@
|
||||
Fix USB bus path; /proc/bus/usb is deprecated.
|
||||
|
||||
--- a/pcap-usb-linux.c
|
||||
+++ b/pcap-usb-linux.c
|
||||
@@ -73,7 +73,7 @@
|
||||
#define USB_TEXT_DIR_OLD "/sys/kernel/debug/usbmon"
|
||||
#define USB_TEXT_DIR "/sys/kernel/debug/usb/usbmon"
|
||||
#define SYS_USB_BUS_DIR "/sys/bus/usb/devices"
|
||||
-#define PROC_USB_BUS_DIR "/proc/bus/usb"
|
||||
+#define PROC_USB_BUS_DIR "/dev/bus/usb"
|
||||
#define USB_LINE_LEN 4096
|
||||
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
@ -32,7 +32,7 @@ define Package/libunwind
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=The libunwind project
|
||||
URL:=http://www.nongnu.org/libunwind/
|
||||
DEPENDS:=@((mips||mipsel||x86_64||arm||aarch64)||(USE_GLIBC&&(powerpc||i386))) +zlib
|
||||
DEPENDS:=@((mips||mipsel||mips64||x86_64||arm||aarch64)||(USE_GLIBC&&(powerpc||i386))) +zlib
|
||||
ABI_VERSION:=8
|
||||
endef
|
||||
|
||||
|
||||
@ -36,6 +36,18 @@ define Package/ltq-vdsl-app/description
|
||||
Userland tool needed to control Lantiq VDSL CPE
|
||||
endef
|
||||
|
||||
# ltq-vdsl-app uses a header provided by the MEI driver which has some
|
||||
# conditionals.
|
||||
#
|
||||
# Define them here with the default values they would get in the MEI driver,
|
||||
# have the same view on both sides.
|
||||
#
|
||||
# If you change them, you need to change them for the ltq-vdsl-app as well
|
||||
VDSL_APP_CFLAGS = \
|
||||
-DMAX_CLI_PIPES=1 \
|
||||
-DMEI_SUPPORT_DEBUG_STREAMS=1 \
|
||||
-DMEI_SUPPORT_OPTIMIZED_FW_DL=1
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-vrx \
|
||||
--enable-vrx-device=vr9 \
|
||||
@ -44,10 +56,10 @@ CONFIGURE_ARGS += \
|
||||
--enable-ifxos \
|
||||
--enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos" \
|
||||
--enable-ifxos-library="-I$(STAGING_DIR)/usr/lib" \
|
||||
--enable-add-appl-cflags="-DMAX_CLI_PIPES=1" \
|
||||
--enable-add-appl-cflags="$(VDSL_APP_CFLAGS)" \
|
||||
--enable-debug \
|
||||
--disable-dti \
|
||||
--with-channels-per-line="1" \
|
||||
--with-channels-per-line="1"
|
||||
|
||||
#CONFIGURE_ARGS += --enable-model=full
|
||||
#CONFIGURE_ARGS += --enable-model=lite
|
||||
|
||||
@ -0,0 +1,45 @@
|
||||
From 8460e3230988ef2ec13ce6b69b687e941f6cdb32 Mon Sep 17 00:00:00 2001
|
||||
From: Jouni Malinen <jouni@codeaurora.org>
|
||||
Date: Tue, 8 Dec 2020 23:52:50 +0200
|
||||
Subject: [PATCH] P2P: Fix a corner case in peer addition based on PD Request
|
||||
|
||||
p2p_add_device() may remove the oldest entry if there is no room in the
|
||||
peer table for a new peer. This would result in any pointer to that
|
||||
removed entry becoming stale. A corner case with an invalid PD Request
|
||||
frame could result in such a case ending up using (read+write) freed
|
||||
memory. This could only by triggered when the peer table has reached its
|
||||
maximum size and the PD Request frame is received from the P2P Device
|
||||
Address of the oldest remaining entry and the frame has incorrect P2P
|
||||
Device Address in the payload.
|
||||
|
||||
Fix this by fetching the dev pointer again after having called
|
||||
p2p_add_device() so that the stale pointer cannot be used.
|
||||
|
||||
Fixes: 17bef1e97a50 ("P2P: Add peer entry based on Provision Discovery Request")
|
||||
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
|
||||
---
|
||||
src/p2p/p2p_pd.c | 12 +++++-------
|
||||
1 file changed, 5 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/src/p2p/p2p_pd.c
|
||||
+++ b/src/p2p/p2p_pd.c
|
||||
@@ -595,14 +595,12 @@ void p2p_process_prov_disc_req(struct p2
|
||||
goto out;
|
||||
}
|
||||
|
||||
+ dev = p2p_get_device(p2p, sa);
|
||||
if (!dev) {
|
||||
- dev = p2p_get_device(p2p, sa);
|
||||
- if (!dev) {
|
||||
- p2p_dbg(p2p,
|
||||
- "Provision Discovery device not found "
|
||||
- MACSTR, MAC2STR(sa));
|
||||
- goto out;
|
||||
- }
|
||||
+ p2p_dbg(p2p,
|
||||
+ "Provision Discovery device not found "
|
||||
+ MACSTR, MAC2STR(sa));
|
||||
+ goto out;
|
||||
}
|
||||
} else if (msg.wfd_subelems) {
|
||||
wpabuf_free(dev->info.wfd_subelems);
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=igmpproxy
|
||||
PKG_VERSION:=0.2.1
|
||||
PKG_RELEASE:=4
|
||||
PKG_VERSION:=0.3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/pali/igmpproxy/releases/download/${PKG_VERSION}/
|
||||
PKG_HASH:=d351e623037390f575c1203d9cbb7ba33a8bdef85a3c5e1d2901c5a2a38449a1
|
||||
PKG_HASH:=d1fc244cb2fbbf99f720bda3e841fe59ece9b6919073790b4b892739b1b844eb
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
@ -39,14 +39,6 @@ define Package/igmpproxy/conffiles
|
||||
/etc/config/igmpproxy
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += -Dlog=igmpproxy_log
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)/src \
|
||||
CC="$(TARGET_CC)" \
|
||||
CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
|
||||
endef
|
||||
|
||||
define Package/igmpproxy/install
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) ./files/igmpproxy.config $(1)/etc/config/igmpproxy
|
||||
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bpftools
|
||||
PKG_VERSION:=5.10.10
|
||||
PKG_VERSION:=5.11.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=linux-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/v5.x
|
||||
PKG_HASH:=60ed866fa951522a5255ea37ec3ac2006d3f3427d4783a13ef478464f37cdb19
|
||||
PKG_HASH:=904a5b3cbaf5264ef8da6c7a5445fa7ea19168ad77fb83a7cc1b8ba95d52d0a0
|
||||
|
||||
PKG_MAINTAINER:=Tony Ambardar <itugrok@yahoo.com>
|
||||
|
||||
|
||||
@ -39,8 +39,6 @@ Signed-off-by: Tony Ambardar <Tony.Ambardar@gmail.com>
|
||||
tools/arch/powerpc/include/uapi/asm/errno.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/tools/arch/powerpc/include/uapi/asm/errno.h b/tools/arch/powerpc/include/uapi/asm/errno.h
|
||||
index cc79856896a1..4ba87de32be0 100644
|
||||
--- a/tools/arch/powerpc/include/uapi/asm/errno.h
|
||||
+++ b/tools/arch/powerpc/include/uapi/asm/errno.h
|
||||
@@ -2,6 +2,7 @@
|
||||
@ -51,6 +49,3 @@ index cc79856896a1..4ba87de32be0 100644
|
||||
#include <asm-generic/errno.h>
|
||||
|
||||
#undef EDEADLOCK
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=iproute2
|
||||
PKG_VERSION:=5.10.0
|
||||
PKG_VERSION:=5.11.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
|
||||
PKG_HASH:=a54a34ae309c0406b2d1fb3a46158613ffb83d33fefd5d4a27f0010237ac53e9
|
||||
PKG_HASH:=c5e2ea108212b3445051b35953ec267f9f3469e1d5c67ac034ab559849505c54
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_DEPENDS:=iptables
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
@ -47,7 +47,7 @@ $(call Package/iproute2/Default)
|
||||
VARIANT:=full
|
||||
PROVIDES:=ip
|
||||
ALTERNATIVES:=300:/sbin/ip:/usr/libexec/ip-full
|
||||
DEPENDS:=+libnl-tiny +libelf +(PACKAGE_devlink||PACKAGE_rdma):libmnl
|
||||
DEPENDS:=+libnl-tiny +libbpf +(PACKAGE_devlink||PACKAGE_rdma):libmnl
|
||||
endef
|
||||
|
||||
define Package/tc
|
||||
@ -55,56 +55,59 @@ $(call Package/iproute2/Default)
|
||||
TITLE:=Traffic control utility
|
||||
VARIANT:=tc
|
||||
PROVIDES:=tc
|
||||
DEPENDS:=+kmod-sched-core +libxtables +libelf +(PACKAGE_devlink||PACKAGE_rdma):libmnl
|
||||
DEPENDS:=+kmod-sched-core +libxtables +libbpf +(PACKAGE_devlink||PACKAGE_rdma):libmnl
|
||||
endef
|
||||
|
||||
define Package/genl
|
||||
$(call Package/iproute2/Default)
|
||||
TITLE:=General netlink utility frontend
|
||||
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf
|
||||
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl
|
||||
endef
|
||||
|
||||
define Package/ip-bridge
|
||||
$(call Package/iproute2/Default)
|
||||
TITLE:=Bridge configuration utility from iproute2
|
||||
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf
|
||||
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl
|
||||
endef
|
||||
|
||||
define Package/ss
|
||||
$(call Package/iproute2/Default)
|
||||
TITLE:=Socket statistics utility
|
||||
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf +kmod-netlink-diag
|
||||
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +kmod-netlink-diag
|
||||
endef
|
||||
|
||||
define Package/nstat
|
||||
$(call Package/iproute2/Default)
|
||||
TITLE:=Network statistics utility
|
||||
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf
|
||||
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl
|
||||
endef
|
||||
|
||||
define Package/devlink
|
||||
$(call Package/iproute2/Default)
|
||||
TITLE:=Network devlink utility
|
||||
DEPENDS:=+libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf
|
||||
DEPENDS:=+libmnl
|
||||
endef
|
||||
|
||||
define Package/rdma
|
||||
$(call Package/iproute2/Default)
|
||||
TITLE:=Network rdma utility
|
||||
DEPENDS:=+libmnl +(PACKAGE_tc||PACKAGE_ip-full):libelf
|
||||
DEPENDS:=+libmnl
|
||||
endef
|
||||
|
||||
ifeq ($(BUILD_VARIANT),tiny)
|
||||
IP_CONFIG_TINY:=y
|
||||
LIBBPF_FORCE:=off
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),full)
|
||||
HAVE_ELF:=y
|
||||
LIBBPF_FORCE:=on
|
||||
HAVE_CAP:=n
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),tc)
|
||||
HAVE_ELF:=y
|
||||
LIBBPF_FORCE:=on
|
||||
SHARED_LIBS:=y
|
||||
endif
|
||||
|
||||
@ -122,26 +125,29 @@ define Build/Configure
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed
|
||||
TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny
|
||||
|
||||
MAKE_FLAGS += \
|
||||
KERNEL_INCLUDE="$(LINUX_DIR)/user_headers/include" \
|
||||
SHARED_LIBS=$(SHARED_LIBS) \
|
||||
IP_CONFIG_TINY=$(IP_CONFIG_TINY) \
|
||||
LIBBPF_FORCE=$(LIBBPF_FORCE) \
|
||||
HAVE_ELF=$(HAVE_ELF) \
|
||||
HAVE_MNL=$(HAVE_MNL) \
|
||||
HAVE_CAP=$(HAVE_CAP) \
|
||||
IPT_LIB_DIR=/usr/lib/iptables \
|
||||
XT_LIB_DIR=/usr/lib/iptables \
|
||||
FPIC="$(FPIC)"
|
||||
FPIC="$(FPIC)" \
|
||||
$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='')
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS)
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/include/iproute2
|
||||
$(CP) $(PKG_BUILD_DIR)/include/bpf_elf.h $(1)/usr/include/iproute2
|
||||
$(CP) $(PKG_BUILD_DIR)/include/{libgenl,libnetlink}.h $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/lib/libnetlink.a $(1)/usr/lib/
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -34,7 +34,8 @@ int main(int argc, char **argv) {
|
||||
@@ -39,7 +39,8 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
EOF
|
||||
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
CFLAGS := $(WFLAGS) $(CCOPTS) -I../include -I../include/uapi $(DEFINES) $(CFLAGS)
|
||||
YACCFLAGS = -d -t -v
|
||||
|
||||
-SUBDIRS=lib ip tc bridge misc netem genl tipc devlink rdma man
|
||||
+SUBDIRS=lib ip tc bridge misc genl tipc devlink rdma man
|
||||
-SUBDIRS=lib ip tc bridge misc netem genl tipc devlink rdma dcb man
|
||||
+SUBDIRS=lib ip tc bridge misc genl tipc devlink rdma dcb man
|
||||
|
||||
LIBNETLINK=../lib/libutil.a ../lib/libnetlink.a
|
||||
LDLIBS += $(LIBNETLINK)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/tc/q_fifo.c
|
||||
+++ b/tc/q_fifo.c
|
||||
@@ -99,5 +99,6 @@ struct qdisc_util pfifo_head_drop_qdisc_
|
||||
@@ -95,5 +95,6 @@ struct qdisc_util pfifo_head_drop_qdisc_
|
||||
|
||||
struct qdisc_util pfifo_fast_qdisc_util = {
|
||||
.id = "pfifo_fast",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -257,7 +257,7 @@ check_selinux()
|
||||
@@ -367,7 +367,7 @@ check_selinux()
|
||||
|
||||
check_mnl()
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -230,7 +230,7 @@ EOF
|
||||
@@ -235,7 +235,7 @@ EOF
|
||||
|
||||
check_elf()
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -315,7 +315,7 @@ EOF
|
||||
@@ -425,7 +425,7 @@ EOF
|
||||
|
||||
check_cap()
|
||||
{
|
||||
|
||||
@ -7,5 +7,5 @@
|
||||
-CFLAGS += -fPIC
|
||||
+CFLAGS += $(FPIC)
|
||||
|
||||
UTILOBJ = utils.o rt_names.o ll_map.o ll_types.o ll_proto.o ll_addr.o \
|
||||
inet_proto.o namespace.o json_writer.o json_print.o \
|
||||
UTILOBJ = utils.o utils_math.o rt_names.o ll_map.o ll_types.o ll_proto.o ll_addr.o \
|
||||
inet_proto.o namespace.o json_writer.o json_print.o json_print_math.o \
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
|
||||
--- a/ip/ip.c
|
||||
+++ b/ip/ip.c
|
||||
@@ -48,10 +48,16 @@ static void usage(void)
|
||||
@@ -64,10 +64,16 @@ static void usage(void)
|
||||
fprintf(stderr,
|
||||
"Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n"
|
||||
" ip [ -force ] -batch filename\n"
|
||||
@ -42,7 +42,7 @@
|
||||
" OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
|
||||
" -h[uman-readable] | -iec | -j[son] | -p[retty] |\n"
|
||||
" -f[amily] { inet | inet6 | mpls | bridge | link } |\n"
|
||||
@@ -74,36 +80,50 @@ static const struct cmd {
|
||||
@@ -90,36 +96,50 @@ static const struct cmd {
|
||||
int (*func)(int argc, char **argv);
|
||||
} cmds[] = {
|
||||
{ "address", do_ipaddr },
|
||||
@ -103,6 +103,6 @@
|
||||
+ CFLAGS += -DIPROUTE2_TINY
|
||||
+endif
|
||||
+
|
||||
UTILOBJ = utils.o rt_names.o ll_map.o ll_types.o ll_proto.o ll_addr.o \
|
||||
inet_proto.o namespace.o json_writer.o json_print.o \
|
||||
names.o color.o bpf.o exec.o fs.o cg_map.o
|
||||
UTILOBJ = utils.o utils_math.o rt_names.o ll_map.o ll_types.o ll_proto.o ll_addr.o \
|
||||
inet_proto.o namespace.o json_writer.o json_print.o json_print_math.o \
|
||||
names.o color.o bpf_legacy.o bpf_glue.o exec.o fs.o cg_map.o
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -301,14 +301,8 @@ EOF
|
||||
@@ -411,14 +411,8 @@ EOF
|
||||
if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then
|
||||
echo "no"
|
||||
else
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -244,7 +244,7 @@ check_elf()
|
||||
@@ -354,7 +354,7 @@ check_libbpf()
|
||||
check_selinux()
|
||||
# SELinux is a compile time option in the ss utility
|
||||
{
|
||||
|
||||
@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=fstools
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
|
||||
PKG_MIRROR_HASH:=a485792d90c71cd4fb396ce97f42a57ee4d2a3d78e5f3fd0748270ffb14209e6
|
||||
PKG_SOURCE_DATE:=2021-01-04
|
||||
PKG_SOURCE_VERSION:=c53b18820756f6f32ad0782d3bf489422b7c4ad3
|
||||
PKG_MIRROR_HASH:=ce8b2ecff1e4f5e0c45b707a4d34a34f313362edf52327ac255909f709d07182
|
||||
PKG_SOURCE_DATE:=2021-02-27
|
||||
PKG_SOURCE_VERSION:=bad1835f27ec31dbc30060b03cc714212275168a
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk
|
||||
PKG_NAME:=selinux-policy
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://git.defensec.nl/selinux-policy.git
|
||||
PKG_VERSION:=0.6
|
||||
PKG_MIRROR_HASH:=55a27eab67f39a03ba586691984a04234d16b97e816bca17ac42c94aae01c3c6
|
||||
PKG_VERSION:=0.7
|
||||
PKG_MIRROR_HASH:=f9c555dfa2bb16e6bfd86f1481aad26fce72e5aa45e297e1b39636b6dd0ce021
|
||||
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
|
||||
PKG_BUILD_DEPENDS:=secilc/host policycoreutils/host
|
||||
|
||||
|
||||
@ -30,7 +30,12 @@ get_dhcp_ntp_servers() {
|
||||
|
||||
validate_ntp_section() {
|
||||
uci_load_validate system timeserver "$1" "$2" \
|
||||
'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0' 'use_dhcp:bool:1' 'dhcp_interface:list(string)'
|
||||
'dhcp_interface:list(string)' \
|
||||
'enable_server:bool:0' \
|
||||
'enabled:bool:1' \
|
||||
'interface:string' \
|
||||
'server:list(host)' \
|
||||
'use_dhcp:bool:1'
|
||||
}
|
||||
|
||||
start_ntpd_instance() {
|
||||
@ -49,7 +54,10 @@ start_ntpd_instance() {
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG" -n -N
|
||||
[ "$enable_server" = "1" ] && procd_append_param command -l
|
||||
if [ "$enable_server" = "1" ]; then
|
||||
procd_append_param command -l
|
||||
[ -n "$interface" ] && procd_append_param command -I $interface
|
||||
fi
|
||||
[ -x "$HOTPLUG_SCRIPT" ] && procd_append_param command -S "$HOTPLUG_SCRIPT"
|
||||
for peer in $server; do
|
||||
procd_append_param command -p $peer
|
||||
|
||||
@ -33,7 +33,7 @@ sub target_config_features(@) {
|
||||
/^fpu$/ and $ret .= "\tselect HAS_FPU\n";
|
||||
/^spe_fpu$/ and $ret .= "\tselect HAS_SPE_FPU\n";
|
||||
/^ramdisk$/ and $ret .= "\tselect USES_INITRAMFS\n";
|
||||
/^seperate_ramdisk$/ and $ret .= "\tselect USES_INITRAMFS\n\tselect USES_SEPERATE_INITRAMFS\n";
|
||||
/^separate_ramdisk$/ and $ret .= "\tselect USES_INITRAMFS\n\tselect USES_SEPARATE_INITRAMFS\n";
|
||||
/^powerpc64$/ and $ret .= "\tselect powerpc64\n";
|
||||
/^nommu$/ and $ret .= "\tselect NOMMU\n";
|
||||
/^mips16$/ and $ret .= "\tselect HAS_MIPS16\n";
|
||||
|
||||
@ -51,7 +51,7 @@ config USES_DEVICETREE
|
||||
config USES_INITRAMFS
|
||||
bool
|
||||
|
||||
config USES_SEPERATE_INITRAMFS
|
||||
config USES_SEPARATE_INITRAMFS
|
||||
bool
|
||||
|
||||
config USES_SQUASHFS
|
||||
|
||||
@ -67,17 +67,20 @@
|
||||
|
||||
#define FIT_MAX_HASH_LEN HASH_MAX_DIGEST_SIZE
|
||||
|
||||
int fit_partition(struct parsed_partitions *state)
|
||||
#define MIN_FREE_SECT 16
|
||||
#define REMAIN_VOLNAME "rootfs_data"
|
||||
|
||||
int parse_fit_partitions(struct parsed_partitions *state, u64 fit_start_sector, u64 sectors, int *slot, int add_remain)
|
||||
{
|
||||
struct address_space *mapping = state->bdev->bd_inode->i_mapping;
|
||||
struct page *page = read_mapping_page(mapping, 0, NULL);
|
||||
struct page *page;
|
||||
void *fit, *init_fit;
|
||||
struct partition_meta_info *info;
|
||||
char tmp[sizeof(info->volname)];
|
||||
u64 dsize, dsectors;
|
||||
u64 dsize, dsectors, imgmaxsect = 0;
|
||||
u32 size, image_pos, image_len;
|
||||
const u32 *image_offset_be, *image_len_be, *image_pos_be;
|
||||
int ret = 1, node, images, config, slot;
|
||||
int ret = 1, node, images, config;
|
||||
const char *image_name, *image_type, *image_description, *config_default,
|
||||
*config_description, *config_loadables;
|
||||
int image_name_len, image_type_len, image_description_len, config_default_len,
|
||||
@ -85,6 +88,10 @@ int fit_partition(struct parsed_partitions *state)
|
||||
sector_t start_sect, nr_sects;
|
||||
size_t label_min;
|
||||
|
||||
if (fit_start_sector % (1<<(PAGE_SHIFT - SECTOR_SHIFT)))
|
||||
return -ERANGE;
|
||||
|
||||
page = read_mapping_page(mapping, fit_start_sector >> (PAGE_SHIFT - SECTOR_SHIFT), NULL);
|
||||
if (!page)
|
||||
return -ENOMEM;
|
||||
|
||||
@ -101,6 +108,9 @@ int fit_partition(struct parsed_partitions *state)
|
||||
}
|
||||
|
||||
dsectors = get_capacity(state->bdev->bd_disk);
|
||||
if (sectors)
|
||||
dsectors = (dsectors>sectors)?sectors:dsectors;
|
||||
|
||||
dsize = dsectors << SECTOR_SHIFT;
|
||||
printk(KERN_DEBUG "FIT: volume size: %llu sectors (%llu bytes)\n", dsectors, dsize);
|
||||
|
||||
@ -158,7 +168,6 @@ int fit_partition(struct parsed_partitions *state)
|
||||
goto ret_out;
|
||||
}
|
||||
|
||||
slot = 1;
|
||||
fdt_for_each_subnode(node, fit, images) {
|
||||
image_name = fdt_get_name(fit, node, &image_name_len);
|
||||
image_type = fdt_getprop(fit, node, FIT_TYPE_PROP, &image_type_len);
|
||||
@ -200,15 +209,16 @@ int fit_partition(struct parsed_partitions *state)
|
||||
|
||||
start_sect = image_pos >> SECTOR_SHIFT;
|
||||
nr_sects = image_len >> SECTOR_SHIFT;
|
||||
imgmaxsect = (imgmaxsect < (start_sect + nr_sects))?(start_sect + nr_sects):imgmaxsect;
|
||||
|
||||
if (start_sect + nr_sects > dsectors) {
|
||||
state->access_beyond_eod = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
put_partition(state, slot, start_sect, nr_sects);
|
||||
state->parts[slot].flags = 0;
|
||||
info = &state->parts[slot].info;
|
||||
put_partition(state, ++(*slot), fit_start_sector + start_sect, nr_sects);
|
||||
state->parts[*slot].flags = 0;
|
||||
info = &state->parts[*slot].info;
|
||||
|
||||
label_min = min_t(int, sizeof(info->volname) - 1, image_name_len);
|
||||
strncpy(info->volname, image_name, label_min);
|
||||
@ -217,17 +227,28 @@ int fit_partition(struct parsed_partitions *state)
|
||||
snprintf(tmp, sizeof(tmp), "(%s)", info->volname);
|
||||
strlcat(state->pp_buf, tmp, PAGE_SIZE);
|
||||
|
||||
state->parts[slot].has_info = true;
|
||||
state->parts[*slot].has_info = true;
|
||||
|
||||
if (config_loadables && !strcmp(image_name, config_loadables)) {
|
||||
printk(KERN_DEBUG "FIT: selecting configured loadable %s to be root filesystem\n", image_name);
|
||||
state->parts[slot].flags |= ADDPART_FLAG_ROOTDEV;
|
||||
state->parts[*slot].flags |= ADDPART_FLAG_ROOTDEV;
|
||||
}
|
||||
|
||||
++slot;
|
||||
}
|
||||
|
||||
if (add_remain && (imgmaxsect + MIN_FREE_SECT) < dsectors) {
|
||||
put_partition(state, ++(*slot), fit_start_sector + imgmaxsect, dsectors - imgmaxsect);
|
||||
state->parts[*slot].flags = 0;
|
||||
info = &state->parts[*slot].info;
|
||||
strcpy(info->volname, REMAIN_VOLNAME);
|
||||
snprintf(tmp, sizeof(tmp), "(%s)", REMAIN_VOLNAME);
|
||||
strlcat(state->pp_buf, tmp, PAGE_SIZE);
|
||||
}
|
||||
ret_out:
|
||||
kfree(fit);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int fit_partition(struct parsed_partitions *state) {
|
||||
int slot = 0;
|
||||
return parse_fit_partitions(state, 0, 0, &slot, 0);
|
||||
}
|
||||
|
||||
@ -49,6 +49,8 @@ mtdsplit_fit_parse(struct mtd_info *mtd,
|
||||
const struct mtd_partition **pparts,
|
||||
struct mtd_part_parser_data *data)
|
||||
{
|
||||
struct device_node *np = mtd_get_of_node(mtd);
|
||||
const char *cmdline_match = NULL;
|
||||
struct fdt_header hdr;
|
||||
size_t hdr_len, retlen;
|
||||
size_t offset;
|
||||
@ -57,6 +59,10 @@ mtdsplit_fit_parse(struct mtd_info *mtd,
|
||||
struct mtd_partition *parts;
|
||||
int ret;
|
||||
|
||||
of_property_read_string(np, "openwrt,cmdline-match", &cmdline_match);
|
||||
if (cmdline_match && !strstr(saved_command_line, cmdline_match))
|
||||
return -ENODEV;
|
||||
|
||||
hdr_len = sizeof(struct fdt_header);
|
||||
|
||||
/* Parse the MTD device & search for the FIT image location */
|
||||
|
||||
@ -44,18 +44,26 @@
|
||||
int ibm_partition(struct parsed_partitions *);
|
||||
int karma_partition(struct parsed_partitions *state);
|
||||
int ldm_partition(struct parsed_partitions *state);
|
||||
@@ -68,3 +69,5 @@ int sgi_partition(struct parsed_partitio
|
||||
int sun_partition(struct parsed_partitions *state);
|
||||
int sysv68_partition(struct parsed_partitions *state);
|
||||
int ultrix_partition(struct parsed_partitions *state);
|
||||
+
|
||||
+int parse_fit_partitions(struct parsed_partitions *state, u64 start_sector, u64 nr_sectors, int *slot, int add_remain);
|
||||
--- a/block/partitions/core.c
|
||||
+++ b/block/partitions/core.c
|
||||
@@ -10,6 +10,8 @@
|
||||
@@ -10,6 +10,10 @@
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/blktrace_api.h>
|
||||
#include <linux/raid/detect.h>
|
||||
+#ifdef CONFIG_FIT_PARTITION
|
||||
+#include <linux/root_dev.h>
|
||||
+#endif
|
||||
+
|
||||
#include "check.h"
|
||||
|
||||
static int (*check_part[])(struct parsed_partitions *) = {
|
||||
@@ -46,6 +48,9 @@ static int (*check_part[])(struct parsed
|
||||
@@ -46,6 +50,9 @@ static int (*check_part[])(struct parsed
|
||||
#ifdef CONFIG_EFI_PARTITION
|
||||
efi_partition, /* this must come before msdos */
|
||||
#endif
|
||||
@ -65,12 +73,49 @@
|
||||
#ifdef CONFIG_SGI_PARTITION
|
||||
sgi_partition,
|
||||
#endif
|
||||
@@ -694,6 +699,9 @@ static bool blk_add_partition(struct gen
|
||||
@@ -215,6 +222,18 @@ static ssize_t part_discard_alignment_sh
|
||||
p->start_sect));
|
||||
}
|
||||
|
||||
+static ssize_t part_name_show(struct device *dev,
|
||||
+ struct device_attribute *attr, char *buf)
|
||||
+{
|
||||
+ struct hd_struct *p = dev_to_part(dev);
|
||||
+
|
||||
+ if (p->info && p->info->volname)
|
||||
+ return sprintf(buf, "%s\n", p->info->volname);
|
||||
+
|
||||
+ buf[0] = '\0';
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static DEVICE_ATTR(partition, 0444, part_partition_show, NULL);
|
||||
static DEVICE_ATTR(start, 0444, part_start_show, NULL);
|
||||
static DEVICE_ATTR(size, 0444, part_size_show, NULL);
|
||||
@@ -223,6 +242,7 @@ static DEVICE_ATTR(alignment_offset, 044
|
||||
static DEVICE_ATTR(discard_alignment, 0444, part_discard_alignment_show, NULL);
|
||||
static DEVICE_ATTR(stat, 0444, part_stat_show, NULL);
|
||||
static DEVICE_ATTR(inflight, 0444, part_inflight_show, NULL);
|
||||
+static DEVICE_ATTR(name, 0444, part_name_show, NULL);
|
||||
#ifdef CONFIG_FAIL_MAKE_REQUEST
|
||||
static struct device_attribute dev_attr_fail =
|
||||
__ATTR(make-it-fail, 0644, part_fail_show, part_fail_store);
|
||||
@@ -237,6 +257,7 @@ static struct attribute *part_attrs[] =
|
||||
&dev_attr_discard_alignment.attr,
|
||||
&dev_attr_stat.attr,
|
||||
&dev_attr_inflight.attr,
|
||||
+ &dev_attr_name.attr,
|
||||
#ifdef CONFIG_FAIL_MAKE_REQUEST
|
||||
&dev_attr_fail.attr,
|
||||
#endif
|
||||
@@ -694,6 +715,11 @@ static bool blk_add_partition(struct gen
|
||||
(state->parts[p].flags & ADDPART_FLAG_RAID))
|
||||
md_autodetect_dev(part_to_dev(part)->devt);
|
||||
|
||||
+#ifdef CONFIG_FIT_PARTITION
|
||||
+ if ((state->parts[p].flags & ADDPART_FLAG_ROOTDEV) && ROOT_DEV == 0)
|
||||
+ ROOT_DEV = part_to_dev(part)->devt;
|
||||
+#endif
|
||||
+
|
||||
return true;
|
||||
}
|
||||
@ -94,3 +139,62 @@
|
||||
sprintf(gd->disk_name, "ubiblock%d_%d", dev->ubi_num, dev->vol_id);
|
||||
set_capacity(gd, disk_capacity);
|
||||
dev->gd = gd;
|
||||
--- a/block/partitions/efi.c
|
||||
+++ b/block/partitions/efi.c
|
||||
@@ -704,7 +704,7 @@ int efi_partition(struct parsed_partitio
|
||||
{
|
||||
gpt_header *gpt = NULL;
|
||||
gpt_entry *ptes = NULL;
|
||||
- u32 i;
|
||||
+ u32 i, slot = 0;
|
||||
unsigned ssz = bdev_logical_block_size(state->bdev) / 512;
|
||||
|
||||
if (!find_valid_gpt(state, &gpt, &ptes) || !gpt || !ptes) {
|
||||
@@ -722,23 +722,30 @@ int efi_partition(struct parsed_partitio
|
||||
u64 size = le64_to_cpu(ptes[i].ending_lba) -
|
||||
le64_to_cpu(ptes[i].starting_lba) + 1ULL;
|
||||
|
||||
- if (!is_pte_valid(&ptes[i], last_lba(state->bdev)))
|
||||
+ if (!is_pte_valid(&ptes[i], last_lba(state->bdev))) {
|
||||
+ ++slot;
|
||||
continue;
|
||||
+ }
|
||||
|
||||
- put_partition(state, i+1, start * ssz, size * ssz);
|
||||
+ put_partition(state, ++slot, start * ssz, size * ssz);
|
||||
|
||||
/* If this is a RAID volume, tell md */
|
||||
if (!efi_guidcmp(ptes[i].partition_type_guid, PARTITION_LINUX_RAID_GUID))
|
||||
- state->parts[i + 1].flags = ADDPART_FLAG_RAID;
|
||||
+ state->parts[slot].flags = ADDPART_FLAG_RAID;
|
||||
|
||||
- info = &state->parts[i + 1].info;
|
||||
+ info = &state->parts[slot].info;
|
||||
efi_guid_to_str(&ptes[i].unique_partition_guid, info->uuid);
|
||||
|
||||
/* Naively convert UTF16-LE to 7 bits. */
|
||||
label_max = min(ARRAY_SIZE(info->volname) - 1,
|
||||
ARRAY_SIZE(ptes[i].partition_name));
|
||||
utf16_le_to_7bit(ptes[i].partition_name, label_max, info->volname);
|
||||
- state->parts[i + 1].has_info = true;
|
||||
+ state->parts[slot].has_info = true;
|
||||
+#ifdef CONFIG_FIT_PARTITION
|
||||
+ /* If this is a U-Boot FIT volume it may have subpartitions */
|
||||
+ if (!efi_guidcmp(ptes[i].partition_type_guid, PARTITION_LINUX_FIT_GUID))
|
||||
+ (void) parse_fit_partitions(state, start * ssz, size * ssz, &slot, 1);
|
||||
+#endif
|
||||
}
|
||||
kfree(ptes);
|
||||
kfree(gpt);
|
||||
--- a/block/partitions/efi.h
|
||||
+++ b/block/partitions/efi.h
|
||||
@@ -52,6 +52,9 @@
|
||||
#define PARTITION_LINUX_LVM_GUID \
|
||||
EFI_GUID( 0xe6d6d379, 0xf507, 0x44c2, \
|
||||
0xa2, 0x3c, 0x23, 0x8f, 0x2a, 0x3d, 0xf9, 0x28)
|
||||
+#define PARTITION_LINUX_FIT_GUID \
|
||||
+ EFI_GUID( 0xcae9be83, 0xb15f, 0x49cc, \
|
||||
+ 0x86, 0x3f, 0x08, 0x1b, 0x74, 0x4a, 0x2d, 0x93)
|
||||
|
||||
typedef struct _gpt_header {
|
||||
__le64 signature;
|
||||
|
||||
@ -45,20 +45,60 @@
|
||||
dev->gd = gd;
|
||||
--- a/block/partition-generic.c
|
||||
+++ b/block/partition-generic.c
|
||||
@@ -18,6 +18,7 @@
|
||||
@@ -18,6 +18,10 @@
|
||||
#include <linux/ctype.h>
|
||||
#include <linux/genhd.h>
|
||||
#include <linux/blktrace_api.h>
|
||||
+#ifdef CONFIG_FIT_PARTITION
|
||||
+#include <linux/root_dev.h>
|
||||
+#endif
|
||||
+
|
||||
|
||||
#include "partitions/check.h"
|
||||
|
||||
@@ -634,6 +635,8 @@ rescan:
|
||||
@@ -180,6 +184,18 @@ ssize_t part_fail_store(struct device *d
|
||||
}
|
||||
#endif
|
||||
|
||||
+static ssize_t part_name_show(struct device *dev,
|
||||
+ struct device_attribute *attr, char *buf)
|
||||
+{
|
||||
+ struct hd_struct *p = dev_to_part(dev);
|
||||
+
|
||||
+ if (p->info && p->info->volname)
|
||||
+ return sprintf(buf, "%s\n", p->info->volname);
|
||||
+
|
||||
+ buf[0] = '\0';
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static DEVICE_ATTR(partition, 0444, part_partition_show, NULL);
|
||||
static DEVICE_ATTR(start, 0444, part_start_show, NULL);
|
||||
static DEVICE_ATTR(size, 0444, part_size_show, NULL);
|
||||
@@ -188,6 +204,7 @@ static DEVICE_ATTR(alignment_offset, 044
|
||||
static DEVICE_ATTR(discard_alignment, 0444, part_discard_alignment_show, NULL);
|
||||
static DEVICE_ATTR(stat, 0444, part_stat_show, NULL);
|
||||
static DEVICE_ATTR(inflight, 0444, part_inflight_show, NULL);
|
||||
+static DEVICE_ATTR(name, 0444, part_name_show, NULL);
|
||||
#ifdef CONFIG_FAIL_MAKE_REQUEST
|
||||
static struct device_attribute dev_attr_fail =
|
||||
__ATTR(make-it-fail, 0644, part_fail_show, part_fail_store);
|
||||
@@ -202,6 +219,7 @@ static struct attribute *part_attrs[] =
|
||||
&dev_attr_discard_alignment.attr,
|
||||
&dev_attr_stat.attr,
|
||||
&dev_attr_inflight.attr,
|
||||
+ &dev_attr_name.attr,
|
||||
#ifdef CONFIG_FAIL_MAKE_REQUEST
|
||||
&dev_attr_fail.attr,
|
||||
#endif
|
||||
@@ -634,6 +652,10 @@ rescan:
|
||||
if (state->parts[p].flags & ADDPART_FLAG_RAID)
|
||||
md_autodetect_dev(part_to_dev(part)->devt);
|
||||
#endif
|
||||
+#ifdef CONFIG_FIT_PARTITION
|
||||
+ if ((state->parts[p].flags & ADDPART_FLAG_ROOTDEV) && ROOT_DEV == 0)
|
||||
+ ROOT_DEV = part_to_dev(part)->devt;
|
||||
+#endif
|
||||
}
|
||||
free_partitions(state);
|
||||
return 0;
|
||||
@ -94,6 +134,67 @@
|
||||
extern void blk_free_devt(dev_t devt);
|
||||
--- /dev/null
|
||||
+++ b/block/partitions/fit.h
|
||||
@@ -0,0 +1,2 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0 */
|
||||
@@ -0,0 +1,3 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
+int fit_partition(struct parsed_partitions *);
|
||||
+int parse_fit_partitions(struct parsed_partitions *state, u64 start_sector, u64 nr_sectors, int *slot, int add_remain);
|
||||
--- a/block/partitions/efi.c
|
||||
+++ b/block/partitions/efi.c
|
||||
@@ -679,7 +679,7 @@ int efi_partition(struct parsed_partitio
|
||||
{
|
||||
gpt_header *gpt = NULL;
|
||||
gpt_entry *ptes = NULL;
|
||||
- u32 i;
|
||||
+ u32 i, slot = 0;
|
||||
unsigned ssz = bdev_logical_block_size(state->bdev) / 512;
|
||||
|
||||
if (!find_valid_gpt(state, &gpt, &ptes) || !gpt || !ptes) {
|
||||
@@ -698,16 +698,18 @@ int efi_partition(struct parsed_partitio
|
||||
u64 size = le64_to_cpu(ptes[i].ending_lba) -
|
||||
le64_to_cpu(ptes[i].starting_lba) + 1ULL;
|
||||
|
||||
- if (!is_pte_valid(&ptes[i], last_lba(state->bdev)))
|
||||
+ if (!is_pte_valid(&ptes[i], last_lba(state->bdev))) {
|
||||
+ ++slot;
|
||||
continue;
|
||||
+ }
|
||||
|
||||
- put_partition(state, i+1, start * ssz, size * ssz);
|
||||
+ put_partition(state, ++slot, start * ssz, size * ssz);
|
||||
|
||||
/* If this is a RAID volume, tell md */
|
||||
if (!efi_guidcmp(ptes[i].partition_type_guid, PARTITION_LINUX_RAID_GUID))
|
||||
- state->parts[i + 1].flags = ADDPART_FLAG_RAID;
|
||||
+ state->parts[slot].flags = ADDPART_FLAG_RAID;
|
||||
|
||||
- info = &state->parts[i + 1].info;
|
||||
+ info = &state->parts[slot].info;
|
||||
efi_guid_to_str(&ptes[i].unique_partition_guid, info->uuid);
|
||||
|
||||
/* Naively convert UTF16-LE to 7 bits. */
|
||||
@@ -721,7 +723,12 @@ int efi_partition(struct parsed_partitio
|
||||
info->volname[label_count] = c;
|
||||
label_count++;
|
||||
}
|
||||
- state->parts[i + 1].has_info = true;
|
||||
+ state->parts[slot].has_info = true;
|
||||
+#ifdef CONFIG_FIT_PARTITION
|
||||
+ /* If this is a U-Boot FIT volume it may have subpartitions */
|
||||
+ if (!efi_guidcmp(ptes[i].partition_type_guid, PARTITION_LINUX_FIT_GUID))
|
||||
+ (void) parse_fit_partitions(state, start * ssz, size * ssz, &slot, 1);
|
||||
+#endif
|
||||
}
|
||||
kfree(ptes);
|
||||
kfree(gpt);
|
||||
--- a/block/partitions/efi.h
|
||||
+++ b/block/partitions/efi.h
|
||||
@@ -52,6 +52,9 @@
|
||||
#define PARTITION_LINUX_LVM_GUID \
|
||||
EFI_GUID( 0xe6d6d379, 0xf507, 0x44c2, \
|
||||
0xa2, 0x3c, 0x23, 0x8f, 0x2a, 0x3d, 0xf9, 0x28)
|
||||
+#define PARTITION_LINUX_FIT_GUID \
|
||||
+ EFI_GUID( 0xcae9be83, 0xb15f, 0x49cc, \
|
||||
+ 0x86, 0x3f, 0x08, 0x1b, 0x74, 0x4a, 0x2d, 0x93)
|
||||
|
||||
typedef struct _gpt_header {
|
||||
__le64 signature;
|
||||
|
||||
@ -254,6 +254,8 @@
|
||||
};
|
||||
|
||||
usb: usb@e101000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "lantiq,danube-usb";
|
||||
reg = <0xe101000 0x1000
|
||||
0xe120000 0x3f000>;
|
||||
@ -263,6 +265,11 @@
|
||||
phys = <&usb_phy>;
|
||||
phy-names = "usb2-phy";
|
||||
status = "disabled";
|
||||
|
||||
ehci_port1: port@1 {
|
||||
reg = <1>;
|
||||
#trigger-source-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
deu@e103100 {
|
||||
|
||||
@ -17,7 +17,6 @@
|
||||
led-upgrade = &power_red;
|
||||
|
||||
led-dsl = &internet_red;
|
||||
led-usb = &umts;
|
||||
led-wifi = &wifi;
|
||||
};
|
||||
|
||||
@ -78,6 +77,9 @@
|
||||
umts: umts {
|
||||
label = "red:umts";
|
||||
gpios = <&gpiomm 3 GPIO_ACTIVE_LOW>;
|
||||
trigger-sources = <&ehci_port1>,
|
||||
<&ehci_port2>, <&uhci_port2>;
|
||||
linux,default-trigger = "usbport";
|
||||
};
|
||||
wifi: wifi {
|
||||
label = "red:wifi";
|
||||
@ -242,6 +244,30 @@
|
||||
ralink,mtd-eeprom-swap;
|
||||
mtd-mac-address = <&boardconfig 0x16>;
|
||||
};
|
||||
|
||||
usb@0f,0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "pci1106,3038";
|
||||
reg = <0x7800 0 0 0 0>; /* 0000:00:0f.0: UHCI Host Controller */
|
||||
|
||||
uhci_port2: port@2 {
|
||||
reg = <2>;
|
||||
#trigger-source-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
usb@0f,2 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "pci1106,3038";
|
||||
reg = <0x7a00 0 0 0 0>; /* 0000:00:0f.2: EHCI Host Controller*/
|
||||
|
||||
ehci_port2: port@2 {
|
||||
reg = <2>;
|
||||
#trigger-source-cells = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&usb_phy {
|
||||
|
||||
@ -409,6 +409,8 @@
|
||||
};
|
||||
|
||||
usb0: usb@e101000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
compatible = "lantiq,xrx200-usb";
|
||||
reg = <0xe101000 0x1000
|
||||
@ -418,9 +420,16 @@
|
||||
dr_mode = "host";
|
||||
phys = <&usb_phy0>;
|
||||
phy-names = "usb2-phy";
|
||||
|
||||
ehci_port1: port@1 {
|
||||
reg = <1>;
|
||||
#trigger-source-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
usb1: usb@e106000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
compatible = "lantiq,xrx200-usb";
|
||||
reg = <0xe106000 0x1000>;
|
||||
@ -429,6 +438,11 @@
|
||||
dr_mode = "host";
|
||||
phys = <&usb_phy1>;
|
||||
phy-names = "usb2-phy";
|
||||
|
||||
ehci_port2: port@1 {
|
||||
reg = <1>;
|
||||
#trigger-source-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
eth0: eth@e108000 {
|
||||
|
||||
@ -15,9 +15,6 @@
|
||||
led-failsafe = &power;
|
||||
led-running = &power;
|
||||
led-upgrade = &power;
|
||||
|
||||
led-usb = &led_usb1;
|
||||
led-usb2 = &led_usb2;
|
||||
};
|
||||
|
||||
memory@0 {
|
||||
@ -64,13 +61,18 @@
|
||||
label = "green:fxo";
|
||||
gpios = <&stp 19 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
led_usb1: usb1 {
|
||||
usb1 {
|
||||
label = "green:usb1";
|
||||
gpios = <&stp 18 GPIO_ACTIVE_HIGH>;
|
||||
trigger-sources = <&ehci_port1>;
|
||||
linux,default-trigger = "usbport";
|
||||
};
|
||||
led_usb2: usb2 {
|
||||
|
||||
usb2 {
|
||||
label = "green:usb2";
|
||||
gpios = <&stp 15 GPIO_ACTIVE_HIGH>;
|
||||
trigger-sources = <&ehci_port2>;
|
||||
linux,default-trigger = "usbport";
|
||||
};
|
||||
sd {
|
||||
label = "green:sd";
|
||||
|
||||
@ -18,8 +18,6 @@
|
||||
led-dsl = &led_dsl;
|
||||
led-internet = &led_internet;
|
||||
led-wifi = &led_wifi;
|
||||
led-usb = &led_usb0;
|
||||
led-usb2 = &led_usb2;
|
||||
};
|
||||
|
||||
memory@0 {
|
||||
@ -67,14 +65,18 @@
|
||||
gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_usb0: usb0 {
|
||||
usb0 {
|
||||
label = "green:usb";
|
||||
gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
|
||||
trigger-sources = <&ehci_port1>;
|
||||
linux,default-trigger = "usbport";
|
||||
};
|
||||
|
||||
led_usb2: usb2 {
|
||||
usb2 {
|
||||
label = "green:usb2";
|
||||
gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
|
||||
trigger-sources = <&ehci_port2>;
|
||||
linux,default-trigger = "usbport";
|
||||
};
|
||||
|
||||
led_wps: wps {
|
||||
|
||||
@ -13,9 +13,6 @@
|
||||
led-dsl = &led_dsl;
|
||||
led-internet = &led_internet;
|
||||
led-wifi = &led_wlan5g;
|
||||
|
||||
led-usb = &led_usb;
|
||||
led-usb2 = &led_usb;
|
||||
};
|
||||
|
||||
memory@0 {
|
||||
@ -66,9 +63,11 @@
|
||||
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_usb: usb {
|
||||
usb {
|
||||
label = "blue:usb";
|
||||
gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
|
||||
trigger-sources = <&ehci_port1>, <&ehci_port2>;
|
||||
linux,default-trigger = "usbport";
|
||||
};
|
||||
|
||||
eth {
|
||||
|
||||
@ -4,19 +4,18 @@
|
||||
compatible = "zyxel,p-2812hnu-f1", "zyxel,p-2812hnu", "lantiq,xway", "lantiq,vr9";
|
||||
model = "ZyXEL P-2812HNU-F1";
|
||||
|
||||
aliases {
|
||||
led-usb = &led_usb1;
|
||||
led-usb2 = &led_usb2;
|
||||
};
|
||||
|
||||
leds {
|
||||
led_usb1: usb1 {
|
||||
usb1 {
|
||||
label = "green:usb1";
|
||||
gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
|
||||
trigger-sources = <&ehci_port1>;
|
||||
linux,default-trigger = "usbport";
|
||||
};
|
||||
led_usb2: usb2 {
|
||||
usb2 {
|
||||
label = "green:usb2";
|
||||
gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
|
||||
trigger-sources = <&ehci_port2>;
|
||||
linux,default-trigger = "usbport";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -34,6 +34,7 @@ define Device/bt_homehub-v3a
|
||||
DEVICE_VARIANT := Type A
|
||||
BOARD_NAME := BTHOMEHUBV3A
|
||||
SOC := ar9
|
||||
KERNEL_SIZE := 2048k
|
||||
DEVICE_PACKAGES := kmod-usb-dwc2 \
|
||||
kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
|
||||
kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
|
||||
@ -42,6 +43,7 @@ define Device/bt_homehub-v3a
|
||||
kmod-ath9k kmod-owl-loader wpad-basic-wolfssl \
|
||||
uboot-envtools
|
||||
SUPPORTED_DEVICES += BTHOMEHUBV3A
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += bt_homehub-v3a
|
||||
|
||||
|
||||
@ -188,6 +188,7 @@ define Device/bt_homehub-v2b
|
||||
DEVICE_VARIANT := Type B
|
||||
BOARD_NAME := BTHOMEHUBV2B
|
||||
SOC := danube
|
||||
KERNEL_SIZE := 2048k
|
||||
DEVICE_PACKAGES := kmod-usb-dwc2 \
|
||||
kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
|
||||
kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
|
||||
@ -195,6 +196,7 @@ define Device/bt_homehub-v2b
|
||||
ltq-adsl-app ppp-mod-pppoa \
|
||||
kmod-ath9k kmod-owl-loader wpad-basic-wolfssl
|
||||
SUPPORTED_DEVICES += BTHOMEHUBV2B
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += bt_homehub-v2b
|
||||
|
||||
|
||||
@ -11,12 +11,6 @@ board_config_update
|
||||
led_wifi="$(get_dt_led wifi)"
|
||||
[ -n "$led_wifi" ] && ucidef_set_led_wlan "wifi" "wifi" "$led_wifi" "phy0tpt"
|
||||
|
||||
led_usb="$(get_dt_led usb)"
|
||||
[ -n "$led_usb" ] && ucidef_set_led_usbdev "usb" "usb" "$led_usb" "1-1"
|
||||
|
||||
led_usb2="$(get_dt_led usb2)"
|
||||
[ -n "$led_usb2" ] && ucidef_set_led_usbdev "usb2" "usb2" "$led_usb2" "2-1"
|
||||
|
||||
led_dsl="$(get_dt_led dsl)"
|
||||
[ -n "$led_dsl" ] && {
|
||||
led_internet="$(get_dt_led internet)"
|
||||
|
||||
@ -3,7 +3,7 @@ From: Joakim Zhang <qiangqing.zhang@nxp.com>
|
||||
Date: Fri, 12 Jul 2019 08:02:38 +0000
|
||||
Subject: [PATCH] can: rx-offload: Prepare for CAN FD support
|
||||
|
||||
The skbs for classic CAN and CAN FD frames are allocated with seperate
|
||||
The skbs for classic CAN and CAN FD frames are allocated with separate
|
||||
functions: alloc_can_skb() and alloc_canfd_skb().
|
||||
|
||||
In order to support CAN FD frames via the rx-offload helper, the driver
|
||||
|
||||
@ -6,10 +6,10 @@ ARCH:=arm
|
||||
BOARD:=mediatek
|
||||
BOARDNAME:=MediaTek Ralink ARM
|
||||
SUBTARGETS:=mt7622 mt7623 mt7629
|
||||
FEATURES:=squashfs nand seperate_ramdisk fpu
|
||||
FEATURES:=squashfs nand separate_ramdisk fpu
|
||||
|
||||
KERNEL_PATCHVER:=5.4
|
||||
KERNEL_TESTING_PATCHVER:=5.4
|
||||
KERNEL_TESTING_PATCHVER:=5.10
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
DEFAULT_PACKAGES += \
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0-only OR MIT)
|
||||
/*
|
||||
* Copyright (c) 2018 MediaTek Inc.
|
||||
* Author: Ryder Lee <ryder.lee@mediatek.com>
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "mt7622-bananapi-bpi-r64.dts"
|
||||
/ {
|
||||
model = "Bananapi BPI-R64";
|
||||
compatible = "bananapi,bpi-r64-rootdisk", "mediatek,mt7622";
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n1 swiotlb=512 root=/dev/mmcblk0p7 rootfstype=squashfs,f2fs";
|
||||
};
|
||||
};
|
||||
61
target/linux/mediatek/dts/mt7622-linksys-e8450-ubi.dts
Normal file
61
target/linux/mediatek/dts/mt7622-linksys-e8450-ubi.dts
Normal file
@ -0,0 +1,61 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0-only OR MIT)
|
||||
|
||||
/dts-v1/;
|
||||
#include "mt7622-linksys-e8450.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Linksys E8450 (UBI)";
|
||||
compatible = "linksys,e8450-ubi", "mediatek,mt7622";
|
||||
|
||||
aliases {
|
||||
label-mac-device = &wan;
|
||||
};
|
||||
};
|
||||
|
||||
&snand {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "bl2";
|
||||
reg = <0x0 0x80000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@80000 {
|
||||
label = "fip";
|
||||
reg = <0x80000 0x140000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
factory: partition@1c0000 {
|
||||
label = "factory";
|
||||
reg = <0x1c0000 0x100000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@300000 {
|
||||
label = "ubi";
|
||||
reg = <0x300000 0x7d00000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&wmac {
|
||||
mediatek,mtd-eeprom = <&factory 0x0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wmac1 {
|
||||
mediatek,mtd-eeprom = <&factory 0x5000>;
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
mtd-mac-address = <&factory 0x7fff4>;
|
||||
};
|
||||
|
||||
&wan {
|
||||
mtd-mac-address = <&factory 0x7fffa>;
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user