diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2020-02-10 18:35:29 +0100 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2021-03-14 23:24:14 +0100 |
commit | fa4ad6463c96b5558785bda384002fb884425180 (patch) | |
tree | f9a8a24ceb91567499a2e4e162c0019fb3d0f963 | |
parent | b80f84ea5d6c4d2a2c2ef76e47621dfe6de4bcfe (diff) | |
download | device_samsung_i9300-fa4ad6463c96b5558785bda384002fb884425180.tar.gz device_samsung_i9300-fa4ad6463c96b5558785bda384002fb884425180.tar.bz2 device_samsung_i9300-fa4ad6463c96b5558785bda384002fb884425180.zip |
Integrate libsamsung-ipc and libsamsung-ril
Both libsamsung-ipc and libsamsung-ril now compile fine on Replicant 11,
however it's not sufficient to enable rild to use libsamsung-ril:
- The RIL need access to several device nodes to be able to boot
the modem and send/retrieve messages from/to it.
- In addition, rild also needs some parameters to be able to use
libsamsung-ril.
- Access to the EFS filesystem is also required, so we now mount it.
Even if rild can now use libsamsung-ril to boot the modem and receive
messages from it, rild still needs to be integrated into the Android
HAL and framework through the manifest.
Most libsamsung-ipc test utilities were also shipped on the device
to help debug issues. It is also a good idea to keep them in released
images to enable users to debug potential issues without having to
recompile Replicant from scratch.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r-- | BoardConfig.mk | 4 | ||||
-rw-r--r-- | device.mk | 9 | ||||
-rw-r--r-- | fstab.smdk4x12 | 1 | ||||
-rw-r--r-- | init.smdk4x12.rc | 25 | ||||
-rw-r--r-- | system.prop | 4 | ||||
-rw-r--r-- | ueventd.rc | 7 |
6 files changed, 50 insertions, 0 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk index e2352e4..1ee168a 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -36,3 +36,7 @@ TARGET_SCREEN_WIDTH := 720 TARGET_SCREEN_HEIGHT := 1280 TARGET_USES_HWC2 := true BOARD_USES_DRM_HWCOMPOSER := true + +# RIL +SIM_COUNT := 1 +BOARD_ROOT_EXTRA_FOLDERS += efs @@ -16,13 +16,22 @@ $(call inherit-product, device/samsung/midas-common/midas.mk) +# Modem support for i9300 PRODUCT_PACKAGES += \ + ipc-imei \ + ipc-modem \ + ipc-test \ libsamsung-ipc \ libsamsung-ril \ + libsrs-client \ + modem.sh \ + nv_data-md5 \ + srs-test \ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/fstab.smdk4x12:root/fstab.smdk4x12 \ $(LOCAL_PATH)/init.smdk4x12.rc:root/init.smdk4x12.rc \ + $(LOCAL_PATH)/ueventd.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \ frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \ frameworks/native/data/etc/android.software.app_widgets.xml:system/etc/permissions/android.software.app_widgets.xml \ frameworks/av/media/libstagefright/data/media_codecs_sw.xml:system/etc/media_codecs.xml \ diff --git a/fstab.smdk4x12 b/fstab.smdk4x12 index ccb65ca..1f55a4f 100644 --- a/fstab.smdk4x12 +++ b/fstab.smdk4x12 @@ -16,6 +16,7 @@ /dev/block/platform/soc/12550000.mmc/by-name/SYSTEM / ext4 ro,noatime wait /dev/block/platform/soc/12550000.mmc/by-name/USERDATA /data ext4 rw,noatime wait +/dev/block/platform/soc/12550000.mmc/by-name/EFS /efs ext4 rw,noatime wait # Recovery /dev/block/platform/soc/12550000.mmc/by-name/BOOT /boot emmc defaults recoveryonly diff --git a/init.smdk4x12.rc b/init.smdk4x12.rc index 70a8ad8..74d597d 100644 --- a/init.smdk4x12.rc +++ b/init.smdk4x12.rc @@ -37,6 +37,8 @@ on early-boot chmod 777 /dev/ion # used by OMX / libstagefright chmod 755 /sys/kernel/debug chmod 755 /sys/kernel/debug/sync + + # Graphics chown graphics graphics /sys/kernel/debug/sync/sw_sync chmod 777 /sys/kernel/debug/sync/sw_sync chmod 777 /dev/dri/card0 @@ -46,9 +48,32 @@ on early-boot chmod 777 /sys/class/backlight/panel/brightness chown graphics graphics /sys/kernel/debug/sync/info + ######### + # Modem # + ######### + # HSIC bus reset (required for modem boot) + chown radio radio /sys/devices/platform/soc/12580000.ehci/ehci_power + # Modem power management GPIOs between the SOC and the modem + chown radio radio /sys/devices/platform/xmm6262/hostwake + chown radio radio /sys/devices/platform/xmm6262/link_active + chown radio radio /sys/devices/platform/xmm6262/modem_power + chown radio radio /sys/devices/platform/xmm6262/pda_active + chown radio radio /sys/devices/platform/xmm6262/slavewake + # Modem firmware (RADIO Android partition) + chown radio radio /dev/block/mmcblk2p7 + # Modem devices nodes + chown radio radio /dev/umts_csd + chown radio radio /dev/umts_ipc + chown radio radio /dev/umts_loopback + chown radio radio /dev/umts_rfs + chown radio radio /dev/umts_router + on post-fs-data setprop vold.post_fs_data_done 1 start resize2fs_partitions + # RIL: Enable TelephonyManager to access /proc/cmdline + # This is probably needed to access the IMEI + chmod 777 /proc/cmdline service resize2fs_partitions /system/bin/resize2fs_partitions.sh class main diff --git a/system.prop b/system.prop index 8b789ea..336cc40 100644 --- a/system.prop +++ b/system.prop @@ -22,3 +22,7 @@ hwc.drm.device=/dev/dri/card0 gralloc.gbm.device=/dev/dri/card0 ro.config.avoid_gfx_accel=1 debug.sf.nobootanimation=1 + +# Modem support for i9300 +rild.libpath=/system/vendor/lib/libsamsung-ril.so +rild.libargs=-d /dev/ttyS0 diff --git a/ueventd.rc b/ueventd.rc new file mode 100644 index 0000000..bfe57e6 --- /dev/null +++ b/ueventd.rc @@ -0,0 +1,7 @@ +##################################################### +# Device node for the modem firmware loading driver # +##################################################### +# Enable handling usbmisc events +subsystem usbmisc + +/dev/xmm6262_boot0 0666 radio radio |