rockbox/packaging/rgnano/rgnano.make
Hairo R. Carela 48392bab94 New port: Anbernic RG Nano
A bit of context, this device is a clone of the FunKey-S with a different form factor, hardware is mostly identical, the relevant difference is it has audio out (via usb-c, adapter to 3.5mm is included), this is the reason why the FunKey-SDK is needed for bulding.

This port is based on the old SDL 1.2 code because the device doesn't have SDL2 support. Alongside what was supported in the SDL 1.2 builds this port supports battery level, charging status and backlight control.

Change-Id: I7fcb85be62748644b667c0efebabf59d6e9c5ade
2025-07-29 21:01:53 -04:00

40 lines
1.2 KiB
Makefile

RG_NANO_DIR=$(ROOTDIR)/packaging/rgnano
MKSQUASHFS=$(dir $(CPP))mksquashfs
INSTALL_DIR=$(OPK_BUILD_DIR)/install
OPK_BUILD_DIR=opkdir
opkdir:
mkdir $(OPK_BUILD_DIR)
opkclean:
rm -rf $(OPK_BUILD_DIR)
opk: opkclean opkdir $(MKSQUASHFS) build
make PREFIX=$(OPK_BUILD_DIR)/rockbox fullinstall
# Install opk files
cp $(RG_NANO_DIR)/icon.png $(OPK_BUILD_DIR)
cp $(RG_NANO_DIR)/mapping.key $(OPK_BUILD_DIR)
cp $(RG_NANO_DIR)/rockbox.funkey-s.desktop $(OPK_BUILD_DIR)
cp $(RG_NANO_DIR)/config.cfg $(OPK_BUILD_DIR)
cp $(RG_NANO_DIR)/run.sh $(OPK_BUILD_DIR)
# Organize files
mkdir $(INSTALL_DIR)
mv $(OPK_BUILD_DIR)/rockbox/bin/rockbox $(INSTALL_DIR)
mv $(OPK_BUILD_DIR)/rockbox/lib/rockbox/* $(INSTALL_DIR)
mv $(OPK_BUILD_DIR)/rockbox/share/rockbox/* $(INSTALL_DIR)
rm -rf $(OPK_BUILD_DIR)/rockbox
mv $(INSTALL_DIR)/rockbox $(OPK_BUILD_DIR)
# Plugin workarounds
mkdir $(INSTALL_DIR)/rocks.data
mv $(INSTALL_DIR)/rocks/games/.picross $(INSTALL_DIR)/rocks.data/.picross
# Permissions
chmod +x $(OPK_BUILD_DIR)/rockbox
chmod +x $(OPK_BUILD_DIR)/run.sh
# Make opk
$(MKSQUASHFS) $(OPK_BUILD_DIR) rockbox_funkey-s.opk -all-root -noappend -no-exports -no-xattrs