Building an AmigaOS Development Environment in 2026

Building an AmigaOS Development Environment in 2026

2026 年构建 AmigaOS 开发环境

Tagged as: retrocomputing, amiga, gcc, linux Written on: 2026-07-20 by Daniel Kochmański 标签: 复古计算,amiga,gcc,linux 作者: Daniel Kochmański,2026年7月20日


Apropos of nothing, I decided to set up an Amiga development environment. Since figuring things out wasn’t straightforward, I wrote down instructions for Linux about how to compile the first program and run it in an emulator. Enjoy!

出于某种原因,我决定搭建一套 Amiga 开发环境。由于摸索过程并不简单,我将如何在 Linux 上编译第一个程序并在模拟器中运行的步骤记录了下来。希望对你有帮助!

Prerequisites

前置要求

In this post I’m assuming that the reader is a proficient Linux user who can build software from source code and figure out missing dependencies. Standard build tools should be sufficient to get started. Basic understanding of shell commands is also expected.

在本文中,我假设读者是一位熟练的 Linux 用户,能够从源代码构建软件并解决缺失的依赖项。标准的构建工具足以入门。此外,还需要对 Shell 命令有基本的了解。

More detailed instructions on how to build the toolchain are available here: https://franke.ms/amiga/amiga-gcc.wiki. Another rather problematic requirement is that to run AmigaOS, you need ROM images (firmware) and workbench disks (installation media). They may be bought from legal sources or dumped from owned hardware. Alternatively one could use the AROS ROM that is shipped with the emulator, although it is known to have worse compatibility with standard Amiga software.

关于如何构建工具链的更详细说明,请参考:https://franke.ms/amiga/amiga-gcc.wiki。另一个比较棘手的要求是,要运行 AmigaOS,你需要 ROM 镜像(固件)和 Workbench 磁盘(安装介质)。这些可以从合法渠道购买,或从你拥有的硬件中提取。或者,也可以使用模拟器自带的 AROS ROM,尽管众所周知它对标准 Amiga 软件的兼容性较差。

Toolchain

工具链

To build programs for AmigaOS we need the compiler. A popular tool is amiga-gcc. First I tried to use the default (the most battle-tested) GCC branch, but while the produced executable worked, loading the binary in m68k-amigaos-gdb caused a segmentation fault. After some trial and error I reported the issue and the toolchain maintainer, Stefan ‘bebbo’ Franke, kindly explained that the toolchain now produces DWARF2 debug info and then fixed a bug in embedding debug sections in the final executable.

要为 AmigaOS 构建程序,我们需要编译器。一个流行的工具是 amiga-gcc。起初我尝试使用默认的(经过最充分验证的)GCC 分支,虽然生成的程序可以运行,但在 m68k-amigaos-gdb 中加载二进制文件时会导致段错误。经过一番尝试,我报告了这个问题,工具链维护者 Stefan ‘bebbo’ Franke 友好地解释说,该工具链现在生成 DWARF2 调试信息,并修复了在最终可执行文件中嵌入调试段的一个 Bug。

I’ve finally settled on a branch amiga16.1 for GCC and on a branch amiga-2.46 for binutils (it contains the abovementioned fix). Note that make update may fail due to connection errors. In that case rerun it until everything is downloaded. Both make update and make all may take some time - on my machine everything takes about 1 hour.

最终,我选择了 GCC 的 amiga16.1 分支和 binutils 的 amiga-2.46 分支(它包含了上述修复)。请注意,make update 可能会因连接错误而失败。在这种情况下,请重新运行直到所有内容下载完成。make updatemake all 都可能需要一些时间——在我的机器上,整个过程大约需要 1 小时。

export WORKSPACE=${HOME}/Workshop/AmigaOS
export TOOLCHAIN=${WORKSPACE}/amiga-gcc-toolchain
export PREFIX=${TOOLCHAIN}
mkdir -p ${WORKSPACE}
cd ${WORKSPACE}
git clone https://franke.ms/git/bebbo/amiga-gcc.git
pushd amiga-gcc
make branch branch=amiga16.1 mod=gcc
make branch branch=amiga-2.46 mod=binutils
make update
make all
# Check whether the compiler works.
${TOOLCHAIN}/bin/m68k-amigaos-gcc -v
popd

Now we have a working AmigaOS toolchain. It supports a few different runtime/libc versions. When nothing is specified it defaults to newlib.

现在我们拥有了一个可用的 AmigaOS 工具链。它支持几种不同的运行时/libc 版本。如果不指定,默认使用 newlib。

export WORKSPACE=${HOME}/Workshop/AmigaOS
export TOOLCHAIN=${WORKSPACE}/amiga-gcc-toolchain
export PATH=${TOOLCHAIN}/bin:${PATH}
mkdir Shared
pushd Shared
cat > woosh.c <<EOF
#include <stdio.h>
void hi(void) { printf("jd was here \o/\n"); }
int main() { hi(); return 0; }
EOF
m68k-amigaos-gcc -g woosh.c -o woosh.out
file woosh.out
# woosh.out: AmigaOS loadseg()ble executable/binary
popd

Congratulations! We’ve just built our first AmigaOS program. It seems that file has a bit of a problem parsing AmigaOS executables, but the binary works.

恭喜!我们刚刚构建了第一个 AmigaOS 程序。看起来 file 命令在解析 AmigaOS 可执行文件时有点小问题,但二进制文件本身是可以运行的。

Emulator

模拟器

Now how to run this file? We need two pieces: the emulator and AmigaOS ROMs. Obtaining the emulator is straightforward. I picked Amiberry, because it provides a good developer experience - built-in bsdsocket.library, virtual hard disks and shared directories, and it works well on Linux. Another good contender is FS-UAE. Both should work well. They have binary releases or we can build them from source. We’ll install Amiberry from Flathub:

现在如何运行这个文件呢?我们需要两样东西:模拟器和 AmigaOS ROM。获取模拟器很简单。我选择了 Amiberry,因为它提供了良好的开发体验——内置了 bsdsocket.library、虚拟硬盘和共享目录,并且在 Linux 上运行良好。另一个不错的选择是 FS-UAE。两者都应该能很好地工作。它们有二进制发行版,或者我们也可以从源码构建。我们将从 Flathub 安装 Amiberry:

flatpak install flathub com.blitterstudio.amiberry

Obtaining ROMs is a bit harder. If you own the original hardware you may already have a legal dump. Otherwise you may buy them from https://www.amigaforever.com/ or https://www.hyperion-entertainment.com/. Assuming that you have ROMs, we may start the emulator and configure our target system.

获取 ROM 则稍微困难一些。如果你拥有原始硬件,你可能已经有了合法的转储文件。否则,你可以从 https://www.amigaforever.com/https://www.hyperion-entertainment.com/ 购买。假设你已经有了 ROM,我们就可以启动模拟器并配置目标系统了。

We need the following files: ROM file: kick.a1200.46.143 floppies: Install314.adf, Workbench314.adf, etc

我们需要以下文件: ROM 文件:kick.a1200.46.143 软盘:Install314.adf, Workbench314.adf 等

mkdir -p Amiberry/{ROMs,Floppies}
# Amiberry expects .a1200 file extension (it doesn't recognize .46.143)
cp Nero/ROMs/kick.a1200.46.143 Amiberry/ROMs/kick.a1200
cp Nero/Floppies/*.adf Amiberry/Floppies
flatpak run com.blitterstudio.amiberry

Now navigate to the “Paths” tab and configure them to point to the directory “Amiberry” that we just created. Confirm when prompted to create subdirectories. Then click the “Rescan Paths” button and go back to the “Quickstart” tab.

现在导航到“Paths”选项卡,将其配置为指向我们刚刚创建的“Amiberry”目录。当提示创建子目录时确认即可。然后点击“Rescan Paths”按钮,回到“Quickstart”选项卡。

Amiga hardware has a few distinct flavors with different hardware configurations and running variations of M68K CPU. RAM is divided between the “chip memory” that is accessible directly by custom chips (graphics, audio and DMA) and “fast memory” - general-purpose RAM. The first one is usually 1-2 MB, while the latter can typically be expanded to something like 4 MB of Fast RAM. That’s plenty! We will pick Amiga 1200, because it has AGA (Amiga Advanced Graphics Architecture) chipset and 4 MB Fast RAM expanded configuration.

Amiga 硬件有几种不同的版本,具有不同的硬件配置和 M68K CPU 变体。内存分为“芯片内存”(可由自定义芯片如图形、音频和 DMA 直接访问)和“快速内存”(通用 RAM)。前者通常为 1-2 MB,而后者通常可以扩展到 4 MB 左右的快速内存。这已经足够了!我们将选择 Amiga 1200,因为它拥有 AGA(Amiga 高级图形架构)芯片组和 4 MB 快速内存扩展配置。

Model: Amiga 1200 Configuration: 4 MB Fast RAM expanded configuration Emulated Drives (DF0): Install314.adf

型号:Amiga 1200 配置:4 MB 快速内存扩展配置 模拟驱动器 (DF0):Install314.adf

While installing, the floppy will need to be replaced by files requested by the installer. The emulated drive DF0 represents the floppy drive. To get back to the configuration menu while the virtual machine is running, press F12. Then navigate to the “ROM” tab and select kick.a1200 ROM as the “Main ROM File”. Then go to “Expansions” tab and enable bsdsocket.library. We’ll need TCP/IP connection later to run bgdbserver. Finally add a virtual hard drive and a shared directory: Navigate to “Hard drives/CD” tab, Select “Create Hardfile” (1024MB, RDB Mode enabled), Select “Add Hardfile” and select the newly created file, Select “Add Directory”. These drives will be visible in Amiga as DH0 and DH1, respectively. RDB is Amiga’s native partition table format.

在安装过程中,需要根据安装程序的要求更换软盘。模拟的 DF0 驱动器代表软盘驱动器。要在虚拟机运行时回到配置菜单,请按 F12。然后导航到“ROM”选项卡,选择 kick.a1200 ROM 作为“Main ROM File”。接着进入“Expansions”选项卡并启用 bsdsocket.library。稍后我们需要 TCP/IP 连接来运行 bgdbserver。最后,添加一个虚拟硬盘和一个共享目录:导航到“Hard drives/CD”选项卡,选择“Create Hardfile”(1024MB,启用 RDB 模式),选择“Add Hardfile”并选择刚才创建的文件,然后选择“Add Directory”。这些驱动器在 Amiga 中将分别显示为 DH0 和 DH1。RDB 是 Amiga 原生的分区表格式。