diff options
Diffstat (limited to 'agl-systemd')
-rwxr-xr-x | agl-systemd/99-agl.rules | 11 | ||||
-rwxr-xr-x | agl-systemd/LICENSE | 177 | ||||
-rwxr-xr-x | agl-systemd/agl-trigger.service | 18 | ||||
-rwxr-xr-x | agl-systemd/env.txt | 130 | ||||
-rwxr-xr-x | agl-systemd/launch_sm.service | 22 | ||||
-rwxr-xr-x | agl-systemd/options.conf | 2 | ||||
-rwxr-xr-x | agl-systemd/setup_refhw.service | 15 | ||||
-rwxr-xr-x | agl-systemd/systemd-udev-trigger.service | 22 | ||||
-rwxr-xr-x | agl-systemd/tool_9E_SI/agl_set_capability.sh | 82 | ||||
-rwxr-xr-x | agl-systemd/tool_9E_SI/launch_sm.sh | 26 | ||||
-rwxr-xr-x | agl-systemd/tool_9E_SI/set_capability.sh | 82 | ||||
-rwxr-xr-x | agl-systemd/tool_9E_SI/set_cgroup_rt_runtime_us.sh | 33 | ||||
-rwxr-xr-x | agl-systemd/tool_9E_SI/setup_refhw.sh | 83 | ||||
-rwxr-xr-x | agl-systemd/usr/target/agl_cap.lst | 34 | ||||
-rwxr-xr-x | agl-systemd/usr/target/cap.lst | 24 | ||||
-rwxr-xr-x | agl-systemd/usr/target/dir.lst | 0 | ||||
-rwxr-xr-x | agl-systemd/usr/target/mntfs.lst | 0 |
17 files changed, 761 insertions, 0 deletions
diff --git a/agl-systemd/99-agl.rules b/agl-systemd/99-agl.rules new file mode 100755 index 0000000..dd4e245 --- /dev/null +++ b/agl-systemd/99-agl.rules @@ -0,0 +1,11 @@ +#modify sound related device permissions + +SUBSYSTEM=="sound",MODE="0666" + +#modify dri related device permissions + +SUBSYSTEM=="drm",MODE="0777" + +#modify agl/evk related device permissions + +SUBSYSTEM=="evk",KERNEL=="agl/evk",MODE="0666" diff --git a/agl-systemd/LICENSE b/agl-systemd/LICENSE new file mode 100755 index 0000000..f433b1a --- /dev/null +++ b/agl-systemd/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/agl-systemd/agl-trigger.service b/agl-systemd/agl-trigger.service new file mode 100755 index 0000000..8cb752f --- /dev/null +++ b/agl-systemd/agl-trigger.service @@ -0,0 +1,18 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +#After=weston.service + +[Service] +Type=oneshot +#RemainAfterExit=yes +EnvironmentFile=/tool_9E_SI/env.txt +ExecStart=/tool_9E_SI/agl_set_capability.sh + +[Install] +WantedBy=multi-user.target diff --git a/agl-systemd/env.txt b/agl-systemd/env.txt new file mode 100755 index 0000000..48b83df --- /dev/null +++ b/agl-systemd/env.txt @@ -0,0 +1,130 @@ +VEHICLEPARAMETERLIBRARY_AREA="AREA1" +XDG_RUNTIME_DIR="/run/user/0" +AGL_NFS="y" +VEHICLEPARAMETERLIBRARY_BRAND="BRAND1" +LIBTHAI_DICTDIR="/usr/share/libthai" +TERM="xterm" +INIT_UID="1000" +INIT_GID="1000" +AGL_RWDATA_PATH="/nv" +LD_LIBRARY_PATH="/lib:/usr/lib:/usr/agl/lib:/usr/debug/lib" +ARB_OPT="FORCE_REBOOT" +PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/agl/bin:/usr/debug/bin:/usr/debug/sbin:/usr/debug/usr/bin:/usr/debug/usr/sbin" +PWD="/dev/mqueue" +OLDPWD="/dev/mqueue" +SHLVL="1" +ALSA_CONFIG_PATH="/usr/share/alsa/alsa.conf" +GPF_LOGFLAG="0x00000003" +GPF_LOGLEVEL_DEBUG="0x00000000" +_CWORD84__IPADDR="192.168.128.129" +AGL_ON_SHELL="y" +AGL_DEVDIAG_FLAG="ON" +_="/usr/bin/printenv" +UDEV_CONFIG_FILE="/etc/udev/udev.conf" +VP_VEHICLEPARAMETERLIBRARY_version="AAAAAAAAA0001" +VP_VEHICLEPARAMETERLIBRARY_maker_ID="00000-00000" +VP_VEHICLEPARAMETERLIBRARY_area="AREA1" +VP_VEHICLEPARAMETERLIBRARY_grade="GRADE1" +VP_VEHICLEPARAMETERLIBRARY_model_ID="XXXXXXXX-XXXX" +VP_VEHICLEPARAMETERLIBRARY_dest_c_code="" +VP_VEHICLEPARAMETERLIBRARY_DAB_tuner_num="0" +VP_VEHICLEPARAMETERLIBRARY_AMP_type="built_in_AMP" +VP_VEHICLEPARAMETERLIBRARY_DISPLAY="InternalDisplay" +VP_VEHICLEPARAMETERLIBRARY_DECK="CD_DECK" +VP_VEHICLEPARAMETERLIBRARY_default_mode="home" +VP_VEHICLEPARAMETERLIBRARY_VOICE_RECOGNITION_TUTORIAL="available" +VP_VEHICLEPARAMETERLIBRARY_SEARCH="unavailable" +VP_VEHICLEPARAMETERLIBRARY_CONTACT="unavailable" +VP_VEHICLEPARAMETERLIBRARY_JPTrafficInfo_show="unavailable" +VP_VEHICLEPARAMETERLIBRARY_INFOMATION_MANAGEMENT="available" +VP_VEHICLEPARAMETERLIBRARY_WIFI_STA_ENABLE="False" +VP_VEHICLEPARAMETERLIBRARY_WIFI_AP_ENABLE="True" +VP_VEHICLEPARAMETERLIBRARY_WIFI_DIRECT_ENABLE="False" +VP_VEHICLEPARAMETERLIBRARY_HAS_GPS="y" +VP_VEHICLEPARAMETERLIBRARY__CWORD6_="n" +VP_VEHICLEPARAMETERLIBRARY_PHASE="3" +VP_VEHICLEPARAMETERLIBRARY__CWORD6_="unavailable" +VP_VEHICLEPARAMETERLIBRARY_CONNECTION_SERVER="TRY" +VP__CWORD31__version="XXXXXXXXX0001" +VP__CWORD31__class_type_of_LAN="CAN_08_10PF" +VP__CWORD31__reverse="direct" +VP__CWORD31__PKB="direct" +VP__CWORD31__ADIM__CWORD62_="direct_ADIM" +VP__CWORD31__telematics_function="CAN_judge" +VP__CWORD31__opening_picture="_CWORD31_" +VP__CWORD31__theme_color="pure_white" +VP__CWORD31__AC_onscreen="available" +VP__CWORD31__AC_screen_operation="available" +VP__CWORD31__AC_screen_home="available" +VP__CWORD31__AC_switch_front_temp="available" +VP__CWORD31__AC_temp_disp_outside="available" +VP__CWORD31__AC_temp_disp_setting="available" +VP__CWORD31__AC_switch_concierge="available" +VP__CWORD31__AC_switch_S_flow="available" +VP__CWORD31___CWORD11_="available" +VP__CWORD31___CWORD11__home="available" +VP__CWORD31___CWORD11__drive_wheel="FF" +VP__CWORD31___CWORD11__drive_type="2WD" +VP__CWORD31___CWORD11__battery_position="rear_tire" +VP__CWORD31___CWORD11__battery_direction="lateral" +VP__CWORD31___CWORD11__motor_position="Ahead" +VP__CWORD31___CWORD9__trip="available" +VP__CWORD31___CWORD9__trip="available" +VP__CWORD31___CWORD9__home_trip="available" +VP__CWORD31___CWORD9__fuel="available" +VP__CWORD31___CWORD9__home_fuel="available" +VP__CWORD31__FC_eco_safety_point_service="unavailable" +VP__CWORD31__FC_scale_GAS="5" +VP__CWORD31__FC_scale_HV="5" +VP__CWORD31__FC_energy_mark="30wh" +VP__CWORD31___CWORD9__type="type1" +VP__CWORD31__FC_SIGNAL="unavailable" +VP__CWORD31__display_setting_screen="unavailable" +VP__CWORD31__VR_HVAC_control="unavailable" +VP__CWORD31__clock_type="unavailable" +VP__CWORD31__start_up_BGM="unavailable" +VP__CWORD31__start_up_BGM_type="OFF" +VP__CWORD31__DTV_antenna_FL="unavailable" +VP__CWORD31__DTV_antenna_FR="unavailable" +VP__CWORD31__DTV_antenna_RL="unavailable" +VP__CWORD31__DTV_antenna_RR="unavailable" +VP__CWORD31__DTV_ANTENNA="unavailable" +VP__CWORD31__HF_voice_quality_type="0000" +VP__CWORD31__tune_knob_push="available" +VP__CWORD31__screen_switch_seek="unavailable" +VP__CWORD31__DAB_antenna="unavailable" +VP__CWORD31__hard_switch_beep="no_beep" +VP__CWORD31__screen_switch_beep="beep" +VP__CWORD31__steering_switch_type="2line_crosswise" +VP__CWORD31__steering_switch_tel="1buttom" +VP__CWORD31__class_circuit_mode="unavailable" +VP__CWORD31___CWORD67__warning="unavailable" +VP__CWORD31___CWORD67__accelerator="unavailable" +VP__CWORD31__panel_microcomputer="available" +VP__CWORD31__class_watch_at_brake_hold="unavailable" +VP__CWORD31__GPS_antenna="available" +VP__CWORD31__vehicle_signal_ILL="available" +VP__CWORD31__switch_trigger="unavailable" +VP__CWORD31__sensitivity_level="unavailable" +VP__CWORD31__invalidity_term="500" +VP__CWORD31__thumbnail_type="unavailable" +VP__CWORD31__BT_device_name="CAR MULTIMEDIA" +VP__CWORD31__eco_drive_max_volume="no_restriction" +VP__CWORD31__EOM_function="unavailable" +VP__CWORD31__Microphone_Type="_CWORD71__array" +VP__CWORD31__Microphone_Location="ohc" +VP__CWORD31__Wide_band_FM="unavailable" +VP__CWORD31__display_type="one_screen_8" +VP__CWORD31__clock_display="not_need" +VP__CWORD31__destination="[]" +VP__CWORD31__class_operation="touch" +VP__CWORD31__opening_interval="1" +VP__CWORD31__DES_function="unavailable" +VP__CWORD31__beep_sound_keys="" +VP_VEHICLEPARAMETERLIBRARY_SER_serial="00000000000" +VP_VEHICLEPARAMETERLIBRARY_SER_HELPNET_ID="000000000000000000000" +VP_VEHICLEPARAMETERLIBRARY_SER_map_update_ID="0000000000000000" +VP_VEHICLEPARAMETERLIBRARY_SER_ship_date="00000000" +VP_VEHICLEPARAMETERLIBRARY_SER_FACTORY_ID="0000000000000000000" +BT_ADDR="" +BT_DIAL="" diff --git a/agl-systemd/launch_sm.service b/agl-systemd/launch_sm.service new file mode 100755 index 0000000..8edc914 --- /dev/null +++ b/agl-systemd/launch_sm.service @@ -0,0 +1,22 @@ +[Unit] +Description=launch_sm +After=setup_refhw.service agl-trigger.service + +[Service] +PermissionsStartOnly=yes +EnvironmentFile=/tool_9E_SI/env.txt +ExecStartPre=/tool_9E_SI/set_cgroup_rt_runtime_us.sh 950000 +ExecStart=/tool_9E_SI/launch_sm.sh +Type=oneshot +User=root +StandardOutput=inherit +StandardError=inherit +RemainAfterExit=yes +LimitAS=infinity +LimitRSS=infinity +LimitCORE=infinity +LimitNOFILE=65536 +LimitMSGQUEUE=infinity + +[Install] +WantedBy=multi-user.target diff --git a/agl-systemd/options.conf b/agl-systemd/options.conf new file mode 100755 index 0000000..05c48d9 --- /dev/null +++ b/agl-systemd/options.conf @@ -0,0 +1,2 @@ +[Mount] +Options=rw,nodev diff --git a/agl-systemd/setup_refhw.service b/agl-systemd/setup_refhw.service new file mode 100755 index 0000000..427dfed --- /dev/null +++ b/agl-systemd/setup_refhw.service @@ -0,0 +1,15 @@ +[Unit] +Description=Initialize Reference Hardware Settings +#After=weston.service + +[Service] +EnvironmentFile=/tool_9E_SI/env.txt +ExecStart=/tool_9E_SI/setup_refhw.sh +Type=oneshot +#StandardInput=tty +#TTYPath=/dev/tty1 +#TTYReset=yes +#TTYVHangup=yes + +[Install] +WantedBy=multi-user.target diff --git a/agl-systemd/systemd-udev-trigger.service b/agl-systemd/systemd-udev-trigger.service new file mode 100755 index 0000000..07a3f30 --- /dev/null +++ b/agl-systemd/systemd-udev-trigger.service @@ -0,0 +1,22 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=udev Coldplug all Devices +Documentation=man:udev(7) man:systemd-udevd.service(8) +DefaultDependencies=no +Wants=systemd-udevd.service +After=systemd-udevd-kernel.socket systemd-udevd-control.socket systemd-hwdb-update.service +Before=sysinit.target +ConditionPathIsReadWrite=/sys + +[Service] +Type=oneshot +RemainAfterExit=yes +EnvironmentFile=/tool_9E_SI/env.txt +ExecStartPre=/tool_9E_SI/set_capability.sh +ExecStart=/bin/udevadm trigger --type=subsystems --action=add ; /bin/udevadm trigger --type=devices --action=add diff --git a/agl-systemd/tool_9E_SI/agl_set_capability.sh b/agl-systemd/tool_9E_SI/agl_set_capability.sh new file mode 100755 index 0000000..6b108ae --- /dev/null +++ b/agl-systemd/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 -T / | grep 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 -eq 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/agl-systemd/tool_9E_SI/launch_sm.sh b/agl-systemd/tool_9E_SI/launch_sm.sh new file mode 100755 index 0000000..ed1e8d1 --- /dev/null +++ b/agl-systemd/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/agl-systemd/tool_9E_SI/set_capability.sh b/agl-systemd/tool_9E_SI/set_capability.sh new file mode 100755 index 0000000..c16ab4a --- /dev/null +++ b/agl-systemd/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 -T / | grep 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 -eq 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/agl-systemd/tool_9E_SI/set_cgroup_rt_runtime_us.sh b/agl-systemd/tool_9E_SI/set_cgroup_rt_runtime_us.sh new file mode 100755 index 0000000..41536f2 --- /dev/null +++ b/agl-systemd/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/agl-systemd/tool_9E_SI/setup_refhw.sh b/agl-systemd/tool_9E_SI/setup_refhw.sh new file mode 100755 index 0000000..e3f33a4 --- /dev/null +++ b/agl-systemd/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/BS/ns/backup_manager/rwdata +mkdir -p /ramd/BS/ss/logger_service/rwdata/frameworkunifiedlog/diag +restorecon -R /ramd +#chmod 777 /ramd/BS/ss/logger_service/rwdata/frameworkunifiedlog/diag +## Sprint 29 communication +#chmod -R 777 /home/root/.app_can_d +# TODO:for bluetooth_service +#chmod 777 /usr/agl/share + +#if `df -T / | grep 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:||'` + diff --git a/agl-systemd/usr/target/agl_cap.lst b/agl-systemd/usr/target/agl_cap.lst new file mode 100755 index 0000000..89ea096 --- /dev/null +++ b/agl-systemd/usr/target/agl_cap.lst @@ -0,0 +1,34 @@ +/usr/agl/bin/SS_SystemManager|||cap_sys_nice,cap_setuid,cap_setgid,cap_sys_resource+ep|y +/usr/agl/bin/tskmgr|||cap_sys_nice,cap_setuid,cap_setgid=ep|y +/usr/agl/bin/SS_DeviceDetectionService|||cap_setuid,cap_setgid,cap_sys_resource,cap_dac_override,cap_sys_admin+ep|y +/usr/agl/bin/communication|||cap_dac_override+ep|y +/usr/agl/bin/AS_AudioManager|||cap_sys_nice+ep|y +/usr/agl/bin/acmsrv|||cap_dac_override,cap_sys_admin,cap_sys_nice,cap_sys_resource,cap_chown,cap_fowner,cap_setgid,cap_setuid,cap_kill+ep|y +/usr/agl/bin/PS_SwitchHandler|||cap_sys_admin,cap_dac_override+ep|y +/usr/agl/bin/LockManager|||cap_kill+ep|y +/usr/agl/bin/nandupdate|||cap_dac_override+ep|y +/usr/agl/bin/wlan_controller|||cap_net_raw,cap_net_admin+ep|y +/usr/agl/bin/DummyRead|||cap_dac_read_search+ep|y +/usr/agl/bin/clock|||cap_sys_time+ep|y +/usr/agl/bin/Mounter|||cap_sys_admin,cap_dac_override+ep|y +/usr/agl/bin/MounterEx|||cap_sys_admin,cap_fowner,cap_dac_override,cap_chown+ep|y +/usr/agl/bin/DevReproService|||cap_chown,cap_fowner,cap_dac_override+ep|y +/usr/agl/bin/PS_CDR|||cap_sys_admin+ep|y +/usr/agl/bin/webdavmgr|||cap_net_admin,cap_net_raw+ep|y +/usr/agl/bin/DiagService|||cap_sys_rawio,cap_dac_override+ep|y +/usr/agl/bin/resm|||cap_setuid+ep|y +/usr/agl/bin/SS_LoggerService|||cap_dac_override+ep|y +/usr/agl/bin/NetworkManager|||cap_setuid,cap_setgid,cap_sys_admin,cap_chown,cap_kill,cap_net_raw,cap_net_admin,cap_net_bind_service+ep|y +/usr/agl/bin/RadioService|||cap_sys_nice+ep|y +/usr/agl/bin/ASND_VProxy|||cap_sys_nice+ep|y +/usr/agl/bin/misink|||cap_sys_nice+ep|y +/usr/agl/bin/mlink|||cap_sys_nice+ep|y +/usr/agl/bin/media_service|||cap_dac_override,cap_sys_nice+ep|y +/usr/agl/bin/_CWORD74__service|||cap_dac_override+ep|y +/usr/agl/bin/PlaybackService|||cap_sys_nice+ep|y +/usr/agl/bin/Positioning|||cap_dac_override+ep|y +/usr/agl/bin/vehicle|||cap_dac_override+ep|y +/usr/agl/bin/bluetooth_srv|||cap_dac_override,cap_sys_nice+ep|y +/usr/agl/bin/btd_srv|||cap_dac_override,cap_sys_nice+ep|y +/usr/agl/bin/NS_BackupMgr|||cap_dac_override+ep|y +/usr/agl/bin/Sound|||cap_dac_override+ep|y diff --git a/agl-systemd/usr/target/cap.lst b/agl-systemd/usr/target/cap.lst new file mode 100755 index 0000000..c27de10 --- /dev/null +++ b/agl-systemd/usr/target/cap.lst @@ -0,0 +1,24 @@ +/bin/udevadm|||cap_dac_override+ep|y +/sbin/ifconfig|||cap_net_admin+ep|y +/usr/libexec/firmware|||cap_sys_rawio,cap_dac_override+ep|y +/usr/bin/fusedav|||cap_sys_admin+ep|y +/sbin/dhclient|||cap_net_bind_service,cap_net_admin,cap_net_raw,cap_chown,cap_kill,cap_sys_admin+ep|y +/sbin/dhcpd|||cap_net_bind_service,cap_net_admin,cap_net_raw,cap_chown,cap_kill,cap_sys_admin+ep|y +/usr/debug/bin/busybox|||cap_sys_module,cap_net_raw+ep|y +/sbin/insmod|||cap_sys_module+ep|y +/sbin/rmmod|||cap_sys_module+ep|y +/usr/sbin/xtables-multi|||cap_net_raw,cap_net_admin+ep|y +/usr/bin/fusermount|||cap_sys_admin+ep|y +/usr/bin/simple-mtpfs|||cap_sys_admin+ep|y +/sbin/slattach|||cap_net_admin+ep|y +/sbin/mkfs.ext4|||cap_dac_override+ep|y +/sbin/losetup|||cap_dac_override+ep|y +/usr/bin/aplay|||cap_sys_nice+ep|y +/usr/bin/modetest|||cap_sys_admin+ep|y +/sbin/fsck.ext4|||cap_dac_override+ep|y +/usr/sbin/tune2fs|||cap_dac_override+ep|y +/usr/bin/syslogd|||cap_dac_override+ep|y +/usr/bin/dnsmasq|||cap_net_bind_service,cap_net_admin,cap_net_raw,cap_chown,cap_kill,cap_setgid,cap_setuid,cap_sys_admin+ep|y +/usr/sbin/pppd|||cap_setuid,cap_sys_admin,cap_chown,cap_fowner,cap_kill,cap_net_admin,cap_dac_override+ep|y +/sbin/ip|||cap_net_bind_service,cap_net_admin,cap_net_raw+ep|y +/usr/bin/arping|||cap_net_bind_service,cap_net_admin,cap_net_raw,cap_setuid+ep|y diff --git a/agl-systemd/usr/target/dir.lst b/agl-systemd/usr/target/dir.lst new file mode 100755 index 0000000..e69de29 --- /dev/null +++ b/agl-systemd/usr/target/dir.lst diff --git a/agl-systemd/usr/target/mntfs.lst b/agl-systemd/usr/target/mntfs.lst new file mode 100755 index 0000000..e69de29 --- /dev/null +++ b/agl-systemd/usr/target/mntfs.lst |