Official Gitbrew Forums
These forums cover all aspects of the Gitbrew biosphere. If you would like your development project to be based here, ask an admin.

Home » PS3 » OtherOS++ » Linux » Make Errors (Kernel Source - preperation)
Make Errors [message #1470] Tue, 19 June 2012 22:11 Go to next message
sbmotoracer is currently offline  sbmotoracer
Messages: 10
Registered: September 2011
Gitbrew Noob
Hello,

I was wondering if I could get some help with making(compiling) the metldr module.

From lurking,reading,etc I understand I need to have "build" pointing to the 3.4.2 kernel source but when I have it in place, Make errors out requesting I run make "oldconfig && make prepare".

After running it Makes errors out with:


sbmotoracer@127:~/linux-3.4.2$ cd /home/sbmotoracer/metldrpwn
sbmotoracer@127:~/metldrpwn$ make
make -C /lib/modules/3.4.2/build M=/home/sbmotoracer/metldrpwn modules
make[1]: Entering directory `/home/sbmotoracer/linux-3.4.2'
CC [M] /home/sbmotoracer/metldrpwn/metldrpwn.o
/home/sbmotoracer/metldrpwn/metldrpwn.c: In function 'work_function':
/home/sbmotoracer/metldrpwn/metldrpwn.c:246: warning: passing argument 1 of 'lv1_get_virtual_address_space_id_of_ppe' makes pointer from integer without a cast
/home/sbmotoracer/linux-3.4.2/arch/powerpc/include/asm/lv1ca ll.h:234: note: expected 'u64 *' but argument is of type 'u64'
/home/sbmotoracer/metldrpwn/metldrpwn.c:246: error: too many arguments to function 'lv1_get_virtual_address_space_id_of_ppe'
/home/sbmotoracer/metldrpwn/metldrpwn.c:512:1: warning: "/*" within comment
/home/sbmotoracer/metldrpwn/metldrpwn.c: In function 'metldrpwn_init':
/home/sbmotoracer/metldrpwn/metldrpwn.c:807: warning: label 'bad5' defined but not used
make[2]: *** [/home/sbmotoracer/metldrpwn/metldrpwn.o] Error 1
make[1]: *** [_module_/home/sbmotoracer/metldrpwn] Error 2
make[1]: Leaving directory `/home/sbmotoracer/linux-3.4.2'
make: *** [all] Error 2


Since im sure others have successfully compiled this moduel im sure its not the code...


Thank you in advance for the help.
Re: Make Errors [message #1471 is a reply to message #1470] Tue, 19 June 2012 22:35 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
The module doesn't compile beacuse of this error

/home/sbmotoracer/metldrpwn/metldrpwn.c:246: error: too many arguments to function 'lv1_get_virtual_address_space_id_of_ppe'.

The module is probably not compatible with Linux 3.4. Maybe some interface changes.
Check lv1_get_virtual_address_space_id_of_ppe in the module source, see if it used correctly or not.

[Updated on: Tue, 19 June 2012 22:35]

Report message to a moderator

Re: Make Errors [message #1489 is a reply to message #1471] Wed, 20 June 2012 23:25 Go to previous messageGo to next message
sbmotoracer is currently offline  sbmotoracer
Messages: 10
Registered: September 2011
Gitbrew Noob
Thanks for the help.

I got the module to compile, but it throws a invalid module format when I use modprobe or insmod

Seems the module version magic doesn't match the systems even though it was compiled on the very same system. I tried using insmod -f ./metldrpwn.ko to ignore the version miss match but it still wont load. So if im understanding the error correctly the issue is deeper then the version magic miss match...

You wouldn't happen to have a link where I can compare the proper structure of a module vs the one I compiled? I would like to try and understand what part of the module I build is invalid.
Re: Make Errors [message #1490 is a reply to message #1489] Wed, 20 June 2012 23:40 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
It means your Linux kernel binary and your module binary do not match.
Means you are trying to load a module which was NOT built against the Linux kernel you are using.
What Linux kernel do you use ?
Your Linux kernel and your module should be built from the same source directory.
Re: Make Errors [message #1491 is a reply to message #1490] Wed, 20 June 2012 23:41 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
You cannot use my Linux kernel binaries and use your kernel modules. That won't work.
You have to compile your kernel first and then build your module against it.
Re: Make Errors [message #1492 is a reply to message #1491] Thu, 21 June 2012 00:14 Go to previous messageGo to next message
sbmotoracer is currently offline  sbmotoracer
Messages: 10
Registered: September 2011
Gitbrew Noob
Seems I have alot to learn then.

Just so I understand correctly would compiling my own kernel with your patches allow it to work correctly or would I have to use a vanilla kernel?

The reason I ask is I would like to still play around with the tools that you and Graf created, without having to jump into a different kernel whenever I want to dump metlder.
Re: Make Errors [message #1498 is a reply to message #1492] Thu, 21 June 2012 17:22 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
My patches apply to vanilla kernels.

This is how i compile my kernels:
* Download vanilla Linux kernel
* Patch it with my patches
* Configure it
* Compile

And you can install different Linux kernels on your PS3 and as many as you want.
I'm using e.g. 4 different Linux kernels with my Arch Linux Distro on PS3.
Just choose the right set of patches.
There is a directory for each Linux kernel version here:

http://gitbrew.org/~glevand/ps3/linux/linux-3/

and here:

http://gitbrew.org/~glevand/ps3/linux/linux-2.6/
Re: Make Errors [message #1511 is a reply to message #1498] Sat, 23 June 2012 14:08 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
Check this out: http://linux.die.net/lkmpg/x380.html
Re: Make Errors [message #1588 is a reply to message #1511] Sun, 01 July 2012 06:07 Go to previous messageGo to next message
sbmotoracer is currently offline  sbmotoracer
Messages: 10
Registered: September 2011
Gitbrew Noob
sorry for the late reply...

I compiled my own version of 2.6 as you advised me, and when I tried to compile the module it crashed with multiple errors in the header/source files.

At this point im not really sure what to do.

Would a 100% vanilla kernel help? or better to go to a whole new distro such as debian?

Im sorry about all the questions. Im learning as I go along...

edit - http://linux.die.net/lkmpg/x380.html - Thanks, I'll keep it in mind if I can get this module to compile.

[Updated on: Sun, 01 July 2012 06:09]

Report message to a moderator

Re: Make Errors [message #1589 is a reply to message #1588] Sun, 01 July 2012 07:51 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
Vanilla kernel won't boot on PS3 Slim.
And i doubt vanilla kernel would help, our kernels are vanilla, just with extra features.
Post your errors here.
Re: Make Errors [message #1590 is a reply to message #1589] Sun, 01 July 2012 09:29 Go to previous messageGo to next message
sbmotoracer is currently offline  sbmotoracer
Messages: 10
Registered: September 2011
Gitbrew Noob
I've spent a good couple of hours fixing a few errors but from what you see is the header that was created when I compiled the kernel not compatible with module or is the header incorrectly compiled?


sbmotoracer@127:~/test/metldrpwn$ make all
make -C /lib/modules/2.6.39-graf-gd49d156/build M=/home/sbmotoracer/test/metldrpwn modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.39-graf-gd49d156'
CC [M] /home/sbmotoracer/test/metldrpwn/metldrpwn.o
In file included from /usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu.h:137,
from /usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/lppaca.h:38,
from /usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/paca.h:21,
from /usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/hw_irq.h:17,
from /usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/irqflags.h:11,
from include/linux/irqflags.h:15,
from include/linux/spinlock.h:53,
from include/linux/seqlock.h:29,
from include/linux/time.h:8,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from /home/sbmotoracer/test/metldrpwn/metldrpwn.c:19:
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h: In function 'hpte_encode_v':
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h:189: warning: left shift count >= width of type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h: In function 'hpte_encode_r':
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h:204: warning: integer constant is too large for 'unsigned long' type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h: In function 'hpt_va':
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h:221: warning: left shift count >= width of type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h:221: warning: integer constant is too large for 'unsigned long' type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h: In function 'hpt_hash':
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h:236: warning: right shift count >= width of type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h:237: warning: integer constant is too large for 'unsigned long' type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h:239: warning: integer constant is too large for 'unsigned long' type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h: In function 'get_kernel_vsid':
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h:454: warning: right shift count >= width of type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h:454: warning: left shift count >= width of type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h:454: warning: right shift count >= width of type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h:454: warning: left shift count >= width of type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h:455: warning: right shift count >= width of type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h: In function 'user_segment_size':
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h:462: warning: left shift count >= width of type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h: In function 'get_vsid':
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h:472: warning: right shift count >= width of type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h:472: warning: left shift count >= width of type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h:472: warning: right shift count >= width of type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h:472: warning: left shift count >= width of type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/mmu-hash64.h:474: warning: right shift count >= width of type
In file included from /usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/spinlock.h:26,
from include/linux/spinlock.h:87,
from include/linux/seqlock.h:29,
from include/linux/time.h:8,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from /home/sbmotoracer/test/metldrpwn/metldrpwn.c:19:
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/iseries/hv_call.h: In function 'HvCall_setVirtualDecr':
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/iseries/hv_call.h:85: warning: integer constant is too large for 'unsigned long' type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/iseries/hv_call.h: In function 'HvCall_yieldProcessor':
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/iseries/hv_call.h:90: warning: integer constant is too large for 'unsigned long' type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/iseries/hv_call.h: In function 'HvCall_setEnabledInterrupts':
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/iseries/hv_call.h:95: warning: integer constant is too large for 'unsigned long' type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/iseries/hv_call.h: In function 'HvCall_setLogBufferFormatAndCodepage':
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/iseries/hv_call.h:101: warning: integer constant is too large for 'unsigned long' type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/iseries/hv_call.h: In function 'HvCall_sendIPI':
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/iseries/hv_call.h:108: warning: integer constant is too large for 'unsigned long' type
In file included from /usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/cputime.h:29,
from include/linux/sched.h:71,
from /usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/elf.h:5,
from include/linux/elf.h:7,
from include/linux/module.h:14,
from /home/sbmotoracer/test/metldrpwn/metldrpwn.c:19:
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/time.h: In function 'get_tb':
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/time.h:116: error: void value not ignored as it ought to be
In file included from /usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/elf.h:5,
from include/linux/elf.h:7,
from include/linux/module.h:14,
from /home/sbmotoracer/test/metldrpwn/metldrpwn.c:19:
include/linux/sched.h: At top level:
include/linux/sched.h:106: error: expected ')' before '?' token
include/linux/sched.h:203: error: implicit declaration of function '__ilog2_u64'
In file included from include/linux/io.h:22,
from /home/sbmotoracer/test/metldrpwn/metldrpwn.c:25:
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/io.h: In function 'virt_to_phys':
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/io.h:697: warning: integer constant is too large for 'unsigned long' type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/io.h: In function 'phys_to_virt':
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/io.h:714: warning: integer constant is too large for 'unsigned long' type
In file included from /usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/pgtable.h:23,
from include/linux/mm.h:41,
from /home/sbmotoracer/test/metldrpwn/metldrpwn.c:26:
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/pgtable-ppc64.h: In function 'find_linux_pte':
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/pgtable-ppc64.h:368: warning: right shift count >= width of type
In file included from /usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/pgtable.h:201,
from include/linux/mm.h:41,
from /home/sbmotoracer/test/metldrpwn/metldrpwn.c:26:
include/asm-generic/pgtable.h: In function 'pud_none_or_clear_bad':
include/asm-generic/pgtable.h:274: warning: integer constant is too large for 'unsigned long' type
include/asm-generic/pgtable.h: In function 'pmd_none_or_clear_bad':
include/asm-generic/pgtable.h:285: warning: integer constant is too large for 'unsigned long' type
In file included from /home/sbmotoracer/test/metldrpwn/metldrpwn.c:26:
include/linux/mm.h: In function 'is_vmalloc_addr':
include/linux/mm.h:303: warning: integer constant is too large for 'unsigned long' type
include/linux/mm.h:303: warning: integer constant is too large for 'unsigned long' type
include/linux/mm.h: In function 'virt_to_head_page':
include/linux/mm.h:391: warning: integer constant is too large for 'unsigned long' type
In file included from /home/sbmotoracer/test/metldrpwn/metldrpwn.c:26:
include/linux/mm.h: In function 'lowmem_page_address':
include/linux/mm.h:723: warning: integer constant is too large for 'unsigned long' type
In file included from include/linux/uaccess.h:5,
from include/linux/highmem.h:7,
from include/linux/pagemap.h:10,
from include/linux/buffer_head.h:13,
from /home/sbmotoracer/test/metldrpwn/metldrpwn.c:29:
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/uaccess.h: In function 'copy_from_user':
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/uaccess.h:339: warning: integer constant is too large for 'unsigned long' type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/uaccess.h:339: warning: integer constant is too large for 'unsigned long' type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/uaccess.h:340: warning: integer constant is too large for 'unsigned long' type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/uaccess.h:340: warning: integer constant is too large for 'unsigned long' type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/uaccess.h: In function 'copy_to_user':
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/uaccess.h:354: warning: integer constant is too large for 'unsigned long' type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/uaccess.h:354: warning: integer constant is too large for 'unsigned long' type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/uaccess.h:355: warning: integer constant is too large for 'unsigned long' type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/uaccess.h:355: warning: integer constant is too large for 'unsigned long' type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/uaccess.h: In function 'clear_user':
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/uaccess.h:449: warning: integer constant is too large for 'unsigned long' type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/uaccess.h:449: warning: integer constant is too large for 'unsigned long' type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/uaccess.h:450: warning: integer constant is too large for 'unsigned long' type
/usr/src/linux-headers-2.6.39-graf-gd49d156/arch/powerpc/inc lude/asm/uaccess.h:450: warning: integer constant is too large for 'unsigned long' type
In file included from include/linux/buffer_head.h:13,
from /home/sbmotoracer/test/metldrpwn/metldrpwn.c:29:
include/linux/pagemap.h: In function 'fault_in_pages_writeable':
include/linux/pagemap.h:406: warning: integer constant is too large for 'unsigned long' type
include/linux/pagemap.h:416: warning: integer constant is too large for 'unsigned long' type
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:429: warning: integer constant is too large for 'unsigned long' type
include/linux/pagemap.h:435: warning: integer constant is too large for 'unsigned long' type
/home/sbmotoracer/test/metldrpwn/metldrpwn.c: In function 'work_function':
/home/sbmotoracer/test/metldrpwn/metldrpwn.c:308: error: implicit declaration of function 'GET_ESID'
/home/sbmotoracer/test/metldrpwn/metldrpwn.c:312: warning: cast from pointer to integer of different size
/home/sbmotoracer/test/metldrpwn/metldrpwn.c:322: warning: cast from pointer to integer of different size
/home/sbmotoracer/test/metldrpwn/metldrpwn.c:324: warning: cast from pointer to integer of different size
/home/sbmotoracer/test/metldrpwn/metldrpwn.c:408: warning: cast from pointer to integer of different size
/home/sbmotoracer/test/metldrpwn/metldrpwn.c:415: warning: cast from pointer to integer of different size
/home/sbmotoracer/test/metldrpwn/metldrpwn.c:420: warning: cast from pointer to integer of different size
/home/sbmotoracer/test/metldrpwn/metldrpwn.c:424: warning: cast from pointer to integer of different size
/home/sbmotoracer/test/metldrpwn/metldrpwn.c:432: warning: cast from pointer to integer of different size
/home/sbmotoracer/test/metldrpwn/metldrpwn.c:512:1: warning: "/*" within comment
/home/sbmotoracer/test/metldrpwn/metldrpwn.c: In function 'metldrpwn_init':
/home/sbmotoracer/test/metldrpwn/metldrpwn.c:807: warning: label 'bad5' defined but not used
make[2]: *** [/home/sbmotoracer/test/metldrpwn/metldrpwn.o] Error 1
make[1]: *** [_module_/home/sbmotoracer/test/metldrpwn] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.39-graf-gd49d156'
make: *** [all] Error 2
sbmotoracer@127:~/test/metldrpwn$
Re: Make Errors [message #1591 is a reply to message #1590] Sun, 01 July 2012 09:56 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
Either the source of your kernel module is not compatible with the kernel you are trying to use or
your kernel module source is buggy.
Re: Make Errors [message #1592 is a reply to message #1591] Sun, 01 July 2012 10:21 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
And i hope you are using a cross-compiler. Or do you compile natively ?
Re: Make Errors [message #1593 is a reply to message #1592] Sun, 01 July 2012 10:39 Go to previous messageGo to next message
sbmotoracer is currently offline  sbmotoracer
Messages: 10
Registered: September 2011
Gitbrew Noob
The module or the headers? if the headers they were cross compiled vs the module which was natively.

It seems my headers/source is the issue. I checked by trying to compile a simple Hello World I got off the net. It brings up the same error messages as well.

edit - is either method better over the other? natively or cross compiling?

[Updated on: Sun, 01 July 2012 10:41]

Report message to a moderator

Re: Make Errors [message #1594 is a reply to message #1593] Sun, 01 July 2012 10:53 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
Doesn't matter which method you use, both should work, cross-compiling is usually faster.
Re: Make Errors [message #1606 is a reply to message #1594] Thu, 05 July 2012 10:11 Go to previous messageGo to next message
sbmotoracer is currently offline  sbmotoracer
Messages: 10
Registered: September 2011
Gitbrew Noob
Got it to work...well sorta....

I managed to compile and load it into the kernel using insmod.

but now im getting cat:write error: No space left on device errors...

Since I know my I've still got space on the drive, im sure it not that...

Is there a limit to how much ram/swap space the kernel can use for itself?
Re: Make Errors [message #1607 is a reply to message #1606] Thu, 05 July 2012 18:21 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
Kernel doesn't use swap for itself, only on behalf of applications.
The kernel module you use is the problem i think.
Re: Make Errors [message #1610 is a reply to message #1607] Thu, 05 July 2012 22:35 Go to previous messageGo to next message
sbmotoracer is currently offline  sbmotoracer
Messages: 10
Registered: September 2011
Gitbrew Noob
The kernel module is a modified module that was originally created by you before it was modified - SPP verifier direct

link to the modified file - http://www.ps3devwiki.com/files/devtools/dump-metldr/metldr8 38exploit/metldrpwn.c

The file itself loads into memory but when I run cat appldr-metldrexploit350.self > /proc/metldrpwn/mathldr
it errors out with cat:write error: No space left on device.

You wouldn't happen to know a way of increasing kernel memory? From what I understand about the error message its running out of kernel memory to load the file.

Btw if its not too much to ask would you be able to look over/ compile/run the module?

The instructions im following is listed on www.ps3devwiki.com/wiki/Dumping_Metldr

The reason I ask is if it runs fine on yours then it truly is my system that's the issue plus if it really is the module that the issue, id rather fix it so that others may be able to use it.

Edit - fixed spell/grammar mistakes

[Updated on: Thu, 05 July 2012 22:36]

Report message to a moderator

Re: Make Errors [message #1611 is a reply to message #1471] Fri, 06 July 2012 13:10 Go to previous messageGo to next message
masterzorag is currently offline  masterzorag
Messages: 99
Registered: August 2011
Location: maiworld
Gitbrew Member
glevand wrote on Tue, 19 June 2012 22:35
The module doesn't compile beacuse of this error
/home/sbmotoracer/metldrpwn/metldrpwn.c:246: error: too many arguments to function 'lv1_get_virtual_address_space_id_of_ppe'.
The module is probably not compatible with Linux 3.4. Maybe some interface changes.
Check lv1_get_virtual_address_space_id_of_ppe in the module source, see if it used correctly or not.

as you advise, and as I've readed here, the code should be patched to:
lv1_get_virtual_address_space_id_of_ppe(&ppe_id);
in this way I've metldrpwn kernel module cross-compiled for your linux-3.4.3
blackstar met # modinfo metldrpwn.ko 
filename:       /media/d8a6249d-87fa-4f56-9c2c-b5476ba85eef/PS3/met/metldrpwn.ko
author:         glevand
description:    SPP verifier direct
license:        GPL
depends:        
vermagic:       3.4.3 SMP mod_unload 
on the PS3
[root@fedora_clone metldrpwn]# insmod ./metldrpwn.ko
[root@fedora_clone metldrpwn]# ls -lnht /proc/metldrpwn
total 0
-rw-r--r-- 1 0 0 4.0K Jul  5 10:15 debug
-rw-r--r-- 1 0 0 256K Jul  5 10:15 dump
-rw-r--r-- 1 0 0 4.0K Jul  5 10:15 eid0
-rw-r--r-- 1 0 0 128K Jul  5 10:15 mathldr
-rw-r--r-- 1 0 0  64K Jul  5 10:15 metldr
-rw-r--r-- 1 0 0    0 Jul  5 10:15 run
-rw-r--r-- 1 0 0 4.0K Jul  5 10:15 rvkprg

now I've to dump my flash, anyone booting prebuilt 3.4.3 want to test?

dumped my NAND:
[root@fedora_clone metldrpwn]# dd if=/dev/ps3flasha of=NAND.BIN bs=1024
[root@fedora_clone metldrpwn]# ls -lnt NAND.BIN 
-rw-r--r-- 1 0 0 251396096 Jul  5 10:27 NAND.BIN

I'll try to use norunpack to decrypt it.
norunpack falls in Segmentation fault
damn, need to use dump_flash.pkg from the XMB?

[Updated on: Fri, 06 July 2012 15:46]

Report message to a moderator

Re: Make Errors [message #1612 is a reply to message #1610] Fri, 06 July 2012 13:30 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
Make sure you don't run X11, Gnome or anything other which is a RAM hog.

I wonder sometimes guys, you expect from a PS3 with its 256MB RAM the performance of a modern average PC with 4G RAM. That won't do.
And some of you even say that PS3 has 8 cores Smile It has only 1 core with 8 SPEs which are only peripheral devices and kernel doesn't use them at all. In comparison with a modern PC, PS3 is just an old piece of junk. The only attraction it has for me is its PowerPC CPU. In all other aspects it is slow as shit.
Re: Make Errors [message #1613 is a reply to message #1612] Sat, 07 July 2012 08:46 Go to previous messageGo to next message
sbmotoracer is currently offline  sbmotoracer
Messages: 10
Registered: September 2011
Gitbrew Noob
I managed to get it to work on 2.6...

If no one has tested it on 3.4.3 by end of saturday then i'll test it, masterzorag.

Re: Make Errors [message #1634 is a reply to message #1611] Sun, 15 July 2012 08:01 Go to previous message
sbmotoracer is currently offline  sbmotoracer
Messages: 10
Registered: September 2011
Gitbrew Noob
Sorry for the late reply masterzorag... I couldn't test it till now...

The module is loaded fine into the kernel but when ran it errors out:

sbmotoracer@LPTP:~/ps3/c2d$ ssh 192.168.2.5
sbmotoracer@192.168.2.5's password:

Linux ps3 3.4.3 #1 SMP Mon Jun 18 18:24:19 CEST 2012 ppc64 GNU/Linux
Ubuntu 10.04 LTS

Welcome to Ubuntu!
* Documentation: https://help.ubuntu.com/
Last login: Sun Jul 15 00:52:33 2012
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

sbmotoracer@ps3:~$ cd metldrpwn-3.4.3
sbmotoracer@ps3:~/metldrpwn-3.4.3$ ls
dump.txt metldrpwn.ko metldrpwn.ko.tar.gz
sbmotoracer@ps3:~/metldrpwn-3.4.3$ sudo -i
sudo: unable to resolve host ps3
[sudo] password for sbmotoracer:
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

root@ps3:~# cd /home/sbmotoracer/metldrpwn-3.4.3
root@ps3:/home/sbmotoracer/metldrpwn-3.4.3# insmod metldrpwn.ko
root@ps3:/home/sbmotoracer/metldrpwn-3.4.3# cd ../metldrpwn
root@ps3:/home/sbmotoracer/metldrpwn# cd metldrpwn
root@ps3:/home/sbmotoracer/metldrpwn/metldrpwn# cat run.sh
set -x

insmod ./metldrpwn.ko
cat metldr > /proc/metldrpwn/metldr
sleep 1
cat appldr-metldrexploit350.self > /proc/metldrpwn/mathldr
sleep 2
#cat RL_FOR_PROGRAM.img > /proc/metldrpwn/rvkprg
#sleep 2
#cat eid0 > /proc/metldrpwn/eid0
#sleep 2
echo 1 > /proc/metldrpwn/run
sleep 5
cat /proc/metldrpwn/debug

#strings /proc/metldrpwn/profile
#rmmod metldrpwn.ko


root@ps3:/home/sbmotoracer/metldrpwn/metldrpwn# cat metldr > /proc/metldrpwn/metldr

root@ps3:/home/sbmotoracer/metldrpwn/metldrpwn# cat appldr-metldrexploit350.self > /proc/metldrpwn/mathldr

root@ps3:/home/sbmotoracer/metldrpwn/metldrpwn# echo 1 > /proc/metldrpwn/run

root@ps3:/home/sbmotoracer/metldrpwn/metldrpwn# cat /proc/metldrpwn/debug
PPE id (0x0000000000000002) VAS id (0x0000000000000000)
lv1_construct_logical_spe (0xfffffffa)

[Updated on: Sun, 15 July 2012 08:01]

Report message to a moderator

Previous Topic: Just Starting Out - PS3
Next Topic: Make error messages
Goto Forum:
  


Current Time: Wed Jun 19 22:57:19 CEST 2013

Total time taken to generate the page: 0.02307 seconds