Files
buildroot/board/miyoo/main/apps/usb-hid/usb-hid.sh
tiopex e306510c79 Add ability to load btrfs, sound and usb drivers as a module (#176)
* Add ability to load btrfs and usb drivers as a module
* Add load sound driver
* firstboot: correct btrfs loading only on fs change

---------

Co-authored-by: Apaczer <94932128+Apaczer@users.noreply.github.com>
2025-07-05 23:22:02 +02:00

24 lines
634 B
Bash
Executable File

#!/bin/busybox sh
st_error_func(){
st -k -e "/bin/sh" "-c" "echo -e \"\e[31m${1}\e[0m\"; sleep 2"
}
st_exec_func(){
st -k -e "/bin/sh" "-c" "${1}"
}
echo peripheral > /sys/devices/platform/soc/1c13000.usb/musb-hdrc.1.auto/mode
killall umtprd umtprd-debug
/mnt/apps/usb-mtd/remove.sh g2
modprobe usb_f_hid
modprobe evdev
modprobe uinput
mount none /sys/kernel/config -t configfs
gadget-hid
st_exec_func "\
echo -e \"\e[32m\n\n\n\n\n\n Starting USB-HID mode\e[0m\n\n\n\"; \
sleep 1; \
python /mnt/apps/usb-hid/usb-hid.py"
gadget-vid-pid-remove 0x1d6b:0x0104
modprobe -r usb_f_hid
modprobe -r evdev
modprobe -r uinput