Skip to content

fs: shell: Fix FS shell using fixed storage_partition name instead of DT #93108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joerchan
Copy link
Collaborator

Fix FS shell using fixed 'storage_partition' nodelabel instead of accessing the DT defined partition from the zephyr,fstab,littlefs node partition property.

Reproduce issue:

west build  -b nucleo_h7a3zi_q samples/subsys/fs/littlefs \
-- \
-DCONFIG_FILE_SYSTEM_SHELL=y \
-DCONFIG_SHELL=y \
-DCONFIG_HEAP_MEM_POOL_SIZE=1024

Compare these two boards partitions:

nucleo_h7a3zi_q.overlay:

/ {
	fstab {
		compatible = "zephyr,fstab";
		lfs1: lfs1 {
			compatible = "zephyr,fstab,littlefs";
			partition = <&lfs1_partition>;
                };
	};
};

&flash0 {
	partitions {
		compatible = "fixed-partitions";
		lfs1_partition: partition@100000 {
			label = "storage";
			reg = <0x100000 DT_SIZE_K(1024)>;
		};
	};
};

nucleo_h743zi.overlay

/ {
	fstab {
		compatible = "zephyr,fstab";
		lfs1: lfs1 {
			compatible = "zephyr,fstab,littlefs";
			partition = <&storage_partition>;
		};
	};
};

&quadspi {
	mx25l25645g: qspi-nor-flash@90000000 {
		compatible = "st,stm32-qspi-nor";
		partitions {
			   compatible = "fixed-partitions";
			   storage_partition: partition@0 {
			       label = "storage";
			       reg = <0 DT_SIZE_M(8)>;
			   };
		};
	};
};

Fix FS shell using fixed 'storage_partition' nodelabel instead of
accessing the DT defined partition from the zephyr,fstab,littlefs
node partition property.

Signed-off-by: Joakim Andersson <[email protected]>
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants