linux从frame buffer中将qt界面拷贝出来放到u盘的操作方法
使用的是gsnap工具,源码可以在百度上搜,以Imx6为例的使用方法
root@imx6qsabresd:~#
root@imx6qsabresd:~#
root@imx6qsabresd:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 289293 197510 76423 73% /
devtmpfs 371004 0 371004 0% /dev
tmpfs 502220 200 502020 1% /run
tmpfs 502220 0 502220 0% /var/volatile
/dev/mmcblk1p1 45488 240 42688 1% /usr/cm/userconfig
/dev/mmcblk1p2 45488 44 42884 1% /usr/cm/dbBackup
/dev/mmcblk1p3 7111724 63728 6680076 1% /usr/cm/patdata
/dev/sda1 60401152 12102464 48298688 21% /var/volatile/tmp/udisk_sda1
root@imx6qsabresd:~# cd /var/volatile/tmp/udisk_sda1
root@imx6qsabresd:/var/volatile/tmp/udisk_sda1# ls
&EV SOFTUPDATE case_history1009
ComenProcessorExport SOFTUPDATE-2000light case_history1012
Export System Volume Information gnasp_tool.tar.gz
MyFile case_backup old
root@imx6qsabresd:/var/volatile/tmp/udisk_sda1# sync
root@imx6qsabresd:/var/volatile/tmp/udisk_sda1#
root@imx6qsabresd:/var/volatile/tmp/udisk_sda1#
root@imx6qsabresd:/var/volatile/tmp/udisk_sda1# cd /usr/cm/patdata
root@imx6qsabresd:/usr/cm/patdata# ls
AutoTestFile gnasp_tool.tar.gz systemLog
def_Autotest lost+found updateLog.txt
root@imx6qsabresd:/usr/cm/patdata# tar -xzvf ./gnasp_tool.tar.gz
gnasp_tool/
gnasp_tool/libjpeg.so.8.4.0
gnasp_tool/gnasp
gnasp_tool/libjpeg.so.8
gnasp_tool/libjpeg.so
root@imx6qsabresd:/usr/cm/patdata# ls
AutoTestFile gnasp_tool lost+found updateLog.txt
def_Autotest gnasp_tool.tar.gz systemLog
root@imx6qsabresd:/usr/cm/patdata# cd ./gnasp_tool
root@imx6qsabresd:/usr/cm/patdata/gnasp_tool# ls
gnasp libjpeg.so libjpeg.so.8 libjpeg.so.8.4.0
root@imx6qsabresd:/usr/cm/patdata/gnasp_tool# ./gnasp
Usage: ./gnasp [jpeg|png file] [framebuffer dev]
Example: ./gnasp fb.jpg /dev/fb0
-----------------------------------------
Powered by broncho(www.broncho.cn)
root@imx6qsabresd:/usr/cm/patdata/gnasp_tool# ls
gnasp libjpeg.so libjpeg.so.8 libjpeg.so.8.4.0
root@imx6qsabresd:/usr/cm/patdata/gnasp_tool# ./gnasp 1.jpg
Usage: ./gnasp [jpeg|png file] [framebuffer dev]
Example: ./gnasp fb.jpg /dev/fb0
-----------------------------------------
Powered by broncho(www.broncho.cn)
root@imx6qsabresd:/usr/cm/patdata/gnasp_tool# ./gnasp 1.jpg /fb0
can't open /fb0
root@imx6qsabresd:/usr/cm/patdata/gnasp_tool# ls /dev
audio loop0 network_throughput stdin tty31 tty57
audio1 loop1 null stdout tty32 tty58
autofs loop2 pps0 tty tty33 tty59
block loop3 ptmx tty0 tty34 tty6
bus loop4 ptp0 tty1 tty35 tty60
char loop5 pts tty10 tty36 tty61
console loop6 ram0 tty11 tty37 tty62
cpu_dma_latency loop7 ram1 tty12 tty38 tty63
disk mem ram10 tty13 tty39 tty7
dri mixer ram11 tty14 tty4 tty8
dsp mixer1 ram12 tty15 tty40 tty9
dsp1 mmcblk1 ram13 tty16 tty41 ttymxc0
egalax_i2c mmcblk1boot0 ram14 tty17 tty42 ttymxc1
fb0 mmcblk1boot1 ram15 tty18 tty43 ttymxc2
fb1 mmcblk1p1 ram2 tty19 tty44 ttymxc3
fb2 mmcblk1p2 ram3 tty2 tty45 ttymxc4
fd mmcblk1p3 ram4 tty20 tty46 ubi_ctrl
full mmcblk1rpmb ram5 tty21 tty47 urandom
fuse mmcblk3 ram6 tty22 tty48 vcs
galcore mmcblk3boot0 ram7 tty23 tty49 vcs1
hwrng mmcblk3boot1 ram8 tty24 tty5 vcsa
i2c-0 mmcblk3p1 ram9 tty25 tty50 vcsa1
i2c-1 mmcblk3rpmb random tty26 tty51 zero
i2c-2 mxc_asrc sda tty27 tty52
initctl mxc_hdmi sda1 tty28 tty53
input mxc_ipu shm tty29 tty54
kmsg mxc_vpu snd tty3 tty55
loop-control network_latency stderr tty30 tty56
root@imx6qsabresd:/usr/cm/patdata/gnasp_tool# ./gnasp 1.jpg /dev/fb0
---------------framebuffer---------------
/dev/fb0:
width : 1280
height: 720
bpp : 4
r(16, 8)
g( 8, 8)
b( 0, 8)
-----------------------------------------
root@imx6qsabresd:/usr/cm/patdata/gnasp_tool# ls
1.jpg gnasp libjpeg.so libjpeg.so.8 libjpeg.so.8.4.0
root@imx6qsabresd:/usr/cm/patdata/gnasp_tool# sync
root@imx6qsabresd:/usr/cm/patdata/gnasp_tool# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 289293 197510 76423 73% /
devtmpfs 371004 0 371004 0% /dev
tmpfs 502220 200 502020 1% /run
tmpfs 502220 0 502220 0% /var/volatile
/dev/mmcblk1p1 45488 240 42688 1% /usr/cm/userconfig
/dev/mmcblk1p2 45488 44 42884 1% /usr/cm/dbBackup
/dev/mmcblk1p3 7111724 64176 6679628 1% /usr/cm/patdata
/dev/sda1 60401152 12102464 48298688 21% /var/volatile/tmp/udisk_sda1
k_sda1/x6qsabresd:/usr/cm/patdata/gnasp_tool# cp ./1.jpg /var/volatile/tmp//udisk
root@imx6qsabresd:/usr/cm/patdata/gnasp_tool# cd /var/volatile/tmp/udisk_sda1
root@imx6qsabresd:/var/volatile/tmp/udisk_sda1# ls
&EV MyFile case_backup old
1.jpg SOFTUPDATE case_history1009
ComenProcessorExport SOFTUPDATE-2000light case_history1012
Export System Volume Information gnasp_tool.tar.gz
root@imx6qsabresd:/var/volatile/tmp/udisk_sda1# sync
root@imx6qsabresd:/var/volatile/tmp/udisk_sda1# usb 2-1: USB disconnect, device number 2
FAT-fs (sda1): Directory bread(block 29632) failed
FAT-fs (sda1): Directory bread(block 29633) failed