/amiga_cross_helloworld

Compile and run a hello world program in a Docker container.

Primary LanguageMakefileGNU General Public License v3.0GPL-3.0

amiga cross helloworld

1 Changes

  • 2017-05-16: Version 0.1 - initial version
Status:Works
Location:https://github.com/perweij/amiga_cross_helloworld

2 Description

This is a working Docker setup for compiling and running Amiga programs from GNU/Linux (possibly from other environments too). The cross compilation environment is a minor fork of https://github.com/cahirwpz/amigaos-cross-toolchain, and the emulation is done in fs-uae. It is implementing the ideas presented here. Using Docker’s mapped folders, the source files can be conveniently edited in the host environment. Compilation and execution is also fully controlled from the host environment. The emulator works with both graphics and sound.

The project pulls the image perweij/amigaos-cross-toolchain from Docker. That image is automatically built when this Dockerfile is updated.

Check here for a video demo.

2.1 Compiling

By running make all in the host environment, the compiler within the Docker image is executed, producing an ADF-image containing the program, ready to be booted in the emulator.

2.2 Running

By running make run in the host environment, the emulator is called within the Docker image, booting the ADF-image produced in the compiling step, causing the program to be executed.

The emulator is run with the configuration file a1200.fs-uae. By default it uses the free AROS rom instead of an original rom dump.

Please note that the emulator is called with Docker flags --device=/dev/video0 and --device=/dev/snd which could probably be used to compromise your machine from withing the Docker image somehow, so use with care, I can not be held responsible for any damage. You can build the Docker image from scratch yourself, using the Dockerfile. If you add --privileged to RUNCMD, you make the harmless libGL-warnings disappear.

3 Prereqs

Docker CE must be installed on the host, and GNU Make (unless you want to run the commands manually). You also need xhost. The two latter can be installed with

apt-get install make x11-xserver-utils

4 Install

Clone https://github.com/perweij/amiga_cross_helloworld.git .

5 Usage

make clean all run

6 Todo

  • include parts in assembler. This would be trivial, as the cross compilation environment contains an assembler among other things.

7 Related work