LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This 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


Reply
  Search this Thread
Old 02-03-2015, 05:46 AM   #1
vfpereira
LQ Newbie
 
Registered: Feb 2015
Posts: 2

Rep: Reputation: Disabled
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?
 
Old 02-07-2015, 10:30 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,455

Rep: Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353
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.
 
Old 02-09-2015, 04:32 AM   #3
vfpereira
LQ Newbie
 
Registered: Feb 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
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.
 
Old 02-10-2015, 04:52 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,455

Rep: Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
g++ toolchain for ARM platform yuchankit Slackware 3 10-07-2012 12:33 AM
ARM Embedded Linux Prashant.Linux10 Linux - Newbie 0 10-22-2011 09:36 AM
unable to port Wvdial in embedded ARM platform richejose Linux - Embedded & Single-board computer 6 11-25-2010 02:44 AM
embedded linux on ARM audiogreenie Linux - Embedded & Single-board computer 1 02-02-2009 11:52 AM
LXer: Z80 inventor Zilog embraces ARM9, Linux LXer Syndicated Linux News 0 10-03-2008 03:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 10:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration