Skip to content

Commit 2fc17b6

Browse files
committed
Add home_automation system package to initrc
Also adjust initrc in order to: - Set the OTG port to adb mode by default. - Make the pwm3 led port world writable (heartbeat board leds) - Make /dev/ttymxc3 (serial for the dimmer board) writable by inet group.
1 parent 30ea19f commit 2fc17b6

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

imx6/etc/ueventd.freescale.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/dev/pmem_gpu 0660 system graphics
2+
/dev/ttymxc3 0660 root inet
23
/dev/ttymxc4 0660 bluetooth bluetooth
34
/dev/snd/* 0660 system audio
45
/dev/ttyUSB* 0640 radio radio

imx6/udoo.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,5 @@ PRODUCT_PACKAGES += \
5151
iwconfig \
5252
iwlist \
5353
setotg \
54-
lsusb
54+
lsusb \
55+
home_automation

udoo/init.rc

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,25 @@ on boot
140140
chown system system /sys/devices/virtual/gpio/gpio203/value
141141
chmod 0666 /sys/devices/virtual/gpio/gpio203/direction
142142
chown system system /sys/devices/virtual/gpio/gpio203/direction
143-
143+
write /sys/class/gpio/gpio203/direction "out"
144+
write /sys/class/gpio/gpio203/value 0
145+
write /sys/class/gpio/gpio128/direction "out"
146+
write /sys/class/gpio/gpio128/value 0
147+
144148
chmod 0666 /sys/module/usbtouchscreen/parameters/calibration
145149
chown system system /sys/module/usbtouchscreen/parameters/calibration
146150
exec /system/bin/cat /data/data/com.udoo.touchscreencalibration/files/pointercal > /sys/module/usbtouchscreen/parameters/calibration
147151

148152
# mount the debugfs
149153
mount debugfs none /sys/kernel/debug/
150154

155+
# Home automation daemon (svc runs as another user. chown data to root to be read-only from www daemon)
156+
mkdir /data/home_automation 0775 shell shell
157+
chown root /data/home_automation
158+
chmod 0775 /data/home_automation
159+
# Make the board backlight world writable.
160+
chmod 0666 /sys/class/leds/pwm3/brightness
161+
151162
service p2p_supplicant /system/bin/wpa_supplicant \
152163
-iwlan0 -Dwext -c/data/misc/wifi/wpa_supplicant.conf
153164
user root
@@ -178,6 +189,11 @@ service iprenew_wlan0 /system/bin/dhcpcd -n
178189
class late_start
179190
disabled
180191
oneshot
192+
193+
service home_automation /system/bin/home_automation /dev/ttymxc3 /data/home_automation
194+
class late_start
195+
user home_aut
196+
group inet
181197

182198
on fs
183199
# mount ext4 partitions

0 commit comments

Comments
 (0)