From bf50367503530782bad63c2f0de69b1c3ec899a6 Mon Sep 17 00:00:00 2001 From: CompCom <33770230+CompCom@users.noreply.github.com> Date: Fri, 15 Feb 2019 03:30:07 +1100 Subject: [PATCH 1/4] Fix classic a7 makefile. --- Makefile.classic_armv7_a7 | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Makefile.classic_armv7_a7 b/Makefile.classic_armv7_a7 index 77de755857..f80fb52932 100644 --- a/Makefile.classic_armv7_a7 +++ b/Makefile.classic_armv7_a7 @@ -41,14 +41,9 @@ CC_AS_V = arm-linux-gnueabihf-gcc-8 all: $(TARGET) retroarch: - #Backup vanilla version files + ammend version - cp version.all version_BACKUP.all && cp version.dtd version_BACKUP.dtd - sed -i -e 's/RARCH_VERSION="[^"]*"/RARCH_VERSION="$(CLASSIC_VERSION)"/g' version.all - sed -i -e 's/PACKAGE_VERSION "[^"]*"/PACKAGE_VERSION "$(CLASSIC_VERSION)"/g' version.all - sed -i -e 's/ENTITY version "[^"]*"/ENTITY version "$(CLASSIC_VERSION)"/g' version.dtd #Build the RetroArch Binary for cross platform classics (ARMv7 Cortex A7) patchelf --version #Check if you have patchelf installed... (sudo apt-get install patchelf) - ./configure --host=arm-linux-gnueabihf --enable-mali_fbdev --disable-freetype --enable-opengles --enable-udev --enable-alsa --enable-neon --enable-floathard --disable-discord + CC=$(CC_V) CFLAGS="-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard" ./configure --host=arm-linux-gnueabihf --enable-mali_fbdev --disable-freetype --enable-opengles --enable-udev --enable-alsa --enable-neon --enable-floathard --disable-discord make CC=$(CC_V) CXX=$(CXX_V) AS=$(AS_V) CC_AS=$(CC_AS_V) LDFLAGS_SDL=-lSDL2 HAVE_CLASSIC=1 HAVE_C_A7A7=1 HAVE_HAKCHI=1 -j #Cook it arm-linux-gnueabihf-strip -v retroarch patchelf --replace-needed libSDL2-2.0.so.0 libSDL2.so retroarch #libSDL2-2.0.so.0 sym link doesn't exist on native build. Just patch the binary... @@ -80,9 +75,6 @@ retroarch: #COMMODORE 64 MINI BUILD (WIP) - #Clean down dirty files - rm -f version.all version.dtd - mv version_BACKUP.all version.all && mv version_BACKUP.dtd version.dtd @echo "*********************************************************************" @echo "*** Classic ARM7 Cortex A7 build and packages built successfully! ***" @echo "****************** Winner, Winner, Chicken Dinner! ******************" From 1263663fae9afe94d430b2a0cf0abf2ef2ade77f Mon Sep 17 00:00:00 2001 From: Ryan 'Swingflip' Hamlin Date: Fri, 15 Feb 2019 18:31:48 +0000 Subject: [PATCH 2/4] Update Makefile.classic_armv7_a7 --- Makefile.classic_armv7_a7 | 131 ++++++++++++++++---------------------- 1 file changed, 56 insertions(+), 75 deletions(-) diff --git a/Makefile.classic_armv7_a7 b/Makefile.classic_armv7_a7 index 77de755857..9611da3cd8 100644 --- a/Makefile.classic_armv7_a7 +++ b/Makefile.classic_armv7_a7 @@ -4,16 +4,13 @@ # https://modmyclassic.com/comp and we will help in any way possible! # Building Prerequisites ############## -# arm-linux-gnueabihf-gcc-8 -# arm-linux-gnueabihf-g++-8 -# arm-linux-gnueabihf-as # arm-linux-gnueabihf-strip # patchelf # bc include version.all -# Classic Readme Variables ############ +# Classic Readme Variables ############ CLASSIC_ALT_VER := $(shell echo $(RARCH_VERSION) | tr . _) CLASSIC_MODS_VER := Official_Retroarch_v$(CLASSIC_ALT_VER)c_COptimised CLASSIC_MODS_NAME := RetroArch v$(RARCH_VERSION)c \(Official Classic Optimised\) @@ -28,10 +25,6 @@ HAKCHI_GIT := https://github.com/Classicmods/RA_Platform-Hakchi # General Shared Variables ############ TARGET := retroarch -CC_V = arm-linux-gnueabihf-gcc-8 -CXX_V = arm-linux-gnueabihf-g++-8 -AS_V = arm-linux-gnueabihf-as -CC_AS_V = arm-linux-gnueabihf-gcc-8 # Libretro Defines #################### #HAVE_CLASSIC = Classic Hook, disable some features @@ -41,73 +34,61 @@ CC_AS_V = arm-linux-gnueabihf-gcc-8 all: $(TARGET) retroarch: - #Backup vanilla version files + ammend version - cp version.all version_BACKUP.all && cp version.dtd version_BACKUP.dtd - sed -i -e 's/RARCH_VERSION="[^"]*"/RARCH_VERSION="$(CLASSIC_VERSION)"/g' version.all - sed -i -e 's/PACKAGE_VERSION "[^"]*"/PACKAGE_VERSION "$(CLASSIC_VERSION)"/g' version.all - sed -i -e 's/ENTITY version "[^"]*"/ENTITY version "$(CLASSIC_VERSION)"/g' version.dtd - #Build the RetroArch Binary for cross platform classics (ARMv7 Cortex A7) - patchelf --version #Check if you have patchelf installed... (sudo apt-get install patchelf) - ./configure --host=arm-linux-gnueabihf --enable-mali_fbdev --disable-freetype --enable-opengles --enable-udev --enable-alsa --enable-neon --enable-floathard --disable-discord - make CC=$(CC_V) CXX=$(CXX_V) AS=$(AS_V) CC_AS=$(CC_AS_V) LDFLAGS_SDL=-lSDL2 HAVE_CLASSIC=1 HAVE_C_A7A7=1 HAVE_HAKCHI=1 -j #Cook it - arm-linux-gnueabihf-strip -v retroarch - patchelf --replace-needed libSDL2-2.0.so.0 libSDL2.so retroarch #libSDL2-2.0.so.0 sym link doesn't exist on native build. Just patch the binary... + #Build the RetroArch Binary for cross platform classics (ARMv7 Cortex A7) + patchelf --version #Check if you have patchelf installed... (sudo apt-get install patchelf) + CFLAGS="-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard" ./configure --host=arm-linux-gnueabihf --enable-mali_fbdev --disable-freetype --enable-opengles --enable-udev --enable-alsa --enable-neon --enable-floathard --disable-discord + make HAVE_CLASSIC=1 HAVE_C_A7A7=1 HAVE_HAKCHI=1 -j #Cook it + arm-linux-gnueabihf-strip -v retroarch + patchelf --replace-needed libSDL2-2.0.so.0 libSDL2.so retroarch #libSDL2-2.0.so.0 sym link doesn't exist on native build. Just patch the binary... - #HAKCHI BUILD (NESC, SNESC) - #FYI this build was originally known as RetroArch 'Neo' for Hakchi. - @echo "** BUILDING CLASSIC_MODS HAKCHI - $(CLASSIC_MODS_VER) HMOD PACKAGE **" - rm -fr /tmp/$(HAKCHI_DIR) - cd /tmp/; git clone $(HAKCHI_GIT) - cp retroarch /tmp/$(HAKCHI_DIR)/bin/retroarch - echo $$(echo "Built by: " $$USER @ $$(date) \\\\\\ Git Commit: $(GIT_COMMIT)) > /tmp/$(HAKCHI_DIR)/etc/libretro/retroarch_version - cp /tmp/$(HAKCHI_DIR)/readme.md /tmp/$(HAKCHI_DIR)/readme_COPY.md - printf "%s\n" \ - "---" \ - "Name: $(CLASSIC_MODS_NAME)" \ - "Creator: $(MOD_CREATOR)" \ - "Category: $(MOD_CATEGORY)" \ - "Version: $(CLASSIC_MODS_VER)" \ - "Built on: $(shell date)" \ - "Git commit: $(GIT_COMMIT)" \ - "---" > /tmp/$(HAKCHI_DIR)/readme.md - cat /tmp/$(HAKCHI_DIR)/readme_COPY.md >> /tmp/$(HAKCHI_DIR)/readme.md - rm /tmp/$(HAKCHI_DIR)/readme_COPY.md - @echo "** COMPRESSING $(CLASSIC_MODS_VER) HMOD PACKAGE **" - cd /tmp/$(HAKCHI_DIR)/; tar -czvf "$(CLASSIC_MODS_VER).hmod" * - mv /tmp/$(HAKCHI_DIR)/$(CLASSIC_MODS_VER).hmod . - @echo "** BUILT CLASSIC_MODS HAKCHI - $(CLASSIC_MODS_VER) HMOD PACKAGE **" - rm -fr /tmp/$(HAKCHI_DIR) #clean up tmp + #HAKCHI BUILD (NESC, SNESC) + #FYI this build was originally known as RetroArch 'Neo' for Hakchi. + @echo "** BUILDING CLASSIC_MODS HAKCHI - $(CLASSIC_MODS_VER) HMOD PACKAGE **" + rm -fr /tmp/$(HAKCHI_DIR) + cd /tmp/; git clone $(HAKCHI_GIT) + cp retroarch /tmp/$(HAKCHI_DIR)/bin/retroarch + echo $$(echo "Built by: " $$USER @ $$(date) \\\\\\ Git Commit: $(GIT_COMMIT)) > /tmp/$(HAKCHI_DIR)/etc/libretro/retroarch_version + cp /tmp/$(HAKCHI_DIR)/readme.md /tmp/$(HAKCHI_DIR)/readme_COPY.md + printf "%s\n" \ + "---" \ + "Name: $(CLASSIC_MODS_NAME)" \ + "Creator: $(MOD_CREATOR)" \ + "Category: $(MOD_CATEGORY)" \ + "Version: $(CLASSIC_MODS_VER)" \ + "Built on: $(shell date)" \ + "Git commit: $(GIT_COMMIT)" \ + "---" > /tmp/$(HAKCHI_DIR)/readme.md + cat /tmp/$(HAKCHI_DIR)/readme_COPY.md >> /tmp/$(HAKCHI_DIR)/readme.md + rm /tmp/$(HAKCHI_DIR)/readme_COPY.md + @echo "** COMPRESSING $(CLASSIC_MODS_VER) HMOD PACKAGE **" + cd /tmp/$(HAKCHI_DIR)/; tar -czvf "$(CLASSIC_MODS_VER).hmod" * + mv /tmp/$(HAKCHI_DIR)/$(CLASSIC_MODS_VER).hmod . + @echo "** BUILT CLASSIC_MODS HAKCHI - $(CLASSIC_MODS_VER) HMOD PACKAGE **" + rm -fr /tmp/$(HAKCHI_DIR) #clean up tmp - #COMMODORE 64 MINI BUILD (WIP) - - #Clean down dirty files - rm -f version.all version.dtd - mv version_BACKUP.all version.all && mv version_BACKUP.dtd version.dtd - @echo "*********************************************************************" - @echo "*** Classic ARM7 Cortex A7 build and packages built successfully! ***" - @echo "****************** Winner, Winner, Chicken Dinner! ******************" - @echo "*********************************************************************" + @echo "*********************************************************************" + @echo "*** Classic ARM7 Cortex A7 build and packages built successfully! ***" + @echo "****************** Winner, Winner, Chicken Dinner! ******************" + @echo "*********************************************************************" clean: - rm -rf obj-unix - rm -f *.d - rm -f *.o - rm -f audio/*.o - rm -f conf/*.o - rm -f gfx/*.o - rm -f gfx/drivers_font/*.o - rm -f gfx/drivers_font_renderer/*.o - rm -f gfx/drivers_context/*.o - rm -f gfx/py_state/*.o - rm -f compat/*.o - rm -f record/*.o - rm -f input/*.o - rm -f tools/*.o - rm -f $(BINDIR)/retroarch - rm -f $(BINDIR)/retroarch-joyconfig - rm -f $(PNDDIR)/readme.html - rm -f retroarch - rm -f $(CLASSIC_MODS_VER).hmod - rm -f version.all version.dtd - mv -f version_BACKUP.all version.all || echo "Backup Doesn't Exist - Ignoring..." - mv -f version_BACKUP.dtd version.dtd || echo "Backup Doesn't Exist - Ignoring..." - rm -f *_BACKUP* + rm -rf obj-unix + rm -f *.d + rm -f *.o + rm -f audio/*.o + rm -f conf/*.o + rm -f gfx/*.o + rm -f gfx/drivers_font/*.o + rm -f gfx/drivers_font_renderer/*.o + rm -f gfx/drivers_context/*.o + rm -f gfx/py_state/*.o + rm -f compat/*.o + rm -f record/*.o + rm -f input/*.o + rm -f tools/*.o + rm -f $(BINDIR)/retroarch + rm -f $(BINDIR)/retroarch-joyconfig + rm -f $(PNDDIR)/readme.html + rm -f retroarch + rm -f $(CLASSIC_MODS_VER).hmod + rm -f version.all version.dtd + From 48e48485366b9ecd4a0399745b83fac794253770 Mon Sep 17 00:00:00 2001 From: CompCom <33770230+CompCom@users.noreply.github.com> Date: Sat, 16 Feb 2019 16:04:24 +1100 Subject: [PATCH 3/4] Disable alsa midi on classic(hakchi) builds. --- Makefile.common | 5 ++++- configuration.c | 2 +- midi/midi_driver.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile.common b/Makefile.common index 2564dda507..daf601d5ad 100644 --- a/Makefile.common +++ b/Makefile.common @@ -552,7 +552,10 @@ endif ifeq ($(HAVE_ALSA), 1) OBJ += audio/drivers/alsa.o - OBJ += midi/drivers/alsa_midi.o + + ifneq ($(HAVE_HAKCHI), 1) + OBJ += midi/drivers/alsa_midi.o + endif ifeq ($(HAVE_THREADS), 1) OBJ += audio/drivers/alsathread.o diff --git a/configuration.c b/configuration.c index 0f413de803..feee0c7e63 100644 --- a/configuration.c +++ b/configuration.c @@ -439,7 +439,7 @@ static enum record_driver_enum RECORD_DEFAULT_DRIVER = RECORD_NULL; #ifdef HAVE_WINMM static enum midi_driver_enum MIDI_DEFAULT_DRIVER = MIDI_WINMM; -#elif defined HAVE_ALSA +#elif defined(HAVE_ALSA) && !defined(HAVE_HAKCHI) static enum midi_driver_enum MIDI_DEFAULT_DRIVER = MIDI_ALSA; #else static enum midi_driver_enum MIDI_DEFAULT_DRIVER = MIDI_NULL; diff --git a/midi/midi_driver.c b/midi/midi_driver.c index 012a62d39a..5d5050f3f5 100644 --- a/midi/midi_driver.c +++ b/midi/midi_driver.c @@ -30,7 +30,7 @@ extern midi_driver_t midi_winmm; extern midi_driver_t midi_alsa; static midi_driver_t *midi_drivers[] = { -#ifdef HAVE_ALSA +#if defined(HAVE_ALSA) && !defined(HAVE_HAKCHI) &midi_alsa, #endif #ifdef HAVE_WINMM From b0200a2efa85fedc845616ad06eff76ffd023819 Mon Sep 17 00:00:00 2001 From: CompCom <33770230+CompCom@users.noreply.github.com> Date: Sat, 16 Feb 2019 16:24:55 +1100 Subject: [PATCH 4/4] Fix separators in classic a7 makefile. --- Makefile.classic_armv7_a7 | 108 +++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/Makefile.classic_armv7_a7 b/Makefile.classic_armv7_a7 index 9611da3cd8..59b8b67893 100644 --- a/Makefile.classic_armv7_a7 +++ b/Makefile.classic_armv7_a7 @@ -34,61 +34,61 @@ TARGET := retroarch all: $(TARGET) retroarch: - #Build the RetroArch Binary for cross platform classics (ARMv7 Cortex A7) - patchelf --version #Check if you have patchelf installed... (sudo apt-get install patchelf) - CFLAGS="-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard" ./configure --host=arm-linux-gnueabihf --enable-mali_fbdev --disable-freetype --enable-opengles --enable-udev --enable-alsa --enable-neon --enable-floathard --disable-discord - make HAVE_CLASSIC=1 HAVE_C_A7A7=1 HAVE_HAKCHI=1 -j #Cook it - arm-linux-gnueabihf-strip -v retroarch - patchelf --replace-needed libSDL2-2.0.so.0 libSDL2.so retroarch #libSDL2-2.0.so.0 sym link doesn't exist on native build. Just patch the binary... + #Build the RetroArch Binary for cross platform classics (ARMv7 Cortex A7) + patchelf --version #Check if you have patchelf installed... (sudo apt-get install patchelf) + CFLAGS="-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard" ./configure --host=arm-linux-gnueabihf --enable-mali_fbdev --disable-freetype --enable-opengles --enable-udev --enable-alsa --enable-neon --enable-floathard --disable-discord + make HAVE_CLASSIC=1 HAVE_C_A7A7=1 HAVE_HAKCHI=1 -j #Cook it + arm-linux-gnueabihf-strip -v retroarch + patchelf --replace-needed libSDL2-2.0.so.0 libSDL2.so retroarch #libSDL2-2.0.so.0 sym link doesn't exist on native build. Just patch the binary... - #HAKCHI BUILD (NESC, SNESC) - #FYI this build was originally known as RetroArch 'Neo' for Hakchi. - @echo "** BUILDING CLASSIC_MODS HAKCHI - $(CLASSIC_MODS_VER) HMOD PACKAGE **" - rm -fr /tmp/$(HAKCHI_DIR) - cd /tmp/; git clone $(HAKCHI_GIT) - cp retroarch /tmp/$(HAKCHI_DIR)/bin/retroarch - echo $$(echo "Built by: " $$USER @ $$(date) \\\\\\ Git Commit: $(GIT_COMMIT)) > /tmp/$(HAKCHI_DIR)/etc/libretro/retroarch_version - cp /tmp/$(HAKCHI_DIR)/readme.md /tmp/$(HAKCHI_DIR)/readme_COPY.md - printf "%s\n" \ - "---" \ - "Name: $(CLASSIC_MODS_NAME)" \ - "Creator: $(MOD_CREATOR)" \ - "Category: $(MOD_CATEGORY)" \ - "Version: $(CLASSIC_MODS_VER)" \ - "Built on: $(shell date)" \ - "Git commit: $(GIT_COMMIT)" \ - "---" > /tmp/$(HAKCHI_DIR)/readme.md - cat /tmp/$(HAKCHI_DIR)/readme_COPY.md >> /tmp/$(HAKCHI_DIR)/readme.md - rm /tmp/$(HAKCHI_DIR)/readme_COPY.md - @echo "** COMPRESSING $(CLASSIC_MODS_VER) HMOD PACKAGE **" - cd /tmp/$(HAKCHI_DIR)/; tar -czvf "$(CLASSIC_MODS_VER).hmod" * - mv /tmp/$(HAKCHI_DIR)/$(CLASSIC_MODS_VER).hmod . - @echo "** BUILT CLASSIC_MODS HAKCHI - $(CLASSIC_MODS_VER) HMOD PACKAGE **" - rm -fr /tmp/$(HAKCHI_DIR) #clean up tmp + #HAKCHI BUILD (NESC, SNESC) + #FYI this build was originally known as RetroArch 'Neo' for Hakchi. + @echo "** BUILDING CLASSIC_MODS HAKCHI - $(CLASSIC_MODS_VER) HMOD PACKAGE **" + rm -fr /tmp/$(HAKCHI_DIR) + cd /tmp/; git clone $(HAKCHI_GIT) + cp retroarch /tmp/$(HAKCHI_DIR)/bin/retroarch + echo $$(echo "Built by: " $$USER @ $$(date) \\\\\\ Git Commit: $(GIT_COMMIT)) > /tmp/$(HAKCHI_DIR)/etc/libretro/retroarch_version + cp /tmp/$(HAKCHI_DIR)/readme.md /tmp/$(HAKCHI_DIR)/readme_COPY.md + printf "%s\n" \ + "---" \ + "Name: $(CLASSIC_MODS_NAME)" \ + "Creator: $(MOD_CREATOR)" \ + "Category: $(MOD_CATEGORY)" \ + "Version: $(CLASSIC_MODS_VER)" \ + "Built on: $(shell date)" \ + "Git commit: $(GIT_COMMIT)" \ + "---" > /tmp/$(HAKCHI_DIR)/readme.md + cat /tmp/$(HAKCHI_DIR)/readme_COPY.md >> /tmp/$(HAKCHI_DIR)/readme.md + rm /tmp/$(HAKCHI_DIR)/readme_COPY.md + @echo "** COMPRESSING $(CLASSIC_MODS_VER) HMOD PACKAGE **" + cd /tmp/$(HAKCHI_DIR)/; tar -czvf "$(CLASSIC_MODS_VER).hmod" * + mv /tmp/$(HAKCHI_DIR)/$(CLASSIC_MODS_VER).hmod . + @echo "** BUILT CLASSIC_MODS HAKCHI - $(CLASSIC_MODS_VER) HMOD PACKAGE **" + rm -fr /tmp/$(HAKCHI_DIR) #clean up tmp - @echo "*********************************************************************" - @echo "*** Classic ARM7 Cortex A7 build and packages built successfully! ***" - @echo "****************** Winner, Winner, Chicken Dinner! ******************" - @echo "*********************************************************************" + @echo "*********************************************************************" + @echo "*** Classic ARM7 Cortex A7 build and packages built successfully! ***" + @echo "****************** Winner, Winner, Chicken Dinner! ******************" + @echo "*********************************************************************" clean: - rm -rf obj-unix - rm -f *.d - rm -f *.o - rm -f audio/*.o - rm -f conf/*.o - rm -f gfx/*.o - rm -f gfx/drivers_font/*.o - rm -f gfx/drivers_font_renderer/*.o - rm -f gfx/drivers_context/*.o - rm -f gfx/py_state/*.o - rm -f compat/*.o - rm -f record/*.o - rm -f input/*.o - rm -f tools/*.o - rm -f $(BINDIR)/retroarch - rm -f $(BINDIR)/retroarch-joyconfig - rm -f $(PNDDIR)/readme.html - rm -f retroarch - rm -f $(CLASSIC_MODS_VER).hmod - rm -f version.all version.dtd + rm -rf obj-unix + rm -f *.d + rm -f *.o + rm -f audio/*.o + rm -f conf/*.o + rm -f gfx/*.o + rm -f gfx/drivers_font/*.o + rm -f gfx/drivers_font_renderer/*.o + rm -f gfx/drivers_context/*.o + rm -f gfx/py_state/*.o + rm -f compat/*.o + rm -f record/*.o + rm -f input/*.o + rm -f tools/*.o + rm -f $(BINDIR)/retroarch + rm -f $(BINDIR)/retroarch-joyconfig + rm -f $(PNDDIR)/readme.html + rm -f retroarch + rm -f $(CLASSIC_MODS_VER).hmod + rm -f version.all version.dtd