Fake EDID on odroid images 61/89461/5
authorAleksander Mistewicz <a.mistewicz@samsung.com>
Thu, 22 Sep 2016 09:03:28 +0000 (11:03 +0200)
committerAleksander Mistewicz <a.mistewicz@samsung.com>
Tue, 3 Jan 2017 15:13:57 +0000 (16:13 +0100)
Add tct/prepare/hdmi_force.sh
Author of this script: Andrzej Hajda <a.hajda@samsung.com>
Any change to this file may break this hack.

Add install_hdmi_force to tct/prepare/prepare.sh

Change-Id: Ie08f234c2dc8c5f1973d64e933e10e371dbcadc6
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
tct/odroid_prepare_flash_conf.sh
tct/prepare/hdmi_force.sh [new file with mode: 0755]
tct/prepare/prepare.sh

index 11b17bb..d7f4a24 100755 (executable)
@@ -50,6 +50,7 @@ unpack_image "${BOOT_IMAGE}" "${IMAGE}" "${IMAGE_UNPACKED}"
 
 mount_image "${IMAGE_UNPACKED}/rootfs.img" "${IMAGE_MOUNTPOINT}"
 install_iserial "${SDMUX}" "${IMAGE_MOUNTPOINT}"
+install_hdmi_force "${IMAGE_MOUNTPOINT}"
 unmount_image "${IMAGE_MOUNTPOINT}"
 
 echo "### flash ###"
diff --git a/tct/prepare/hdmi_force.sh b/tct/prepare/hdmi_force.sh
new file mode 100755 (executable)
index 0000000..971384a
Binary files /dev/null and b/tct/prepare/hdmi_force.sh differ
index 5c7a24c..76302eb 100755 (executable)
@@ -36,6 +36,15 @@ install_iserial() {
         "${IMAGE_MOUNTPOINT}/etc/systemd/system/multi-user.target.wants/iserial.service"
 }
 
+install_hdmi_force() {
+    test -n "${TESTLAB_SCRIPTS}" || die "Missing env: testlab_scripts!"
+    IMAGE_MOUNTPOINT="$1"
+    test -n "${IMAGE_MOUNTPOINT}" || die "Missing argument: image_mountpoint!"
+    sudo cp "${TESTLAB_SCRIPTS}/prepare/hdmi_force.sh" "${IMAGE_MOUNTPOINT}/usr/sbin/"
+    sudo sed -i 's|^ExecStart|ExecStartPre=/usr/sbin/hdmi_force.sh\nExecStart|' \
+        "${IMAGE_MOUNTPOINT}/usr/lib/systemd/system/display-manager.service"
+}
+
 unpack_image() {
     test $# -ge 2 || die "Too few arguments!"
     eval DESTINATION=\$$#