-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a96a848
commit ccf5705
Showing
68 changed files
with
14,464 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
|
||
[ -e /etc/config/ubootenv ] && exit 0 | ||
|
||
touch /etc/config/ubootenv | ||
|
||
. /lib/uboot-envtools.sh | ||
. /lib/functions.sh | ||
|
||
board=$(board_name) | ||
case "$board" in | ||
redmi,ax3000|\ | ||
xiaomi,cr881x) | ||
ubootenv_add_uci_config "/dev/mtd10" "0x0" "0x10000" "0x20000" | ||
;; | ||
esac | ||
|
||
config_load ubootenv | ||
config_foreach ubootenv_add_app_config ubootenv | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
include $(TOPDIR)/rules.mk | ||
|
||
BOARD:=ipq50xx | ||
BOARDNAME:=Qualcomm Atheros IPQ50XX | ||
SUBTARGETS:=arm aarch64 | ||
|
||
CPU_TYPE:=cortex-a53 | ||
FEATURES:=fpu ramdisk nand squashfs pcie | ||
|
||
KERNEL_PATCHVER:=6.6 | ||
|
||
include $(INCLUDE_DIR)/target.mk | ||
|
||
KERNELNAME:=Image dtbs | ||
|
||
DEFAULT_PACKAGES += \ | ||
kmod-gpio-button-hotplug \ | ||
uboot-envtools \ | ||
kmod-qca-nss-dp swconfig \ | ||
kmod-ath11k kmod-ath11k-ahb kmod-ath11k-pci wpad-basic-wolfssl | ||
|
||
$(eval $(call BuildTarget)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# CONFIG_32BIT is not set | ||
CONFIG_64BIT=y | ||
# CONFIG_ACPI is not set | ||
# CONFIG_ARCH_BCM_IPROC is not set | ||
# CONFIG_ARCH_EXYNOS7 is not set | ||
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y | ||
CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y | ||
# CONFIG_ARCH_LAYERSCAPE is not set | ||
CONFIG_ARCH_PHYS_ADDR_T_64BIT=y | ||
# CONFIG_ARCH_SEATTLE is not set | ||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y | ||
CONFIG_ARCH_SPARSEMEM_DEFAULT=y | ||
CONFIG_ARCH_SPARSEMEM_ENABLE=y | ||
# CONFIG_ARCH_SPRD is not set | ||
# CONFIG_ARCH_STRATIX10 is not set | ||
# CONFIG_ARCH_THUNDER is not set | ||
CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y | ||
CONFIG_ARCH_WANT_FRAME_POINTERS=y | ||
CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y | ||
# CONFIG_ARCH_XGENE is not set | ||
# CONFIG_ARCH_ZYNQMP is not set | ||
CONFIG_ARM64=y | ||
# CONFIG_ARM64_16K_PAGES is not set | ||
CONFIG_ARM64_4K_PAGES=y | ||
# CONFIG_ARM64_64K_PAGES is not set | ||
# CONFIG_ARM64_CRYPTO is not set | ||
# CONFIG_ARM64_ERRATUM_819472 is not set | ||
# CONFIG_ARM64_ERRATUM_824069 is not set | ||
# CONFIG_ARM64_ERRATUM_826319 is not set | ||
# CONFIG_ARM64_ERRATUM_827319 is not set | ||
# CONFIG_ARM64_ERRATUM_832075 is not set | ||
# CONFIG_ARM64_ERRATUM_843419 is not set | ||
# CONFIG_ARM64_ERRATUM_845719 is not set | ||
CONFIG_ARM64_HW_AFDBM=y | ||
# CONFIG_ARM64_LSE_ATOMICS is not set | ||
CONFIG_ARM64_PAN=y | ||
# CONFIG_ARM64_PTDUMP is not set | ||
# CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set | ||
CONFIG_ARM64_VA_BITS=39 | ||
CONFIG_ARM64_VA_BITS_39=y | ||
# CONFIG_ARM64_VA_BITS_48 is not set | ||
# CONFIG_ARMV8_DEPRECATED is not set | ||
# CONFIG_CAVIUM_ERRATUM_22375 is not set | ||
# CONFIG_CAVIUM_ERRATUM_23154 is not set | ||
# CONFIG_CAVIUM_ERRATUM_27456 is not set | ||
# CONFIG_COMMON_CLK_VERSATILE is not set | ||
CONFIG_COMMON_CLK_XGENE=y | ||
CONFIG_COMPAT=y | ||
CONFIG_COMPAT_BINFMT_ELF=y | ||
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set | ||
# CONFIG_DEBUG_ALIGN_RODATA is not set | ||
CONFIG_FRAME_WARN=2048 | ||
# CONFIG_GPIO_XGENE is not set | ||
# CONFIG_HUGETLBFS is not set | ||
CONFIG_IPQ_APSS_5018=y | ||
# CONFIG_I2C_CADENCE is not set | ||
# CONFIG_KASAN is not set | ||
# CONFIG_KVM is not set | ||
# CONFIG_NET_VENDOR_CAVIUM is not set | ||
# CONFIG_PCI_HISI is not set | ||
CONFIG_PHYS_ADDR_T_64BIT=y | ||
# CONFIG_PHY_XGENE is not set | ||
# CONFIG_POWER_RESET_XGENE is not set | ||
CONFIG_QCOM_SCM_64=y | ||
# CONFIG_RTC_DRV_EFI is not set | ||
CONFIG_SPARSEMEM=y | ||
CONFIG_SPARSEMEM_EXTREME=y | ||
CONFIG_SPARSEMEM_MANUAL=y | ||
CONFIG_SPARSEMEM_VMEMMAP=y | ||
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y | ||
CONFIG_VIRTUALIZATION=y | ||
|
||
CONFIG_ZONE_DMA32=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
SUBTARGET:=aarch64 | ||
BOARDNAME:=AArch64 64Bit | ||
|
||
ARCH:=aarch64 | ||
CPU_TYPE:=cortex-a53 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CONFIG_ARCH_IPQ5018=y | ||
CONFIG_ARCH_MMAP_RND_BITS=8 | ||
CONFIG_IPQ_APSS_5018=y | ||
CONFIG_PCIE_DW_PLAT=y | ||
# CONFIG_USB_QCOM_DIAG_BRIDGE is not set | ||
CONFIG_VMSPLIT_2G=y | ||
# CONFIG_VMSPLIT_3G is not set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
SUBTARGET:=arm | ||
BOARDNAME:=ARM 32Bit | ||
|
||
ARCH:=arm | ||
CPU_TYPE:=cortex-a7 | ||
CPU_SUBTYPE:=neon-vfpv4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
|
||
. /lib/functions/uci-defaults.sh | ||
|
||
bits() { | ||
local val | ||
val=0 | ||
|
||
while [ -n "$1" ]; do | ||
val=$(( val | (1 << $1) )) | ||
shift 1 | ||
done | ||
|
||
printf "0x%x" "$val" | ||
} | ||
|
||
board_config_update | ||
|
||
board=$(board_name) | ||
|
||
case $board in | ||
redmi,ax3000) | ||
ucidef_set_led_switch "wan" "WAN" "blue:internet" "switch1" "$( bits 4 )" | ||
;; | ||
xiaomi,cr881x) | ||
ucidef_set_led_switch "wan" "WAN" "blue:internet" "switch0" "$( bits 3 )" | ||
;; | ||
esac | ||
|
||
board_config_flush | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/sh | ||
|
||
. /lib/functions/uci-defaults.sh | ||
|
||
ipq50xx_setup_interfaces() | ||
{ | ||
local board="$1" | ||
case $board in | ||
redmi,ax3000) | ||
ucidef_add_switch "switch1" \ | ||
"6u@eth1" "5u@eth0" \ | ||
"1:lan:1" "2:lan:2" "3:lan:3" \ | ||
"4:wan" | ||
;; | ||
xiaomi,cr881x) | ||
ucidef_add_switch "switch0" \ | ||
"8u@eth1" "4u@eth0" \ | ||
"0:lan:1" "1:lan:2" "2:lan:3" \ | ||
"3:wan" | ||
;; | ||
esac | ||
} | ||
|
||
board_config_update | ||
board=$(board_name) | ||
ipq50xx_setup_interfaces $board | ||
board_config_flush | ||
|
||
exit 0 |
25 changes: 25 additions & 0 deletions
25
target/linux/ipq50xx/base-files/etc/hotplug.d/firmware/10-ath11k-board_id
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh | ||
|
||
[ -e /lib/firmware/$FIRMWARE ] && exit 0 | ||
|
||
set_board_id() { | ||
echo "$1" >/lib/firmware/$FIRMWARE | ||
} | ||
|
||
board=$(board_name) | ||
|
||
case "$FIRMWARE" in | ||
"ath11k/IPQ5018/hw1.0/board_id-ahb-c000000.wifi") | ||
case "$board" in | ||
redmi,ax3000) | ||
case "$(strings /dev/mtdblock15 | grep wl_pa_type= | cut -d= -f2)" in | ||
epa) set_board_id 0x24 ;; | ||
ipa|*) set_board_id 0x10 ;; | ||
esac | ||
;; | ||
esac | ||
;; | ||
*) | ||
exit 1 | ||
;; | ||
esac |
29 changes: 29 additions & 0 deletions
29
target/linux/ipq50xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/sh | ||
|
||
[ -e /lib/firmware/$FIRMWARE ] && exit 0 | ||
|
||
. /lib/functions/caldata.sh | ||
|
||
board=$(board_name) | ||
|
||
case "$FIRMWARE" in | ||
"ath11k/IPQ5018/hw1.0/caldata.bin") | ||
case "$board" in | ||
redmi,ax3000|\ | ||
xiaomi,cr881x) | ||
caldata_extract "0:ART" 0x1000 0x20000 | ||
;; | ||
esac | ||
;; | ||
"ath11k/qcn6122/hw1.0/caldata_1.bin") | ||
case "$board" in | ||
redmi,ax3000|\ | ||
xiaomi,cr881x) | ||
caldata_extract "0:ART" 0x26800 0x20000 | ||
;; | ||
esac | ||
;; | ||
*) | ||
exit 1 | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/sh /etc/rc.common | ||
|
||
START=99 | ||
|
||
. /lib/functions.sh | ||
|
||
boot() { | ||
case $(board_name) in | ||
redmi,ax3000|\ | ||
xiaomi,cr881x) | ||
fw_printenv >/dev/null || return 0 | ||
|
||
local flag_ota_reboot="$(fw_printenv flag_ota_reboot | cut -d'=' -f2)" | ||
if [[ "$flag_ota_reboot" == 1 ]]; then | ||
local mtd="$(grep -oE 'ubi.mtd=[a-zA-Z0-9\-\_]*' /proc/cmdline | cut -d'=' -f2)" | ||
case $mtd in | ||
rootfs) | ||
fw_setenv flag_last_success 0 | ||
fw_setenv flag_ota_reboot 0 | ||
fw_setenv flag_boot_success 1 | ||
;; | ||
rootfs_1) | ||
fw_setenv flag_last_success 1 | ||
fw_setenv flag_ota_reboot 0 | ||
fw_setenv flag_boot_success 1 | ||
;; | ||
*) | ||
echo "Unable to determine UBIPART: ubi.mtd=$mtd" | ||
return 1 | ||
;; | ||
esac | ||
fi | ||
;; | ||
esac | ||
} |
Oops, something went wrong.