| Make error messages [message #901] |
Thu, 15 March 2012 18:32  |
JLM-
Messages: 12 Registered: February 2012
|
Gitbrew Noob |
|
|
When I run the following make command:
monkey@ps3 $ cd metldr838exploit && make
This error message was generated:
Make -C /lib/modules/2.6.38-powerpc64-otheros/build M = /home/monkey/metldr838exploit modules
make: *** /lib/modules/2.6.38-powerpc64-otheros/build: No such file or directory. Stop.
make: *** [all] Error 2
I don't know what it is looking for there. Hoping to output a more detailed error message, I created an empty directory:
/lib/modules/2.6.38-powerpc64-otheros/build
and ran the command again (monkey@ps3 $ cd metldr838exploit && make)
receiving this error message:
Make -C /lib/modules/2.6.38-powerpc64-otheros/build M = /home/monkey/metldr838exploit modules
make[1]: Entering directory 'lib/modules/2.6.38-powerpc64-otheros/build'
make[1]: ***No rule to make target 'modules'. Stop.
make: ***[all] Error 2
Anyone know what it is looking for?
Supplemental information:
A slim ps3 on Red Ribbon RC5 and Rebug 3.41.3
$PATH = /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
Contents of directory: /lib/modules/2.6.38-powerpc64-otheros/
are one folder: kernel (with several subfolders)
several modules files: modules.alias, modules.alias.bin, modules.builtin, modules.buitlin.bin, modules.dep,.....
no directory or file called "build"
contents of home directory include: metldr838exploit (folder), metldr (from nor dump), isoldr, spp_verifier.self, and default.spp (all from official firmware 3.41v2) (plus various other files and folders)
contents of home/metldr838exploit are: appldr-metldrexploit350.elf, appldr-metldrexploit350.self, makefile, metldr, metldrpwn.c, README, run.sh, spu.h
contents of makefile:
obj-m += metldrpwn.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
Thank you.
|
|
|
|
| Re: Make error messages [message #907 is a reply to message #901] |
Thu, 15 March 2012 20:35   |
glevand
Messages: 955 Registered: July 2011 Location: SONY
|
Gitbrew God |
|
|
/lib/modules/2.6.38-powerpc64-otheros/build
should be a link to your linux kernel source.
Like here:
[glevand@korriban ~]$ ls -l linux-3.2.11-build/lib/modules/3.2.11/build
lrwxrwxrwx 1 glevand users 26 Mar 13 17:41 linux-3.2.11-build/lib/modules/3.2.11/build -> /home/glevand/linux-3.2.11
You need a linux kernel source directory which matches your binary kernel else you cannot compile kernel modules.
[Updated on: Thu, 15 March 2012 20:39] Report message to a moderator
|
|
|
|
|
|
| Re: Make error messages [message #1622 is a reply to message #911] |
Thu, 12 July 2012 00:59   |
JLM-
Messages: 12 Registered: February 2012
|
Gitbrew Noob |
|
|
the command:
$ cd metldr838exploit && make
gives the following warnings:
/home/monkey/metldr838exploit/metldrpwn.c:512:1: warning: "/*" within comment
/home/monkey/metldr838exploit/metldrpwn.c: In function 'metldrpwn_init':
/home/monkey/metldr838exploit/metldrpwn.c:807: warning: label 'bad5' defined but not used
/* if (size >= sizeof(buf))
{
*/
/* DPRINTF("%x %x %x %x",buf[0],buf[1],buf[2],buf[3]);
/* if (result != 0)
return result;
*/
(if (result != 0) is on line 512)
Anyone know why I am the only person getting that warning? Thanks.
here is all the output:
make -C /lib/modules/2.6.38-powerpc64-otheros/build M=/home/monkey/metldr838exploit modules
make[1]: Entering directory `/home/monkey/headers/usr/src/linux-headers-2.6.38-powerpc64 -otheros'
CC [M] /home/monkey/metldr838exploit/metldrpwn.o
/home/monkey/metldr838exploit/metldrpwn.c:512:1: warning: "/*" within comment
/home/monkey/metldr838exploit/metldrpwn.c: In function 'metldrpwn_init':
/home/monkey/metldr838exploit/metldrpwn.c:807: warning: label 'bad5' defined but not used
Building modules, stage 2.
MODPOST 1 modules
CC /home/monkey/metldr838exploit/metldrpwn.mod.o
LD [M] /home/monkey/metldr838exploit/metldrpwn.ko
make[1]: Leaving directory `/home/monkey/headers/usr/src/linux-headers-2.6.38-powerpc64 -otheros'
monkey@ps3:~/metldr838exploit$
(I have the build symlink pointing to the headers folder for: linux-headers-2.6.38-powerpc64-otheros_2.6.38-powerpc64-othe ros-10.00.Custom_powerpc.deb (unpacked in home subdirectory). I am still on 2.6.38., but getting closer on compiling the kernel, all errors gone now, just a couple of warnings, so haven't installed it yet.)
[Updated on: Thu, 12 July 2012 01:14] Report message to a moderator
|
|
|
|
| Re: Make error messages [message #1625 is a reply to message #1622] |
Fri, 13 July 2012 13:13   |
masterzorag
Messages: 99 Registered: August 2011 Location: maiworld
|
Gitbrew Member |
|
|
Quote:/home/monkey/metldr838exploit/metldrpwn.c:512:1: warning: "/*" within comment
error is "/*" position, it's part of init-end of a multiline comment, just spend some minutes to follow control, it is safe to remove /* at line 512 and only to get rid of that warning.
I've cross-compiled metldrpwn kernel module following glevand's howtos about cross-compiling kernel modules.
assuming kernel source at /some/where/linux-3.2.23 and metldrpwn sources at /some/where/metldrpwn, here is how I've edited the Makefile:
KSRC_DIR=../linux-3.2.23
obj-m += metldrpwn.o
all:
make ARCH=powerpc CROSS_COMPILE=powerpc64-linux- -C $(KSRC_DIR) M=$(PWD) modules
clean:
make ARCH=powerpc CROSS_COMPILE=powerpc64-linux- -C $(KSRC_DIR) M=$(PWD) clean
I append to system PATH the cross-compiler one before calling the Makefile from /some/where/metldrpwn
export PATH=$PATH:/opt/powerpc64-linux-gcc-4.4.5/bin
make
simple
[Updated on: Tue, 17 July 2012 10:00] Report message to a moderator
|
|
|
|
| Re: Make error messages [message #1638 is a reply to message #901] |
Mon, 16 July 2012 17:18  |
JLM-
Messages: 12 Registered: February 2012
|
Gitbrew Noob |
|
|
Thanks for your help. I guess everyone else has their warnings turned down or knows you can ignore those 2 messages. The metldrpwn.ko that it compiled worked fine.
Thanks for the cross compile information, still trying to figure out that part so I can cross compile something else.
|
|
|
|