“This is the 10th day of my participation in the First Challenge 2022. For details: First Challenge 2022”


We customize our ownUbuntuChanges are often required during firmware or debuggingKernelTo giveKernelMake feature clipping or adding, modify and compileKernelAfter that, if we pack it wholeUbuntuFirmware to burn write, it is too much time, this is because oneUbuntuThe size of the firmware is always up toGBIs the unit, then can only update separatelyKerneltobootPartition? The answer is yes!

In the previous article “[RK356x] [Firefy-Linux], I took you to understand the various partitions of The Ubuntu firmware. The following is the rockdev directory of the Linux_SDK. The file burned to the kernel partition is boot.img! From the soft link, you can see that boot.img points to boot.img in the kernel directory.

neutionwei@32b7b9ddcaab:~/project/rk356x_linux_release_20211019$ ls -l rockdev/boot.img lrwxrwxrwx 1 neutionwei neutionwei 18 Jan 20 09:07 boot.img -> .. /kernel/boot.imgCopy the code

@[toc]

1. Prepare tools

In order to avoid the odd mistake as much as possible, here are the tools you need:

  • PC: Windows 10
  • RK driver assistant: DriverAssitant (Version >= 5.1.1)
  • AndroidTool burn tool: RKDevTool, version >= 2.81
  • Good Type-C data line

RK driver assistant and AndroidTool burn tool can be downloaded from Firefly official, the link is as follows:

www.t-firefly.com/doc/downloa…

Click on the following image to download:

2. Environment construction

Environment setup is mainly to install RK driver assistant:

  1. Right click on attendant DriverAssitant;
  2. Click the driver to install (note: if you have installed the driver before, you should first click the driver to uninstall, uninstall after the completion of click install!)

3. Update firmware only for a partition

First, the board should enter the upgrade mode. After entering the upgrade mode, open RKDevTool, and “Found a LOADER device” is printed below. At this time, we click to read the partition table:

UbuntuThe system has some partitions in the originalRKDevToolThe tool may not exist in the configuration file, do not exist partition error, these ignore, clickOKYou can:After reading the partition table,RKDevToolThe existing partitions in the tool will be synchronized to the start address of the partition, so we can find the corresponding partition and load our own firmware:

Hit the frontSquare root, click on therunYou can:The same applies to firmware updates for other partitions separately!

4,RKDevToolsaveUbuntuSystem partition configuration file

The default RKDevTool has some partitions in Ubuntu and some are not. Save the configuration file of the Ubuntu partition for later debugging.

We’ll start withRKDevToolCorresponding partition outClick and right clickdeleteUbuntuPartitions that do not exist on the system, and add someRKDevToolThere is no theUbuntuSystem partition, and then clickReading partition tableUpdate partition address (Note:rootfswithuserdataPartitions do not need to be added) :In the space belowRight clickExport the configuration file and save it asrk356x-ubuntu-config.cfg: Open it next timeRKDevToolThe utility can reload the configuration file, againRight clickThe importrk356x-ubuntu-config.cfgConfiguration file: You can seeRKDevToolThe partition of the tool is the same as the one we modified earlier!

5. Why notrootfswithuserdataPartition?

(1) When packaging firmware, Linux_SDK released by Firefly will dynamically change the size of rootfs partition according to the actual file size of RootFS. In other words, TXT file 0x00c00000@0x00038000(rootfs),-@0x00c38000(userdata:grow) contents of the rootfs partition size and userdata partition start address will change dynamically! Burning rootfs too large will cause the file system to overwrite the UserData partition.

(2) UserData partition is generally associated with the factory setting of recovery partition.

(3) The rootFS partition accounts for most of the Ubuntu system firmware, so there is no need to update the root file system separately.