요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Write control and transfer progress
sysfs-class-firmware:37-60loading 값 1·-1·0으로 data 쓰기를 시작·중단·완료하고 transferring 단계의 남은 byte 크기를 추적합니다.
Upload status and fallback timeout
sysfs-class-firmware:62-77Upload의 idle·receiving·preparing·transferring·programming 상태와 upload에는 영향을 주지 않는 fallback timeout을 구분합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/class/firmware/.../data
Date: July 2022
KernelVersion: 5.19
Contact: Russ Weight <[email protected]>
Description: The data sysfs file is used for firmware-fallback and for
firmware uploads. Cat a firmware image to this sysfs file
after you echo 1 to the loading sysfs file. When the firmware
image write is complete, echo 0 to the loading sysfs file. This
sequence will signal the completion of the firmware write and
signal the lower-level driver that the firmware data is
available.
What: /sys/class/firmware/.../cancel
Date: July 2022
KernelVersion: 5.19
Contact: Russ Weight <[email protected]>
Description: Write-only. For firmware uploads, write a "1" to this file to
request that the transfer of firmware data to the lower-level
device be canceled. This request will be rejected (EBUSY) if
the update cannot be canceled (e.g. a FLASH write is in
progress) or (ENODEV) if there is no firmware update in progress.
What: /sys/class/firmware/.../error
Date: July 2022
KernelVersion: 5.19
Contact: Russ Weight <[email protected]>
Description: Read-only. Returns a string describing a failed firmware
upload. This string will be in the form of <STATUS>:<ERROR>,
where <STATUS> will be one of the status strings described
for the status sysfs file and <ERROR> will be one of the
following: "hw-error", "timeout", "user-abort", "device-busy",
"invalid-file-size", "read-write-error", "flash-wearout". The
error sysfs file is only meaningful when the current firmware
upload status is "idle". If this file is read while a firmware
transfer is in progress, then the read will fail with EBUSY.
What: /sys/class/firmware/.../loading
Date: July 2022
KernelVersion: 5.19
Contact: Russ Weight <[email protected]>
Description: The loading sysfs file is used for both firmware-fallback and
for firmware uploads. Echo 1 onto the loading file to indicate
you are writing a firmware file to the data sysfs node. Echo
-1 onto this file to abort the data write or echo 0 onto this
file to indicate that the write is complete. For firmware
uploads, the zero value also triggers the transfer of the
firmware data to the lower-level device driver.
What: /sys/class/firmware/.../remaining_size
Date: July 2022
KernelVersion: 5.19
Contact: Russ Weight <[email protected]>
Description: Read-only. For firmware upload, this file contains the size
of the firmware data that remains to be transferred to the
lower-level device driver. The size value is initialized to
the full size of the firmware image that was previously
written to the data sysfs file. This value is periodically
updated during the "transferring" phase of the firmware
upload.
Format: "%u".
What: /sys/class/firmware/.../status
Date: July 2022
KernelVersion: 5.19
Contact: Russ Weight <[email protected]>
Description: Read-only. Returns a string describing the current status of
a firmware upload. The string will be one of the following:
idle, "receiving", "preparing", "transferring", "programming".
What: /sys/class/firmware/.../timeout
Date: July 2022
KernelVersion: 5.19
Contact: Russ Weight <[email protected]>
Description: This file supports the timeout mechanism for firmware
fallback. This file has no affect on firmware uploads. For
more information on timeouts please see the documentation
for firmware fallback.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Firmware image data 전송
1-11| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/firmware/.../data |
| Date | 2022년 7월 |
| KernelVersion | 5.19 |
| Contact | Russ Weight <[email protected]> |
| Description | data sysfs file은 firmware fallback과 firmware upload에 사용됩니다. loading sysfs file에 1을 쓴 다음 이 sysfs file로 firmware image를 씁니다. Firmware image 쓰기가 끝나면 loading sysfs file에 0을 씁니다. 이 순서는 firmware 쓰기가 완료되었음을 알리고 lower-level driver에 firmware data를 사용할 수 있음을 알립니다. |
echo 1 > loading
cat firmware.bin > data
echo 0 > loading
loading node로 시작과 완료를 표시하고 data node로 image를 전달합니다.
Firmware upload 취소 요청
13-21| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/firmware/.../cancel |
| Date | 2022년 7월 |
| KernelVersion | 5.19 |
| Contact | Russ Weight <[email protected]> |
| Description | Write-only입니다. Firmware upload에서 이 file에 "1"을 쓰면 lower-level device로 firmware data를 전송하는 작업의 취소를 요청합니다. Update를 취소할 수 없으면(예: FLASH write 진행 중) 요청이 EBUSY로 거부되고, 진행 중인 firmware update가 없으면 ENODEV로 거부됩니다. |
echo 1 > cancel
취소할 수 없는 시점과 진행 중 update 부재를 구분합니다.
Firmware upload 오류 문자열
23-35| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/firmware/.../error |
| Date | 2022년 7월 |
| KernelVersion | 5.19 |
| Contact | Russ Weight <[email protected]> |
| Description | Read-only입니다. 실패한 firmware upload를 설명하는 문자열을 반환합니다. 문자열은 <STATUS>:<ERROR> 형식입니다. <STATUS>는 status sysfs file에서 설명하는 status 문자열 중 하나이고, <ERROR>는 "hw-error", "timeout", "user-abort", "device-busy", "invalid-file-size", "read-write-error", "flash-wearout" 중 하나입니다. error sysfs file은 현재 firmware upload status가 "idle"일 때만 의미가 있습니다. Firmware 전송 진행 중 이 file을 읽으면 EBUSY로 실패합니다. |
<STATUS>:<ERROR>
error 문자열의 <ERROR> field에 올 수 있는 일곱 값입니다.
Firmware data write 상태 제어
37-47| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/firmware/.../loading |
| Date | 2022년 7월 |
| KernelVersion | 5.19 |
| Contact | Russ Weight <[email protected]> |
| Description | loading sysfs file은 firmware fallback과 firmware upload 모두에 사용됩니다. loading file에 1을 써서 data sysfs node에 firmware file을 쓰고 있음을 나타냅니다. 이 file에 -1을 쓰면 data 쓰기를 중단하고, 0을 쓰면 쓰기가 완료되었음을 나타냅니다. Firmware upload에서는 0 값이 lower-level device driver로 firmware data를 전송하는 작업도 시작합니다. |
Firmware image write lifecycle을 제어하는 세 값입니다.
남은 firmware 전송 크기
49-60| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/firmware/.../remaining_size |
| Date | 2022년 7월 |
| KernelVersion | 5.19 |
| Contact | Russ Weight <[email protected]> |
| Description | Read-only입니다. Firmware upload에서 lower-level device driver로 아직 전송해야 하는 firmware data 크기를 담습니다. 이 값은 앞서 data sysfs file에 쓴 firmware image의 전체 크기로 초기화되며, firmware upload의 "transferring" 단계 동안 주기적으로 갱신됩니다. 형식은 "%u"입니다. |
Firmware upload 현재 상태
62-68| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/firmware/.../status |
| Date | 2022년 7월 |
| KernelVersion | 5.19 |
| Contact | Russ Weight <[email protected]> |
| Description | Read-only입니다. Firmware upload의 현재 상태를 설명하는 문자열을 반환합니다. 문자열은 idle, "receiving", "preparing", "transferring", "programming" 중 하나입니다. |
원문에 나열된 upload 상태를 일반적인 진행 순서로 배치했습니다.
Firmware fallback timeout
70-77| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/firmware/.../timeout |
| Date | 2022년 7월 |
| KernelVersion | 5.19 |
| Contact | Russ Weight <[email protected]> |
| Description | Firmware fallback의 timeout mechanism을 지원합니다. 이 file은 firmware upload에는 영향을 주지 않습니다. Timeout에 대한 자세한 내용은 firmware fallback 문서를 참조하십시오. |
Image write, cancellation, and errors
sysfs-class-firmware:1-35loading과 data node의 write handshake, lower-level device 전송 취소 조건과 <STATUS>:<ERROR> 실패 보고 형식을 정의합니다.