当前位置:网站首页>Rk3308-- firmware compilation

Rk3308-- firmware compilation

2022-06-10 15:59:00 Cat teacher NIA~

Fast track

Related path :cd work/hxy/RK3308/sdk-1.5/

Add dependency package

If the compiler encounters an error , It can be regarded as an error message , Install the corresponding software package . At that time, a large section of dependent packages were added directly , Can't achieve ( It may be because there is a newline character in the middle ), We will add them one by one

recommend Linux Server system version

Ubuntu 16.04.2 LTS Linux version 4.4.0-62-generic ([email protected]) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017

kernel And u-boot Required for compilation

apt And apt-get The difference between
#sudo apt-get update
#sudo apt-get installgit-coregnupgflexbisongperfbuild-essentialzipcurlzlib1g-devgcc-multilibg++-multiliblibc6-dev-i386lib32ncurses5-devx11proto-core-dev libx11-devlib32z1-devccachelibgl1-mesa-devlibxml2-utilsxsltprocunzipdevice-tree-compilerliblz4-tool

buildroot Required for compilation

#sudo apt-get installlibfile-which-perlsedmakebinutilsgccg++bashpatchgzipbzip2perltarcpiopythonunziprsyncfilebclibmpc3gitrepotexinfopkg-configcmaketreetexinfo

Introduction to cross compilation tool chain

u-boot And kernel Compile toolchain :
route :Y:\hxy\RK3308\sdk-1.5\prebuilts\gcc\linux-x86\aarch64\gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu\aarch64-linux-gnu
Corresponding version :gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05)

buildroot Compile toolchain :
route :Y:\hxy\RK3308\sdk-1.5\buildroot\output\rockchip_rk3308_release\host\bin

Specific compilation chain :aarch64-rockchip-linux-gnu-g++( from LED control Demo That's for sure )

Manually compile

u-boot compile

Check that the device is 64bit still 32bit Using instructions :uname -a

# uname -a
Linux rockchip 4.4.143 #11 SMP PREEMPT Thu Feb 17 16:05:42 CST 2022 aarch64 GNU/Linux

RK3308 64bit compile :
#cd u-boot
#./make.sh evb-rk3308

RK3308 32bit compile :
#./make.sh evb-aarch32-rk3308

Finished compiling , Will generate trust.imgrk3308_loader_v2.05.133.binuboot.img Three files

kernel compile

Main board screen printing :RK_EVB_RK3308_DDR3P116SD4_V13
Small plate screen printing :RK_EVB_DMIC_PDM_6C70_v11_20180427J

RK3308 EVB V13 The development board is matched with different microphone array boards , Different board level configuration files are required , The distinction is as follows :
 Insert picture description here
route :Y:\hxy\RK3308\sdk-1.5\kernel\arch\arm64\boot\dts\rockchip

Related documents :rk3308-evb-dmic-pdm-v13.dts(PDM Digital microphone )

Compile instructions : After compilation , stay kernel root directory , Generate boot.img Image file .
#cd kernel
#make rk3308_linux_defconfig
#make rk3308-evb-dmic-pdm-v13.img

buildroot compile

After the customer configures the compilation dependency according to the actual compilation environment , After the configuration is completed according to the following steps , perform make that will do
#source buildroot/build/envsetup.sh

Top of tree: /home/luckystar/work/hxy/RK3308/sdk-1.5

You're building on Linux
Lunch menu...pick a combo:

 - rockchip_rk3308_64_dueros
 - rockchip_rk3308_recovery
 - rockchip_rk3308_release 
Which would you like? [0]:

Select the corresponding serial number , Such as 31 perhaps 30( choice 30 Because compiling 31 When generating firmware, you need a recovery.img)

#makemake When you come out, you can buildroot/output See under directory )

#./mkfirmware.sh( Execute after compilation SDK In the root directory mkfirmware.sh Script generates firmware ) All images required for burning will be copied to rockdev Catalog , as follows :

  • boot.img
  • misc.img
  • parameter.txt
  • recovery.img
  • MiniLoaderAll.bin( namely rk3308_loader_v2.05.133.bin)
  • oem.img
  • userdata.img
  • rootfs.img
  • trust.img
  • uboot.img

Automatic compilation

In order to improve the efficiency of compilation , Reduce the possible misoperation of manual compilation , The SDK Fully automated compilation scripts are integrated in , Facilitate firmware compilation 、 Backup , Use the following command on the console :./build.sh

route :

  • Y:\hxy\RK3308\sdk-1.5\device\rockchip\common( Fully automated compilation script original file )
  • Y:\hxy\RK3308\sdk-1.5\device\rockchip\rk3308

file :

  • build.sh
  • BoardConfig.mk( You can modify specific variables in the script )

Module partial compilation

For the convenience of development and debugging , Fully automated compilation scripts also support the compilation of individual modules , Convenient for module debugging , Some modules can be specified and compiled . For module partial compilation, please refer to the operating instructions :

./build.sh -h
====USAGE: build.sh modules====
uboot     -build uboot
kernel    -build kernel
rootfs    -build default rootfs, currently build buildroot as default
buildroot -build buildroot rootfs
yocto     -build yocto rootfs, currently build ros as default
ros       -build ros rootfs
debian    -build debian rootfs
pcba      -build pcba
recovery  -build recovery
all       -build uboot, kernel, rootfs, recovery image
cleanall  -clean uboot, kernel, rootfs, recovery
firmware  -pack all the image we need to boot up system
updateimg -pack update image
save      -save images, patches, commands used to debug
default   -build all modules

For example, separate compilation kernel, Just execute the following command :./build.sh kernel

modify BoardConfig.mk

Related path :Y:\hxy\RK3308\sdk-1.5\device\rockchip\rk3308

原网站

版权声明
本文为[Cat teacher NIA~]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/161/202206101528356293.html