rfs porting

Here for general support for B series TVs, request and problem solve area.

arris69
Official SamyGO Developer
Posts: 1700
Joined: Fri Oct 02, 2009 8:52 am
Location: Austria/Vienna (no Kangaroos here)
Contact:

rfs porting

Post by arris69 »

hi

somebody with toolchain for armv6 and good knowledge of linux kernel vfs?

found in samsung sources a kernel 2.6.24 where leonid support is included. compiled the kernel for my ue..b7020
fsr fsr_stl and tbml driver seems ok, but rfs crash on mount so i just can mount the partitions as fat.
so it's not a problem maybe squashfs works too (was too stupid and didn't tested it, as i had access to tv)
but it would be fine to have a working rfs module.
the rfs sources are from an old kernel (kernel_64m.tgz i think it's from old a series source, kernel 2.6.17.14)
but there are heavy changes in linux filesystem abi since this version.

if you have interest, let me know.

arris

edit: driver working up to kernel version 2.6.33, need to make a bit cleanup and test with rt-patched kernels

edit: made first step, compiled linux-2.6.17.14 for my laptop with the rfs module.
first test: mounted rfs image generated with mkrfs ( http://forum.samygo.tv/viewtopic.php?f= ... 06&start=0 ) editing files OK
todo: check editing of images from samsung firmware, go to next kernel version linux-2.6.18 (i tink i need some help at version linux-2.6.20 around :mrgreen: )
Last edited by arris69 on Tue Feb 08, 2011 9:22 pm, edited 1 time in total.
Reason: 2.6.33
nbd
Posts: 160
Joined: Wed Jan 13, 2010 12:02 pm

Re: rfs porting

Post by nbd »

Could you elaborate a bit, what's the ultimate goal and possibilities with this little project of yours? Sounds exciting already though!
arris69
Official SamyGO Developer
Posts: 1700
Joined: Fri Oct 02, 2009 8:52 am
Location: Austria/Vienna (no Kangaroos here)
Contact:

Re: rfs porting

Post by arris69 »

nbd wrote:Could you elaborate a bit, what's the ultimate goal and possibilities with this little project of yours? Sounds exciting already though!
good question, why people like to install a new kernel on the computer if the old one works without trouble?
somebody asked me half a year ago for rfs sources (he liked to try build a new kernel for galaxy spica) but i never heard something again from him.
samsung use this rfs stuff on other devices too, so to have fixed sources for new kernels is maybe usable for other projects also.

arris
sbav1
Official SamyGO Developer
Posts: 374
Joined: Fri Jan 15, 2010 10:20 am

Re: rfs porting

Post by sbav1 »

arris69 wrote:found in samsung sources a kernel 2.6.24 where leonid support is included. compiled the kernel for my ue..b7020
Interesting; I guess it's kernel 2.6.24 compiled from C-series T-VAL* samsung "open source" package, but configured for leonid platform/B-series (?). Can you share .config file? Most importantly, are you able to boot B-Series TV with this kernel? What about samdrv.ko (from B-series firmware, v2.6.18); is there a chance it's compatible with 2.6.24 kernel?
the rfs sources are from an old kernel (kernel_64m.tgz i think it's from old a series source, kernel 2.6.17.14)
Wow, that's a nice find!
AFAIK, it's 1st time for actual RFS source code being available in the open :). I bet Samsung Galaxy/Android people will be pleased as well. I wonder if "LE40A626 / LA26A450" RFS implementation will be backward compatible with RFS version used in B-Series (1.2.3p1). I hope it will (B-Series v2.6.18 .config file:

Code: Select all

# CONFIG_RFS_FAST_LOOKUP is not set
# CONFIG_RFS_FAST_SEEK is not set
).
arris69
Official SamyGO Developer
Posts: 1700
Joined: Fri Oct 02, 2009 8:52 am
Location: Austria/Vienna (no Kangaroos here)
Contact:

Re: rfs porting

Post by arris69 »

sbav1 wrote:
arris69 wrote:found in samsung sources a kernel 2.6.24 where leonid support is included. compiled the kernel for my ue..b7020
Interesting; I guess it's kernel 2.6.24 compiled from C-series T-VAL* samsung "open source" package, but configured for leonid platform/B-series (?). Can you share .config file? Most importantly, are you able to boot B-Series TV with this kernel? What about samdrv.ko (from B-series firmware, v2.6.18); is there a chance it's compatible with 2.6.24 kernel?
the rfs sources are from an old kernel (kernel_64m.tgz i think it's from old a series source, kernel 2.6.17.14)
Wow, that's a nice find!
AFAIK, it's 1st time for actual RFS source code being available in the open :). I bet Samsung Galaxy/Android people will be pleased as well. I wonder if "LE40A626 / LA26A450" RFS implementation will be backward compatible with RFS version used in B-Series (1.2.3p1). I hope it will (B-Series v2.6.18 .config file:

Code: Select all

# CONFIG_RFS_FAST_LOOKUP is not set
# CONFIG_RFS_FAST_SEEK is not set
).
you guessed right, samsung guys forgot do delete leonid stuff from 10_PN50C490B3D.zip and with a bit patching you can compile it, also chelsea sdp83 is selectable via menuconfig and one leonid machine (memory config don't fit my machine, so it needs more patching to detect/match the configuration, just get 168M and not the full ram).
booting is possible but for now limited. due missing rfs and samdrv.ko module :lol: , the stl driver is ok.
for samdrv.ko: samsung changed some stuff in this kernel (like usb is now a platform driver), but who knows. problem is samdrv.ko has other modules version.
it would be also better to try to write drivers for the soc, register adresses are listed in some sources but it's really hard work to figure out how to init and controll the chip (hint: chip desiner, service manual reader you are wellcome :!: )
for now i have a problem with the rfs images: self created (with mkrfs) are mountable rfs image from firmware give error about sector count, but i think this is maybe fixable by adding sector size or image type as module parameter.
for compability, for shure this is a quite old version of rfs but if samsung coders can tune it than we can do this better :twisted: i think there are not really major changes in newer version.
working on 2.6.23.7 patch now

arris
You do not have the required permissions to view the files attached to this post.
Last edited by arris69 on Fri Jan 28, 2011 9:52 pm, edited 2 times in total.
Reason: added config
User avatar
erdem_ua
SamyGO Admin
Posts: 3125
Joined: Thu Oct 01, 2009 6:02 am
Location: Istanbul, Turkey
Contact:

Re: rfs porting

Post by erdem_ua »

I just asking for curiosity.
Fill the dots.: Open sourced RFS kernel module gives us opportunity of ............. in practice.
arris69
Official SamyGO Developer
Posts: 1700
Joined: Fri Oct 02, 2009 8:52 am
Location: Austria/Vienna (no Kangaroos here)
Contact:

Re: rfs porting

Post by arris69 »

erdem_ua wrote:I just asking for curiosity.
Fill the dots.: Open sourced RFS kernel module gives us opportunity of nuts, satisfaction, no need to hexedit fs-images, a robust filesystem ( :lol: ) maybe nothing but maybe world peace in practice.
marcelru
Official SamyGO Developer
Posts: 171
Joined: Thu Oct 01, 2009 7:27 am

Re: rfs porting

Post by marcelru »

Hi arris69,

just checking, is this the rfs source version you found:
rfs v1.2.2p1-rc2 ?

grtz,

marcelr
arris69
Official SamyGO Developer
Posts: 1700
Joined: Fri Oct 02, 2009 8:52 am
Location: Austria/Vienna (no Kangaroos here)
Contact:

Re: rfs porting

Post by arris69 »

marcelru wrote:Hi arris69,

just checking, is this the rfs source version you found:
rfs v1.2.2p1-rc2 ?

grtz,

marcelr
yes:
"1.2.2p1-rc2"
in Config.in and Kconfig

i patched it up to kernel 2.6.23.7 but 2.6.23 won't boot on my laptop (something fu.... up with ext4 and ext3 drivers) now i try 2.6.33
if you can/like test kernel 2.6.23/24 pm me for patches.

arris
sbav1
Official SamyGO Developer
Posts: 374
Joined: Fri Jan 15, 2010 10:20 am

Re: rfs porting

Post by sbav1 »

arris69 wrote: chelsea sdp83 is selectable via menuconfig and one leonid machine (memory config don't fit my machine, so it needs more patching to detect/match the configuration, just get 168M and not the full ram).
For leonid 64_512 EU model I belive it should be (more or less):

include/asm-arm/arch-sdp/memory-leonid.h.patch

Code: Select all

--- memory-leonid.h.org 2011-01-29 16:25:24.000000000 +0100
+++ memory-leonid.h  2011-01-29 18:49:35.000000000 +0100
@@ -28,11 +28,11 @@
 #define N_MEM_CHANNEL        2

 #define MACH_MEM0_BASE          0x60000000  /* West     */
-#define MACH_MEM0_SIZE          SZ_128M
+#define MACH_MEM0_SIZE          SZ_256M
 #define MACH_MEM1_BASE          0x70000000  /* East     */
 #define MACH_MEM1_SIZE          SZ_256M

-#define SYS_MEM0_SIZE     (68 << 20)
+#define SYS_MEM0_SIZE     (196 << 20)
 #define SYS_MEM1_SIZE     (101 << 20)

 #   define PHYS_OFFSET          (MACH_MEM0_BASE)
@@ -48,8 +48,8 @@
 #define RANGE(n, start, size)   \
           ((unsigned long)n >= start && (unsigned long)n < (start+size))

-/* Kernel size limit 256Mbyte */
-#define KVADDR_MASK    (0x0FFFFFFF)
+/* Kernel size limit 512Mbyte */
+#define KVADDR_MASK    (0x1FFFFFFF)
 /* Bank  size limit 256MByte */
 #define MACH_MEM_MASK  (0x0FFFFFFF)
 #define MACH_MEM_SHIFT (28)  /*0x10000000*/
@@ -92,7 +92,12 @@
  */

 /* BANK Membase Mapping*/
-#define LOCAL_MAP_NR(addr)   ( (((unsigned long)addr & MACH_MEM_MASK) >> PAGE_SHIFT)  )
+#define LOCAL_MAP_PFN_NR(addr)  ( (((unsigned long)addr & MACH_MEM_MASK) >> PAGE_SHIFT)  )
+
+#define LOCAL_MAP_KVADDR_NR(kaddr) \
+  ((((unsigned long)kaddr & KVADDR_MASK) < SYS_MEM0_SIZE) ? \
+  ((unsigned long)kaddr & KVADDR_MASK) >> PAGE_SHIFT : \
+  (((unsigned long)kaddr & KVADDR_MASK) - SYS_MEM0_SIZE) >> PAGE_SHIFT )

 #endif /* CONFIG_DISCONTIGMEM */
include/asm-arm/arch-sdp/vmalloc.h.patch

Code: Select all

--- vmalloc.h.org 2011-01-29 17:18:32.000000000 +0100
+++ vmalloc.h  2011-01-29 18:23:55.000000000 +0100
@@ -42,10 +42,12 @@
 #endif
 #endif

-#if 1
+#if 0
 #ifndef __ASSEMBLY__
 extern const unsigned int sdp_vmalloc_end;
 #define VMALLOC_END sdp_vmalloc_end
 #endif
 #endif

+#define VMALLOC_END     (0xe0000000)
+/* #define VMALLOC_END     (PAGE_OFFSET + 0x20000000) */
I wonder if serial and usb drivers from new platform will work properly (I haven't had a chance to test it yet, but at least I'm able to compile the darn kernel for leonid).
Hmm, 8139too driver will probably need some patching as well.
it would be also better to try to write drivers for the soc, register adresses are listed in some sources but it's really hard work to figure out how to init and controll the chip (hint: chip desiner, service manual reader you are wellcome :!: )
Circa 84000 32bit registers in 100+ sections to reverse engineer.. that will be quite a job ;)

Post Reply

Return to “[B] Support”