mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
Add m68k binutils and gcc and add dbztool
This commit is contained in:
46
dev-embedded/dbztool/dbztool-2025.02.22.recipe
Normal file
46
dev-embedded/dbztool/dbztool-2025.02.22.recipe
Normal file
@@ -0,0 +1,46 @@
|
||||
SUMMARY="Motorola Dragonball bootstrap tool"
|
||||
DESCRIPTION="Command-line tool for manipulating the bootstrap interface of a Dragonball VZ \
|
||||
processor. It allows you to upload and download data, run programs, examine and modify the \
|
||||
system registers, etc. Currently it's only been tested on the Alphasmart Dana but it should \
|
||||
work on other machines too (although a number of places in the code assume you're using UART1, \
|
||||
which need to be fixed)."
|
||||
HOMEPAGE="https://github.com/davidgiven/dbztool"
|
||||
COPYRIGHT="2021 David Given"
|
||||
LICENSE="BSD (2-clause)"
|
||||
SOURCE_URI="https://github.com/davidgiven/dbztool/archive/742153af9333afdcee1d47b554afa56d5791dbfb.tar.gz"
|
||||
SOURCE_DIR="dbztool-742153af9333afdcee1d47b554afa56d5791dbfb"
|
||||
CHECKSUM_SHA256="e33526550ece3a0d0231d0dccb1d9ecf1a4bc9cd531d8096bac0d102159a6947"
|
||||
REVISION="1"
|
||||
PATCHES="dbztool-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all"
|
||||
|
||||
PROVIDES="
|
||||
dbztool$secondaryArchSuffix = $portVersion
|
||||
cmd:dbztool$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:m68k_elf_gcc
|
||||
cmd:make
|
||||
cmd:ninja
|
||||
cmd:xxd
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $binDir
|
||||
cp dbztool $binDir
|
||||
}
|
||||
45
dev-embedded/dbztool/patches/dbztool-2025.02.22.patchset
Normal file
45
dev-embedded/dbztool/patches/dbztool-2025.02.22.patchset
Normal file
@@ -0,0 +1,45 @@
|
||||
From 5520861ac4bb11bf683309cc7d07c5722774187e Mon Sep 17 00:00:00 2001
|
||||
From: PulkoMandy <pulkomandy@pulkomandy.tk>
|
||||
Date: Sat, 22 Feb 2025 22:39:29 +0100
|
||||
Subject: Adjust for Haiku
|
||||
|
||||
- Link against libbsd for cfsetspeed
|
||||
- Remove FNM_EXTMATCH (unsupported in Haiku)
|
||||
- Adjust name of m68k C compiler
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 4111755..7daa2b5 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -4,11 +4,11 @@ export CXX = g++
|
||||
export AR = ar rc
|
||||
export RANLIB = ranlib
|
||||
export STRIP = strip
|
||||
-export LIBS =
|
||||
+export LIBS = -lbsd
|
||||
|
||||
-export CC68K = m68k-linux-gnu-gcc
|
||||
-export LD68K = m68k-linux-gnu-ld
|
||||
-export OBJCOPY68K = m68k-linux-gnu-objcopy
|
||||
+export CC68K = m68k-elf-gcc
|
||||
+export LD68K = m68k-elf-ld
|
||||
+export OBJCOPY68K = m68k-elf-objcopy
|
||||
|
||||
export C68KFLAGS = -g -Os -fomit-frame-pointer -march=68000
|
||||
export OBJDIR = .obj
|
||||
diff --git a/src/mc68328.cc b/src/mc68328.cc
|
||||
index 77f7ae8..e4cd165 100644
|
||||
--- a/src/mc68328.cc
|
||||
+++ b/src/mc68328.cc
|
||||
@@ -173,7 +173,7 @@ bool foreach_register(const char* glob, std::function<bool(const std::string& na
|
||||
{
|
||||
for (const auto& i : registers)
|
||||
{
|
||||
- if (fnmatch(glob, i.first.c_str(), FNM_CASEFOLD|FNM_EXTMATCH) == 0)
|
||||
+ if (fnmatch(glob, i.first.c_str(), FNM_CASEFOLD) == 0)
|
||||
{
|
||||
if (cb(i.first, i.second))
|
||||
return true;
|
||||
--
|
||||
2.45.2
|
||||
|
||||
Reference in New Issue
Block a user