From 7cbd28f64b157eda76b1504f6f665019f526b2c9 Mon Sep 17 00:00:00 2001
From: Troy Kisky <troy.kisky@boundarydevices.com>
Date: Wed, 12 Dec 2018 11:23:27 -0800
Subject: [PATCH] boundary: bootscripts: add check for imx_cpu==8MM

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
---
 board/boundary/bootscripts/bootscript-mainline.txt | 4 +++-
 board/boundary/bootscripts/bootscript-ubuntu.txt   | 4 +++-
 board/boundary/bootscripts/bootscript-yocto.txt    | 4 +++-
 board/boundary/bootscripts/net_upgrade_fs.txt      | 2 ++
 board/boundary/bootscripts/net_upgradeu.txt        | 2 +-
 board/boundary/bootscripts/net_upgradeu_fs.txt     | 2 ++
 board/boundary/bootscripts/upgrade.txt             | 2 +-
 7 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/board/boundary/bootscripts/bootscript-mainline.txt b/board/boundary/bootscripts/bootscript-mainline.txt
index 06445c00651..384ae1324ff 100644
--- a/board/boundary/bootscripts/bootscript-mainline.txt
+++ b/board/boundary/bootscripts/bootscript-mainline.txt
@@ -10,7 +10,7 @@ elif itest.s x53 == "x${imx_cpu}"; then
 	a_base=0x70000000
 elif itest.s x6SX == "x${imx_cpu}" || itest.s x7D == "x${imx_cpu}"; then
 	a_base=0x80000000
-elif itest.s x8MQ == "x${imx_cpu}"; then
+elif itest.s x8MQ == "x${imx_cpu}" || itest.s x8MM == "x${imx_cpu}"; then
 	a_base=0x40000000
 	kernelimage=Image
 	bootcommand=booti
@@ -42,6 +42,8 @@ if itest.s "x" == "x${fdt_file}" ; then
 		fdt_file=imx7d-${board}.dtb;
 	elif itest.s x8MQ == "x${imx_cpu}" ; then
 		fdt_file=imx8mq-${board}.dtb;
+	elif itest.s x8MM == "x${imx_cpu}" ; then
+		fdt_file=imx8mm-${board}.dtb;
 	elif itest.s x51 == "x${imx_cpu}" ; then
 		fdt_file=imx51-${board}.dtb;
 	elif itest.s x53 == "x${imx_cpu}" ; then
diff --git a/board/boundary/bootscripts/bootscript-ubuntu.txt b/board/boundary/bootscripts/bootscript-ubuntu.txt
index c501a0a0a03..7139c7176a3 100644
--- a/board/boundary/bootscripts/bootscript-ubuntu.txt
+++ b/board/boundary/bootscripts/bootscript-ubuntu.txt
@@ -11,7 +11,7 @@ elif itest.s x53 == "x${imx_cpu}"; then
 	a_base=0x70000000
 elif itest.s x6SX == "x${imx_cpu}" || itest.s x7D == "x${imx_cpu}"; then
 	a_base=0x80000000
-elif itest.s x8MQ == "x${imx_cpu}"; then
+elif itest.s x8MQ == "x${imx_cpu}" || itest.s x8MM == "x${imx_cpu}"; then
 	a_base=0x40000000
 	kernelimage=Image
 	bootcommand=booti
@@ -47,6 +47,8 @@ if itest.s "x" == "x${fdt_file}" ; then
 		fdt_file=imx7d-${board}${m4}.dtb;
 	elif itest.s x8MQ == "x${imx_cpu}" ; then
 		fdt_file=imx8mq-${board}${m4}.dtb;
+	elif itest.s x8MM == "x${imx_cpu}" ; then
+		fdt_file=imx8mm-${board}${m4}.dtb;
 	elif itest.s x51 == "x${imx_cpu}" ; then
 		fdt_file=imx51-${board}${m4}.dtb;
 	elif itest.s x53 == "x${imx_cpu}" ; then
diff --git a/board/boundary/bootscripts/bootscript-yocto.txt b/board/boundary/bootscripts/bootscript-yocto.txt
index a076628ae2d..c6d64d3bb24 100644
--- a/board/boundary/bootscripts/bootscript-yocto.txt
+++ b/board/boundary/bootscripts/bootscript-yocto.txt
@@ -11,7 +11,7 @@ elif itest.s x53 == "x${imx_cpu}"; then
 	a_base=0x70000000
 elif itest.s x6SX == "x${imx_cpu}" || itest.s x7D == "x${imx_cpu}"; then
 	a_base=0x80000000
-elif itest.s x8MQ == "x${imx_cpu}"; then
+elif itest.s x8MQ == "x${imx_cpu}" || itest.s x8MM == "x${imx_cpu}"; then
 	a_base=0x40000000
 	kernelimage=Image
 	bootcommand=booti
@@ -47,6 +47,8 @@ if itest.s "x" == "x${fdt_file}" ; then
 		fdt_file=imx7d-${board}${m4}.dtb;
 	elif itest.s x8MQ == "x${imx_cpu}" ; then
 		fdt_file=imx8mq-${board}${m4}.dtb;
+	elif itest.s x8MM == "x${imx_cpu}" ; then
+		fdt_file=imx8mm-${board}${m4}.dtb;
 	elif itest.s x51 == "x${imx_cpu}" ; then
 		fdt_file=imx51-${board}${m4}.dtb;
 	elif itest.s x53 == "x${imx_cpu}" ; then
diff --git a/board/boundary/bootscripts/net_upgrade_fs.txt b/board/boundary/bootscripts/net_upgrade_fs.txt
index 59a74b99f6b..a28875f83bf 100644
--- a/board/boundary/bootscripts/net_upgrade_fs.txt
+++ b/board/boundary/bootscripts/net_upgrade_fs.txt
@@ -12,6 +12,8 @@ elif itest.s x53 == "x${imx_cpu}"; then
 	a_base=0x70200000
 elif itest.s x6SX == "x${imx_cpu}" || itest.s x7D == "x${imx_cpu}"; then
 	a_base=0x80200000
+elif itest.s x8MQ == "x${imx_cpu}" || itest.s x8MM == "x${imx_cpu}"; then
+	a_base=0x40200000
 fi
 
 if itest.s x != "x${upgrade_file}" ; then
diff --git a/board/boundary/bootscripts/net_upgradeu.txt b/board/boundary/bootscripts/net_upgradeu.txt
index b9fc2e947c0..6b16fb63733 100644
--- a/board/boundary/bootscripts/net_upgradeu.txt
+++ b/board/boundary/bootscripts/net_upgradeu.txt
@@ -23,7 +23,7 @@ elif itest.s x53 == "x${imx_cpu}"; then
 	a_base=0x70100000
 elif itest.s x6SX == "x${imx_cpu}" || itest.s x7D == "x${imx_cpu}"; then
 	a_base=0x80100000
-elif itest.s x8MQ == "x${imx_cpu}"; then
+elif itest.s x8MQ == "x${imx_cpu}" || itest.s x8MM == "x${imx_cpu}"; then
 	a_base=0x42000000
 	offset=0x8400
 fi
diff --git a/board/boundary/bootscripts/net_upgradeu_fs.txt b/board/boundary/bootscripts/net_upgradeu_fs.txt
index 57bbc4297d7..7d15d5819ea 100644
--- a/board/boundary/bootscripts/net_upgradeu_fs.txt
+++ b/board/boundary/bootscripts/net_upgradeu_fs.txt
@@ -7,6 +7,8 @@ setenv a_script
 a_script=0x1000c000
 if itest.s x6SX == "x${imx_cpu}" || itest.s x7D == "x${imx_cpu}"; then
 	a_script=0x8000c000
+elif itest.s x8MQ == "x${imx_cpu}" || itest.s x8MM == "x${imx_cpu}"; then
+	a_script=0x4000c000
 fi
 # uncomment below to force upgrade to eMMC,
 # regardless of where script was sourced.
diff --git a/board/boundary/bootscripts/upgrade.txt b/board/boundary/bootscripts/upgrade.txt
index 431648204a0..1df452b989b 100644
--- a/board/boundary/bootscripts/upgrade.txt
+++ b/board/boundary/bootscripts/upgrade.txt
@@ -15,7 +15,7 @@ elif itest.s x53 == "x${imx_cpu}"; then
 	a_base=0x72000000
 elif itest.s x6SX == "x${imx_cpu}" || itest.s x7D == "x${imx_cpu}"; then
 	a_base=0x82000000
-elif itest.s x8MQ == "x${imx_cpu}"; then
+elif itest.s x8MQ == "x${imx_cpu}" || itest.s x8MM == "x${imx_cpu}"; then
 	a_base=0x42000000
 	offset=0x8400
 fi
-- 
GitLab