From: SangYoun Kwak Date: Mon, 24 Feb 2025 11:00:31 +0000 (+0900) Subject: Change build script to build in one directory rather than common/headed X-Git-Tag: accepted/tizen/9.0/unified/20250314.155124^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c628eab80fbcc9f7c536ff598cb54e55e5275d1;p=platform%2Fhal%2Fbackend%2Frootstrap.git Change build script to build in one directory rather than common/headed hal-rootstrap package was separated as common and headed, since there were packages which require Among the hal-backend packages built using hal-rootstrap, there were some packages that linked unused libraries. To prevent this, hal-rootstrap was divided into two common/headed packages. This phenomenon was due to libtool and it is fixed, there is no reason to keep two common/headed hal-rootstrap packages. Change-Id: I8c657ec2ecf3b10d20fe20c6334cbf90979e83c0 Signed-off-by: SangYoun Kwak --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ec8d1f..db44fc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,6 @@ PROJECT(hal-rootstrap) SET(HAL_ROOTSTRAP "${PROJECT_NAME}") -SET(HAL_ROOTSTRAP_HEADED "${PROJECT_NAME}-headed") SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(EXEC_PREFIX "${PREFIX}/bin") @@ -14,10 +13,4 @@ CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/packaging/${HAL_ROOTSTRAP}.pc.in INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/packaging/${HAL_ROOTSTRAP}.pc DESTINATION ${LIBDIR}/pkgconfig) -CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/packaging/${HAL_ROOTSTRAP_HEADED}.pc.in - ${CMAKE_CURRENT_SOURCE_DIR}/packaging/${HAL_ROOTSTRAP_HEADED}.pc - @ONLY) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/packaging/${HAL_ROOTSTRAP_HEADED}.pc - DESTINATION ${LIBDIR}/pkgconfig) - ADD_SUBDIRECTORY(script) diff --git a/generate_rootstrap.sh b/generate_rootstrap.sh index 751dad9..1e7911e 100755 --- a/generate_rootstrap.sh +++ b/generate_rootstrap.sh @@ -105,10 +105,8 @@ function generate_rootstrap_riscv64 { function generate_rootstrap { local arch=$1 - local rootstrap_type=$2 - local include_internal=$3 + local include_internal=$2 local include_internal_option='' - local rootstrap_resource_dir="./rs_resource" if [[ ${include_internal} == 1 ]]; then include_internal_option="--include-internal" @@ -116,8 +114,8 @@ function generate_rootstrap { include_internal_option="" fi - rm -rf "${rootstrap_resource_dir}" - cp -r "/tmp/rs_resource/${ROOTSTRAP_TYPE}" "${rootstrap_resource_dir}" + rm -rf "./rs_resource" + cp -r "/tmp/rs_resource" "." case "${arch}" in "arm") @@ -148,15 +146,14 @@ function generate_rootstrap { } ARCH=$1 -ROOTSTRAP_TYPE=$2 -COPY_DEST=$3 -INCLUDE_INTERNAL=$4 +COPY_DEST=$2 +INCLUDE_INTERNAL=$3 -if [[ -z "${ARCH}" ]] || [[ -z "${ROOTSTRAP_TYPE}" ]] || [[ -z "${COPY_DEST}" ]] || [[ -z "${INCLUDE_INTERNAL}" ]]; then - echo "3 parameters are required: " +if [[ -z "${ARCH}" ]] || [[ -z "${COPY_DEST}" ]] || [[ -z "${INCLUDE_INTERNAL}" ]]; then + echo "3 parameters are required: " echo ": 0(do not include internal), 1(include internal)" exit 1 fi prepare_generation "${COPY_DEST}" -generate_rootstrap "${ARCH}" "${ROOTSTRAP_TYPE}" "${INCLUDE_INTERNAL}" +generate_rootstrap "${ARCH}" "${INCLUDE_INTERNAL}" diff --git a/packaging/hal-rootstrap-headed.pc.in b/packaging/hal-rootstrap-headed.pc.in deleted file mode 100644 index 6dfcc06..0000000 --- a/packaging/hal-rootstrap-headed.pc.in +++ /dev/null @@ -1,19 +0,0 @@ -# Package Information for pkg-config - -package_name=hal-rootstrap -prefix=/opt/data/hal-rootstrap@PREFIX@ -exec_prefix=/opt/data/hal-rootstrap@EXEC_PREFIX@ -hal_rootstrap_dir_symbol=hal_rootstrap_dir -hal_rootstrap_dir=/opt/data/hal-rootstrap/headed -hal_rootstrap_libdir=${hal_rootstrap_dir}@LIBDIR@ -hal_rootstrap_include_dir=${hal_rootstrap_dir}@INCLUDEDIR@ - -Name: ${package_name} -Description: ${package_name} interface -Version: @VERSION@ - -Requires: - -Libs: -L${hal_rootstrap_dir} -Cflags: -I${hal_rootstrap_dir} -CXXflags: -I${hal_rootstrap_dir} diff --git a/packaging/hal-rootstrap.pc.in b/packaging/hal-rootstrap.pc.in index b6f06a1..f07a215 100644 --- a/packaging/hal-rootstrap.pc.in +++ b/packaging/hal-rootstrap.pc.in @@ -4,7 +4,7 @@ package_name=hal-rootstrap prefix=/opt/data/hal-rootstrap@PREFIX@ exec_prefix=/opt/data/hal-rootstrap@EXEC_PREFIX@ hal_rootstrap_dir_symbol=hal_rootstrap_dir -hal_rootstrap_dir=/opt/data/hal-rootstrap/common +hal_rootstrap_dir=/opt/data/hal-rootstrap hal_rootstrap_libdir=${hal_rootstrap_dir}@LIBDIR@ hal_rootstrap_include_dir=${hal_rootstrap_dir}@INCLUDEDIR@ diff --git a/packaging/hal-rootstrap.spec b/packaging/hal-rootstrap.spec index 1ce8740..dd0d79f 100644 --- a/packaging/hal-rootstrap.spec +++ b/packaging/hal-rootstrap.spec @@ -1,10 +1,6 @@ %define name hal-rootstrap %define devel_name hal-rootstrap-devel -%define hal_rootstrap_install_path /opt/data/hal-rootstrap/common - -%define headed_name hal-rootstrap-headed -%define headed_devel_name hal-rootstrap-headed-devel -%define hal_rootstrap_headed_install_path /opt/data/hal-rootstrap/headed +%define hal_rootstrap_install_path /opt/data/hal-rootstrap %if "%{_with_da_profile}" == "1" %define WITH_DA 1 @@ -58,23 +54,6 @@ Requires: %{name} = %{version}-%{release} %description -n %{devel_name} %{name} Interface for product vendor developer -### hal-rootstrap-headed -%package -n %{headed_name} -Summary: Package for rootstrap of hal, for headed image -AutoReqProv: no - -%description -n %{headed_name} -Package for rootstrap of hal, for headed image - -### hal-rootstrap-headed-devel -%package -n %{headed_devel_name} -Summary: %{headed_name} interface -Group: Development/Libraries -Requires: %{headed_name} = %{version}-%{release} - -%description -n %{headed_devel_name} -${headed_name} Interface for product vendor developer - %prep %setup -q %cmake . -DCMAKE_LIBDIR_PREFIX=%{_libdir} @@ -88,17 +67,11 @@ mkdir %{buildroot} mkdir -p %{buildroot}%{_libdir}/pkgconfig/ # hal-rootstrap -./generate_rootstrap.sh "%{_arch}" "common" "%{buildroot}%{hal_rootstrap_install_path}" "%{INCLUDE_INTERNAL}" +./generate_rootstrap.sh "%{_arch}" "%{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}" "%{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" - %files %{hal_rootstrap_install_path} %exclude %dir %{hal_rootstrap_install_path}/%{_includedir} @@ -107,12 +80,3 @@ rm -f "%{buildroot}%{hal_rootstrap_headed_install_path}/%{_libdir}/pkgconfig/*.p %defattr(-,root,root,-) %{hal_rootstrap_install_path}/%{_includedir} %{_libdir}/pkgconfig/hal-rootstrap.pc - -%files -n %{headed_name} -%{hal_rootstrap_headed_install_path} -%exclude %dir %{hal_rootstrap_headed_install_path}/%{_includedir} - -%files -n %{headed_devel_name} -%defattr(-,root,root,-) -%{hal_rootstrap_headed_install_path}/%{_includedir} -%{_libdir}/pkgconfig/hal-rootstrap-headed.pc