Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There are error when make the code #9

Open
llllIIIllll opened this issue May 25, 2022 · 3 comments
Open

There are error when make the code #9

llllIIIllll opened this issue May 25, 2022 · 3 comments

Comments

@llllIIIllll
Copy link

└─$ make
aarch64-linux-android31-clang -Os -nostdlib -c -o stage2-c.o stage2-c.c
aarch64-linux-android31-clang -nostdlib -c -o stage2.o stage2.S
aarch64-linux-android31-clang -T stage2.lds -nostdlib -nostartfiles -static -o stage2 stage2-c.o stage2.o
echo -n "unsigned long stage2_libname_addr = 0x" > stage2-symbol.h
(nm stage2 | grep -e ' T libname'| cut -f 1 -d " " | tr -d $'\n'; echo "UL - 0x2000UL;") >> stage2-symbol.h || (rm stage2-symbol.h; false)
echo -n "unsigned long stage2_root_cmd_addr = 0x" >> stage2-symbol.h
(nm stage2 | grep -e ' T root_cmd'| cut -f 1 -d " " | tr -d $'\n'; echo "UL - 0x2000UL;") >> stage2-symbol.h || (rm stage2-symbol.h; false)
aarch64-linux-android31-clang -O2 -Os -c -o dirtypipe-android.o dirtypipe-android.c
aarch64-linux-android31-clang -O2 -Os -c -o elf-parser.o elf-parser.c
aarch64-linux-android31-clang -c -o stage1.o stage1.S
aarch64-linux-gnu-objcopy -O binary -j .text stage2 stage2.text
aarch64-linux-android31-clang -Os -nostartfiles -o modprobe-payload modprobe-payload.c -llog
modprobe-payload.c:49:24: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
LOGV("Parse: %d %d", root_cmd - cmdline, r - 1);
~~ ^~~~~~~~~~~~~~~~~~
%ld
modprobe-payload.c:24:79: note: expanded from macro 'LOGV'
#define LOGV(...) { __android_log_print(ANDROID_LOG_INFO, "modprobe-payload", VA_ARGS); }
^~~~~~~~~~~
1 warning generated.
llvm-strip modprobe-payload
make: *** No rule to make target '../../p6/kernel/out/android-gs-pixel-5.10/dist/mymod.ko', needed by 'mymod.ko'. Stop.


how to solve the problem tanks!

@polygraphene
Copy link
Owner

You can ignore this error.
Remove following 2 lines, then re-run make.

mymod.ko: $(MYMOD_COPY)
cp $(MYMOD_COPY) mymod.ko

@Somnus0737
Copy link

I alse came across a error:

clang-14: error: no input files
make: *** [Makefile:29: stage2-c.o] Error 1

I used android-ndk-r25b, how to sovle this problem? Thanks

@franklin654
Copy link

How to build this code for x86_64 Android 12 emulator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants