Documentation/driver-api/mmc/mmc-dev-parts.rst GitHub 원문 ↗

Linux 6.18.37 · Driver API

SD and MMC Device Partitions

MMC boot partition 접근과 lock 제어의 전문 번역입니다.

Source pathDocumentation/driver-api/mmc/mmc-dev-parts.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

mmc-dev-parts.rst:1-41

두 MMC boot partition은 기본 read-only이며 sysfs로 write와 다음 power-on까지의 lock을 제어합니다.

문서 구성
원문 줄내용
1-14Partition 구성
15-29Write access
30-41Read-only lock

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 ============================
2 SD and MMC Device Partitions
3 ============================
4
5 Device partitions are additional logical block devices present on the
6 SD/MMC device.
7
8 As of this writing, MMC boot partitions as supported and exposed as
9 /dev/mmcblkXboot0 and /dev/mmcblkXboot1, where X is the index of the
10 parent /dev/mmcblkX.
11
12 MMC Boot Partitions
13 ===================
14
15 Read and write access is provided to the two MMC boot partitions. Due to
16 the sensitive nature of the boot partition contents, which often store
17 a bootloader or bootloader configuration tables crucial to booting the
18 platform, write access is disabled by default to reduce the chance of
19 accidental bricking.
20
21 To enable write access to /dev/mmcblkXbootY, disable the forced read-only
22 access with::
23
24 echo 0 > /sys/block/mmcblkXbootY/force_ro
25
26 To re-enable read-only access::
27
28 echo 1 > /sys/block/mmcblkXbootY/force_ro
29
30 The boot partitions can also be locked read only until the next power on,
31 with::
32
33 echo 1 > /sys/block/mmcblkXbootY/ro_lock_until_next_power_on
34
35 This is a feature of the card and not of the kernel. If the card does
36 not support boot partition locking, the file will not exist. If the
37 feature has been disabled on the card, the file will be read-only.
38
39 The boot partitions can also be locked permanently, but this feature is
40 not accessible through sysfs in order to avoid accidental or malicious
41 bricking.
42

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

SD/MMC device partition

1-14

Device partition은 SD/MMC 장치에 존재하는 추가 logical block device입니다.

MMC boot partition은 `/dev/mmcblkXboot0`과 `/dev/mmcblkXboot1`로 노출되며, `X`는 parent `/dev/mmcblkX`의 index입니다.

MMC block device 구성
`/dev/mmcblkX``/dev/mmcblkXboot0``/dev/mmcblkXboot1`

하나의 parent block device에 두 boot partition이 추가됩니다.

============================
SD and MMC Device Partitions
============================

Device partitions are additional logical block devices present on the
SD/MMC device.

As of this writing, MMC boot partitions as supported and exposed as
/dev/mmcblkXboot0 and /dev/mmcblkXboot1, where X is the index of the
parent /dev/mmcblkX.

MMC Boot Partitions
===================

Boot partition 쓰기 접근

15-29

두 MMC boot partition에는 read와 write access가 제공됩니다. 그러나 bootloader나 부팅에 중요한 configuration table이 저장되는 민감한 영역이므로 accidental bricking을 줄이기 위해 write access는 기본적으로 disabled입니다.

`/sys/block/mmcblkXbootY/force_ro`에 `0`을 쓰면 강제 read-only를 해제하고, `1`을 쓰면 다시 read-only로 만듭니다.

Boot partition 접근
명령결과
`echo 0 > /sys/block/mmcblkXbootY/force_ro`Write 허용
`echo 1 > /sys/block/mmcblkXbootY/force_ro`Read-only 복원

Read and write access is provided to the two MMC boot partitions. Due to
the sensitive nature of the boot partition contents, which often store
a bootloader or bootloader configuration tables crucial to booting the
platform, write access is disabled by default to reduce the chance of
accidental bricking.

To enable write access to /dev/mmcblkXbootY, disable the forced read-only
access with::

        echo 0 > /sys/block/mmcblkXbootY/force_ro

To re-enable read-only access::

        echo 1 > /sys/block/mmcblkXbootY/force_ro

전원 주기 lock과 영구 lock

30-41

`ro_lock_until_next_power_on`에 `1`을 쓰면 다음 power-on까지 boot partition을 read-only로 잠글 수 있습니다.

이는 kernel 기능이 아니라 card 기능입니다. Card가 boot partition locking을 지원하지 않으면 파일이 없고, card에서 기능을 disable했다면 파일 자체가 read-only입니다.

Boot partition의 영구 read-only lock도 가능하지만, accidental 또는 malicious bricking을 막기 위해 sysfs에서는 이 기능을 노출하지 않습니다.

Boot partition lock 범위
`ro_lock_until_next_power_on=1`다음 power-on까지 read-only
Permanent lockCard 기능sysfs 미노출

일시 lock은 다음 power cycle까지 유지되며 영구 lock은 sysfs에서 차단됩니다.

The boot partitions can also be locked read only until the next power on,
with::

        echo 1 > /sys/block/mmcblkXbootY/ro_lock_until_next_power_on

This is a feature of the card and not of the kernel. If the card does
not support boot partition locking, the file will not exist. If the
feature has been disabled on the card, the file will be read-only.

The boot partitions can also be locked permanently, but this feature is
not accessible through sysfs in order to avoid accidental or malicious
bricking.