brintos

brintos / linux-shallow public Read only

0
0
Text · 3.8 KiB · 6c4d978 Raw
86 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3Linux kernel for ARC processors4*******************************5 6Other sources of information7############################8 9Below are some resources where more information can be found on10ARC 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 for18  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 community21  as open source for use on ARC Processors.22 23- `Official Synopsys ARC Processors website24  <https://www.synopsys.com/designware-ip/processor-solutions.html>`_ -25  location, with access to some IP documentation (`Programmer's Reference26  Manual, AKA PRM for ARC HS processors27  <https://www.synopsys.com/dw/doc.php/ds/cc/programmers-reference-manual-ARC-HS.pdf>`_)28  and free versions of some commercial tools (`Free nSIM29  <https://www.synopsys.com/cgi-bin/dwarcnsim/req1.cgi>`_ and30  `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 and32  the tools.33 34Important note on ARC processors configurability35################################################36 37ARC processors are highly configurable and several configurable options38are supported in Linux. Some options are transparent to software39(i.e cache geometries, some can be detected at runtime and configured40and used accordingly, while some need to be explicitly selected or configured41in the kernel's configuration utility (AKA "make menuconfig").42 43However not all configurable options are supported when an ARC processor44is to run Linux. SoC design teams should refer to "Appendix E:45Configuration for ARC Linux" in the ARC HS Databook for configurability46guidelines.47 48Following these guidelines and selecting valid configuration options49up front is critical to help prevent any unwanted issues during50SoC bringup and software development in general.51 52Building the Linux kernel for ARC processors53############################################54 55The process of kernel building for ARC processors is the same as for any other56architecture and could be done in 2 ways:57 58- Cross-compilation: process of compiling for ARC targets on a development59  host with a different processor architecture (generally x86_64/amd64).60- Native compilation: process of compiling for ARC on a ARC platform61  (hardware board or a simulator like QEMU) with complete development environment62  (GNU toolchain, dtc, make etc) installed on the platform.63 64In both cases, up-to-date GNU toolchain for ARC for the host is needed.65Synopsys offers prebuilt toolchain releases which can be used for this purpose,66available 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 76Once the toolchain is installed in the system, make sure its "bin" folder77is added in your ``PATH`` environment variable. Then set ``ARCH=arc`` &78``CROSS_COMPILE=arc-linux`` (or whatever matches installed ARC toolchain prefix)79and then as usual ``make defconfig && make``.80 81This will produce "vmlinux" file in the root of the kernel source tree82usable for loading on the target system via JTAG.83If you need to get an image usable with U-Boot bootloader,84type ``make uImage`` and ``uImage`` will be produced in ``arch/arc/boot``85folder.86