Compare commits
4 Commits
65961df77c
...
Develop_tm
| Author | SHA1 | Date | |
|---|---|---|---|
| 6062e38207 | |||
| 8894286775 | |||
| fa387c6f72 | |||
| 0a3ea3f789 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,7 +2,7 @@
|
||||
tags
|
||||
.svim
|
||||
.DS_Store
|
||||
compile_commands.json
|
||||
compile_commands*.json
|
||||
|
||||
*~
|
||||
*.swp
|
||||
|
||||
@ -301,6 +301,8 @@ ifeq ($(patsubst "%",%,$(CONFIG_ARCH)),arm64)
|
||||
# Since we will support aarch32 user space even if the kernel is aarch64, install aarch32 headers also
|
||||
${Q}$(MAKE) -j${NPROC} -C ${KERNEL_PATH} ARCH=arm headers_install INSTALL_HDR_PATH=${KERNEL_PATH}/${KERNEL_OUTPUT_FOLDER}/arm/usr
|
||||
endif
|
||||
${Q}mkdir -p ${KERNEL_PATH}/${KERNEL_OUTPUT_FOLDER}/tools
|
||||
${Q}$(MAKE) -j${NPROC} -C ${KERNEL_PATH}/tools O=${KERNEL_PATH}/${KERNEL_OUTPUT_FOLDER}/tools usb
|
||||
|
||||
DTS_DEFATUL_PATHS := \
|
||||
${BUILD_PATH}/boards/default/dts/${CHIP_ARCH_L} \
|
||||
|
||||
@ -230,3 +230,6 @@ CONFIG_DEBUG_FS=y
|
||||
# CONFIG_FTRACE is not set
|
||||
# CONFIG_STRICT_DEVMEM is not set
|
||||
# CONFIG_RUNTIME_TESTING_MENU is not set
|
||||
CONFIG_USB_ZERO=m
|
||||
CONFIG_USB_F_SS_LB=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
|
||||
@ -27,3 +27,4 @@ CONFIG_TARGET_PACKAGE_MTD-UTILS=y
|
||||
# CONFIG_TARGET_PACKAGE_RSYSLOG is not set
|
||||
CONFIG_TARGET_PACKAGE_BUSYBOX_SYSLOGD_SCRIPT=y
|
||||
CONFIG_TARGET_PACKAGE_NTP=y
|
||||
CONFIG_USB_F_SS_LB=y
|
||||
|
||||
@ -256,7 +256,7 @@ start() {
|
||||
mkdir /dev/usb-ffs/adb -p
|
||||
mount -t functionfs adb /dev/usb-ffs/adb
|
||||
if [ -f $ADBD_PATH/adbd ]; then
|
||||
$ADBD_PATH/adbd &
|
||||
$ADBD_PATH/adbd &
|
||||
fi
|
||||
else
|
||||
# Start the gadget driver
|
||||
|
||||
@ -20,6 +20,59 @@
|
||||
|
||||
#include "u_os_desc.h"
|
||||
|
||||
//#if defined (CONFIG_GAOYANG)
|
||||
// (struct usb_descriptor_header *) &WINUSB_WCIDDescriptor,
|
||||
//#endif // defined (CONFIG_GAOYANG)
|
||||
#if defined (CONFIG_GAOYANG)
|
||||
|
||||
#define WINUSB_IF0_WCID_PROPERTIES_SIZE (162)
|
||||
|
||||
const uint8_t WINUSB20_WCIDDescriptorSet [162] = {
|
||||
///////////////////////////////////////
|
||||
/// WCID20 descriptor set descriptor
|
||||
///////////////////////////////////////
|
||||
0x0a, 0x00, /* wLength */
|
||||
0x00, 0x00, /* wDescriptorType */
|
||||
0x00, 0x00, 0x03, 0x06, /* dwWindowsVersion */
|
||||
0xa2, 0x00, /* wDescriptorSetTotalLength */
|
||||
///////////////////////////////////////
|
||||
/// WCID20 compatible ID descriptor
|
||||
///////////////////////////////////////
|
||||
0x14, 0x00, /* wLength */
|
||||
0x03, 0x00, /* wDescriptorType */
|
||||
/* WINUSB */
|
||||
'W', 'I', 'N', 'U', 'S', 'B', 0x00, 0x00, /* cCID_8 */
|
||||
/* */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* cSubCID_8 */
|
||||
///////////////////////////////////////
|
||||
/// WCID20 registry property descriptor
|
||||
///////////////////////////////////////
|
||||
0x84, 0x00, /* wLength */
|
||||
0x04, 0x00, /* wDescriptorType */
|
||||
0x07, 0x00, /* wPropertyDataType */
|
||||
0x2a, 0x00, /* wPropertyNameLength */
|
||||
/* DeviceInterfaceGUIDs */
|
||||
'D', 0x00, 'e', 0x00, 'v', 0x00, 'i', 0x00, /* wcPropertyName_21 */
|
||||
'c', 0x00, 'e', 0x00, 'I', 0x00, 'n', 0x00, /* wcPropertyName_21 */
|
||||
't', 0x00, 'e', 0x00, 'r', 0x00, 'f', 0x00, /* wcPropertyName_21 */
|
||||
'a', 0x00, 'c', 0x00, 'e', 0x00, 'G', 0x00, /* wcPropertyName_21 */
|
||||
'U', 0x00, 'I', 0x00, 'D', 0x00, 's', 0x00, /* wcPropertyName_21 */
|
||||
0x00, 0x00, /* wcPropertyName_21 */
|
||||
0x50, 0x00, /* wPropertyDataLength */
|
||||
/* {1D4B2365-4749-48EA-B38A-7C6FDDDD7E26} */
|
||||
'{', 0x00, '1', 0x00, 'D', 0x00, '4', 0x00, /* wcPropertyData_40 */
|
||||
'B', 0x00, '2', 0x00, '3', 0x00, '6', 0x00, /* wcPropertyData_40 */
|
||||
'5', 0x00, '-', 0x00, '4', 0x00, '7', 0x00, /* wcPropertyData_40 */
|
||||
'4', 0x00, '9', 0x00, '-', 0x00, '4', 0x00, /* wcPropertyData_40 */
|
||||
'8', 0x00, 'E', 0x00, 'A', 0x00, '-', 0x00, /* wcPropertyData_40 */
|
||||
'B', 0x00, '3', 0x00, '8', 0x00, 'A', 0x00, /* wcPropertyData_40 */
|
||||
'-', 0x00, '7', 0x00, 'C', 0x00, '6', 0x00, /* wcPropertyData_40 */
|
||||
'F', 0x00, 'D', 0x00, 'D', 0x00, 'D', 0x00, /* wcPropertyData_40 */
|
||||
'D', 0x00, '7', 0x00, 'E', 0x00, '2', 0x00, /* wcPropertyData_40 */
|
||||
'6', 0x00, '}', 0x00, 0x00, 0x00, 0x00, 0x00, /* wcPropertyData_40 */
|
||||
};
|
||||
#endif // defined (CONFIG_GAOYANG)
|
||||
|
||||
/**
|
||||
* struct usb_os_string - represents OS String to be reported by a gadget
|
||||
* @bLength: total length of the entire descritor, always 0x12
|
||||
@ -1937,6 +1990,14 @@ unknown:
|
||||
/*
|
||||
* OS descriptors handling
|
||||
*/
|
||||
#if defined (CONFIG_GAOYANG)
|
||||
if (ctrl->bRequestType == 0xC0) {
|
||||
value = min_t(int, w_length, sizeof(WINUSB20_WCIDDescriptorSet));
|
||||
memcpy(req->buf, WINUSB20_WCIDDescriptorSet, value);
|
||||
|
||||
goto check_value;
|
||||
}
|
||||
#endif // defined (CONFIG_GAOYANG)
|
||||
if (cdev->use_os_string && cdev->os_desc_config &&
|
||||
(ctrl->bRequestType & USB_TYPE_VENDOR) &&
|
||||
ctrl->bRequest == cdev->b_vendor_code) {
|
||||
|
||||
Reference in New Issue
Block a user