← Documents Documentation/arch/arc/arc.rst GitHub 원문 ↗

Linux 6.18.37 · Architecture

Linux kernel for ARC processors

ARC용 정보원, 지원 가능한 processor 구성, cross/native build와 U-Boot image 생성 절차를 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

arc.rst:1-85

ARC는 구성이 매우 유연하므로 SoC 설계 단계에서 Linux 지원 조합을 확인하는 일이 핵심입니다. 유효한 구성을 정한 뒤 최신 ARC GNU toolchain과 `ARCH=arc`, 알맞은 `CROSS_COMPILE` prefix를 사용하면 일반 kernel build 절차를 그대로 적용할 수 있습니다.

ARC kernel build 흐름
ARC GNU toolchain`bin`을 `PATH`에 추가`ARCH=arc``CROSS_COMPILE=arc-linux``make defconfig && make``vmlinux`
U-Boot target`make uImage``arch/arc/boot/uImage`

toolchain 준비에서 JTAG 또는 U-Boot용 결과물까지의 공통 경로입니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 Linux kernel for ARC processors
4 *******************************
5
6 Other sources of information
7 ############################
8
9 Below are some resources where more information can be found on
10 ARC processors and relevant open source projects.
11
12 - `<https://embarc.org>`_ - Community portal for open source on ARC.
13 Good place to start to find relevant FOSS projects, toolchain releases,
14 news items and more.
15
16 - `<https://github.com/foss-for-synopsys-dwc-arc-processors>`_ -
17 Home for all development activities regarding open source projects for
18 ARC processors. Some of the projects are forks of various upstream projects,
19 where "work in progress" is hosted prior to submission to upstream projects.
20 Other projects are developed by Synopsys and made available to community
21 as open source for use on ARC Processors.
22
23 - `Official Synopsys ARC Processors website
24 <https://www.synopsys.com/designware-ip/processor-solutions.html>`_ -
25 location, with access to some IP documentation (`Programmer's Reference
26 Manual, AKA PRM for ARC HS processors
27 <https://www.synopsys.com/dw/doc.php/ds/cc/programmers-reference-manual-ARC-HS.pdf>`_)
28 and free versions of some commercial tools (`Free nSIM
29 <https://www.synopsys.com/cgi-bin/dwarcnsim/req1.cgi>`_ and
30 `MetaWare Light Edition <https://www.synopsys.com/cgi-bin/arcmwtk_lite/reg1.cgi>`_).
31 Please note though, registration is required to access both the documentation and
32 the tools.
33
34 Important note on ARC processors configurability
35 ################################################
36
37 ARC processors are highly configurable and several configurable options
38 are supported in Linux. Some options are transparent to software
39 (i.e cache geometries, some can be detected at runtime and configured
40 and used accordingly, while some need to be explicitly selected or configured
41 in the kernel's configuration utility (AKA "make menuconfig").
42
43 However not all configurable options are supported when an ARC processor
44 is to run Linux. SoC design teams should refer to "Appendix E:
45 Configuration for ARC Linux" in the ARC HS Databook for configurability
46 guidelines.
47
48 Following these guidelines and selecting valid configuration options
49 up front is critical to help prevent any unwanted issues during
50 SoC bringup and software development in general.
51
52 Building the Linux kernel for ARC processors
53 ############################################
54
55 The process of kernel building for ARC processors is the same as for any other
56 architecture and could be done in 2 ways:
57
58 - Cross-compilation: process of compiling for ARC targets on a development
59 host with a different processor architecture (generally x86_64/amd64).
60 - Native compilation: process of compiling for ARC on a ARC platform
61 (hardware board or a simulator like QEMU) with complete development environment
62 (GNU toolchain, dtc, make etc) installed on the platform.
63
64 In both cases, up-to-date GNU toolchain for ARC for the host is needed.
65 Synopsys offers prebuilt toolchain releases which can be used for this purpose,
66 available from:
67
68 - Synopsys GNU toolchain releases:
69 `<https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases>`_
70
71 - Linux kernel compilers collection:
72 `<https://mirrors.edge.kernel.org/pub/tools/crosstool>`_
73
74 - Bootlin's toolchain collection: `<https://toolchains.bootlin.com>`_
75
76 Once the toolchain is installed in the system, make sure its "bin" folder
77 is added in your ``PATH`` environment variable. Then set ``ARCH=arc`` &
78 ``CROSS_COMPILE=arc-linux`` (or whatever matches installed ARC toolchain prefix)
79 and then as usual ``make defconfig && make``.
80
81 This will produce "vmlinux" file in the root of the kernel source tree
82 usable for loading on the target system via JTAG.
83 If you need to get an image usable with U-Boot bootloader,
84 type ``make uImage`` and ``uImage`` will be produced in ``arch/arc/boot``
85 folder.
86

3. 한국어 전문 번역

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

Linux kernel for ARC processors

1-5

이 문서는 ARC 프로세서용 Linux 커널을 구성하고 빌드할 때 필요한 공식 자료와 주의점을 안내합니다.

Other sources of information

6-33

ARC 프로세서와 관련 오픈 소스 프로젝트에 대한 추가 정보는 다음 자료에서 찾을 수 있습니다.

embARC는 ARC 오픈 소스 공동체의 출발점으로, 관련 FOSS 프로젝트·toolchain release·소식을 모읍니다. GitHub 조직은 ARC용 오픈 소스 개발 활동의 중심입니다. 일부 저장소는 upstream 제출 전 진행 중인 작업을 보관하는 fork이고, 일부는 Synopsys가 ARC 프로세서에서 쓸 수 있도록 직접 개발해 공개한 프로젝트입니다.

Synopsys 공식 사이트에서는 ARC HS 프로세서용 Programmer's Reference Manual(PRM)을 비롯한 일부 IP 문서와 Free nSIM, MetaWare Light Edition 같은 무료 상용 도구 판본에 접근할 수 있습니다. 문서와 도구 모두 등록이 필요합니다.

Important note on ARC processors configurability

34-51

ARC 프로세서는 구성을 폭넓게 바꿀 수 있으며 Linux도 여러 선택 항목을 지원합니다. cache geometry처럼 software에 투명한 항목이 있고, runtime에 감지해 그 결과대로 구성하고 사용하는 항목도 있으며, kernel configuration utility인 `make menuconfig`에서 명시적으로 선택하거나 설정해야 하는 항목도 있습니다.

그러나 Linux를 실행할 ARC 프로세서에서 모든 구성 가능 항목을 지원하는 것은 아닙니다. SoC 설계 팀은 구성 지침을 확인하기 위해 ARC HS Databook의 `Appendix E: Configuration for ARC Linux`를 참고해야 합니다.

이 지침을 따르고 유효한 구성 항목을 설계 초기에 선택하는 것은 SoC bring-up과 전반적인 software 개발에서 원치 않는 문제를 예방하는 데 매우 중요합니다.

Building the Linux kernel for ARC processors

52-85

ARC 프로세서용 kernel build 절차는 다른 architecture와 같으며 cross-compilation과 native compilation 두 방식이 있습니다.

방식설명
Cross-compilation일반적으로 x86_64/amd64인 서로 다른 processor architecture의 개발 host에서 ARC target용 binary를 빌드합니다.
Native compilationGNU toolchain, dtc, make 등 완전한 개발 환경을 설치한 ARC hardware board 또는 QEMU 같은 simulator에서 ARC용 binary를 직접 빌드합니다.

두 방식 모두 host에서 사용할 최신 ARC GNU toolchain이 필요합니다. Synopsys GNU toolchain release, kernel.org의 Linux kernel compilers collection, Bootlin toolchain collection에서 미리 빌드된 도구를 구할 수 있습니다.

toolchain을 설치한 뒤 해당 `bin` 디렉터리를 `PATH` environment variable에 추가합니다. 이어서 `ARCH=arc`와 `CROSS_COMPILE=arc-linux`를 설정합니다. 후자는 설치한 ARC toolchain prefix와 일치하는 값으로 바꿀 수 있습니다. 그런 다음 평소처럼 `make defconfig && make`를 실행합니다.

빌드 결과 kernel source tree의 root에 생기는 `vmlinux`는 JTAG로 target system에 올릴 수 있습니다. U-Boot bootloader용 image가 필요하면 `make uImage`를 실행하며, 결과 `uImage`는 `arch/arc/boot` 디렉터리에 생성됩니다.