2. Firefly RK3399J USB burning firmware

在这里插入代码片@ TOC

1. Instructions for programming with USB cable (important)

(1) Different upgrade versions
AIO-3399J is installed with the Android system by default at the factory. Due to the system characteristics, when the motherboard with Android7.1 system is installed to burn other firmware of the same version, some preprocessing is required, otherwise it will cause burning Failed to write firmware.

After the following pre-operation processing, the machine should be in the maskrom state, as shown in the figure below, otherwise the pre-operation will not succeed.

If the machine is currently in the maskrom state, no preprocessing is required, and any version of firmware can be burned directly.

Insert picture description here
(2) Burning tool (download the corresponding upgrade tool version according to the following table)
download address: http://www.t-firefly.com/doc/download/page/id/31.html
Insert picture description here
(3), firmware

Ubuntu:

The Ubuntu firmware released by Firefly uses the GPT partition format to manage the boot media. Early firmware using the MBR partition format has stopped supporting.

Android 7.1:

Android7.1 firmware is divided into tvbox version and industry version (mainly maintained). Both versions of firmware are compatible with the AIO-3399J board.

(4) After the Android7.1tvbox version of the firmware has been installed on the motherboard, if you need to update to other non-Android7.1tvbox version of the firmware, the following preprocessing is required

Pretreatment method 1:

​ Download RK3399_Android7.1_EraseIDB.7z,
download address: http://www.t-firefly.com/doc/download/page/id/31.html#other_397
Insert picture description here

First upgrade uboot separately. After the upgrade is completed, restart the motherboard, the motherboard will automatically erase IDB and enter maskrom mode. Then follow the normal upgrade process to update the firmware.
Pretreatment method 2:

Please read the following table carefully before programming:
Insert picture description here

2. Preparation

  • AIO-3399J Development Board
  • firmware
  • Host
  • Good double male USB data cable

3. Firmware file

There are generally two types of firmware files:

(1), single unified firmware

Unified firmware is a single file that is packaged and merged by all files including partition table, bootloader, uboot, kernel, and system. The firmware officially released by Firefly adopts the unified firmware format. Upgrading the unified firmware will update the data and partition table of all partitions on the motherboard, and erase all data on the motherboard.

(2) Multiple partition mirroring

That is, files with independent functions, such as partition table, bootloader, kernel, etc., are generated during the development phase. Independent partition mirroring can update only the designated partition while keeping other partition data from being damaged, which is very convenient for debugging during the development process.

With the unified firmware unpacking/packaging tool, the unified firmware can be unpacked into multiple partition images, or multiple partition images can be merged into one unified firmware.

4. Burn under windows

(1) Tools: Androidtool_xxx (version number)

Note: The tool version used by different firmware may be different

Install RK USB driver

Download Release_DriverAssistant.zip, unzip it, and run the DriverInstall.exe inside.
In order to use the updated driver for all devices, please select the driver to uninstall first, and then select the driver to install.
Download link:
http://www.t-firefly.com/doc/download/page/id/31.html

Insert picture description here

5. Connect the device

The way the device enters the upgrade mode is as follows:

(1) One method is to disconnect the power adapter and the double male USB data cable:

  • One end of the double male USB data cable is connected to the host and the other end is connected to the development board

  • Press and hold the RECOVERY button on the device and hold

  • Connect to power

  • After about two seconds, release the RECOVERY button

(2) Another method, no need to disconnect the power adapter and double male USB data cable:

  • One end of the double male USB data cable is connected to the host and the other end is connected to the development board
  • Press and hold the RECOVERY button on the device and hold
  • Short press the RESET button
  • After about two seconds, release the RECOVERY button
    Insert picture description here

The host should be prompted to find new hardware and configure the driver. Open the device manager, you will see the new device Rockusb Device
appears, as shown below. If not, you need to return to the previous step to reinstall the driver.

Insert picture description here

6. Burn firmware

Download AndroidTool (if the system is Android8.1, version 2.54 or higher is required), unzip it, and run
AndroidTool.exe in the AndroidTool_Release_v2.38 directory (note that if it is Windows
7/8, you need to press the right mouse button and choose to run as administrator) ,As shown below:
Insert picture description here

7. Burn the unified firmware update.img

The steps to flash the unified firmware update.img are as follows:

  1. Switch to the upgrade firmware page.
  2. Press the firmware button to open the firmware file to be upgraded. The upgrade tool will display detailed firmware information.
  3. Press the upgrade button to start the upgrade.
  4. If the upgrade fails, you can try to erase the Flash by pressing the Erase Flash button first, and then upgrade. Be sure to erase and program according to the "Notes for Programming with USB Cable (Important)"

Note: If the laoder version of the firmware you burned is inconsistent with that of the original machine, please erase the Flash before upgrading the firmware.

8. Burn partition image

The partition of each firmware may be different, please note the following two points:

  1. Use Androidtool_2.38 to flash ubuntu(MBR) and Android7.1 firmware using the default configuration;
  2. Use Androidtool_2.58 to flash ubuntu (GPT) and use the default configuration.
    Please perform the following operations to flash Android 8.1 firmware:
  3. Switch to the download mirror page; right-click the table, select import configuration; select rk3399-Android81.cfg

The steps to flash the partition image are as follows:

  1. Switch to the download mirror page.
  2. Tick ​​the partition to be burned, you can choose more than one.
  3. Make sure that the path of the image file is correct. If necessary, click the blank table cell to the right of the path to select again.
  4. Click the execute button to start the upgrade, and the device will automatically restart after the upgrade.

9. Burn under Linux

There is no need to install the device driver under Linux, just refer to the Windows chapter to connect the device.
(1) Tool download
Tool: Linux_Upgrade_Tool
download address: http://www.t-firefly.com/doc/download/page/id/31.html
Insert picture description here

Note: The tool version used by different firmware may be different, please download the corresponding version according to the [Programming Instructions]

Download Linux_Upgrade_Tool (Linux_Upgrde_Tool_for_android8.1 is required
if the system is Android8.1 ), and install it into the system according to the following method for easy calling:

(2), installation

unzip Linux_Upgrade_Tool_xxxx.zip
cd Linux_UpgradeTool_xxxx
sudo mv upgrade_tool /usr/local/bin
sudo chown root:root /usr/local/bin/upgrade_tool
sudo chmod a+x /usr/local/bin/upgrade_tool

(3) Burn and write the unified firmware update.img:

sudo upgrade_tool uf update.img

(4) If the upgrade fails, you can try to erase and then upgrade.

# 擦除 flash 使用 ef 参数需要指定 loader 文件或者对应的 update.img
sudo upgrade_tool ef update.img   #update.img :你需要烧写的 Ubuntu 固件
# 重新烧写
sudo upgrade_tool uf update.img

(5). Burn partition image: Ubuntu (MBR), Android7.1, Android8.1, use the following methods:

sudo upgrade_tool di -b /path/to/boot.img
sudo upgrade_tool di -k /path/to/kernel.img
sudo upgrade_tool di -s /path/to/system.img
sudo upgrade_tool di -r /path/to/recovery.img
sudo upgrade_tool di -m /path/to/misc.img
sudo upgrade_tool di -re /path/to/resource.img
sudo upgrade_tool di -p paramater   #烧写 parameter
sudo upgrade_tool ul bootloader.bin # 烧写 bootloader

Ubuntu (GPT), use the following method

sudo upgrade_tool ul $LOADER
sudo upgrade_tool di -p $PARAMETER
sudo upgrade_tool di -uboot $UBOOT
sudo upgrade_tool di -trust $TRUST
sudo upgrade_tool di -boot $BOOT
sudo upgrade_tool di -recovery $RECOVERY
sudo upgrade_tool di -misc $MISC
sudo upgrade_tool di -oem $OEM
sudo upgrade_tool di -userdata $USERDATA
sudo upgrade_tool di -rootfs $ROOTFS

If an error occurs during the upgrade due to flash problems, you can try low-level formatting and erasing nand flash:

sudo upgrade_tool lf update.img	# 低级格式化
sudo upgrade_tool ef update.img	# 擦除

10. Common problems

  1. How to forcefully enter MaskRom mode
    If the board cannot enter Loader mode, you can try to forcefully enter MaskRom mode at this time. Please refer to "MaskRom Mode" for the operation method.

  2. Analysis of programming failure
    If Download Boot Fail occurs during the programming process, or an error occurs during the programming process, as shown in the figure below, it is usually caused by poor USB cable connection, poor quality cable, or insufficient computer USB port drive capability. Replace the USB cable or computer USB port for troubleshooting.
    Insert picture description here

Guess you like

Origin blog.csdn.net/qq_18077275/article/details/108888616