Compile Android7.1 Industry firmware(main maintenance)¶
Download compilation instructions:¶
Android7.1 industry version(main maintenance)It is more widely used in industry and tablet and box fields, and has been verified for stable performance in mass production. This version also serves as our main maintenance version and is applicable to all models of our RK3399 system.
Compile Android7.1 industry firmware¶
Download Android SDK¶
The Android SDK source package is relatively large, you can go to the download page to get the Android7.1 source package: Android7.1 industry SDK
After downloading, verify the MD5 code:
$ md5sum /path/to/rk3399-firefly-industry-71-20190926.7z.001 afb279a7d2966908bcf53ce2c2c05edc rk3399-firefly-industry-71-20190926.7z.001 $md5sum /path/to/rk3399-firefly-industry-71-20190926.7z.002 2bc5a41fd1056f1d1ab1f7e84f666bee rk3399-firefly-industry-71-20190926.7z.002
After confirming that it is correct, you can unzip:
mkdir -p ~/proj/firefly-rk3399-Industry cd ~/proj/firefly-rk3399-Industry 7z x /path/to/rk3399-firefly-industry-71-20190926.7z.001 -r -o. git reset --hard
Note: Be sure to update the remote warehouse after decompression. The following is how to update from gitlab:
1. Enter the SDK root directory cd ~/proj/firefly-rk3399-Industry 2. Download remote bundle repository git clone https://gitlab.com/TeeFirefly/rk3399-industry-nougat-bundle.git .bundle 3. If the download warehouse fails, the current bundle warehouse is about 1.4G, so there may be stuck or failed problems during synchronization. You can download and unzip it from the Baidu cloud link below to the SDK root directory. 7z x rk3399-industry-nougat-bundle.7z -r -o. && mv rk3399-industry-nougat-bundle/ .bundle/ 4. Update the SDK, and subsequent updates do not need to pull the remote warehouse again, just execute the following command .bundle/update 5. Follow the prompts to update the content to FETCH_HEAD, synchronize FETCH_HEAD to the firefly branch git rebase FETCH_HEAD
Firefly-RK3399 industry version product compilation method¶
HDMI display compilation¶
Overall compilation: ./FFTools/make.sh -d rk3399-roc-pc -j8 -l rk3399_roc_pc-userdebug ./FFTools/mkupdate/mkupdate.sh -l rk3399_roc_pc-userdebug
Compile manually Firefly-RK3399¶
Before compiling, execute the following command to configure environment variables:
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 export PATH=$JAVA_HOME/bin:$PATH export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
cd ~/proj/Firefly-RK3399/kernel/ make ARCH=arm64 firefly_defconfig make -j8 ARCH=arm64 rk3399-firefly.img
cd ~/proj/Firefly-RK3399/u-boot/ make rk3399_defconfig make ARCHV=aarch64 -j8
cd ~/proj/Firefly-RK3399/ source build/envsetup.sh lunch rk3399_firefly-userdebug make -j8 ./mkimage.sh
Packaged into unified firmware update.img¶
After compilation, you can use Firefly official scripts to package into unified firmware, execute the following command：
After packaging, it will be in rockdev/Image-XXX/ Generate unified firmware under the directory: (product name )XXX_XXX_date XXX.img
It is also very simple to package the unified firmware update.img under Windows. Copy the generated files to the rockdev \ Image directory of AndroidTool, and then run the mkupdate.bat batch file under the rockdev directory to create update.img and store it in rockdev \ Image directory.
Flash partition image¶
When compiling, executing ./mkimage.sh will repackage boot.img and system.img, and copy other related image files to the directory rockdev / Image-rk3399_firefly /. The following lists the image files used by general firmware:
boot.img ：The initial file image of Android is responsible for initializing and loading the system partition.
kernel.img ：Kernel image.
misc.img ：misc partition image, responsible for starting mode switching and parameter transfer of emergency mode.
parameter.txt ：emmc partition information
recovery.img ：First aid mode image。
resource.img ：The resource image contains the boot tree and the device tree information of the kernel.
system.img ：Android system partition image, ext4 file system format.
trust.img ：Hibernation and wake-up related files
rk3399_loader_v1.08.106.bin ：Loader file
uboot.img ：uboot file
Please refer to Upgrade the firmware article to program partition image file.
If you are using a Windows system, copy the above image file to the rockdev \ Image directory of the AndroidTool (firmware upgrade tool under Windows), and then refer to the upgrade document to burn the partition image. This has the advantage of using the default configuration. No need to modify the file path.
update.img facilitates the release of firmware for end users to upgrade the system. It is more convenient to use partition images in general development.
When using the upgrade tool to upgrade the industry version of the firmware, if the original tvbox version of the firmware is burned, you need to short-circuit emmc or flash erase first. And pay attention to use the matching upgrade tool
Please refer to Instructions for writing with USB cable (important)