← Documents Documentation/arch/arm/sa1100/serial_uart.rst GitHub 원문 ↗

Linux 6.18.37 · Architecture

SA1100 serial port

SA1100 builtin serial port와 callout device의 major/minor 번호, /dev inode 생성 및 getty·securetty 설정을 설명합니다.

Source pathDocumentation/arch/arm/sa1100/serial_uart.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

serial_uart.rst:1-51

SA1100 UART는 일반 `ttyS*` 대신 major 204의 `ttySA*` 이름을 사용하고 callout device는 major 205의 `cusa*`를 사용합니다. root filesystem의 device node와 user-space 설정을 모두 같은 이름 체계로 바꿔야 console login이 정상 동작합니다.

SA1100 serial 설정 경로
major 204/205 + minor 5..7mknod ttySA*·cusa*/etc/inittab getty/etc/securetty

공식 device number가 /dev node와 user-space login 설정까지 일관되게 이어져야 합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 ==================
2 SA1100 serial port
3 ==================
4
5 The SA1100 serial port had its major/minor numbers officially assigned::
6
7 > Date: Sun, 24 Sep 2000 21:40:27 -0700
8 > From: H. Peter Anvin <hpa@transmeta.com>
9 > To: Nicolas Pitre <nico@CAM.ORG>
10 > Cc: Device List Maintainer <device@lanana.org>
11 > Subject: Re: device
12 >
13 > Okay. Note that device numbers 204 and 205 are used for "low density
14 > serial devices", so you will have a range of minors on those majors (the
15 > tty device layer handles this just fine, so you don't have to worry about
16 > doing anything special.)
17 >
18 > So your assignments are:
19 >
20 > 204 char Low-density serial ports
21 > 5 = /dev/ttySA0 SA1100 builtin serial port 0
22 > 6 = /dev/ttySA1 SA1100 builtin serial port 1
23 > 7 = /dev/ttySA2 SA1100 builtin serial port 2
24 >
25 > 205 char Low-density serial ports (alternate device)
26 > 5 = /dev/cusa0 Callout device for ttySA0
27 > 6 = /dev/cusa1 Callout device for ttySA1
28 > 7 = /dev/cusa2 Callout device for ttySA2
29 >
30
31 You must create those inodes in /dev on the root filesystem used
32 by your SA1100-based device::
33
34 mknod ttySA0 c 204 5
35 mknod ttySA1 c 204 6
36 mknod ttySA2 c 204 7
37 mknod cusa0 c 205 5
38 mknod cusa1 c 205 6
39 mknod cusa2 c 205 7
40
41 In addition to the creation of the appropriate device nodes above, you
42 must ensure your user space applications make use of the correct device
43 name. The classic example is the content of the /etc/inittab file where
44 you might have a getty process started on ttyS0.
45
46 In this case:
47
48 - replace occurrences of ttyS0 with ttySA0, ttyS1 with ttySA1, etc.
49
50 - don't forget to add 'ttySA0', 'console', or the appropriate tty name
51 in /etc/securetty for root to be allowed to login as well.
52

3. 한국어 전문 번역

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

SA1100 serial port 번호 할당

1-30

SA1100 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
>
majorminordevice용도
2045`/dev/ttySA0`SA1100 builtin serial port 0
2046`/dev/ttySA1`SA1100 builtin serial port 1
2047`/dev/ttySA2`SA1100 builtin serial port 2
2055`/dev/cusa0``ttySA0` callout device
2056`/dev/cusa1``ttySA1` callout device
2057`/dev/cusa2``ttySA2` callout device

device node 생성

31-40

SA1100 기반 장치가 사용하는 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-51

device node를 만드는 것뿐 아니라 user-space application이 올바른 device 이름을 사용하게 해야 합니다. 대표적으로 `/etc/inittab`에서 `ttyS0`에 getty를 시작하도록 되어 있을 수 있습니다.

이 경우 `ttyS0`를 `ttySA0`로, `ttyS1`을 `ttySA1`로 바꾸는 식으로 모든 occurrence를 교체합니다.

root login을 허용하려면 `/etc/securetty`에도 `ttySA0`, `console` 또는 적절한 tty 이름을 추가해야 합니다.