16e6609f2SAlexey Brodkin.. SPDX-License-Identifier: GPL-2.0 26e6609f2SAlexey Brodkin 36e6609f2SAlexey BrodkinLinux kernel for ARC processors 46e6609f2SAlexey Brodkin******************************* 56e6609f2SAlexey Brodkin 66e6609f2SAlexey BrodkinOther sources of information 76e6609f2SAlexey Brodkin############################ 86e6609f2SAlexey Brodkin 96e6609f2SAlexey BrodkinBelow are some resources where more information can be found on 106e6609f2SAlexey BrodkinARC processors and relevant open source projects. 116e6609f2SAlexey Brodkin 12*7ef5d754SAlexey Brodkin- `<https://embarc.org>`_ - Community portal for open source on ARC. 136e6609f2SAlexey Brodkin Good place to start to find relevant FOSS projects, toolchain releases, 146e6609f2SAlexey Brodkin news items and more. 156e6609f2SAlexey Brodkin 16*7ef5d754SAlexey Brodkin- `<https://github.com/foss-for-synopsys-dwc-arc-processors>`_ - 176e6609f2SAlexey Brodkin Home for all development activities regarding open source projects for 186e6609f2SAlexey Brodkin ARC processors. Some of the projects are forks of various upstream projects, 196e6609f2SAlexey Brodkin where "work in progress" is hosted prior to submission to upstream projects. 206e6609f2SAlexey Brodkin Other projects are developed by Synopsys and made available to community 216e6609f2SAlexey Brodkin as open source for use on ARC Processors. 226e6609f2SAlexey Brodkin 23*7ef5d754SAlexey Brodkin- `Official Synopsys ARC Processors website 24*7ef5d754SAlexey Brodkin <https://www.synopsys.com/designware-ip/processor-solutions.html>`_ - 25*7ef5d754SAlexey Brodkin location, with access to some IP documentation (`Programmer's Reference 26*7ef5d754SAlexey Brodkin Manual, AKA PRM for ARC HS processors 27*7ef5d754SAlexey Brodkin <https://www.synopsys.com/dw/doc.php/ds/cc/programmers-reference-manual-ARC-HS.pdf>`_) 28*7ef5d754SAlexey Brodkin and free versions of some commercial tools (`Free nSIM 29*7ef5d754SAlexey Brodkin <https://www.synopsys.com/cgi-bin/dwarcnsim/req1.cgi>`_ and 30*7ef5d754SAlexey Brodkin `MetaWare Light Edition <https://www.synopsys.com/cgi-bin/arcmwtk_lite/reg1.cgi>`_). 31*7ef5d754SAlexey Brodkin Please note though, registration is required to access both the documentation and 32*7ef5d754SAlexey Brodkin the tools. 336e6609f2SAlexey Brodkin 346e6609f2SAlexey BrodkinImportant note on ARC processors configurability 356e6609f2SAlexey Brodkin################################################ 366e6609f2SAlexey Brodkin 376e6609f2SAlexey BrodkinARC processors are highly configurable and several configurable options 386e6609f2SAlexey Brodkinare supported in Linux. Some options are transparent to software 396e6609f2SAlexey Brodkin(i.e cache geometries, some can be detected at runtime and configured 406e6609f2SAlexey Brodkinand used accordingly, while some need to be explicitly selected or configured 416e6609f2SAlexey Brodkinin the kernel's configuration utility (AKA "make menuconfig"). 426e6609f2SAlexey Brodkin 436e6609f2SAlexey BrodkinHowever not all configurable options are supported when an ARC processor 446e6609f2SAlexey Brodkinis to run Linux. SoC design teams should refer to "Appendix E: 456e6609f2SAlexey BrodkinConfiguration for ARC Linux" in the ARC HS Databook for configurability 466e6609f2SAlexey Brodkinguidelines. 476e6609f2SAlexey Brodkin 486e6609f2SAlexey BrodkinFollowing these guidelines and selecting valid configuration options 496e6609f2SAlexey Brodkinup front is critical to help prevent any unwanted issues during 506e6609f2SAlexey BrodkinSoC bringup and software development in general. 516e6609f2SAlexey Brodkin 526e6609f2SAlexey BrodkinBuilding the Linux kernel for ARC processors 536e6609f2SAlexey Brodkin############################################ 546e6609f2SAlexey Brodkin 556e6609f2SAlexey BrodkinThe process of kernel building for ARC processors is the same as for any other 566e6609f2SAlexey Brodkinarchitecture and could be done in 2 ways: 576e6609f2SAlexey Brodkin 58*7ef5d754SAlexey Brodkin- Cross-compilation: process of compiling for ARC targets on a development 596e6609f2SAlexey Brodkin host with a different processor architecture (generally x86_64/amd64). 60*7ef5d754SAlexey Brodkin- Native compilation: process of compiling for ARC on a ARC platform 616e6609f2SAlexey Brodkin (hardware board or a simulator like QEMU) with complete development environment 626e6609f2SAlexey Brodkin (GNU toolchain, dtc, make etc) installed on the platform. 636e6609f2SAlexey Brodkin 646e6609f2SAlexey BrodkinIn both cases, up-to-date GNU toolchain for ARC for the host is needed. 656e6609f2SAlexey BrodkinSynopsys offers prebuilt toolchain releases which can be used for this purpose, 666e6609f2SAlexey Brodkinavailable from: 676e6609f2SAlexey Brodkin 68*7ef5d754SAlexey Brodkin- Synopsys GNU toolchain releases: 696e6609f2SAlexey Brodkin `<https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases>`_ 70*7ef5d754SAlexey Brodkin 71*7ef5d754SAlexey Brodkin- Linux kernel compilers collection: 72*7ef5d754SAlexey Brodkin `<https://mirrors.edge.kernel.org/pub/tools/crosstool>`_ 73*7ef5d754SAlexey Brodkin 74*7ef5d754SAlexey Brodkin- Bootlin's toolchain collection: `<https://toolchains.bootlin.com>`_ 756e6609f2SAlexey Brodkin 766e6609f2SAlexey BrodkinOnce the toolchain is installed in the system, make sure its "bin" folder 776e6609f2SAlexey Brodkinis added in your ``PATH`` environment variable. Then set ``ARCH=arc`` & 786e6609f2SAlexey Brodkin``CROSS_COMPILE=arc-linux`` (or whatever matches installed ARC toolchain prefix) 796e6609f2SAlexey Brodkinand then as usual ``make defconfig && make``. 806e6609f2SAlexey Brodkin 816e6609f2SAlexey BrodkinThis will produce "vmlinux" file in the root of the kernel source tree 826e6609f2SAlexey Brodkinusable for loading on the target system via JTAG. 836e6609f2SAlexey BrodkinIf you need to get an image usable with U-Boot bootloader, 846e6609f2SAlexey Brodkintype ``make uImage`` and ``uImage`` will be produced in ``arch/arc/boot`` 856e6609f2SAlexey Brodkinfolder. 86