Architect is a utility that wraps one or more binaries allowing the resulting binary to be run on both ARMHF and ARMEL Kindles.
- Compile this program using
meson setup builddir_ARCH&meson compile -C builddir_ARCH - Add the armel and armhf target binaries to the compiled program:
- objcopy --add-section .sf_payload=target_sf architect architect
- objcopy --add-section .hf_payload=target_hf architect architect
- Done! The final binary will now run on both
armelandarmhfKindles
The hf_payload section is optional as armel binaries should be able to run under the armel interpreter.
- Check system architecture
- Get the required interpreter and binary data
- Create a temporary file & write target payload to it
- Fork
- Execute the temporary file
- Wait for subprocess to exit
- Delete the temporary file