[英]Can old ARM32 binary files be run on AARCH64 kernel?
I am curious about the feasibility of running old ARM32-Linux programs on AARCH64-Linux machines and I conducted some experiments: 我很好奇在AARCH64-Linux机器上运行旧的ARM32-Linux程序的可行性,我进行了一些实验:
(All binary files including busybox in the ramdisk are statically compiled.) (所有二进制文件包括ramdisk中的busybox都是静态编译的。)
Result: 结果:
line 1: syntax error: unexpected word (expecting ")") 第1行:语法错误:意外的单词(期待“)”)
Is there suggestion or expertise to solve the issue above? 是否有解决上述问题的建议或专业知识?
Thank you moonbutt74. 谢谢moonbutt74。 You had provided an useful clue for me to seek the solution to that issue. 您为我寻找解决该问题的方法提供了有用的线索。
To enable the support of running ARM32-Linux programs on AARCH64 kernel, the option in the kernel should be selected: 要在AARCH64内核上启用运行ARM32-Linux程序的支持,应选择内核中的选项:
Userspace binary formats ---> Kernel support for 32-bit EL0 用户空间二进制格式--->内核支持32位EL0
recompile the kernel by running make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
通过运行make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
重新编译内核make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
run the recompiled kernel with ramdisk and qemu-system-aarch64. 使用ramdisk和qemu-system-aarch64运行重新编译的内核。
the "Hello, World!" “你好,世界!” programs in (ARM32 and AARCH64) can be executed successfully !! (ARM32和AARCH64)中的程序可以成功执行!!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.