简体   繁体   English

适用于运行Linux 2.4.18和运行G.2.4的Mac G4的PowerPC 405计算机的构建

[英]Building for PowerPC 405 machine running Linux 2.4.18 with a Mac G4 running 2.4.27

I presently run Linux 2.4.27 (Debian Sarge) on a PowerPC Mac G4 machine. 我目前在PowerPC Mac G4机器上运行Linux 2.4.27(Debian Sarge)。 I need to write software for Linux 2.4.18 running on a PowerPC 405 machine, and the binaries I am producing on my Mac G4 running 2.4.27 with both GCC 3.3.5 and GCC 2.95.3 (I have both installed) are having problems; 我需要编写在PowerPC 405机器上运行的Linux 2.4.18的软件,而我在运行G. 3.3.5和GCC 2.95.3(均已安装)的Mac G4上运行2.4.27的二进制文件具有问题; I have built a static version of cURL with both compilers that segfaults when run on this 2.4.18 PowerPC 405 machine. 我在两个2.4.18 PowerPC 405计算机上运行时,都使用两个编译器构建了一个静态版本的cURL。 I have noticed that binaries built on a 2.4.18 kernel with a cross compiler work (x86->PPC), however. 我注意到,二进制文件是基于2.4.18内核构建的,具有交叉编译器功能(x86-> PPC)。 Unfortunately, the machine that makes those binaries is unavailable to me, and I am really trying to get the Mac to be the "one stop shop" in this development effort (I want to be able to test and run on this machine). 不幸的是,制作这些二进制文件的机器对我来说是不可用的,并且我真的在努力使Mac成为这一开发工作中的“一站式服务”(我希望能够在这台机器上进行测试并运行)。

I cannot find a 2.4.18 distribution of Linux for PowerPC anywhere. 我在任何地方都找不到适用于PowerPC的2.4.18 Linux发行版。 What can I do to build binaries that will work on a PowerPC 405 machine running Linux 2.4.18 given a PowerPC Mac G4 running a 2.4.27 kernel? 给定运行2.4.27内核的PowerPC Mac G4,我该怎么做才能在运行Linux 2.4.18的PowerPC 405计算机上运行二进制文件? Is building GLIBC for 2.2.5 and setting the compilers to use it the answer, or do I have to somehow build a whole kernel of 2.4.18 to support what I am trying to do? 是为2.2.5构建GLIBC并设置编译器以使用它的答案,还是我必须以某种方式构建2.4.18的整个内核来支持我想做的事情?

Several weeks later, it appears that the solution suggested by user sessyargc.jp was indeed to use a cross compiler. 几周后,看来sessyargc.jp建议的解决方案确实是使用交叉编译器。 I am accepting my answer only because I want to close this question out and I can find no way to give sessyargc.jp credit, since he/she only made a comment. 我接受我的回答只是因为我想结束这个问题,而且我找不到办法赞扬sessyargc.jp,因为他/她只发表了评论。 Still, thank you sessyargc.jp for pointing the way! 尽管如此,还是感谢sessyargc.jp指明了方向!

I solved a similar problem in the past, I used the QEMU emulator on my x86 machine. 我过去解决了类似的问题,我在x86机器上使用了QEMU仿真器。

QEMU emulates the PowerPC-405 CPU too, here is the list of emulated PowerPC CPUs https://github.com/hackndev/qemu/blob/master/target-ppc/STATUS . QEMU也模拟PowerPC-405 CPU,这是模拟的PowerPC CPU列表https://github.com/hackndev/qemu/blob/master/target-ppc/STATUS

QEMU turns your PC in an hypervisor ie works like VirtualBox . QEMU使您的PC进入虚拟机管理程序,即像VirtualBox一样工作。 But QEMU can also emulate CPUs that are different from the host PC one. 但是QEMU也可以仿真与主机PC不同的CPU。

You can install and run a PowerPC Linux VM on a standard(cheap) x86 PC and compile your binaries directly in that VM. 您可以在标准(廉价)x86 PC上安装和运行PowerPC Linux VM,并直接在该VM中编译二进制文件。 CPU emulation is a bit slow, but it works. CPU仿真有点慢,但是可以。

Regards 问候

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM