From f2554438f8bd2e0bc11b05302010338becaa33c0 Mon Sep 17 00:00:00 2001 From: kub Date: Wed, 15 Nov 2023 22:38:10 +0000 Subject: [PATCH] build, revisions and fixes for opendingux based platforms --- .github/workflows/ci.yml | 4 ++-- Makefile | 1 + configure | 19 +++++++++++-------- platform/common/plat_sdl.c | 2 +- platform/libpicofe | 2 +- platform/opendingux/inputmap.c | 2 +- tools/release.sh | 4 ++-- 7 files changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27f9edc8..d0beb46b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -210,7 +210,7 @@ jobs: run: | git config --global --add safe.directory $PWD ver=$(cut -d'"' -f2 platform/common/version.h)-$(git rev-parse --short HEAD) - ./configure --platform=opendingux + ./configure --platform=gcw0 --platform=odbeta make -j2 mv PicoDrive.opk PicoDrive-odbeta-gcw0-$ver.opk - name: artifacts @@ -230,7 +230,7 @@ jobs: run: | git config --global --add safe.directory $PWD ver=$(cut -d'"' -f2 platform/common/version.h)-$(git rev-parse --short HEAD) - ./configure --platform=opendingux + ./configure --platform=opendingux --platform=odbeta make -j2 mv PicoDrive.opk PicoDrive-odbeta-lepus-$ver.opk - name: artifacts diff --git a/Makefile b/Makefile index 152e0181..2405a51f 100644 --- a/Makefile +++ b/Makefile @@ -458,3 +458,4 @@ pico/memory.o pico/cd/memory.o pico/32x/memory.o : pico/memory.h $(shell grep -rl pico_int.h pico) : pico/pico_int.h # pico/cart.o : pico/carthw_cfg.c cpu/fame/famec.o: cpu/fame/famec.c cpu/fame/famec_opcodes.h +platform/common/menu_pico.o: platform/libpicofe/menu.c diff --git a/configure b/configure index 7bbf52a3..12b5a46e 100755 --- a/configure +++ b/configure @@ -39,7 +39,7 @@ check_define() # "" means "autodetect". # TODO this is annoyingly messy. should have platform and device -platform_list="generic pandora gp2x wiz caanoo dingux retrofw gcw0 rg350 opendingux miyoo rpi1 rpi2 psp rg99" +platform_list="generic pandora gp2x wiz caanoo dingux retrofw gcw0 rg350 opendingux miyoo rpi1 rpi2 psp rg99 odbeta" platform="generic" sound_driver_list="oss alsa sdl" sound_drivers="" @@ -73,6 +73,7 @@ fail() set_platform() { platform=$1 + CFLAGS="$CFLAGS -D__`echo $platform | tr '[a-z]' '[A-Z]'`__" case "$platform" in rpi1) MFLAGS="-mcpu=arm1176jzf-s -mfpu=vfp" @@ -83,6 +84,7 @@ set_platform() have_gles="yes" ;; generic) + MFLAGS="" ;; dingux) # dingoo a320, ritmix rzx-50, the like. all have Ingenic MIPS cpu <= JZ4755 @@ -90,7 +92,6 @@ set_platform() # use static linking since the lib situation is ... let's say vague #LDFLAGS="$LDFLAGS -static" # uses a pre-gcw0 version of opendingux - CFLAGS="$CFLAGS -D__DINGUX__" MFLAGS="-march=mips32 -msoft-float" platform="opendingux" ;; @@ -98,7 +99,6 @@ set_platform() # devices using retrofw. AFAIK all have Ingenic MIPS JZ4760 with fpu sound_drivers="sdl" # uses it's own modified version of opendingux - CFLAGS="$CFLAGS -D__RETROFW__" MFLAGS="-march=mips32" platform="opendingux" ;; @@ -106,22 +106,26 @@ set_platform() # more modern devices using opendingux, with Ingenic MIPS JZ4770 or newer sound_drivers="sdl" # mostly based on opendingux for gcw0, save device type as C define. - CFLAGS="$CFLAGS -D__`echo $platform | tr '[a-z]' '[A-Z]'`__" + CFLAGS="$CFLAGS -D__OPENDINGUX__" MFLAGS="-march=mips32r2" platform="opendingux" ;; + odbeta) + # various devices with opendingux beta, arch flags from toolchain default + MFLAGS="" + platform="opendingux" + ;; rg99) # RG99 using opendingux, with Ingenic MIPS JZ4725B sound_drivers="sdl" # mostly based on opendingux for gcw0, save device type as C define. - CFLAGS="$CFLAGS -D__`echo $platform | tr '[a-z]' '[A-Z]'`__" MFLAGS="-march=mips32" + CFLAGS="$CFLAGS -D__OPENDINGUX__" platform="opendingux" ;; miyoo) # Miyoo BittBoy, PocketGO 1, PowKiddy V90/Q90 with Allwinner F1C100s sound_drivers="sdl" - CFLAGS="$CFLAGS -D__MIYOO__" MFLAGS="-mcpu=arm926ej-s -marm" platform="miyoo" ;; @@ -146,7 +150,6 @@ set_platform() psp) # use newlib SYSLIBS="-lc -lpspuser -lpspkernel" - CFLAGS="$CFLAGS -D__PSP__" MFLAGS="-march=allegrex" ARCH=mipsel ;; @@ -276,7 +279,7 @@ arm*) esac case "$platform" in -rpi1 | rpi2 | generic | opendingux | miyoo) +rpi1 | rpi2 | generic | opendingux | odbeta | miyoo) need_sdl="yes" ;; esac diff --git a/platform/common/plat_sdl.c b/platform/common/plat_sdl.c index 705d4769..b6b42610 100644 --- a/platform/common/plat_sdl.c +++ b/platform/common/plat_sdl.c @@ -351,7 +351,7 @@ void plat_init(void) ret = plat_sdl_init(); if (ret != 0) exit(1); -#if defined(__RG350__) || defined(__GCW0__) || defined(__OPENDINGUX__) || defined(__RG99__) +#if defined(__OPENDINGUX__) // opendingux on JZ47x0 may falsely report a HW overlay, fix to window plat_target.vout_method = 0; #endif diff --git a/platform/libpicofe b/platform/libpicofe index 7b58e156..d5a43fbd 160000 --- a/platform/libpicofe +++ b/platform/libpicofe @@ -1 +1 @@ -Subproject commit 7b58e15633b54621f9508cb673da61a6b0844955 +Subproject commit d5a43fbd972854cf6f02a47a8ca4ccc1bdadfca8 diff --git a/platform/opendingux/inputmap.c b/platform/opendingux/inputmap.c index 15f1b200..c6382f30 100644 --- a/platform/opendingux/inputmap.c +++ b/platform/opendingux/inputmap.c @@ -78,7 +78,7 @@ const char * const _in_sdl_key_names[SDLK_LAST] = { [SDLK_RETURN] = "START", [SDLK_ESCAPE] = "SELECT", -#if defined(__RG350__) || defined(__OPENDINGUX__) || defined(__RG99__) +#if defined(__OPENDINGUX__) [SDLK_HOME] = "POWER", [SDLK_TAB] = "L1", diff --git a/tools/release.sh b/tools/release.sh index 9c9cbcd2..97814a82 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -115,7 +115,7 @@ mv PicoDrive-pandora-$rel release-$rel/ # gcw0 (untested): JZ4770 (mips32r2 with fpu), swapped X/Y buttons docker pull ghcr.io/irixxxx/toolchain-odbeta-gcw0 echo " git config --global --add safe.directory /home/picodrive &&\ - ./configure --platform=gcw0 &&\ + ./configure --platform=gcw0 --platform=odbeta &&\ make clean && make -j2 all "\ | docker run -i -v$PWD:/home/picodrive -w/home/picodrive --rm ghcr.io/irixxxx/toolchain-odbeta-gcw0 sh && mv PicoDrive.opk release-$rel/PicoDrive-odbeta-gcw0_$rel.opk @@ -125,7 +125,7 @@ mv PicoDrive.opk release-$rel/PicoDrive-odbeta-gcw0_$rel.opk # lepus (untested): JZ4760 (mips32r1 with fpu) docker pull ghcr.io/irixxxx/toolchain-odbeta-lepus echo " git config --global --add safe.directory /home/picodrive &&\ - ./configure --platform=opendingux &&\ + ./configure --platform=opendingux --platform=odbeta &&\ make clean && make -j2 all "\ | docker run -i -v$PWD:/home/picodrive -w/home/picodrive --rm ghcr.io/irixxxx/toolchain-odbeta-lepus sh && mv PicoDrive.opk release-$rel/PicoDrive-odbeta-lepus_$rel.opk -- 2.39.5