Skip to content

Commit

Permalink
Merge pull request mendersoftware#188 from BoulderAI/dunfell-nano-par…
Browse files Browse the repository at this point in the history
…tition-layout-updates

meta-mender-tegra: dunfell nano development board partition layout fixes
  • Loading branch information
mirzak authored Nov 9, 2020
2 parents e6651a0 + b320108 commit d6a8be8
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,22 @@
binary. </description>
</partition>

<!-- This is padding to ensure VER is at the end of flash -->
<partition name="PAD" id="6" type="data">
<partition name="UBENV" type="data">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 3342336 </size>
<start_location> 0x3B0000 </start_location>
<size> 131072 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
<description> Empty padding. </description>
<description> U-Boot environment area </description>
</partition>

<partition name="VER_b" id="7" type="data">
<partition name="VER_b" type="data">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 65536 </size>
<start_location> 0x3E0000 </start_location>
<size> 32768 </size>
<file_system_attribute> 0 </file_system_attribute>
<partition_attribute> 0 </partition_attribute>
<allocation_attribute> 8 </allocation_attribute>
Expand All @@ -72,10 +73,11 @@
information. </description>
</partition>

<partition name="VER" id="8" type="data">
<partition name="VER" type="data">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 65536 </size>
<start_location> 0x3F0000 </start_location>
<size> 32768 </size>
<file_system_attribute> 0 </file_system_attribute>
<partition_attribute> 0 </partition_attribute>
<allocation_attribute> 8 </allocation_attribute>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From 00d2500c1a78e3b49d70256e5cbea6aedb3ebe83 Mon Sep 17 00:00:00 2001
From: Matt Madison <matt@madison.systems>
Date: Mon, 2 Nov 2020 08:24:14 -0800
Subject: [PATCH] Reduce env size on p3450-0000 to 64KiB

Signed-off-by: Matt Madison <matt@madison.systems>
---
configs/p3450-0000_defconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configs/p3450-0000_defconfig b/configs/p3450-0000_defconfig
index c3200216b9..c6dfbc79d8 100644
--- a/configs/p3450-0000_defconfig
+++ b/configs/p3450-0000_defconfig
@@ -58,9 +58,9 @@ CONFIG_ENV_SECT_SIZE=0x1000
CONFIG_BOOTP_PREFER_SERVERIP=y
CONFIG_POSITION_INDEPENDENT=y
CONFIG_DISABLE_SDMMC1_EARLY=y
-CONFIG_ENV_SIZE=0x20000
+CONFIG_ENV_SIZE=0x10000
CONFIG_ENV_OFFSET=0x3b0000
-CONFIG_ENV_OFFSET_REDUND=0x3d0000
+CONFIG_ENV_OFFSET_REDUND=0x3c0000
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
# CONFIG_ENV_IS_NOWHERE is not set
# CONFIG_ENV_IS_IN_EEPROM is not set
--
2.25.1

Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
MENDER_UBOOT_AUTO_CONFIGURE = "0"
MENDER_UBOOT_CONFIG_SYS_MMC_ENV_PART = "2"

TEGRA_MENDER_BOOTENV_SIZE_DEFAULT = "0x20000"
TEGRA_MENDER_BOOTENV_SIZE_DEFAULT_tegra210 = "${@'0x10000' if (d.getVar('TEGRA_SPIFLASH_BOOT') or '') == '1' else '0x20000'}"
BOOTENV_SIZE ?= "${TEGRA_MENDER_BOOTENV_SIZE_DEFAULT}"

# Calculate this offset by adding up the offsets of each partition preceeding the uboot_env partition in sdmmc_boot and aligning to the next
# 4096 byte boundary, then subtracting 4 MiB (4194304) since the sdmmc_boot represents the combined boot0 and boot1 partitions
# Please note the suggestions in the nvidia thread at https://devtalk.nvidia.com/default/topic/1063652/jetson-tx2/mmcblk0boot1-usage-at-address-4177408-and-u-boot-parameter-storage-space-availability/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/patches:"

SRC_URI_append_mender-uboot = " file://0010-tegra-mender-auto-configured-modified.patch"
SRC_URI_append_mender-uboot = " file://0011-Jetson-TX2-mender-boot-commands.patch"
SRC_URI_append_mender-uboot = " file://0013-Reduce-env-size-on-p3450-0000-to-64KiB.patch"

do_provide_mender_defines_append_tegra210() {
if [ "${TEGRA_SPIFLASH_BOOT}" = "1" ]; then
Expand Down

0 comments on commit d6a8be8

Please sign in to comment.