Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Difference between revisions of "Rock5/guide/build-u-boot-on-5b"

< Rock5‎ | guide
(Write u-boot)
Line 5: Line 5:
  
 
== Build U-Boot on ROCK 5B ==
 
== Build U-Boot on ROCK 5B ==
=== Rockchip Debian SDK ===
 
  
 
Below is the instructions of how to build u-boot image for ROCK 5 on rock5b board.
 
Below is the instructions of how to build u-boot image for ROCK 5 on rock5b board.
Line 13: Line 12:
 
* ROCK 5B
 
* ROCK 5B
  
==== Get the source code ====
+
=== Install essential pacakges ===
  
You need Git to get multiple git repositories to build the image.
+
sudo apt-get update
 +
sudo apt-get install -y git device-tree-compiler libncurses5 libncurses5-dev build-essential libssl-dev mtools bc python dosfstools flex bison
  
Install Git if you don't have it.
+
=== Get the source code ===
 
+
sudo apt-get update
+
sudo apt-get install git
+
  
 
Clone the source code
 
Clone the source code
Line 42: Line 39:
 
** u-boot as the second stage bootloader
 
** u-boot as the second stage bootloader
  
 
+
=== Build u-boot ===
==== Install other build tools ====
+
 
+
sudo apt-get install device-tree-compiler libncurses5 libncurses5-dev build-essential libssl-dev mtools bc python dosfstools flex bison
+
 
+
==== Build u-boot ====
+
  
 
Need to checkout branch to '''stable-5.10-rock5'''.
 
Need to checkout branch to '''stable-5.10-rock5'''.
Line 61: Line 53:
 
  idbloader.img  rk3588_spl_loader_v1.07.111.bin  spi  u-boot.itb
 
  idbloader.img  rk3588_spl_loader_v1.07.111.bin  spi  u-boot.itb
  
==== Write u-boot ====
+
=== Write u-boot images ===
  
 
1. you should check file in out/u-boot should be like this:     
 
1. you should check file in out/u-boot should be like this:     
Line 81: Line 73:
 
  sudo dd if=./u-boot.itb of=/dev/mtdblock0 bs=512 seek=16384
 
  sudo dd if=./u-boot.itb of=/dev/mtdblock0 bs=512 seek=16384
  
==== FAQs ====
+
=== FAQs ===
  
==== Troubleshooting ====
+
=== Troubleshooting ===
  
 
Check [[rock5/FAQs |ROCK 5 FAQs]] first, if it doesn't help, start a new post on the forum https://forum.radxa.com/c/rock5.
 
Check [[rock5/FAQs |ROCK 5 FAQs]] first, if it doesn't help, start a new post on the forum https://forum.radxa.com/c/rock5.

Revision as of 03:28, 28 October 2022

    ROCK 5 >  Guide >  Build U-Boot on ROCK 5B

Build U-Boot on ROCK 5B

Below is the instructions of how to build u-boot image for ROCK 5 on rock5b board.

Available boards:

  • ROCK 5B

Install essential pacakges

sudo apt-get update
sudo apt-get install -y git  device-tree-compiler libncurses5 libncurses5-dev build-essential libssl-dev mtools bc python dosfstools flex bison

Get the source code

Clone the source code

mkdir ~/rk3588-sdk && cd ~/rk3588-sdk
git clone -b stable-5.10-rock5 https://github.com/radxa/u-boot.git
git clone -b master https://github.com/radxa/rkbin.git
git clone -b debian https://github.com/radxa/build.git

And you will get

build   rkbin u-boot

Directories usage introductions:

  • build:
    • Some script files and configuration files for building u-boot, kernel and rootfs.
  • rkbin:
    • Prebuilt Rockchip binaries, include first stage loader and ATF(Arm Trustzone Firmware).
  • u-boot:
    • u-boot as the second stage bootloader

Build u-boot

Need to checkout branch to stable-5.10-rock5.

Build u-boot with default rock-5b-rk3588_defconfig.

cd ~/rk3588-sdk
./build/mk-uboot.sh rk3588-rock-5b     #For ROCK 5B

The generated images will be copied to out/u-boot folder

ls out/u-boot/
idbloader.img  rk3588_spl_loader_v1.07.111.bin  spi  u-boot.itb

Write u-boot images

1. you should check file in out/u-boot should be like this:

ls out/u-boot/
idbloader.img  rk3588_spl_loader_v1.07.111.bin  spi  u-boot.itb

2. flash u-boot to you storage

  • emmc
sudo dd if=./idbloader.img of=/dev/mmcblk1 bs=512 seek=64
sudo dd if=./u-boot.itb of=/dev/mmcblk1 bs=512 seek=16384
  • sdcard
sudo dd if=./idbloader.img of=/dev/mmcblk0 bs=512 seek=64
sudo dd if=./u-boot.itb of=/dev/mmcblk0 bs=512 seek=16384
  • spi nor
sudo dd if=./idbloader.img of=/dev/mtdblock0 bs=512 seek=64
sudo dd if=./u-boot.itb of=/dev/mtdblock0 bs=512 seek=16384

FAQs

Troubleshooting

Check ROCK 5 FAQs first, if it doesn't help, start a new post on the forum https://forum.radxa.com/c/rock5.