요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Configuration과 language-specific strings
configfs-usb-gadget:34-66Configuration의 characteristics와 maximum bus power를 설정하고 language별 configuration description을 제공합니다.
Function interface feature와 extended property descriptors
configfs-usb-gadget:69-112Gadget function group 아래 interface별 Compatible ID와 property별 type 1-7 및 typed data blob을 구성합니다.
Gadget language strings
configfs-usb-gadget:114-131Language별 serial number, product description과 manufacturer description을 제공합니다.
Microsoft OS descriptor와 WebUSB extensions
configfs-usb-gadget:133-158OS String extension의 enable·vendor code·signature와 WebUSB의 enable·version·vendor code·landing page를 구성합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /config/usb-gadget
Date: Jun 2013
KernelVersion: 3.11
Description:
This group contains sub-groups corresponding to created
USB gadgets.
What: /config/usb-gadget/gadget
Date: Jun 2013
KernelVersion: 3.11
Description:
The attributes of a gadget:
================ ============================================
UDC bind a gadget to UDC/unbind a gadget;
write UDC's name found in /sys/class/udc/*
to bind a gadget, empty string "" to unbind.
max_speed maximum speed the driver supports. Valid
names are super-speed-plus, super-speed,
high-speed, full-speed, and low-speed.
bDeviceClass USB device class code
bDeviceSubClass USB device subclass code
bDeviceProtocol USB device protocol code
bMaxPacketSize0 maximum endpoint 0 packet size
bcdDevice bcd device release number
bcdUSB bcd USB specification version number
idProduct product ID
idVendor vendor ID
================ ============================================
What: /config/usb-gadget/gadget/configs
Date: Jun 2013
KernelVersion: 3.11
Description:
This group contains a USB gadget's configurations
What: /config/usb-gadget/gadget/configs/config
Date: Jun 2013
KernelVersion: 3.11
Description:
The attributes of a configuration:
================ ======================================
bmAttributes configuration characteristics
MaxPower maximum power consumption from the bus
================ ======================================
What: /config/usb-gadget/gadget/configs/config/strings
Date: Jun 2013
KernelVersion: 3.11
Description:
This group contains subdirectories for language-specific
strings for this configuration.
What: /config/usb-gadget/gadget/configs/config/strings/language
Date: Jun 2013
KernelVersion: 3.11
Description:
The attributes:
================ =========================
configuration configuration description
================ =========================
What: /config/usb-gadget/gadget/functions
Date: Jun 2013
KernelVersion: 3.11
Description:
This group contains functions available to this USB gadget.
What: /config/usb-gadget/gadget/functions/<func>.<inst>/interface.<n>
Date: May 2014
KernelVersion: 3.16
Description:
This group contains "Feature Descriptors" specific for one
gadget's USB interface or one interface group described
by an IAD.
The attributes:
================= =====================================
compatible_id 8-byte string for "Compatible ID"
sub_compatible_id 8-byte string for "Sub Compatible ID"
================= =====================================
What: /config/usb-gadget/gadget/functions/<func>.<inst>/interface.<n>/<property>
Date: May 2014
KernelVersion: 3.16
Description:
This group contains "Extended Property Descriptors" specific for one
gadget's USB interface or one interface group described
by an IAD.
The attributes:
===== ===============================================
type value 1..7 for interpreting the data
- 1: unicode string
- 2: unicode string with environment variable
- 3: binary
- 4: little-endian 32-bit
- 5: big-endian 32-bit
- 6: unicode string with a symbolic link
- 7: multiple unicode strings
data blob of data to be interpreted depending on
type
===== ===============================================
What: /config/usb-gadget/gadget/strings
Date: Jun 2013
KernelVersion: 3.11
Description:
This group contains subdirectories for language-specific
strings for this gadget.
What: /config/usb-gadget/gadget/strings/language
Date: Jun 2013
KernelVersion: 3.11
Description:
The attributes:
============ =================================
serialnumber gadget's serial number (string)
product gadget's product description
manufacturer gadget's manufacturer description
============ =================================
What: /config/usb-gadget/gadget/os_desc
Date: May 2014
KernelVersion: 3.16
Description:
This group contains "OS String" extension handling attributes.
============= ===============================================
use flag turning "OS Descriptors" support on/off
b_vendor_code one-byte value used for custom per-device and
per-interface requests
qw_sign an identifier to be reported as "OS String"
proper
============= ===============================================
What: /config/usb-gadget/gadget/webusb
Date: Dec 2022
KernelVersion: 6.3
Description:
This group contains "WebUSB" extension handling attributes.
============= ===============================================
use flag turning "WebUSB" support on/off
bcdVersion bcd WebUSB specification version number
bVendorCode one-byte value used for custom per-device
landingPage UTF-8 encoded URL of the device's landing page
============= ===============================================
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
생성된 USB gadget group
1-6| 항목 | 내용 |
|---|---|
| What | /config/usb-gadget |
| Date | 2013년 6월 |
| KernelVersion | 3.11 |
| Description | 생성된 USB gadget에 대응하는 subgroup을 담는다. |
Gadget device descriptor와 UDC binding
8-32| 항목 | 내용 |
|---|---|
| What | /config/usb-gadget/gadget |
| Date | 2013년 6월 |
| KernelVersion | 3.11 |
| Attribute | 설명 |
|---|---|
| UDC | Gadget을 UDC에 bind하거나 unbind한다. Bind하려면 `/sys/class/udc/*`에서 찾은 UDC 이름을 쓰고, unbind하려면 빈 문자열 `""`을 쓴다. |
| max_speed | Driver가 지원하는 최대 속도이다. 유효한 이름은 `super-speed-plus`, `super-speed`, `high-speed`, `full-speed`, `low-speed`이다. |
| bDeviceClass | USB device class code |
| bDeviceSubClass | USB device subclass code |
| bDeviceProtocol | USB device protocol code |
| bMaxPacketSize0 | Endpoint 0의 maximum packet size |
| bcdDevice | BCD device release number |
| bcdUSB | BCD USB specification version number |
| idProduct | Product ID |
| idVendor | Vendor ID |
USB gadget configuration
34-49| 항목 | 내용 |
|---|---|
| What | /config/usb-gadget/gadget/configs |
| Date | 2013년 6월 |
| KernelVersion | 3.11 |
| Description | USB gadget의 configuration을 담는 group이다. |
| Child | /config/usb-gadget/gadget/configs/config |
| Configuration attribute | 설명 |
|---|---|
| bmAttributes | Configuration characteristics |
| MaxPower | Bus에서 소비하는 maximum power |
Configuration의 language-specific string
51-66| 경로 | 내용 |
|---|---|
| /config/usb-gadget/gadget/configs/config/strings | 이 configuration의 language-specific string을 위한 subdirectory를 담는다. |
| /config/usb-gadget/gadget/configs/config/strings/language | `configuration` attribute에 configuration description을 담는다. |
두 ABI 모두 2013년 6월, Linux 3.11에 도입되었다.
Gadget에서 사용할 수 있는 function group
69-73| 항목 | 내용 |
|---|---|
| What | /config/usb-gadget/gadget/functions |
| Date | 2013년 6월 |
| KernelVersion | 3.11 |
| Description | 이 USB gadget에서 사용할 수 있는 function을 담는다. |
USB interface Feature Descriptor
75-88| 항목 | 내용 |
|---|---|
| What | /config/usb-gadget/gadget/functions/<func>.<inst>/interface.<n> |
| Date | 2014년 5월 |
| KernelVersion | 3.16 |
| Description | Gadget의 한 USB interface 또는 IAD가 설명하는 한 interface group에 특화된 Feature Descriptor를 담는다. |
| Attribute | 설명 |
|---|---|
| compatible_id | Compatible ID를 위한 8-byte 문자열 |
| sub_compatible_id | Sub Compatible ID를 위한 8-byte 문자열 |
USB interface Extended Property Descriptor
90-112| 항목 | 내용 |
|---|---|
| What | /config/usb-gadget/gadget/functions/<func>.<inst>/interface.<n>/<property> |
| Date | 2014년 5월 |
| KernelVersion | 3.16 |
| Description | Gadget의 한 USB interface 또는 IAD가 설명하는 한 interface group에 특화된 Extended Property Descriptor를 담는다. |
| type 값 | data 해석 |
|---|---|
| 1 | Unicode string |
| 2 | Environment variable을 포함한 Unicode string |
| 3 | Binary |
| 4 | Little-endian 32-bit |
| 5 | Big-endian 32-bit |
| 6 | Symbolic link를 포함한 Unicode string |
| 7 | 여러 Unicode string |
`type`은 data 해석 방식을 정하는 1부터 7까지의 값이고, `data`는 type에 따라 해석할 data blob이다.
Gadget의 language-specific string descriptor
114-131| 경로 | 내용 |
|---|---|
| /config/usb-gadget/gadget/strings | 이 gadget의 language-specific string을 위한 subdirectory를 담는다. |
| /config/usb-gadget/gadget/strings/language | Language별 string attribute를 담는다. |
| Attribute | 설명 |
|---|---|
| serialnumber | Gadget serial number 문자열 |
| product | Gadget product description |
| manufacturer | Gadget manufacturer description |
두 ABI 모두 2013년 6월, Linux 3.11에 도입되었다.
Microsoft OS String extension
133-145| 항목 | 내용 |
|---|---|
| What | /config/usb-gadget/gadget/os_desc |
| Date | 2014년 5월 |
| KernelVersion | 3.16 |
| Description | OS String extension 처리 attribute를 담는다. |
| Attribute | 설명 |
|---|---|
| use | OS Descriptor 지원을 켜거나 끄는 flag |
| b_vendor_code | Device별 및 interface별 custom request에 사용하는 1-byte 값 |
| qw_sign | OS String 자체로 보고할 identifier |
WebUSB extension
147-158| 항목 | 내용 |
|---|---|
| What | /config/usb-gadget/gadget/webusb |
| Date | 2022년 12월 |
| KernelVersion | 6.3 |
| Description | WebUSB extension 처리 attribute를 담는다. |
| Attribute | 설명 |
|---|---|
| use | WebUSB 지원을 켜거나 끄는 flag |
| bcdVersion | BCD WebUSB specification version number |
| bVendorCode | Custom per-device request에 사용하는 1-byte 값 |
| landingPage | Device landing page의 UTF-8 encoded URL |
Gadget root 아래 descriptor, configuration, function, string 및 extension을 구성한 뒤 UDC 이름을 기록해 controller에 bind한다.
Gadget root와 device attributes
configfs-usb-gadget:1-32USB gadget group과 개별 gadget의 UDC binding, maximum speed, class/protocol, endpoint 0, USB release 및 vendor/product identity를 구성합니다.