[U-Boot] [patch 1/1] Make the YAFFS filesystem work

Recently the YAFFS filesystem support has been added to U-boot. However, just enabling CONFIG_YAFFS2 is not enough to get it working.
ymount will generate an exception (when dereferencing mtd->readoob()), because the genericDevice is a null pointer. Further, a lot of logging is produced while using YAFFS fs, so logging should also be disabled. Both issues are solved by this patch.
With this patch and CONFIG_YAFFS2 enabled, I get a readable filesystem in U-boot, as well as in Linux.
Tested on a Atmel AT91SAM9261EK board.
Signed-off-by: Remy Bohmer linux@bohmer.net --- fs/yaffs2/yaffscfg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Index: u-boot-git/fs/yaffs2/yaffscfg.c =================================================================== --- u-boot-git.orig/fs/yaffs2/yaffscfg.c 2008-08-20 20:40:37.000000000 +0200 +++ u-boot-git/fs/yaffs2/yaffscfg.c 2008-08-20 20:41:42.000000000 +0200 @@ -34,7 +34,7 @@ #include "malloc.h" #endif
-unsigned yaffs_traceMask = 0xFFFFFFFF; +unsigned yaffs_traceMask = 0x0; /* Disable logging */ static int yaffs_errno = 0;
void yaffsfs_SetError(int err) @@ -121,6 +121,9 @@ int yaffs_StartUp(void) yaffs_Device *flashDev = calloc(1, sizeof(yaffs_Device)); yaffsfs_config[0].dev = flashDev;
+ /* store the mtd device for later use */ + flashDev->genericDevice = mtd; + // Stuff to configure YAFFS // Stuff to initialise anything special (eg lock semaphore). yaffsfs_LocalInitialisation();

Remy Bohmer wrote:
With this patch and CONFIG_YAFFS2 enabled, I get a readable filesystem in U-boot, as well as in Linux.
Tested on a Atmel AT91SAM9261EK board.
Signed-off-by: Remy Bohmer linux@bohmer.net
Acked-by: William Juul william.juul@tandberg.com

Hello Wolfgang,
With this patch and CONFIG_YAFFS2 enabled, I get a readable filesystem in U-boot, as well as in Linux. Tested on a Atmel AT91SAM9261EK board.
Signed-off-by: Remy Bohmer linux@bohmer.net
Acked-by: William Juul william.juul@tandberg.com
Can you please apply this patch?
Kind Regards,
Remy

On Thu, Aug 21, 2008 at 07:40:07AM +0200, William Juul wrote:
Remy Bohmer wrote:
With this patch and CONFIG_YAFFS2 enabled, I get a readable filesystem in U-boot, as well as in Linux.
Tested on a Atmel AT91SAM9261EK board.
Signed-off-by: Remy Bohmer linux@bohmer.net
Acked-by: William Juul william.juul@tandberg.com
Applied to u-boot-nand-flash.
-Scott
participants (3)
-
Remy Bohmer
-
Scott Wood
-
William Juul