您尚未登录。

#3 Re: 全志 SOC » 测试测试 g_serial / g_ether USB Gadget (RNDIS) » 2020-06-15 15:12:36

没有解决,后来测试几次,都是这样的现象。

没再玩了。


逸俊晨晖 说:

你这个问题解决没有 我也遇到这个问题

#4 Re: 全志 SOC » 请问V3s Simple Framebuffer 启动之后,就把uboot显示的图片给清理了,两秒黑屏才进入app, 有什么办法不让他清屏呢 » 2020-06-09 20:53:42

请问,怎么启用DRM,有参考吗

shaoxi2010 说:

simple framebuffer好像没有实现双环冲,DRM的FB是可以的

#5 Re: 全志 SOC » 荔枝派zero 运行QT程序触摸不灵敏 但是可以单独运行ts_calibrate和ts_test » 2020-05-25 19:20:43

想起来我也有荔枝zero,我记得zero的原版硬件可以直接跑qt5带触摸,几乎没有特殊配置。

你的是原版硬件吗

#6 Re: 全志 SOC » 荔枝派zero 运行QT程序触摸不灵敏 但是可以单独运行ts_calibrate和ts_test » 2020-05-25 19:15:26

楼主,编译qt自带那个计算器例子运行一下,看看是不是需要镜像处理?

#9 Re: 全志 SOC » 本站网友 @rongwinzip 计划众筹一款X3开发板,大家有什么建议吗,欢迎跟帖 » 2020-05-17 10:24:53

上面大家说了很多,不再重复,建议:

1.CVBS输入,接模拟摄像头用(不知道X3是否自带CVBS, 如不带可以增加ADV7180或者TVP5150或其它)
2.USB接口充足,可以接USB摄像头
3.带RJ45网口,调试方便
4.HDMI和RGB都要。
5.最好再加个LVDS屏接口。

#10 Re: Nuvoton N32905/N32926/NUC972/N9H20/N9H26/N9H30 » 新唐 N9H30 emwin@linux 库/头文件/源码/文档 下载 » 2020-05-13 09:53:21

感谢楼主分享!

期待大佬们放demo出来,能力有限只会应用,不会pj (手动笑哭)...

#11 Re: 全志 SOC » LINUX动态修改开机动画应用层修改开机动画 » 2020-05-11 08:54:49

楼主的做法,可能是在uboot和linux阶段都显示logo。

有些系统在两者同时显示时,可能会有花屏出现。。。 标题里面还提到了支持应用层动态修改。

达克罗德 说:

有点不解,logo文件放到文件系统的,uboot阶段就可以显示logo了,为什么还需要修改内核呢?

#12 Re: 全志 SOC » 荔枝派zero/V3s使用NOR flash挂载squashfs和overlay文件系统,教你怎么装得下QT » 2020-05-08 08:41:40

不到2秒就启动了,这么6

njitnjit 说:

为什么我没有 /dev/mtdblock4 文件生成?

U-Boot 2017.01-rc2-gdd6e874-dirty (May 07 2020 - 16:51:38 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0 
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Device Tree to 42dfa000, end 42dffc30 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.13.16-licheepi-zero+ (root@wyj-virtual-machine) (gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02)) #7 SMP Thu May 7 17:24:25 CST 2020
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Zero
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 16 pages/cpu @c3f5f000 s33868 r8192 d23476 u65536
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200 earlyprintk panic=5 rootwait mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,8M(rootfs) -(data) root=31:03 rw rootfstype=squashfs
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 55092K/65536K available (6144K kernel code, 218K rwdata, 1476K rodata, 1024K init, 264K bss, 10444K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0700000   (7136 kB)
[    0.000000]       .init : 0xc0900000 - 0xc0a00000   (1024 kB)
[    0.000000]       .data : 0xc0a00000 - 0xc0a36b00   ( 219 kB)
[    0.000000]        .bss : 0xc0a3dc28 - 0xc0a7fdec   ( 265 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU event tracing is enabled.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000020] Switching to timer-based delay loop, resolution 41ns
[    0.000175] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000402] Console: colour dummy device 80x30
[    0.000436] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000450] pid_max: default: 32768 minimum: 301
[    0.000578] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000591] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001183] CPU: Testing write buffer coherency: ok
[    0.001552] /cpus/cpu@0 missing clock-frequency property
[    0.001576] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002006] Setting up static identity map for 0x40100000 - 0x40100060
[    0.002182] Hierarchical SRCU implementation.
[    0.002690] smp: Bringing up secondary CPUs ...
[    0.002705] smp: Brought up 1 node, 1 CPU
[    0.002714] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.002721] CPU: All CPU(s) started in SVC mode.
[    0.003466] devtmpfs: initialized
[    0.006443] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.006718] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.006747] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.006912] pinctrl core: initialized pinctrl subsystem
[    0.007789] random: get_random_u32 called from bucket_table_alloc+0xf4/0x244 with crng_init=0
[    0.007920] NET: Registered protocol family 16
[    0.008386] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.009516] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.009530] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.022329] SCSI subsystem initialized
[    0.022637] usbcore: registered new interface driver usbfs
[    0.022707] usbcore: registered new interface driver hub
[    0.022802] usbcore: registered new device driver usb
[    0.023032] pps_core: LinuxPPS API ver. 1 registered
[    0.023043] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.023065] PTP clock support registered
[    0.023298] Advanced Linux Sound Architecture Driver Initialized.
[    0.025094] clocksource: Switched to clocksource arch_sys_counter
[    0.035478] NET: Registered protocol family 2
[    0.036063] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.036098] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.036120] TCP: Hash tables configured (established 1024 bind 1024)
[    0.036239] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.036287] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.036501] NET: Registered protocol family 1
[    0.037074] RPC: Registered named UNIX socket transport module.
[    0.037094] RPC: Registered udp transport module.
[    0.037100] RPC: Registered tcp transport module.
[    0.037106] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.039164] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.047143] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.048275] NFS: Registering the id_resolver key type
[    0.048321] Key type id_resolver registered
[    0.048329] Key type id_legacy registered
[    0.048378] jffs2: version 2.2. (NAND) (SUMMARY)  漏 2001-2006 Red Hat, Inc.
[    0.050088] random: fast init done
[    0.052964] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.052984] io scheduler noop registered
[    0.052991] io scheduler deadline registered
[    0.053254] io scheduler cfq registered (default)
[    0.053265] io scheduler mq-deadline registered
[    0.053272] io scheduler kyber registered
[    0.057513] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.127659] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.130932] console [ttyS0] disabled
[    0.151204] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 33, base_baud = 1500000) is a U6_16550A
[    0.748126] console [ttyS0] enabled
[    0.755890] m25p80 spi32766.0: w25q128 (16384 Kbytes)
[    0.760976] spi32766.0: parser cmdlinepart: 4
[    0.765404] 4 cmdlinepart partitions found on MTD device spi32766.0
[    0.771664] Creating 4 MTD partitions on "spi32766.0":
[    0.776827] 0x000000000000-0x000000100000 : "uboot"
[    0.783064] 0x000000100000-0x000000110000 : "dtb"
[    0.789095] 0x000000110000-0x000000510000 : "kernel"
[    0.795329] 0x000000510000-0x000000d10000 : "rootfs"
[    0.801974] libphy: Fixed MDIO Bus: probed
[    0.806573] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.813102] ehci-platform: EHCI generic platform driver
[    0.818662] ehci-platform 1c1a000.usb: EHCI Host Controller
[    0.824282] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[    0.832242] ehci-platform 1c1a000.usb: irq 25, io mem 0x01c1a000
[    0.865129] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[    0.872413] hub 1-0:1.0: USB hub found
[    0.876354] hub 1-0:1.0: 1 port detected
[    0.880793] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.887087] ohci-platform: OHCI generic platform driver
[    0.892619] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[    0.899361] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[    0.907289] ohci-platform 1c1a400.usb: irq 26, io mem 0x01c1a400
[    0.980099] hub 2-0:1.0: USB hub found
[    0.983918] hub 2-0:1.0: 1 port detected
[    0.991458] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[    1.001174] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[    1.008071] sun6i-rtc 1c20400.rtc: RTC enabled
[    1.012608] i2c /dev entries driver
[    1.017496] input: ns2009_ts as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0048/input/input0
[    1.026990] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.095333] sunxi-mmc 1c0f000.mmc: base:0xc48c2000 irq:23
[    1.102247] usbcore: registered new interface driver usbhid
[    1.107918] usbhid: USB HID core driver
[    1.113547] NET: Registered protocol family 17
[    1.118221] Key type dns_resolver registered
[    1.122661] Registering SWP/SWPB emulation handler
[    1.136562] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.147950] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.153717] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[    1.162925] hub 3-0:1.0: USB hub found
[    1.166911] hub 3-0:1.0: 1 port detected
[    1.172061] using random self ethernet address
[    1.176638] using random host ethernet address
[    1.182139] usb0: HOST MAC 2a:2c:0b:f7:61:88
[    1.186600] usb0: MAC aa:a1:b7:35:c9:e7
[    1.190507] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[    1.198033] g_cdc gadget: g_cdc ready
[    1.201999] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 05:30:15 UTC (19815)
[    1.210549] vcc3v0: disabling
[    1.213526] vcc5v0: disabling
[    1.216541] ALSA device list:
[    1.219508]   No soundcards found.
[    1.228598] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    1.238461] devtmpfs: mounted
[    1.242617] Freeing unused kernel memory: 1024K
[    1.311131] random: crng init done
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Saving random seed: SKIP (read-only file system detected)
Starting network: OK

Welcome to Buildroot
buildroot login: 

#13 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » 打造 HI3518 摄像头从入门到放弃最强帖 » 2020-04-30 13:49:46

这个我就不清楚了,我试过 不加解锁那句,照样可以擦除成功。


歌以咏志 说:

那是不是 sf unlock 就是加锁呢?
记得 spi flash 没有锁定的指令, 我去翻翻看。

#14 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » 打造 HI3518 摄像头从入门到放弃最强帖 » 2020-04-30 13:12:09

这个问题我也有疑惑,实际上这条指令是解锁的:

bad MBR sector signature 0x584d
Unable to use mmc for fatls
Hit any key to stop autoboot:  0
hisilicon #
hisilicon # sf probe 0
16384 KiB hi_fmc at 0:0 is now current device
hisilicon # sf lock 0
unlock all block.
hisilicon #
歌以咏志 说:

@Jmhh247 为什么 sf lock 之后还能 sf erase?

#15 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » 打造 HI3518 摄像头从入门到放弃最强帖 » 2020-04-30 11:44:52

#### 刷回原厂固件

复制BoYun.bin到TF卡,把TF卡插到摄像头,进入uboot命令行:

sf probe 0
sf lock 0
fatload mmc 0 0x82000000 BoYun.bin
sf erase 0x0 0x1000000
sf write 0x82000000 0x0 $(filesize)
reset

账户:root
密码:boyuniot

#16 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » [原创开源]emwin导航界面支持Awesome图标字体 » 2020-04-28 11:23:27

开源免费,也有收费版本,图标多几倍。

ggk1989 说:

这个图标库可以随便使用吗

#17 Re: 全志 SOC » 编解码引擎 CedarX for Mainline Linux v5.4 » 2020-04-27 15:53:39

aodzip 说:

今天解码测试了1920x1080 30FPS  MJPEG流到YUV流,完美的。

大佬,厉害了,感谢分享!感谢分享!

#18 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/MQTT/物联网 » 打造 HI3518 摄像头从入门到放弃最强帖 » 2020-04-26 11:17:55

水一下:

#### 编译hello world

##### 测试前提
- ubuntu18 (用ubuntu16提示glibc库版本不合适,直接用18不折腾)
- 已刷 固件包firmware-20200420.tar.gz
- Q群获得arm-openwrt-linux-gcc.tar.gz

1. 安装工具链

sudo tar zxvf arm-openwrt-linux-gcc.tar.gz -C /opt
echo "export PATH=$PATH:/opt/arm-openwrt-linux-gcc/bin" >> ~/.bashrc
source ~/.bashrc

2. hello-openwrt-app.c:

#include <stdio.h>

int main(int argc, char const *argv[])
{
    printf("hello openwrt!\r\n");
    return 0;
}

3. 在ubuntu18编译并复制到开发板 (看log更直观)

embedtest@linux-hostgs:~/work/boyuniot/code-build/hello-test$ arm-openwrt-linux-gcc -o hello-openwrt-app hello-openwrt-app.c 
arm-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined
arm-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined
arm-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined
embedtest@linux-hostgs:~/work/boyuniot/code-build/hello-test$ ls
a.out  hello-openwrt-app  hello-openwrt-app.c
embedtest@linux-hostgs:~/work/boyuniot/code-build/hello-test$ scp hello-openwrt-app root@192.168.0.100:~
hello-openwrt-app                                                                                                                                 100% 7056   180.0KB/s   00:00    
embedtest@linux-hostgs:~/work/boyuniot/code-build/hello-test$ 

4. 在开发板上运行app

root@ByunHawkeye:/# cd
root@ByunHawkeye:~# ls
hello-openwrt-app  minihttp           minihttp.ini
root@ByunHawkeye:~# ./hello-openwrt-app
hello openwrt!
root@ByunHawkeye:~#

---

编译时有个警告,加下这句可以消除:

export STAGING_DIR=/opt/arm-openwrt-linux-gcc/bin/:$STAGING_DIR


enjoy it!

#19 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 各位大佬,如何让emWin的同一页面里的控件能一起显示出来?谢谢! » 2020-04-26 10:30:44

有可能,文本框的资源占用少,也可能是先被重绘处理了。

如果仿真没问题,应该就是下位机处理速度不行了。

所以不要用BUTTON_SetBitmap(),自己给按钮写个回调函数,先把图片写到内存设备,在回调函数直接贴图试试是否有改善

#20 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 各位大佬,如何让emWin的同一页面里的控件能一起显示出来?谢谢! » 2020-04-26 09:47:47

没试过这么多按钮。

1. 你在电脑上仿真正常吗?
2. 贴图用的哪种方式。。。。。。这么多图,建议先把图片写到内存设备,再贴图。速度会快很多。

#23 Re: 全志 SOC » 荔枝派zero USB gadget Mass Storage设置总结(调试成功) » 2020-04-23 13:40:00

人山人海中削尖脑壳,钻到前排,感谢楼主热心分享。(我没数,但是肯定够十五个字了)

#24 Re: 全志 SOC » 搞定NS2009驱动 校准后没有大幅度的跳点 » 2020-04-23 09:04:49

感谢楼主分享!楼主继续加油。(字数应该够了)

#26 Re: 全志 SOC » 哇酷网友都乐于分享:为大家制作了F1C100s的RTX4+emWin5稳定项目! » 2020-04-23 08:48:34

感谢楼主分享!

“直接写入开发板的bin文件:”——没找到荔枝派nano的,没上传吗,手上没tiny200 。。。

#27 Re: 全志 SOC » F1C100S裸跑Fatfs » 2020-04-21 08:59:11

楼主优秀,继续加油!继续加油!继续加油!(字数够了)

#28 Re: 站务公告/网站建设 » 感觉最近帖子变水了? » 2020-04-21 08:58:00

楼主这样又水了一帖。为了满足还是加点字吧

#29 Re: 全志 SOC » 笔记-编译LittlevGL GUI demo支持tslib » 2020-04-20 08:50:03

这个帖子里面有: https://whycan.cn/t_561.html

另,版主不合适啊,楼主就好。。。


felix_zhou1618 说:

版主 tslib 与 buildroot 哪里可以下载了

#31 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » littileVGL怎么让tabview控件只占半个屏幕 » 2020-04-06 16:20:19

试试这样:

1. 新建一个page做容器,大小占屏幕的一半
2. 在page里面创建tabview

#32 Re: 全志 SOC » v3s buildroot QT5 不生成libqjpeg.so » 2020-03-30 10:41:45

试试:

把qt5.9.1目录下面的.stam开头的隐藏文件,除了download,都删除掉,然后重新make。

#33 Re: 全志 SOC » 双层板的四核神器?X3(A33内置DRAM版本) » 2020-03-28 10:56:24

感谢大佬指导!

mango 说:

硬件略麻烦,但不需要软件参与。



DSI

#34 Re: 全志 SOC » 双层板的四核神器?X3(A33内置DRAM版本) » 2020-03-28 10:41:33

请问,左下角那个是什么接口?

sochip索智科技-全志代理商方案商 说:

#39 NXP i.MX6UL/6ULL » 开源一个mjpg-streamer输出插件:output_framebuffer » 2020-03-22 22:10:10

Jmhh247
回复: 5

我觉得用 mjpg-streamer 测试USB摄像头非常方便,如果能输出到LCD上就更方便了。

遗憾的是,我并没有找到这样的插件。

分析了 mjpg-streamer 源码后,我决定自己实现了一个输出到LCD的插件。

得益于 mjpg-streamer 良好的实现框架,过程很顺利,测试效果还不错,现分享给有需要的人。


- 使用方法

下载后解压到 mjpg-streamer/plugins 目录,编译得到 output_framebuffer.so 即可像其它插件一样使用了。

这里下载 : output_framebuffer_tar.gz

注意,编译的时候需要在 Makefile 里面设置好 gcc 。


- 测试效果

同时输出到 output_framebuffer  和 output_http :

mjpg_streamer -i "/usr/lib/input_uvc.so -r 640x480 -d /dev/video1" -o "/root/output_framebuffer.so" -o "/usr/lib/output_http.so -w /usr/www/"

output_framebuffer 开启了 framebuffer 双缓冲,画面稳如狗。

#40 NXP i.MX6UL/6ULL » [正点原子i.MX6UL] v4l2+framebuffer预览USB摄像头(番外篇):framebuffer双缓冲消灭撕裂测试 » 2020-03-21 23:32:51

Jmhh247
回复: 8

关键字: 正点原子,i.MX6UL,linux, framebuffer


- 主机环境:ubuntu16.04-64bit
- 硬件版本:正点原子i.MX6UL emmc


固件帖在本站:[[正点原子i.MX6UL开发板] 编译uboot、linux、buildroot-rootfs](https://whycan.cn/t_3550.html)

---


#### 一、本篇目标

接上篇- [[正点原子i.MX6UL]v4l2+framebuffer预览USB摄像头(三):实时预览](https://whycan.cn/t_3909.html)

撕裂问题是由于同时进行读写操作,整帧数据被破坏造成的。

如题,本篇主要实现在LCD上使用framebuffer双缓冲,实现无撕裂的实时预览USB摄像头画面。

由于本篇并不属于原定 三分天下 三步走计划,所以定为番外。


#### 二、相关概念

概念尽量简短不占篇幅,主要记录实践的过程。

framegbuffer双缓冲的资料少有完整可靠的介绍,也可能是我没有找到~

下面是我收集到的信息:

framebuffer驱动框架原生支持双缓冲,如果fb底层驱动实现了双缓冲,应用层可以直接使用,非常方便。

framebuffer双缓冲原理是基于 virtual screen 平移实现,平移实际上就是重新配置了显存的首地址。当定义的显存大于LCD实际尺寸两倍以上时,就可以通过 fb_var_screeninfo 中的 xoffset 和 yoffset 控制 x 轴或 y 轴方向的平移,一般来说只实现 y 轴上的平移就够了。

在应用代码中通过 ioctl 的 FBIOPAN_DISPLAY 指令实现平移。

- 当 yoffset = 1 时,表示显示内容向上平移一行。

		vinfo.yoffset = 1;
		ret = ioctl(fbfd, FBIOPAN_DISPLAY, &vinfo);	

- 当 yoffset = var->yres时,表示向上平移一个屏幕帧,即相当于切换缓冲区了!

		vinfo.yoffset = vinfo.yres;
		ret = ioctl(fbfd, FBIOPAN_DISPLAY, &vinfo);	

- 双缓冲切换核心代码

// ok 双缓冲测试成功,没有撕裂了!
void framebuffer_doublebuf_update(int fb_size)
{
	int ret;
	static int buf_index = 0;  


	if (buf_index)
	{
		// --更新整屏 offline
		vinfo.yoffset = vinfo.yres;
		memcpy(fb_addr + vinfo.yoffset * finfo.line_length, fb_buf1, fb_size);

		ret = ioctl(fbfd, FBIOPAN_DISPLAY, &vinfo);	

		if (ret)
		{
			printf("----FBIOPAN_DISPLAY-failed: %d \n", ret);
		}

		// printf("fb online buf : %d \n", buf_index);

		buf_index = 0;
	}
	else
	{
		// --更新整屏 offline
		memcpy(fb_addr, fb_buf1, fb_size);

		vinfo.yoffset = 0;
		ret = ioctl(fbfd, FBIOPAN_DISPLAY, &vinfo);	

		if (ret)
		{
			printf("----FBIOPAN_DISPLAY-failed: %d \n", ret);
		}

		// printf("fb online buf : %d \n", buf_index);

		buf_index = 1;
	}	
}

使用双缓冲的必要条件:
1. fb底层驱动显存大于等于LCD实际显存的2倍。
2. fb底层驱动实现fb_pan_display函数。
3. fbinfo->fix.ypanstep = 1,表示支持y轴平移。
4. var->yres_virtual >= vinfo.yres * 2(由于是可变信息,应用层修改也行)。


下面使用framebuffer版的"hello world"查看下驱动的主要信息,代码来自-[[正点原子i.MX6UL]v4l2+framebuffer预览USB摄像头(二):显示照片](https://whycan.cn/t_3888.html):

# ./fb-getinfo
success open fb dev : /dev/fb0
fb_fix.id="mxs-lcdif"
fb_fix.smem_start=0x98100000
fb_fix.mem_len=33554432             // 显存32M,远远满足双缓冲使用
...
fb_fix.ypanstep=1                   // 支持y轴平移
fb_fix.line_length=2048
fb_var.xres=1024
fb_var.yres=600
fb_var.xres_virtual=1024
fb_var.yres_virtual=600             // 不是yres的2倍,由于是可变信息,可以在应用层自己改成2倍。
fb_var.xoffset=0
fb_var.yoffset=0
...
#

可以看到已经支持双缓冲了,只用关心应用层代码。


最后需要说明一点:单纯的双缓冲并不能有效解决撕裂问题,必须配合vsync才能彻底消灭撕裂!

好消息是,NXP的fb驱动在fb_pan_display里已经实现vsync切换显存(值得新手学习),可以在应用层直接使用双缓冲。


#### 三、代码实现

本代码把采集到的USB摄像头数据,先由YUYV转成RGB888,然后由RGB888再转换成LCD需要的RGB565,最终把数据复制到显存完成显示。

重复这个过程即可实现简单的USB摄像头实时预览。

显存更新使用了带vsync的双缓冲,已经彻底消灭撕裂问题。

v4l2grap-uvc-bmponfb-dbuf-run-x.c:

/*
 * @FilePath: /0321/v4l2grap-uvc-bmponfb-dbuf-run-x.c
 * @Version: 1.0.0
 * @Author: zys
 * @LastAuthor   : zys
 * @CreationDate: 2020-02-04 11:33:25
 * @LastEditTime : 2020-03-21 23:13:34
 * @Description :  在LCD上实时预览USB摄像头画面,双缓冲模式。
 */


/*----------------------------------------------------------------------------*/
/* change log ----------------------------------------------------------------*/
/*
    
0321
yz imx6ul test ok.


-build:
    $ARMGCC v4l2grap-uvc-bmponfb-dbuf-run-x.c -o v4l2grap-uvc-bmponfb-dbuf-run-x

-tftp get:    
    cp v4l2grap-uvc-bmponfb-dbuf-run-x /tftpboot/
    tftp -g -r v4l2grap-uvc-bmponfb-dbuf-run-x 192.168.1.133       
        
*/

/*----------------------------------------------------------------------------*/
/* Includes ------------------------------------------------------------------*/
#include <fcntl.h>
#include <linux/fb.h>
#include <linux/videodev2.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>


/* Private define ------------------------------------------------------------*/
#define _UVC_CAM_HEIGHT (480)
#define _UVC_CAM_WIDTH  (640)
#define IMAGEHEIGHT     _UVC_CAM_HEIGHT
#define IMAGEWIDTH      _UVC_CAM_WIDTH

#define NB_BUFFER 4

/* Private macro -------------------------------------------------------------*/
/* Private typedef -----------------------------------------------------------*/
struct vdIn {
    int   fd;
    char* videodevice;

    // v4l2
    struct v4l2_capability     cap;
    struct v4l2_format         fmt;
    struct v4l2_fmtdesc        fmtdesc;
    struct v4l2_streamparm     setfps;
    struct v4l2_requestbuffers rb;

    void* mem[NB_BUFFER];
    int   memlength[NB_BUFFER];

    unsigned char* framebuffer;
    int            framesizeIn;

    int width;
    int height;
    int fps;


    FILE* fp_bmp;
};

/*_attribute__((packed))的作用是告诉编译器取消结构在编译过程中的优化对齐  */

//14byte文件头
typedef struct
{
    unsigned char cfType[2];  //文件类型,"BM"(0x4D42)
    unsigned int  cfSize;     //文件大小(字节)
    unsigned int  cfReserved; //保留,值为0
    unsigned int  cfoffBits;  //数据区相对于文件头的偏移量(字节)
} __attribute__((packed)) BITMAPFILEHEADER;


//40byte信息头
typedef struct
{
    unsigned int       ciSize;            //BITMAPFILEHEADER所占的字节数
    unsigned int       ciWidth;           //宽度
    unsigned int       ciHeight;          //高度
    unsigned short int ciPlanes;          //目标设备的位平面数,值为1
    unsigned short int ciBitCount;        //每个像素的位数
    char               ciCompress[4];     //压缩说明
    unsigned int       ciSizeImage;       //用字节表示的图像大小,该数据必须是4的倍数
    unsigned int       ciXPelsPerMeter;   //目标设备的水平像素数/米
    unsigned int       ciYPelsPerMeter;   //目标设备的垂直像素数/米
    unsigned int       ciClrUsed;         //位图使用调色板的颜色数
    unsigned           intciClrImportant; //指定重要的颜色数,当该域的值等于颜色数时(或者等于0时),表示所有颜色都一样重要
} __attribute__((packed)) BITMAPINFOHEADER;

typedef struct
{
    unsigned char blue;
    unsigned char green;
    unsigned char red;
} __attribute__((packed)) PIXEL; //颜色模式RGB



/* Private function prototypes -----------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
static struct vdIn   uvc_cam;
static unsigned char rgb888_buffer[IMAGEWIDTH * IMAGEHEIGHT * 3];

static int   xres           = 0;
static int   yres           = 0;
static int   bits_per_pixel = 0;
static char* fb_addr        = NULL;
static char* fb_buf1        = NULL;

int                      fbfd;
struct fb_var_screeninfo vinfo;
struct fb_fix_screeninfo finfo;

/* Global  variables ---------------------------------------------------------*/
/* Private functions ---------------------------------------------------------*/


void yuyv_to_rgb888(void)
{
    int            i, j;
    unsigned char  y1, y2, u, v;
    int            r1, g1, b1, r2, g2, b2;
    unsigned char* pointer;
    double         rbase = 0;
    double         gbase = 0;
    double         bbase = 0;


    pointer = uvc_cam.framebuffer;


    for (i = 0; i < IMAGEHEIGHT; i++) {
        for (j = 0; j < (IMAGEWIDTH / 2); j++) {
            y1 = *(pointer + ((i * (IMAGEWIDTH / 2) + j) << 2));
            u  = *(pointer + ((i * (IMAGEWIDTH / 2) + j) << 2) + 1);
            y2 = *(pointer + ((i * (IMAGEWIDTH / 2) + j) << 2) + 2);
            v  = *(pointer + ((i * (IMAGEWIDTH / 2) + j) << 2) + 3);


            rbase = 1.042 * (v - 128);
            gbase = 0.34414 * (u - 128) + 0.71414 * (v - 128);
            bbase = 1.772 * (u - 128);

            r1 = y1 + rbase;
            g1 = y1 - gbase;
            b1 = y1 + bbase;

            r2 = y2 + rbase;
            g2 = y2 - gbase;
            b2 = y2 + bbase;


            if (r1 > 255)
                r1 = 255;
            else if (r1 < 0)
                r1 = 0;

            if (b1 > 255)
                b1 = 255;
            else if (b1 < 0)
                b1 = 0;

            if (g1 > 255)
                g1 = 255;
            else if (g1 < 0)
                g1 = 0;

            if (r2 > 255)
                r2 = 255;
            else if (r2 < 0)
                r2 = 0;

            if (b2 > 255)
                b2 = 255;
            else if (b2 < 0)
                b2 = 0;

            if (g2 > 255)
                g2 = 255;
            else if (g2 < 0)
                g2 = 0;


            *(rgb888_buffer + ((IMAGEHEIGHT - 1 - i) * (IMAGEWIDTH / 2) + j) * 6)     = (unsigned char)b1;
            *(rgb888_buffer + ((IMAGEHEIGHT - 1 - i) * (IMAGEWIDTH / 2) + j) * 6 + 1) = (unsigned char)g1;
            *(rgb888_buffer + ((IMAGEHEIGHT - 1 - i) * (IMAGEWIDTH / 2) + j) * 6 + 2) = (unsigned char)r1;
            *(rgb888_buffer + ((IMAGEHEIGHT - 1 - i) * (IMAGEWIDTH / 2) + j) * 6 + 3) = (unsigned char)b2;
            *(rgb888_buffer + ((IMAGEHEIGHT - 1 - i) * (IMAGEWIDTH / 2) + j) * 6 + 4) = (unsigned char)g2;
            *(rgb888_buffer + ((IMAGEHEIGHT - 1 - i) * (IMAGEWIDTH / 2) + j) * 6 + 5) = (unsigned char)r2;
        }
    }

    // printf("yuyv to rgb888 done\n");
}




int v4l2_init(void)
{
    int                i = 0;
    int                ret;
    struct v4l2_buffer buf;


    // 1. open cam
    if ((uvc_cam.fd = open(uvc_cam.videodevice, O_RDWR)) == -1) {
        printf("ERROR opening V4L interface\n");
        return -1;
    }

    // 2. querycap
    memset(&uvc_cam.cap, 0, sizeof(struct v4l2_capability));
    ret = ioctl(uvc_cam.fd, VIDIOC_QUERYCAP, &uvc_cam.cap);

    if (ret < 0) {
        printf("Error opening device %s: unable to query device.\n", uvc_cam.videodevice);
        return -1;
    }
    else {
        printf("driver:\t\t%s\n", uvc_cam.cap.driver);
        printf("card:\t\t%s\n", uvc_cam.cap.card);
        printf("bus_info:\t%s\n", uvc_cam.cap.bus_info);
        printf("version:\t%d\n", uvc_cam.cap.version);
        printf("capabilities:\t%x\n", uvc_cam.cap.capabilities);

        if ((uvc_cam.cap.capabilities & V4L2_CAP_VIDEO_CAPTURE) == V4L2_CAP_VIDEO_CAPTURE) {
            printf("%s: \tsupports capture.\n", uvc_cam.videodevice);
        }

        if ((uvc_cam.cap.capabilities & V4L2_CAP_STREAMING) == V4L2_CAP_STREAMING) {
            printf("%s: \tsupports streaming.\n", uvc_cam.videodevice);
        }
    }

    // 3. set format in

    // 3.1 enum fmt
    printf("\nSupport format:\n");

    memset(&uvc_cam.fmtdesc, 0, sizeof(struct v4l2_fmtdesc));
    uvc_cam.fmtdesc.index = 0;
    uvc_cam.fmtdesc.type  = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    while (ioctl(uvc_cam.fd, VIDIOC_ENUM_FMT, &uvc_cam.fmtdesc) != -1) {
        printf("\t%d.%s\n", uvc_cam.fmtdesc.index + 1, uvc_cam.fmtdesc.description);
        uvc_cam.fmtdesc.index++;
    }

    // 3.2 set fmt
    memset(&uvc_cam.fmt, 0, sizeof(struct v4l2_format));
    uvc_cam.fmt.type                = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    uvc_cam.fmt.fmt.pix.width       = uvc_cam.width;
    uvc_cam.fmt.fmt.pix.height      = uvc_cam.height;
    uvc_cam.fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV;
    uvc_cam.fmt.fmt.pix.field       = V4L2_FIELD_ANY;

    ret = ioctl(uvc_cam.fd, VIDIOC_S_FMT, &uvc_cam.fmt);
    if (ret < 0) {
        printf("Unable to set format\n");
        return -1;
    }

    // 3.3 get fmt
    ret = ioctl(uvc_cam.fd, VIDIOC_G_FMT, &uvc_cam.fmt);
    if (ret < 0) {
        printf("Unable to get format\n");
        return -1;
    }
    else {
        printf("\nfmt.type:\t\t%d\n", uvc_cam.fmt.type);
        printf("pix.pixelformat:\t%c%c%c%c\n", uvc_cam.fmt.fmt.pix.pixelformat & 0xFF, (uvc_cam.fmt.fmt.pix.pixelformat >> 8) & 0xFF, (uvc_cam.fmt.fmt.pix.pixelformat >> 16) & 0xFF, (uvc_cam.fmt.fmt.pix.pixelformat >> 24) & 0xFF);
        printf("pix.height:\t\t%d\n", uvc_cam.fmt.fmt.pix.height);
        printf("pix.width:\t\t%d\n", uvc_cam.fmt.fmt.pix.width);
        printf("pix.field:\t\t%d\n", uvc_cam.fmt.fmt.pix.field);
    }


    // 4. set fps
    memset(&uvc_cam.setfps, 0, sizeof(struct v4l2_streamparm));
    uvc_cam.setfps.type                                  = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    uvc_cam.setfps.parm.capture.timeperframe.numerator   = 1;
    uvc_cam.setfps.parm.capture.timeperframe.denominator = 25;

    ret = ioctl(uvc_cam.fd, VIDIOC_S_PARM, &uvc_cam.setfps);

    if (ret < 0) {
        printf("Unable to set frame rate\n");
        return -1;
    }
    else {
        printf("set fps OK!\n");
    }

    ret = ioctl(uvc_cam.fd, VIDIOC_G_PARM, &uvc_cam.setfps);

    if (ret < 0) {
        printf("Unable to get frame rate\n");
        return -1;
    }
    else {
        printf("get fps OK:\n");
        printf("timeperframe.numerator  : %d\n", uvc_cam.setfps.parm.capture.timeperframe.numerator);
        printf("timeperframe.denominator: %d\n", uvc_cam.setfps.parm.capture.timeperframe.denominator);
        printf("set fps : %d\n", 1 * uvc_cam.setfps.parm.capture.timeperframe.denominator / uvc_cam.setfps.parm.capture.timeperframe.numerator);
    }

    // 5. enum framesizes

    while (1) {
        struct v4l2_fmtdesc fmtdesc;
        memset(&fmtdesc, 0, sizeof(struct v4l2_fmtdesc));
        fmtdesc.index = i++;
        fmtdesc.type  = V4L2_BUF_TYPE_VIDEO_CAPTURE;

        if (ioctl(uvc_cam.fd, VIDIOC_ENUM_FMT, &fmtdesc) < 0) {
            break;
        }

        printf("Supported format: %s\n", fmtdesc.description);
        struct v4l2_frmsizeenum fsenum;
        memset(&fsenum, 0, sizeof(struct v4l2_frmsizeenum));
        fsenum.pixel_format = uvc_cam.fmtdesc.pixelformat;

        int j = 0;

        while (1) {
            fsenum.index = j;
            j++;

            if (ioctl(uvc_cam.fd, VIDIOC_ENUM_FRAMESIZES, &fsenum) == 0) {
                if (uvc_cam.fmt.fmt.pix.pixelformat == fmtdesc.pixelformat) {
                    printf("\tSupported size with the current format: %dx%d\n", fsenum.discrete.width, fsenum.discrete.height);
                }
                else {
                    printf("\tSupported size: %dx%d\n", fsenum.discrete.width, fsenum.discrete.height);
                }
            }
            else {
                break;
            }
        }
    }

    // 6. request buffers
    memset(&uvc_cam.rb, 0, sizeof(struct v4l2_requestbuffers));
    uvc_cam.rb.count  = NB_BUFFER;
    uvc_cam.rb.type   = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    uvc_cam.rb.memory = V4L2_MEMORY_MMAP;

    ret = ioctl(uvc_cam.fd, VIDIOC_REQBUFS, &uvc_cam.rb);

    if (ret < 0) {
        printf("Unable to allocate buffers\n");
        return -1;
    }

    // 6.1 map the buffers

    for (i = 0; i < NB_BUFFER; i++) {
        memset(&buf, 0, sizeof(struct v4l2_buffer));
        buf.index  = i;
        buf.type   = V4L2_BUF_TYPE_VIDEO_CAPTURE;
        buf.memory = V4L2_MEMORY_MMAP;

        ret = ioctl(uvc_cam.fd, VIDIOC_QUERYBUF, &buf);
        if (ret < 0) {
            printf("Unable to query buffer\n");
            return -1;
        }

        uvc_cam.mem[i] = mmap(NULL, buf.length, PROT_READ | PROT_WRITE, MAP_SHARED, uvc_cam.fd, buf.m.offset);
        if (uvc_cam.mem[i] == MAP_FAILED) {
            printf("Unable to map buffer\n");
            return -1;
        }
        uvc_cam.memlength[i] = buf.length;
    }


    // 6.2 queue the buffers.
    for (i = 0; i < NB_BUFFER; i++) {
        memset(&buf, 0, sizeof(struct v4l2_buffer));
        buf.index  = i;
        buf.type   = V4L2_BUF_TYPE_VIDEO_CAPTURE;
        buf.memory = V4L2_MEMORY_MMAP;
        ret        = ioctl(uvc_cam.fd, VIDIOC_QBUF, &buf);
        if (ret < 0) {
            printf("Unable to queue buffer\n");
            return -1;
        }
    }

    // 7. malloc yuyv buf
    uvc_cam.framesizeIn = uvc_cam.width * uvc_cam.height << 1; // w * h * 2
    uvc_cam.framebuffer = (unsigned char*)calloc(1, (size_t)uvc_cam.framesizeIn);

    if (uvc_cam.framebuffer == NULL) {
        printf("err calloc memory\n");
        return -1;
    }

    printf("init %s \t[OK]\n", uvc_cam.videodevice);

    return 0;
}

void v4l2_exit(void)
{
    free(uvc_cam.framebuffer);
    close(uvc_cam.fd);
}

int v4l2_enable(void)
{
    int type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    int ret;

    ret = ioctl(uvc_cam.fd, VIDIOC_STREAMON, &type);
    if (ret < 0) {
        printf("Unable to start capture\n");
        return ret;
    }

    printf("start capture\n");

    return 0;
}

int v4l2_disable(void)
{
    int type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    int ret;

    ret = ioctl(uvc_cam.fd, VIDIOC_STREAMOFF, &type);
    if (ret < 0) {
        printf("Unable to stop capture\n");
        return ret;
    }

    printf("stop capture\n");

    return 0;
}

int v4l2_uvc_grap(void)
{
    int                ret;
    struct v4l2_buffer buf;


    memset(&buf, 0, sizeof(struct v4l2_buffer));
    buf.type   = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    buf.memory = V4L2_MEMORY_MMAP;

    ret = ioctl(uvc_cam.fd, VIDIOC_DQBUF, &buf);
    if (ret < 0) {
        printf("Unable to dequeue buffer\n");
        exit(1);
    }

    memcpy(uvc_cam.framebuffer, uvc_cam.mem[buf.index], uvc_cam.framesizeIn);

    ioctl(uvc_cam.fd, VIDIOC_QBUF, &buf);

    // printf("buf index: %d\n", buf.index);

    return 0;
}




int save_bmp(char* bmp_name)
{
    FILE*            fp;
    BITMAPFILEHEADER bf;
    BITMAPINFOHEADER bi;

    printf("save bmp  function\n");

    fp = fopen(bmp_name, "wb");
    if (fp == NULL) {
        printf("open errror\n");
        return (-1);
    }

    //Set BITMAPINFOHEADER
    memset(&bi, 0, sizeof(BITMAPINFOHEADER));
    bi.ciSize      = 40;
    bi.ciWidth     = IMAGEWIDTH;
    bi.ciHeight    = IMAGEHEIGHT;
    bi.ciPlanes    = 1;
    bi.ciBitCount  = 24;
    bi.ciSizeImage = IMAGEWIDTH * IMAGEHEIGHT * 3;


    //Set BITMAPFILEHEADER
    memset(&bf, 0, sizeof(BITMAPFILEHEADER));
    bf.cfType[0]  = 'B';
    bf.cfType[1]  = 'M';
    bf.cfSize     = 54 + bi.ciSizeImage;
    bf.cfReserved = 0;
    bf.cfoffBits  = 54;


    fwrite(&bf, 14, 1, fp);
    fwrite(&bi, 40, 1, fp);
    fwrite(rgb888_buffer, bi.ciSizeImage, 1, fp);

    printf("save %s done\n", bmp_name);

    fclose(fp);

    return 0;
}

int fb_init(void)
{
    int fb_size;

    fbfd = open("/dev/fb0", O_RDWR | O_CREAT, S_IRWXU);
    if (fbfd < 0) {
        printf("open error\n");
        exit(1);
    }

    if (ioctl(fbfd, FBIOGET_VSCREENINFO, &vinfo)) {
        printf("Error reading variable information.\n");
        exit(1);
    }

    vinfo.yres_virtual = vinfo.yres * 2;

    if (ioctl(fbfd, FBIOPUT_VSCREENINFO, &vinfo)) {
        printf("Error put variable information.\n");
        exit(1);
    }


    if (ioctl(fbfd, FBIOGET_FSCREENINFO, &finfo)) {
        printf("Error reading variable information.\n");
        exit(1);
    }

    printf("R:%d,G:%d,B:%d \n", vinfo.red, vinfo.green, vinfo.blue);
    printf("%dx%d, %dbpp\n", vinfo.xres, vinfo.yres, vinfo.bits_per_pixel);

    xres           = vinfo.xres;
    yres           = vinfo.yres;
    bits_per_pixel = vinfo.bits_per_pixel;
    fb_size        = vinfo.yres * finfo.line_length;

    printf("yres_virtual\t: %d \n", vinfo.yres_virtual);
    printf("smem_len\t: %d \n", finfo.smem_len);
    printf("fbsize\t\t: %d \n", fb_size);


    if ((fb_addr = (char*)mmap(0, finfo.smem_len, PROT_READ | PROT_WRITE, MAP_SHARED, fbfd, 0)) < 0) {
        printf("fb mmap error\n");
        exit(1);
    }

    fb_buf1 = (char*)calloc(1, fb_size);

    if (fb_buf1 == NULL) {
        printf("fb buf1 calloc err!\n");
    }

    printf("fb init ok!\n");

    return fb_size;
}



void bmp_data_to_fbbuf(char* pbuf, int fb_size)
{
    int                   line_x, line_y;
    long int              location = 0;
    static unsigned short b, g, r;
    static unsigned short rgb; /*2个字节*/
    PIXEL                 pix;
    int                   pixcnt = 0;
    char*                 psrc   = pbuf;

    pixcnt = 0;


    // --每次处理一个像素
    for (line_y = 0; line_y < IMAGEHEIGHT; line_y++) {
        for (line_x = 0; line_x < IMAGEWIDTH; line_x++) {

            //-- ok
            pix.blue  = psrc[pixcnt++];
            pix.green = psrc[pixcnt++];
            pix.red   = psrc[pixcnt++];


            r   = ((pix.red >> 3) << 11) & 0xf800;
            g   = ((pix.green >> 2) << 5) & 0x07e0;
            b   = (pix.blue >> 3) & 0x001f;
            rgb = r | g | b;

            location = line_x * 2 + (IMAGEHEIGHT - 1 - line_y) * xres * 2;

            //--先放到缓存里面
            *((unsigned short*)(fb_buf1 + location)) = rgb;
        }
    }
}

void fb_update(int fb_size)
{
    // --更新整屏
    memcpy(fb_addr, fb_buf1, fb_size);
}

// ok 双缓冲测试成功,没有撕裂了!
void framebuffer_doublebuf_update(int fb_size)
{
    int        ret;
    static int buf_index = 0;


    if (buf_index) {
        // --更新整屏 offline

        vinfo.yoffset = vinfo.yres;
        memcpy(fb_addr + vinfo.yoffset * finfo.line_length, fb_buf1, fb_size);

        ret = ioctl(fbfd, FBIOPAN_DISPLAY, &vinfo);

        if (ret) {
            printf("----FBIOPAN_DISPLAY-failed: %d \n", ret);
        }

        printf("fb online buf : %d \n", buf_index);

        buf_index = 0;
    }
    else {
        // --更新整屏 offline
        memcpy(fb_addr, fb_buf1, fb_size);

        vinfo.yoffset = 0;

        ret = ioctl(fbfd, FBIOPAN_DISPLAY, &vinfo);

        if (ret) {
            printf("----FBIOPAN_DISPLAY-failed: %d \n", ret);
        }

        printf("fb online buf : %d \n", buf_index);

        buf_index = 1;
    }
}



int main(int argc, char const* argv[])
{
    char vdname[15];
    int  fb_size;

    printf("\n----- v4l2 run on fb doublebuf app start ----- \n");

    if (argc < 2) {

        printf("need:/dev/videox\n");
        printf("like:%s /dev/video1\n", argv[0]);

        printf("app exit.\n\n");
        exit(1);
    }

    snprintf(vdname, 12, argv[1]);

    memset(&uvc_cam, 0, sizeof(struct vdIn));
    uvc_cam.videodevice = vdname;
    printf("using: \t\t%s\n", uvc_cam.videodevice);


    uvc_cam.width  = _UVC_CAM_WIDTH;
    uvc_cam.height = _UVC_CAM_HEIGHT;

    // 1. init cam
    if (v4l2_init() < 0) {
        goto app_exit;
    }

    fb_size = fb_init();

    v4l2_enable();
    usleep(5 * 1000);

    while (1) {
        // 2. grap uvc
        v4l2_uvc_grap();
        yuyv_to_rgb888();

        // 3. show on fb
        bmp_data_to_fbbuf(rgb888_buffer, fb_size);
        framebuffer_doublebuf_update(fb_size);
    }

app_exit:
    printf("app exit.\n\n");
    v4l2_exit();

    return 0;
}


/*************************** (C) COPYRIGHT 2020 ZYS ************END OF FILE****/

#### 四、测试程序

- 运行程序

先把程序复制到开发板,推荐用NFS或TFTP。

# ./v4l2grap-uvc-bmponfb-dbuf-run-x /dev/video1

----- v4l2 run on fb doublebuf app start -----
using:          /dev/video1
driver:         uvcvideo
card:           Aoni HD Camera
bus_info:       usb-ci_hdrc.1-1.4
version:        262415
capabilities:   84200001
/dev/video1:    supports capture.
/dev/video1:    supports streaming.

Support format:
        1.MJPEG
        2.YUV 4:2:2 (YUYV)

fmt.type:               1
pix.pixelformat:        YUYV
pix.height:             480
pix.width:              640
pix.field:              1
set fps OK!
get fps OK:
timeperframe.numerator  : 1
timeperframe.denominator: 25
set fps : 25
Supported format: MJPEG
        Supported size: 640x480
        Supported size: 1280x720
        Supported size: 1184x656
        Supported size: 1024x576
        Supported size: 960x720
        Supported size: 960x540
        Supported size: 864x486
        Supported size: 800x600
        Supported size: 752x423
        Supported size: 640x360
        Supported size: 320x240
Supported format: YUV 4:2:2 (YUYV)
        Supported size with the current format: 640x480
        Supported size with the current format: 1280x720
        Supported size with the current format: 1184x656
        Supported size with the current format: 1024x576
        Supported size with the current format: 960x720
        Supported size with the current format: 960x540
        Supported size with the current format: 864x486
        Supported size with the current format: 800x600
        Supported size with the current format: 752x423
        Supported size with the current format: 640x360
        Supported size with the current format: 320x240
init /dev/video1        [OK]
R:11,G:5,B:0
1024x600, 16bpp
yres_virtual    : 1200
smem_len        : 33554432
fbsize          : 1228800
fb init ok!
start capture
fb online buf : 0
fb online buf : 1
fb online buf : 0
fb online buf : 1
fb online buf : 0
fb online buf : 1
fb online buf : 0
fb online buf : 1
fb online buf : 0
fb online buf : 1
fb online buf : 0
fb online buf : 1
^C
#

- 预览效果

只是没了撕裂现象,此处略。

本篇完。

#41 NXP i.MX6UL/6ULL » [正点原子i.MX6UL] v4l2+framebuffer预览USB摄像头(三):实时预览 » 2020-03-21 17:23:57

Jmhh247
回复: 4

关键字: 正点原子,i.MX6UL,linux, framebuffer


- 主机环境:ubuntu16.04-64bit
- 硬件版本:正点原子i.MX6UL emmc


固件帖在本站:[[正点原子i.MX6UL开发板] 编译uboot、linux、buildroot-rootfs](https://whycan.cn/t_3550.html)

---

#### 一、本篇目标

接上篇- [[正点原子i.MX6UL]v4l2+framebuffer预览USB摄像头(二):显示照片](https://whycan.cn/t_3888.html)

如题,本篇主要实现在LCD(framebuffer)上实时预览USB摄像头画面。

有了前面两篇的代码实现,本篇的功能已经呼之欲出了,下面直接上代码。


#### 二、代码实现

本代码把采集到的USB摄像头数据,先由YUYV转成RGB888,然后由RGB888再转换成LCD需要的RGB565,最终把数据复制到显存完成显示。

重复这个过程即可实现简单的USB摄像头实时预览。

v4l2grap-uvc-bmponfb-run-x.c:

/*
 * @FilePath: /0321/v4l2grap-uvc-bmponfb-run-x.c
 * @Version: 1.0.0
 * @Author: zys
 * @LastAuthor: zys
 * @CreationDate: 2020-02-04 11:33:25
 * @LastEditTime: 2020-03-21 16:47:10
 * @Description :  在LCD上实时预览USB摄像头画面。
 */


/*----------------------------------------------------------------------------*/
/* change log ----------------------------------------------------------------*/
/*
    
0321
yz imx6ul test ok.


-build:
    $ARMGCC v4l2grap-uvc-bmponfb-run-x.c -o v4l2grap-uvc-bmponfb-run-x

-tftp get:    
    cp v4l2grap-uvc-bmponfb-run-x /tftpboot/
    tftp -g -r v4l2grap-uvc-bmponfb-run-x 192.168.1.133       
        
*/



/*----------------------------------------------------------------------------*/
/* Includes ------------------------------------------------------------------*/
#include <fcntl.h>
#include <linux/videodev2.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <linux/fb.h>


/* Private define ------------------------------------------------------------*/
#define _UVC_CAM_HEIGHT (480)
#define _UVC_CAM_WIDTH  (640)
#define IMAGEHEIGHT     _UVC_CAM_HEIGHT
#define IMAGEWIDTH      _UVC_CAM_WIDTH

#define NB_BUFFER 4

/* Private macro -------------------------------------------------------------*/
/* Private typedef -----------------------------------------------------------*/
struct vdIn {
    int   fd;
    char* videodevice;

    // v4l2
    struct v4l2_capability     cap;
    struct v4l2_format         fmt;
    struct v4l2_fmtdesc        fmtdesc;
    struct v4l2_streamparm     setfps;
    struct v4l2_requestbuffers rb;

    void* mem[NB_BUFFER];
    int   memlength[NB_BUFFER];

    unsigned char* framebuffer;
    int            framesizeIn;

    int width;
    int height;
    int fps;


    FILE* fp_bmp;
};

/*_attribute__((packed))的作用是告诉编译器取消结构在编译过程中的优化对齐  */

//14byte文件头
typedef struct
{
    unsigned char cfType[2];  //文件类型,"BM"(0x4D42)
    unsigned int  cfSize;     //文件大小(字节)
    unsigned int  cfReserved; //保留,值为0
    unsigned int  cfoffBits;  //数据区相对于文件头的偏移量(字节)
} __attribute__((packed)) BITMAPFILEHEADER;


//40byte信息头
typedef struct
{
    unsigned int       ciSize;            //BITMAPFILEHEADER所占的字节数
    unsigned int       ciWidth;           //宽度
    unsigned int       ciHeight;          //高度
    unsigned short int ciPlanes;          //目标设备的位平面数,值为1
    unsigned short int ciBitCount;        //每个像素的位数
    char               ciCompress[4];     //压缩说明
    unsigned int       ciSizeImage;       //用字节表示的图像大小,该数据必须是4的倍数
    unsigned int       ciXPelsPerMeter;   //目标设备的水平像素数/米
    unsigned int       ciYPelsPerMeter;   //目标设备的垂直像素数/米
    unsigned int       ciClrUsed;         //位图使用调色板的颜色数
    unsigned           intciClrImportant; //指定重要的颜色数,当该域的值等于颜色数时(或者等于0时),表示所有颜色都一样重要
} __attribute__((packed)) BITMAPINFOHEADER;

typedef struct
{
    unsigned char blue;
    unsigned char green;
    unsigned char red;
} __attribute__((packed)) PIXEL; //颜色模式RGB



/* Private function prototypes -----------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
static struct vdIn   uvc_cam;
static unsigned char rgb888_buffer[IMAGEWIDTH * IMAGEHEIGHT * 3];

static int   xres           = 0;
static int   yres           = 0;
static int   bits_per_pixel = 0;
static char* fb_addr        = NULL;
static char* fb_buf1        = NULL;

/* Global  variables ---------------------------------------------------------*/
/* Private functions ---------------------------------------------------------*/


void yuyv_to_rgb888(void)
{
    int            i, j;
    unsigned char  y1, y2, u, v;
    int            r1, g1, b1, r2, g2, b2;
    unsigned char* pointer;
    double         rbase = 0;
    double         gbase = 0;
    double         bbase = 0;


    pointer = uvc_cam.framebuffer;


    for (i = 0; i < IMAGEHEIGHT; i++) {
        for (j = 0; j < (IMAGEWIDTH / 2); j++) {
            y1 = *(pointer + ((i * (IMAGEWIDTH / 2) + j) << 2));
            u  = *(pointer + ((i * (IMAGEWIDTH / 2) + j) << 2) + 1);
            y2 = *(pointer + ((i * (IMAGEWIDTH / 2) + j) << 2) + 2);
            v  = *(pointer + ((i * (IMAGEWIDTH / 2) + j) << 2) + 3);


            rbase = 1.042 * (v - 128);
            gbase = 0.34414 * (u - 128) + 0.71414 * (v - 128);
            bbase = 1.772 * (u - 128);

            r1 = y1 + rbase;
            g1 = y1 - gbase;
            b1 = y1 + bbase;

            r2 = y2 + rbase;
            g2 = y2 - gbase;
            b2 = y2 + bbase;


            if (r1 > 255)
                r1 = 255;
            else if (r1 < 0)
                r1 = 0;

            if (b1 > 255)
                b1 = 255;
            else if (b1 < 0)
                b1 = 0;

            if (g1 > 255)
                g1 = 255;
            else if (g1 < 0)
                g1 = 0;

            if (r2 > 255)
                r2 = 255;
            else if (r2 < 0)
                r2 = 0;

            if (b2 > 255)
                b2 = 255;
            else if (b2 < 0)
                b2 = 0;

            if (g2 > 255)
                g2 = 255;
            else if (g2 < 0)
                g2 = 0;


            *(rgb888_buffer + ((IMAGEHEIGHT - 1 - i) * (IMAGEWIDTH / 2) + j) * 6)     = (unsigned char)b1;
            *(rgb888_buffer + ((IMAGEHEIGHT - 1 - i) * (IMAGEWIDTH / 2) + j) * 6 + 1) = (unsigned char)g1;
            *(rgb888_buffer + ((IMAGEHEIGHT - 1 - i) * (IMAGEWIDTH / 2) + j) * 6 + 2) = (unsigned char)r1;
            *(rgb888_buffer + ((IMAGEHEIGHT - 1 - i) * (IMAGEWIDTH / 2) + j) * 6 + 3) = (unsigned char)b2;
            *(rgb888_buffer + ((IMAGEHEIGHT - 1 - i) * (IMAGEWIDTH / 2) + j) * 6 + 4) = (unsigned char)g2;
            *(rgb888_buffer + ((IMAGEHEIGHT - 1 - i) * (IMAGEWIDTH / 2) + j) * 6 + 5) = (unsigned char)r2;
        }
    }

    // printf("yuyv to rgb888 done\n");
}




int v4l2_init(void)
{
    int                i = 0;
    int                ret;
    struct v4l2_buffer buf;


    // 1. open cam
    if ((uvc_cam.fd = open(uvc_cam.videodevice, O_RDWR)) == -1) {
        printf("ERROR opening V4L interface\n");
        return -1;
    }

    // 2. querycap
    memset(&uvc_cam.cap, 0, sizeof(struct v4l2_capability));
    ret = ioctl(uvc_cam.fd, VIDIOC_QUERYCAP, &uvc_cam.cap);

    if (ret < 0) {
        printf("Error opening device %s: unable to query device.\n", uvc_cam.videodevice);
        return -1;
    }
    else {
        printf("driver:\t\t%s\n", uvc_cam.cap.driver);
        printf("card:\t\t%s\n", uvc_cam.cap.card);
        printf("bus_info:\t%s\n", uvc_cam.cap.bus_info);
        printf("version:\t%d\n", uvc_cam.cap.version);
        printf("capabilities:\t%x\n", uvc_cam.cap.capabilities);

        if ((uvc_cam.cap.capabilities & V4L2_CAP_VIDEO_CAPTURE) == V4L2_CAP_VIDEO_CAPTURE) {
            printf("%s: \tsupports capture.\n", uvc_cam.videodevice);
        }

        if ((uvc_cam.cap.capabilities & V4L2_CAP_STREAMING) == V4L2_CAP_STREAMING) {
            printf("%s: \tsupports streaming.\n", uvc_cam.videodevice);
        }
    }

    // 3. set format in

    // 3.1 enum fmt
    printf("\nSupport format:\n");

    memset(&uvc_cam.fmtdesc, 0, sizeof(struct v4l2_fmtdesc));
    uvc_cam.fmtdesc.index = 0;
    uvc_cam.fmtdesc.type  = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    while (ioctl(uvc_cam.fd, VIDIOC_ENUM_FMT, &uvc_cam.fmtdesc) != -1) {
        printf("\t%d.%s\n", uvc_cam.fmtdesc.index + 1, uvc_cam.fmtdesc.description);
        uvc_cam.fmtdesc.index++;
    }

    // 3.2 set fmt
    memset(&uvc_cam.fmt, 0, sizeof(struct v4l2_format));
    uvc_cam.fmt.type                = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    uvc_cam.fmt.fmt.pix.width       = uvc_cam.width;
    uvc_cam.fmt.fmt.pix.height      = uvc_cam.height;
    uvc_cam.fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV;
    uvc_cam.fmt.fmt.pix.field       = V4L2_FIELD_ANY;

    ret = ioctl(uvc_cam.fd, VIDIOC_S_FMT, &uvc_cam.fmt);
    if (ret < 0) {
        printf("Unable to set format\n");
        return -1;
    }

    // 3.3 get fmt
    ret = ioctl(uvc_cam.fd, VIDIOC_G_FMT, &uvc_cam.fmt);
    if (ret < 0) {
        printf("Unable to get format\n");
        return -1;
    }
    else {
        printf("\nfmt.type:\t\t%d\n", uvc_cam.fmt.type);
        printf("pix.pixelformat:\t%c%c%c%c\n", uvc_cam.fmt.fmt.pix.pixelformat & 0xFF, (uvc_cam.fmt.fmt.pix.pixelformat >> 8) & 0xFF, (uvc_cam.fmt.fmt.pix.pixelformat >> 16) & 0xFF, (uvc_cam.fmt.fmt.pix.pixelformat >> 24) & 0xFF);
        printf("pix.height:\t\t%d\n", uvc_cam.fmt.fmt.pix.height);
        printf("pix.width:\t\t%d\n", uvc_cam.fmt.fmt.pix.width);
        printf("pix.field:\t\t%d\n", uvc_cam.fmt.fmt.pix.field);
    }


    // 4. set fps
    memset(&uvc_cam.setfps, 0, sizeof(struct v4l2_streamparm));
    uvc_cam.setfps.type                                  = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    uvc_cam.setfps.parm.capture.timeperframe.numerator   = 1;
    uvc_cam.setfps.parm.capture.timeperframe.denominator = 25;

    ret = ioctl(uvc_cam.fd, VIDIOC_S_PARM, &uvc_cam.setfps);

    if (ret < 0) {
        printf("Unable to set frame rate\n");
        return -1;
    }
    else {
        printf("set fps OK!\n");
    }

    ret = ioctl(uvc_cam.fd, VIDIOC_G_PARM, &uvc_cam.setfps);

    if (ret < 0) {
        printf("Unable to get frame rate\n");
        return -1;
    }
    else {
        printf("get fps OK:\n");
        printf("timeperframe.numerator  : %d\n", uvc_cam.setfps.parm.capture.timeperframe.numerator);
        printf("timeperframe.denominator: %d\n", uvc_cam.setfps.parm.capture.timeperframe.denominator);
        printf("set fps : %d\n", 1 * uvc_cam.setfps.parm.capture.timeperframe.denominator / uvc_cam.setfps.parm.capture.timeperframe.numerator);
    }

    // 5. enum framesizes

    while (1) {
        struct v4l2_fmtdesc fmtdesc;
        memset(&fmtdesc, 0, sizeof(struct v4l2_fmtdesc));
        fmtdesc.index = i++;
        fmtdesc.type  = V4L2_BUF_TYPE_VIDEO_CAPTURE;

        if (ioctl(uvc_cam.fd, VIDIOC_ENUM_FMT, &fmtdesc) < 0) {
            break;
        }

        printf("Supported format: %s\n", fmtdesc.description);
        struct v4l2_frmsizeenum fsenum;
        memset(&fsenum, 0, sizeof(struct v4l2_frmsizeenum));
        fsenum.pixel_format = uvc_cam.fmtdesc.pixelformat;

        int j = 0;

        while (1) {
            fsenum.index = j;
            j++;

            if (ioctl(uvc_cam.fd, VIDIOC_ENUM_FRAMESIZES, &fsenum) == 0) {
                if (uvc_cam.fmt.fmt.pix.pixelformat == fmtdesc.pixelformat) {
                    printf("\tSupported size with the current format: %dx%d\n", fsenum.discrete.width, fsenum.discrete.height);
                }
                else {
                    printf("\tSupported size: %dx%d\n", fsenum.discrete.width, fsenum.discrete.height);
                }
            }
            else {
                break;
            }
        }
    }

    // 6. request buffers
    memset(&uvc_cam.rb, 0, sizeof(struct v4l2_requestbuffers));
    uvc_cam.rb.count  = NB_BUFFER;
    uvc_cam.rb.type   = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    uvc_cam.rb.memory = V4L2_MEMORY_MMAP;

    ret = ioctl(uvc_cam.fd, VIDIOC_REQBUFS, &uvc_cam.rb);

    if (ret < 0) {
        printf("Unable to allocate buffers\n");
        return -1;
    }

    // 6.1 map the buffers

    for (i = 0; i < NB_BUFFER; i++) {
        memset(&buf, 0, sizeof(struct v4l2_buffer));
        buf.index  = i;
        buf.type   = V4L2_BUF_TYPE_VIDEO_CAPTURE;
        buf.memory = V4L2_MEMORY_MMAP;

        ret = ioctl(uvc_cam.fd, VIDIOC_QUERYBUF, &buf);
        if (ret < 0) {
            printf("Unable to query buffer\n");
            return -1;
        }

        uvc_cam.mem[i] = mmap(NULL, buf.length, PROT_READ | PROT_WRITE, MAP_SHARED, uvc_cam.fd, buf.m.offset);
        if (uvc_cam.mem[i] == MAP_FAILED) {
            printf("Unable to map buffer\n");
            return -1;
        }
        uvc_cam.memlength[i] = buf.length;
    }


    // 6.2 queue the buffers.
    for (i = 0; i < NB_BUFFER; i++) {
        memset(&buf, 0, sizeof(struct v4l2_buffer));
        buf.index  = i;
        buf.type   = V4L2_BUF_TYPE_VIDEO_CAPTURE;
        buf.memory = V4L2_MEMORY_MMAP;
        ret        = ioctl(uvc_cam.fd, VIDIOC_QBUF, &buf);
        if (ret < 0) {
            printf("Unable to queue buffer\n");
            return -1;
        }
    }

    // 7. malloc yuyv buf
    uvc_cam.framesizeIn = uvc_cam.width * uvc_cam.height << 1; // w * h * 2
    uvc_cam.framebuffer = (unsigned char*)calloc(1, (size_t)uvc_cam.framesizeIn);

    if (uvc_cam.framebuffer == NULL) {
        printf("err calloc memory\n");
        return -1;
    }

    printf("init %s \t[OK]\n", uvc_cam.videodevice);

    return 0;
}

void v4l2_exit(void)
{
    free(uvc_cam.framebuffer);
    close(uvc_cam.fd);
}

int v4l2_enable(void)
{
    int type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    int ret;

    ret = ioctl(uvc_cam.fd, VIDIOC_STREAMON, &type);
    if (ret < 0) {
        printf("Unable to start capture\n");
        return ret;
    }

    printf("start capture\n");

    return 0;
}

int v4l2_disable(void)
{
    int type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    int ret;

    ret = ioctl(uvc_cam.fd, VIDIOC_STREAMOFF, &type);
    if (ret < 0) {
        printf("Unable to stop capture\n");
        return ret;
    }

    printf("stop capture\n");

    return 0;
}

int v4l2_uvc_grap(void)
{
    int                ret;
    struct v4l2_buffer buf;


    memset(&buf, 0, sizeof(struct v4l2_buffer));
    buf.type   = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    buf.memory = V4L2_MEMORY_MMAP;

    ret = ioctl(uvc_cam.fd, VIDIOC_DQBUF, &buf);
    if (ret < 0) {
        printf("Unable to dequeue buffer\n");
        exit(1);
    }

    memcpy(uvc_cam.framebuffer, uvc_cam.mem[buf.index], uvc_cam.framesizeIn);

    ioctl(uvc_cam.fd, VIDIOC_QBUF, &buf);

    // printf("buf index: %d\n", buf.index);

    return 0;
}




int save_bmp(char* bmp_name)
{
    FILE*            fp;
    BITMAPFILEHEADER bf;
    BITMAPINFOHEADER bi;

    printf("save bmp  function\n");

    fp = fopen(bmp_name, "wb");
    if (fp == NULL) {
        printf("open errror\n");
        return (-1);
    }

    //Set BITMAPINFOHEADER
    memset(&bi, 0, sizeof(BITMAPINFOHEADER));
    bi.ciSize      = 40;
    bi.ciWidth     = IMAGEWIDTH;
    bi.ciHeight    = IMAGEHEIGHT;
    bi.ciPlanes    = 1;
    bi.ciBitCount  = 24;
    bi.ciSizeImage = IMAGEWIDTH * IMAGEHEIGHT * 3;


    //Set BITMAPFILEHEADER
    memset(&bf, 0, sizeof(BITMAPFILEHEADER));
    bf.cfType[0]  = 'B';
    bf.cfType[1]  = 'M';
    bf.cfSize     = 54 + bi.ciSizeImage;
    bf.cfReserved = 0;
    bf.cfoffBits  = 54;


    fwrite(&bf, 14, 1, fp);
    fwrite(&bi, 40, 1, fp);
    fwrite(rgb888_buffer, bi.ciSizeImage, 1, fp);

    printf("save %s done\n", bmp_name);

    fclose(fp);

    return 0;
}

int fb_init(void)
{
    int                      fbfd, fb_size;
    struct fb_var_screeninfo vinfo;
    struct fb_fix_screeninfo finfo;

    fbfd = open("/dev/fb0", O_RDWR | O_CREAT, S_IRWXU);
    if (fbfd < 0) {
        printf("open error\n");
        exit(1);
    }

    if (ioctl(fbfd, FBIOGET_VSCREENINFO, &vinfo)) {
        printf("Error reading variable information.\n");
        exit(1);
    }


    if (ioctl(fbfd, FBIOGET_FSCREENINFO, &finfo)) {
        printf("Error reading variable information.\n");
        exit(1);
    }
    
    printf("R:%d,G:%d,B:%d \n", vinfo.red, vinfo.green, vinfo.blue);
    printf("%dx%d, %dbpp\n", vinfo.xres, vinfo.yres, vinfo.bits_per_pixel);

    xres           = vinfo.xres;
    yres           = vinfo.yres;
    bits_per_pixel = vinfo.bits_per_pixel;
    fb_size        = xres * yres * ((bits_per_pixel + 7) / 8);

    printf("fbsize: %d \n", fb_size);

    if ((fb_addr = (char*)mmap(0, fb_size, PROT_READ | PROT_WRITE, MAP_SHARED, fbfd, 0)) < 0) {
        printf("fb mmap error\n");
        exit(1);
    }

    fb_buf1 = (char*)calloc(1, fb_size);

    if (fb_buf1 == NULL) {
        printf("fb buf1 calloc err!\n");
    }    

    printf("fb init ok!\n");

    return fb_size;
}



void bmp_data_to_fbbuf(char* pbuf, int fb_size)
{
    int                   line_x, line_y;
    long int              location = 0;
    static unsigned short b, g, r;
    static unsigned short rgb; /*2个字节*/
    PIXEL                 pix;
    int                   pixcnt = 0;
    char*                 psrc   = pbuf;

    pixcnt = 0;


    // --每次处理一个像素
    for (line_y = 0; line_y < IMAGEHEIGHT; line_y++) {
        for (line_x = 0; line_x < IMAGEWIDTH; line_x++) {

            //-- ok
            pix.blue  = psrc[pixcnt++];
            pix.green = psrc[pixcnt++];
            pix.red   = psrc[pixcnt++];


            r   = ((pix.red >> 3) << 11) & 0xf800;
            g   = ((pix.green >> 2) << 5) & 0x07e0;
            b   = (pix.blue >> 3) & 0x001f;
            rgb = r | g | b;

            location = line_x*2+(IMAGEHEIGHT - 1 - line_y)*xres*2;

            //--先放到缓存里面
            *((unsigned short*)(fb_buf1 + location)) = rgb;
        }
    }
}

void fb_update(int fb_size)
{
    // --更新整屏
    memcpy(fb_addr, fb_buf1, fb_size);
}



int main(int argc, char const* argv[])
{
    char vdname[15];
    int fb_size;

    printf("\n----- v4l2 run on fb app start ----- \n");

    if (argc < 2) {

        printf("need:/dev/videox\n");
        printf("like:%s /dev/video1\n", argv[0]);

        printf("app exit.\n\n");
        exit(1);
    }

    snprintf(vdname, 12, argv[1]);

    memset(&uvc_cam, 0, sizeof(struct vdIn));
    uvc_cam.videodevice = vdname;
    printf("using: \t\t%s\n", uvc_cam.videodevice);


    uvc_cam.width  = _UVC_CAM_WIDTH;
    uvc_cam.height = _UVC_CAM_HEIGHT;

    // 1. init cam
    if (v4l2_init() < 0) {
        goto app_exit;
    }

    fb_size = fb_init();


    v4l2_enable();
    usleep(5 * 1000);

    while (1) {
        // 2. grap uvc
        v4l2_uvc_grap();
        yuyv_to_rgb888();

        // 3. show on fb
        bmp_data_to_fbbuf(rgb888_buffer, fb_size);
        fb_update(fb_size);
    }

app_exit:
    printf("app exit.\n\n");
    v4l2_exit();

    return 0;
}





/*************************** (C) COPYRIGHT 2020 ZYS ************END OF FILE****/

#### 三、测试程序

- 编译程序

# $ARMGCC是我给工具链设置的环境变量
$ARMGCC v4l2grap-uvc-bmponfb-run-x.c -o v4l2grap-uvc-bmponfb-run-x

- 确认开发板的USB相机设备号

重要:记得插上USB相机!

# ls /dev/video*
/dev/video0  /dev/video1  /dev/video2
# cat /sys/class/video4linux/video1/name
Aoni HD Camera
#

- 运行程序

先把程序复制到开发板,推荐用NFS或TFTP。

运行程序:

# ./v4l2grap-uvc-bmponfb-run-x /dev/video1

----- v4l2 run on fb app start -----
using:          /dev/video1
driver:         uvcvideo
card:           Aoni HD Camera
bus_info:       usb-ci_hdrc.1-1.4
version:        262415
capabilities:   84200001
/dev/video1:    supports capture.
/dev/video1:    supports streaming.

Support format:
        1.MJPEG
        2.YUV 4:2:2 (YUYV)

fmt.type:               1
pix.pixelformat:        YUYV
pix.height:             480
pix.width:              640
pix.field:              1
set fps OK!
get fps OK:
timeperframe.numerator  : 1
timeperframe.denominator: 25
set fps : 25
Supported format: MJPEG
        Supported size: 640x480
        Supported size: 1280x720
        Supported size: 1184x656
        Supported size: 1024x576
        Supported size: 960x720
        Supported size: 960x540
        Supported size: 864x486
        Supported size: 800x600
        Supported size: 752x423
        Supported size: 640x360
        Supported size: 320x240
Supported format: YUV 4:2:2 (YUYV)
        Supported size with the current format: 640x480
        Supported size with the current format: 1280x720
        Supported size with the current format: 1184x656
        Supported size with the current format: 1024x576
        Supported size with the current format: 960x720
        Supported size with the current format: 960x540
        Supported size with the current format: 864x486
        Supported size with the current format: 800x600
        Supported size with the current format: 752x423
        Supported size with the current format: 640x360
        Supported size with the current format: 320x240
init /dev/video1        [OK]
R:11,G:5,B:0
1024x600, 16bpp
fbsize: 1228800
fb init ok!
start capture
^C
#

- 预览效果

由于用的yuyv格式,需要转成rgb,转换过程比较花时间,导致帧率较低。(如果用mjpg格式帧率还是不错的。)

画面快速晃动时,有明显的撕裂现象。

尽管有些瑕疵,但是这三篇不忘初心(没有太监),最终完成了原计划的功能,本篇完。

#42 Re: 全志 SOC » V3s 使用NFS无法启动rootfs,从TF卡中可以 » 2020-03-20 22:56:53

“从TF中可以”

TF卡里面的rootfs和你的NFS目录内的rootfs是否一致,如果两者一致,文件系统就不需要再修改了。
去排查其它方面



qiushan 说:

晕哥,第三步不太明白,我把根文件系统放在nfs目录里了,试过在uboot下可以使用nfs命令下载这个目录下的文件,编译好的文件系统还需要改么

#43 Re: NXP i.MX6UL/6ULL » [正点原子i.MX6UL] v4l2+framebuffer预览USB摄像头(一):采集拍照 » 2020-03-20 22:44:15

- 代码纠错

今天测试程序发现拍照后颜色异常,然后发现是一处错误,有点小尴尬。。。

在函数 void yuyv_to_rgb888(void) 里面:

需要把

gbase = 0.34414 * (u - 128) - 0.71414 * (v - 128);

修改成:

gbase = 0.34414 * (u - 128) + 0.71414 * (v - 128);

(减号变成加号~)

#44 Re: NXP i.MX6UL/6ULL » [正点原子i.MX6UL] v4l2+framebuffer预览USB摄像头(二):显示照片 » 2020-03-20 22:38:29

#### 显示照片代码测试OK
0320
---
#### 代码2 实现显示bmp照片

本程序的功能单纯就是bmp文件解码,从bmp图片文件读取RGB数据显示到framebuffer上面。

- 实现源码。

/*
 * @FilePath: /0318/load-bmp-on-fb.c
 * @Version: 1.0.0
 * @Author: zys
 * @LastAuthor   : zys
 * @CreationDate: 2020-03-18 22:58:04
 * @LastEditTime : 2020-03-18 23:07:45
 * @Description :  读取bmp图片显示到framebuffer。
 */



/*----------------------------------------------------------------------------*/
/* change log ----------------------------------------------------------------*/


/*

0318
yz imx6ul test ok.


-build:
    $ARMGCC load-bmp-on-fb.c -o load-bmp-on-fb

-tftp get:    
    cp load-bmp-on-fb /tftpboot/
    tftp -g -r load-bmp-on-fb 192.168.2.119
*/


/*----------------------------------------------------------------------------*/
/* Includes ------------------------------------------------------------------*/
#include <arpa/inet.h>
#include <fcntl.h>
#include <linux/fb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>


/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private typedef -----------------------------------------------------------*/
/*_attribute__((packed))的作用是告诉编译器取消结构在编译过程中的优化对齐  */

//14byte文件头
typedef struct
{
    unsigned char cfType[2];  //文件类型,"BM"(0x4D42)
    unsigned int  cfSize;     //文件大小(字节)
    unsigned int  cfReserved; //保留,值为0
    unsigned int  cfoffBits;  //数据区相对于文件头的偏移量(字节)
} __attribute__((packed)) BITMAPFILEHEADER;


//40byte信息头
typedef struct
{
    unsigned int       ciSize;            //BITMAPFILEHEADER所占的字节数
    unsigned int       ciWidth;           //宽度
    unsigned int       ciHeight;          //高度
    unsigned short int ciPlanes;          //目标设备的位平面数,值为1
    unsigned short int ciBitCount;        //每个像素的位数
    char               ciCompress[4];     //压缩说明
    unsigned int       ciSizeImage;       //用字节表示的图像大小,该数据必须是4的倍数
    unsigned int       ciXPelsPerMeter;   //目标设备的水平像素数/米
    unsigned int       ciYPelsPerMeter;   //目标设备的垂直像素数/米
    unsigned int       ciClrUsed;         //位图使用调色板的颜色数
    unsigned           intciClrImportant; //指定重要的颜色数,当该域的值等于颜色数时(或者等于0时),表示所有颜色都一样重要
} __attribute__((packed)) BITMAPINFOHEADER;

typedef struct
{
    unsigned char blue;
    unsigned char green;
    unsigned char red;
} __attribute__((packed)) PIXEL; //颜色模式RGB


/* Private function prototypes -----------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
BITMAPFILEHEADER FileHead;
BITMAPINFOHEADER InfoHead;
static int       xres           = 0;
static int       yres           = 0;
static int       bits_per_pixel = 0;
static char*     fb_addr        = NULL;

/* Global  variables ---------------------------------------------------------*/
/* Private functions ---------------------------------------------------------*/

int show_bmp(char* picname)
{
    FILE*                 fp;
    int                   rc;
    int                   line_x, line_y;
    long int              location = 0;
    char                  tmp[1024 * 10];
    static unsigned short b, g, r;
    static unsigned short rgb; /*2个字节*/
    PIXEL                 pix;
    int                   total_length = 0;
    int                   width, height;
    int                   flen = 0;


    printf("into show_bmp function\n");

    fp = fopen(picname, "rb");
    if (fp == NULL) {
        printf("open errror\n");
        return (-1);
    }

    /* BITMAPFILEHEADER*/
    rc = fread(&FileHead, sizeof(BITMAPFILEHEADER), 1, fp);
    if (rc != 1) {
        printf("read header error!\n");
        fclose(fp);
        return (-2);
    }
    printf("Read BITMAPFILEHEADER  OK\n");

    //检测是否是bmp图像
    if (memcmp(FileHead.cfType, "BM", 2) != 0) {
        printf("it's not a BMP file\n");
        fclose(fp);
        return (-3);
    }
    /*BITMAPINFOHEADER*/
    rc = fread((char*)&InfoHead, sizeof(BITMAPINFOHEADER), 1, fp);
    if (rc != 1) {
        printf("read infoheader error!\n");
        fclose(fp);
        return (-4);
    }
    printf("Read BITMAPINFOHEADER  OK\n");


    /* 求解文件长度 */
    fseek(fp, 0, SEEK_SET);
    fseek(fp, 0, SEEK_END);

    flen = ftell(fp);

    /* 再移位到文件头部 */
    fseek(fp, 0, SEEK_SET);


    width  = InfoHead.ciWidth;
    height = InfoHead.ciHeight;

    printf("FileHead.cfSize =%d byte\n", FileHead.cfSize);
    printf("flen = %d\n", flen);
    printf("width = %d, height = %d\n", width, height);

    total_length = width * height * 3;

    printf("total_length = %d\n", total_length);

    //跳转的数据区
    fseek(fp, FileHead.cfoffBits, SEEK_SET);

    printf("FileHead.cfoffBits = %d\n", FileHead.cfoffBits);
    printf("InfoHead.ciBitCount = %d\n", InfoHead.ciBitCount);


    for (line_y = 0; line_y < height; line_y++) {
        // printf("read pix rgb...\n");

        for (line_x = 0; line_x < width; line_x++) {

            // printf("read pix rgb...\n");
            // rc = fread(&(pix.blue), 1, 1, fp);
            // rc = fread(&(pix.green), 1, 1, fp);
            // rc = fread(&(pix.red), 1, 1, fp);

            rc = fread(&pix, sizeof(PIXEL), 1, fp);

            // rgb565每像素占2个字节
            location = line_x * 2 + (height - 1 - line_y) * xres * 2;

            r   = ((pix.red >> 3) << 11) & 0xfb80;
            g   = ((pix.green >> 2) << 5) & 0x07e0;
            b   = (pix.blue >> 3) & 0x001f;
            rgb = r | g | b;

            // 写入显存
            *((unsigned short*)(fb_addr + location)) = rgb;
        }
    }

    fclose(fp);

    return 0;
}


int fb_init(void)
{
    int                      fbfd, fb_size;
    struct fb_var_screeninfo vinfo;
    struct fb_fix_screeninfo finfo;

    fbfd = open("/dev/fb0", O_RDWR | O_CREAT, S_IRWXU);
    if (fbfd < 0) {
        printf("open error\n");
        exit(1);
    }

    if (ioctl(fbfd, FBIOGET_VSCREENINFO, &vinfo)) {
        printf("Error reading variable information.\n");
        exit(1);
    }


    if (ioctl(fbfd, FBIOGET_FSCREENINFO, &finfo)) {
        printf("Error reading variable information.\n");
        exit(1);
    }
    
    printf("R:%d,G:%d,B:%d \n", vinfo.red, vinfo.green, vinfo.blue);
    printf("%dx%d, %dbpp\n", vinfo.xres, vinfo.yres, vinfo.bits_per_pixel);

    xres           = vinfo.xres;
    yres           = vinfo.yres;
    bits_per_pixel = vinfo.bits_per_pixel;
    fb_size        = xres * yres * ((bits_per_pixel + 7) / 8);

    printf("fbsize: %d \n", fb_size);

    if ((fb_addr = (char*)mmap(0, fb_size, PROT_READ | PROT_WRITE, MAP_SHARED, fbfd, 0)) < 0) {
        printf("fb mmap error\n");
        exit(1);
    }

    close(fbfd);

    printf("fb init ok!\n");

    return fb_size;
}

int main(int argc, char* argv[])
{
    int fb_size;

    fb_size = fb_init();

    printf("show_bmp\n");
    show_bmp(argv[1]);

    munmap(fb_addr, fb_size);

    return 0;
}


/*************************** (C) COPYRIGHT 2020 ZYS ************END OF FILE****/

- 测试程序

首于本程序只负责显示,所以拍照需要用到上篇的代码,分两步完成测试。

先拍照保存:

# ./av4l2grap-uvc-savebmp-x /dev/video1

再显示出来:

# ./load-bmp-on-fb uvc_grap.bmp

完整的运行程序log:

# ls
av4l2grap-uvc-savebmp-x  load-bmp-on-fb
# ./av4l2grap-uvc-savebmp-x /dev/video1

----- v4l2 savebmp app start -----
using:          /dev/video1
driver:         uvcvideo
card:           Aoni HD Camera
bus_info:       usb-ci_hdrc.1-1.4
version:        262415
capabilities:   84200001
/dev/video1:    supports capture.
/dev/video1:    supports streaming.

Support format:
        1.MJPEG
        2.YUV 4:2:2 (YUYV)

fmt.type:               1
pix.pixelformat:        YUYV
pix.height:             480
pix.width:              640
pix.field:              1
set fps OK!
get fps OK:
timeperframe.numerator  : 1
timeperframe.denominator: 25
set fps : 25
Supported format: MJPEG
        Supported size: 640x480
        Supported size: 1280x720
        Supported size: 1184x656
        Supported size: 1024x576
        Supported size: 960x720
        Supported size: 960x540
        Supported size: 864x486
        Supported size: 800x600
        Supported size: 752x423
        Supported size: 640x360
        Supported size: 320x240
Supported format: YUV 4:2:2 (YUYV)
        Supported size with the current format: 640x480
        Supported size with the current format: 1280x720
        Supported size with the current format: 1184x656
        Supported size with the current format: 1024x576
        Supported size with the current format: 960x720
        Supported size with the current format: 960x540
        Supported size with the current format: 864x486
        Supported size with the current format: 800x600
        Supported size with the current format: 752x423
        Supported size with the current format: 640x360
        Supported size with the current format: 320x240
init /dev/video1        [OK]
start capture
buf index: 0
yuyv to rgb888 done
save bmp  function
save ./uvc_grap.bmp done
app exit.

# ls
av4l2grap-uvc-savebmp-x  load-bmp-on-fb           uvc_grap.bmp


# ./load-bmp-on-fb uvc_grap.bmp
R:11,G:5,B:0
1024x600, 16bpp
fbsize: 1228800
fb init ok!
show_bmp
into show_bmp function
Read BITMAPFILEHEADER  OK
Read BITMAPINFOHEADER  OK
FileHead.cfSize =921654 byte
flen = 921654
width = 640, height = 480
total_length = 921600
FileHead.cfoffBits = 54
InfoHead.ciBitCount = 24
#

- 显示效果

bmp-on-fb.jpg


本篇由两个程序合作,完成了静态照片的显示,下篇会完成动态实时预览~

#45 NXP i.MX6UL/6ULL » [正点原子i.MX6UL] v4l2+framebuffer预览USB摄像头(二):显示照片 » 2020-03-17 23:06:27

Jmhh247
回复: 4

关键字: 正点原子,i.MX6UL,linux, framebuffer


- 主机环境:ubuntu16.04-64bit
- 硬件版本:正点原子i.MX6UL emmc

固件帖在本站:[[正点原子i.MX6UL开发板] 编译uboot、linux、buildroot-rootfs](https://whycan.cn/t_3550.html)

---

#### 一、本篇目标

接上篇- [[正点原子i.MX6UL]v4l2+framebuffer预览USB摄像头(一):采集拍照](https://whycan.cn/t_3658.html)

本篇主要实现把拍照保存的bmp图片,显示到framebuffer上。

#### 二、相关概念

一些是我自己的基本理解,比较粗糙~

帧缓冲(framebuffer)是Linux为显示设备提供的一个接口,把显存抽象后的一种设备,允许上层应用程序在图形模式下直接对显示缓冲区进行读写操作。framebuffer是LCD对应的一中HAL(硬件抽象层),提供抽象的,统一的接口操作,用户不必关心硬件层是怎么实施的。这些都是由 Framebuffer设备驱动来完成的。

- 帧缓冲设备对应的设备文件为/dev/fb*
- 使用时需要先获取到相关信息如屏幕尺寸,显存大小,RGB格式等
- 通常把帧缓冲显存映射至用户程序空间来使用,非常方便


##### s0:获取帧缓冲信息

主要是通过struct fb_var_screeninfo(表示可变信息)、struct fb_fix_screeninfo(表示固定信息)这2个结构体,在/usr/include/linux/fb.h中定义:

struct fb_fix_screeninfo {
	char id[16];			/* identification string eg "TT Builtin" */
	unsigned long smem_start;	/* Start of frame buffer mem */
					/* (physical address) */
	__u32 smem_len;			/* Length of frame buffer mem */
	__u32 type;			/* see FB_TYPE_*		*/
	__u32 type_aux;			/* Interleave for interleaved Planes */
	__u32 visual;			/* see FB_VISUAL_*		*/ 
	__u16 xpanstep;			/* zero if no hardware panning  */
	__u16 ypanstep;			/* zero if no hardware panning  */
	__u16 ywrapstep;		/* zero if no hardware ywrap    */
	__u32 line_length;		/* length of a line in bytes    */
	unsigned long mmio_start;	/* Start of Memory Mapped I/O   */
					/* (physical address) */
	__u32 mmio_len;			/* Length of Memory Mapped I/O  */
	__u32 accel;			/* Indicate to driver which	*/
					/*  specific chip/card we have	*/
	__u16 capabilities;		/* see FB_CAP_*			*/
	__u16 reserved[2];		/* Reserved for future compatibility */
};


struct fb_var_screeninfo {
	__u32 xres;			/* visible resolution		*/
	__u32 yres;
	__u32 xres_virtual;		/* virtual resolution		*/
	__u32 yres_virtual;
	__u32 xoffset;			/* offset from virtual to visible */
	__u32 yoffset;			/* resolution			*/

	__u32 bits_per_pixel;		/* guess what			*/
	__u32 grayscale;		/* 0 = color, 1 = grayscale,	*/
					/* >1 = FOURCC			*/
	struct fb_bitfield red;		/* bitfield in fb mem if true color, */
	struct fb_bitfield green;	/* else only length is significant */
	struct fb_bitfield blue;
	struct fb_bitfield transp;	/* transparency			*/	

	__u32 nonstd;			/* != 0 Non standard pixel format */

	__u32 activate;			/* see FB_ACTIVATE_*		*/

	__u32 height;			/* height of picture in mm    */
	__u32 width;			/* width of picture in mm     */

	__u32 accel_flags;		/* (OBSOLETE) see fb_info.flags */

	/* Timing: All values in pixclocks, except pixclock (of course) */
	__u32 pixclock;			/* pixel clock in ps (pico seconds) */
	__u32 left_margin;		/* time from sync to picture	*/
	__u32 right_margin;		/* time from picture to sync	*/
	__u32 upper_margin;		/* time from sync to picture	*/
	__u32 lower_margin;
	__u32 hsync_len;		/* length of horizontal sync	*/
	__u32 vsync_len;		/* length of vertical sync	*/
	__u32 sync;			/* see FB_SYNC_*		*/
	__u32 vmode;			/* see FB_VMODE_*		*/
	__u32 rotate;			/* angle we rotate counter clockwise */
	__u32 colorspace;		/* colorspace for FOURCC-based modes */
	__u32 reserved[4];		/* Reserved for future compatibility */
};

struct fb_bitfield {
	__u32 offset;			/* beginning of bitfield	*/
	__u32 length;			/* length of bitfield		*/
	__u32 msb_right;		/* != 0 : Most significant bit is right */ 
};

- 获取可变信息:

    if (ioctl(screen_fbd, FBIOGET_VSCREENINFO, &fb_var) == -1) {
        printf("err read screen info FBIOGET_VSCREENINFO.\n");
        close(screen_fbd);
        return 0;
    }

- 获取固定信息:

    if (ioctl(screen_fbd, FBIOGET_FSCREENINFO, &fb_fix) == -1) {
        printf("err read screen info FBIOGET_FSCREENINFO.\n");
        close(screen_fbd);
        return 0;
    }

##### s1:把帧缓冲映射至用户空间
映射显存:

    if ((fb_addr = (char*)mmap(0, fb_size, PROT_READ | PROT_WRITE, MAP_SHARED, fbfd, 0)) < 0) {
        printf("fb mmap error\n");
        exit(1);
    }

取消映射:

    munmap(fb_addr, fb_size);

#### 三、代码实现

- 代码1

本代码主要实现了获取帧缓冲的信息,相当于帧缓冲版的"hello world"。

/*
 * @FilePath: /0317/fb-getinfo.c
 * @Version: 1.0.0
 * @Author: zys
 * @LastAuthor   : zys
 * @CreationDate: 2020-03-17 21:54:30
 * @LastEditTime : 2020-03-17 22:06:54
 * @Description :  获取framebuffer的信息,相当于framebuffer版的"hello world"。
 */


#include <fcntl.h>
#include <linux/fb.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>

/*

yz imx6ul test ok.

-build:
    $ARMGCC fb-getinfo.c -o fb-getinfo

-tftp get:    
    cp fb-getinfo /tftpboot/
    tftp -g -r fb-getinfo 192.168.2.119
*/

int main(int argc, char* argv[])
{
    int                      screen_fbd = 0;
    struct fb_fix_screeninfo fb_fix;
    struct fb_var_screeninfo fb_var;
    char*                    env = NULL;

    if (!(env = getenv("FRAMEBUFFER"))) {
        env = "/dev/fb0";
    }

    screen_fbd = open(env, O_RDWR);

    if (screen_fbd < 0) {
        printf("err open fb dev: %s \r\n", env);
        return 0;
    }
    else {
        printf("success open fb dev : %s \r\n", env);
    }

    if (ioctl(screen_fbd, FBIOGET_FSCREENINFO, &fb_fix) == -1) {
        printf("err read screen info FBIOGET_FSCREENINFO.\n");

        close(screen_fbd);
        return 0;
    }



    printf("fb_fix.id=\"%s\"\r\n", fb_fix.id);
    printf("fb_fix.smem_start=%#x\r\n", fb_fix.smem_start);
    printf("fb_fix.mem_len=%d\r\n", fb_fix.smem_len);
    printf("fb_fix.type=%d\r\n", fb_fix.type);
    printf("fb_fix.type_aux=%d\r\n", fb_fix.type_aux);
    printf("fb_fix.visual=%d\r\n", fb_fix.visual);
    printf("fb_fix.xpanstep=%s\r\n", fb_fix.xpanstep);
    printf("fb_fix.ypanstep=%d\r\n", fb_fix.ypanstep);
    printf("fb_fix.ywrapstep=%d\r\n", fb_fix.ywrapstep);
    printf("fb_fix.line_length=%d\r\n", fb_fix.line_length);
    printf("fb_fix.mmio_start=%#x\r\n", fb_fix.mmio_start);
    printf("fb_fix.mmio_len=%#x\r\n", fb_fix.mmio_len);
    printf("fb_fix.accel=%d\r\n", fb_fix.accel);
    printf("fb_fix.reserved[0]=%d\r\n", fb_fix.reserved[0]);
    printf("fb_fix.reserved[1]=%d\r\n", fb_fix.reserved[1]);
    printf("fb_fix.reserved[2]=%d\r\n", fb_fix.reserved[2]);

    if (ioctl(screen_fbd, FBIOGET_VSCREENINFO, &fb_var) == -1) {
        printf("err read screen info FBIOGET_VSCREENINFO.\n");
        close(screen_fbd);
        return 0;
    }

    printf("fb_var.xres=%d\r\n", fb_var.xres);
    printf("fb_var.yres=%d\r\n", fb_var.yres);
    printf("fb_var.xres_virtual=%d\r\n", fb_var.xres_virtual);
    printf("fb_var.yres_virtual=%d\r\n", fb_var.yres_virtual);
    printf("fb_var.xoffset=%d\r\n", fb_var.xoffset);
    printf("fb_var.yoffset=%d\r\n", fb_var.yoffset);
    printf("fb_var.bits_per_pixel=%d\r\n", fb_var.bits_per_pixel);
    printf("fb_var.grayscale=%d\r\n", fb_var.grayscale);


    printf("fb_bitfield red, offset = %u, length = %u, right = %u, \n\r", fb_var.red.offset, fb_var.red.length, fb_var.red.msb_right);
    printf("fb_bitfield green, offset = %u, length = %u, right = %u, \n\r", fb_var.green.offset, fb_var.green.length, fb_var.green.msb_right);
    printf("fb_bitfield blue, offset = %u, length = %u, right = %u, \n\r", fb_var.blue.offset, fb_var.blue.length, fb_var.blue.msb_right);
    printf("fb_bitfield transp, offset = %u, length = %u, right = %u, \n\r\n\r", fb_var.transp.offset, fb_var.transp.length, fb_var.transp.msb_right);

    printf("fb_var.red=%#x\r\n", fb_var.red);
    printf("fb_var.green=%#x\r\n", fb_var.green);
    printf("fb_var.blue=%#x\r\n", fb_var.blue);
    printf("fb_var.transp=%#x\r\n", fb_var.transp);
    printf("fb_var.nonstd=%d\r\n", fb_var.nonstd);
    printf("fb_var.activate=%d\r\n", fb_var.activate);
    printf("fb_var.height=%d\r\n", fb_var.height);
    printf("fb_var.width=%d\r\n", fb_var.width);
    printf("fb_var.accel_flags=%d\r\n", fb_var.accel_flags);
    printf("fb_var.pixclock=%d\r\n", fb_var.pixclock);
    printf("fb_var.left_margin=%d\r\n", fb_var.left_margin);
    printf("fb_var.right_margin=%d\r\n", fb_var.right_margin);
    printf("fb_var.upper_margin=%d\r\n", fb_var.upper_margin);
    printf("fb_var.lower_margin=%d\r\n", fb_var.lower_margin);
    printf("fb_var.hsync_len=%d\r\n", fb_var.hsync_len);
    printf("fb_var.vsync_len=%d\r\n", fb_var.vsync_len);
    printf("fb_var.sync=%d\r\n", fb_var.sync);
    printf("fb_var.vmode=%d\r\n", fb_var.vmode);
    printf("fb_var.rotate=%d\r\n", fb_var.rotate);
    printf("fb_var.reserved[0]=%d\r\n", fb_var.reserved[0]);
    printf("fb_var.reserved[1]=%d\r\n", fb_var.reserved[1]);
    printf("fb_var.reserved[2]=%d\r\n", fb_var.reserved[2]);
    printf("fb_var.reserved[3]=%d\r\n", fb_var.reserved[3]);


    close(screen_fbd);

    return 0;
}

显示bmp还未实现,后续会更新上~


#### 四、测试程序

- 编译程序

$ARMGCC fb-getinfo.c -o fb-getinfo

- 运行程序

先把程序复制到开发板,推荐用NF或TFTP。

运行程序:

# ./fb-getinfo
success open fb dev : /dev/fb0
fb_fix.id="mxs-lcdif"
fb_fix.smem_start=0x98100000
fb_fix.mem_len=33554432
fb_fix.type=0
fb_fix.type_aux=0
fb_fix.visual=2
fb_fix.xpanstep=(null)
fb_fix.ypanstep=1
fb_fix.ywrapstep=1
fb_fix.line_length=2048
fb_fix.mmio_start=0
fb_fix.mmio_len=0
fb_fix.accel=0
fb_fix.reserved[0]=0
fb_fix.reserved[1]=0
fb_fix.reserved[2]=0
fb_var.xres=1024
fb_var.yres=600
fb_var.xres_virtual=1024
fb_var.yres_virtual=600
fb_var.xoffset=0
fb_var.yoffset=0
fb_var.bits_per_pixel=16
fb_var.grayscale=0
fb_bitfield red, offset = 11, length = 5, right = 0,
fb_bitfield green, offset = 5, length = 6, right = 0,
fb_bitfield blue, offset = 0, length = 5, right = 0,
fb_bitfield transp, offset = 0, length = 0, right = 0,

fb_var.red=0xb
fb_var.green=0x5
fb_var.blue=0
fb_var.transp=0
fb_var.nonstd=0
fb_var.activate=128
fb_var.height=0
fb_var.width=0
fb_var.accel_flags=0
fb_var.pixclock=19607
fb_var.left_margin=140
fb_var.right_margin=160
fb_var.upper_margin=20
fb_var.lower_margin=12
fb_var.hsync_len=20
fb_var.vsync_len=3
fb_var.sync=1073741824
fb_var.vmode=0
fb_var.rotate=0
fb_var.reserved[0]=0
fb_var.reserved[1]=0
fb_var.reserved[2]=0
fb_var.reserved[3]=0
#

可以看到,屏用的是RGB565格式,而显存居然达32M,NXP的驱动工程师很任性~

#46 Re: 全志 SOC » A33主线Linux跑起OpenGL/ES » 2020-03-13 13:28:45

你的驱动不支持双缓冲。

The mem is :2457600 = 600 * 4096,显存明显只一个帧缓冲大小。

必须大于双缓冲以上的显存,y_virtual 才能翻倍。





KevinS 说:

换成4.19的内核也不行,现在的问题是 不管overalloc更改成200,还是300,系统中的y_virtual 都是600

# ./egl_test 
EGL Version: "1.4 Linux-r8p1-00rel0"
EGL Vendor: "ARM"
EGL Extensions: "EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_lock_surface EGL_KHR_lock_surface2 EGL_EXT_create_context_robustness EGL_ANDROID_blob_cache EGL_KHR_create_context EGL_KHR_partial_update EGL_KHR_create_context_no_error "
The mem is :2457600
The line_length is :4096
The xres is :1024
The yres is :600
The xres_v is :1024
The yres_v is :600
bits_per_pixel is :32
Error: eglCreateWindowSurface failed: 0x00003003

见了鬼了

#50 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » github项目下载代理 » 2020-03-11 08:52:22

mango 说:

看来 http://g.widora.io 广告很不到位:)

@晕哥   你送晕哥一块tiny200,让他置顶一个月,这交易怎么样~

#52 Re: 全志 SOC » F1C100 LittlevGL GUI » 2020-03-07 09:17:02

感谢分享,屏很帅!屏驱动板似乎是手工制作的PCB...

有屏的资料或链接么

#57 Re: 全志 SOC » V3S+QT5 显示图片问题。QPixmap::scaled: Pixmap is a null pixmap » 2020-02-21 08:49:03

好像又可以水一帖~

可以写个最简单的程序测试下qt支持的图片格式:

- 测试代码:

#include <QImageReader>

qDebug() << QImageReader::supportedImageFormats();

- ubuntu下测试输出:

("bmp", "cur", "gif", "ico", "jpeg", "jpg", "pbm", "pgm", "png", "ppm", "xbm", "xpm")

- 交叉编译后在你的开发板上测试。

#58 Re: 全志 SOC » 各位大神新年好,win上写的qt程序可以显示png图片,交叉编译后在开发板上不能显图片,要怎么弄才能显示图片呢 » 2020-02-21 08:44:11

kakalu 说:

我也遇到了这个问题了,还没有搞定啊

可以写个最简单的程序测试下qt支持的图片格式:

- 测试代码:

#include <QImageReader>

qDebug() << QImageReader::supportedImageFormats();

- ubuntu下测试输出:

("bmp", "cur", "gif", "ico", "jpeg", "jpg", "pbm", "pgm", "png", "ppm", "xbm", "xpm")

- 交叉编译后在你的开发板上测试。

#60 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 图标ttf字体在emwin模拟器上显示正常,但应用在目标板(新塘的32926)只显示方格,请教各位大神! » 2020-02-12 12:47:40

不在电脑旁,没法看代码。
只用改设置字体的c文件就行。

我只用过MDK编译,不知道和编译器是否有关

可以试试不带bom的utf8格式

#62 Re: NXP i.MX6UL/6ULL » [正点原子i.MX6UL] v4l2+framebuffer预览USB摄像头(一):采集拍照 » 2020-02-07 12:07:42

#### 拍照代码测试Ok

0207
---
#### 代码2 实现拍照功能

运行程序后会在当前目录生成uvc_grap.bmp。可以复制到ubuntu查看图片。

- 知识点

主要是自己的理解。

1.yuyv与rgb888:

yuyv原始数据里,两个像素点共用了uv分量,两个像素占用4个字节;
rgb888大家应该都知道了,一个像素点占用3个字节,那么两个像素点占用6个字节。
由此可知,yuyv与rgb888字节量比列是 4:6,也就是 2:3。

知道这些就可以定义相关数据缓冲区大小了:

// buf for yuyv
uvc_cam.framesizeIn = uvc_cam.width * uvc_cam.height << 1; // w * h * 2
uvc_cam.framebuffer = (unsigned char*)calloc(1, (size_t)uvc_cam.framesizeIn);

// buf for rgb888
static unsigned char rgb888_buffer[IMAGEWIDTH * IMAGEHEIGHT * 3];

2.bmp:

基础的图片格式网上很多介绍,不再说明,核心关注点是——数据上下颠倒存放的


- 实现源码:

/*
 * @FilePath: /v4l2-fb-uvc-code/v4l2grap-uvc-savebmp.c
 * @Version: 1.0.0
 * @Author: zys
 * @LastAuthor   : zys
 * @CreationDate: 2020-02-04 11:33:25
 * @LastEditTime : 2020-02-07 11:08:21
 * @Description :  采集一帧USB摄像头数据,保存成bmp图片。
 */


/*----------------------------------------------------------------------------*/
/* change log ----------------------------------------------------------------*/
/*
    
    -0205
     获取USB相机信息 ok.

    -0207
     实现拍照功能:运行程序后会在当前目录生成uvc_grap.bmp。可以复制到ubuntu查看图片。
*/



/*----------------------------------------------------------------------------*/
/* Includes ------------------------------------------------------------------*/
#include <fcntl.h>
#include <linux/videodev2.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>

/* Private define ------------------------------------------------------------*/
#define _UVC_CAM_HEIGHT (480)
#define _UVC_CAM_WIDTH  (640)
#define IMAGEHEIGHT     _UVC_CAM_HEIGHT
#define IMAGEWIDTH      _UVC_CAM_WIDTH

#define NB_BUFFER 4

/* Private macro -------------------------------------------------------------*/
/* Private typedef -----------------------------------------------------------*/
struct vdIn {
    int   fd;
    char* videodevice;

    // v4l2
    struct v4l2_capability     cap;
    struct v4l2_format         fmt;
    struct v4l2_fmtdesc        fmtdesc;
    struct v4l2_streamparm     setfps;
    struct v4l2_requestbuffers rb;

    void* mem[NB_BUFFER];
    int   memlength[NB_BUFFER];

    unsigned char* framebuffer;
    int            framesizeIn;

    int width;
    int height;
    int fps;


    FILE* fp_bmp;
};

/*_attribute__((packed))的作用是告诉编译器取消结构在编译过程中的优化对齐  */

//14byte文件头
typedef struct
{
    unsigned char cfType[2];  //文件类型,"BM"(0x4D42)
    unsigned int  cfSize;     //文件大小(字节)
    unsigned int  cfReserved; //保留,值为0
    unsigned int  cfoffBits;  //数据区相对于文件头的偏移量(字节)
} __attribute__((packed)) BITMAPFILEHEADER;


//40byte信息头
typedef struct
{
    unsigned int       ciSize;            //BITMAPFILEHEADER所占的字节数
    unsigned int       ciWidth;           //宽度
    unsigned int       ciHeight;          //高度
    unsigned short int ciPlanes;          //目标设备的位平面数,值为1
    unsigned short int ciBitCount;        //每个像素的位数
    char               ciCompress[4];     //压缩说明
    unsigned int       ciSizeImage;       //用字节表示的图像大小,该数据必须是4的倍数
    unsigned int       ciXPelsPerMeter;   //目标设备的水平像素数/米
    unsigned int       ciYPelsPerMeter;   //目标设备的垂直像素数/米
    unsigned int       ciClrUsed;         //位图使用调色板的颜色数
    unsigned           intciClrImportant; //指定重要的颜色数,当该域的值等于颜色数时(或者等于0时),表示所有颜色都一样重要
} __attribute__((packed)) BITMAPINFOHEADER;

typedef struct
{
    unsigned char blue;
    unsigned char green;
    unsigned char red;
} __attribute__((packed)) PIXEL; //颜色模式RGB



/* Private function prototypes -----------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
static struct vdIn   uvc_cam;
static unsigned char rgb888_buffer[IMAGEWIDTH * IMAGEHEIGHT * 3];

/* Global  variables ---------------------------------------------------------*/
/* Private functions ---------------------------------------------------------*/


void yuyv_to_rgb888(void)
{
    int            i, j;
    unsigned char  y1, y2, u, v;
    int            r1, g1, b1, r2, g2, b2;
    unsigned char* pointer;
    double         rbase = 0;
    double         gbase = 0;
    double         bbase = 0;


    pointer = uvc_cam.framebuffer;


    for (i = 0; i < IMAGEHEIGHT; i++) {
        for (j = 0; j < (IMAGEWIDTH / 2); j++) {
            y1 = *(pointer + ((i * (IMAGEWIDTH / 2) + j) << 2));
            u  = *(pointer + ((i * (IMAGEWIDTH / 2) + j) << 2) + 1);
            y2 = *(pointer + ((i * (IMAGEWIDTH / 2) + j) << 2) + 2);
            v  = *(pointer + ((i * (IMAGEWIDTH / 2) + j) << 2) + 3);


            rbase = 1.042 * (v - 128);
            gbase = 0.34414 * (u - 128) - 0.71414 * (v - 128);
            bbase = 1.772 * (u - 128);

            r1 = y1 + rbase;
            g1 = y1 - gbase;
            b1 = y1 + bbase;

            r2 = y2 + rbase;
            g2 = y2 - gbase;
            b2 = y2 + bbase;


            if (r1 > 255)
                r1 = 255;
            else if (r1 < 0)
                r1 = 0;

            if (b1 > 255)
                b1 = 255;
            else if (b1 < 0)
                b1 = 0;

            if (g1 > 255)
                g1 = 255;
            else if (g1 < 0)
                g1 = 0;

            if (r2 > 255)
                r2 = 255;
            else if (r2 < 0)
                r2 = 0;

            if (b2 > 255)
                b2 = 255;
            else if (b2 < 0)
                b2 = 0;

            if (g2 > 255)
                g2 = 255;
            else if (g2 < 0)
                g2 = 0;


            *(rgb888_buffer + ((IMAGEHEIGHT - 1 - i) * (IMAGEWIDTH / 2) + j) * 6)     = (unsigned char)b1;
            *(rgb888_buffer + ((IMAGEHEIGHT - 1 - i) * (IMAGEWIDTH / 2) + j) * 6 + 1) = (unsigned char)g1;
            *(rgb888_buffer + ((IMAGEHEIGHT - 1 - i) * (IMAGEWIDTH / 2) + j) * 6 + 2) = (unsigned char)r1;
            *(rgb888_buffer + ((IMAGEHEIGHT - 1 - i) * (IMAGEWIDTH / 2) + j) * 6 + 3) = (unsigned char)b2;
            *(rgb888_buffer + ((IMAGEHEIGHT - 1 - i) * (IMAGEWIDTH / 2) + j) * 6 + 4) = (unsigned char)g2;
            *(rgb888_buffer + ((IMAGEHEIGHT - 1 - i) * (IMAGEWIDTH / 2) + j) * 6 + 5) = (unsigned char)r2;
        }
    }

    printf("yuyv to rgb888 done\n");
}




int v4l2_init(void)
{
    int                i = 0;
    int                ret;
    struct v4l2_buffer buf;


    // 1. open cam
    if ((uvc_cam.fd = open(uvc_cam.videodevice, O_RDWR)) == -1) {
        printf("ERROR opening V4L interface\n");
        return -1;
    }

    // 2. querycap
    memset(&uvc_cam.cap, 0, sizeof(struct v4l2_capability));
    ret = ioctl(uvc_cam.fd, VIDIOC_QUERYCAP, &uvc_cam.cap);

    if (ret < 0) {
        printf("Error opening device %s: unable to query device.\n", uvc_cam.videodevice);
        return -1;
    }
    else {
        printf("driver:\t\t%s\n", uvc_cam.cap.driver);
        printf("card:\t\t%s\n", uvc_cam.cap.card);
        printf("bus_info:\t%s\n", uvc_cam.cap.bus_info);
        printf("version:\t%d\n", uvc_cam.cap.version);
        printf("capabilities:\t%x\n", uvc_cam.cap.capabilities);

        if ((uvc_cam.cap.capabilities & V4L2_CAP_VIDEO_CAPTURE) == V4L2_CAP_VIDEO_CAPTURE) {
            printf("%s: \tsupports capture.\n", uvc_cam.videodevice);
        }

        if ((uvc_cam.cap.capabilities & V4L2_CAP_STREAMING) == V4L2_CAP_STREAMING) {
            printf("%s: \tsupports streaming.\n", uvc_cam.videodevice);
        }
    }

    // 3. set format in

    // 3.1 enum fmt
    printf("\nSupport format:\n");

    memset(&uvc_cam.fmtdesc, 0, sizeof(struct v4l2_fmtdesc));
    uvc_cam.fmtdesc.index = 0;
    uvc_cam.fmtdesc.type  = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    while (ioctl(uvc_cam.fd, VIDIOC_ENUM_FMT, &uvc_cam.fmtdesc) != -1) {
        printf("\t%d.%s\n", uvc_cam.fmtdesc.index + 1, uvc_cam.fmtdesc.description);
        uvc_cam.fmtdesc.index++;
    }

    // 3.2 set fmt
    memset(&uvc_cam.fmt, 0, sizeof(struct v4l2_format));
    uvc_cam.fmt.type                = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    uvc_cam.fmt.fmt.pix.width       = uvc_cam.width;
    uvc_cam.fmt.fmt.pix.height      = uvc_cam.height;
    uvc_cam.fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV;
    uvc_cam.fmt.fmt.pix.field       = V4L2_FIELD_ANY;

    ret = ioctl(uvc_cam.fd, VIDIOC_S_FMT, &uvc_cam.fmt);
    if (ret < 0) {
        printf("Unable to set format\n");
        return -1;
    }

    // 3.3 get fmt
    ret = ioctl(uvc_cam.fd, VIDIOC_G_FMT, &uvc_cam.fmt);
    if (ret < 0) {
        printf("Unable to get format\n");
        return -1;
    }
    else {
        printf("\nfmt.type:\t\t%d\n", uvc_cam.fmt.type);
        printf("pix.pixelformat:\t%c%c%c%c\n", uvc_cam.fmt.fmt.pix.pixelformat & 0xFF, (uvc_cam.fmt.fmt.pix.pixelformat >> 8) & 0xFF, (uvc_cam.fmt.fmt.pix.pixelformat >> 16) & 0xFF, (uvc_cam.fmt.fmt.pix.pixelformat >> 24) & 0xFF);
        printf("pix.height:\t\t%d\n", uvc_cam.fmt.fmt.pix.height);
        printf("pix.width:\t\t%d\n", uvc_cam.fmt.fmt.pix.width);
        printf("pix.field:\t\t%d\n", uvc_cam.fmt.fmt.pix.field);
    }


    // 4. set fps
    memset(&uvc_cam.setfps, 0, sizeof(struct v4l2_streamparm));
    uvc_cam.setfps.type                                  = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    uvc_cam.setfps.parm.capture.timeperframe.numerator   = 1;
    uvc_cam.setfps.parm.capture.timeperframe.denominator = 25;

    ret = ioctl(uvc_cam.fd, VIDIOC_S_PARM, &uvc_cam.setfps);

    if (ret < 0) {
        printf("Unable to set frame rate\n");
        return -1;
    }
    else {
        printf("set fps OK!\n");
    }

    ret = ioctl(uvc_cam.fd, VIDIOC_G_PARM, &uvc_cam.setfps);

    if (ret < 0) {
        printf("Unable to get frame rate\n");
        return -1;
    }
    else {
        printf("get fps OK:\n");
        printf("timeperframe.numerator  : %d\n", uvc_cam.setfps.parm.capture.timeperframe.numerator);
        printf("timeperframe.denominator: %d\n", uvc_cam.setfps.parm.capture.timeperframe.denominator);
        printf("set fps : %d\n", 1 * uvc_cam.setfps.parm.capture.timeperframe.denominator / uvc_cam.setfps.parm.capture.timeperframe.numerator);
    }

    // 5. enum framesizes

    while (1) {
        struct v4l2_fmtdesc fmtdesc;
        memset(&fmtdesc, 0, sizeof(struct v4l2_fmtdesc));
        fmtdesc.index = i++;
        fmtdesc.type  = V4L2_BUF_TYPE_VIDEO_CAPTURE;

        if (ioctl(uvc_cam.fd, VIDIOC_ENUM_FMT, &fmtdesc) < 0) {
            break;
        }

        printf("Supported format: %s\n", fmtdesc.description);
        struct v4l2_frmsizeenum fsenum;
        memset(&fsenum, 0, sizeof(struct v4l2_frmsizeenum));
        fsenum.pixel_format = uvc_cam.fmtdesc.pixelformat;

        int j = 0;

        while (1) {
            fsenum.index = j;
            j++;

            if (ioctl(uvc_cam.fd, VIDIOC_ENUM_FRAMESIZES, &fsenum) == 0) {
                if (uvc_cam.fmt.fmt.pix.pixelformat == fmtdesc.pixelformat) {
                    printf("\tSupported size with the current format: %dx%d\n", fsenum.discrete.width, fsenum.discrete.height);
                }
                else {
                    printf("\tSupported size: %dx%d\n", fsenum.discrete.width, fsenum.discrete.height);
                }
            }
            else {
                break;
            }
        }
    }

    // 6. request buffers
    memset(&uvc_cam.rb, 0, sizeof(struct v4l2_requestbuffers));
    uvc_cam.rb.count  = NB_BUFFER;
    uvc_cam.rb.type   = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    uvc_cam.rb.memory = V4L2_MEMORY_MMAP;

    ret = ioctl(uvc_cam.fd, VIDIOC_REQBUFS, &uvc_cam.rb);

    if (ret < 0) {
        printf("Unable to allocate buffers\n");
        return -1;
    }

    // 6.1 map the buffers

    for (i = 0; i < NB_BUFFER; i++) {
        memset(&buf, 0, sizeof(struct v4l2_buffer));
        buf.index  = i;
        buf.type   = V4L2_BUF_TYPE_VIDEO_CAPTURE;
        buf.memory = V4L2_MEMORY_MMAP;

        ret = ioctl(uvc_cam.fd, VIDIOC_QUERYBUF, &buf);
        if (ret < 0) {
            printf("Unable to query buffer\n");
            return -1;
        }

        uvc_cam.mem[i] = mmap(NULL, buf.length, PROT_READ | PROT_WRITE, MAP_SHARED, uvc_cam.fd, buf.m.offset);
        if (uvc_cam.mem[i] == MAP_FAILED) {
            printf("Unable to map buffer\n");
            return -1;
        }
        uvc_cam.memlength[i] = buf.length;
    }


    // 6.2 queue the buffers.
    for (i = 0; i < NB_BUFFER; i++) {
        memset(&buf, 0, sizeof(struct v4l2_buffer));
        buf.index  = i;
        buf.type   = V4L2_BUF_TYPE_VIDEO_CAPTURE;
        buf.memory = V4L2_MEMORY_MMAP;
        ret        = ioctl(uvc_cam.fd, VIDIOC_QBUF, &buf);
        if (ret < 0) {
            printf("Unable to queue buffer\n");
            return -1;
        }
    }

    // 7. malloc yuyv buf
    uvc_cam.framesizeIn = uvc_cam.width * uvc_cam.height << 1; // w * h * 2
    uvc_cam.framebuffer = (unsigned char*)calloc(1, (size_t)uvc_cam.framesizeIn);

    if (uvc_cam.framebuffer == NULL) {
        printf("err calloc memory\n");
        return -1;
    }

    printf("init %s \t[OK]\n", uvc_cam.videodevice);

    return 0;
}

void v4l2_exit(void)
{
    free(uvc_cam.framebuffer);
    close(uvc_cam.fd);
}

int v4l2_enable(void)
{
    int type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    int ret;

    ret = ioctl(uvc_cam.fd, VIDIOC_STREAMON, &type);
    if (ret < 0) {
        printf("Unable to start capture\n");
        return ret;
    }

    printf("start capture\n");

    return 0;
}

int v4l2_disable(void)
{
    int type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    int ret;

    ret = ioctl(uvc_cam.fd, VIDIOC_STREAMOFF, &type);
    if (ret < 0) {
        printf("Unable to stop capture\n");
        return ret;
    }

    printf("stop capture\n");

    return 0;
}

int v4l2_uvc_grap(void)
{
    int                ret;
    struct v4l2_buffer buf;


    memset(&buf, 0, sizeof(struct v4l2_buffer));
    buf.type   = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    buf.memory = V4L2_MEMORY_MMAP;

    ret = ioctl(uvc_cam.fd, VIDIOC_DQBUF, &buf);
    if (ret < 0) {
        printf("Unable to dequeue buffer\n");
        exit(1);
    }

    memcpy(uvc_cam.framebuffer, uvc_cam.mem[buf.index], uvc_cam.framesizeIn);

    ioctl(uvc_cam.fd, VIDIOC_QBUF, &buf);

    printf("buf index: %d\n", buf.index);

    return 0;
}




int save_bmp(char* bmp_name)
{
    FILE*            fp;
    BITMAPFILEHEADER bf;
    BITMAPINFOHEADER bi;

    printf("save bmp  function\n");

    fp = fopen(bmp_name, "wb");
    if (fp == NULL) {
        printf("open errror\n");
        return (-1);
    }

    //Set BITMAPINFOHEADER
    memset(&bi, 0, sizeof(BITMAPINFOHEADER));
    bi.ciSize      = 40;
    bi.ciWidth     = IMAGEWIDTH;
    bi.ciHeight    = IMAGEHEIGHT;
    bi.ciPlanes    = 1;
    bi.ciBitCount  = 24;
    bi.ciSizeImage = IMAGEWIDTH * IMAGEHEIGHT * 3;


    //Set BITMAPFILEHEADER
    memset(&bf, 0, sizeof(BITMAPFILEHEADER));
    bf.cfType[0]  = 'B';
    bf.cfType[1]  = 'M';
    bf.cfSize     = 54 + bi.ciSizeImage;
    bf.cfReserved = 0;
    bf.cfoffBits  = 54;


    fwrite(&bf, 14, 1, fp);
    fwrite(&bi, 40, 1, fp);
    fwrite(rgb888_buffer, bi.ciSizeImage, 1, fp);

    printf("save %s done\n", bmp_name);

    fclose(fp);

    return 0;
}



int main(int argc, char const* argv[])
{
    char vdname[15];

    printf("\n----- v4l2 savebmp app start ----- \n");

    if (argc < 2) {

        printf("need:/dev/videox\n");
        printf("like:%s /dev/video1\n", argv[0]);

        printf("app exit.\n\n");
        exit(1);
    }

    snprintf(vdname, 12, argv[1]);

    memset(&uvc_cam, 0, sizeof(struct vdIn));
    uvc_cam.videodevice = vdname;
    printf("using: \t\t%s\n", uvc_cam.videodevice);


    uvc_cam.width  = _UVC_CAM_WIDTH;
    uvc_cam.height = _UVC_CAM_HEIGHT;

    // 1. init cam
    if (v4l2_init() < 0) {
        goto app_exit;
    }

    v4l2_enable();
    usleep(5 * 1000);

    // 2. grap uvc
    v4l2_uvc_grap();
    yuyv_to_rgb888();


    // 3. save bmp
    save_bmp("./uvc_grap.bmp");



app_exit:
    printf("app exit.\n\n");
    v4l2_exit();

    return 0;
}





/*************************** (C) COPYRIGHT 2020 ZYS ************END OF FILE****/


- 运行程序:

# ./av4l2grap-uvc-savebmp-x /dev/video1

----- v4l2 savebmp app start -----
using:          /dev/video1
driver:         uvcvideo
card:           Aoni HD Camera
bus_info:       usb-ci_hdrc.1-1.4
version:        262415
capabilities:   84200001
/dev/video1:    supports capture.
/dev/video1:    supports streaming.

Support format:
        1.MJPEG
        2.YUV 4:2:2 (YUYV)

fmt.type:               1
pix.pixelformat:        YUYV
pix.height:             480
pix.width:              640
pix.field:              1
set fps OK!
get fps OK:
timeperframe.numerator  : 1
timeperframe.denominator: 25
set fps : 25
Supported format: MJPEG
        Supported size: 640x480
        Supported size: 1280x720
        Supported size: 1184x656
        Supported size: 1024x576
        Supported size: 960x720
        Supported size: 960x540
        Supported size: 864x486
        Supported size: 800x600
        Supported size: 752x423
        Supported size: 640x360
        Supported size: 320x240
Supported format: YUV 4:2:2 (YUYV)
        Supported size with the current format: 640x480
        Supported size with the current format: 1280x720
        Supported size with the current format: 1184x656
        Supported size with the current format: 1024x576
        Supported size with the current format: 960x720
        Supported size with the current format: 960x540
        Supported size with the current format: 864x486
        Supported size with the current format: 800x600
        Supported size with the current format: 752x423
        Supported size with the current format: 640x360
        Supported size with the current format: 320x240
init /dev/video1        [OK]
start capture
buf index: 0
yuyv to rgb888 done
save bmp  function
save ./uvc_grap.bmp done
app exit.

- 拍照效果

拍屏幕效果不好,拍其它很清晰。

ubuntu-bmp.png

#65 NXP i.MX6UL/6ULL » [正点原子i.MX6UL] v4l2+framebuffer预览USB摄像头(一):采集拍照 » 2020-02-05 18:16:54

Jmhh247
回复: 6

关键字: 正点原子,i.MX6UL,v4l2, framebuffer


- 主机环境:ubuntu16.04-64bit
- 硬件版本:正点原子i.MX6UL emmc

固件帖在本站:[[正点原子i.MX6UL开发板] 编译uboot、linux、buildroot-rootfs](https://whycan.cn/t_3550.html)

---

### 开篇
2020年,注定是不平凡的一年,就当是纸老虎吧。
我遇到的第一个纸老虎是v4l2。
不能出门,就想着玩下USB摄像头,想实现的功能是在LCD屏上实时预览USB摄像头的画面。
搜资料,知道要用v4l2来驱动USB摄像头,第一个难点就是“v4l2”怎么读都不顺。。。
最终,跳过这个难点,确定了使用v4l2+framebuffer预览USB摄像头画面。
参考把“大象放进冰箱”,我决定把实现分成三步,以降低难度、建立信心。

本篇主要实现采集拍照。

### 正题

#### 一、相关概念
概念尽量简短不占篇幅,主要记录实践的过程。

- USB摄像头用的是UVC(USB Video Class)标准类,免驱。
- v4l2(Video for linux2)是linux提供的视频设备编程API。
- USB摄像头一般都支持输出YUV数据。
- YUV是一种颜色空间,通常需要转成RGB使用(bmp保存或LCD显示,等)。
- YUYV是YUV的一种,也叫YUV422。
- BMP图是RGB数据,上下颠倒存放的。

#### 二、操作分解
v4l2驱动USB摄像头的采集流程还是容易看明白,大致是:打开摄像头设置参数,申请设置缓冲区,然后从缓冲区每次读一帧即可。

##### s0.核心指令
v4l2 主要通过调用 ioctl 配合一系列 VIDIOC_XXXXXX 指令完成,很友好。

#include <sys/ioctl.h>
#include <linux/videodev2.h>

##### s1.打开摄像头
俗话说,一切皆文件。

#include <fcntl.h>

fd = open("/dev/videox", O_RDWR);

##### s2.获取属性

ioctl(fd, VIDIOC_QUERYCAP, &cap);

##### s3.设置参数
输出格式、分辨率、帧率等。

ioctl(fd, VIDIOC_S_FMT, &fmt);
ioctl(fd, VIDIOC_S_PARM, &setfps);

##### s4.设置缓冲区
- 简单理解就是配置FIFO(先进先出环形队列)。
- 映射到用户空间。
- 核心操作围绕struct v4l2_buffer结构体的index成员变量。

struct v4l2_buffer buf;

// 出队
ioctl(fd, VIDIOC_DQBUF, &buf);

// 入队
ioctl(fd, VIDIOC_QBUF, &buf);

##### s5.采集控制

int type = V4L2_BUF_TYPE_VIDEO_CAPTURE;

// 启动采集
ioctl (fd, VIDIOC_STREAMON, &type);

// 停止采集
ioctl (fd, VIDIOC_STREAMOFF, &type);

##### s6.采集一帧

ioctl(fd, VIDIOC_DQBUF, &buf);

##### s7.视频处理
转换成RGB,然后保存成BMP图片实现拍照。


#### 三、代码实现

主要参考了开源项目MJPG-streamer的v4l2采集代码,完全手打。

- 代码1

本代码主要实现了获取USB相机的信息,相当于v4l2版的"hello world"。

/*
 * @FilePath: /v4l2-fb-uvc-code/v4l2grap-uvc-getinfo.c
 * @Version: 1.0.0
 * @Author: zys
 * @LastAuthor   : zys
 * @CreationDate: 2020-02-04 11:33:25
 * @LastEditTime : 2020-02-05 17:57:18
 * @Description :  获取USB相机的信息,相当于v4l2版的"hello world"。
 */


/*----------------------------------------------------------------------------*/
/* change log ----------------------------------------------------------------*/
/*
    
    -0205
     获取USB相机信息 ok.
*/



/*----------------------------------------------------------------------------*/
/* Includes ------------------------------------------------------------------*/
#include <fcntl.h>
#include <linux/videodev2.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>

/* Private define ------------------------------------------------------------*/
#define _UVC_CAM_HEIGHT (680)
#define _UVC_CAM_WIDTH  (480)
/* Private macro -------------------------------------------------------------*/
/* Private typedef -----------------------------------------------------------*/
struct vdIn {
    int   fd;
    char* videodevice;

    // v4l2
    struct v4l2_capability     cap;
    struct v4l2_format         fmt;
    struct v4l2_fmtdesc        fmtdesc;
    struct v4l2_streamparm     setfps;
    struct v4l2_requestbuffers rb;

    int width;
    int height;
    int fps;
};

/* Private function prototypes -----------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
static struct vdIn uvc_cam;

/* Global  variables ---------------------------------------------------------*/
/* Private functions ---------------------------------------------------------*/



int v4l2_init(void)
{
    int ret;


    // 1. open cam
    if ((uvc_cam.fd = open(uvc_cam.videodevice, O_RDWR)) == -1) {
        printf("ERROR opening V4L interface\n");
        return -1;
    }

    // 2. querycap
    memset(&uvc_cam.cap, 0, sizeof(struct v4l2_capability));
    ret = ioctl(uvc_cam.fd, VIDIOC_QUERYCAP, &uvc_cam.cap);

    if (ret < 0) {
        printf("Error opening device %s: unable to query device.\n", uvc_cam.videodevice);
        return -1;
    }
    else {
        printf("driver:\t\t%s\n", uvc_cam.cap.driver);
        printf("card:\t\t%s\n", uvc_cam.cap.card);
        printf("bus_info:\t%s\n", uvc_cam.cap.bus_info);
        printf("version:\t%d\n", uvc_cam.cap.version);
        printf("capabilities:\t%x\n", uvc_cam.cap.capabilities);

        if ((uvc_cam.cap.capabilities & V4L2_CAP_VIDEO_CAPTURE) == V4L2_CAP_VIDEO_CAPTURE) {
            printf("%s: \tsupports capture.\n", uvc_cam.videodevice);
        }

        if ((uvc_cam.cap.capabilities & V4L2_CAP_STREAMING) == V4L2_CAP_STREAMING) {
            printf("%s: \tsupports streaming.\n", uvc_cam.videodevice);
        }
    }

    // 3. set format in

    // 3.1 enum fmt
    printf("\nSupport format:\n");

    memset(&uvc_cam.fmtdesc, 0, sizeof(struct v4l2_fmtdesc));
    uvc_cam.fmtdesc.index = 0;
    uvc_cam.fmtdesc.type  = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    while (ioctl(uvc_cam.fd, VIDIOC_ENUM_FMT, &uvc_cam.fmtdesc) != -1) {
        printf("\t%d.%s\n", uvc_cam.fmtdesc.index + 1, uvc_cam.fmtdesc.description);
        uvc_cam.fmtdesc.index++;
    }

    // 3.2 set fmt
    memset(&uvc_cam.fmt, 0, sizeof(struct v4l2_format));
    uvc_cam.fmt.type                = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    uvc_cam.fmt.fmt.pix.width       = uvc_cam.width;
    uvc_cam.fmt.fmt.pix.height      = uvc_cam.height;
    uvc_cam.fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV;
    uvc_cam.fmt.fmt.pix.field       = V4L2_FIELD_ANY;

    ret = ioctl(uvc_cam.fd, VIDIOC_S_FMT, &uvc_cam.fmt);
    if (ret < 0) {
        printf("Unable to set format\n");
        return -1;
    }

    // 3.3 get fmt
    ret = ioctl(uvc_cam.fd, VIDIOC_G_FMT, &uvc_cam.fmt);
    if (ret < 0) {
        printf("Unable to get format\n");
        return -1;
    }
    else {
        printf("\nfmt.type:\t\t%d\n", uvc_cam.fmt.type);
        printf("pix.pixelformat:\t%c%c%c%c\n", uvc_cam.fmt.fmt.pix.pixelformat & 0xFF, (uvc_cam.fmt.fmt.pix.pixelformat >> 8) & 0xFF, (uvc_cam.fmt.fmt.pix.pixelformat >> 16) & 0xFF, (uvc_cam.fmt.fmt.pix.pixelformat >> 24) & 0xFF);
        printf("pix.height:\t\t%d\n", uvc_cam.fmt.fmt.pix.height);
        printf("pix.width:\t\t%d\n", uvc_cam.fmt.fmt.pix.width);
        printf("pix.field:\t\t%d\n", uvc_cam.fmt.fmt.pix.field);
    }


    // 4. set fps
    memset(&uvc_cam.setfps, 0, sizeof(struct v4l2_streamparm));
    uvc_cam.setfps.type                                  = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    uvc_cam.setfps.parm.capture.timeperframe.numerator   = 1;
    uvc_cam.setfps.parm.capture.timeperframe.denominator = 25;

    ret = ioctl(uvc_cam.fd, VIDIOC_S_PARM, &uvc_cam.setfps);

    if (ret < 0) {
        printf("Unable to set frame rate\n");
        return -1;
    }
    else {
        printf("set fps OK!\n");
    }

    ret = ioctl(uvc_cam.fd, VIDIOC_G_PARM, &uvc_cam.setfps);

    if (ret < 0) {
        printf("Unable to get frame rate\n");
        return -1;
    }
    else {
        printf("get fps OK:\n");
        printf("timeperframe.numerator  : %d\n", uvc_cam.setfps.parm.capture.timeperframe.numerator);
        printf("timeperframe.denominator: %d\n", uvc_cam.setfps.parm.capture.timeperframe.denominator);
        printf("set fps : %d\n", 1 * uvc_cam.setfps.parm.capture.timeperframe.denominator / uvc_cam.setfps.parm.capture.timeperframe.numerator);
    }

    // 5. enum framesizes
    int i = 0;

    while (1) {
        struct v4l2_fmtdesc fmtdesc;
        memset(&fmtdesc, 0, sizeof(struct v4l2_fmtdesc));
        fmtdesc.index = i++;
        fmtdesc.type  = V4L2_BUF_TYPE_VIDEO_CAPTURE;

        if (ioctl(uvc_cam.fd, VIDIOC_ENUM_FMT, &fmtdesc) < 0) {
            break;
        }

        printf("Supported format: %s\n", fmtdesc.description);
        struct v4l2_frmsizeenum fsenum;
        memset(&fsenum, 0, sizeof(struct v4l2_frmsizeenum));
        fsenum.pixel_format = uvc_cam.fmtdesc.pixelformat;

        int j = 0;

        while (1) {
            fsenum.index = j;
            j++;

            if (ioctl(uvc_cam.fd, VIDIOC_ENUM_FRAMESIZES, &fsenum) == 0) {
                if (uvc_cam.fmt.fmt.pix.pixelformat == fmtdesc.pixelformat) {
                    printf("\tSupported size with the current format: %dx%d\n", fsenum.discrete.width, fsenum.discrete.height);
                }
                else {
                    printf("\tSupported size: %dx%d\n", fsenum.discrete.width, fsenum.discrete.height);
                }
            }
            else {
                break;
            }
        }
    }


    printf("init %s \t[OK]\n", uvc_cam.videodevice);

    return 0;
}

void v4l2_exit(void)
{
    close(uvc_cam.fd);
}


int main(int argc, char const* argv[])
{
    char vdname[15];

    printf("\n----- v4l2 app start ----- \n");

    if (argc < 2) {

        printf("need:/dev/videox\n");
        printf("like:./av4l2grap-uvc-x /dev/video1\n");
        printf("app exit.\n\n");
        exit(1);
    }

    snprintf(vdname, 12, argv[1]);

    memset(&uvc_cam, 0, sizeof(struct vdIn));
    uvc_cam.videodevice = vdname;
    printf("using: \t\t%s\n", uvc_cam.videodevice);


    uvc_cam.width  = _UVC_CAM_WIDTH;
    uvc_cam.height = _UVC_CAM_HEIGHT;

    if (v4l2_init() < 0) {
        goto app_exit;
    }

app_exit:
    printf("app exit.\n\n");
    v4l2_exit();

    return 0;
}





/*************************** (C) COPYRIGHT 2020 ZYS ************END OF FILE****/

- 代码2

拍照代码还未实现,后续会更新上~

#### 四、测试程序

- 编译程序

arm-buildroot-linux-gnueabihf-gcc -o av4l2grap-uvc-getinfo-x v4l2grap-uvc-getinfo.c

- 确认开发板的USB相机设备号

重要:记得插上USB相机!

# ls /dev/video*
/dev/video0  /dev/video1  /dev/video2
# cat /sys/class/video4linux/video1/name
Aoni HD Camera
#

- 运行程序

先把程序复制到开发板,推荐用NFS。

运行程序:

# ./av4l2grap-uvc-getinfo-x /dev/video1

----- v4l2 app start -----
using:          /dev/video1
driver:         uvcvideo
card:           Aoni HD Camera
bus_info:       usb-ci_hdrc.1-1.4
version:        262415
capabilities:   84200001
/dev/video1:    supports capture.
/dev/video1:    supports streaming.

Support format:
        1.MJPEG
        2.YUV 4:2:2 (YUYV)

fmt.type:               1
pix.pixelformat:        YUYV
pix.height:             480
pix.width:              640
pix.field:              1
set fps OK!
get fps OK:
timeperframe.numerator  : 1
timeperframe.denominator: 25
set fps : 25
Supported format: MJPEG
        Supported size: 640x480
        Supported size: 1280x720
        Supported size: 1184x656
        Supported size: 1024x576
        Supported size: 960x720
        Supported size: 960x540
        Supported size: 864x486
        Supported size: 800x600
        Supported size: 752x423
        Supported size: 640x360
        Supported size: 320x240
Supported format: YUV 4:2:2 (YUYV)
        Supported size with the current format: 640x480
        Supported size with the current format: 1280x720
        Supported size with the current format: 1184x656
        Supported size with the current format: 1024x576
        Supported size with the current format: 960x720
        Supported size with the current format: 960x540
        Supported size with the current format: 864x486
        Supported size with the current format: 800x600
        Supported size with the current format: 752x423
        Supported size with the current format: 640x360
        Supported size with the current format: 320x240
init /dev/video1        [OK]
app exit.

#

#68 Re: NXP i.MX6UL/6ULL » 请教,交叉编译器gcc和文件系统里的gcc是一回事吗? » 2020-01-15 10:32:25

有区别,但是可以用。

楼主用stm32吗,就像你用KEIL4和KEIL5都可以编译stm32的程序,虽然两者的版本不一样。。。宏观上差不多可以这样理解~


Gentlepig 说:

那,两个Gcc版本不一致也没事?

#69 Re: NXP i.MX6UL/6ULL » 请教,交叉编译器gcc和文件系统里的gcc是一回事吗? » 2020-01-15 10:05:40

- 内核里面没有gcc
- 一共有两个交叉工具链
- 7.4.0是你在ubuntu的交叉工具链,是在ubuntu上用的。
- 根文件系统里面的gcc,是在开发板上用的。
- 两个gcc都可以编译linux程序,然后在开发板上运行。

你仔细想想,差不多是一回事,又不是一回事。

#70 Re: NXP i.MX6UL/6ULL » [正点原子i.MX6UL开发板] 编译uboot、linux、buildroot-rootfs » 2020-01-14 11:04:01

- 打开声卡操作

音量
# tinymix set 12 110

右声道
# tinymix set 43 1

左声道
# tinymix set 50 1

#71 NXP i.MX6UL/6ULL » [正点原子i.MX6UL开发板] 编译uboot、linux、buildroot-rootfs » 2020-01-10 15:16:59

Jmhh247
回复: 6

关键字: 正点原子,i.MX6UL,linux, buildroot


- 主机环境:ubuntu16.04-64bit
- 硬件版本:正点原子i.MX6UL emmc



官方似乎没有提供 github ,所以相关代码、工具需要去论坛下载:

- 正点原子官方资料页:- [ 【Linux视频文档发布】正点原子150讲视频+1500页Linux教程发布,配套Alpha Linux开发板,请赶紧下载学习  ](http://www.openedv.com/thread-300792-1-1.html)



#### 友情提示:
百度云下载慢怎么办,不怕:配合本站免费提供的账号,可以享受尊贵的会员服务,详情点这里-- https://whycan.cn/t_3291.html

---



### 一、用buildroot制作根文件系统

- 出厂根文件系统用的是yocto,制作太难了。
- 用buildroot相对简单,相关支持可能不如yocto。
- 先制作根文件系统的目的是生成工具链。


使用buildroot2017,这里下载:buildroot-2017_08_1_tar.gz



##### s1. 解压

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

```

##### s2. 配置

```
cd buildroot-2017.08.1/

make menuconfig
```

控制篇幅只列出部分,这里有个参考配置(不是压缩文件,需要改名为.config):yz_imx6u_buildroot2017-v1_config.rar

```
    Target Architecture (ARM (little endian))  --->              
  │ │        Target Binary Format (ELF)  --->                             │ │  
  │ │        Target Architecture Variant (cortex-A7)  --->                │ │  
  │ │        Target ABI (EABIhf)  --->                                    │ │  
  │ │        Floating point strategy (NEON/VFPv4)  --->                   │ │  
  │ │        ARM instruction set (ARM)  --->                              │ │  
```
```
           Toolchain type (Buildroot toolchain)  --->                                │ │  
  │ │            *** Toolchain Buildroot Options ***                                       │ │  
  │ │        (buildroot) custom toolchain vendor name (NEW)                                │ │  
  │ │            C library (glibc)  --->                                                   │ │  
  │ │            *** Kernel Header Options ***                                             │ │  
  │ │            Kernel Headers (Linux 4.1.x kernel headers)  --->                         │ │  
  │ │            *** Binutils Options ***                                                  │ │  
  │ │            Binutils Version (binutils 2.28.1)  --->                                  │ │  
  │ │        ()  Additional binutils options (NEW)                                         │ │  
  │ │            *** GCC Options ***                                                       │ │  
  │ │            GCC compiler Version (gcc 6.x)  --->                                      │ │  
  │ │        ()  Additional gcc options (NEW)                                              │ │  
  │ │        [*] Enable C++ support                                                        │ │  
  │ │        [ ] Enable Fortran support (NEW)                                              │ │  
  │ │        [ ] Enable compiler link-time-optimization support (NEW)                      │ │  
  │ │        [ ] Enable compiler OpenMP support (NEW)                                      │ │  
  │ │        [ ] Enable graphite support (NEW)                                             │ │  
  │ │            *** Host GDB Options ***                                                  │ │  
  │ │        [*] Build cross gdb for the host                                              │ │  
  │ │        [ ]   TUI support (NEW)                                                       │ │  
  │ │        [ ]   Python support (NEW)                                                    │ │  
  │ │        [ ]   Simulator support (NEW)                                                 │ │  
  │ │              GDB debugger Version (gdb 7.11.x)  --->                                 │ │  
  │ │            *** Toolchain Generic Options ***                                         │ │  
  │ │        [ ] Copy gconv libraries (NEW)                                                │ │  
  │ │        [*] Enable MMU support (NEW)                                                  │ │  
  │ │        ()  Target Optimizations (NEW)                                                │ │  
  │ │        ()  Target linker options (NEW)                                               │ │  
  │ │        [ ] Register toolchain within Eclipse Buildroot plug-in (NEW)   
```

##### s3. 编译

```
time make
```

- 编译的根文件系统在这里:buildroot-2017.08.1/output/images/rootfs.tar


- 工具链位置在这里:buildroot-2017.08.1/output/host/bin/arm-buildroot-linux-gnueabihf-


##### s4. 工具链设置脚本

- 方便后面编译uboot、linux,写一个脚本。
- 脚本是临时有效的,每次编译时先执行此脚本。


build-set-yz-imx6ul-env.sh 实现:

```
#! /bin/sh

echo "set env"
export PATH=$PATH:/home/vmtest/work/yuanzi/code-build/rootfs/buildroot-2017.08.1/output/host/bin
export ARCH=arm
export CROSS_COMPILE=arm-buildroot-linux-gnueabihf-

echo "done"
```

---
### 二、编译u-boot

u-boot源码在:阿尔法Linux开发板光盘资料(A盘)\1、例程源码\11、开发板教程对应的uboot和linux源码里面

##### s1. 复制 uboot-imx-rel_imx_4.1.15_2.1.0_ga_alientek.tar.bz2 到 ubuntu16

```
# 新建目录,复制到这里
mkdir uboot
```

##### s2. 解压

```
cd uboot
tar xjvf uboot-imx-2016.03-2.1.0-gd9420c3-v1.1.tar.bz2
```

##### s3. 编译

```
# 1.脚本配置工具链
source build-set-yz-imx6ul-env.sh

# 2.配置uboot
make distclean
make mx6ull_14x14_ddr512_emmc_defconfig

# 3.编译
make all -j6

# 4.改名
mv u-boot.imx u-boot-imx6ull-14x14-ddr512-emmc.imx

```

最终得到 u-boot-imx6ull-14x14-ddr512-emmc.imx.



---
### 三、编译linux
linux源码在:阿尔法Linux开发板光盘资料(A盘)\1、例程源码\11、开发板教程对应的uboot和linux源码里面

##### s1. 复制 linux-imx-4.1.15-2.1.0-gbedf008-v1.1.tar.bz2 到 ubuntu16

```
# 新建目录,复制到这里
mkdir linux
```

##### s2. 解压

```
cd linux
tar xjvf linux-imx-4.1.15-2.1.0-gbedf008-v1.1.tar.bz2
```

##### s3. 编译

- 编译前先安装 lzop

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

- 编译linux

```
# 1.脚本配置工具链
source build-set-yz-imx6ul-env.sh

# 2.配置内核
make distclean
make imx_v7_defconfig

# 3.编译
time make -j6
make -j6 imx6ull-14x14-emmc-7-1024x600-c.dtb

# 4.安装模块
rm -rf m_out
mkdir m_out

make -j6 modules_install INSTALL_MOD_PATH="./m_out"
```
- 打包模块

mfgtool需要用到。
```
cd m_out/lib/modules/
sudo tar cjvf ../modules.tar.bz2 .
```

##### 生成相关文件位置:

- 内  核:arch/arm/boot/zImage
- 模  块:m_out/lib/modules.tar.bz2
- 设备树:arch/arm/boot/dts/imx6ull-14x14-emmc-7-1024x600-c.dtb

---
### 四、打包rootfs

##### s1.汇总前面得到相关文件到一个目录内,如下:

```
.
├── imx6ull-14x14-emmc-7-1024x600-c.dtb
├── modules.tar.bz2
├── pack_yz_imx6ul_rootfs-v1.sh
├── rootfs.tar
├── u-boot-imx6ull-14x14-ddr512-emmc.imx
└── zImage

0 directories, 6 files

```

其中,pack_yz_imx6ul_rootfs-v1.sh是个脚本,目的是处理成mfgtool需要的格式,很简单,内容如下:

```
#! /bin/sh

echo "s1: start pack..."
rm -rf imx6ul_rootfs
mkdir -p imx6ul_rootfs/rootfs

rm -f rootfs.tar.bz2


echo "s2: tar xf rootfs.tar..."
tar xf rootfs.tar -C imx6ul_rootfs/rootfs/
mkdir imx6ul_rootfs/rootfs/lib/modules
sync

echo "s3: tar xjf rootfs.tar.bz2..."
cd imx6ul_rootfs/rootfs
tar cjf ../rootfs.tar.bz2 .
sync

cd ..
cd ..

echo "s4: cp rootfs.tar.bz2..."

cp imx6ul_rootfs/rootfs.tar.bz2 ./
sync

rm -rf imx6ul_rootfs

echo "pack done."

```

##### s2. 执行脚本

```
vmtest@linux-test:~/work/yuanzi/code-build/bin-bak$ sudo ./pack_yz_imx6ul_rootfs-v1.sh 
s1: start pack...
s2: tar xf rootfs.tar...
s3: tar xjf rootfs.tar.bz2...
s4: cp rootfs.tar.bz2...
pack done.
vmtest@linux-test:~/work/yuanzi/code-build/bin-bak$ 

```

执行脚本后得到 rootfs.tar.bz2。

```
.
├── imx6ull-14x14-emmc-7-1024x600-c.dtb
├── modules.tar.bz2
├── pack_yz_imx6ul_rootfs-v1.sh
├── rootfs.tar
├── rootfs.tar.bz2
├── u-boot-imx6ull-14x14-ddr512-emmc.imx
└── zImage

0 directories, 7 files

```

到这里,所需要的文件都准备好了,可以召唤神龙了 可以烧录到emmc了。


---
### 五、烧录固件到emmc

- 在win10下操作。
- mfgtoo位置:阿尔法Linux开发板光盘资料(A盘)\5、开发工具\4、正点原子修改过的MFG_TOOL烧写工具


##### s1.替换相关文件

```
#1
modules.tar.bz2 复制到 mfgtool\Profiles\Linux\OS Firmware\files\modules

#2
rootfs.tar.bz2 复制到 mfgtool\Profiles\Linux\OS Firmware\files\filesystem

#3 
uboot、zImage、dtb 复制 mfgtool\Profiles\Linux\OS Firmware\files\boot
```

##### s2.烧录固件
烧录过程和正常烧录一样,控制篇幅不再列出,可参考官方文档或者这个帖子-[ [正点原子i.MX6UL开发板] 开箱与固件烧录](https://whycan.cn/t_3521.html).


---

### 六、编译qt例程
qt自带例程的编译可以参考晕哥这个视频:- [buildroot成功后如何编译Qt应用程序]( https://www.bilibili.com/video/av16396112/)

看log或许更直观:

```
vmtest@linux-test:~/work/yuanzi/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/examples/widgets/widgets/analogclock$ pwd
/home/vmtest/work/yuanzi/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/examples/widgets/widgets/analogclock
vmtest@linux-test:~/work/yuanzi/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/yuanzi/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/examples/widgets/widgets/analogclock$ /home/vmtest/work/yuanzi/
code-build/rootfs/buildroot-2017.08.1/output/host/bin/qmake analogclock.pro 
vmtest@linux-test:~/work/yuanzi/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/examples/widgets/widgets/analogclock$ time make
/home/vmtest/work/yuanzi/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/yuanzi/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/yuanzi/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/yuanzi/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/yuanzi/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/yuanzi/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 /home/vmtest/work/yuanzi/code-build/rootfs/buildroot-2017.08.1/output/host/mkspecs/features/data/dummy.cpp
/home/vmtest/work/yuanzi/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/yuanzi/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/mkspecs/devices/linux-buildroot-g++ -I/home/vmtest/work/yuanzi/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/examples/widgets/widgets/analogclock -I/home/vmtest/work/yuanzi/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/include -I/home/vmtest/work/yuanzi/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/include/QtWidgets -I/home/vmtest/work/yuanzi/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/include/QtGui -I/home/vmtest/work/yuanzi/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/include/QtCore -I/home/vmtest/work/yuanzi/code-build/rootfs/buildroot-2017.08.1/output/host/arm-buildroot-linux-gnueabihf/include/c++/6.4.0 -I/home/vmtest/work/yuanzi/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/yuanzi/code-build/rootfs/buildroot-2017.08.1/output/host/arm-buildroot-linux-gnueabihf/include/c++/6.4.0/backward -I/home/vmtest/work/yuanzi/code-build/rootfs/buildroot-2017.08.1/output/host/lib/gcc/arm-buildroot-linux-gnueabihf/6.4.0/include -I/home/vmtest/work/yuanzi/code-build/rootfs/buildroot-2017.08.1/output/host/lib/gcc/arm-buildroot-linux-gnueabihf/6.4.0/include-fixed -I/home/vmtest/work/yuanzi/code-build/rootfs/buildroot-2017.08.1/output/host/arm-buildroot-linux-gnueabihf/include -I/home/vmtest/work/yuanzi/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/yuanzi/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/yuanzi/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/yuanzi/code-build/rootfs/buildroot-2017.08.1/output/host/bin/arm-buildroot-linux-gnueabihf-g++ --sysroot=/home/vmtest/work/yuanzi/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/yuanzi/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/lib -lQt5Widgets -lQt5Gui -lQt5Core -lrt -ldl -latomic -lpthread 

real	0m5.039s
user	0m2.604s
sys	0m0.948s
vmtest@linux-test:~/work/yuanzi/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/yuanzi/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/yuanzi/code-build/rootfs/buildroot-2017.08.1/output/build/qt5base-5.9.1/examples/widgets/widgets/analogclock$ 
```

  ana.png

#72 Re: NXP i.MX6UL/6ULL » 请教,安装mfgtools for linux报错。 » 2020-01-10 08:41:15

有点懵,野火的板子为啥用原子的mfgtools。。。


Gentlepig 说:

我买的是野火的mini板。
原子的资料要从网盘下,4G多,我这里下载速度才100K/s,要五六个小时。
费劲从nxp官网下载了mfgtools,结果运行后,连不上板子...

手头又没tf卡了,3个卡都格式化不聊了,悲催。

#74 Re: NXP i.MX6UL/6ULL » 请教,安装mfgtools for linux报错。 » 2020-01-09 15:27:02

问题不大,win10下的mfgtool烧回出厂固件,继续折腾~


Gentlepig 说:

玩死了...
本来想重启板子,应该输入reboot,结果忘记命令了,输了几次reset,后来重启后,进不去系统了,串口没有调试信息了。
拨码开关设到usb模式,结果启动后串口也没调试信息,而且用uuu -lsusb命令,也查不到设备了...

#75 Re: NXP i.MX6UL/6ULL » 请教,安装mfgtools for linux报错。 » 2020-01-07 15:57:43

为楼主的钻研精神点赞,话说win下面的mfgtool不香吗

只要不变砖,mfgtool几乎用不到了,楼主可以把时间花在应用上。

只是建议,当然多折腾也是收获。

#76 Re: NXP i.MX6UL/6ULL » [正点原子i.MX6UL开发板] 开箱与固件烧录 » 2020-01-07 14:10:43

calc-ok.gif

触摸终于好了,原来是配置的锅, 现在你想怎么摸,就怎么摸。


下面的配置ok:


export QT_ROOT=/usr/lib/qt
export TSLIB_ROOT=/usr/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event1
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_CALIBFILE=/etc/pointercal
export QT_QPA_GENERIC_PLUGINS=tslib:/dev/input/event1
export QT_QPA_FONTDIR=/usr/share/fonts
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
export QT_QPA_PLATFORM=linuxfb:tty=/dev/fb0
export QT_PLUGIN_PATH=$QT_ROOT/plugins
export LD_LIBRARY_PATH=$QT_ROOT/lib:$QT_ROOT/plugins/platforms
export QT_QPA_FB_TSLIB=1

#77 Re: NXP i.MX6UL/6ULL » [正点原子i.MX6UL开发板] 开箱与固件烧录 » 2020-01-07 08:45:48

达克罗德 说:

qt 顺畅吗?

demo运行还可以,但总感觉哪里有点问题(似乎是触摸不准还是程序原因),有时间我自己写个程序试试

#78 NXP i.MX6UL/6ULL » [正点原子i.MX6UL开发板] 开箱与固件烧录 » 2020-01-06 17:52:42

Jmhh247
回复: 8

关键字: 正点原子,i.MX6UL,linux


- 主机环境:ubuntu16.04-64bit
- 硬件版本:正点原子i.MX6UL emmc


首先,要感谢晕哥,免费提供了<正点原子i.MX6UL开发板>试玩,真香!

由于是全新未拆的,所以我决定水一帖开箱。

- 正点原子官方资料页:- [ 【Linux视频文档发布】正点原子150讲视频+1500页Linux教程发布,配套Alpha Linux开发板,请赶紧下载学习  ](http://www.openedv.com/thread-300792-1-1.html)

---

### 一、简单开箱

人狠话不多,先上几张图

- 包装
1.png

- 内部
2.png

- 启动
qt-demo.png



出厂自带qt-demo看着挺不错,每个功能的“返回”是需要下拉屏幕边缘的,简单点说,这个操作用起来是生不如死

好在官方有提供新固件,为每个app的功能都提供了一个“返回”按钮,赶紧烧个新固件吧~

---
### 二、固件烧录

1. 去官方资料页里下载A盘的资料包
2. 在资料包的“开发工具”里面找到-正点原子修改过的MFG_TOOL烧写工具
3. 解压后双击-Mfgtool2-eMMC-ddr512-eMMC.vbs 启动烧写工具
4. 找根USB线接到开发板USB-OTG和电脑
5. 设置开发板拨码开关为:0100 0000
6. 上电,烧写工具会提示“符合厂商HID设备”
7. 点击“start”,开始烧录(此时串口也会输出信息)
8. 需要漫长的10多分钟,等待烧录完成。


新固件的界面是这样的(看样子是换了个不同口味的美工):

new-qt.png

烧个固件要等10多分钟,赶紧试试NFS挂载吧~

---
### 三、NFS挂载根文件系统

这里只用NFS挂载根文件系统,其它的kernel,dtb等都用出厂的。

根文件系统是我用buildroot做的,功能不重要,目的是测试NFS挂载。


##### 进入uboot命令行设置启动参数:

- 设置 bootargs

```
setenv bootargs "console=${console},${baudrate} root=/dev/nfs ip=172.16.1.100:172.16.1.33:172.16.1.1:255.255.0.0:imx6ull:eth0:off rw nfsroot=172.16.1.33:/nfsroot/imx6ull-nfs/buildroot2017-rootfs";saveenv

```

- 设置 bootcmd

```
setenv bootcmd “mmc dev 1;mmc dev 1; mmc rescan;fatload mmc 1 0x80800000 zImage;fatload mmc 1 0x83000000 imx6ull-14x14-evk.dtb;bootz 0x80800000 - 0x83000000”;saveenv
```

bootcmd 设置后,开发板自动从NFS启动。


- 截图

nfs-buildroot.png

calc.png

---

遇到的问题:运行qt例程发现触摸不能用——摸都不让摸,还有王法么~

今天先到这里。

#79 Re: ESP32/ESP8266 » 发个羊毛(ESP32-Audio-Kit)59包邮 » 2019-12-30 16:16:47

“没人限购5pcs”,这么走心。。。

#80 Re: 华芯微特 » 【Whycan 第一帖-感谢晕哥】芯跳不止---------关于国产华芯微特32位MCU的梦想及快乐 » 2019-12-24 17:25:46

楼主,我就问下新坛开张有给力的活动吗。。。没的话,我改天再来问

#81 Re: 全志 SOC » 使用Buildroot编译出来的Qmake编译异常求解。 » 2019-12-23 17:11:44

楼主的问题解决了么


没的话试试 (不确定是否有用):
1. 把qt5.x目录下面的.stam开头的隐藏文件,除了download,都删除掉。
2. 重新执行make。

#82 Re: 全志 SOC » 新人第一帖,发个S3的核心板(AXP209+S3) » 2019-12-20 15:14:03

请问,左下角那个是手动绕的电感吗,是的话这操作可以封神了!。。。

#83 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 《VMWare 使用分享》之三 "磁盘压缩" (disk shrink) 编写中... » 2019-12-20 15:09:23

明白了,

贴一个我自己写的脚本,我一直用它来清除ubuntu和win10之间复制的缓存数据:

!!!重要(我用的是vmware + ubuntu16 64bit,其它版本未测试过 )

#! /bin/sh

cd ~
cd .cache/vmware/drag_and_drop/
rm -fr *



晕哥 说:

只适合有大量删除文件的情况。




感谢分享!

#84 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 《VMWare 使用分享》之三 "磁盘压缩" (disk shrink) 编写中... » 2019-12-20 08:34:03

厉害了,差不多四分之一,回头也试试


好想做个有钱人 说:

搞定.

起床第一件事看了虚拟机文件夹, 已经缩减到 160G 左右了, 一共收缩了约50G.

#86 Re: 全志 SOC » v3s bsp用opencv使用摄像头失败 » 2019-12-18 08:34:35

感谢指点,回头试试


太一酱鸭 说:

你的依赖没有勾选,你看到depend on了吗,所有的选项都必须是Y

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    // read an image
    cv::Mat image = cv::imread("1.jpg", 1);
    // create image window named "My Image"
    cv::namedWindow("My Image 2019");
    // show the image on window
    cv::imshow("My Image2019", image);
}

#87 Re: 全志 SOC » v3s bsp用opencv使用摄像头失败 » 2019-12-17 16:11:24

确实用到了cvNameWindow,程序只有简单几行:

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    // read an image
    cv::Mat image = cv::imread("1.jpg", 1);
    // create image window named "My Image"
    cv::namedWindow("My Image 2019");
    // show the image on window
    cv::imshow("My Image2019", image);
}


这个 libgtk很尴尬,我也看到错误提示,但是buildroot里面根本找不到  libgtk2.0 !  ...可能是我姿势不对吧

下面我截个图
---
- buildroot里面可以搜索到 libgtk2:
serlibg.png

- 实际去选择找不到,也没任何依赖提示
lib2err.png


你能找到libgtk2吗

#88 Re: 全志 SOC » v3s bsp用opencv使用摄像头失败 » 2019-12-17 15:00:36

请教,你用buildroot哪个版本

buildroot里面的opencv,需要特别配置吗,我配置不成功


我试过buildroot2017 编译opencv,程序可以编译通过,但是放在v3s运行会出错:

# ./testopencv
OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow, file /home/vmzys/work/2019/my_imx6ul/code-build/rootfs/buildroot-2017.08.1/output/build/opencv3-3.2.0/modules/highgui/src/window.cpp, line 565
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/vmzys/work/2019/my_imx6ul/code-build/rootfs/buildroot-2017.08.1/output/build/opencv3-3.2.0/modules/highgui/src/window.cpp:565: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvNamedWindow

Aborted
#







太一酱鸭 说:

来反馈一下后续情况,并没有成功使用,最后还是v4l2底层调用获取图片了,bsp驱动并不能和opencv匹配。
只能将目前发现的问题暂时和大家分享一下。
1、必须指定vidioc_s_input设置,opencv只做了g_input。
2、我的摄像头驱动即使设置了不支持的格式也不会返回错误,cap_v4l会一开始就尝试设置这个格式,返回错误才接着设置其他格式。摄像头并不支持BGR24但没有返回错误导致最后取不到帧或者帧全黑。
但是这里我即使注释掉其余的把摄像头帧格式设置成UYVY(cap_v4l会自行做UYVY_TO_BGR的转换),获取到的图片会有四小块且是绿色的。目前找不到错误在哪,所以直接放弃更改cap_v4l.cpp。
注:之前我勾选了buildroot里的libv4l,opencv就会编译cap_libv4l.cpp来进行v4l2调用,不推荐这个,因为这个只支持bgr24没有格式转换代码。

#90 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » emWin中,在有背景图的对话框上绘制2D图形,2D图形无法显示,是什么原因呢?谢谢! » 2019-12-05 11:08:46

给你一个参考:

- 代码片断

    case WM_PAINT:

        // 背景
        GUI_DrawBitmap(&bmscar1, 0, 0);

        // 圆角矩形
        WM_GetClientRect(&rect);
        GUI_SetColor(GUI_GREEN);
        tmp = 10;
        GUI_SetPenSize(7);
        GUI_AA_DrawRoundedRect(rect.x0+tmp, rect.y0+tmp, rect.x1-tmp, rect.y1-tmp, 8);
        break;

- 效果截图
FluxBB bbcode 测试

#91 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » emWin中,在有背景图的对话框上绘制2D图形,2D图形无法显示,是什么原因呢?谢谢! » 2019-12-05 11:05:26

Image控件我用的比较少,我也没有验证过你这种背景的做法是否正确。

emwin例程里面一般在WM_PAINT里,用GUI_DrawBitmap之类去绘制背景实现。


区别在于:
1. 你用的控件去做背景
2. 常规做法是用2D绘图做背景

不显示的原因,可能是你的控件挡住了2D绘图。

---

以上是我的推测,未经验证。








szchen2006 说:

@Jmhh247
大佬,您好!再请教一个问题:我看了你做的界面,很漂亮。我发现我的界面要求和你的稍微有区别:我的窗口背景是一张图片。你的背景好像是颜色填充。这个区别是不是导致了我无法显示矩形呢?
还有,上面帖子里贴的代码不完整,重新贴在下面:
WM_PAINT:
    hImage=WM_GetDialogItem(hDlg, ID_IMAGE_0);
        IMAGE_SetBitmap(hImage,&bmbackground);

    GUI_SetBkColor(GUI_BLACK);
        GUI_SetColor(GUI_WHITE);
    GUI_Clear();

#93 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » emWin中,在有背景图的对话框上绘制2D图形,2D图形无法显示,是什么原因呢?谢谢! » 2019-12-04 08:28:00

楼主,你这个问题,最好把代码片断贴出来,好分析。。。


现在只能猜一下了:

1. 单独测试矩形是否能显示出来?
2. 单独显示背景图是否能显示出来?
3. WM_PAINT消息里面绘图,是有顺序的。
4. 以上都正常,先绘制背景图,再绘制矩形试试。

#94 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 谁有emwin的arm9 gcc linux版本的静态库? » 2019-12-03 08:58:29

大佬,稳! 学习了


armstrong 说:

s3c2410/s3c2440是armv4t;
s3c2416才是跟f1c100s一样的,跟nuvoton也是一样的。

#95 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 在 ubuntu@x86 用 chroot 到 ARM 平台的 rootfs » 2019-11-20 17:00:00

应该可以的,最终的rootfs.tar是由target打包成的。修改后make试试,会打包进rootfs.tar


kernelpanic 说:

测试成功!

不过,target/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM 这个文件有说明,不要把这个目录当作根文件系统来挂载,它是一个中间产物。
是不是解压 tar 包之后,再用 qemu 模拟会更合适?

#96 Re: 全志 SOC » 请问大家荔枝派网盘里面的 V3s TF卡 debian 桌面镜像有哪位朋友跑起来了? » 2019-11-19 21:03:37

可以进桌面了。

发现只有usb 网卡

root@LicheePi:~# ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0      Link encap:Ethernet  HWaddr 8a:65:31:29:92:d0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@LicheePi:~# ifconfig eth0 up
eth0: ERROR while getting interface flags: No such device
root@LicheePi:~#

#98 Re: 全志 SOC » 请问大家荔枝派网盘里面的 V3s TF卡 debian 桌面镜像有哪位朋友跑起来了? » 2019-11-19 09:44:10

一个小。。。。。。时,比。。。闪电。。。还。。。。慢。。。。,大佬你想干啥

jimmy 说:

腾讯的QQ能跑吗,我不在乎时间,一个小时能加载起来我也能忍受。

#99 Re: 全志 SOC » 请问大家荔枝派网盘里面的 V3s TF卡 debian 桌面镜像有哪位朋友跑起来了? » 2019-11-19 09:41:48

awfans 说:

https://whycan.cn/files/members/713/2019-11-19_085543.png

https://whycan.cn/files/members/713/2019-11-19_085624.png

@Jmhh247 记得按17楼修改 /etc/fstab 文件, 然后看Linux启动日志,有没有启用swap分区。


多谢楼主!


题外话,我给ubuntu扩展硬盘容量也是用gparted,记得需要先建扩展分区,然后在扩展分区上建swap分区。

这个T卡的swap分区似乎是直接建立的,不需要扩展分区。

#100 Re: 全志 SOC » 请问大家荔枝派网盘里面的 V3s TF卡 debian 桌面镜像有哪位朋友跑起来了? » 2019-11-19 08:36:59

赞,太好了,晚上我也试试,

能详细说说T卡怎么--“用gparted添加一个128M swap分区”吗




awfans 说:

现在没有内存错误了.

#101 Re: 全志 SOC » 请问大家荔枝派网盘里面的 V3s TF卡 debian 桌面镜像有哪位朋友跑起来了? » 2019-11-18 13:17:11

登陆桌面,我用的是root, 密码是 toortoor。

输入账号,点击输入密码框,就会重新载入桌面登陆框。。。我又测试先输入密码再输入账号,可以输入,但还是回到登陆框。

#102 Re: 全志 SOC » 请问大家荔枝派网盘里面的 V3s TF卡 debian 桌面镜像有哪位朋友跑起来了? » 2019-11-18 13:12:56

awfans 说:

lichee_zero-Debian-LXDE_800_alpha 烧这个固件默认就有桌面了, 不用手动 swap, 如何做到的,我还在研究中.


我也能看到桌面,
问题是桌面只有个登陆框,我接了键盘,但是无法登陆进去,你能登陆桌面吗?

#103 Re: 全志 SOC » 请问大家荔枝派网盘里面的 V3s TF卡 debian 桌面镜像有哪位朋友跑起来了? » 2019-11-17 16:32:35

桌面能进去吗,我试了下进不去。(终端可以进)

看使用说明里有这句--“如果你需要测试桌面,请一定要挂载swap分区!!!!”

小白不知道怎么挂载swap分区,流下了没有技术的眼泪。。。




awfans 说:

https://whycan.cn/files/members/713/QQ图片20191116223733.jpg

感谢二楼的 @lalala 朋友, 终于跑起来了, 默认账号是 root, 密码是 toortoor

#104 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 如何成为linux内核开发者? » 2019-11-14 10:53:41

有管理团队,有基金会,你只管提交到主线就行了吧。。。(其实我也不懂,哈哈~)

#106 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » [原创开源]emwin自定义控件1-卡片面板 » 2019-11-08 15:53:45

道友,早点睡吧,身体是**的本钱~

dave 说:

楼主V5啊,下来试试

#107 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » 用bmp图片做按钮,有时想隐藏这个按钮,请问有没有什么好的方法?谢谢。 » 2019-11-06 10:58:07

WM_HWIN hItem;

hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_1);



void WM_HideWindow(WM_HWIN hWin);

说个技巧吧。


上面这代码看出来了吗,hItem的类型和WM_HideWindow的参数类型,都是WM_HWIN。

所以不要管这些API字面是干啥的,直接怼就行了。反正又不会爆炸,多试试。(一般人我不告诉他~)



szchen2006 说:
Jmhh247 说:

WM_HideWindow(),不能满足你吗

谢谢回复。好像这个API是隐藏窗口的。

#109 Re: 全志 SOC » licheepi nano f1c100s uboot 从spiflash启动困惑 » 2019-11-05 16:11:48

学习到了

ippen 说:

在 arch/arm/mach-sunxi/board.c

void board_boot_order(u32 *spl_boot_list)
{
        /*
         * See the comments above in sunxi_get_boot_device() for infomation
         * about FEL boot.
         */
        if (!is_boot0_magic(SPL_ADDR + 4)) {
                spl_boot_list[0] = BOOT_DEVICE_BOARD;
                return;
        }

        spl_boot_list[0] = BOOT_DEVICE_MMC1;
        spl_boot_list[1] = BOOT_DEVICE_SPI;
}

#110 Re: 全志 SOC » 用go语言开发f1c100s/v3s之最简单的文件服务器 » 2019-11-04 20:43:41

也有可能,别的网站很快,但是坑网看附件就不快

#112 Re: 全志 SOC » 用go语言开发f1c100s/v3s之最简单的文件服务器 » 2019-11-04 20:27:04

楼主这个gif有24M多,居然加载了几分钟

下次能否控制下体积,没必要全屏gif吧。。。。。。

#114 Re: 全志 SOC » 投屏软件scrcpy在Linux上的移植(porting scrcpy to linux) » 2019-11-01 14:38:16

晕哥,是6楼吧。。。

win10下测试了,很顺利,很好玩啊。


ubtuntu16.04,编译不成功,没体验到,折腾一上午了

---

回头再研究上开发板上怎么玩,感觉只有在板子上跑,才能体会装x的快乐。。。


晕哥 说:

2,1,3 吧

可以跑下4楼的预编译文件, 直观感受一下, 还是挺好玩的。

#115 Re: 全志 SOC » 投屏软件scrcpy在Linux上的移植(porting scrcpy to linux) » 2019-11-01 14:13:36

这个投屏要玩起来,是下面步骤么?

1. 交叉编译scrcpy,在开发板上运行;
2. 开发板通过OTG线,接手机;
3. 实现投屏?

#116 Re: 全志 SOC » 投屏软件scrcpy在Linux上的移植(porting scrcpy to linux) » 2019-11-01 14:11:17

心疼自己,没看懂投屏怎么玩的,应该是需要在板子上运行scrcpy吧。。。


萌新大佬,你的nano能投屏吗

先按你的试试,我用https://whycan.cn/t_2794.html里面晕哥提供的tf卡bin,硬件是荔枝派nano.

检测不到手机

# adb devices
error: device offline
# clear
# lsusb
Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 002: ID 2d95:6007
# cat /root/.android/adb_usb.ini
0x2D95
#
# adb devices
error: device offline
#

网上搜error: device offline。说要执行

1、adb kill-server

2、adb start-server

3、adb remount

实测还是不行:

#
# adb kill-server
* server not running *
# adb start-server
# adb remount
error: device offline
#
# adb devices
error: device offline
#

你的nano是自己编译固件么/


超级萌新 说:

https://whycan.cn/files/members/878/2019-08-21_142007.png

感谢 @晕哥 @checkout

终于搞定了, 今天终于可以早点下班了 ^_^

#117 Re: 好钜润半导体(TIKY) » TKM32F499 各搜索引擎结果 » 2019-10-31 08:27:41

百度:你这个问题交钱就能解决。

#119 Re: 全志 SOC » 笔记-编译LittlevGL GUI demo支持tslib » 2019-10-23 19:17:50

应该是版本不一样了,发帖的时候是V5.3,现在是V6.0,导致一些文件不一样了。


官方已经有linux-fb版了,可以直接clone这个:https://github.com/littlevgl/lv_linux_frame_buffer,加上这里的tslib修改就可以了。(官方这个我还没用过~)


a32425262 说:

一步一步按照上面的来,出现了以下错误

In file included from /workdir/littlevgl/pc_simulator/lvgl/src/lv_core/lv_group.h:19:0,
                 from /workdir/littlevgl/pc_simulator/lvgl/src/lv_core/lv_group.c:9:
/workdir/littlevgl/pc_simulator/lvgl/src/lv_core/../../../lv_conf.h:388:10: fatal error: lvgl/lv_conf_checker.h: No such file or directory
 #include "lvgl/lv_conf_checker.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [lv_group.o] Error 1

real    0m0.340s
user    0m0.052s
sys     0m0.048s

#121 Re: 全志 SOC » 打造f1c100s上最牛系统 » 2019-10-22 15:53:29

哈哈,支持。

楼主的步子还得放稳啊,硬件性能在这呢,“媲美树莓派”--任重道远。

#123 Re: 全志 SOC » 有偿求一个F1c100S AVIN(CVBS)输入,CVBS输出 Melis的例程 » 2019-10-17 14:45:04

请问楼主,进行的怎么样了? 我也想做这个

Melis包里没有TV相关的驱动吗

#124 Re: Nuvoton N32905/N32926/NUC972/N9H20/N9H26/N9H30 » N9H26支持emWin中的多缓冲功能吗? » 2019-10-17 10:02:20

WM_MULTIBUF_Enable(1);

是emwin原生API,能够开启三缓冲的杀手级应用,与硬件无关只看显存是否足够,我想应该是必须支持的。

N9H26我没用过,具体还得你测试下。

#125 Re: 全志 SOC » 发现淘宝有卖F1C100S源码的 » 2019-10-14 13:17:22

看页面介绍上“视频播放”待更新。

感兴趣TV-in能跑多少帧,有时间测试请大佬下吧

jjmicro 说:

买了一块,大部驱动代码与这论坛上源码一致。没有视频部分。游戏部分没有源码。

#127 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » [原创开源]emwin自定义控件2--环形进度条 » 2019-09-28 15:16:26

测试一下:环形进度条动画延迟效果


(只是测试,比较简陋,暂时不整理工程出来~)


- 动画延迟

动画延迟效果,就是有一个收敛的过程,不是一步到位的。

比如抽奖的表盘,不是你转一下就停,而是有一个延迟过程才停下来。


!!!----("动画延迟"-这个叫法可能不专业~)


---
- 动态展示

只有第1个环形进度条带延迟效果,仔细看可以看到,其它进度条都是直接停下来,而第1个进度条经过一段延迟才停下来。

(gif有撕裂感,是gif工具的问题,实际很流畅)


FluxBB bbcode 测试

---
- 核心代码

##### 原理是:不直接更新设置值,而是通过一个定时器间接更新设置值,从而实现动画延迟。


#define ID_TIMER_TIME       1

static void _cb_round(WM_MESSAGE * pMsg)
{
	static     WM_HTIMER hTimerTime;
	WM_HWIN hWin;

	int Id;
    BATINFO_USER_SKIN *pUsr;

    static int value = 0;

	hWin = pMsg->hWin;
	BUTTON_GetUserData(hWin, &pUsr, sizeof(pUsr));

	switch (pMsg->MsgId)
	{
	case WM_TIMER:
		Id = WM_GetTimerId(pMsg->Data.v);


        if (pUsr->ch < pUsr->sw) {
            pUsr->ch++;

        }
        else if (pUsr->ch > pUsr->sw) {
            pUsr->ch--;
        }

        zl_roundlevel_set_value(hWin, pUsr->ch);

		WM_RestartTimer(pMsg->Data.v, 30);
		break;

	default:
		BUTTON_Callback(pMsg);
	}
}

#129 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » [原创开源]emwin自定义控件2--环形进度条 » 2019-09-27 13:10:32

忘记说了,本帖工程不带字体文件,需要去第1个帖子下载-[ [原创开源]emwin导航界面支持Awesome图标字体]https://whycan.cn/t_2917.html

#130 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » [原创开源]emwin自定义控件2--环形进度条 » 2019-09-27 12:26:00

Jmhh247
回复: 8

关键字: emwin, 自定义控件,环形进度条


这是一个用emwin写的主页面导航+侧边导航的通用程序框架,emwin仿真环境用的是codeblocks(16或17都可)。



本篇主要分享了一种环形进度条的自定义控件。(由于只是程序框架,所以并不涉及界面美化,我知道丑,所以先说出来~)


  本坛首发!


---
- 环形进度条

很常见的控件,就算现在没用,以后一定用的上!



---
- APP截图

下面是部分APP截图


静态展示

FluxBB bbcode 测试

动态展示

FluxBB bbcode 测试



---
- 核心代码

##### 原理就是用emwin系统的皮肤设置函数+按钮私有数据。这相当于一种自定义控件实现的简单方法,通过不同的函数+数据结构就能实现不同功能的控件。


!!!--------(延用了上个帖子的代码,整理的有点粗糙~)


1. 结构体类型

typedef struct {
    int Check;
    GUI_COLOR colorPressed;
    GUI_COLOR colorUnPress;
    GUI_FONT *iconFont;
    char iconName[6];
    char btnText[10];
    int ch;
    int sw;
    int mode;
    float batV;
    int batI;
    float power;
} BATINFO_USER_SKIN;


2. 结构体定义

static BATINFO_USER_SKIN BatInfoData[] = {
    {ZL_BTN_CHKMODE_NO, GUI_DARKCYAN, GUI_DARKMAGENTA, &awefont24, "\uf0f6", "stm8", 1, 1, ZL_BATINFO_MODE_CC, 12.305, 2000},
    {ZL_BTN_CHKMODE_NO, GUI_DARKCYAN, GUI_DARKMAGENTA, &awefont24, "\uf030", "stm32", 2, 1, ZL_BATINFO_MODE_ST, 10.8, 1500},
    {ZL_BTN_CHKMODE_NO, GUI_DARKCYAN, GUI_DARKMAGENTA, &awefont24, "\uf008", "mcu", 3, 0, ZL_BATINFO_MODE_CV},
};

static BATINFO_USER_SKIN *pBtnUser[GUI_COUNTOF(BatInfoData)];


3. 控件用户接口

(这里只完成了最有用的部分,有源码可以按需魔改。。。)


// !!!----以下接口必须在控件初始化私有数据后才能调用----

// 设置环形值 ok
int zl_roundlevel_set_value(WM_HWIN hItem, int value)
{
    BATINFO_USER_SKIN *pUsr;
    char strbuf[6];


    if (value > 100) {
        value = 100;
    }

    // 更新进度环
    BUTTON_GetUserData(hItem, &pUsr, sizeof(pUsr));
    pUsr->ch = value;


    // 更新数字值
    sprintf(strbuf, "%i %%", value);
    BUTTON_SetText(hItem, strbuf);
}

// 设置进度条颜色 ok
int zl_roundlevel_set_color(WM_HWIN hItem, GUI_COLOR color)
{
    BATINFO_USER_SKIN *pUsr;

    BUTTON_GetUserData(hItem, &pUsr, sizeof(pUsr));
    pUsr->colorPressed = color;

    WM_InvalidateWindow(hItem);
}

// 设置文字颜色 ok
int zl_roundlevel_set_valuecolor(WM_HWIN hItem, GUI_COLOR color)
{
    BUTTON_SetTextColor(hItem, BUTTON_CI_UNPRESSED, color);
    BUTTON_SetTextColor(hItem, BUTTON_CI_PRESSED, color);
}

4. 环形进度条实现代码


// 环形进度条实现  ok
int button_drawskin_roundlevel(const WIDGET_ITEM_DRAW_INFO* pItem)
{
    BATINFO_USER_SKIN *pUsr;
    char acBuf[20];
    int xPos;
    int yPos;
    int r;



	switch (pItem->Cmd)
	{
	case WIDGET_ITEM_DRAW_BACKGROUND:

		    BUTTON_GetUserData(pItem->hWin, &pUsr, sizeof(pUsr));

			if (BUTTON_IsPressed(pItem->hWin))
			{
                GUI_SetColor(pUsr->colorUnPress);
			}
			else
			{
                GUI_SetColor(pUsr->colorUnPress);
			}


            // 计算半径
			r = (pItem->x1 < pItem->y1) ? pItem->x1 : pItem->y1;

			if (r % 2) {
                r -= 3;
			}
			else {
                r -= 2;
			}

			xPos = pItem->x1 / 2;
			yPos = pItem->y1 / 2;

			// 外圆
			GUI_AA_FillCircle(xPos, yPos, r / 2);

			// 内圆
            GUI_SetColor(GUI_DARKCYAN);
			GUI_AA_FillCircle(xPos, yPos, r / 2 - (r / 6));

			// 进度环
			GUI_SetColor(pUsr->colorPressed);
			GUI_SetPenSize(r/6 - 1);
			GUI_AA_DrawArc(xPos, yPos, r / 2 - (r / 6 / 2) - 1, 0, 0, pUsr->ch * 3.6);

        break;

	default:
		{
			return BUTTON_DrawSkinFlex(pItem);
		}
	}
	return 0;
}


控制篇幅,只列出部分代码。


---
最后是工程源码:    emwin-uidemo8-cbprj.zip

#132 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » [原创开源]emwin侧边导航框架支持按钮选中效果 » 2019-09-26 16:20:49

是鼠标,在电脑上操作的,codeblocks仿真

晕哥 说:

请问TAB页选中是 键盘, 还是鼠标完成的?

#133 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » [原创开源]emwin侧边导航框架支持按钮选中效果 » 2019-09-26 16:09:35

测试一下: 使用emWin原生MULTIPAGE控件的侧边导航


(只是测试,比较简陋~)


---

- 动态展示

FluxBB bbcode 测试

---

- 核心代码

    // 0--你懂的
    hItem = WM_GetDialogItem(pMsg->hWin, ID_MULTIPAGE_0);


    // 1--设置标题栏在底部
    MULTIPAGE_SetAlign(hItem, MULTIPAGE_ALIGN_LEFT | MULTIPAGE_ALIGN_BOTTOM);


    // 2--旋转标题栏到左侧
    MULTIPAGE_SetRotation(hItem, MULTIPAGE_CF_ROTATE_CW);

    // 3--设置皮肤,目的实现标题栏文字水平
    MULTIPAGE_SetSkin(hItem, multipage_drawskin);
    // 4--皮肤实现函数,左侧边导航实现ok
    int multipage_drawskin(const WIDGET_ITEM_DRAW_INFO* pItem)
    {
        GUI_RECT rect;
        char acBuf[20];


        switch (pItem->Cmd)
        {
        case WIDGET_ITEM_DRAW_TEXT:

                MULTIPAGE_GetPageText(pItem->hWin, pItem->ItemIndex, acBuf, sizeof(acBuf));

                rect.x0 = pItem->x0;
                rect.x1 = pItem->x1;
                rect.y0 = pItem->y0;
                rect.y1 = pItem->y1;


                GUI_SetFont(MULTIPAGE_GetFont(pItem->hWin));
                GUI_SetTextMode(GUI_TM_TRANS);
                GUI_SetColor(MULTIPAGE_GetTextColor(pItem->hWin, pItem->ItemIndex));


                GUI_DispStringInRect(acBuf, &rect, GUI_TA_HCENTER | GUI_TA_VCENTER);


            break;

        default:
            {
                return MULTIPAGE_DrawSkinFlex(pItem);
            }
        }
        return 0;
    }

#134 Re: 全志 SOC » 使用F1C200S做一个视网膜电容屏,并带有AV摄像头的小MP4 » 2019-09-25 08:37:29

可以先做个底板,都调试OK,再整合也不迟


迪卡 说:

屏幕到了,和核心板很配。
是在核心板的基础上画个底板呢?还是直接做个MP4板
https://whycan.cn/files/members/1228/_20190924172212.jpeg

#136 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » [原创开源]emwin自定义控件1-卡片面板 » 2019-09-23 13:08:31

为了节约空间和时间,本帖工程内不带字体文件。

需要到前的帖子下载字体,并复制到本工程内。

#137 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » [原创开源]emwin自定义控件1-卡片面板 » 2019-09-23 13:06:44

Jmhh247
回复: 9

关键字: emwin, 自定义控件,卡片面板

这是一个用emwin写的主页面导航+侧边导航的通用程序框架,emwin仿真环境用的是codeblocks(16或17都可)。


##### 本坛首发。

本篇主要介绍了一种卡片式的自定义控件。(由于只是程序框架,所以并不涉及界面美化,我知道丑,所以先说出来~)


---
- 卡片面板

卡片面板是我自己起的名字,不知道此类控件是否有准确的叫法。

在横屏设备中,卡片面板有着大量的应用,通常用来展示同类信息。

下面的截图来自最近沉迷的手游《QQ飞车》。(飞车一局2分钟左右,比王者玩起来轻松太多了,当然我主要是为看它的GUI设计,信吧~)

FluxBB bbcode 测试

---
- APP截图

下面是部分APP截图


静态展示

FluxBB bbcode 测试


动态展示

FluxBB bbcode 测试



---
- 代码实现

##### 原理就是用emwin系统的皮肤设置函数+按钮私有数据。这相当于一种自定义控件实现的简单方法,通过不同的函数+数据结构就能实现不同功能的控件。


1. 结构体类型

typedef struct {
    int Check;
    GUI_COLOR colorPressed;
    GUI_COLOR colorUnPress;
    GUI_FONT *iconFont;
    char iconName[6];
    char btnText[10];
    int ch;
    int sw;
    int mode;
    float batV;
    int batI;
    float power;
} BATINFO_USER_SKIN;


2. 结构体定义

static BATINFO_USER_SKIN BatInfoData[] = {
    {ZL_BTN_CHKMODE_NO, GUI_DARKCYAN, GUI_DARKMAGENTA, &awefont24, "\uf0f6", "stm8", 1, 1, ZL_BATINFO_MODE_CC, 12.305, 2000},
    {ZL_BTN_CHKMODE_NO, GUI_DARKCYAN, GUI_DARKMAGENTA, &awefont24, "\uf030", "stm32", 2, 1, ZL_BATINFO_MODE_ST, 10.8, 1500},
    {ZL_BTN_CHKMODE_NO, GUI_DARKCYAN, GUI_DARKMAGENTA, &awefont24, "\uf008", "mcu", 3, 0, ZL_BATINFO_MODE_CV},
    {ZL_BTN_CHKMODE_NO, GUI_DARKCYAN, GUI_DARKMAGENTA, &awefont24, "\uf226", "linux", 4, 1, ZL_BATINFO_MODE_DC, 12.0, 1800},
    {ZL_BTN_CHKMODE_NO, GUI_DARKCYAN, GUI_DARKMAGENTA, &awefont24, "\uf144", "audio", 5},
};


3. 卡片面板实现代码

// 卡片面板控件 ok
int button_drawskin_batinfo(const WIDGET_ITEM_DRAW_INFO* pItem)
{
    BATINFO_USER_SKIN *pUsr;
    GUI_RECT rect;
    char acBuf[20];

    int xSize;
    int ySize;
    int strXsizeLen;
    int xPos;



	switch (pItem->Cmd)
	{
    case WIDGET_ITEM_DRAW_TEXT:

            BUTTON_GetText(pItem->hWin, acBuf, sizeof(acBuf));

            rect.x0 = pItem->x0;
            rect.x1 = pItem->x1;
            rect.y0 = pItem->y0;
            rect.y1 = pItem->y1;


            GUI_SetFont(BUTTON_GetFont(pItem->hWin));
            GUI_SetTextMode(GUI_TM_TRANS);
            GUI_SetColor(GUI_LIGHTGREEN);

            rect.y0 = rect.y1 / 12;


            BUTTON_GetUserData(pItem->hWin, &pUsr, sizeof(pUsr));


            GUI_DispStringAt("CH", 3, rect.y0);
            GUI_DispDecAt(pUsr->ch, 15 + 8, rect.y0, 2);


            if (pUsr->sw == 1) {

                strXsizeLen = GUI_GetStringDistX("ON");

                GUI_SetColor(GUI_WHITE);
                GUI_AA_FillRoundedRect(63-2, rect.y0-2, 63+strXsizeLen+2, rect.y0+16, 2);
                GUI_SetColor(GUI_RED);

                GUI_DispStringAt("ON", 63, rect.y0);

                //
                GUI_SetColor(GUI_LIGHTGREEN);

                if (pUsr->mode == ZL_BATINFO_MODE_CC) {
                    GUI_DispStringAt("CC", 58 + 40, rect.y0);
                }
                else if (pUsr->mode == ZL_BATINFO_MODE_CV) {
                    GUI_DispStringAt("CV", 58 + 40, rect.y0);
                }
                else if (pUsr->mode == ZL_BATINFO_MODE_DC) {
                    GUI_DispStringAt("DC", 58 + 40, rect.y0);
                }
                else if (pUsr->mode == ZL_BATINFO_MODE_ST) {
                    GUI_DispStringAt("ST", 58 + 40, rect.y0);
                }


                // vol
                strXsizeLen = 0;

                sprintf(acBuf, "%.3f", pUsr->batV);
                GUI_SetFont(GUI_FONT_24B_ASCII);

                strXsizeLen += GUI_GetStringDistX(acBuf);

                GUI_SetFont(GUI_FONT_16B_ASCII);

                strXsizeLen += GUI_GetStringDistX("V");

                xPos = (WM_GetWindowSizeX(pItem->hWin) - strXsizeLen) / 2;

                GUI_GotoXY(xPos, rect.y0 + 60);
                GUI_SetFont(GUI_FONT_24B_ASCII);
                GUI_DispString(acBuf);

                GUI_GotoY(rect.y0 + 60 + (5));
                GUI_SetFont(GUI_FONT_16B_ASCII);
                GUI_DispString("V");



                // i
                strXsizeLen = 0;

                sprintf(acBuf, "%d", pUsr->batI);
                GUI_SetFont(GUI_FONT_24B_ASCII);

                strXsizeLen += GUI_GetStringDistX(acBuf);

                GUI_SetFont(GUI_FONT_16B_ASCII);

                strXsizeLen += GUI_GetStringDistX("mA");

                xPos = (WM_GetWindowSizeX(pItem->hWin) - strXsizeLen) / 2;

                GUI_GotoXY(xPos, rect.y0 + 60 + 25);
                GUI_SetFont(GUI_FONT_24B_ASCII);
                GUI_DispString(acBuf);

                GUI_GotoY(rect.y0 + 60 + + 25 + (5));
                GUI_SetFont(GUI_FONT_16B_ASCII);
                GUI_DispString("mA");

//                GUI_DispDecAt(pUsr->power, 8 + 50, rect.y0 + 60 + 50, 4);
//                GUI_DispString("mAh");

            }
            else {

                strXsizeLen = GUI_GetStringDistX("OFF");

                GUI_SetColor(GUI_WHITE);
                GUI_AA_FillRoundedRect(63-2, rect.y0-2, 63+strXsizeLen+2, rect.y0+16, 2);
                GUI_SetColor(GUI_RED);

                GUI_DispStringAt("OFF", 63, rect.y0);
            }
        break;

	case WIDGET_ITEM_DRAW_BACKGROUND:

		    BUTTON_GetUserData(pItem->hWin, &pUsr, sizeof(pUsr));

			if (BUTTON_IsPressed(pItem->hWin))
			{

                if (pUsr->sw == 1) {
                    GUI_SetColor(pUsr->colorPressed);
                }
                else {
                    GUI_SetColor(pUsr->colorPressed);
                }

			}
			else
			{
                if (pUsr->sw == 1) {
                    GUI_SetColor(pUsr->colorUnPress);
                }
                else {
                    GUI_SetColor(pUsr->colorPressed);
                }
			}

			GUI_AA_FillRoundedRect(pItem->x0, pItem->y0, pItem->x1, pItem->y1, 0);

            rect.x0 = pItem->x0;
            rect.x1 = pItem->x1;
            rect.y0 = pItem->y0;
            rect.y1 = pItem->y1;




            rect.y0 = rect.y1 / 5;


            GUI_SetColor(GUI_GRAY_E7);

            GUI_DrawHLine(rect.y0, rect.x0, rect.x1);


            GUI_SetPenSize(2);
            GUI_AA_DrawLine(pItem->x0 + 35, pItem->y0 + 1, pItem->x0 + 20 + 30, rect.y0 -1);


			if (pUsr->Check == ZL_BTN_CHKMODE_UP){

                GUI_SetPenSize(5);
                GUI_SetColor(GUI_WHITE);
                GUI_DrawLine(pItem->x0, pItem->y0, pItem->x1, pItem->y0);
			}

			if (pUsr->Check == ZL_BTN_CHKMODE_DOWN){

                GUI_SetPenSize(5);
                GUI_SetColor(GUI_WHITE);
                GUI_DrawLine(pItem->x0, pItem->y1, pItem->x1, pItem->y1);
			}

			if (pUsr->Check == ZL_BTN_CHKMODE_LEFT){

                GUI_SetPenSize(5);
                GUI_SetColor(GUI_WHITE);
                GUI_DrawLine(pItem->x0, pItem->y0, pItem->x0, pItem->y1);
			}

			if (pUsr->Check == ZL_BTN_CHKMODE_RIGHT){

                GUI_SetPenSize(5);
                GUI_SetColor(GUI_WHITE);
                GUI_DrawLine(pItem->x1, pItem->y0, pItem->x1, pItem->y1);
			}

        break;

	default:
		{
			return BUTTON_DrawSkinFlex(pItem);
		}
	}
	return 0;
}


控制篇幅,只列出部分代码。

---
最后是工程源码:  emwin-uidemo7-cbprj.zip

#138 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » [原创开源]emwin侧边导航框架支持按钮选中效果 » 2019-09-21 14:27:12

多向晕哥学习!


晕哥 说:

感谢楼主分享! 跟帖学习中。


[原创开源]emwin导航界面支持Awesome图标字体: https://whycan.cn/t_2917.html

#139 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » [原创开源]emwin侧边导航框架支持按钮选中效果 » 2019-09-21 14:19:21

点击“我的照片”就进去了。(偷懒没说明,想着就六个图标,都点一遍就知道了。。。)

我思故我在 说:

https://whycan.cn/files/members/1947/2019-09-21_141217.png

https://whycan.cn/files/members/1947/2019-09-21_141354.png

6666666  继续紧跟楼主步伐,

一开始发现 C:\Windows\Fonts\msyh.ttf 会引起错误, 然后挂了。

后来网上下载了一个 msyh.ttf 可以了。


但是楼主的第三个图片, 左侧导航那个界面怎么点进去呢?

#140 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » [原创开源]emwin侧边导航框架支持按钮选中效果 » 2019-09-21 13:14:02

表面上为了节约服务器空间,实际上是为了节约上传时间,本帖子工程里面是不带字体文件的。

需要去上个帖子里面下载字体文件,并复制到工程目录内。

#141 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » [原创开源]emwin侧边导航框架支持按钮选中效果 » 2019-09-21 13:12:05

Jmhh247
回复: 18

关键字: emwin, 侧边导航


这是一个用emwin写的主页面导航+侧边导航的通用程序框架,emwin仿真环境用的是codeblocks(16或17都可)。


##### 本坛首发。(为晕哥的靠海别墅添砖加瓦出点力~~~)


接上篇《[原创开源]emwin导航界面支持Awesome图标字体》,本篇主要介绍了侧边栏导航的通用程序框架。(由于只是程序框架,所以并不涉及界面美化,我知道丑,所以先说出来~)


---
- 侧边导航

在横屏设备中,侧边导航有着大量的应用,下面的截图来自最近沉迷的手游《QQ飞车》。(飞车一局2分钟左右,比王者玩起来轻松太多了,当然我主要是为看它的GUI设计,信吧~)

FluxBB bbcode 测试


---
- APP截图

下面是部分APP截图


主页面按钮选中边线,可以任意设四边的其中一边(演示,通常主页面不需要)

FluxBB bbcode 测试



侧边栏导航选中效果

FluxBB bbcode 测试


FluxBB bbcode 测试

---
- 代码实现

##### 原理就是用emwin系统的皮肤设置函数+按钮私有数据。这相当于一种自定义控件实现的简单方法,通过不同的函数+数据结构就能实现不同功能的控件。


1. 结构体类型

typedef struct {
    int Check;
    GUI_COLOR colorPressed;
    GUI_COLOR colorUnPress;
    GUI_FONT *iconFont;
    char iconName[6];
    char btnText[10];
} BTN_USER_SKIN;


2. 结构体定义

static BTN_USER_SKIN BtnSkinData[] = {
    {ZL_BTN_CHKMODE_RIGHT, GUI_ORANGE, GUI_ORANGE, &awefont24, "\uf0f6", "stm8"},
    {ZL_BTN_CHKMODE_NO, GUI_ORANGE, GUI_DARKGRAY, &awefont24, "\uf030", "stm32"},
    {ZL_BTN_CHKMODE_NO, GUI_ORANGE, GUI_DARKGRAY, &awefont24, "\uf008", "mcu"},
    {ZL_BTN_CHKMODE_NO, GUI_ORANGE, GUI_DARKGRAY, &awefont24, "\uf226", "linux"},
    {ZL_BTN_CHKMODE_NO, GUI_ORANGE, GUI_DARKGRAY, &awefont24, "\uf144", "audio"},
    {ZL_BTN_CHKMODE_NO, GUI_ORANGE, GUI_DARKGRAY, &awefont24, "\uf2b5", NULL},
};


3. 选中效果代码

// ok
static button_set_check(WM_MESSAGE *pMsg)
{
    WM_HWIN hItem;
    BTN_USER_SKIN * pBtnData;

    // uncheck all
    for (int i = 0; i < GUI_COUNTOF(BtnSkinData); i++) {

        hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_1 + i);

        BUTTON_GetUserData(hItem, &pBtnData, sizeof(pBtnData));


        pBtnData->Check = 0;

        pBtnData->colorUnPress = GUI_DARKGRAY;
    }


    // check self
    BUTTON_GetUserData(pMsg->hWinSrc, &pBtnData, sizeof(pBtnData));

    // 增加选中线
    pBtnData->Check = ZL_BTN_CHKMODE_RIGHT;

    // 修改选中后颜色
    pBtnData->colorUnPress = GUI_ORANGE;


    // 无效化,触发重绘
    WM_InvalidateWindow(pMsg->hWin);
}


控制篇幅,只列出部分代码。

---

最后是工程源码:   emwin-uidemo6-cbprj.zip

#142 Re: 全志 SOC » LicheePi Nano Usb复合设备RNDIS功能问题 » 2019-09-21 09:14:06

多谢楼主分享,之前按照< 测试测试 g_serial / g_ether USB Gadget (RNDIS)>帖子没成功,

以后试试楼主的。

#145 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » [原创开源]emwin导航界面支持Awesome图标字体 » 2019-09-20 13:15:05

Jmhh247
回复: 18

关键字: emwin, awesome图标字体


最近整理电脑资料,发现角落很多代码,不如整理一下分享出来,还能发挥点余热。


这是一个用emwin写的导航界面,emwin仿真环境用的是codeblocks。

##### 程序本身没什么技术含量,唯一值得分享的亮点是awesome图标字体在emwin中的应用。

在这里要特别感谢安富莱给力的史诗级emwin教程。


部分APP运行截图

---
加载页

FluxBB bbcode 测试

启动页

FluxBB bbcode 测试

导航页

FluxBB bbcode 测试

图中的导航按钮使用的就是awesome图标。

---
#### awesome图标字体简介

awesome图标字体,是一套开源免费的矢量图标,最新版是4.7.0,一共有675个图标。awesome图标字体提供多种格式,可以用到多种开发场合,web开发应该是主流。

awesome图标字体中文官网在这:- [FontAwesome中文网](http://www.fontawesome.com.cn/)

官网截图

---

FluxBB bbcode 测试


FluxBB bbcode 测试

#### emwin使用awesome字体

awesome图标字体有提供ttf格式,而emwin是支持ttf格式的,所以emwin可以直接使用。


emwin使用图标的常规方法,无非就是2D绘图,直接贴图等。

awesome图标字体ttf格式大小只有162KB,不到200KB就有675个矢量图标,显然是很适合嵌入式的,使用方法也简单的多。

FluxBB bbcode 测试

所以在一些场合中使用awesome图标字体优势非常大。



- 简单使用示例

创建字体后,直接当成普通字体来显示即可:

GUI_SetFont(&Font48);

GUI_DispStringInRect("\uf085", &rect, GUI_TA_HCENTER | GUI_TA_TOP);

上面的“f085”是从索引页查出图标对应的unicode。我把图标的索引页生成了一个PDF文档,后面会给出该文档。



- 进阶使用示例

就是本次导航按钮使用图标字体的实现方法,原理就是用emwin系统的皮肤设置函数+按钮私有数据。

1. 在emwin创建awesome图标字体;

        ttf_init();

        // 篇幅限制,只列出部分,具体看工程源码
	/* 创建6种字体 */
	GUI_TTF_CreateFontAA(&awefont16, &awefont_Cs0);
	GUI_TTF_CreateFontAA(&awefont24, &awefont_Cs1);
	GUI_TTF_CreateFontAA(&awefont32, &awefont_Cs2);
	GUI_TTF_CreateFontAA(&awefont48, &awefont_Cs3);
	GUI_TTF_CreateFontAA(&awefont72, &awefont_Cs4);
	GUI_TTF_CreateFontAA(&awefont120, &awefont_Cs5);

---
2. 增加按钮的私有数据,这里是记录图标字体等信息


// 按钮私有数据,记录图标
// ok
static BTN_USER_SKIN BtnSkinData[] = {
    {GUI_DARKCYAN, GUI_DARKMAGENTA, &awefont48, "\uf0f6"},
    {GUI_DARKCYAN, GUI_DARKGRAY, &awefont48, "\uf030"},
    {GUI_DARKCYAN, GUI_DARKGREEN, &awefont48, "\uf008"},
    {GUI_DARKCYAN, GUI_DARKRED, &awefont48, "\uf226"},
    {GUI_DARKCYAN, GUI_ORANGE, &awefont48, "\uf144"},
    {GUI_DARKCYAN, GUI_GRAY_9A, &awefont48, "\uf2b5"},
};

// ok
static BTN_USER_SKIN *pBtnUser[GUI_COUNTOF(BtnSkinData)];

然后一定记得给按钮设置私有数据的字节数:

FluxBB bbcode 测试

---
3. 使用系统函数设置皮肤即可


    for (int i = 0; i < GUI_COUNTOF(BtnSkinData); i++) {

        hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_0 + i);

        BUTTON_SetFont(hItem, &Font16);

        // 设置皮肤函数
        BUTTON_SetSkin(hItem, button_drawskin_awefont);

        pBtnUser[i] = &BtnSkinData[i];

        // 设置私有数据
        BUTTON_SetUserData(hItem, &pBtnUser[i], sizeof(pBtnUser[i]));
    }

---

4. 最后是自定义皮肤函数的实现,核心代码


/* 按钮绘制图标字体皮肤 ok*/
int button_drawskin_awefont(const WIDGET_ITEM_DRAW_INFO* pItem)
{
    BTN_USER_SKIN *pUsr;
    GUI_RECT rect;
    char acBuf[20];


	switch (pItem->Cmd)
	{
    case WIDGET_ITEM_DRAW_TEXT:

            BUTTON_GetText(pItem->hWin, acBuf, sizeof(acBuf));

            rect.x0 = pItem->x0;
            rect.x1 = pItem->x1;
            rect.y0 = pItem->y0;
            rect.y1 = pItem->y1;


            GUI_SetFont(BUTTON_GetFont(pItem->hWin));
            GUI_SetTextMode(GUI_TM_TRANS);
            GUI_SetColor(GUI_WHITE);

            rect.y1 -= rect.y1 / 6;
			GUI_DispStringInRect(acBuf, &rect, GUI_TA_HCENTER | GUI_TA_BOTTOM);


        break;

	case WIDGET_ITEM_DRAW_BACKGROUND:

		    BUTTON_GetUserData(pItem->hWin, &pUsr, sizeof(pUsr));

			if (BUTTON_IsPressed(pItem->hWin))
			{
                GUI_SetColor(pUsr->colorPressed);
			}
			else
			{
                GUI_SetColor(pUsr->colorUnPress);
			}

			GUI_AA_FillRoundedRect(pItem->x0, pItem->y0, pItem->x1, pItem->y1, 0);


            rect.x0 = pItem->x0;
            rect.x1 = pItem->x1;
            rect.y0 = pItem->y0;
            rect.y1 = pItem->y1;



            // 图形字体
            GUI_SetColor(GUI_WHITE);
            GUI_SetTextMode(GUI_TM_TRANS);


            rect.y0 += rect.y1 / 6;

            if (pUsr->iconFont) {
                GUI_SetFont(pUsr->iconFont);
                GUI_DispStringInRect(pUsr->iconName, &rect, GUI_TA_HCENTER);

            }


        break;

	default:
		{
			return BUTTON_DrawSkinFlex(pItem);
		}
	}
	return 0;
}

---

最后,相关资料:

1. codeblocks(16或17都可)工程源码 emwin-uidemo5-cbprj.zip                       
2. font-awesome-4.7.0.zip           font-awesome-4_7_0.zip
3. 可执行程序demo                       demo.zip
4. 索引手册PDF                            图形字体图标字体矢量版 – Font Awesome 中文网

#146 Re: 全志 SOC » littlevgl触摸点是怎么映射的? » 2019-09-19 13:18:39

点进去看了下,是我发的帖子。。。


shiqx429 说:

你的意思是要将tslib整合至littlevgl中吗?就像 https://whycan.cn/t_2303.html 说的, 下午我试试看看

firstman 说:

before data->point.x = 3921     
before data->point.y = 3773 

这种一看就是 ADC 值,
要获取 LCD X/Y 要通过 tslib
tslib 有做滤波、去抖、校准等功能了。

#148 Re: 好钜润半导体(TIKY) » 好钜润半导体 4.3寸液晶屏, TKM32F499 » 2019-09-18 17:16:32

不懂就问,1508是什么意思

达克罗德 说:
jimmy 说:

楼上的朋友,方便贴一下1508的淘宝地址吗?

https://item.taobao.com/item.htm?id=562374928222
这款是1508

#150 Re: 全志 SOC » F1C200S 开发纪录 » 2019-09-18 10:18:41

大佬,快点把AV-in搞定!:D

迪卡 说:

滑稽,又丰富了一些资料

#160 Re: 全志 SOC » 分享个licheepi nano镜像,支持adb调试 » 2019-08-26 08:36:43

晕哥 说:

这个是正常的,因为 windows 自带的终端显示不支持 *nix 这种颜色终端显示,你下载一个 adb 版本的 putty 是没有问题的

换了个putty果然好了!

#161 Re: 全志 SOC » 分享个licheepi nano镜像,支持adb调试 » 2019-08-25 14:18:38

晕哥 说:

我把楼主的文件写到TF卡, 然后 dump 出来一个 bin 文件, 大家可以测试下载: f1c100s_4_14_128M_tfcard_dump_bin.7z

解压后 dd 到 TF 卡即可:

sudo dd if=f1c100s_4.14_128M_tfcard_dump.bin of=/dev/sdX

1. 添加了可执行文件 etc/init.d/S50adbd

#! /bin/sh
modprobe g_ffs idVendor=0x18d1 idProduct=0x4e42 iSerialNumber="buildroot"
mkdir -p /dev/usb-ffs/adb
mount -t functionfs adb /dev/usb-ffs/adb -o uid=2000,gid=2000
adbd &

2. 免输入密码登录,  修改 etc/inittab

console::respawn:/sbin/getty -L  console 0 vt100 # GENERIC_SERIAL

改为:

console::respawn:-/bin/sh


这样处理之后, 插入USB就能自动进入ADB, 什么命令都不用输入了。


adb-test.png

请教晕哥,用你提供的bin,进去之后是这个样子。adb这里显示乱码,正常吗

没玩过adb,可以干啥用,有简单的教程没...

#164 Re: 全志 SOC » 笔记-编译LittlevGL GUI demo支持tslib » 2019-08-13 10:37:59

804715358@qq.com 说:

我的tslib是1.1的没有这个函数,现在换成最新的了,但是一直报错,环境变量设置应该没有问题,1.1可以完美运行的,但是1.4报错./usr/local/tslib/bin/ts_test: can't load library 'libts.so.0',急啊,晕哥大神指点下

我用的版本是tslib-1.11。

#165 Re: 全志 SOC » 笔记-编译LittlevGL GUI demo支持tslib » 2019-08-13 10:35:57

804715358@qq.com 说:

楼主,您好,ts = ts_setup(NULL, 1);这个函数在哪里实现的,我这里用您的配置报错

1. 这个函数就是tslib自己的API

在tslib.h里面可以看到

TSAPI struct tsdev *ts_setup(const char *dev_name, int nonblock);

正常情况下,只要在应用程序里包含 tslib.h头文件,并且链接了tslib的库,就可以用这些API了。


2. 关于配置报错。这些配置的前提是,tslib已经移植好,可以正常工作。

你需要确认tslib是否能正常工作。(我也是新手,用的是buildroot自动编译好的tslib,本篇笔记不涉及tslib编译。。。)

#173 Re: 全志 SOC » licheepi nano 移植SDL2运行程序报Illegal instruction » 2019-06-25 10:16:40

nuvoton 说:

应该是免配置的, 因为搜到的 ubuntu sdl2 ffplay 只要安装 sdl2 & directfb 包就可以跑。

或者你在这个地方跟踪进去, 看是什么原因导致错误:

directfb not available


从源码看还是video驱动的问题,有时间继续看看:

    /* Select the proper video driver */
    index = 0;
    video = NULL;
    if (driver_name == NULL) {
        driver_name = SDL_getenv("SDL_VIDEODRIVER");
    }
    if (driver_name != NULL) {
        for (i = 0; bootstrap[i]; ++i) {
            if (SDL_strncasecmp(bootstrap[i]->name, driver_name, SDL_strlen(driver_name)) == 0) {
                if (bootstrap[i]->available()) {
                    video = bootstrap[i]->create(index);
                    break;
                }
            }
        }
    } else {
        for (i = 0; bootstrap[i]; ++i) {
            if (bootstrap[i]->available()) {
                video = bootstrap[i]->create(index);
                if (video != NULL) {
                    break;
                }
            }
        }
    }
    if (video == NULL) {
        if (driver_name) {
            return SDL_SetError("%s not available", driver_name);
        }
        return SDL_SetError("No available video device");
    }

#177 Re: 全志 SOC » licheepi nano 移植SDL2运行程序报Illegal instruction » 2019-06-19 16:29:43

晕哥 说:

https://whycan.cn/t_1356.html#p6702

我这个勾选 directfb 之后, cairo 就可以跑了。


这能说明directfb正常工作了吧,看帖子里你用的是SDL1。。。


晕哥,编译后,directfb需要怎么配置吗,就是那个directfbrc文件,还是免配置直接运行的

#178 Re: 全志 SOC » licheepi nano 移植SDL2运行程序报Illegal instruction » 2019-06-19 13:23:22

不带你们这样玩的啊, 晕哥,SDL2还是要填坑的!!!


我用buildroot2017制作根文件系统,就是这荔枝派教程帖子里 https://whycan.cn/t_561.html ,目的是想用用ffplay。


所以选中ffmpeg和ffplay编译,因为ffplay需要SDL2支持,所以buildroot自动选中了SDL2。

buildroot编译成功后测试:ffplay xx.mp4

也是提示:Could not initialize SDL - No available video device。



一翻搜索,说是SDL2需要directfb。

buildroot选中directfb,继续编译测试。

设置export SDL_VIDEODRIVER=directfb,运行ffplay,显示:

Could not initialize SDL - directfb not available
(Did you set the DISPLAY variable?)


后面怎么破。。。

#179 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 讨论一个串口发送接收问题,是FIFO半空时候继续发还是等FIFO空的时候继续发 » 2019-06-03 08:55:29

即然是客户接收有问题,无论你用何种方式都避免不了,只是看几率大小

要解决问题,还是得让客户改程序。按照你的描述,客户的程序得拼帧。

#180 Re: 全志 SOC » 荔枝派nano(f1c100s)的SPI-Flash系统编译创建全过程 » 2019-05-26 20:14:00

jiangming1399 说:
Jmhh247 说:

按楼主的配置来,启动后,使用root登陆不进去,难道不是这个用户名。。。

默认是空密码 你进不去吗?

是的,空密码,登陆进不去,很无语。。。

能分享一下你制作好的固件bin吗,让我体验一下

#181 Re: 全志 SOC » 荔枝派nano(f1c100s)的SPI-Flash系统编译创建全过程 » 2019-05-25 22:28:47

按楼主的配置来,启动后,使用root登陆不进去,难道不是这个用户名。。。

下面是启动log:

U-Boot SPL 2018.01-05679-g013ca45 (May 15 2019 - 14:16:08)
DRAM: 32 MiB
Trying to boot from MMC1
Card did not respond to voltage select!
mmc_init: -95, time 22
spl: mmc init failed with error: -95
Trying to boot from sunxi SPI


U-Boot 2018.01-05679-g013ca45 (May 15 2019 - 14:16:08 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x70000, size 0x10000
SF: 65536 bytes @ 0x70000 Read: OK
device 0 offset 0x80000, size 0x400000
SF: 4194304 bytes @ 0x80000 Read: OK
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 816fb000, end 816fff6a ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc8-licheepi-nano+ (vmtest@linux-test) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #1 Thu May 16 16:46:07 CST 2019
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Nano
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=squashfs
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 22672K/32768K available (6144K kernel code, 238K rwdata, 1416K rodata, 1024K init, 246K bss, 10096K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc2800000 - 0xff800000   ( 976 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7136 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 239 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 247 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000045] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000107] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000634] Console: colour dummy device 80x30
[    0.001511] console [tty0] enabled
[    0.001604] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070274] pid_max: default: 32768 minimum: 301
[    0.070616] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070702] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.072132] CPU: Testing write buffer coherency: ok
[    0.073824] Setting up static identity map for 0x80100000 - 0x80100058
[    0.076382] devtmpfs: initialized
[    0.082799] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.082956] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.083251] pinctrl core: initialized pinctrl subsystem
[    0.085086] random: get_random_u32 called from bucket_table_alloc+0x80/0x1a4 with crng_init=0
[    0.085418] NET: Registered protocol family 16
[    0.086741] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.088561] cpuidle: using governor menu
[    0.112188] SCSI subsystem initialized
[    0.112582] usbcore: registered new interface driver usbfs
[    0.112816] usbcore: registered new interface driver hub
[    0.113057] usbcore: registered new device driver usb
[    0.113511] pps_core: LinuxPPS API ver. 1 registered
[    0.113587] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.113711] PTP clock support registered
[    0.114221] Advanced Linux Sound Architecture Driver Initialized.
[    0.115127] random: fast init done
[    0.115785] clocksource: Switched to clocksource timer
[    0.141376] NET: Registered protocol family 2
[    0.142841] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.142990] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.143076] TCP: Hash tables configured (established 1024 bind 1024)
[    0.143381] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.143485] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.143994] NET: Registered protocol family 1
[    0.145233] RPC: Registered named UNIX socket transport module.
[    0.145341] RPC: Registered udp transport module.
[    0.145389] RPC: Registered tcp transport module.
[    0.145432] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.147287] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.149121] Initialise system trusted keyrings
[    0.149728] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.164728] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.167151] NFS: Registering the id_resolver key type
[    0.167305] Key type id_resolver registered
[    0.167360] Key type id_legacy registered
[    0.167509] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.181883] Key type asymmetric registered
[    0.181990] Asymmetric key parser 'x509' registered
[    0.182226] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.182322] io scheduler noop registered
[    0.182365] io scheduler deadline registered
[    0.183184] io scheduler cfq registered (default)
[    0.183275] io scheduler mq-deadline registered
[    0.183325] io scheduler kyber registered
[    0.184421] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.194001] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.358322] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.385035] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[    0.871639] console [ttyS0] enabled
[    0.882096] panel-simple panel: panel supply power not found, using dummy regulator
[    0.891522] SCSI Media Changer driver v0.25
[    0.899313] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.904164] 5 ofpart partitions found on MTD device spi0.0
[    0.909801] Creating 5 MTD partitions on "spi0.0":
[    0.914656] 0x000000000000-0x000000070000 : "u-boot"
[    0.922312] 0x000000070000-0x000000080000 : "dtb"
[    0.929608] 0x000000080000-0x000000480000 : "kernel"
[    0.937175] 0x000000480000-0x000000c00000 : "rootfs"
[    0.944591] 0x000000c00000-0x000001000000 : "overlayfs"
[    0.952894] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.959625] ehci-platform: EHCI generic platform driver
[    0.965185] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.971550] ohci-platform: OHCI generic platform driver
[    0.977282] usbcore: registered new interface driver usb-storage
[    0.984473] i2c /dev entries driver
[    1.045897] sunxi-mmc 1c0f000.mmc: base:0x(ptrval) irq:19
[    1.053327] usbcore: registered new interface driver usbhid
[    1.059087] usbhid: USB HID core driver
[    1.080569] NET: Registered protocol family 17
[    1.085320] Key type dns_resolver registered
[    1.091894] Loading compiled-in X.509 certificates
[    1.107201] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0739fb8)
[    1.116193] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc073929c)
[    1.123943] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.130678] [drm] No driver support for vblank timestamp query.
[    1.184702] Console: switching to colour frame buffer device 60x34
[    1.208380] sun4i-drm display-engine: fb0:  frame buffer device
[    1.215928] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.236745] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.266202] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.283938] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.306568] hub 1-0:1.0: USB hub found
[    1.317067] hub 1-0:1.0: 1 port detected
[    1.329823] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.360194] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.379867] vcc3v3: disabling
[    1.389361] ALSA device list:
[    1.398677]   #0: Loopback 1
[    1.408652] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.429870] cfg80211: failed to load regulatory.db
[    1.446281] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    1.471801] devtmpfs: mounted
[    1.486008] Freeing unused kernel memory: 1024K
[    1.743932] random: crng init done
Starting logging: OK
read-only file system detected...done
Starting network: OK

Welcome to Buildroot
buildroot login: root
Password:

Login incorrect
buildroot login:
Login timed out
Welcome to Buildroot
buildroot login:

下面是buildroot的配置,我用的buildroot2017.8.1:

#
# Automatically generated file; DO NOT EDIT.
# Buildroot 2017.08.1 Configuration
#
BR2_HAVE_DOT_CONFIG=y
BR2_HOST_GCC_AT_LEAST_4_5=y
BR2_HOST_GCC_AT_LEAST_4_6=y
BR2_HOST_GCC_AT_LEAST_4_7=y
BR2_HOST_GCC_AT_LEAST_4_8=y
BR2_HOST_GCC_AT_LEAST_4_9=y
BR2_HOST_GCC_AT_LEAST_5=y

#
# Target options
#
BR2_SOFT_FLOAT=y
BR2_ARCH_HAS_MMU_OPTIONAL=y
# BR2_arcle is not set
# BR2_arceb is not set
BR2_arm=y
# BR2_armeb is not set
# BR2_aarch64 is not set
# BR2_aarch64_be is not set
# BR2_bfin is not set
# BR2_csky is not set
# BR2_i386 is not set
# BR2_m68k is not set
# BR2_microblazeel is not set
# BR2_microblazebe is not set
# BR2_mips is not set
# BR2_mipsel is not set
# BR2_mips64 is not set
# BR2_mips64el is not set
# BR2_nios2 is not set
# BR2_or1k is not set
# BR2_powerpc is not set
# BR2_powerpc64 is not set
# BR2_powerpc64le is not set
# BR2_sh is not set
# BR2_sparc is not set
# BR2_sparc64 is not set
# BR2_x86_64 is not set
# BR2_xtensa is not set
BR2_ARCH="arm"
BR2_ENDIAN="LITTLE"
BR2_GCC_TARGET_ABI="aapcs-linux"
BR2_GCC_TARGET_CPU="arm926ej-s"
BR2_GCC_TARGET_FLOAT_ABI="soft"
BR2_GCC_TARGET_MODE="arm"
BR2_BINFMT_SUPPORTS_SHARED=y
BR2_READELF_ARCH_NAME="ARM"
BR2_BINFMT_ELF=y
BR2_ARM_CPU_MAYBE_HAS_VFPV2=y
BR2_ARM_CPU_HAS_ARM=y
BR2_ARM_CPU_HAS_THUMB=y
BR2_ARM_CPU_ARMV5=y
# BR2_arm920t is not set
# BR2_arm922t is not set
BR2_arm926t=y
# BR2_arm1136j_s is not set
# BR2_arm1136jf_s is not set
# BR2_arm1176jz_s is not set
# BR2_arm1176jzf_s is not set
# BR2_arm11mpcore is not set
# BR2_cortex_a5 is not set
# BR2_cortex_a7 is not set
# BR2_cortex_a8 is not set
# BR2_cortex_a9 is not set
# BR2_cortex_a12 is not set
# BR2_cortex_a15 is not set
# BR2_cortex_a15_a7 is not set
# BR2_cortex_a17 is not set
# BR2_cortex_a17_a7 is not set
# BR2_cortex_a53 is not set
# BR2_cortex_a57 is not set
# BR2_cortex_a57_a53 is not set
# BR2_cortex_a72 is not set
# BR2_cortex_a72_a53 is not set
# BR2_cortex_m3 is not set
# BR2_cortex_m4 is not set
# BR2_fa526 is not set
# BR2_pj4 is not set
# BR2_strongarm is not set
# BR2_xscale is not set
# BR2_iwmmxt is not set
# BR2_ARM_ENABLE_VFP is not set
BR2_ARM_EABI=y
BR2_ARM_SOFT_FLOAT=y
BR2_ARM_INSTRUCTIONS_ARM=y
# BR2_ARM_INSTRUCTIONS_THUMB is not set

#
# Build options
#

#
# Commands
#
BR2_WGET="wget --passive-ftp -nd -t 3"
BR2_SVN="svn"
BR2_BZR="bzr"
BR2_GIT="git"
BR2_CVS="cvs"
BR2_LOCALFILES="cp"
BR2_SCP="scp"
BR2_SSH="ssh"
BR2_HG="hg"
BR2_ZCAT="gzip -d -c"
BR2_BZCAT="bzcat"
BR2_XZCAT="xzcat"
BR2_LZCAT="lzip -d -c"
BR2_TAR_OPTIONS=""
BR2_DEFCONFIG="$(CONFIG_DIR)/defconfig"
BR2_DL_DIR="$(TOPDIR)/dl"
BR2_HOST_DIR="$(BASE_DIR)/host"

#
# Mirrors and Download locations
#
BR2_PRIMARY_SITE=""
BR2_BACKUP_SITE="http://sources.buildroot.net"
BR2_KERNEL_MIRROR="https://cdn.kernel.org/pub"
BR2_GNU_MIRROR="http://ftpmirror.gnu.org"
BR2_LUAROCKS_MIRROR="http://rocks.moonscript.org"
BR2_CPAN_MIRROR="http://cpan.metacpan.org"
BR2_JLEVEL=0
# BR2_CCACHE is not set
# BR2_ENABLE_DEBUG is not set
BR2_STRIP_strip=y
BR2_STRIP_EXCLUDE_FILES=""
BR2_STRIP_EXCLUDE_DIRS=""
# BR2_OPTIMIZE_0 is not set
# BR2_OPTIMIZE_1 is not set
# BR2_OPTIMIZE_2 is not set
# BR2_OPTIMIZE_3 is not set
# BR2_OPTIMIZE_G is not set
BR2_OPTIMIZE_S=y
# BR2_GOOGLE_BREAKPAD_ENABLE is not set
BR2_SSP_NONE=y
# BR2_SSP_REGULAR is not set
# BR2_SSP_STRONG is not set
# BR2_SSP_ALL is not set
# BR2_STATIC_LIBS is not set
BR2_SHARED_LIBS=y
# BR2_SHARED_STATIC_LIBS is not set
BR2_PACKAGE_OVERRIDE_FILE="$(CONFIG_DIR)/local.mk"
BR2_GLOBAL_PATCH_DIR=""

#
# Advanced
#
BR2_COMPILER_PARANOID_UNSAFE_PATH=y
# BR2_REPRODUCIBLE is not set

#
# Toolchain
#
BR2_TOOLCHAIN=y
BR2_TOOLCHAIN_USES_GLIBC=y
BR2_TOOLCHAIN_BUILDROOT=y
# BR2_TOOLCHAIN_EXTERNAL is not set

#
# Toolchain Buildroot Options
#
BR2_TOOLCHAIN_BUILDROOT_VENDOR="buildroot"
# BR2_TOOLCHAIN_BUILDROOT_UCLIBC is not set
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
# BR2_TOOLCHAIN_BUILDROOT_MUSL is not set
BR2_TOOLCHAIN_BUILDROOT_LIBC="glibc"

#
# Kernel Header Options
#
# BR2_KERNEL_HEADERS_3_2 is not set
# BR2_KERNEL_HEADERS_3_4 is not set
# BR2_KERNEL_HEADERS_3_10 is not set
# BR2_KERNEL_HEADERS_3_12 is not set
# BR2_KERNEL_HEADERS_4_1 is not set
# BR2_KERNEL_HEADERS_4_4 is not set
# BR2_KERNEL_HEADERS_4_9 is not set
# BR2_KERNEL_HEADERS_4_10 is not set
# BR2_KERNEL_HEADERS_4_11 is not set
BR2_KERNEL_HEADERS_4_12=y
# BR2_KERNEL_HEADERS_VERSION is not set
BR2_DEFAULT_KERNEL_HEADERS="4.12.14"
BR2_PACKAGE_LINUX_HEADERS=y
BR2_PACKAGE_GLIBC=y

#
# Binutils Options
#
# BR2_BINUTILS_VERSION_2_27_X is not set
BR2_BINUTILS_VERSION_2_28_X=y
# BR2_BINUTILS_VERSION_2_29_X is not set
BR2_BINUTILS_VERSION="2.28.1"
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS=""

#
# GCC Options
#
# BR2_GCC_VERSION_4_9_X is not set
# BR2_GCC_VERSION_5_X is not set
BR2_GCC_VERSION_6_X=y
# BR2_GCC_VERSION_7_X is not set
BR2_GCC_ARCH_HAS_CONFIGURABLE_DEFAULTS=y
BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE=y
BR2_GCC_VERSION="6.4.0"
BR2_EXTRA_GCC_CONFIG_OPTIONS=""
BR2_TOOLCHAIN_BUILDROOT_CXX=y
# BR2_TOOLCHAIN_BUILDROOT_FORTRAN is not set
# BR2_GCC_ENABLE_LTO is not set
# BR2_GCC_ENABLE_OPENMP is not set
# BR2_GCC_ENABLE_GRAPHITE is not set

#
# Host GDB Options
#
# BR2_PACKAGE_HOST_GDB is not set

#
# Toolchain Generic Options
#
BR2_TOOLCHAIN_HAS_GCC_BUG_64735=y
BR2_TOOLCHAIN_HAS_NATIVE_RPC=y
BR2_USE_WCHAR=y
BR2_ENABLE_LOCALE=y
BR2_INSTALL_LIBSTDCPP=y
BR2_TOOLCHAIN_HAS_THREADS=y
BR2_TOOLCHAIN_HAS_THREADS_DEBUG=y
BR2_TOOLCHAIN_HAS_THREADS_NPTL=y
BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS=y
BR2_TOOLCHAIN_HAS_SSP=y
BR2_TOOLCHAIN_SUPPORTS_PIE=y
# BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY is not set
BR2_TOOLCHAIN_HAS_FULL_GETTEXT=y
BR2_USE_MMU=y
BR2_TARGET_OPTIMIZATION=""
BR2_TARGET_LDFLAGS=""
# BR2_ECLIPSE_REGISTER is not set
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST="4.12"
BR2_TOOLCHAIN_GCC_AT_LEAST_4_3=y
BR2_TOOLCHAIN_GCC_AT_LEAST_4_4=y
BR2_TOOLCHAIN_GCC_AT_LEAST_4_5=y
BR2_TOOLCHAIN_GCC_AT_LEAST_4_6=y
BR2_TOOLCHAIN_GCC_AT_LEAST_4_7=y
BR2_TOOLCHAIN_GCC_AT_LEAST_4_8=y
BR2_TOOLCHAIN_GCC_AT_LEAST_4_9=y
BR2_TOOLCHAIN_GCC_AT_LEAST_5=y
BR2_TOOLCHAIN_GCC_AT_LEAST_6=y
BR2_TOOLCHAIN_GCC_AT_LEAST="6"
BR2_TOOLCHAIN_HAS_MNAN_OPTION=y
BR2_TOOLCHAIN_HAS_MFPXX_OPTION=y
BR2_TOOLCHAIN_HAS_SYNC_1=y
BR2_TOOLCHAIN_HAS_SYNC_2=y
BR2_TOOLCHAIN_HAS_SYNC_4=y
BR2_TOOLCHAIN_ARM_HAS_SYNC_8=y
BR2_TOOLCHAIN_HAS_SYNC_8=y
BR2_TOOLCHAIN_HAS_LIBATOMIC=y
BR2_TOOLCHAIN_HAS_ATOMIC=y

#
# System configuration
#
BR2_ROOTFS_SKELETON_DEFAULT=y
# BR2_ROOTFS_SKELETON_CUSTOM is not set
BR2_ROOTFS_MERGED_USR=y
BR2_TARGET_GENERIC_HOSTNAME="buildroot"
BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot"
BR2_TARGET_GENERIC_PASSWD_MD5=y
# BR2_TARGET_GENERIC_PASSWD_SHA256 is not set
# BR2_TARGET_GENERIC_PASSWD_SHA512 is not set
BR2_TARGET_GENERIC_PASSWD_METHOD="md5"
BR2_INIT_BUSYBOX=y
# BR2_INIT_SYSV is not set
# BR2_INIT_SYSTEMD is not set
# BR2_INIT_NONE is not set
# BR2_ROOTFS_DEVICE_CREATION_STATIC is not set
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV is not set
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV is not set
BR2_ROOTFS_DEVICE_TABLE="system/device_table.txt"
# BR2_ROOTFS_DEVICE_TABLE_SUPPORTS_EXTENDED_ATTRIBUTES is not set
BR2_TARGET_ENABLE_ROOT_LOGIN=y
BR2_TARGET_GENERIC_ROOT_PASSWD=""
BR2_SYSTEM_BIN_SH_BUSYBOX=y

#
# bash, dash, mksh, zsh need BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
#
# BR2_SYSTEM_BIN_SH_NONE is not set
BR2_TARGET_GENERIC_GETTY=y
BR2_TARGET_GENERIC_GETTY_PORT="console"
BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP=y
# BR2_TARGET_GENERIC_GETTY_BAUDRATE_9600 is not set
# BR2_TARGET_GENERIC_GETTY_BAUDRATE_19200 is not set
# BR2_TARGET_GENERIC_GETTY_BAUDRATE_38400 is not set
# BR2_TARGET_GENERIC_GETTY_BAUDRATE_57600 is not set
# BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200 is not set
BR2_TARGET_GENERIC_GETTY_BAUDRATE="0"
BR2_TARGET_GENERIC_GETTY_TERM="vt100"
BR2_TARGET_GENERIC_GETTY_OPTIONS=""
BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW=y
BR2_SYSTEM_DHCP=""
BR2_ENABLE_LOCALE_PURGE=y
BR2_ENABLE_LOCALE_WHITELIST="C en_US"
BR2_GENERATE_LOCALE=""
# BR2_SYSTEM_ENABLE_NLS is not set
BR2_TARGET_TZ_INFO=y
BR2_TARGET_TZ_ZONELIST="asia"
BR2_TARGET_LOCALTIME="Asia/Shanghai"
BR2_ROOTFS_USERS_TABLES=""
BR2_ROOTFS_OVERLAY=""
BR2_ROOTFS_POST_BUILD_SCRIPT=""
BR2_ROOTFS_POST_FAKEROOT_SCRIPT=""
BR2_ROOTFS_POST_IMAGE_SCRIPT=""

#
# Kernel
#
# BR2_LINUX_KERNEL is not set

#
# Target packages
#
BR2_PACKAGE_BUSYBOX=y
BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox.config"
BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES=""
# BR2_PACKAGE_BUSYBOX_SHOW_OTHERS is not set
# BR2_PACKAGE_BUSYBOX_SELINUX is not set
# BR2_PACKAGE_BUSYBOX_INDIVIDUAL_BINARIES is not set
# BR2_PACKAGE_BUSYBOX_WATCHDOG is not set
BR2_PACKAGE_SKELETON=y
BR2_PACKAGE_HAS_SKELETON=y
BR2_PACKAGE_PROVIDES_SKELETON="skeleton-init-sysv"
BR2_PACKAGE_SKELETON_INIT_COMMON=y
BR2_PACKAGE_SKELETON_INIT_SYSV=y

#
# Audio and video applications
#
# BR2_PACKAGE_ALSA_UTILS is not set
# BR2_PACKAGE_ATEST is not set
# BR2_PACKAGE_AUMIX is not set
# BR2_PACKAGE_BELLAGIO is not set
# BR2_PACKAGE_DVBLAST is not set
# BR2_PACKAGE_DVDAUTHOR is not set
# BR2_PACKAGE_DVDRW_TOOLS is not set
# BR2_PACKAGE_ESPEAK is not set
# BR2_PACKAGE_FAAD2 is not set
BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS=y
# BR2_PACKAGE_FFMPEG is not set
# BR2_PACKAGE_FLAC is not set
# BR2_PACKAGE_FLITE is not set
# BR2_PACKAGE_GMRENDER_RESURRECT is not set
# BR2_PACKAGE_GSTREAMER is not set
# BR2_PACKAGE_GSTREAMER1 is not set
# BR2_PACKAGE_JACK2 is not set
BR2_PACKAGE_KODI_ARCH_SUPPORTS=y

#
# kodi needs python w/ .py modules, a uClibc or glibc toolchain w/ C++, locale, threads, wchar, dynamic library, gcc >= 4.8, host gcc >= 4.6
#

#
# kodi needs an OpenGL EGL with either an openGL or an OpenGL ES backend
#
# BR2_PACKAGE_LAME is not set
# BR2_PACKAGE_MADPLAY is not set
# BR2_PACKAGE_MIMIC is not set

#
# miraclecast needs systemd and a glibc toolchain w/ threads and wchar
#
# BR2_PACKAGE_MJPEGTOOLS is not set
# BR2_PACKAGE_MODPLUGTOOLS is not set
# BR2_PACKAGE_MOTION is not set
# BR2_PACKAGE_MPD is not set
# BR2_PACKAGE_MPD_MPC is not set
# BR2_PACKAGE_MPG123 is not set
BR2_PACKAGE_MPLAYER_ARCH_SUPPORTS=y
# BR2_PACKAGE_MPLAYER is not set
# BR2_PACKAGE_MPV is not set
# BR2_PACKAGE_MULTICAT is not set
# BR2_PACKAGE_MUSEPACK is not set
# BR2_PACKAGE_NCMPC is not set

#
# on2-8170-libs needs a glibc toolchain and a Linux kernel to be built
#
# BR2_PACKAGE_OPUS_TOOLS is not set
# BR2_PACKAGE_PULSEAUDIO is not set
# BR2_PACKAGE_SOX is not set
# BR2_PACKAGE_SQUEEZELITE is not set

#
# tovid depends on python or python3
#
# BR2_PACKAGE_TSTOOLS is not set
# BR2_PACKAGE_TWOLAME is not set
# BR2_PACKAGE_UDPXY is not set
# BR2_PACKAGE_UPMPDCLI is not set
# BR2_PACKAGE_V4L2GRAB is not set

#
# v4l2loopback needs a Linux kernel to be built
#
# BR2_PACKAGE_VLC is not set
# BR2_PACKAGE_VORBIS_TOOLS is not set
# BR2_PACKAGE_WAVPACK is not set
# BR2_PACKAGE_YAVTA is not set
# BR2_PACKAGE_YMPD is not set

#
# Compressors and decompressors
#
# BR2_PACKAGE_BZIP2 is not set
# BR2_PACKAGE_LZ4 is not set
# BR2_PACKAGE_LZIP is not set
# BR2_PACKAGE_LZOP is not set
# BR2_PACKAGE_P7ZIP is not set
# BR2_PACKAGE_PIXZ is not set
# BR2_PACKAGE_UNRAR is not set
# BR2_PACKAGE_XZ is not set
# BR2_PACKAGE_ZIP is not set
# BR2_PACKAGE_ZSTD is not set

#
# Debugging, profiling and benchmark
#
# BR2_PACKAGE_BLKTRACE is not set
# BR2_PACKAGE_BONNIE is not set
# BR2_PACKAGE_CACHE_CALIBRATOR is not set
# BR2_PACKAGE_DHRYSTONE is not set
# BR2_PACKAGE_DIEHARDER is not set
# BR2_PACKAGE_DMALLOC is not set
# BR2_PACKAGE_DROPWATCH is not set
# BR2_PACKAGE_DSTAT is not set
# BR2_PACKAGE_DT is not set
# BR2_PACKAGE_DUMA is not set
# BR2_PACKAGE_FIO is not set
BR2_PACKAGE_GDB_ARCH_SUPPORTS=y
# BR2_PACKAGE_GDB is not set
BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS=y
# BR2_PACKAGE_GOOGLE_BREAKPAD is not set
# BR2_PACKAGE_IOZONE is not set
# BR2_PACKAGE_KEXEC is not set

#
# ktap needs a Linux kernel to be built
#
# BR2_PACKAGE_LATENCYTOP is not set
# BR2_PACKAGE_LMBENCH is not set
BR2_PACKAGE_LTP_TESTSUITE_ARCH_SUPPORTS=y
# BR2_PACKAGE_LTP_TESTSUITE is not set
# BR2_PACKAGE_LTRACE is not set
# BR2_PACKAGE_LTTNG_BABELTRACE is not set

#
# lttng-modules needs a Linux kernel to be built
#
# BR2_PACKAGE_LTTNG_TOOLS is not set
# BR2_PACKAGE_MEMSTAT is not set
# BR2_PACKAGE_NETPERF is not set
# BR2_PACKAGE_NETSNIFF_NG is not set
# BR2_PACKAGE_NMON is not set
BR2_PACKAGE_OPROFILE_ARCH_SUPPORTS=y
# BR2_PACKAGE_OPROFILE is not set
# BR2_PACKAGE_PAX_UTILS is not set
# BR2_PACKAGE_PV is not set
# BR2_PACKAGE_RAMSMP is not set
# BR2_PACKAGE_RAMSPEED is not set
# BR2_PACKAGE_RT_TESTS is not set
# BR2_PACKAGE_SPIDEV_TEST is not set
# BR2_PACKAGE_STRACE is not set
# BR2_PACKAGE_STRESS is not set
# BR2_PACKAGE_STRESS_NG is not set

#
# sysdig needs a toolchain w/ C++, gcc >= 4.7, dynamic library and a Linux kernel to be built
#
# BR2_PACKAGE_TINYMEMBENCH is not set
# BR2_PACKAGE_TRACE_CMD is not set
BR2_PACKAGE_TRINITY_ARCH_SUPPORTS=y
# BR2_PACKAGE_TRINITY is not set
# BR2_PACKAGE_UCLIBC_NG_TEST is not set
# BR2_PACKAGE_WHETSTONE is not set

#
# Development tools
#
# BR2_PACKAGE_BINUTILS is not set
# BR2_PACKAGE_BSDIFF is not set
# BR2_PACKAGE_CHECK is not set
BR2_PACKAGE_CMAKE_ARCH_SUPPORTS=y
# BR2_PACKAGE_CMAKE_CTEST is not set
# BR2_PACKAGE_CPPUNIT is not set
# BR2_PACKAGE_CVS is not set
# BR2_PACKAGE_CXXTEST is not set
# BR2_PACKAGE_FLEX is not set
# BR2_PACKAGE_GETTEXT is not set
# BR2_PACKAGE_GIT is not set
# BR2_PACKAGE_GIT_CRYPT is not set
# BR2_PACKAGE_GPERF is not set
# BR2_PACKAGE_JO is not set
# BR2_PACKAGE_JQ is not set
# BR2_PACKAGE_LIBTOOL is not set
# BR2_PACKAGE_MAKE is not set
# BR2_PACKAGE_PKGCONF is not set
# BR2_PACKAGE_SUBVERSION is not set
# BR2_PACKAGE_TREE is not set

#
# Filesystem and flash utilities
#

#
# aufs-util needs a linux kernel and a toolchain w/ threads
#
# BR2_PACKAGE_AUTOFS is not set
# BR2_PACKAGE_BTRFS_PROGS is not set
# BR2_PACKAGE_CIFS_UTILS is not set
# BR2_PACKAGE_CPIO is not set
# BR2_PACKAGE_CRAMFS is not set
# BR2_PACKAGE_CURLFTPFS is not set
# BR2_PACKAGE_DOSFSTOOLS is not set
# BR2_PACKAGE_E2FSPROGS is not set
# BR2_PACKAGE_E2TOOLS is not set
# BR2_PACKAGE_ECRYPTFS_UTILS is not set
# BR2_PACKAGE_EXFAT is not set
# BR2_PACKAGE_EXFAT_UTILS is not set
# BR2_PACKAGE_F2FS_TOOLS is not set
# BR2_PACKAGE_FLASHBENCH is not set
# BR2_PACKAGE_FWUP is not set
# BR2_PACKAGE_GENEXT2FS is not set
# BR2_PACKAGE_GENPART is not set
# BR2_PACKAGE_GENROMFS is not set
# BR2_PACKAGE_MMC_UTILS is not set
# BR2_PACKAGE_MTD is not set
# BR2_PACKAGE_MTOOLS is not set
# BR2_PACKAGE_NFS_UTILS is not set
# BR2_PACKAGE_NTFS_3G is not set
# BR2_PACKAGE_SP_OOPS_EXTRACT is not set
# BR2_PACKAGE_SQUASHFS is not set
# BR2_PACKAGE_SSHFS is not set
# BR2_PACKAGE_SUNXI_TOOLS is not set
# BR2_PACKAGE_UNIONFS is not set
# BR2_PACKAGE_XFSPROGS is not set

#
# Fonts, cursors, icons, sounds and themes
#

#
# Cursors
#
# BR2_PACKAGE_COMIX_CURSORS is not set
# BR2_PACKAGE_OBSIDIAN_CURSORS is not set

#
# Fonts
#
# BR2_PACKAGE_BITSTREAM_VERA is not set
# BR2_PACKAGE_CANTARELL is not set
# BR2_PACKAGE_DEJAVU is not set
# BR2_PACKAGE_FONT_AWESOME is not set
# BR2_PACKAGE_GHOSTSCRIPT_FONTS is not set
# BR2_PACKAGE_INCONSOLATA is not set
# BR2_PACKAGE_LIBERATION is not set

#
# Icons
#
# BR2_PACKAGE_GOOGLE_MATERIAL_DESIGN_ICONS is not set
# BR2_PACKAGE_HICOLOR_ICON_THEME is not set

#
# Sounds
#
# BR2_PACKAGE_SOUND_THEME_BOREALIS is not set
# BR2_PACKAGE_SOUND_THEME_FREEDESKTOP is not set

#
# Themes
#

#
# Games
#
# BR2_PACKAGE_CHOCOLATE_DOOM is not set
# BR2_PACKAGE_GNUCHESS is not set
# BR2_PACKAGE_LBREAKOUT2 is not set
# BR2_PACKAGE_LTRIS is not set
# BR2_PACKAGE_OPENTYRIAN is not set
# BR2_PACKAGE_PRBOOM is not set
# BR2_PACKAGE_SL is not set
# BR2_PACKAGE_STELLA is not set

#
# Graphic libraries and applications (graphic/text)
#

#
# Graphic applications
#
# BR2_PACKAGE_FSWEBCAM is not set
# BR2_PACKAGE_GHOSTSCRIPT is not set

#
# glmark2 needs an OpenGL or an openGL ES and EGL backend provided by mesa3d
#
# BR2_PACKAGE_GNUPLOT is not set
# BR2_PACKAGE_JHEAD is not set
# BR2_PACKAGE_LIBVA_UTILS is not set
# BR2_PACKAGE_PNGQUANT is not set
# BR2_PACKAGE_RRDTOOL is not set
# BR2_PACKAGE_TESSERACT_OCR is not set

#
# Graphic libraries
#
# BR2_PACKAGE_CEGUI06 is not set
# BR2_PACKAGE_DIRECTFB is not set
# BR2_PACKAGE_EFL is not set
# BR2_PACKAGE_FBDUMP is not set
# BR2_PACKAGE_FBGRAB is not set
# BR2_PACKAGE_FB_TEST_APP is not set
# BR2_PACKAGE_FBTERM is not set
# BR2_PACKAGE_FBV is not set
# BR2_PACKAGE_FREERDP is not set
# BR2_PACKAGE_IMAGEMAGICK is not set

#
# linux-fusion needs a Linux kernel to be built
#
# BR2_PACKAGE_MESA3D is not set
# BR2_PACKAGE_OCRAD is not set
# BR2_PACKAGE_PSPLASH is not set
# BR2_PACKAGE_SDL is not set
# BR2_PACKAGE_SDL2 is not set

#
# Other GUIs
#
# BR2_PACKAGE_QT is not set
BR2_PACKAGE_QT5_JSCORE_AVAILABLE=y
# BR2_PACKAGE_QT5 is not set

#
# tekui needs a Lua interpreter and a toolchain w/ threads, dynamic library
#

#
# weston needs udev and a toolchain w/ locale, threads, dynamic library, headers >= 3.0
#
# BR2_PACKAGE_XORG7 is not set

#
# midori needs libgtk3 and a glibc toolchain w/ C++, gcc >= 5, host gcc >= 4.8
#
# BR2_PACKAGE_XKEYBOARD_CONFIG is not set

#
# Hardware handling
#

#
# Firmware
#
# BR2_PACKAGE_AM33X_CM3 is not set
# BR2_PACKAGE_B43_FIRMWARE is not set
# BR2_PACKAGE_LINUX_FIRMWARE is not set
# BR2_PACKAGE_RPI_BT_FIRMWARE is not set
# BR2_PACKAGE_RPI_FIRMWARE is not set
# BR2_PACKAGE_RPI_WIFI_FIRMWARE is not set
# BR2_PACKAGE_SUNXI_BOARDS is not set
# BR2_PACKAGE_TS4900_FPGA is not set
# BR2_PACKAGE_UX500_FIRMWARE is not set
# BR2_PACKAGE_WILC1000_FIRMWARE is not set
# BR2_PACKAGE_WILINK_BT_FIRMWARE is not set
# BR2_PACKAGE_ZD1211_FIRMWARE is not set

#
# a10disp needs a Linux kernel to be built
#
# BR2_PACKAGE_ACPICA is not set
# BR2_PACKAGE_ACPITOOL is not set
# BR2_PACKAGE_AER_INJECT is not set
# BR2_PACKAGE_AM335X_PRU_PACKAGE is not set
# BR2_PACKAGE_AVRDUDE is not set

#
# bcache-tools needs udev /dev management
#
# BR2_PACKAGE_CBOOTIMAGE is not set
# BR2_PACKAGE_CC_TOOL is not set
# BR2_PACKAGE_CDRKIT is not set
# BR2_PACKAGE_CRYPTSETUP is not set
# BR2_PACKAGE_CWIID is not set
# BR2_PACKAGE_DBUS is not set
# BR2_PACKAGE_DMRAID is not set

#
# dt-utils needs udev /dev management
#
# BR2_PACKAGE_DTV_SCAN_TABLES is not set
# BR2_PACKAGE_DVB_APPS is not set
# BR2_PACKAGE_DVBSNOOP is not set
# BR2_PACKAGE_EDID_DECODE is not set
# BR2_PACKAGE_EEPROG is not set

#
# eudev needs eudev /dev management
#
# BR2_PACKAGE_EVEMU is not set
# BR2_PACKAGE_EVTEST is not set
# BR2_PACKAGE_FAN_CTRL is not set
# BR2_PACKAGE_FCONFIG is not set
# BR2_PACKAGE_FIS is not set
# BR2_PACKAGE_FMTOOLS is not set
# BR2_PACKAGE_FREESCALE_IMX is not set
# BR2_PACKAGE_FXLOAD is not set
# BR2_PACKAGE_GADGETFS_TEST is not set
# BR2_PACKAGE_GPM is not set
# BR2_PACKAGE_GPSD is not set
# BR2_PACKAGE_GPTFDISK is not set
# BR2_PACKAGE_GVFS is not set
# BR2_PACKAGE_HWDATA is not set
# BR2_PACKAGE_HWLOC is not set
# BR2_PACKAGE_INPUT_EVENT_DAEMON is not set
# BR2_PACKAGE_IOSTAT is not set
# BR2_PACKAGE_IPMITOOL is not set

#
# iqvlinux needs a Linux kernel to be built
#
# BR2_PACKAGE_IRDA_UTILS is not set
# BR2_PACKAGE_KBD is not set
# BR2_PACKAGE_LCDPROC is not set
# BR2_PACKAGE_LIBUIO is not set
# BR2_PACKAGE_LIBUMP is not set
# BR2_PACKAGE_LINUXCONSOLETOOLS is not set

#
# linux-backports needs a Linux kernel to be built
#
# BR2_PACKAGE_LIRC_TOOLS is not set
# BR2_PACKAGE_LM_SENSORS is not set
# BR2_PACKAGE_LSHW is not set
# BR2_PACKAGE_LSSCSI is not set
# BR2_PACKAGE_LSUIO is not set
# BR2_PACKAGE_LVM2 is not set

#
# mali-t76x needs a glibc toolchain with armhf enabled
#
# BR2_PACKAGE_MDADM is not set
# BR2_PACKAGE_MEMTESTER is not set
# BR2_PACKAGE_MEMTOOL is not set
# BR2_PACKAGE_MINICOM is not set
# BR2_PACKAGE_NANOCOM is not set
# BR2_PACKAGE_NEARD is not set
# BR2_PACKAGE_NVME is not set
# BR2_PACKAGE_ODROID_SCRIPTS is not set
# BR2_PACKAGE_OFONO is not set

#
# on2-8170-modules needs a Linux kernel to be built
#
# BR2_PACKAGE_OPEN2300 is not set
# BR2_PACKAGE_OPENIPMI is not set
# BR2_PACKAGE_OPENOCD is not set

#
# owl-linux needs a Linux kernel to be built
#
# BR2_PACKAGE_PARTED is not set
# BR2_PACKAGE_PCIUTILS is not set
# BR2_PACKAGE_PDBG is not set
# BR2_PACKAGE_PICOCOM is not set
# BR2_PACKAGE_PIFMRDS is not set
# BR2_PACKAGE_POWERTOP is not set
# BR2_PACKAGE_PPS_TOOLS is not set
# BR2_PACKAGE_PRU_SOFTWARE_SUPPORT is not set
# BR2_PACKAGE_READ_EDID is not set
# BR2_PACKAGE_RFKILL is not set
# BR2_PACKAGE_RNG_TOOLS is not set
# BR2_PACKAGE_RPI_USERLAND is not set
# BR2_PACKAGE_RS485CONF is not set

#
# rtl8188eu needs a Linux kernel to be built
#

#
# rtl8723bs needs a Linux kernel to be built
#

#
# rtl8821au needs a Linux kernel to be built
#
# BR2_PACKAGE_SANE_BACKENDS is not set
# BR2_PACKAGE_SDPARM is not set
# BR2_PACKAGE_SETSERIAL is not set
# BR2_PACKAGE_SG3_UTILS is not set
# BR2_PACKAGE_SIGROK_CLI is not set
# BR2_PACKAGE_SISPMCTL is not set
# BR2_PACKAGE_SMARTMONTOOLS is not set
# BR2_PACKAGE_SMSTOOLS3 is not set
# BR2_PACKAGE_SPI_TOOLS is not set
# BR2_PACKAGE_SREDIRD is not set
# BR2_PACKAGE_STATSERIAL is not set
# BR2_PACKAGE_STM32FLASH is not set
# BR2_PACKAGE_SUNXI_CEDARX is not set

#
# sunxi-mali needs an EABIhf glibc toolchain
#
# BR2_PACKAGE_SYSSTAT is not set

#
# targetcli-fb depends on Python
#

#
# ti-gfx needs a glibc toolchain and a Linux kernel to be built
#

#
# ti-sgx-km needs a Linux kernel to be built
#

#
# ti-sgx-um needs the ti-sgx-km driver
#
# BR2_PACKAGE_TI_UIM is not set
# BR2_PACKAGE_TI_UTILS is not set
# BR2_PACKAGE_TRIGGERHAPPY is not set
# BR2_PACKAGE_UBOOT_TOOLS is not set
# BR2_PACKAGE_UBUS is not set

#
# uccp420wlan needs a Linux kernel >= 4.2 to be built
#

#
# udisks needs udev /dev management
#

#
# upower needs udev /dev management
#
# BR2_PACKAGE_USB_MODESWITCH is not set
# BR2_PACKAGE_USB_MODESWITCH_DATA is not set

#
# usbmount requires udev to be enabled
#

#
# usbutils needs udev /dev management and toolchain w/ threads
#
# BR2_PACKAGE_W_SCAN is not set
# BR2_PACKAGE_WIPE is not set
# BR2_PACKAGE_XORRISO is not set

#
# xr819-xradio driver needs a Linux kernel to be built
#

#
# Interpreter languages and scripting
#
# BR2_PACKAGE_4TH is not set
# BR2_PACKAGE_ENSCRIPT is not set
BR2_PACKAGE_ERLANG_ARCH_SUPPORTS=y
# BR2_PACKAGE_ERLANG is not set
# BR2_PACKAGE_EXECLINE is not set
# BR2_PACKAGE_FICL is not set
BR2_PACKAGE_GAUCHE_ARCH_SUPPORTS=y
# BR2_PACKAGE_GAUCHE is not set
# BR2_PACKAGE_GUILE is not set
# BR2_PACKAGE_HASERL is not set
# BR2_PACKAGE_JAMVM is not set
# BR2_PACKAGE_JIMTCL is not set
# BR2_PACKAGE_LUA is not set
BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS=y
# BR2_PACKAGE_LUAJIT is not set
# BR2_PACKAGE_MICROPYTHON is not set
# BR2_PACKAGE_MOARVM is not set
BR2_PACKAGE_MONO_ARCH_SUPPORTS=y
# BR2_PACKAGE_MONO is not set
# BR2_PACKAGE_PERL is not set
# BR2_PACKAGE_PHP is not set
# BR2_PACKAGE_PYTHON is not set
# BR2_PACKAGE_PYTHON3 is not set
# BR2_PACKAGE_RUBY is not set
# BR2_PACKAGE_TCL is not set

#
# Libraries
#

#
# Audio/Sound
#
# BR2_PACKAGE_ALSA_LIB is not set
# BR2_PACKAGE_AUBIO is not set
# BR2_PACKAGE_AUDIOFILE is not set
# BR2_PACKAGE_CELT051 is not set
BR2_PACKAGE_FDK_AAC_ARCH_SUPPORTS=y
# BR2_PACKAGE_FDK_AAC is not set
# BR2_PACKAGE_LIBAO is not set
# BR2_PACKAGE_LIBASPLIB is not set
# BR2_PACKAGE_LIBBROADVOICE is not set
# BR2_PACKAGE_LIBCDAUDIO is not set
# BR2_PACKAGE_LIBCDDB is not set
# BR2_PACKAGE_LIBCDIO is not set
# BR2_PACKAGE_LIBCODEC2 is not set
# BR2_PACKAGE_LIBCUE is not set
# BR2_PACKAGE_LIBCUEFILE is not set
# BR2_PACKAGE_LIBEBUR128 is not set
# BR2_PACKAGE_LIBG7221 is not set
# BR2_PACKAGE_LIBGSM is not set
# BR2_PACKAGE_LIBID3TAG is not set
# BR2_PACKAGE_LIBILBC is not set
# BR2_PACKAGE_LIBLO is not set
# BR2_PACKAGE_LIBMAD is not set
# BR2_PACKAGE_LIBMODPLUG is not set
# BR2_PACKAGE_LIBMPD is not set
# BR2_PACKAGE_LIBMPDCLIENT is not set
# BR2_PACKAGE_LIBREPLAYGAIN is not set
# BR2_PACKAGE_LIBSAMPLERATE is not set
# BR2_PACKAGE_LIBSIDPLAY2 is not set
# BR2_PACKAGE_LIBSILK is not set
# BR2_PACKAGE_LIBSNDFILE is not set
# BR2_PACKAGE_LIBSOUNDTOUCH is not set
# BR2_PACKAGE_LIBSOXR is not set
# BR2_PACKAGE_LIBVORBIS is not set
# BR2_PACKAGE_MP4V2 is not set
BR2_PACKAGE_OPENAL_ARCH_SUPPORTS=y
# BR2_PACKAGE_OPENAL is not set
# BR2_PACKAGE_OPENCORE_AMR is not set
# BR2_PACKAGE_OPUS is not set
# BR2_PACKAGE_OPUSFILE is not set
# BR2_PACKAGE_PORTAUDIO is not set
# BR2_PACKAGE_SBC is not set
# BR2_PACKAGE_SPEEX is not set
# BR2_PACKAGE_TAGLIB is not set
# BR2_PACKAGE_TINYALSA is not set
# BR2_PACKAGE_TREMOR is not set
# BR2_PACKAGE_VO_AACENC is not set
BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING_ARCH_SUPPORTS=y
# BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING is not set

#
# Compression and decompression
#
# BR2_PACKAGE_LIBARCHIVE is not set
# BR2_PACKAGE_LIBSQUISH is not set
# BR2_PACKAGE_LIBZIP is not set
# BR2_PACKAGE_LZO is not set
# BR2_PACKAGE_MINIZIP is not set
# BR2_PACKAGE_SNAPPY is not set
# BR2_PACKAGE_SZIP is not set
# BR2_PACKAGE_ZLIB is not set

#
# Crypto
#
# BR2_PACKAGE_BEECRYPT is not set
BR2_PACKAGE_BOTAN_ARCH_SUPPORTS=y
# BR2_PACKAGE_BOTAN is not set
# BR2_PACKAGE_CA_CERTIFICATES is not set

#
# cryptodev needs a Linux kernel to be built
#
# BR2_PACKAGE_GCR is not set
# BR2_PACKAGE_GNUTLS is not set
# BR2_PACKAGE_LIBASSUAN is not set
# BR2_PACKAGE_LIBGCRYPT is not set
BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS=y
# BR2_PACKAGE_LIBGPG_ERROR is not set
BR2_PACKAGE_LIBGPG_ERROR_SYSCFG="arm-unknown-linux-gnueabi"
# BR2_PACKAGE_LIBGPGME is not set
# BR2_PACKAGE_LIBKCAPI is not set
# BR2_PACKAGE_LIBKSBA is not set
# BR2_PACKAGE_LIBMCRYPT is not set
# BR2_PACKAGE_LIBMHASH is not set
# BR2_PACKAGE_LIBNSS is not set
# BR2_PACKAGE_LIBSCRYPT is not set
# BR2_PACKAGE_LIBSECRET is not set
# BR2_PACKAGE_LIBSHA1 is not set
# BR2_PACKAGE_LIBSODIUM is not set
# BR2_PACKAGE_LIBSSH is not set
# BR2_PACKAGE_LIBSSH2 is not set
# BR2_PACKAGE_LIBTOMCRYPT is not set
# BR2_PACKAGE_LIBUECC is not set
# BR2_PACKAGE_MBEDTLS is not set
# BR2_PACKAGE_NETTLE is not set
# BR2_PACKAGE_LIBRESSL is not set
# BR2_PACKAGE_OPENSSL is not set
# BR2_PACKAGE_RHASH is not set
# BR2_PACKAGE_TINYDTLS is not set
# BR2_PACKAGE_TROUSERS is not set
# BR2_PACKAGE_USTREAM_SSL is not set

#
# Database
#
# BR2_PACKAGE_BERKELEYDB is not set
# BR2_PACKAGE_GDBM is not set
# BR2_PACKAGE_HIREDIS is not set
# BR2_PACKAGE_KOMPEXSQLITE is not set
# BR2_PACKAGE_LEVELDB is not set
# BR2_PACKAGE_MYSQL is not set
# BR2_PACKAGE_POSTGRESQL is not set
# BR2_PACKAGE_REDIS is not set
# BR2_PACKAGE_SQLCIPHER is not set
# BR2_PACKAGE_SQLITE is not set
# BR2_PACKAGE_UNIXODBC is not set

#
# Filesystem
#
# BR2_PACKAGE_GAMIN is not set
# BR2_PACKAGE_LIBCONFIG is not set
# BR2_PACKAGE_LIBCONFUSE is not set
# BR2_PACKAGE_LIBFUSE is not set
# BR2_PACKAGE_LIBLOCKFILE is not set
# BR2_PACKAGE_LIBNFS is not set
# BR2_PACKAGE_LIBSYSFS is not set
# BR2_PACKAGE_LOCKDEV is not set
# BR2_PACKAGE_PHYSFS is not set

#
# Graphics
#
# BR2_PACKAGE_ASSIMP is not set
# BR2_PACKAGE_ATK is not set
# BR2_PACKAGE_ATKMM is not set
# BR2_PACKAGE_BULLET is not set
# BR2_PACKAGE_CAIRO is not set
# BR2_PACKAGE_CAIROMM is not set
# BR2_PACKAGE_EXIV2 is not set
# BR2_PACKAGE_FONTCONFIG is not set
# BR2_PACKAGE_FREETYPE is not set
# BR2_PACKAGE_GD is not set
# BR2_PACKAGE_GDK_PIXBUF is not set
# BR2_PACKAGE_GIFLIB is not set

#
# granite needs libgtk3 and a toolchain w/ wchar, threads
#
# BR2_PACKAGE_GRAPHITE2 is not set

#
# gtkmm3 needs libgtk3 and a toolchain w/ C++, wchar, threads, gcc >= 4.8
#
# BR2_PACKAGE_HARFBUZZ is not set
# BR2_PACKAGE_IJS is not set

#
# irrlicht needs X11 and an OpenGL provider
#
# BR2_PACKAGE_IMLIB2 is not set
# BR2_PACKAGE_JASPER is not set
# BR2_PACKAGE_JPEG is not set
# BR2_PACKAGE_KMSXX is not set
# BR2_PACKAGE_LCMS2 is not set
# BR2_PACKAGE_LENSFUN is not set
# BR2_PACKAGE_LEPTONICA is not set
# BR2_PACKAGE_LIBART is not set
# BR2_PACKAGE_LIBDMTX is not set
# BR2_PACKAGE_LIBDRM is not set

#
# libepoxy needs an OpenGL and/or OpenGL EGL backend
#
# BR2_PACKAGE_LIBEXIF is not set

#
# libfm needs X.org and a toolchain w/ wchar, threads, C++
#
# BR2_PACKAGE_LIBFM_EXTRA is not set

#
# libfreeglut depends on X.org and needs an OpenGL backend
#
# BR2_PACKAGE_LIBFREEIMAGE is not set
# BR2_PACKAGE_LIBGEOTIFF is not set

#
# libglew depends on X.org and needs an OpenGL backend
#

#
# libglfw depends on X.org and needs an OpenGL backend
#

#
# libglu needs an OpenGL backend
#

#
# libgtk3 needs an OpenGL or an OpenGL-EGL/wayland backend
#
# BR2_PACKAGE_LIBMEDIAART is not set
# BR2_PACKAGE_LIBMNG is not set
# BR2_PACKAGE_LIBPNG is not set
# BR2_PACKAGE_LIBQRENCODE is not set
# BR2_PACKAGE_LIBRAW is not set
# BR2_PACKAGE_LIBRSVG is not set

#
# libsoil needs an OpenGL backend and a toolchain w/ dynamic library
#
# BR2_PACKAGE_LIBSVG is not set
# BR2_PACKAGE_LIBSVG_CAIRO is not set
# BR2_PACKAGE_LIBSVGTINY is not set
# BR2_PACKAGE_LIBVA is not set
# BR2_PACKAGE_LIBVIPS is not set
# BR2_PACKAGE_MENU_CACHE is not set
# BR2_PACKAGE_OPENCV is not set
# BR2_PACKAGE_OPENCV3 is not set
# BR2_PACKAGE_OPENJPEG is not set
# BR2_PACKAGE_PANGO is not set
# BR2_PACKAGE_PANGOMM is not set
# BR2_PACKAGE_PIXMAN is not set
# BR2_PACKAGE_POPPLER is not set
# BR2_PACKAGE_TIFF is not set
# BR2_PACKAGE_WAYLAND is not set
BR2_PACKAGE_WEBKITGTK_ARCH_SUPPORTS=y

#
# webkitgtk needs libgtk3 and a glibc toolchain w/ C++, gcc >= 5, host gcc >= 4.8
#
# BR2_PACKAGE_WEBP is not set
# BR2_PACKAGE_ZBAR is not set
# BR2_PACKAGE_ZXING_CPP is not set

#
# Hardware handling
#
# BR2_PACKAGE_ACSCCID is not set
# BR2_PACKAGE_BCM2835 is not set
# BR2_PACKAGE_C_PERIPHERY is not set
# BR2_PACKAGE_CCID is not set
# BR2_PACKAGE_DTC is not set
# BR2_PACKAGE_GNU_EFI is not set

#
# hidapi needs udev /dev management and a toolchain w/ NPTL threads
#
# BR2_PACKAGE_LCDAPI is not set
# BR2_PACKAGE_LET_ME_CREATE is not set
BR2_PACKAGE_LIBAIO_ARCH_SUPPORTS=y
# BR2_PACKAGE_LIBAIO is not set

#
# libatasmart requires udev to be enabled
#
# BR2_PACKAGE_LIBCEC is not set
# BR2_PACKAGE_LIBFREEFARE is not set
# BR2_PACKAGE_LIBFTDI is not set
# BR2_PACKAGE_LIBFTDI1 is not set
# BR2_PACKAGE_LIBGPHOTO2 is not set
# BR2_PACKAGE_LIBGPIOD is not set

#
# libgudev needs udev /dev handling and a toolchain w/ wchar, threads
#
# BR2_PACKAGE_LIBHID is not set
# BR2_PACKAGE_LIBIIO is not set

#
# libinput needs udev /dev management and a toolchain w/ locale
#
# BR2_PACKAGE_LIBIQRF is not set
# BR2_PACKAGE_LIBLLCP is not set

#
# libmbim needs udev /dev management and a toolchain w/ wchar, threads
#
# BR2_PACKAGE_LIBNFC is not set
# BR2_PACKAGE_LIBPCIACCESS is not set
# BR2_PACKAGE_LIBPHIDGET is not set
# BR2_PACKAGE_LIBQMI is not set
# BR2_PACKAGE_LIBRAW1394 is not set
# BR2_PACKAGE_LIBRTLSDR is not set
# BR2_PACKAGE_LIBSERIAL is not set
# BR2_PACKAGE_LIBSERIALPORT is not set
# BR2_PACKAGE_LIBSIGROK is not set
# BR2_PACKAGE_LIBSIGROKDECODE is not set
# BR2_PACKAGE_LIBSOC is not set
# BR2_PACKAGE_LIBUSB is not set
# BR2_PACKAGE_LIBUSBGX is not set
# BR2_PACKAGE_LIBV4L is not set
# BR2_PACKAGE_LIBXKBCOMMON is not set
# BR2_PACKAGE_MRAA is not set
# BR2_PACKAGE_MTDEV is not set

#
# ne10 needs a toolchain w/ neon
#
# BR2_PACKAGE_NEARDAL is not set
# BR2_PACKAGE_OWFS is not set
# BR2_PACKAGE_PCSC_LITE is not set
# BR2_PACKAGE_TSLIB is not set
# BR2_PACKAGE_URG is not set
# BR2_PACKAGE_WIRINGPI is not set

#
# Javascript
#
# BR2_PACKAGE_ANGULARJS is not set
# BR2_PACKAGE_BOOTSTRAP is not set
# BR2_PACKAGE_EXPLORERCANVAS is not set
# BR2_PACKAGE_FLOT is not set
# BR2_PACKAGE_JQUERY is not set
# BR2_PACKAGE_JSMIN is not set
# BR2_PACKAGE_JSON_JAVASCRIPT is not set

#
# JSON/XML
#
# BR2_PACKAGE_BENEJSON is not set
# BR2_PACKAGE_CJSON is not set
# BR2_PACKAGE_EXPAT is not set
# BR2_PACKAGE_EZXML is not set
# BR2_PACKAGE_JANSSON is not set
# BR2_PACKAGE_JSMN is not set
# BR2_PACKAGE_JSON_C is not set
# BR2_PACKAGE_JSON_GLIB is not set
# BR2_PACKAGE_JSONCPP is not set
# BR2_PACKAGE_LIBBSON is not set
# BR2_PACKAGE_LIBFASTJSON is not set
# BR2_PACKAGE_LIBJSON is not set
# BR2_PACKAGE_LIBROXML is not set
# BR2_PACKAGE_LIBUCL is not set
# BR2_PACKAGE_LIBXML2 is not set
# BR2_PACKAGE_LIBXMLPP is not set
# BR2_PACKAGE_LIBXMLRPC is not set
# BR2_PACKAGE_LIBXSLT is not set
# BR2_PACKAGE_LIBYAML is not set
# BR2_PACKAGE_MXML is not set
# BR2_PACKAGE_PUGIXML is not set
# BR2_PACKAGE_RAPIDJSON is not set
# BR2_PACKAGE_RAPIDXML is not set
# BR2_PACKAGE_RAPTOR is not set
# BR2_PACKAGE_TINYXML is not set
# BR2_PACKAGE_TINYXML2 is not set
# BR2_PACKAGE_VALIJSON is not set
# BR2_PACKAGE_XERCES is not set
# BR2_PACKAGE_YAJL is not set
# BR2_PACKAGE_YAML_CPP is not set

#
# Logging
#
# BR2_PACKAGE_EVENTLOG is not set
# BR2_PACKAGE_GLOG is not set
# BR2_PACKAGE_LIBLOG4C_LOCALTIME is not set
# BR2_PACKAGE_LIBLOGGING is not set
# BR2_PACKAGE_LOG4CPLUS is not set
# BR2_PACKAGE_LOG4CPP is not set
# BR2_PACKAGE_LOG4CXX is not set
# BR2_PACKAGE_ZLOG is not set

#
# Multimedia
#
# BR2_PACKAGE_BITSTREAM is not set
# BR2_PACKAGE_KVAZAAR is not set
# BR2_PACKAGE_LIBAACS is not set
# BR2_PACKAGE_LIBAMCODEC is not set
# BR2_PACKAGE_LIBASS is not set
# BR2_PACKAGE_LIBBDPLUS is not set
# BR2_PACKAGE_LIBBLURAY is not set
# BR2_PACKAGE_LIBDCADEC is not set
# BR2_PACKAGE_LIBDVBCSA is not set
# BR2_PACKAGE_LIBDVBPSI is not set
# BR2_PACKAGE_LIBDVBSI is not set
# BR2_PACKAGE_LIBDVDCSS is not set
# BR2_PACKAGE_LIBDVDNAV is not set
# BR2_PACKAGE_LIBDVDREAD is not set
# BR2_PACKAGE_LIBEBML is not set
# BR2_PACKAGE_LIBHDHOMERUN is not set

#
# libimxvpuapi needs an i.MX platform with VPU support
#
# BR2_PACKAGE_LIBMATROSKA is not set
# BR2_PACKAGE_LIBMMS is not set
# BR2_PACKAGE_LIBMPEG2 is not set
# BR2_PACKAGE_LIBOGG is not set
BR2_PACKAGE_LIBOPENH264_ARCH_SUPPORTS=y
# BR2_PACKAGE_LIBOPENH264 is not set
# BR2_PACKAGE_LIBPLAYER is not set
# BR2_PACKAGE_LIBTHEORA is not set
# BR2_PACKAGE_LIBVPX is not set
# BR2_PACKAGE_LIBYUV is not set
# BR2_PACKAGE_LIVE555 is not set
# BR2_PACKAGE_MEDIASTREAMER is not set
# BR2_PACKAGE_X264 is not set
# BR2_PACKAGE_X265 is not set

#
# Networking
#
# BR2_PACKAGE_AGENTPP is not set
# BR2_PACKAGE_ALLJOYN is not set
# BR2_PACKAGE_ALLJOYN_BASE is not set
# BR2_PACKAGE_ALLJOYN_TCL is not set
# BR2_PACKAGE_ALLJOYN_TCL_BASE is not set
# BR2_PACKAGE_AZURE_IOT_SDK_C is not set

#
# batman-adv needs a Linux kernel to be built
#
# BR2_PACKAGE_C_ARES is not set
BR2_PACKAGE_CANFESTIVAL_ARCH_SUPPORTS=y
# BR2_PACKAGE_CANFESTIVAL is not set
# BR2_PACKAGE_CGIC is not set
# BR2_PACKAGE_CPPZMQ is not set
# BR2_PACKAGE_CZMQ is not set
# BR2_PACKAGE_FILEMQ is not set
# BR2_PACKAGE_FLICKCURL is not set
# BR2_PACKAGE_FREERADIUS_CLIENT is not set
# BR2_PACKAGE_GEOIP is not set
# BR2_PACKAGE_GLIB_NETWORKING is not set
# BR2_PACKAGE_GSSDP is not set
# BR2_PACKAGE_GUPNP is not set
# BR2_PACKAGE_GUPNP_AV is not set
# BR2_PACKAGE_GUPNP_DLNA is not set
# BR2_PACKAGE_IBRCOMMON is not set
# BR2_PACKAGE_IBRDTN is not set
# BR2_PACKAGE_LIBCGI is not set
# BR2_PACKAGE_LIBCGICC is not set
# BR2_PACKAGE_LIBCOAP is not set
# BR2_PACKAGE_LIBCURL is not set
# BR2_PACKAGE_LIBDNET is not set
# BR2_PACKAGE_LIBEXOSIP2 is not set
# BR2_PACKAGE_LIBFCGI is not set
# BR2_PACKAGE_LIBGSASL is not set
# BR2_PACKAGE_LIBHTTPPARSER is not set
# BR2_PACKAGE_LIBIDN is not set
# BR2_PACKAGE_LIBISCSI is not set
# BR2_PACKAGE_LIBLDNS is not set
# BR2_PACKAGE_LIBMAXMINDDB is not set
# BR2_PACKAGE_LIBMBUS is not set
# BR2_PACKAGE_LIBMEMCACHED is not set
# BR2_PACKAGE_LIBMICROHTTPD is not set
# BR2_PACKAGE_LIBMINIUPNPC is not set
# BR2_PACKAGE_LIBMNL is not set
# BR2_PACKAGE_LIBMODBUS is not set
# BR2_PACKAGE_LIBNATPMP is not set
# BR2_PACKAGE_LIBNDP is not set
# BR2_PACKAGE_LIBNET is not set
# BR2_PACKAGE_LIBNETFILTER_ACCT is not set
# BR2_PACKAGE_LIBNETFILTER_CONNTRACK is not set
# BR2_PACKAGE_LIBNETFILTER_CTHELPER is not set
# BR2_PACKAGE_LIBNETFILTER_CTTIMEOUT is not set
# BR2_PACKAGE_LIBNETFILTER_LOG is not set
# BR2_PACKAGE_LIBNETFILTER_QUEUE is not set
# BR2_PACKAGE_LIBNFNETLINK is not set
# BR2_PACKAGE_LIBNFTNL is not set
# BR2_PACKAGE_LIBNICE is not set
# BR2_PACKAGE_LIBNL is not set
# BR2_PACKAGE_LIBOAUTH is not set
# BR2_PACKAGE_LIBOPING is not set
# BR2_PACKAGE_LIBOSIP2 is not set
# BR2_PACKAGE_LIBPCAP is not set
# BR2_PACKAGE_LIBPJSIP is not set
# BR2_PACKAGE_LIBRSYNC is not set
# BR2_PACKAGE_LIBSHAIRPLAY is not set
# BR2_PACKAGE_LIBSHOUT is not set
# BR2_PACKAGE_LIBSOCKETCAN is not set
# BR2_PACKAGE_LIBSOUP is not set
# BR2_PACKAGE_LIBSRTP is not set
# BR2_PACKAGE_LIBSTROPHE is not set
# BR2_PACKAGE_LIBTIRPC is not set
# BR2_PACKAGE_LIBTORRENT is not set
# BR2_PACKAGE_LIBUPNP is not set
# BR2_PACKAGE_LIBUPNPP is not set
# BR2_PACKAGE_LIBURIPARSER is not set
# BR2_PACKAGE_LIBVNCSERVER is not set
# BR2_PACKAGE_LIBWEBSOCK is not set
# BR2_PACKAGE_LIBWEBSOCKETS is not set
# BR2_PACKAGE_LKSCTP_TOOLS is not set
# BR2_PACKAGE_MONGOOSE is not set
# BR2_PACKAGE_NANOMSG is not set
# BR2_PACKAGE_NEON is not set
# BR2_PACKAGE_NORM is not set
# BR2_PACKAGE_NSS_PAM_LDAPD is not set
# BR2_PACKAGE_OMNIORB is not set
# BR2_PACKAGE_OPENLDAP is not set
# BR2_PACKAGE_OPENMPI is not set
# BR2_PACKAGE_OPENPGM is not set

#
# openzwave needs udev and a toolchain w/ C++, threads, wchar
#
# BR2_PACKAGE_ORTP is not set
# BR2_PACKAGE_PAHO_MQTT_C is not set
# BR2_PACKAGE_QDECODER is not set
# BR2_PACKAGE_QPID_PROTON is not set
# BR2_PACKAGE_RABBITMQ_C is not set
# BR2_PACKAGE_RTMPDUMP is not set
# BR2_PACKAGE_SLIRP is not set
# BR2_PACKAGE_SNMPPP is not set
# BR2_PACKAGE_SOFIA_SIP is not set
# BR2_PACKAGE_THRIFT is not set
# BR2_PACKAGE_USBREDIR is not set
# BR2_PACKAGE_ZEROMQ is not set
# BR2_PACKAGE_ZMQPP is not set
# BR2_PACKAGE_ZYRE is not set

#
# Other
#
# BR2_PACKAGE_APR is not set
# BR2_PACKAGE_APR_UTIL is not set
# BR2_PACKAGE_ARMADILLO is not set
# BR2_PACKAGE_ATF is not set
# BR2_PACKAGE_BCTOOLBOX is not set
# BR2_PACKAGE_BDWGC is not set
# BR2_PACKAGE_BOOST is not set
# BR2_PACKAGE_CLAPACK is not set
BR2_PACKAGE_CLASSPATH_ARCH_SUPPORTS=y
# BR2_PACKAGE_CLASSPATH is not set
# BR2_PACKAGE_CPPCMS is not set
# BR2_PACKAGE_CRACKLIB is not set
# BR2_PACKAGE_DAWGDIC is not set
# BR2_PACKAGE_DING_LIBS is not set
# BR2_PACKAGE_EIGEN is not set
# BR2_PACKAGE_ELFUTILS is not set
# BR2_PACKAGE_FFTW is not set
# BR2_PACKAGE_FLANN is not set
# BR2_PACKAGE_GFLAGS is not set
# BR2_PACKAGE_GLIBMM is not set
# BR2_PACKAGE_GLM is not set
# BR2_PACKAGE_GMP is not set
# BR2_PACKAGE_GSL is not set
# BR2_PACKAGE_GTEST is not set
BR2_PACKAGE_JEMALLOC_ARCH_SUPPORTS=y
# BR2_PACKAGE_JEMALLOC is not set

#
# lapack/blas needs a toolchain w/ fortran
#
# BR2_PACKAGE_LIBARGTABLE2 is not set
BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS=y
# BR2_PACKAGE_LIBATOMIC_OPS is not set
BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS=y
# BR2_PACKAGE_LIBBSD is not set
# BR2_PACKAGE_LIBCAP is not set
# BR2_PACKAGE_LIBCAP_NG is not set
# BR2_PACKAGE_LIBCGROUP is not set
# BR2_PACKAGE_LIBCOFI is not set
# BR2_PACKAGE_LIBCROCO is not set
# BR2_PACKAGE_LIBCROSSGUID is not set
# BR2_PACKAGE_LIBCSV is not set
# BR2_PACKAGE_LIBDAEMON is not set
# BR2_PACKAGE_LIBEE is not set
# BR2_PACKAGE_LIBEV is not set
# BR2_PACKAGE_LIBEVDEV is not set
# BR2_PACKAGE_LIBEVENT is not set
# BR2_PACKAGE_LIBFFI is not set
# BR2_PACKAGE_LIBGEE is not set
# BR2_PACKAGE_LIBGLIB2 is not set
# BR2_PACKAGE_LIBGLOB is not set
# BR2_PACKAGE_LIBICAL is not set
# BR2_PACKAGE_LIBITE is not set
# BR2_PACKAGE_LIBLINEAR is not set
# BR2_PACKAGE_LIBLOKI is not set
# BR2_PACKAGE_LIBNPTH is not set
BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT=y
# BR2_PACKAGE_LIBNSPR is not set
# BR2_PACKAGE_LIBPFM4 is not set
# BR2_PACKAGE_LIBPLIST is not set
# BR2_PACKAGE_LIBPTHREAD_STUBS is not set
# BR2_PACKAGE_LIBPTHSEM is not set
# BR2_PACKAGE_LIBPWQUALITY is not set
BR2_PACKAGE_LIBSECCOMP_ARCH_SUPPORTS=y
# BR2_PACKAGE_LIBSECCOMP is not set
# BR2_PACKAGE_LIBSIGC is not set
BR2_PACKAGE_LIBSIGSEGV_ARCH_SUPPORTS=y
# BR2_PACKAGE_LIBSIGSEGV is not set
# BR2_PACKAGE_LIBSPATIALINDEX is not set
# BR2_PACKAGE_LIBTASN1 is not set
# BR2_PACKAGE_LIBTOMMATH is not set
# BR2_PACKAGE_LIBTPL is not set
# BR2_PACKAGE_LIBUBOX is not set
# BR2_PACKAGE_LIBUCI is not set
BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS=y
# BR2_PACKAGE_LIBUNWIND is not set
BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS=y
# BR2_PACKAGE_LIBURCU is not set
# BR2_PACKAGE_LIBUV is not set
# BR2_PACKAGE_LIGHTNING is not set
# BR2_PACKAGE_LINUX_PAM is not set
# BR2_PACKAGE_LIQUID_DSP is not set
# BR2_PACKAGE_LTTNG_LIBUST is not set
# BR2_PACKAGE_MPC is not set
# BR2_PACKAGE_MPDECIMAL is not set
# BR2_PACKAGE_MPFR is not set
# BR2_PACKAGE_MPIR is not set
# BR2_PACKAGE_MSGPACK is not set
# BR2_PACKAGE_MTDEV2TUIO is not set
BR2_PACKAGE_OPENBLAS_DEFAULT_TARGET="ARMV5"
BR2_PACKAGE_OPENBLAS_ARCH_SUPPORTS=y
# BR2_PACKAGE_OPENBLAS is not set
# BR2_PACKAGE_ORC is not set
# BR2_PACKAGE_P11_KIT is not set
# BR2_PACKAGE_POCO is not set
BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS=y
# BR2_PACKAGE_PROTOBUF is not set
# BR2_PACKAGE_PROTOBUF_C is not set
# BR2_PACKAGE_QHULL is not set
# BR2_PACKAGE_QLIBC is not set
# BR2_PACKAGE_RIEMANN_C_CLIENT is not set
# BR2_PACKAGE_SHAPELIB is not set
# BR2_PACKAGE_SKALIBS is not set
# BR2_PACKAGE_SPHINXBASE is not set
# BR2_PACKAGE_TINYCBOR is not set
BR2_PACKAGE_TZDATA=y

#
# Security
#
# BR2_PACKAGE_LIBSELINUX is not set
# BR2_PACKAGE_LIBSEMANAGE is not set
# BR2_PACKAGE_LIBSEPOL is not set

#
# Text and terminal handling
#
# BR2_PACKAGE_AUGEAS is not set
# BR2_PACKAGE_ENCHANT is not set
# BR2_PACKAGE_FMT is not set
# BR2_PACKAGE_ICU is not set
# BR2_PACKAGE_LIBCLI is not set
# BR2_PACKAGE_LIBEDIT is not set
# BR2_PACKAGE_LIBENCA is not set
# BR2_PACKAGE_LIBESTR is not set
# BR2_PACKAGE_LIBFRIBIDI is not set
# BR2_PACKAGE_LIBUNISTRING is not set
# BR2_PACKAGE_LINENOISE is not set
# BR2_PACKAGE_NCURSES is not set
# BR2_PACKAGE_NEWT is not set
# BR2_PACKAGE_PCRE is not set
# BR2_PACKAGE_PCRE2 is not set
# BR2_PACKAGE_POPT is not set
# BR2_PACKAGE_READLINE is not set
# BR2_PACKAGE_SLANG is not set
# BR2_PACKAGE_TCLAP is not set
# BR2_PACKAGE_USTR is not set

#
# Mail
#
# BR2_PACKAGE_DOVECOT is not set
# BR2_PACKAGE_EXIM is not set
# BR2_PACKAGE_FETCHMAIL is not set
# BR2_PACKAGE_HEIRLOOM_MAILX is not set
# BR2_PACKAGE_LIBESMTP is not set
# BR2_PACKAGE_MSMTP is not set
# BR2_PACKAGE_MUTT is not set

#
# Miscellaneous
#
# BR2_PACKAGE_AESPIPE is not set
# BR2_PACKAGE_BC is not set
# BR2_PACKAGE_CLAMAV is not set
# BR2_PACKAGE_COLLECTD is not set

#
# domoticz needs lua >= 5.2 and a toolchain w/ C++, threads, wchar, dynamic library
#
# BR2_PACKAGE_EMPTY is not set
# BR2_PACKAGE_GNURADIO is not set
# BR2_PACKAGE_GOOGLEFONTDIRECTORY is not set

#
# gqrx needs qt5, gnuradio, fftw's single precision
#
# BR2_PACKAGE_GSETTINGS_DESKTOP_SCHEMAS is not set
# BR2_PACKAGE_HAVEGED is not set
# BR2_PACKAGE_LINUX_SYSCALL_SUPPORT is not set
# BR2_PACKAGE_MCRYPT is not set
# BR2_PACKAGE_MOBILE_BROADBAND_PROVIDER_INFO is not set
BR2_PACKAGE_QEMU_ARCH_SUPPORTS_TARGET=y
# BR2_PACKAGE_QEMU is not set
# BR2_PACKAGE_QPDF is not set
# BR2_PACKAGE_SHARED_MIME_INFO is not set
# BR2_PACKAGE_TASKD is not set
# BR2_PACKAGE_XUTIL_UTIL_MACROS is not set

#
# Networking applications
#
# BR2_PACKAGE_AICCU is not set
# BR2_PACKAGE_AIRCRACK_NG is not set
# BR2_PACKAGE_APACHE is not set
# BR2_PACKAGE_ARGUS is not set
# BR2_PACKAGE_ARP_SCAN is not set
# BR2_PACKAGE_ARPTABLES is not set
# BR2_PACKAGE_ATFTP is not set
# BR2_PACKAGE_AVAHI is not set
# BR2_PACKAGE_AXEL is not set
# BR2_PACKAGE_BABELD is not set
# BR2_PACKAGE_BANDWIDTHD is not set
# BR2_PACKAGE_BATCTL is not set
# BR2_PACKAGE_BCUSDK is not set
# BR2_PACKAGE_BIND is not set
# BR2_PACKAGE_BLUEZ_UTILS is not set
# BR2_PACKAGE_BLUEZ5_UTILS is not set
# BR2_PACKAGE_BMON is not set
# BR2_PACKAGE_BOA is not set
# BR2_PACKAGE_BRIDGE_UTILS is not set
# BR2_PACKAGE_BWM_NG is not set
# BR2_PACKAGE_C_ICAP is not set
# BR2_PACKAGE_CAN_UTILS is not set
# BR2_PACKAGE_CANNELLONI is not set
# BR2_PACKAGE_CHRONY is not set
# BR2_PACKAGE_CIVETWEB is not set
# BR2_PACKAGE_CONNMAN is not set

#
# connman-gtk needs libgtk3 and a glibc or uClibc toolchain w/ wchar, threads, resolver, dynamic library
#
# BR2_PACKAGE_CONNTRACK_TOOLS is not set
# BR2_PACKAGE_CRDA is not set
# BR2_PACKAGE_CTORRENT is not set
# BR2_PACKAGE_CUPS is not set
# BR2_PACKAGE_DANTE is not set
# BR2_PACKAGE_DARKHTTPD is not set
# BR2_PACKAGE_DHCPCD is not set
# BR2_PACKAGE_DHCPDUMP is not set
# BR2_PACKAGE_DNSMASQ is not set
# BR2_PACKAGE_DRBD_UTILS is not set
# BR2_PACKAGE_DROPBEAR is not set
# BR2_PACKAGE_EBTABLES is not set

#
# ebtables needs a glibc or uClibc toolchain
#

#
# ejabberd needs erlang, toolchain w/ C++
#
# BR2_PACKAGE_ETHTOOL is not set
# BR2_PACKAGE_FAIFA is not set
# BR2_PACKAGE_FASTD is not set
# BR2_PACKAGE_FCGIWRAP is not set
# BR2_PACKAGE_FLANNEL is not set
# BR2_PACKAGE_FPING is not set
# BR2_PACKAGE_FREESWITCH is not set
# BR2_PACKAGE_GESFTPSERVER is not set

#
# gupnp-tools needs libgtk3
#
# BR2_PACKAGE_HANS is not set
# BR2_PACKAGE_HIAWATHA is not set
# BR2_PACKAGE_HOSTAPD is not set
# BR2_PACKAGE_HTTPING is not set
# BR2_PACKAGE_IBRDTN_TOOLS is not set
# BR2_PACKAGE_IBRDTND is not set
# BR2_PACKAGE_IFTOP is not set
BR2_PACKAGE_IFUPDOWN_SCRIPTS=y
# BR2_PACKAGE_IGD2_FOR_LINUX is not set

#
# igh-ethercat needs a Linux kernel to be built
#
# BR2_PACKAGE_IGMPPROXY is not set
# BR2_PACKAGE_INADYN is not set
# BR2_PACKAGE_IODINE is not set
# BR2_PACKAGE_IPERF is not set
# BR2_PACKAGE_IPERF3 is not set
# BR2_PACKAGE_IPROUTE2 is not set
# BR2_PACKAGE_IPSEC_TOOLS is not set
# BR2_PACKAGE_IPSET is not set
# BR2_PACKAGE_IPTABLES is not set
# BR2_PACKAGE_IPTRAF_NG is not set
# BR2_PACKAGE_IPUTILS is not set
# BR2_PACKAGE_IRSSI is not set
# BR2_PACKAGE_IW is not set
# BR2_PACKAGE_JANUS_GATEWAY is not set
# BR2_PACKAGE_KEEPALIVED is not set
# BR2_PACKAGE_KISMET is not set
# BR2_PACKAGE_KNOCK is not set
# BR2_PACKAGE_LEAFNODE2 is not set
# BR2_PACKAGE_LFT is not set
# BR2_PACKAGE_LFTP is not set
# BR2_PACKAGE_LIGHTTPD is not set
# BR2_PACKAGE_LINKNX is not set
# BR2_PACKAGE_LINKS is not set
# BR2_PACKAGE_LINPHONE is not set
# BR2_PACKAGE_LINUX_ZIGBEE is not set
# BR2_PACKAGE_LINUXPTP is not set
# BR2_PACKAGE_LLDPD is not set
# BR2_PACKAGE_LRZSZ is not set
# BR2_PACKAGE_MACCHANGER is not set
# BR2_PACKAGE_MEMCACHED is not set
# BR2_PACKAGE_MII_DIAG is not set
# BR2_PACKAGE_MINIDLNA is not set
# BR2_PACKAGE_MINISSDPD is not set
# BR2_PACKAGE_MJPG_STREAMER is not set

#
# modemmanager needs udev /dev management and a toolchain w/ wchar, threads
#
BR2_PACKAGE_MONGREL2_LIBC_SUPPORTS=y
# BR2_PACKAGE_MONGREL2 is not set
# BR2_PACKAGE_MONKEY is not set
# BR2_PACKAGE_MOSH is not set
# BR2_PACKAGE_MOSQUITTO is not set
# BR2_PACKAGE_MROUTED is not set
# BR2_PACKAGE_MTR is not set
# BR2_PACKAGE_NBD is not set
# BR2_PACKAGE_NCFTP is not set
# BR2_PACKAGE_NDISC6 is not set
# BR2_PACKAGE_NETATALK is not set
# BR2_PACKAGE_NETPLUG is not set
# BR2_PACKAGE_NETSNMP is not set
# BR2_PACKAGE_NETSTAT_NAT is not set

#
# NetworkManager needs udev /dev management and a glibc toolchain w/ headers >= 3.7, dynamic library
#
# BR2_PACKAGE_NFACCT is not set
# BR2_PACKAGE_NFTABLES is not set
# BR2_PACKAGE_NGINX is not set
# BR2_PACKAGE_NGIRCD is not set
# BR2_PACKAGE_NGREP is not set
# BR2_PACKAGE_NLOAD is not set
# BR2_PACKAGE_NMAP is not set
# BR2_PACKAGE_NOIP is not set
# BR2_PACKAGE_NTP is not set
# BR2_PACKAGE_NUTTCP is not set
# BR2_PACKAGE_ODHCP6C is not set
# BR2_PACKAGE_ODHCPLOC is not set
# BR2_PACKAGE_OLSR is not set
# BR2_PACKAGE_OPEN_PLC_UTILS is not set
# BR2_PACKAGE_OPENNTPD is not set
# BR2_PACKAGE_OPENOBEX is not set
# BR2_PACKAGE_OPENSSH is not set
# BR2_PACKAGE_OPENSWAN is not set
# BR2_PACKAGE_OPENVPN is not set
# BR2_PACKAGE_P910ND is not set
# BR2_PACKAGE_PHIDGETWEBSERVICE is not set
# BR2_PACKAGE_PHYTOOL is not set
# BR2_PACKAGE_POUND is not set
# BR2_PACKAGE_PPPD is not set
# BR2_PACKAGE_PPTP_LINUX is not set
# BR2_PACKAGE_PRIVOXY is not set
# BR2_PACKAGE_PROFTPD is not set
# BR2_PACKAGE_PROXYCHAINS_NG is not set
# BR2_PACKAGE_PTPD is not set
# BR2_PACKAGE_PTPD2 is not set
# BR2_PACKAGE_PURE_FTPD is not set
# BR2_PACKAGE_PUTTY is not set
# BR2_PACKAGE_QUAGGA is not set

#
# rabbitmq-server needs erlang
#
# BR2_PACKAGE_RADVD is not set
# BR2_PACKAGE_RP_PPPOE is not set
# BR2_PACKAGE_RPCBIND is not set
# BR2_PACKAGE_RSH_REDONE is not set
# BR2_PACKAGE_RSYNC is not set
# BR2_PACKAGE_RTORRENT is not set
# BR2_PACKAGE_RTPTOOLS is not set
# BR2_PACKAGE_S6_DNS is not set
# BR2_PACKAGE_S6_NETWORKING is not set
# BR2_PACKAGE_SAMBA4 is not set
# BR2_PACKAGE_SCONESERVER is not set
# BR2_PACKAGE_SER2NET is not set
# BR2_PACKAGE_SHAIRPORT_SYNC is not set
# BR2_PACKAGE_SHELLINABOX is not set
# BR2_PACKAGE_SMCROUTE is not set
# BR2_PACKAGE_SNGREP is not set
# BR2_PACKAGE_SOCAT is not set
# BR2_PACKAGE_SOCKETCAND is not set
# BR2_PACKAGE_SOFTETHER is not set
# BR2_PACKAGE_SPAWN_FCGI is not set
# BR2_PACKAGE_SPICE_PROTOCOL is not set
# BR2_PACKAGE_SQUID is not set
# BR2_PACKAGE_SSHPASS is not set
# BR2_PACKAGE_SSLH is not set
# BR2_PACKAGE_STRONGSWAN is not set
# BR2_PACKAGE_STUNNEL is not set
# BR2_PACKAGE_TCPDUMP is not set
# BR2_PACKAGE_TCPING is not set
# BR2_PACKAGE_TCPREPLAY is not set
# BR2_PACKAGE_THTTPD is not set
# BR2_PACKAGE_TINC is not set
# BR2_PACKAGE_TINYHTTPD is not set
# BR2_PACKAGE_TN5250 is not set
# BR2_PACKAGE_TOR is not set
# BR2_PACKAGE_TRANSMISSION is not set
# BR2_PACKAGE_TUNCTL is not set
# BR2_PACKAGE_TVHEADEND is not set
# BR2_PACKAGE_UDPCAST is not set
# BR2_PACKAGE_UHTTPD is not set
# BR2_PACKAGE_ULOGD is not set
# BR2_PACKAGE_USHARE is not set
# BR2_PACKAGE_USSP_PUSH is not set
# BR2_PACKAGE_VDE2 is not set
# BR2_PACKAGE_VDR is not set
# BR2_PACKAGE_VNSTAT is not set
# BR2_PACKAGE_VPNC is not set
# BR2_PACKAGE_VSFTPD is not set
# BR2_PACKAGE_VTUN is not set
# BR2_PACKAGE_WAVEMON is not set
# BR2_PACKAGE_WIRELESS_REGDB is not set
# BR2_PACKAGE_WIRELESS_TOOLS is not set
# BR2_PACKAGE_WIRESHARK is not set
# BR2_PACKAGE_WPA_SUPPLICANT is not set
# BR2_PACKAGE_WPAN_TOOLS is not set
# BR2_PACKAGE_XINETD is not set
# BR2_PACKAGE_XL2TP is not set

#
# xtables-addons needs a Linux kernel to be built
#
# BR2_PACKAGE_ZNC is not set

#
# Package managers
#

#
# -------------------------------------------------------
#

#
# Please note:                                           
#

#
# - Buildroot does *not* generate binary packages,       
#

#
# - Buildroot does *not* install any package database.   
#

#
# *                                                      
#

#
# It is up to you to provide those by yourself if you    
#

#
# want to use any of those package managers.             
#

#
# *                                                      
#

#
# See the manual:                                        
#

#
# http://buildroot.org/manual.html#faq-no-binary-packages
#

#
# -------------------------------------------------------
#
# BR2_PACKAGE_OPKG is not set

#
# Real-Time
#
BR2_PACKAGE_XENOMAI_ARCH_SUPPORTS=y
# BR2_PACKAGE_XENOMAI is not set

#
# Security
#
# BR2_PACKAGE_CHECKPOLICY is not set
# BR2_PACKAGE_PAXTEST is not set
# BR2_PACKAGE_POLICYCOREUTILS is not set
# BR2_PACKAGE_REFPOLICY is not set
# BR2_PACKAGE_SEPOLGEN is not set
# BR2_PACKAGE_SETOOLS is not set

#
# Shell and utilities
#

#
# Shells
#
# BR2_PACKAGE_MKSH is not set

#
# Utilities
#
# BR2_PACKAGE_AT is not set
# BR2_PACKAGE_CCRYPT is not set
# BR2_PACKAGE_DIALOG is not set
# BR2_PACKAGE_DTACH is not set
# BR2_PACKAGE_FILE is not set
# BR2_PACKAGE_EASY_RSA is not set
# BR2_PACKAGE_GNUPG is not set
# BR2_PACKAGE_GNUPG2 is not set
# BR2_PACKAGE_INOTIFY_TOOLS is not set
# BR2_PACKAGE_LOCKFILE_PROGS is not set
# BR2_PACKAGE_LOGROTATE is not set
# BR2_PACKAGE_LOGSURFER is not set
# BR2_PACKAGE_PINENTRY is not set
# BR2_PACKAGE_RANGER is not set
# BR2_PACKAGE_SCREEN is not set
# BR2_PACKAGE_SUDO is not set
# BR2_PACKAGE_TMUX is not set
# BR2_PACKAGE_XMLSTARLET is not set
# BR2_PACKAGE_XXHASH is not set

#
# System tools
#
# BR2_PACKAGE_ACL is not set
# BR2_PACKAGE_ANDROID_TOOLS is not set
# BR2_PACKAGE_ATOP is not set
# BR2_PACKAGE_ATTR is not set
BR2_PACKAGE_AUDIT_ARCH_SUPPORTS=y
# BR2_PACKAGE_AUDIT is not set
# BR2_PACKAGE_CGROUPFS_MOUNT is not set

#
# circus needs Python and a toolchain w/ C++, threads
#
# BR2_PACKAGE_CPULOAD is not set
# BR2_PACKAGE_DAEMON is not set
# BR2_PACKAGE_DC3DD is not set
# BR2_PACKAGE_DDRESCUE is not set
# BR2_PACKAGE_DOCKER_CONTAINERD is not set
# BR2_PACKAGE_DOCKER_ENGINE is not set
# BR2_PACKAGE_EFIBOOTMGR is not set
BR2_PACKAGE_EFIVAR_ARCH_SUPPORTS=y
# BR2_PACKAGE_EFIVAR is not set

#
# emlog needs a Linux kernel to be built
#
# BR2_PACKAGE_FTOP is not set
# BR2_PACKAGE_GETENT is not set
# BR2_PACKAGE_HTOP is not set
BR2_PACKAGE_INITSCRIPTS=y

#
# iotop depends on python or python3
#
# BR2_PACKAGE_IPRUTILS is not set
# BR2_PACKAGE_IRQBALANCE is not set
# BR2_PACKAGE_KEYUTILS is not set
# BR2_PACKAGE_KMOD is not set
# BR2_PACKAGE_KVMTOOL is not set
# BR2_PACKAGE_LXC is not set
# BR2_PACKAGE_MONIT is not set
# BR2_PACKAGE_NCDU is not set
# BR2_PACKAGE_NUT is not set
# BR2_PACKAGE_POLKIT is not set
# BR2_PACKAGE_PROCRANK_LINUX is not set
# BR2_PACKAGE_PWGEN is not set
# BR2_PACKAGE_QUOTA is not set
# BR2_PACKAGE_RAUC is not set
# BR2_PACKAGE_RUNC is not set
# BR2_PACKAGE_S6 is not set
# BR2_PACKAGE_S6_LINUX_INIT is not set
# BR2_PACKAGE_S6_LINUX_UTILS is not set
# BR2_PACKAGE_S6_PORTABLE_UTILS is not set
# BR2_PACKAGE_S6_RC is not set
# BR2_PACKAGE_SCRUB is not set
# BR2_PACKAGE_SCRYPT is not set
# BR2_PACKAGE_SMACK is not set

#
# supervisor needs the python interpreter
#
# BR2_PACKAGE_SWUPDATE is not set
BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS=y
# BR2_PACKAGE_TPM_TOOLS is not set
# BR2_PACKAGE_UNSCD is not set
BR2_PACKAGE_UTIL_LINUX=y
BR2_PACKAGE_UTIL_LINUX_LIBBLKID=y
# BR2_PACKAGE_UTIL_LINUX_LIBFDISK is not set
BR2_PACKAGE_UTIL_LINUX_LIBMOUNT=y
# BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS is not set
BR2_PACKAGE_UTIL_LINUX_LIBUUID=y
# BR2_PACKAGE_UTIL_LINUX_BINARIES is not set
# BR2_PACKAGE_UTIL_LINUX_AGETTY is not set
# BR2_PACKAGE_UTIL_LINUX_BFS is not set
# BR2_PACKAGE_UTIL_LINUX_CAL is not set
# BR2_PACKAGE_UTIL_LINUX_CHFN_CHSH is not set
# BR2_PACKAGE_UTIL_LINUX_CHMEM is not set
# BR2_PACKAGE_UTIL_LINUX_CRAMFS is not set
# BR2_PACKAGE_UTIL_LINUX_EJECT is not set
# BR2_PACKAGE_UTIL_LINUX_FALLOCATE is not set
# BR2_PACKAGE_UTIL_LINUX_FDFORMAT is not set
# BR2_PACKAGE_UTIL_LINUX_FSCK is not set
# BR2_PACKAGE_UTIL_LINUX_HWCLOCK is not set
# BR2_PACKAGE_UTIL_LINUX_IPCRM is not set
# BR2_PACKAGE_UTIL_LINUX_IPCS is not set
# BR2_PACKAGE_UTIL_LINUX_KILL is not set
# BR2_PACKAGE_UTIL_LINUX_LAST is not set
# BR2_PACKAGE_UTIL_LINUX_LINE is not set
# BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS is not set
# BR2_PACKAGE_UTIL_LINUX_LOGGER is not set
# BR2_PACKAGE_UTIL_LINUX_LOSETUP is not set
# BR2_PACKAGE_UTIL_LINUX_LSLOGINS is not set
# BR2_PACKAGE_UTIL_LINUX_LSMEM is not set
# BR2_PACKAGE_UTIL_LINUX_MESG is not set
# BR2_PACKAGE_UTIL_LINUX_MINIX is not set
# BR2_PACKAGE_UTIL_LINUX_MORE is not set
BR2_PACKAGE_UTIL_LINUX_MOUNT=y
# BR2_PACKAGE_UTIL_LINUX_MOUNTPOINT is not set
# BR2_PACKAGE_UTIL_LINUX_NEWGRP is not set
# BR2_PACKAGE_UTIL_LINUX_NOLOGIN is not set
# BR2_PACKAGE_UTIL_LINUX_NSENTER is not set
# BR2_PACKAGE_UTIL_LINUX_PG is not set
# BR2_PACKAGE_UTIL_LINUX_PARTX is not set
# BR2_PACKAGE_UTIL_LINUX_PIVOT_ROOT is not set
# BR2_PACKAGE_UTIL_LINUX_RAW is not set
# BR2_PACKAGE_UTIL_LINUX_RENAME is not set
# BR2_PACKAGE_UTIL_LINUX_RESET is not set
# BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS is not set
# BR2_PACKAGE_UTIL_LINUX_SETPRIV is not set
# BR2_PACKAGE_UTIL_LINUX_SETTERM is not set
# BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT is not set
# BR2_PACKAGE_UTIL_LINUX_TUNELP is not set
# BR2_PACKAGE_UTIL_LINUX_UL is not set
# BR2_PACKAGE_UTIL_LINUX_UNSHARE is not set
# BR2_PACKAGE_UTIL_LINUX_UTMPDUMP is not set
# BR2_PACKAGE_UTIL_LINUX_UUIDD is not set
# BR2_PACKAGE_UTIL_LINUX_VIPW is not set
# BR2_PACKAGE_UTIL_LINUX_WALL is not set
# BR2_PACKAGE_UTIL_LINUX_WDCTL is not set
# BR2_PACKAGE_UTIL_LINUX_WRITE is not set
# BR2_PACKAGE_UTIL_LINUX_ZRAMCTL is not set
BR2_PACKAGE_XVISOR_ARCH_SUPPORTS=y
# BR2_PACKAGE_XVISOR is not set

#
# Text editors and viewers
#
# BR2_PACKAGE_ED is not set
# BR2_PACKAGE_JOE is not set
# BR2_PACKAGE_MC is not set
# BR2_PACKAGE_NANO is not set
# BR2_PACKAGE_UEMACS is not set

#
# Filesystem images
#
# BR2_TARGET_ROOTFS_AXFS is not set
# BR2_TARGET_ROOTFS_CLOOP is not set
# BR2_TARGET_ROOTFS_CPIO is not set
# BR2_TARGET_ROOTFS_CRAMFS is not set
# BR2_TARGET_ROOTFS_EXT2 is not set

#
# initramfs needs a Linux kernel to be built
#
# BR2_TARGET_ROOTFS_JFFS2 is not set
# BR2_TARGET_ROOTFS_ROMFS is not set
# BR2_TARGET_ROOTFS_SQUASHFS is not set
BR2_TARGET_ROOTFS_TAR=y
BR2_TARGET_ROOTFS_TAR_NONE=y
# BR2_TARGET_ROOTFS_TAR_GZIP is not set
# BR2_TARGET_ROOTFS_TAR_BZIP2 is not set
# BR2_TARGET_ROOTFS_TAR_LZMA is not set
# BR2_TARGET_ROOTFS_TAR_LZO is not set
# BR2_TARGET_ROOTFS_TAR_XZ is not set
BR2_TARGET_ROOTFS_TAR_OPTIONS=""
# BR2_TARGET_ROOTFS_UBIFS is not set
# BR2_TARGET_ROOTFS_YAFFS2 is not set

#
# Bootloaders
#
# BR2_TARGET_AFBOOT_STM32 is not set
# BR2_TARGET_AT91BOOTSTRAP is not set
# BR2_TARGET_AT91BOOTSTRAP3 is not set
# BR2_TARGET_AT91DATAFLASHBOOT is not set
# BR2_TARGET_BAREBOX is not set
# BR2_TARGET_LPC32XXCDL is not set
# BR2_TARGET_MXS_BOOTLETS is not set
# BR2_TARGET_S500_BOOTLOADER is not set
# BR2_TARGET_UBOOT is not set

#
# Host utilities
#
# BR2_PACKAGE_HOST_AESPIPE is not set
# BR2_PACKAGE_HOST_ANDROID_TOOLS is not set
# BR2_PACKAGE_HOST_CBOOTIMAGE is not set
# BR2_PACKAGE_HOST_CHECKPOLICY is not set
# BR2_PACKAGE_HOST_CRAMFS is not set
# BR2_PACKAGE_HOST_DFU_UTIL is not set
# BR2_PACKAGE_HOST_DOS2UNIX is not set
# BR2_PACKAGE_HOST_DOSFSTOOLS is not set
# BR2_PACKAGE_HOST_DTC is not set
# BR2_PACKAGE_HOST_E2FSPROGS is not set
# BR2_PACKAGE_HOST_E2TOOLS is not set
# BR2_PACKAGE_HOST_FAKETIME is not set
# BR2_PACKAGE_HOST_FWUP is not set
# BR2_PACKAGE_HOST_GENEXT2FS is not set
# BR2_PACKAGE_HOST_GENIMAGE is not set
# BR2_PACKAGE_HOST_GENPART is not set
BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS=y
BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS=y
# BR2_PACKAGE_HOST_GPTFDISK is not set
# BR2_PACKAGE_HOST_IMX_USB_LOADER is not set
# BR2_PACKAGE_HOST_JQ is not set
# BR2_PACKAGE_HOST_JSMIN is not set
# BR2_PACKAGE_HOST_LPC3250LOADER is not set
# BR2_PACKAGE_HOST_LTTNG_BABELTRACE is not set
# BR2_PACKAGE_HOST_MFGTOOLS is not set
# BR2_PACKAGE_HOST_MKPASSWD is not set
# BR2_PACKAGE_HOST_MTD is not set
# BR2_PACKAGE_HOST_MTOOLS is not set
# BR2_PACKAGE_HOST_MXSLDR is not set
# BR2_PACKAGE_HOST_OMAP_U_BOOT_UTILS is not set
# BR2_PACKAGE_HOST_OPENOCD is not set
# BR2_PACKAGE_HOST_OPKG_UTILS is not set
# BR2_PACKAGE_HOST_PARTED is not set
BR2_PACKAGE_HOST_PATCHELF=y
# BR2_PACKAGE_HOST_PRU_SOFTWARE_SUPPORT is not set
# BR2_PACKAGE_HOST_PWGEN is not set
# BR2_PACKAGE_HOST_PYTHON_LXML is not set
# BR2_PACKAGE_HOST_QEMU is not set
# BR2_PACKAGE_HOST_RASPBERRYPI_USBBOOT is not set
# BR2_PACKAGE_HOST_RAUC is not set
# BR2_PACKAGE_HOST_SAM_BA is not set
# BR2_PACKAGE_HOST_SQUASHFS is not set
# BR2_PACKAGE_HOST_SUNXI_TOOLS is not set
# BR2_PACKAGE_HOST_TEGRARCM is not set
BR2_PACKAGE_HOST_TI_CGT_PRU_ARCH_SUPPORTS=y
# BR2_PACKAGE_HOST_TI_CGT_PRU is not set
# BR2_PACKAGE_HOST_UBOOT_TOOLS is not set
# BR2_PACKAGE_HOST_UTIL_LINUX is not set
# BR2_PACKAGE_HOST_VBOOT_UTILS is not set
# BR2_PACKAGE_HOST_XORRISO is not set
# BR2_PACKAGE_HOST_ZIP is not set

#
# Legacy config options
#

#
# Legacy options removed in 2017.08
#
# BR2_PACKAGE_SIMICSFS is not set
# BR2_BINUTILS_VERSION_2_26_X is not set
BR2_XTENSA_OVERLAY_DIR=""
BR2_XTENSA_CUSTOM_NAME=""
# BR2_PACKAGE_HOST_MKE2IMG is not set
BR2_TARGET_ROOTFS_EXT2_BLOCKS=0
BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES=0
# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_CDXAPARSE is not set
# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DATAURISRC is not set
# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DCCP is not set
# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_HDVPARSE is not set
# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MVE is not set
# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_NUVDEMUX is not set
# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_PATCHDETECT is not set
# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SDI is not set
# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_TTA is not set
# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOMEASURE is not set
# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_APEXSINK is not set
# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SDL is not set
# BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_MAD is not set
# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_WEBRTC is not set
# BR2_STRIP_none is not set
# BR2_PACKAGE_BEECRYPT_CPP is not set
# BR2_PACKAGE_SPICE_CLIENT is not set
# BR2_PACKAGE_SPICE_GUI is not set
# BR2_PACKAGE_SPICE_TUNNEL is not set
# BR2_PACKAGE_INPUT_TOOLS is not set
# BR2_PACKAGE_INPUT_TOOLS_INPUTATTACH is not set
# BR2_PACKAGE_INPUT_TOOLS_JSCAL is not set
# BR2_PACKAGE_INPUT_TOOLS_JSTEST is not set
# BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH is not set
# BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86 is not set
# BR2_GCC_VERSION_4_8_X is not set

#
# Legacy options removed in 2017.05
#
# BR2_PACKAGE_SUNXI_MALI_R2P4 is not set
# BR2_PACKAGE_NODEJS_MODULES_COFFEESCRIPT is not set
# BR2_PACKAGE_NODEJS_MODULES_EXPRESS is not set
# BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL is not set
# BR2_PACKAGE_OPENOCD_FT2XXX is not set
# BR2_PACKAGE_KODI_RTMPDUMP is not set
# BR2_PACKAGE_KODI_VISUALISATION_FOUNTAIN is not set
# BR2_PACKAGE_PORTMAP is not set
# BR2_BINUTILS_VERSION_2_25_X is not set
# BR2_TOOLCHAIN_BUILDROOT_INET_RPC is not set
BR2_TARGET_ROOTFS_EXT2_EXTRA_BLOCKS=0
# BR2_PACKAGE_SYSTEMD_KDBUS is not set
# BR2_PACKAGE_POLARSSL is not set
# BR2_NBD_CLIENT is not set
# BR2_NBD_SERVER is not set
# BR2_PACKAGE_GMOCK is not set
# BR2_KERNEL_HEADERS_4_8 is not set
# BR2_KERNEL_HEADERS_3_18 is not set
# BR2_GLIBC_VERSION_2_22 is not set

#
# Legacy options removed in 2017.02
#
# BR2_PACKAGE_PERL_DB_FILE is not set
# BR2_KERNEL_HEADERS_4_7 is not set
# BR2_KERNEL_HEADERS_4_6 is not set
# BR2_KERNEL_HEADERS_4_5 is not set
# BR2_KERNEL_HEADERS_3_14 is not set
# BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS is not set
# BR2_UCLIBC_INSTALL_TEST_SUITE is not set
# BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX is not set
# BR2_PACKAGE_MAKEDEVS is not set
# BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A is not set
# BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE is not set
# BR2_PACKAGE_SNOWBALL_HDMISERVICE is not set
# BR2_PACKAGE_SNOWBALL_INIT is not set
# BR2_GDB_VERSION_7_9 is not set

#
# Legacy options removed in 2016.11
#
# BR2_PACKAGE_PHP_SAPI_CLI_CGI is not set
# BR2_PACKAGE_PHP_SAPI_CLI_FPM is not set
# BR2_PACKAGE_WVSTREAMS is not set
# BR2_PACKAGE_WVDIAL is not set
# BR2_PACKAGE_WEBKITGTK24 is not set
# BR2_PACKAGE_TORSMO is not set
# BR2_PACKAGE_SSTRIP is not set
# BR2_KERNEL_HEADERS_4_3 is not set
# BR2_KERNEL_HEADERS_4_2 is not set
# BR2_PACKAGE_KODI_ADDON_XVDR is not set
# BR2_PACKAGE_IPKG is not set
# BR2_GCC_VERSION_4_7_X is not set
# BR2_BINUTILS_VERSION_2_24_X is not set
# BR2_PACKAGE_WESTON_RPI is not set
# BR2_GCC_VERSION_4_8_ARC is not set
# BR2_KERNEL_HEADERS_4_0 is not set
# BR2_KERNEL_HEADERS_3_19 is not set
# BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS is not set
# BR2_PACKAGE_ELEMENTARY is not set
# BR2_LINUX_KERNEL_CUSTOM_LOCAL is not set

#
# Legacy options removed in 2016.08
#
# BR2_PACKAGE_EFL_JP2K is not set
# BR2_PACKAGE_SYSTEMD_COMPAT is not set
# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_LIVEADDER is not set
# BR2_PACKAGE_LIBFSLVPUWRAP is not set
# BR2_PACKAGE_LIBFSLPARSER is not set
# BR2_PACKAGE_LIBFSLCODEC is not set
# BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE_FIT_SIGNATURE_SUPPORT is not set
# BR2_PTHREADS_OLD is not set
# BR2_BINUTILS_VERSION_2_23_X is not set
# BR2_TOOLCHAIN_BUILDROOT_EGLIBC is not set
# BR2_GDB_VERSION_7_8 is not set

#
# Legacy options removed in 2016.05
#
# BR2_PACKAGE_OPENVPN_CRYPTO_POLARSSL is not set
# BR2_PACKAGE_NGINX_HTTP_SPDY_MODULE is not set
# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_RTP is not set
# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPG123 is not set
# BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC is not set
# BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC_E500V2 is not set
# BR2_x86_i386 is not set
# BR2_PACKAGE_QT5WEBKIT_EXAMPLES is not set
# BR2_PACKAGE_QT5QUICK1 is not set
BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR=""
# BR2_PACKAGE_XDRIVER_XF86_INPUT_VOID is not set
# BR2_KERNEL_HEADERS_3_17 is not set
# BR2_GDB_VERSION_7_7 is not set
# BR2_PACKAGE_FOOMATIC_FILTERS is not set
# BR2_PACKAGE_SAMBA is not set
# BR2_PACKAGE_KODI_WAVPACK is not set
# BR2_PACKAGE_KODI_RSXS is not set
# BR2_PACKAGE_KODI_GOOM is not set
# BR2_PACKAGE_SYSTEMD_ALL_EXTRAS is not set
# BR2_GCC_VERSION_4_5_X is not set
# BR2_PACKAGE_SQLITE_READLINE is not set

#
# Legacy options removed in 2016.02
#
# BR2_PACKAGE_DOVECOT_BZIP2 is not set
# BR2_PACKAGE_DOVECOT_ZLIB is not set
# BR2_PACKAGE_E2FSPROGS_FINDFS is not set
# BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL is not set
# BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE is not set
# BR2_PACKAGE_OPENPOWERLINK_LIBPCAP is not set
# BR2_LINUX_KERNEL_SAME_AS_HEADERS is not set
# BR2_PACKAGE_CUPS_PDFTOPS is not set
# BR2_KERNEL_HEADERS_3_16 is not set
# BR2_PACKAGE_PYTHON_PYXML is not set
# BR2_ENABLE_SSP is not set
# BR2_PACKAGE_DIRECTFB_CLE266 is not set
# BR2_PACKAGE_DIRECTFB_UNICHROME is not set
# BR2_PACKAGE_LIBELEMENTARY is not set
# BR2_PACKAGE_LIBEINA is not set
# BR2_PACKAGE_LIBEET is not set
# BR2_PACKAGE_LIBEVAS is not set
# BR2_PACKAGE_LIBECORE is not set
# BR2_PACKAGE_LIBEDBUS is not set
# BR2_PACKAGE_LIBEFREET is not set
# BR2_PACKAGE_LIBEIO is not set
# BR2_PACKAGE_LIBEMBRYO is not set
# BR2_PACKAGE_LIBEDJE is not set
# BR2_PACKAGE_LIBETHUMB is not set
# BR2_PACKAGE_INFOZIP is not set
# BR2_BR2_PACKAGE_NODEJS_0_10_X is not set
# BR2_BR2_PACKAGE_NODEJS_0_12_X is not set
# BR2_BR2_PACKAGE_NODEJS_4_X is not set

#
# Legacy options removed in 2015.11
#
# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_REAL is not set
# BR2_PACKAGE_MEDIA_CTL is not set
# BR2_PACKAGE_SCHIFRA is not set
# BR2_PACKAGE_ZXING is not set
# BR2_PACKAGE_BLACKBOX is not set
# BR2_KERNEL_HEADERS_3_0 is not set
# BR2_KERNEL_HEADERS_3_11 is not set
# BR2_KERNEL_HEADERS_3_13 is not set
# BR2_KERNEL_HEADERS_3_15 is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_ANDI is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_BLTLOAD is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_CPULOAD is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_DATABUFFER is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_DIOLOAD is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_DRIVERTEST is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_FIRE is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_FLIP is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_FONTS is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_INPUT is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_JOYSTICK is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_KNUCKLES is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_LAYER is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_MATRIX is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_MATRIX_WATER is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_NEO is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_NETLOAD is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_PALETTE is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_PARTICLE is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_PORTER is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_STRESS is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_TEXTURE is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_VIDEO is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_VIDEO_PARTICLE is not set
# BR2_PACKAGE_DIRECTFB_EXAMPLES_WINDOW is not set
# BR2_PACKAGE_KOBS_NG is not set
# BR2_PACKAGE_SAWMAN is not set
# BR2_PACKAGE_DIVINE is not set

#
# Legacy options removed in 2015.08
#
# BR2_PACKAGE_KODI_PVR_ADDONS is not set
# BR2_BINUTILS_VERSION_2_23_2 is not set
# BR2_BINUTILS_VERSION_2_24 is not set
# BR2_BINUTILS_VERSION_2_25 is not set
# BR2_PACKAGE_PERF is not set
# BR2_BINUTILS_VERSION_2_22 is not set
# BR2_PACKAGE_GPU_VIV_BIN_MX6Q is not set
# BR2_TARGET_UBOOT_NETWORK is not set

#
# Legacy options removed in 2015.05
#
# BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_512_16K is not set
# BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_2K_128K is not set
# BR2_PACKAGE_MONO_20 is not set
# BR2_PACKAGE_MONO_40 is not set
# BR2_PACKAGE_MONO_45 is not set
# BR2_CIVETWEB_WITH_LUA is not set
# BR2_PACKAGE_TIFF_TIFF2PDF is not set
# BR2_PACKAGE_TIFF_TIFFCP is not set
# BR2_LINUX_KERNEL_EXT_RTAI_PATCH is not set
# BR2_TARGET_GENERIC_PASSWD_DES is not set
# BR2_PACKAGE_GTK2_THEME_HICOLOR is not set
# BR2_PACKAGE_VALGRIND_PTRCHECK is not set

#
# Legacy options removed in 2015.02
#
# BR2_PACKAGE_LIBGC is not set
# BR2_PACKAGE_WDCTL is not set
# BR2_PACKAGE_UTIL_LINUX_ARCH is not set
# BR2_PACKAGE_UTIL_LINUX_DDATE is not set
# BR2_PACKAGE_RPM_BZIP2_PAYLOADS is not set
# BR2_PACKAGE_RPM_XZ_PAYLOADS is not set
# BR2_PACKAGE_M4 is not set
# BR2_PACKAGE_FLEX_BINARY is not set
# BR2_PACKAGE_BISON is not set
# BR2_PACKAGE_GOB2 is not set
# BR2_PACKAGE_DISTCC is not set
# BR2_PACKAGE_HASERL_VERSION_0_8_X is not set
# BR2_PACKAGE_STRONGSWAN_TOOLS is not set
# BR2_PACKAGE_XBMC_ADDON_XVDR is not set
# BR2_PACKAGE_XBMC_PVR_ADDONS is not set
# BR2_PACKAGE_XBMC is not set
# BR2_PACKAGE_XBMC_ALSA_LIB is not set
# BR2_PACKAGE_XBMC_AVAHI is not set
# BR2_PACKAGE_XBMC_DBUS is not set
# BR2_PACKAGE_XBMC_LIBBLURAY is not set
# BR2_PACKAGE_XBMC_GOOM is not set
# BR2_PACKAGE_XBMC_RSXS is not set
# BR2_PACKAGE_XBMC_LIBCEC is not set
# BR2_PACKAGE_XBMC_LIBMICROHTTPD is not set
# BR2_PACKAGE_XBMC_LIBNFS is not set
# BR2_PACKAGE_XBMC_RTMPDUMP is not set
# BR2_PACKAGE_XBMC_LIBSHAIRPLAY is not set
# BR2_PACKAGE_XBMC_LIBSMBCLIENT is not set
# BR2_PACKAGE_XBMC_LIBTHEORA is not set
# BR2_PACKAGE_XBMC_LIBUSB is not set
# BR2_PACKAGE_XBMC_LIBVA is not set
# BR2_PACKAGE_XBMC_WAVPACK is not set
# BR2_PREFER_STATIC_LIB is not set

#
# Legacy options removed in 2014.11
#
# BR2_x86_generic is not set
# BR2_GCC_VERSION_4_4_X is not set
# BR2_sparc_sparchfleon is not set
# BR2_sparc_sparchfleonv8 is not set
# BR2_sparc_sparcsfleon is not set
# BR2_sparc_sparcsfleonv8 is not set
# BR2_PACKAGE_LINUX_FIRMWARE_XC5000 is not set
# BR2_PACKAGE_LINUX_FIRMWARE_CXGB4 is not set
# BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160_7260_7 is not set
# BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160_7260_8 is not set

#
# Legacy options removed in 2014.08
#
# BR2_PACKAGE_LIBELF is not set
# BR2_KERNEL_HEADERS_3_8 is not set
# BR2_PACKAGE_GETTEXT_TOOLS is not set
# BR2_PACKAGE_PROCPS is not set
# BR2_BINUTILS_VERSION_2_20_1 is not set
# BR2_BINUTILS_VERSION_2_21 is not set
# BR2_BINUTILS_VERSION_2_23_1 is not set
# BR2_UCLIBC_VERSION_0_9_32 is not set
# BR2_GCC_VERSION_4_3_X is not set
# BR2_GCC_VERSION_4_6_X is not set
# BR2_GDB_VERSION_7_4 is not set
# BR2_GDB_VERSION_7_5 is not set
# BR2_BUSYBOX_VERSION_1_19_X is not set
# BR2_BUSYBOX_VERSION_1_20_X is not set
# BR2_BUSYBOX_VERSION_1_21_X is not set
# BR2_PACKAGE_LIBV4L_DECODE_TM6000 is not set
# BR2_PACKAGE_LIBV4L_IR_KEYTABLE is not set
# BR2_PACKAGE_LIBV4L_V4L2_COMPLIANCE is not set
# BR2_PACKAGE_LIBV4L_V4L2_CTL is not set
# BR2_PACKAGE_LIBV4L_V4L2_DBG is not set

#
# Legacy options removed in 2014.05
#
# BR2_PACKAGE_EVTEST_CAPTURE is not set
# BR2_KERNEL_HEADERS_3_6 is not set
# BR2_KERNEL_HEADERS_3_7 is not set
# BR2_PACKAGE_VALA is not set
BR2_PACKAGE_TZDATA_ZONELIST=""
# BR2_PACKAGE_LUA_INTERPRETER_EDITING_NONE is not set
# BR2_PACKAGE_LUA_INTERPRETER_READLINE is not set
# BR2_PACKAGE_LUA_INTERPRETER_LINENOISE is not set
# BR2_PACKAGE_DVB_APPS_UTILS is not set
# BR2_KERNEL_HEADERS_SNAP is not set
# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV is not set
# BR2_PACKAGE_UDEV is not set
# BR2_PACKAGE_UDEV_RULES_GEN is not set
# BR2_PACKAGE_UDEV_ALL_EXTRAS is not set

#
# Legacy options removed in 2014.02
#
# BR2_sh2 is not set
# BR2_sh3 is not set
# BR2_sh3eb is not set
# BR2_KERNEL_HEADERS_3_1 is not set
# BR2_KERNEL_HEADERS_3_3 is not set
# BR2_KERNEL_HEADERS_3_5 is not set
# BR2_GDB_VERSION_7_2 is not set
# BR2_GDB_VERSION_7_3 is not set
# BR2_PACKAGE_CCACHE is not set
# BR2_HAVE_DOCUMENTATION is not set
# BR2_PACKAGE_AUTOMAKE is not set
# BR2_PACKAGE_AUTOCONF is not set
# BR2_PACKAGE_XSTROKE is not set
# BR2_PACKAGE_LZMA is not set
# BR2_PACKAGE_TTCP is not set
# BR2_PACKAGE_LIBNFC_LLCP is not set
# BR2_PACKAGE_MYSQL_CLIENT is not set
# BR2_PACKAGE_SQUASHFS3 is not set
# BR2_TARGET_ROOTFS_SQUASHFS3 is not set
# BR2_PACKAGE_NETKITBASE is not set
# BR2_PACKAGE_NETKITTELNET is not set
# BR2_PACKAGE_LUASQL is not set
# BR2_PACKAGE_LUACJSON is not set

#
# Legacy options removed in 2013.11
#
# BR2_PACKAGE_LVM2_DMSETUP_ONLY is not set
# BR2_PACKAGE_QT_JAVASCRIPTCORE is not set
# BR2_PACKAGE_MODULE_INIT_TOOLS is not set
BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL=""
BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION=""
BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL=""
BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION=""

#
# Legacy options removed in 2013.08
#
# BR2_ARM_OABI is not set
# BR2_PACKAGE_DOSFSTOOLS_DOSFSCK is not set
# BR2_PACKAGE_DOSFSTOOLS_DOSFSLABEL is not set
# BR2_PACKAGE_DOSFSTOOLS_MKDOSFS is not set
# BR2_ELF2FLT is not set
# BR2_VFP_FLOAT is not set
# BR2_PACKAGE_GCC_TARGET is not set
# BR2_HAVE_DEVFILES is not set

#
# Legacy options removed in 2013.05
#
# BR2_PACKAGE_LINUX_FIRMWARE_RTL_8192 is not set
# BR2_PACKAGE_LINUX_FIRMWARE_RTL_8712 is not set

#
# Legacy options removed in 2013.02
#
# BR2_sa110 is not set
# BR2_sa1100 is not set
# BR2_PACKAGE_GDISK is not set
# BR2_PACKAGE_GDISK_GDISK is not set
# BR2_PACKAGE_GDISK_SGDISK is not set
# BR2_PACKAGE_GDB_HOST is not set
# BR2_PACKAGE_DIRECTB_DITHER_RGB16 is not set
# BR2_PACKAGE_DIRECTB_TESTS is not set

#
# Legacy options removed in 2012.11
#
# BR2_PACKAGE_CUSTOMIZE is not set
# BR2_PACKAGE_XSERVER_xorg is not set
# BR2_PACKAGE_XSERVER_tinyx is not set
# BR2_PACKAGE_PTHREAD_STUBS is not set

#
# Legacy options removed in 2012.08
#
# BR2_PACKAGE_GETTEXT_STATIC is not set
# BR2_PACKAGE_LIBINTL is not set
# BR2_PACKAGE_INPUT_TOOLS_EVTEST is not set
# BR2_BFIN_FDPIC is not set
# BR2_BFIN_FLAT is not set

#183 Re: 全志 SOC » 测试测试 g_serial / g_ether USB Gadget (RNDIS) » 2019-05-20 15:04:51

晕哥 说:

好, 有空我录个视频.

期待,期待!

#184 Re: 全志 SOC » 测试测试 g_serial / g_ether USB Gadget (RNDIS) » 2019-05-20 11:32:32

晕哥 说:

https://whycan.cn/files/members/3/2019-05-20_100529.png

在linux drivers 这里设置

> Device Drivers > USB support > USB Gadget Support


晕哥,

找时间出个详细点的教程吧,关于荔枝派zero的usb虚拟串口和虚拟网口的,感觉这两个功能很实用!

救救孩子吧。。。 lol

#185 Re: 全志 SOC » 测试测试 g_serial / g_ether USB Gadget (RNDIS) » 2019-05-20 11:29:01

晕哥 说:

https://whycan.cn/files/members/3/2019-05-20_100529.png

在linux drivers 这里设置

> Device Drivers > USB support > USB Gadget Support


我还测试了荔枝派官方的教程-- Zero通过otg与PC共享网络

说配置后可以看到usb0
zp@ubuntu64:~$ ifconfig
...
usb0 Link encap:Ethernet HWaddr 66:36:e9:13:fd:44

root@Lichee:~# ifconfig
...
usb0 Link encap:Ethernet HWaddr 2e:cf:e1:3f:ad:61

--------------
结果在我的板子上根本看不到usb0

不知道晕哥测试过没

总感觉我这块荔枝派不太稳定,准备再入一块。

#186 Re: 全志 SOC » 测试测试 g_serial / g_ether USB Gadget (RNDIS) » 2019-05-20 11:15:32

晕哥 说:

https://whycan.cn/files/members/3/2019-05-20_100529.png

在linux drivers 这里设置

> Device Drivers > USB support > USB Gadget Support

晕哥,

我昨晚测试荔枝zero,内核也是的用4.13y,USB Gadget Support在官方默认配置下,是CDC Composite Device (Ethernet and ACM) 。

这个配置,在我的电脑上未出现任何USB设备。



看到这个帖子(https://whycan.cn/t_1788.html-Zero通过otg与PC共享网络)里可以改成串口配置,我就改成了Serial Gadget (with CDC ACM and CDC OBEX support) 。电脑上就出现了USB虚拟串口。

经过测试发现虚拟串口不太正常:

1. 开发板可以正常发送到PC端的串口助手:
开发板发送:

echo "125awsdQWEDFffe" > /dev/ttyGS0

2. PC端发送到开发板不正常,开发板可以接收到内容,但是PC串口助手同时也接收到了自己发送的内容:
开发板接收:

cat /dev/ttyGS0

串口助手sscom5.13显示的接收:

[20:21:54.484]收←◆125awsdffe

[20:22:04.544]收←◆125awsdQWEDFffe

[20:22:26.619]发→◇LLLK
□
[20:22:26.620]收←◆LLLK
LLLK

[20:22:31.627]发→◇LLLK
□
[20:22:31.628]收←◆LLLK

遇到的问题就是,PC串口助手发送的同时,也接收到了自己发送的内容

#187 Re: 全志 SOC » 成功打响在f1c100s运行go程序的第一炮 » 2019-05-20 09:57:46

smartcar 说:

大家都别学了,我有点跟不上进度了。

哈哈,我也是跟不上,尾灯都看不到,我一定走错路了

#188 Re: 全志 SOC » 测试测试 g_serial / g_ether USB Gadget (RNDIS) » 2019-05-20 09:55:27

请问楼主用的是荔枝派zero吗,内核是哪个版本

“make menuconfig 勾选对应的 gadget 驱动程序.” ---这句话是设置kernel还是buildroot,能详细说说设置方法吗,我在buildroot里没找到gadget相关的

#189 Re: 全志 SOC » V3s/S3/f1c100s通过USB启动Linux,并把SD NAND/TF卡挂载为U盘, 可以dd或Win32DiskImager任烧写 » 2019-05-18 16:57:03

晕哥 说:

据说用脚本可以, 但是我只会用笨办法: https://whycan.cn/t_2448.html#p19036

流程就是, 先做一张能启动的 TF卡 : https://whycan.cn/t_561.html

然后把卡插入读卡器, 用Ubuntu Linux dd 出文件备份:

dd if=/dev/sdX of=x.bin


烧录就是执行反向操作了:

dd if=x.bin of=/dev/sdX


多谢晕哥!

原来nano制作TF卡的流程和荔枝派zero一样,回家测试。

#190 Re: 全志 SOC » V3s/S3/f1c100s通过USB启动Linux,并把SD NAND/TF卡挂载为U盘, 可以dd或Win32DiskImager任烧写 » 2019-05-18 13:44:56

晕哥 说:

好消息!

f1c100s 的也搞定了: f1c100s_fel_autorun_linux_uart0_pe0_pe1_20190517_TF_sdnand.7z

(登录账号: root, 密码: whycan.cn)




f1c100s 通过USB启动 Linux,并且把SD NAND/TF卡挂载为电脑U盘, 然后可以通过dd或Win32DiskImager任烧写


不好用? 上挖坑网打我呀呀呀呀呀呀呀呀呀呀呀呀呀!!!!!!!!!!


荔枝派 nano 开发板验证通过!


继续请教晕哥,Win32DiskImager烧写用的镜像,有制作教程没。。。

#191 Re: 全志 SOC » V3s/S3/f1c100s通过USB启动Linux,并把SD NAND/TF卡挂载为U盘, 可以dd或Win32DiskImager任烧写 » 2019-05-18 13:43:27

晕哥 说:

好消息!

f1c100s 的也搞定了: f1c100s_fel_autorun_linux_uart0_pe0_pe1_20190517_TF_sdnand.7z

(登录账号: root, 密码: whycan.cn)




f1c100s 通过USB启动 Linux,并且把SD NAND/TF卡挂载为电脑U盘, 然后可以通过dd或Win32DiskImager任烧写


不好用? 上挖坑网打我呀呀呀呀呀呀呀呀呀呀呀呀呀!!!!!!!!!!


荔枝派 nano 开发板验证通过!


厉害!

晕哥,你这个帖子里,https://whycan.cn/t_1623.html ( 荔枝派nano f1c100s 开发板入坑记录),

没找到如何制作TF卡启动固件方法,准备什么时候更新啊!!!

#192 Re: 全志 SOC » Zero通过otg与PC共享网络 » 2019-05-18 13:35:40

晕哥 说:
Jmhh247 说:
ippen 说:

应该这样说
device drivers->usb support>usb gadget support

请问,这个功能要怎么用,比如要怎么配置IP,

可以像常规网口的网络一样,插上网线,然后ifconf eth0 ip设置后,就能ping其它ip吗

可以的, 就是酱紫玩:
https://whycan.cn/t_2401.html


多谢晕哥解惑,回头试试。

#193 Re: 全志 SOC » V3s/S3/f1c100s通过USB启动Linux,并把SD NAND/TF卡挂载为U盘, 可以dd或Win32DiskImager任烧写 » 2019-05-17 13:17:07

“把这张卡放到旁边”。。。然后你就直接放板子上了

哈哈,晕哥,你是逗我吗,这么大的桌子不够你放么,心想要这任性么。。。果然后面它就掉下来了 lol

#195 Re: 全志 SOC » Zero通过otg与PC共享网络 » 2019-05-17 11:21:29

ippen 说:

应该这样说
device drivers->usb support>usb gadget support

请问,这个功能要怎么用,比如要怎么配置IP,

可以像常规网口的网络一样,插上网线,然后ifconf eth0 ip设置后,就能ping其它ip吗

#197 Re: 全志 SOC » 请教F1C100S的 USB Host的kernel配置 » 2019-05-16 08:33:15

阿黄 说:
Jmhh247 说:
阿黄 说:

我用nano加底板 不接microUSB也是一样,显示g_cdc_gadget:g_cdc ready, 可能这个内核版本USB驱动有问题吧,看OTG那个帖子讨论,要把USB Clock配置改下,估计还要查一下

请问,用荔枝派ZERO,TF卡启动,也有很大概率显示:g_cdc_gadget:g_cdc ready,然后卡死,也会是USB驱动问题吗

打印这个是正常的,卡死应该是其他某个任务没法退出,查一下/etc/init.d/里面启动任务

好的,多谢指导

#199 Re: 全志 SOC » 荔枝派nano f1c100s 使用sunxi-fel 借 u-boot 启动 Linux系统, 无需 spi flash / TF 卡 » 2019-05-15 09:16:00

晕哥 说:
Jmhh247 说:
晕哥 说:

根文件系统

请教晕哥,这个根文件系统有大小限制没,它存到哪了(没spiflash/tf卡)?

还有你用的啥终端,能显示彩色字体。。。

有限制,具体限制多少还不清楚, 是 gzip 压缩的 initramfs,
Linux 最终会解压到指定内存区域作为 rootfs,
终端是 mobaxterm 的免费版.

mobaxterm 功能相当强大: https://whycan.cn/t_2057.html


多谢,果然是个强大的终端,还有免费版,哈哈

#200 Re: 全志 SOC » 荔枝派nano f1c100s 使用sunxi-fel 借 u-boot 启动 Linux系统, 无需 spi flash / TF 卡 » 2019-05-15 08:44:21

晕哥 说:
迪卡 说:

rootfs.cpio.uboot是啥

根文件系统

请教晕哥,这个根文件系统有大小限制没,它存到哪了(没spiflash/tf卡)?

还有你用的啥终端,能显示彩色字体。。。

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn