ubuntu 20.04 编译MQ-Dual Longan SDK
-
安装编译需要的依赖软件包
除了
gcc,ncurse,bison,autoconf,wget,patch,texinfo,zlib,dos2unix
之外需要安装如下:sudo apt-get install git sudo apt-get install gnupg sudo apt-get install flex sudo apt-get install bison sudo apt-get install gperf sudo apt-get install build-essential sudo apt-get install zip sudo apt-get install curl sudo apt-get install libc6-dev sudo apt-get install libncurses5-dev:i386 sudo apt-get install x11proto-core-dev sudo apt-get install libx11-dev:i386 sudo apt-get install libreadline6-dev:i386 sudo apt-get install libgl1-mesa-glx:i386 sudo apt-get install libgl1-mesa-dev sudo apt-get install g++-multilib sudo apt-get install mingw32 sudo apt-get install tofrodos sudo apt-get install python-markdown sudo apt-get install libxml2-utils sudo apt-get install xsltproc sudo apt-get install zlib1g-dev:i386 sudo apt-get install gawk sudo dpkg-reconfigure dash 选择no sudo apt-get install libgl1-mesa-dev:i386 sudo apt install u-boot-tools
参照官方文档《T113_Longan_Linux_SDK开发环境配置手册.pdf》进行编译主要差异如下
- 增加这一句
sudo apt-get install libgl1-mesa-dev:i386
同时,最后有一条ln -s
没有照做。 - 编译过程遇到报错,具体看下面的参考文档一节
- "mkimage" command not found - U-Boot images will not be built --->
sudo apt install u-boot-tools
编译过程如下:
source ./build/envsetup.sh ......... ./build.sh ....... media/qotone/Dev/SW/sdk/t113-longan/platform/framework/auto/kernel/xr829/Makefile:19: CROSS_COMPILE: arm-linux-gnueabi- Building modules, stage 2. MODPOST 1 modules CC [M] /media/qotone/Dev/SW/sdk/t113-longan/platform/framework/auto/kernel/xr829/xr829.mod.o LD [M] /media/qotone/Dev/SW/sdk/t113-longan/platform/framework/auto/kernel/xr829/xr829.ko make[1]: Leaving directory '/media/qotone/Dev/SW/sdk/t113-longan/out/kernel/build' '/media/qotone/Dev/SW/sdk/t113-longan/platform/framework/auto/kernel/xr829/xr829.ko' -> '/media/qotone/Dev/SW/sdk/t113-longan/platform/../out/t113/evb1_auto/longan/buildroot/target/lib/modules/5.4.61/xr829.ko' PARTITION_FEX=/media/qotone/Dev/SW/sdk/t113-longan/device/config/chips/t113/configs/evb1_auto/longan/sys_partition.fex ROOTFS_FEX_LINE=64 ROOTFS_FEX_STR= size = 2097152 ROOTFS_FEX_SIZE= 2097152 EXT4_SIZE=1073741824(1073741824/1024/1024) /media/qotone/Dev/SW/sdk/t113-longan/device/config/chips/t113/configs/evb1_auto/longan/sys_partition.fex rootfs.fex size is 2097152 EXT4_SIZE= 2097152*512=1073741824 Creating filesystem with parameters: Size: 1073741824 Block size: 4096 Blocks per group: 32768 Inodes per group: 8192 Inode size: 256 Journal blocks: 4096 Label: Blocks: 262144 Block groups: 8 Reserved blocks: 0 Reserved block group size: 63 Created filesystem with 7384/65536 inodes and 54559/262144 blocks /media/qotone/Dev/SW/sdk/t113-longan/build/bin/make_ext4fs -s -l 1073741824 /media/qotone/Dev/SW/sdk/t113-longan/out/t113/evb1_auto/longan/rootfs.ext4 /media/qotone/Dev/SW/sdk/t113-longan/out/t113/evb1_auto/longan/buildroot/target INFO: pack rootfs ok ... INFO: ---------------------------------------- INFO: build lichee OK. INFO: ---------------------------------------- /build.sh pack ACTION List: mkpack ;======== Execute command: mkpack INFO: packing firmware ... INFO: Use BIN_PATH: /media/qotone/Dev/SW/sdk/t113-longan/device/config/chips/t113/bin copying tools file copying configs file copying product configs file /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/aultls32.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/aultools.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/boot_package.cfg /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/boot_package.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/boot_package_nor.cfg /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/cardscript.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/cardscript_secure.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/cardtool.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/diskfs.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/dragon_toc.cfg /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/env-recovery.cfg /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/env.cfg /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/env_ab.cfg /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/env_burn.cfg /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/env_dragon.cfg /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/env_nor.cfg /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/esm.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/image.cfg /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/image_crashdump.cfg /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/image_linux.cfg /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/image_nor.cfg /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/parameter.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/split_xxxx.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/sunxi.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/sw-subimgs-ab-rdiff.cfg /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/sw-subimgs-ab.cfg /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/sw-subimgs-recovery.cfg /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/sys_config.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/sys_partition-recovery.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/sys_partition.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/sys_partition_ab.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/sys_partition_dump.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/sys_partition_nor.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/sys_partition_private.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/sysrecovery.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/toc0.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/toc1.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/usbtool.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/usbtool_crash.fex /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/usbtool_test.fex copying boot resource copying boot file '/media/qotone/Dev/SW/sdk/t113-longan/device/config/chips/t113/bin/boot0_nand_sun8iw20p1.bin' -> '/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/boot0_nand.fex' '/media/qotone/Dev/SW/sdk/t113-longan/device/config/chips/t113/bin/boot0_sdcard_sun8iw20p1.bin' -> '/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/boot0_sdcard.fex' '/media/qotone/Dev/SW/sdk/t113-longan/device/config/chips/t113/bin/boot0_spinor_sun8iw20p1.bin' -> '/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/boot0_spinor.fex' '/media/qotone/Dev/SW/sdk/t113-longan/device/config/chips/t113/bin/fes1_sun8iw20p1.bin' -> '/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/fes1.fex' '/media/qotone/Dev/SW/sdk/t113-longan/device/config/chips/t113/bin/u-boot-sun8iw20p1.bin' -> '/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/u-boot.fex' '/media/qotone/Dev/SW/sdk/t113-longan/device/config/chips/t113/bin/dsp0.bin' -> '/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/dsp0.fex' '/media/qotone/Dev/SW/sdk/t113-longan/device/config/chips/t113/bin/optee_sun8iw20p1.bin' -> '/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/optee.fex' '/media/qotone/Dev/SW/sdk/t113-longan/device/config/chips/t113/bin/boot0_nand_sun8iw20p1.bin' -> '/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/boot0_nand.fex' '/media/qotone/Dev/SW/sdk/t113-longan/device/config/chips/t113/bin/boot0_sdcard_sun8iw20p1.bin' -> '/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/boot0_sdcard.fex' '/media/qotone/Dev/SW/sdk/t113-longan/device/config/chips/t113/bin/boot0_spinor_sun8iw20p1.bin' -> '/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/boot0_spinor.fex' '/media/qotone/Dev/SW/sdk/t113-longan/device/config/chips/t113/bin/fes1_sun8iw20p1.bin' -> '/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/fes1.fex' '/media/qotone/Dev/SW/sdk/t113-longan/device/config/chips/t113/bin/u-boot-sun8iw20p1.bin' -> '/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/u-boot.fex' '/media/qotone/Dev/SW/sdk/t113-longan/device/config/chips/t113//bin/dsp0.bin' -> '/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/dsp0.fex' '/media/qotone/Dev/SW/sdk/t113-longan/device/config/chips/t113/bin/optee_sun8iw20p1.bin' -> '/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/optee.fex' copying boot file 2.0 '/media/qotone/Dev/SW/sdk/t113-longan/out/t113/evb1_auto/longan/boot0_nand_sun8iw20p1.bin' -> '/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/boot0_nand.fex' '/media/qotone/Dev/SW/sdk/t113-longan/out/t113/evb1_auto/longan/boot0_sdcard_sun8iw20p1.bin' -> '/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/boot0_sdcard.fex' '/media/qotone/Dev/SW/sdk/t113-longan/out/t113/evb1_auto/longan/boot0_spinor_sun8iw20p1.bin' -> '/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/boot0_spinor.fex' '/media/qotone/Dev/SW/sdk/t113-longan/out/t113/evb1_auto/longan/fes1_sun8iw20p1.bin' -> '/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/fes1.fex' '/media/qotone/Dev/SW/sdk/t113-longan/out/t113/evb1_auto/longan/sboot_sun8iw20p1.bin' -> '/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/sboot.bin' '/media/qotone/Dev/SW/sdk/t113-longan/out/t113/evb1_auto/longan/u-boot-sun8iw20p1.bin' -> '/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/u-boot.fex' copying additional files /media/qotone/Dev/SW/sdk/t113-longan/out/t113/evb1_auto/longan/.sunxi.dts: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-' dbg1 pack /media/qotone/Dev/SW/sdk/t113-longan/out/t113/evb1_auto/longan/dtc -W no-unit_address_vs_reg -W no-simple_bus_reg -W no-unique_unit_address -W no-cooling_device_property -W no-unit_address_format -I dtb -O dts -o /media/qotone/Dev/SW/sdk/t113-longan/out/t113/evb1_auto/longan/.sunxi.dts /media/qotone/Dev/SW/sdk/t113-longan/out/t113/evb1_auto/longan/sunxi.dtbs update optee sboot file Path=/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/sboot.bin script file Path=/media/qotone/Dev/SW/sdk/t113-longan/out/pack_out/sys_config.bin extd_head.select_mode:0 magic:$�� �� script update sboot ok pack boot package GetPrivateProfileSection read to end content_count=3 --mkenvimage create redundant env data!-- --redundant env data size 0x20000--- packing for linux normal this is not a partition key gpt_head->header_crc32 = 0x3e898e5f GPT----part num 8--- gpt_entry: 128 gpt_header: 92 GPT:boot-resource: 8000 10685 GPT:env : 10686 10e85 GPT:env-redund : 10e86 11685 GPT:boot : 11686 1a005 GPT:rootfs : 1a006 21a005 GPT:dsp0 : 21a006 21a805 GPT:private : 21a806 222805 GPT:UDISK : 222806 222815 update gpt file ok update mbr file ok /media/qotone/Dev/SW/sdk/t113-longan/tools/pack/pctools/linux/eDragonEx/ /media/qotone/Dev/SW/sdk/t113-longan/out/pack_out Begin Parse sys_partion.fex Add partion boot-resource.fex BOOT-RESOURCE_FEX Add partion very boot-resource.fex BOOT-RESOURCE_FEX FilePath: boot-resource.fex FileLength=dad400Add partion env.fex ENV_FEX000000000 Add partion very env.fex ENV_FEX000000000 FilePath: env.fex FileLength=20000Add partion env.fex ENV_FEX000000000 Add partion very env.fex ENV_FEX000000000 FilePath: env.fex FileLength=20000Add partion boot.fex BOOT_FEX00000000 Add partion very boot.fex BOOT_FEX00000000 FilePath: boot.fex FileLength=10db000Add partion rootfs.fex ROOTFS_FEX000000 Add partion very rootfs.fex ROOTFS_FEX000000 FilePath: rootfs.fex FileLength=c636270Add partion dsp0.fex DSP0_FEX00000000 Add partion very dsp0.fex DSP0_FEX00000000 FilePath: dsp0.fex FileLength=3fc78sys_config.fex Len: 0x2355 board.fex Len: 0x400 config.fex Len: 0x1400 split_xxxx.fex Len: 0x200 sys_partition.fex Len: 0xc21 sunxi.fex Len: 0xe800 boot0_nand.fex Len: 0xc000 boot0_sdcard.fex Len: 0xc000 u-boot.fex Len: 0xec000 u-boot-crash.fex Len: 0x25 toc1.fex Len: 0x8 toc0.fex Len: 0x8 fes1.fex Len: 0x4bc0 boot_package.fex Len: 0x140000 usbtool.fex Len: 0x2d200 usbtool_crash.fex Len: 0x1ec00 aultools.fex Len: 0x288b7 aultls32.fex Len: 0x2511f cardtool.fex Len: 0x11e00 cardscript.fex Len: 0x6de sunxi_gpt.fex Len: 0x2000 sunxi_mbr.fex Len: 0x10000 dlinfo.fex Len: 0x4000 arisc.fex Len: 0x6 vmlinux.fex Len: 0x36ba88b boot-resource.fex Len: 0xdad400 Vboot-resource.fex Len: 0x4 env.fex Len: 0x20000 Venv.fex Len: 0x4 env.fex Len: 0x20000 Venv.fex Len: 0x4 boot.fex Len: 0x10db000 Vboot.fex Len: 0x4 rootfs.fex Len: 0xc636270 Vrootfs.fex Len: 0x4 dsp0.fex Len: 0x3fc78 Vdsp0.fex Len: 0x4 BuildImg 0 Dragon execute image.cfg SUCCESS ! ----------image is at---------- size:288M /media/qotone/Dev/SW/sdk/t113-longan/out/t113_linux_evb1_auto_uart0.img pack finish
使用过程中遇到的问题
- 使用官方windows烧录工具烧写tf卡默认是选择的量产卡,应该选择启动卡
参考文档
- 增加这一句
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号