野火电子论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 19833|回复: 5

野火i.MX6ULL Linux Pro板- 编译uboot、linux、rootfs,基于buildroot

[复制链接]
发表于 2019-11-19 09:24:01 | 显示全部楼层 |阅读模式
本帖最后由 Jmhh247 于 2019-11-19 09:27 编辑

关键字:imx6ull ,uboot, linux, buildroot, qt

官方资料总链接:-[野火i.MX 6ULL Linux开发板](https://github.com/Embdefire/pro ... 0%E5%8F%91%E6%9D%BF)

- 主机环境:ubuntu16.04-64bit
- 硬件版本:野火imx6ull-pro emmc


---
一、准备工作

1. 新建工作目录

统一目录名称,方便将来使用脚本做一些自动化工作。
```
mkdir code-build
cd code-build/
mkdir u-boot linux rootfs
```

2. 下载源码

gitee下载,速度飞快。

- u-boot

```
cd u-boot/

git clone https://gitee.com/rich-embed/ebf_6ull_uboot.git
```

- linux

```
cd linux/

git clone https://gitee.com/rich-embed/ebf_6ull_linux.git
```

- buildroot

我用的是buildroot2017,直接在这里下载,然后复制到rootfs目录内。

buildroot-2017.08.1.tar.gz (5.66 MB, 下载次数: 77)

解压:
```
cd rootfs/

tar xvf buildroot-2017.08.1.tar.gz
```

以上执行完成,最终的目录格式是这样的:

```
.
├── linux
│   └── ebf_6ull_linux
├── rootfs
│   ├── buildroot-2017.08.1
│   └── buildroot-2017.08.1.tar.gz
└── u-boot
    └── ebf_6ull_uboot

6 directories, 1 file

```

---
二、编译打包

交叉编译工具链使用buildroot编译的,所以这里需要先编译buildroot。

1. 编译buildroot

进入配置
```
cd buildroot-2017.08.1/

make menuconfig
```
buildroot-menu.png

主要的配置如下:
- 配置CPU类型
targetopt.png

- 配置工具链
toolchain.png


这里直接提供我的配置文件imx6ul-buildroot2017-qt5-v1.config,复制到buildroot目录,并改名为.config。

```
cd buildroot-2017.08.1/

cp imx6ul-buildroot2017-qt5-v1.config .config
```

- 编译
```
cd buildroot-2017.08.1/

time make
```

整个编译过程较长,可能达几个小时。


生成根文件系统位置:
```
buildroot-2017.08.1/output/images/rootfs.tar
```

制作好的工具链位置:
```
# arm-gcc
/buildroot-2017.08.1/output/host/bin/arm-buildroot-linux-gnueabihf-g++

# qmake
/buildroot-2017.08.1/output/build/qt5base-5.9.1/bin/qmake
```


2. 编译u-boot

不打算将buildroot生成的工具链加入系统环境变量,所以为了方便,制作了编译脚本。后面会给出脚本下载。

编译步骤:

- 复制脚本到u-boot/ebf_6ull_uboot/目录

```
# 用到的脚本
build-config-emmc.sh
build-uboot.sh
```

- 执行配置脚本

```
cd u-boot/ebf_6ull_uboot/

./build-config-emmc.sh
```
- 执行编译脚本
```
./build-uboot.sh
```

生成的u-boot位置:

```
u-boot/ebf_6ull_uboot/u-boot.imx
```

3. 编译linux

同样用脚本编译。

- 先安装lzop,否则可能报错

```
sudo apt-get install lzop
```

- 复制脚本到linux/ebf_6ull_linux/目录

```
# 用到的脚本
build-config-kernel.sh
build-kernel.sh
```

- 执行配置脚本:

```
cd linux/ebf_6ull_linux/

./build-config-kernel.sh
```
- 执行编译脚本:
```
./build-kernel.sh
```

生成的kernel位置:

```
Kernel: arch/arm/boot/zImage
```

生成的设备树位置:

```
arch/arm/boot/dts
```

4. 打包固件

- 转换rootfs的格式

由于buildroot生成的根文件系统是.tar格式,而mfg烧录工具需要的格式是.tar.bz2,需要转换一下。

我写了转换脚本 pack_imx6ul_rootfs-v1.sh,复制到rootfs目录里。

一定用管理员权限执行脚本

```
cd rootfs/

sudo ./pack_imx6ul_rootfs-v1.sh
```

转换后根文件系统在这里:

pack-rootfs.png

- 复制相关文件

把脚本cp_uboot_kernel_rootfs-v1.sh,复制到code-build目录里。

执行脚本:

```
code-build/
./cp_uboot_kernel_rootfs-v1.sh
```

成功后,所有固件相关文件都打包在 0_Firmware 目录内:

firmware.png
kernel-all.png



---
三、烧录固件

使用USB烧录方式,在win10下进行。

- 下载USB烧录工具

里面找到USB升级目录,有烧录说明。
```
3-配套固件 链接:https://pan.baidu.com/s/173VY_y_dKpEhnTKkYtQS2g
提取码:zatj
```

- 烧录设置

1. 把 0_Firmware 的所有文件,都复制到mfgtools-release\Profiles\Linux\OS Firmware\release目录内。
2. 修改 mfgtools-release\cfg.ini,文件最后替换成下面的内容

```
my_zImage=zImage
my_uboot=u-boot.imx
my_rootfs=imx6ull-buildroot-rootfs.tar.bz2
my_dtb=imx6ull-14x14-evk-emmc-wifi.dtb
```

- 烧录固件

正常操作烧录即可。(按住mode键,再按reset键,可以直接进入USB烧录模式)

---
四、启动测试

账号:root
密码:123456

启动Log:

[mw_shl_code=c,true]U-Boot 2016.03-ga3f25a4-dirty (Nov 17 2019 - 21:09:26 +0800)

CPU:   Freescale i.MX6ULL rev1.1 69 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 43C
Reset cause: POR
Board: MX6ULL 14x14 EVK
I2C:   ready
DRAM:  512 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
switch to partitions #0, OK
mmc1(part 0) is current device
Net:   FEC1
Error: FEC1 address not set.

Normal Boot
Hit any key to stop autoboot:  0
reading logo.bmp
** Unable to read file logo.bmp **
switch to partitions #0, OK
mmc1(part 0) is current device
switch to partitions #0, OK
mmc1(part 0) is current device
reading boot.scr
** Unable to read file boot.scr **
reading zImage
6950472 bytes read in 169 ms (39.2 MiB/s)
Booting from mmc ...
reading imx6ull-14x14-evk.dtb
41155 bytes read in 17 ms (2.3 MiB/s)
Kernel image @ 0x80800000 [ 0x000000 - 0x6a0e48 ]
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300d0c2

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.1.15-2.1.0-gcc52aa5-dirty (vmzys@linux-host) (gcc version 6.4.0 (Buildroot 2017.08.1) ) #1 SMP PREEMPT Sun Nov 17 21:25:57 CST 2019
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Freescale i.MX6 ULL 14x14 EVK Board
Reserved memory: created CMA memory pool at 0x8c000000, size 320 MiB
Reserved memory: initialized node linux,cma, compatible id shared-dma-pool
Memory policy: Data cache writealloc
PERCPU: Embedded 12 pages/cpu @8bb2f000 s16908 r8192 d24052 u49152
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk1p2 rootwait rw
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 177888K/524288K available (8702K kernel code, 446K rwdata, 3036K rodata, 812K init, 333K bss, 18720K reserved, 327680K cma-reserved, 0K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xa0800000 - 0xff000000   (1512 MB)
    lowmem  : 0x80000000 - 0xa0000000   ( 512 MB)
    pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
    modules : 0x7f000000 - 0x7fe00000   (  14 MB)
      .text : 0x80008000 - 0x80b7ede0   (11740 kB)
      .init : 0x80b7f000 - 0x80c4a000   ( 812 kB)
      .data : 0x80c4a000 - 0x80cb9b60   ( 447 kB)
       .bss : 0x80cbc000 - 0x80d0f558   ( 334 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
        Additional per-CPU info printed with stalls.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
NR_IRQS:16 nr_irqs:16 16
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
*************************************
*    RICH YOCTO KERNEL BY PENGJIE   *
*    tel:  15521063922              *
*    mail:jiejie.128@163.com        *
*************************************
Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=30000)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
CPU0: update cpu_capacity 1024
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x80008280 - 0x800082d8
Brought up 1 CPUs
SMP: Total of 1 processors activated (6.00 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 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
hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 8 bytes.
imx6ul-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
imx6ul-pinctrl 2290000.iomuxc-snvs: initialized IMX pinctrl driver
mxs-dma 1804000.dma-apbh: initialized
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
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
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
MIPI CSI2 driver module loaded
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: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 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.
imx rpmsg driver is registered.
Bus freq driver module loaded
futex hash table entries: 256 (order: 2, 16384 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
jffs2: version 2.2. (NAND) &#169; 2001-2006 Red Hat, Inc.
fuse init (API version 7.23)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
imx-weim 21b8000.weim: Driver registered.
backlight supply power not found, using dummy regulator
MIPI DSI driver module loaded
MIPI DSI driver module loaded
sii902x 1-0039: No reset pin found
sii902x 1-0039: Can not read edid
21c8000.lcdif supply lcd not found, using dummy regulator
mxsfb 21c8000.lcdif: failed to find mxc display driver
Console: switching to colour frame buffer device 100x30
mxsfb 21c8000.lcdif: initialized
imx-sdma 20ec000.sdma: no event needs to be remapped
imx-sdma 20ec000.sdma: loaded firmware 3.3
imx-sdma 20ec000.sdma: initialized
2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 19, base_baud = 5000000) is a IMX
console [ttymxc0] enabled
21ec000.serial: ttymxc2 at MMIO 0x21ec000 (irq = 232, base_baud = 5000000) is a IMX
imx-rng 2284000.rngb: iMX RNG Registered.
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
spi_gpio spi4: gpio-miso property not found, switching to no-rx mode
CAN device driver interface
2090000.can supply xceiver not found, using dummy regulator
flexcan 2090000.can: device registered (reg_base=a09f8000, irq=26)
20b4000.ethernet supply phy not found, using dummy regulator
pps pps0: new PPS source ptp0
fec 20b4000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
fec 20b4000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: 36:bd:d2:29:20:b2
libphy: fec_enet_mii_bus: probed
fec 20b4000.ethernet eth0: registered PHC device 0
2188000.ethernet supply phy not found, using dummy regulator
pps pps1: new PPS source ptp1
fec 2188000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
fec 2188000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: 36:e2:ad:ca:26:4a
fec 2188000.ethernet eth1: registered PHC device 1
PPP generic driver version 2.4.2
PPP BSD Compression module registered
PPP Deflate Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
usbcore: registered new interface driver asix
usbcore: registered new interface driver ax88179_178a
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver net1080
usbcore: registered new interface driver cdc_subset
usbcore: registered new interface driver zaurus
usbcore: registered new interface driver cdc_ncm
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-mxc: Freescale On-Chip EHCI Host driver
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usb_ehset_test
2184800.usbmisc supply vbus-wakeup not found, using dummy regulator
2184000.usb supply vbus not found, using dummy regulator
2184200.usb supply vbus not found, using dummy regulator
ci_hdrc ci_hdrc.1: EHCI Host Controller
ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
mousedev: PS/2 mouse device common for all mice
input: 20cc000.snvs:snvs-powerkey as /devices/platform/soc/2000000.aips-bus/20cc000.snvs/20cc000.snvs:snvs-powerkey/input/input0
Goodix touchscreen driver installing....
goodix-ts 0-005d: GTP Driver Version: V2.8.0.1<2017/10/26>
goodix-ts 0-005d: GTP I2C Address: 0x5d
goodix-ts 0-005d: touch input parameters is [id x y w p]<1 800 480 1024 1024>
goodix-ts 0-005d: Success request irq-gpio
goodix-ts 0-005d: Success request rst-gpio
goodix-ts 0-005d: Guitar reset
usb 1-1: new high-speed USB device number 2 using ci_hdrc
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
goodix-ts 0-005d: I2C Addr is 5d
goodix-ts 0-005d: IC Version: 917S_0200
goodix-ts 0-005d: Driver set not send config
goodix-ts 0-005d: Use slot report protocol
input: goodix-ts as /devices/virtual/input/input1
goodix-ts 0-005d: INT num 174, trigger type:2
goodix-ts 0-005d: Input report thread disabled!
goodix-ts 0-005d: create proc entry gt9xx_config success
goodix-ts 0-005d: Applied memory size:1538.
goodix-ts 0-005d: I2C function: without pre and end cmd!
goodix-ts 0-005d: Create proc entry success!
goodix-ts 0-005d: Input report thread enabled!
snvs_rtc 20cc000.snvs:snvs-rtc-lp: rtc core: registered 20cc000.snvs:snvs-r as rtc0
i2c /dev entries driver
IR NEC protocol handler initialized
Registered IR keymap rc-lirc
input: gpio_ir_recv as /devices/platform/ir-receiver/rc/rc0/input2
rc0: gpio_ir_recv as /devices/platform/ir-receiver/rc/rc0

protocols = 0x       4, rc_type = 0x       4
pxp-v4l2 pxp_v4l2: initialized
Driver for 1-wire Dallas network protocol.
imx2-wdt 20bc000.wdog: timeout 60 sec (nowayout=0)
Bluetooth: HCI UART driver ver 2.3
Bluetooth: HCI UART protocol H4 registered
Bluetooth: HCI UART protocol BCSP registered
Bluetooth: HCI UART protocol ATH3K registered
usbcore: registered new interface driver bcm203x
usbcore: registered new interface driver btusb
usbcore: registered new interface driver ath3k
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
/soc/aips-bus@02100000/usdhc@02190000: voltage-ranges unspecified
sdhci-esdhc-imx 2190000.usdhc: assigned as wifi host
sdhci-esdhc-imx 2190000.usdhc: No vqmmc regulator found
mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA
/soc/aips-bus@02100000/usdhc@02194000: voltage-ranges unspecified
sdhci-esdhc-imx 2194000.usdhc: No vmmc regulator found
sdhci-esdhc-imx 2194000.usdhc: No vqmmc regulator found
mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
mmc1: MAN_BKOPS_EN bit is not set
fsl-asrc 2034000.asrc: driver registered
mmc1: new HS200 MMC card at address 0001
mmcblk1: mmc1:0001 8GTF4R 7.28 GiB
mmcblk1boot0: mmc1:0001 8GTF4R partition 1 4.00 MiB
imx-wm8960 sound: wm8960-hifi <-> 202c000.sai mapping ok
mmcblk1boot1: mmc1:0001 8GTF4R partition 2 4.00 MiB
imx-wm8960 sound: snd-soc-dummy-dai <-> 2034000.asrc mapping ok
mmcblk1rpmb: mmc1:0001 8GTF4R partition 3 512 KiB
mmcblk1: p1 p2
imx-wm8960 sound: wm8960-hifi <-> 202c000.sai mapping ok
imx-spdif sound-spdif: snd-soc-dummy-dai <-> 2004000.spdif mapping ok
NET: Registered protocol family 26
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM ver 1.11
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bluetooth: BNEP filters: protocol multicast
Bluetooth: BNEP socket layer initialized
Bluetooth: HIDP (Human Interface Emulation) ver 1.2
Bluetooth: HIDP socket layer initialized
8021q: 802.1Q VLAN Support v1.8
Key type dns_resolver registered
dhd_module_init: in Dongle Host Driver, version 1.579.77.41.16 (r-20190511-2)
dhd_wifi_platform_load: Enter
Power-up adapter 'DHD generic adapter'
======== PULL WL_REG_ON HIGH! ========
wifi_platform_bus_enumerate device present 1
======== Card detection to detect SDIO card! ========
pengjie -------drivers/net/wireless/bcmdhd/dhd_linux_platdev.c-----dhd_wifi_platform_load_sdio-----847
mmc0: queuing unknown CIS tuple 0x80 (2 bytes)
mmc0: queuing unknown CIS tuple 0x80 (3 bytes)
mmc0: queuing unknown CIS tuple 0x80 (3 bytes)
mmc0: queuing unknown CIS tuple 0x80 (7 bytes)
mmc0: queuing unknown CIS tuple 0x81 (9 bytes)
mmc0: new high speed SDIO card at address 0001
bcmsdh_register: register client driver
bcmsdh_sdmmc_probe: Enter num=1
bcmsdh_sdmmc_probe: Enter num=2
bus num (host idx)=0, slot num (rca)=1
found adapter info 'DHD generic adapter'
sdioh_attach: set sd_f2_blocksize 256
sdioh_attach: sd clock rate = 50000000
dhdsdio_probe : no mutex held. set lock
F1 signature read @0x18000000=0x1532a9a6
F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x2 pkg:0x3
DHD: dongle ram size is set to 524288(orig 524288) at 0x0
[dhd] dhd_conf_set_chiprev : chip=0xa9a6, chiprev=2
[dhd] CFG80211-ERROR) wl_setup_wiphy : Registering Vendor80211
[dhd] CFG80211-ERROR) wl_init_prof : wl_init_prof: No profile
dhd_attach(): thread:dhd_watchdog_thread:5c started
dhd_attach(): thread:dhd_dpc:5d started
dhd_attach(): thread:dhd_rxf:5e started
dhd_deferred_work_init: work queue initialized
dhd_tcpack_suppress_set: TCP ACK Suppress mode 0 -> mode 2
dhd_bus_set_default_min_res_mask: Unhandled chip id
sdioh_cis_read: func_cis_ptr[0]=0x1070
Dongle Host Driver, version 1.579.77.41.16 (r-20190511-2)
Register interface [wlan0]  MAC: 6c:21:a2:12:94:f0

dhd_tcpack_suppress_set: TCP ACK Suppress mode 2 -> mode 0
dhd_wl_ioctl: returning as busstate=0
dhd_bus_devreset: == Power OFF ==
dhd_txglom_enable: enable 0
dhd_bus_devreset:  WLAN OFF DONE
======== PULL WL_REG_ON LOW! ========
dhdsdio_probe : the lock is released.
dhd_module_init: Exit err=0
input: gpio-keys as /devices/platform/gpio-keys/input/input3
snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 2023-07-05 09:47:33 UTC (1688550453)
wlan-en-gpio: disabling
can-3v3: disabling
ALSA device list:
  #0: wm8960-audio
  #1: imx-spdif
kjournald starting.  Commit interval 5 seconds
EXT3-fs (mmcblk1p2): using internal journal
EXT3-fs (mmcblk1p2): recovery complete
EXT3-fs (mmcblk1p2): mounted filesystem with ordered data mode
VFS: Mounted root (ext3 filesystem) on device 179:2.
devtmpfs: mounted
Freeing unused kernel memory: 812K (80b7f000 - 80c4a000)
devpts: called with bogus options
Starting logging: OK
Initializing random number generator... random: dd urandom read with 46 bits of entropy available
done.
Starting network: OK
Starting dropbear sshd: OK
Starting postgresql: pg_ctl: another server might be running; trying to start server anyway
waiting for server to start..... done
server started
OK

Welcome to Buildroot
buildroot login: root
Password:
# ls
# cd /
# ls
bin         lib         lost+found  opt         run         tmp
dev         lib32       media       proc        sbin        usr
etc         linuxrc     mnt         root        sys         var
#
[/mw_shl_code]



运行qt-demo

qt-clock1.png


- 相关脚本文件在这里: imx6ull-tool-sh-config.zip (19.81 KB, 下载次数: 176)

---


回复

使用道具 举报

发表于 2019-11-19 12:11:29 | 显示全部楼层
cool
回复

使用道具 举报

 楼主| 发表于 2019-11-19 14:51:19 | 显示全部楼层
继续更新。

- 编译 Qt 自带 demo 方法

主帖中已经提到交叉编译工具链的位置,这里再列出一次:
[mw_shl_code=c,true]工具链位置:
# arm-gcc
/buildroot-2017.08.1/output/host/bin/arm-buildroot-linux-gnueabihf-g++

# qmake
/buildroot-2017.08.1/output/build/qt5base-5.9.1/bin/qmake
[/mw_shl_code]

有了编译工具,就可以进行Qt开发。

---

qt demo位置在: /rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/examples/widgets/widgets/




编译举例:


[mw_shl_code=c,true]vmtest@linux-test:~/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/examples/widgets/widgets/analogclock$ /home/vmtest/work/im
x6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/bin/qmake -v
QMake version 3.1
Using Qt version 5.9.1 in /home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib
vmtest@linux-test:~/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/examples/widgets/widgets/analogclock$ ls
analogclock.cpp  analogclock.h  analogclock.pro  main.cpp
vmtest@linux-test:~/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/examples/widgets/widgets/analogclock$ /home/vmtest/work/im
x6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/bin/qmake analogclock.pro
vmtest@linux-test:~/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/examples/widgets/widgets/analogclock$ ls
analogclock.cpp  analogclock.h  analogclock.pro  main.cpp  Makefile
vmtest@linux-test:~/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/examples/widgets/widgets/analogclock$ time make
/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/host/bin/arm-buildroot-linux-gnueabihf-g++ -c -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os --sysroot=/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/host/arm-buildroot-linux-gnueabihf/sysroot -O2 -O3 -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../../../include -I../../../../include/QtWidgets -I../../../../include/QtGui -I../../../../include/QtCore -I.moc -I../../../../mkspecs/devices/linux-buildroot-g++ -o .obj/analogclock.o analogclock.cpp
/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/host/bin/arm-buildroot-linux-gnueabihf-g++ -c -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os --sysroot=/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/host/arm-buildroot-linux-gnueabihf/sysroot -O2 -O3 -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../../../include -I../../../../include/QtWidgets -I../../../../include/QtGui -I../../../../include/QtCore -I.moc -I../../../../mkspecs/devices/linux-buildroot-g++ -o .obj/main.o main.cpp
/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/host/bin/arm-buildroot-linux-gnueabihf-g++ -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os --sysroot=/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/host/arm-buildroot-linux-gnueabihf/sysroot -O2 -O3 -fno-exceptions -Wall -W -dM -E -o .moc/moc_predefs.h ../../../../mkspecs/features/data/dummy.cpp
/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/bin/moc -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include .moc/moc_predefs.h -I/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/mkspecs/devices/linux-buildroot-g++ -I/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/examples/widgets/widgets/analogclock -I/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/include -I/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/include/QtWidgets -I/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/include/QtGui -I/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/include/QtCore -I/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/host/arm-buildroot-linux-gnueabihf/include/c++/6.4.0 -I/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/host/arm-buildroot-linux-gnueabihf/include/c++/6.4.0/arm-buildroot-linux-gnueabihf -I/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/host/arm-buildroot-linux-gnueabihf/include/c++/6.4.0/backward -I/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/host/lib/gcc/arm-buildroot-linux-gnueabihf/6.4.0/include -I/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/host/lib/gcc/arm-buildroot-linux-gnueabihf/6.4.0/include-fixed -I/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/host/arm-buildroot-linux-gnueabihf/include -I/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include analogclock.h -o .moc/moc_analogclock.cpp
/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/host/bin/arm-buildroot-linux-gnueabihf-g++ -c -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os --sysroot=/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/host/arm-buildroot-linux-gnueabihf/sysroot -O2 -O3 -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../../../include -I../../../../include/QtWidgets -I../../../../include/QtGui -I../../../../include/QtCore -I.moc -I../../../../mkspecs/devices/linux-buildroot-g++ -o .obj/moc_analogclock.o .moc/moc_analogclock.cpp
/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/host/bin/arm-buildroot-linux-gnueabihf-g++ --sysroot=/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/host/arm-buildroot-linux-gnueabihf/sysroot -Wl,-O1 -Wl,--enable-new-dtags -o analogclock .obj/analogclock.o .obj/main.o .obj/moc_analogclock.o   -L/home/vmtest/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/lib -lQt5Widgets -lQt5Gui -lQt5Core -lrt -ldl -latomic -lpthread

real        0m3.491s
user        0m2.031s
sys        0m1.433s
vmtest@linux-test:~/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/examples/widgets/widgets/analogclock$ ls
analogclock      analogclock.h    main.cpp
analogclock.cpp  analogclock.pro  Makefile
vmtest@linux-test:~/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/examples/widgets/widgets/analogclock$ file analogclock
analogclock: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-, for GNU/Linux 4.1.0, not stripped
vmtest@linux-test:~/work/imx6ul-fire/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/examples/widgets/widgets/analogclock$ [/mw_shl_code]



运行qt程序:

1. 通过nfs把编译好的analogclock复制到开发板
2. 开发板执行程序

[mw_shl_code=c,true]./analogclock -platform linuxfb[/mw_shl_code]


上传两个我编译好的程序,供测试。


qt-demo-app.zip (22.39 KB, 下载次数: 22)




回复 支持 反对

使用道具 举报

 楼主| 发表于 2019-11-19 15:00:25 | 显示全部楼层
编译好的固件在这里,按主帖方法用mfgtool烧录。

链接:https://pan.baidu.com/s/1sI33kcfiEdepmu-E0V5y-w
提取码:dxtf
复制这段内容后打开百度网盘手机App,操作更方便哦

回复 支持 反对

使用道具 举报

发表于 2019-11-19 20:50:56 | 显示全部楼层
看你骨骼惊奇必是练武奇才收藏了
回复 支持 反对

使用道具 举报

发表于 2020-1-18 23:26:57 来自手机 | 显示全部楼层
CPU: Freescale i.MX6ULL rev1.1 69 MHz ,  69MHz?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

联系站长|手机版|野火电子官网|野火淘宝店铺|野火电子论坛 ( 粤ICP备14069197号 ) 大学生ARM嵌入式2群

GMT+8, 2024-11-23 19:01 , Processed in 0.061729 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表