diff --git a/general/package/hisilicon-opensdk/hisilicon-opensdk.mk b/general/package/hisilicon-opensdk/hisilicon-opensdk.mk index 99bf909bd0..b90fa4e007 100644 --- a/general/package/hisilicon-opensdk/hisilicon-opensdk.mk +++ b/general/package/hisilicon-opensdk/hisilicon-opensdk.mk @@ -5,7 +5,7 @@ ################################################################################ HISILICON_OPENSDK_SITE = $(call github,openipc,openhisilicon,$(HISILICON_OPENSDK_VERSION)) -HISILICON_OPENSDK_VERSION = b73fc65 +HISILICON_OPENSDK_VERSION = e866011 HISILICON_OPENSDK_LICENSE = GPL-3.0 HISILICON_OPENSDK_LICENSE_FILES = LICENSE diff --git a/general/package/hisilicon-osdrv-hi3516av100/files/script/load_hisilicon b/general/package/hisilicon-osdrv-hi3516av100/files/script/load_hisilicon index e4934ca465..f1776deb3b 100755 --- a/general/package/hisilicon-osdrv-hi3516av100/files/script/load_hisilicon +++ b/general/package/hisilicon-osdrv-hi3516av100/files/script/load_hisilicon @@ -12,7 +12,12 @@ mem_start=0x80000000 # phy mem start mem_total=$(fw_printenv -n totalmem | tr -d 'M') mem_total=${mem_total:=128} -os_mem_size=$(fw_printenv -n osmem | tr -d 'M') +# Prefer kernel cmdline mem=NM -- that's the authoritative kernel/MMZ split. +# Fall back to U-Boot osmem env only when the kernel was booted without mem=. +os_mem_size=$(awk 'BEGIN{RS=" "} /^mem=[0-9]+M/{gsub(/^mem=|M.*$/,""); print; exit}' /proc/cmdline) +if [ -z "$os_mem_size" ]; then + os_mem_size=$(fw_printenv -n osmem | tr -d 'M') +fi os_mem_size=${os_mem_size:=32} report_error() { diff --git a/general/package/hisilicon-osdrv-hi3516cv100/files/script/load_hisilicon b/general/package/hisilicon-osdrv-hi3516cv100/files/script/load_hisilicon index 2a4965a1c2..e97c37ed00 100755 --- a/general/package/hisilicon-osdrv-hi3516cv100/files/script/load_hisilicon +++ b/general/package/hisilicon-osdrv-hi3516cv100/files/script/load_hisilicon @@ -9,7 +9,12 @@ mem_start=0x80000000 # phy mem start mem_total=$(fw_printenv -n totalmem | tr -d 'M') mem_total=${mem_total:=64} -os_mem_size=$(fw_printenv -n osmem | tr -d 'M') +# Prefer kernel cmdline mem=NM -- that's the authoritative kernel/MMZ split. +# Fall back to U-Boot osmem env only when the kernel was booted without mem=. +os_mem_size=$(awk 'BEGIN{RS=" "} /^mem=[0-9]+M/{gsub(/^mem=|M.*$/,""); print; exit}' /proc/cmdline) +if [ -z "$os_mem_size" ]; then + os_mem_size=$(fw_printenv -n osmem | tr -d 'M') +fi os_mem_size=${os_mem_size:=32} # Sensor config diff --git a/general/package/hisilicon-osdrv-hi3516cv200/files/script/load_hisilicon b/general/package/hisilicon-osdrv-hi3516cv200/files/script/load_hisilicon index 533d0a631d..b29427adff 100755 --- a/general/package/hisilicon-osdrv-hi3516cv200/files/script/load_hisilicon +++ b/general/package/hisilicon-osdrv-hi3516cv200/files/script/load_hisilicon @@ -13,7 +13,12 @@ mem_start=0x80000000 # phy mem start mem_total=$(fw_printenv -n totalmem | tr -d 'M') mem_total=${mem_total:=64} -os_mem_size=$(fw_printenv -n osmem | tr -d 'M') +# Prefer kernel cmdline mem=NM -- that's the authoritative kernel/MMZ split. +# Fall back to U-Boot osmem env only when the kernel was booted without mem=. +os_mem_size=$(awk 'BEGIN{RS=" "} /^mem=[0-9]+M/{gsub(/^mem=|M.*$/,""); print; exit}' /proc/cmdline) +if [ -z "$os_mem_size" ]; then + os_mem_size=$(fw_printenv -n osmem | tr -d 'M') +fi os_mem_size=${os_mem_size:=32} report_error() { diff --git a/general/package/hisilicon-osdrv-hi3516cv300/files/script/load_hisilicon b/general/package/hisilicon-osdrv-hi3516cv300/files/script/load_hisilicon index 834f4b26b1..91fe59768b 100755 --- a/general/package/hisilicon-osdrv-hi3516cv300/files/script/load_hisilicon +++ b/general/package/hisilicon-osdrv-hi3516cv300/files/script/load_hisilicon @@ -13,7 +13,12 @@ mem_start=0x80000000; # phy mem start mem_total=$(fw_printenv -n totalmem | tr -d 'M') mem_total=${mem_total:=64} -os_mem_size=$(fw_printenv -n osmem | tr -d 'M') +# Prefer kernel cmdline mem=NM -- that's the authoritative kernel/MMZ split. +# Fall back to U-Boot osmem env only when the kernel was booted without mem=. +os_mem_size=$(awk 'BEGIN{RS=" "} /^mem=[0-9]+M/{gsub(/^mem=|M.*$/,""); print; exit}' /proc/cmdline) +if [ -z "$os_mem_size" ]; then + os_mem_size=$(fw_printenv -n osmem | tr -d 'M') +fi os_mem_size=${os_mem_size:=32} # Sensor config diff --git a/general/package/hisilicon-osdrv-hi3516cv500/files/script/load_hisilicon b/general/package/hisilicon-osdrv-hi3516cv500/files/script/load_hisilicon index 782f9c0e67..173af22f40 100755 --- a/general/package/hisilicon-osdrv-hi3516cv500/files/script/load_hisilicon +++ b/general/package/hisilicon-osdrv-hi3516cv500/files/script/load_hisilicon @@ -15,7 +15,12 @@ mem_start=0x80000000 # phy mem start mem_total=$(fw_printenv -n totalmem | tr -d 'M') mem_total=${mem_total:=64} -os_mem_size=$(fw_printenv -n osmem | tr -d 'M') +# Prefer kernel cmdline mem=NM -- that's the authoritative kernel/MMZ split. +# Fall back to U-Boot osmem env only when the kernel was booted without mem=. +os_mem_size=$(awk 'BEGIN{RS=" "} /^mem=[0-9]+M/{gsub(/^mem=|M.*$/,""); print; exit}' /proc/cmdline) +if [ -z "$os_mem_size" ]; then + os_mem_size=$(fw_printenv -n osmem | tr -d 'M') +fi os_mem_size=${os_mem_size:=32} SNS_TYPE0=imx327 # sensor type diff --git a/general/package/hisilicon-osdrv-hi3516ev200/files/script/load_hisilicon b/general/package/hisilicon-osdrv-hi3516ev200/files/script/load_hisilicon index 1fcb130328..d3628a2be3 100755 --- a/general/package/hisilicon-osdrv-hi3516ev200/files/script/load_hisilicon +++ b/general/package/hisilicon-osdrv-hi3516ev200/files/script/load_hisilicon @@ -15,7 +15,12 @@ mem_start=0x40000000 # phy mem start mem_total=$(fw_printenv -n totalmem | tr -d 'M') mem_total=${mem_total:=64} -os_mem_size=$(fw_printenv -n osmem | tr -d 'M') +# Prefer kernel cmdline mem=NM -- that's the authoritative kernel/MMZ split. +# Fall back to U-Boot osmem env only when the kernel was booted without mem=. +os_mem_size=$(awk 'BEGIN{RS=" "} /^mem=[0-9]+M/{gsub(/^mem=|M.*$/,""); print; exit}' /proc/cmdline) +if [ -z "$os_mem_size" ]; then + os_mem_size=$(fw_printenv -n osmem | tr -d 'M') +fi os_mem_size=${os_mem_size:=32} YUV_TYPE0=0 # 0 -- raw, 1 --DC, 2 --bt1120, 3 --bt656 diff --git a/general/package/hisilicon-osdrv-hi3519v101/files/script/load_hisilicon b/general/package/hisilicon-osdrv-hi3519v101/files/script/load_hisilicon index a5221ddd6d..d25aabf130 100755 --- a/general/package/hisilicon-osdrv-hi3519v101/files/script/load_hisilicon +++ b/general/package/hisilicon-osdrv-hi3519v101/files/script/load_hisilicon @@ -12,7 +12,12 @@ mem_start=0x80000000 # phy mem start mem_total=$(fw_printenv -n totalmem | tr -d 'M') mem_total=${mem_total:=64} -os_mem_size=$(fw_printenv -n osmem | tr -d 'M') +# Prefer kernel cmdline mem=NM -- that's the authoritative kernel/MMZ split. +# Fall back to U-Boot osmem env only when the kernel was booted without mem=. +os_mem_size=$(awk 'BEGIN{RS=" "} /^mem=[0-9]+M/{gsub(/^mem=|M.*$/,""); print; exit}' /proc/cmdline) +if [ -z "$os_mem_size" ]; then + os_mem_size=$(fw_printenv -n osmem | tr -d 'M') +fi os_mem_size=${os_mem_size:=32} # Sensor config diff --git a/general/package/hisilicon-osdrv-hi3536dv100/files/script/load_hisilicon b/general/package/hisilicon-osdrv-hi3536dv100/files/script/load_hisilicon index bc29d537c4..55ff864c41 100755 --- a/general/package/hisilicon-osdrv-hi3536dv100/files/script/load_hisilicon +++ b/general/package/hisilicon-osdrv-hi3536dv100/files/script/load_hisilicon @@ -8,7 +8,12 @@ mem_start=0x80000000 mem_total=$(fw_printenv -n totalmem | tr -d 'M') mem_total=${mem_total:=64} -os_mem_size=$(fw_printenv -n osmem | tr -d 'M') +# Prefer kernel cmdline mem=NM -- that's the authoritative kernel/MMZ split. +# Fall back to U-Boot osmem env only when the kernel was booted without mem=. +os_mem_size=$(awk 'BEGIN{RS=" "} /^mem=[0-9]+M/{gsub(/^mem=|M.*$/,""); print; exit}' /proc/cmdline) +if [ -z "$os_mem_size" ]; then + os_mem_size=$(fw_printenv -n osmem | tr -d 'M') +fi os_mem_size=${os_mem_size:=32} mmz_start=0