Difference between revisions of "Rockpi4/dev/u-boot"
Line 1: | Line 1: | ||
{{rockpi4_header}} | {{rockpi4_header}} | ||
{{Languages|rockpi4/dev/u-boot}} | {{Languages|rockpi4/dev/u-boot}} | ||
− | [[rockpi4 | ROCK Pi 4]] > [[rockpi4/dev | Development]] > [[rockpi4/dev/u-boot | U- | + | [[rockpi4 | ROCK Pi 4]] > [[rockpi4/dev | Development]] > [[rockpi4/dev/u-boot | U-Boot]] |
− | =Build U- | + | === Build U-Boot and run it on ROCK Pi 4 === |
+ | |||
+ | This guide describes how to build U-Boot and run it on ROCK Pi 4. U-Boot images could be installed into eMMC, Micro SD card and SPI Flash, etc. | ||
+ | |||
+ | ==== Hardware required ==== | ||
− | |||
* ROCK Pi 4 mainboard | * ROCK Pi 4 mainboard | ||
− | * A | + | * A eMMC module or a MicroSD card or SPI Flash soldered on board |
* Power adapter | * Power adapter | ||
− | * '''USB Male A to Male A cable'''(important) | + | * '''USB Male A to Male A cable'''(important). |
− | *A | + | * A PC/laptop running Linux |
+ | |||
+ | ==== Build U-Boot ==== | ||
− | ==Step 1 Get the source code == | + | ===== Step 1: Get the source code ===== |
You need Git to get multiple git repositories to build the image. | You need Git to get multiple git repositories to build the image. | ||
Line 18: | Line 23: | ||
Install Git if you don't have it. | Install Git if you don't have it. | ||
− | sudo apt-get update | + | sudo apt-get update && sudo apt-get install -y git |
− | + | ||
Clone the source code | Clone the source code | ||
Line 42: | Line 46: | ||
** u-boot as the second stage bootloader | ** u-boot as the second stage bootloader | ||
− | ==Step 2 Install tool-chain and other tools== | + | ===== Step 2: Install tool-chain and other build tools ===== |
− | + | sudo apt-get install -y gcc-aarch64-linux-gnu device-tree-compiler libncurses5 libncurses5-dev | |
− | + | sudo apt-get install -y bc python dosfstools flex build-essential libssl-dev mtools | |
− | + | ===== Step 3: Build U-boot ===== | |
− | + | *If you use the ROCK Pi 4A | |
− | + | ||
− | + | ./build/mk-uboot.sh rockpi4a | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | If you | + | *If you use the ROCK Pi 4B |
− | + | ||
− | + | ||
+ | ./build/mk-uboot.sh rockpi4b | ||
− | + | *If you use the ROCK Pi 4C | |
− | + | ||
− | + | ./build/mk-uboot.sh rockpi4c | |
− | + | ||
− | + | ||
− | + | ||
− | + | And then you can get the directory, '''out''', of all the generated images. | |
− | + | ||
− | == | + | ==== Flash U-Boot ==== |
− | + | ||
− | + | ====U-boot Usage==== | |
− | * | + | * [[Rockpi4/dev/u-boot/pxe | PXE boot]] |
+ | * [[Rockpi4/Linux system runs on M.2 NVME SSD | SPI NVME boot]] | ||
− | + | ==== FAQs ==== | |
− | + | 1. USB-C has been seen as not working, an adaptor for USB-C to USB-A has worked. [https://forum.radxa.com/t/otg-flashing-not-working/717 See discussion]. | |
− | == | + | ==== Troubleshooting ==== |
− | + | * Post your issue at the forum: https://forum.radxa.com/c/dev. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
Revision as of 10:11, 20 February 2020
ROCK Pi 4 > Development > U-Boot
Contents
Build U-Boot and run it on ROCK Pi 4
This guide describes how to build U-Boot and run it on ROCK Pi 4. U-Boot images could be installed into eMMC, Micro SD card and SPI Flash, etc.
Hardware required
- ROCK Pi 4 mainboard
- A eMMC module or a MicroSD card or SPI Flash soldered on board
- Power adapter
- USB Male A to Male A cable(important).
- A PC/laptop running Linux
Build U-Boot
Step 1: Get the source code
You need Git to get multiple git repositories to build the image.
Install Git if you don't have it.
sudo apt-get update && sudo apt-get install -y git
Clone the source code
git clone --recursive https://github.com/radxa/rockchip-bsp.git
You will get
build kernel README.md rkbin rootfs u-boot
Directories usage introductions:
- build:
- Some script files and configuration files for building u-boot, kernel and rootfs.
- kernel:
- kernel source code, current version is 4.4
- rkbin:
- Prebuilt Rockchip binaries, include first stage loader and ATF(Arm Trustzone Firmware).
- rootfs:
- Bootstrap a Debian based rootfs, support architechture armhf and arm64, support Debian Jessie and Stretch.
- u-boot:
- u-boot as the second stage bootloader
Step 2: Install tool-chain and other build tools
sudo apt-get install -y gcc-aarch64-linux-gnu device-tree-compiler libncurses5 libncurses5-dev sudo apt-get install -y bc python dosfstools flex build-essential libssl-dev mtools
Step 3: Build U-boot
- If you use the ROCK Pi 4A
./build/mk-uboot.sh rockpi4a
- If you use the ROCK Pi 4B
./build/mk-uboot.sh rockpi4b
- If you use the ROCK Pi 4C
./build/mk-uboot.sh rockpi4c
And then you can get the directory, out, of all the generated images.
Flash U-Boot
U-boot Usage
FAQs
1. USB-C has been seen as not working, an adaptor for USB-C to USB-A has worked. See discussion.
Troubleshooting
- Post your issue at the forum: https://forum.radxa.com/c/dev.