}
function generate_rootstrap_ix86 {
- local build_profile=$1
+ local include_internal_option=$1
./script/convert32.sh
if [[ $? -ne 0 ]]; then
return $?
fi
- ./make_rootstrap.sh -C rs-config ./rs_resource --emulator -A i686 -p "${build_profile}"
+ ./make_rootstrap.sh -C rs-config ./rs_resource --emulator -A i686 ${include_internal_option}
RET=$?
if [[ ${RET} -ne 0 ]]; then
echo "Failed to create rootstrap."
}
function generate_rootstrap_x86_64 {
- local build_profile=$1
+ local include_internal_option=$1
./script/convert64.sh
if [[ $? -ne 0 ]]; then
return $?
fi
- ./make_rootstrap_64.sh -C rs-config ./rs_resource --emulator -A x86_64 -p "${build_profile}"
+ ./make_rootstrap_64.sh -C rs-config ./rs_resource --emulator -A x86_64 ${include_internal_option}
RET=$?
if [[ ${RET} -ne 0 ]]; then
echo "Failed to create rootstrap."
}
function generate_rootstrap_arm {
- local build_profile=$1
+ local include_internal_option=$1
./script/convert32.sh
if [[ $? -ne 0 ]]; then
return $?
fi
- ./make_rootstrap.sh -C rs-config ./rs_resource --target -A arm -p "${build_profile}"
+ ./make_rootstrap.sh -C rs-config ./rs_resource --target -A arm ${include_internal_option}
RET=$?
if [[ ${RET} -ne 0 ]]; then
echo "Failed to create rootstrap."
}
function generate_rootstrap_aarch64 {
- local build_profile=$1
+ local include_internal_option=$1
./script/convert64.sh
if [[ $? -ne 0 ]]; then
return $?
fi
- ./make_rootstrap_64.sh -C rs-config ./rs_resource --target -A aarch64 -p "${build_profile}"
+ ./make_rootstrap_64.sh -C rs-config ./rs_resource --target -A aarch64 ${include_internal_option}
RET=$?
if [[ ${RET} -ne 0 ]]; then
echo "Failed to create rootstrap."
}
function generate_rootstrap_riscv64 {
- local build_profile=$1
+ local include_internal_option=$1
./script/convert64.sh
if [[ $? -ne 0 ]]; then
return $?
fi
- ./make_rootstrap_64.sh -C rs-config ./rs_resource --target -A riscv64 -p "${build_profile}"
+ ./make_rootstrap_64.sh -C rs-config ./rs_resource --target -A riscv64 ${include_internal_option}
RET=$?
if [[ ${RET} -ne 0 ]]; then
echo "Failed to create rootstrap."
function generate_rootstrap {
local arch=$1
local rootstrap_type=$2
- local build_profile=$3
+ local include_internal=$3
+ local include_internal_option=''
local rootstrap_resource_dir="./rs_resource"
+ if [[ ${include_internal} == 1 ]]; then
+ include_internal_option="--include-internal"
+ else
+ include_internal_option=""
+ fi
+
rm -rf "${rootstrap_resource_dir}"
cp -r "/tmp/rs_resource/${ROOTSTRAP_TYPE}" "${rootstrap_resource_dir}"
case "${arch}" in
"arm")
- generate_rootstrap_arm "${build_profile}"
+ generate_rootstrap_arm "${include_internal_option}"
return $?
;;
"aarch64")
- generate_rootstrap_aarch64 "${build_profile}"
+ generate_rootstrap_aarch64 "${include_internal_option}"
return $?
;;
"i386")
- generate_rootstrap_ix86 "${build_profile}"
+ generate_rootstrap_ix86 "${include_internal_option}"
return $?
;;
"x86_64")
- generate_rootstrap_x86_64 "${build_profile}"
+ generate_rootstrap_x86_64 "${include_internal_option}"
return $?
;;
"riscv64")
- generate_rootstrap_riscv64 "${build_profile}"
+ generate_rootstrap_riscv64 "${include_internal_option}"
return $?
;;
*)
ARCH=$1
ROOTSTRAP_TYPE=$2
COPY_DEST=$3
-BUILD_PROFILE=$4
+INCLUDE_INTERNAL=$4
-if [[ -z "${ARCH}" ]] || [[ -z "${ROOTSTRAP_TYPE}" ]] || [[ -z "${COPY_DEST}" ]] || [[ -z "${BUILD_PROFILE}" ]]; then
- echo "3 parameters are required: <architecture> <rootstrap type> <generate destination>"
+if [[ -z "${ARCH}" ]] || [[ -z "${ROOTSTRAP_TYPE}" ]] || [[ -z "${COPY_DEST}" ]] || [[ -z "${INCLUDE_INTERNAL}" ]]; then
+ echo "3 parameters are required: <architecture> <rootstrap type> <generate destination> <include internal>"
+ echo "<include internal>: 0(do not include internal), 1(include internal)"
exit 1
fi
prepare_generation "${COPY_DEST}"
-generate_rootstrap "${ARCH}" "${ROOTSTRAP_TYPE}" "${BUILD_PROFILE}"
+generate_rootstrap "${ARCH}" "${ROOTSTRAP_TYPE}" "${INCLUDE_INTERNAL}"
OPT_EMULATOR=false
OPT_CONF=""
OPT_ARCH=""
-INTERNAL=false
-OPT_PROFILE=""
+OPT_INCLUDE_INTERNAL=false
###############################################################################
# function usage
###############################################################################
## Get Parameter
###############################################################################
-OPTS=`getopt -o -A:C:tedchvp: --long target,emulator,downloadrpm,help,version,internal,profile -- "$@"`
+OPTS=`getopt -o -A:C:tedchvi --long target,emulator,downloadrpm,help,version,include-internal -- "$@"`
if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi
echo ""
-C | --conf )OPT_CONF=$2;shift;shift;;
-t | --target )OPT_TARGET=true;shift;;
-e | --emulator )OPT_EMULATOR=true;shift;;
- -p | --profile )OPT_PROFILE=$2;shift;shift;;
-h | --help )usage;exit 0;;
-v | --version )echo "${SCRIPT_NAME}" "version : $SCRIPT_VER"; exit 0 ;;
- --internal ) INTERNAL=true; shift;;
+ -i | --include-internal ) OPT_INCLUDE_INTERNAL=true; shift;;
-- ) shift; break ;;
*) #file or directory
if [ -d "${1}" ] || [ -f "${1}" ]; then
echo "OPT_TARGET = $OPT_TARGET"
echo "OPT_EMULATOR = $OPT_EMULATOR"
-if [ "$RS_INTERNAL" = true ] || [ "$INTERNAL" = true ]; then
- echo "OPT_INTERNAL=TRUE"
-fi
-
echo "xmlList=$xmlList"
printf "\n"
log "RPM_PKG_SVR_TARGET = ${RPM_PKG_SVR_TARGET}"
log ""
-if [ "$RS_INTERNAL" = true ] || [ "$INTERNAL" = true ]; then
- CMD_RS_GEN="$CMD_RS_GEN --internal"
-fi
-
###############################################################################
## Rootstrap Generation
###############################################################################
log "[INFO] Postscript ${GBS_BUILDROOT}";
- if [[ ${OPT_PROFILE} == "tv" ]]; then
+ if [[ ${OPT_INCLUDE_INTERNAL} == true ]]; then
log "[INFO] Keep dlog.h to include dlog-internal.h in dlog.h"
else
log "[INFO] Remove dlog-internal.h from dlog.h"
log "[INFO] Postscript ${GBS_BUILDROOT}";
- if [[ ${OPT_PROFILE} == "tv" ]]; then
+ if [[ ${OPT_INCLUDE_INTERNAL} == true ]]; then
log "[INFO] Keep dlog.h to include dlog-internal.h in dlog.h"
else
log "[INFO] Remove dlog-internal.h from dlog.h"
OPT_EMULATOR=false
OPT_CONF=""
OPT_ARCH=""
-INTERNAL=false
-OPT_PROFILE=""
+OPT_INCLUDE_INTERNAL=false
###############################################################################
# function usage
###############################################################################
## Get Parameter
###############################################################################
-OPTS=`getopt -o -A:C:tedchvp: --long target,emulator,downloadrpm,help,version,internal,profile -- "$@"`
+OPTS=`getopt -o -A:C:tedchvi --long target,emulator,downloadrpm,help,version,include-internal -- "$@"`
if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi
echo ""
-C | --conf )OPT_CONF=$2;shift;shift;;
-t | --target )OPT_TARGET=true;shift;;
-e | --emulator )OPT_EMULATOR=true;shift;;
- -p | --profile )OPT_PROFILE=$2;shift;shift;;
-h | --help )usage;exit 0;;
-v | --version )echo "${SCRIPT_NAME}" "version : $SCRIPT_VER"; exit 0 ;;
- --internal ) INTERNAL=true; shift;;
+ -i | --include-internal ) OPT_INCLUDE_INTERNAL=true; shift;;
-- ) shift; break ;;
*) #file or directory
if [ -d "${1}" ] || [ -f "${1}" ]; then
echo "OPT_TARGET = $OPT_TARGET"
echo "OPT_EMULATOR = $OPT_EMULATOR"
-if [ "$RS_INTERNAL" = true ] || [ "$INTERNAL" = true ]; then
- echo "OPT_INTERNAL=TRUE"
-fi
-
echo "xmlList=$xmlList"
printf "\n"
log "RPM_PKG_SVR_TARGET = ${RPM_PKG_SVR_TARGET}"
log ""
-if [ "$RS_INTERNAL" = true ] || [ "$INTERNAL" = true ]; then
- CMD_RS_GEN="$CMD_RS_GEN --internal"
-fi
-
###############################################################################
## Rootstrap Generation
###############################################################################
log "[INFO] Postscript ${GBS_BUILDROOT}";
- if [[ ${OPT_PROFILE} == "tv" ]]; then
+ if [[ ${OPT_INCLUDE_INTERNAL} == true ]]; then
log "[INFO] Keep dlog.h to include dlog-internal.h in dlog.h"
else
log "[INFO] Remove dlog-internal.h from dlog.h"
log "[INFO] Postscript ${GBS_BUILDROOT}";
- if [[ ${OPT_PROFILE} == "tv" ]]; then
+ if [[ ${OPT_INCLUDE_INTERNAL} == true ]]; then
log "[INFO] Keep dlog.h to include dlog-internal.h in dlog.h"
else
log "[INFO] Remove dlog-internal.h from dlog.h"
%define headed_devel_name hal-rootstrap-headed-devel
%define hal_rootstrap_headed_install_path /opt/data/hal-rootstrap/headed
+%if "%{_with_da_profile}" == "1"
+%define WITH_DA 1
+%else
+%define WITH_DA 0
+%endif
+
+%if "%{tizen_profile_name}" == "tv"
+%define WITH_VD 1
+%else
+%define WITH_VD 0
+%endif
+
%if "%{mv_prj}" == "1"
-%define build_profile "tv"
+%define WITH_VD_MV 1
+%else
+%define WITH_VD_MV 0
+%endif
+
+%if "%{WITH_VD}" == "1" || "%{WITH_VD_MV}" == "1"
+%define INCLUDE_INTERNAL 1
%else
-%define build_profile %{tizen_profile_name}
+%define INCLUDE_INTERNAL 0
%endif
Name: hal-rootstrap
mkdir -p %{buildroot}%{_libdir}/pkgconfig/
# hal-rootstrap
-./generate_rootstrap.sh "%{_arch}" "common" "%{buildroot}%{hal_rootstrap_install_path}" "%{build_profile}"
+./generate_rootstrap.sh "%{_arch}" "common" "%{buildroot}%{hal_rootstrap_install_path}" "%{INCLUDE_INTERNAL}"
cp packaging/hal-rootstrap.pc %{buildroot}%{_libdir}/pkgconfig/
./modify_pc.py "%{buildroot}%{_libdir}/pkgconfig/hal-rootstrap.pc" "%{buildroot}%{hal_rootstrap_install_path}/%{_libdir}/pkgconfig"
rm -f "%{buildroot}%{hal_rootstrap_install_path}/%{_libdir}/pkgconfig/*.pc"
# hal-rootstrap-headed
-./generate_rootstrap.sh "%{_arch}" "headed" "%{buildroot}%{hal_rootstrap_headed_install_path}" "%{build_profile}"
+./generate_rootstrap.sh "%{_arch}" "headed" "%{buildroot}%{hal_rootstrap_headed_install_path}" "%{INCLUDE_INTERNAL}"
cp packaging/hal-rootstrap-headed.pc %{buildroot}%{_libdir}/pkgconfig/
./modify_pc.py "%{buildroot}%{_libdir}/pkgconfig/hal-rootstrap-headed.pc" "%{buildroot}%{hal_rootstrap_headed_install_path}/%{_libdir}/pkgconfig"
rm -f "%{buildroot}%{hal_rootstrap_headed_install_path}/%{_libdir}/pkgconfig/*.pc"
log "+ destination directory : ${dest_dir}"
log "+ xml source file : ${xml_file}"
- if [[ "${ALL}" == "*" ]] || [[ "${INTERNAL}" == true ]]; then
- log "ALL(*) and internal is not supported"
+ if [[ "${ALL}" == "*" ]]; then
+ log "ALL(*) is not supported"
return 1
else
log "+ copy necessary files .."
#script start
check_prerequisite
-OPTS=`getopt -o -A:t:u:b:l:hq:r: --long type:,url:,base:,list:,help,internal,log: -n 'rootstrap_gen_1.0' -- "$@"`
+OPTS=`getopt -o -A:t:u:b:l:hq:r: --long type:,url:,base:,list:,help,log: -n 'rootstrap_gen_1.0' -- "$@"`
if [ $? != 0 ] ; then log "Failed parsing options." >&2 ; exit 1 ; fi
log ""
RPM_PKG_URL=""
BASE_PKG_URL=""
XML_INPUT_LIST=""
-INTERNAL=false
BUILD_ARCH=""
while true; do
-b | --base ) BASE_PKG_URL="$2"; shift;shift ;;
-l | --list ) XML_INPUT_LIST="$2 "; shift; shift ;;
--log ) LOGFILE="$2"; shift; shift ;;
- --internal ) INTERNAL=true; shift;;
-h | --help ) print_usage_exit $ERROR_USAGE; shift; shift ;;
-- ) shift; break ;;
* )
log "+ destination directory : ${dest_dir}"
log "+ xml source file : ${xml_file}"
- if [[ "${ALL}" == "*" ]] || [[ "${INTERNAL}" == true ]]; then
- log "ALL(*) and internal is not supported"
+ if [[ "${ALL}" == "*" ]]; then
+ log "ALL(*) is not supported"
return 1
else
log "+ copy necessary files .."
#script start
check_prerequisite
-OPTS=`getopt -o -A:t:u:b:l:hq:r: --long type:,url:,base:,list:,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,log: -n 'rootstrap_gen_1.0_64' -- "$@"`
if [ $? != 0 ] ; then log "Failed parsing options." >&2 ; exit 1 ; fi
log ""
RPM_PKG_URL=""
BASE_PKG_URL=""
XML_INPUT_LIST=""
-INTERNAL=false
BUILD_ARCH=""
while true; do
-b | --base ) BASE_PKG_URL="$2"; shift;shift ;;
-l | --list ) XML_INPUT_LIST="$2 "; shift; shift ;;
--log ) LOGFILE="$2"; shift; shift ;;
- --internal ) INTERNAL=true; shift;;
-h | --help ) print_usage_exit $ERROR_USAGE; shift; shift ;;
-- ) shift; break ;;
* )