Safety when modifying samdrv.ko

Here is information about customize your B series firmware..:!:This forum is NOT FOR USER questions or problems but DEVELOPER.
Post Reply

User avatar
erdem_ua
SamyGO Admin
Posts: 3126
Joined: Thu Oct 01, 2009 6:02 am
Location: Istanbul, Turkey
Contact:

Re: Safety when modifying samdrv.ko

Post by erdem_ua »

Hi nilo, welcome back.
You can boot your TV from images on USB Flash instead of internal Flash.
Sp there is no change on internal memory. But you have better to dump current firmware and (all partitions with tbmlc image) to any safe place before working :)
marcelru
Official SamyGO Developer
Posts: 171
Joined: Thu Oct 01, 2009 7:27 am

Re: Safety when modifying samdrv.ko

Post by marcelru »

Hi nilo,

I tried to unload samdrv.ko from my tv, so far without success.
In my tv, the loaded modules are:

# lsmod
Module Size Used by Tainted: P
rt73 354092 0 - Live 0xbf531000
rt2870sta 674452 1 - Live 0xbf48b000
usb_storage 37796 1 - Live 0xbf480000
ohci_hcd 18692 0 - Live 0xbf47a000
ehci_hcd 29992 0 - Live 0xbf471000
usbcore 129064 6 rt73,rt2870sta,usb_storage,ohci_hcd,ehci_hcd, Live 0xbf450000
8139too 23296 0 - Live 0xbf449000
usb_fault 3928 2 - Live 0xbf447000
samdrv 3876372 26 - Live 0xbf093000
rfs 71688 7 - Live 0xbf080000
fsr_stl 251568 6 - Live 0xbf041000
fsr 258912 1 fsr_stl, Live 0xbf000000

When I remove samdrv.ko, I get this:

# rmmod -f samdrv.ko
Segmentation fault

So, halfway the removal process something goes wrong:

# lsmod
Module Size Used by Tainted: P
rt73 354092 0 - Live 0xbf531000
rt2870sta 674452 1 - Live 0xbf48b000
usb_storage 37796 1 - Live 0xbf480000
ohci_hcd 18692 0 - Live 0xbf47a000
ehci_hcd 29992 0 - Live 0xbf471000
usbcore 129064 6 rt73,rt2870sta,usb_storage,ohci_hcd,ehci_hcd, Live 0xbf450000
8139too 23296 0 - Live 0xbf449000
usb_fault 3928 2 - Live 0xbf447000
samdrv 3876372 26 - Unloading 0xbf093000
rfs 71688 7 - Live 0xbf080000
fsr_stl 251568 6 - Live 0xbf041000
fsr 258912 1 fsr_stl, Live 0xbf000000


Apart from that, nothing happens, the TV behaves just as before the removal attempt. Probably it's a bug in busybox, and other busyboxes might perform better here. I'm quite interested in a renewed samdrv.ko. It would give more grip on the tv as a whole.

Another possibility might be to write a separate kernel module that references bits of samdrv.ko, but adds extra debug capabilities. BTW, by setting giPrintLevel to a different number in samdrv.ko we might get a lot more debug info anyway (athough it is still limited to what the guys at samsung want us to see).

grtz,

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

Re: Safety when modifying samdrv.ko

Post by arris69 »

marcelru wrote:Hi nilo,

I tried to unload samdrv.ko from my tv, so far without success.
In my tv, the loaded modules are:

# lsmod
Module Size Used by Tainted: P
rt73 354092 0 - Live 0xbf531000
rt2870sta 674452 1 - Live 0xbf48b000
usb_storage 37796 1 - Live 0xbf480000
ohci_hcd 18692 0 - Live 0xbf47a000
ehci_hcd 29992 0 - Live 0xbf471000
usbcore 129064 6 rt73,rt2870sta,usb_storage,ohci_hcd,ehci_hcd, Live 0xbf450000
8139too 23296 0 - Live 0xbf449000
usb_fault 3928 2 - Live 0xbf447000
samdrv 3876372 26 - Live 0xbf093000
rfs 71688 7 - Live 0xbf080000
fsr_stl 251568 6 - Live 0xbf041000
fsr 258912 1 fsr_stl, Live 0xbf000000

When I remove samdrv.ko, I get this:

# rmmod -f samdrv.ko
Segmentation fault

...
your samdrv's usage count is 26 so makes no sense/chance to proper unload it.

hth
arris
marcelru
Official SamyGO Developer
Posts: 171
Joined: Thu Oct 01, 2009 7:27 am

Re: Safety when modifying samdrv.ko

Post by marcelru »

Hi arris69 and nilo85,

Yes that was kinda silly of me. After killing exeDSP the usage count of samdrv.ko drops to 0, but then I still can't chuck out the module:

# ./MicomCtrl 23
# killall exeDSP
# lsmod
Module Size Used by Tainted: P
rt73 354092 0 - Live 0xbf531000
rt2870sta 674452 1 - Live 0xbf48b000
usb_storage 37796 1 - Live 0xbf480000
ohci_hcd 18692 0 - Live 0xbf47a000
ehci_hcd 29992 0 - Live 0xbf471000
usbcore 129064 6 rt73,rt2870sta,usb_storage,ohci_hcd,ehci_hcd, Live 0xbf450000
8139too 23296 0 - Live 0xbf449000
usb_fault 3928 0 - Live 0xbf447000
samdrv 3876372 0 - Live 0xbf093000
rfs 71688 7 - Live 0xbf080000
fsr_stl 251568 6 - Live 0xbf041000
fsr 258912 1 fsr_stl, Live 0xbf000000
# rmmod samdrv.ko
Segmentation fault
# rmmod -f samdrv.ko
rmmod: samdrv.ko: Device or resource busy

So probably the guys at samsung configured the kernel to disallow module removal:

CONFIG_MODULE_UNLOAD=n ?

grmbl..

grtz,

marcelr

Post Reply

Return to “[B] Firmware”