arc.rst 3.8 KB

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