diff --git a/lib/distributions.sh b/lib/distributions.sh index 6e61348c2..d2a52429b 100644 --- a/lib/distributions.sh +++ b/lib/distributions.sh @@ -233,6 +233,7 @@ install_common() chroot $SDCARD /bin/bash -c "systemctl daemon-reload" >> $DEST/debug/install.log 2>&1 chroot $SDCARD /bin/bash -c "systemctl --no-reload enable serial-getty@${array[0]}.service" >> $DEST/debug/install.log 2>&1 if [[ ${array[0]} == "ttyGS0" && $LINUXFAMILY == sun8i && $BRANCH == default ]]; then + mkdir -p $SDCARD/etc/systemd/system/serial-getty@ttyGS0.service.d cat <<-EOF > $SDCARD/etc/systemd/system/serial-getty@ttyGS0.service.d/10-switch-role.conf [Service] ExecStartPre=-/bin/sh -c "echo 2 > /sys/bus/platform/devices/sunxi_usb_udc/otg_role"