From: SangYoun Kwak Date: Fri, 29 Nov 2024 07:45:19 +0000 (+0900) Subject: Modify generate_rootstrap to use other hal-rootstrap-data-* packages X-Git-Tag: accepted/tizen/unified/20241202.132942~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F08%2F315408%2F1;p=platform%2Fhal%2Fbackend%2Frootstrap.git Modify generate_rootstrap to use other hal-rootstrap-data-* packages hal-rootstrap generates two rootstrap packages: hal-rootstrap, hal-rootstrap-headed. For this separated generation, rootstrap resources(.xml files) are separated as "common" and "headed" so "hal-rootstrap" package uses "common" while "hal-rootstrap-headed" package uses "headed" exclusively. Because of this separation, even hal-rootstrap-data-* is included, it is not used. To resolve this, the "hal-rootstrap" package will use all rootstrap resources except "headed" while the "hal-rootstrap-headed" package uses only "headed" for its build. Change-Id: I0724edcfb6d5669f797b30e637556c5f4c70333b Signed-off-by: SangYoun Kwak --- diff --git a/generate_rootstrap.sh b/generate_rootstrap.sh index 751dad9..3550a41 100755 --- a/generate_rootstrap.sh +++ b/generate_rootstrap.sh @@ -103,6 +103,24 @@ function generate_rootstrap_riscv64 { return ${RET} } +function prepare_rootstrap_resource { + local rootstrap_type=$1 + local rootstrap_resource_dir=$2 + + rm -rf "${rootstrap_resource_dir}" + case ${rootstrap_type} in + "headed") + cp -r "/tmp/rs_resource/${rootstrap_type}" "${rootstrap_resource_dir}" + ;; + *) + find "/tmp/rs_resource" \ + -maxdepth 1 -mindepth 1 \ + ! -wholename '*/headed' \ + -exec cp -r {} ${rootstrap_resource_dir} \; + ;; + esac +} + function generate_rootstrap { local arch=$1 local rootstrap_type=$2 @@ -116,8 +134,7 @@ function generate_rootstrap { include_internal_option="" fi - rm -rf "${rootstrap_resource_dir}" - cp -r "/tmp/rs_resource/${ROOTSTRAP_TYPE}" "${rootstrap_resource_dir}" + prepare_rootstrap_resource "${rootstrap_type}" "${rootstrap_resource_dir}" case "${arch}" in "arm")