ubuntu22.04编译创龙T113-i mini的SDK

ubuntu版本22.04.1

1.解压安装包

拷贝sdk并解压出来,注意安装包较大请预留好硬盘空间

2.预安装编译应用

先安装如下应用,在编译过程中需要使用到的依赖

  sudo apt install  -y gperf git build-essential cmake flex bison u-boot-tools openssl libssl-dev texinfo

3.安装和更换python2

编译使用的是python2,预先进行安装配置

sudo apt install python2
sudo ln -s /usr/bin/python2 /usr/bin/python

4.配置

./build.sh config

Welcome to mkscript setup progress
All available platform:
   0. linux
Choice [linux]: 0
All available linux_dev:
   0. bsp
   1. dragonboard
   2. longan
   3. tinyos
Choice [longan]: 2
All available kern_ver:
   0. linux-5.4
Choice [linux-5.4]: 0
All available ic:
   0. t113
   1. t113_i
Choice [t113_i]: 1
All available board:
   0. evb1
   1. evb1_auto
   2. evb1_auto_nand
   3. evb1_auto_nor
   4. tlt113-evm-emmc
   5. tlt113-evm-nand
   6. tlt113-minievm-emmc
   7. tlt113-minievm-nand
Choice [tlt113-minievm-emmc]: 6
All available output_configs:
   0. hdmi
Choice [hdmi]: 0
All available flash:
   0. default
   1. nor
Choice [default]: 0
All available gnueabi:
   0. gnueabi
   1. gnueabihf
Choice [gnueabi]: 0

5.编译错误

./build.sh

6.编译错误

以下错误都是我自己遇到的,参考网上的解决办法,有一些没有遇到,如果出现请自行搜索解决

libfakeroot.c:99:40: error: ‘_STAT_VER’ undeclared (first use in this function)
在libfakeroot.c 增加

#ifndef _STAT_VER
 #if defined (__aarch64__)
  #define _STAT_VER 0
 #elif defined (__x86_64__)
  #define _STAT_VER 1
 #else
  #define _STAT_VER 3
 #endif
#endif

c-stack.c:55:26: error: missing binary operator before token "(" 55 | #elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
进入c-stack.c的文件夹下

wget https://raw.githubusercontent.com/keyfour/openwrt/2722d51c5cf6a296b8ecf7ae09e46690403a6c3d/tools/m4/patches/011-fix-sigstksz.patch
patch c-stack.c < 011-fix-sigstksz.patch

gdbusauth.c:1302:11: error: ‘%s’ directive argument is null

if(line != NULL)
    debug_print ("SERVER: WaitingForBegin, read '%s'", line);

gdbusmessage.c:2702:30: error: ‘%s’ directive argument is null

if(signature_str!= NULL)
    tupled_signature_str = g_strdup_printf ("(%s)", signature_str);

(.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin)😦.text+0x0): first defined here
多个 dtc-lexer.l 文件中的

YYLTYPE yylloc;

改为

extern YYLTYPE yylloc;

gstlib下的文件引用错误,错误很多,使用了最笨的办法将\去掉就行了,以下只是一个文件的错误
video-enumtypes.c error: stray '' in program

\#include "video.h" 
\#include "video-format.h" 
\#include "video-color.h" 
\#include "video-info.h" 
\#include "video-dither.h" 
\#include "colorbalance.h" 
\#include "navigation.h" 
\#include "video-chroma.h" 
\#include "video-tile.h" 
\#include "video-converter.h" 
\#include "video-resampler.h" 
\#include "video-frame.h" 
\#include "video-scaler.h"

改为

#include "video.h" 
#include "video-format.h" 
#include "video-color.h" 
#include "video-info.h" 
#include "video-dither.h" 
#include "colorbalance.h" 
#include "navigation.h" 
#include "video-chroma.h" 
#include "video-tile.h" 
#include "video-converter.h" 
#include "video-resampler.h" 
#include "video-frame.h" 
#include "video-scaler.h"
posted @ 2024-03-09 11:19  chencarl  阅读(297)  评论(0编辑  收藏  举报