summaryrefslogtreecommitdiffstats
path: root/doc/hardware.rst
blob: 117fb17cdee5a4a60d28c344c24097dfb795a726 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
.. _hardware-platforms:

Hardware Platforms
==================

DistroKit supports a range of hardware, supported by the ptxdist
platforms listed below. A platform can be built with one ``ptxdist
images`` and shares the same cross compiler and binary format.

To build a platform, choose the respective platformconfig, e.g.::

   $ ptxdist platform configs/platform-v7a/platformconfig
   info: selected platformconfig:
        'configs/platform-v7a/platformconfig'

If the respective toolchain for the platform is installed from the Debian packages
or tarballs, PTXdist is able to find and select the right toolchain automatically.
Otherwise, select your toolchain by giving its path manually, e.g. with::

   $ ptxdist toolchain /opt/OSELAS.Toolchain-2020.08.0/x86_64-unknown-linux-gnu/gcc-10.2.1-clang-10.0.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/bin
   found and using toolchain:
   '/opt/OSELAS.Toolchain-2020.08.0/x86_64-unknown-linux-gnu/gcc-10.2.1-clang-10.0.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/bin/'

Then you can build all images with::

   $ ptxdist images


v7a Platform
------------

+-------------------------+-----------------------------------------+
| platformconfig:         | ``configs/platform-v7a/platformconfig`` |
+-------------------------+-----------------------------------------+
| Toolchain architecture: | ``arm-v7a-linux-gnueabihf``             |
+-------------------------+-----------------------------------------+

The v7a platform is made for machines based on the ARMv7-A architecture.
It supports the following hardware:

.. toctree::
   :maxdepth: 1

   hardware_v7a_qemu
   hardware_v7a_beaglebone_white
   hardware_v7a_beaglebone_black
   hardware_v7a_nitrogen6x
   hardware_v7a_riot
   hardware_v7a_raspi2
   hardware_v7a_raspi3
   hardware_v7a_udoo_neo
   hardware_v7a_sama5d2

If you want to get DistroKit running on your ARMv7-A board which is not
listed above, here is a short overview of the generic way:

1. Build the device tree for your board by adding its DTS source file to the
   variable ``PTXCONF_DTC_OFTREE_DTS`` (in ``ptxdist menuconfig platform`` →
   *Build device tree* → *source dts file*).
   The compiled device tree will appear in ``platform-v7a/images/`` after the
   build.

2. Build a bootloader for your board.
   If the hardware is very similar to one of the provided *barebox* packages,
   you can simply adapt their config (``ptxdist menuconfig barebox-TARGET``)
   and the respective rules in ``configs/platform-v7a/rules/barebox-*.make``.
   If your hardware is too different, you can create a new bootloader package
   with ``ptxdist newpackage barebox``.

   Bootloader images can also be found in ``platform-v7a/images/`` after the
   PTXdist build.
   You can use these images to populate your board with a bootloader, for
   example with imx-usb-loader, fastboot, or the tool of choice for your
   respective SoC.

3. Adapt the kernel configuration to include support for your board with
   ``ptxdist menuconfig kernel``.
   After the build, you will find the kernel zImage in
   ``platform-v7a/images/linuximage``.

4. The userland for ARMv7-A is built to ``platform-v7a/images/root.{ext2,tgz}``.
   You can simply use these images too populate your boot media, or boot from
   NFS instead (see section :ref:`nfsroot`).

5. If you want to build a separate hdimage for your board, for example to boot
   barebox and the kernel from an SD card, create a new image package with
   ``ptxdist newpackage image-genimage`` (or fork one of the existing packages
   in ``configs/platform-v7a/``).

6. Send patches to <distrokit@pengutronix.de> :)

Refer to the :ref:`ptx_dev_manual` for a more thorough documentation.


v8a Platform
------------

+-------------------------+-----------------------------------------+
| platformconfig:         | ``configs/platform-v8a/platformconfig`` |
+-------------------------+-----------------------------------------+
| Toolchain architecture: | ``aarch64-v8a-linux-gnu``               |
+-------------------------+-----------------------------------------+

The v8a platform targets the ARMv8-A architecture.

The stuff from the v7a section above applies here accordingly.

Currently DistroKit only supports a single board; the Marvell espressobin:

.. toctree::
   :maxdepth: 1

   hardware_v8a_espressobin


rpi Platform
------------

+-------------------------+-----------------------------------------+
| platformconfig:         | ``configs/platform-rpi/platformconfig`` |
+-------------------------+-----------------------------------------+
| Toolchain architecture: | ``arm-1136jfs-linux-gnueabihf``         |
+-------------------------+-----------------------------------------+

.. note::

  The rpi platform is currently not actively maintained,
  as RPi 1 has been superseded by newer models
  which are supported in the v7a platform.
  However, if you are targeting a RPi 1,
  we will be happy to merge your patches anyways.

The rpi platform has support for the Raspberry Pi 1 and Raspberry Pi Zero W,
which is based on the Broadcom BCM2835 SoC (ARMv6):

.. toctree::
   :maxdepth: 1

   hardware_rpi_raspi1


mips Platform
-------------

+-------------------------+------------------------------------------+
| platformconfig:         | ``configs/platform-mips/platformconfig`` |
+-------------------------+------------------------------------------+
| Toolchain architecture: | ``mips-softfloat-linux-gnu``             |
+-------------------------+------------------------------------------+

.. toctree::
   :maxdepth: 1

   hardware_x86_64_qemu


x86_64 Platform
---------------

+-------------------------+--------------------------------------------+
| platformconfig:         | ``configs/platform-x86_64/platformconfig`` |
+-------------------------+--------------------------------------------+
| Toolchain architecture: | ``x86_64-unknown-linux-gnu``               |
+-------------------------+--------------------------------------------+

.. toctree::
   :maxdepth: 1

   hardware_mips_qemu