Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

separation of common and device specific ueventd*.rc config files #10

Open
wants to merge 1 commit into
base: ics
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
59 changes: 2 additions & 57 deletions init.gt-p1000.rc
Expand Up @@ -63,12 +63,6 @@ on post-fs-data
chmod 0777 /radio/modem.bin
symlink /radio/modem.bin /dev/block/bml12

# gps P1 only
chown gps root /sys/class/sec/gps/GPS_PWR_EN/value
chmod 660 /sys/class/sec/gps/GPS_PWR_EN/value
chown gps root /sys/class/sec/gps/GPS_nRST/value
chmod 660 /sys/class/sec/gps/GPS_nRST/value

# sensors P1 only
# this needs to be fixed correctly, see: frameworks/base/services/sensorservice/SensorDevice.cp

Expand All @@ -81,59 +75,10 @@ on post-fs-data
# since ueventd.rc has no "import" logic we need additional makefile glue to
# have all common stuff in p1-common and just the device specific stuff in p1/p1c

# System server can control backlight brightness
chmod 0664 /sys/class/lcd/s5p_lcd/lcd_power
chown radio system /sys/class/lcd/s5p_lcd/lcd_power

# Allow net_raw to have access to /dev/socket directory
chown root net_raw /dev/socket
chmod 0775 /dev/socket

# Permission changes

chown system radio /sys/devices/platform/s3c2440-i2c.2/i2c-2/2-004a/update_fw
chown system radio /sys/class/power_supply/battery/reset_soc
chown system radio /sys/class/power_supply/battery/reset_cap
chown system radio /sys/class/power_supply/battery/fg_reg
chown system radio /sys/class/power_supply/battery/charging_mode_booting
chown system radio /sys/devices/platform/gpio-keys/key_pressed
chown system radio /sys/class/misc/level/control
chown system radio /sys/class/jack/jack_selector/select_jack
chown system radio /sys/class/cabcset/switch_cabcset/cabcset_file_cmd
chown system radio /sys/class/cabcset/switch_cabcset/lightsensor_file_state
chown system radio /sys/class/sec/sec_tune_cmc623/color_saturation
chown system radio /sys/class/mdnieset_ui/switch_mdnieset_ui/mdnieset_ui_file_cmd
chown system radio /sys/class/mdnieset_ui/switch_mdnieset_ui/mdnieset_region_file_cmd
chown system radio /sys/class/mdnieset_outdoor/switch_mdnieset_outdoor/mdnieset_outdoor_file_cmd

# usb permission settings

chmod 0664 /sys/devices/virtual/sec/switch/disable_vbus
chmod 0664 /sys/devices/virtual/sec/switch/usb_state
chmod 0664 /sys/devices/virtual/sec/switch/usb_sel
chmod 0664 /sys/devices/virtual/sec/switch/uart_sel

chown system radio /sys/devices/virtual/sec/switch/disable_vbus
chown system radio /sys/devices/virtual/sec/switch/usb_state
chown system radio /sys/devices/virtual/sec/switch/usb_sel
chown system radio /sys/devices/virtual/sec/switch/uart_sel

chmod 0664 /sys/devices/platform/android_usb/tethering
chmod 0664 /sys/devices/platform/android_usb/UmsStatus
chmod 0664 /sys/devices/platform/android_usb/UsbMenuSel
chmod 0664 /sys/devices/platform/android_usb/AskOnStatus
chmod 0664 /sys/devices/platform/android_usb/AskOnMenuSel

chown system radio /sys/devices/platform/android_usb/tethering
chown system radio /sys/devices/platform/android_usb/UmsStatus
chown system radio /sys/devices/platform/android_usb/UsbMenuSel
chown system radio /sys/devices/platform/android_usb/AskOnStatus
chown system radio /sys/devices/platform/android_usb/AskOnMenuSel

# probably obsolete?
#chmod 0664 /sys/devices/platform/android_usb/KiesStatus
#chown system radio /sys/devices/platform/android_usb/KiesStatus

#
#
# ------
Expand All @@ -159,15 +104,15 @@ service ril-daemon /system/bin/rild -l /system/lib/libsec-ril.so -- -d /dev/ttyS
service gpsd /system/vendor/bin/gpsd -c /system/vendor/etc/gps.xml
class main
socket gps seqpacket 0660 gps system
user gps system
user gps
group system inet

# --------------------------------------------------------------------------------------
# GT-P1000L only
# --------------------------------------------------------------------------------------

#
# Latin MobileTV [ISDB-T]
# ISDB-T MobileTV
#

#service mobileTV /system/bin/broadcastProcessObserver
Expand Down
12 changes: 10 additions & 2 deletions p1.mk
Expand Up @@ -42,10 +42,17 @@

DEVICE_PACKAGE_OVERLAYS := device/samsung/p1/overlay

# Init files
# generate ueventd.gt-p1000.rc from common and device specific files
TARGET_UEVENTD_HW_RC := device/samsung/p1/ueventd.gt-p1000.rc

$(TARGET_UEVENTD_HW_RC) : device/samsung/p1/ueventd.p1-specific.rc device/samsung/p1/ueventd.p1-common.rc
cat device/samsung/p1/ueventd.p1-common.rc > $@
cat device/samsung/p1/ueventd.p1-specific.rc >> $@

# init files
PRODUCT_COPY_FILES += \
device/samsung/p1/init.gt-p1000.rc:root/init.gt-p1000.rc \
device/samsung/p1/ueventd.gt-p1000.rc:root/ueventd.gt-p1000.rc
$(TARGET_UEVENTD_HW_RC):root/ueventd.gt-p1000.rc

# vold
PRODUCT_COPY_FILES += \
Expand All @@ -54,6 +61,7 @@ PRODUCT_COPY_FILES += \
# RIL
# Permissions
PRODUCT_COPY_FILES += \
frameworks/base/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \
frameworks/base/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml

# Device-specific packages
Expand Down
64 changes: 0 additions & 64 deletions ueventd.gt-p1000.rc

This file was deleted.

177 changes: 177 additions & 0 deletions ueventd.p1-common.rc
@@ -0,0 +1,177 @@
# -------------------------------------------------------------------------------
# ueventd.p1-common.rc
# -------------------------------------------------------------------------------
# 1. system/core/rootdir/ueventd.rc
# 2. device/samsung/p1-common/ueventd.p1-common.rc
# 3. device/samsung/p1[c]/ueventd.p1[c]-specific.rc
#
# files 2 and 3 are merged during the build process into ueventd.<device>.rc
# -------------------------------------------------------------------------------

# ---
# devices: graphics, video, camera, ...
# ---

# 3d graphics - who needs world write? user/group wrong?
/dev/pvrsrvkm 0666 system system

# framebuffer, hw jpeg+h264 en-/decoder
/dev/s3c-mem 0660 system system
/dev/s3c-jpg 0660 system camera
/dev/s3c-mfc 0660 media media

# camera
/dev/video0 0660 system camera
/dev/video1 0660 system camera
/dev/video2 0660 system camera

# tv out
/dev/video14 0660 system graphics
/dev/video21 0660 system graphics
/dev/video22 0660 system graphics

# hdmi hot plug detect interface
/dev/HPD 0660 system graphics

# for copybit
/dev/pmem_gpu1 0660 system graphics

# for ddc
/dev/i2c-1 0660 system graphics

# ---
# devices: other
# ---

# i2c devices
/dev/i2c-5 0660 root input
/dev/i2c-6 0660 root input
/dev/i2c-10 0660 root input

# bluetooth
/dev/s3c2410_serial0 0660 bluetooth bluetooth
/dev/bthid 0660 bluetooth bluetooth

# bluetooth dial-up networking
/dev/dun 0660 system bluetooth

# usb serial interface
/dev/ttyGS0 0660 system system

# usb mtp - media transfer protocol
/dev/usb_mtp_gadget 0660 system mtp

# gps
/dev/s3c2410_serial1 0660 gps system

# serial console
/dev/ttyFIQ0 0660 root root

# other
/dev/backlightnotification 0660 system system
/dev/level 0660 system system
/dev/rfkill 0660 system system
/dev/rtc0 0660 system system
/dev/adc 0660 system system

# ---
# sysfs: usb
# ---

/sys/devices/virtual/sec/switch disable_vbus 0664 system system
/sys/devices/virtual/sec/switch usb_state 0664 system system
/sys/devices/virtual/sec/switch usb_sel 0664 system system
/sys/devices/virtual/sec/switch uart_sel 0664 system system

/sys/devices/virtual/switch dock 0664 system system
/sys/devices/virtual/switch h2w 0664 system system
/sys/devices/virtual/switch send_end 0664 system system
/sys/devices/virtual/switch usb_configuration 0664 system system
/sys/devices/virtual/switch usb_connected 0664 system system

/sys/devices/platform/android_usb tethering 0664 system system
/sys/devices/platform/android_usb UmsStatus 0664 system system
/sys/devices/platform/android_usb UsbMenuSel 0664 system system
/sys/devices/platform/android_usb AskOnStatus 0664 system system
/sys/devices/platform/android_usb AskOnMenuSel 0664 system system

/sys/devices/virtual/usb_composite acm 0664 system system
/sys/devices/virtual/usb_composite adb 0664 system system
/sys/devices/virtual/usb_composite mtp 0664 system system
/sys/devices/virtual/usb_composite rndis 0664 system system
/sys/devices/virtual/usb_composite usb_mass_storage 0664 system system

# ---
# sysfs: bluetooth
# ---

/sys/class/rfkill/rfkill0 state 0660 bluetooth bluetooth
/sys/class/rfkill/rfkill0 type 0660 bluetooth bluetooth

/sys/class/rfkill/rfkill1 state 0660 bluetooth bluetooth
/sys/class/rfkill/rfkill1 type 0660 bluetooth bluetooth

# change permission for uart_switch
/sys/class/sec/uart_switch/UART_SEL value 0660 radio radio

# ---
# sysfs: cpufreq control files
# ---

/sys/devices/system/cpu/cpu0/cpufreq scaling_governor 0664 root system
/sys/devices/system/cpu/cpu0/cpufreq scaling_max_freq 0664 root system
/sys/devices/system/cpu/cpu0/cpufreq scaling_min_freq 0664 root system

# ---
# sysfs: other
# ---

# gps
/sys/class/sec/gps/GPS_PWR_EN value 0660 gps system
/sys/class/sec/gps/GPS_nRST value 0660 gps system

# ROHM Semiconductor BH1721 light sensor
/sys/class/cabcset/switch_cabcset cabcset_file_cmd 0660 system system
/sys/class/cabcset/switch_cabcset lightsensor_file_state 0660 system system

/sys/devices/virtual/lightsensor/switch_cmd lightsensor_file_cmd 0660 system system
/sys/devices/virtual/lightsensor/switch_cmd lightsensor_file_state 0660 system system
/sys/devices/virtual/lightsensor/switch_cmd lightsensor_file_illuminance 0660 system system

# display
/sys/class/backlight/s5p_bl brightness 0660 system system
/sys/class/backlight/s5p_bl lcd_power 0660 system system
/sys/class/backlight/s5p_bl contrast 0660 system system
/sys/class/backlight/s5p_bl max_contrast 0660 system system

/sys/class/lcd/s5p_lcd lcd_power 0660 system system
/sys/class/lcd/s5p_lcd contrast 0660 system system
/sys/class/lcd/s5p_lcd max_contrast 0660 system system

# buttons
/sys/devices/virtual/leds/button-backlight brightness 0660 system system

# leds
/sys/devices/virtual/misc/backlightnotification blink_control 0660 system system
/sys/devices/virtual/misc/backlightnotification enabled 0660 system system
/sys/devices/virtual/misc/backlightnotification notification_led 0660 system system
/sys/devices/virtual/sec/keyboard keyboard_led 0660 system system

/sys/class/mdnieset_ui/switch_mdnieset_ui mdnieset_ui_file_cmd 0660 system system
/sys/class/mdnieset_ui/switch_mdnieset_ui mdnieset_region_file_cmd 0660 system system
/sys/class/mdnieset_outdoor/switch_mdnieset_outdoor mdnieset_outdoor_file_cmd 0660 system system
/sys/class/sec/sec_tune_cmc623 color_saturation 0660 system system
/sys/class/sec/sec_tune_cmc623 color_black 0660 system system
/sys/class/sec/sec_tune_cmc623 color_white 0660 system system

# power
/sys/class/power_supply/battery reset_soc 0660 system system
/sys/class/power_supply/battery reset_cap 0660 system system
/sys/class/power_supply/battery fg_reg 0660 system system
/sys/class/power_supply/battery charging_mode_booting 0660 system system

# input / ouput
/sys/devices/platform/gpio-keys key_pressed 0660 system system
/sys/class/misc/level control 0660 system system
/sys/class/jack/jack_selector select_jack 0660 system system