요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
Linux kernel for ARC processors
*******************************
Other sources of information
############################
Below are some resources where more information can be found on
ARC processors and relevant open source projects.
- `<https://embarc.org>`_ - Community portal for open source on ARC.
Good place to start to find relevant FOSS projects, toolchain releases,
news items and more.
- `<https://github.com/foss-for-synopsys-dwc-arc-processors>`_ -
Home for all development activities regarding open source projects for
ARC processors. Some of the projects are forks of various upstream projects,
where "work in progress" is hosted prior to submission to upstream projects.
Other projects are developed by Synopsys and made available to community
as open source for use on ARC Processors.
- `Official Synopsys ARC Processors website
<https://www.synopsys.com/designware-ip/processor-solutions.html>`_ -
location, with access to some IP documentation (`Programmer's Reference
Manual, AKA PRM for ARC HS processors
<https://www.synopsys.com/dw/doc.php/ds/cc/programmers-reference-manual-ARC-HS.pdf>`_)
and free versions of some commercial tools (`Free nSIM
<https://www.synopsys.com/cgi-bin/dwarcnsim/req1.cgi>`_ and
`MetaWare Light Edition <https://www.synopsys.com/cgi-bin/arcmwtk_lite/reg1.cgi>`_).
Please note though, registration is required to access both the documentation and
the tools.
Important note on ARC processors configurability
################################################
ARC processors are highly configurable and several configurable options
are supported in Linux. Some options are transparent to software
(i.e cache geometries, some can be detected at runtime and configured
and used accordingly, while some need to be explicitly selected or configured
in the kernel's configuration utility (AKA "make menuconfig").
However not all configurable options are supported when an ARC processor
is to run Linux. SoC design teams should refer to "Appendix E:
Configuration for ARC Linux" in the ARC HS Databook for configurability
guidelines.
Following these guidelines and selecting valid configuration options
up front is critical to help prevent any unwanted issues during
SoC bringup and software development in general.
Building the Linux kernel for ARC processors
############################################
The process of kernel building for ARC processors is the same as for any other
architecture and could be done in 2 ways:
- Cross-compilation: process of compiling for ARC targets on a development
host with a different processor architecture (generally x86_64/amd64).
- Native compilation: process of compiling for ARC on a ARC platform
(hardware board or a simulator like QEMU) with complete development environment
(GNU toolchain, dtc, make etc) installed on the platform.
In both cases, up-to-date GNU toolchain for ARC for the host is needed.
Synopsys offers prebuilt toolchain releases which can be used for this purpose,
available from:
- Synopsys GNU toolchain releases:
`<https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases>`_
- Linux kernel compilers collection:
`<https://mirrors.edge.kernel.org/pub/tools/crosstool>`_
- Bootlin's toolchain collection: `<https://toolchains.bootlin.com>`_
Once the toolchain is installed in the system, make sure its "bin" folder
is added in your ``PATH`` environment variable. Then set ``ARCH=arc`` &
``CROSS_COMPILE=arc-linux`` (or whatever matches installed ARC toolchain prefix)
and then as usual ``make defconfig && make``.
This will produce "vmlinux" file in the root of the kernel source tree
usable for loading on the target system via JTAG.
If you need to get an image usable with U-Boot bootloader,
type ``make uImage`` and ``uImage`` will be produced in ``arch/arc/boot``
folder.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Linux kernel for ARC processors
1-5이 문서는 ARC 프로세서용 Linux 커널을 구성하고 빌드할 때 필요한 공식 자료와 주의점을 안내합니다.
Other sources of information
6-33ARC 프로세서와 관련 오픈 소스 프로젝트에 대한 추가 정보는 다음 자료에서 찾을 수 있습니다.
- embARC community portal
https://embarc.org - FOSS for Synopsys DesignWare ARC processors
https://github.com/foss-for-synopsys-dwc-arc-processors - Official Synopsys ARC Processors website
https://www.synopsys.com/designware-ip/processor-solutions.html - Programmer's Reference Manual for ARC HS processors
https://www.synopsys.com/dw/doc.php/ds/cc/programmers-reference-manual-ARC-HS.pdf - Free nSIM
https://www.synopsys.com/cgi-bin/dwarcnsim/req1.cgi - MetaWare Light Edition
https://www.synopsys.com/cgi-bin/arcmwtk_lite/reg1.cgi
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-51ARC 프로세서는 구성을 폭넓게 바꿀 수 있으며 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-85ARC 프로세서용 kernel build 절차는 다른 architecture와 같으며 cross-compilation과 native compilation 두 방식이 있습니다.
| 방식 | 설명 |
|---|---|
| Cross-compilation | 일반적으로 x86_64/amd64인 서로 다른 processor architecture의 개발 host에서 ARC target용 binary를 빌드합니다. |
| Native compilation | GNU 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에서 미리 빌드된 도구를 구할 수 있습니다.
- Synopsys GNU toolchain releases
https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases - Linux kernel compilers collection
https://mirrors.edge.kernel.org/pub/tools/crosstool - Bootlin toolchain collection
https://toolchains.bootlin.com
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` 디렉터리에 생성됩니다.
요약과 해설
arc.rst:1-85ARC는 구성이 매우 유연하므로 SoC 설계 단계에서 Linux 지원 조합을 확인하는 일이 핵심입니다. 유효한 구성을 정한 뒤 최신 ARC GNU toolchain과 `ARCH=arc`, 알맞은 `CROSS_COMPILE` prefix를 사용하면 일반 kernel build 절차를 그대로 적용할 수 있습니다.
toolchain 준비에서 JTAG 또는 U-Boot용 결과물까지의 공통 경로입니다.