blob: 423403f3c72ab12c7ff7101ed47126821e3a1e37 [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
37Amlogic does not provide sources for the firmware and for tools needed
38to create the bootloader image, so it is necessary to obtain them from
39git trees published by the board vendor:
40
41.. code-block:: bash
42
43 $ git clone -b radxa-zero-v2021.07 https://github.com/radxa/u-boot.git
44 $ git clone https://github.com/radxa/fip.git
45
46 $ sudo apt-get install -y gcc-aarch64-linux-gnu device-tree-compiler libncurses5 libncurses5-dev
47 $ sudo apt-get install -y bc python dosfstools flex build-essential libssl-dev mtools
48
49 $ 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
50 $ sudo tar xvf gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz -C /opt
51
52 $ export CROSS_COMPILE=/opt/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin/aarch64-none-elf-
53 $ export ARCH=arm
54 $ cd u-boot
55 $ make radxa-zero_defconfig
56 $ make
57
58 $ cp u-boot.bin ../fip/radxa-zero/bl33.bin
59 $ cd ../fip/radxa-zero
60 $ make
61
62This will generate:
63
64.. code-block:: bash
65
66 $ u-boot.bin u-boot.bin.sd.bin u-boot.bin.usb.bl2 u-boot.bin.usb.tpl
67
68Then write the image to SD with:
69
70.. code-block:: bash
71
72 $ DEV=/dev/your_sd_device
73 $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
74 $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444