mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-26 23:36:37 -04:00
FS#11924 - Use separate targets for RaaA devices. This changes tools/configure to present the (currently four) possible RaaA targets as separate menu items instead of a single "Application" item with a follow-up question.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29286 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
751e922783
commit
9e638c7bc8
2 changed files with 168 additions and 119 deletions
9
debian/rules
vendored
9
debian/rules
vendored
|
|
@ -1,6 +1,13 @@
|
||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
CONFIGURE_OPTIONS := --platform=M --lcdwidth=800 --lcdheight=480 --target=application --ram=8 --rbdir=/.rockbox --type=N
|
# We deduce the target based on the available version of the Maemo SDK
|
||||||
|
ifeq (1,$(shell pkg-config --atleast-version=5 maemo-version && echo 1))
|
||||||
|
TARGET=nokian900
|
||||||
|
else
|
||||||
|
TARGET=nokian8xx
|
||||||
|
endif
|
||||||
|
|
||||||
|
CONFIGURE_OPTIONS := --target=$(TARGET) --lcdwidth=800 --lcdheight=480 --ram=8 --rbdir=/.rockbox --type=N
|
||||||
DESKTOP_DIR := `pkg-config --variable=desktopentrydir osso-af-settings`
|
DESKTOP_DIR := `pkg-config --variable=desktopentrydir osso-af-settings`
|
||||||
|
|
||||||
export DH_VERBOSE=1
|
export DH_VERBOSE=1
|
||||||
|
|
|
||||||
268
tools/configure
vendored
268
tools/configure
vendored
|
|
@ -26,7 +26,7 @@ bindir=
|
||||||
libdir=
|
libdir=
|
||||||
sharedir=
|
sharedir=
|
||||||
|
|
||||||
app_platform=
|
app_modelname=
|
||||||
app_lcd_width=
|
app_lcd_width=
|
||||||
app_lcd_height=
|
app_lcd_height=
|
||||||
#
|
#
|
||||||
|
|
@ -50,43 +50,8 @@ prefixtools () {
|
||||||
OC=${prefix}objcopy
|
OC=${prefix}objcopy
|
||||||
}
|
}
|
||||||
|
|
||||||
app_get_platform() {
|
app_set_paths () {
|
||||||
echo "Select your platform: (S)DL, (A)ndroid, (M)aemo (default: Android)"
|
|
||||||
if [ -z "$ARG_PLATFORM" ]; then
|
|
||||||
choice=`input`
|
|
||||||
else
|
|
||||||
choice="$ARG_PLATFORM"
|
|
||||||
fi
|
|
||||||
|
|
||||||
case $choice in
|
|
||||||
s|S*) app_platform="sdl" ;;
|
|
||||||
m|M*) app_platform="maemo" ;;
|
|
||||||
*|a|A*) app_platform="android" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo "Selected $app_platform platform"
|
|
||||||
echo "Enter the LCD width (default: 320)"
|
|
||||||
if [ -z "$ARG_LCDWIDTH" ]; then
|
|
||||||
app_lcd_width=`input`
|
|
||||||
else
|
|
||||||
app_lcd_width="$ARG_LCDWIDTH"
|
|
||||||
fi
|
|
||||||
if [ -z "$app_lcd_width" ]; then app_lcd_width="320"; fi
|
|
||||||
echo "Enter the LCD height (default: 480)"
|
|
||||||
if [ -z "$ARG_LCDHEIGHT" ]; then
|
|
||||||
app_lcd_height=`input`
|
|
||||||
else
|
|
||||||
app_lcd_height="$ARG_LCDHEIGHT"
|
|
||||||
fi
|
|
||||||
if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi
|
|
||||||
echo "Selected $app_lcd_width x $app_lcd_height resolution"
|
|
||||||
ARG_LCDWIDTH=$app_lcd_width
|
|
||||||
ARG_LCDHEIGHT=$app_lcd_height
|
|
||||||
|
|
||||||
app_lcd_width="#define LCD_WIDTH $app_lcd_width"
|
|
||||||
app_lcd_height="#define LCD_HEIGHT $app_lcd_height"
|
|
||||||
# setup files and paths depending on the platform
|
# setup files and paths depending on the platform
|
||||||
if [ "$app_platform" = "sdl" ]; then
|
|
||||||
if [ -z "$ARG_PREFIX" ]; then
|
if [ -z "$ARG_PREFIX" ]; then
|
||||||
sharedir="/usr/local/share/rockbox"
|
sharedir="/usr/local/share/rockbox"
|
||||||
bindir="/usr/local/bin"
|
bindir="/usr/local/bin"
|
||||||
|
|
@ -108,53 +73,40 @@ app_get_platform() {
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
output="rockbox"
|
}
|
||||||
bootoutput="rockbox"
|
|
||||||
elif [ "$app_platform" = "android" ]; then
|
# Set the application LCD size according to the following priorities:
|
||||||
if [ -n "$PREFIX" ]; then
|
# 1) If --lcdwidth and --lcdheight are set, use them
|
||||||
echo "WARNING: PREFIX not supported on Android. You can however use --rbdir"
|
# 2) If a size is passed to the app_set_lcd_size() function, use that
|
||||||
|
# 3) Otherwise ask the user
|
||||||
|
app_set_lcd_size () {
|
||||||
|
if [ -z "$ARG_LCDWIDTH" ]; then
|
||||||
|
ARG_LCDWIDTH=$1
|
||||||
fi
|
fi
|
||||||
if [ -z "$ANDROID_SDK_PATH" ]; then
|
if [ -z "$ARG_LCDHEIGHT" ]; then
|
||||||
echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
|
ARG_LCDHEIGHT=$2
|
||||||
echo "environment variable point to the root directory of the Android SDK."
|
|
||||||
exit
|
|
||||||
fi
|
fi
|
||||||
if [ -z "$ANDROID_NDK_PATH" ]; then
|
|
||||||
echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
|
echo "Enter the LCD width (default: 320)"
|
||||||
echo "environment variable point to the root directory of the Android NDK."
|
if [ -z "$ARG_LCDWIDTH" ]; then
|
||||||
exit
|
app_lcd_width=`input`
|
||||||
fi
|
|
||||||
sharedir="/data/data/org.rockbox/app_rockbox/rockbox"
|
|
||||||
bindir="/data/data/org.rockbox/lib"
|
|
||||||
libdir="/data/data/org.rockbox/app_rockbox"
|
|
||||||
output="librockbox.so"
|
|
||||||
bootoutput="librockbox.so"
|
|
||||||
elif [ "$app_platform" = "maemo" ]; then
|
|
||||||
if [ -z "$ARG_PREFIX" ]; then
|
|
||||||
# Rockbox is in /opt as there is enough free space for it on the N900.
|
|
||||||
sharedir="/opt/rockbox/share/rockbox"
|
|
||||||
bindir="/opt/rockbox/bin"
|
|
||||||
libdir="/opt/rockbox/lib"
|
|
||||||
else
|
else
|
||||||
if [ -d "$ARG_PREFIX" ]; then
|
app_lcd_width="$ARG_LCDWIDTH"
|
||||||
if [ -z `echo $ARG_PREFIX | grep "^/"` ]; then
|
|
||||||
ARG_PREFIX=`realpath $ARG_PREFIX`
|
|
||||||
if [ "0" != "$?" ]; then
|
|
||||||
echo "ERROR: Could not get prefix path (is realpath installed?)."
|
|
||||||
exit
|
|
||||||
fi
|
fi
|
||||||
fi
|
if [ -z "$app_lcd_width" ]; then app_lcd_width="320"; fi
|
||||||
sharedir="$ARG_PREFIX/share/rockbox"
|
echo "Enter the LCD height (default: 480)"
|
||||||
bindir="$ARG_PREFIX/bin"
|
if [ -z "$ARG_LCDHEIGHT" ]; then
|
||||||
libdir="$ARG_PREFIX/lib"
|
app_lcd_height=`input`
|
||||||
else
|
else
|
||||||
echo "ERROR: PREFIX does not exist"
|
app_lcd_height="$ARG_LCDHEIGHT"
|
||||||
exit
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
output="rockbox"
|
|
||||||
bootoutput="rockbox"
|
|
||||||
fi
|
fi
|
||||||
|
if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi
|
||||||
|
echo "Selected $app_lcd_width x $app_lcd_height resolution"
|
||||||
|
ARG_LCDWIDTH=$app_lcd_width
|
||||||
|
ARG_LCDHEIGHT=$app_lcd_height
|
||||||
|
|
||||||
|
app_lcd_width="#define LCD_WIDTH $app_lcd_width"
|
||||||
|
app_lcd_height="#define LCD_HEIGHT $app_lcd_height"
|
||||||
}
|
}
|
||||||
|
|
||||||
findarmgcc() {
|
findarmgcc() {
|
||||||
|
|
@ -212,18 +164,6 @@ findsdl(){
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
appcc () {
|
|
||||||
if [ "$1" = "sdl" ]; then
|
|
||||||
simcc "sdl-app"
|
|
||||||
elif [ "$1" = "maemo" ]; then
|
|
||||||
app_type="sdl-app"
|
|
||||||
maemocc
|
|
||||||
elif [ "$1" = "android" ]; then
|
|
||||||
app_type=$1
|
|
||||||
androidcc
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
simcc () {
|
simcc () {
|
||||||
|
|
||||||
# default tool setup for native building
|
# default tool setup for native building
|
||||||
|
|
@ -521,10 +461,18 @@ maemocc () {
|
||||||
is_n900=0
|
is_n900=0
|
||||||
# Determine maemo version
|
# Determine maemo version
|
||||||
if pkg-config --atleast-version=5 maemo-version; then
|
if pkg-config --atleast-version=5 maemo-version; then
|
||||||
|
if [ "$1" == "4" ]; then
|
||||||
|
echo "ERROR: Maemo 4 SDK required."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
extradefines="$extradefines -DMAEMO5"
|
extradefines="$extradefines -DMAEMO5"
|
||||||
echo "Found N900 maemo version"
|
echo "Found N900 maemo version"
|
||||||
is_n900=1
|
is_n900=1
|
||||||
elif pkg-config --atleast-version=4 maemo-version; then
|
elif pkg-config --atleast-version=4 maemo-version; then
|
||||||
|
if [ "$1" == "5" ]; then
|
||||||
|
echo "ERROR: Maemo 5 SDK required."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
extradefines="$extradefines -DMAEMO4"
|
extradefines="$extradefines -DMAEMO4"
|
||||||
echo "Found N8xx maemo version"
|
echo "Found N8xx maemo version"
|
||||||
else
|
else
|
||||||
|
|
@ -569,6 +517,16 @@ maemocc () {
|
||||||
}
|
}
|
||||||
|
|
||||||
androidcc () {
|
androidcc () {
|
||||||
|
if [ -z "$ANDROID_SDK_PATH" ]; then
|
||||||
|
echo "ERROR: You need the Android SDK installed and have the ANDROID_SDK_PATH"
|
||||||
|
echo "environment variable point to the root directory of the Android SDK."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
if [ -z "$ANDROID_NDK_PATH" ]; then
|
||||||
|
echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH"
|
||||||
|
echo "environment variable point to the root directory of the Android NDK."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
buildhost=`uname | tr [:upper:] [:lower:]`
|
buildhost=`uname | tr [:upper:] [:lower:]`
|
||||||
gccchoice="4.4.3"
|
gccchoice="4.4.3"
|
||||||
gcctarget="arm-linux-androideabi-"
|
gcctarget="arm-linux-androideabi-"
|
||||||
|
|
@ -1062,7 +1020,6 @@ for arg in "$@"; do
|
||||||
--language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
|
--language=*) ARG_LANG=`echo "$arg" | cut -d = -f 2`;;
|
||||||
--lcdwidth=*) ARG_LCDWIDTH=`echo "$arg" | cut -d = -f 2`;;
|
--lcdwidth=*) ARG_LCDWIDTH=`echo "$arg" | cut -d = -f 2`;;
|
||||||
--lcdheight=*) ARG_LCDHEIGHT=`echo "$arg" | cut -d = -f 2`;;
|
--lcdheight=*) ARG_LCDHEIGHT=`echo "$arg" | cut -d = -f 2`;;
|
||||||
--platform=*) ARG_PLATFORM=`echo "$arg" | cut -d = -f 2`;;
|
|
||||||
--ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
|
--ram=*) ARG_RAM=`echo "$arg" | cut -d = -f 2`;;
|
||||||
--rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
|
--rbdir=*) ARG_RBDIR=`echo "$arg" | cut -d = -f 2`;;
|
||||||
--target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
|
--target=*) ARG_TARGET=`echo "$arg" | cut -d = -f 2`;;
|
||||||
|
|
@ -1184,9 +1141,11 @@ cat <<EOF
|
||||||
142) YH-925 ==Packard Bell==
|
142) YH-925 ==Packard Bell==
|
||||||
143) YP-S3 160) Vibe 500 ==Lyre project==
|
143) YP-S3 160) Vibe 500 ==Lyre project==
|
||||||
130) Lyre proto 1
|
130) Lyre proto 1
|
||||||
==MPIO== == Application == 131) Mini2440
|
==Application== ==MPIO== 131) Mini2440
|
||||||
170) HD200 200) Application
|
200) SDL 170) HD200
|
||||||
171) HD300
|
201) Android 171) HD300
|
||||||
|
202) Nokia N8xx
|
||||||
|
203) Nokia N900
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
@ -2862,28 +2821,116 @@ fi
|
||||||
t_model="hd300"
|
t_model="hd300"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
200|app*)
|
200|sdlapp)
|
||||||
target_id=100
|
target_id=73
|
||||||
modelname="application"
|
modelname="application"
|
||||||
|
app_modelname="sdlapp"
|
||||||
target="-DAPPLICATION"
|
target="-DAPPLICATION"
|
||||||
|
|
||||||
need_full_path="yes"
|
need_full_path="yes"
|
||||||
app_get_platform
|
app_set_paths
|
||||||
|
app_set_lcd_size
|
||||||
memory=8
|
memory=8
|
||||||
uname=`uname`
|
uname=`uname`
|
||||||
|
simcc "sdl-app"
|
||||||
appcc "$app_platform"
|
|
||||||
tool="cp "
|
tool="cp "
|
||||||
boottool="cp "
|
boottool="cp "
|
||||||
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
||||||
bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
|
||||||
|
output="rockbox"
|
||||||
|
bootoutput="rockbox"
|
||||||
appextra="recorder:gui:radio"
|
appextra="recorder:gui:radio"
|
||||||
plugins=""
|
plugins=""
|
||||||
swcodec="yes"
|
swcodec="yes"
|
||||||
# architecture, manufacturer and model for the target-tree build
|
# architecture, manufacturer and model for the target-tree build
|
||||||
t_cpu="hosted"
|
t_cpu="hosted"
|
||||||
t_manufacturer="$app_platform"
|
t_manufacturer="sdl"
|
||||||
|
t_model="app"
|
||||||
|
;;
|
||||||
|
|
||||||
|
201|android)
|
||||||
|
target_id=74
|
||||||
|
modelname="application"
|
||||||
|
app_modelname="android"
|
||||||
|
target="-DAPPLICATION"
|
||||||
|
app_type="android"
|
||||||
|
need_full_path="yes"
|
||||||
|
app_set_lcd_size
|
||||||
|
sharedir="/data/data/org.rockbox/app_rockbox/rockbox"
|
||||||
|
bindir="/data/data/org.rockbox/lib"
|
||||||
|
libdir="/data/data/org.rockbox/app_rockbox"
|
||||||
|
memory=8
|
||||||
|
uname=`uname`
|
||||||
|
androidcc
|
||||||
|
tool="cp "
|
||||||
|
boottool="cp "
|
||||||
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
||||||
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
|
||||||
|
output="librockbox.so"
|
||||||
|
bootoutput="librockbox.so"
|
||||||
|
appextra="recorder:gui:radio"
|
||||||
|
plugins=""
|
||||||
|
swcodec="yes"
|
||||||
|
# architecture, manufacturer and model for the target-tree build
|
||||||
|
t_cpu="hosted"
|
||||||
|
t_manufacturer="android"
|
||||||
|
t_model="app"
|
||||||
|
;;
|
||||||
|
|
||||||
|
202|nokian8xx)
|
||||||
|
target_id=75
|
||||||
|
modelname="application"
|
||||||
|
app_modelname="nokian8xx"
|
||||||
|
app_type="sdl-app"
|
||||||
|
target="-DAPPLICATION"
|
||||||
|
need_full_path="yes"
|
||||||
|
app_set_lcd_size 800 480
|
||||||
|
sharedir="/opt/rockbox/share/rockbox"
|
||||||
|
bindir="/opt/rockbox/bin"
|
||||||
|
libdir="/opt/rockbox/lib"
|
||||||
|
memory=8
|
||||||
|
uname=`uname`
|
||||||
|
maemocc 4
|
||||||
|
tool="cp "
|
||||||
|
boottool="cp "
|
||||||
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
||||||
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
|
||||||
|
output="rockbox"
|
||||||
|
bootoutput="rockbox"
|
||||||
|
appextra="recorder:gui:radio"
|
||||||
|
plugins=""
|
||||||
|
swcodec="yes"
|
||||||
|
# architecture, manufacturer and model for the target-tree build
|
||||||
|
t_cpu="hosted"
|
||||||
|
t_manufacturer="maemo"
|
||||||
|
t_model="app"
|
||||||
|
;;
|
||||||
|
|
||||||
|
203|nokian900)
|
||||||
|
target_id=76
|
||||||
|
modelname="application"
|
||||||
|
app_modelname="nokian900"
|
||||||
|
app_type="sdl-app"
|
||||||
|
target="-DAPPLICATION"
|
||||||
|
need_full_path="yes"
|
||||||
|
app_set_lcd_size 800 480
|
||||||
|
sharedir="/opt/rockbox/share/rockbox"
|
||||||
|
bindir="/opt/rockbox/bin"
|
||||||
|
libdir="/opt/rockbox/lib"
|
||||||
|
memory=8
|
||||||
|
uname=`uname`
|
||||||
|
maemocc 5
|
||||||
|
tool="cp "
|
||||||
|
boottool="cp "
|
||||||
|
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
||||||
|
bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
|
||||||
|
output="rockbox"
|
||||||
|
bootoutput="rockbox"
|
||||||
|
appextra="recorder:gui:radio"
|
||||||
|
plugins=""
|
||||||
|
swcodec="yes"
|
||||||
|
# architecture, manufacturer and model for the target-tree build
|
||||||
|
t_cpu="hosted"
|
||||||
|
t_manufacturer="maemo"
|
||||||
t_model="app"
|
t_model="app"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
@ -3374,21 +3421,16 @@ fi
|
||||||
if [ "$ARG_ARM_EABI" = "1" ]; then
|
if [ "$ARG_ARM_EABI" = "1" ]; then
|
||||||
cmdline="$cmdline--eabi "
|
cmdline="$cmdline--eabi "
|
||||||
fi
|
fi
|
||||||
if [ "$app_platform" = "sdl" ]; then
|
|
||||||
cmdline="$cmdline--platform=S "
|
|
||||||
elif [ "$app_platform" = "android" ]; then
|
|
||||||
cmdline="$cmdline--platform=A "
|
|
||||||
elif [ "$app_platform" = "maemo" ]; then
|
|
||||||
cmdline="$cmdline--platform=M "
|
|
||||||
fi
|
|
||||||
if [ "$modelname" = "application" ]; then
|
|
||||||
cmdline="$cmdline--lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
|
|
||||||
fi
|
|
||||||
if [ -n "$ARG_PREFIX" ]; then
|
if [ -n "$ARG_PREFIX" ]; then
|
||||||
cmdline="$cmdline--prefix=\$(PREFIX) "
|
cmdline="$cmdline--prefix=\$(PREFIX) "
|
||||||
fi
|
fi
|
||||||
|
if [ "$modelname" = "application" ]; then
|
||||||
|
cmdline="$cmdline--target=$app_modelname --lcdwidth=$ARG_LCDWIDTH --lcdheight=$ARG_LCDHEIGHT "
|
||||||
|
else
|
||||||
|
cmdline="$cmdline--target=\$(MODELNAME) "
|
||||||
|
fi
|
||||||
|
|
||||||
cmdline="$cmdline--target=\$(MODELNAME) --ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
|
cmdline="$cmdline--ram=\$(MEMORYSIZE) --rbdir=\$(RBDIR) --type=$btype$advopts"
|
||||||
|
|
||||||
### end of cmdline
|
### end of cmdline
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue