Since post 17 (Feb 26), my mtdblock4 device has seemed to be working. Given the other problems though, I thought it would be worthwhile trying to rebuild it, as NickE suggested at the end of post 12.
My approach was to bootsd and then use dd to write fs.img (from kobo-update-1.8.zip)
Code:
# cd /fs
# ls -ltr
-rw-r--r-- 1 1000 1000 876609536 Feb 27 2019 N416mtdblock6.img
-rw-rw-r-- 1 1000 1000 57735744 Mar 17 2019 fs.img
# dd if=fs.img of=/dev/mtdblock4 bs=1024k
55+1 records in
55+1 records out
# reboot
However, after I did that, my situation regressed to where I was at the beginning of this mess.
Here's the end of the boot log, with complaints that the /linuxrc failing to execute:
Code:
yaffs: dev is 32505860 name is "mtdblock4"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.4, "mtdblock4"
yaffs: auto selecting yaffs2
s3c2410-sdi s3c2410-sdi: CMDSTAT: error CMDTIMEOUT
s3c2410-sdi s3c2410-sdi: CMDSTAT: error CMDTIMEOUT
***kay*** :gpio_getpin ret 0 gpio_wprotect 32
s3c2410-sdi s3c2410-sdi: CMDSTAT: error CMDTIMEOUT
s3c2410-sdi s3c2410-sdi: CMDSTAT: error CMDTIMEOUT
s3c2410-sdi s3c2410-sdi: CMDSTAT: error CMDTIMEOUT
s3c2410-sdi s3c2410-sdi: CMDSTAT: error CMDTIMEOUT
mmc0: error requesting CID: -110
mmcblk0: mmc0:1234 SD02G 1992704KiB
mmcblk0: p1
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
VFS: Mounted root (yaffs filesystem).
Freeing init memory: 96K
Warning: unable to open an initial console.
Failed to execute /linuxrc. Attempting defaults...
SBZ: try run /sbin/init
SBZ: try run /etc/init
SBZ: try run /bin/init
SBZ: try run /bin/sh
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
When I bootsd again and mount /dev/mtdblock4, it looks like garbage in the filesystem, with duplicate files (linuxrc) and some junk (D files):
Code:
bootsd
# mount /dev/mtdblock4 /mnt/mtd4/
yaffs: dev is 32505860 name is "mtdblock4"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.4, "mtdblock4"
yaffs: auto selecting yaffs2
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
# ls -l mtd4/
-rw-r--r-- 1 root root 0 Aug 29 05:23 D
-rw-r--r-- 1 root root 0 Aug 29 05:23 D
drwxr-xr-x 1 root root 2048 Aug 28 08:53 bin
drwxr-xr-x 1 root root 2048 Aug 28 08:53 boot
drwxr-xr-x 1 root root 2048 Aug 28 08:54 etc
lrwxrwxrwx 1 root root 11 Aug 28 08:57 linuxrc -> bin/busybox
lrwxrwxrwx 1 root root 11 Aug 28 08:57 linuxrc -> bin/busybox
drw-rw-rw- 1 root root 2048 Aug 29 12:39 lost+found
drwxr-xr-x 1 root root 2048 Aug 28 08:57 mnt
drwxr-xr-x 1 root root 2048 Jan 1 1970 proc
drwxr-xr-x 1 root root 2048 Aug 28 08:55 sbin
drwxr-xr-x 1 root root 2048 Jan 1 1970 tmp
drwxr-xr-x 1 root root 2048 Aug 28 08:55 usr
I tried to delete the files in /mnt/mtd4 so I could copy them again from the sdcard's root folder, but deleting certain files from /mnt/mtd4 causes a reboot:
Code:
# rm -rf mtd4/
Unable to handle kernel NULL pointer dereference at virtual address 00000008
arch_reset: attempting watchdog reset
@@@@@ REBOOT @@@@@ <- this is text I added
U-Boot 1.1.4 (Jun 22 2010 - 14:55:31)
U-Boot code: 33F80000 -> 00000000 BSS: -> 33FAB614
After trying to delete various files/directories, I'm left with the following in mtdblock4:
Code:
# mount /dev/mtdblock4 /mnt/mtd4
yaffs: dev is 32505860 name is "mtdblock4"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.4, "mtdblock4"
yaffs: auto selecting yaffs2
**>> Block 1166 retired
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.
**>> Block 979 retired
**>> Block 1279 retired
# ls -l /mnt/mtd4/
drwxr-xr-x 1 root root 2048 Aug 28 08:54 etc
drw-rw-rw- 1 root root 2048 Aug 29 14:03 lost+found
drwxr-xr-x 1 root root 2048 Aug 28 08:55 sbin
Just "cd"ing to one of these directories results in a reboot. Any ideas on how to reset a yaffs filesystem?