Flash Image of Linux ( eMMC )
Update time:2018-04-02 Views:6452
Foreword
This article describes how to host the firmware file , burned to the development board eMMC flash memory through the USB male to male data cable (hereinafter collectively referred to as USB data cable). When upgrading, you need to select the appropriate upgrade method according to the host operating system and firmware type.
Note:
every time you upgrade the Linux firmware you must enter the 《MaskRom mode》
In addition, if eMMC is a Linux system and you want to replace the Android system, so you also need to enter the MaskRom mode to upgrade.
In the case of you only have the SD card,
Refer to 《Make Android SD Card to Startup System》, 《Make Linux SD Card to Startup System》 these articles to make system boot card.
Prepare
ROC-RK3328-CC dev board
Good USB male to male data cable
Windows
Install RK USB Driver
Connect the Device
you need to enter the MaskRom mode to upgrade device.Firstly make the device disconnect all power, and for the reason that the USB data cable can also provide system startup power for the development board, so you should also disconnect the USB data cable from the board.
Make one end of the data cable connect to the development board.
Short Flash data pin and ground pin, which is reserved on the board named CLK pad and GND pad.
Make the other end of the data cable connecte to the host computer.
make the board power on.
Wait a moment, disconnect short, the device should enter the MaskRom mode.
Write the Firmware into the Board
TOOL: AndroidTool download link :AndroidTool链接
Open the AndroidTool , it will be like this figure:
Write unified Firmware system.img into board
1、Upgrade the loader file : rk3328_loader_ddr786_v1.06.243.bin
2、Select the unified firmware that needs to be burned (click the blank space at the end of the line, which can be selected locally)
Tips:1、when burning,be sure to upgrade the Loader file first!
2、The firmware needs to exist locally.( Compile the unified firmware can see 《 Make Linux SD Card to Startup System》,or clike here to obtain a unified firmware )
Finsh the burning,as shown the following figure:
3. After pulling out the USB male to male data cable, restart the board.
Write Partition Image into the board
Proceed as follows:
Add the partition image to be burned: the address must be burned in the image below (each image has a unique address).
Make sure the path to the image file is correct, and if necessary, click the blank table cell to the right of the path to reselect it.
Click the "Run" button to start the upgrade process, the device will automatically restart after the upgrade process.
Note: Before upgrading the partition, you need to check the parameter.txt partition address to ensure that the partition offset and burning files are correct,
You need to view the SDK device / rockchip / rk3328 / parameter.txt file to ensure Android partition address,
Linux partition offset address is as follows:
Offset address as shown below
write the image into the board as shown below
Burn write partition mirror finish, as shown below.
Tip: after the burning partition is finished, the board will be restarted automatically.
Linux
RK provides a Linux command line tool called rkdeveloptool, support for unified firmware and partitioned image burning.
No need to install Linux device driver, just refer to the above connection device.
Install rkdeveloptool
First you need to install rkdeveloptool dependent libraries
sudo apt-get install libudev-dev libusb-1.0-0-dev dh-autoreconf -y
then git clone rkdeveloptool
git clone https://github.com/FireflyTeam/rkbin.git
Since the rkdeveloptool executable has been compiled, copy it to the / usr / local / bin directory on your PC
sudo cp rkbin/tools/rkdeveloptool /usr/local/bin
Connect to the Device
Please refer to the above device connection
Note that in order to enter Loader mode, please refer to 《Loader Mode》in Startup Mode Description
Write the firmware into eMMC Flash
First, confirm that you have already passed the 《Compile Kernel》 and 《Create Ubuntu Rootfs》 these two steps
Then use the build script to generate a unified firmware package -- system.img
build/mk-image.sh -c rk3328 -t system -r rk-rootfs-build/linaro-rootfs.img
There are two ways to write firmware, one is to use the rkdeveloptool tool to write, and the other is to use a script to write.
use rkdeveloptool to write
Use rkdeveloptool to write partition images into the EMMC flash on the boardUse rkdeveloptool to write partition images into the EMMC flash on the board
sudo rkdeveloptool db out/u-boot/rk3328_loader_ddr786_v1.06.243.bin sudo rkdeveloptool wl 0x40 out/u-boot/idbloader.img sudo rkdeveloptool wl 0x4000 out/u-boot/uboot.img sudo rkdeveloptool wl 0x6000 out/u-boot/trust.img sudo rkdeveloptool wl 0x8000 out/boot.img sudo rkdeveloptool wl 0x40000 out/linaro-rootfs.img
Then execute the following command to restart the board
sudo rkdeveloptool rd
use script to write
The following script command is to write the unified firmware system.img which generated in the out directory into the eMMC flash of the board.
build/flash_tool.sh -c rk3328 -p system -i out/system.img
ROC-RK3328-CC will automatically restart the device when the script has finished running.
You can also upgrade a single partition with build / flash_tool.sh
Boot from the eMMC Flash
ROC-RK3328-CC board will experience the first reboot after burning and writing the firmware,
Then you need to press the Enter button in the serial console to enter the command line configuration mode,
Input the following command into the gpt partition table, the system will restart again, and automatically load the rootfs file system.
gpt write mmc 0 $partitions boot
FAQs
Q1: How to force into MaskRom mode?
A1: If the board can not enter the Loader mode, booting from SD card also fails, you can try to force enter the MaskRom mode.Please see the operation method《MaskRom mode》。