一.按照《TQIMX6环境搭建》,成功安装ubuntu开发环境。
二.按照《TQIMX6_COREC编译手册》,成功安装交叉编译器。
三.按照《TQIMX6_COREC编译手册》,编译源码:
1.成功编译uboot,并烧录板子,打印如下信息:
U-Boot 2015.04 (Sep 21 2017 - 11:05:26)
CPU: Freescale i.MX6Q rev1.5 at 792 MHz
CPU: Temperature 33 C
Reset cause: POR
Board: MX6-SabreSD
I2C: ready
DRAM: 2 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
Display: CLAA-WVGA (800x480)
asd1
asd2
In: serial
Out: serial
Err: serial
switch to partitions #0, OK
mmc2(part 0) is current device
check_and_clean: reg 0, flag_set 0
Fastboot: Normal
flash target is MMC:2
Bad partition index:5 for partition:system
Bad partition index:4 for partition:data
Net: FEC [PRIME]
reading logo.bmp
** Unable to read file logo.bmp **
There is no valid bmp file at the given address
Normal Boot
Hit any key to stop autoboot: 0
2.成功编译kernel,但烧录板子后,kernel启动失败,打印如下信息:
reading zImage
8437800 bytes read in 397 ms (20.3 MiB/s)
reading imx6q-sabresd.dtb
44527 bytes read in 18 ms (2.4 MiB/s)
Kernel image @ 0x12000000 [ 0x000000 - 0x80c028 ]
## Flattened Device Tree blob at 18000000
Booting using the fdt blob at 0x18000000
Using Device Tree in place at 18000000, end 1800ddee
Starting kernel ...
可能原因:编译库文件版本可能不对,需要更新库。
解决方案:创建ubuntu_env_install.sh可执行文件,在文件中加入以下信息:
apt-get update
add-apt-repository ppa:ubuntu-toolchain-r/test
apt-get update
echo y | apt-get install openjdk-7-jdk
echo y | apt-get install uuid-dev
echo y | apt-get install uuid
echo y | apt-get install uuidcdef
echo y | apt-get install m4
echo y | apt-get install bison
echo y | apt-get install zlib1g-dev
echo y | apt-get install g++-multilib gcc-multilib lib32ncurses5-dev
echo y | apt-get install lib32readline-gplv2-dev lib32z1-dev
echo y | apt-get install lzop
echo y | apt-get install u-boot-tools
echo y | apt-get install libxml2-utils
echo y | apt-get install jack
echo y | apt-get install libz-dev
echo y | apt-get install lib32z1-dev
echo y | apt-get install gnupg flex gperf
echo y | apt-get install libc6-dev
echo y | apt-get install curl
echo y | apt-get install ia32-libs
echo y | apt-get install libxml2-utils
echo y | apt-get install gcc-4.4 g++-4.4 g++-4.4-multilib
mv -f /usr/bin/gcc /usr/bin/bak_gcc
mv -f /usr/bin/g++ /usr/bin/bak_g++
ln -s /usr/bin/gcc