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

flashize-env: Illegal instruction [ERROR 132] #3

Closed
Lanchon opened this issue Apr 4, 2016 · 6 comments
Closed

flashize-env: Illegal instruction [ERROR 132] #3

Lanchon opened this issue Apr 4, 2016 · 6 comments

Comments

@Lanchon
Copy link
Owner

Lanchon commented Apr 4, 2016

Hi @Dees-Troy,

i need a second of your embedded linux expertise.

i built a recovery-based data-sparing repartitioning tool for android. this tool depends on too much stuff to reliably run on just any recovery environment, so i did a small foundation (the project hosting this issue) that bundles with the tool a full recovery environment and temporarily sets it up to run the tool. (the environments are usually borrowed from official TWRP as detailed in the docs and filenames.) (currently sets up the environment using LD_LIBRARY_PATH and some symlinks instead of chroot).

unfortunately i have an unforeseen problem: the /sbin/linker in TWRP (which can be run as a standalone binary) runs fine on some recovery environments but fails on others, printing "Illegal instruction", exit code 132. but i thought that the linker file was the right architecture for the device.

for instance:

  • same linker binary ran in both tests.
  • test A: manually invoke the linker without args in one particular phone, under one particular distro of TWRP 2.8.7.0.
    • outcome: works fine.
  • test B: manually invoke the linker without args in the same phone, under a different distro of the same version of TWRP, 2.8.7.0.
    • outcome: Illegal instruction [ERROR 132].

it looks like some build flag is causing this. could it be a kernel build flag? could it be a kernel that doesn't have VFP support enabled? what could be wrong?

thanks for your help!

@Lanchon
Copy link
Owner Author

Lanchon commented Apr 4, 2016

more info: Lanchon/REPIT#23 (comment)

Lanchon added a commit that referenced this issue Apr 6, 2016
@Lanchon
Copy link
Owner Author

Lanchon commented Apr 6, 2016

worked-around by significantly scaling down Flashize. the old (abandoned) version of Flashize affected by this issue can be found here.

@Lanchon Lanchon closed this as completed Apr 6, 2016
@Lanchon
Copy link
Owner Author

Lanchon commented Apr 6, 2016

@kularny,

hey arnab, i don't know but this might be the issue that's preventing TWRP 3 from booting with CM's 12.1 kernel. suggested test if you care to do it:

  • install CM 12.1 kernel (you can get several versions here)
  • push the /sbin/linker file from TWRP 3 to device's /tmp.
  • try running it; if it dies, very probably this would be the root cause.

@Dees-Troy
Copy link

If you build TWRP in an Android 6.0 tree you have to use a kernel that is compatible with 6.0's newer sepolicy version. Otherwise the kernel will panic causing a reboot in most cases. In the case of IsoRec, TWRP is booting with whatever kernel is in the boot partition so it may be necessary to build TWRP in an Android 5.1 tree to ensure that it boots with older kernels.

@Lanchon
Copy link
Owner Author

Lanchon commented Apr 6, 2016

thanks! i thought that permissive mode would eliminate all selinux issues and was suspecting some kind of abi problem.

@arny24x7
Copy link

arny24x7 commented Apr 6, 2016

WTF i am not getting any notifications :-s many new sepolicy patches were added in cm-13.0 kernel...My kernel also has those. I guess u can take my twrp tree commit and test it in cm-12.1. or when il release the final DU for 5.1...Il give it a shot.

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

3 participants