您的位置:首页 > 运维架构 > Linux

TQIMAX6q调试笔记二:linux与uboot的编译

2017-09-24 09:05 281 查看
一.按照《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-4.4 /usr/bin/gcc

ln -s /usr/bin/g++-4.4 /usr/bin/g++

保存后,执行脚本,在编译烧录,成功!!!!打印信息如下:

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 ...

Booting Linux on physical CPU 0x0

Linux version 4.1.15 (root@lm) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #1 SMP PREEMPT Mon Sep 18 17:54:29 CST 2017

CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d

CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

Machine model: Freescale i.MX6 Quad SABRE Smart Device Board

cma: Reserved 384 MiB at 0x66000000

Memory policy: Data cache writealloc

PERCPU: Embedded 12 pages/cpu @eeee2000 s16704 r8192 d24256 u49152

Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 520736

Kernel command line: console=ttySAC0,115200 init=/init root=/dev/mmcblk3p2 rootwait rw video=mxcfb0:dev=ldb,1280x800@60,if=RGB888,bpp=24 video=mxcfb1:dev=hdmi,1920x1080@60,if=RGB24,bpp=24 video=mxcfb2:off video=mxcfb3:off vmalloc=256M androidboot.console=ttySAC0
consoleblank=0 androidboot.hardware=freescale cma=384M

log_buf_len individual max cpu contribution: 131072 bytes

log_buf_len total cpu_extra contributions: 393216 bytes

log_buf_len min size: 131072 bytes

log_buf_len: 524288 bytes

early log buf free: 129336(98%)

PID hash table entries: 4096 (order: 2, 16384 bytes)

Dentry cache hash table entries: 262144 (order: 8, 1048576 bytes)

Inode-cache hash table entries: 131072 (order: 7, 524288 bytes)

Memory: 1668452K/2097152K available (10494K kernel code, 589K rwdata, 4008K rodata, 392K init, 342K bss, 35484K reserved, 393216K cma-reserved, 278528K highmem)

Virtual kernel memory layout:

    vector  : 0xffff0000 - 0xffff1000   (   4 kB)

    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)

    vmalloc : 0xef800000 - 0xff000000   ( 248 MB)

    lowmem  : 0x80000000 - 0xef000000   (1776 MB)

    pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)

    modules : 0x7f000000 - 0x7fe00000   (  14 MB)

      .text : 0x80008000 - 0x80e31b4c   (14503 kB)

      .init : 0x80e32000 - 0x80e94000   ( 392 kB)

      .data : 0x80e94000 - 0x80f27760   ( 590 kB)

       .bss : 0x80f2a000 - 0x80f7fa1c   ( 343 kB)

SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1

Preemptible hierarchical RCU implementation.
Additional per-CPU info printed with stalls.

NR_IRQS:16 nr_irqs:16 16

L2C-310 erratum 769419 enabled

L2C-310 enabling early BRESP for Cortex-A9

L2C-310 full line of zeros enabled for Cortex-A9

L2C-310 ID prefetch enabled, offset 16 lines

L2C-310 dynamic clock gating enabled, standby mode enabled

L2C-310 cache controller enabled, 16 ways, 1024 kB

L2C-310: CACHE_ID 0x410000c7, AUX_CTRL 0x76070001

VPU 352M is enabled!

mxc_clocksource_init 3000000

Switching to timer-based delay loop, resolution 333ns

sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 715827882841ns

clocksource mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns

Console: colour dummy device 80x30

Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=3000)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 4096 (order: 2, 16384 bytes)

Mountpoint-cache hash table entries: 4096 (order: 2, 16384 bytes)

CPU: Testing write buffer coherency: ok

CPU0: thread -1, cpu 0, socket 0, mpidr 80000000

Setting up static identity map for 0x10008280 - 0x100082d8

CPU1: thread -1, cpu 1, socket 0, mpidr 80000001

CPU2: thread -1, cpu 2, socket 0, mpidr 80000002

CPU3: thread -1, cpu 3, socket 0, mpidr 80000003

Brought up 4 CPUs

SMP: Total of 4 processors activated (24.00 BogoMIPS).

CPU: All CPU(s) started in SVC mode.

devtmpfs: initialized

VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4

clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns

pinctrl core: initialized pinctrl subsystem

NET: Registered protocol family 16

DMA: preallocated 256 KiB pool for atomic coherent allocations

cpuidle: using governor ladder

cpuidle: using governor menu

CPU identified as i.MX6Q, silicon rev 1.5

hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.

hw-breakpoint: maximum watchpoint size is 4 bytes.

imx6q-pinctrl 20e0000.iomuxc: Invalid fsl,pins property in node /soc/aips-bus@02000000/iomuxc@020e0000/imx6qdl-sabresd/pciereggrp

imx6q-pinctrl 20e0000.iomuxc: no groups defined in /soc/aips-bus@02000000/iomuxc@020e0000/sgtl5000

imx6q-pinctrl 20e0000.iomuxc: no groups defined in /soc/aips-bus@02000000/iomuxc@020e0000/hs0038

imx6q-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver

mxs-dma 110000.dma-apbh: initialized

vgaar
4000
b: loaded

SCSI subsystem initialized

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

2000000.aips-bus:usbphy_nop1 supply vcc not found, using dummy regulator

2000000.aips-bus:usbphy_nop2 supply vcc not found, using dummy regulator

i2c i2c-0: IMX I2C adapter registered

i2c i2c-0: can't use DMA

i2c i2c-1: IMX I2C adapter registered

i2c i2c-1: can't use DMA

i2c i2c-2: IMX I2C adapter registered

i2c i2c-2: can't use DMA

Linux video capture interface: v2.00

pps_core: LinuxPPS API ver. 1 registered

pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>

PTP clock support registered

imx-ipuv3 2400000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)

imx-ipuv3 2800000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)

Advanced Linux Sound Architecture Driver Initialized.

Bluetooth: Core ver 2.20

NET: Registered protocol family 31

Bluetooth: HCI device and connection manager initialized

Bluetooth: HCI socket layer initialized

Bluetooth: L2CAP socket layer initialized

Bluetooth: SCO socket layer initialized

Switched to clocksource mxc_timer1

NET: Registered protocol family 2

TCP established hash table entries: 16384 (order: 4, 65536 bytes)

TCP bind hash table entries: 16384 (order: 5, 131072 bytes)

TCP: Hash tables configured (established 16384 bind 16384)

UDP hash table entries: 1024 (order: 3, 32768 bytes)

UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)

NET: Registered protocol family 1

RPC: Registered named UNIX socket transport module.

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

RPC: Registered tcp NFSv4.1 backchannel transport module.

CPU PMU: Failed to parse /soc/pmu/interrupt-affinity[0]

hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available

imx rpmsg driver is registered.

alarm entry alarmtimer_init

alarm exit alarmtimer_init

futex hash table entries: 1024 (order: 4, 65536 bytes)

VFS: Disk quotas dquot_6.6.0

VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)

NFS: Registering the id_resolver key type

Key type id_resolver registered

Key type id_legacy registered

Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

ntfs: driver 2.1.32 [Flags: R/W].

jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.

fuse init (API version 7.23)

Key type asymmetric registered

Asymmetric key parser 'x509' registered

bounce: pool size: 64 pages

io scheduler noop registered

io scheduler deadline registered

io scheduler cfq registered (default)

imx-weim 21b8000.weim: Driver registered.

pwm-backlight supply power not found, using dummy regulator

backlight_lvds supply power not found, using dummy regulator

MIPI DSI driver module loaded

MIPI DSI driver module loaded

ldb 2000000.aips-bus:ldb@020e0008: dual mode

ldb 2000000.aips-bus:ldb@020e0008: split mode or dual mode, ignoring second output

mxc_sdc_fb fb@0: registered mxc display driver ldb

imx-ipuv3 2800000.ipu: IPU DMFC DP HIGH RESOLUTION: 1(0,1), 5B(2~5), 5F(6,7)

Console: switching to colour frame buffer device 160x50

mxc_hdmi 20e0000.hdmi_video: Detected HDMI controller 0x13:0xa:0xa0:0xc1

mxc_sdc_fb fb@1: registered mxc display driver hdmi

mxc_sdc_fb fb@2: err interface_pix_fmt!

mxc_sdc_fb fb@2: get mxcfb of property fail

mxc_sdc_fb: probe of fb@2 failed with error -2

mxc_sdc_fb fb@3: err interface_pix_fmt!

mxc_sdc_fb fb@3: get mxcfb of property fail

mxc_sdc_fb: probe of fb@3 failed with error -2

imx-sdma 20ec000.sdma: no iram assigned, using external mem

imx-sdma 20ec000.sdma: no event needs to be remapped

imx-sdma 20ec000.sdma: loaded firmware 3.3

imx-sdma 20ec000.sdma: initialized

Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled

2020000.serial: ttySAC0 at MMIO 0x2020000 (irq = 25, base_baud = 5000000) is a IMX

console [ttySAC0] enabled

21e8000.serial: ttySAC1 at MMIO 0x21e8000 (irq = 301, base_baud = 5000000) is a IMX

21ec000.serial: ttySAC2 at MMIO 0x21ec000 (irq = 302, base_baud = 5000000) is a IMX

21f0000.serial: ttySAC3 at MMIO 0x21f0000 (irq = 303, base_baud = 5000000) is a IMX

21f4000.serial: ttySAC4 at MMIO 0x21f4000 (irq = 304, base_baud = 5000000) is a IMX

imx sema4 driver is registered.

[drm] Initialized drm 1.1.0 20060810

[drm] Initialized vivante 1.0.0 20120216 on minor 0

brd: module loaded

loop: module loaded

ahci-imx 2200000.sata: fsl,transmit-level-mV not specified, using 00000024

ahci-imx 2200000.sata: fsl,transmit-boost-mdB not specified, using 00000480

ahci-imx 2200000.sata: fsl,transmit-atten-16ths not specified, using 00002000

ahci-imx 2200000.sata: fsl,receive-eq-mdB not specified, using 05000000

ahci-imx 2200000.sata: SSS flag set, parallel bus scan disabled

ahci-imx 2200000.sata: AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl platform mode

ahci-imx 2200000.sata: flags: ncq sntf stag pm led clo only pmp pio slum part ccc apst 

scsi host0: ahci-imx

ata1: SATA max UDMA/133 mmio [mem 0x02200000-0x02203fff] port 0x100 irq 314

spidev spi1.0: entry spidev_probe

spi_imx 200c000.ecspi: probed

tun: Universal TUN/TAP device driver, 1.6

tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>

CAN device driver interface

2090000.flexcan supply xceiver not found, using dummy regulator

flexcan 2090000.flexcan: device registered (reg_base=efae8000, irq=32)

2094000.flexcan supply xceiver not found, using dummy regulator

flexcan 2094000.flexcan: device registered (reg_base=efaf0000, irq=33)

2188000.ethernet supply phy not found, using dummy regulator

pps pps0: new PPS source ptp0

libphy: fec_enet_mii_bus: probed

等等。。。。。。。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: