Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
stylenone

Overview

This page contains the instructions to flash the eMMC on a SBC-3.5-RK3568 (E09) SECO board and to create a bootable eMMC/uSD.

...

Flashing the entire image via OTG

Hardware

  • MicroUSB cable (OTG).

  • Linux Host PC.

Software

Download the needed software here:

Instructions

These are the instructions to be followed in case the device that needs to be flashed does not either have a bootloader:

  1. Make sure there is no microSD card inserted in the slot J17 of the SBC-3.5-RK3568.

  2. Connect your Linux Host PC to the microUSB connector J48 of the SBC-3.5-RK3568.

  3. Turn on the switch SW1.

  4. Power on the SBC-3.5-RK3568 board.

  5. Turn the switch SW1 back off.

  6. Run the command rkdeveloptool ld to make sure the Rockchip board is detected.

  7. Flash the loader on the SBC-3.5-RK3568 device via the following command:

    Code Block
    $ sudo rkdeveloptool db loader.bin
  8. Flash the .wic image in the board via the following command. Remember to substitute the <image-file>.wic with the file name of the image (e.g seco_rk3568_e09_edgehog-embedded-full-image-wayland_5-10-x_kirkstone_1-03-00_20240410.wic):

    Code Block
    $ sudo rkdeveloptool wl 0 <image-file>.wic
  9. Wait for it to finish, then disconnect the microUSB cable and reboot the board. The SBC-3.5-RK3568 board will now run the new image.

Manually flashing partitions

Formatting the device

A bootable device where to flash BSP binaries needs a specific partitioned storage.

The device must have at least three partitions:

  • the first partition contains the U-boot image;

  • the second formatted as FAT32 and with size at least 100MB;

  • the third formatted as EXT4 and big enough to decompress the filesystem as explained later.

Info

In following instructions the device will be commonly declared as/dev/<device>.
In case of a µSD it is usually named /dev/sdx, while in case of eMMC /dev/mmcblk*.

The partitions associated to the device are usually named /dev/<device>1, /dev/<device>2, etc..

Before performing any partitioning operation, it is always necessary to umount them.

Info

Every command listed in this page is executed as superuser

You can use many different tools to create the partitions, such as gparted, which has a graphical interface, or sfdisk, fdisk on the command line.

If you want to use the command line sfdisk tool instead, you need to:

  • first create a text file called devicepart.sfdisk, copying the following content inside it

Code Block
label:gpt
start=16384,    type=3DE21764-95BD-54BD-A5C3-4ABE786F38A8,  name="uboot",   size=8192
start=57344,    type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7,  name="bootfs",  size=200M
start=466944,   type=0FC63DAF-8483-4772-8E79-3D69D8477DE4,  name="rootfs"
  • create the boot device with the commands

Code Block
languagebash
sfdisk /dev/<device> < devicepart.sfdisk

# format the second partition as FAT32
mkfs.vfat /dev/<device>2
# format the third partition as EXT4
mkfs.ext4 /dev/<device>3

...

Flash the BSP inside the bootable device

In order to flash BSP Linux distribution inside the formatted bootable device, the following binaries are required:

  • U-Boot image

  • dtb file (device tree blob) file and dtbo (device tree overlay) files

  • Kernel image

  • filesystem, Linux Filesystem (Yocto Filesystem)

In the following sections you will be guided in flashing your bootable device using the pre-compiled binaries that you can find in the board page.

Flash u-boot

To flash the U-Boot image, you need:

  • idblock.img

  • uboot.img

These binary images are created by u-boot compilation or you can download the precompiled binaries from seco_rk3568_e09_uboot-edgehog-embedded-full-image-wayland_5-10_kirkstone_1-04-00_20240621.tar.gz.

These binaries can be flashed with:

Code Block
dd if=./idblock.img of=/dev/<device> seek=64 conv=fsync
dd if=./uboot.img of=/dev/<device> seek=16384 conv=fsync
Note

Be careful to flash the u-boot in the device root itself and not in one of the partition, e.g. :

/dev/sda -> OK

/dev/sda1 -> NOT OK

Tip

U-boot is now flashed

Flash kernel and filesystem

Choose the right binaries from the board page. You need to download a kernel and a filesystem tarball.

In the command below we suppose two device partitions, mounted respectively as /media/<device>2 and /media/<device>3. If your situation is different, please change the path accordingly.

First, extract the filesystem inside the second partition, with the command:

tar xpf <filesystem-file>.tar -C /media/<device>3

Extract the kernel tarball provided: inside it there are 2 folders, named boot and lib. You need to copy all the content of the boot folder inside the root of the first partition of the device, e.g.:
cp boot/* /media/<device>2

Copy the content of the lib/modules folder of the tarball inside the lib/modules folder inside the second partition, e.g.:

mkdir /media/<device>3/lib/modules
cp -r lib/modules/* /media/<device>3/lib/modules

Note

If you compiled the kernel yourself, copy the Image file inside the second partition alongside all the dtb and dtbo files.

Now unmount the device and you are ready to go.

Tip

A full bootable disk has now be created.