[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: m68kboot (was: 68k kernel under Hatari)


On 4/3/19 10:46 AM, Geert Uytterhoeven wrote:
On Wed, Apr 3, 2019 at 9:30 AM John Paul Adrian Glaubitz
<glaubitz@physik.fu-berlin.de> wrote:
On 4/3/19 9:16 AM, Geert Uytterhoeven wrote:
The CVS server no longer exists. I forgot if we already have a public
copy of m68kboot.git. If we don't, I can push mine to github.

Yes, please :). I would be interested to see that code.



Documentation mentions that building it is tricky because it
needs both AmigaOS & Atari TOS build-chains and Linux headers.

Debian doesn't include those toolchains, but nowadays there are
several different potential ways to overcome that:

1. Compiling it with Debian's m68k ELF GCC and converting
resulting ELF binaries to Amiga & Atari native binary formats. [1]
Has anybody tested whether that would work?

2. Building AmigaOS & AtariTOS cross-compilers from sources
(hopefully in separate package) and using those for building.

Easiest and smallest alternative for that would probably be
VBCC as it supports both target OSes:

VBCC downsides are its license (non-commercial open source),
it producing noticeably slower code than GCC and having somewhat
buggier m68k code-generation when I last tested it (Vasm is great

3. Building native compiler and using it inside emulation,
as all the necessary pieces for that are Open Source:
  - Atari emulator (Hatari or Aranym)
  - ROM (EmuTOS) and shell (EmuCON2)
  - TOS compiler (GCC, VBCC, or AHCC)

(I think EmuTOS could be built with Debian m68k (ELF) gcc, instead
of TOS a.out GCC version, with relatively small changes.  Of
the listed compilers, AHCC is by far smallest, somewhat buggy,
least standards compatible, and doesn't support cross-compiling,
only AtariTOS.)

	- Eero

[1] After some searching, I found three different projects
for converting ELF binaries to TOS:
- https://github.com/iamgreaser/stelf
- https://github.com/ardi69/m68k-atari-mint-elf/blob/master/tools/tostool.c
- https://bitbucket.org/ggnkua/brownout

I'm not sure how well first two work, but apparently last one
has been used with real programs (demos and games, including
a Doom port, using assembly, C and C++). Here are (somewhat ugly)
related scripts to build GCC *and* ELF version of Atari libc:

Maybe something similar is available also for AmigaOS?

Reply to: