mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 17:42:41 +00:00
135 lines
4.2 KiB
Diff
135 lines
4.2 KiB
Diff
From c931a11e400ddf501f6796c62ba512195a1561ce Mon Sep 17 00:00:00 2001
|
|
From: John Crispin <john@phrozen.org>
|
|
Date: Sat, 18 Jul 2020 08:53:44 +0200
|
|
Subject: [PATCH] ipq807x: add the Qualcomm AX target support
|
|
|
|
Signed-off-by: John Crispin <john@phrozen.org>
|
|
---
|
|
config/Config-kernel.in | 9 ++++++
|
|
include/image.mk | 6 +++-
|
|
include/kernel-version.mk | 2 +-
|
|
package/boot/uboot-envtools/Makefile | 5 ---
|
|
package/boot/uboot-envtools/files/ipq807x | 37 +++++++++++++++++++++++
|
|
5 files changed, 52 insertions(+), 7 deletions(-)
|
|
create mode 100644 package/boot/uboot-envtools/files/ipq807x
|
|
|
|
diff --git a/config/Config-kernel.in b/config/Config-kernel.in
|
|
index d4648a5064..2d5c9f1437 100644
|
|
--- a/config/Config-kernel.in
|
|
+++ b/config/Config-kernel.in
|
|
@@ -2,6 +2,15 @@
|
|
#
|
|
# Copyright (C) 2006-2014 OpenWrt.org
|
|
|
|
+config KERNEL_IPQ_MEM_PROFILE
|
|
+ int "Different memory profile "
|
|
+ range 0 1024
|
|
+ default 512
|
|
+ depends on TARGET_ipq807x
|
|
+ help
|
|
+ This option select memory profile to be used,which defines
|
|
+ the reserved memory configuration used in device tree.
|
|
+
|
|
config KERNEL_BUILD_USER
|
|
string "Custom Kernel Build User Name"
|
|
default "builder" if BUILDBOT
|
|
diff --git a/include/image.mk b/include/image.mk
|
|
index 6fc02a3f6b..92b23321b1 100644
|
|
--- a/include/image.mk
|
|
+++ b/include/image.mk
|
|
@@ -179,6 +179,10 @@ define Image/pad-root-squashfs
|
|
$(call Image/pad-to,$(KDIR)/root.squashfs,$(if $(1),$(1),$(ROOTFS_PARTSIZE)))
|
|
endef
|
|
|
|
+ifeq ($(CONFIG_IPQ_MEM_PROFILE),512)
|
|
+DTC_CFLAGS = -D __IPQ_MEM_PROFILE_512_MB__
|
|
+endif
|
|
+
|
|
# $(1) source dts file
|
|
# $(2) target dtb file
|
|
# $(3) extra CPP flags
|
|
@@ -188,7 +192,7 @@ define Image/BuildDTB
|
|
-I$(DTS_DIR) \
|
|
-I$(DTS_DIR)/include \
|
|
-I$(LINUX_DIR)/include/ \
|
|
- -undef -D__DTS__ $(3) \
|
|
+ -undef -D__DTS__ $(DTC_CFLAGS) $(3) \
|
|
-o $(2).tmp $(1)
|
|
$(LINUX_DIR)/scripts/dtc/dtc -O dtb \
|
|
-i$(dir $(1)) $(DTC_FLAGS) $(4) \
|
|
diff --git a/include/kernel-version.mk b/include/kernel-version.mk
|
|
index c7aba61cd7..efecf2f919 100644
|
|
--- a/include/kernel-version.mk
|
|
+++ b/include/kernel-version.mk
|
|
@@ -11,7 +11,7 @@ LINUX_VERSION-4.14 = .193
|
|
LINUX_VERSION-5.4 = .158
|
|
LINUX_VERSION-5.10 = .27
|
|
|
|
-LINUX_KERNEL_HASH-4.4.60 = 2cd8df6f1ac6a5329c5a286ec9b5956215977221a1b731597ed169fff74a9659
|
|
+LINUX_KERNEL_HASH-4.4.60 = e7f2f47acf17497d6ffd713eda65c025b3df0bce09faa8c04712bf1b3cfc9fdb
|
|
LINUX_KERNEL_HASH-4.14.193 = 0b0fb41d4430e1a42738b341cbfd2f41951aa5cd02acabbd53f076119c8b9f03
|
|
LINUX_KERNEL_HASH-5.4.158 = 6e018fecdc8fc24553756e582d83b82d65b10a6b03ef36262a24911f839b8d59
|
|
LINUX_KERNEL_HASH-5.10.27 = d99dc9662951299c53a0a8d8c8d0a72a16ff861d20e927c0f9b14f63282d69d9
|
|
diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile
|
|
index a9eccec0ce..0696c81bea 100644
|
|
--- a/package/boot/uboot-envtools/Makefile
|
|
+++ b/package/boot/uboot-envtools/Makefile
|
|
@@ -58,11 +58,6 @@ MAKE_FLAGS += \
|
|
no-dot-config-targets=envtools \
|
|
envtools
|
|
|
|
-define Package/uboot-envtools/conffiles
|
|
-/etc/config/ubootenv
|
|
-/etc/fw_env.config
|
|
-endef
|
|
-
|
|
define Package/uboot-envtools/install
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/env/fw_printenv $(1)/usr/sbin
|
|
diff --git a/package/boot/uboot-envtools/files/ipq807x b/package/boot/uboot-envtools/files/ipq807x
|
|
new file mode 100644
|
|
index 0000000000..84ed73f288
|
|
--- /dev/null
|
|
+++ b/package/boot/uboot-envtools/files/ipq807x
|
|
@@ -0,0 +1,37 @@
|
|
+[ -e /etc/config/ubootenv ] && rm /etc/config/ubootenv
|
|
+
|
|
+touch /etc/config/ubootenv
|
|
+
|
|
+. /lib/uboot-envtools.sh
|
|
+. /lib/functions.sh
|
|
+
|
|
+board=$(board_name)
|
|
+
|
|
+ubootenv_mtdinfo () {
|
|
+ UBOOTENV_PART=$(cat /proc/mtd | grep APPSBLENV)
|
|
+ mtd_dev=$(echo $UBOOTENV_PART | awk '{print $1}' | sed 's/:$//')
|
|
+ mtd_size=$(echo $UBOOTENV_PART | awk '{print "0x"$2}')
|
|
+ mtd_erase=$(echo $UBOOTENV_PART | awk '{print "0x"$3}')
|
|
+ nor_flash=$(find /sys/bus/spi/devices/*/mtd -name ${mtd_dev})
|
|
+
|
|
+ if [ -n "$nor_flash" ]; then
|
|
+ ubootenv_size=$mtd_size
|
|
+ else
|
|
+ # size is fixed to 0x40000 in u-boot
|
|
+ ubootenv_size=0x40000
|
|
+ fi
|
|
+
|
|
+ sectors=$(( $ubootenv_size / $mtd_erase ))
|
|
+ echo /dev/$mtd_dev 0x0 $ubootenv_size $mtd_erase $sectors
|
|
+}
|
|
+
|
|
+case "$board" in
|
|
+*)
|
|
+ ubootenv_add_uci_config $(ubootenv_mtdinfo)
|
|
+ ;;
|
|
+esac
|
|
+
|
|
+config_load ubootenv
|
|
+config_foreach ubootenv_add_app_config ubootenv
|
|
+
|
|
+exit 0
|
|
--
|
|
2.25.1
|
|
|