Skip to content

Commit

Permalink
CORE-217 - Add menuconfig for modulization build. r=viral
Browse files Browse the repository at this point in the history
  • Loading branch information
seinlin committed Aug 31, 2015
1 parent 5c60133 commit fa56a6c
Show file tree
Hide file tree
Showing 9 changed files with 165 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ bionic/
bootable/
brcm_usrlib/
build/
config/
dalvik/
development/
device/
Expand Down
14 changes: 14 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@ function configure_device() {
return $?
}

function menuconfig() {
make -C config
./config/mconf configs/Config.in
}

if [ "$1" = "menuconfig" ] ; then
if [ -d "config" ] ; then
menuconfig
else
echo "config for generating menuconfig is missing."
fi
exit 0
fi

unset CDPATH
. setup.sh &&
if [ -f patches/patch.sh ] ; then
Expand Down
16 changes: 16 additions & 0 deletions configs/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# main Config.in file for H5OS configuration
#

mainmenu "H5OS Configuration"

source configs/config.build
source configs/config.components
source configs/config.update
source configs/config.debug

# option to support enable/disable apps during build
# source configs/config.apps

endmenu

11 changes: 11 additions & 0 deletions configs/config.apps
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

menu "Apps"

config H5OS_TEST_STR
string "Test string"
default "test"

config H5OS_ENABLE_DEBUG
string "Enable Debug"
default "echo"
endmenu
25 changes: 25 additions & 0 deletions configs/config.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

# menu "Build Options"

choice

prompt "Select Build Type"

config H5OS_BUILD_ENG
bool "Engineering build"

config H5OS_BUILD_USERDEBUG
bool "User debug build"

config H5OS_BUILD_USER
bool "User build"

config VARIANT
string
default "eng" if H5OS_BUILD_ENG
default "userdebug" if H5OS_BUILD_USERDEBUG
default "user" if H5OS_BUILD_USER

endchoice

# endmenu
58 changes: 58 additions & 0 deletions configs/config.components
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

menu "Functional Components"

config H5OS_DISABLE_WEBRTC
bool "Disable support for WebRTC"

config H5OS_DISABLE_WEBSPEECH
bool "Disable support for HTML Speech API"

config H5OS_DISABLE_WEBSPEECH_TEST_BACKEND
bool "Disable support for HTML Speech API Test Backend"

config H5OS_DISABLE_WEBM
bool "Disable support for WebM media (VP8 video and Vorbis audio)"

config H5OS_DISABLE_FM
bool "Disable FM API"

config H5OS_DISABLE_CAMERA
bool "Disable camera API"

config H5OS_DISABLE_RIL
bool "Disable Radio Interface Layer"

config H5OS_DISABLE_BT
bool "Disable Bluetooth API"

config H5OS_DISABLE_NFC
bool "Disable NFC API"

config H5OS_DISABLE_RTSP
bool "Disable support for RTSP"

config H5OS_DISABLE_OMX_DECODER
bool "Disable support for OMX decoder"

config H5OS_DISABLE_OMX_ENCODER
bool "Disable support for OMX encoder"

config H5OS_DISABLE_AUDIO_OFFLOAD
bool "Disable support for audio offload"

config H5OS_DISABLE_SECUREELEMENT
bool "Disable support for secure element"

config H5OS_DISABLE_NECKO_WIFI
bool "Disable necko wifi scanner"

config H5OS_DISABLE_BUILD_CTYPES
bool "Disable js-ctypes"

config H5OS_DISABLE_SYNTH_PICO
bool "Disable Pico Web Speech API"

config H5OS_DISABLE_FMP4
bool "Disable support for in built Fragmented MP4 parsing"

endmenu
23 changes: 23 additions & 0 deletions configs/config.debug
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

menu "Debug options"

config H5OS_ENABLE_DEBUG
bool "Enable building with debug info"

config H5OS_ENABLE_DUMP_PAINTING
bool "Enable paint debugging"

config H5OS_ENABLE_VALGRIND
bool "Enable Valgrind integration hooks"
select H5OS_ENABLE_PROFILING

config H5OS_ENABLE_PROFILING
bool "Enable profiling compile flags"

config H5OS_ENABLE_DMD
bool "Enable DMD"

config H5OS_DISABLE_OPTIMIZE
bool "Disable compiler optimization"

endmenu
13 changes: 13 additions & 0 deletions configs/config.update
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

menu "Update options"

config H5OS_ENABLE_UPDATER
bool "Enable updater"
default y if H5OS_BUILD_USER

config H5OS_UPDATE_CHANNEL
depends H5OS_ENABLE_UPDATER
string "Update channel"
default "default"

endmenu
4 changes: 4 additions & 0 deletions load-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ if [ -f "$B2G_DIR/.userconfig" ]; then
. "$B2G_DIR/.userconfig"
fi

if [ -f "$B2G_DIR/.menuconfig" ]; then
. "$B2G_DIR/.menuconfig"
fi

# Use default Gecko location if it's not provided in config files.
if [ -z $GECKO_PATH ]; then
GECKO_PATH=$B2G_DIR/gecko
Expand Down

0 comments on commit fa56a6c

Please sign in to comment.