mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
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>
This commit is contained in:
@@ -5,15 +5,19 @@ st_error_func(){
|
||||
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 -r g_serial
|
||||
mount none /sys/kernel/config -t configfs
|
||||
gadget-hid
|
||||
st_exec_func "\
|
||||
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
|
||||
gadget-vid-pid-remove 0x1d6b:0x0104
|
||||
modprobe -r usb_f_hid
|
||||
modprobe -r evdev
|
||||
modprobe -r uinput
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
#!/bin/busybox sh
|
||||
echo host > /sys/devices/platform/soc/1c13000.usb/musb-hdrc.1.auto/mode
|
||||
sleep 2
|
||||
|
||||
modprobe evdev
|
||||
modprobe joydev
|
||||
modprobe analog
|
||||
modprobe xpad
|
||||
modprobe atkbd
|
||||
modprobe uinput
|
||||
modprobe psmouse
|
||||
modprobe synaptics_usb
|
||||
modprobe mousedev
|
||||
modprobe usbhid
|
||||
modprobe hid-generic
|
||||
modprobe hid
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/busybox sh
|
||||
|
||||
echo peripheral > /sys/devices/platform/soc/1c13000.usb/musb-hdrc.1.auto/mode
|
||||
modprobe -r g_serial
|
||||
modprobe usb_f_fs
|
||||
killall umtprd umtprd-debug
|
||||
/mnt/apps/usb-mtd/remove.sh g2
|
||||
mount none /sys/kernel/config -t configfs
|
||||
|
||||
@@ -5,9 +5,9 @@ MAC_HOST="12:34:56:78:9a:bd"
|
||||
MAC_DEV="12:34:56:78:9a:bc"
|
||||
|
||||
echo peripheral > /sys/devices/platform/soc/1c13000.usb/musb-hdrc.1.auto/mode
|
||||
modprobe -r g_serial
|
||||
killall umtprd umtprd-debug
|
||||
/mnt/apps/usb-mtd/remove.sh g2
|
||||
modprobe usb_f_rndis
|
||||
sleep 1
|
||||
|
||||
mount none /sys/kernel/config -t configfs
|
||||
|
||||
@@ -1,4 +1,31 @@
|
||||
#!/bin/busybox sh
|
||||
|
||||
echo peripheral > /sys/devices/platform/soc/1c13000.usb/musb-hdrc.1.auto/mode
|
||||
|
||||
killall umtprd umtprd-debug
|
||||
modprobe g_serial
|
||||
/mnt/apps/usb-mtd/remove.sh g2
|
||||
mount none /sys/kernel/config -t configfs
|
||||
|
||||
mkdir /sys/kernel/config/usb_gadget/g2
|
||||
cd /sys/kernel/config/usb_gadget/g2
|
||||
|
||||
mkdir configs/c.1
|
||||
mkdir functions/acm.usb0
|
||||
mkdir strings/0x409
|
||||
mkdir configs/c.1/strings/0x409
|
||||
|
||||
echo 0x0104 > idProduct # Produkt: CDC ACM (Serial)
|
||||
echo 0x1D6B > idVendor # Producent: Linux Foundation
|
||||
|
||||
echo "Miyoo Handheld" > strings/0x409/manufacturer
|
||||
echo "Miyoo CFW 2.0" > strings/0x409/product
|
||||
echo "deadbeef12345678" > strings/0x409/serialnumber
|
||||
|
||||
echo "Conf 1" > configs/c.1/strings/0x409/configuration
|
||||
echo 120 > configs/c.1/MaxPower
|
||||
|
||||
ln -s functions/acm.usb0 configs/c.1
|
||||
|
||||
sleep 1
|
||||
ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/g2/UDC
|
||||
|
||||
|
||||
Reference in New Issue
Block a user