UBUNTU运行arm成程序(转帖)

Ubuntu的arm魔术

不久前编译了一个arm平台的busybox,很好奇如果在x86下运行arm的程序会怎么样呢,会有什么样的出错信息呢?于是直接在我的amd cpu上运行这个arm的busybox。神奇的事情出现了,这个arm的busybox居然运行了。

这是为什么呢?

大家安装一个qemu-arm-static包就明白了。安装了这个包就可以直接运行arm的程序。这个包在内核中注册binfmt支持,能够在x86平台上运行armel二进制文件。

static qemu-arm binary that enables to use arm chroots

The static version of teh qemu-arm binary registers automatically with
the binfmt-support setup in the kernel, enabling the execution of armel
binaries on x86 hosts. The package also includes a script to generate armel
chroots.

/.
/usr
/usr/bin
/usr/bin/qemu-arm-static
/usr/bin/build-arm-chroot
/usr/share
/usr/share/binfmts
/usr/share/binfmts/arm
/usr/share/doc
/usr/share/doc/qemu-arm-static
/usr/share/doc/qemu-arm-static/copyright
/usr/share/doc/qemu-arm-static/changelog.Debian.gz
/etc
/etc/sysctl.d
/etc/sysctl.d/qemu-arm-static.sysctl.conf

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值