config/functions: add support to check for valid PROJECT and ARCH, cosmetics

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2012-01-30 23:13:30 +01:00
parent 1fda70a58f
commit cde9b87110
2 changed files with 166 additions and 139 deletions

View File

@ -191,154 +191,177 @@ fix_module_depends() {
$OBJCOPY --remove-section=.modinfo --add-section=.modinfo=new.modinfo --set-section-flags .modinfo=contents,alloc,load,readonly,data ${MODULE}_orig ${MODULE}
rm new.modinfo*
}
show_config() {
check_config() {
dashes="==========================="
config_message="$config_message\n $dashes$dashes$dashes"
config_message="$config_message\n Configuration for $DISTRONAME"
config_message="$config_message\n $dashes$dashes$dashes"
if [ ! -d $PROJECT_DIR/$PROJECT ]; then
check_project="$check_project\n $dashes$dashes$dashes"
check_project="$check_project\n ERROR: Project not found, use a valid project or create a new config"
check_project="$check_project\n $dashes$dashes$dashes"
check_project="$check_project\n\n Valid projects:"
# Build options
for projects in $PROJECT_DIR/*; do
check_project="$check_project\n - $(basename $projects)"
done
echo -e $check_project
exit 1
fi
config_message="$config_message\n\n Buildoptions:"
config_message="$config_message\n $dashes$dashes"
if [ ! -f $PROJECT_DIR/$PROJECT/linux/linux.$TARGET_ARCH.conf ]; then
check_arch="$check_arch\n $dashes$dashes$dashes"
check_arch="$check_arch\n ERROR: Architecture not found, use a valid Architecture"
check_arch="$check_arch\n for your project or create a new config"
check_arch="$check_arch\n $dashes$dashes$dashes"
check_arch="$check_arch\n\n Valid Architectures for your project: $PROJECT"
config_message="$config_message\n - CPU (ARCH):\t\t\t\t $TARGET_CPU ($TARGET_ARCH)"
config_message="$config_message\n - FPU:\t\t\t\t $TARGET_FPU"
config_message="$config_message\n - Optimizations:\t\t\t $OPTIMIZATIONS"
config_message="$config_message\n - LTO (Link Time Optimization) support: $LTO_SUPPORT"
config_message="$config_message\n - GOLD (Google Linker) Support:\t $GOLD_SUPPORT"
config_message="$config_message\n - Graphite Support:\t\t\t $GRAPHITE_SUPPORT"
config_message="$config_message\n - LOOP optimization support:\t\t $LOOP_SUPPORT"
config_message="$config_message\n - LLVM support:\t\t\t $LLVM_SUPPORT"
# config_message="$config_message\n - CFLAGS:\t $TARGET_CFLAGS"
# config_message="$config_message\n - LDFLAGS:\t $TARGET_LDFLAGS"
# Graphic configuration
config_message="$config_message\n\n Graphic configuration:"
config_message="$config_message\n $dashes$dashes"
config_message="$config_message\n - XORG support:\t\t\t $XORG_SUPPORT"
config_message="$config_message\n - XORG Composite support:\t\t $COMPOSITE_SUPPORT"
config_message="$config_message\n - XORG Xinerama support:\t\t $XINERAMA_SUPPORT"
config_message="$config_message\n - OpenGL (GLX) support (provider):\t $OPENGL_SUPPORT ($OPENGL)"
config_message="$config_message\n - OpenGLES support (provider):\t\t $OPENGLES_SUPPORT ($OPENGLES)"
config_message="$config_message\n - WindowManager:\t\t\t $WINDOWMANAGER"
config_message="$config_message\n - Xorg Graphic Drivers:\t\t $GRAPHIC_DRIVERS"
# Hardware decoder support
config_message="$config_message\n\n Hardware decoder configuration:"
config_message="$config_message\n $dashes$dashes"
config_message="$config_message\n - Broadcom CrystalHD Decoder:\t\t $CRYSTALHD"
config_message="$config_message\n - VAAPI Support:\t\t\t $VAAPI"
config_message="$config_message\n - VDPAU Support:\t\t\t $VDPAU"
config_message="$config_message\n - XVBA Support:\t\t\t $XVBA"
# Input device configuration
config_message="$config_message\n\n Input device configuration:"
config_message="$config_message\n $dashes$dashes"
config_message="$config_message\n - Remote support:\t\t\t $REMOTE_SUPPORT"
config_message="$config_message\n - ATV Remote support:\t\t\t $ATVCLIENT_SUPPORT"
config_message="$config_message\n - CEC Adapter support:\t\t\t $CEC_SUPPORT"
config_message="$config_message\n - IRTrans support:\t\t\t $IRSERVER_SUPPORT"
config_message="$config_message\n - XBMC Joystick support:\t\t $JOYSTICK_SUPPORT"
# Misc. hardware configuration
config_message="$config_message\n\n Misc. hardware configuration:"
config_message="$config_message\n $dashes$dashes"
config_message="$config_message\n - Pulseaudio support:\t\t\t $PULSEAUDIO_SUPPORT"
config_message="$config_message\n - Blu-Ray support:\t\t\t $BLURAY_SUPPORT"
config_message="$config_message\n - Bluetooth support:\t\t\t $BLUETOOTH_SUPPORT"
config_message="$config_message\n - Hardware Sensors support:\t\t $SENSOR_SUPPORT"
config_message="$config_message\n - LCD drivers:\t\t\t\t $LCD_DRIVER"
for config_driver in $ADDITIONAL_DRIVERS; do
config_message="$config_message\n - Include driver:\t\t\t $config_driver"
done
for config_firmware in $FIRMWARE; do
config_message="$config_message\n - Include firmware:\t\t\t $config_firmware"
done
# Network service configuration
config_message="$config_message\n\n Network service configuration:"
config_message="$config_message\n $dashes$dashes"
config_message="$config_message\n - Avahi (Zeroconf) support:\t\t $AVAHI_DAEMON"
config_message="$config_message\n - SAMBA server support:\t\t $SAMBA_SERVER"
config_message="$config_message\n - SFTP server support:\t\t\t $SFTP_SERVER"
config_message="$config_message\n - SSH Guard support:\t\t\t $SSHGUARD_SUPPORT"
config_message="$config_message\n - XBMC Airplay support:\t\t $AIRPLAY_SUPPORT"
config_message="$config_message\n - XBMC Airtunes support:\t\t $AIRTUNES_SUPPORT"
config_message="$config_message\n - XBMC AFP support:\t\t\t $AFP_SUPPORT"
config_message="$config_message\n - XBMC NFS support:\t\t\t $NFS_SUPPORT"
config_message="$config_message\n - XBMC SAMBA client support:\t\t $SAMBA_CLIENT"
config_message="$config_message\n - XBMC Webserver support:\t\t $WEBSERVER"
# OS configuration
config_message="$config_message\n\n OS configuration:"
config_message="$config_message\n $dashes$dashes"
config_message="$config_message\n - OEM Support:\t\t\t\t $OEM_SUPPORT"
config_message="$config_message\n - Default Hostname:\t\t\t $HOSTNAME"
config_message="$config_message\n - Default ROOT Password:\t\t $ROOT_PASSWORD"
config_message="$config_message\n - Bootloader:\t\t\t\t $BOOTLOADER"
config_message="$config_message\n - U-Boot configuration:\t\t $UBOOT_CONFIG"
config_message="$config_message\n - UDisks support:\t\t\t $UDISKS"
config_message="$config_message\n - UPower support:\t\t\t $UPOWER"
config_message="$config_message\n - Update support:\t\t\t $UPDATE_SUPPORT"
config_message="$config_message\n - Installer support:\t\t\t $INSTALLER_SUPPORT"
# Misc. Filesystems
config_message="$config_message\n\n Misc. Filesystems:"
config_message="$config_message\n $dashes$dashes"
config_message="$config_message\n - NTFS Support (via Fuse):\t\t $NTFS3G"
config_message="$config_message\n - Install HFS Tools:\t\t\t $HFSTOOLS"
# XBMC configuration
config_message="$config_message\n\n XBMC configuration:"
config_message="$config_message\n $dashes$dashes"
config_message="$config_message\n - XBMC version:\t\t\t $MEDIACENTER"
config_message="$config_message\n - XBMC PVR/DVB support:\t\t $PVR"
config_message="$config_message\n - XBMC nonfree support:\t\t $NONFREE_SUPPORT"
config_message="$config_message\n - XBMC DVDCSS support:\t\t\t $DVDCSS_SUPPORT"
for config_skin in $SKINS; do
config_message="$config_message\n - Include Skin:\t\t\t $config_skin"
done
config_message="$config_message\n - Default Skin:\t\t\t $SKIN_DEFAULT"
config_message="$config_message\n - Include extra fonts:\t\t\t $XBMC_EXTRA_FONTS"
config_message="$config_message\n - Include RSXS Screensaver:\t\t $XBMC_SCR_RSXS"
config_message="$config_message\n - Include ProjectM Visualization:\t $XBMC_VIS_PROJECTM"
config_message="$config_message\n - Include Goom Visualization:\t\t $XBMC_VIS_GOOM"
config_message="$config_message\n"
config_message="$config_message\n $dashes$dashes$dashes"
config_message="$config_message\n End Configuration for $DISTRONAME"
config_message="$config_message\n $dashes$dashes$dashes"
config_message="$config_message\n\n\n"
echo -e $config_message
for arch in $PROJECT_DIR/$PROJECT/linux/*.conf; do
check_arch="$check_arch\n - $(echo $arch | cut -f2 -d".")"
done
echo -e $check_arch
exit 1
fi
}
show_config() {
dashes="==========================="
config_message="$config_message\n $dashes$dashes$dashes"
config_message="$config_message\n Configuration for $DISTRONAME"
config_message="$config_message\n $dashes$dashes$dashes"
# Build options
config_message="$config_message\n\n Buildoptions:"
config_message="$config_message\n $dashes$dashes"
config_message="$config_message\n - CPU (ARCH):\t\t\t\t $TARGET_CPU ($TARGET_ARCH)"
config_message="$config_message\n - FPU:\t\t\t\t $TARGET_FPU"
config_message="$config_message\n - Optimizations:\t\t\t $OPTIMIZATIONS"
config_message="$config_message\n - LTO (Link Time Optimization) support: $LTO_SUPPORT"
config_message="$config_message\n - GOLD (Google Linker) Support:\t $GOLD_SUPPORT"
config_message="$config_message\n - Graphite Support:\t\t\t $GRAPHITE_SUPPORT"
config_message="$config_message\n - LOOP optimization support:\t\t $LOOP_SUPPORT"
config_message="$config_message\n - LLVM support:\t\t\t $LLVM_SUPPORT"
# config_message="$config_message\n - CFLAGS:\t $TARGET_CFLAGS"
# config_message="$config_message\n - LDFLAGS:\t $TARGET_LDFLAGS"
# Graphic configuration
config_message="$config_message\n\n Graphic configuration:"
config_message="$config_message\n $dashes$dashes"
config_message="$config_message\n - XORG support:\t\t\t $XORG_SUPPORT"
config_message="$config_message\n - XORG Composite support:\t\t $COMPOSITE_SUPPORT"
config_message="$config_message\n - XORG Xinerama support:\t\t $XINERAMA_SUPPORT"
config_message="$config_message\n - OpenGL (GLX) support (provider):\t $OPENGL_SUPPORT ($OPENGL)"
config_message="$config_message\n - OpenGLES support (provider):\t\t $OPENGLES_SUPPORT ($OPENGLES)"
config_message="$config_message\n - WindowManager:\t\t\t $WINDOWMANAGER"
config_message="$config_message\n - Xorg Graphic Drivers:\t\t $GRAPHIC_DRIVERS"
# Hardware decoder support
config_message="$config_message\n\n Hardware decoder configuration:"
config_message="$config_message\n $dashes$dashes"
config_message="$config_message\n - Broadcom CrystalHD Decoder:\t\t $CRYSTALHD"
config_message="$config_message\n - VAAPI Support:\t\t\t $VAAPI"
config_message="$config_message\n - VDPAU Support:\t\t\t $VDPAU"
config_message="$config_message\n - XVBA Support:\t\t\t $XVBA"
# Input device configuration
config_message="$config_message\n\n Input device configuration:"
config_message="$config_message\n $dashes$dashes"
config_message="$config_message\n - Remote support:\t\t\t $REMOTE_SUPPORT"
config_message="$config_message\n - ATV Remote support:\t\t\t $ATVCLIENT_SUPPORT"
config_message="$config_message\n - CEC Adapter support:\t\t\t $CEC_SUPPORT"
config_message="$config_message\n - IRTrans support:\t\t\t $IRSERVER_SUPPORT"
config_message="$config_message\n - XBMC Joystick support:\t\t $JOYSTICK_SUPPORT"
# Misc. hardware configuration
config_message="$config_message\n\n Misc. hardware configuration:"
config_message="$config_message\n $dashes$dashes"
config_message="$config_message\n - Pulseaudio support:\t\t\t $PULSEAUDIO_SUPPORT"
config_message="$config_message\n - Blu-Ray support:\t\t\t $BLURAY_SUPPORT"
config_message="$config_message\n - Bluetooth support:\t\t\t $BLUETOOTH_SUPPORT"
config_message="$config_message\n - Hardware Sensors support:\t\t $SENSOR_SUPPORT"
config_message="$config_message\n - LCD drivers:\t\t\t\t $LCD_DRIVER"
for config_driver in $ADDITIONAL_DRIVERS; do
config_message="$config_message\n - Include driver:\t\t\t $config_driver"
done
for config_firmware in $FIRMWARE; do
config_message="$config_message\n - Include firmware:\t\t\t $config_firmware"
done
# Network service configuration
config_message="$config_message\n\n Network service configuration:"
config_message="$config_message\n $dashes$dashes"
config_message="$config_message\n - Avahi (Zeroconf) support:\t\t $AVAHI_DAEMON"
config_message="$config_message\n - SAMBA server support:\t\t $SAMBA_SERVER"
config_message="$config_message\n - SFTP server support:\t\t\t $SFTP_SERVER"
config_message="$config_message\n - SSH Guard support:\t\t\t $SSHGUARD_SUPPORT"
config_message="$config_message\n - XBMC Airplay support:\t\t $AIRPLAY_SUPPORT"
config_message="$config_message\n - XBMC Airtunes support:\t\t $AIRTUNES_SUPPORT"
config_message="$config_message\n - XBMC AFP support:\t\t\t $AFP_SUPPORT"
config_message="$config_message\n - XBMC NFS support:\t\t\t $NFS_SUPPORT"
config_message="$config_message\n - XBMC SAMBA client support:\t\t $SAMBA_CLIENT"
config_message="$config_message\n - XBMC Webserver support:\t\t $WEBSERVER"
# OS configuration
config_message="$config_message\n\n OS configuration:"
config_message="$config_message\n $dashes$dashes"
config_message="$config_message\n - OEM Support:\t\t\t\t $OEM_SUPPORT"
config_message="$config_message\n - Default Hostname:\t\t\t $HOSTNAME"
config_message="$config_message\n - Default ROOT Password:\t\t $ROOT_PASSWORD"
config_message="$config_message\n - Bootloader:\t\t\t\t $BOOTLOADER"
config_message="$config_message\n - U-Boot configuration:\t\t $UBOOT_CONFIG"
config_message="$config_message\n - UDisks support:\t\t\t $UDISKS"
config_message="$config_message\n - UPower support:\t\t\t $UPOWER"
config_message="$config_message\n - Update support:\t\t\t $UPDATE_SUPPORT"
config_message="$config_message\n - Installer support:\t\t\t $INSTALLER_SUPPORT"
# Misc. Filesystems
config_message="$config_message\n\n Misc. Filesystems:"
config_message="$config_message\n $dashes$dashes"
config_message="$config_message\n - NTFS Support (via Fuse):\t\t $NTFS3G"
config_message="$config_message\n - Install HFS Tools:\t\t\t $HFSTOOLS"
# XBMC configuration
config_message="$config_message\n\n XBMC configuration:"
config_message="$config_message\n $dashes$dashes"
config_message="$config_message\n - XBMC version:\t\t\t $MEDIACENTER"
config_message="$config_message\n - XBMC PVR/DVB support:\t\t $PVR"
config_message="$config_message\n - XBMC nonfree support:\t\t $NONFREE_SUPPORT"
config_message="$config_message\n - XBMC DVDCSS support:\t\t\t $DVDCSS_SUPPORT"
for config_skin in $SKINS; do
config_message="$config_message\n - Include Skin:\t\t\t $config_skin"
done
config_message="$config_message\n - Default Skin:\t\t\t $SKIN_DEFAULT"
config_message="$config_message\n - Include extra fonts:\t\t\t $XBMC_EXTRA_FONTS"
config_message="$config_message\n - Include RSXS Screensaver:\t\t $XBMC_SCR_RSXS"
config_message="$config_message\n - Include ProjectM Visualization:\t $XBMC_VIS_PROJECTM"
config_message="$config_message\n - Include Goom Visualization:\t\t $XBMC_VIS_GOOM"
config_message="$config_message\n"
config_message="$config_message\n $dashes$dashes$dashes"
config_message="$config_message\n End Configuration for $DISTRONAME"
config_message="$config_message\n $dashes$dashes$dashes"
config_message="$config_message\n\n\n"
echo -e $config_message
}

View File

@ -10,7 +10,9 @@ set -e
ADDONS=addons
# include ARCH specific options
if [ -f config/arch.$TARGET_ARCH ]; then
. config/arch.$TARGET_ARCH
fi
HOST_NAME=`$LOCAL_CC -dumpmachine`
TARGET_NAME=$(echo $TARGET_SUBARCH | sed -e "s,-,,")-openelec-linux-gnu${TARGET_ABI}
@ -117,6 +119,8 @@ fi
VERSION_SUFFIX=$TARGET_ARCH
. config/functions
check_config
setup_toolchain target
SILENT_OUT=3