[Android] diego-ch:
Hey guys,

I'm trying to port TWRP to my phone Samsung Galaxy S Advance, GT-I9070.

To do that I switched the stock recovery files inside the Initramfs with TWRP files and compiled the kernel using samsung's source.

So, now twrp is booting and working fine, but I have an issue with the J4FS driver.

the module loads but the j4fs partition is not mounting.

here's the error I noticed in dmesg

<4>[ 14.585052] j4fs: module license 'unspecified' taints kernel.
<4>[ 14.585144] Disabling lock debugging due to kernel taint
<4>[ 14.597229] FlashDevMount : filp_open() OK....!
<3>[ 14.597991] init: SEC_DEVENC ***[/dev/block/mmcblk0p1][0]

<4>[ 14.620117] fsd_reclaim 1291: MST is not recognized(mst.magic=0x00000000)
<4>[ 14.620178] fsd_reclaim 1292: MST is not recognized

<4>[ 14.629272] [<c07b484c>] (unwind_backtrace+0x0/0xf0) from [<c0c9d51c>] (dump_stack+0x10/0x24)
<4>[ 14.629425] [<c0c9d51c>] (dump_stack+0x10/0x24) from [<bf003ac8>] (fsd_reclaim+0x3bc/0xe40 [j4fs])
<4>[ 14.629608] [<bf003ac8>] (fsd_reclaim+0x3bc/0xe40 [j4fs]) from [<bf0017bc>] (j4fs_fill_super+0x2e0/0x364 [j4fs])
<4>[ 14.629730] [<bf0017bc>] (j4fs_fill_super+0x2e0/0x364 [j4fs]) from [<c08916c8>] (get_sb_bdev+0x110/0x16c)
<4>[ 14.629852] [<c08916c8>] (get_sb_bdev+0x110/0x16c) from [<bf0002f8>] (j4fs_get_sb+0x58/0x6c [j4fs])
<4>[ 14.629974] [<bf0002f8>] (j4fs_get_sb+0x58/0x6c [j4fs]) from [<c08904a0>] (vfs_kern_mount+0x58/0x108)
<4>[ 14.630065] [<c08904a0>] (vfs_kern_mount+0x58/0x108) from [<c0890594>] (do_kern_mount+0x34/0xd8)
<4>[ 14.630187] [<c0890594>] (do_kern_mount+0x34/0xd8) from [<c08a7b94>] (do_mount+0x7a4/0x848)
<4>[ 14.630279] [<c08a7b94>] (do_mount+0x7a4/0x848) from [<c08a7cbc>] (sys_mount+0x84/0xc4)
<4>[ 14.630371] [<c08a7cbc>] (sys_mount+0x84/0xc4) from [<c07ad740>] (ret_fast_syscall+0x0/0x30)

<4>[ 14.630554] fsd_reclaim 1607: Error(nErr=0x00000000)
<4>[ 14.630615] fsd_reclaim 1612: j4fs_rw_start is set to default value(128KB)
<4>[ 14.630737] j4fs_fill_super 1311: Error(nErr=0x40000000)

<6>[ 14.641357] param_init
<3>[ 14.641448] lfs_param_op: filp_open failed. (-2)
<3>[ 14.641510] param_init(358): Loading parameters failed. Parameters have been initialized as default.

and the compilation warnings

LD drivers/samsung/built-in.o
LD drivers/samsung/j4fs/built-in.o
CC [M] drivers/samsung/j4fs/j4fs_kernel.o
drivers/samsung/j4fs/j4fs_kernel.c: In function 'j4fs_write_begin':
drivers/samsung/j4fs/j4fs_kernel.c:237: warning: format '%d' expects type 'int', but argument 4 has type 'loff_t'
drivers/samsung/j4fs/j4fs_kernel.c:237: warning: format '%d' expects type 'int', but argument 5 has type 'long unsigned int'
drivers/samsung/j4fs/j4fs_kernel.c: In function 'j4fs_fill_super':
drivers/samsung/j4fs/j4fs_kernel.c:1224: warning: unused variable 'len'
drivers/samsung/j4fs/j4fs_kernel.c:1224: warning: unused variable 'tmp'
drivers/samsung/j4fs/j4fs_kernel.c: At top level:
drivers/samsung/j4fs/j4fs_kernel.c:1499: warning: initialization from incompatible pointer type
drivers/samsung/j4fs/j4fs_kernel.c: In function 'j4fs_readdir':
drivers/samsung/j4fs/j4fs_kernel.c:806: warning: the frame size of 1040 bytes is larger than 1024 bytes; see http://go/big_stack_frame
CC [M] drivers/samsung/j4fs/llid_kernel.o
drivers/samsung/j4fs/llid_kernel.c: In function 'FlashDevRead':
drivers/samsung/j4fs/llid_kernel.c:98: warning: passing argument 1 of 'printk' makes pointer from integer without a cast
include/linux/kernel.h:346: note: expected 'const char *' but argument is of type 'int'
drivers/samsung/j4fs/llid_kernel.c:65: warning: unused variable 'part_id'
drivers/samsung/j4fs/llid_kernel.c:63: warning: unused variable 'nVol'
drivers/samsung/j4fs/llid_kernel.c: In function 'FlashDevWrite':
drivers/samsung/j4fs/llid_kernel.c:156: warning: passing argument 1 of 'printk' makes pointer from integer without a cast
include/linux/kernel.h:346: note: expected 'const char *' but argument is of type 'int'
drivers/samsung/j4fs/llid_kernel.c:123: warning: unused variable 'part_id'
drivers/samsung/j4fs/llid_kernel.c:121: warning: unused variable 'nVol'
CC [M] drivers/samsung/j4fs/fsd_common.o
drivers/samsung/j4fs/fsd_common.c: In function 'fsd_write':
drivers/samsung/j4fs/fsd_common.c:300: warning: ISO C90 forbids mixed declarations and code
drivers/samsung/j4fs/fsd_common.c: In function 'fsd_reclaim':
drivers/samsung/j4fs/fsd_common.c:1270: warning: ISO C90 forbids mixed declarations and code
LD [M] drivers/samsung/j4fs/j4fs.o
LD drivers/samsung/param/built-in.o
CC [M] drivers/samsung/param/param.o
drivers/samsung/param/param.c:58: warning: 'param_check' defined but not used
drivers/samsung/param/param.c: In function 'param_show_info':
drivers/samsung/param/param.c:234: warning: the frame size of 1032 bytes is larger than 1024 bytes; see http://go/big_stack_frame

how can I fix this error?

my kernel sources are here: http://github.com/diego-ch/android_kernel_samsung_janice