RUNDIR=`pwd`/tmp
mkdir $RUNDIR
+# Check if RUNDIR is mounted, if not, mount as tmpfs
+# because we don't want to hammer the disk.
if [ -z "$(mount | grep $RUNDIR)" ]; then
-sudo mount -t tmpfs -osize=2G none $RUNDIR
+sudo mount -t tmpfs -osize=7G none $RUNDIR
sudo chmod a+wr $RUNDIR
fi
xterm -e "$LAUNCHDIR/manage_nand_test.sh 0 $iterations"&
xterm -e "$LAUNCHDIR/manage_nand_test.sh 1 $iterations"&
xterm -e "$LAUNCHDIR/manage_nand_test.sh 2 $iterations"&
+xterm -e "$LAUNCHDIR/manage_nand_test.sh 3 $iterations"&
while ((dev = yaffs_next_dev()) != NULL) {
result = yaffs_do_background_gc_reldev(dev, urgent);
- if (result > 0)
+
+ /* result is 1 if more than half the free space is
+ * erased.
+ * If less than half the free space is erased then it is
+ * worth doing another background_gc operation sooner.
+ */
+ if (result == 0)
next_urgent = 1;
}
# Files to be made into local symlinks
YCORE_SYMLINKS = \
yaffs_ecc.c \
+ yaffs_cache.c \
yaffs_endian.c \
yaffs_guts.c \
yaffs_packedtags1.c \
yaffs_verify.c \
yaffs_summary.c \
yaffs_tagsmarshall.c\
+ yaffs_cache.h \
yaffs_ecc.h \
yaffs_guts.h \
yaffs_packedtags1.h \
LIB_PIECES = yaffs_ecc \
yaffs_endian \
yaffs_guts \
+ yaffs_cache \
yaffs_packedtags1 \
yaffs_tagscompat \
yaffs_tagsmarshall\
Building test application
-$ cd rtems-y-test/
+$ cd rtems-y-test/basic-test
+$ make
-
-
-Running
-
-$ sparc-rtems5-sis hello_world_c/o-optimize/hello.exe
+$ sparc-rtems5-sis o-optimize/yaffs-rtems-test.exe
SIS - SPARC/RISCV instruction simulator 2.20, copyright Jiri Gaisler 2019
Bug-reports to jiri@gaisler.se
ERC32 emulation enabled
- Loaded hello_world_c/o-optimize/hello.exe, entry 0x02000000
+ Loaded o-optimize/yaffs-rtems-test.exe, entry 0x02000000
sis> go
resuming at 0x02000000
-
-
-*** HELLO WORLD TEST ***
-Hello World 123
-*** END OF HELLO WORLD TEST ***
-
-*** FATAL ***
-fatal source: 5 (RTEMS_FATAL_SOURCE_EXIT)
-fatal code: 0 (0x00000000)
-RTEMS version: 5.0.0.e22554535796fc29a7ed7c5e2338128e324a621d-modified
-RTEMS tools: 7.5.0 20191114 (RTEMS 5, RSB 5 (599c4d7c87fa), Newlib d14714c69)
-executing thread ID: 0x08a010001
-executing thread name: UI1
-cpu 0 in error mode (tt = 0x101)
- 125619 0200c0e0: 91d02000 ta 0x0
-sis>
+Starting
+Created simulated flash device 0x2d203c8
+yaffs: 0 blocks to be sorted...
+....
Running with GDB
result = yaffs_rd_chunk_tags_nand(dev, in->hdr_chunk, buf, &tags);
- if (result == YAFFS_FAIL)
+ if (result == YAFFS_FAIL) {
+ yaffs_release_temp_buffer(dev, buf);
return;
+ }
oh = (struct yaffs_obj_hdr *)buf;
bi->has_shrink_hdr = 1;
}
-
return new_chunk_id;
}
kfree(dev->checkpt_block_list);
dev->checkpt_block_list = NULL;
+ dev->ll_init = 0;
dev->is_mounted = 0;
yaffs_deinit_nand(dev);
BUG();
- if (retval == YAFFS_FAIL)
+ if (retval == YAFFS_FAIL) {
+ if (local_data)
+ yaffs_release_temp_buffer(dev, data);
+
return YAFFS_FAIL;
+ }
if (dev->param.inband_tags) {
if (tags) {