From: kub Date: Sun, 3 Dec 2023 21:10:48 +0000 (+0100) Subject: build, cleanup X-Git-Tag: v2.00~145 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85174a6d8daf05918233c8371887ac5085e06eeb;p=picodrive.git build, cleanup - remove/rename some platforms from configure - new rg99 odbeta build, courtesy of sydarn - pandora support, courtesy of notaz --- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8192a5c..f9965cf9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,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=gp2x + ./configure --platform=gph make -j2 PLATFORM_MP3=0 make -C platform/gp2x rel VER=$ver mv PicoDrive_$ver.zip PicoDrive-gph_$ver.zip @@ -62,13 +62,13 @@ jobs: ver=$(cut -d'"' -f2 platform/common/version.h)-$(git rev-parse --short HEAD) ./configure --platform=pandora make -j2 - mv PicoDrive PicoDrive-pandora - ${CROSS_COMPILE}strip PicoDrive-pandora + make -C platform/pandora rel VER=$ver + mv platform/pandora/PicoDrive_*.pnd . - name: artifacts uses: actions/upload-artifact@v3 with: name: Pandora - path: PicoDrive-pandora + path: PicoDrive_*.pnd build-psp: runs-on: ubuntu-latest @@ -238,3 +238,23 @@ jobs: with: name: ODbeta lepus path: PicoDrive-odbeta-*.opk + + build-odbeta-rg99: + runs-on: ubuntu-latest + container: ghcr.io/irixxxx/toolchain-odbeta-rs90 + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: build + run: | + git config --global --add safe.directory $PWD + ver=$(cut -d'"' -f2 platform/common/version.h)-$(git rev-parse --short HEAD) + ./configure --platform=opendingux --platform=odbeta + make -j2 + mv PicoDrive.opk PicoDrive-odbeta-rg99-$ver.opk + - name: artifacts + uses: actions/upload-artifact@v3 + with: + name: ODbeta rg99 + path: PicoDrive-odbeta-*.opk diff --git a/configure b/configure index 8449010b..4209784f 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 odbeta" +platform_list="generic pandora gph dingux retrofw gcw0 opendingux odbeta miyoo rpi1 rpi2 psp" platform="generic" sound_driver_list="oss alsa sdl" sound_drivers="" @@ -102,7 +102,7 @@ set_platform() MFLAGS="-march=mips32" platform="opendingux" ;; - opendingux | gcw0 | rg350) + opendingux | gcw0) # more modern devices using opendingux, with Ingenic MIPS JZ4770 or newer sound_drivers="sdl" # mostly based on opendingux for gcw0 @@ -119,8 +119,8 @@ set_platform() ;; odbeta) # various devices with opendingux beta, arch flags from toolchain default - MFLAGS="" CFLAGS="$CFLAGS -D__OPENDINGUX__" + MFLAGS="" # toolchains are arch specific platform="opendingux" ;; pandora) @@ -128,7 +128,7 @@ set_platform() have_libavcodec="yes" MFLAGS="-mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp" ;; - gp2x | wiz | caanoo) + gph) sound_drivers="oss" # compile for OABI if toolchain provides it (faster code on caanoo) have_arm_oabi="yes" diff --git a/platform/common/main.c b/platform/common/main.c index 6fce5d58..e503edc1 100644 --- a/platform/common/main.c +++ b/platform/common/main.c @@ -84,6 +84,9 @@ int main(int argc, char *argv[]) //in_probe(); plat_target_init(); + if (argc > 1) + parse_cmd_line(argc, argv); + plat_init(); menu_init(); diff --git a/platform/common/plat_sdl.c b/platform/common/plat_sdl.c index f9f892d1..55280614 100644 --- a/platform/common/plat_sdl.c +++ b/platform/common/plat_sdl.c @@ -399,6 +399,7 @@ void plat_init(void) in_probe(); bgr_to_uyvy_init(); + linux_menu_init(); } void plat_finish(void) diff --git a/platform/common/plat_sdl.h b/platform/common/plat_sdl.h index ea8680fe..0bbe2bd3 100644 --- a/platform/common/plat_sdl.h +++ b/platform/common/plat_sdl.h @@ -5,3 +5,5 @@ extern const int in_sdl_key_map_sz; extern const struct menu_keymap in_sdl_joy_map[]; extern const int in_sdl_joy_map_sz; extern const char * const (*in_sdl_key_names)[SDLK_LAST]; + +void linux_menu_init(void); diff --git a/platform/linux/menu.c b/platform/linux/menu.c index 6eb2e459..b37f3a53 100644 --- a/platform/linux/menu.c +++ b/platform/linux/menu.c @@ -13,7 +13,10 @@ static const char h_stype[] = "Scaler algorithm for software scaling"; #define MENU_OPTIONS_ADV +static menu_entry e_menu_keyconfig[]; + void linux_menu_init(void) { + me_enable(e_menu_keyconfig, MA_CTRL_DEADZONE, 0); } diff --git a/platform/pandora/Makefile b/platform/pandora/Makefile index 31c10408..fd362696 100644 --- a/platform/pandora/Makefile +++ b/platform/pandora/Makefile @@ -1,14 +1,14 @@ # release packaging makefile VER := $(shell head -n 1 ../common/version.h | \ - sed 's/.*"\(.*\)\.\(.*\)".*/\1\2/g') + sed 's/[^0-9]*\([0-9]*\)\.\([0-9]*\).*/\1\2/g') BUILD := $(shell git describe HEAD | grep -- - | \ sed -e 's/.*\-\(.*\)\-.*/\1/') ifneq "$(BUILD)" "" VER := $(VER)_$(BUILD) endif -PND_MAKE ?= $(HOME)/dev/pnd/src/pandora-libraries/testdata/scripts/pnd_make.sh +PND_MAKE ?= pnd_make all: rel @@ -24,7 +24,7 @@ all: rel rel: ../../PicoDrive PicoDrive.sh picorestore \ PicoDrive.png PicoDrive_p.png \ ../../pico/carthw.cfg skin \ - ../../README /tmp/PicoDrive.pxml + ../../README.md /tmp/PicoDrive.pxml rm -rf out mkdir out cp -r $^ out/ diff --git a/platform/pandora/make_pxml.sh b/platform/pandora/make_pxml.sh index 2fcf8334..35d537a4 100755 --- a/platform/pandora/make_pxml.sh +++ b/platform/pandora/make_pxml.sh @@ -4,8 +4,8 @@ set -e verfile=../common/version.h test -f $verfile -major=`head -n 1 $verfile | sed 's/.*"\([0-9]*\)\.\([0-9]*\).*/\1/g'` -minor=`head -n 1 $verfile | sed 's/.*"\([0-9]*\)\.\([0-9]*\).*/\2/g'` +major=`head -n 1 $verfile | sed 's/[^0-9]*\([0-9]*\)\.\([0-9]*\).*/\1/g'` +minor=`head -n 1 $verfile | sed 's/[^0-9]*\([0-9]*\)\.\([0-9]*\).*/\2/g'` # lame, I know.. build=`git describe HEAD | grep -- - | sed -e 's/.*\-\(.*\)\-.*/\1/'` test -n "$build" && build_post="-$build" diff --git a/platform/psp/menu.c b/platform/psp/menu.c index 95698a84..25ca9893 100644 --- a/platform/psp/menu.c +++ b/platform/psp/menu.c @@ -14,8 +14,10 @@ static const char *men_filter_opts[] = { "nearest", "bilinear", NULL }; #define MENU_OPTIONS_ADV static menu_entry e_menu_sms_options[]; +static menu_entry e_menu_keyconfig[]; void psp_menu_init(void) { me_enable(e_menu_sms_options, MA_SMSOPT_GHOSTING, 0); + me_enable(e_menu_keyconfig, MA_CTRL_DEADZONE, 0); } diff --git a/tools/release.sh b/tools/release.sh index 83f807fa..f431c535 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -5,7 +5,7 @@ # creates builds for the supported platforms in the release directory # # usage: release.sh [platform...] -# platforms: gph dingux retrofw gcw0 rg350 miyoo psp pandora odbeta-gcw0 odbeta-lepus +# platforms: gph dingux retrofw gcw0 opendingux miyoo psp pandora odbeta-gcw0 odbeta-lepus odbeta-rg99 # # expects toolchains to be installed in these docker containers: # gph: ghcr.io/irixxxx/toolchain-gp2x @@ -14,8 +14,10 @@ # gcw0, rg350: ghcr.io/irixxxx/toolchain-opendingux # miyoo: ghcr.io/irixxxx/toolchain-miyoo # psp: docker.io/pspdev/pspdev +# pandora: ghcr.io/irixxxx/toolchain-pandora # odbeta-gcw0: ghcr.io/irixxxx/toolchain-odbeta-gcw0 # odbeta-lepus: ghcr.io/irixxxx/toolchain-odbeta-lepus +# odbeta-rg99: ghcr.io/irixxxx/toolchain-odbeta-rg99 trap "exit" ERR @@ -23,14 +25,14 @@ rel=$1 mkdir -p release-$rel shift; plat=" $* " -[ -z "$(echo $plat|tr -d ' ')" ] && plat=" gph dingux retrofw gcw0 rg350 miyoo psp pandora odbeta-gcw0 odbeta-lepus " +[ -z "$(echo $plat|tr -d ' ')" ] && plat=" gph dingux retrofw gcw0 opendingux miyoo psp pandora odbeta-gcw0 odbeta-lepus odbeta-rg99 " [ -z "${plat##* gph *}" ] && { # GPH devices: gp2x, wiz, caanoo, with ubuntu arm gcc 4.7 docker pull ghcr.io/irixxxx/toolchain-gp2x echo " git config --global --add safe.directory /home/picodrive &&\ - ./configure --platform=gp2x &&\ + ./configure --platform=gph &&\ make clean && make -j2 all &&\ make -C platform/gp2x rel VER=$rel "\ | docker run -i -v$PWD:/home/picodrive -w/home/picodrive --rm ghcr.io/irixxxx/toolchain-gp2x sh && @@ -68,11 +70,11 @@ echo " git config --global --add safe.directory /home/picodrive &&\ mv PicoDrive.opk release-$rel/PicoDrive-gcw0_$rel.opk } -[ -z "${plat##* rg350 *}" ] && { +[ -z "${plat##* opendingux *}" ] && { # rg350, gkd350h etc: JZ4770 or newer docker pull ghcr.io/irixxxx/toolchain-opendingux echo " git config --global --add safe.directory /home/picodrive &&\ - ./configure --platform=rg350 &&\ + ./configure --platform=opendingux &&\ make clean && make -j2 all "\ | docker run -i -v$PWD:/home/picodrive -w/home/picodrive --rm ghcr.io/irixxxx/toolchain-opendingux sh && mv PicoDrive.opk release-$rel/PicoDrive-opendingux_$rel.opk @@ -106,9 +108,9 @@ docker pull ghcr.io/irixxxx/toolchain-pandora echo " git config --global --add safe.directory /home/picodrive &&\ ./configure --platform=pandora &&\ make clean && make -j2 all &&\ - \${CROSS_COMPILE}strip -o PicoDrive-pandora-$rel PicoDrive"\ + make -C platform/pandora rel VER=$rel "\ | docker run -i -v$PWD:/home/picodrive -w/home/picodrive --rm ghcr.io/irixxxx/toolchain-pandora sh && -mv PicoDrive-pandora-$rel release-$rel/ +mv platform/pandora/PicoDrive_*.pnd release-$rel/ } [ -z "${plat##* odbeta-gcw0 *}" ] && { @@ -122,7 +124,7 @@ mv PicoDrive.opk release-$rel/PicoDrive-odbeta-gcw0_$rel.opk } [ -z "${plat##* odbeta-lepus *}" ] && { -# rg300 and other ingenic lepus based (untested): JZ4760 (mips32r1 with fpu) +# rg300 and other Ingenic lepus based (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 --platform=odbeta &&\ @@ -130,3 +132,13 @@ echo " git config --global --add safe.directory /home/picodrive &&\ | 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 } + +[ -z "${plat##* odbeta-rg99 *}" ] && { +# rg99 and other JZ4725B based (untested): JZ4760 (mips32r1 w/o fpu) +docker pull ghcr.io/irixxxx/toolchain-odbeta-rs90 +echo " git config --global --add safe.directory /home/picodrive &&\ + ./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-rs90 sh && +mv PicoDrive.opk release-$rel/PicoDrive-odbeta-rg99_$rel.opk +}