0001 .. SPDX-License-Identifier: GPL-2.0
0002
0003 Linux kernel for ARC processors
0004 *******************************
0005
0006 Other sources of information
0007 ############################
0008
0009 Below are some resources where more information can be found on
0010 ARC processors and relevant open source projects.
0011
0012 - `<https://embarc.org>`_ - Community portal for open source on ARC.
0013 Good place to start to find relevant FOSS projects, toolchain releases,
0014 news items and more.
0015
0016 - `<https://github.com/foss-for-synopsys-dwc-arc-processors>`_ -
0017 Home for all development activities regarding open source projects for
0018 ARC processors. Some of the projects are forks of various upstream projects,
0019 where "work in progress" is hosted prior to submission to upstream projects.
0020 Other projects are developed by Synopsys and made available to community
0021 as open source for use on ARC Processors.
0022
0023 - `Official Synopsys ARC Processors website
0024 <https://www.synopsys.com/designware-ip/processor-solutions.html>`_ -
0025 location, with access to some IP documentation (`Programmer's Reference
0026 Manual, AKA PRM for ARC HS processors
0027 <https://www.synopsys.com/dw/doc.php/ds/cc/programmers-reference-manual-ARC-HS.pdf>`_)
0028 and free versions of some commercial tools (`Free nSIM
0029 <https://www.synopsys.com/cgi-bin/dwarcnsim/req1.cgi>`_ and
0030 `MetaWare Light Edition <https://www.synopsys.com/cgi-bin/arcmwtk_lite/reg1.cgi>`_).
0031 Please note though, registration is required to access both the documentation and
0032 the tools.
0033
0034 Important note on ARC processors configurability
0035 ################################################
0036
0037 ARC processors are highly configurable and several configurable options
0038 are supported in Linux. Some options are transparent to software
0039 (i.e cache geometries, some can be detected at runtime and configured
0040 and used accordingly, while some need to be explicitly selected or configured
0041 in the kernel's configuration utility (AKA "make menuconfig").
0042
0043 However not all configurable options are supported when an ARC processor
0044 is to run Linux. SoC design teams should refer to "Appendix E:
0045 Configuration for ARC Linux" in the ARC HS Databook for configurability
0046 guidelines.
0047
0048 Following these guidelines and selecting valid configuration options
0049 up front is critical to help prevent any unwanted issues during
0050 SoC bringup and software development in general.
0051
0052 Building the Linux kernel for ARC processors
0053 ############################################
0054
0055 The process of kernel building for ARC processors is the same as for any other
0056 architecture and could be done in 2 ways:
0057
0058 - Cross-compilation: process of compiling for ARC targets on a development
0059 host with a different processor architecture (generally x86_64/amd64).
0060 - Native compilation: process of compiling for ARC on a ARC platform
0061 (hardware board or a simulator like QEMU) with complete development environment
0062 (GNU toolchain, dtc, make etc) installed on the platform.
0063
0064 In both cases, up-to-date GNU toolchain for ARC for the host is needed.
0065 Synopsys offers prebuilt toolchain releases which can be used for this purpose,
0066 available from:
0067
0068 - Synopsys GNU toolchain releases:
0069 `<https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases>`_
0070
0071 - Linux kernel compilers collection:
0072 `<https://mirrors.edge.kernel.org/pub/tools/crosstool>`_
0073
0074 - Bootlin's toolchain collection: `<https://toolchains.bootlin.com>`_
0075
0076 Once the toolchain is installed in the system, make sure its "bin" folder
0077 is added in your ``PATH`` environment variable. Then set ``ARCH=arc`` &
0078 ``CROSS_COMPILE=arc-linux`` (or whatever matches installed ARC toolchain prefix)
0079 and then as usual ``make defconfig && make``.
0080
0081 This will produce "vmlinux" file in the root of the kernel source tree
0082 usable for loading on the target system via JTAG.
0083 If you need to get an image usable with U-Boot bootloader,
0084 type ``make uImage`` and ``uImage`` will be produced in ``arch/arc/boot``
0085 folder.