diff --git a/build/boards/sg200x/sg2002_licheervnano_sd/linux/sg2002_licheervnano_sd_defconfig b/build/boards/sg200x/sg2002_licheervnano_sd/linux/sg2002_licheervnano_sd_defconfig index 69fa3c829e..69bbf0f474 100644 --- a/build/boards/sg200x/sg2002_licheervnano_sd/linux/sg2002_licheervnano_sd_defconfig +++ b/build/boards/sg200x/sg2002_licheervnano_sd/linux/sg2002_licheervnano_sd_defconfig @@ -8,7 +8,7 @@ CONFIG_PREEMPT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=15 -CONFIG_BLK_DEV_INITRD=y +CONFIG_BLK_DEV_INITRD=n # CONFIG_SYSFS_SYSCALL is not set # CONFIG_FHANDLE is not set # CONFIG_BASE_FULL is not set @@ -58,7 +58,6 @@ CONFIG_MTD_UBI=y CONFIG_MTD_UBI_BLOCK=y CONFIG_NETDEVICES=y # CONFIG_NET_CORE is not set -CONFIG_AIC_WLAN_SUPPORT=y # CONFIG_NET_VENDOR_ALACRITECH is not set # CONFIG_NET_VENDOR_AMAZON is not set # CONFIG_NET_VENDOR_AQUANTIA is not set @@ -492,18 +491,6 @@ CONFIG_TIMERFD=n # for licheervnano CONFIG_FB_SIMPLE=y CONFIG_IP_MULTICAST=y -CONFIG_TCP_CONG_ADVANCED=y -CONFIG_MAC80211=y -CONFIG_MAC80211_RC_MINSTREL=y -CONFIG_U_SERIAL_CONSOLE=y -CONFIG_NET_CORE=y -CONFIG_WIREGUARD=y -CONFIG_TUN=y -CONFIG_PPP=y -CONFIG_PPPOE=y -CONFIG_PPP_ASYNC=y -CONFIG_PPP_SYNC_TTY=y -CONFIG_SLIP=y CONFIG_SND_PROC_FS=y CONFIG_BT=y CONFIG_BT_RFCOMM=y @@ -527,92 +514,6 @@ CONFIG_USB_F_EEM=y CONFIG_USB_GADGET_VBUS_DRAW=500 CONFIG_IPV6=y # CONFIG_IPV6_SIT is not set -CONFIG_NETFILTER=y -CONFIG_NETFILTER_ADVANCED=y -CONFIG_NET_IPIP=y -CONFIG_BRIDGE=y -CONFIG_INET_DIAG=y -CONFIG_INET_UDP_DIAG=y -CONFIG_INET_RAW_DIAG=y -CONFIG_INET_DIAG_DESTROY=y -CONFIG_IP_NF_IPTABLES=y -CONFIG_NF_TABLES=y -CONFIG_NF_TABLES_INET=y -CONFIG_NF_TABLES_NETDEV=y -CONFIG_NFT_NUMGEN=y -CONFIG_NFT_COUNTER=y -CONFIG_NFT_LOG=y -CONFIG_NFT_LIMIT=y -CONFIG_NFT_TUNNEL=y -CONFIG_NFT_OBJREF=y -CONFIG_NFT_QUOTA=y -CONFIG_NFT_REJECT=y -CONFIG_NFT_COMPAT=y -CONFIG_NFT_HASH=y -CONFIG_NFT_SOCKET=y -CONFIG_NFT_OSF=y -CONFIG_NFT_TPROXY=y -CONFIG_NF_DUP_NETDEV=y -CONFIG_NFT_DUP_NETDEV=y -CONFIG_NFT_FWD_NETDEV=y -CONFIG_NF_CONNTRACK=y -CONFIG_IP_NF_NAT=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_IP6_NF_IPTABLES=y -CONFIG_IP6_NF_NAT=y -CONFIG_IP6_NF_TARGET_MASQUERADE=y -CONFIG_IP6_NF_TARGET_NPT=y -CONFIG_NETFILTER_NETLINK_ACCT=y -CONFIG_NETFILTER_NETLINK_QUEUE=y -CONFIG_NETFILTER_NETLINK_LOG=y -CONFIG_NF_LOG_NETDEV=y -CONFIG_NF_CONNTRACK_MARK=y -CONFIG_NF_CONNTRACK_ZONES=y -CONFIG_NF_CONNTRACK_EVENTS=y -CONFIG_NF_CONNTRACK_TIMEOUT=y -CONFIG_NF_CONNTRACK_TIMESTAMP=y -CONFIG_NF_CONNTRACK_LABELS=y -CONFIG_NF_CT_NETLINK=y -CONFIG_NF_CT_NETLINK_TIMEOUT=y -CONFIG_NETFILTER_NETLINK_GLUE_CT=y -CONFIG_NF_CT_NETLINK_HELPER=y -CONFIG_NFT_CT=y -CONFIG_NFT_CONNLIMIT=y -CONFIG_NFT_MASQ=y -CONFIG_NFT_REDIR=y -CONFIG_NFT_NAT=y -CONFIG_NFT_QUEUE=y -CONFIG_NFT_SYNPROXY=y -CONFIG_NF_FLOW_TABLE=y -CONFIG_NF_FLOW_TABLE_INET=y -CONFIG_NFT_DUP_IPV4=y -CONFIG_NFT_FIB_IPV4=y -CONFIG_NF_TABLES_ARP=y -CONFIG_NF_FLOW_TABLE_IPV4=y -CONFIG_NF_LOG_IPV4=y -CONFIG_NF_LOG_ARP=y -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -CONFIG_IP_NF_TARGET_SYNPROXY=y -CONFIG_IP_NF_MANGLE=y -CONFIG_IP_NF_TARGET_CLUSTERIP=y -CONFIG_IP_NF_TARGET_ECN=y -CONFIG_IP_NF_TARGET_TTL=y -CONFIG_IP_NF_RAW=y -CONFIG_IP_NF_ARPTABLES=y -CONFIG_IP_NF_ARPFILTER=y -CONFIG_IP_NF_ARP_MANGLE=y -CONFIG_IP6_NF_FILTER=y -CONFIG_IP6_NF_TARGET_REJECT=y -CONFIG_IP6_NF_TARGET_SYNPROXY=y -CONFIG_IP6_NF_MANGLE=y -CONFIG_IP6_NF_RAW=y -CONFIG_NF_DUP_IPV6=y -CONFIG_NFT_DUP_IPV6=y -CONFIG_NFT_FIB_IPV6=y -CONFIG_NF_CONNTRACK_BRIDGE=y CONFIG_PACKET_DIAG=y CONFIG_UNIX_DIAG=y CONFIG_NETLINK_DIAG=y @@ -620,17 +521,6 @@ CONFIG_AIC_WLAN_SUPPORT=y CONFIG_KEYBOARD_GPIO=y CONFIG_INPUT_TOUCHSCREEN=y CONFIG_TOUCHSCREEN_HYNITRON_TS=y -CONFIG_RD_XZ=y -CONFIG_RD_LZMA=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_F2FS_FS=y -CONFIG_F2FS_FS_COMPRESSION=y -CONFIG_F2FS_FS_LZO=y -CONFIG_F2FS_FS_LZ4=y -CONFIG_F2FS_FS_ZSTD=y -CONFIG_F2FS_FS_LZORLE=y -CONFIG_EROFS_FS=y -CONFIG_EROFS_FS_ZIP=y CONFIG_MAGIC_SYSRQ=y # CONFIG_MAGIC_SYSRQ_SERIAL is not set CONFIG_NEW_LEDS=y @@ -649,34 +539,27 @@ CONFIG_V4L2_FLASH_LED_CLASS=y CONFIG_MEDIA_USB_SUPPORT=y CONFIG_USB_VIDEO_CLASS=y CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y -# these driver may be broken jpeg driver +# these driver may broken codec driver # CONFIG_FUSE_FS is not set # CONFIG_CUSE is not set # CONFIG_OVERLAY_FS is not set # CONFIG_NAMESPACES is not set # CONFIG_UTS_NS is not set # CONFIG_IPC_NS is not set -# CONFIG_USER_NS=y -# CONFIG_PID_NS=y -# CONFIG_NET_NS=y -# CONFIG_CGROUPS=y -# CONFIG_MEMCG=y -# CONFIG_BLK_CGROUP=y -# CONFIG_CGROUP_SCHED=y -# CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH=y -# CONFIG_RT_GROUP_SCHED=y -# CONFIG_CGROUP_PIDS=y -# CONFIG_CGROUP_DEVICE=y -# CONFIG_CHECKPOINT_RESTORE=y +# CONFIG_USER_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_NET_NS is not set +# CONFIG_CGROUPS is not set +# CONFIG_MEMCG is not set +# CONFIG_BLK_CGROUP is not set +# CONFIG_CGROUP_SCHED is not set +# CONFIG_FAIR_GROUP_SCHED is not set +# CONFIG_CFS_BANDWIDTH is not set +# CONFIG_RT_GROUP_SCHED is not set +# CONFIG_CGROUP_PIDS is not set +# CONFIG_CGROUP_DEVICE is not set +# CONFIG_CHECKPOINT_RESTORE is not set CONFIG_EPOLL=y CONFIG_IO_URING=y CONFIG_SIGNALFD=y diff --git a/build/tools/common/sd_tools/genimage_rootless.cfg b/build/tools/common/sd_tools/genimage_rootless.cfg index 675118824d..a00ca6db00 100644 --- a/build/tools/common/sd_tools/genimage_rootless.cfg +++ b/build/tools/common/sd_tools/genimage_rootless.cfg @@ -4,6 +4,10 @@ image boot.vfat { files = { "fip.bin", "rawimages/boot.sd", + "usb.dev", + "usb.rndis0", + "fb", + "wifi.sta", } } size = 16M diff --git a/build/tools/common/sd_tools/sd_gen_burn_image_rootless.sh b/build/tools/common/sd_tools/sd_gen_burn_image_rootless.sh index 2a013d4421..ef666af03d 100755 --- a/build/tools/common/sd_tools/sd_gen_burn_image_rootless.sh +++ b/build/tools/common/sd_tools/sd_gen_burn_image_rootless.sh @@ -25,6 +25,11 @@ mkdir -pv ${output_dir}/input/rawimages/ cp -fv ${output_dir}/fip.bin ${output_dir}/input/ cp -fv ${output_dir}/rawimages/boot.sd ${output_dir}/input/rawimages/ cp -fv ${output_dir}/rawimages/rootfs.sd ${output_dir}/input/ +touch ${output_dir}/input/usb.dev +touch ${output_dir}/input/usb.rndis0 +touch ${output_dir}/input/fb +touch ${output_dir}/input/wifi.sta +touch ${output_dir}/input/gt9xx cp -fv ${THISDIR}/genimage_rootless.cfg ${output_dir}/genimage.cfg sed -i -e "s/duo.img/${image}/g" ${output_dir}/genimage.cfg cd ${output_dir}/ diff --git a/buildroot/board/cvitek/SG200X/overlay/etc/init.d/S03usbdev b/buildroot/board/cvitek/SG200X/overlay/etc/init.d/S03usbdev index 971246485a..4e0d778b87 100755 --- a/buildroot/board/cvitek/SG200X/overlay/etc/init.d/S03usbdev +++ b/buildroot/board/cvitek/SG200X/overlay/etc/init.d/S03usbdev @@ -17,13 +17,13 @@ then then cat /boot/usb.idVendor > idVendor else - echo 0x0123 > idVendor + echo 0x3346 > idVendor fi if [ -e /boot/usb.idProduct ] then cat /boot/usb.idProduct > idProduct else - echo 0x4567 > idProduct + echo 0x1009 > idProduct fi mkdir strings/0x409 if [ -e /boot/usb.serialnumber ] @@ -55,6 +55,29 @@ then mkdir functions/rndis.usb0 ln -s functions/rndis.usb0 configs/c.1/ fi + if [ -e /boot/usb.disk0 ] + then + mkdir functions/mass_storage.disk0 + ln -s functions/mass_storage.disk0 configs/c.1/ + echo 1 > functions/mass_storage.disk0/lun.0/removable + if [ -e /boot/usb.disk0.ro ] + then + echo 1 > functions/mass_storage.disk0/lun.0/ro + echo 1 > functions/mass_storage.disk0/lun.0/cdrom + fi + disk=$(cat /boot/usb.disk0) + if [ -z "${disk}" ] + then + if [ ! -e /mnt/usbdisk.img ] + then + dd if=/dev/zero of=/mnt/usbdisk.img bs=1M count=16 + mkfs.vfat /mnt/usbdisk.img + fi + echo /mnt/usbdisk.img > functions/mass_storage.disk0/lun.0/file + else + cat /boot/usb.disk0 > functions/mass_storage.disk0/lun.0/file + fi + fi ls /sys/class/udc/ | cat > UDC echo device > /proc/cviusb/otg_role fi diff --git a/buildroot/configs/cvitek_SG200X_musl_riscv64_defconfig b/buildroot/configs/cvitek_SG200X_musl_riscv64_defconfig index 9e0813de84..a9908e8529 100644 --- a/buildroot/configs/cvitek_SG200X_musl_riscv64_defconfig +++ b/buildroot/configs/cvitek_SG200X_musl_riscv64_defconfig @@ -183,6 +183,7 @@ BR2_PACKAGE_XORCURSES=y BR2_PACKAGE_INPUT_EVENT_DAEMON=y BR2_PACKAGE_BLUEZ_TOOLS=y BR2_PACKAGE_TPUDEMO_SG200X=y +BR2_PACKAGE_SG2002_CODEC_FIRMWARE=y BR2_PACKAGE_TCPDUMP=y BR2_PACKAGE_SSDP_RESPONDER=y BR2_PACKAGE_PPPD=y diff --git a/buildroot/package/Config.in b/buildroot/package/Config.in index a901677996..e9e1505e9d 100644 --- a/buildroot/package/Config.in +++ b/buildroot/package/Config.in @@ -2807,6 +2807,7 @@ menu "Sipeed" source "package/lcdtest/Config.in" source "package/tpudemo-sg200x/Config.in" source "package/xuantie-gdb/Config.in" + source "package/sg2002-codec-firmware/Config.in" endmenu diff --git a/buildroot/package/sg2002-codec-firmware/Config.in b/buildroot/package/sg2002-codec-firmware/Config.in new file mode 100644 index 0000000000..c5eac91ad7 --- /dev/null +++ b/buildroot/package/sg2002-codec-firmware/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_SG2002_CODEC_FIRMWARE + bool "sg2002-codec-firmware" + help + sg2002 codec firmware diff --git a/buildroot/package/sg2002-codec-firmware/sg2002-codec-firmware.mk b/buildroot/package/sg2002-codec-firmware/sg2002-codec-firmware.mk new file mode 100644 index 0000000000..92a84f6863 --- /dev/null +++ b/buildroot/package/sg2002-codec-firmware/sg2002-codec-firmware.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# sg2002-codec-firmware +# +################################################################################ + +SG2002_CODEC_FIRMWARE_VERSION = 1e339b782642ce1b2c8aa81f9fdef212912a6a83 +SG2002_CODEC_FIRMWARE_SITE = $(call github,0x754C,sg2002_codec_fw,$(SG2002_CODEC_FIRMWARE_VERSION)) + +define SG2002_CODEC_FIRMWARE_INSTALL_TARGET_CMDS + mkdir -pv $(TARGET_DIR)/usr/share/fw_vcodec/ + rsync -r --verbose --copy-dirlinks --copy-links --hard-links ${@D}/* $(TARGET_DIR)/usr/share/fw_vcodec/ +endef + +$(eval $(generic-package))