blob: f5611f52ecbbebd3d1638375763f4351b6110907 [file] [log] [blame]
Christian Hewitt9cb65812021-09-15 01:46:59 +00001.. SPDX-License-Identifier: GPL-2.0+
2
3U-Boot for Radxa Zero
4=====================
5
6Radxa Zero is a small form factor SBC based on the Amlogic S905Y2
7chipset that ships in a number of RAM/eMMC configurations:
8
9Boards with 512MB/1GB LPDDR4 RAM have no eMMC storage and BCM43436
10wireless (2.4GHz b/g/n) while 2GB/4GB boards have 8/16/32/64/128GB
11eMMC storage and BCM4345 wireless (2.4/5GHz a/b/g/n/ac).
12
13- Amlogic S905Y2 quad-core Cortex-A53
14- Mali G31-MP2 GPU
15- HDMI 2.1 output (micro)
16- 1x USB 2.0 port - Type C (OTG)
17- 1x USB 3.0 port - Type C (Host)
18- 1x micro SD Card slot
19- 40 Pin GPIO header
20
21Schematics are available on the manufacturer website:
22
23https://dl.radxa.com/zero/docs/hw/RADAX_ZERO_V13_SCH_20210309.pdf
24
25U-Boot compilation
26------------------
27
28.. code-block:: bash
29
30 $ export CROSS_COMPILE=aarch64-none-elf-
31 $ make radxa-zero_defconfig
32 $ make
33
34Image creation
35--------------
36
Neil Armstrong2ea98682022-03-02 10:42:22 +010037For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `radxa-zero`
38
Christian Hewitt9cb65812021-09-15 01:46:59 +000039Amlogic does not provide sources for the firmware and for tools needed
40to create the bootloader image, so it is necessary to obtain them from
41git trees published by the board vendor:
42
43.. code-block:: bash
44
45 $ git clone -b radxa-zero-v2021.07 https://github.com/radxa/u-boot.git
46 $ git clone https://github.com/radxa/fip.git
47
48 $ sudo apt-get install -y gcc-aarch64-linux-gnu device-tree-compiler libncurses5 libncurses5-dev
49 $ sudo apt-get install -y bc python dosfstools flex build-essential libssl-dev mtools
50
51 $ wget https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
52 $ sudo tar xvf gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz -C /opt
53
54 $ export CROSS_COMPILE=/opt/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin/aarch64-none-elf-
55 $ export ARCH=arm
56 $ cd u-boot
57 $ make radxa-zero_defconfig
58 $ make
59
60 $ cp u-boot.bin ../fip/radxa-zero/bl33.bin
61 $ cd ../fip/radxa-zero
62 $ make
63
64This will generate:
65
66.. code-block:: bash
67
68 $ u-boot.bin u-boot.bin.sd.bin u-boot.bin.usb.bl2 u-boot.bin.usb.tpl
69
70Then write the image to SD with:
71
72.. code-block:: bash
73
74 $ DEV=/dev/your_sd_device
75 $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
76 $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444