summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-09-21 03:24:00 +0200
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-09-21 03:24:00 +0200
commitd43af1e61c6e97b158936cdb550aa50be5edb969 (patch)
tree159ca241dffe66bb71fb52bbf1301e7e687403a3
parent80d404b929c222f3fdc7ecad7694753c8c27a537 (diff)
downloaddevice_samsung_i9300-d43af1e61c6e97b158936cdb550aa50be5edb969.zip
device_samsung_i9300-d43af1e61c6e97b158936cdb550aa50be5edb969.tar.gz
device_samsung_i9300-d43af1e61c6e97b158936cdb550aa50be5edb969.tar.bz2
initial adaptions for mainline kernel
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
-rw-r--r--BoardConfig.mk4
-rw-r--r--rootdir/fstab.smdk4x1210
-rw-r--r--rootdir/init.target.rc32
-rw-r--r--usr/keylayout/gpio-keys.kl2
4 files changed, 38 insertions, 10 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk
index e8b11b1..aee9508 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -36,9 +36,9 @@ BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/samsung/i9300/bluetooth
# Kernel
TARGET_KERNEL_SOURCE := kernel/samsung/smdk4412
-TARGET_KERNEL_CONFIG := cyanogenmod_i9300_defconfig
+TARGET_KERNEL_CONFIG := replicant_i9300_defconfig
# for a recent Android common kernel
-#BOARD_KERNEL_IMAGE_NAME := zImage-dtb
+BOARD_KERNEL_IMAGE_NAME := zImage-dtb
# for the mainline kernel
#BOARD_CUSTOM_BOOTIMG_MK := device/samsung/i9300/mkbootimg.mk
diff --git a/rootdir/fstab.smdk4x12 b/rootdir/fstab.smdk4x12
index 507d3ed..21de91b 100644
--- a/rootdir/fstab.smdk4x12
+++ b/rootdir/fstab.smdk4x12
@@ -2,11 +2,11 @@
# <src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
-/dev/block/mmcblk0p3 /efs ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait
-/dev/block/mmcblk0p9 /system ext4 ro,noatime wait
-/dev/block/mmcblk0p8 /cache ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait
-/dev/block/mmcblk0p10 /preload ext4 noatime,nosuid,nodev,journal_async_commit wait
-/dev/block/mmcblk0p12 /data ext4 noatime,nosuid,nodev,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer
+/dev/block/mmcblk1p3 /efs ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait
+/dev/block/mmcblk1p9 /system ext4 ro,noatime wait
+/dev/block/mmcblk1p8 /cache ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait
+/dev/block/mmcblk1p10 /preload ext4 noatime,nosuid,nodev,journal_async_commit wait
+/dev/block/mmcblk1p12 /data ext4 noatime,nosuid,nodev,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer
# vold-managed volumes ("block device" is actually a sysfs devpath)
/devices/platform/s3c-sdhci.2/mmc_host/mmc1* /storage/sdcard1 auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
diff --git a/rootdir/init.target.rc b/rootdir/init.target.rc
index 45b4501..7713c71 100644
--- a/rootdir/init.target.rc
+++ b/rootdir/init.target.rc
@@ -2,6 +2,26 @@ on init
# ko files for FM Radio
insmod /system/lib/modules/Si4709_driver.ko
+ # Create ConfigFS mount point for USB gadgets
+ # Add standard gadget entries
+ mount configfs none /config
+ mkdir /config/usb_gadget/g1
+ write /config/usb_gadget/g1/idVendor 0x18D1
+ write /config/usb_gadget/g1/idProduct 0x4E26
+ mkdir /config/usb_gadget/g1/strings/0x409
+ write /config/usb_gadget/g1/strings/0x409/serialnumber 0123459876
+ write /config/usb_gadget/g1/strings/0x409/manufacturer Samsung
+ write /config/usb_gadget/g1/strings/0x409/product I9300
+ mkdir /config/usb_gadget/g1/configs/c.1
+ mkdir /config/usb_gadget/g1/configs/c.1/strings/0x409
+ write /config/usb_gadget/g1/configs/c.1/strings/0x409/configuration "Conf 1"
+ write /config/usb_gadget/g1/configs/c.1/MaxPower 120
+
+ # Create adb+ffs gadget function
+ mkdir /config/usb_gadget/g1/functions/ffs.adb
+ mkdir /dev/usb-ffs 0770 shell shell
+ mkdir /dev/usb-ffs/adb 0770 shell shell
+ mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
on post-fs-data
# icd
@@ -14,7 +34,7 @@ on post-fs-data
chown system system /dev/tzic
# make param block device link for SysScope
- symlink /dev/block/mmcblk0p4 /dev/block/param
+ symlink /dev/block/mmcblk1p4 /dev/block/param
# Restorecon
restorecon_recursive /efs
@@ -42,7 +62,7 @@ on fs
# zram
swapon_all /fstab.smdk4x12
-#on boot
+on boot
# Start GPS daemon
#service gps-daemon /system/bin/sh /system/bin/gps_daemon.sh
# class main
@@ -51,6 +71,14 @@ on fs
# group system inet sdcard_rw gps
# seclabel u:r:glgps:s0
+ # always start adb
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/c.1/ffs.adb
+ start adbd
+ #Add this 2 second wait/delay to calm things down after adbd restart and before we enable UDC.
+ wait /dev/socket/waiting
+ write /config/usb_gadget/g1/UDC "12480000.hsotg"
+
+
on property:dev.bootcomplete=1
# boot on default pegasusq settings (for better performance)
# switch to more conservative settings after bootup is complete
diff --git a/usr/keylayout/gpio-keys.kl b/usr/keylayout/gpio-keys.kl
index 7014d5c..672993e 100644
--- a/usr/keylayout/gpio-keys.kl
+++ b/usr/keylayout/gpio-keys.kl
@@ -1,4 +1,4 @@
key 115 VOLUME_UP WAKE
key 114 VOLUME_DOWN WAKE
key 116 POWER WAKE
-key 172 HOME WAKE
+key 139 HOME WAKE