From 1b12f430c38c615140d5d79265da0971e4b68df3 Mon Sep 17 00:00:00 2001
From: Signor Pellegrino <68112357+flyrouter@users.noreply.github.com>
Date: Sat, 13 Jul 2024 17:53:41 +0300
Subject: [PATCH] Update set_allocator

---
 .../package/goke-osdrv-gk7205v200/files/script/set_allocator | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/general/package/goke-osdrv-gk7205v200/files/script/set_allocator b/general/package/goke-osdrv-gk7205v200/files/script/set_allocator
index 85301fd7..50231ce5 100755
--- a/general/package/goke-osdrv-gk7205v200/files/script/set_allocator
+++ b/general/package/goke-osdrv-gk7205v200/files/script/set_allocator
@@ -12,6 +12,7 @@ get_env() {
   mtdparts=$(echo ${bootargs} | awk -F '=' '$1=="mtdparts"{print $2}' RS=' ')
   osmem=$(fw_printenv -n osmem)
   totalmem=$(fw_printenv -n totalmem)
+  extras=$(fw_printenv -n extras)
 }
 
 calc_mmz() {
@@ -30,7 +31,7 @@ if [[ "$1" == 'gk' ]]; then
   echo "Allocator selected as gk..."
   get_env
   mem=${osmem:=32M}
-  newbootargs="mem=${mem} console=${console} panic=${panic} rootfstype=${rootfstype} root=${root} init=${init} mtdparts=${mtdparts} mmz_allocator=gk"
+  newbootargs="mem=${mem} console=${console} panic=${panic} rootfstype=${rootfstype} root=${root} init=${init} mtdparts=${mtdparts} mmz_allocator=gk ${extras}"
   echo ${newbootargs}
   fw_setenv bootargs ${newbootargs}
   #
@@ -39,7 +40,7 @@ elif [[ "$1" == 'cma'  ]]; then
   get_env
   calc_mmz
   mem=${totalmem:=64M}
-  newbootargs="mem=${mem} console=${console} panic=${panic} rootfstype=${rootfstype} root=${root} init=${init} mtdparts=${mtdparts} mmz_allocator=cma mmz=${mmz}"
+  newbootargs="mem=${mem} console=${console} panic=${panic} rootfstype=${rootfstype} root=${root} init=${init} mtdparts=${mtdparts} mmz_allocator=cma mmz=${mmz} ${extras}"
   fw_setenv bootargs ${newbootargs}
   echo ${newbootargs}
 else