From 9072af6725b37a17c5ed0ee85bf1a36214daf40b Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Tue, 13 Aug 2024 14:53:09 +0200 Subject: [PATCH] samsung: tizen_bpif3: store environment on the first 'boot' partition Get rid of special partition for storing environment and read it from boot (4th) FAT partition from uboot.env file, like on the other Tizen boards. This requires an update of sd_fusing.py to skip creating 'env' partition and make boot partition the 4th one. Signed-off-by: Marek Szyprowski Change-Id: I980a7e061405629a018913281110ff068ac0b0f5 --- board/spacemit/k1-x/k1x.c | 2 ++ configs/tizen_bpif3_defconfig | 3 +-- packaging/u-boot-spacemit.spec | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/board/spacemit/k1-x/k1x.c b/board/spacemit/k1-x/k1x.c index 4e9d697bbb..502ce6b33a 100644 --- a/board/spacemit/k1-x/k1x.c +++ b/board/spacemit/k1-x/k1x.c @@ -877,6 +877,7 @@ void *board_fdt_blob_setup(int *err) return (ulong *)&_end; } +#ifndef CONFIG_TIZEN_K1_X enum env_location env_get_location(enum env_operation op, int prio) { if (prio >= 1) @@ -909,6 +910,7 @@ enum env_location env_get_location(enum env_operation op, int prio) #endif } } +#endif int misc_init_r(void) { diff --git a/configs/tizen_bpif3_defconfig b/configs/tizen_bpif3_defconfig index 2d550691e7..2382442fae 100644 --- a/configs/tizen_bpif3_defconfig +++ b/configs/tizen_bpif3_defconfig @@ -3,7 +3,6 @@ CONFIG_SYS_TEXT_BASE=0x00200000 CONFIG_SYS_MALLOC_LEN=0x1000000 CONFIG_NR_DRAM_BANKS=2 CONFIG_ENV_SIZE=0x4000 -CONFIG_ENV_OFFSET=0x60000 CONFIG_DM_GPIO=y CONFIG_SPL_DM_SPI=y CONFIG_DEFAULT_DEVICE_TREE="k1-x_spl" @@ -117,7 +116,7 @@ CONFIG_ENABLE_SET_NUM_PART_SEARCH=y CONFIG_PARTITION_TYPE_GUID=y CONFIG_MULTI_DTB_FIT=y CONFIG_ENV_IS_IN_FAT=y -CONFIG_ENV_IS_IN_MMC=y +CONFIG_ENV_FAT_DEVICE_AND_PART="0:4" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_SPL_ENV_IS_NOWHERE=y diff --git a/packaging/u-boot-spacemit.spec b/packaging/u-boot-spacemit.spec index b18b06b8da..3b3662455a 100644 --- a/packaging/u-boot-spacemit.spec +++ b/packaging/u-boot-spacemit.spec @@ -68,7 +68,6 @@ mkdir -p %{buildroot}/boot mkdir -p %{buildroot}/var/tmp install -m 755 u-boot.itb %{buildroot}/var/tmp/ install -m 755 FSBL.bin %{buildroot}/var/tmp/ -install -m 755 u-boot-env-default.bin %{buildroot}/var/tmp/ install -m 755 bootinfo_sd.bin %{buildroot}/var/tmp/ install -m 755 boot.scr.uimg %{buildroot}/boot/ install -m 755 uboot.env %{buildroot}/boot/ @@ -80,7 +79,6 @@ install -m 755 uboot.env %{buildroot}/boot/ %defattr(-,root,root,-) /var/tmp/u-boot.itb /var/tmp/FSBL.bin -/var/tmp/u-boot-env-default.bin /var/tmp/bootinfo_sd.bin /boot/uboot.env /boot/boot.scr.uimg -- 2.34.1