support milkv-duos

This commit is contained in:
carbon
2024-01-02 15:28:45 +08:00
parent bb11c7ccf5
commit cdaef96e0d
66 changed files with 1893 additions and 1 deletions

View File

@ -0,0 +1,8 @@
#!/bin/bash
export MV_BOARD=milkv-duos
export MV_BOARD_CPU=cv1813h
export MV_VENDOR=milkv
export MV_BUILD_ENV=milkvsetup.sh
export MV_BOARD_LINK=cv1813h_milkv_duos_emmc

View File

@ -0,0 +1,33 @@
image boot.vfat {
vfat {
label = "boot"
files = {
"fip.bin",
"rawimages/boot.sd",
}
}
size = 128M
}
image rootfs.ext4 {
ext4 {
label = "rootfs"
}
size = 768M
}
image milkv-duos.img {
hdimage {
}
partition boot {
partition-type = 0xC
bootable = "true"
image = "boot.vfat"
}
partition rootfs {
partition-type = 0x83
image = "rootfs.ext4"
}
}

View File

@ -0,0 +1,21 @@
#!/bin/sh
LED_PIN=509
LED_GPIO=/sys/class/gpio/gpio${LED_PIN}
if test -d ${LED_GPIO}; then
echo "PIN ${LED_PIN} already exported"
else
echo ${LED_PIN} > /sys/class/gpio/export
fi
echo out > ${LED_GPIO}/direction
while true; do
echo 0 > ${LED_GPIO}/value
sleep 0.5
echo 1 > ${LED_GPIO}/value
sleep 0.5
done

View File

@ -0,0 +1,4 @@
#!/bin/sh
# insmod pwm module
insmod /mnt/system/ko/cv181x_pwm.ko

View File

@ -0,0 +1,4 @@
#!/bin/sh
echo host > /proc/cviusb/otg_role >> /tmp/usb.log 2>&1

View File

@ -0,0 +1,14 @@
#!/bin/sh
/etc/uhubon.sh device >> /tmp/rndis.log 2>&1
/etc/run_usb.sh probe rndis >> /tmp/rndis.log 2>&1
/etc/run_usb.sh start rndis >> /tmp/rndis.log 2>&1
sleep 0.5
ifconfig usb0 192.168.42.1
count=`ps | grep dnsmasq | grep -v grep | wc -l`
if [ ${count} -lt 1 ] ;then
echo "/etc/init.d/S80dnsmasq start" >> /tmp/rndis.log 2>&1
/etc/init.d/S80dnsmasq start >> /tmp/rndis.log 2>&1
fi

View File

@ -0,0 +1 @@
usb-rndis.sh

Binary file not shown.