요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
==================
SA1100 serial port
==================
The SA1100 serial port had its major/minor numbers officially assigned::
> Date: Sun, 24 Sep 2000 21:40:27 -0700
> From: H. Peter Anvin <hpa@transmeta.com>
> To: Nicolas Pitre <nico@CAM.ORG>
> Cc: Device List Maintainer <device@lanana.org>
> Subject: Re: device
>
> Okay. Note that device numbers 204 and 205 are used for "low density
> serial devices", so you will have a range of minors on those majors (the
> tty device layer handles this just fine, so you don't have to worry about
> doing anything special.)
>
> So your assignments are:
>
> 204 char Low-density serial ports
> 5 = /dev/ttySA0 SA1100 builtin serial port 0
> 6 = /dev/ttySA1 SA1100 builtin serial port 1
> 7 = /dev/ttySA2 SA1100 builtin serial port 2
>
> 205 char Low-density serial ports (alternate device)
> 5 = /dev/cusa0 Callout device for ttySA0
> 6 = /dev/cusa1 Callout device for ttySA1
> 7 = /dev/cusa2 Callout device for ttySA2
>
You must create those inodes in /dev on the root filesystem used
by your SA1100-based device::
mknod ttySA0 c 204 5
mknod ttySA1 c 204 6
mknod ttySA2 c 204 7
mknod cusa0 c 205 5
mknod cusa1 c 205 6
mknod cusa2 c 205 7
In addition to the creation of the appropriate device nodes above, you
must ensure your user space applications make use of the correct device
name. The classic example is the content of the /etc/inittab file where
you might have a getty process started on ttyS0.
In this case:
- replace occurrences of ttyS0 with ttySA0, ttyS1 with ttySA1, etc.
- don't forget to add 'ttySA0', 'console', or the appropriate tty name
in /etc/securetty for root to be allowed to login as well.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
SA1100 serial port 번호 할당
1-30SA1100 serial port에는 2000-09-24 H. Peter Anvin이 공식 major/minor 번호를 할당했습니다. major 204와 205는 low-density serial device용이며 tty layer가 minor 범위를 처리합니다.
> Date: Sun, 24 Sep 2000 21:40:27 -0700
> From: H. Peter Anvin <hpa@transmeta.com>
> To: Nicolas Pitre <nico@CAM.ORG>
> Cc: Device List Maintainer <device@lanana.org>
> Subject: Re: device
>
> Okay. Note that device numbers 204 and 205 are used for "low density
> serial devices", so you will have a range of minors on those majors (the
> tty device layer handles this just fine, so you don't have to worry about
> doing anything special.)
>
> So your assignments are:
>
> 204 char Low-density serial ports
> 5 = /dev/ttySA0 SA1100 builtin serial port 0
> 6 = /dev/ttySA1 SA1100 builtin serial port 1
> 7 = /dev/ttySA2 SA1100 builtin serial port 2
>
> 205 char Low-density serial ports (alternate device)
> 5 = /dev/cusa0 Callout device for ttySA0
> 6 = /dev/cusa1 Callout device for ttySA1
> 7 = /dev/cusa2 Callout device for ttySA2
>
| major | minor | device | 용도 |
|---|---|---|---|
| 204 | 5 | `/dev/ttySA0` | SA1100 builtin serial port 0 |
| 204 | 6 | `/dev/ttySA1` | SA1100 builtin serial port 1 |
| 204 | 7 | `/dev/ttySA2` | SA1100 builtin serial port 2 |
| 205 | 5 | `/dev/cusa0` | `ttySA0` callout device |
| 205 | 6 | `/dev/cusa1` | `ttySA1` callout device |
| 205 | 7 | `/dev/cusa2` | `ttySA2` callout device |
device node 생성
31-40SA1100 기반 장치가 사용하는 root filesystem의 `/dev`에 다음 inode를 만들어야 합니다.
mknod ttySA0 c 204 5
mknod ttySA1 c 204 6
mknod ttySA2 c 204 7
mknod cusa0 c 205 5
mknod cusa1 c 205 6
mknod cusa2 c 205 7
user space 설정
41-51device node를 만드는 것뿐 아니라 user-space application이 올바른 device 이름을 사용하게 해야 합니다. 대표적으로 `/etc/inittab`에서 `ttyS0`에 getty를 시작하도록 되어 있을 수 있습니다.
이 경우 `ttyS0`를 `ttySA0`로, `ttyS1`을 `ttySA1`로 바꾸는 식으로 모든 occurrence를 교체합니다.
root login을 허용하려면 `/etc/securetty`에도 `ttySA0`, `console` 또는 적절한 tty 이름을 추가해야 합니다.
요약과 해설
serial_uart.rst:1-51SA1100 UART는 일반 `ttyS*` 대신 major 204의 `ttySA*` 이름을 사용하고 callout device는 major 205의 `cusa*`를 사용합니다. root filesystem의 device node와 user-space 설정을 모두 같은 이름 체계로 바꿔야 console login이 정상 동작합니다.
공식 device number가 /dev node와 user-space login 설정까지 일관되게 이어져야 합니다.