Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
01860bfdcc
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright (C) 2006-2020 OpenWrt.org
|
||||
|
||||
PKG_DEFAULT_DEPENDS = +libc +USE_GLIBC:librt +USE_GLIBC:libpthread
|
||||
PKG_DEFAULT_DEPENDS = +libc
|
||||
|
||||
ifneq ($(PKG_NAME),toolchain)
|
||||
PKG_FIXUP_DEPENDS = $(if $(filter kmod-%,$(1)),$(2),$(PKG_DEFAULT_DEPENDS) $(filter-out $(PKG_DEFAULT_DEPENDS),$(2)))
|
||||
|
@ -252,6 +252,7 @@ ifeq ($(DUMP),1)
|
||||
ifeq ($(ARCH),powerpc)
|
||||
CPU_CFLAGS_603e:=-mcpu=603e
|
||||
CPU_CFLAGS_8540:=-mcpu=8540
|
||||
CPU_CFLAGS_8548:=-mcpu=8548
|
||||
CPU_CFLAGS_405:=-mcpu=405
|
||||
CPU_CFLAGS_440:=-mcpu=440
|
||||
CPU_CFLAGS_464fp:=-mcpu=464fp
|
||||
|
@ -41,7 +41,7 @@ switch_to_ramfs() {
|
||||
pivot_root mount_root reboot sync kill sleep \
|
||||
md5sum hexdump cat zcat dd tar gzip \
|
||||
ls basename find cp mv rm mkdir rmdir mknod touch chmod \
|
||||
'[' printf wc grep awk sed cut sort \
|
||||
'[' printf wc grep awk sed cut sort tail \
|
||||
mtd partx losetup mkfs.ext4 nandwrite flash_erase \
|
||||
ubiupdatevol ubiattach ubiblock ubiformat \
|
||||
ubidetach ubirsvol ubirmvol ubimkvol \
|
||||
|
@ -125,6 +125,8 @@ TFA_MAKE_FLAGS += \
|
||||
WTP=$(BUILD_DIR)/$(A3700_UTILS_NAME) \
|
||||
WTMI_IMG=$(BUILD_DIR)/$(MOX_BB_NAME)-$(MOX_BB_RELEASE)/wtmi_app.bin \
|
||||
CRYPTOPP_PATH=$(BUILD_DIR)/$(CRYPTOPP_NAME) \
|
||||
HOST_LDFLAGS="$(HOST_LDFLAGS)" \
|
||||
HOST_CPPFLAGS="$(HOST_CPPFLAGS)" \
|
||||
USE_COHERENT_MEM=0 \
|
||||
FIP_ALIGN=0x100 \
|
||||
DDR_TOPOLOGY=$(DDR_TOPOLOGY) \
|
||||
|
@ -0,0 +1,13 @@
|
||||
Forward the host compiler flags to the compilation of the cryptopp library.
|
||||
|
||||
--- a/plat/marvell/armada/a3k/common/a3700_common.mk
|
||||
+++ b/plat/marvell/armada/a3k/common/a3700_common.mk
|
||||
@@ -149,7 +149,7 @@ $(TBB): FORCE
|
||||
$(if $(wildcard $(CRYPTOPP_LIBDIR)/*),,$(error "Either 'CRYPTOPP_PATH' or 'CRYPTOPP_LIB' was set to '$(CRYPTOPP_LIBDIR)', but '$(CRYPTOPP_LIBDIR)' does not exist"))
|
||||
$(if $(wildcard $(CRYPTOPP_INCDIR)/*),,$(error "Either 'CRYPTOPP_PATH' or 'CRYPTOPP_INCDIR' was set to '$(CRYPTOPP_INCDIR)', but '$(CRYPTOPP_INCDIR)' does not exist"))
|
||||
ifdef CRYPTOPP_PATH
|
||||
- $(Q)$(MAKE) --no-print-directory -C $(CRYPTOPP_PATH) -f GNUmakefile
|
||||
+ $(Q)$(MAKE) --no-print-directory -C $(CRYPTOPP_PATH) -f GNUmakefile LDFLAGS="$(HOST_LDFLAGS)" CPPFLAGS="$(HOST_CPPFLAGS)"
|
||||
endif
|
||||
$(Q)$(MAKE) --no-print-directory -C $(WTP)/wtptp/src/TBB_Linux -f TBB_linux.mak LIBDIR=$(CRYPTOPP_LIBDIR) INCDIR=$(CRYPTOPP_INCDIR)
|
||||
|
@ -25,40 +25,28 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/trusted-firmware-a.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
||||
define Package/arm-trusted-firmware-sunxi/Default
|
||||
SECTION:=boot
|
||||
CATEGORY:=Boot Loaders
|
||||
TITLE:=ARM Trusted Firmware for Allwinner
|
||||
DEPENDS:=@TARGET_sunxi_cortexa53
|
||||
define Trusted-Firmware-A/Default
|
||||
BUILD_TARGET:=sunxi
|
||||
BUILD_SUBTARGET:=cortexa53
|
||||
endef
|
||||
|
||||
define Package/arm-trusted-firmware-sunxi-a64
|
||||
$(call Package/arm-trusted-firmware-sunxi/Default)
|
||||
VARIANT:=sun50i_a64
|
||||
define Trusted-Firmware-A/sunxi-a64
|
||||
NAME:=Allwinner A64
|
||||
PLAT:=sun50i_a64
|
||||
endef
|
||||
|
||||
define Package/arm-trusted-firmware-sunxi-h6
|
||||
$(call Package/arm-trusted-firmware-sunxi/Default)
|
||||
VARIANT:=sun50i_h6
|
||||
define Trusted-Firmware-A/sunxi-h6
|
||||
NAME:=Allwinner H6
|
||||
PLAT:=sun50i_h6
|
||||
endef
|
||||
|
||||
export GCC_HONOUR_COPTS=s
|
||||
TFA_TARGETS:= \
|
||||
sunxi-a64 \
|
||||
sunxi-h6
|
||||
|
||||
MAKE_VARS = \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)"
|
||||
|
||||
MAKE_FLAGS += \
|
||||
PLAT=$(BUILD_VARIANT) \
|
||||
bl31
|
||||
|
||||
define Build/InstallDev
|
||||
define Package/trusted-firmware-a/install
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
$(CP) $(PKG_BUILD_DIR)/build/$(BUILD_VARIANT)/release/bl31.bin $(STAGING_DIR_IMAGE)/bl31_$(BUILD_VARIANT).bin
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/build/$(PLAT)/release/bl31.bin $(STAGING_DIR_IMAGE)/bl31_$(BUILD_VARIANT).bin
|
||||
endef
|
||||
|
||||
define Package/arm-trusted-firmware-sunxi/install
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,arm-trusted-firmware-sunxi-a64))
|
||||
$(eval $(call BuildPackage,arm-trusted-firmware-sunxi-h6))
|
||||
$(eval $(call BuildPackage/Trusted-Firmware-A))
|
||||
|
@ -18,6 +18,7 @@ PKG_MIRROR_HASH:=893f2d28a77dcc9d4413a619b4719ca5f1f4dc78dd824a8488e7d543e66bcf9
|
||||
PKG_BUILD_DEPENDS:=tfa-layerscape/host
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/trusted-firmware-a.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
HOST_CFLAGS += -Wall -Werror -pedantic -std=c99
|
||||
@ -38,131 +39,97 @@ define Host/Install
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/nxp/byte_swap $(STAGING_DIR_HOST)/bin/tfa-byte-swap
|
||||
endef
|
||||
|
||||
define Package/tfa-generic
|
||||
SECTION:=boot
|
||||
CATEGORY:=Boot Loaders
|
||||
DEPENDS:=@TARGET_layerscape_armv8_64b +layerscape-rcw +u-boot-fsl_$(subst tfa-,,$(1))
|
||||
VARIANT:=$(subst tfa-,,$(1))
|
||||
define Trusted-Firmware-A/Default
|
||||
BUILD_TARGET:=layerscape
|
||||
BUILD_SUBTARGET:=armv8_64b
|
||||
DEPENDS:=+layerscape-rcw +u-boot-fsl_$(1)
|
||||
endef
|
||||
|
||||
define Package/tfa-ls1012a-frdm
|
||||
$(Package/tfa-generic)
|
||||
TITLE:=NXP LS1012AFRDM Trusted Firmware
|
||||
define Trusted-Firmware-A/ls1012a-frdm
|
||||
NAME:=NXP LS1012AFRDM
|
||||
PLAT:=ls1012afrdm
|
||||
BOOT_MODE:=qspi
|
||||
endef
|
||||
|
||||
define Package/tfa-ls1012a-rdb
|
||||
$(Package/tfa-generic)
|
||||
TITLE:=NXP LS1012ARDB Trusted Firmware
|
||||
define Trusted-Firmware-A/ls1012a-rdb
|
||||
NAME:=NXP LS1012ARDB
|
||||
PLAT:=ls1012ardb
|
||||
BOOT_MODE:=qspi
|
||||
endef
|
||||
|
||||
define Package/tfa-ls1012a-frwy-sdboot
|
||||
$(Package/tfa-generic)
|
||||
TITLE:=NXP LS1012AFRWY Trusted Firmware
|
||||
define Trusted-Firmware-A/ls1012a-frwy-sdboot
|
||||
NAME:=NXP LS1012AFRWY
|
||||
PLAT:=ls1012afrwy
|
||||
BOOT_MODE:=qspi
|
||||
endef
|
||||
|
||||
define Package/tfa-ls1043a-rdb
|
||||
$(Package/tfa-generic)
|
||||
TITLE:=NXP LS1043ARDB Trusted Firmware
|
||||
define Trusted-Firmware-A/ls1043a-rdb
|
||||
NAME:=NXP LS1043ARDB
|
||||
PLAT:=ls1043ardb
|
||||
BOOT_MODE:=nor
|
||||
endef
|
||||
|
||||
define Package/tfa-ls1043a-rdb-sdboot
|
||||
$(Package/tfa-generic)
|
||||
TITLE:=NXP LS1043ARDB SD Boot Trusted Firmware
|
||||
define Trusted-Firmware-A/ls1043a-rdb-sdboot
|
||||
NAME:=NXP LS1043ARDB SD Boot
|
||||
PLAT:=ls1043ardb
|
||||
BOOT_MODE:=sd
|
||||
endef
|
||||
|
||||
define Package/tfa-ls1046a-frwy
|
||||
$(Package/tfa-generic)
|
||||
TITLE:=NXP LS1046AFRWY Trusted Firmware
|
||||
define Trusted-Firmware-A/ls1046a-frwy
|
||||
NAME:=NXP LS1046AFRWY
|
||||
PLAT:=ls1046afrwy
|
||||
BOOT_MODE:=qspi
|
||||
endef
|
||||
|
||||
define Package/tfa-ls1046a-frwy-sdboot
|
||||
$(Package/tfa-generic)
|
||||
TITLE:=NXP LS1046AFRWY SD Boot Trusted Firmware
|
||||
define Trusted-Firmware-A/ls1046a-frwy-sdboot
|
||||
NAME:=NXP LS1046AFRWY SD Boot
|
||||
PLAT:=ls1046afrwy
|
||||
BOOT_MODE:=sd
|
||||
endef
|
||||
|
||||
define Package/tfa-ls1046a-rdb
|
||||
$(Package/tfa-generic)
|
||||
TITLE:=NXP LS1046ARDB Trusted Firmware
|
||||
define Trusted-Firmware-A/ls1046a-rdb
|
||||
NAME:=NXP LS1046ARDB
|
||||
PLAT:=ls1046ardb
|
||||
BOOT_MODE:=qspi
|
||||
endef
|
||||
|
||||
define Package/tfa-ls1046a-rdb-sdboot
|
||||
$(Package/tfa-generic)
|
||||
TITLE:=NXP LS1046ARDB SD Boot Trusted Firmware
|
||||
define Trusted-Firmware-A/ls1046a-rdb-sdboot
|
||||
NAME:=NXP LS1046ARDB SD Boot
|
||||
PLAT:=ls1046ardb
|
||||
BOOT_MODE:=sd
|
||||
endef
|
||||
|
||||
define Package/tfa-ls1088a-rdb
|
||||
$(Package/tfa-generic)
|
||||
TITLE:=NXP LS1088ARDB Trusted Firmware
|
||||
define Trusted-Firmware-A/ls1088a-rdb
|
||||
NAME:=NXP LS1088ARDB
|
||||
PLAT:=ls1088ardb
|
||||
BOOT_MODE:=qspi
|
||||
endef
|
||||
|
||||
define Package/tfa-ls1088a-rdb-sdboot
|
||||
$(Package/tfa-generic)
|
||||
TITLE:=NXP LS1088ARDB SD Boot Trusted Firmware
|
||||
define Trusted-Firmware-A/ls1088a-rdb-sdboot
|
||||
NAME:=NXP LS1088ARDB SD Boot
|
||||
PLAT:=ls1088ardb
|
||||
BOOT_MODE:=sd
|
||||
endef
|
||||
|
||||
define Package/tfa-ls2088a-rdb
|
||||
$(Package/tfa-generic)
|
||||
TITLE:=NXP LS2088ARDB Trusted Firmware
|
||||
define Trusted-Firmware-A/ls2088a-rdb
|
||||
NAME:=NXP LS2088ARDB
|
||||
PLAT:=ls2088ardb
|
||||
BOOT_MODE:=nor
|
||||
endef
|
||||
|
||||
define Package/tfa-lx2160a-rdb
|
||||
$(Package/tfa-generic)
|
||||
TITLE:=NXP LX2160ARDB Trusted Firmware
|
||||
define Trusted-Firmware-A/lx2160a-rdb
|
||||
NAME:=NXP LX2160ARDB
|
||||
PLAT:=lx2160ardb
|
||||
BOOT_MODE:=flexspi_nor
|
||||
endef
|
||||
|
||||
define Package/tfa-lx2160a-rdb-sdboot
|
||||
$(Package/tfa-generic)
|
||||
TITLE:=NXP LX2160ARDB SD Boot Trusted Firmware
|
||||
define Trusted-Firmware-A/lx2160a-rdb-sdboot
|
||||
NAME:=NXP LX2160ARDB SD Boot
|
||||
PLAT:=lx2160ardb
|
||||
BOOT_MODE:=sd
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
$(CP) $(PKG_BUILD_DIR)/build/$(PLAT)/release/bl2_$(BOOT_MODE).pbl \
|
||||
$(STAGING_DIR_IMAGE)/fsl_$(BUILD_VARIANT)-bl2.pbl
|
||||
$(CP) $(PKG_BUILD_DIR)/build/$(PLAT)/release/fip.bin \
|
||||
$(STAGING_DIR_IMAGE)/fsl_$(BUILD_VARIANT)-fip.bin
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(eval $(Package/tfa-$(BUILD_VARIANT))) \
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) CROSS_COMPILE=$(TARGET_CROSS) \
|
||||
fip pbl PLAT=$(PLAT) BOOT_MODE=$(BOOT_MODE) \
|
||||
RCW=$(STAGING_DIR_IMAGE)/fsl_$(BUILD_VARIANT)-rcw.bin \
|
||||
BL33=$(STAGING_DIR_IMAGE)/fsl_$(BUILD_VARIANT)-uboot.bin \
|
||||
FIPTOOL=$(STAGING_DIR_HOST)/bin/fiptool-layerscape \
|
||||
CREATE_PBL=$(STAGING_DIR_HOST)/bin/tfa-create-pbl \
|
||||
BYTE_SWAP=$(STAGING_DIR_HOST)/bin/tfa-byte-swap
|
||||
endef
|
||||
|
||||
TFAS := \
|
||||
TFA_TARGETS := \
|
||||
ls1012a-frdm \
|
||||
ls1012a-rdb \
|
||||
ls1012a-frwy-sdboot \
|
||||
@ -178,7 +145,25 @@ TFAS := \
|
||||
lx2160a-rdb \
|
||||
lx2160a-rdb-sdboot
|
||||
|
||||
TFA_MAKE_FLAGS += \
|
||||
fip pbl \
|
||||
BOOT_MODE=$(BOOT_MODE) \
|
||||
RCW=$(STAGING_DIR_IMAGE)/fsl_$(BUILD_VARIANT)-rcw.bin \
|
||||
BL33=$(STAGING_DIR_IMAGE)/fsl_$(BUILD_VARIANT)-uboot.bin \
|
||||
FIPTOOL=$(STAGING_DIR_HOST)/bin/fiptool-layerscape \
|
||||
CREATE_PBL=$(STAGING_DIR_HOST)/bin/tfa-create-pbl \
|
||||
BYTE_SWAP=$(STAGING_DIR_HOST)/bin/tfa-byte-swap
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
$(CP) $(PKG_BUILD_DIR)/build/$(PLAT)/release/bl2_$(BOOT_MODE).pbl \
|
||||
$(STAGING_DIR_IMAGE)/fsl_$(BUILD_VARIANT)-bl2.pbl
|
||||
$(CP) $(PKG_BUILD_DIR)/build/$(PLAT)/release/fip.bin \
|
||||
$(STAGING_DIR_IMAGE)/fsl_$(BUILD_VARIANT)-fip.bin
|
||||
endef
|
||||
|
||||
define Package/trusted-firmware-a/install/default
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
$(foreach tfa,$(TFAS), \
|
||||
$(eval $(call BuildPackage,tfa-$(tfa))) \
|
||||
)
|
||||
$(eval $(call BuildPackage/Trusted-Firmware-A))
|
||||
|
@ -63,7 +63,7 @@ linksys,ea8300|\
|
||||
linksys,mr8300)
|
||||
ubootenv_add_uci_config "/dev/mtd7" "0x0" "0x40000" "0x20000"
|
||||
;;
|
||||
linksys,whw01-v1)
|
||||
linksys,whw01)
|
||||
ubootenv_add_uci_config "/dev/mtd6" "0x0" "0x40000" "0x10000"
|
||||
;;
|
||||
zyxel,nbg6617)
|
||||
|
@ -34,11 +34,18 @@ bananapi,bpi-r3)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
xiaomi,redmi-router-ax6000|\
|
||||
xiaomi,redmi-router-ax6000-stock)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
|
||||
ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x10000" "0x20000"
|
||||
;;
|
||||
xiaomi,redmi-router-ax6000-ubootmod)
|
||||
. /lib/upgrade/nand.sh
|
||||
local envubi=$(nand_find_ubi ubi)
|
||||
local envdev=/dev/$(nand_find_volume $envubi ubootenv)
|
||||
local envdev2=/dev/$(nand_find_volume $envubi ubootenv2)
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x1f000" "0x20000" "1"
|
||||
ubootenv_add_uci_config "$envdev2" "0x0" "0x1f000" "0x20000" "1"
|
||||
;;
|
||||
esac
|
||||
|
||||
config_load ubootenv
|
||||
|
@ -236,6 +236,18 @@ define U-Boot/mt7986_bananapi_bpi-r3-nor
|
||||
FIP_COMPRESS:=1
|
||||
endef
|
||||
|
||||
define U-Boot/mt7986_xiaomi_redmi-router-ax6000
|
||||
NAME:=Xiaomi Redmi AX6000
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=xiaomi_redmi-router-ax6000-ubootmod
|
||||
UBOOT_CONFIG:=mt7986_xiaomi_redmi-ax6000
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=spim-nand
|
||||
BL2_SOC:=mt7986
|
||||
BL2_DDRTYPE:=ddr4
|
||||
DEPENDS:=+trusted-firmware-a-mt7986-spim-nand-ddr4
|
||||
endef
|
||||
|
||||
UBOOT_TARGETS := \
|
||||
mt7620_mt7530_rfb \
|
||||
mt7620_rfb \
|
||||
@ -256,6 +268,7 @@ UBOOT_TARGETS := \
|
||||
mt7986_bananapi_bpi-r3-sdmmc \
|
||||
mt7986_bananapi_bpi-r3-snand \
|
||||
mt7986_bananapi_bpi-r3-nor \
|
||||
mt7986_xiaomi_redmi-router-ax6000 \
|
||||
mt7986_rfb
|
||||
|
||||
ifdef CONFIG_TARGET_mediatek
|
||||
|
@ -0,0 +1,391 @@
|
||||
--- /dev/null
|
||||
+++ b/configs/mt7986_xiaomi_redmi-ax6000_defconfig
|
||||
@@ -0,0 +1,175 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_POSITION_INDEPENDENT=y
|
||||
+CONFIG_ARCH_MEDIATEK=y
|
||||
+CONFIG_TARGET_MT7986=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x41e00000
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="mt7986a-xiaomi_redmi-ax6000"
|
||||
+CONFIG_DEFAULT_ENV_FILE="xiaomi_redmi-ax6000_env"
|
||||
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7986a-xiaomi_redmi-ax6000.dtb"
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
+CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
+CONFIG_SMBIOS_PRODUCT_NAME=""
|
||||
+CONFIG_AUTOBOOT_KEYED=y
|
||||
+CONFIG_BOOTDELAY=30
|
||||
+CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||
+CONFIG_CFB_CONSOLE_ANSI=y
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
|
||||
+# CONFIG_LED is not set
|
||||
+# CONFIG_LED_BLINK is not set
|
||||
+# CONFIG_LED_GPIO is not set
|
||||
+CONFIG_LOGLEVEL=7
|
||||
+CONFIG_LOG=y
|
||||
+CONFIG_SYS_PROMPT="MT7986> "
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_BOOTP=y
|
||||
+CONFIG_CMD_BUTTON=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_CPU=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_DM=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_ECHO=y
|
||||
+CONFIG_CMD_ENV_READMEM=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+# CONFIG_CMD_EXT4 is not set
|
||||
+# CONFIG_CMD_FAT is not set
|
||||
+CONFIG_CMD_FDT=y
|
||||
+# CONFIG_CMD_FS_GENERIC is not set
|
||||
+# CONFIG_CMD_FS_UUID is not set
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+# CONFIG_CMD_GPT is not set
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_ITEST=y
|
||||
+# CONFIG_CMD_LED is not set
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+# CONFIG_CMD_MBR is not set
|
||||
+CONFIG_CMD_MTD=y
|
||||
+# CONFIG_CMD_PCI is not set
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||
+CONFIG_CMD_SF_TEST=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
+# CONFIG_CMD_PWM is not set
|
||||
+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_RARP=y
|
||||
+CONFIG_CMD_SETEXPR=y
|
||||
+CONFIG_CMD_SLEEP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_SOURCE=y
|
||||
+CONFIG_CMD_STRINGS=y
|
||||
+# CONFIG_CMD_USB is not set
|
||||
+# CONFIG_CMD_FLASH is not set
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_DISPLAY_CPUINFO=y
|
||||
+CONFIG_DM_MTD=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_REGULATOR_GPIO=y
|
||||
+# CONFIG_DM_USB is not set
|
||||
+# CONFIG_DM_PWM is not set
|
||||
+# CONFIG_PWM_MTK is not set
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_VERSION_VARIABLE=y
|
||||
+CONFIG_PARTITION_UUIDS=y
|
||||
+CONFIG_NETCONSOLE=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_DM_GPIO=y
|
||||
+# CONFIG_DM_SCSI is not set
|
||||
+# CONFIG_AHCI is not set
|
||||
+CONFIG_PHY=y
|
||||
+# CONFIG_PHY_MTK_TPHY is not set
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+# CONFIG_PCI is not set
|
||||
+# CONFIG_MMC is not set
|
||||
+# CONFIG_DM_MMC is not set
|
||||
+CONFIG_MTD=y
|
||||
+CONFIG_MTD_UBI_FASTMAP=y
|
||||
+# CONFIG_DM_PCI is not set
|
||||
+# CONFIG_PCIE_MEDIATEK is not set
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+# CONFIG_PINCTRL_MT7622 is not set
|
||||
+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_I2C is not set
|
||||
+CONFIG_DM_SPI=y
|
||||
+CONFIG_MTK_SPI_NAND=y
|
||||
+CONFIG_MTK_SPI_NAND_MTD=y
|
||||
+CONFIG_SYSRESET_WATCHDOG=y
|
||||
+CONFIG_WDT_MTK=y
|
||||
+CONFIG_LZO=y
|
||||
+CONFIG_ZSTD=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_RANDOM_UUID=y
|
||||
+CONFIG_REGEX=y
|
||||
+# CONFIG_USB is not set
|
||||
+# CONFIG_USB_HOST is not set
|
||||
+# CONFIG_USB_XHCI_HCD is not set
|
||||
+# CONFIG_USB_XHCI_MTK is not set
|
||||
+# CONFIG_USB_STORAGE is not set
|
||||
+CONFIG_OF_EMBED=y
|
||||
+CONFIG_ENV_OVERWRITE=y
|
||||
+CONFIG_ENV_IS_IN_UBI=y
|
||||
+CONFIG_ENV_UBI_PART="ubi"
|
||||
+CONFIG_ENV_SIZE=0x1f000
|
||||
+CONFIG_ENV_SIZE_REDUND=0x1f000
|
||||
+CONFIG_ENV_UBI_VOLUME="ubootenv"
|
||||
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_REGMAP=y
|
||||
+CONFIG_SYSCON=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_DM_ETH=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7986=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+CONFIG_USE_DEFAULT_ENV_FILE=y
|
||||
+CONFIG_MTD_SPI_NAND=y
|
||||
+CONFIG_MTK_SPIM=y
|
||||
+CONFIG_CMD_MTD=y
|
||||
+CONFIG_CMD_NAND=y
|
||||
+CONFIG_CMD_NAND_TRIMFFS=y
|
||||
+CONFIG_LMB_MAX_REGIONS=64
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/mt7986a-xiaomi_redmi-ax6000.dts
|
||||
@@ -0,0 +1,152 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * Copyright (c) 2021 MediaTek Inc.
|
||||
+ * Author: Sam Shih <sam.shih@mediatek.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "mt7986.dtsi"
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+
|
||||
+/ {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ model = "Xiaomi Redmi AX6000";
|
||||
+ compatible = "mediatek,mt7986", "mediatek,mt7986-sd-rfb";
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = &uart0;
|
||||
+ tick-timer = &timer0;
|
||||
+ };
|
||||
+
|
||||
+ keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ factory {
|
||||
+ label = "reset";
|
||||
+ gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ mesh {
|
||||
+ label = "mesh";
|
||||
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart1_pins>;
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+ð {
|
||||
+ status = "okay";
|
||||
+ mediatek,gmac-id = <0>;
|
||||
+ phy-mode = "sgmii";
|
||||
+ mediatek,switch = "mt7531";
|
||||
+ reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ spic_pins: spi1-pins-func-1 {
|
||||
+ mux {
|
||||
+ function = "spi";
|
||||
+ groups = "spi1_2";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ uart1_pins: spi1-pins-func-3 {
|
||||
+ mux {
|
||||
+ function = "uart";
|
||||
+ groups = "uart1_2";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ spi_flash_pins: spi0-pins-func-1 {
|
||||
+ mux {
|
||||
+ function = "flash";
|
||||
+ groups = "spi0", "spi0_wp_hold";
|
||||
+ };
|
||||
+
|
||||
+ conf-pu {
|
||||
+ pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
|
||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||
+ bias-pull-up = <MTK_PUPD_SET_R1R0_00>;
|
||||
+ };
|
||||
+
|
||||
+ conf-pd {
|
||||
+ pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
|
||||
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||
+ bias-pull-down = <MTK_PUPD_SET_R1R0_00>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&spi0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&spi_flash_pins>;
|
||||
+ status = "okay";
|
||||
+ must_tx;
|
||||
+ enhance_timing;
|
||||
+ dma_ext;
|
||||
+ ipm_design;
|
||||
+ support_quad;
|
||||
+ tick_dly = <1>;
|
||||
+ sample_sel = <0>;
|
||||
+
|
||||
+ spi_nand@0 {
|
||||
+ compatible = "spi-nand";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <52000000>;
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "bl2";
|
||||
+ reg = <0x0 0x80000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@100000 {
|
||||
+ label = "nvram";
|
||||
+ reg = <0x100000 0x40000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@140000 {
|
||||
+ label = "bdata";
|
||||
+ reg = <0x140000 0x40000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@180000 {
|
||||
+ label = "factory";
|
||||
+ reg = <0x180000 0x200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@380000 {
|
||||
+ label = "fip";
|
||||
+ reg = <0x380000 0x200000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@600000 {
|
||||
+ label = "ubi";
|
||||
+ reg = <0x580000 0x7a80000>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&watchdog {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/xiaomi_redmi-ax6000_env
|
||||
@@ -0,0 +1,55 @@
|
||||
+ethaddr_factory=mtd read factory 0x40080000 0x0 0x20000 && env readmem -b ethaddr 0x40080004 0x6 ; setenv ethaddr_factory
|
||||
+ipaddr=192.168.1.1
|
||||
+serverip=192.168.1.254
|
||||
+loadaddr=0x46000000
|
||||
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
|
||||
+bootargs=console=ttyS0,115200n8 console_msg_format=syslog
|
||||
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
|
||||
+bootconf=config-1
|
||||
+bootdelay=0
|
||||
+bootfile=openwrt-mediatek-filogic-xiaomi_redmi-router-ax6000-ubootmod-initramfs-recovery.itb
|
||||
+bootfile_bl2=openwrt-mediatek-filogic-xiaomi_redmi-router-ax6000-ubootmod-preloader.bin
|
||||
+bootfile_fip=openwrt-mediatek-filogic-xiaomi_redmi-router-ax6000-ubootmod-bl31-uboot.fip
|
||||
+bootfile_upg=openwrt-mediatek-filogic-xiaomi_redmi-router-ax6000-ubootmod-squashfs-sysupgrade.itb
|
||||
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
|
||||
+bootmenu_default=0
|
||||
+bootmenu_delay=0
|
||||
+bootmenu_title= [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )
|
||||
+bootmenu_0=Initialize environment.=run _firstboot
|
||||
+bootmenu_0d=Run default boot command.=run boot_default
|
||||
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
|
||||
+bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
|
||||
+bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
|
||||
+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
|
||||
+bootmenu_7=[31mLoad BL2 preloader via TFTP then write to NAND.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
|
||||
+bootmenu_8=Reboot.=reset
|
||||
+bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
|
||||
+boot_first=if button reset ; then run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
|
||||
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
|
||||
+boot_production=run ubi_read_production && bootm $loadaddr#$bootconf
|
||||
+boot_recovery=run ubi_read_recovery && bootm $loadaddr#$bootconf
|
||||
+boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
|
||||
+boot_tftp_forever=while true ; do run boot_tftp_recovery ; sleep 1 ; done
|
||||
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
|
||||
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
|
||||
+boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
|
||||
+part_fit=fit
|
||||
+reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
|
||||
+mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
|
||||
+mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
|
||||
+ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic 0 ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic 1
|
||||
+ubi_format=ubi detach ; mtd erase ubi && 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 $part_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=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
|
||||
+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
|
||||
+_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
|
||||
+_firstboot=setenv _firstboot ; run ethaddr_factory ; 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"
|
@ -29,7 +29,7 @@ define U-Boot/a64-olinuxino
|
||||
BUILD_SUBTARGET:=cortexa53
|
||||
NAME:=Olimex A64-OLinuXino
|
||||
BUILD_DEVICES:=olimex_a64-olinuxino
|
||||
DEPENDS:=+PACKAGE_u-boot-olimex_a64-olinuxino:arm-trusted-firmware-sunxi-a64
|
||||
DEPENDS:=+PACKAGE_u-boot-olimex_a64-olinuxino:trusted-firmware-a-sunxi-a64
|
||||
UENV:=a64
|
||||
ATF:=a64
|
||||
endef
|
||||
@ -38,7 +38,7 @@ define U-Boot/a64-olinuxino-emmc
|
||||
BUILD_SUBTARGET:=cortexa53
|
||||
NAME:=Olimex A64-OLinuXino eMMC
|
||||
BUILD_DEVICES:=olimex_a64-olinuxino-emmc
|
||||
DEPENDS:=+PACKAGE_u-boot-olimex_a64-olinuxino-emmc:arm-trusted-firmware-sunxi-a64
|
||||
DEPENDS:=+PACKAGE_u-boot-olimex_a64-olinuxino-emmc:trusted-firmware-a-sunxi-a64
|
||||
UENV:=a64
|
||||
ATF:=a64
|
||||
endef
|
||||
@ -207,7 +207,7 @@ endef
|
||||
define U-Boot/orangepi_one_plus
|
||||
BUILD_SUBTARGET:=cortexa53
|
||||
NAME:=Orange Pi One Plus (H6)
|
||||
DEPENDS:=+PACKAGE_u-boot-orangepi_one_plus:arm-trusted-firmware-sunxi-h6
|
||||
DEPENDS:=+PACKAGE_u-boot-orangepi_one_plus:trusted-firmware-a-sunxi-h6
|
||||
BUILD_DEVICES:=xunlong_orangepi-one-plus
|
||||
UENV:=h6
|
||||
ATF:=h6
|
||||
@ -247,7 +247,7 @@ define U-Boot/libretech_all_h3_cc_h5
|
||||
BUILD_SUBTARGET:=cortexa53
|
||||
NAME:=Libre Computer ALL-H3-CC H5
|
||||
BUILD_DEVICES:=libretech_all-h3-cc-h5
|
||||
DEPENDS:=+PACKAGE_u-boot-libretech_all_h3_cc_h5:arm-trusted-firmware-sunxi-a64
|
||||
DEPENDS:=+PACKAGE_u-boot-libretech_all_h3_cc_h5:trusted-firmware-a-sunxi-a64
|
||||
UENV:=a64
|
||||
ATF:=a64
|
||||
endef
|
||||
@ -256,7 +256,7 @@ define U-Boot/nanopi_neo_plus2
|
||||
BUILD_SUBTARGET:=cortexa53
|
||||
NAME:=NanoPi NEO Plus2 (H5)
|
||||
BUILD_DEVICES:=friendlyarm_nanopi-neo-plus2
|
||||
DEPENDS:=+PACKAGE_u-boot-nanopi_neo_plus2:arm-trusted-firmware-sunxi-a64
|
||||
DEPENDS:=+PACKAGE_u-boot-nanopi_neo_plus2:trusted-firmware-a-sunxi-a64
|
||||
UENV:=a64
|
||||
ATF:=a64
|
||||
endef
|
||||
@ -265,7 +265,7 @@ define U-Boot/nanopi_neo2
|
||||
BUILD_SUBTARGET:=cortexa53
|
||||
NAME:=NanoPi NEO2 (H5)
|
||||
BUILD_DEVICES:=friendlyarm_nanopi-neo2
|
||||
DEPENDS:=+PACKAGE_u-boot-nanopi_neo2:arm-trusted-firmware-sunxi-a64
|
||||
DEPENDS:=+PACKAGE_u-boot-nanopi_neo2:trusted-firmware-a-sunxi-a64
|
||||
UENV:=a64
|
||||
ATF:=a64
|
||||
endef
|
||||
@ -274,7 +274,7 @@ define U-Boot/nanopi_r1s_h5
|
||||
BUILD_SUBTARGET:=cortexa53
|
||||
NAME:=NanoPi R1S (H5)
|
||||
BUILD_DEVICES:=friendlyarm_nanopi-r1s-h5
|
||||
DEPENDS:=+PACKAGE_u-boot-nanopi_r1s_h5:arm-trusted-firmware-sunxi-a64
|
||||
DEPENDS:=+PACKAGE_u-boot-nanopi_r1s_h5:trusted-firmware-a-sunxi-a64
|
||||
UENV:=a64
|
||||
ATF:=a64
|
||||
endef
|
||||
@ -283,7 +283,7 @@ define U-Boot/pine64_plus
|
||||
BUILD_SUBTARGET:=cortexa53
|
||||
NAME:=Pine64 Plus A64
|
||||
BUILD_DEVICES:=pine64_pine64-plus
|
||||
DEPENDS:=+PACKAGE_u-boot-pine64_plus:arm-trusted-firmware-sunxi-a64
|
||||
DEPENDS:=+PACKAGE_u-boot-pine64_plus:trusted-firmware-a-sunxi-a64
|
||||
UENV:=a64
|
||||
ATF:=a64
|
||||
endef
|
||||
@ -298,7 +298,7 @@ define U-Boot/sopine_baseboard
|
||||
BUILD_SUBTARGET:=cortexa53
|
||||
NAME:=Sopine Baseboard
|
||||
BUILD_DEVICES:=pine64_sopine-baseboard
|
||||
DEPENDS:=+PACKAGE_u-boot-sopine_baseboard:arm-trusted-firmware-sunxi-a64
|
||||
DEPENDS:=+PACKAGE_u-boot-sopine_baseboard:trusted-firmware-a-sunxi-a64
|
||||
UENV:=a64
|
||||
ATF:=a64
|
||||
endef
|
||||
@ -308,7 +308,7 @@ define U-Boot/orangepi_zero_plus
|
||||
BUILD_SUBTARGET:=cortexa53
|
||||
NAME:=Xunlong Orange Pi Zero Plus
|
||||
BUILD_DEVICES:=xunlong_orangepi-zero-plus
|
||||
DEPENDS:=+PACKAGE_u-boot-orangepi_zero_plus:arm-trusted-firmware-sunxi-a64
|
||||
DEPENDS:=+PACKAGE_u-boot-orangepi_zero_plus:trusted-firmware-a-sunxi-a64
|
||||
UENV:=a64
|
||||
ATF:=a64
|
||||
endef
|
||||
@ -317,7 +317,7 @@ define U-Boot/orangepi_pc2
|
||||
BUILD_SUBTARGET:=cortexa53
|
||||
NAME:=Xunlong Orange Pi PC2
|
||||
BUILD_DEVICES:=xunlong_orangepi-pc2
|
||||
DEPENDS:=+PACKAGE_u-boot-orangepi_pc2:arm-trusted-firmware-sunxi-a64
|
||||
DEPENDS:=+PACKAGE_u-boot-orangepi_pc2:trusted-firmware-a-sunxi-a64
|
||||
UENV:=a64
|
||||
ATF:=a64
|
||||
endef
|
||||
@ -385,7 +385,7 @@ UBOOT_TARGETS := \
|
||||
UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
|
||||
|
||||
UBOOT_MAKE_FLAGS += \
|
||||
BL31=$(STAGING_DIR_IMAGE)/bl31_sun50i_$(ATF).bin
|
||||
BL31=$(STAGING_DIR_IMAGE)/bl31_sunxi-$(ATF).bin
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=linux-firmware
|
||||
PKG_VERSION:=20221214
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
@ -21,6 +21,9 @@ SCAN_DEPS = *.mk
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
RSTRIP:=:
|
||||
STRIP:=:
|
||||
|
||||
define Package/firmware-default
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
|
@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -4067,6 +4067,56 @@ static void ieee80211_invoke_rx_handlers
|
||||
@@ -4067,6 +4067,58 @@ static void ieee80211_invoke_rx_handlers
|
||||
#undef CALL_RXH
|
||||
}
|
||||
|
||||
@ -36,11 +36,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+static bool ieee80211_rx_data_set_link(struct ieee80211_rx_data *rx,
|
||||
+ u8 link_id)
|
||||
+{
|
||||
+ rx->link_id = link_id;
|
||||
+ rx->link = rcu_dereference(rx->sdata->link[link_id]);
|
||||
+
|
||||
+ if (!rx->sta || !rx->sta->sta.mlo)
|
||||
+ return rx->link;
|
||||
+
|
||||
+ if (!ieee80211_rx_is_valid_sta_link_id(&rx->sta->sta, link_id))
|
||||
+ return false;
|
||||
+
|
||||
+ rx->link_id = link_id;
|
||||
+ rx->link = rcu_dereference(rx->sdata->link[link_id]);
|
||||
+ rx->link_sta = rcu_dereference(rx->sta->link[link_id]);
|
||||
+
|
||||
+ return rx->link && rx->link_sta;
|
||||
@ -62,14 +66,12 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+ if (!rx->sdata)
|
||||
+ rx->sdata = sta->sdata;
|
||||
+ rx->link_sta = &sta->deflink;
|
||||
+
|
||||
+ if (link_id >= 0 &&
|
||||
+ !ieee80211_rx_data_set_link(rx, link_id))
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ if (link_id < 0)
|
||||
+ rx->link = &rx->sdata->deflink;
|
||||
+ else if (!ieee80211_rx_data_set_link(rx, link_id))
|
||||
+ return false;
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
@ -77,7 +79,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
/*
|
||||
* This function makes calls into the RX path, therefore
|
||||
* it has to be invoked under RCU read lock.
|
||||
@@ -4075,16 +4125,19 @@ void ieee80211_release_reorder_timeout(s
|
||||
@@ -4075,16 +4127,19 @@ void ieee80211_release_reorder_timeout(s
|
||||
{
|
||||
struct sk_buff_head frames;
|
||||
struct ieee80211_rx_data rx = {
|
||||
@ -102,7 +104,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
tid_agg_rx = rcu_dereference(sta->ampdu_mlme.tid_rx[tid]);
|
||||
if (!tid_agg_rx)
|
||||
@@ -4104,10 +4157,6 @@ void ieee80211_release_reorder_timeout(s
|
||||
@@ -4104,10 +4159,6 @@ void ieee80211_release_reorder_timeout(s
|
||||
};
|
||||
drv_event_callback(rx.local, rx.sdata, &event);
|
||||
}
|
||||
@ -113,7 +115,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
ieee80211_rx_handlers(&rx, &frames);
|
||||
}
|
||||
@@ -4123,7 +4172,6 @@ void ieee80211_mark_rx_ba_filtered_frame
|
||||
@@ -4123,7 +4174,6 @@ void ieee80211_mark_rx_ba_filtered_frame
|
||||
/* This is OK -- must be QoS data frame */
|
||||
.security_idx = tid,
|
||||
.seqno_idx = tid,
|
||||
@ -121,7 +123,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
};
|
||||
int i, diff;
|
||||
|
||||
@@ -4134,10 +4182,8 @@ void ieee80211_mark_rx_ba_filtered_frame
|
||||
@@ -4134,10 +4184,8 @@ void ieee80211_mark_rx_ba_filtered_frame
|
||||
|
||||
sta = container_of(pubsta, struct sta_info, sta);
|
||||
|
||||
@ -134,7 +136,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
rcu_read_lock();
|
||||
tid_agg_rx = rcu_dereference(sta->ampdu_mlme.tid_rx[tid]);
|
||||
@@ -4524,15 +4570,6 @@ void ieee80211_check_fast_rx_iface(struc
|
||||
@@ -4524,15 +4572,6 @@ void ieee80211_check_fast_rx_iface(struc
|
||||
mutex_unlock(&local->sta_mtx);
|
||||
}
|
||||
|
||||
@ -150,7 +152,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
static void ieee80211_rx_8023(struct ieee80211_rx_data *rx,
|
||||
struct ieee80211_fast_rx *fast_rx,
|
||||
int orig_len)
|
||||
@@ -4643,7 +4680,6 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
@@ -4643,7 +4682,6 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
struct sk_buff *skb = rx->skb;
|
||||
struct ieee80211_hdr *hdr = (void *)skb->data;
|
||||
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
|
||||
@ -158,7 +160,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
int orig_len = skb->len;
|
||||
int hdrlen = ieee80211_hdrlen(hdr->frame_control);
|
||||
int snap_offs = hdrlen;
|
||||
@@ -4655,7 +4691,6 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
@@ -4655,7 +4693,6 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
u8 da[ETH_ALEN];
|
||||
u8 sa[ETH_ALEN];
|
||||
} addrs __aligned(2);
|
||||
@ -166,7 +168,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
struct ieee80211_sta_rx_stats *stats;
|
||||
|
||||
/* for parallel-rx, we need to have DUP_VALIDATED, otherwise we write
|
||||
@@ -4758,18 +4793,10 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
@@ -4758,18 +4795,10 @@ static bool ieee80211_invoke_fast_rx(str
|
||||
drop:
|
||||
dev_kfree_skb(skb);
|
||||
|
||||
@ -187,7 +189,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
stats->dropped++;
|
||||
return true;
|
||||
@@ -4787,8 +4814,8 @@ static bool ieee80211_prepare_and_rx_han
|
||||
@@ -4787,8 +4816,8 @@ static bool ieee80211_prepare_and_rx_han
|
||||
struct ieee80211_local *local = rx->local;
|
||||
struct ieee80211_sub_if_data *sdata = rx->sdata;
|
||||
struct ieee80211_hdr *hdr = (void *)skb->data;
|
||||
@ -198,7 +200,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
rx->skb = skb;
|
||||
|
||||
@@ -4810,35 +4837,6 @@ static bool ieee80211_prepare_and_rx_han
|
||||
@@ -4810,35 +4839,6 @@ static bool ieee80211_prepare_and_rx_han
|
||||
if (!ieee80211_accept_frame(rx))
|
||||
return false;
|
||||
|
||||
@ -234,7 +236,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (!consume) {
|
||||
struct skb_shared_hwtstamps *shwt;
|
||||
|
||||
@@ -4858,7 +4856,7 @@ static bool ieee80211_prepare_and_rx_han
|
||||
@@ -4858,7 +4858,7 @@ static bool ieee80211_prepare_and_rx_han
|
||||
shwt->hwtstamp = skb_hwtstamps(skb)->hwtstamp;
|
||||
}
|
||||
|
||||
@ -243,7 +245,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
/* translate to MLD addresses */
|
||||
if (ether_addr_equal(link->conf->addr, hdr->addr1))
|
||||
ether_addr_copy(hdr->addr1, rx->sdata->vif.addr);
|
||||
@@ -4888,6 +4886,7 @@ static void __ieee80211_rx_handle_8023(s
|
||||
@@ -4888,6 +4888,7 @@ static void __ieee80211_rx_handle_8023(s
|
||||
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
|
||||
struct ieee80211_fast_rx *fast_rx;
|
||||
struct ieee80211_rx_data rx;
|
||||
@ -251,7 +253,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
memset(&rx, 0, sizeof(rx));
|
||||
rx.skb = skb;
|
||||
@@ -4904,12 +4903,8 @@ static void __ieee80211_rx_handle_8023(s
|
||||
@@ -4904,12 +4905,8 @@ static void __ieee80211_rx_handle_8023(s
|
||||
if (!pubsta)
|
||||
goto drop;
|
||||
|
||||
@ -266,7 +268,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
/*
|
||||
* TODO: Should the frame be dropped if the right link_id is not
|
||||
@@ -4918,19 +4913,8 @@ static void __ieee80211_rx_handle_8023(s
|
||||
@@ -4918,19 +4915,8 @@ static void __ieee80211_rx_handle_8023(s
|
||||
* link_id is used only for stats purpose and updating the stats on
|
||||
* the deflink is fine?
|
||||
*/
|
||||
@ -288,7 +290,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
fast_rx = rcu_dereference(rx.sta->fast_rx);
|
||||
if (!fast_rx)
|
||||
@@ -4948,6 +4932,8 @@ static bool ieee80211_rx_for_interface(s
|
||||
@@ -4948,6 +4934,8 @@ static bool ieee80211_rx_for_interface(s
|
||||
{
|
||||
struct link_sta_info *link_sta;
|
||||
struct ieee80211_hdr *hdr = (void *)skb->data;
|
||||
@ -297,7 +299,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
/*
|
||||
* Look up link station first, in case there's a
|
||||
@@ -4957,24 +4943,19 @@ static bool ieee80211_rx_for_interface(s
|
||||
@@ -4957,24 +4945,19 @@ static bool ieee80211_rx_for_interface(s
|
||||
*/
|
||||
link_sta = link_sta_info_get_bss(rx->sdata, hdr->addr2);
|
||||
if (link_sta) {
|
||||
@ -330,7 +332,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
return ieee80211_prepare_and_rx_handle(rx, skb, consume);
|
||||
}
|
||||
|
||||
@@ -5033,19 +5014,15 @@ static void __ieee80211_rx_handle_packet
|
||||
@@ -5033,19 +5016,15 @@ static void __ieee80211_rx_handle_packet
|
||||
|
||||
if (ieee80211_is_data(fc)) {
|
||||
struct sta_info *sta, *prev_sta;
|
||||
@ -355,7 +357,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
/*
|
||||
* In MLO connection, fetch the link_id using addr2
|
||||
* when the driver does not pass link_id in status.
|
||||
@@ -5063,7 +5040,7 @@ static void __ieee80211_rx_handle_packet
|
||||
@@ -5063,7 +5042,7 @@ static void __ieee80211_rx_handle_packet
|
||||
if (!link_sta)
|
||||
goto out;
|
||||
|
||||
@ -364,7 +366,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
if (ieee80211_prepare_and_rx_handle(&rx, skb, true))
|
||||
@@ -5079,30 +5056,25 @@ static void __ieee80211_rx_handle_packet
|
||||
@@ -5079,30 +5058,27 @@ static void __ieee80211_rx_handle_packet
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -372,6 +374,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
- !ieee80211_rx_is_valid_sta_link_id(&prev_sta->sta,
|
||||
- link_id)) ||
|
||||
- (!status->link_valid && prev_sta->sta.mlo))
|
||||
+ rx.sdata = prev_sta->sdata;
|
||||
+ if (!ieee80211_rx_data_set_sta(&rx, &prev_sta->sta,
|
||||
+ link_id))
|
||||
+ goto out;
|
||||
@ -392,6 +395,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
- !ieee80211_rx_is_valid_sta_link_id(&prev_sta->sta,
|
||||
- link_id)) ||
|
||||
- (!status->link_valid && prev_sta->sta.mlo))
|
||||
+ rx.sdata = prev_sta->sdata;
|
||||
+ if (!ieee80211_rx_data_set_sta(&rx, &prev_sta->sta,
|
||||
+ link_id))
|
||||
goto out;
|
||||
|
@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mbedtls
|
||||
PKG_VERSION:=2.28.1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
PKG_VERSION:=2.28.2
|
||||
PKG_RELEASE:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=6797a7b6483ef589deeab8d33d401ed235d7be25eeecda1be8ddfed406d40ff4
|
||||
PKG_HASH:=bc55232bf71fd66045122ba9050a29ea7cb2e8f99b064a9e6334a82f715881a0
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=gpl-2.0.txt
|
||||
|
@ -4,7 +4,7 @@ Bug report: https://github.com/Mbed-TLS/mbedtls/issues/6243
|
||||
|
||||
--- a/programs/ssl/ssl_server2.c
|
||||
+++ b/programs/ssl/ssl_server2.c
|
||||
@@ -2511,7 +2511,6 @@ int main( int argc, char *argv[] )
|
||||
@@ -2529,7 +2529,6 @@ int main( int argc, char *argv[] )
|
||||
}
|
||||
key_cert_init2 = 2;
|
||||
#endif /* MBEDTLS_ECDSA_C */
|
||||
@ -12,11 +12,11 @@ Bug report: https://github.com/Mbed-TLS/mbedtls/issues/6243
|
||||
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
if( opt.key_opaque != 0 )
|
||||
@@ -2540,6 +2539,7 @@ int main( int argc, char *argv[] )
|
||||
@@ -2558,6 +2557,7 @@ int main( int argc, char *argv[] )
|
||||
}
|
||||
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||
#endif /* MBEDTLS_CERTS_C */
|
||||
+ }
|
||||
|
||||
mbedtls_printf( " ok (key types: %s - %s)\n", mbedtls_pk_get_name( &pkey ), mbedtls_pk_get_name( &pkey2 ) );
|
||||
#endif /* MBEDTLS_X509_CRT_PARSE_C */
|
||||
#endif /* MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED */
|
||||
|
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ustream-ssl
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ustream-ssl.git
|
||||
|
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wolfssl
|
||||
PKG_VERSION:=5.5.3-stable
|
||||
PKG_VERSION:=5.5.4-stable
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
|
||||
PKG_HASH:=fd3135b8657d09fb96a8aad16585da850b96ea420ae8ce5ac4d5fdfc614c2683
|
||||
PKG_HASH:=b7ee150e49def77c765bc02aac92ddeb0bebefd4cb12aa263d8f95e405221fb8
|
||||
|
||||
PKG_FIXUP:=libtool libtool-abiver
|
||||
PKG_INSTALL:=1
|
||||
|
@ -1,33 +0,0 @@
|
||||
From dc9f46a3be00b5e82684a158605189d1278e324c Mon Sep 17 00:00:00 2001
|
||||
From: Eric Blankenhorn <eric@wolfssl.com>
|
||||
Date: Wed, 12 Oct 2022 16:05:17 -0500
|
||||
Subject: [PATCH] Fix --enable-devcrypto build error for sys without u_int8_t
|
||||
type
|
||||
|
||||
---
|
||||
wolfcrypt/src/port/devcrypto/README.md | 2 +-
|
||||
wolfcrypt/src/port/devcrypto/wc_devcrypto.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/wolfcrypt/src/port/devcrypto/README.md
|
||||
+++ b/wolfcrypt/src/port/devcrypto/README.md
|
||||
@@ -22,7 +22,7 @@ modprobe cryptodev
|
||||
For default build with all supported features use:
|
||||
|
||||
```
|
||||
-./configure --enable-cryptodev
|
||||
+./configure --enable-devcrypto
|
||||
```
|
||||
|
||||
Or for more control over features used:
|
||||
--- a/wolfcrypt/src/port/devcrypto/wc_devcrypto.c
|
||||
+++ b/wolfcrypt/src/port/devcrypto/wc_devcrypto.c
|
||||
@@ -122,7 +122,7 @@ int wc_DevCryptoCreate(WC_CRYPTODEV* ctx
|
||||
case CRYPTO_SHA2_512_HMAC:
|
||||
ctx->sess.cipher = 0;
|
||||
ctx->sess.mac = type;
|
||||
- ctx->sess.mackey = (u_int8_t*)key;
|
||||
+ ctx->sess.mackey = (byte*)key;
|
||||
ctx->sess.mackeylen = keySz;
|
||||
break;
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/wolfssl/wolfcrypt/settings.h
|
||||
+++ b/wolfssl/wolfcrypt/settings.h
|
||||
@@ -2455,7 +2455,7 @@ extern void uITRON4_free(void *p) ;
|
||||
@@ -2496,7 +2496,7 @@ extern void uITRON4_free(void *p) ;
|
||||
#endif
|
||||
|
||||
/* warning for not using harden build options (default with ./configure) */
|
||||
|
@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
|
||||
PKG_SOURCE_DATE:=2022-08-25
|
||||
PKG_SOURCE_VERSION:=76d2d41b7355e02f95fbfa79affbd232fb090595
|
||||
PKG_MIRROR_HASH:=cd754decce7d9f9c69e0ad8c6801f306fa37dd6c8a7039aea610c1c71d06b8f9
|
||||
PKG_SOURCE_DATE:=2022-12-30
|
||||
PKG_SOURCE_VERSION:=81c1fbcba2f27f687c2a471f341502d47679f401
|
||||
PKG_MIRROR_HASH:=41d19f2804759aa42708942e27116bec78b169abee639d97c2ec7f0f62fa7739
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=hostapd
|
||||
PKG_RELEASE:=$(AUTORELEASE).1
|
||||
PKG_RELEASE:=$(AUTORELEASE).2
|
||||
|
||||
PKG_SOURCE_URL:=http://w1.fi/hostap.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
@ -139,11 +139,6 @@ ifneq ($(LOCAL_TYPE),hostapd)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef CONFIG_USE_GLIBC
|
||||
TARGET_LDFLAGS += -lrt
|
||||
TARGET_LDFLAGS_C += -lrt
|
||||
endif
|
||||
|
||||
DRV_DEPENDS:=+PACKAGE_kmod-cfg80211:libnl-tiny
|
||||
|
||||
|
||||
|
@ -31,7 +31,6 @@ PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lrt)
|
||||
CMAKE_OPTIONS += $(if $(CONFIG_FSTOOLS_UBIFS_EXTROOT),-DCMAKE_UBIFS_EXTROOT=y)
|
||||
CMAKE_OPTIONS += $(if $(CONFIG_FSTOOLS_OVL_MOUNT_FULL_ACCESS_TIME),-DCMAKE_OVL_MOUNT_FULL_ACCESS_TIME=y)
|
||||
CMAKE_OPTIONS += $(if $(CONFIG_FSTOOLS_OVL_MOUNT_COMPRESS_ZLIB),-DCMAKE_OVL_MOUNT_COMPRESS_ZLIB=y)
|
||||
@ -39,7 +38,7 @@ CMAKE_OPTIONS += $(if $(CONFIG_FSTOOLS_OVL_MOUNT_COMPRESS_ZLIB),-DCMAKE_OVL_MOUN
|
||||
define Package/fstools
|
||||
SECTION:=base
|
||||
CATEGORY:=Base system
|
||||
DEPENDS:=+ubox +USE_GLIBC:librt +NAND_SUPPORT:ubi-utils
|
||||
DEPENDS:=+ubox +NAND_SUPPORT:ubi-utils
|
||||
TITLE:=OpenWrt filesystem tools
|
||||
MENU:=1
|
||||
endef
|
||||
|
@ -35,7 +35,6 @@ ifeq ($(DUMP),)
|
||||
endif
|
||||
|
||||
CMAKE_OPTIONS += -DEARLY_PATH="$(TARGET_INIT_PATH)"
|
||||
TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lrt)
|
||||
|
||||
TARGET_CFLAGS += -flto
|
||||
TARGET_LDFLAGS += -flto
|
||||
@ -43,7 +42,7 @@ TARGET_LDFLAGS += -flto
|
||||
define Package/procd/Default
|
||||
SECTION:=base
|
||||
CATEGORY:=Base system
|
||||
DEPENDS:=+ubusd +ubus +libjson-script +ubox +USE_GLIBC:librt +libubox \
|
||||
DEPENDS:=+ubusd +ubus +libjson-script +ubox +libubox \
|
||||
+libubus +libblobmsg-json +libjson-c +jshn
|
||||
TITLE:=OpenWrt system process manager
|
||||
USERID:=:dialout=20 :audio=29
|
||||
|
@ -18,12 +18,10 @@ PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lrt)
|
||||
|
||||
define Package/ubox
|
||||
SECTION:=base
|
||||
CATEGORY:=Base system
|
||||
DEPENDS:=+libubox +ubusd +ubus +libubus +libuci +USE_GLIBC:librt
|
||||
DEPENDS:=+libubox +ubusd +ubus +libubus +libuci
|
||||
TITLE:=OpenWrt system helper toolbox
|
||||
ALTERNATIVES:=\
|
||||
100:/sbin/rmmod:/sbin/kmodloader \
|
||||
@ -46,7 +44,7 @@ endef
|
||||
define Package/logd
|
||||
SECTION:=base
|
||||
CATEGORY:=Base system
|
||||
DEPENDS:=+libubox +libubus +libblobmsg-json +USE_GLIBC:librt
|
||||
DEPENDS:=+libubox +libubus +libblobmsg-json
|
||||
TITLE:=OpenWrt system log implementation
|
||||
USERID:=logd=514:logd=514
|
||||
endef
|
||||
|
@ -144,7 +144,6 @@ endef
|
||||
|
||||
TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections -flto
|
||||
|
||||
TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lrt)
|
||||
TARGET_LDFLAGS += -flto
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
|
@ -99,7 +99,7 @@ define Build/Compile
|
||||
RANLIB="$(TARGET_CROSS)ranlib" \
|
||||
INSTALL_ROOT=/usr \
|
||||
CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
|
||||
MYLDFLAGS="$(TARGET_LDFLAGS) $(if $(CONFIG_USE_GLIBC),-lm -ldl)" \
|
||||
MYLDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
PKG_VERSION=$(PKG_VERSION) \
|
||||
linux
|
||||
rm -rf $(PKG_INSTALL_DIR)
|
||||
|
@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=px5g-wolfssl
|
||||
PKG_RELEASE:=$(COMMITCOUNT).1
|
||||
PKG_RELEASE:=$(COMMITCOUNT).2
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
|
||||
PKG_USE_MIPS16:=0
|
||||
|
@ -4,7 +4,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=uencrypt
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_FLAGS:=nonshared
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
|
@ -1,268 +0,0 @@
|
||||
--- a/arch/mips/bcm47xx/board.c
|
||||
+++ b/arch/mips/bcm47xx/board.c
|
||||
@@ -141,6 +141,7 @@ struct bcm47xx_board_type_list2 bcm47xx_
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT300NV11, "Linksys WRT300N V1.1"}, "WRT300N", "1.1"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT310NV1, "Linksys WRT310N V1"}, "WRT310N", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT310NV2, "Linksys WRT310N V2"}, "WRT310N", "2.0"},
|
||||
+ {{BCM47XX_BOARD_LINKSYS_WRT320N_V1, "Linksys WRT320N V1"}, "WRT320N", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT54G3GV2, "Linksys WRT54G3GV2-VF"}, "WRT54G3GV2-VF", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT610NV1, "Linksys WRT610N V1"}, "WRT610N", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT610NV2, "Linksys WRT610N V2"}, "WRT610N", "2.0"},
|
||||
@@ -161,9 +162,12 @@ struct bcm47xx_board_type_list1 bcm47xx_
|
||||
{{BCM47XX_BOARD_LUXUL_XWR_600_V1, "Luxul XWR-600 V1"}, "luxul_xwr600_v1"},
|
||||
{{BCM47XX_BOARD_LUXUL_XWR_1750_V1, "Luxul XWR-1750 V1"}, "luxul_xwr1750_v1"},
|
||||
{{BCM47XX_BOARD_NETGEAR_R6200_V1, "Netgear R6200 V1"}, "U12H192T00_NETGEAR"},
|
||||
+ {{BCM47XX_BOARD_NETGEAR_R6300_V1, "Netgear R6300 V1"}, "U12H218T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
|
||||
+ {{BCM47XX_BOARD_NETGEAR_WN2500RP_V1, "Netgear WN2500RP V1"}, "U12H197T00_NETGEAR"},
|
||||
+ {{BCM47XX_BOARD_NETGEAR_WN2500RP_V2, "Netgear WN2500RP V2"}, "U12H294T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNDR3300, "Netgear WNDR3300"}, "U12H093T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNDR3400V1, "Netgear WNDR3400 V1"}, "U12H155T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNDR3400V2, "Netgear WNDR3400 V2"}, "U12H187T00_NETGEAR"},
|
||||
@@ -177,6 +181,7 @@ struct bcm47xx_board_type_list1 bcm47xx_
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR1000_V3, "Netgear WNR1000 V3"}, "U12H139T50_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR2000, "Netgear WNR2000"}, "U12H114T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500L, "Netgear WNR3500L"}, "U12H136T99_NETGEAR"},
|
||||
+ {{BCM47XX_BOARD_NETGEAR_WNR3500L_V2, "Netgear WNR3500L V2"}, "U12H172T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500U, "Netgear WNR3500U"}, "U12H136T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500V2, "Netgear WNR3500 V2"}, "U12H127T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500V2VC, "Netgear WNR3500 V2vc"}, "U12H127T70_NETGEAR"},
|
||||
@@ -191,6 +196,7 @@ struct bcm47xx_board_type_list3 bcm47xx_
|
||||
{{BCM47XX_BOARD_PHICOMM_M1, "Phicomm M1"}, "0x0590", "80", "0x1104"},
|
||||
{{BCM47XX_BOARD_ZTE_H218N, "ZTE H218N"}, "0x053d", "1234", "0x1305"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500L, "Netgear WNR3500L"}, "0x04CF", "3500", "02"},
|
||||
+ {{BCM47XX_BOARD_NETGEAR_WNR3500L_V2, "Netgear WNR3500L V2"}, "0x052b", "3500L", "02"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101, "Linksys WRT54G/GS/GL"}, "0x0101", "42", "0x10"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467, "Linksys WRT54G/GS/GL"}, "0x0467", "42", "0x10"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708, "Linksys WRT54G/GS/GL"}, "0x0708", "42", "0x10"},
|
||||
--- a/arch/mips/bcm47xx/buttons.c
|
||||
+++ b/arch/mips/bcm47xx/buttons.c
|
||||
@@ -27,6 +27,12 @@
|
||||
/* Asus */
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_asus_rtn10u[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(20, KEY_WPS_BUTTON),
|
||||
+ BCM47XX_GPIO_KEY(21, KEY_RESTART),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_asus_rtn12[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON),
|
||||
BCM47XX_GPIO_KEY(1, KEY_RESTART),
|
||||
@@ -277,6 +283,18 @@ bcm47xx_buttons_linksys_wrt310nv1[] __in
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_linksys_wrt310n_v2[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
|
||||
+ BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_linksys_wrt320n_v1[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
|
||||
+ BCM47XX_GPIO_KEY(8, KEY_RESTART),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(5, KEY_WIMAX),
|
||||
BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
@@ -392,6 +410,17 @@ bcm47xx_buttons_netgear_r6200_v1[] __ini
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_netgear_r6300_v1[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_netgear_wn2500rp_v1[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(12, KEY_RESTART),
|
||||
+ BCM47XX_GPIO_KEY(31, KEY_WPS_BUTTON),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_netgear_wndr3400v1[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(4, KEY_RESTART),
|
||||
BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
|
||||
@@ -431,6 +460,13 @@ bcm47xx_buttons_netgear_wnr3500lv1[] __i
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_netgear_wnr3500lv2[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(4, KEY_RESTART),
|
||||
+ BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
|
||||
+ BCM47XX_GPIO_KEY(8, KEY_RFKILL),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_netgear_wnr834bv2[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
};
|
||||
@@ -478,6 +514,9 @@ int __init bcm47xx_buttons_register(void
|
||||
int err;
|
||||
|
||||
switch (board) {
|
||||
+ case BCM47XX_BOARD_ASUS_RTN10U:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn10u);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_ASUS_RTN12:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn12);
|
||||
break;
|
||||
@@ -608,6 +647,12 @@ int __init bcm47xx_buttons_register(void
|
||||
case BCM47XX_BOARD_LINKSYS_WRT310NV1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_LINKSYS_WRT310NV2:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310n_v2);
|
||||
+ break;
|
||||
+ case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt320n_v1);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2);
|
||||
break;
|
||||
@@ -674,6 +719,12 @@ int __init bcm47xx_buttons_register(void
|
||||
case BCM47XX_BOARD_NETGEAR_R6200_V1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6200_v1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_NETGEAR_R6300_V1:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6300_v1);
|
||||
+ break;
|
||||
+ case BCM47XX_BOARD_NETGEAR_WN2500RP_V1:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wn2500rp_v1);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1);
|
||||
break;
|
||||
@@ -692,6 +743,9 @@ int __init bcm47xx_buttons_register(void
|
||||
case BCM47XX_BOARD_NETGEAR_WNR3500L:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr3500lv1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_NETGEAR_WNR3500L_V2:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr3500lv2);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_NETGEAR_WNR834BV2:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr834bv2);
|
||||
break;
|
||||
--- a/arch/mips/bcm47xx/leds.c
|
||||
+++ b/arch/mips/bcm47xx/leds.c
|
||||
@@ -30,6 +30,14 @@
|
||||
/* Asus */
|
||||
|
||||
static const struct gpio_led
|
||||
+bcm47xx_leds_asus_rtn10u[] __initconst = {
|
||||
+ BCM47XX_GPIO_LED(5, "green", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+ BCM47XX_GPIO_LED(6, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
|
||||
+ BCM47XX_GPIO_LED(7, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+ BCM47XX_GPIO_LED(8, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_led
|
||||
bcm47xx_leds_asus_rtn12[] __initconst = {
|
||||
BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
|
||||
BCM47XX_GPIO_LED(7, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
@@ -314,6 +322,13 @@ bcm47xx_leds_linksys_wrt310nv1[] __initc
|
||||
};
|
||||
|
||||
static const struct gpio_led
|
||||
+bcm47xx_leds_linksys_wrt320n_v1[] __initconst = {
|
||||
+ BCM47XX_GPIO_LED(1, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+ BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
|
||||
+ BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_led
|
||||
bcm47xx_leds_linksys_wrt54g_generic[] __initconst = {
|
||||
BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
|
||||
@@ -513,6 +528,14 @@ bcm47xx_leds_netgear_wnr3500lv1[] __init
|
||||
};
|
||||
|
||||
static const struct gpio_led
|
||||
+bcm47xx_leds_netgear_wnr3500lv2[] __initconst = {
|
||||
+ BCM47XX_GPIO_LED(0, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+ BCM47XX_GPIO_LED(1, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+ BCM47XX_GPIO_LED(3, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
|
||||
+ BCM47XX_GPIO_LED(7, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_led
|
||||
bcm47xx_leds_netgear_wnr834bv2[] __initconst = {
|
||||
BCM47XX_GPIO_LED(2, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
|
||||
BCM47XX_GPIO_LED(3, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
@@ -556,6 +579,9 @@ void __init bcm47xx_leds_register(void)
|
||||
enum bcm47xx_board board = bcm47xx_board_get();
|
||||
|
||||
switch (board) {
|
||||
+ case BCM47XX_BOARD_ASUS_RTN10U:
|
||||
+ bcm47xx_set_pdata(bcm47xx_leds_asus_rtn10u);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_ASUS_RTN12:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12);
|
||||
break;
|
||||
@@ -689,6 +715,9 @@ void __init bcm47xx_leds_register(void)
|
||||
case BCM47XX_BOARD_LINKSYS_WRT310NV1:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
|
||||
+ bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt320n_v1);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2);
|
||||
break;
|
||||
@@ -770,6 +799,9 @@ void __init bcm47xx_leds_register(void)
|
||||
case BCM47XX_BOARD_NETGEAR_WNR3500L:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_NETGEAR_WNR3500L_V2:
|
||||
+ bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv2);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_NETGEAR_WNR834BV2:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2);
|
||||
break;
|
||||
--- a/arch/mips/bcm47xx/workarounds.c
|
||||
+++ b/arch/mips/bcm47xx/workarounds.c
|
||||
@@ -22,6 +22,7 @@ void __init bcm47xx_workarounds(void)
|
||||
|
||||
switch (board) {
|
||||
case BCM47XX_BOARD_NETGEAR_WNR3500L:
|
||||
+ case BCM47XX_BOARD_NETGEAR_WNR3500L_V2:
|
||||
bcm47xx_workarounds_enable_usb_power(12);
|
||||
break;
|
||||
case BCM47XX_BOARD_NETGEAR_WNDR3400V2:
|
||||
--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
@@ -72,6 +72,7 @@ enum bcm47xx_board {
|
||||
BCM47XX_BOARD_LINKSYS_WRT300NV11,
|
||||
BCM47XX_BOARD_LINKSYS_WRT310NV1,
|
||||
BCM47XX_BOARD_LINKSYS_WRT310NV2,
|
||||
+ BCM47XX_BOARD_LINKSYS_WRT320N_V1,
|
||||
BCM47XX_BOARD_LINKSYS_WRT54G3GV2,
|
||||
BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101,
|
||||
BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467,
|
||||
@@ -99,9 +100,12 @@ enum bcm47xx_board {
|
||||
BCM47XX_BOARD_MOTOROLA_WR850GV2V3,
|
||||
|
||||
BCM47XX_BOARD_NETGEAR_R6200_V1,
|
||||
+ BCM47XX_BOARD_NETGEAR_R6300_V1,
|
||||
BCM47XX_BOARD_NETGEAR_WGR614V8,
|
||||
BCM47XX_BOARD_NETGEAR_WGR614V9,
|
||||
BCM47XX_BOARD_NETGEAR_WGR614_V10,
|
||||
+ BCM47XX_BOARD_NETGEAR_WN2500RP_V1,
|
||||
+ BCM47XX_BOARD_NETGEAR_WN2500RP_V2,
|
||||
BCM47XX_BOARD_NETGEAR_WNDR3300,
|
||||
BCM47XX_BOARD_NETGEAR_WNDR3400V1,
|
||||
BCM47XX_BOARD_NETGEAR_WNDR3400V2,
|
||||
@@ -114,6 +118,7 @@ enum bcm47xx_board {
|
||||
BCM47XX_BOARD_NETGEAR_WNR1000_V3,
|
||||
BCM47XX_BOARD_NETGEAR_WNR2000,
|
||||
BCM47XX_BOARD_NETGEAR_WNR3500L,
|
||||
+ BCM47XX_BOARD_NETGEAR_WNR3500L_V2,
|
||||
BCM47XX_BOARD_NETGEAR_WNR3500U,
|
||||
BCM47XX_BOARD_NETGEAR_WNR3500V2,
|
||||
BCM47XX_BOARD_NETGEAR_WNR3500V2VC,
|
@ -0,0 +1,89 @@
|
||||
From 3829e4f10a232964cc728c0479c8097922e5e073 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Thu, 6 Jan 2022 19:51:38 -0800
|
||||
Subject: [PATCH] MIPS: BCM47XX: Add board entry for Linksys WRT320N v1
|
||||
|
||||
This router is based on a Broadcom BCM4717A1 chipset and supports
|
||||
802.11n Wi-Fi. Add a board entry for that router and register LEDs and
|
||||
buttons accordingly.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
|
||||
---
|
||||
arch/mips/bcm47xx/board.c | 1 +
|
||||
arch/mips/bcm47xx/buttons.c | 9 +++++++++
|
||||
arch/mips/bcm47xx/leds.c | 10 ++++++++++
|
||||
arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
|
||||
4 files changed, 21 insertions(+)
|
||||
|
||||
--- a/arch/mips/bcm47xx/board.c
|
||||
+++ b/arch/mips/bcm47xx/board.c
|
||||
@@ -141,6 +141,7 @@ struct bcm47xx_board_type_list2 bcm47xx_
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT300NV11, "Linksys WRT300N V1.1"}, "WRT300N", "1.1"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT310NV1, "Linksys WRT310N V1"}, "WRT310N", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT310NV2, "Linksys WRT310N V2"}, "WRT310N", "2.0"},
|
||||
+ {{BCM47XX_BOARD_LINKSYS_WRT320N_V1, "Linksys WRT320N V1"}, "WRT320N", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT54G3GV2, "Linksys WRT54G3GV2-VF"}, "WRT54G3GV2-VF", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT610NV1, "Linksys WRT610N V1"}, "WRT610N", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT610NV2, "Linksys WRT610N V2"}, "WRT610N", "2.0"},
|
||||
--- a/arch/mips/bcm47xx/buttons.c
|
||||
+++ b/arch/mips/bcm47xx/buttons.c
|
||||
@@ -277,6 +277,12 @@ bcm47xx_buttons_linksys_wrt310nv1[] __in
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_linksys_wrt320n_v1[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
|
||||
+ BCM47XX_GPIO_KEY(8, KEY_RESTART),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(5, KEY_WIMAX),
|
||||
BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
@@ -608,6 +614,9 @@ int __init bcm47xx_buttons_register(void
|
||||
case BCM47XX_BOARD_LINKSYS_WRT310NV1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt320n_v1);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2);
|
||||
break;
|
||||
--- a/arch/mips/bcm47xx/leds.c
|
||||
+++ b/arch/mips/bcm47xx/leds.c
|
||||
@@ -314,6 +314,13 @@ bcm47xx_leds_linksys_wrt310nv1[] __initc
|
||||
};
|
||||
|
||||
static const struct gpio_led
|
||||
+bcm47xx_leds_linksys_wrt320n_v1[] __initconst = {
|
||||
+ BCM47XX_GPIO_LED(1, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+ BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
|
||||
+ BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_led
|
||||
bcm47xx_leds_linksys_wrt54g_generic[] __initconst = {
|
||||
BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
|
||||
@@ -689,6 +696,9 @@ void __init bcm47xx_leds_register(void)
|
||||
case BCM47XX_BOARD_LINKSYS_WRT310NV1:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
|
||||
+ bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt320n_v1);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2);
|
||||
break;
|
||||
--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
@@ -72,6 +72,7 @@ enum bcm47xx_board {
|
||||
BCM47XX_BOARD_LINKSYS_WRT300NV11,
|
||||
BCM47XX_BOARD_LINKSYS_WRT310NV1,
|
||||
BCM47XX_BOARD_LINKSYS_WRT310NV2,
|
||||
+ BCM47XX_BOARD_LINKSYS_WRT320N_V1,
|
||||
BCM47XX_BOARD_LINKSYS_WRT54G3GV2,
|
||||
BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101,
|
||||
BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467,
|
@ -0,0 +1,60 @@
|
||||
From 15e690af5cc3cd8f5d14ee2aa3a093f80196110e Mon Sep 17 00:00:00 2001
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Thu, 6 Jan 2022 19:51:40 -0800
|
||||
Subject: [PATCH] MIPS: BCM47XX: Add support for Netgear R6300 v1
|
||||
|
||||
Add support for the Netgear R6300 v1 Wi-Fi router using a Broadcom
|
||||
BCM4706 chipset and supporting 802.11n and 802.11ac.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
|
||||
---
|
||||
arch/mips/bcm47xx/board.c | 1 +
|
||||
arch/mips/bcm47xx/buttons.c | 8 ++++++++
|
||||
arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
|
||||
3 files changed, 10 insertions(+)
|
||||
|
||||
--- a/arch/mips/bcm47xx/board.c
|
||||
+++ b/arch/mips/bcm47xx/board.c
|
||||
@@ -162,6 +162,7 @@ struct bcm47xx_board_type_list1 bcm47xx_
|
||||
{{BCM47XX_BOARD_LUXUL_XWR_600_V1, "Luxul XWR-600 V1"}, "luxul_xwr600_v1"},
|
||||
{{BCM47XX_BOARD_LUXUL_XWR_1750_V1, "Luxul XWR-1750 V1"}, "luxul_xwr1750_v1"},
|
||||
{{BCM47XX_BOARD_NETGEAR_R6200_V1, "Netgear R6200 V1"}, "U12H192T00_NETGEAR"},
|
||||
+ {{BCM47XX_BOARD_NETGEAR_R6300_V1, "Netgear R6300 V1"}, "U12H218T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
|
||||
--- a/arch/mips/bcm47xx/buttons.c
|
||||
+++ b/arch/mips/bcm47xx/buttons.c
|
||||
@@ -398,6 +398,11 @@ bcm47xx_buttons_netgear_r6200_v1[] __ini
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_netgear_r6300_v1[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_netgear_wndr3400v1[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(4, KEY_RESTART),
|
||||
BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
|
||||
@@ -683,6 +688,9 @@ int __init bcm47xx_buttons_register(void
|
||||
case BCM47XX_BOARD_NETGEAR_R6200_V1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6200_v1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_NETGEAR_R6300_V1:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6300_v1);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1);
|
||||
break;
|
||||
--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
@@ -100,6 +100,7 @@ enum bcm47xx_board {
|
||||
BCM47XX_BOARD_MOTOROLA_WR850GV2V3,
|
||||
|
||||
BCM47XX_BOARD_NETGEAR_R6200_V1,
|
||||
+ BCM47XX_BOARD_NETGEAR_R6300_V1,
|
||||
BCM47XX_BOARD_NETGEAR_WGR614V8,
|
||||
BCM47XX_BOARD_NETGEAR_WGR614V9,
|
||||
BCM47XX_BOARD_NETGEAR_WGR614_V10,
|
@ -0,0 +1,63 @@
|
||||
From 4da27b6d550427a0560a15df36de99cb17629216 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Thu, 6 Jan 2022 19:51:41 -0800
|
||||
Subject: [PATCH] MIPS: BCM47XX: Add support for Netgear WN2500RP v1 & v2
|
||||
|
||||
Add support for the Netgear WN2500 RP v1 and v2 Wi-Fi range extenders
|
||||
based on the BCM5357 chipset and supporting 802.11n and 802.11ac.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
|
||||
---
|
||||
arch/mips/bcm47xx/board.c | 2 ++
|
||||
arch/mips/bcm47xx/buttons.c | 9 +++++++++
|
||||
arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 2 ++
|
||||
3 files changed, 13 insertions(+)
|
||||
|
||||
--- a/arch/mips/bcm47xx/board.c
|
||||
+++ b/arch/mips/bcm47xx/board.c
|
||||
@@ -166,6 +166,8 @@ struct bcm47xx_board_type_list1 bcm47xx_
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
|
||||
+ {{BCM47XX_BOARD_NETGEAR_WN2500RP_V1, "Netgear WN2500RP V1"}, "U12H197T00_NETGEAR"},
|
||||
+ {{BCM47XX_BOARD_NETGEAR_WN2500RP_V2, "Netgear WN2500RP V2"}, "U12H294T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNDR3300, "Netgear WNDR3300"}, "U12H093T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNDR3400V1, "Netgear WNDR3400 V1"}, "U12H155T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNDR3400V2, "Netgear WNDR3400 V2"}, "U12H187T00_NETGEAR"},
|
||||
--- a/arch/mips/bcm47xx/buttons.c
|
||||
+++ b/arch/mips/bcm47xx/buttons.c
|
||||
@@ -403,6 +403,12 @@ bcm47xx_buttons_netgear_r6300_v1[] __ini
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_netgear_wn2500rp_v1[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(12, KEY_RESTART),
|
||||
+ BCM47XX_GPIO_KEY(31, KEY_WPS_BUTTON),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_netgear_wndr3400v1[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(4, KEY_RESTART),
|
||||
BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
|
||||
@@ -691,6 +697,9 @@ int __init bcm47xx_buttons_register(void
|
||||
case BCM47XX_BOARD_NETGEAR_R6300_V1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6300_v1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_NETGEAR_WN2500RP_V1:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wn2500rp_v1);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1);
|
||||
break;
|
||||
--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
@@ -104,6 +104,8 @@ enum bcm47xx_board {
|
||||
BCM47XX_BOARD_NETGEAR_WGR614V8,
|
||||
BCM47XX_BOARD_NETGEAR_WGR614V9,
|
||||
BCM47XX_BOARD_NETGEAR_WGR614_V10,
|
||||
+ BCM47XX_BOARD_NETGEAR_WN2500RP_V1,
|
||||
+ BCM47XX_BOARD_NETGEAR_WN2500RP_V2,
|
||||
BCM47XX_BOARD_NETGEAR_WNDR3300,
|
||||
BCM47XX_BOARD_NETGEAR_WNDR3400V1,
|
||||
BCM47XX_BOARD_NETGEAR_WNDR3400V2,
|
@ -0,0 +1,109 @@
|
||||
From c022e87162219d67d687df22c977d1c2fc95fb42 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Thu, 14 Jul 2022 14:13:01 -0700
|
||||
Subject: [PATCH] MIPS: BCM47XX: Add support for Netgear WNR3500L v2
|
||||
|
||||
Add support for the Netgear WNR3500L v2 router based on the BCM47186
|
||||
chipset and supporting 802.11n Wi-Fi.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
|
||||
---
|
||||
arch/mips/bcm47xx/board.c | 2 ++
|
||||
arch/mips/bcm47xx/buttons.c | 10 ++++++++++
|
||||
arch/mips/bcm47xx/leds.c | 11 +++++++++++
|
||||
arch/mips/bcm47xx/workarounds.c | 1 +
|
||||
arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
|
||||
5 files changed, 25 insertions(+)
|
||||
|
||||
--- a/arch/mips/bcm47xx/board.c
|
||||
+++ b/arch/mips/bcm47xx/board.c
|
||||
@@ -181,6 +181,7 @@ struct bcm47xx_board_type_list1 bcm47xx_
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR1000_V3, "Netgear WNR1000 V3"}, "U12H139T50_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR2000, "Netgear WNR2000"}, "U12H114T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500L, "Netgear WNR3500L"}, "U12H136T99_NETGEAR"},
|
||||
+ {{BCM47XX_BOARD_NETGEAR_WNR3500L_V2, "Netgear WNR3500L V2"}, "U12H172T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500U, "Netgear WNR3500U"}, "U12H136T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500V2, "Netgear WNR3500 V2"}, "U12H127T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500V2VC, "Netgear WNR3500 V2vc"}, "U12H127T70_NETGEAR"},
|
||||
@@ -195,6 +196,7 @@ struct bcm47xx_board_type_list3 bcm47xx_
|
||||
{{BCM47XX_BOARD_PHICOMM_M1, "Phicomm M1"}, "0x0590", "80", "0x1104"},
|
||||
{{BCM47XX_BOARD_ZTE_H218N, "ZTE H218N"}, "0x053d", "1234", "0x1305"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500L, "Netgear WNR3500L"}, "0x04CF", "3500", "02"},
|
||||
+ {{BCM47XX_BOARD_NETGEAR_WNR3500L_V2, "Netgear WNR3500L V2"}, "0x052b", "3500L", "02"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101, "Linksys WRT54G/GS/GL"}, "0x0101", "42", "0x10"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467, "Linksys WRT54G/GS/GL"}, "0x0467", "42", "0x10"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708, "Linksys WRT54G/GS/GL"}, "0x0708", "42", "0x10"},
|
||||
--- a/arch/mips/bcm47xx/buttons.c
|
||||
+++ b/arch/mips/bcm47xx/buttons.c
|
||||
@@ -448,6 +448,13 @@ bcm47xx_buttons_netgear_wnr3500lv1[] __i
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_netgear_wnr3500lv2[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(4, KEY_RESTART),
|
||||
+ BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
|
||||
+ BCM47XX_GPIO_KEY(8, KEY_RFKILL),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_netgear_wnr834bv2[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
};
|
||||
@@ -718,6 +725,9 @@ int __init bcm47xx_buttons_register(void
|
||||
case BCM47XX_BOARD_NETGEAR_WNR3500L:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr3500lv1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_NETGEAR_WNR3500L_V2:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr3500lv2);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_NETGEAR_WNR834BV2:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr834bv2);
|
||||
break;
|
||||
--- a/arch/mips/bcm47xx/leds.c
|
||||
+++ b/arch/mips/bcm47xx/leds.c
|
||||
@@ -520,6 +520,14 @@ bcm47xx_leds_netgear_wnr3500lv1[] __init
|
||||
};
|
||||
|
||||
static const struct gpio_led
|
||||
+bcm47xx_leds_netgear_wnr3500lv2[] __initconst = {
|
||||
+ BCM47XX_GPIO_LED(0, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+ BCM47XX_GPIO_LED(1, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+ BCM47XX_GPIO_LED(3, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
|
||||
+ BCM47XX_GPIO_LED(7, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_led
|
||||
bcm47xx_leds_netgear_wnr834bv2[] __initconst = {
|
||||
BCM47XX_GPIO_LED(2, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
|
||||
BCM47XX_GPIO_LED(3, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
@@ -780,6 +788,9 @@ void __init bcm47xx_leds_register(void)
|
||||
case BCM47XX_BOARD_NETGEAR_WNR3500L:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_NETGEAR_WNR3500L_V2:
|
||||
+ bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv2);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_NETGEAR_WNR834BV2:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2);
|
||||
break;
|
||||
--- a/arch/mips/bcm47xx/workarounds.c
|
||||
+++ b/arch/mips/bcm47xx/workarounds.c
|
||||
@@ -22,6 +22,7 @@ void __init bcm47xx_workarounds(void)
|
||||
|
||||
switch (board) {
|
||||
case BCM47XX_BOARD_NETGEAR_WNR3500L:
|
||||
+ case BCM47XX_BOARD_NETGEAR_WNR3500L_V2:
|
||||
bcm47xx_workarounds_enable_usb_power(12);
|
||||
break;
|
||||
case BCM47XX_BOARD_NETGEAR_WNDR3400V2:
|
||||
--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
@@ -118,6 +118,7 @@ enum bcm47xx_board {
|
||||
BCM47XX_BOARD_NETGEAR_WNR1000_V3,
|
||||
BCM47XX_BOARD_NETGEAR_WNR2000,
|
||||
BCM47XX_BOARD_NETGEAR_WNR3500L,
|
||||
+ BCM47XX_BOARD_NETGEAR_WNR3500L_V2,
|
||||
BCM47XX_BOARD_NETGEAR_WNR3500U,
|
||||
BCM47XX_BOARD_NETGEAR_WNR3500V2,
|
||||
BCM47XX_BOARD_NETGEAR_WNR3500V2VC,
|
@ -0,0 +1,67 @@
|
||||
From aecf89f2f8e8a604c33085c230a1f04ea325de64 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Thu, 6 Jan 2022 19:51:39 -0800
|
||||
Subject: [PATCH] MIPS: BCM47XX: Add LEDs and buttons for Asus RTN-10U
|
||||
|
||||
Add the definitions for the buttons and LEDs used on the Asus RTN-10U
|
||||
router.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
|
||||
---
|
||||
arch/mips/bcm47xx/buttons.c | 9 +++++++++
|
||||
arch/mips/bcm47xx/leds.c | 11 +++++++++++
|
||||
2 files changed, 20 insertions(+)
|
||||
|
||||
--- a/arch/mips/bcm47xx/buttons.c
|
||||
+++ b/arch/mips/bcm47xx/buttons.c
|
||||
@@ -27,6 +27,12 @@
|
||||
/* Asus */
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_asus_rtn10u[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(20, KEY_WPS_BUTTON),
|
||||
+ BCM47XX_GPIO_KEY(21, KEY_RESTART),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_asus_rtn12[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON),
|
||||
BCM47XX_GPIO_KEY(1, KEY_RESTART),
|
||||
@@ -502,6 +508,9 @@ int __init bcm47xx_buttons_register(void
|
||||
int err;
|
||||
|
||||
switch (board) {
|
||||
+ case BCM47XX_BOARD_ASUS_RTN10U:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn10u);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_ASUS_RTN12:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn12);
|
||||
break;
|
||||
--- a/arch/mips/bcm47xx/leds.c
|
||||
+++ b/arch/mips/bcm47xx/leds.c
|
||||
@@ -30,6 +30,14 @@
|
||||
/* Asus */
|
||||
|
||||
static const struct gpio_led
|
||||
+bcm47xx_leds_asus_rtn10u[] __initconst = {
|
||||
+ BCM47XX_GPIO_LED(5, "green", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+ BCM47XX_GPIO_LED(6, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
|
||||
+ BCM47XX_GPIO_LED(7, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+ BCM47XX_GPIO_LED(8, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_led
|
||||
bcm47xx_leds_asus_rtn12[] __initconst = {
|
||||
BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
|
||||
BCM47XX_GPIO_LED(7, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
@@ -571,6 +579,9 @@ void __init bcm47xx_leds_register(void)
|
||||
enum bcm47xx_board board = bcm47xx_board_get();
|
||||
|
||||
switch (board) {
|
||||
+ case BCM47XX_BOARD_ASUS_RTN10U:
|
||||
+ bcm47xx_set_pdata(bcm47xx_leds_asus_rtn10u);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_ASUS_RTN12:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12);
|
||||
break;
|
@ -0,0 +1,40 @@
|
||||
From eea175eedf3e2f71b9538d21e643e7a1be4923df Mon Sep 17 00:00:00 2001
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Thu, 6 Jan 2022 19:51:37 -0800
|
||||
Subject: [PATCH] MIPS: BCM47XX: Define Linksys WRT310N V2 buttons
|
||||
|
||||
Update the buttons registration code to register the two buttons (WPS,
|
||||
system rester) using the existing BCM47XX_BOARD_LINKSYS_WRT310NV2 board
|
||||
entry.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
|
||||
---
|
||||
arch/mips/bcm47xx/buttons.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
--- a/arch/mips/bcm47xx/buttons.c
|
||||
+++ b/arch/mips/bcm47xx/buttons.c
|
||||
@@ -289,6 +289,12 @@ bcm47xx_buttons_linksys_wrt320n_v1[] __i
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_linksys_wrt310n_v2[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
|
||||
+ BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(5, KEY_WIMAX),
|
||||
BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
@@ -644,6 +650,9 @@ int __init bcm47xx_buttons_register(void
|
||||
case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt320n_v1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_LINKSYS_WRT310NV2:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310n_v2);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2);
|
||||
break;
|
@ -59,6 +59,9 @@ ipq40xx_setup_interfaces()
|
||||
compex,wpj428)
|
||||
ucidef_set_interface_lan "lan1 lan2"
|
||||
;;
|
||||
linksys,whw01)
|
||||
ucidef_set_interface_lan "eth1 eth2"
|
||||
;;
|
||||
glinet,gl-a1300|\
|
||||
glinet,gl-b1300|\
|
||||
mobipromo,cm520-79f)
|
||||
@ -69,6 +72,7 @@ ipq40xx_setup_interfaces()
|
||||
mikrotik,wap-r-ac)
|
||||
ucidef_set_interface_lan "sw-eth1 sw-eth2"
|
||||
;;
|
||||
aruba,ap-303h|\
|
||||
netgear,rbr50|\
|
||||
netgear,rbs50|\
|
||||
netgear,srr60|\
|
||||
|
@ -11,7 +11,7 @@ boot() {
|
||||
linksys,ea6350v3|\
|
||||
linksys,ea8300|\
|
||||
linksys,mr8300|\
|
||||
linksys,whw01-v1)
|
||||
linksys,whw01)
|
||||
mtd resetbc s_env || true
|
||||
;;
|
||||
netgear,wac510)
|
||||
|
@ -1,6 +1,9 @@
|
||||
. /lib/functions.sh
|
||||
|
||||
case "$(board_name)" in
|
||||
linksys,ea6350v3|\
|
||||
linksys,ea8300|\
|
||||
linksys,mr8300|\
|
||||
ezviz,cs-w3-wd1200g-eup)
|
||||
uci set system.@system[0].compat_version="2.0"
|
||||
uci commit system
|
||||
|
18
target/linux/ipq40xx/base-files/lib/upgrade/linksys.sh
Executable file → Normal file
18
target/linux/ipq40xx/base-files/lib/upgrade/linksys.sh
Executable file → Normal file
@ -47,6 +47,14 @@ linksys_get_target_firmware() {
|
||||
esac
|
||||
}
|
||||
|
||||
linksys_is_factory_image() {
|
||||
local board=$(board_name)
|
||||
board=${board##*,}
|
||||
|
||||
# check matching footer signature
|
||||
tail -c 256 $1 | grep -q -i "\.LINKSYS\.........${board}"
|
||||
}
|
||||
|
||||
platform_do_upgrade_linksys() {
|
||||
local magic_long="$(get_magic_long "$1")"
|
||||
|
||||
@ -99,4 +107,14 @@ platform_do_upgrade_linksys() {
|
||||
echo "writing \"$1\" image to \"$part_label\""
|
||||
get_image "$1" | mtd write - "$part_label"
|
||||
}
|
||||
|
||||
[ "$magic_long" = "d00dfeed" ] && {
|
||||
if ! linksys_is_factory_image "$1"; then
|
||||
echo "factory image doesn't match device"
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "writing \"$1\" factory image to \"$part_label\""
|
||||
get_image "$1" | mtd -e "$part_label" write - "$part_label"
|
||||
}
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ platform_do_upgrade() {
|
||||
linksys,ea6350v3 |\
|
||||
linksys,ea8300 |\
|
||||
linksys,mr8300 |\
|
||||
linksys,whw01-v1)
|
||||
linksys,whw01)
|
||||
platform_do_upgrade_linksys "$1"
|
||||
;;
|
||||
meraki,mr33 |\
|
||||
|
@ -269,17 +269,17 @@
|
||||
label = "kernel";
|
||||
reg = <0x00000000 0x02800000>;
|
||||
};
|
||||
rootfs@300000 {
|
||||
rootfs@500000 {
|
||||
label = "rootfs";
|
||||
reg = <0x00300000 0x02500000>;
|
||||
reg = <0x00500000 0x02300000>;
|
||||
};
|
||||
alt_kernel@2800000 {
|
||||
label = "alt_kernel";
|
||||
reg = <0x02800000 0x02800000>;
|
||||
};
|
||||
alt_rootfs@2b00000 {
|
||||
alt_rootfs@2d00000 {
|
||||
label = "alt_rootfs";
|
||||
reg = <0x02b00000 0x02500000>;
|
||||
reg = <0x02d00000 0x02300000>;
|
||||
};
|
||||
sysdiag@5000000 {
|
||||
label = "sysdiag";
|
||||
|
@ -6,8 +6,8 @@
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
model = "Linksys WHW01 v1";
|
||||
compatible = "linksys,whw01-v1";
|
||||
model = "Linksys WHW01";
|
||||
compatible = "linksys,whw01";
|
||||
|
||||
aliases {
|
||||
serial0 = &blsp1_uart1;
|
||||
@ -316,3 +316,21 @@
|
||||
nvmem-cell-names = "pre-calibration";
|
||||
nvmem-cells = <&precal_art_5000>;
|
||||
};
|
||||
|
||||
&gmac {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&switch {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&swport4 {
|
||||
status = "okay";
|
||||
label = "eth1";
|
||||
};
|
||||
|
||||
&swport5 {
|
||||
status = "okay";
|
||||
label = "eth2";
|
||||
};
|
@ -195,9 +195,9 @@
|
||||
reg = <0x780000 0x5800000>;
|
||||
};
|
||||
|
||||
partition@a80000 {
|
||||
partition@c80000 {
|
||||
label = "rootfs";
|
||||
reg = <0xa80000 0x5500000>;
|
||||
reg = <0xc80000 0x5300000>;
|
||||
};
|
||||
|
||||
partition@5f80000 {
|
||||
@ -205,9 +205,9 @@
|
||||
reg = <0x5f80000 0x5800000>;
|
||||
};
|
||||
|
||||
partition@6280000 {
|
||||
partition@6480000 {
|
||||
label = "alt_rootfs";
|
||||
reg = <0x6280000 0x5500000>;
|
||||
reg = <0x6480000 0x5300000>;
|
||||
};
|
||||
|
||||
partition@b780000 {
|
||||
|
@ -420,6 +420,38 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gmac {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&switch {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&swport2 {
|
||||
status = "okay";
|
||||
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
&swport3 {
|
||||
status = "okay";
|
||||
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
&swport4 {
|
||||
status = "okay";
|
||||
|
||||
label = "lan3";
|
||||
};
|
||||
|
||||
&swport5 {
|
||||
status = "okay";
|
||||
|
||||
label = "wan";
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
status = "okay";
|
||||
qcom,ath10k-calibration-variant = "Aruba-AP-303";
|
||||
|
@ -181,8 +181,7 @@ define Device/aruba_ap-303h
|
||||
$(call Device/aruba_glenmorangie)
|
||||
DEVICE_MODEL := AP-303H
|
||||
endef
|
||||
# Missing DSA Setup
|
||||
#TARGET_DEVICES += aruba_ap-303h
|
||||
TARGET_DEVICES += aruba_ap-303h
|
||||
|
||||
define Device/aruba_ap-365
|
||||
$(call Device/aruba_glenmorangie)
|
||||
@ -638,96 +637,104 @@ endef
|
||||
# Missing DSA Setup
|
||||
#TARGET_DEVICES += glinet_gl-s1300
|
||||
|
||||
define Device/kernel-size-6350-8300
|
||||
DEVICE_COMPAT_VERSION := 2.0
|
||||
DEVICE_COMPAT_MESSAGE := Kernel partition size must be increased for \
|
||||
this OpenWrt version. Before continuing, you MUST issue either the \
|
||||
command "fw_setenv kernsize 500000" from the OpenWrt command line, \
|
||||
or "setenv kernsize 500000 ; saveenv" from the U-Boot serial console. \
|
||||
Instead of the sysupgrade image, you must then install the OpenWrt \
|
||||
factory image, setting the force flag and wiping the configuration. \
|
||||
(e.g. "sysupgrade -n -F openwrt-squashfs-factory.bin" on command line)
|
||||
endef
|
||||
|
||||
define Device/linksys_ea6350v3
|
||||
# The Linksys EA6350v3 has a uboot bootloader that does not
|
||||
# support either booting lzma kernel images nor booting UBI
|
||||
# partitions. This uboot, however, supports raw kernel images and
|
||||
# gzipped images.
|
||||
#
|
||||
# As for the time of writing this, the device will boot the kernel
|
||||
# from a fixed address with a fixed length of 3MiB. Also, the
|
||||
# device has a hard-coded kernel command line that requieres the
|
||||
# As configured by the OEM factory, the device will boot the kernel
|
||||
# from a fixed address with a fixed length of 3 MiB. Also, the
|
||||
# device has a hard-coded kernel command line that requires the
|
||||
# rootfs and alt_rootfs to be in mtd11 and mtd13 respectively.
|
||||
# Oh... and the kernel partition overlaps with the rootfs
|
||||
# partition (the same for alt_kernel and alt_rootfs).
|
||||
#
|
||||
# If you are planing re-partitioning the device, you may want to
|
||||
# keep those details in mind:
|
||||
# 1. The kernel adresses you should honor are 0x00000000 and
|
||||
# keep these details in mind:
|
||||
# 1. The kernel addresses you should honor are 0x00000000 and
|
||||
# 0x02800000 respectively.
|
||||
# 2. The kernel size (plus the dtb) cannot exceed 3.00MiB in size.
|
||||
# 2. The kernel size (plus the dtb) cannot exceed 3 MiB in size
|
||||
# unless the uboot environment variable "kernsize" is increased.
|
||||
# 3. You can use 'zImage', but not a raw 'Image' packed with lzma.
|
||||
# 4. The kernel command line from uboot is harcoded to boot with
|
||||
# rootfs either in mtd11 or mtd13.
|
||||
$(call Device/FitzImage)
|
||||
$(call Device/kernel-size-6350-8300)
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_MODEL := EA6350
|
||||
DEVICE_VARIANT := v3
|
||||
SOC := qcom-ipq4018
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_SIZE := 3072k
|
||||
IMAGE_SIZE := 37888k
|
||||
KERNEL_SIZE := 5120k
|
||||
IMAGE_SIZE := 35840k
|
||||
UBINIZE_OPTS := -E 5
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-kernel | append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=EA6350v3
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += linksys_ea6350v3
|
||||
|
||||
define Device/linksys_ea8300
|
||||
$(call Device/FitzImage)
|
||||
$(call Device/kernel-size-6350-8300)
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_MODEL := EA8300
|
||||
SOC := qcom-ipq4019
|
||||
KERNEL_SIZE := 3072k
|
||||
IMAGE_SIZE := 87040k
|
||||
KERNEL_SIZE := 5120k
|
||||
IMAGE_SIZE := 84992k
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=EA8300
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-linksys_ea8300 kmod-usb-ledtrig-usbport
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += linksys_ea8300
|
||||
|
||||
define Device/linksys_mr8300
|
||||
$(call Device/FitzImage)
|
||||
$(call Device/kernel-size-6350-8300)
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_MODEL := MR8300
|
||||
SOC := qcom-ipq4019
|
||||
KERNEL_SIZE := 3072k
|
||||
IMAGE_SIZE := 87040k
|
||||
KERNEL_SIZE := 5120k
|
||||
IMAGE_SIZE := 84992k
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=MR8300
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-usb-ledtrig-usbport
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += linksys_mr8300
|
||||
|
||||
define Device/linksys_whw01-v1
|
||||
define Device/linksys_whw01
|
||||
$(call Device/FitzImage)
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_MODEL := WHW01
|
||||
DEVICE_VARIANT := v1
|
||||
KERNEL_SIZE := 6144k
|
||||
IMAGE_SIZE := 28704512 # 28032k minus linksys signature (256-bytes).
|
||||
IMAGE_SIZE := 75776K
|
||||
SOC := qcom-ipq4018
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \
|
||||
append-ubi | linksys-image type=WHW01 | pad-to $$$$(PAGESIZE) | \
|
||||
check-size
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=WHW01
|
||||
DEVICE_PACKAGES := uboot-envtools kmod-leds-pca963x
|
||||
endef
|
||||
# Missing DSA Setup
|
||||
#TARGET_DEVICES += linksys_whw01-v1
|
||||
TARGET_DEVICES += linksys_whw01
|
||||
|
||||
define Device/luma_wrtq-329acn
|
||||
$(call Device/FitImage)
|
||||
|
@ -29,7 +29,7 @@ define Device/fsl_ls1012a-frdm
|
||||
DEVICE_MODEL := FRDM-LS1012A
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-ppfe \
|
||||
tfa-ls1012a-frdm \
|
||||
trusted-firmware-a-ls1012a-frdm \
|
||||
kmod-ppfe
|
||||
BLOCKSIZE := 256KiB
|
||||
IMAGE/firmware.bin := \
|
||||
@ -55,7 +55,7 @@ define Device/fsl_ls1012a-rdb
|
||||
DEVICE_MODEL := LS1012A-RDB
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-ppfe \
|
||||
tfa-ls1012a-rdb \
|
||||
trusted-firmware-a-ls1012a-rdb \
|
||||
kmod-hwmon-ina2xx \
|
||||
kmod-iio-fxas21002c-i2c \
|
||||
kmod-iio-fxos8700-i2c \
|
||||
@ -79,7 +79,7 @@ define Device/fsl_ls1012a-frwy-sdboot
|
||||
DEVICE_MODEL := FRWY-LS1012A
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-ppfe \
|
||||
tfa-ls1012a-frwy-sdboot \
|
||||
trusted-firmware-a-ls1012a-frwy-sdboot \
|
||||
kmod-ppfe
|
||||
DEVICE_DTS := freescale/fsl-ls1012a-frwy
|
||||
IMAGES += firmware.bin
|
||||
@ -105,7 +105,7 @@ define Device/fsl_ls1043a-rdb
|
||||
DEVICE_VARIANT := Default
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-fman \
|
||||
tfa-ls1043a-rdb \
|
||||
trusted-firmware-a-ls1043a-rdb \
|
||||
fmc fmc-eth-config \
|
||||
kmod-ahci-qoriq \
|
||||
kmod-hwmon-ina2xx \
|
||||
@ -131,7 +131,7 @@ define Device/fsl_ls1043a-rdb-sdboot
|
||||
DEVICE_VARIANT := SD Card Boot
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-fman \
|
||||
tfa-ls1043a-rdb-sdboot \
|
||||
trusted-firmware-a-ls1043a-rdb-sdboot \
|
||||
fmc fmc-eth-config \
|
||||
kmod-ahci-qoriq \
|
||||
kmod-hwmon-ina2xx \
|
||||
@ -155,7 +155,7 @@ define Device/fsl_ls1046a-frwy
|
||||
DEVICE_VARIANT := Default
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-fman \
|
||||
tfa-ls1046a-frwy
|
||||
trusted-firmware-a-ls1046a-frwy
|
||||
DEVICE_DTS := freescale/fsl-ls1046a-frwy
|
||||
IMAGE/firmware.bin := \
|
||||
ls-clean | \
|
||||
@ -176,7 +176,7 @@ define Device/fsl_ls1046a-frwy-sdboot
|
||||
DEVICE_VARIANT := SD Card Boot
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-fman \
|
||||
tfa-ls1046a-frwy-sdboot
|
||||
trusted-firmware-a-ls1046a-frwy-sdboot
|
||||
DEVICE_DTS := freescale/fsl-ls1046a-frwy
|
||||
IMAGE/sdcard.img.gz := \
|
||||
ls-clean | \
|
||||
@ -197,7 +197,7 @@ define Device/fsl_ls1046a-rdb
|
||||
DEVICE_VARIANT := Default
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-fman \
|
||||
tfa-ls1046a-rdb \
|
||||
trusted-firmware-a-ls1046a-rdb \
|
||||
fmc fmc-eth-config \
|
||||
kmod-ahci-qoriq \
|
||||
kmod-hwmon-ina2xx \
|
||||
@ -223,7 +223,7 @@ define Device/fsl_ls1046a-rdb-sdboot
|
||||
DEVICE_VARIANT := SD Card Boot
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-fman \
|
||||
tfa-ls1046a-rdb-sdboot \
|
||||
trusted-firmware-a-ls1046a-rdb-sdboot \
|
||||
fmc fmc-eth-config \
|
||||
kmod-ahci-qoriq \
|
||||
kmod-hwmon-ina2xx \
|
||||
@ -249,7 +249,7 @@ define Device/fsl_ls1088a-rdb
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-mc \
|
||||
layerscape-dpl \
|
||||
tfa-ls1088a-rdb \
|
||||
trusted-firmware-a-ls1088a-rdb \
|
||||
restool \
|
||||
kmod-ahci-qoriq \
|
||||
kmod-hwmon-ina2xx \
|
||||
@ -277,7 +277,7 @@ define Device/fsl_ls1088a-rdb-sdboot
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-mc \
|
||||
layerscape-dpl \
|
||||
tfa-ls1088a-rdb-sdboot \
|
||||
trusted-firmware-a-ls1088a-rdb-sdboot \
|
||||
restool \
|
||||
kmod-ahci-qoriq \
|
||||
kmod-hwmon-ina2xx \
|
||||
@ -304,7 +304,7 @@ define Device/fsl_ls2088a-rdb
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-mc \
|
||||
layerscape-dpl \
|
||||
tfa-ls2088a-rdb \
|
||||
trusted-firmware-a-ls2088a-rdb \
|
||||
restool \
|
||||
kmod-ahci-qoriq
|
||||
IMAGE/firmware.bin := \
|
||||
@ -329,7 +329,7 @@ define Device/fsl_lx2160a-rdb
|
||||
layerscape-mc \
|
||||
layerscape-dpl \
|
||||
layerscape-ddr-phy \
|
||||
tfa-lx2160a-rdb \
|
||||
trusted-firmware-a-lx2160a-rdb \
|
||||
restool
|
||||
IMAGE/firmware.bin := \
|
||||
ls-clean | \
|
||||
@ -355,7 +355,7 @@ define Device/fsl_lx2160a-rdb-sdboot
|
||||
layerscape-mc \
|
||||
layerscape-dpl \
|
||||
layerscape-ddr-phy \
|
||||
tfa-lx2160a-rdb-sdboot \
|
||||
trusted-firmware-a-lx2160a-rdb-sdboot \
|
||||
restool
|
||||
DEVICE_DTS := freescale/fsl-lx2160a-rdb
|
||||
IMAGE/sdcard.img.gz := \
|
||||
|
@ -8,7 +8,25 @@
|
||||
compatible = "xiaomi,redmi-router-ax6000-stock", "mediatek,mt7986a";
|
||||
};
|
||||
|
||||
&spi_nand_flash {
|
||||
mediatek,nmbm;
|
||||
mediatek,bmt-max-ratio = <1>;
|
||||
mediatek,bmt-max-reserved-blocks = <64>;
|
||||
};
|
||||
|
||||
&partitions {
|
||||
partition@580000 {
|
||||
label = "crash";
|
||||
reg = <0x580000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@5c0000 {
|
||||
label = "crash_log";
|
||||
reg = <0x5c0000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@600000 {
|
||||
label = "ubi_kernel";
|
||||
reg = <0x600000 0x1e00000>;
|
||||
|
@ -0,0 +1,16 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
||||
|
||||
/dts-v1/;
|
||||
#include "mt7986a-xiaomi-redmi-router-ax6000.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Xiaomi Redmi Router AX6000 (OpenWrt U-Boot layout)";
|
||||
compatible = "xiaomi,redmi-router-ax6000-ubootmod", "mediatek,mt7986a";
|
||||
};
|
||||
|
||||
&partitions {
|
||||
partition@580000 {
|
||||
label = "ubi";
|
||||
reg = <0x580000 0x7a80000>;
|
||||
};
|
||||
};
|
@ -1,24 +0,0 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
||||
|
||||
/dts-v1/;
|
||||
#include "mt7986a-xiaomi-redmi-router-ax6000.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Xiaomi Redmi Router AX6000";
|
||||
compatible = "xiaomi,redmi-router-ax6000", "mediatek,mt7986a";
|
||||
};
|
||||
|
||||
&partitions {
|
||||
/* ubi partition is the result of squashing
|
||||
* consecutive stock partitions:
|
||||
* - ubi
|
||||
* - ubi1
|
||||
* - overlay
|
||||
*/
|
||||
partition@600000 {
|
||||
label = "ubi";
|
||||
reg = <0x600000 0x6e00000>;
|
||||
};
|
||||
|
||||
/* last 12 MiB is reserved for NMBM bad block table */
|
||||
};
|
@ -127,16 +127,12 @@
|
||||
pinctrl-0 = <&spi_flash_pins>;
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
spi_nand_flash: flash@0 {
|
||||
compatible = "spi-nand";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0>;
|
||||
|
||||
mediatek,nmbm;
|
||||
mediatek,bmt-max-ratio = <1>;
|
||||
mediatek,bmt-max-reserved-blocks = <64>;
|
||||
|
||||
spi-max-frequency = <20000000>;
|
||||
spi-tx-buswidth = <4>;
|
||||
spi-rx-buswidth = <4>;
|
||||
@ -181,18 +177,6 @@
|
||||
reg = <0x380000 0x200000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@580000 {
|
||||
label = "crash";
|
||||
reg = <0x580000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@5c0000 {
|
||||
label = "crash_log";
|
||||
reg = <0x5c0000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -6,8 +6,8 @@ board=$(board_name)
|
||||
board_config_update
|
||||
|
||||
case $board in
|
||||
xiaomi,redmi-router-ax6000|\
|
||||
xiaomi,redmi-router-ax6000-stock)
|
||||
xiaomi,redmi-router-ax6000-stock|\
|
||||
xiaomi,redmi-router-ax6000-ubootmod)
|
||||
ucidef_set_led_netdev "wan" "wan" "rgb:network" "wan"
|
||||
;;
|
||||
esac
|
||||
|
@ -16,8 +16,8 @@ mediatek_setup_interfaces()
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 sfp2" "eth1 wan"
|
||||
ucidef_set_interface_macaddr "wan" "$(macaddr_add $(cat /sys/class/net/eth0/address) 1)"
|
||||
;;
|
||||
xiaomi,redmi-router-ax6000|\
|
||||
xiaomi,redmi-router-ax6000-stock)
|
||||
xiaomi,redmi-router-ax6000-stock|\
|
||||
xiaomi,redmi-router-ax6000-ubootmod)
|
||||
ucidef_set_interfaces_lan_wan "lan2 lan3 lan4" wan
|
||||
;;
|
||||
*)
|
||||
@ -34,8 +34,8 @@ mediatek_setup_macs()
|
||||
local label_mac=""
|
||||
|
||||
case $board in
|
||||
xiaomi,redmi-router-ax6000|\
|
||||
xiaomi,redmi-router-ax6000-stock)
|
||||
xiaomi,redmi-router-ax6000-stock|\
|
||||
xiaomi,redmi-router-ax6000-ubootmod)
|
||||
wan_mac=$(mtd_get_mac_ascii Bdata ethaddr_wan)
|
||||
label_mac=$wan_mac
|
||||
;;
|
||||
|
@ -64,6 +64,10 @@ platform_do_upgrade() {
|
||||
CI_ROOT_UBIPART=ubi
|
||||
nand_do_upgrade "$1"
|
||||
;;
|
||||
xiaomi,redmi-router-ax6000-ubootmod)
|
||||
CI_KERNPART="fit"
|
||||
nand_do_upgrade "$1"
|
||||
;;
|
||||
*)
|
||||
nand_do_upgrade "$1"
|
||||
;;
|
||||
|
@ -125,21 +125,6 @@ define Device/mediatek_mt7986b-rfb
|
||||
endef
|
||||
TARGET_DEVICES += mediatek_mt7986b-rfb
|
||||
|
||||
define Device/xiaomi_redmi-router-ax6000
|
||||
DEVICE_VENDOR := Xiaomi
|
||||
DEVICE_MODEL := Redmi Router AX6000
|
||||
DEVICE_DTS := mt7986a-xiaomi-redmi-router-ax6000
|
||||
DEVICE_DTS_DIR := ../dts
|
||||
DEVICE_PACKAGES := kmod-leds-ws2812b
|
||||
KERNEL_LOADADDR := 0x48000000
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_IN_UBI := 1
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += xiaomi_redmi-router-ax6000
|
||||
|
||||
define Device/xiaomi_redmi-router-ax6000-stock
|
||||
DEVICE_VENDOR := Xiaomi
|
||||
DEVICE_MODEL := Redmi Router AX6000 (stock layout)
|
||||
@ -157,3 +142,32 @@ endif
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += xiaomi_redmi-router-ax6000-stock
|
||||
|
||||
define Device/xiaomi_redmi-router-ax6000-ubootmod
|
||||
DEVICE_VENDOR := Xiaomi
|
||||
DEVICE_MODEL := Redmi Router AX6000 (OpenWrt U-Boot layout)
|
||||
DEVICE_DTS := mt7986a-xiaomi-redmi-router-ax6000-ubootmod
|
||||
DEVICE_DTS_DIR := ../dts
|
||||
DEVICE_PACKAGES := kmod-leds-ws2812b
|
||||
KERNEL_INITRAMFS_SUFFIX := -recovery.itb
|
||||
IMAGES := sysupgrade.itb
|
||||
KERNEL_LOADADDR := 0x48000000
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_IN_UBI := 1
|
||||
UBOOTENV_IN_UBI := 1
|
||||
KERNEL := kernel-bin | gzip
|
||||
KERNEL_INITRAMFS := kernel-bin | lzma | \
|
||||
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
|
||||
IMAGE/sysupgrade.itb := append-kernel | \
|
||||
fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | append-metadata
|
||||
ARTIFACTS := preloader.bin bl31-uboot.fip
|
||||
ARTIFACT/preloader.bin := bl2 spim-nand-ddr4
|
||||
ARTIFACT/bl31-uboot.fip := bl31-uboot xiaomi_redmi-router-ax6000
|
||||
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
|
||||
ARTIFACTS += initramfs-factory.ubi
|
||||
ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-recovery.itb | ubinize-kernel
|
||||
endif
|
||||
endef
|
||||
TARGET_DEVICES += xiaomi_redmi-router-ax6000-ubootmod
|
||||
|
@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
|
||||
ARCH:=powerpc
|
||||
BOARD:=mpc85xx
|
||||
BOARDNAME:=Freescale MPC85xx
|
||||
CPU_TYPE:=8540
|
||||
CPU_TYPE:=8548
|
||||
FEATURES:=squashfs ramdisk nand
|
||||
SUBTARGETS:=p1010 p1020 p2020
|
||||
|
||||
|
@ -58,6 +58,11 @@
|
||||
&nand {
|
||||
status = "okay";
|
||||
|
||||
mediatek,bbt;
|
||||
mediatek,bmt-remap-range =
|
||||
<0x0000000 0x0800000>,
|
||||
<0x3600000 0x4980000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
|
@ -55,6 +55,11 @@
|
||||
&nand {
|
||||
status = "okay";
|
||||
|
||||
mediatek,bbt;
|
||||
mediatek,bmt-remap-range =
|
||||
<0x0000000 0x0800000>,
|
||||
<0x3600000 0x4980000>;
|
||||
|
||||
partitions: partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
|
@ -14,7 +14,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -3996,6 +3996,7 @@ static const struct net_device_ops mtk_n
|
||||
@@ -3998,6 +3998,7 @@ static const struct net_device_ops mtk_n
|
||||
|
||||
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
|
||||
{
|
||||
@ -22,7 +22,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
|
||||
const __be32 *_id = of_get_property(np, "reg", NULL);
|
||||
phy_interface_t phy_mode;
|
||||
struct phylink *phylink;
|
||||
@@ -4124,6 +4125,9 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||
@@ -4126,6 +4127,9 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||
register_netdevice_notifier(&mac->device_notifier);
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ CONFIG_CLKDEV_LOOKUP=y
|
||||
CONFIG_CLKSRC_MMIO=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_BOSTON=y
|
||||
# CONFIG_COMMON_CLK_BOSTON is not set
|
||||
CONFIG_COMMON_CLK_REALTEK=y
|
||||
CONFIG_COMMON_CLK_RTL83XX=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
|
@ -10,7 +10,6 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
|
||||
# CONFIG_BMIPS_CPUFREQ is not set
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_BOSTON=y
|
||||
CONFIG_COMMON_CLK_REALTEK=y
|
||||
CONFIG_COMMON_CLK_RTL83XX=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
|
@ -10,7 +10,7 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
|
||||
CONFIG_CLKDEV_LOOKUP=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_BOSTON=y
|
||||
# CONFIG_COMMON_CLK_BOSTON is not set
|
||||
CONFIG_COMMON_CLK_REALTEK=y
|
||||
CONFIG_COMMON_CLK_RTL83XX=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
|
@ -9,7 +9,6 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
|
||||
CONFIG_CLKDEV_LOOKUP=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_BOSTON=y
|
||||
CONFIG_COMMON_CLK_REALTEK=y
|
||||
CONFIG_COMMON_CLK_RTL83XX=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
|
@ -13,7 +13,7 @@ CONFIG_CLKDEV_LOOKUP=y
|
||||
CONFIG_CLKSRC_MMIO=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_BOSTON=y
|
||||
# CONFIG_COMMON_CLK_BOSTON is not set
|
||||
# CONFIG_COMMON_CLK_REALTEK is not set
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CONSOLE_LOGLEVEL_DEFAULT=15
|
||||
|
@ -12,7 +12,6 @@ CONFIG_BOARD_SCACHE=y
|
||||
CONFIG_CEVT_RTL9300=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_BOSTON=y
|
||||
# CONFIG_COMMON_CLK_REALTEK is not set
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CONSOLE_LOGLEVEL_DEFAULT=15
|
||||
|
@ -11,7 +11,7 @@ CONFIG_CLKDEV_LOOKUP=y
|
||||
CONFIG_CLKSRC_MMIO=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_BOSTON=y
|
||||
# CONFIG_COMMON_CLK_BOSTON is not set
|
||||
# CONFIG_COMMON_CLK_REALTEK is not set
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CONSOLE_LOGLEVEL_DEFAULT=15
|
||||
|
@ -13,7 +13,6 @@ CONFIG_CLKSRC_MIPS_GIC=y
|
||||
CONFIG_CLOCKSOURCE_WATCHDOG=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_BOSTON=y
|
||||
# CONFIG_COMMON_CLK_REALTEK is not set
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CONSOLE_LOGLEVEL_DEFAULT=15
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
choice
|
||||
prompt "Binutils Version" if TOOLCHAINOPTS
|
||||
default BINUTILS_USE_VERSION_2_37
|
||||
default BINUTILS_USE_VERSION_2_39
|
||||
help
|
||||
Select the version of binutils you wish to use.
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
|
||||
config BINUTILS_VERSION_2_37
|
||||
default y if !TOOLCHAINOPTS
|
||||
bool
|
||||
|
||||
config BINUTILS_VERSION_2_38
|
||||
bool
|
||||
|
||||
config BINUTILS_VERSION_2_39
|
||||
default y if !TOOLCHAINOPTS
|
||||
bool
|
||||
|
||||
config BINUTILS_VERSION
|
||||
|
27
toolchain/binutils/patches/2.39/005-ld-fix-NEWS-typos.patch
Normal file
27
toolchain/binutils/patches/2.39/005-ld-fix-NEWS-typos.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From 9284b63ea39cecbfc1522d9e143ecb7727d77eb5 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Liska <mliska@suse.cz>
|
||||
Date: Mon, 8 Aug 2022 13:22:26 +0200
|
||||
Subject: [PATCH 005/160] ld: fix NEWS typos
|
||||
|
||||
ld/ChangeLog:
|
||||
|
||||
* NEWS: Fix 2 typos.
|
||||
---
|
||||
ld/NEWS | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/ld/NEWS
|
||||
+++ b/ld/NEWS
|
||||
@@ -27,10 +27,10 @@ Changes in 2.39:
|
||||
--enable-warn-rwx-segments=no
|
||||
will make --no-warn-rwx-segments enabled by default.
|
||||
|
||||
- --enable-defaul-execstack=no
|
||||
+ --enable-default-execstack=no
|
||||
will stop the creation of an executable stack simply because an input file
|
||||
is missing a .note.GNU-stack section, even on architectures where this
|
||||
- ehaviour is the default.
|
||||
+ behaviour is the default.
|
||||
|
||||
* TYPE=<type> is now supported in an output section description to set the
|
||||
section type value.
|
@ -0,0 +1,90 @@
|
||||
From e8cf73215187b0c08679d726a5cc7c019fa3ea2e Mon Sep 17 00:00:00 2001
|
||||
From: Jan Beulich <jbeulich@suse.com>
|
||||
Date: Wed, 10 Aug 2022 10:34:22 +0200
|
||||
Subject: [PATCH 008/160] gas/Dwarf: properly skip zero-size functions
|
||||
|
||||
PR gas/29451
|
||||
|
||||
While out_debug_abbrev() properly skips such functions, out_debug_info()
|
||||
mistakenly didn't. It needs to calculate the high_pc expression ahead of
|
||||
time, in order to skip emitting any data for the function if the value
|
||||
is zero.
|
||||
|
||||
The one case which would still leave a zero-size entry is when
|
||||
symbol_get_obj(symp)->size ends up evaluating to zero. I hope we can
|
||||
expect that to not be the case, otherwise we'd need to have a way to
|
||||
post-process .debug_info contents between resolving expressions and
|
||||
actually writing the data out to the file. Even then it wouldn't be
|
||||
entirely obvious in which way to alter the data.
|
||||
|
||||
(cherry picked from commit d7abcbcea5ddd40a3bf28758b62f35933c59f996)
|
||||
---
|
||||
gas/dwarf2dbg.c | 39 ++++++++++++++++++++-------------------
|
||||
1 file changed, 20 insertions(+), 19 deletions(-)
|
||||
|
||||
--- a/gas/dwarf2dbg.c
|
||||
+++ b/gas/dwarf2dbg.c
|
||||
@@ -2882,6 +2882,7 @@ out_debug_info (segT info_seg, segT abbr
|
||||
{
|
||||
const char *name;
|
||||
size_t len;
|
||||
+ expressionS size = { .X_op = O_constant };
|
||||
|
||||
/* Skip warning constructs (see above). */
|
||||
if (symbol_get_bfdsym (symp)->flags & BSF_WARNING)
|
||||
@@ -2895,6 +2896,18 @@ out_debug_info (segT info_seg, segT abbr
|
||||
if (!S_IS_DEFINED (symp) || !S_IS_FUNCTION (symp))
|
||||
continue;
|
||||
|
||||
+#if defined (OBJ_ELF) /* || defined (OBJ_MAYBE_ELF) */
|
||||
+ size.X_add_number = S_GET_SIZE (symp);
|
||||
+ if (size.X_add_number == 0 && IS_ELF
|
||||
+ && symbol_get_obj (symp)->size != NULL)
|
||||
+ {
|
||||
+ size.X_op = O_add;
|
||||
+ size.X_op_symbol = make_expr_symbol (symbol_get_obj (symp)->size);
|
||||
+ }
|
||||
+#endif
|
||||
+ if (size.X_op == O_constant && size.X_add_number == 0)
|
||||
+ continue;
|
||||
+
|
||||
subseg_set (str_seg, 0);
|
||||
name_sym = symbol_temp_new_now_octets ();
|
||||
name = S_GET_NAME (symp);
|
||||
@@ -2920,29 +2933,17 @@ out_debug_info (segT info_seg, segT abbr
|
||||
emit_expr (&exp, sizeof_address);
|
||||
|
||||
/* DW_AT_high_pc */
|
||||
- exp.X_op = O_constant;
|
||||
-#if defined (OBJ_ELF) /* || defined (OBJ_MAYBE_ELF) */
|
||||
- exp.X_add_number = S_GET_SIZE (symp);
|
||||
- if (exp.X_add_number == 0 && IS_ELF
|
||||
- && symbol_get_obj (symp)->size != NULL)
|
||||
- {
|
||||
- exp.X_op = O_add;
|
||||
- exp.X_op_symbol = make_expr_symbol (symbol_get_obj (symp)->size);
|
||||
- }
|
||||
-#else
|
||||
- exp.X_add_number = 0;
|
||||
-#endif
|
||||
if (DWARF2_VERSION < 4)
|
||||
{
|
||||
- if (exp.X_op == O_constant)
|
||||
- exp.X_op = O_symbol;
|
||||
- exp.X_add_symbol = symp;
|
||||
- emit_expr (&exp, sizeof_address);
|
||||
+ if (size.X_op == O_constant)
|
||||
+ size.X_op = O_symbol;
|
||||
+ size.X_add_symbol = symp;
|
||||
+ emit_expr (&size, sizeof_address);
|
||||
}
|
||||
- else if (exp.X_op == O_constant)
|
||||
- out_uleb128 (exp.X_add_number);
|
||||
+ else if (size.X_op == O_constant)
|
||||
+ out_uleb128 (size.X_add_number);
|
||||
else
|
||||
- emit_leb128_expr (symbol_get_value_expression (exp.X_op_symbol), 0);
|
||||
+ emit_leb128_expr (symbol_get_value_expression (size.X_op_symbol), 0);
|
||||
}
|
||||
|
||||
/* End of children. */
|
@ -0,0 +1,270 @@
|
||||
From e3b5d935247084dca057dea72be61b063fe2357a Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Wed, 10 Aug 2022 10:38:52 +0930
|
||||
Subject: [PATCH 009/160] PR29462, internal error in relocate, at
|
||||
powerpc.cc:10796
|
||||
|
||||
Prior to the inline plt call support (commit 08be322439), the only
|
||||
local syms with plt entries were local ifunc symbols. There shouldn't
|
||||
be stubs for other local symbols so don't look for them. The patch
|
||||
also fixes minor bugs in get_reference_flags; Many relocs are valid
|
||||
only for ppc64 and a couple only for ppc32.
|
||||
|
||||
PR 29462
|
||||
* powerpc.cc (Target_powerpc::Relocate::relocate): Rename
|
||||
use_plt_offset to pltcal_to_direct, invert logic. For relocs
|
||||
not used with inline plt sequences against local symbols, only
|
||||
look for stubs when the symbol is an ifunc.
|
||||
(Target_powerpc::Scan::get_reference_flags): Correct reloc
|
||||
handling for relocs not valid for both 32-bit and 64-bit.
|
||||
|
||||
(cherry picked from commit 6158b25f77db11712b84e6a4609898f2615ac749)
|
||||
---
|
||||
gold/powerpc.cc | 129 ++++++++++++++++++++++++++++--------------------
|
||||
1 file changed, 75 insertions(+), 54 deletions(-)
|
||||
|
||||
--- a/gold/powerpc.cc
|
||||
+++ b/gold/powerpc.cc
|
||||
@@ -7675,22 +7675,18 @@ Target_powerpc<size, big_endian>::Scan::
|
||||
|
||||
switch (r_type)
|
||||
{
|
||||
+ case elfcpp::R_PPC64_TOC:
|
||||
+ if (size != 64)
|
||||
+ break;
|
||||
+ // Fall through.
|
||||
case elfcpp::R_POWERPC_NONE:
|
||||
case elfcpp::R_POWERPC_GNU_VTINHERIT:
|
||||
case elfcpp::R_POWERPC_GNU_VTENTRY:
|
||||
- case elfcpp::R_PPC64_TOC:
|
||||
// No symbol reference.
|
||||
break;
|
||||
|
||||
case elfcpp::R_PPC64_ADDR64:
|
||||
case elfcpp::R_PPC64_UADDR64:
|
||||
- case elfcpp::R_POWERPC_ADDR32:
|
||||
- case elfcpp::R_POWERPC_UADDR32:
|
||||
- case elfcpp::R_POWERPC_ADDR16:
|
||||
- case elfcpp::R_POWERPC_UADDR16:
|
||||
- case elfcpp::R_POWERPC_ADDR16_LO:
|
||||
- case elfcpp::R_POWERPC_ADDR16_HI:
|
||||
- case elfcpp::R_POWERPC_ADDR16_HA:
|
||||
case elfcpp::R_PPC64_ADDR16_HIGHER34:
|
||||
case elfcpp::R_PPC64_ADDR16_HIGHERA34:
|
||||
case elfcpp::R_PPC64_ADDR16_HIGHEST34:
|
||||
@@ -7700,6 +7696,16 @@ Target_powerpc<size, big_endian>::Scan::
|
||||
case elfcpp::R_PPC64_D34_HI30:
|
||||
case elfcpp::R_PPC64_D34_HA30:
|
||||
case elfcpp::R_PPC64_D28:
|
||||
+ if (size != 64)
|
||||
+ break;
|
||||
+ // Fall through.
|
||||
+ case elfcpp::R_POWERPC_ADDR32:
|
||||
+ case elfcpp::R_POWERPC_UADDR32:
|
||||
+ case elfcpp::R_POWERPC_ADDR16:
|
||||
+ case elfcpp::R_POWERPC_UADDR16:
|
||||
+ case elfcpp::R_POWERPC_ADDR16_LO:
|
||||
+ case elfcpp::R_POWERPC_ADDR16_HI:
|
||||
+ case elfcpp::R_POWERPC_ADDR16_HA:
|
||||
ref = Symbol::ABSOLUTE_REF;
|
||||
break;
|
||||
|
||||
@@ -7710,13 +7716,14 @@ Target_powerpc<size, big_endian>::Scan::
|
||||
ref = Symbol::FUNCTION_CALL | Symbol::ABSOLUTE_REF;
|
||||
break;
|
||||
|
||||
- case elfcpp::R_PPC64_REL64:
|
||||
- case elfcpp::R_POWERPC_REL32:
|
||||
case elfcpp::R_PPC_LOCAL24PC:
|
||||
- case elfcpp::R_POWERPC_REL16:
|
||||
- case elfcpp::R_POWERPC_REL16_LO:
|
||||
- case elfcpp::R_POWERPC_REL16_HI:
|
||||
- case elfcpp::R_POWERPC_REL16_HA:
|
||||
+ if (size != 32)
|
||||
+ break;
|
||||
+ // Fall through.
|
||||
+ ref = Symbol::RELATIVE_REF;
|
||||
+ break;
|
||||
+
|
||||
+ case elfcpp::R_PPC64_REL64:
|
||||
case elfcpp::R_PPC64_REL16_HIGH:
|
||||
case elfcpp::R_PPC64_REL16_HIGHA:
|
||||
case elfcpp::R_PPC64_REL16_HIGHER:
|
||||
@@ -7729,36 +7736,45 @@ Target_powerpc<size, big_endian>::Scan::
|
||||
case elfcpp::R_PPC64_REL16_HIGHEST34:
|
||||
case elfcpp::R_PPC64_REL16_HIGHESTA34:
|
||||
case elfcpp::R_PPC64_PCREL28:
|
||||
+ if (size != 64)
|
||||
+ break;
|
||||
+ // Fall through.
|
||||
+ case elfcpp::R_POWERPC_REL32:
|
||||
+ case elfcpp::R_POWERPC_REL16:
|
||||
+ case elfcpp::R_POWERPC_REL16_LO:
|
||||
+ case elfcpp::R_POWERPC_REL16_HI:
|
||||
+ case elfcpp::R_POWERPC_REL16_HA:
|
||||
ref = Symbol::RELATIVE_REF;
|
||||
break;
|
||||
|
||||
+ case elfcpp::R_PPC_PLTREL24:
|
||||
+ if (size != 32)
|
||||
+ break;
|
||||
+ ref = Symbol::FUNCTION_CALL | Symbol::RELATIVE_REF;
|
||||
+ break;
|
||||
+
|
||||
case elfcpp::R_PPC64_REL24_NOTOC:
|
||||
- if (size == 32)
|
||||
+ case elfcpp::R_PPC64_REL24_P9NOTOC:
|
||||
+ case elfcpp::R_PPC64_PLT16_LO_DS:
|
||||
+ case elfcpp::R_PPC64_PLTSEQ_NOTOC:
|
||||
+ case elfcpp::R_PPC64_PLTCALL_NOTOC:
|
||||
+ case elfcpp::R_PPC64_PLT_PCREL34:
|
||||
+ case elfcpp::R_PPC64_PLT_PCREL34_NOTOC:
|
||||
+ if (size != 64)
|
||||
break;
|
||||
// Fall through.
|
||||
- case elfcpp::R_PPC64_REL24_P9NOTOC:
|
||||
case elfcpp::R_POWERPC_REL24:
|
||||
- case elfcpp::R_PPC_PLTREL24:
|
||||
case elfcpp::R_POWERPC_REL14:
|
||||
case elfcpp::R_POWERPC_REL14_BRTAKEN:
|
||||
case elfcpp::R_POWERPC_REL14_BRNTAKEN:
|
||||
case elfcpp::R_POWERPC_PLT16_LO:
|
||||
case elfcpp::R_POWERPC_PLT16_HI:
|
||||
case elfcpp::R_POWERPC_PLT16_HA:
|
||||
- case elfcpp::R_PPC64_PLT16_LO_DS:
|
||||
case elfcpp::R_POWERPC_PLTSEQ:
|
||||
- case elfcpp::R_PPC64_PLTSEQ_NOTOC:
|
||||
case elfcpp::R_POWERPC_PLTCALL:
|
||||
- case elfcpp::R_PPC64_PLTCALL_NOTOC:
|
||||
- case elfcpp::R_PPC64_PLT_PCREL34:
|
||||
- case elfcpp::R_PPC64_PLT_PCREL34_NOTOC:
|
||||
ref = Symbol::FUNCTION_CALL | Symbol::RELATIVE_REF;
|
||||
break;
|
||||
|
||||
- case elfcpp::R_POWERPC_GOT16:
|
||||
- case elfcpp::R_POWERPC_GOT16_LO:
|
||||
- case elfcpp::R_POWERPC_GOT16_HI:
|
||||
- case elfcpp::R_POWERPC_GOT16_HA:
|
||||
case elfcpp::R_PPC64_GOT16_DS:
|
||||
case elfcpp::R_PPC64_GOT16_LO_DS:
|
||||
case elfcpp::R_PPC64_GOT_PCREL34:
|
||||
@@ -7768,11 +7784,16 @@ Target_powerpc<size, big_endian>::Scan::
|
||||
case elfcpp::R_PPC64_TOC16_HA:
|
||||
case elfcpp::R_PPC64_TOC16_DS:
|
||||
case elfcpp::R_PPC64_TOC16_LO_DS:
|
||||
+ if (size != 64)
|
||||
+ break;
|
||||
+ // Fall through.
|
||||
+ case elfcpp::R_POWERPC_GOT16:
|
||||
+ case elfcpp::R_POWERPC_GOT16_LO:
|
||||
+ case elfcpp::R_POWERPC_GOT16_HI:
|
||||
+ case elfcpp::R_POWERPC_GOT16_HA:
|
||||
ref = Symbol::RELATIVE_REF;
|
||||
break;
|
||||
|
||||
- case elfcpp::R_POWERPC_GOT_TPREL16:
|
||||
- case elfcpp::R_POWERPC_TLS:
|
||||
case elfcpp::R_PPC64_TLSGD:
|
||||
case elfcpp::R_PPC64_TLSLD:
|
||||
case elfcpp::R_PPC64_TPREL34:
|
||||
@@ -7781,6 +7802,11 @@ Target_powerpc<size, big_endian>::Scan::
|
||||
case elfcpp::R_PPC64_GOT_TLSLD_PCREL34:
|
||||
case elfcpp::R_PPC64_GOT_TPREL_PCREL34:
|
||||
case elfcpp::R_PPC64_GOT_DTPREL_PCREL34:
|
||||
+ if (size != 64)
|
||||
+ break;
|
||||
+ // Fall through.
|
||||
+ case elfcpp::R_POWERPC_GOT_TPREL16:
|
||||
+ case elfcpp::R_POWERPC_TLS:
|
||||
ref = Symbol::TLS_REF;
|
||||
break;
|
||||
|
||||
@@ -10671,10 +10697,8 @@ Target_powerpc<size, big_endian>::Reloca
|
||||
bool has_stub_value = false;
|
||||
bool localentry0 = false;
|
||||
unsigned int r_sym = elfcpp::elf_r_sym<size>(rela.get_r_info());
|
||||
- bool use_plt_offset
|
||||
- = (gsym != NULL
|
||||
- ? gsym->use_plt_offset(Scan::get_reference_flags(r_type, target))
|
||||
- : object->local_has_plt_offset(r_sym));
|
||||
+ bool pltcall_to_direct = false;
|
||||
+
|
||||
if (is_plt16_reloc<size>(r_type)
|
||||
|| r_type == elfcpp::R_PPC64_PLT_PCREL34
|
||||
|| r_type == elfcpp::R_PPC64_PLT_PCREL34_NOTOC
|
||||
@@ -10688,21 +10712,18 @@ Target_powerpc<size, big_endian>::Reloca
|
||||
// that the decision depends on the PLTCALL reloc, and we don't
|
||||
// know the address of that instruction when processing others
|
||||
// in the sequence. So the decision needs to be made in
|
||||
- // do_relax(). For now, don't optimise inline plt calls.
|
||||
- if (gsym)
|
||||
- use_plt_offset = gsym->has_plt_offset();
|
||||
- }
|
||||
- if (use_plt_offset
|
||||
- && !is_got_reloc(r_type)
|
||||
- && !is_plt16_reloc<size>(r_type)
|
||||
- && r_type != elfcpp::R_PPC64_PLT_PCREL34
|
||||
- && r_type != elfcpp::R_PPC64_PLT_PCREL34_NOTOC
|
||||
- && r_type != elfcpp::R_POWERPC_PLTSEQ
|
||||
- && r_type != elfcpp::R_POWERPC_PLTCALL
|
||||
- && r_type != elfcpp::R_PPC64_PLTSEQ_NOTOC
|
||||
- && r_type != elfcpp::R_PPC64_PLTCALL_NOTOC
|
||||
- && (!psymval->is_ifunc_symbol()
|
||||
- || Scan::reloc_needs_plt_for_ifunc(target, object, r_type, false)))
|
||||
+ // do_relax().
|
||||
+ pltcall_to_direct = !(gsym != NULL
|
||||
+ ? gsym->has_plt_offset()
|
||||
+ : object->local_has_plt_offset(r_sym));
|
||||
+ }
|
||||
+ else if ((gsym != NULL
|
||||
+ ? gsym->use_plt_offset(Scan::get_reference_flags(r_type, target))
|
||||
+ : psymval->is_ifunc_symbol() && object->local_has_plt_offset(r_sym))
|
||||
+ && !is_got_reloc(r_type)
|
||||
+ && (!psymval->is_ifunc_symbol()
|
||||
+ || Scan::reloc_needs_plt_for_ifunc(target, object, r_type,
|
||||
+ false)))
|
||||
{
|
||||
if (size == 64
|
||||
&& gsym != NULL
|
||||
@@ -10796,9 +10817,9 @@ Target_powerpc<size, big_endian>::Reloca
|
||||
gold_assert(has_stub_value || !(os->flags() & elfcpp::SHF_ALLOC));
|
||||
}
|
||||
|
||||
- if (use_plt_offset && (is_plt16_reloc<size>(r_type)
|
||||
- || r_type == elfcpp::R_PPC64_PLT_PCREL34
|
||||
- || r_type == elfcpp::R_PPC64_PLT_PCREL34_NOTOC))
|
||||
+ if (!pltcall_to_direct && (is_plt16_reloc<size>(r_type)
|
||||
+ || r_type == elfcpp::R_PPC64_PLT_PCREL34
|
||||
+ || r_type == elfcpp::R_PPC64_PLT_PCREL34_NOTOC))
|
||||
{
|
||||
const Output_data_plt_powerpc<size, big_endian>* plt;
|
||||
if (gsym)
|
||||
@@ -10826,7 +10847,7 @@ Target_powerpc<size, big_endian>::Reloca
|
||||
value -= target->toc_pointer();
|
||||
}
|
||||
}
|
||||
- else if (!use_plt_offset
|
||||
+ else if (pltcall_to_direct
|
||||
&& (is_plt16_reloc<size>(r_type)
|
||||
|| r_type == elfcpp::R_POWERPC_PLTSEQ
|
||||
|| r_type == elfcpp::R_PPC64_PLTSEQ_NOTOC))
|
||||
@@ -10835,7 +10856,7 @@ Target_powerpc<size, big_endian>::Reloca
|
||||
elfcpp::Swap<32, big_endian>::writeval(iview, nop);
|
||||
r_type = elfcpp::R_POWERPC_NONE;
|
||||
}
|
||||
- else if (!use_plt_offset
|
||||
+ else if (pltcall_to_direct
|
||||
&& (r_type == elfcpp::R_PPC64_PLT_PCREL34
|
||||
|| r_type == elfcpp::R_PPC64_PLT_PCREL34_NOTOC))
|
||||
{
|
||||
@@ -11316,8 +11337,8 @@ Target_powerpc<size, big_endian>::Reloca
|
||||
}
|
||||
else if (!has_stub_value)
|
||||
{
|
||||
- if (!use_plt_offset && (r_type == elfcpp::R_POWERPC_PLTCALL
|
||||
- || r_type == elfcpp::R_PPC64_PLTCALL_NOTOC))
|
||||
+ if (pltcall_to_direct && (r_type == elfcpp::R_POWERPC_PLTCALL
|
||||
+ || r_type == elfcpp::R_PPC64_PLTCALL_NOTOC))
|
||||
{
|
||||
// PLTCALL without plt entry => convert to direct call
|
||||
Insn* iview = reinterpret_cast<Insn*>(view);
|
@ -0,0 +1,167 @@
|
||||
From 9e855cffa1fda44629e7f9b76dfa3e5a51a440e9 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Thu, 11 Aug 2022 09:51:03 +0930
|
||||
Subject: [PATCH 011/160] PR29466, APP/NO_APP with .linefile
|
||||
|
||||
Commit 53f2b36a54b9 exposed a bug in sb_scrub_and_add_sb that could
|
||||
result in losing input. If scrubbing results in expansion past the
|
||||
holding capacity of do_scrub_chars output buffer, then do_scrub_chars
|
||||
stashes the extra input for the next call. That call never came
|
||||
because sb_scrub_and_add_sb wrongly decided it was done. Fix that by
|
||||
allowing sb_scrub_and_add_sb to see whether there is pending input.
|
||||
Also allow a little extra space so that in most cases we won't need
|
||||
to resize the output buffer.
|
||||
|
||||
sb_scrub_and_add_sb also limited output to the size of the input,
|
||||
rather than the actual output buffer size. Fixing that resulted in a
|
||||
fail of gas/testsuite/macros/dot with an extra warning: "end of file
|
||||
not at end of a line; newline inserted". OK, so the macro in dot.s
|
||||
really does finish without end-of-line. Apparently the macro
|
||||
expansion code relied on do_scrub_chars returning early. So fix that
|
||||
too by adding a newline if needed in macro_expand_body.
|
||||
|
||||
PR 29466
|
||||
* app.c (do_scrub_pending): New function.
|
||||
* as.h: Declare it.
|
||||
* input-scrub.c (input_scrub_include_sb): Add extra space for
|
||||
two .linefile directives.
|
||||
* sb.c (sb_scrub_and_add_sb): Take into account pending input.
|
||||
Allow output to max.
|
||||
* macro.c (macro_expand_body): Add terminating newline.
|
||||
* testsuite/config/default.exp (SIZE, SIZEFLAGS): Define.
|
||||
* testsuite/gas/macros/app5.d,
|
||||
* testsuite/gas/macros/app5.s: New test.
|
||||
* testsuite/gas/macros/macros.exp: Run it.
|
||||
|
||||
(cherry picked from commit 4d74aab7aa562fe79d4669cdad0c32610531cbc0)
|
||||
---
|
||||
gas/app.c | 13 +++++++++++++
|
||||
gas/as.h | 1 +
|
||||
gas/input-scrub.c | 6 ++++--
|
||||
gas/macro.c | 2 ++
|
||||
gas/sb.c | 5 +++--
|
||||
gas/testsuite/config/default.exp | 8 ++++++++
|
||||
gas/testsuite/gas/macros/app5.d | 6 ++++++
|
||||
gas/testsuite/gas/macros/app5.s | 5 +++++
|
||||
gas/testsuite/gas/macros/macros.exp | 1 +
|
||||
9 files changed, 43 insertions(+), 4 deletions(-)
|
||||
create mode 100644 gas/testsuite/gas/macros/app5.d
|
||||
create mode 100644 gas/testsuite/gas/macros/app5.s
|
||||
|
||||
--- a/gas/app.c
|
||||
+++ b/gas/app.c
|
||||
@@ -1537,3 +1537,16 @@ do_scrub_chars (size_t (*get) (char *, s
|
||||
last_char = to[-1];
|
||||
return to - tostart;
|
||||
}
|
||||
+
|
||||
+/* Return amount of pending input. */
|
||||
+
|
||||
+size_t
|
||||
+do_scrub_pending (void)
|
||||
+{
|
||||
+ size_t len = 0;
|
||||
+ if (saved_input)
|
||||
+ len += saved_input_len;
|
||||
+ if (state == -1)
|
||||
+ len += strlen (out_string);
|
||||
+ return len;
|
||||
+}
|
||||
--- a/gas/as.h
|
||||
+++ b/gas/as.h
|
||||
@@ -460,6 +460,7 @@ void input_scrub_insert_file (char *);
|
||||
char * input_scrub_new_file (const char *);
|
||||
char * input_scrub_next_buffer (char **bufp);
|
||||
size_t do_scrub_chars (size_t (*get) (char *, size_t), char *, size_t);
|
||||
+size_t do_scrub_pending (void);
|
||||
bool scan_for_multibyte_characters (const unsigned char *, const unsigned char *, bool);
|
||||
int gen_to_words (LITTLENUM_TYPE *, int, long);
|
||||
int had_err (void);
|
||||
--- a/gas/input-scrub.c
|
||||
+++ b/gas/input-scrub.c
|
||||
@@ -278,9 +278,11 @@ input_scrub_include_sb (sb *from, char *
|
||||
|
||||
next_saved_file = input_scrub_push (position);
|
||||
|
||||
- /* Allocate sufficient space: from->len + optional newline. */
|
||||
+ /* Allocate sufficient space: from->len plus optional newline
|
||||
+ plus two ".linefile " directives, plus a little more for other
|
||||
+ expansion. */
|
||||
newline = from->len >= 1 && from->ptr[0] != '\n';
|
||||
- sb_build (&from_sb, from->len + newline);
|
||||
+ sb_build (&from_sb, from->len + newline + 2 * sizeof (".linefile") + 30);
|
||||
if (expansion == expanding_repeat && from_sb_expansion >= expanding_macro)
|
||||
expansion = expanding_nested;
|
||||
from_sb_expansion = expansion;
|
||||
--- a/gas/macro.c
|
||||
+++ b/gas/macro.c
|
||||
@@ -1056,6 +1056,8 @@ macro_expand_body (sb *in, sb *out, form
|
||||
loclist = f;
|
||||
}
|
||||
|
||||
+ if (!err && (out->len == 0 || out->ptr[out->len - 1] != '\n'))
|
||||
+ sb_add_char (out, '\n');
|
||||
return err;
|
||||
}
|
||||
|
||||
--- a/gas/sb.c
|
||||
+++ b/gas/sb.c
|
||||
@@ -119,11 +119,12 @@ sb_scrub_and_add_sb (sb *ptr, sb *s)
|
||||
So we loop until the input S is consumed. */
|
||||
while (1)
|
||||
{
|
||||
- size_t copy = s->len - (scrub_position - s->ptr);
|
||||
+ size_t copy = s->len - (scrub_position - s->ptr) + do_scrub_pending ();
|
||||
if (copy == 0)
|
||||
break;
|
||||
sb_check (ptr, copy);
|
||||
- ptr->len += do_scrub_chars (scrub_from_sb, ptr->ptr + ptr->len, copy);
|
||||
+ ptr->len += do_scrub_chars (scrub_from_sb, ptr->ptr + ptr->len,
|
||||
+ ptr->max - ptr->len);
|
||||
}
|
||||
|
||||
sb_to_scrub = 0;
|
||||
--- a/gas/testsuite/config/default.exp
|
||||
+++ b/gas/testsuite/config/default.exp
|
||||
@@ -52,6 +52,14 @@ if ![info exists NMFLAGS] then {
|
||||
set NMFLAGS {}
|
||||
}
|
||||
|
||||
+if ![info exists SIZE] then {
|
||||
+ set SIZE [findfile $base_dir/size]
|
||||
+}
|
||||
+
|
||||
+if ![info exists SIZEFLAGS] then {
|
||||
+ set SIZEFLAGS ""
|
||||
+}
|
||||
+
|
||||
if ![info exists OBJCOPY] then {
|
||||
set OBJCOPY [findfile $base_dir/../../binutils/objcopy]
|
||||
}
|
||||
--- /dev/null
|
||||
+++ b/gas/testsuite/gas/macros/app5.d
|
||||
@@ -0,0 +1,6 @@
|
||||
+#name: APP with linefile
|
||||
+#xfail: tic30-*-*
|
||||
+#size: -G
|
||||
+# pr29466 just check that the test assembles
|
||||
+
|
||||
+#pass
|
||||
--- /dev/null
|
||||
+++ b/gas/testsuite/gas/macros/app5.s
|
||||
@@ -0,0 +1,5 @@
|
||||
+#NO_APP
|
||||
+#APP
|
||||
+# 5 "foo.c" 1
|
||||
+# 0 "" 2
|
||||
+#NO_APP
|
||||
--- a/gas/testsuite/gas/macros/macros.exp
|
||||
+++ b/gas/testsuite/gas/macros/macros.exp
|
||||
@@ -70,6 +70,7 @@ run_dump_test app2
|
||||
run_dump_test app3
|
||||
remote_download host "$srcdir/$subdir/app4b.s"
|
||||
run_dump_test app4
|
||||
+run_dump_test app5
|
||||
|
||||
run_list_test badarg ""
|
||||
|
@ -0,0 +1,128 @@
|
||||
From 509a2ec6ad3ea7eb3f4cf59538cf636a2126e4c3 Mon Sep 17 00:00:00 2001
|
||||
From: liuzhensong <liuzhensong@loongson.cn>
|
||||
Date: Fri, 2 Sep 2022 16:29:14 +0800
|
||||
Subject: [PATCH 039/160] LoongArch:ld: Fix relocation error of pcrel.
|
||||
|
||||
Patch for branch 2.39.
|
||||
Need to reduce the address of pc when using
|
||||
reloction R_LARCH_SOP_PUSH_PCREL.
|
||||
|
||||
bfd/
|
||||
* elfnn-loongarch.c
|
||||
---
|
||||
bfd/elfnn-loongarch.c | 3 +-
|
||||
ld/testsuite/ld-loongarch-elf/pcrel-const.d | 14 +++++++
|
||||
ld/testsuite/ld-loongarch-elf/pcrel-const.lds | 14 +++++++
|
||||
ld/testsuite/ld-loongarch-elf/pcrel-const.s | 12 ++++++
|
||||
ld/testsuite/ld-loongarch-elf/pr.exp | 39 +++++++++++++++++++
|
||||
5 files changed, 81 insertions(+), 1 deletion(-)
|
||||
create mode 100644 ld/testsuite/ld-loongarch-elf/pcrel-const.d
|
||||
create mode 100644 ld/testsuite/ld-loongarch-elf/pcrel-const.lds
|
||||
create mode 100644 ld/testsuite/ld-loongarch-elf/pcrel-const.s
|
||||
create mode 100644 ld/testsuite/ld-loongarch-elf/pr.exp
|
||||
|
||||
--- a/bfd/elfnn-loongarch.c
|
||||
+++ b/bfd/elfnn-loongarch.c
|
||||
@@ -2341,9 +2341,10 @@ loongarch_elf_relocate_section (bfd *out
|
||||
case R_LARCH_SOP_PUSH_PLT_PCREL:
|
||||
unresolved_reloc = false;
|
||||
|
||||
- if (resolved_to_const)
|
||||
+ if (!is_undefweak && resolved_to_const)
|
||||
{
|
||||
relocation += rel->r_addend;
|
||||
+ relocation -= pc;
|
||||
break;
|
||||
}
|
||||
else if (is_undefweak)
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-loongarch-elf/pcrel-const.d
|
||||
@@ -0,0 +1,14 @@
|
||||
+#as: -mla-global-with-pcrel
|
||||
+#objdump: -Drsz
|
||||
+
|
||||
+.*:[ ]+file format .*
|
||||
+
|
||||
+
|
||||
+Disassembly of section .text:
|
||||
+
|
||||
+.* <foo>:
|
||||
+#...
|
||||
+[ ]+8:[ ]+02c04084[ ]+addi.d[ ]+\$a0,[ ]+\$a0,[ ]+16\(0x10\)
|
||||
+#...
|
||||
+0+14 <__sec_end>:
|
||||
+#pass
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-loongarch-elf/pcrel-const.lds
|
||||
@@ -0,0 +1,14 @@
|
||||
+ENTRY(foo);
|
||||
+SECTIONS
|
||||
+{
|
||||
+ .text : {
|
||||
+ *(.text*)
|
||||
+ }
|
||||
+
|
||||
+ .data : {
|
||||
+ __sec_start = .;
|
||||
+ *(.gzdata)
|
||||
+ __sec_end = .;
|
||||
+ }
|
||||
+}
|
||||
+PROVIDE(__sec_size = __sec_end);
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-loongarch-elf/pcrel-const.s
|
||||
@@ -0,0 +1,12 @@
|
||||
+ .text
|
||||
+ .align 2
|
||||
+ .globl foo
|
||||
+ .type foo, @function
|
||||
+foo:
|
||||
+ nop
|
||||
+ la.global $r4,__sec_size
|
||||
+ ldptr.w $r4,$r4,0
|
||||
+ jr $r1
|
||||
+ .size foo, .-foo
|
||||
+ .data
|
||||
+ .word 1
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-loongarch-elf/pr.exp
|
||||
@@ -0,0 +1,39 @@
|
||||
+# Expect script for LoongArch ELF linker tests
|
||||
+# Copyright (C) 2022 Free Software Foundation, Inc.
|
||||
+#
|
||||
+# This file is part of the GNU Binutils.
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
+# MA 02110-1301, USA.
|
||||
+#
|
||||
+
|
||||
+if ![istarget loongarch64-*-*] {
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
+set link_tests [list \
|
||||
+ [list \
|
||||
+ "pcrel const" \
|
||||
+ "-T pcrel-const.lds" "" \
|
||||
+ "-mla-global-with-pcrel" \
|
||||
+ { pcrel-const.s } \
|
||||
+ [list \
|
||||
+ [list objdump -D pcrel-const.d] \
|
||||
+ ] \
|
||||
+ "pcrel-const" \
|
||||
+ ] \
|
||||
+]
|
||||
+
|
||||
+run_ld_link_tests $link_tests
|
@ -0,0 +1,27 @@
|
||||
From 4233be14a34d754a70b8b6f6fa42d21f35c6e030 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Sat, 10 Sep 2022 07:30:57 +0930
|
||||
Subject: [PATCH 043/160] Re: PR29466, APP/NO_APP with linefile
|
||||
|
||||
It looks like I copied the SIZE init across from
|
||||
binutils/testsuite/config/default.exp without some necessary editing.
|
||||
|
||||
PR 29466
|
||||
* testsuite/config/default.exp (SIZE): Adjust relative path.
|
||||
|
||||
(cherry picked from commit 1180f540d5f2f7751b5309bdd6c38d69fcf699e7)
|
||||
---
|
||||
gas/testsuite/config/default.exp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/gas/testsuite/config/default.exp
|
||||
+++ b/gas/testsuite/config/default.exp
|
||||
@@ -53,7 +53,7 @@ if ![info exists NMFLAGS] then {
|
||||
}
|
||||
|
||||
if ![info exists SIZE] then {
|
||||
- set SIZE [findfile $base_dir/size]
|
||||
+ set SIZE [findfile $base_dir/../../binutils/size]
|
||||
}
|
||||
|
||||
if ![info exists SIZEFLAGS] then {
|
@ -0,0 +1,38 @@
|
||||
From 4d7bba23a39fba18d6d13a2941a3c232011a7064 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Fri, 16 Sep 2022 18:08:44 +0930
|
||||
Subject: [PATCH 050/160] PowerPC64 pcrel got relocs against local symbols
|
||||
|
||||
Not that anyone would want to indirect via the GOT when an address can
|
||||
be loaded directly with pla, the following:
|
||||
|
||||
pld 3,x@got@pcrel
|
||||
x:
|
||||
|
||||
leads to "Internal error in md_apply_fix", because the generic parts
|
||||
of assembler fixup handling convert the fx_pcrel fixup to one without
|
||||
a symbol. Stop that happening.
|
||||
|
||||
* config/tc-ppc.c (ppc_force_relocation): Add PLT_PCREL34 and
|
||||
assorted GOT_PCREL34 relocs.
|
||||
|
||||
(cherry picked from commit 49c3ed081fed6b8e2b48fdc48f805f11e4589514)
|
||||
---
|
||||
gas/config/tc-ppc.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
--- a/gas/config/tc-ppc.c
|
||||
+++ b/gas/config/tc-ppc.c
|
||||
@@ -6676,6 +6676,12 @@ ppc_force_relocation (fixS *fix)
|
||||
case BFD_RELOC_PPC_BA16_BRNTAKEN:
|
||||
case BFD_RELOC_24_PLT_PCREL:
|
||||
case BFD_RELOC_PPC64_TOC:
|
||||
+ case BFD_RELOC_PPC64_PLT_PCREL34:
|
||||
+ case BFD_RELOC_PPC64_GOT_PCREL34:
|
||||
+ case BFD_RELOC_PPC64_GOT_TLSGD_PCREL34:
|
||||
+ case BFD_RELOC_PPC64_GOT_TLSLD_PCREL34:
|
||||
+ case BFD_RELOC_PPC64_GOT_TPREL_PCREL34:
|
||||
+ case BFD_RELOC_PPC64_GOT_DTPREL_PCREL34:
|
||||
return 1;
|
||||
case BFD_RELOC_PPC_B26:
|
||||
case BFD_RELOC_PPC_BA26:
|
@ -0,0 +1,94 @@
|
||||
From 010db38b54b589ca3e95b498aba2831064970171 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Wed, 21 Sep 2022 09:06:29 +0930
|
||||
Subject: [PATCH 055/160] Re: PowerPC64 pcrel got relocs against local symbols
|
||||
|
||||
The last patch wasn't all that shiny. There are rather a lot more
|
||||
relocations that can hit the assertion in md_apply_fix if the symbol
|
||||
is local or absolute. Fix them all.
|
||||
|
||||
* config/tc-ppc.c (ppc_force_relocation): Add all relocs that
|
||||
expect a symbol in md_apply_fix. Remove tls pcrel relocs
|
||||
already covered in general tls match range.
|
||||
|
||||
(cherry picked from commit 8b168f1a1e09e337d2a970f204a0230c091bbe58)
|
||||
---
|
||||
gas/config/tc-ppc.c | 58 ++++++++++++++++++++++++++++++++++++++++-----
|
||||
1 file changed, 52 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/gas/config/tc-ppc.c
|
||||
+++ b/gas/config/tc-ppc.c
|
||||
@@ -6666,8 +6666,6 @@ ppc_force_relocation (fixS *fix)
|
||||
int
|
||||
ppc_force_relocation (fixS *fix)
|
||||
{
|
||||
- /* Branch prediction relocations must force a relocation, as must
|
||||
- the vtable description relocs. */
|
||||
switch (fix->fx_r_type)
|
||||
{
|
||||
case BFD_RELOC_PPC_B16_BRTAKEN:
|
||||
@@ -6676,12 +6674,60 @@ ppc_force_relocation (fixS *fix)
|
||||
case BFD_RELOC_PPC_BA16_BRNTAKEN:
|
||||
case BFD_RELOC_24_PLT_PCREL:
|
||||
case BFD_RELOC_PPC64_TOC:
|
||||
+ case BFD_RELOC_16_GOTOFF:
|
||||
+ case BFD_RELOC_LO16_GOTOFF:
|
||||
+ case BFD_RELOC_HI16_GOTOFF:
|
||||
+ case BFD_RELOC_HI16_S_GOTOFF:
|
||||
+ case BFD_RELOC_LO16_PLTOFF:
|
||||
+ case BFD_RELOC_HI16_PLTOFF:
|
||||
+ case BFD_RELOC_HI16_S_PLTOFF:
|
||||
+ case BFD_RELOC_GPREL16:
|
||||
+ case BFD_RELOC_16_BASEREL:
|
||||
+ case BFD_RELOC_LO16_BASEREL:
|
||||
+ case BFD_RELOC_HI16_BASEREL:
|
||||
+ case BFD_RELOC_HI16_S_BASEREL:
|
||||
+ case BFD_RELOC_PPC_TOC16:
|
||||
+ case BFD_RELOC_PPC64_TOC16_LO:
|
||||
+ case BFD_RELOC_PPC64_TOC16_HI:
|
||||
+ case BFD_RELOC_PPC64_TOC16_HA:
|
||||
+ case BFD_RELOC_PPC64_PLTGOT16:
|
||||
+ case BFD_RELOC_PPC64_PLTGOT16_LO:
|
||||
+ case BFD_RELOC_PPC64_PLTGOT16_HI:
|
||||
+ case BFD_RELOC_PPC64_PLTGOT16_HA:
|
||||
+ case BFD_RELOC_PPC64_GOT16_DS:
|
||||
+ case BFD_RELOC_PPC64_GOT16_LO_DS:
|
||||
+ case BFD_RELOC_PPC64_PLT16_LO_DS:
|
||||
+ case BFD_RELOC_PPC64_SECTOFF_DS:
|
||||
+ case BFD_RELOC_PPC64_SECTOFF_LO_DS:
|
||||
+ case BFD_RELOC_PPC64_TOC16_DS:
|
||||
+ case BFD_RELOC_PPC64_TOC16_LO_DS:
|
||||
+ case BFD_RELOC_PPC64_PLTGOT16_DS:
|
||||
+ case BFD_RELOC_PPC64_PLTGOT16_LO_DS:
|
||||
+ case BFD_RELOC_PPC_EMB_NADDR16:
|
||||
+ case BFD_RELOC_PPC_EMB_NADDR16_LO:
|
||||
+ case BFD_RELOC_PPC_EMB_NADDR16_HI:
|
||||
+ case BFD_RELOC_PPC_EMB_NADDR16_HA:
|
||||
+ case BFD_RELOC_PPC_EMB_SDAI16:
|
||||
+ case BFD_RELOC_PPC_EMB_SDA2I16:
|
||||
+ case BFD_RELOC_PPC_EMB_SDA2REL:
|
||||
+ case BFD_RELOC_PPC_EMB_SDA21:
|
||||
+ case BFD_RELOC_PPC_EMB_MRKREF:
|
||||
+ case BFD_RELOC_PPC_EMB_RELSEC16:
|
||||
+ case BFD_RELOC_PPC_EMB_RELST_LO:
|
||||
+ case BFD_RELOC_PPC_EMB_RELST_HI:
|
||||
+ case BFD_RELOC_PPC_EMB_RELST_HA:
|
||||
+ case BFD_RELOC_PPC_EMB_BIT_FLD:
|
||||
+ case BFD_RELOC_PPC_EMB_RELSDA:
|
||||
+ case BFD_RELOC_PPC_VLE_SDA21:
|
||||
+ case BFD_RELOC_PPC_VLE_SDA21_LO:
|
||||
+ case BFD_RELOC_PPC_VLE_SDAREL_LO16A:
|
||||
+ case BFD_RELOC_PPC_VLE_SDAREL_LO16D:
|
||||
+ case BFD_RELOC_PPC_VLE_SDAREL_HI16A:
|
||||
+ case BFD_RELOC_PPC_VLE_SDAREL_HI16D:
|
||||
+ case BFD_RELOC_PPC_VLE_SDAREL_HA16A:
|
||||
+ case BFD_RELOC_PPC_VLE_SDAREL_HA16D:
|
||||
case BFD_RELOC_PPC64_PLT_PCREL34:
|
||||
case BFD_RELOC_PPC64_GOT_PCREL34:
|
||||
- case BFD_RELOC_PPC64_GOT_TLSGD_PCREL34:
|
||||
- case BFD_RELOC_PPC64_GOT_TLSLD_PCREL34:
|
||||
- case BFD_RELOC_PPC64_GOT_TPREL_PCREL34:
|
||||
- case BFD_RELOC_PPC64_GOT_DTPREL_PCREL34:
|
||||
return 1;
|
||||
case BFD_RELOC_PPC_B26:
|
||||
case BFD_RELOC_PPC_BA26:
|
@ -0,0 +1,89 @@
|
||||
From a98316d5cf970cbc99689797d84c2ea832bcdcbb Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Mon, 1 Aug 2022 16:02:39 -0700
|
||||
Subject: [PATCH 058/160] elf: Reset alignment for each PT_LOAD segment
|
||||
|
||||
Reset alignment for each PT_LOAD segment to avoid using alignment from
|
||||
the previous PT_LOAD segment.
|
||||
|
||||
bfd/
|
||||
|
||||
PR ld/29435
|
||||
* elf.c (assign_file_positions_for_load_sections): Reset
|
||||
alignment for each PT_LOAD segment.
|
||||
|
||||
ld/
|
||||
|
||||
PR ld/29435
|
||||
* testsuite/ld-elf/pr29435.d: New file.
|
||||
* testsuite/ld-elf/pr29435.s: Likewise.
|
||||
|
||||
(cherry picked from commit 59f214544c50ec7ebbca285ff2b4949f48671690)
|
||||
---
|
||||
bfd/elf.c | 7 ++++---
|
||||
ld/testsuite/ld-elf/pr29435.d | 11 +++++++++++
|
||||
ld/testsuite/ld-elf/pr29435.s | 6 ++++++
|
||||
3 files changed, 21 insertions(+), 3 deletions(-)
|
||||
create mode 100644 ld/testsuite/ld-elf/pr29435.d
|
||||
create mode 100644 ld/testsuite/ld-elf/pr29435.s
|
||||
|
||||
--- a/bfd/elf.c
|
||||
+++ b/bfd/elf.c
|
||||
@@ -5438,8 +5438,6 @@ assign_file_positions_for_load_sections
|
||||
Elf_Internal_Phdr *p;
|
||||
file_ptr off; /* Octets. */
|
||||
bfd_size_type maxpagesize;
|
||||
- bfd_size_type p_align;
|
||||
- bool p_align_p = false;
|
||||
unsigned int alloc, actual;
|
||||
unsigned int i, j;
|
||||
struct elf_segment_map **sorted_seg_map;
|
||||
@@ -5524,7 +5522,6 @@ assign_file_positions_for_load_sections
|
||||
qsort (sorted_seg_map, alloc, sizeof (*sorted_seg_map),
|
||||
elf_sort_segments);
|
||||
|
||||
- p_align = bed->p_align;
|
||||
maxpagesize = 1;
|
||||
if ((abfd->flags & D_PAGED) != 0)
|
||||
{
|
||||
@@ -5559,6 +5556,8 @@ assign_file_positions_for_load_sections
|
||||
asection **secpp;
|
||||
bfd_vma off_adjust; /* Octets. */
|
||||
bool no_contents;
|
||||
+ bfd_size_type p_align;
|
||||
+ bool p_align_p;
|
||||
|
||||
/* An ELF segment (described by Elf_Internal_Phdr) may contain a
|
||||
number of sections with contents contributing to both p_filesz
|
||||
@@ -5569,6 +5568,8 @@ assign_file_positions_for_load_sections
|
||||
p = phdrs + m->idx;
|
||||
p->p_type = m->p_type;
|
||||
p->p_flags = m->p_flags;
|
||||
+ p_align = bed->p_align;
|
||||
+ p_align_p = false;
|
||||
|
||||
if (m->count == 0)
|
||||
p->p_vaddr = m->p_vaddr_offset * opb;
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-elf/pr29435.d
|
||||
@@ -0,0 +1,11 @@
|
||||
+#ld: -shared -z separate-code -z relro
|
||||
+#xfail: ![check_shared_lib_support]
|
||||
+#xfail: ![check_relro_support]
|
||||
+#readelf: -Wl
|
||||
+
|
||||
+#failif
|
||||
+#...
|
||||
+ +LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ .* 0x8000
|
||||
+#...
|
||||
+ +LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ .* 0x8000
|
||||
+#...
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-elf/pr29435.s
|
||||
@@ -0,0 +1,6 @@
|
||||
+ .text
|
||||
+ .balign 0x8000
|
||||
+ .globl foo
|
||||
+ .type foo, %function
|
||||
+foo:
|
||||
+ .byte 0
|
@ -0,0 +1,29 @@
|
||||
From 041c22e35de06d22566f4c71e4425c3351215e66 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Sun, 25 Sep 2022 12:07:36 +0930
|
||||
Subject: [PATCH 063/160] PR29542, PowerPC gold internal error in
|
||||
get_output_view,
|
||||
|
||||
We were attempting to set a BSS style section contents.
|
||||
|
||||
PR 29542
|
||||
* powerpc.cc (Output_data_plt_powerpc::do_write): Don't set .plt,
|
||||
.iplt or .lplt section contents when position independent.
|
||||
|
||||
(cherry picked from commit c21736aed1d4877e090df60362413669dbdc391d)
|
||||
---
|
||||
gold/powerpc.cc | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/gold/powerpc.cc
|
||||
+++ b/gold/powerpc.cc
|
||||
@@ -4338,7 +4338,8 @@ template<int size, bool big_endian>
|
||||
void
|
||||
Output_data_plt_powerpc<size, big_endian>::do_write(Output_file* of)
|
||||
{
|
||||
- if (!this->sym_ents_.empty())
|
||||
+ if (!this->sym_ents_.empty()
|
||||
+ && !parameters->options().output_is_position_independent())
|
||||
{
|
||||
const section_size_type offset = this->offset();
|
||||
const section_size_type oview_size
|
@ -0,0 +1,301 @@
|
||||
From 88ac930a725b8aac8284a2738f03b843f4343dd0 Mon Sep 17 00:00:00 2001
|
||||
From: Victor Do Nascimento <Victor.DoNascimento@arm.com>
|
||||
Date: Thu, 17 Nov 2022 14:48:37 +0000
|
||||
Subject: [PATCH 116/160] arm: Use DWARF numbering convention for
|
||||
pseudo-register representation
|
||||
|
||||
The patch, initially submitted to trunk in
|
||||
https://sourceware.org/pipermail/binutils/2022-July/122092.html ensures correct
|
||||
support for handling .save directives for mixed-register type lists involving
|
||||
the ra_auth_code pseudo-register, whereby the support first introduced in 2.39
|
||||
(https://sourceware.org/pipermail/binutils/2022-May/120672.html) led to the
|
||||
generation of unwinder code popping registers in reversed order.
|
||||
|
||||
gas/Changelog:
|
||||
|
||||
* config/tc-arm.c (REG_RA_AUTH_CODE): New.
|
||||
(parse_dot_save): Likewise.
|
||||
(parse_reg_list): Remove obsolete code.
|
||||
(reg_names): Set ra_auth_code to 143.
|
||||
(s_arm_unwind_save): Handle core and pseudo-register lists via
|
||||
parse_dot_save.
|
||||
(s_arm_unwind_save_mixed): Deleted.
|
||||
(s_arm_unwind_save_pseudo): Handle one register at a time.
|
||||
* testsuite/gas/arm/unwind-pacbti-m-readelf.d: Fix test.
|
||||
* testsuite/gas/arm/unwind-pacbti-m.d: Likewise.
|
||||
|
||||
(cherry picked from commit 3a368c4c248f6e9f4bda3a5369befa17a4560293)
|
||||
---
|
||||
gas/config/tc-arm.c | 159 ++++++++++--------
|
||||
.../gas/arm/unwind-pacbti-m-readelf.d | 4 +-
|
||||
gas/testsuite/gas/arm/unwind-pacbti-m.d | 2 +-
|
||||
3 files changed, 95 insertions(+), 70 deletions(-)
|
||||
|
||||
--- a/gas/config/tc-arm.c
|
||||
+++ b/gas/config/tc-arm.c
|
||||
@@ -742,6 +742,7 @@ const char * const reg_expected_msgs[] =
|
||||
#define REG_SP 13
|
||||
#define REG_LR 14
|
||||
#define REG_PC 15
|
||||
+#define REG_RA_AUTH_CODE 143
|
||||
|
||||
/* ARM instructions take 4bytes in the object file, Thumb instructions
|
||||
take 2: */
|
||||
@@ -1943,21 +1944,6 @@ parse_reg_list (char ** strp, enum reg_l
|
||||
|
||||
reg = arm_reg_parse (&str, rt);
|
||||
|
||||
- /* Skip over allowed registers of alternative types in mixed-type
|
||||
- register lists. */
|
||||
- if (reg == FAIL && rt == REG_TYPE_PSEUDO
|
||||
- && ((reg = arm_reg_parse (&str, REG_TYPE_RN)) != FAIL))
|
||||
- {
|
||||
- cur_reg = reg;
|
||||
- continue;
|
||||
- }
|
||||
- else if (reg == FAIL && rt == REG_TYPE_RN
|
||||
- && ((reg = arm_reg_parse (&str, REG_TYPE_PSEUDO)) != FAIL))
|
||||
- {
|
||||
- cur_reg = reg;
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
if (etype == REGLIST_CLRM)
|
||||
{
|
||||
if (reg == REG_SP || reg == REG_PC)
|
||||
@@ -4139,7 +4125,6 @@ s_arm_unwind_fnstart (int ignored ATTRIB
|
||||
unwind.sp_restored = 0;
|
||||
}
|
||||
|
||||
-
|
||||
/* Parse a handlerdata directive. Creates the exception handling table entry
|
||||
for the function. */
|
||||
|
||||
@@ -4297,15 +4282,19 @@ s_arm_unwind_personality (int ignored AT
|
||||
/* Parse a directive saving pseudo registers. */
|
||||
|
||||
static void
|
||||
-s_arm_unwind_save_pseudo (long range)
|
||||
+s_arm_unwind_save_pseudo (int regno)
|
||||
{
|
||||
valueT op;
|
||||
|
||||
- if (range & (1 << 12))
|
||||
+ switch (regno)
|
||||
{
|
||||
+ case REG_RA_AUTH_CODE:
|
||||
/* Opcode for restoring RA_AUTH_CODE. */
|
||||
op = 0xb4;
|
||||
add_unwind_opcode (op, 1);
|
||||
+ break;
|
||||
+ default:
|
||||
+ as_bad (_("Unknown register %d encountered\n"), regno);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4375,6 +4364,80 @@ s_arm_unwind_save_core (long range)
|
||||
}
|
||||
}
|
||||
|
||||
+/* Implement correct handling of .save lists enabling the split into
|
||||
+sublists where necessary, while preserving correct sublist ordering. */
|
||||
+
|
||||
+static void
|
||||
+parse_dot_save (char **str_p, int prev_reg)
|
||||
+{
|
||||
+ long core_regs = 0;
|
||||
+ int reg;
|
||||
+ int in_range = 0;
|
||||
+
|
||||
+ if (**str_p == ',')
|
||||
+ *str_p += 1;
|
||||
+ if (**str_p == '}')
|
||||
+ {
|
||||
+ *str_p += 1;
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ while ((reg = arm_reg_parse (str_p, REG_TYPE_RN)) != FAIL)
|
||||
+ {
|
||||
+ if (!in_range)
|
||||
+ {
|
||||
+ if (core_regs & (1 << reg))
|
||||
+ as_tsktsk (_("Warning: duplicated register (r%d) in register list"),
|
||||
+ reg);
|
||||
+ else if (reg <= prev_reg)
|
||||
+ as_tsktsk (_("Warning: register list not in ascending order"));
|
||||
+
|
||||
+ core_regs |= (1 << reg);
|
||||
+ prev_reg = reg;
|
||||
+ if (skip_past_char(str_p, '-') != FAIL)
|
||||
+ in_range = 1;
|
||||
+ else if (skip_past_comma(str_p) == FAIL)
|
||||
+ first_error (_("bad register list"));
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ int i;
|
||||
+ if (reg <= prev_reg)
|
||||
+ first_error (_("bad range in register list"));
|
||||
+ for (i = prev_reg + 1; i <= reg; i++)
|
||||
+ {
|
||||
+ if (core_regs & (1 << i))
|
||||
+ as_tsktsk (_("Warning: duplicated register (r%d) in register list"),
|
||||
+ i);
|
||||
+ else
|
||||
+ core_regs |= 1 << i;
|
||||
+ }
|
||||
+ in_range = 0;
|
||||
+ }
|
||||
+ }
|
||||
+ if (core_regs)
|
||||
+ {
|
||||
+ /* Higher register numbers go in higher memory addresses. When splitting a list,
|
||||
+ right-most sublist should therefore be .saved first. Use recursion for this. */
|
||||
+ parse_dot_save (str_p, reg);
|
||||
+ /* We're back from recursion, so emit .save insn for sublist. */
|
||||
+ s_arm_unwind_save_core (core_regs);
|
||||
+ return;
|
||||
+ }
|
||||
+ /* Handle pseudo-regs, under assumption these are emitted singly. */
|
||||
+ else if ((reg = arm_reg_parse (str_p, REG_TYPE_PSEUDO)) != FAIL)
|
||||
+ {
|
||||
+ /* Recurse for remainder of input. Note: No assumption is made regarding which
|
||||
+ register in core register set holds pseudo-register. It's not considered in
|
||||
+ ordering check beyond ensuring it's not sandwiched between 2 consecutive
|
||||
+ registers. */
|
||||
+ parse_dot_save (str_p, prev_reg + 1);
|
||||
+ s_arm_unwind_save_pseudo (reg);
|
||||
+ return;
|
||||
+ }
|
||||
+ else
|
||||
+ as_bad (BAD_SYNTAX);
|
||||
+}
|
||||
|
||||
/* Parse a directive saving FPA registers. */
|
||||
|
||||
@@ -4716,39 +4779,13 @@ s_arm_unwind_save_mmxwcg (void)
|
||||
ignore_rest_of_line ();
|
||||
}
|
||||
|
||||
-/* Convert range and mask_range into a sequence of s_arm_unwind_core
|
||||
- and s_arm_unwind_pseudo operations. We assume that mask_range will
|
||||
- not have consecutive bits set, or that one operation per bit is
|
||||
- acceptable. */
|
||||
-
|
||||
-static void
|
||||
-s_arm_unwind_save_mixed (long range, long mask_range)
|
||||
-{
|
||||
- while (mask_range)
|
||||
- {
|
||||
- long mask_bit = mask_range & -mask_range;
|
||||
- long subrange = range & (mask_bit - 1);
|
||||
-
|
||||
- if (subrange)
|
||||
- s_arm_unwind_save_core (subrange);
|
||||
-
|
||||
- s_arm_unwind_save_pseudo (mask_bit);
|
||||
- range &= ~subrange;
|
||||
- mask_range &= ~mask_bit;
|
||||
- }
|
||||
-
|
||||
- if (range)
|
||||
- s_arm_unwind_save_core (range);
|
||||
-}
|
||||
-
|
||||
/* Parse an unwind_save directive.
|
||||
If the argument is non-zero, this is a .vsave directive. */
|
||||
|
||||
static void
|
||||
s_arm_unwind_save (int arch_v6)
|
||||
{
|
||||
- char *peek, *mask_peek;
|
||||
- long range, mask_range;
|
||||
+ char *peek;
|
||||
struct reg_entry *reg;
|
||||
bool had_brace = false;
|
||||
|
||||
@@ -4756,7 +4793,7 @@ s_arm_unwind_save (int arch_v6)
|
||||
as_bad (MISSING_FNSTART);
|
||||
|
||||
/* Figure out what sort of save we have. */
|
||||
- peek = mask_peek = input_line_pointer;
|
||||
+ peek = input_line_pointer;
|
||||
|
||||
if (*peek == '{')
|
||||
{
|
||||
@@ -4788,20 +4825,13 @@ s_arm_unwind_save (int arch_v6)
|
||||
|
||||
case REG_TYPE_PSEUDO:
|
||||
case REG_TYPE_RN:
|
||||
- mask_range = parse_reg_list (&mask_peek, REGLIST_PSEUDO);
|
||||
- range = parse_reg_list (&input_line_pointer, REGLIST_RN);
|
||||
-
|
||||
- if (range == FAIL || mask_range == FAIL)
|
||||
- {
|
||||
- as_bad (_("expected register list"));
|
||||
- ignore_rest_of_line ();
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- demand_empty_rest_of_line ();
|
||||
-
|
||||
- s_arm_unwind_save_mixed (range, mask_range);
|
||||
- return;
|
||||
+ {
|
||||
+ if (had_brace)
|
||||
+ input_line_pointer++;
|
||||
+ parse_dot_save (&input_line_pointer, -1);
|
||||
+ demand_empty_rest_of_line ();
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
case REG_TYPE_VFD:
|
||||
if (arch_v6)
|
||||
@@ -23993,12 +24023,8 @@ static const struct reg_entry reg_names[
|
||||
/* XScale accumulator registers. */
|
||||
REGNUM(acc,0,XSCALE), REGNUM(ACC,0,XSCALE),
|
||||
|
||||
- /* DWARF ABI defines RA_AUTH_CODE to 143. It also reserves 134-142 for future
|
||||
- expansion. RA_AUTH_CODE here is given the value 143 % 134 to make it easy
|
||||
- for tc_arm_regname_to_dw2regnum to translate to DWARF reg number using
|
||||
- 134 + reg_number should the range 134 to 142 be used for more pseudo regs
|
||||
- in the future. This also helps fit RA_AUTH_CODE into a bitmask. */
|
||||
- REGDEF(ra_auth_code,12,PSEUDO),
|
||||
+ /* AADWARF32 defines RA_AUTH_CODE to 143. */
|
||||
+ REGDEF(ra_auth_code,143,PSEUDO),
|
||||
};
|
||||
#undef REGDEF
|
||||
#undef REGNUM
|
||||
@@ -27905,7 +27931,6 @@ create_unwind_entry (int have_data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-
|
||||
/* Initialize the DWARF-2 unwind information for this procedure. */
|
||||
|
||||
void
|
||||
--- a/gas/testsuite/gas/arm/unwind-pacbti-m-readelf.d
|
||||
+++ b/gas/testsuite/gas/arm/unwind-pacbti-m-readelf.d
|
||||
@@ -10,11 +10,11 @@ Unwind section '.ARM.exidx' at offset 0x
|
||||
|
||||
0x0 <foo>: @0x0
|
||||
Compact model index: 1
|
||||
- 0x84 0x00 pop {r14}
|
||||
0xb4 pop {ra_auth_code}
|
||||
0x84 0x00 pop {r14}
|
||||
- 0xb4 pop {ra_auth_code}
|
||||
0xa3 pop {r4, r5, r6, r7}
|
||||
0xb4 pop {ra_auth_code}
|
||||
+ 0x84 0x00 pop {r14}
|
||||
+ 0xb4 pop {ra_auth_code}
|
||||
0xa8 pop {r4, r14}
|
||||
0xb0 finish
|
||||
--- a/gas/testsuite/gas/arm/unwind-pacbti-m.d
|
||||
+++ b/gas/testsuite/gas/arm/unwind-pacbti-m.d
|
||||
@@ -8,4 +8,4 @@
|
||||
.*: file format.*
|
||||
|
||||
Contents of section .ARM.extab:
|
||||
- 0000 (00840281 b40084b4 b0a8b4a3|81028400 b48400b4 a3b4a8b0) 00000000 .*
|
||||
+ 0000 (84b40281 84b4a300 b0a8b400|8102b484 00a3b484 00b4a8b0) 00000000 .*
|
Loading…
x
Reference in New Issue
Block a user