diff options
author | Praneeth Bajjuri | 2017-12-06 10:42:50 -0600 |
---|---|---|
committer | Praneeth Bajjuri | 2017-12-06 11:12:17 -0600 |
commit | 0c39abb20a9a1859fec2d65f4c13526fd678e656 (patch) | |
tree | e2bd4a6707e6ecb4bdfd2d159aae5e0154b71d07 | |
parent | fe64bbb4ce6c5922eb050a45211ca787f483c54b (diff) | |
download | device-ti-jacinto6evm-0c39abb20a9a1859fec2d65f4c13526fd678e656.tar.gz device-ti-jacinto6evm-0c39abb20a9a1859fec2d65f4c13526fd678e656.tar.xz device-ti-jacinto6evm-0c39abb20a9a1859fec2d65f4c13526fd678e656.zip |
jacinto6evm: Add back auto configuration for initial bringup
for initial bringup of Android 4.9 we need to keep android device project
in sync with d-oreo-r6-release.
TODO: cleanup automotive features
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
-rw-r--r-- | device.mk | 24 | ||||
-rw-r--r-- | init.jacinto6evmboard.rc | 17 | ||||
-rw-r--r-- | init.recovery.jacinto6evmboard.rc | 2 | ||||
-rw-r--r-- | sepolicy/file_contexts | 7 | ||||
-rw-r--r-- | sepolicy/lad_dra7xx.te | 21 | ||||
-rw-r--r-- | sepolicy/mediaserver.te | 8 | ||||
-rw-r--r-- | sepolicy/netd.te | 4 | ||||
-rw-r--r-- | sepolicy/vis.te | 20 |
8 files changed, 99 insertions, 4 deletions
@@ -57,6 +57,7 @@ PRODUCT_COPY_FILES := \ | |||
57 | device/ti/jacinto6evm/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \ | 57 | device/ti/jacinto6evm/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \ |
58 | frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \ | 58 | frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \ |
59 | frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \ | 59 | frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \ |
60 | frameworks/native/data/etc/android.hardware.type.automotive.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.type.automotive.xml \ | ||
60 | frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \ | 61 | frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \ |
61 | frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \ | 62 | frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \ |
62 | frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \ | 63 | frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \ |
@@ -84,10 +85,21 @@ PRODUCT_COPY_FILES += \ | |||
84 | frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \ | 85 | frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \ |
85 | frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \ | 86 | frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \ |
86 | frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \ | 87 | frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \ |
87 | frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ | 88 | frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml |
89 | |||
90 | ifeq ($(APPE_AUDIO),true) | ||
91 | PRODUCT_COPY_FILES += \ | ||
92 | hardware/ti/radio/vis_sdk/packages/android/hal/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \ | ||
93 | hardware/ti/radio/vis_sdk/packages/android/hal/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/primary_audio_policy_configuration.xml \ | ||
94 | hardware/ti/radio/vis_sdk/packages/android/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml | ||
95 | |||
96 | else | ||
97 | PRODUCT_COPY_FILES += \ | ||
88 | device/ti/jacinto6evm/audio/primary/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \ | 98 | device/ti/jacinto6evm/audio/primary/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \ |
99 | device/ti/jacinto6evm/audio/primary/jamr3_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/jamr3_mixer_paths.xml \ | ||
89 | device/ti/jacinto6evm/audio/primary/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/primary_audio_policy_configuration.xml \ | 100 | device/ti/jacinto6evm/audio/primary/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/primary_audio_policy_configuration.xml \ |
90 | device/ti/jacinto6evm/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml | 101 | device/ti/jacinto6evm/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml |
102 | endif | ||
91 | 103 | ||
92 | # cpuset configuration | 104 | # cpuset configuration |
93 | PRODUCT_COPY_FILES += \ | 105 | PRODUCT_COPY_FILES += \ |
@@ -156,6 +168,14 @@ PRODUCT_PACKAGES += \ | |||
156 | tinyplay \ | 168 | tinyplay \ |
157 | tinycap | 169 | tinycap |
158 | 170 | ||
171 | # Radio | ||
172 | PRODUCT_PACKAGES += \ | ||
173 | RadioApp \ | ||
174 | lad_dra7xx \ | ||
175 | libtiipc \ | ||
176 | libtiipcutils \ | ||
177 | libtitransportrpmsg | ||
178 | |||
159 | PRODUCT_PACKAGES += toybox_vendor | 179 | PRODUCT_PACKAGES += toybox_vendor |
160 | 180 | ||
161 | # Launcher3 | 181 | # Launcher3 |
@@ -166,7 +186,7 @@ PRODUCT_PACKAGES += Launcher3 \ | |||
166 | PRODUCT_PROPERTY_OVERRIDES += \ | 186 | PRODUCT_PROPERTY_OVERRIDES += \ |
167 | media.aac_51_output_enabled=true | 187 | media.aac_51_output_enabled=true |
168 | 188 | ||
169 | # PRODUCT_PROPERTY_OVERRIDES += \ | 189 | PRODUCT_PROPERTY_OVERRIDES += \ |
170 | android.car.drawer.unlimited=true \ | 190 | android.car.drawer.unlimited=true \ |
171 | android.car.hvac.demo=true \ | 191 | android.car.hvac.demo=true \ |
172 | com.android.car.radio.demo=true \ | 192 | com.android.car.radio.demo=true \ |
diff --git a/init.jacinto6evmboard.rc b/init.jacinto6evmboard.rc index d3476f9..c5da803 100644 --- a/init.jacinto6evmboard.rc +++ b/init.jacinto6evmboard.rc | |||
@@ -10,6 +10,8 @@ on post-fs-data | |||
10 | setprop vold.post_fs_data_done 1 | 10 | setprop vold.post_fs_data_done 1 |
11 | mkdir /data/misc/dhcp 0770 dhcp dhcp | 11 | mkdir /data/misc/dhcp 0770 dhcp dhcp |
12 | chown dhcp dhcp /data/misc/dhcp | 12 | chown dhcp dhcp /data/misc/dhcp |
13 | mkdir /data/lad 0770 system media | ||
14 | mkdir /data/lad/LAD 0770 system media | ||
13 | 15 | ||
14 | #enabling thermal zone for mpu | 16 | #enabling thermal zone for mpu |
15 | write /sys/class/thermal/thermal_zone0/mode enabled | 17 | write /sys/class/thermal/thermal_zone0/mode enabled |
@@ -28,7 +30,7 @@ on boot | |||
28 | on fs | 30 | on fs |
29 | mount_all /vendor/etc/fstab.jacinto6evmboard | 31 | mount_all /vendor/etc/fstab.jacinto6evmboard |
30 | 32 | ||
31 | #on late-init | 33 | # on late-init |
32 | # Load modules | 34 | # Load modules |
33 | # exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d \ | 35 | # exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d \ |
34 | # /vendor/lib/modules wl18xx.ko wlcore.ko wlcore_sdio.ko \ | 36 | # /vendor/lib/modules wl18xx.ko wlcore.ko wlcore_sdio.ko \ |
@@ -97,3 +99,16 @@ service dhcpcd_eth1 /system/bin/dhcpcd -ABDKL | |||
97 | class main | 99 | class main |
98 | disabled | 100 | disabled |
99 | oneshot | 101 | oneshot |
102 | |||
103 | service lad_dra7xx /vendor/bin/lad_dra7xx -g | ||
104 | class main | ||
105 | user system | ||
106 | group media | ||
107 | oneshot | ||
108 | |||
109 | service vis /vendor/bin/RadioApp -h eth | ||
110 | class main | ||
111 | user system | ||
112 | group media inet | ||
113 | disabled | ||
114 | oneshot | ||
diff --git a/init.recovery.jacinto6evmboard.rc b/init.recovery.jacinto6evmboard.rc index 2fe5b5b..173be7f 100644 --- a/init.recovery.jacinto6evmboard.rc +++ b/init.recovery.jacinto6evmboard.rc | |||
@@ -1,4 +1,4 @@ | |||
1 | #on late-init | 1 | # on late-init |
2 | # Load modules | 2 | # Load modules |
3 | # exec u:r:modprobe:s0 -- /sbin/modprobe -a -d \ | 3 | # exec u:r:modprobe:s0 -- /sbin/modprobe -a -d \ |
4 | # /lib/modules scsi_mod.ko usb-storage.ko sd_mod.ko \ | 4 | # /lib/modules scsi_mod.ko usb-storage.ko sd_mod.ko \ |
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index 5ffaf0c..8b7b296 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts | |||
@@ -25,10 +25,17 @@ | |||
25 | #cpuset script | 25 | #cpuset script |
26 | /vendor/bin/init.jacinto6evmboard.cpuset.sh u:object_r:init-cpuset-sh_exec:s0 | 26 | /vendor/bin/init.jacinto6evmboard.cpuset.sh u:object_r:init-cpuset-sh_exec:s0 |
27 | 27 | ||
28 | #lad_dra7xx | ||
29 | /vendor/bin/lad_dra7xx u:object_r:lad_dra7xx_exec:s0 | ||
30 | /data/lad(/.*)? u:object_r:lad_data_file:s0 | ||
31 | |||
28 | #hwspinlock and uio | 32 | #hwspinlock and uio |
29 | /dev/hwspinlock u:object_r:hwspinlock_dev:s0 | 33 | /dev/hwspinlock u:object_r:hwspinlock_dev:s0 |
30 | /dev/uio0 u:object_r:uio_dev:s0 | 34 | /dev/uio0 u:object_r:uio_dev:s0 |
31 | 35 | ||
36 | #VIS (RadioApp) | ||
37 | /vendor/bin/RadioApp u:object_r:vis_exec:s0 | ||
38 | |||
32 | #CMEM | 39 | #CMEM |
33 | /dev/cmem u:object_r:cmem_dev:s0 | 40 | /dev/cmem u:object_r:cmem_dev:s0 |
34 | 41 | ||
diff --git a/sepolicy/lad_dra7xx.te b/sepolicy/lad_dra7xx.te new file mode 100644 index 0000000..3b31bf2 --- /dev/null +++ b/sepolicy/lad_dra7xx.te | |||
@@ -0,0 +1,21 @@ | |||
1 | type lad_dra7xx, domain; | ||
2 | type lad_dra7xx_exec, exec_type, file_type; | ||
3 | type lad_data_file, file_type, data_file_type; | ||
4 | |||
5 | # Started by init | ||
6 | init_daemon_domain(lad_dra7xx) | ||
7 | |||
8 | # Allow access to /data/lad | ||
9 | allow lad_dra7xx devpts:chr_file {read write ioctl getattr }; | ||
10 | allow lad_dra7xx lad_data_file:dir { create_dir_perms }; | ||
11 | allow lad_dra7xx lad_data_file:fifo_file { create_file_perms }; | ||
12 | allow lad_dra7xx self:socket { create_socket_perms_no_ioctl }; | ||
13 | |||
14 | # Allow access to hwspinlock and uio device | ||
15 | allow lad_dra7xx hwspinlock_dev:chr_file { rw_file_perms }; | ||
16 | allow lad_dra7xx uio_dev:chr_file { rw_file_perms }; | ||
17 | allow lad_dra7xx sysfs:file { r_file_perms }; | ||
18 | |||
19 | # Allow signull operation from known client processes | ||
20 | allow lad_dra7xx mediaserver:process signull; | ||
21 | allow lad_dra7xx vis:process signull; | ||
diff --git a/sepolicy/mediaserver.te b/sepolicy/mediaserver.te index 2e9e366..c8e811e 100644 --- a/sepolicy/mediaserver.te +++ b/sepolicy/mediaserver.te | |||
@@ -2,3 +2,11 @@ allow mediaserver system_server:unix_stream_socket { read write }; | |||
2 | 2 | ||
3 | #Camera | 3 | #Camera |
4 | allow mediaserver device:dir { read open }; | 4 | allow mediaserver device:dir { read open }; |
5 | |||
6 | #APPE | ||
7 | allow mediaserver lad_data_file:fifo_file { create_file_perms }; | ||
8 | allow mediaserver hwspinlock_dev:chr_file { rw_file_perms }; | ||
9 | allow mediaserver cmem_dev:chr_file { rw_file_perms }; | ||
10 | allow mediaserver self:socket { create_socket_perms_no_ioctl }; | ||
11 | allow mediaserver self:tcp_socket { create_stream_socket_perms }; | ||
12 | allow mediaserver ctl_default_prop:property_service set; | ||
diff --git a/sepolicy/netd.te b/sepolicy/netd.te index 6c8303c..143cc61 100644 --- a/sepolicy/netd.te +++ b/sepolicy/netd.te | |||
@@ -2,3 +2,7 @@ | |||
2 | # Ignore them | 2 | # Ignore them |
3 | dontaudit netd self:capability sys_module; | 3 | dontaudit netd self:capability sys_module; |
4 | dontaudit netd kernel:system module_request; | 4 | dontaudit netd kernel:system module_request; |
5 | |||
6 | # VIS | ||
7 | allow netd vis:fd use; | ||
8 | allow netd vis:tcp_socket { rw_socket_perms }; | ||
diff --git a/sepolicy/vis.te b/sepolicy/vis.te new file mode 100644 index 0000000..101cf39 --- /dev/null +++ b/sepolicy/vis.te | |||
@@ -0,0 +1,20 @@ | |||
1 | type vis, domain; | ||
2 | type vis_exec, exec_type, file_type; | ||
3 | |||
4 | # Started by init | ||
5 | init_daemon_domain(vis) | ||
6 | |||
7 | # Allow access to IPC related resources | ||
8 | allow vis devpts:chr_file { read write ioctl getattr }; | ||
9 | allow vis fwmarkd_socket:sock_file write; | ||
10 | allow vis self:socket { create_socket_perms_no_ioctl }; | ||
11 | allow vis self:tcp_socket { create_stream_socket_perms }; | ||
12 | allow vis netd:unix_stream_socket connectto; | ||
13 | allow vis node:tcp_socket node_bind; | ||
14 | allow vis port:tcp_socket name_bind; | ||
15 | allow vis lad_data_file:fifo_file { rw_file_perms }; | ||
16 | allow vis cmem_dev:chr_file { rw_file_perms }; | ||
17 | allow vis hwspinlock_dev:chr_file { rw_file_perms }; | ||
18 | |||
19 | # Allow access to I2C for audio codec configuration | ||
20 | allow vis i2c_device:chr_file { rw_file_perms }; | ||