Recent

Author Topic: Small virtual machine to cross compile FPC  (Read 36839 times)

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Small virtual machine to cross compile FPC
« Reply #15 on: April 14, 2015, 11:01:31 am »
Virtual Machines definitely changed the way developers work! [for the better]

Tempora mutantur nos et mutamur in illis :)

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Small virtual machine to cross compile FPC
« Reply #16 on: April 14, 2015, 09:19:02 pm »
I'm making a little more progress on this.  I just built (on Ubuntu 12.04) a minimal i386 VM with QEMU with ReactOS 0.3.17 (notes below).  Next I  hope to add fpcup (or something similar) to compile trunk to get  an embedded ARM compiler which I hope to use with Teensy https://www.sparkfun.com/products/12646.

Download http://reactos.org/ ReactOS-0.3.17-REL-iso.zip (88MB) and unzip to get ReactOS-BootCD.iso (103MB)
qemu-img create -f qcow2 reactos0317.img 2G

qemu-system-i386 -m 512 -hda reactos0317.img -cdrom ReactOS-BootCD.iso -boot d
For the install I just pressed <Enter> for everything.  When it reboots (twice) don't hit any key so it won't boot from the CD.

Shut down ReactOS.  The QEMU image file is 280MB.

Restart with networking:
qemu-system-i386 -m 512 -hda reactos0317.img -boot c -net nic -net user

In the VM (I hope to edit this more ASAP):
Double-click on the Command Prompt and run ipconfig.
I installed Firefox 3.6 (28 and 37 had problems) with the ReactOS Application Manager and then downloaded https://github.com/LongDirtyAnimAlf/Reiniero-fpcup fpcup.exe and ran it.  There are several problems that will hopefully be solved soon.

No, you don't want to use ReactOS for your desktop operating system, but it might be good enough to use for some specific things (like putting in a small VM).  I've had a bit of fun with ReactOS for some time: http://turbocontrol.com/reactos.htm
Regards,
Paul Breneman
www.ControlPascal.com

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Small virtual machine to cross compile FPC
« Reply #17 on: May 24, 2015, 07:25:36 pm »
Just updated my previous message for creating a small VM with the Debian version 8 (Jessie) release.
Regards,
Paul Breneman
www.ControlPascal.com

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Small virtual machine to cross compile FPC
« Reply #18 on: May 25, 2015, 08:21:04 pm »
Maybe I need to mention the word embedded to get more feedback in this thread?   :)

When I'm in a forum or in a meeting with electrical engineers, how can I introduce them to Free Pascal?

I'd like to suggest they spend very little money and purchase Teensy:
https://www.sparkfun.com/products/12646

Then I'd like to have a small VM they could download and with just a few steps compile and run a program on the Teensy.

http://www.turbocontrol.com/monitor.htm is a simple introduction for non-embedded systems.  I'd like a simple introduction for embedded systems, and it seems a small VM with fpcup is the way to go.  Other suggestions?  Please understand that these folks are mostly electrical engineers and not full-time programmers.

*** a few notes pertaining to previous messages ***

On Ubuntu kvm can be substitued for quem-system-i386 and things work much faster.

I am interested in working on a console version of fpcup to use in a small linux console VM, and I'd also like to get the present fpcup (GUI) working in my ReactOS VM.
Regards,
Paul Breneman
www.ControlPascal.com

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Small virtual machine to cross compile FPC
« Reply #19 on: July 18, 2015, 06:21:08 pm »
I've added a wiki page (http://wiki.freepascal.org/Small_Virtual_Machines) where I hope to collect this info.
Regards,
Paul Breneman
www.ControlPascal.com

eny

  • Hero Member
  • *****
  • Posts: 1634
Re: Small virtual machine to cross compile FPC
« Reply #20 on: July 19, 2015, 12:28:08 am »
I've added a wiki page (http://wiki.freepascal.org/Small_Virtual_Machines) where I hope to collect this info.
As it is (the wiki page) there is no relation with Lazarus whatsoever.
Better move it to some Linux wiki.
All posts based on: Win10 (Win64); Lazarus 2.0.10 'stable' (x64) unless specified otherwise...

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Small virtual machine to cross compile FPC
« Reply #21 on: July 19, 2015, 03:45:16 am »
This message thread is in the Free Pascal section of the forum and there is now a part of the Debian example that shows how to compile and run a Free Pascal program (no Lazarus needed).  Thanks for your comment but I think it is an example of how to make a simple virtual machine and compile a simple program on it. I hope we can expand such simple examples for Teensy and other platforms so they can be used to introduce Free Pascal to real engineers.
Regards,
Paul Breneman
www.ControlPascal.com

eny

  • Hero Member
  • *****
  • Posts: 1634
Re: Small virtual machine to cross compile FPC
« Reply #22 on: July 19, 2015, 04:12:08 am »
This message thread is in the Free Pascal section of the forum and there is now a part of the Debian example that shows how to compile and run a Free Pascal program (no Lazarus needed).
It does now after you updated the wiki!

ReactOS could do with an fpc example too.
« Last Edit: July 19, 2015, 04:17:15 am by eny »
All posts based on: Win10 (Win64); Lazarus 2.0.10 'stable' (x64) unless specified otherwise...

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Small virtual machine to cross compile FPC
« Reply #23 on: July 19, 2015, 04:17:28 am »
Sorry eny that I posted a message in this thread before I did more with the wiki page.  If you read all of the messages in this forum thread I think it would be clear what my intentions are.  That is the first wiki page this old person has ever done.  Hopefully (with help) I'll learn more.
Regards,
Paul Breneman
www.ControlPascal.com

eny

  • Hero Member
  • *****
  • Posts: 1634
Re: Small virtual machine to cross compile FPC
« Reply #24 on: July 19, 2015, 11:50:11 am »
It's an interesting topic nonetheless.
All posts based on: Win10 (Win64); Lazarus 2.0.10 'stable' (x64) unless specified otherwise...

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Small virtual machine to cross compile FPC
« Reply #25 on: July 19, 2015, 09:10:22 pm »
Thanks eny.  I hope to start publishing more things on the wiki and github (instead of my web pages) so it is easier for others to contribute.
Regards,
Paul Breneman
www.ControlPascal.com

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Small virtual machine to cross compile FPC
« Reply #26 on: July 19, 2015, 11:14:51 pm »
Thanks eny.  I hope to start publishing more things on the wiki and github (instead of my web pages) so it is easier for others to contribute.
8-)
So you got a Win, a miniLinux, then the only thing missing is a mini-virtual-osx, then we got all what we need.
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Small virtual machine to cross compile FPC
« Reply #27 on: July 20, 2015, 01:33:49 pm »
Yeah, jc99, but there is nothing legally available for osx?
Regards,
Paul Breneman
www.ControlPascal.com

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Small virtual machine to cross compile FPC
« Reply #28 on: July 20, 2015, 09:48:21 pm »
To install OS x i found u.a.
http://www.sysprobs.com/guide-install-os-x-10-9-mavericks-on-vmware-workstation-with-windows-7-or-windows-8
As long as you buy a OS x you could use it in a vm
In some country the "only on Apple-Hardware" is nifty.
See Hackintosh
http://www.whyapple.us/how-to-install-niresh-mavericks-hackintosh-on-your-pc-110/
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Small virtual machine to cross compile FPC
« Reply #29 on: July 29, 2015, 01:01:47 am »
I updated the Debian instructions for compiling a Free Pascal program today on the http://wiki.freepascal.org/Small_Virtual_Machines page.

I also added a wget for downloading fpcup but it won't execute.  Any ideas or suggestions?
Regards,
Paul Breneman
www.ControlPascal.com

 

TinyPortal © 2005-2018