diff options
Diffstat (limited to 'meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI')
5 files changed, 306 insertions, 0 deletions
diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/agl_set_capability.sh b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/agl_set_capability.sh new file mode 100644 index 00000000..ac827d04 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/agl_set_capability.sh @@ -0,0 +1,82 @@ +#!/bin/bash +# +# @copyright Copyright (c) 2019 TOYOTA MOTOR CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +ROMFILESTOP=/ +CAP_LST=${ROMFILESTOP}/usr/target/agl_cap.lst +echo `cat ${CAP_LST}` +#----------------------------------------------------------------------- +# Capability + +df / --exclude-type=nfs > /dev/null +IS_EMMC_BOOT=$? + +#*********************from init_nfs_cap.sh************************** + +echo "init_nfs-cap.sh: Start" + +VERBOSE=y +SKIPWARN=n +#----------------------------------------------------------------------- +# Set Capability for NFS or Set DummyLink for ROM +#CAP_LST="/usr/debug/share/target/cap.lst" +CAP_LST="/usr/target/agl_cap.lst" + +if [ $IS_EMMC_BOOT -ne 0 ]; then +if [ -f "${CAP_LST}" ];then + echo "*** set capability for NFS environment ***" + CAPPATH=/tmp/ + cd / + for PREAD in `cat ${CAP_LST}` + do + IFS_ORG=${IFS} ; IFS='|' ; PARAM=(${PREAD}) ; IFS=${IFS_ORG} + CAP_NAME=${PARAM[0]} ; FMODE=${PARAM[1]} ; FUID_GID=${PARAM[2]} + FCAP=${PARAM[3]} ; FKEEPORGPATH=${PARAM[4]} + if [ ! -f "${CAP_NAME}" -a ! -f "${CAP_NAME}.org" ];then + if [ "${SKIPWARN}" = "n" ];then + echo "set capability: ${CAP_NAME}: No such file or directory" 1>&2 + fi + continue + fi + TCAP_NAME="/tmp/${CAP_NAME##*/}" + # Set Capability for NFS + if [ ! -L "${CAP_NAME}" ]; then + cp -a ${CAP_NAME} ${TCAP_NAME} + if [ "${FKEEPORGPATH}" = "y" ];then + mv ${CAP_NAME} ${CAP_NAME}.org + ln -fs ${TCAP_NAME} ${CAP_NAME} + fi + else + cp -a ${CAP_NAME}.org ${TCAP_NAME} + fi + if [ -n "${FUID_GID}" ];then + chown ${FUID_GID} ${TCAP_NAME} + fi + if [ -n "${FMODE}" ];then + chmod ${FMODE} ${TCAP_NAME} + fi + if [ -n "${FCAP}" ];then + setcap ${FCAP} ${TCAP_NAME} + #if [ "${VERBOSE}" = "y" ];then + # getcap ${TCAP_NAME} + #fi + fi + done + cd - > /dev/null +else + unset CAPPATH +fi +fi diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/launch_sm.sh b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/launch_sm.sh new file mode 100644 index 00000000..ed1e8d12 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/launch_sm.sh @@ -0,0 +1,26 @@ +#!/bin/bash -x +# +# @copyright Copyright (c) 2019 TOYOTA MOTOR CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# launch SS_SystemManager +export APPS_CONFIG_FILENAME=sm_launch.cfg +export SM_CONFIG_DATA_FILENAME=gpf_ss_sm_config_data.cfg +export XDG_RUNTIME_DIR=/run/user/0 +cd /usr/agl/bin/ +rm -rf /nv/romaccess +rm /dev/shm/lockfile + +/usr/agl/bin/SS_SystemManager & diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/set_capability.sh b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/set_capability.sh new file mode 100644 index 00000000..aa9b78de --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/set_capability.sh @@ -0,0 +1,82 @@ +#!/bin/bash +# +# @copyright Copyright (c) 2019 TOYOTA MOTOR CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +ROMFILESTOP=/ +CAP_LST=${ROMFILESTOP}/usr/target/cap.lst +echo `cat ${CAP_LST}` +#----------------------------------------------------------------------- +# Capability + +df / --exclude-type=nfs > /dev/null +IS_EMMC_BOOT=$? + +#*********************from init_nfs_cap.sh************************** + +echo "init_nfs-cap.sh: Start" + +VERBOSE=y +SKIPWARN=n +#----------------------------------------------------------------------- +# Set Capability for NFS or Set DummyLink for ROM +#CAP_LST="/usr/debug/share/target/cap.lst" +CAP_LST="/usr/target/cap.lst" + +if [ $IS_EMMC_BOOT -ne 0 ]; then +if [ -f "${CAP_LST}" ];then + echo "*** set capability for NFS environment ***" + CAPPATH=/tmp/ + cd / + for PREAD in `cat ${CAP_LST}` + do + IFS_ORG=${IFS} ; IFS='|' ; PARAM=(${PREAD}) ; IFS=${IFS_ORG} + CAP_NAME=${PARAM[0]} ; FMODE=${PARAM[1]} ; FUID_GID=${PARAM[2]} + FCAP=${PARAM[3]} ; FKEEPORGPATH=${PARAM[4]} + if [ ! -f "${CAP_NAME}" -a ! -f "${CAP_NAME}.org" ];then + if [ "${SKIPWARN}" = "n" ];then + echo "set capability: ${CAP_NAME}: No such file or directory" 1>&2 + fi + continue + fi + TCAP_NAME="/tmp/${CAP_NAME##*/}" + # Set Capability for NFS + if [ ! -L "${CAP_NAME}" ]; then + cp -a ${CAP_NAME} ${TCAP_NAME} + if [ "${FKEEPORGPATH}" = "y" ];then + mv ${CAP_NAME} ${CAP_NAME}.org + ln -fs ${TCAP_NAME} ${CAP_NAME} + fi + else + cp -a ${CAP_NAME}.org ${TCAP_NAME} + fi + if [ -n "${FUID_GID}" ];then + chown ${FUID_GID} ${TCAP_NAME} + fi + if [ -n "${FMODE}" ];then + chmod ${FMODE} ${TCAP_NAME} + fi + if [ -n "${FCAP}" ];then + setcap ${FCAP} ${TCAP_NAME} + if [ "${VERBOSE}" = "y" ];then + getcap ${TCAP_NAME} + fi + fi + done + cd - > /dev/null +else + unset CAPPATH +fi +fi diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/set_cgroup_rt_runtime_us.sh b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/set_cgroup_rt_runtime_us.sh new file mode 100644 index 00000000..41536f2c --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/set_cgroup_rt_runtime_us.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# +# @copyright Copyright (c) 2019 TOYOTA MOTOR CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +desired_rt_runtime_us=$1 +mygroup=${2:-$(awk -F: '$2 == "cpu,cpuacct" {print $3}' /proc/self/cgroup)} + +[[ $desired_rt_runtime_us -gt 0 ]] || exit +[[ $mygroup ]] || exit +[[ $mygroup = / ]] && exit + +echo "${0##*/}: setting cpu.rt_runtime_us for $mygroup" >&2 + +cgpath= +IFS=/ read -ra cgroups <<< "${mygroup:1}" +for cg in "${cgroups[@]}"; do + cgpath="${cgpath}/${cg}" + echo "${0##*/}: $desired_rt_runtime_us -> /sys/fs/cgroup/cpu,cpuacct${cgpath}" >&2 + echo "$desired_rt_runtime_us" > /sys/fs/cgroup/cpu,cpuacct${cgpath}/cpu.rt_runtime_us +done diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/setup_refhw.sh b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/setup_refhw.sh new file mode 100644 index 00000000..1f9501cb --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/setup_refhw.sh @@ -0,0 +1,83 @@ +#!/bin/bash +# +# @copyright Copyright (c) 2019 TOYOTA MOTOR CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#to expand msg_max +sysctl -w fs.mqueue.msg_max=512 + +# device detection +echo -n "TARGET_BOARD=" > /tmp/udev_device.env +cat /proc/device-tree/model | cut -d " " -f 2 >> /tmp/udev_device.env +echo >> /tmp/udev_device.env +echo "UID=$INIT_UID" >> /tmp/udev_device.env +echo "GID=$INIT_GID" >> /tmp/udev_device.env +echo "BRAND=$VEHICLEPARAMETERLIBRARY_BRAND" >> /tmp/udev_device.env +echo "AREA=$VEHICLEPARAMETERLIBRARY_AREA" >> /tmp/udev_device.env + +# Start: Workaround for release ############################################### +## Sprint 29 To make WebService can update contents. +#chown -R agl:agl /usr/agl/data/electronicom +## For btservice initial data. +#chown -R agl:agl /nv/backup/D_BK_CA_BT_MANAGEMENT +## Sprint 29 PFDRECThread +mkdir -p /ramd/log/frameworkunifiedlog/diag +#chmod 777 /ramd/log/frameworkunifiedlog/diag +touch /dev/mmcblk0p9 +chmod 660 /dev/mmcblk0p9 +## Sprint 29 communication +#chmod -R 777 /home/root/.app_can_d +# TODO:for bluetooth_service +#chmod 777 /usr/agl/share + +if ! `df / --exclude-type=nfs > /dev/null`; then +cp /sbin/insmod.kmod /tmp/insmod.kmod +ln -s -f /tmp/insmod.kmod /sbin/insmod +setcap cap_sys_module+ep /tmp/insmod.kmod +fi + +## Sprint 32 Positioning +#chmod 777 /dev/ttySC3 +#chmod -R 777 /home/root/.app_gps_cmd_d + +## Sprint 37 BUG17P-9 clock +ln -f -s /tmp/bs/clock/localtime /etc/localtime + +# END: Workaround for release ################################################# + +# permission setting +# wait for weston is properly launched +#until [ -e /run/user/0/wayland-0 ] +#do +# usleep 50000 +#done +#chmod 777 /run/user/0/wayland-0 + +mkdir /tmp/shm + +chmod 777 /tmp/shm +chmod 666 /dev/mqueue/IccSnd +#chmod 777 /dev/mqueue/* +#chmod 777 /dev/mqueue/NS_NPPService +#chmod 777 /run/user/0 + +rm -rf /nv/romaccess +rm /dev/shm/lockfile + + + + +export PATH=`echo -n ${PATH} | sed 's|/tmp:||'` + |