create opk during build

Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
Michel-FK 2020-12-11 23:37:33 +01:00
parent 8e15b18a5c
commit bb0f2b4302
48 changed files with 194 additions and 91 deletions

View File

@ -155,6 +155,10 @@ copy_files_to_store_partition () {
mount /mnt/ || die 18 "Cannot mount /mnt"
unzip -q -o /usr/local/share/mnt_freware_games.zip -d /mnt/
mkdir -p /mnt/apps
set +f
cp -f /usr/games/opk/*.opk /mnt/apps/
set -f
umount /mnt/ || die 20 "Cannot unmount /mnt"
return 0
}

View File

@ -1,7 +0,0 @@
title=GameBoy
description=Game Boy Emulator
icon=skin:icons/gb.png
exec=/usr/games/launchers/gb_launch.sh
selectorbrowser=true
selectordir=/mnt/Game Boy
selectorfilter=gb,GB

View File

@ -1,7 +0,0 @@
title=GameBoy Adv
description=Game Boy Advance Emulator
icon=skin:icons/gba.png
exec=/usr/games/launchers/gba_launch_gpsp.sh
selectorbrowser=true
selectordir=/mnt/Game Boy Advance
selectorfilter=gba,GBA

View File

@ -1,7 +0,0 @@
title=GameBoy Col
description=Game Boy Color Emulator
icon=skin:icons/gbc.png
exec=/usr/games/launchers/gb_launch.sh
selectorbrowser=true
selectordir=/mnt/Game Boy Color
selectorfilter=gbc,GBC

View File

@ -1,7 +0,0 @@
title=Game Gear
description=Game Gear Emulator
icon=skin:icons/gamegear.png
exec=/usr/games/launchers/gamegear_launch.sh
selectorbrowser=true
selectordir=/mnt/Game Gear
selectorfilter=zip,ZIP,gg,GG

View File

@ -1,7 +0,0 @@
title=Lynx
description=Atari Lynx Emulator
icon=skin:icons/lynx.png
exec=/usr/games/launchers/lynx_launch.sh
selectorbrowser=true
selectordir=/mnt/Atari lynx
selectorfilter=zip,ZIP,lnx,LNX

View File

@ -1,7 +0,0 @@
title=MegaDrive
description=Sega Genesis/MegaDrive Emulator
icon=skin:icons/megadrive.png
exec=/usr/games/launchers/megadrive_launch.sh
selectorbrowser=true
selectordir=/mnt/Sega Genesis
selectorfilter=zip,ZIP,md,MD

View File

@ -1,7 +0,0 @@
title=NES
description=FC/NES Emulator
icon=skin:icons/nes.png
exec=/usr/games/launchers/nes_launch.sh
selectorbrowser=true
selectordir=/mnt/NES
selectorfilter=nes,NES

View File

@ -1,7 +0,0 @@
title=Neo Geo
description=Neo Geo Pocket Emulator
icon=skin:icons/ngp.png
exec=/usr/games/launchers/ngp_launch.sh
selectorbrowser=true
selectordir=/mnt/Neo Geo Pocket
selectorfilter=zip,ZIP,ngp,NGP

View File

@ -1,7 +0,0 @@
title=PC Engine
description=PCE-TurboGrafx Emulator
icon=skin:icons/pce.png
exec=/usr/games/launchers/pce_launch.sh
selectorbrowser=true
selectordir=/mnt/PCE-TurboGrafx
selectorfilter=zip,ZIP,pce,PCE,sgx,SGX

View File

@ -1,7 +0,0 @@
title=PS1
description=PS1 Emulator
icon=skin:icons/ps1.png
exec=/usr/games/launchers/psone_launch_pcsx.sh
selectorbrowser=true
selectordir=/mnt/PS1
selectorfilter=bin,BIN,cue,CUE,pbp,PBP

View File

@ -1,7 +0,0 @@
title=Master System
description=Sega MAster System Emulator
icon=skin:icons/sms.png
exec=/usr/games/launchers/sms_launch.sh
selectorbrowser=true
selectordir=/mnt/Sega Master System
selectorfilter=zip,ZIP,sms,SMS

View File

@ -1,7 +0,0 @@
title=SNES
description=SNES Emulator
icon=skin:icons/snes.png
exec=/usr/games/launchers/snes_launch.sh
selectorbrowser=true
selectordir=/mnt/SNES
selectorfilter=sfc,SFC,smc,SMC

View File

@ -1,7 +0,0 @@
title=WonderSwan
description=WonderSwan/WonderSwan Color Emulator
icon=skin:icons/wonderswan.png
exec=/usr/games/launchers/wonderswan_launch.sh
selectorbrowser=true
selectordir=/mnt/WonderSwan
selectorfilter=zip,ZIP,wsc,WSC

Binary file not shown.

Before

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -84,6 +84,7 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="128M"
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_DTC=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_HOST_SQUASHFS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_LIBOPK=y
BR2_PACKAGE_LIBXDGMIME=y

View File

@ -65,5 +65,10 @@ define FCEUX_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 $(@D)/fceux/fceux $(TARGET_DIR)/usr/games/fceux
endef
define FCEUX_CREATE_OPK
$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/games/opk
$(HOST_DIR)/usr/bin/mksquashfs $(FCEUX_PKGDIR)/opk/nes $(TARGET_DIR)/usr/games/opk/nes.opk -all-root -noappend -no-exports -no-xattrs
endef
FCEUX_POST_INSTALL_TARGET_HOOKS += FCEUX_CREATE_OPK
$(eval $(generic-package))

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Name=NES
Comment=FC/NES Emulator
Icon=nes
Exec=/usr/games/launchers/nes_launch.sh %f
Terminal=false
X-OD-NeedsDownscaling=true
Categories=emulators;
selectorbrowser=true
SelectorDir=/mnt/NES
SelectorFilter=nes,NES

View File

Before

Width:  |  Height:  |  Size: 363 B

After

Width:  |  Height:  |  Size: 363 B

View File

@ -62,4 +62,10 @@ define PCSX_REARMED_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 $(@D)/pcsx $(TARGET_DIR)/usr/games/pcsx
endef
define PCSX_REARMED_CREATE_OPK
$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/games/opk
$(HOST_DIR)/usr/bin/mksquashfs $(PCSX_REARMED_PKGDIR)/opk/ps1 $(TARGET_DIR)/usr/games/opk/ps1.opk -all-root -noappend -no-exports -no-xattrs
endef
PCSX_REARMED_POST_INSTALL_TARGET_HOOKS += PCSX_REARMED_CREATE_OPK
$(eval $(generic-package))

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Name=PS1
Comment=PS1 Emulator
Icon=ps1
Exec=/usr/games/launchers/psone_launch_pcsx.sh
Terminal=false
X-OD-NeedsDownscaling=true
Categories=emulators;
selectorbrowser=true
SelectorDir=/mnt/PS1
SelectorFilter=bin,BIN,cue,CUE,pbp,PBP

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -71,4 +71,10 @@ define POCKETSNES_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 $(@D)/psnes $(TARGET_DIR)/usr/games/psnes
endef
define POCKETSNES_CREATE_OPK
$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/games/opk
$(HOST_DIR)/usr/bin/mksquashfs $(POCKETSNES_PKGDIR)/opk/snes $(TARGET_DIR)/usr/games/opk/snes.opk -all-root -noappend -no-exports -no-xattrs
endef
POCKETSNES_POST_INSTALL_TARGET_HOOKS += POCKETSNES_CREATE_OPK
$(eval $(generic-package))

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Name=SNES
Comment=SNES Emulator
Icon=snes
Exec=/usr/games/launchers/snes_launch.sh
Terminal=false
X-OD-NeedsDownscaling=true
Categories=emulators;
selectorbrowser=true
SelectorDir=/mnt/SNES
SelectorFilter=sfc,SFC,smc,SMC

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -43,4 +43,11 @@ GNUBOY_CONF_OPTS += --without-fb \
GNUBOY_CONF_ENV += SDL_CONFIG="$(STAGING_DIR)/usr/bin/sdl-config"
define GNUBOY_CREATE_OPK
$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/games/opk
$(HOST_DIR)/usr/bin/mksquashfs $(GNUBOY_PKGDIR)/opk/gb $(TARGET_DIR)/usr/games/opk/gb.opk -all-root -noappend -no-exports -no-xattrs
$(HOST_DIR)/usr/bin/mksquashfs $(GNUBOY_PKGDIR)/opk/gbc $(TARGET_DIR)/usr/games/opk/gbc.opk -all-root -noappend -no-exports -no-xattrs
endef
GNUBOY_POST_INSTALL_TARGET_HOOKS += GNUBOY_CREATE_OPK
$(eval $(autotools-package))

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Name=GameBoy
Comment=Game Boy Emulator
Icon=gb
Exec=/usr/games/launchers/gb_launch.sh
Terminal=false
X-OD-NeedsDownscaling=true
Categories=emulators;
selectorbrowser=true
SelectorDir=/mnt/Game Boy
SelectorFilter=gb,GB

View File

Before

Width:  |  Height:  |  Size: 700 B

After

Width:  |  Height:  |  Size: 700 B

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Name=GameBoy Col
Comment=Game Boy Color Emulator
Icon=gbc
Exec=/usr/games/launchers/gb_launch.sh
Terminal=false
X-Od-NeedsDownscaling=true
Categories=emulators;
selectorbrowser=true
SelectorDir=/mnt/Game Boy Color
SelectorFilter=gbc,GBC

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -58,4 +58,10 @@ define GPSP_INSTALL_TARGET_CMDS
$(INSTALL) -m 0644 $(@D)/game_config.txt $(TARGET_DIR)/usr/games/game_config.txt
endef
define GPSP_CREATE_OPK
$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/games/opk
$(HOST_DIR)/usr/bin/mksquashfs $(GPSP_PKGDIR)/opk/gba $(TARGET_DIR)/usr/games/opk/gba.opk -all-root -noappend -no-exports -no-xattrs
endef
GPSP_POST_INSTALL_TARGET_HOOKS += GPSP_CREATE_OPK
$(eval $(generic-package))

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Name=GameBoy Adv
Comment=Game Boy Advance Emulator
Icon=gba
Exec=/usr/games/launchers/gba_launch_gpsp.sh
Terminal=false
X-OD-NeedsDownscaling=true
Categories=emulators;
selectorbrowser=true
SelectorDir=/mnt/Game Boy Advance
SelectorFilter=gba,GBA

View File

Before

Width:  |  Height:  |  Size: 397 B

After

Width:  |  Height:  |  Size: 397 B

View File

@ -44,4 +44,14 @@ MEDNAFEN_CONF_OPTS += --prefix=/usr/local --bindir=/usr/games --without-libsndfi
MEDNAFEN_CONF_ENV += SDL_CONFIG="$(STAGING_DIR)/usr/bin/sdl-config"
define MEDNAFEN_CREATE_OPK
$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/games/opk
$(HOST_DIR)/usr/bin/mksquashfs $(MEDNAFEN_PKGDIR)/opk/gamegear $(TARGET_DIR)/usr/games/opk/gamegear.opk -all-root -noappend -no-exports -no-xattrs
$(HOST_DIR)/usr/bin/mksquashfs $(MEDNAFEN_PKGDIR)/opk/lynx $(TARGET_DIR)/usr/games/opk/lynx.opk -all-root -noappend -no-exports -no-xattrs
$(HOST_DIR)/usr/bin/mksquashfs $(MEDNAFEN_PKGDIR)/opk/ngp $(TARGET_DIR)/usr/games/opk/ngp.opk -all-root -noappend -no-exports -no-xattrs
$(HOST_DIR)/usr/bin/mksquashfs $(MEDNAFEN_PKGDIR)/opk/pce $(TARGET_DIR)/usr/games/opk/pce.opk -all-root -noappend -no-exports -no-xattrs
$(HOST_DIR)/usr/bin/mksquashfs $(MEDNAFEN_PKGDIR)/opk/wonderswan $(TARGET_DIR)/usr/games/opk/wonderswan.opk -all-root -noappend -no-exports -no-xattrs
endef
MEDNAFEN_POST_INSTALL_TARGET_HOOKS += MEDNAFEN_CREATE_OPK
$(eval $(autotools-package))

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Name=Game Gear
Comment=Game Gear Emulator
Icon=gamegear
Exec=/usr/games/launchers/gamegear_launch.sh
Terminal=false
X-OD-NeedsDownscaling=true
Categories=emulators;
selectorbrowser=true
SelectorDir=/mnt/Game Gear
SelectorFilter=zip,ZIP,gg,GG

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Name=Lynx
Comment=Atari Lynx Emulator
Icon=lynx
Exec=/usr/games/launchers/lynx_launch.sh
Terminal=false
X-OD-NeedsDownscaling=true
Categories=emulators;
selectorbrowser=true
SelectorDir=/mnt/Atari lynx
SelectorFilter=zip,ZIP,lnx,LNX

View File

Before

Width:  |  Height:  |  Size: 460 B

After

Width:  |  Height:  |  Size: 460 B

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Name=Neo Geo
Comment=Neo Geo Pocket Emulator
Icon=ngp
Exec=/usr/games/launchers/ngp_launch.sh
Terminal=false
X-OD-NeedsDownscaling=true
Categories=emulators;
selectorbrowser=true
SelectorDir=/mnt/Neo Geo Pocket
SelectorFilter=zip,ZIP,ngp,NGP

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Name=PC Engine
Comment=PCE-TurboGrafx Emulator
Icon=pce
Exec=/usr/games/launchers/pce_launch.sh
Terminal=false
X-OD-NeedsDownscaling=true
Categories=emulators;
selectorbrowser=true
SelectorDir=/mnt/PCE-TurboGrafx
SelectorFilter=zip,ZIP,pce,PCE,sgx,SGX

View File

Before

Width:  |  Height:  |  Size: 491 B

After

Width:  |  Height:  |  Size: 491 B

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Name=WonderSwan
Comment=WonderSwan/WonderSwan Color Emulator
Icon=wonderswan
Exec=/usr/games/launchers/wonderswan_launch.sh
Terminal=false
X-OD-NeedsDownscaling=true
Categories=emulators;
selectorbrowser=true
SelectorDir=/mnt/WonderSwan
SelectorFilter=zip,ZIP,wsc,WSC

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Name=MegaDrive
Comment=Sega Genesis/MegaDrive Emulator
Icon=megadrive
Exec=/usr/games/launchers/megadrive_launch.sh
Terminal=false
X-OD-NeedsDownscaling=true
Categories=emulators;
selectorbrowser=true
SelectorDir=/mnt/Sega Genesis
SelectorFilter=zip,ZIP,md,MD

View File

@ -62,5 +62,10 @@ define PICODRIVE_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 $(@D)/PicoDrive $(TARGET_DIR)/usr/games/
endef
define PICODRIVE_CREATE_OPK
$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/games/opk
$(HOST_DIR)/usr/bin/mksquashfs $(PICODRIVE_PKGDIR)/opk/megadrive $(TARGET_DIR)/usr/games/opk/megadrive.opk -all-root -noappend -no-exports -no-xattrs
endef
PICODRIVE_POST_INSTALL_TARGET_HOOKS += PICODRIVE_CREATE_OPK
$(eval $(generic-package))