Skip to content
Snippets Groups Projects
Commit 0bb86d82 authored by Remy Bohmer's avatar Remy Bohmer Committed by Scott Wood
Browse files

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: default avatarRemy Bohmer <linux@bohmer.net>
Acked-by: default avatarWilliam Juul <william.juul@tandberg.com>
Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
parent bfd7f386
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include "malloc.h" #include "malloc.h"
#endif #endif
unsigned yaffs_traceMask = 0xFFFFFFFF; unsigned yaffs_traceMask = 0x0; /* Disable logging */
static int yaffs_errno = 0; static int yaffs_errno = 0;
void yaffsfs_SetError(int err) void yaffsfs_SetError(int err)
...@@ -121,6 +121,9 @@ int yaffs_StartUp(void) ...@@ -121,6 +121,9 @@ int yaffs_StartUp(void)
yaffs_Device *flashDev = calloc(1, sizeof(yaffs_Device)); yaffs_Device *flashDev = calloc(1, sizeof(yaffs_Device));
yaffsfs_config[0].dev = flashDev; yaffsfs_config[0].dev = flashDev;
/* store the mtd device for later use */
flashDev->genericDevice = mtd;
// Stuff to configure YAFFS // Stuff to configure YAFFS
// Stuff to initialise anything special (eg lock semaphore). // Stuff to initialise anything special (eg lock semaphore).
yaffsfs_LocalInitialisation(); yaffsfs_LocalInitialisation();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment