Code: Select all
#use the update script to enable the VPN to allow opkg downloads
sh update-rooted.sh -o
#update the opkg database
opkg update
#install necessary modules
opkg install kernel-module-usb-f-acm kernel-module-ci-hdrc-imx
#enable the modules
modprobe usb_f_acm
modprobe ci_hdrc_imx
#mount configfs
mount -t configfs none /sys/kernel/config
#create the usb gadget
mkdir -p /sys/kernel/config/usb_gadget/g.1
cd /sys/kernel/config/usb_gadget/g.1
# configure USB params
echo 0x066F > idVendor
echo 0x37FF > idProduct
mkdir -p strings/0x409
cat /proc/device-tree/chosen/quby/sn > strings/0x409/serialnumber
# create the configuration (idempotent)
mkdir -p configs/c.1
echo 120 > configs/c.1/MaxPower
# create the function (idempotent)
mkdir -p functions/acm.0
# associate the function (idempotent)
ln -sf functions/acm.0 configs/c.1
# disable the USB gadget (idempotent)
if [ -n "$(cat UDC)" ]; then
echo "" >UDC
fi
# enable the USB gadget
echo "ci_hdrc.0" >UDC
#connect your pc via a normal USB cable to the toon (you need a USB-A to USB-A, or if you have a USB-C port on your computer you could use a USB-A to USB-C)
#start getty manually:
su root -c "/sbin/getty 38400 ttyGS0" &
#connect to the toon2 with putty on the com-port which your computer created and use baud 38400
Proof: