View Single Post
Old 08-16-2012, 08:32 PM   #47
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by NiLuJe View Post
@twobob: Never played with the Kernel, but you might want to give the 'depmod with the custom modules put in the right place in /lib/modules' thing a go, if you managed to force-inject a custom-built module once.

On the TC front, more or less what knc1 said, except I'd stay away from multilib/interwork TC, unless you want a wall with an embossed version of your head on it ^^. And the things I mentioned/are commented in my x-tc script if you're using something recent and targetting the K2/3 (kill gcc's ssp: -fno-stack-protector in CFLAGS & CXXFLAGS, kill glibc's fortify: -U_FORTIFY_SOURCE in CPPFLAGS).
Yep those are the flags I managed to glean so far.

There was some talk on a thread somewhere - that I fail to find right now as per - that did have a nice list of compiler optimisations too (with tests for why they were decent choices) they would be a nice addition to a) this thread and b) the project effort as a whole. I'll see if I can find it. I think GM was chatting on it.

At the end of the day the type of people I envision - "Having a go" - at porting something will thank us for ensuring that the maximum amount of stuff-that-can-go-wrong has at least be thought about, documented, or covered. Thinking about it that's exactly what I would like too!

So I will pretty much go with the consensus on best TC - knc has some string and clear ideas about what the possible benefits of such an endeavour could be so I defer to him on the final say on these matters. This kind of input is invaluable in making good decisions, thank you.

So GM recommended TC DL (thanks GM, I really have to get my knowledge of this stuff sorted) Let's see how she goes.

EDIT:

[root@kindle fs]# strace -o /mnt/us/modules/gm-2008-CS.tc insmod /mnt/us/modules/smbfs.ko
insmod: error inserting '/mnt/us/modules/smbfs.ko': -1 Unknown symbol in module
[root@kindle fs]#

Fail

Spoiler:
Code:
execve("/sbin/insmod", ["insmod", "/mnt/us/modules/smbfs.ko"], [/* 22 vars */]) = 0
brk(0)                                  = 0x12000
uname({sys="Linux", node="kindle", ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4001b000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/var/run/ld.so.cache", O_RDONLY)  = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=13788, ...}) = 0
mmap2(NULL, 13788, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4001c000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\250J\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1348230, ...}) = 0
mmap2(NULL, 1135004, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40025000
mprotect(0x4012e000, 28672, PROT_NONE)  = 0
mmap2(0x40135000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x108) = 0x40135000
mmap2(0x40138000, 8604, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40138000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40020000
set_tls(0x400204a0, 0x400204a0, 0x40024058, 0x40020b78, 0x40) = 0
mprotect(0x40135000, 8192, PROT_READ)   = 0
munmap(0x4001c000, 13788)               = 0
brk(0)                                  = 0x12000
brk(0x33000)                            = 0x33000
open("/mnt/us/modules/smbfs.ko", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\1\0(\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 16384) = 16384
read(3, "\0@\316\345P\21\33\345\0P\301\345T1\33\345\0 \303\345X\341\33\345\0`\316\345L\21\33\345"..., 16384) = 16384
read(3, "\f@\223\345\2p\240\341\4\0\240\341\376\377\377\353\0PP\342\7\0\0\n\24 \224\345<\20\237\345"..., 32768) = 32768
read(3, "\0\0\0\0\0\0\2\0\362\6\0\0\4r\0\0\364\0\0\0\2\0\2\0\27\0\0\0\4r\0\0"..., 65536) = 10084
read(3, "", 55452)                      = 0
close(3)                                = 0
init_module(0x12018, 75620, "")         = -1 ENOENT (No such file or directory)
write(2, "insmod: error inserting '/mnt/us"..., 80) = 80
exit_group(1)                           = ?
+++ exited with 1 +++


Hmm Dunno.

I'll try again tomorrow with knc's recommendation when it sufaces : )
see how we go.

Last edited by twobob; 08-16-2012 at 09:14 PM.
twobob is offline   Reply With Quote