eMMCFS -- Samsung eMMC chip oriented File System

Here are software that related with Samsung F series TVs.
Please don't create any new topic here unless you have software to post/release.

User avatar
juusso
SamyGO Moderator
Posts: 10125
Joined: Sun Mar 07, 2010 6:20 pm

eMMCFS -- Samsung eMMC chip oriented File System

Post by juusso »

Maybe anyone knows how to mount/open emmcfs filesystem?
sources attached (maybe anyone can port it for desktop?) - done.

Really "helpful" README

Code: Select all

============================================================
eMMCFS -- Samsung eMMC chip oriented File System, Version 1.
============================================================

Contents:
- Overview
- eMMCFS design and specification
- eMMCFS basic features
- eMMCFS driver architecture
- Implementation details
- How to install
- Usage
- Mount options
- Proc file system
- Utilities
- Examples
- Important notes
- Bugs, restrictions, caveats
- Authors

========
OVERVIEW
========

<TODO: describe>

===============================
eMMCFS DESIGN AND SPECIFICATION
===============================

<TODO: describe>

=====================
eMMCFS BASIC FEATURES
=====================

<TODO: describe>

===================
eMMCFS DRIVER ARCHITECTURE
===================

<TODO: describe>

======================
IMPLEMENTATION DETAILS
======================

<TODO: describe>

==============
HOW TO INSTALL
==============

<TODO: describe>

=====
USAGE
=====

<TODO: describe>

=============
MOUNT OPTIONS
=============

<TODO: describe>

===============
PROC FILESYSTEM
===============

<TODO: describe>

=========
UTILITIES
=========

<TODO: describe>

========
EXAMPLES
========

<TODO: describe>

===============
IMPORTANT NOTES
===============

<TODO: describe>

===========================
BUGS, RESTRICTIONS, CAVEATS
===========================

<TODO: describe>

=======
AUTHORS
=======


Development team:
 
:)
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

User avatar
nobody
Posts: 182
Joined: Sat Nov 12, 2011 1:45 am

Re: eMMCFS -- Samsung eMMC chip oriented File System

Post by nobody »

LOL!

arkoPL
Posts: 10
Joined: Sun Apr 28, 2013 2:06 pm

Re: eMMCFS -- Samsung eMMC chip oriented File System

Post by arkoPL »

Hello,
do you have emmcfs_fs.h file?

User avatar
juusso
SamyGO Moderator
Posts: 10125
Joined: Sun Mar 07, 2010 6:20 pm

Re: eMMCFS -- Samsung eMMC chip oriented File System

Post by juusso »

this file exists in f series kernel sources. (include/linux).

btw, module was compiled for e series using T-ECPDEUC kernel sources, but compilation for desktop pc ends with errors...
SpoilerShow

Code: Select all

 make
make -C /usr/src/linux-headers-`uname -r` SUBDIRS=/opt/compile/compile/emmcfs_mod modules;
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-47-generic'
  CC [M]  /opt/compile/compile/emmcfs_mod/btree.o
  CC [M]  /opt/compile/compile/emmcfs_mod/bnode.o
  CC [M]  /opt/compile/compile/emmcfs_mod/cattree.o
  CC [M]  /opt/compile/compile/emmcfs_mod/file.o
  CC [M]  /opt/compile/compile/emmcfs_mod/inode.o
/opt/compile/compile/emmcfs_mod/inode.c: In function ?emmcfs_write_begin?:
/opt/compile/compile/emmcfs_mod/inode.c:1431: error: implicit declaration of function ?BUILD_BUG?
/opt/compile/compile/emmcfs_mod/inode.c: In function ?emmcfs_file_fsync?:
/opt/compile/compile/emmcfs_mod/inode.c:2292: error: implicit declaration of function ?generic_file_fsync?
/opt/compile/compile/emmcfs_mod/inode.c: At top level:
/opt/compile/compile/emmcfs_mod/inode.c:2319: warning: initialization from incompatible pointer type
/opt/compile/compile/emmcfs_mod/inode.c: In function ?emmcfs_new_inode?:
/opt/compile/compile/emmcfs_mod/inode.c:2375: error: implicit declaration of function ?inode_init_owner?
make[2]: *** [/opt/compile/compile/emmcfs_mod/inode.o] Error 1
make[1]: *** [_module_/opt/compile/compile/emmcfs_mod] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-47-generic'
make: *** [default] Error 2
What i did...
SpoilerShow
1. patched out BUILD_BUG function emmcfs_write_begin in inode.c (from row 1416) if kernel does not match (used values from kernel 2.6.35). Like this:

Code: Select all

#else
        //BUILD_BUG();
        *pagep = NULL;
        rc = block_write_begin(file, mapping, pos, len, flags, pagep,
                NULL, emmcfs_get_block);
2. Same did for emmc_setattr function (from row 1653) (used values from kernel 2.6.35 and from kernel 3.0.20 as well, almost same kind errors)

Code: Select all

#else
        //BUILD_BUG();
        generic_setattr(inode, iattr);
Now no BUILD_BUG error, but still no success.
SpoilerShow

Code: Select all

make
make -C /usr/src/linux-headers-`uname -r` SUBDIRS=/opt/compile/compile/emmcfs_mod modules;
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-47-generic'
  CC [M]  /opt/compile/compile/emmcfs_mod/btree.o
  CC [M]  /opt/compile/compile/emmcfs_mod/bnode.o
  CC [M]  /opt/compile/compile/emmcfs_mod/cattree.o
  CC [M]  /opt/compile/compile/emmcfs_mod/file.o
  CC [M]  /opt/compile/compile/emmcfs_mod/inode.o
/opt/compile/compile/emmcfs_mod/inode.c: In function ?emmcfs_setattr?:
/opt/compile/compile/emmcfs_mod/inode.c:1679: error: implicit declaration of function ?generic_setattr?
/opt/compile/compile/emmcfs_mod/inode.c: In function ?emmcfs_file_fsync?:
/opt/compile/compile/emmcfs_mod/inode.c:2297: error: implicit declaration of function ?generic_file_fsync?
/opt/compile/compile/emmcfs_mod/inode.c: At top level:
/opt/compile/compile/emmcfs_mod/inode.c:2324: warning: initialization from incompatible pointer type
/opt/compile/compile/emmcfs_mod/inode.c: In function ?emmcfs_new_inode?:
/opt/compile/compile/emmcfs_mod/inode.c:2380: error: implicit declaration of function ?inode_init_owner?
make[2]: *** [/opt/compile/compile/emmcfs_mod/inode.o] Error 1
make[1]: *** [_module_/opt/compile/compile/emmcfs_mod] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-47-generic'
make: *** [default] Error 2
3. Now patched out all #if statements for kernel version in fs.h, no help either...

Code: Select all

#if LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 35) -> #if LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 32)
4. neither generic_setattr nor generic_file_fsync are not defined in include/linux/fs.h, so edited my desktops include/linux/fs.h and added obove the #CONFIG_MIGRATION:

Code: Select all

extern int generic_file_fsync(struct file *, int);
extern void generic_setattr(struct inode *inode, const struct iattr *attr);
Still errors, but few errors already less:

Code: Select all

make
make -C /usr/src/linux-headers-`uname -r` SUBDIRS=/opt/compile/compile/emmcfs_mod modules;
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-47-generic'
  CC [M]  /opt/compile/compile/emmcfs_mod/btree.o
  CC [M]  /opt/compile/compile/emmcfs_mod/bnode.o
  CC [M]  /opt/compile/compile/emmcfs_mod/cattree.o
  CC [M]  /opt/compile/compile/emmcfs_mod/file.o
  CC [M]  /opt/compile/compile/emmcfs_mod/inode.o
/opt/compile/compile/emmcfs_mod/inode.c:2328: warning: initialization from incompatible pointer type
/opt/compile/compile/emmcfs_mod/inode.c: In function ?emmcfs_new_inode?:
/opt/compile/compile/emmcfs_mod/inode.c:2384: error: implicit declaration of function ?inode_init_owner?
make[2]: *** [/opt/compile/compile/emmcfs_mod/inode.o] Error 1
make[1]: *** [_module_/opt/compile/compile/emmcfs_mod] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-47-generic'
make: *** [default] Error 2
5. Okey, next patch:

Code: Select all

extern void inode_init_owner(struct inode *inode, const struct inode *dir,
                        mode_t mode);
and next error:

Code: Select all

make
make -C /usr/src/linux-headers-`uname -r` SUBDIRS=/opt/compile/compile/emmcfs_mod modules;
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-47-generic'
  CC [M]  /opt/compile/compile/emmcfs_mod/btree.o
  CC [M]  /opt/compile/compile/emmcfs_mod/bnode.o
  CC [M]  /opt/compile/compile/emmcfs_mod/cattree.o
  CC [M]  /opt/compile/compile/emmcfs_mod/file.o
  CC [M]  /opt/compile/compile/emmcfs_mod/inode.o
/opt/compile/compile/emmcfs_mod/inode.c:2328: warning: initialization from incompatible pointer type
  CC [M]  /opt/compile/compile/emmcfs_mod/options.o
  CC [M]  /opt/compile/compile/emmcfs_mod/super.o
/opt/compile/compile/emmcfs_mod/super.c:29:29: error: linux/emmcfs_fs.h: No such file or directory
/opt/compile/compile/emmcfs_mod/super.c:499: error: implicit declaration of function ?BUILD_EMMCFS_BUG?
/opt/compile/compile/emmcfs_mod/super.c:499: error: initializer element is not constant
/opt/compile/compile/emmcfs_mod/super.c:499: error: (near initialization for ?emmcfs_sops.remount_fs?)
/opt/compile/compile/emmcfs_mod/super.c:499: error: expected ?}? before ?;? token
/opt/compile/compile/emmcfs_mod/super.c:1593: error: initializer element is not constant
/opt/compile/compile/emmcfs_mod/super.c:1593: error: (near initialization for ?emmcfs_fs_type.fs_flags?)
/opt/compile/compile/emmcfs_mod/super.c:1593: error: expected ?}? before ?;? token
make[2]: *** [/opt/compile/compile/emmcfs_mod/super.o] Error 1
make[1]: *** [_module_/opt/compile/compile/emmcfs_mod] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-47-generic'
make: *** [default] Error 2
6. corrected includes in super.c to use included emmcfs_fs.h file instead of one from kernel tree. Now new errors:

Code: Select all

make
make -C /usr/src/linux-headers-`uname -r` SUBDIRS=/opt/compile/compile/emmcfs_mod modules;
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-47-generic'
  CC [M]  /opt/compile/compile/emmcfs_mod/btree.o
  CC [M]  /opt/compile/compile/emmcfs_mod/bnode.o
  CC [M]  /opt/compile/compile/emmcfs_mod/cattree.o
  CC [M]  /opt/compile/compile/emmcfs_mod/file.o
  CC [M]  /opt/compile/compile/emmcfs_mod/inode.o
/opt/compile/compile/emmcfs_mod/inode.c:2328: warning: initialization from incompatible pointer type
  CC [M]  /opt/compile/compile/emmcfs_mod/options.o
  CC [M]  /opt/compile/compile/emmcfs_mod/super.o
/opt/compile/compile/emmcfs_mod/super.c:499: error: implicit declaration of function ?BUILD_EMMCFS_BUG?
/opt/compile/compile/emmcfs_mod/super.c:499: error: initializer element is not constant
/opt/compile/compile/emmcfs_mod/super.c:499: error: (near initialization for ?emmcfs_sops.remount_fs?)
/opt/compile/compile/emmcfs_mod/super.c:499: error: expected ?}? before ?;? token
/opt/compile/compile/emmcfs_mod/super.c:1593: error: initializer element is not constant
/opt/compile/compile/emmcfs_mod/super.c:1593: error: (near initialization for ?emmcfs_fs_type.fs_flags?)
/opt/compile/compile/emmcfs_mod/super.c:1593: error: expected ?}? before ?;? token
make[2]: *** [/opt/compile/compile/emmcfs_mod/super.o] Error 1
make[1]: *** [_module_/opt/compile/compile/emmcfs_mod] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-47-generic'
make: *** [default] Error 2
7. Removing all #if statements for kernel version in file super.c. Ending with new issues:

Code: Select all

 make
make -C /usr/src/linux-headers-`uname -r` SUBDIRS=/opt/compile/compile/emmcfs_mod modules;
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-47-generic'
  CC [M]  /opt/compile/compile/emmcfs_mod/btree.o
  CC [M]  /opt/compile/compile/emmcfs_mod/bnode.o
  CC [M]  /opt/compile/compile/emmcfs_mod/cattree.o
  CC [M]  /opt/compile/compile/emmcfs_mod/file.o
  CC [M]  /opt/compile/compile/emmcfs_mod/inode.o
/opt/compile/compile/emmcfs_mod/inode.c:2328: warning: initialization from incompatible pointer type
  CC [M]  /opt/compile/compile/emmcfs_mod/options.o
  CC [M]  /opt/compile/compile/emmcfs_mod/super.o
  CC [M]  /opt/compile/compile/emmcfs_mod/fsm.o
  CC [M]  /opt/compile/compile/emmcfs_mod/fsm_btree.o
  CC [M]  /opt/compile/compile/emmcfs_mod/extents.o
/opt/compile/compile/emmcfs_mod/extents.c:321: error: expected identifier or ?(? before ?if?
/opt/compile/compile/emmcfs_mod/extents.c:323: error: expected identifier or ?(? before ?return?
/opt/compile/compile/emmcfs_mod/extents.c:324: error: expected identifier or ?(? before ?}? token
make[2]: *** [/opt/compile/compile/emmcfs_mod/extents.o] Error 1
make[1]: *** [_module_/opt/compile/compile/emmcfs_mod] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-47-generic'
make: *** [default] Error 2
8. Removing all #if statements for kernel version in file data.c. Still failed...

Code: Select all

 make
make -C /usr/src/linux-headers-`uname -r` SUBDIRS=/opt/compile/compile/emmcfs_mod modules;
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-47-generic'
  CC [M]  /opt/compile/compile/emmcfs_mod/data.o
/opt/compile/compile/emmcfs_mod/data.c: In function ?emmcfs_write_snapshot_pages?:
/opt/compile/compile/emmcfs_mod/data.c:240: error: implicit declaration of function ?IS_ERR_OR_NULL?
make[2]: *** [/opt/compile/compile/emmcfs_mod/data.o] Error 1
make[1]: *** [_module_/opt/compile/compile/emmcfs_mod] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-47-generic'
make: *** [default] Error 2
9. added IS_ERR_OR_NULL to include/linux/err.h

Code: Select all

static inline long __must_check IS_ERR_OR_NULL(const void *ptr)
{
        return !ptr || IS_ERR_VALUE((unsigned long)ptr);
}
...and finaly! :)
SpoilerShow

Code: Select all

make
make -C /usr/src/linux-headers-`uname -r` SUBDIRS=/opt/compile/compile/emmcfs_mod modules;
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-47-generic'
  CC [M]  /opt/compile/compile/emmcfs_mod/btree.o
  CC [M]  /opt/compile/compile/emmcfs_mod/bnode.o
  CC [M]  /opt/compile/compile/emmcfs_mod/cattree.o
  CC [M]  /opt/compile/compile/emmcfs_mod/file.o
  CC [M]  /opt/compile/compile/emmcfs_mod/inode.o
/opt/compile/compile/emmcfs_mod/inode.c:2328: warning: initialization from incompatible pointer type
  CC [M]  /opt/compile/compile/emmcfs_mod/options.o
  CC [M]  /opt/compile/compile/emmcfs_mod/super.o
  CC [M]  /opt/compile/compile/emmcfs_mod/fsm.o
  CC [M]  /opt/compile/compile/emmcfs_mod/fsm_btree.o
  CC [M]  /opt/compile/compile/emmcfs_mod/extents.o
  CC [M]  /opt/compile/compile/emmcfs_mod/snapshot.o
  CC [M]  /opt/compile/compile/emmcfs_mod/orphan.o
  CC [M]  /opt/compile/compile/emmcfs_mod/data.o
  CC [M]  /opt/compile/compile/emmcfs_mod/procfs.o
  LD [M]  /opt/compile/compile/emmcfs_mod/emmcfs.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "generic_setattr" [/opt/compile/compile/emmcfs_mod/emmcfs.ko] undefined!
WARNING: "generic_file_fsync" [/opt/compile/compile/emmcfs_mod/emmcfs.ko] undefined!
WARNING: "inode_init_owner" [/opt/compile/compile/emmcfs_mod/emmcfs.ko] undefined!
  CC      /opt/compile/compile/emmcfs_mod/emmcfs.mod.o
  LD [M]  /opt/compile/compile/emmcfs_mod/emmcfs.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-47-generic'
but insmod is not possible, they find unknown symbols as functions are undefined.

Code: Select all

insmod emmcfs.ko
insmod: error inserting 'emmcfs.ko': -1 Unknown symbol in module
dmesg | tail
[12785.645265] emmcfs: Unknown symbol inode_init_owner
[12785.646036] emmcfs: Unknown symbol generic_file_fsync
[12785.646444] emmcfs: Unknown symbol generic_setattr
Missing functions i got from identic files from E series kernel sources (because of kernel 2.6.35 used, more similar than F series 3.0.20 kernel..)
ideas? :x
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

arkoPL
Posts: 10
Joined: Sun Apr 28, 2013 2:06 pm

Re: eMMCFS -- Samsung eMMC chip oriented File System

Post by arkoPL »

Hello,
I've prepared patch which works with kernel 3.3.x (it should work well with Ubuntu 3.2 LTS kernel)

Here is the patch:
patch_for_kernel_3.3.patch.gz
After compilation load module then:

Code: Select all

losetup /dev/loopX imagefile
mount -t emmcfs /dev/looopX /mountpoint
and everything works fine except umount.
Now umount causes call trace and kernel panic but it is possible to mount files and read them. I will work on it later.

Here are file lists from blocks 14 to 16:
block14.lst.gz
block15.lst.gz
block16.lst.gz
Best regards
You do not have the required permissions to view the files attached to this post.

arkoPL
Posts: 10
Joined: Sun Apr 28, 2013 2:06 pm

Re: eMMCFS -- Samsung eMMC chip oriented File System

Post by arkoPL »

juuso wrote: 4. neither generic_setattr nor generic_file_fsync are not defined in include/linux/fs.h, so edited my desktops include/linux/fs.h and added obove the #CONFIG_MIGRATION:
SpoilerShow

Code: Select all

extern int generic_file_fsync(struct file *, int);
extern void generic_setattr(struct inode *inode, const struct iattr *attr);
Kernel 2.6.32 don't have this fouction you can't declare it without later definition. It causes errors below:

Code: Select all

insmod emmcfs.ko
insmod: error inserting 'emmcfs.ko': -1 Unknown symbol in module
dmesg | tail
[12785.645265] emmcfs: Unknown symbol inode_init_owner
[12785.646036] emmcfs: Unknown symbol generic_file_fsync
[12785.646444] emmcfs: Unknown symbol generic_setattr
Try my patch with Ubuntu LTS 3.2 kernel.

Best regards

User avatar
juusso
SamyGO Moderator
Posts: 10125
Joined: Sun Mar 07, 2010 6:20 pm

Re: eMMCFS -- Samsung eMMC chip oriented File System

Post by juusso »

Thanks for this approach! Will check your patch asap. update: have only linux server, running kernel 3.5, patch ok, but module failed to compile.

But now I went further in other way: i installed linux kernel v2.6.35-13 (as we see there are some instructions for this kernel and this kernel is shipped with E series TVs)and compiled emmcfs.ko module without any changes in source files.
Module compiled ok, loads ok, but mounting failed
SpoilerShow

Code: Select all

[  685.499132] Disabling lock debugging due to kernel taint
[ 4570.968228] v.446
[ 4570.968785] [EMMCFS] version is "v.446-2013_03_04"
[ 4570.968842] [EMMCFS] git branch is "v.446-2013_03_04"
[ 4570.968855] [EMMCFS] git revhash "32be35934bf7802af38dc5d58188c3f564ed01c9"
[ 4570.968876] [EMMCFS] mounting loop0
[ 4570.970530] emmcfs-ERROR:552:emmcfs_verify_sb: SB: bad signature - 0x30207261726e750a, expected - 0x5346434d4d6531
Edit: removed the emmcfs_verify_sb function (returns always 0) in super.c, now mounting gives bad address error. Can be we need to pass correct superblock signature to open/mount the filesystem...?
SpoilerShow

Code: Select all

 mount -o loop ./dumps/mmcblk0p14.dmp ./img -t emmcfs
mount: Bad address
root@iam-desktop:/home/emmcfs# dmesg | tail
[  186.922528] Disabling lock debugging due to kernel taint
[  359.408211] v.446
[  359.408420] [EMMCFS] version is "v.446-2013_03_04"
[  359.408438] [EMMCFS] git branch is "v.446-2013_03_04"
[  359.408449] [EMMCFS] git revhash "32be35934bf7802af38dc5d58188c3f564ed01c9"
[  359.408472] [EMMCFS] mounting loop0
[  359.423426] emmcfs-ERROR:553:emmcfs_verify_sb: SB: bad signature - 0x30207261726e750a, expected - 0x5346434d4d6531
[  359.423467] emmcfs-ERROR:553:emmcfs_verify_sb: SB: bad signature - 0x30207261726e750a, expected - 0x5346434d4d6531
[  359.423606] attempt to access beyond end of device
[  359.423642] loop0: rw=0, want=8, limit=4
Update: same with kernel 3.0.20 (original sources, without patches applied).
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

arkoPL
Posts: 10
Joined: Sun Apr 28, 2013 2:06 pm

Re: eMMCFS -- Samsung eMMC chip oriented File System

Post by arkoPL »

juuso wrote:

Code: Select all

[ 4570.970530] emmcfs-ERROR:552:emmcfs_verify_sb: SB: bad signature - 0x30207261726e750a, expected - 0x5346434d4d6531
That's strange signature 0x5346434d4d6531 is 1eMMCFS header in reversed order from these dumps. I can't find in those files 0x30207261726e750a pattern.
juuso wrote: Edit: removed the emmcfs_verify_sb function (returns always 0) in super.c, now mounting gives bad address error. Can be we need to pass correct superblock signature to open/mount the filesystem...?
SpoilerShow

Code: Select all

 mount -o loop ./dumps/mmcblk0p14.dmp ./img -t emmcfs
mount: Bad address
root@iam-desktop:/home/emmcfs# dmesg | tail
[  186.922528] Disabling lock debugging due to kernel taint
[  359.408211] v.446
[  359.408420] [EMMCFS] version is "v.446-2013_03_04"
[  359.408438] [EMMCFS] git branch is "v.446-2013_03_04"
[  359.408449] [EMMCFS] git revhash "32be35934bf7802af38dc5d58188c3f564ed01c9"
[  359.408472] [EMMCFS] mounting loop0
[  359.423426] emmcfs-ERROR:553:emmcfs_verify_sb: SB: bad signature - 0x30207261726e750a, expected - 0x5346434d4d6531
[  359.423467] emmcfs-ERROR:553:emmcfs_verify_sb: SB: bad signature - 0x30207261726e750a, expected - 0x5346434d4d6531
[  359.423606] attempt to access beyond end of device
[  359.423642] loop0: rw=0, want=8, limit=4
Update: same with kernel 3.0.20 (original sources, without patches applied).
Hmmm, maybe your loop device doesn't work well. It only maps this block device with kmap and compares these first bytes. Try to copy first seven bytes from loop device to file with dd and check if it is ok.

User avatar
juusso
SamyGO Moderator
Posts: 10125
Joined: Sun Mar 07, 2010 6:20 pm

Re: eMMCFS -- Samsung eMMC chip oriented File System

Post by juusso »

damn, stupid me. My all dumps i was testing were damaged during unpacking from archive. :oops:
Checked once again with original module with unpatched sources and kernel 2.6.35 (and with 3.0.20 as well) .
SpoilerShow

Code: Select all

root@iam-desktop:/home/emmcfs# mount -o loop ./dumps/mmcblk0p23.dmp ./img -t emmcfs
root@iam-desktop:/home/emmcfs# dmesg | tail
[ 2645.374810] v.446
[ 2645.374818] [EMMCFS] version is "v.446-2013_03_04"
[ 2645.374821] [EMMCFS] git branch is "v.446-2013_03_04"
[ 2645.374824] [EMMCFS] git revhash "32be35934bf7802af38dc5d58188c3f564ed01c9"
[ 2645.374827] [EMMCFS] mounting loop0
[ 2645.375370] [EMMCFS] mkfs git branch is "v.444-2013_02_06"
[ 2645.375383] [EMMCFS] mkfs git revhash "717c292cca43c50a57c6e6eb5a0e055137e3bea9"
[ 2645.375953] mount 90
[ 2645.375965] [EMMCFS] mounted 90 times
root@iam-desktop:/home/emmcfs# ls ./img
DTV-manual.img  DTV-manual.ver  eManual.ver
root@iam-desktop:/home/emmcfs# 
Mount is ok, umount provides segmentation fault. Anyway, now we have working module. :)

Code: Select all

# mount
<...>
/dev/loop0 on /home/emmcfs/img type emmcfs (rw)

# umount -l /dev/loop0
Segmentation fault
So, in conclusion, without any changes of sources, module is ok with kernels 2.6.35-x and 3.0.20 and may work with other kernels above 2.6.35-xx, but for correct compilation arkoPL`s patch (currently for kernels 3.3.x) is needed.
You do not have the required permissions to view the files attached to this post.
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

arkoPL
Posts: 10
Joined: Sun Apr 28, 2013 2:06 pm

Re: eMMCFS -- Samsung eMMC chip oriented File System

Post by arkoPL »

Umount now works - I forgot to remove one #elif

Here's the patch:
umount.patch.gz
You do not have the required permissions to view the files attached to this post.

Post Reply

Return to “[F] Software”