-
Notifications
You must be signed in to change notification settings - Fork 48
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
Unable to compile for arm_xscale #34
Comments
This should be a zig problem, there once a pr for fix: ziglang/zig#10756 Maybe you can find a cross compilation toolchain suitable for your device from openwrt, that should be able to compile. |
I use a docker image ( /src/armv5 # readelf -A pppwn
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "5T"
Tag_CPU_arch: v5T
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-2
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_rounding: Needed
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
Tag_ABI_align_needed: 8-byte
Tag_ABI_enum_size: int
Tag_ABI_optimization_goals: Aggressive Size |
Thanks for the update. I can confirm the binary runs on Linksys EA4500 but it doesn't successfully jailbreak my ps4 on 11.00. It will cause kernel panic on ps4 every time at stage 2 with output:
And this is the command line I launched pppwn with: |
Can you provide the whole logs? |
Here's the complete log:
And here's tcpdump capture file: |
I think this issue may be related to memory alignment. I don't have much experience working on embedded platforms and don't have the device to test, so I'm not sure if there are any other memory alignment issues. Therefore, I am here to describe in detail how I compiled and modified. If this build still cannot run, you may need to make the necessary modifications yourself. how to build
how to solve memory alignment problemLines 926 to 937 in cbc09a3
I think the problem lies in line 928: from the pcap dump, pppoe_softc_list should be: so I change the line 928 to: memcpy(&self->pppoe_softc_list, option + 3, sizeof(uint64_t));
self->pppoe_softc_list = htole64(self->pppoe_softc_list); If there are other issues, you may need to find similar code( p.s. You can use test3: https://github.com/xfangfang/PPPwn_cpp/tree/main/tests Execute on the router and compare the output results with those on the PC to make it easier to identify issues. Possible problem locationsLines 84 to 87 in cbc09a3
|
I think it's indeed a memory alignment problem. The updated binary won't crash the console at step 2 but it will cause kernel panic at stage 3 right after I'll take a look at the code. Thanks again |
I forgot one step, in order to compile, it need to modify one line of cmake: Line 133 in cbc09a3
COMMAND ${ZIG} cc ${CMAKE_C_FLAGS} -o ${CMAKE_BINARY_DIR}/pack ${mongoose_SOURCE_DIR}/test/pack.c |
I have a Linksys EA4500v2 router that has Marvell 88F6282 CPU with arm_xscale architecture. Compiling with option '-mcpu=xscale' returns a lot of undefined symbol errors:
LLD Link... ld.lld: error: undefined symbol: __sync_lock_test_and_set_4
Looked it up and seems like arm_xscale architecture (armv5) does not have atomic instructions. So I guess there is no easy fix for this.
Also verified the mipsel binary works on my Linksys EA7500v2 router (with MT7621 CPU).
The text was updated successfully, but these errors were encountered: