diff --git a/.gitignore b/.gitignore index efdf8d79..f80b4944 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +*.o .idea/ bin/ interface/autosave/ diff --git a/README.md b/README.md index f8a8a7ed..86063e47 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,21 @@ # muX muOS Frontend + +## Configuration +- Download the [buildroot/Batocera Lite SDK Toolchain](https://github.com/rg35xx-cfw/rg35xx-cfw.github.io/releases) + - Unpack the tarfile, and then run the `./relocate.sh` in the root directory to update the buildroot SDK accordingly. + +The `setvars.sh` script included in this file prepares the environment variables for the current session to build for the target device. + - This shell script assumes your toolchain directory lives at `~/x-tools`. + +To build, a target device must be exported to environment variable `DEVICE`. Device options are located in `common/help.h`, and include: + +- RG28XX +- RG32XXH +- RG35XXOG +- RG35XXPLUS +- RG35XXSP +- RG35XX2024 + +## Build +To build, first run `. ./setvars.sh` to set the correct environment variables for the current session, and then `./buildall.sh`, which will make all of the individual subfolders. The resultant applications will be placed into the `./bin` directory. \ No newline at end of file diff --git a/buildall.sh b/buildall.sh index a2bce7e9..c8f04227 100755 --- a/buildall.sh +++ b/buildall.sh @@ -10,6 +10,7 @@ BUILD_COUNT=0 CURRENT_DIR=$(pwd) rm -rf bin/mux* +mkdir bin for MUX in */; do if [ -d "$MUX" ]; then diff --git a/muxarchive/ui/filelist.txt b/muxarchive/ui/filelist.txt index 86486328..08275f1f 100644 --- a/muxarchive/ui/filelist.txt +++ b/muxarchive/ui/filelist.txt @@ -1,16 +1,16 @@ -ui_scrArchive.c -ui.c -ui_comp_hook.c -ui_helpers.c -ui_img_nothing_png.c -ui_img_muoskofi_png.c -ui_font_Awesome.c -ui_font_AwesomeBig.c -ui_font_AwesomeBrand.c -ui_font_AwesomeBrandSmall.c -ui_font_AwesomeSmall.c -ui_font_Gamepad.c -ui_font_GamepadNav.c -ui_font_NotoSans.c -ui_font_NotoSansBig.c -ui_font_NotoSansSmall.c +ui/ui_scrArchive.c +ui/ui.c +ui/ui_comp_hook.c +ui/ui_helpers.c +ui/ui_img_nothing_png.c +ui/ui_img_muoskofi_png.c +ui/ui_font_Awesome.c +ui/ui_font_AwesomeBig.c +ui/ui_font_AwesomeBrand.c +ui/ui_font_AwesomeBrandSmall.c +ui/ui_font_AwesomeSmall.c +ui/ui_font_Gamepad.c +ui/ui_font_GamepadNav.c +ui/ui_font_NotoSans.c +ui/ui_font_NotoSansBig.c +ui/ui_font_NotoSansSmall.c diff --git a/muxnetwork/ui/filelist.txt b/muxnetwork/ui/filelist.txt index ad0a742b..a0879984 100644 --- a/muxnetwork/ui/filelist.txt +++ b/muxnetwork/ui/filelist.txt @@ -1,16 +1,16 @@ -ui_scrNetwork.c -ui.c -ui_comp_hook.c -ui_helpers.c -ui_img_nothing_png.c -ui_img_muoskofi_png.c -ui_font_Awesome.c -ui_font_AwesomeBig.c -ui_font_AwesomeBrand.c -ui_font_AwesomeBrandSmall.c -ui_font_AwesomeSmall.c -ui_font_Gamepad.c -ui_font_GamepadNav.c -ui_font_NotoSans.c -ui_font_NotoSansBig.c -ui_font_NotoSansSmall.c +ui/ui_scrNetwork.c +ui/ui.c +ui/ui_comp_hook.c +ui/ui_helpers.c +ui/ui_img_nothing_png.c +ui/ui_img_muoskofi_png.c +ui/ui_font_Awesome.c +ui/ui_font_AwesomeBig.c +ui/ui_font_AwesomeBrand.c +ui/ui_font_AwesomeBrandSmall.c +ui/ui_font_AwesomeSmall.c +ui/ui_font_Gamepad.c +ui/ui_font_GamepadNav.c +ui/ui_font_NotoSans.c +ui/ui_font_NotoSansBig.c +ui/ui_font_NotoSansSmall.c diff --git a/muxsysinfo/ui/filelist.txt b/muxsysinfo/ui/filelist.txt index b2f33c1f..c4b20a5a 100644 --- a/muxsysinfo/ui/filelist.txt +++ b/muxsysinfo/ui/filelist.txt @@ -1,16 +1,16 @@ -ui_scrSysInfo.c -ui.c -ui_comp_hook.c -ui_helpers.c -ui_img_nothing_png.c -ui_img_muoskofi_png.c -ui_font_Awesome.c -ui_font_AwesomeBig.c -ui_font_AwesomeBrand.c -ui_font_AwesomeBrandSmall.c -ui_font_AwesomeSmall.c -ui_font_Gamepad.c -ui_font_GamepadNav.c -ui_font_NotoSans.c -ui_font_NotoSansBig.c -ui_font_NotoSansSmall.c +ui/ui_scrSysInfo.c +ui/ui.c +ui/ui_comp_hook.c +ui/ui_helpers.c +ui/ui_img_nothing_png.c +ui/ui_img_muoskofi_png.c +ui/ui_font_Awesome.c +ui/ui_font_AwesomeBig.c +ui/ui_font_AwesomeBrand.c +ui/ui_font_AwesomeBrandSmall.c +ui/ui_font_AwesomeSmall.c +ui/ui_font_Gamepad.c +ui/ui_font_GamepadNav.c +ui/ui_font_NotoSans.c +ui/ui_font_NotoSansBig.c +ui/ui_font_NotoSansSmall.c diff --git a/muxtester/ui/filelist.txt b/muxtester/ui/filelist.txt index 42c65205..e6c49729 100644 --- a/muxtester/ui/filelist.txt +++ b/muxtester/ui/filelist.txt @@ -1,16 +1,16 @@ -ui_scrTester.c -ui.c -ui_comp_hook.c -ui_helpers.c -ui_img_nothing_png.c -ui_img_muoskofi_png.c -ui_font_Awesome.c -ui_font_AwesomeBig.c -ui_font_AwesomeBrand.c -ui_font_AwesomeBrandSmall.c -ui_font_AwesomeSmall.c -ui_font_Gamepad.c -ui_font_GamepadNav.c -ui_font_NotoSans.c -ui_font_NotoSansBig.c -ui_font_NotoSansSmall.c +ui/ui_scrTester.c +ui/ui.c +ui/ui_comp_hook.c +ui/ui_helpers.c +ui/ui_img_nothing_png.c +ui/ui_img_muoskofi_png.c +ui/ui_font_Awesome.c +ui/ui_font_AwesomeBig.c +ui/ui_font_AwesomeBrand.c +ui/ui_font_AwesomeBrandSmall.c +ui/ui_font_AwesomeSmall.c +ui/ui_font_Gamepad.c +ui/ui_font_GamepadNav.c +ui/ui_font_NotoSans.c +ui/ui_font_NotoSansBig.c +ui/ui_font_NotoSansSmall.c diff --git a/muxvisual/ui/filelist.txt b/muxvisual/ui/filelist.txt index 12e8ba61..ca944b8b 100644 --- a/muxvisual/ui/filelist.txt +++ b/muxvisual/ui/filelist.txt @@ -1,16 +1,16 @@ -ui_scrVisual.c -ui.c -ui_comp_hook.c -ui_helpers.c -ui_img_nothing_png.c -ui_img_muoskofi_png.c -ui_font_Awesome.c -ui_font_AwesomeBig.c -ui_font_AwesomeBrand.c -ui_font_AwesomeBrandSmall.c -ui_font_AwesomeSmall.c -ui_font_Gamepad.c -ui_font_GamepadNav.c -ui_font_NotoSans.c -ui_font_NotoSansBig.c -ui_font_NotoSansSmall.c +ui/ui_scrVisual.c +ui/ui.c +ui/ui_comp_hook.c +ui/ui_helpers.c +ui/ui_img_nothing_png.c +ui/ui_img_muoskofi_png.c +ui/ui_font_Awesome.c +ui/ui_font_AwesomeBig.c +ui/ui_font_AwesomeBrand.c +ui/ui_font_AwesomeBrandSmall.c +ui/ui_font_AwesomeSmall.c +ui/ui_font_Gamepad.c +ui/ui_font_GamepadNav.c +ui/ui_font_NotoSans.c +ui/ui_font_NotoSansBig.c +ui/ui_font_NotoSansSmall.c diff --git a/setvars.sh b/setvars.sh new file mode 100755 index 00000000..95257cfa --- /dev/null +++ b/setvars.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +# Device options are listed in common/help.h. +# Targets include: +# RG28XX +# RG35XXH +# RG35XXOG +# RG35XXPLUS +# RG35XXSP +# RG35XX2024 +export DEVICE=RG35XXPLUS + +# This is the location of your installed Batocera Lite SDK Toolchain. +# If this is incorrect, point it to your directory. +export XTOOL=$HOME/x-tools +export XHOST=arm-buildroot-linux-gnueabihf +export XBIN=$XTOOL/bin + +export PATH="${PATH}:$XBIN" + +export SYSROOT=$XTOOL/$XHOST/$XHOST/sysroot +export DESTDIR=$SYSROOT + +export CC=$XBIN/$XHOST-gcc +export CXX=$XBIN/$XHOST-g++ +export AR=$XBIN/$XHOST-ar +export LD=$XBIN/$XHOST-ld +export STRIP=$XBIN/$XHOST-strip + +export LD_LIBRARY_PATH="$SYSROOT/usr/lib" + +export CPP_FLAGS="--sysroot=$SYSROOT -I$SYSROOT/usr/include" +export LD_FLAGS="-L$SYSROOT -L$SYSROOT/lib -L$SYSROOT/usr/lib -L$SYSROOT/usr/local/lib -L$SYSROOT/usr/include/sound" + +export CPPFLAGS=$CPP_FLAGS +export LDFLAGS=$LD_FLAGS + +export CFLAGS="-marm -mfpu=neon -mfloat-abi=hard $CPP_FLAGS" +export CCFLAGS=$CPP_FLAGS +export CXXFLAGS=$CPP_FLAGS + +export INC_DIR=$CPP_FLAGS +export LIB_DIR=$LD_FLAGS + +export ARMABI=$XHOST +export TOOLCHAIN_DIR=$XTOOL/$XHOST + +export PKG_CONFIG_PATH=$SYSROOT/usr/lib/pkgconfig +export PKG_CONF_PATH=$XBIN/pkgconf + +export CROSS_COMPILE=$XBIN/$XHOST- + +export SDL_CONFIG=$SYSROOT/usr/bin/sdl-config +export FREETYPE_CONFIG=$SYSROOT/usr/bin/freetype-config