Closed Bug 1021340 Opened 10 years ago Closed 10 years ago

[Flame] Integrate T2M changes to init.rc

Categories

(Firefox OS Graveyard :: GonkIntegration, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jld, Assigned: jld)

References

Details

Attachments

(2 files)

(In reply to Michael Wu [:mwu] from bug 1017464 comment #6)
> (In reply to Alexandre LISSY :gerard-majax from bug 1017464 comment #2)
> > Michael, in bug 1016934 we landed stuff to use init.rc from system/core
> > mainly for nfc stuff, but the root repo is CAF. Should we fork this CAF repo
> > or get the T2M changed merged in CAF ?
> 
> I looked at the init.rc changes - looks like a lot of stuff that should've
> been in other init files like init.target.rc or init.qcom.rc. I think we can
> cherrypick the changes into a fork of init.target.rc or init.qcom.rc.

It looks like we don't have a bug for this yet, so I'll make one.
This is the output of `git diff caf/b2g_jb_3.2...t2m/foxfone-one`.
Comment on attachment 8435439 [details] [diff] [review]
t2m-system-core.diff

Review of attachment 8435439 [details] [diff] [review]:
-----------------------------------------------------------------

Additionally, to make the second SIM slot work, we need "symlink /dev/socket/rild1 /dev/socket/rilproxy1" in an "on init" block; see attachment 8419459 [details] [diff] [review].

::: include/private/android_filesystem_config.h
@@ +206,4 @@
>      { 00775, AID_ROOT,      AID_ROOT,      0, "system/b2g/b2g" },
>      { 00775, AID_ROOT,      AID_ROOT,      0, "system/b2g/updater" },
>      { 00775, AID_ROOT,      AID_ROOT,      0, "system/b2g/plugin-container" },
> +    { 00775, AID_ROOT,      AID_ROOT,      0, "system/etc/wifi_test.sh" },

This file doesn't seem to exist — and if it did, it should be moved to someplace like /system/xbin.

::: rootdir/init.rc
@@ +337,4 @@
>      chown system system /sys/class/leds/lcd-backlight/brightness
>      chown system system /sys/class/leds/button-backlight/brightness
>      chown system system /sys/class/leds/jogball-backlight/brightness
> +    chown system system /sys/class/leds/charger_light/brightness

If this is the LED next to the front camera, it seems to be indicating the charging state fine without this.

@@ +366,5 @@
> +        mkdir -p /etc/param
> +        chown nfc:nfc /data/nfc
> +        chown  nfc:nfc /etc/param
> +        setprop ro.nfc.port "I2C"
> +        chmod 0777 /dev/pn544

If there is anything else we can do here that does *not* involve a mode 0777 device node, we should do that instead.

@@ +368,5 @@
> +        chown  nfc:nfc /etc/param
> +        setprop ro.nfc.port "I2C"
> +        chmod 0777 /dev/pn544
> +        chown  nfc:nfc /dev/pn544
> +	pn547_set_xclk

This doesn't appear to be an actual init.rc command, and I note that the version in attachment 8419459 [details] [diff] [review] doesn't have it.

@@ +371,5 @@
> +        chown  nfc:nfc /dev/pn544
> +	pn547_set_xclk
> +	
> +#tcl_czb@tcl.com modfiy /proc/cmdline file permissions (0440->0444),in order to be able to read the file.
> +    chmod 0444 /proc/cmdline

This isn't as bad as a mode 0777 device, but it's questionable.  *What* needs to read the kernel parameters?

@@ +493,4 @@
>      user root
>      group radio cache inet misc audio log qcom_diag
>  
> +service rilproxy /system/bin/rilproxy

This is a no-op; we're not even installing rilproxy.

@@ +595,4 @@
>      disabled
>      oneshot
>  
> +service nfcd /system/bin/nfcd

This block is fine as-is (but should be in init.target.rc or similar).
NFC tested by holding a tag next to the phone and watching logcat while nfcd detects the tag and notifies Gecko (and, somewhere in there, the phone vibrates).
Attachment #8436092 - Flags: review?(mwu)
Comment on attachment 8436092 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/device-flame/pull/32

Nice.
Attachment #8436092 - Flags: review?(mwu) → review+
You need to log in before you can comment on or make changes to this bug.