diff --git a/device/testing/device-samsung-dream/APKBUILD b/device/testing/device-samsung-dream/APKBUILD index 4c4a53bfc..06f2f9807 100644 --- a/device/testing/device-samsung-dream/APKBUILD +++ b/device/testing/device-samsung-dream/APKBUILD @@ -2,7 +2,7 @@ pkgname=device-samsung-dream pkgdesc="Samsung Galaxy S8/S8+" pkgver=0.1 -pkgrel=0 +pkgrel=1 url="https://postmarketos.org" license="MIT" arch="aarch64" @@ -43,4 +43,4 @@ nonfree_firmware() { } sha512sums="8fdfb5715a3eb4d757c53995875841b1fe6d9e98878b97a30e0ec8a86e8486487cf88c4d068448d1004eeec10c6196a387d113b490856b45336b27d431c374f9 deviceinfo -36868de8bbdcad55413ca455580c42848ba4ce07814b140eece2241e9656adfed4986da0aa0ec6ed04d478aeeab417be583b0fbcc79c90557798004c99e25d0e initfs-hook.sh" +73eb760c6e29c7500b3a2090310f467bb906f7bef2556b80e00e57c25a5fdb1089e86438e67744861a5d43096d8733b812efe39e90a83584816a79d9024a2ec4 initfs-hook.sh" diff --git a/device/testing/device-samsung-dream/initfs-hook.sh b/device/testing/device-samsung-dream/initfs-hook.sh index 1ac855787..c0dafb09e 100644 --- a/device/testing/device-samsung-dream/initfs-hook.sh +++ b/device/testing/device-samsung-dream/initfs-hook.sh @@ -1,7 +1,22 @@ #!/bin/sh -# shellcheck disable=SC1091 -. /etc/deviceinfo -. ./init_functions.sh -# Device requires usb network initialization through configfs first -setup_usb_network_configfs +# This is a trimmed down version of setup_usb_network_configfs from +# pmOS's init_functions.sh + +# See: https://www.kernel.org/doc/Documentation/usb/gadget_configfs.txt +CONFIGFS=/config/usb_gadget + +# Create an usb gadet configuration +mkdir $CONFIGFS/g1 || echo "initfs-hook: Couldn't create $CONFIGFS/g1" + +# Create rndis function. +mkdir $CONFIGFS/g1/functions/rndis.usb0 \ + || echo "initfs-hook: Couldn't create $CONFIGFS/g1/functions/rndis.usb0" + +# Create configuration instance for the gadget +mkdir $CONFIGFS/g1/configs/c.1 \ + || echo "initfs-hook: Couldn't create $CONFIGFS/g1/configs/c.1" + +# Link the rndis instance to the configuration +ln -s $CONFIGFS/g1/functions/rndis.usb0 $CONFIGFS/g1/configs/c.1 \ + || echo "initfs-hook: Couldn't symlink rndis.usb0"