diff options
author | SangYoun Kwak <sy.kwak@samsung.com> | 2024-06-18 16:09:05 +0900 |
---|---|---|
committer | SangYoun Kwak <sy.kwak@samsung.com> | 2024-06-21 18:34:02 +0900 |
commit | 9116ffd90e07304523a3fe110c93392a1eaf1ef2 (patch) | |
tree | beab803cba65957113697e4bfe112370c275f795 | |
parent | 5319b08010b3d72d46bdb8c1fdaa9e0101b8c938 (diff) | |
download | rootstrap-9116ffd90e07304523a3fe110c93392a1eaf1ef2.tar.gz rootstrap-9116ffd90e07304523a3fe110c93392a1eaf1ef2.tar.bz2 rootstrap-9116ffd90e07304523a3fe110c93392a1eaf1ef2.zip |
Remove useless scripts/filesaccepted/tizen/unified/x/20240625.014048accepted/tizen/unified/20240624.104730
There are some scripts/files that useless/meaningless to use in hal
rootstrap.
These scripts are removed.
Change-Id: Iad384436fe0b00bf4a9f71384a992e0e59ad09d3
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
-rwxr-xr-x | generate_rootstrap.sh | 10 | ||||
-rwxr-xr-x | make_rootstrap.sh | 161 | ||||
-rwxr-xr-x | make_rootstrap_64.sh | 163 | ||||
-rw-r--r-- | rs_resource/OSS/libexif-rs.xml | 31 | ||||
-rw-r--r-- | rs_resource/OSS/tef-rs.xml | 21 | ||||
-rwxr-xr-x | script/convert32.sh | 10 | ||||
-rwxr-xr-x | script/convert64.sh | 10 | ||||
-rwxr-xr-x | script/rootstrap_gen_1.0.sh | 148 | ||||
-rwxr-xr-x | script/rootstrap_gen_1.0_64.sh | 148 | ||||
-rwxr-xr-x | script/rootstrap_info_gen_1.0.sh | 229 | ||||
-rwxr-xr-x | script/rootstrap_info_gen_1.0_64.sh | 231 | ||||
-rwxr-xr-x | script/rootstrap_plugin_gen_1.0.sh | 270 | ||||
-rwxr-xr-x | script/rootstrap_plugin_gen_1.0_64.sh | 311 |
13 files changed, 17 insertions, 1726 deletions
diff --git a/generate_rootstrap.sh b/generate_rootstrap.sh index 60465ba..f4a1441 100755 --- a/generate_rootstrap.sh +++ b/generate_rootstrap.sh @@ -19,7 +19,7 @@ function generate_rootstrap_ix86 { return $? fi - ./make_rootstrap.sh -C rs-config ./rs_resource --clean --emulator -A i686 + ./make_rootstrap.sh -C rs-config ./rs_resource --emulator -A i686 RET=$? if [[ ${RET} -ne 0 ]]; then echo "Failed to create rootstrap." @@ -35,7 +35,7 @@ function generate_rootstrap_x86_64 { return $? fi - ./make_rootstrap_64.sh -C rs-config ./rs_resource --clean --emulator -A x86_64 + ./make_rootstrap_64.sh -C rs-config ./rs_resource --emulator -A x86_64 RET=$? if [[ ${RET} -ne 0 ]]; then echo "Failed to create rootstrap." @@ -51,7 +51,7 @@ function generate_rootstrap_arm { return $? fi - ./make_rootstrap.sh -C rs-config ./rs_resource --clean --target -A arm + ./make_rootstrap.sh -C rs-config ./rs_resource --target -A arm RET=$? if [[ ${RET} -ne 0 ]]; then echo "Failed to create rootstrap." @@ -67,7 +67,7 @@ function generate_rootstrap_aarch64 { return $? fi - ./make_rootstrap_64.sh -C rs-config ./rs_resource --clean --target -A aarch64 + ./make_rootstrap_64.sh -C rs-config ./rs_resource --target -A aarch64 RET=$? if [[ ${RET} -ne 0 ]]; then echo "Failed to create rootstrap." @@ -83,7 +83,7 @@ function generate_rootstrap_riscv64 { return $? fi - ./make_rootstrap_64.sh -C rs-config ./rs_resource --clean --target -A riscv64 + ./make_rootstrap_64.sh -C rs-config ./rs_resource --target -A riscv64 RET=$? if [[ ${RET} -ne 0 ]]; then echo "Failed to create rootstrap." diff --git a/make_rootstrap.sh b/make_rootstrap.sh index c36ce6e..c2af8b9 100755 --- a/make_rootstrap.sh +++ b/make_rootstrap.sh @@ -1,36 +1,14 @@ #!/bin/bash -DEBUG_MODE=1 - SCRIPT_NAME="$(basename ${BASH_SOURCE[0]})" SCRIPT_FULLPATH="$(readlink -f ${BASH_SOURCE[0]})" SCRIPT_BASE="$(dirname ${SCRIPT_FULLPATH})" SCRIPT_VER="0.0.2" CMD_RS_GEN="${SCRIPT_BASE}/script/rootstrap_gen_1.0.sh" -CMD_RS_INFO="${SCRIPT_BASE}/script/rootstrap_info_gen_1.0.sh" -CMD_RS_PLUGIN="${SCRIPT_BASE}/script/rootstrap_plugin_gen_1.0.sh" CMD_API_FILTER="${SCRIPT_BASE}/script/api_filter.py" CMD_API_GDBUS_FILTER="${SCRIPT_BASE}/script/api_filter_gdbus.py" -DIR_INFO=".info" -DIR_RPM=".rpm" -DIR_PLUGIN=".plugin" -DIR_TMP=".tmp" -DIR_EMULATOR=".emulator" -DIR_TARGET=".target" -DIR_ZIP=".zip" - -PRIVATE_STRING="" - -LOGFILE="rs.log" - -if [ -e ${LOGFILE} ]; then - rm ${LOGFILE}; -fi - -touch ${LOGFILE} - ############################################################################### # function log ############################################################################### @@ -55,16 +33,6 @@ function check_error() } ############################################################################### -# function remove_dir -# $@ : Files -# Example : remove_dir test_dir test_file -############################################################################### -function remove_dir () { - echo "remove dir : $@" - rm -rf $@ >/dev/null 2>&1 -} - -############################################################################### ## function callRootstrapGen # $1 : emulator/target # $2 : ${RPM_PKG_SVR_EMULATOR} @@ -82,67 +50,15 @@ function callRootstrapGen () { FULL_RS_CMD="${CMD_RS_GEN} -t ${1} -u ${2} -b ${3} -q ${BUILD_REQUIRED_INSTALLED_PATH} -r ${GBS_BUILDROOT} -A ${OPT_ARCH} ${xmlList}" fi - FULL_RS_INFO_CMD="${CMD_RS_INFO} -t $1 -l ${xmlList} -p $PLATFORM_PROFILE -v $PLATFORM_VERSION" + log "$FULL_RS_CMD" + $FULL_RS_CMD + check_error $? "Fail to ${CMD_RS_GEN}" - if [[ "${ROOTSTRAP_TYPE}" == "emulator" ]]; then - FULL_CMD_RS_PLUGIN_GEN="${CMD_RS_PLUGIN} -t ${ROOTSTRAP_TYPE} -i .info/$PLATFORM_PROFILE-$PLATFORM_VERSION-emulator.core.dev.xml -p ${PLATFORM_PROFILE} -v ${PLATFORM_VERSION}" - elif [[ "${ROOTSTRAP_TYPE}" == "target" ]]; then - FULL_CMD_RS_PLUGIN_GEN="${CMD_RS_PLUGIN} -t ${ROOTSTRAP_TYPE} -i .info/$PLATFORM_PROFILE-$PLATFORM_VERSION-device.core.dev.xml -p ${PLATFORM_PROFILE} -v ${PLATFORM_VERSION}" - else - exit 1; - fi - - if [[ ${DEBUG_MODE} == "1" ]] - then - log "$FULL_RS_CMD" - $FULL_RS_CMD - check_error $? "Fail to ${CMD_RS_GEN}" - - log "$FULL_RS_INFO_CMD" - $FULL_RS_INFO_CMD - check_error $? "Fail to ${CMD_RS_INFO}" - - log "$FULL_CMD_RS_PLUGIN_GEN" - $FULL_CMD_RS_PLUGIN_GEN - check_error $? "Fail to ${FULL_CMD_RS_PLUGIN_GEN}" - - else - if [[ -e ${LOGFILE} ]]; then - log "$FULL_RS_CMD" | tee -a ${LOGFILE} - fi - $FULL_RS_CMD >/dev/null - check_error $? "Fail to ${CMD_RS_GEN}" - - log "$FULL_RS_INFO_CMD" - $FULL_RS_INFO_CMD >/dev/null - check_error $? "Fail to ${CMD_RS_INFO}" - - log "$FULL_CMD_RS_PLUGIN_GEN" - $FULL_CMD_RS_PLUGIN_GEN >/dev/null - check_error $? "Fail to ${FULL_CMD_RS_PLUGIN_GEN}" - fi - - ##Append Snapshot - if [ -n "${SNAPSHOT_BASE}" ]; then - - log "ADD Snapshot : ${SNAPSHOT_BASE}" - - if [[ "${ROOTSTRAP_TYPE}" == "emulator" ]]; then - echo '<!-- '${SNAPSHOT_BASE}' -->' | tee -a .info/$PLATFORM_PROFILE-$PLATFORM_VERSION-emulator.core.dev.xml - elif [[ "${ROOTSTRAP_TYPE}" == "target" ]]; then - echo '<!-- '${SNAPSHOT_BASE}' -->' | tee -a .info/$PLATFORM_PROFILE-$PLATFORM_VERSION-device.core.dev.xml - fi - fi - - log "Done... [$SECONDS]Sec" 1>&2 + log "Done... [$SECONDS]Sec" 1>&2 } - -GLOBAL_ERROR="0" OPT_TARGET=false OPT_EMULATOR=false -OPT_DOWNLOAD_RPM=false -OPT_CLEAN=true OPT_CONF="" OPT_ARCH="" INTERNAL=false @@ -155,7 +71,6 @@ function usage () { echo "Usage: $SCRIPT_NAME -C [<config_file>] [<OPTION>]... [<FILE>]..." echo " -e, --emulator : Make Rootstrap for Emulator" echo " -t, --target : Make Rootstrap for Target" - echo " -c, --clean : Delete .rpm cache folder" echo " -A, --arch : Architecture for building" echo " -h, --help" echo " -v, --version : Display script version information" @@ -164,15 +79,6 @@ function usage () { echo " >$SCRIPT_NAME -C rs-config ./rs_resource/NativeAPI/capi-appfw-app-manager-rs.xml" echo " >$SCRIPT_NAME -C rs-config -e ./rs_resource" echo " >$SCRIPT_NAME -C rs-config -t ./rs_resource" - echo "" - echo "Output Diretory:" - echo ".info" - echo ".emulator" - echo ".target" - echo ".rpm" - echo ".plugin" - echo ".tmp" - return } @@ -180,7 +86,7 @@ function usage () { ############################################################################### ## Get Parameter ############################################################################### -OPTS=`getopt -o -A:C:tedchv --long target,emulator,downloadrpm,clean,help,version,internal -- "$@"` +OPTS=`getopt -o -A:C:tedchv --long target,emulator,downloadrpm,help,version,internal -- "$@"` if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi echo "" @@ -193,8 +99,6 @@ while true; do -C | --conf )OPT_CONF=$2;shift;shift;; -t | --target )OPT_TARGET=true;shift;; -e | --emulator )OPT_EMULATOR=true;shift;; - -d | --downloadrpm )OPT_DOWNLOAD_RPM=true;shift;; - -c | --clean )OPT_CLEAN=true;shift;; -h | --help )usage;exit 0;; -v | --version )echo "${SCRIPT_NAME}" "version : $SCRIPT_VER"; exit 0 ;; --internal ) INTERNAL=true; shift;; @@ -221,11 +125,8 @@ fi ############################################################################### printf "\n#OPTION\n" echo "OPT_CONF=${OPT_CONF}" -echo "OPT_CLEAN = $OPT_CLEAN" echo "OPT_TARGET = $OPT_TARGET" echo "OPT_EMULATOR = $OPT_EMULATOR" -echo "OPT_DOWNLOAD_RPM = $OPT_DOWNLOAD_RPM" -echo "OPT_CLEAN=$OPT_CLEAN" if [ "$RS_INTERNAL" = true ] || [ "$INTERNAL" = true ]; then echo "OPT_INTERNAL=TRUE" @@ -261,21 +162,6 @@ if [[ ! -f ${CMD_RS_GEN} ]]; then exit 1 fi -if [[ ! -f ${CMD_RS_INFO} ]]; then - log "[Error] File not found ![${CMD_RS_INFO}]" - exit 1 -fi - -if [[ ! -f ${CMD_RS_PLUGIN} ]]; then - log "[Error] File not found ![${CMD_RS_PLUGIN}]" - exit 1 -fi - -if [ "$OPT_CLEAN" = true ]; then - log "Clean dir ..." - remove_dir $DIR_INFO $DIR_RPM $DIR_PLUGIN $DIR_TMP $DIR_EMULATOR $DIR_TARGET -fi - if [[ -z ${RPM_PKG_SVR_EMULATOR} ]]; then log "[Error] RPM_PKG_SVR_EMULATOR is NULL" exit 1 @@ -292,54 +178,24 @@ log "RPM_PKG_SVR_EMULATOR = ${RPM_PKG_SVR_EMULATOR}" log "RPM_PKG_SVR_TARGET = ${RPM_PKG_SVR_TARGET}" log "" - -SNAPSHOT_BASE=$(basename $SNAPSHOT_URL_PREFIX) -log "SNAPSHOT_BASE=$SNAPSHOT_BASE" -log "" - if [ "$RS_INTERNAL" = true ] || [ "$INTERNAL" = true ]; then CMD_RS_GEN="$CMD_RS_GEN --internal" - CMD_RS_INFO="$CMD_RS_INFO" - CMD_RS_PLUGIN="$CMD_RS_PLUGIN --internal" - PRIVATE_STRING=".private" -fi - -if [ -n "${ID}" ] && [ -n "${PW}" ] -then - CMD_RS_GEN="$CMD_RS_GEN -i ${ID} -p ${PW}" - echo "Append ID/PW Option : ${CMD_RS_GEN}" -fi - - -if [[ -e ${LOGFILE} ]]; then - CMD_RS_GEN="$CMD_RS_GEN --log ${LOGFILE}" fi ############################################################################### ## Rootstrap Generation ############################################################################### -if [[ "$GLOBAL_ERROR" != "0" ]]; then - log "[Error] Failed download rpm"; - exit 1; -fi - if [ "$OPT_TARGET" = true ]; then - remove_dir ${DIR_TMP} ${DIR_TARGET} callRootstrapGen target ${RPM_PKG_SVR_TARGET} ${BASE_PKG_SVR_TARGET} log "[INFO] Postscript ${GBS_BUILDROOT}"; - mv ${GBS_BUILDROOT}/usr/include/asm-arm ${GBS_BUILDROOT}/usr/include/asm - mv ${GBS_BUILDROOT}/usr/include/base/deprecated/* ${GBS_BUILDROOT}/usr/include/base/ - if [ "$INTERNAL" = false ]; then echo "remove Non-Public EFL API" $CMD_API_FILTER ${GBS_BUILDROOT} > /dev/null #EFL filter echo "remove Non-Public GDBUS API" $CMD_API_GDBUS_FILTER ${GBS_BUILDROOT} > /dev/null #GDBUS filter fi - #echo "remove Public GDBUS API" - #$CMD_API_GDBUS_FILTER .target>/dev/null #GDBUS filter if [ "$INTERNAL" = true ]; then log "[INFO] Skip .. removing dlog-internal.h" @@ -359,14 +215,10 @@ if [ "$OPT_TARGET" = true ]; then fi if [ "$OPT_EMULATOR" = true ]; then - remove_dir ${DIR_TMP} ${DIR_EMULATOR} callRootstrapGen emulator ${RPM_PKG_SVR_EMULATOR} ${BASE_PKG_SVR_EMULATOR} log "[INFO] Postscript ${GBS_BUILDROOT}"; - mv ${GBS_BUILDROOT}/usr/include/asm-x86 ${GBS_BUILDROOT}/usr/include/asm - mv ${GBS_BUILDROOT}/usr/include/base/deprecated/* ${GBS_BUILDROOT}/usr/include/base/ - if [ "$INTERNAL" = false ]; then echo "remove Non-Public EFL API" $CMD_API_FILTER .emulator>/dev/null #EFL filter @@ -392,9 +244,6 @@ if [ "$OPT_EMULATOR" = true ]; then fi -if [[ -e ${LOGFILE} ]]; then - log "END" | tee -a ${LOGFILE} -fi ############################################################################### ## END ############################################################################### diff --git a/make_rootstrap_64.sh b/make_rootstrap_64.sh index 740a959..e8cf514 100755 --- a/make_rootstrap_64.sh +++ b/make_rootstrap_64.sh @@ -1,36 +1,14 @@ #!/bin/bash -DEBUG_MODE=1 - SCRIPT_NAME="$(basename ${BASH_SOURCE[0]})" SCRIPT_FULLPATH="$(readlink -f ${BASH_SOURCE[0]})" SCRIPT_BASE="$(dirname ${SCRIPT_FULLPATH})" SCRIPT_VER="0.0.2" CMD_RS_GEN="${SCRIPT_BASE}/script/rootstrap_gen_1.0_64.sh" -CMD_RS_INFO="${SCRIPT_BASE}/script/rootstrap_info_gen_1.0_64.sh" -CMD_RS_PLUGIN="${SCRIPT_BASE}/script/rootstrap_plugin_gen_1.0_64.sh" CMD_API_FILTER="${SCRIPT_BASE}/script/api_filter.py" CMD_API_GDBUS_FILTER="${SCRIPT_BASE}/script/api_filter_gdbus.py" -DIR_INFO=".info" -DIR_RPM=".rpm" -DIR_PLUGIN=".plugin" -DIR_TMP=".tmp" -DIR_EMULATOR=".emulator" -DIR_TARGET=".target" -DIR_ZIP=".zip" - -PRIVATE_STRING="" - -LOGFILE="rs.log" - -if [ -e ${LOGFILE} ]; then - rm ${LOGFILE}; -fi - -touch ${LOGFILE} - ############################################################################### # function log ############################################################################### @@ -55,16 +33,6 @@ function check_error() } ############################################################################### -# function remove_dir -# $@ : Files -# Example : remove_dir test_dir test_file -############################################################################### -function remove_dir () { - echo "remove dir : $@" - rm -rf $@ >/dev/null 2>&1 -} - -############################################################################### ## function callRootstrapGen # $1 : emulator/target # $2 : ${RPM_PKG_SVR_EMULATOR} @@ -82,67 +50,15 @@ function callRootstrapGen () { FULL_RS_CMD="${CMD_RS_GEN} -t ${1} -u ${2} -b ${3} -q ${BUILD_REQUIRED_INSTALLED_PATH} -r ${GBS_BUILDROOT} -A ${OPT_ARCH} ${xmlList}" fi - FULL_RS_INFO_CMD="${CMD_RS_INFO} -t $1 -l ${xmlList} -p $PLATFORM_PROFILE -v $PLATFORM_VERSION" + log "$FULL_RS_CMD" + $FULL_RS_CMD + check_error $? "Fail to ${CMD_RS_GEN}" - if [[ "${ROOTSTRAP_TYPE}" == "emulator" ]]; then - FULL_CMD_RS_PLUGIN_GEN="${CMD_RS_PLUGIN} -t ${ROOTSTRAP_TYPE} -i .info/$PLATFORM_PROFILE-$PLATFORM_VERSION-emulator64.core.dev.xml -p ${PLATFORM_PROFILE} -v ${PLATFORM_VERSION}" - elif [[ "${ROOTSTRAP_TYPE}" == "target" ]]; then - FULL_CMD_RS_PLUGIN_GEN="${CMD_RS_PLUGIN} -t ${ROOTSTRAP_TYPE} -i .info/$PLATFORM_PROFILE-$PLATFORM_VERSION-device64.core.dev.xml -p ${PLATFORM_PROFILE} -v ${PLATFORM_VERSION}" - else - exit 1; - fi - - if [[ ${DEBUG_MODE} == "1" ]] - then - log "$FULL_RS_CMD" - $FULL_RS_CMD - check_error $? "Fail to ${CMD_RS_GEN}" - - log "$FULL_RS_INFO_CMD" - $FULL_RS_INFO_CMD - check_error $? "Fail to ${CMD_RS_INFO}" - - log "$FULL_CMD_RS_PLUGIN_GEN" - $FULL_CMD_RS_PLUGIN_GEN - check_error $? "Fail to ${FULL_CMD_RS_PLUGIN_GEN}" - - else - if [[ -e ${LOGFILE} ]]; then - log "$FULL_RS_CMD" | tee -a ${LOGFILE} - fi - $FULL_RS_CMD >/dev/null - check_error $? "Fail to ${CMD_RS_GEN}" - - log "$FULL_RS_INFO_CMD" - $FULL_RS_INFO_CMD >/dev/null - check_error $? "Fail to ${CMD_RS_INFO}" - - log "$FULL_CMD_RS_PLUGIN_GEN" - $FULL_CMD_RS_PLUGIN_GEN >/dev/null - check_error $? "Fail to ${FULL_CMD_RS_PLUGIN_GEN}" - fi - - ##Append Snapshot - if [ -n "${SNAPSHOT_BASE}" ]; then - - log "ADD Snapshot : ${SNAPSHOT_BASE}" - - if [[ "${ROOTSTRAP_TYPE}" == "emulator" ]]; then - echo '<!-- '${SNAPSHOT_BASE}' -->' | tee -a .info/$PLATFORM_PROFILE-$PLATFORM_VERSION-emulator64.core.dev.xml - elif [[ "${ROOTSTRAP_TYPE}" == "target" ]]; then - echo '<!-- '${SNAPSHOT_BASE}' -->' | tee -a .info/$PLATFORM_PROFILE-$PLATFORM_VERSION-device64.core.dev.xml - fi - fi - - log "Done... [$SECONDS]Sec" 1>&2 + log "Done... [$SECONDS]Sec" 1>&2 } - -GLOBAL_ERROR="0" OPT_TARGET=false OPT_EMULATOR=false -OPT_DOWNLOAD_RPM=false -OPT_CLEAN=true OPT_CONF="" OPT_ARCH="" INTERNAL=false @@ -155,7 +71,6 @@ function usage () { echo "Usage: $SCRIPT_NAME -C [<config_file>] [<OPTION>]... [<FILE>]..." echo " -e, --emulator : Make Rootstrap for Emulator" echo " -t, --target : Make Rootstrap for Target" - echo " -c, --clean : Delete .rpm cache folder" echo " -A, --arch : Architecture for building" echo " -h, --help" echo " -v, --version : Display script version information" @@ -164,15 +79,6 @@ function usage () { echo " >$SCRIPT_NAME -C rs-config ./rs_resource/NativeAPI/capi-appfw-app-manager-rs.xml" echo " >$SCRIPT_NAME -C rs-config -e ./rs_resource" echo " >$SCRIPT_NAME -C rs-config -t ./rs_resource" - echo "" - echo "Output Diretory:" - echo ".info" - echo ".emulator" - echo ".target" - echo ".rpm" - echo ".plugin" - echo ".tmp" - return } @@ -180,7 +86,7 @@ function usage () { ############################################################################### ## Get Parameter ############################################################################### -OPTS=`getopt -o -A:C:tedchv --long target,emulator,downloadrpm,clean,help,version,internal -- "$@"` +OPTS=`getopt -o -A:C:tedchv --long target,emulator,downloadrpm,help,version,internal -- "$@"` if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi echo "" @@ -193,8 +99,6 @@ while true; do -C | --conf )OPT_CONF=$2;shift;shift;; -t | --target )OPT_TARGET=true;shift;; -e | --emulator )OPT_EMULATOR=true;shift;; - -d | --downloadrpm )OPT_DOWNLOAD_RPM=true;shift;; - -c | --clean )OPT_CLEAN=true;shift;; -h | --help )usage;exit 0;; -v | --version )echo "${SCRIPT_NAME}" "version : $SCRIPT_VER"; exit 0 ;; --internal ) INTERNAL=true; shift;; @@ -221,11 +125,8 @@ fi ############################################################################### printf "\n#OPTION\n" echo "OPT_CONF=${OPT_CONF}" -echo "OPT_CLEAN = $OPT_CLEAN" echo "OPT_TARGET = $OPT_TARGET" echo "OPT_EMULATOR = $OPT_EMULATOR" -echo "OPT_DOWNLOAD_RPM = $OPT_DOWNLOAD_RPM" -echo "OPT_CLEAN=$OPT_CLEAN" if [ "$RS_INTERNAL" = true ] || [ "$INTERNAL" = true ]; then echo "OPT_INTERNAL=TRUE" @@ -261,21 +162,6 @@ if [[ ! -f ${CMD_RS_GEN} ]]; then exit 1 fi -if [[ ! -f ${CMD_RS_INFO} ]]; then - log "[Error] File not found ![${CMD_RS_INFO}]" - exit 1 -fi - -if [[ ! -f ${CMD_RS_PLUGIN} ]]; then - log "[Error] File not found ![${CMD_RS_PLUGIN}]" - exit 1 -fi - -if [ "$OPT_CLEAN" = true ]; then - log "Clean dir ..." - remove_dir $DIR_INFO $DIR_RPM $DIR_PLUGIN $DIR_TMP $DIR_EMULATOR $DIR_TARGET -fi - if [[ -z ${RPM_PKG_SVR_EMULATOR} ]]; then log "[Error] RPM_PKG_SVR_EMULATOR is NULL" exit 1 @@ -292,54 +178,24 @@ log "RPM_PKG_SVR_EMULATOR = ${RPM_PKG_SVR_EMULATOR}" log "RPM_PKG_SVR_TARGET = ${RPM_PKG_SVR_TARGET}" log "" - -SNAPSHOT_BASE=$(basename $SNAPSHOT_URL_PREFIX) -log "SNAPSHOT_BASE=$SNAPSHOT_BASE" -log "" - if [ "$RS_INTERNAL" = true ] || [ "$INTERNAL" = true ]; then CMD_RS_GEN="$CMD_RS_GEN --internal" - CMD_RS_INFO="$CMD_RS_INFO" - CMD_RS_PLUGIN="$CMD_RS_PLUGIN --internal" - PRIVATE_STRING=".private" -fi - -if [ -n "${ID}" ] && [ -n "${PW}" ] -then - CMD_RS_GEN="$CMD_RS_GEN -i ${ID} -p ${PW}" - echo "Append ID/PW Option : ${CMD_RS_GEN}" -fi - - -if [[ -e ${LOGFILE} ]]; then - CMD_RS_GEN="$CMD_RS_GEN --log ${LOGFILE}" fi ############################################################################### ## Rootstrap Generation ############################################################################### -if [[ "$GLOBAL_ERROR" != "0" ]]; then - log "[Error] Failed download rpm"; - exit 1; -fi - if [ "$OPT_TARGET" = true ]; then - remove_dir ${DIR_TMP} ${DIR_TARGET} callRootstrapGen target ${RPM_PKG_SVR_TARGET} ${BASE_PKG_SVR_TARGET} log "[INFO] Postscript ${GBS_BUILDROOT}"; - mv ${GBS_BUILDROOT}/usr/include/asm-arm64 ${GBS_BUILDROOT}/usr/include/asm - mv ${GBS_BUILDROOT}/usr/include/base/deprecated/* ${GBS_BUILDROOT}/usr/include/base/ - if [ "$INTERNAL" = false ]; then echo "remove Non-Public EFL API" $CMD_API_FILTER ${GBS_BUILDROOT} > /dev/null #EFL filter echo "remove Non-Public GDBUS API" $CMD_API_GDBUS_FILTER ${GBS_BUILDROOT} > /dev/null #GDBUS filter fi - #echo "remove Public GDBUS API" - #$CMD_API_GDBUS_FILTER .target>/dev/null #GDBUS filter if [ "$INTERNAL" = true ]; then log "[INFO] Skip .. removing dlog-internal.h" @@ -363,20 +219,14 @@ if [ "$OPT_TARGET" = true ]; then fi if [ "$OPT_EMULATOR" = true ]; then - remove_dir ${DIR_TMP} ${DIR_EMULATOR} callRootstrapGen emulator ${RPM_PKG_SVR_EMULATOR} ${BASE_PKG_SVR_EMULATOR} log "[INFO] Postscript ${GBS_BUILDROOT}"; - mv ${GBS_BUILDROOT}/usr/include/asm-ia64 ${GBS_BUILDROOT}/usr/include/asm - mv ${GBS_BUILDROOT}/usr/include/base/deprecated/* ${GBS_BUILDROOT}/usr/include/base/ - if [ "$INTERNAL" = false ]; then echo "remove Non-Public EFL API" - #$CMD_API_FILTER .target>/dev/null #EFL filter $CMD_API_FILTER .emulator>/dev/null #EFL filter echo "remove Non-Public GDBUS API" - #$CMD_API_GDBUS_FILTER .target>/dev/null #GDBUS filter $CMD_API_GDBUS_FILTER .emulator>/dev/null #GDBUS filter fi @@ -403,9 +253,6 @@ if [ "$OPT_EMULATOR" = true ]; then fi -if [[ -e ${LOGFILE} ]]; then - log "END" | tee -a ${LOGFILE} -fi ############################################################################### ## END ############################################################################### diff --git a/rs_resource/OSS/libexif-rs.xml b/rs_resource/OSS/libexif-rs.xml deleted file mode 100644 index 763819c..0000000 --- a/rs_resource/OSS/libexif-rs.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0"?> -<rootstrap name="libexif"> - <emulator> - <rpm accept="libexif" arch="i686"/> - <rpm accept="libexif-devel" arch="i686"/> - </emulator> - <target> - <rpm accept="libexif" arch="armv7l"/> - <rpm accept="libexif-devel" arch="armv7l"/> - </target> - <necessary> - <file>/usr/include/libexif/exif-byte-order.h</file> - <file>/usr/include/libexif/exif-content.h</file> - <file>/usr/include/libexif/exif-data.h</file> - <file>/usr/include/libexif/exif-data-type.h</file> - <file>/usr/include/libexif/exif-entry.h</file> - <file>/usr/include/libexif/exif-format.h</file> - <file>/usr/include/libexif/exif-ifd.h</file> - <file>/usr/include/libexif/exif-loader.h</file> - <file>/usr/include/libexif/exif-log.h</file> - <file>/usr/include/libexif/exif-mem.h</file> - <file>/usr/include/libexif/exif-mnote-data.h</file> - <file>/usr/include/libexif/exif-tag.h</file> - <file>/usr/include/libexif/exif-utils.h</file> - <file>/usr/include/libexif/_stdint.h</file> - <file>/usr/lib/libexif.so*</file> - </necessary> - <include_path>/usr/include</include_path> - <library_path>/usr/lib</library_path> - <library>libexif.so</library> -</rootstrap> diff --git a/rs_resource/OSS/tef-rs.xml b/rs_resource/OSS/tef-rs.xml deleted file mode 100644 index 7143986..0000000 --- a/rs_resource/OSS/tef-rs.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0"?> -<rootstrap name="tef"> - <emulator> - <rpm accept="tef-libteec" arch="i686"/> <!-- libteec shared library --> - <rpm accept="tef-libteec-devel" arch="i686"/> <!-- libteec header file --> - </emulator> - - <target> - <rpm accept="tef-libteec" arch="armv7l"/> <!-- libteec shared library --> - <rpm accept="tef-libteec-devel" arch="armv7l"/> <!-- libteec header file --> - </target> - - <necessary> - <file>/usr/include/tef/tee_client_api.h</file> <!-- TEE client API --> - <file>/usr/lib/libteec.so*</file> - </necessary> - - <include_path>/usr/include/tef</include_path> - <library_path>/usr/lib</library_path> - <library>libteec.so</library> <!-- TEE client library --> -</rootstrap> diff --git a/script/convert32.sh b/script/convert32.sh index 644e2ab..030294c 100755 --- a/script/convert32.sh +++ b/script/convert32.sh @@ -21,13 +21,3 @@ SNAPSHOT_URL_POSTFIX_TARGET="/repos/standard/packages/" sed -i "s@SNAPSHOT_URL_POSTFIX_EMULATOR=.*@SNAPSHOT_URL_POSTFIX_EMULATOR=\"${SNAPSHOT_URL_POSTFIX_EMULATOR}\"@" rs-config sed -i "s@SNAPSHOT_URL_POSTFIX_TARGET=.*@SNAPSHOT_URL_POSTFIX_TARGET=\"${SNAPSHOT_URL_POSTFIX_TARGET}\"@" rs-config - -# Post Script -#git checkout ./make_rootstrap.sh -#sed -i "s/asm-arm64/asm-arm/g" make_rootstrap.sh -#sed -i "s/asm-ia64/asm-x86/g" make_rootstrap.sh - -#git checkout ./script/rootstrap_gen_1.0.sh -#POSTLINKER_PATH=${PWD_BACKUP}"/script/postlinker" -#3sed -i "s@POSTLINKER_PATH=.*postlinker.*\$@POSTLINKER_PATH=\$\{PWD_BACKUP\}/script/postlinker@" ./script/rootstrap_gen_1.0.sh -#sed -i "s@/usr/lib64@/usr/lib@" ./script/rootstrap_gen_1.0.sh diff --git a/script/convert64.sh b/script/convert64.sh index 548926e..a28d3e9 100755 --- a/script/convert64.sh +++ b/script/convert64.sh @@ -21,13 +21,3 @@ SNAPSHOT_URL_POSTFIX_TARGET="/repos/standard/packages/" sed -i "s@SNAPSHOT_URL_POSTFIX_EMULATOR=.*@SNAPSHOT_URL_POSTFIX_EMULATOR=\"${SNAPSHOT_URL_POSTFIX_EMULATOR}\"@" rs-config sed -i "s@SNAPSHOT_URL_POSTFIX_TARGET=.*@SNAPSHOT_URL_POSTFIX_TARGET=\"${SNAPSHOT_URL_POSTFIX_TARGET}\"@" rs-config - -# Post Script -#git checkout ./make_rootstrap_64.sh -#sed -i "s/asm-arm/asm-arm64/g" make_rootstrap_64.sh -#sed -i "s/asm-x86/asm-ia64/g" make_rootstrap_64.sh - -#git checkout ./script/rootstrap_gen_1.0_64.sh -#POSTLINKER_PATH=${PWD_BACKUP}"/script/postlinker" -#sed -i "s@POSTLINKER_PATH=.*postlinker.*\$@POSTLINKER_PATH=\$\{PWD_BACKUP\}/script/postlinker_64@" ./script/rootstrap_gen_1.0_64.sh -#sed -i "s@/usr/lib@/usr/lib64@" ./script/rootstrap_gen_1.0_64.sh diff --git a/script/rootstrap_gen_1.0.sh b/script/rootstrap_gen_1.0.sh index 7dd8935..113f077 100755 --- a/script/rootstrap_gen_1.0.sh +++ b/script/rootstrap_gen_1.0.sh @@ -9,7 +9,6 @@ ERROR_NOT_EXIST_XML=201 ERROR_NOT_EXIST_POSTLINK=202 ERROR_FAILED_DOWNLOAD_RPM=300 -WGET_CMD="wget -nd -nc -q -r -l1 " ERRMSG_CONTACT_AUTHOR="E-MAIL ADDRESS : " ERR_AUTHOR="" @@ -77,105 +76,6 @@ echo "" exit $1 } -## download_rpm $1 : XML file -function download_rpm() -{ - log "***************** $FUNCNAME *****************" - DOWNLOAD_COUNT=0; - - for i in $(xmlstarlet sel -t -m "//${ROOTSTRAP_TYPE}/rpm" -v "concat(@accept, ',', @arch )" -o " " ${1}); - do - ACCEPT=`echo $i | cut -d "," -f 1` - ARCH=`echo $i | cut -d "," -f 2` - log "+ download rpm package [$ACCEPT][$ARCH]"; - if [[ -z ${ACCEPT} ]] || [[ -z ${ARCH} ]] - then - log "ACCEPT=${ACCEPT}, ARCH=${ARCH} Skipping..." - continue; - fi - - log "+ find ${RPM_Directory}/$2 -name '${ACCEPT}-[0-9]*${ARCH}*rpm'" - if [[ -z $(find ${RPM_Directory}/${ROOTSTRAP_TYPE} -name "${ACCEPT}-[0-9]*${ARCH}*rpm") ]] - then - log "+ Not Exist in .rpm cache.." - if [[ ${1} == *"baserpm"* ]] && [[ -n ${BASE_PKG_URL} ]] - then - RPM_DOWN_SVR=${BASE_PKG_URL}/${ARCH} - else - RPM_DOWN_SVR=${URL}/${ARCH} - fi - - log "+ Start download from [${RPM_DOWN_SVR}]" - log "+ CMD [${WGET_CMD} -A ${ACCEPT}-[0-9]*rpm -P ${RPM_Directory}/${ROOTSTRAP_TYPE} ${RPM_DOWN_SVR};]" - ${WGET_CMD} -A "${ACCEPT}-[0-9]*rpm" -P ${RPM_Directory}/${ROOTSTRAP_TYPE} ${RPM_DOWN_SVR}; - check_error $? "Fail to wget ${ACCEPT} pkg from ${RPM_DOWN_SVR}" - fi - - ln -s ${RPM_Directory}/${ROOTSTRAP_TYPE}/${ACCEPT}-[0-9]*${ARCH}*rpm ${TMP} - let "DOWNLOAD_COUNT+=1" - done - - #Erro Check - FILE_COUNT=$(ls ${TMP} | wc -l) - if [ $DOWNLOAD_COUNT -gt $FILE_COUNT ] - then - #check_error $ERROR_FAILED_DOWNLOAD_RPM "Fail to download rpm from ${1}. Expect number of DOWNLOAD files are [$DOWNLOAD_COUNT]. but actually count [$FILE_COUNT]" - log "Fail to download rpm from ${1}.\nExpect number of DOWNLOAD files are [$DOWNLOAD_COUNT].\nbut actually count [$FILE_COUNT]" 1>&2 - get_author ${1} - return $ERROR_FAILED_DOWNLOAD_RPM - fi - - BROKEN_COUNT=$(find -L ${TMP} -type l | sort -d | wc -l) - BROKEN_LIST=$(find -L ${TMP} -type l | sort -d) - if [ $BROKEN_COUNT -gt 0 ] - then - log "Fail to download rpm from ${1}.\nExpect number of DOWNLOAD files are [$DOWNLOAD_COUNT].\nbut actually BROKEN FILE [$BROKEN_COUNT], BROKEN LIST are ${BROKEN_LIST}" 1>&2 - get_author ${1} - #check_error $ERROR_FAILED_DOWNLOAD_RPM "Fail to download rpm from ${1}. Expect number of DOWNLOAD files are [$DOWNLOAD_COUNT]. but actually BROKEN FILE [$BROKEN_COUNT], BROKEN LIST are ${BROKEN_LIST}" - return $ERROR_FAILED_DOWNLOAD_RPM - fi -} - -function unpack_rpm() -{ - log "***************** $FUNCNAME *****************" -( - cd ${TMP} - for pkg in $(ls *.rpm) - do - log "+ unpack_rpm $pkg" - rpm2cpio $pkg | cpio -idm >/dev/null 2>&1 - done -) -} - -function unnecessary_files() -{ - log "***************** $FUNCNAME *****************" - #remove dir - for i in $(xmlstarlet sel -t -m "//unnecessary/file[@type]" -o "." -v "text()" -o " " ${1}); - do - if [ -n ${i} ] - then - log "+ remove dir [${TMP}/$i]"; - rm -rf ${TMP}/${i} - fi - done; - - #remove file - for i in $(xmlstarlet sel -t -m "//unnecessary/file[not(@type)]" -o "." -v "text()" -o " " ${1}); - do - if [ -n ${i} ] - then - log "+ remove file [${TMP}/$i]"; - rm -rf ${TMP}/${i} - fi - done; - - log "" - -} - function copy_header_and_so() { local src_dir=$1 @@ -275,7 +175,7 @@ function check_prerequisite() #script start check_prerequisite -OPTS=`getopt -o -A:t:u:b:l:i:p:whq:r: --long type:,url:,base:,list:,id:,pw:,withlogin,help,internal,log: -n 'rootstrap_gen_1.0' -- "$@"` +OPTS=`getopt -o -A:t:u:b:l:hq:r: --long type:,url:,base:,list:,help,internal,log: -n 'rootstrap_gen_1.0' -- "$@"` if [ $? != 0 ] ; then log "Failed parsing options." >&2 ; exit 1 ; fi log "" @@ -298,19 +198,7 @@ while true; do -u | --url ) RPM_PKG_URL="$2"; shift;shift ;; -b | --base ) BASE_PKG_URL="$2"; shift;shift ;; -l | --list ) XML_INPUT_LIST="$2 "; shift; shift ;; - -i | --id ) SPIN_ID="$2"; shift; shift ;; - -p | --pw ) SPIN_PW="$2"; shift; shift ;; --log ) LOGFILE="$2"; shift; shift ;; - -w | --withlogin ) - if [ -z ${SPIN_ID}] || [ -z ${SPIN_PW} ] - then - spin_login; - WGET_CMD="${WGET_CMD} --user=${SPIN_ID} --password=${SPIN_PW}" - log "WGET_CMD = ${WGET_CMD}" - else - log "WGET_CMD = ${WGET_CMD}" - fi - shift;; --internal ) INTERNAL=true; shift;; -h | --help ) print_usage_exit $ERROR_USAGE; shift; shift ;; -- ) shift; break ;; @@ -324,17 +212,6 @@ while true; do esac done -if [ -n "${SPIN_ID}" ] && [ -n "${SPIN_PW}" ] -then - WGET_CMD="${WGET_CMD} --user=${SPIN_ID} --password=${SPIN_PW}" - log "WGET_CMD = ${WGET_CMD}" -fi - -#echo "# ROOTSTRAP_TYPE = $ROOTSTRAP_TYPE" -#echo "# RPM_PKG_URL = $RPM_PKG_URL" -#echo "# BASE_PKG_URL = $BASE_PKG_URL" -#echo "# XML_INPUT_LIST = $XML_INPUT_LIST" - #ROOTSTRAP_TYPE=$1; #rootstrap type - target, emulator if [ -z $ROOTSTRAP_TYPE ] then @@ -349,9 +226,6 @@ fi URL=$RPM_PKG_URL PWD_BACKUP=`pwd` -DEST=${PWD_BACKUP}/.${ROOTSTRAP_TYPE} -TMP=${PWD_BACKUP}/".tmp" -RPM_Directory=${PWD_BACKUP}/".rpm" POSTLINKER_PATH=${PWD_BACKUP}"/script/postlinker" if [ ! -e $POSTLINKER_PATH ] @@ -360,22 +234,12 @@ then exit 1 fi -if [ ! -e "${RPM_Directory}/${ROOTSTRAP_TYPE}" ] -then - log "Not Exist ${RPM_Directory}/${ROOTSTRAP_TYPE}" - mkdir -p "${RPM_Directory}/${ROOTSTRAP_TYPE}" -fi - - log "################# Start Generate Rootstrap #################" log "# ROOTSTRAP_TYPE=$ROOTSTRAP_TYPE" log "# DOWNLOAD_URL=$URL" log "# BASE_PKG_URL(Optional)=$BASE_PKG_URL" log "# POSTLINKER_PATH=$POSTLINKER_PATH" log "# XML_INPUT_LIST = $XML_INPUT_LIST" -log "# TMP = $TMP" -log "# DEST = $DEST" -log "# RPM_Directory = $RPM_Directory" log "############################################################" ################################################################## @@ -389,7 +253,6 @@ then do INAME_OPT+=" ! -name ${ignore} " done - #echo "[INAME_OPT = $INAME_OPT]" fi # 2. get xml list @@ -411,12 +274,6 @@ then check_error $ERROR_NOT_EXIST_XML "It does not found *-rs.xml" fi -#init - DEST -if [ ! -e ${DEST} ] -then - mkdir ${DEST}; -fi - PROCESS_CNT=0; TOTAL_CNT=$(echo "${XML_LIST}" | wc -l) @@ -427,9 +284,6 @@ log "> XML_LIST count is ${TOTAL_CNT}" ################################################################## for item in $XML_LIST do - #init - TMP - rm -rf ${TMP} ; mkdir ${TMP} - let "PROCESS_CNT+=1" log "[${PROCESS_CNT}/${TOTAL_CNT}]Processing : ${item}" 1>&2 diff --git a/script/rootstrap_gen_1.0_64.sh b/script/rootstrap_gen_1.0_64.sh index 555142a..6eee14e 100755 --- a/script/rootstrap_gen_1.0_64.sh +++ b/script/rootstrap_gen_1.0_64.sh @@ -9,7 +9,6 @@ ERROR_NOT_EXIST_XML=201 ERROR_NOT_EXIST_POSTLINK=202 ERROR_FAILED_DOWNLOAD_RPM=300 -WGET_CMD="wget -nd -nc -q -r -l1 " ERRMSG_CONTACT_AUTHOR="E-MAIL ADDRESS : " ERR_AUTHOR="" @@ -77,105 +76,6 @@ echo "" exit $1 } -## download_rpm $1 : XML file -function download_rpm() -{ - log "***************** $FUNCNAME *****************" - DOWNLOAD_COUNT=0; - - for i in $(xmlstarlet sel -t -m "//${ROOTSTRAP_TYPE}/rpm" -v "concat(@accept, ',', @arch )" -o " " ${1}); - do - ACCEPT=`echo $i | cut -d "," -f 1` - ARCH=`echo $i | cut -d "," -f 2` - log "+ download rpm package [$ACCEPT][$ARCH]"; - if [[ -z ${ACCEPT} ]] || [[ -z ${ARCH} ]] - then - log "ACCEPT=${ACCEPT}, ARCH=${ARCH} Skipping..." - continue; - fi - - log "+ find ${RPM_Directory}/$2 -name '${ACCEPT}-[0-9]*${ARCH}*rpm'" - if [[ -z $(find ${RPM_Directory}/${ROOTSTRAP_TYPE} -name "${ACCEPT}-[0-9]*${ARCH}*rpm") ]] - then - log "+ Not Exist in .rpm cache.." - if [[ ${1} == *"baserpm"* ]] && [[ -n ${BASE_PKG_URL} ]] - then - RPM_DOWN_SVR=${BASE_PKG_URL}/${ARCH} - else - RPM_DOWN_SVR=${URL}/${ARCH} - fi - - log "+ Start download from [${RPM_DOWN_SVR}]" - log "+ CMD [${WGET_CMD} -A ${ACCEPT}-[0-9]*rpm -P ${RPM_Directory}/${ROOTSTRAP_TYPE} ${RPM_DOWN_SVR};]" - ${WGET_CMD} -A "${ACCEPT}-[0-9]*rpm" -P ${RPM_Directory}/${ROOTSTRAP_TYPE} ${RPM_DOWN_SVR}; - check_error $? "Fail to wget ${ACCEPT} pkg from ${RPM_DOWN_SVR}" - fi - - ln -s ${RPM_Directory}/${ROOTSTRAP_TYPE}/${ACCEPT}-[0-9]*${ARCH}*rpm ${TMP} - let "DOWNLOAD_COUNT+=1" - done - - #Erro Check - FILE_COUNT=$(ls ${TMP} | wc -l) - if [ $DOWNLOAD_COUNT -gt $FILE_COUNT ] - then - #check_error $ERROR_FAILED_DOWNLOAD_RPM "Fail to download rpm from ${1}. Expect number of DOWNLOAD files are [$DOWNLOAD_COUNT]. but actually count [$FILE_COUNT]" - log "Fail to download rpm from ${1}.\nExpect number of DOWNLOAD files are [$DOWNLOAD_COUNT].\nbut actually count [$FILE_COUNT]" 1>&2 - get_author ${1} - return $ERROR_FAILED_DOWNLOAD_RPM - fi - - BROKEN_COUNT=$(find -L ${TMP} -type l | sort -d | wc -l) - BROKEN_LIST=$(find -L ${TMP} -type l | sort -d) - if [ $BROKEN_COUNT -gt 0 ] - then - log "Fail to download rpm from ${1}.\nExpect number of DOWNLOAD files are [$DOWNLOAD_COUNT].\nbut actually BROKEN FILE [$BROKEN_COUNT], BROKEN LIST are ${BROKEN_LIST}" 1>&2 - get_author ${1} - #check_error $ERROR_FAILED_DOWNLOAD_RPM "Fail to download rpm from ${1}. Expect number of DOWNLOAD files are [$DOWNLOAD_COUNT]. but actually BROKEN FILE [$BROKEN_COUNT], BROKEN LIST are ${BROKEN_LIST}" - return $ERROR_FAILED_DOWNLOAD_RPM - fi -} - -function unpack_rpm() -{ - log "***************** $FUNCNAME *****************" -( - cd ${TMP} - for pkg in $(ls *.rpm) - do - log "+ unpack_rpm $pkg" - rpm2cpio $pkg | cpio -idm >/dev/null 2>&1 - done -) -} - -function unnecessary_files() -{ - log "***************** $FUNCNAME *****************" - #remove dir - for i in $(xmlstarlet sel -t -m "//unnecessary/file[@type]" -o "." -v "text()" -o " " ${1}); - do - if [ -n ${i} ] - then - log "+ remove dir [${TMP}/$i]"; - rm -rf ${TMP}/${i} - fi - done; - - #remove file - for i in $(xmlstarlet sel -t -m "//unnecessary/file[not(@type)]" -o "." -v "text()" -o " " ${1}); - do - if [ -n ${i} ] - then - log "+ remove file [${TMP}/$i]"; - rm -rf ${TMP}/${i} - fi - done; - - log "" - -} - function copy_header_and_so() { local src_dir=$1 @@ -275,7 +175,7 @@ function check_prerequisite() #script start check_prerequisite -OPTS=`getopt -o -A:t:u:b:l:i:p:whq:r: --long type:,url:,base:,list:,id:,pw:,withlogin,help,internal,log: -n 'rootstrap_gen_1.0_64' -- "$@"` +OPTS=`getopt -o -A:t:u:b:l:hq:r: --long type:,url:,base:,list:,help,internal,log: -n 'rootstrap_gen_1.0_64' -- "$@"` if [ $? != 0 ] ; then log "Failed parsing options." >&2 ; exit 1 ; fi log "" @@ -298,19 +198,7 @@ while true; do -u | --url ) RPM_PKG_URL="$2"; shift;shift ;; -b | --base ) BASE_PKG_URL="$2"; shift;shift ;; -l | --list ) XML_INPUT_LIST="$2 "; shift; shift ;; - -i | --id ) SPIN_ID="$2"; shift; shift ;; - -p | --pw ) SPIN_PW="$2"; shift; shift ;; --log ) LOGFILE="$2"; shift; shift ;; - -w | --withlogin ) - if [ -z ${SPIN_ID}] || [ -z ${SPIN_PW} ] - then - spin_login; - WGET_CMD="${WGET_CMD} --user=${SPIN_ID} --password=${SPIN_PW}" - log "WGET_CMD = ${WGET_CMD}" - else - log "WGET_CMD = ${WGET_CMD}" - fi - shift;; --internal ) INTERNAL=true; shift;; -h | --help ) print_usage_exit $ERROR_USAGE; shift; shift ;; -- ) shift; break ;; @@ -324,17 +212,6 @@ while true; do esac done -if [ -n "${SPIN_ID}" ] && [ -n "${SPIN_PW}" ] -then - WGET_CMD="${WGET_CMD} --user=${SPIN_ID} --password=${SPIN_PW}" - log "WGET_CMD = ${WGET_CMD}" -fi - -#echo "# ROOTSTRAP_TYPE = $ROOTSTRAP_TYPE" -#echo "# RPM_PKG_URL = $RPM_PKG_URL" -#echo "# BASE_PKG_URL = $BASE_PKG_URL" -#echo "# XML_INPUT_LIST = $XML_INPUT_LIST" - #ROOTSTRAP_TYPE=$1; #rootstrap type - target, emulator if [ -z $ROOTSTRAP_TYPE ] then @@ -349,9 +226,6 @@ fi URL=$RPM_PKG_URL PWD_BACKUP=`pwd` -DEST=${PWD_BACKUP}/.${ROOTSTRAP_TYPE} -TMP=${PWD_BACKUP}/".tmp" -RPM_Directory=${PWD_BACKUP}/".rpm" POSTLINKER_PATH=${PWD_BACKUP}/script/postlinker_64 if [ ! -e $POSTLINKER_PATH ] @@ -360,22 +234,12 @@ then exit 1 fi -if [ ! -e "${RPM_Directory}/${ROOTSTRAP_TYPE}" ] -then - log "Not Exist ${RPM_Directory}/${ROOTSTRAP_TYPE}" - mkdir -p "${RPM_Directory}/${ROOTSTRAP_TYPE}" -fi - - log "################# Start Generate Rootstrap #################" log "# ROOTSTRAP_TYPE=$ROOTSTRAP_TYPE" log "# DOWNLOAD_URL=$URL" log "# BASE_PKG_URL(Optional)=$BASE_PKG_URL" log "# POSTLINKER_PATH=$POSTLINKER_PATH" log "# XML_INPUT_LIST = $XML_INPUT_LIST" -log "# TMP = $TMP" -log "# DEST = $DEST" -log "# RPM_Directory = $RPM_Directory" log "############################################################" ################################################################## @@ -389,7 +253,6 @@ then do INAME_OPT+=" ! -name ${ignore} " done - #echo "[INAME_OPT = $INAME_OPT]" fi # 2. get xml list @@ -411,12 +274,6 @@ then check_error $ERROR_NOT_EXIST_XML "It does not found *-rs.xml" fi -#init - DEST -if [ ! -e ${DEST} ] -then - mkdir ${DEST}; -fi - PROCESS_CNT=0; TOTAL_CNT=$(echo "${XML_LIST}" | wc -l) @@ -427,9 +284,6 @@ log "> XML_LIST count is ${TOTAL_CNT}" ################################################################## for item in $XML_LIST do - #init - TMP - rm -rf ${TMP} ; mkdir ${TMP} - let "PROCESS_CNT+=1" log "[${PROCESS_CNT}/${TOTAL_CNT}]Processing : ${item}" 1>&2 diff --git a/script/rootstrap_info_gen_1.0.sh b/script/rootstrap_info_gen_1.0.sh deleted file mode 100755 index 12ab82b..0000000 --- a/script/rootstrap_info_gen_1.0.sh +++ /dev/null @@ -1,229 +0,0 @@ -#!/bin/bash - -function log() -{ - printf "[${SCRIPT_NAME}:${BASH_LINENO[0]}] ${@}\n" -} - -function print_usage_exit() -{ -echo "$SCRIPT_NAME is rootstrap info generator using xml" -echo "Usage: $SCRIPT_NAME [<OPTION>]..." -echo "" -echo " -t,--type rootstrap type emulator, target." -echo " -l,--list xml file or directory list." -echo " -i,--info IDE rootstrap info file to get Build Option" -echo " -p,--profile tizen" -echo " -v,--version 9.0" -echo "" -echo "Example 1" -echo ">$SCRIPT_NAME -t \"emulator\" -i \".info\/mobile-2.3-emulator.core.dev.xml\" -p \"mobile\" -v \"2.3\"" -echo "" - -exit $1 -} - -function get_build_option() -{ - BUILD_OPT_INC_PATH+=$(xmlstarlet sel -t -m "/rootstrap" -m "include_path" -v "text()" -o "" -n ${1})$'\n'; - BUILD_OPT_LIB_PATH+=$(xmlstarlet sel -t -m "/rootstrap" -m "library_path" -v "text()" -o "" -n ${1})$'\n'; - BUILD_OPT_LIB_NAME+=$(xmlstarlet sel -t -m "/rootstrap" -m "library" -v "text()" -o "" -n ${1})$'\n'$'\n'; - #BUILD_OPT_CLI_RS_LIBRARIES+=$(xmlstarlet sel -t -m "/rootstrap" -m "library" -v "text()" -o "" -n ${1})$'\n'$'\n'; -} - -function generate_info() -{ -log "# $FUNCNAME------" -( -echo '<PackageInfo> -<DevPackage name="Native_API" is_framework="true" is_virtual="false"> -</DevPackage> -</PackageInfo>'| tee $INFO_FILENAME >/dev/null 2>&1 -) - -for i in $BUILD_OPT_INC_PATH -do - xmlstarlet ed -L -s "/PackageInfo/DevPackage" -t elem -n "include_path" -v "$i" $INFO_FILENAME -done; - -for i in $BUILD_OPT_LIB_PATH -do - xmlstarlet ed -L -s "/PackageInfo/DevPackage" -t elem -n "library_path" -v "$i" $INFO_FILENAME -done; - -for i in $BUILD_OPT_LIB_NAME -do - if [ "$i" == "liblibrary.so" ]; then - log "AFTER CONTINUE: $i" - continue; - fi - xmlstarlet ed -L -s "/PackageInfo/DevPackage" -t elem -n "library" -v "$i" $INFO_FILENAME -done; - -xmlstarlet ed -L -s "/PackageInfo/DevPackage" -t elem -n "description" -v "Native_API Libraries" $INFO_FILENAME -} - -########################################################################################### - -#script start -BUILD_OPT_INC_PATH="" -BUILD_OPT_LIB_PATH="" -BUILD_OPT_LIB_NAME="" - -SCRIPT_NAME=$(basename ${0}) -SCRIPT_VER="0.0.1" -SCRIPT_PATH=$(dirname ${0}) - -OPTS=`getopt -o -t:l:p:v:i:h --long type:,list:,profile:,version:,info:,help,internal -- "$@"` -if [ $? != 0 ] ; then log "Failed parsing options." >&2 ; exit 1 ; fi - -log "" -log "# PARAMETER : $SCRIPT_NAME $OPTS" -eval set -- "$OPTS" - -ROOTSTRAP_TYPE="" -XML_INPUT_LIST="" - -while true; do -case "$1" in --t | --type ) ROOTSTRAP_TYPE="$2"; shift;shift ;; --l | --list ) XML_INPUT_LIST="$2 "; shift; shift ;; --p | --profile ) PLATFORM_PROFILE="$2"; shift; shift ;; --v | --version ) PLATFORM_VERSION="$2"; shift; shift ;; --i | --info ) INFO_FILENAME="$2"; shift; shift ;; ---internal ) INTERNAL=true; shift ;; --h | --help ) exit; shift; shift ;; --- ) shift; break ;; -* ) - if [ -d "$1" ] || [ -f "$1" ]; then - XML_INPUT_LIST+="${1} " - else - print_usage_exit -1; - fi - shift;; -esac -done - -log "# ROOTSTRAP_TYPE = $ROOTSTRAP_TYPE" -log "# XML_INPUT_LIST = $XML_INPUT_LIST" -log "# PLATFORM_PROFILE = $PLATFORM_PROFILE" -log "# PLATFORM_VERSION = $PLATFORM_VERSION" -log "# INFO_FILENAME = $INFO_FILENAME" -log "" - -if [ -z "$PLATFORM_PROFILE" ] || [ -z "$PLATFORM_VERSION" ] -then - source "$SCRIPT_PATH/../.rs-config" -fi - -################################################################## -# Generate XML_LIST -################################################################## -# 1. ignorelist -if [ -e ".ignorelist" ] -then - IGNORE_LIST=$(cat .ignorelist); - for ignore in $IGNORE_LIST - do - INAME_OPT+=" ! -name ${ignore} " - done - log "[INAME_OPT = $INAME_OPT]" -fi - -# 2. get xml list -for xml_input in $XML_INPUT_LIST -do - if [ -d "$xml_input" ] #dirctory - then - XML_LIST+=$(find -L $xml_input \( -name "*-rs.xml" ${INAME_OPT} \) )$'\n' - elif [ -e "$xml_input" ] - then - XML_LIST+="$xml_input"$'\n' - fi -done - -# 3. delete empty line -XML_LIST=$(echo "$XML_LIST" | sed '/^$/d') -if [ "$XML_LIST" == "" ] -then - log "It does not found *-rs.xml" - exit 1 -fi -#echo "$XML_LIST" - - -PWD_BACKUP=`pwd` - -INFO_DEST=${PWD_BACKUP}/".info" -PLUGIN_DEST=${PWD_BACKUP}/".plugin" - -log "################# Start Generate Rootstrap Info #################" - -PROCESS_CNT=0; - -TOTAL_CNT=$(echo "${XML_LIST}" | wc -l) - -#get build option from xml -for item in $XML_LIST -do - get_build_option $item -done - -#generate rootstrap plugin & info -if [ ! -e ${INFO_DEST} ] -then - mkdir ${INFO_DEST}; -fi - -BUILD_OPT_INC_PATH=`echo "$BUILD_OPT_INC_PATH" | sort -d -u`; -BUILD_OPT_LIB_PATH=`echo "$BUILD_OPT_LIB_PATH" | sort -d -u`; -BUILD_OPT_LIB_NAME=`echo "$BUILD_OPT_LIB_NAME" | sort -d -u`; - -log "> BUILD_OPT_INC_PATH=$BUILD_OPT_INC_PATH" -log "> BUILD_OPT_LIB_PATH=$BUILD_OPT_LIB_PATH" -log "> BUILD_OPT_LIB_NAME=$BUILD_OPT_LIB_NAME" - -if [[ "${ROOTSTRAP_TYPE}" == "emulator" ]] -then - -#emulator -TYPE="emulator" -ARCH="i386" -RS_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core" -DEV_PACKAGE_CONFIG_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/info/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core.dev.xml" -INFO_FILENAME=${INFO_DEST}/"$PLATFORM_PROFILE-$PLATFORM_VERSION-${TYPE}.core.dev.xml" - -#if [ "$INTERNAL" = true ]; then -#DEV_PACKAGE_CONFIG_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/info/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core.private.dev.xml" -#INFO_FILENAME=${INFO_DEST}/"$PLATFORM_PROFILE-$PLATFORM_VERSION-${TYPE}.core.private.dev.xml" -#fi - -generate_info - - -elif [[ "${ROOTSTRAP_TYPE}" == "target" ]] -then -#device -TYPE="device" -ARCH="armel" -RS_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core" -DEV_PACKAGE_CONFIG_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/info/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core.dev.xml" -INFO_FILENAME=${INFO_DEST}/"$PLATFORM_PROFILE-$PLATFORM_VERSION-${TYPE}.core.dev.xml" - -#if [ "$INTERNAL" = true ]; then -#DEV_PACKAGE_CONFIG_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/info/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core.private.dev.xml" -#INFO_FILENAME=${INFO_DEST}/"$PLATFORM_PROFILE-$PLATFORM_VERSION-${TYPE}.core.private.dev.xml" -#fi - -generate_info - -fi - -log "> TYPE = $TYPE" -log "> ARCH = $ARCH" -log "> RS_PATH = $RS_PATH" -log "> DEV_PACKAGE_CONFIG_PATH = $DEV_PACKAGE_CONFIG_PATH" -log "> INFO_FILENAME = $INFO_FILENAME" -log "######################## END [$SECONDS] Sec ##############################" - -exit 0 diff --git a/script/rootstrap_info_gen_1.0_64.sh b/script/rootstrap_info_gen_1.0_64.sh deleted file mode 100755 index ad26f9a..0000000 --- a/script/rootstrap_info_gen_1.0_64.sh +++ /dev/null @@ -1,231 +0,0 @@ -#!/bin/bash - -function log() -{ - printf "[${SCRIPT_NAME}:${BASH_LINENO[0]}] ${@}\n" -} - -function print_usage_exit() -{ -echo "$SCRIPT_NAME is rootstrap info generator using xml" -echo "Usage: $SCRIPT_NAME [<OPTION>]..." -echo "" -echo " -t,--type rootstrap type emulator, target." -echo " -l,--list xml file or directory list." -echo " -i,--info IDE rootstrap info file to get Build Option" -echo " -p,--profile tizen" -echo " -v,--version 9.0" -echo "" -echo "Example 1" -echo ">$SCRIPT_NAME -t \"emulator\" -i \".info\/mobile-2.3-emulator.core.dev.xml\" -p \"mobile\" -v \"2.3\"" -echo "" - -exit $1 -} - -function get_build_option() -{ - BUILD_OPT_INC_PATH+=$(xmlstarlet sel -t -m "/rootstrap" -m "include_path" -v "text()" -o "" -n ${1})$'\n'; - BUILD_OPT_LIB_PATH+=$(xmlstarlet sel -t -m "/rootstrap" -m "library_path" -v "text()" -o "" -n ${1})$'\n'; - BUILD_OPT_LIB_NAME+=$(xmlstarlet sel -t -m "/rootstrap" -m "library" -v "text()" -o "" -n ${1})$'\n'$'\n'; - #BUILD_OPT_CLI_RS_LIBRARIES+=$(xmlstarlet sel -t -m "/rootstrap" -m "library" -v "text()" -o "" -n ${1})$'\n'$'\n'; -} - -function generate_info() -{ -log "# $FUNCNAME------" -( -echo '<PackageInfo> -<DevPackage name="Native_API" is_framework="true" is_virtual="false"> -</DevPackage> -</PackageInfo>'| tee $INFO_FILENAME >/dev/null 2>&1 -) - -for i in $BUILD_OPT_INC_PATH -do - xmlstarlet ed -L -s "/PackageInfo/DevPackage" -t elem -n "include_path" -v "$i" $INFO_FILENAME -done; - -for i in $BUILD_OPT_LIB_PATH -do - xmlstarlet ed -L -s "/PackageInfo/DevPackage" -t elem -n "library_path" -v "$i" $INFO_FILENAME -done; - -for i in $BUILD_OPT_LIB_NAME -do - if [ "$i" == "liblibrary.so" ]; then - log "AFTER CONTINUE: $i" - continue; - fi - xmlstarlet ed -L -s "/PackageInfo/DevPackage" -t elem -n "library" -v "$i" $INFO_FILENAME -done; - -xmlstarlet ed -L -s "/PackageInfo/DevPackage" -t elem -n "description" -v "Native_API Libraries" $INFO_FILENAME -} - -########################################################################################### - -#script start -BUILD_OPT_INC_PATH="" -BUILD_OPT_LIB_PATH="" -BUILD_OPT_LIB_NAME="" - -SCRIPT_NAME=$(basename ${0}) -SCRIPT_VER="0.0.1" -SCRIPT_PATH=$(dirname ${0}) - -OPTS=`getopt -o -t:l:p:v:i:h --long type:,list:,profile:,version:,info:,help,internal -- "$@"` -if [ $? != 0 ] ; then log "Failed parsing options." >&2 ; exit 1 ; fi - -log "" -log "# PARAMETER : $SCRIPT_NAME $OPTS" -eval set -- "$OPTS" - -ROOTSTRAP_TYPE="" -XML_INPUT_LIST="" - -while true; do -case "$1" in --t | --type ) ROOTSTRAP_TYPE="$2"; shift;shift ;; --l | --list ) XML_INPUT_LIST="$2 "; shift; shift ;; --p | --profile ) PLATFORM_PROFILE="$2"; shift; shift ;; --v | --version ) PLATFORM_VERSION="$2"; shift; shift ;; --i | --info ) INFO_FILENAME="$2"; shift; shift ;; ---internal ) INTERNAL=true; shift ;; --h | --help ) exit; shift; shift ;; --- ) shift; break ;; -* ) - if [ -d "$1" ] || [ -f "$1" ]; then - XML_INPUT_LIST+="${1} " - else - print_usage_exit -1; - fi - shift;; -esac -done - -log "# ROOTSTRAP_TYPE = $ROOTSTRAP_TYPE" -log "# XML_INPUT_LIST = $XML_INPUT_LIST" -log "# PLATFORM_PROFILE = $PLATFORM_PROFILE" -log "# PLATFORM_VERSION = $PLATFORM_VERSION" -log "# INFO_FILENAME = $INFO_FILENAME" -log "" - -if [ -z "$PLATFORM_PROFILE" ] || [ -z "$PLATFORM_VERSION" ] -then - source "$SCRIPT_PATH/../.rs-config" -fi - -################################################################## -# Generate XML_LIST -################################################################## -# 1. ignorelist -if [ -e ".ignorelist" ] -then - IGNORE_LIST=$(cat .ignorelist); - for ignore in $IGNORE_LIST - do - INAME_OPT+=" ! -name ${ignore} " - done - log "[INAME_OPT = $INAME_OPT]" -fi - -# 2. get xml list -for xml_input in $XML_INPUT_LIST -do - if [ -d "$xml_input" ] #dirctory - then - XML_LIST+=$(find -L $xml_input \( -name "*-rs.xml" ${INAME_OPT} \) )$'\n' - elif [ -e "$xml_input" ] - then - XML_LIST+="$xml_input"$'\n' - fi -done - -# 3. delete empty line -XML_LIST=$(echo "$XML_LIST" | sed '/^$/d') -if [ "$XML_LIST" == "" ] -then - log "It does not found *-rs.xml" - exit 1 -fi -#echo "$XML_LIST" - - -PWD_BACKUP=`pwd` - -INFO_DEST=${PWD_BACKUP}/".info" -PLUGIN_DEST=${PWD_BACKUP}/".plugin" - -log "################# Start Generate Rootstrap Info #################" - -PROCESS_CNT=0; - -TOTAL_CNT=$(echo "${XML_LIST}" | wc -l) - -#get build option from xml -for item in $XML_LIST -do - get_build_option $item -done - -#generate rootstrap plugin & info -if [ ! -e ${INFO_DEST} ] -then - mkdir ${INFO_DEST}; -fi - -BUILD_OPT_INC_PATH=`echo "$BUILD_OPT_INC_PATH" | sort -d -u`; -BUILD_OPT_LIB_PATH=`echo "$BUILD_OPT_LIB_PATH" | sort -d -u`; -BUILD_OPT_LIB_NAME=`echo "$BUILD_OPT_LIB_NAME" | sort -d -u`; - -log "> BUILD_OPT_INC_PATH=$BUILD_OPT_INC_PATH" -log "> BUILD_OPT_LIB_PATH=$BUILD_OPT_LIB_PATH" -log "> BUILD_OPT_LIB_NAME=$BUILD_OPT_LIB_NAME" - -if [[ "${ROOTSTRAP_TYPE}" == "emulator" ]] -then - -#emulator -TYPE="emulator64" -#ARCH="i386" -ARCH="x86_64" -RS_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core" -DEV_PACKAGE_CONFIG_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/info/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core.dev.xml" -INFO_FILENAME=${INFO_DEST}/"$PLATFORM_PROFILE-$PLATFORM_VERSION-${TYPE}.core.dev.xml" - -#if [ "$INTERNAL" = true ]; then -#DEV_PACKAGE_CONFIG_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/info/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core.private.dev.xml" -#INFO_FILENAME=${INFO_DEST}/"$PLATFORM_PROFILE-$PLATFORM_VERSION-${TYPE}.core.private.dev.xml" -#fi - -generate_info - - -elif [[ "${ROOTSTRAP_TYPE}" == "target" ]] -then -#device -TYPE="device64" -#ARCH="armel" -ARCH="aarch64" -RS_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core" -DEV_PACKAGE_CONFIG_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/info/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core.dev.xml" -INFO_FILENAME=${INFO_DEST}/"$PLATFORM_PROFILE-$PLATFORM_VERSION-${TYPE}.core.dev.xml" - -#if [ "$INTERNAL" = true ]; then -#DEV_PACKAGE_CONFIG_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/info/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core.private.dev.xml" -#INFO_FILENAME=${INFO_DEST}/"$PLATFORM_PROFILE-$PLATFORM_VERSION-${TYPE}.core.private.dev.xml" -#fi - -generate_info - -fi - -log "> TYPE = $TYPE" -log "> ARCH = $ARCH" -log "> RS_PATH = $RS_PATH" -log "> DEV_PACKAGE_CONFIG_PATH = $DEV_PACKAGE_CONFIG_PATH" -log "> INFO_FILENAME = $INFO_FILENAME" -log "######################## END [$SECONDS] Sec ##############################" - -exit 0 diff --git a/script/rootstrap_plugin_gen_1.0.sh b/script/rootstrap_plugin_gen_1.0.sh deleted file mode 100755 index 3785123..0000000 --- a/script/rootstrap_plugin_gen_1.0.sh +++ /dev/null @@ -1,270 +0,0 @@ -#!/bin/bash -# Version 1.0.1 -function log() -{ - printf "[${SCRIPT_NAME}:${BASH_LINENO[0]}] ${@}\n" -} - -function print_usage_exit() -{ -echo "$SCRIPT_NAME is rootstrap generator using xml" -echo "Usage: $SCRIPT_NAME [<OPTION>]..." -echo "" -echo " -t,--type rootstrap type emulator, target." -echo " -i,--info IDE rootstrap info file to get Build Option" -echo " -p,--profile tizen" -echo " -v,--version 9.0" -echo "" -echo "Example 1" -echo ">$SCRIPT_NAME -t \"emulator\" -i \".info\/mobile-2.3-emulator.core.dev.xml\" -p \"mobile\" -v \"2.3\"" -echo "" - -exit $1 -} -function get_build_option() -{ - BUILD_OPT_INC_PATH+=$(xmlstarlet sel -t -m "/rootstrap" -m "include_path" -v "text()" -o "" -n ${1})$'\n'; - BUILD_OPT_LIB_PATH+=$(xmlstarlet sel -t -m "/rootstrap" -m "library_path" -v "text()" -o "" -n ${1})$'\n'; - BUILD_OPT_LIB_NAME+=$(xmlstarlet sel -t -m "/rootstrap" -m "library" -v "text()" -o "" -n ${1})$'\n'$'\n'; - BUILD_OPT_CLI_RS_LIBRARIES+=$(xmlstarlet sel -t -m "/rootstrap" -m "library" -v "text()" -o "" -n ${1})$'\n'$'\n'; -} - -function get_build_option_from_infofile() -{ - BUILD_OPT_INC_PATH+=$(xmlstarlet sel -t -m "/PackageInfo/DevPackage" -m "include_path" -v "text()" -o "" -n ${1})$'\n'; - BUILD_OPT_LIB_PATH+=$(xmlstarlet sel -t -m "/PackageInfo/DevPackage" -m "library_path" -v "text()" -o "" -n ${1})$'\n'; - BUILD_OPT_LIB_NAME+=$(xmlstarlet sel -t -m "/PackageInfo/DevPackage" -m "library" -v "text()" -o "" -n ${1})$'\n'$'\n'; - BUILD_OPT_CLI_RS_LIBRARIES+=$(xmlstarlet sel -t -m "/PackageInfo/DevPackage" -m "library" -v "text()" -o "" -n ${1})$'\n'$'\n'; - - BUILD_OPT_INC_PATH=`echo "$BUILD_OPT_INC_PATH" | sort -d -u`; - BUILD_OPT_LIB_PATH=`echo "$BUILD_OPT_LIB_PATH" | sort -d -u`; - BUILD_OPT_LIB_NAME=`echo "$BUILD_OPT_LIB_NAME" | sort -d -u`; - BUILD_OPT_CLI_RS_LIBRARIES=`echo "$BUILD_OPT_CLI_RS_LIBRARIES" | sort -d -u | sed 's/^lib/-l/g' | sed 's/.so$/ /g'`; -} - -function generate_plugin() -{ -log "# $FUNCNAME------" -( -echo '<extension point="rootstrapDefinition"> -</extension>'| tee $PLUGIN_FILENAME >/dev/null 2>&1 -) - -xmlstarlet ed -L -s "/extension" -t elem -n "rootstrap" -v "" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap" -t attr -n "id" -v "$PLATFORM_PROFILE-$PLATFORM_VERSION-${TYPE}.core" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap" -t attr -n "name" -v "Tizen ${TYPE[*]^} $PLATFORM_VERSION" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap" -t attr -n "version" -v "${PLATFORM_PROFILE[*]^} $PLATFORM_VERSION" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap" -t attr -n "architecture" -v "$ARCH" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap" -t attr -n "path" -v "$RS_PATH" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap" -t attr -n "supportToolchainType" -v "tizen.core" $PLUGIN_FILENAME - -xmlstarlet ed -L -s "/extension/rootstrap" -t elem -n "property" -v "" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "key" -v "DEV_PACKAGE_CONFIG_PATH" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "value" -v "$DEV_PACKAGE_CONFIG_PATH" $PLUGIN_FILENAME - -xmlstarlet ed -L -s "/extension/rootstrap" -t elem -n "property" -v "" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "key" -v "LINKER_MISCELLANEOUS_OPTION" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "value" -v "" $PLUGIN_FILENAME - -xmlstarlet ed -L -s "/extension/rootstrap" -t elem -n "property" -v "" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "key" -v "COMPILER_MISCELLANEOUS_OPTION" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "value" -v "" $PLUGIN_FILENAME - -# OLD tool options -#xmlstarlet ed -L -s "/extension/rootstrap" -t elem -n "property" -v "" $PLUGIN_FILENAME -#xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "key" -v "RS_LIBRARIES" $PLUGIN_FILENAME -#xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "value" -v "$RS_LIB_OPT" $PLUGIN_FILENAME - -#xmlstarlet ed -L -s "/extension/rootstrap" -t elem -n "property" -v "" $PLUGIN_FILENAME -#xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "key" -v "EDJE_CC" $PLUGIN_FILENAME -#xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "value" -v "#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/common/efl-tool/efl-tools/bin/edje_cc" $PLUGIN_FILENAME -# end OLD tool option - should be deprecated -GCC_VERSION="9.2" -LLVM_VERSION="10.0" - -# FIXME: TO BE ADDED LATER -#if [[ "${PLATFORM_VERSION}" = "8.0"* ]] -#then -# GCC_VERSION="13.1.0" -# LLVM_VERSION="15.0.7" -#fi - -# Deprecated LLVM version -#xmlstarlet ed -L -s "/extension/rootstrap" -t elem -n "toolchain" -v "" $PLUGIN_FILENAME -#xmlstarlet ed -L -s "/extension/rootstrap/toolchain[last()]" -t attr -n "name" -v "llvm" $PLUGIN_FILENAME -#xmlstarlet ed -L -s "/extension/rootstrap/toolchain[last()]" -t attr -n "version" -v "${LLVM_VERSION}" $PLUGIN_FILENAME - -xmlstarlet ed -L -s "/extension/rootstrap" -t elem -n "toolchain" -v "" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/toolchain[last()]" -t attr -n "name" -v "gcc" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/toolchain[last()]" -t attr -n "version" -v "${GCC_VERSION}" $PLUGIN_FILENAME - -xmlstarlet ed -L -s "/extension/rootstrap" -t elem -n "tool" -v "" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/tool[last()]" -t attr -n "name" -v "EDJE_CC" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/tool[last()]" -t attr -n "version" -v "" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/tool[last()]" -t attr -n "path" -v "#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/common/efl-tool/efl-tools/bin/edje_cc" $PLUGIN_FILENAME -#xmlstarlet ed -L -s "/extension/rootstrap/tool[last()]" -t attr -n "path" -v "#{SBI_HOME}/../../platforms/tizen-7.0/common/efl-tool/efl-tools/bin/edje_cc" $PLUGIN_FILENAME - -if [ "$INTERNAL" = true ]; then -xmlstarlet ed -L -s "/extension/rootstrap" -t elem -n "property" -v "" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "key" -v "TYPE" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "value" -v "private" $PLUGIN_FILENAME - -xmlstarlet ed -L -s "/extension/rootstrap" -t elem -n "property" -v "" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "key" -v "DEFAULT" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "value" -v "false" $PLUGIN_FILENAME -fi - -} -########################################################################################### - -#script start -BUILD_OPT_INC_PATH="" -BUILD_OPT_LIB_PATH="" -BUILD_OPT_LIB_NAME="" -BUILD_OPT_CLI_RS_LIBRARIES="" - - -SCRIPT_NAME=$(basename ${0}) -SCRIPT_VER="0.0.1" -SCRIPT_PATH=$(dirname ${0}) - -INFO_FILE=$1; #OLD - -OPTS=`getopt -o -t:i:p:v:h --long type:,info:,profile:,version:,help,internal -- "$@"` -if [ $? != 0 ] ; then log "Failed parsing options." >&2 ; exit 1 ; fi - -log "$SCRIPT_NAME PARAMETER : $OPTS" -eval set -- "$OPTS" - -ROOTSTRAP_TYPE="" - -while true; do -case "$1" in --t | --type ) ROOTSTRAP_TYPE="$2"; shift;shift ;; --i | --info ) INFO_FILE="$2"; shift; shift ;; --p | --profile ) PLATFORM_PROFILE="$2"; shift; shift ;; --v | --version ) PLATFORM_VERSION="$2"; shift; shift ;; --h | --help ) exit; shift; shift ;; ---internal ) INTERNAL=true; shift ;; --- ) shift; break ;; -* ) #print_usage_exit -1; - break ;; -esac -done - -log "INFO_FILE = $INFO_FILE" -log "ROOTSTRAP_TYPE = $ROOTSTRAP_TYPE" -log "PLATFORM_PROFILE = $PLATFORM_PROFILE" -log "PLATFORM_VERSION = $PLATFORM_VERSION" - -if [ -z "$PLATFORM_PROFILE" ] || [ -z "$PLATFORM_VERSION" ] #to support old version -then - source "$SCRIPT_PATH/../.rs-config" -fi - -if [[ -z ${INFO_FILE} ]] || [[ ! -e ${INFO_FILE} ]] -then - print_usage_exit -fi - - -PWD_BACKUP=`pwd` - -INFO_DEST=${PWD_BACKUP}/".info" -PLUGIN_DEST=${PWD_BACKUP}/".plugin" - -log "################# Start Generate Rootstrap Plugin#################" - -#0. get build option from info file -get_build_option_from_infofile $INFO_FILE - -#generate rootstrap plugin -if [ ! -e ${PLUGIN_DEST} ] -then - mkdir ${PLUGIN_DEST}; -fi - - - -TEST="" -for i in $BUILD_OPT_CLI_RS_LIBRARIES -do - TEST+="$i "; -done; - -RS_LIB_OPT=`echo "$TEST" | sed 's/ $//g'`; - -#echo "BUILD_OPT_INC_PATH=$BUILD_OPT_INC_PATH" -#echo "BUILD_OPT_LIB_PATH=$BUILD_OPT_LIB_PATH" -#echo "BUILD_OPT_LIB_NAME=$BUILD_OPT_LIB_NAME" -#echo "RS_LIB_OPT=$RS_LIB_OPT" -log "${INFO_FILE}" - -if [[ "${INFO_FILE}" == *"emulator.core.dev.xml"* ]] || [[ "${INFO_FILE}" == *"emulator.core.private.dev.xml"* ]] -then - -#emulator -TYPE="emulator" -ARCH="i586" - -RS_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core" -DEV_PACKAGE_CONFIG_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/info/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core.dev.xml" -PLUGIN_FILENAME=${PLUGIN_DEST}/"$PLATFORM_PROFILE-$PLATFORM_VERSION-${TYPE}.core.xml" - - -#if [ "$INTERNAL" = true ]; then -#DEV_PACKAGE_CONFIG_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/info/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core.private.dev.xml" -#PLUGIN_FILENAME=${PLUGIN_DEST}/"$PLATFORM_PROFILE-$PLATFORM_VERSION-${TYPE}.core.private.xml" -#fi - -log "TYPE = $TYPE" -log "ARCH = $ARCH" -log "RS_PATH = $RS_PATH" -log "DEV_PACKAGE_CONFIG_PATH = $DEV_PACKAGE_CONFIG_PATH" -log "PLUGIN_FILENAME = $PLUGIN_FILENAME" - -if [ -e ${PLUGIN_FILENAME} ] -then - rm ${PLUGIN_FILENAME}; -fi - -generate_plugin -fi - -if [[ "{$INFO_FILE}" == *"device.core.dev.xml"* ]] || [[ "$INFO_FILE" == *"device.core.private.dev.xml"* ]] -then - -#device -TYPE="device" -ARCH="armel" - -RS_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core" -DEV_PACKAGE_CONFIG_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/info/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core.dev.xml" -PLUGIN_FILENAME=${PLUGIN_DEST}/"$PLATFORM_PROFILE-$PLATFORM_VERSION-${TYPE}.core.xml" - - -#if [ "$INTERNAL" = true ]; then -#DEV_PACKAGE_CONFIG_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/info/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core.private.dev.xml" -#PLUGIN_FILENAME=${PLUGIN_DEST}/"$PLATFORM_PROFILE-$PLATFORM_VERSION-${TYPE}.core.private.xml" -#fi - -log "TYPE = $TYPE" -log "ARCH = $ARCH" -log "RS_PATH = $RS_PATH" -log "DEV_PACKAGE_CONFIG_PATH = $DEV_PACKAGE_CONFIG_PATH" -log "PLUGIN_FILENAME = $PLUGIN_FILENAME" - -if [ -e ${PLUGIN_FILENAME} ] -then - rm ${PLUGIN_FILENAME}; -fi - -generate_plugin - -else -log "No File : $INFO_FILE" -fi - -#log "######################## END [$SECONDS] Sec ##############################" 1>&2 - -exit 0 diff --git a/script/rootstrap_plugin_gen_1.0_64.sh b/script/rootstrap_plugin_gen_1.0_64.sh deleted file mode 100755 index 9270e4d..0000000 --- a/script/rootstrap_plugin_gen_1.0_64.sh +++ /dev/null @@ -1,311 +0,0 @@ -#!/bin/bash -# Version 1.0.1 -function log() -{ - printf "[${SCRIPT_NAME}:${BASH_LINENO[0]}] ${@}\n" -} - -function print_usage_exit() -{ -echo "$SCRIPT_NAME is rootstrap generator using xml" -echo "Usage: $SCRIPT_NAME [<OPTION>]..." -echo "" -echo " -t,--type rootstrap type emulator, target." -echo " -i,--info IDE rootstrap info file to get Build Option" -echo " -p,--profile tizen" -echo " -v,--version 9.0" -echo "" -echo "Example 1" -echo ">$SCRIPT_NAME -t \"emulator\" -i \".info\/mobile-2.3-emulator.core.dev.xml\" -p \"mobile\" -v \"2.3\"" -echo "" - -exit $1 -} -function get_build_option() -{ - BUILD_OPT_INC_PATH+=$(xmlstarlet sel -t -m "/rootstrap" -m "include_path" -v "text()" -o "" -n ${1})$'\n'; - BUILD_OPT_LIB_PATH+=$(xmlstarlet sel -t -m "/rootstrap" -m "library_path" -v "text()" -o "" -n ${1})$'\n'; - BUILD_OPT_LIB_NAME+=$(xmlstarlet sel -t -m "/rootstrap" -m "library" -v "text()" -o "" -n ${1})$'\n'$'\n'; - BUILD_OPT_CLI_RS_LIBRARIES+=$(xmlstarlet sel -t -m "/rootstrap" -m "library" -v "text()" -o "" -n ${1})$'\n'$'\n'; -} - -function get_build_option_from_infofile() -{ - BUILD_OPT_INC_PATH+=$(xmlstarlet sel -t -m "/PackageInfo/DevPackage" -m "include_path" -v "text()" -o "" -n ${1})$'\n'; - BUILD_OPT_LIB_PATH+=$(xmlstarlet sel -t -m "/PackageInfo/DevPackage" -m "library_path" -v "text()" -o "" -n ${1})$'\n'; - BUILD_OPT_LIB_NAME+=$(xmlstarlet sel -t -m "/PackageInfo/DevPackage" -m "library" -v "text()" -o "" -n ${1})$'\n'$'\n'; - BUILD_OPT_CLI_RS_LIBRARIES+=$(xmlstarlet sel -t -m "/PackageInfo/DevPackage" -m "library" -v "text()" -o "" -n ${1})$'\n'$'\n'; - - BUILD_OPT_INC_PATH=`echo "$BUILD_OPT_INC_PATH" | sort -d -u`; - BUILD_OPT_LIB_PATH=`echo "$BUILD_OPT_LIB_PATH" | sort -d -u`; - BUILD_OPT_LIB_NAME=`echo "$BUILD_OPT_LIB_NAME" | sort -d -u`; - BUILD_OPT_CLI_RS_LIBRARIES=`echo "$BUILD_OPT_CLI_RS_LIBRARIES" | sort -d -u | sed 's/^lib/-l/g' | sed 's/.so$/ /g'`; -} - -function generate_plugin() -{ -log "# $FUNCNAME------" -( -echo '<extension point="rootstrapDefinition"> -</extension>'| tee $PLUGIN_FILENAME >/dev/null 2>&1 -) - -xmlstarlet ed -L -s "/extension" -t elem -n "rootstrap" -v "" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap" -t attr -n "id" -v "$PLATFORM_PROFILE-$PLATFORM_VERSION-${TYPE}.core" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap" -t attr -n "name" -v "Tizen ${TYPE[*]^} $PLATFORM_VERSION" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap" -t attr -n "version" -v "${PLATFORM_PROFILE[*]^} $PLATFORM_VERSION" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap" -t attr -n "architecture" -v "$ARCH" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap" -t attr -n "path" -v "$RS_PATH" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap" -t attr -n "supportToolchainType" -v "tizen.core" $PLUGIN_FILENAME - -xmlstarlet ed -L -s "/extension/rootstrap" -t elem -n "property" -v "" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "key" -v "DEV_PACKAGE_CONFIG_PATH" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "value" -v "$DEV_PACKAGE_CONFIG_PATH" $PLUGIN_FILENAME - -xmlstarlet ed -L -s "/extension/rootstrap" -t elem -n "property" -v "" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "key" -v "LINKER_MISCELLANEOUS_OPTION" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "value" -v "" $PLUGIN_FILENAME - -xmlstarlet ed -L -s "/extension/rootstrap" -t elem -n "property" -v "" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "key" -v "COMPILER_MISCELLANEOUS_OPTION" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "value" -v "" $PLUGIN_FILENAME - -# OLD tool options -#xmlstarlet ed -L -s "/extension/rootstrap" -t elem -n "property" -v "" $PLUGIN_FILENAME -#xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "key" -v "RS_LIBRARIES" $PLUGIN_FILENAME -#xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "value" -v "$RS_LIB_OPT" $PLUGIN_FILENAME - -#xmlstarlet ed -L -s "/extension/rootstrap" -t elem -n "property" -v "" $PLUGIN_FILENAME -#xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "key" -v "EDJE_CC" $PLUGIN_FILENAME -#xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "value" -v "#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/common/efl-tool/efl-tools/bin/edje_cc" $PLUGIN_FILENAME -# end OLD tool option - should be deprecated -GCC_VERSION="9.2" -LLVM_VERSION="10.0" - -if [[ "${PLATFORM_VERSION}" = "2.3"* ]] -then - GCC_VERSION="4.6" - LLVM_VERSION="3.4" -fi -if [[ "${PLATFORM_VERSION}" = "4.0"* ]] -then - GCC_VERSION="6.2" - LLVM_VERSION="4.0" -fi - -if [[ "${PLATFORM_VERSION}" = "5.0"* ]] -then - GCC_VERSION="6.2" - LLVM_VERSION="4.0" -fi - -if [[ "${PLATFORM_VERSION}" = "5.5"* ]] -then - GCC_VERSION="6.2" - LLVM_VERSION="4.0" -fi - -if [[ "${PLATFORM_VERSION}" = "6.0"* ]] -then - GCC_VERSION="9.2" - LLVM_VERSION="10.0" -fi - - -if [[ "${PLATFORM_VERSION}" = "6.5"* ]] -then - GCC_VERSION="9.2" - LLVM_VERSION="10.0" -fi - -if [[ "${PLATFORM_VERSION}" = "7.0"* ]] -then - GCC_VERSION="9.2" - LLVM_VERSION="10.0" -fi - -if [[ "${PLATFORM_VERSION}" = "7.5"* ]] -then - GCC_VERSION="9.2" - LLVM_VERSION="10.0" -fi - -# Deprecated LLVM version -#xmlstarlet ed -L -s "/extension/rootstrap" -t elem -n "toolchain" -v "" $PLUGIN_FILENAME -#xmlstarlet ed -L -s "/extension/rootstrap/toolchain[last()]" -t attr -n "name" -v "llvm" $PLUGIN_FILENAME -#xmlstarlet ed -L -s "/extension/rootstrap/toolchain[last()]" -t attr -n "version" -v "${LLVM_VERSION}" $PLUGIN_FILENAME - -xmlstarlet ed -L -s "/extension/rootstrap" -t elem -n "toolchain" -v "" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/toolchain[last()]" -t attr -n "name" -v "gcc" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/toolchain[last()]" -t attr -n "version" -v "${GCC_VERSION}" $PLUGIN_FILENAME - -xmlstarlet ed -L -s "/extension/rootstrap" -t elem -n "tool" -v "" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/tool[last()]" -t attr -n "name" -v "EDJE_CC" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/tool[last()]" -t attr -n "version" -v "" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/tool[last()]" -t attr -n "path" -v "#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/common/efl-tool/efl-tools/bin/edje_cc" $PLUGIN_FILENAME -#xmlstarlet ed -L -s "/extension/rootstrap/tool[last()]" -t attr -n "path" -v "#{SBI_HOME}/../../platforms/tizen-7.0/common/efl-tool/efl-tools/bin/edje_cc" $PLUGIN_FILENAME - -if [ "$INTERNAL" = true ]; then -xmlstarlet ed -L -s "/extension/rootstrap" -t elem -n "property" -v "" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "key" -v "TYPE" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "value" -v "private" $PLUGIN_FILENAME - -xmlstarlet ed -L -s "/extension/rootstrap" -t elem -n "property" -v "" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "key" -v "DEFAULT" $PLUGIN_FILENAME -xmlstarlet ed -L -s "/extension/rootstrap/property[last()]" -t attr -n "value" -v "false" $PLUGIN_FILENAME -fi - -} -########################################################################################### - -#script start -BUILD_OPT_INC_PATH="" -BUILD_OPT_LIB_PATH="" -BUILD_OPT_LIB_NAME="" -BUILD_OPT_CLI_RS_LIBRARIES="" - - -SCRIPT_NAME=$(basename ${0}) -SCRIPT_VER="0.0.1" -SCRIPT_PATH=$(dirname ${0}) - -INFO_FILE=$1; #OLD - -OPTS=`getopt -o -t:i:p:v:h --long type:,info:,profile:,version:,help,internal -- "$@"` -if [ $? != 0 ] ; then log "Failed parsing options." >&2 ; exit 1 ; fi - -log "$SCRIPT_NAME PARAMETER : $OPTS" -eval set -- "$OPTS" - -ROOTSTRAP_TYPE="" - -while true; do -case "$1" in --t | --type ) ROOTSTRAP_TYPE="$2"; shift;shift ;; --i | --info ) INFO_FILE="$2"; shift; shift ;; --p | --profile ) PLATFORM_PROFILE="$2"; shift; shift ;; --v | --version ) PLATFORM_VERSION="$2"; shift; shift ;; --h | --help ) exit; shift; shift ;; ---internal ) INTERNAL=true; shift ;; --- ) shift; break ;; -* ) #print_usage_exit -1; - break ;; -esac -done - -log "INFO_FILE = $INFO_FILE" -log "ROOTSTRAP_TYPE = $ROOTSTRAP_TYPE" -log "PLATFORM_PROFILE = $PLATFORM_PROFILE" -log "PLATFORM_VERSION = $PLATFORM_VERSION" - -if [ -z "$PLATFORM_PROFILE" ] || [ -z "$PLATFORM_VERSION" ] #to support old version -then - source "$SCRIPT_PATH/../.rs-config" -fi - -if [[ -z ${INFO_FILE} ]] || [[ ! -e ${INFO_FILE} ]] -then - print_usage_exit -fi - - -PWD_BACKUP=`pwd` - -INFO_DEST=${PWD_BACKUP}/".info" -PLUGIN_DEST=${PWD_BACKUP}/".plugin" - -log "################# Start Generate Rootstrap Plugin#################" - -#0. get build option from info file -get_build_option_from_infofile $INFO_FILE - -#generate rootstrap plugin -if [ ! -e ${PLUGIN_DEST} ] -then - mkdir ${PLUGIN_DEST}; -fi - - - -TEST="" -for i in $BUILD_OPT_CLI_RS_LIBRARIES -do - TEST+="$i "; -done; - -RS_LIB_OPT=`echo "$TEST" | sed 's/ $//g'`; - -#echo "BUILD_OPT_INC_PATH=$BUILD_OPT_INC_PATH" -#echo "BUILD_OPT_LIB_PATH=$BUILD_OPT_LIB_PATH" -#echo "BUILD_OPT_LIB_NAME=$BUILD_OPT_LIB_NAME" -#echo "RS_LIB_OPT=$RS_LIB_OPT" -log "${INFO_FILE}" - -if [[ "${INFO_FILE}" == *"emulator64.core.dev.xml"* ]] || [[ "${INFO_FILE}" == *"emulator64.core.private.dev.xml"* ]] -then - -#emulator -TYPE="emulator64" -ARCH="x86_64" - -RS_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core" -DEV_PACKAGE_CONFIG_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/info/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core.dev.xml" -PLUGIN_FILENAME=${PLUGIN_DEST}/"$PLATFORM_PROFILE-$PLATFORM_VERSION-${TYPE}.core.xml" - - -#if [ "$INTERNAL" = true ]; then -#DEV_PACKAGE_CONFIG_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/info/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core.private.dev.xml" -#PLUGIN_FILENAME=${PLUGIN_DEST}/"$PLATFORM_PROFILE-$PLATFORM_VERSION-${TYPE}.core.private.xml" -#fi - -log "TYPE = $TYPE" -log "ARCH = $ARCH" -log "RS_PATH = $RS_PATH" -log "DEV_PACKAGE_CONFIG_PATH = $DEV_PACKAGE_CONFIG_PATH" -log "PLUGIN_FILENAME = $PLUGIN_FILENAME" - -if [ -e ${PLUGIN_FILENAME} ] -then - rm ${PLUGIN_FILENAME}; -fi - -generate_plugin -fi - -if [[ "{$INFO_FILE}" == *"device64.core.dev.xml"* ]] || [[ "$INFO_FILE" == *"device64.core.private.dev.xml"* ]] -then - -#device -TYPE="device64" -ARCH="aarch64" - -RS_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core" -DEV_PACKAGE_CONFIG_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/info/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core.dev.xml" -PLUGIN_FILENAME=${PLUGIN_DEST}/"$PLATFORM_PROFILE-$PLATFORM_VERSION-${TYPE}.core.xml" - - -#if [ "$INTERNAL" = true ]; then -#DEV_PACKAGE_CONFIG_PATH="#{SBI_HOME}/../../platforms/tizen-${PLATFORM_VERSION}/${PLATFORM_PROFILE}/rootstraps/info/${PLATFORM_PROFILE}-${PLATFORM_VERSION}-${TYPE}.core.private.dev.xml" -#PLUGIN_FILENAME=${PLUGIN_DEST}/"$PLATFORM_PROFILE-$PLATFORM_VERSION-${TYPE}.core.private.xml" -#fi - -log "TYPE = $TYPE" -log "ARCH = $ARCH" -log "RS_PATH = $RS_PATH" -log "DEV_PACKAGE_CONFIG_PATH = $DEV_PACKAGE_CONFIG_PATH" -log "PLUGIN_FILENAME = $PLUGIN_FILENAME" - -if [ -e ${PLUGIN_FILENAME} ] -then - rm ${PLUGIN_FILENAME}; -fi - -generate_plugin - -else -log "No File : $INFO_FILE" -fi - -#log "######################## END [$SECONDS] Sec ##############################" 1>&2 - -exit 0 |