[RFC PATCH 4/4] bootm: mount root device before accessing linux_rootarg

Robert Karszniewicz r.karszniewicz at phytec.de
Tue Jun 30 09:48:34 EDT 2020


---
 common/bootm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/bootm.c b/common/bootm.c
index 1a9ef0673e55..b7c15cac0ba4 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -657,6 +657,8 @@ int bootm_boot(struct bootm_data *bootm_data)
 		char *rootarg;
 
 		if (bootm_data->root_dev) {
+			struct stat s;
+			stat(bootm_data->root_dev, &s); /* mount root device */
 			rootarg = path_get_linux_rootarg(bootm_data->root_dev);
 		} else {
 			rootarg = path_get_linux_rootarg(data->os_file);
-- 
2.7.4




More information about the barebox mailing list