Skip to content

Commit

Permalink
Merge pull request #381 from chrisdimich/kirkstone
Browse files Browse the repository at this point in the history
u-boot-boundary: add Nitrogen8M Mini SMARC and Nitrogen8M Plus SMARC support and fix bootscript
  • Loading branch information
TheYoctoJester authored Jun 12, 2024
2 parents 4dce733 + 25d6194 commit 03bfae0
Show file tree
Hide file tree
Showing 4 changed files with 233 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
From e5f0cc6d04110043e1a6fc4f35f11a36396914e3 Mon Sep 17 00:00:00 2001
From: Chris Dimich <chris.dimich@boundarydevices.com>
Date: Tue, 4 Jun 2024 15:09:41 -0700
Subject: [PATCH 1/2] imx8mp_nitrogen_smarc*: add Mender support

Signed-off-by: Chris Dimich <chris.dimich@boundarydevices.com>
---
configs/imx8mp_nitrogen_smarc_2gr0_defconfig | 6 +++++-
configs/imx8mp_nitrogen_smarc_4g_defconfig | 6 +++++-
configs/imx8mp_nitrogen_smarc_8g_defconfig | 6 +++++-
3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/configs/imx8mp_nitrogen_smarc_2gr0_defconfig b/configs/imx8mp_nitrogen_smarc_2gr0_defconfig
index 4d4d6e7b661..a51abfe05bb 100644
--- a/configs/imx8mp_nitrogen_smarc_2gr0_defconfig
+++ b/configs/imx8mp_nitrogen_smarc_2gr0_defconfig
@@ -10,7 +10,7 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_NR_DRAM_BANKS=3
CONFIG_ENV_SIZE=0x2000
-CONFIG_ENV_OFFSET=0xffffe000
+CONFIG_ENV_OFFSET=0x3fe000
CONFIG_IMX_CONFIG="arch/arm/mach-imx/imx8m/imximage-8mp-lpddr4.cfg"
# CONFIG_SPLASH_SCREEN_PREPARE is not set
CONFIG_DDR_RANK_BITS=0
@@ -91,6 +91,8 @@ CONFIG_SYS_MMC_ENV_DEV=0
CONFIG_SYS_MMC_ENV_PART=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ENV=y
CONFIG_SPL_DM=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
@@ -198,6 +200,8 @@ CONFIG_SPLASH_SCREEN_ALIGN=y
CONFIG_VIDEO_BMP_GZIP=y
CONFIG_IMX_WATCHDOG=y
CONFIG_LIBAVB=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_ENV_OFFSET_REDUND=0x3fc000
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_MCP230XX_GPIO=y
CONFIG_DM_I2C_GPIO=y
diff --git a/configs/imx8mp_nitrogen_smarc_4g_defconfig b/configs/imx8mp_nitrogen_smarc_4g_defconfig
index 5a299cff161..6ee500a9eb0 100644
--- a/configs/imx8mp_nitrogen_smarc_4g_defconfig
+++ b/configs/imx8mp_nitrogen_smarc_4g_defconfig
@@ -10,7 +10,7 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_NR_DRAM_BANKS=3
CONFIG_ENV_SIZE=0x2000
-CONFIG_ENV_OFFSET=0xffffe000
+CONFIG_ENV_OFFSET=0x3fe000
CONFIG_IMX_CONFIG="arch/arm/mach-imx/imx8m/imximage-8mp-lpddr4.cfg"
# CONFIG_SPLASH_SCREEN_PREPARE is not set
CONFIG_DDR_MB=4096
@@ -90,6 +90,8 @@ CONFIG_SYS_MMC_ENV_DEV=0
CONFIG_SYS_MMC_ENV_PART=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ENV=y
CONFIG_SPL_DM=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
@@ -197,6 +199,8 @@ CONFIG_SPLASH_SCREEN_ALIGN=y
CONFIG_VIDEO_BMP_GZIP=y
CONFIG_IMX_WATCHDOG=y
CONFIG_LIBAVB=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_ENV_OFFSET_REDUND=0x3fc000
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_MCP230XX_GPIO=y
CONFIG_DM_I2C_GPIO=y
diff --git a/configs/imx8mp_nitrogen_smarc_8g_defconfig b/configs/imx8mp_nitrogen_smarc_8g_defconfig
index a6e195a8db1..6d79c1cfcf2 100644
--- a/configs/imx8mp_nitrogen_smarc_8g_defconfig
+++ b/configs/imx8mp_nitrogen_smarc_8g_defconfig
@@ -10,7 +10,7 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_NR_DRAM_BANKS=3
CONFIG_ENV_SIZE=0x2000
-CONFIG_ENV_OFFSET=0xffffe000
+CONFIG_ENV_OFFSET=0x3fe000
CONFIG_IMX_CONFIG="arch/arm/mach-imx/imx8m/imximage-8mp-lpddr4.cfg"
# CONFIG_SPLASH_SCREEN_PREPARE is not set
CONFIG_DDR_MB=8192
@@ -90,6 +90,8 @@ CONFIG_SYS_MMC_ENV_DEV=0
CONFIG_SYS_MMC_ENV_PART=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ENV=y
CONFIG_SPL_DM=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
@@ -197,6 +199,8 @@ CONFIG_SPLASH_SCREEN_ALIGN=y
CONFIG_VIDEO_BMP_GZIP=y
CONFIG_IMX_WATCHDOG=y
CONFIG_LIBAVB=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_ENV_OFFSET_REDUND=0x3fc000
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_MCP230XX_GPIO=y
CONFIG_DM_I2C_GPIO=y
--
2.43.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
From 914fb9162f3f59c86dcbe2e291cd4a3568f98c57 Mon Sep 17 00:00:00 2001
From: Chris Dimich <chris.dimich@boundarydevices.com>
Date: Tue, 4 Jun 2024 15:10:23 -0700
Subject: [PATCH 2/2] imx8mm_nitrogen_smarc*: add Mender support

Signed-off-by: Chris Dimich <chris.dimich@boundarydevices.com>
---
configs/imx8mm_nitrogen_smarc_1gch1r0_defconfig | 6 +++++-
configs/imx8mm_nitrogen_smarc_2gr0_defconfig | 6 +++++-
configs/imx8mm_nitrogen_smarc_4g_defconfig | 6 +++++-
3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/configs/imx8mm_nitrogen_smarc_1gch1r0_defconfig b/configs/imx8mm_nitrogen_smarc_1gch1r0_defconfig
index e7cf30e7c6b..c5aded64a8a 100644
--- a/configs/imx8mm_nitrogen_smarc_1gch1r0_defconfig
+++ b/configs/imx8mm_nitrogen_smarc_1gch1r0_defconfig
@@ -12,7 +12,7 @@ CONFIG_NR_DRAM_BANKS=2
CONFIG_SYS_MEMTEST_START=0x40000000
CONFIG_SYS_MEMTEST_END=0x40010000
CONFIG_ENV_SIZE=0x2000
-CONFIG_ENV_OFFSET=0xffffe000
+CONFIG_ENV_OFFSET=0x3fe000
CONFIG_IMX_CONFIG="arch/arm/mach-imx/imx8m/imximage.cfg"
# CONFIG_SPLASH_SCREEN_PREPARE is not set
CONFIG_DDR_CHANNEL_CNT=1
@@ -97,6 +97,8 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SYS_MMC_ENV_PART=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ENV=y
CONFIG_NETCONSOLE=y
CONFIG_SPL_DM=y
CONFIG_REGMAP=y
@@ -182,3 +184,5 @@ CONFIG_SPLASH_SCREEN_ALIGN=y
CONFIG_VIDEO_BMP_GZIP=y
CONFIG_IMX_WATCHDOG=y
CONFIG_LIBAVB=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_ENV_OFFSET_REDUND=0x3fc000
diff --git a/configs/imx8mm_nitrogen_smarc_2gr0_defconfig b/configs/imx8mm_nitrogen_smarc_2gr0_defconfig
index 1405dfb4eda..7e10416a2b9 100644
--- a/configs/imx8mm_nitrogen_smarc_2gr0_defconfig
+++ b/configs/imx8mm_nitrogen_smarc_2gr0_defconfig
@@ -12,7 +12,7 @@ CONFIG_NR_DRAM_BANKS=2
CONFIG_SYS_MEMTEST_START=0x40000000
CONFIG_SYS_MEMTEST_END=0x40010000
CONFIG_ENV_SIZE=0x2000
-CONFIG_ENV_OFFSET=0xffffe000
+CONFIG_ENV_OFFSET=0x3fe000
CONFIG_IMX_CONFIG="arch/arm/mach-imx/imx8m/imximage.cfg"
# CONFIG_SPLASH_SCREEN_PREPARE is not set
CONFIG_DDR_RANK_BITS=0
@@ -96,6 +96,8 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SYS_MMC_ENV_PART=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ENV=y
CONFIG_NETCONSOLE=y
CONFIG_SPL_DM=y
CONFIG_REGMAP=y
@@ -181,3 +183,5 @@ CONFIG_SPLASH_SCREEN_ALIGN=y
CONFIG_VIDEO_BMP_GZIP=y
CONFIG_IMX_WATCHDOG=y
CONFIG_LIBAVB=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_ENV_OFFSET_REDUND=0x3fc000
diff --git a/configs/imx8mm_nitrogen_smarc_4g_defconfig b/configs/imx8mm_nitrogen_smarc_4g_defconfig
index e29d2cc8aa1..b0ef33cec5f 100644
--- a/configs/imx8mm_nitrogen_smarc_4g_defconfig
+++ b/configs/imx8mm_nitrogen_smarc_4g_defconfig
@@ -12,7 +12,7 @@ CONFIG_NR_DRAM_BANKS=2
CONFIG_SYS_MEMTEST_START=0x40000000
CONFIG_SYS_MEMTEST_END=0x40010000
CONFIG_ENV_SIZE=0x2000
-CONFIG_ENV_OFFSET=0xffffe000
+CONFIG_ENV_OFFSET=0x3fe000
CONFIG_IMX_CONFIG="arch/arm/mach-imx/imx8m/imximage.cfg"
# CONFIG_SPLASH_SCREEN_PREPARE is not set
CONFIG_DDR_MB=4096
@@ -95,6 +95,8 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SYS_MMC_ENV_PART=1
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ENV=y
CONFIG_NETCONSOLE=y
CONFIG_SPL_DM=y
CONFIG_REGMAP=y
@@ -180,3 +182,5 @@ CONFIG_SPLASH_SCREEN_ALIGN=y
CONFIG_VIDEO_BMP_GZIP=y
CONFIG_IMX_WATCHDOG=y
CONFIG_LIBAVB=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_ENV_OFFSET_REDUND=0x3fc000
--
2.43.0

2 changes: 2 additions & 0 deletions meta-mender-nxp/recipes-bsp/u-boot/u-boot-boundary_%.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ SRC_URI += "\
file://0002-nitrogen8mm-add-Mender-support.patch \
file://0003-nitrogen8m-add-Mender-support.patch \
file://0004-nitrogen8mn-add-Mender-support.patch \
file://0001-imx8mp_nitrogen_smarc-add-Mender-support.patch \
file://0002-imx8mm_nitrogen_smarc-add-Mender-support.patch \
"
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
From 682a6b3c20d27b3d45e36397b79a0d0c4470bc08 Mon Sep 17 00:00:00 2001
From 7d8fba0ce0b87b0edc656210cc15ee296aa8e83f Mon Sep 17 00:00:00 2001
From: Chris Dimich <chris.dimich@boundarydevices.com>
Date: Tue, 1 Nov 2022 11:22:10 -0700
Date: Wed, 5 Jun 2024 10:32:33 -0700
Subject: [PATCH 1/1] boundary: bootscripts: bootscript-yocto: add Mender
support

Signed-off-by: Chris Dimich <chris.dimich@boundarydevices.com>
---
.../boundary/bootscripts/bootscript-yocto.txt | 20 +++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
.../boundary/bootscripts/bootscript-yocto.txt | 28 +++++++++----------
1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/board/boundary/bootscripts/bootscript-yocto.txt b/board/boundary/bootscripts/bootscript-yocto.txt
index dab773f3d2..8eefa871ff 100644
index ef24da9957d..be9f8069cff 100644
--- a/board/boundary/bootscripts/bootscript-yocto.txt
+++ b/board/boundary/bootscripts/bootscript-yocto.txt
@@ -93,13 +93,19 @@ if itest.s x${consoleblank} == x ; then
@@ -120,13 +120,20 @@ if itest.s x${consoleblank} == x ; then
fi
setenv bootargs ${bootargs} vmalloc=${vmalloc} consoleblank=${consoleblank} rootwait fixrtc cpu=${imx_cpu} board=${board} uboot_release=${uboot_release}
setenv bootargs ${bootargs} consoleblank=${consoleblank} rootwait fixrtc

-if load ${devtype} ${devnum}:${distro_bootpart} ${a_fdt} ${prefix}${fdt_file} ; then
- fdt addr ${a_fdt}
Expand All @@ -34,10 +34,25 @@ index dab773f3d2..8eefa871ff 100644
+load ${mender_uboot_root} ${a_zImage} /boot/Image
+load ${mender_uboot_root} ${a_fdt} /boot/${fdt_file}
+fdt addr ${a_fdt}
+
fdt resize 4096
if itest.s "x" != "x${cmd_board}" ; then
run cmd_board
@@ -183,7 +189,5 @@ if itest.s "x" != "x${show_env}" ; then
@@ -160,13 +167,6 @@ fi
if itest.s "x" == "x${bpart}" ; then
bpart=2
fi
-if test "sata" = "${devtype}" ; then
- setenv bootargs "${bootargs} root=/dev/sda${bpart}" ;
-elif test "usb" = "${devtype}" ; then
- setenv bootargs "${bootargs} root=/dev/sda${bpart}" ;
-else
- setenv bootargs "${bootargs} root=/dev/mmcblk${devnum}p${bpart}"
-fi

if itest.s "x" != "x${disable_msi}" ; then
setenv bootargs ${bootargs} pci=nomsi
@@ -210,7 +210,5 @@ if itest.s "x" != "x${show_env}" ; then
printenv
fi

Expand All @@ -48,5 +63,5 @@ index dab773f3d2..8eefa871ff 100644
+booti ${a_zImage} - ${a_fdt}
+run mender_try_to_recover
--
2.34.1
2.43.0

0 comments on commit 03bfae0

Please sign in to comment.