Uzebox / uzebox

A retro-minimalist game console engine for the ATMega644
http://uzebox.org
126 stars 43 forks source link

Haiku support #119

Closed danboid closed 4 months ago

danboid commented 1 year ago

I prefer Haiku to Linux in many ways and I would like to be able to switch to it as my main OS one day. It currently has bigger fish to fry in that respect with missing features such as HW virtualization and lacking proper support for most modern graphics hardware but one Haiku goal that we can realistically achieve soon is making Haiku a supported Uzebox dev platform.

Haiku is already 99% of the way to be being a great Uzebox dev platform. It already has ports of avr-gcc, gdb, the popular GNU tools, avrdude, vim, kate etc etc and both Uzem and cuzebox already build and run under Haiku so its just the Uzebox tools we have to add Haiku support for which I imagine should be pretty easy to do.

If I run make in the root dir of the Uzebox repo under Haiku R1b4 it successfully builds Uzem but then the packrom makefile errors saying Haiku is an Unsupported platform. Haiku supports POSIX so it should be easy enough to get the tools building with a few tweaks to the Makefiles.

Under Haiku, push Windows key, Alt and T to open the terminal. That's about all you need to know I think :D

Before you try building the Uzebox repo under Haiku, run:

pkgman update
<reboot>
pkgman install avr_gcc libsdl2_devel

To install the deps.

Haiku has a much newer version of avr-gcc in its repo than Debian and Ubuntu - v13.1.0

danboid commented 1 year ago

I have also tried building the Uzebox repo under FreeBSD but Haiku gets further because Haiku at least manages to build Uzem before it errors. FreeBSD errors early in the Uzem build process but I don't recall what the exact error is.

It would be cool to see someone add (Free/Net/Open) BSD support to the Uzebox repo.

weber21w commented 7 months ago

I don't know if there are others on the forum who use *BSD or Haiku, but since they are POSIX this might work?(I have no way to test): //Add this wherever under Linux case in the Uzem makefile:


## NetBSD #############################
ifeq ($(OS),NetBSD)
OS := LINUX
PLATFORM := Unix
CC := g++
MKDIR := mkdir -p
RM := rm -rf
MTOOLS = 
endif

## FreeBSD #############################
ifeq ($(OS),FreeBSD)
OS := LINUX
PLATFORM := Unix
CC := g++
MKDIR := mkdir -p
RM := rm -rf
MTOOLS = 
endif

## OpenBSD #############################
ifeq ($(OS),OpenBSD)
OS := LINUX
PLATFORM := Unix
CC := g++
MKDIR := mkdir -p
RM := rm -rf
MTOOLS = 
endif

## Haiku #############################
ifeq ($(OS),Haiku)
OS := LINUX
PLATFORM := Unix
CC := g++
MKDIR := mkdir -p
RM := rm -rf
MTOOLS = 
endif
danboid commented 7 months ago

Making your suggested changes to the packrom and gconvert makefiles and removing the size: build target from a few of the demos enables the Uzebox repo to build under Haiku if you install the avr_gcc, avr_libc and avr_binutils Haiku packages.

https://github.com/Uzebox/uzebox/pull/131

I have tested that the Uzebox demos build and run fine under Haiku using a Haiku build of cuzebox.

Haiku has ports of cuzebox (it builds with only a make), avrdude, vim, Kate, gimp, audacity, milkytracker... it becomes a fully valid option for a Uzebox development OS with these patches.

When you get 15 minutes spare, find the oldest PC you can that you think could boot Haiku (maybe an old Pentium or a old, rubbish laptop with a mechanical disk) and install it onto its HD and watch how fast that happens.

Haiku is about the only OS I know of that installs faster than you can boot it. Its installer totally puts any Linux distro to shame with its speed and ease of use.

artcfox commented 7 months ago

The size option comes from the vendor (Microchip) patched build tools, and shows useful information for developers.

If you download the source for the toolchain from Microchip, you may be able to compile the patched version for Haiku and preserve the size option.

Alternatively, instead of removing it, you could add a different "size" target and conditionally enable the alternative for platforms that don't use the official toolchains.

Or, the easiest would be to just put a dash in front of the command in the Makefile, so it doesn't fail the build if it returns an error:

size: -avr-size -C

Cheers, Matt (Artcfox)

On Mon, Apr 1, 2024, 10:20 AM Dan MacDonald @.***> wrote:

Making your suggsted change to the packrom and gconvert makefiles and removing the size: build target from a few of the demos enables the Uzebox repo to build under Haiku if you install the avr_gcc, avr_libc and avr_binutils Haiku packages.

131 https://github.com/Uzebox/uzebox/pull/131

— Reply to this email directly, view it on GitHub https://github.com/Uzebox/uzebox/issues/119#issuecomment-2029833095, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAILLX3TEJEQWCVE4LQBH43Y3FUJ5AVCNFSM6AAAAAA4IWN3AOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRZHAZTGMBZGU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

danboid commented 4 months ago

I've got the repo building under both Haiku and FreeBSD with a few small modifications to some of the Makefiles:

https://github.com/Uzebox/uzebox/pull/134

danboid commented 4 months ago

I have updated https://uzebox.org/wiki/Getting_Started_on_the_Uzebox with links to new pages with build instructions for FreeBSD and Haiku