Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in
read-only mode
.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
使用
Ubuntu 18.04
主机环境进行源码编译
1.2 软件包配置
编译 Tina Linux SDK 之前,需要先确定编译服务器安装了 gcc,binutils,bzip2,flex,python,perl,make,ia32-libs,find,grep,diff,unzip,gawk,getopt,subversion,libz-dev,libc headers。
ubuntu 可直接执行以下命令安装:
sudo apt-get install build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip ia32-libs lib32z1 lib32z1-dev lib32stdc++6 libstdc++6 -y
ubuntu 16.04 及以上版本,执行下面命令安装软件包:
sudo apt-get install build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip lib32z1 lib32z1-dev lib32stdc++6 libstdc++6 -y libc6:i386 libstdc++6:i386 lib32ncurses5 lib32z1
2 编译打包
2.1 编译系统
(1) source build/envsetup.sh
(2) lunch
(3) make [-jN]
(4) pack [-d]
步骤(1)建立编译环境,导出编译变量。
步骤(2)提示需要选择你想要编译的方案。
步骤(3)参数N为并行编译进程数量,依赖编译服务器CPU核心数,如4核PC,可"make -j4"
步骤(4)打包固件,-d参数使生成固件包串口信息转到tf卡座输出。
编译完成后系统镜像会打包在out/<board>/目录下
step 1. cd命令跳转到tina-v853
step 2. source build/envsetup.sh
step 3.lunch
step 4.make -j16
错误 致命:不安全的存储库由其他人拥有
解决(该目录每个人都不一样):
~/tina-v853$ git config --global --add safe.directory ~/tina-v853
错误 致命:
step 5.pack
编译报错:
在tina-v853目录下
cd device/config/chips/v851s/configs/perf1/linux/
vim sys_partition.fex
根据报错信息中的rootfs.fex size too large 修改文件中的rootfs的size
2.2 编译 boot
命令有效目录
我也在这里发一下我的编译出错问题。
AS arch/arm/boot/compressed/hyp-stub.o
AS arch/arm/boot/compressed/lib1funcs.o
AS arch/arm/boot/compressed/ashldi3.o
AS arch/arm/boot/compressed/bswapsdi2.o
AS arch/arm/boot/compressed/piggy.o
LD arch/arm/boot/compressed/vmlinux
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
UIMAGE arch/arm/boot/uImage
"mkimage" command not found - U-Boot images will not be built
make[1]: *** [arch/arm/boot/Makefile:93:arch/arm/boot/uImage] 错误 1
make: *** [arch/arm/Makefile:331: uImage] Error 2
ERROR: build Failed
INFO: build kernel failed
解决办法:sudo apt-get install uboot-mkimage
如果uboot-mkimage安装不了说明已弃用
安装:sudo apt-get install u-boot-tools