Migrating zilog z80 to arm arm embedded platform with virtualization
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Migrating zilog z80 to arm arm embedded platform with virtualization
i want to migrate a code from zilog z80 to a arm embedded platform(cubietruck), anyone has some ideia if is possible to virtualize this arm to run in one instance linux in another the the old code of z80 adapted acting like a firmware and using some linux services through tcp/ip for example?
I imagine not. It might depend on how many support chips the old design had. If the old board had a typical - serio chip, timer chip, PIA (peripheral interface adapter) and some other one, the code there will be addressing the support chips and you will have to go to assembler there. Z80 assembler is the most bizzare stuff out there; One byte, 2 byte and three byte instructions. It used a instructions of the 8080, and had more than 256 instrictions. So there was this code (EC? It's been a long time) which meant "The next instruction is going to be a special instruction," and that gave you up to four byte instructions.
The Z80 was very limited and ran using a plethora of support chips at 4 Mhz :-/. RS232 needed a support chip. If you start getting fancy, it slows to nothing. Nothing back then was fully synchronous.
I would first try to get C code for your board's program, and try recompiling it for arm. You will have to rewrite out any of it's support chips. Emulating seems the harder way.
Ok, thanks, just more one question. If i rewrite my C code has some advantage in create a device driver in kernel of linux for peripherals?, i ask because all the I/O in z80 was serial before.
Driver for what? I wouldn't write a driver unless you're trying to kick this project to touch. Linux handles serio fairly well.
One option to consider is to emulate the old board. That gets you around getting to know your old board on such intimate terms. I say simulate, not emulate. Here's the idea: Let's say you're working in Assembler: Z80 dis-assemblers usually work out the 1,2,3,4 byte instructions for you. Mark out, for example, access to the support chips (the entire code block) and write a function to implement that in arm. Arm code will be much more efficient.
Personally I feel that unless they have some very clever control function you need, the old flowchart is a lot better place to start than the old code. Circuitry has all sped up _so_ much since those days. The z80 did 1 BogoMip - or 250,000 - 1,000,000 instructions per second depending on instruction length, as opposed to the arm at 1Ghz+. Serial I/O will hardly be any use - if it is, your product should be obsolete. Not much uses RS232 RS485, maybe a little more. People think usb now
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.