initramfs starts USB NCM gadget and unudhcpd for SSH login.
This requires special handling since unudhpcd is unmanaged by the
service manager until the userspace is started. Once entered in userspace,
the usb-moded-developer-mode needs to be activated which configures
NetworkManager and starts unudhcpd under the service manager.
This way, a full handover is possible and the gadgets can be properly
switched without any leftovers from the initramfs due to the unmanaged
situation.
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8553>
This changes the override to:
1) use /sys/kernel/config for the configfs location
2) depend on the sys-kernel-config.mount unit, which will automatically
mount configfs
3) depend on modprobing libcomposite
4) create the g1/configs/c.1 path automatically in case it's not created
yet
The configfs.ini file is also updated with the path
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8175>
MTP transfers write files to the home folder of the user.
If no GID and UID are specified, uMTP-responder will use the GID/UID
under which it is running at the time of the file transfer.
This causes users to not be able to access the files on the device after transfering.
This patch adds a systemd generator that:
1) reads /etc/default_user, and appends config to
/etc/umtprd/umtprd.conf to set the MTP default user/group. If this
file doesn't exist, 10000:10000 is the fallback uid:gid.
2) installs this config to /run/umtprd/umptrd.conf
3) adds a unit override to /run for umtprd.service that runs the daemon
with this modified config
The generator is used instead of hardcoding a uid and gid in umtprd.conf
so that this can support immutable installs or situations where the
default UID/GID is not 10000.
Co-authored-by: Dylan Van Assche <dylan@postmarketos.org>
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7658>
This pkg contains usb-moded profile config and config for setting
default profile based on pmb_select.
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6531>