summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorUdo Schläpfer <rockbox-2014.10@desktopwarrior.net>2015-02-02 21:44:29 +0100
committerUdo Schläpfer <rockbox-2014.10@desktopwarrior.net>2015-02-02 21:57:55 +0100
commitdbabd0d9c34a33bc0c51243ec37f230d117db955 (patch)
tree46de348929ce739702a230a2587fdb5539585753 /tools
parentcef17e3d59ad93f766e8ee23b1610540a33dfe5e (diff)
downloadrockbox-dbabd0d9c34a33bc0c51243ec37f230d117db955.tar.gz
rockbox-dbabd0d9c34a33bc0c51243ec37f230d117db955.zip
iBasso DX50/DX90: Major code cleanup and reorganization.
Reorganization - Separated iBasso devices from PLATFORM_ANDROID. These are now standlone hosted targets. Most device specific code is in the firmware/target/hosted/ibasso directory. - No dependency on Android SDK, only the Android NDK is needed. 32 bit Android NDK and Android API Level 16. - Separate implementation for each device where feasible. Code cleanup - Rewrite of existing code, from simple reformat to complete reimplementation. - New backlight interface, seperating backlight from touchscreen. - Rewrite of device button handler, removing unneeded code and fixing memory leaks. - New Debug messages interface logging to Android adb logcat (DEBUGF, panicf, logf). - Rewrite of lcd device handler, removing unneeded code and fixing memory leaks. - Rewrite of audiohw device handler/pcm interface, removing unneeded code and fixing memory leaks, enabling 44.1/48kHz pthreaded playback. - Rewrite of power and powermng, proper shutdown, using batterylog results (see http://gerrit.rockbox.org/r/#/c/1047/). - Rewrite of configure (Android NDK) and device specific config. - Rewrite of the Android NDK specific Makefile. Misc - All plugins/games/demos activated. - Update tinyalsa to latest from https://github.com/tinyalsa/tinyalsa. Includes - http://gerrit.rockbox.org/r/#/c/993/ - http://gerrit.rockbox.org/r/#/c/1010/ - http://gerrit.rockbox.org/r/#/c/1035/ Does not include http://gerrit.rockbox.org/r/#/c/1007/ due to new backlight interface and new option for hold switch, touchscreen, physical button interaction. Rockbox needs the iBasso DX50/DX90 loader for startup, see http://gerrit.rockbox.org/r/#/c/1099/ The loader expects Rockbox to be installed in /mnt/sdcard/.rockbox/. If /mnt/sdcard/ is accessed as USB mass storage device, Rockbox will exit gracefully and the loader will restart Rockbox on USB disconnect. Tested on iBasso DX50. Compiled (not tested) for iBasso DX90. Compiled (not tested) for PLATFORM_ANDROID. Change-Id: I5f5e22e68f5b4cf29c28e2b40b2c265f2beb7ab7
Diffstat (limited to 'tools')
-rwxr-xr-xtools/configure83
-rw-r--r--tools/root.make8
2 files changed, 72 insertions, 19 deletions
diff --git a/tools/configure b/tools/configure
index 20b9095f73..2dd1bf3e12 100755
--- a/tools/configure
+++ b/tools/configure
@@ -726,6 +726,58 @@ androidcc () {
726 prefixtools $gcctarget 726 prefixtools $gcctarget
727} 727}
728 728
729androidndkcc()
730{
731 if ! [ -d "$ANDROID_NDK_PATH" ]; then
732 echo "ERROR: You need the Android NDK installed (r16 or higher) and have the ANDROID_NDK_PATH"
733 echo "environment variable point to the root directory of the Android NDK."
734 exit
735 fi
736
737 make_toolchain="${ANDROID_NDK_PATH}/build/tools/make-standalone-toolchain.sh"
738
739 if ! [ -e "${make_toolchain}" ]; then
740 echo "ERROR: ${make_toolchain} could not be found."
741 exit
742 fi
743
744 buildhost=$(uname -s | tr "[:upper:]" "[:lower:]")
745 buildhost="${buildhost}-$(uname -m)"
746
747 GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//`
748 LDOPTS="$LDOPTS -ldl -llog"
749 SHARED_LDFLAG="-shared"
750 SHARED_CFLAGS=''
751 GLOBAL_LDOPTS="-Wl,-z,defs -Wl,-z,noexecstack"
752
753 # arch dependant stuff
754 case $1 in
755 armeabi)
756 endian="little"
757 gccchoice="4.6"
758 gcctarget="arm-linux-androideabi-"
759 echo "${make_toolchain} --system=${buildhost} --toolchain=arm-linux-androideabi-4.6 --platform=android-16 --install-dir=${pwd}/android-toolchain"
760 ${make_toolchain} --system=${buildhost} --toolchain=arm-linux-androideabi-4.6 --platform=android-16 --install-dir=${pwd}/android-toolchain
761 if [ ${?} != 0 ]; then
762 exit
763 fi
764 GCCOPTS="$GCCOPTS -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer --sysroot=${pwd}/android-toolchain/sysroot"
765 LDOPTS="$LDOPTS --sysroot=${pwd}/android-toolchain/sysroot"
766 ;;
767 *)
768 echo "ERROR: androidndkcc(): Unknown target architecture"
769 exit
770 ;;
771 esac
772
773 echo "Using endian ${endian}"
774 echo "Using gccchoice ${gccchoice}"
775 echo "Using gcctarget ${gcctarget}"
776
777 PATH=$PATH:${pwd}/android-toolchain/bin
778 prefixtools $gcctarget
779}
780
729whichadvanced () { 781whichadvanced () {
730 atype=`echo "$1" | cut -c 2-` 782 atype=`echo "$1" | cut -c 2-`
731 ################################################################## 783 ##################################################################
@@ -3751,26 +3803,24 @@ fi
3751 target_id=94 3803 target_id=94
3752 modelname="ibassodx50" 3804 modelname="ibassodx50"
3753 target="DX50" 3805 target="DX50"
3754 app_type="android_standalone" 3806 app_type="android_ndk"
3755 lcd_orientation="landscape" 3807 lcd_orientation="landscape"
3756 sharedir="/system/rockbox/app_rockbox/rockbox" 3808 # Actually 408260kB
3757 bindir="/system/rockbox/lib" 3809 memory=256
3758 libdir="/system/rockbox/app_rockbox"
3759 memory=32
3760 uname=`uname` 3810 uname=`uname`
3761 androidcc armeabi 3811 androidndkcc armeabi
3762 tool="cp " 3812 tool="cp "
3763 boottool="cp " 3813 boottool="cp "
3764 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3814 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3765 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3815 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3766 output="rockbox" 3816 output="rockbox"
3767 bootoutput="rockbox" 3817 bootoutput="rockbox"
3768 appextra="recorder:gui:radio:hosted/android" 3818 appextra="recorder:gui:hosted"
3769 plugins="yes" 3819 plugins="yes"
3770 swcodec="yes" 3820 swcodec="yes"
3771 # architecture, manufacturer and model for the target-tree build 3821 # architecture, manufacturer and model for the target-tree build
3772 t_cpu="hosted" 3822 t_cpu="hosted"
3773 t_manufacturer="android" 3823 t_manufacturer="ibasso"
3774 t_model="dx50" 3824 t_model="dx50"
3775 ;; 3825 ;;
3776 3826
@@ -3779,27 +3829,24 @@ fi
3779 target_id=95 3829 target_id=95
3780 modelname="ibassodx90" 3830 modelname="ibassodx90"
3781 target="DX90" 3831 target="DX90"
3782 app_type="android_standalone" 3832 app_type="android_ndk"
3783 lcd_orientation="landscape" 3833 lcd_orientation="landscape"
3784 sharedir="/system/rockbox/app_rockbox/rockbox" 3834 memory=256
3785 bindir="/system/rockbox/lib"
3786 libdir="/system/rockbox/app_rockbox"
3787 memory=32
3788 uname=`uname` 3835 uname=`uname`
3789 androidcc armeabi 3836 androidndkcc armeabi
3790 tool="cp " 3837 tool="cp "
3791 boottool="cp " 3838 boottool="cp "
3792 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" 3839 bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
3793 bmp2rb_native="$rootdir/tools/bmp2rb -f 4" 3840 bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
3794 output="rockbox" 3841 output="rockbox"
3795 bootoutput="rockbox" 3842 bootoutput="rockbox"
3796 appextra="recorder:gui:radio:hosted/android" 3843 appextra="recorder:gui:hosted"
3797 plugins="yes" 3844 plugins="yes"
3798 swcodec="yes" 3845 swcodec="yes"
3799 # architecture, manufacturer and model for the target-tree build 3846 # architecture, manufacturer and model for the target-tree build
3800 t_cpu="hosted" 3847 t_cpu="hosted"
3801 t_manufacturer="android" 3848 t_manufacturer="ibasso"
3802 t_model="dx50" 3849 t_model="dx90"
3803 ;; 3850 ;;
3804 3851
3805 *) 3852 *)
@@ -4333,6 +4380,8 @@ if test -n "$t_cpu"; then
4333 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree 4380 elif [ "$simulator" = "yes" ]; then # a few more includes for the sim target tree
4334 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl" 4381 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl"
4335 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted" 4382 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted"
4383 elif [ "$t_manufacturer" = "ibasso" ]; then
4384 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/ibasso/tinyalsa/include"
4336 fi 4385 fi
4337 4386
4338 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer" 4387 TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer"
diff --git a/tools/root.make b/tools/root.make
index 4e0ca7c4f0..2deae8cc82 100644
--- a/tools/root.make
+++ b/tools/root.make
@@ -132,8 +132,12 @@ else # core
132 include $(ROOTDIR)/firmware/target/hosted/samsungypr/ypr1/ypr1.make 132 include $(ROOTDIR)/firmware/target/hosted/samsungypr/ypr1/ypr1.make
133 endif 133 endif
134 134
135 ifneq (,$(findstring android, $(APP_TYPE))) 135 ifneq (,$(findstring android_ndk, $(APP_TYPE)))
136 include $(ROOTDIR)/android/android.make 136 include $(ROOTDIR)/firmware/target/hosted/ibasso/android_ndk.make
137 else
138 ifneq (,$(findstring android, $(APP_TYPE)))
139 include $(ROOTDIR)/android/android.make
140 endif
137 endif 141 endif
138 142
139 ifneq (,$(findstring pandora, $(MODELNAME))) 143 ifneq (,$(findstring pandora, $(MODELNAME)))