WhyCan Forum(哇酷开发者社区)

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn

您尚未登录。

#5 Re: 全志 V3S/F1C100s/X3 » 发个很久之前写的一键licheepi nano的环境部署,编译打包脚本 » 2020-03-31 22:55:41

楼主这个一键打包脚本太妙了, 简直妙不可言, 学习楼主的 shell 脚本.

https://github.com/xiaoxiaohuixxh/lichee-nano-one-key-package/blob/master/build.sh

#!/bin/bash

echo "Welcome to use lichee pi one key package"
toolchain_dir="toolchain"
cross_compiler="arm-linux-gnueabi"
temp_root_dir=$PWD

#uboot=========================================================
u_boot_dir="Lichee-Pi-u-boot"
u_boot_config_file=""
u_boot_boot_cmd_file=""
#uboot=========================================================

#linux opt=========================================================
linux_dir="Lichee-Pi-linux"
linux_config_file=""
#linux opt=========================================================

#linux opt=========================================================
buildroot_dir="buildroot-2017.08"
buildroot_config_file=""
#linux opt=========================================================

#pull===================================================================
pull_uboot(){
	rm -rf ${temp_root_dir}/${u_boot_dir} &&\
	mkdir -p ${temp_root_dir}/${u_boot_dir} &&\
	cd ${temp_root_dir}/${u_boot_dir} &&\
	git clone -b nano-v2018.01 https://github.com/Lichee-Pi/u-boot.git
	if [ ! -d ${temp_root_dir}/${u_boot_dir}/u-boot ]; then
		echo "Error:pull u_boot failed"
    		exit 0
	else	
		mv ${temp_root_dir}/${u_boot_dir}/u-boot/* ${temp_root_dir}/${u_boot_dir}/	
		rm -rf ${temp_root_dir}/${u_boot_dir}/u-boot	
		echo "pull buildroot ok"
	fi
}
pull_linux(){
	rm -rf ${temp_root_dir}/${linux_dir} &&\
	mkdir -p ${temp_root_dir}/${linux_dir} &&\
	cd ${temp_root_dir}/${linux_dir} &&\
	#git clone --depth=1 -b nano-4.14-exp https://github.com/Lichee-Pi/linux.git
	git clone -b f1c100s --depth=1 https://github.com/Icenowy/linux.git
	if [ ! -d ${temp_root_dir}/${linux_dir}/linux ]; then
		echo "Error:pull linux failed"
    		exit 0
	else	
		mv ${temp_root_dir}/${linux_dir}/linux/* ${temp_root_dir}/${linux_dir}/
		rm -rf ${temp_root_dir}/${linux_dir}/linux
		echo "pull buildroot ok"
	fi
}
pull_toolchain(){
	rm -rf ${temp_root_dir}/${toolchain_dir}
	mkdir -p ${temp_root_dir}/${toolchain_dir}
	cd ${temp_root_dir}/${toolchain_dir}
	ldconfig
	if [ $(getconf WORD_BIT) = '32' ] && [ $(getconf LONG_BIT) = '64' ] ; then
		wget http://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabi/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi.tar.xz &&\
		tar xvJf gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi.tar.xz
		if [ ! -d ${temp_root_dir}/${toolchain_dir}/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi ]; then
			echo "Error:pull toolchain failed"
	    		exit 0
		else			
			echo "pull buildroot ok"
		fi
	else
	 	wget http://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabi/gcc-linaro-7.4.1-2019.02-i686_arm-linux-gnueabi.tar.xz &&\
		tar xvJf gcc-linaro-7.4.1-2019.02-i686_arm-linux-gnueabi.tar.xz
		if [ ! -d ${temp_root_dir}/${toolchain_dir}/gcc-linaro-7.4.1-2019.02-i686_arm-linux-gnueabi ]; then
			echo "Error:pull toolchain failed"
	    		exit 0
		else			
			echo "pull buildroot ok"
		fi
	fi
}
pull_buildroot(){
	rm -rf ${temp_root_dir}/${buildroot_dir}
	mkdir -p ${temp_root_dir}/${buildroot_dir}
	cd ${temp_root_dir}/${buildroot_dir}  &&\
	wget https://buildroot.org/downloads/buildroot-2017.08.tar.gz &&\
	tar xvf buildroot-2017.08.tar.gz
	if [ ! -d ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08 ]; then
		echo "Error:pull buildroot failed"
    		exit 0
	else			
		# mv ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08/* ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08
		# rm -rf ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08
		echo "pull buildroot ok"
	fi
}
pull_all(){
        sudo apt-get update
	sudo apt-get install -y autoconf automake libtool gettext 
        sudo apt-get install -y make gcc g++ swig python-dev bc python u-boot-tools bison flex bc libssl-dev libncurses5-dev unzip mtd-utils
	sudo apt-get install -y libc6-i386 lib32stdc++6 lib32z1
	sudo apt-get install -y libc6:i386 libstdc++6:i386 zlib1g:i386
	pull_uboot
	pull_linux
	pull_toolchain
	pull_buildroot
	cp -f ${temp_root_dir}/buildroot.config ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08
	cp -f ${temp_root_dir}/linux-licheepi_nano_defconfig ${temp_root_dir}/${linux_dir}/arch/arm/configs/licheepi_nano_defconfig
	cp -f ${temp_root_dir}/linux-licheepi_nano_spiflash_defconfig ${temp_root_dir}/${linux_dir}/arch/arm/configs/licheepi_nano_spiflash_defconfig
	cp -f ${temp_root_dir}/linux-suniv-f1c100s-licheepi-nano-with-lcd.dts ${temp_root_dir}/${linux_dir}/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano-with-lcd.dts
	cp -f ${temp_root_dir}/uboot-licheepi_nano_defconfig ${temp_root_dir}/${u_boot_dir}/configs/licheepi_nano_defconfig
	cp -f ${temp_root_dir}/uboot-licheepi_nano_spiflash_defconfig ${temp_root_dir}/${u_boot_dir}/configs/licheepi_nano_spiflash_defconfig
	mkdir -p ${temp_root_dir}/output

}
#pull===================================================================

#env===================================================================
update_env(){
	if [ ! -d ${temp_root_dir}/${toolchain_dir}/gcc-linaro-7.4.1-2019.02-i686_arm-linux-gnueabi ]; then
		if [ ! -d ${temp_root_dir}/${toolchain_dir}/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi ]; then
			echo "Error:toolchain no found,Please use ./buid.sh pull_all "
	    		exit 0
		else			
			export PATH="$PWD/${toolchain_dir}/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi/bin":"$PATH"
		fi
	else
		export PATH="$PWD/${toolchain_dir}/gcc-linaro-7.4.1-2019.02-i686_arm-linux-gnueabi/bin":"$PATH"
	fi
	
}
check_env(){
	if [ ! -d ${temp_root_dir}/${toolchain_dir} ] ||\
	 [ ! -d ${temp_root_dir}/${u_boot_dir} ] ||\
	 [ ! -d ${temp_root_dir}/${buildroot_dir} ] ||\
	 [ ! -d ${temp_root_dir}/${linux_dir} ]; then
		echo "Error:env error,Please use ./buid.sh pull_all"
		exit 0
	fi
}
#env===================================================================

#clean===================================================================
clean_log(){
	rm -f ${temp_root_dir}/*.log
}

clean_all(){
	clean_log
	clean_uboot
	clean_linux
	clean_buildroot
}
#clean===================================================================


#uboot=========================================================

clean_uboot(){
	cd ${temp_root_dir}/${u_boot_dir}
	make ARCH=arm CROSS_COMPILE=${cross_compiler}- mrproper > /dev/null 2>&1
}


build_uboot(){
	cd ${temp_root_dir}/${u_boot_dir}
	echo "Building uboot ..."
    	echo "--->Configuring ..."
	make ARCH=arm CROSS_COMPILE=${cross_compiler}- ${u_boot_config_file} > /dev/null 2>&1
        # cp -f ${temp_root_dir}/${u_boot_config_file} ${temp_root_dir}/${u_boot_dir}/.config
	if [ $? -ne 0 ] || [ ! -f ${temp_root_dir}/${u_boot_dir}/.config ]; then
		echo "Error: .config file not exist"
		exit 1
	fi
	echo "--->Get cpu info ..."
	proc_processor=$(grep 'processor' /proc/cpuinfo | sort -u | wc -l)
	echo "--->Compiling ..."
  	make ARCH=arm CROSS_COMPILE=${cross_compiler}- -j${proc_processor} > ${temp_root_dir}/build_uboot.log 2>&1

	if [ $? -ne 0 ] || [ ! -f ${temp_root_dir}/${u_boot_dir}/u-boot ]; then
        	echo "Error: UBOOT NOT BUILD.Please Get Some Error From build_uboot.log"
		error_msg=$(cat ${temp_root_dir}/build_uboot.log)
		if [[ $(echo $error_msg | grep "ImportError: No module named _libfdt") != "" ]];then
		    echo "Please use Python2.7 as default python interpreter"
		fi
        	exit 1
	fi

	if [ ! -f ${temp_root_dir}/${u_boot_dir}/u-boot-sunxi-with-spl.bin ]; then
        	echo "Error: UBOOT NOT BUILD.Please Enable spl option"
        	exit 1
	fi
	#make boot.src
	if [ -n "$u_boot_boot_cmd_file" ];then
		mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Beagleboard boot script" -d ${temp_root_dir}/${u_boot_boot_cmd_file} ${temp_root_dir}/output/boot.scr
	fi
	echo "Build uboot ok"
}
#uboot=========================================================

#linux=========================================================

clean_linux(){
	cd ${temp_root_dir}/${linux_dir}
	make ARCH=arm CROSS_COMPILE=${cross_compiler}- mrproper > /dev/null 2>&1
}


build_linux(){
	cd ${temp_root_dir}/${linux_dir}
	echo "Building linux ..."
    	echo "--->Configuring ..."
	make ARCH=arm CROSS_COMPILE=${cross_compiler}- ${linux_config_file} > /dev/null 2>&1
	if [ $? -ne 0 ] || [ ! -f ${temp_root_dir}/${linux_dir}/.config ]; then
		echo "Error: .config file not exist"
		exit 1
	fi
	echo "--->Get cpu info ..."
	proc_processor=$(grep 'processor' /proc/cpuinfo | sort -u | wc -l)
	echo "--->Compiling ..."
  	make ARCH=arm CROSS_COMPILE=${cross_compiler}- -j${proc_processor} > ${temp_root_dir}/build_linux.log 2>&1

	if [ $? -ne 0 ] || [ ! -f ${temp_root_dir}/${linux_dir}/arch/arm/boot/zImage ]; then
        	echo "Error: LINUX NOT BUILD.Please Get Some Error From build_linux.log"
		#error_msg=$(cat ${temp_root_dir}/build_linux.log)
		#if [[ $(echo $error_msg | grep "ImportError: No module named _libfdt") != "" ]];then
		#    echo "Please use Python2.7 as default python interpreter"
		#fi
        	exit 1
	fi

	if [ ! -f ${temp_root_dir}/${linux_dir}/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano-with-lcd.dtb ]; then
        	echo "Error: UBOOT NOT BUILD.${temp_root_dir}/${linux_dir}/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano-with-lcd.dtb not found"
        	exit 1
	fi
	#build linux kernel modules
	make ARCH=arm CROSS_COMPILE=${cross_compiler}- -j${proc_processor} INSTALL_MOD_PATH=${temp_root_dir}/${linux_dir}/mod_output modules > /dev/null 2>&1
	make ARCH=arm CROSS_COMPILE=${cross_compiler}- -j${proc_processor} INSTALL_MOD_PATH=${temp_root_dir}/${linux_dir}/mod_output modules_install > /dev/null 2>&1
	
	echo "Build linux ok"
}
#linux=========================================================

#linux=========================================================

clean_buildroot(){
	cd ${temp_root_dir}/${buildroot_dir}
	make ARCH=arm CROSS_COMPILE=${cross_compiler}- clean > /dev/null 2>&1
}


build_buildroot(){
	cd ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08
	echo "Building buildroot ..."
    	echo "--->Configuring ..."
	rm ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08/.config
	make ARCH=arm CROSS_COMPILE=${cross_compiler}- defconfig
	cp -f ${temp_root_dir}/buildroot.config ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08/.config
	make ARCH=arm CROSS_COMPILE=${cross_compiler}- ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08/.config
	# make ARCH=arm CROSS_COMPILE=${cross_compiler}- ${buildroot_config_file} > /dev/null 2>&1
	if [ $? -ne 0 ] || [ ! -f ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08/.config ]; then
		echo "Error: .config file not exist"
		exit 1
	fi
	echo "--->Compiling ..."
  	make ARCH=arm CROSS_COMPILE=${cross_compiler}- > ${temp_root_dir}/build_buildroot.log 2>&1

	if [ $? -ne 0 ] || [ ! -d ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08/output/target ]; then
        	echo "Error: BUILDROOT NOT BUILD.Please Get Some Error From build_buildroot.log"
        	exit 1
	fi
	echo "Build buildroot ok"
}
#linux=========================================================

#copy=========================================================
copy_uboot(){
	cp ${temp_root_dir}/${u_boot_dir}/u-boot-sunxi-with-spl.bin ${temp_root_dir}/output/
}
copy_linux(){
	cp ${temp_root_dir}/${linux_dir}/arch/arm/boot/zImage ${temp_root_dir}/output/
	cp ${temp_root_dir}/${linux_dir}/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano-with-lcd.dtb ${temp_root_dir}/output/
	mkdir -p ${temp_root_dir}/output/modules/
	cp -rf ${temp_root_dir}/${linux_dir}/mod_output/lib ${temp_root_dir}/output/modules/
	
}
copy_buildroot(){
	cp -r ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08/output/target ${temp_root_dir}/output/rootfs/
	cp ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08/output/images/rootfs.tar ${temp_root_dir}/output/
	gzip -c ${temp_root_dir}/output/rootfs.tar > ${temp_root_dir}/output/rootfs.tar.gz
}
#copy=========================================================

#pack=========================================================
pack_spiflash_normal_size_img(){

	mkdir -p ${temp_root_dir}/output/spiflash-bin
	dd if=/dev/zero of=${temp_root_dir}/output/spiflash-bin/lichee-nano-normal-size.bin bs=1M count=16
	echo "--->Packing Uboot..."
	_UBOOT_FILE=${temp_root_dir}/output/u-boot-sunxi-with-spl.bin
	dd if=$_UBOOT_FILE of=${temp_root_dir}/output/spiflash-bin/lichee-nano-normal-size.bin bs=1K conv=notrunc
	_DTB_FILE=${temp_root_dir}/output/suniv-f1c100s-licheepi-nano-with-lcd.dtb
	echo "--->Packing dtb..."
	dd if=$_DTB_FILE of=${temp_root_dir}/output/spiflash-bin/lichee-nano-normal-size.bin bs=1K seek=1024  conv=notrunc
	echo "--->Packing zImage..."
	_KERNEL_FILE=${temp_root_dir}/output/zImage
	dd if=$_KERNEL_FILE of=${temp_root_dir}/output/spiflash-bin/lichee-nano-normal-size.bin bs=1K seek=1088  conv=notrunc
	echo "--->Packing rootfs..."
	#cp -r $_MOD_FILE  ${temp_root_dir}/output/rootfs/lib/modules/
	mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0xAF0000 -d ${temp_root_dir}/output/rootfs/ -o ${temp_root_dir}/output/jffs2.img
	dd if=${temp_root_dir}/output/jffs2.img of=${temp_root_dir}/output/spiflash-bin/lichee-nano-normal-size.bin  bs=1K seek=5184  conv=notrunc
	echo "pack ok"
}
pack_tf_normal_size_img(){
	_ROOTFS_FILE=${temp_root_dir}/output/rootfs.tar.gz
	_ROOTFS_SIZE=`gzip -l $_ROOTFS_FILE | sed -n '2p' | awk '{print $2}'`
	_ROOTFS_SIZE=`echo "scale=3;$_ROOTFS_SIZE/1024/1024" | bc`

	_UBOOT_SIZE=1
	_CFG_SIZEKB=0
	_P1_SIZE=16
	_IMG_SIZE=200
	_kernel_mod_dir_name=$(ls ${temp_root_dir}/output/modules/lib/modules/)
	_MOD_FILE=${temp_root_dir}/output/modules/lib/modules/${_kernel_mod_dir_name}
	_MOD_SIZE=`du $_MOD_FILE --max-depth=0 | cut -f 1`
	_MOD_SIZE=`echo "scale=3;$_MOD_SIZE/1024" | bc`
	_MIN_SIZE=`echo "scale=3;$_UBOOT_SIZE+$_P1_SIZE+$_ROOTFS_SIZE+$_MOD_SIZE+$_CFG_SIZEKB/1024" | bc` #+$_OVERLAY_SIZE
	_MIN_SIZE=$(echo "$_MIN_SIZE" | bc)
	echo  "--->min img size = $_MIN_SIZE MB"
	_MIN_SIZE=$(echo "${_MIN_SIZE%.*}+1"|bc)

	_FREE_SIZE=`echo "$_IMG_SIZE-$_MIN_SIZE"|bc`
	_IMG_FILE=${temp_root_dir}/output/image/lichee-nano-normal-size.img
	mkdir -p ${temp_root_dir}/output/image
	rm $_IMG_FILE
	dd if=/dev/zero of=$_IMG_FILE bs=1M count=$_IMG_SIZE
	if [ $? -ne 0 ]
	then 
		echo  "getting error in creating dd img!"
	    	exit
	fi
	_LOOP_DEV=$(sudo losetup -f)
	if [ -z $_LOOP_DEV ]
	then 
		echo  "can not find a loop device!"
		exit
	fi
	sudo losetup $_LOOP_DEV $_IMG_FILE
	if [ $? -ne 0 ]
	then 
		echo  "dd img --> $_LOOP_DEV error!"
		sudo losetup -d $_LOOP_DEV >/dev/null 2>&1 && exit
	fi
	echo  "--->creating partitions for tf image ..."
	#blockdev --rereadpt $_LOOP_DEV >/dev/null 2>&1
	# size only can be integer
	cat <<EOT |sudo  sfdisk $_IMG_FILE
${_UBOOT_SIZE}M,${_P1_SIZE}M,c
,,L
EOT

	sleep 2
	sudo partx -u $_LOOP_DEV
	sudo mkfs.vfat ${_LOOP_DEV}p1 ||exit
	sudo mkfs.ext4 ${_LOOP_DEV}p2 ||exit
	if [ $? -ne 0 ]
	then 
		echo  "error in creating partitions"
		sudo losetup -d $_LOOP_DEV >/dev/null 2>&1 && exit
		#sudo partprobe $_LOOP_DEV >/dev/null 2>&1 && exit
	fi

	#pack uboot
	echo  "--->writing u-boot-sunxi-with-spl to $_LOOP_DEV"
	# sudo dd if=/dev/zero of=$_LOOP_DEV bs=1K seek=1 count=1023  # clear except mbr
	_UBOOT_FILE=${temp_root_dir}/output/u-boot-sunxi-with-spl.bin
	sudo dd if=$_UBOOT_FILE of=$_LOOP_DEV bs=1024 seek=8
	if [ $? -ne 0 ]
	then 
		echo  "writing u-boot error!"
		sudo losetup -d $_LOOP_DEV >/dev/null 2>&1 && exit
		#sudo partprobe $_LOOP_DEV >/dev/null 2>&1 && exit
	fi

	sudo sync
	mkdir -p ${temp_root_dir}/output/p1 >/dev/null 2>&1
	mkdir -p ${temp_root_dir}/output/p2 > /dev/null 2>&1
	sudo mount ${_LOOP_DEV}p1 ${temp_root_dir}/output/p1
	sudo mount ${_LOOP_DEV}p2 ${temp_root_dir}/output/p2
	echo  "--->copy boot and rootfs files..."
	sudo rm -rf  ${temp_root_dir}/output/p1/* && sudo rm -rf ${temp_root_dir}/output/p2/*

	#pack linux kernel
	_KERNEL_FILE=${temp_root_dir}/output/zImage
	_DTB_FILE=${temp_root_dir}/output/suniv-f1c100s-licheepi-nano-with-lcd.dtb
	sudo cp $_KERNEL_FILE ${temp_root_dir}/output/p1/zImage &&\
        sudo cp $_DTB_FILE ${temp_root_dir}/output/p1/ &&\
        sudo cp ${temp_root_dir}/output/boot.scr ${temp_root_dir}/output/p1/ &&\
        echo "--->p1 done~"
        sudo tar xzvf $_ROOTFS_FILE -C ${temp_root_dir}/output/p2/ &&\
        echo "--->p2 done~"
        # sudo cp -r $_OVERLAY_BASE/*  p2/ &&\
        # sudo cp -r $_OVERLAY_FILE/*  p2/ &&\
        sudo mkdir -p ${temp_root_dir}/output/p2/lib/modules/${_kernel_mod_dir_name}/ &&\
        sudo cp -r $_MOD_FILE/*  ${temp_root_dir}/output/p2/lib/modules/${_kernel_mod_dir_name}/
        echo "--->modules done~"
        
        if [ $? -ne 0 ]
        then 
		echo "copy files error! "
		sudo losetup -d $_LOOP_DEV >/dev/null 2>&1
		sudo umount ${_LOOP_DEV}p1  ${_LOOP_DEV}p2 >/dev/null 2>&1
		exit
        fi
        echo "--->The tf card image-packing task done~"
	sudo sync
	sleep 2
	sudo umount ${temp_root_dir}/output/p1 ${temp_root_dir}/output/p2  && sudo losetup -d $_LOOP_DEV
	if [ $? -ne 0 ]
	then 
		echo  "umount or losetup -d error!!"
		exit
	fi
}
#pack=========================================================

#clean output dir=========================================================
clean_output_dir(){
	rm -rf ${temp_root_dir}/output/*
}
#clean output dir=========================================================
build(){
	check_env
	update_env
	echo "clean log ..."
	clean_log
	echo "clean output dir ..."
	clean_output_dir
	build_uboot
	echo "copy uboot ..."
	copy_uboot
	build_linux
	echo "copy linux ..."
	copy_linux
	build_buildroot
	echo "copy buildroot ..."
	copy_buildroot
	
	
}
if [ "${1}" = "" ] && [ ! "${1}" = "nano_spiflash" ] && [ ! "${1}" = "nano_tf" ] && [ ! "${1}" = "pull_all" ]; then
	echo "Usage: build.sh [nano_spiflash | nano_tf | pull_all | clean]";
	echo "One key build nano finware";
	echo " ";
	echo "nano_spiflash    Build nano firmware booted from spiflash";
	echo "nano_tf          Build nano firmware booted from tf";
	echo "pull_all         Pull build env from internet";
	echo "clean            Clean build env";
    exit 0
fi
if [ ! -f ${temp_root_dir}/build.sh ]; then
	echo "Error:Please enter packge root dir"
    	exit 0
fi

if [ "${1}" = "clean" ]; then
	clean_all
	echo "clean ok"
	exit 0
fi
if [ "${1}" = "pull_all" ]; then
	pull_all
fi
if [ "${1}" = "pull_buildroot" ]; then
	pull_buildroot
fi
if [ "${1}" = "nano_spiflash" ]; then
	echo "build rootfs maybe have some buf in this mode"
	linux_config_file="licheepi_nano_spiflash_defconfig"
	u_boot_config_file="licheepi_nano_spiflash_defconfig"
	build
	pack_spiflash_normal_size_img
	echo "the binary file in output/spiflash-bin dir"
fi
if [ "${1}" = "build_buildroot" ]; then
	build_buildroot
fi
if [ "${1}" = "nano_tf" ]; then
	linux_config_file="licheepi_nano_defconfig"
	u_boot_config_file="licheepi_nano_defconfig"
	u_boot_boot_cmd_file="tf_boot.cmd"
	build
	pack_tf_normal_size_img
	echo "the image file in output/image dir"
fi

sleep 1
echo "build ok"

#7 Re: 全志 V3S/F1C100s/X3 » 求助 qt 如何改为rgb565 » 2020-03-31 20:01:31

记得Qt会自动根据fbX自动适配像素分辨率, 我感觉你的驱动和硬件没有匹配好.

buildroot 编译一个fbtest 测试程序检测试一试.

#9 Re: 全志 V3S/F1C100s/X3 » 大家的从github是怎么下载代码的?【求助】 » 2020-03-23 19:54:00

motoedy 说:

先fork到自己的github,然后用github帐号登录gitee,同步到自己的gitee里从gitee上下载会是质的飞跃。。

gitee 在服务器克隆, 和你在本地克隆没有本质区别, 除非你不急, 晚上下单, 第二天早上去收货.

#20 Re: 全志 V3S/F1C100s/X3 » rt8723 运行一段时间后就卡死了 » 2020-03-09 17:27:13

RTL8723BS的主线Linux内置驱动可能是有点问题, 但是不会把系统搞死,如果死了检查电源或者其他硬件问题.

#21 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/ » 感谢@weiyongwill 赠送的某银行淘汰终端机,AM3354 CPU,运行Android【开车了, 凑满50台就发车, 60元+运费】 » 2020-03-09 08:30:43

hzsteven 说:

一直扒核心板的资料,今天终于算小有收获。本机器的核心板应该是根据BBB板转变而来的,有一定的区别,但是核心板的电路可以很好跟BBB板契合,本机器核心板的原件,包括编号,都跟BBB板的编号一致。核心板应该可以增加一个网络IC LAN8710A,实现网络功能。BBB_SCH_4.pdf

给力给力, 这下好玩了. BBB开源资料太多了.

#23 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » Linux下的C语言内置支持正则表达式, 不用满世界找库了. » 2020-03-08 22:21:35

OggyJFX 说:

我一直有个疑问,正则表达式,是一个标准的东西么?还是每个软件用的正则表达式,都有自己的规则?

规则基本大同小异: https://tool.oschina.net/uploads/apidocs/jquery/regexp.html

但是有些库实现的功能更多, 比如java/python库还带替换功能, 这个c库没有这个功能.

#24 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 各位从事嵌入式行业的都实现财务自由了吗? » 2020-03-08 20:45:57

稀缺的资源才会值钱, 比如客户(或市场信息), 或拔尖的技术.

普通的工程师并不是稀缺的资源, 所以不会太值钱, 月薪三万是99%工程师的天花板吧?

老板或者业务员掌握了客户(或市场信息), 所以值钱,

工程师努力学习进入有钱途的公司(比如可能上市), 或发现赚钱的机会(如创业),

有可能财务自由.

#25 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » Linux下的C语言内置支持正则表达式, 不用满世界找库了. » 2020-03-08 19:15:47

https://stackoverflow.com/questions/7899119/what-does-s-mean-in-printf

void f(const char *str, int str_len)
{
  printf("%.*s\n", str_len, str);
}
#include <stdio.h>

int main() {
    int precision = 8;
    int biggerPrecision = 16;
    const char *greetings = "Hello world";

    printf("|%.8s|\n", greetings);
    printf("|%.*s|\n", precision , greetings);
    printf("|%16s|\n", greetings);
    printf("|%*s|\n", biggerPrecision , greetings);

    return 0;
}
|Hello wo|
|Hello wo|
|     Hello world|
|     Hello world|

意外的收获, printf 的一种使用方法.

#26 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » Linux下的C语言内置支持正则表达式, 不用满世界找库了. » 2020-03-08 18:50:55

在一楼的基础上写一个简单的 AT 输出字符串处理函数:

#include <assert.h>
#include <stdio.h>
#include <sys/types.h>
#include <regex.h>

int main(void) {
  int r;
  regex_t reg;
  regmatch_t match[7];


  char *line = "+CCLK: \"20/03/08,17:31:52+32\"";
  regcomp(&reg, "\\+CCLK: \"([0-9]{2})/([0-9]{2})/([0-9]{2}),([0-9]{2}):([0-9]{2}):([0-9]{2})", REG_ICASE | REG_EXTENDED);

  r = regexec(&reg, line, 7, match, 0);

  if (r == 0) {
    printf("Match!\n");
    printf("0: [%.*s]\n", match[0].rm_eo - match[0].rm_so, line + match[0].rm_so);
    printf("1: [%.*s]\n", match[1].rm_eo - match[1].rm_so, line + match[1].rm_so);
    printf("2: [%.*s]\n", match[2].rm_eo - match[2].rm_so, line + match[2].rm_so);
    printf("3: [%.*s]\n", match[3].rm_eo - match[3].rm_so, line + match[3].rm_so);

    printf("4: [%.*s]\n", match[4].rm_eo - match[4].rm_so, line + match[4].rm_so);
    printf("5: [%.*s]\n", match[5].rm_eo - match[5].rm_so, line + match[5].rm_so);
    printf("6: [%.*s]\n", match[6].rm_eo - match[6].rm_so, line + match[6].rm_so);
  } else {
    printf("NO match!\n");
  }

  return 0;
}

输出结果:

Match!
0: [+CCLK: "20/03/08,17:31:52]
1: [20]
2: [03]
3: [08]
4: [17]
5: [31]
6: [52]

#27 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » Linux下的C语言内置支持正则表达式, 不用满世界找库了. » 2020-03-08 18:40:11

https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rtref/regexec.htm

ibm 的一个演示代码:

#include <regex.h>
#include <stdio.h>
#include <stdlib.h>
 
int main(void)
{
   regex_t    preg;
   char       *string = "a very simple simple simple string";
   char       *pattern = "\\(sim[a-z]le\\) \\1";
   int        rc;
   size_t     nmatch = 2;
   regmatch_t pmatch[2];
 
   if (0 != (rc = regcomp(&preg, pattern, 0))) {
      printf("regcomp() failed, returning nonzero (%d)\n", rc);
      exit(EXIT_FAILURE);
   }
 
   if (0 != (rc = regexec(&preg, string, nmatch, pmatch, 0))) {
      printf("Failed to match '%s' with '%s',returning %d.\n",
             string, pattern, rc);
   }
   else {
      printf("With the whole expression, "
             "a matched substring \"%.*s\" is found at position %d to %d.\n",
             pmatch[0].rm_eo - pmatch[0].rm_so, &string[pmatch[0].rm_so],
             pmatch[0].rm_so, pmatch[0].rm_eo - 1);
      printf("With the sub-expression, "
             "a matched substring \"%.*s\" is found at position %d to %d.\n",
             pmatch[1].rm_eo - pmatch[1].rm_so, &string[pmatch[1].rm_so],
             pmatch[1].rm_so, pmatch[1].rm_eo - 1);
   }
   regfree(&preg);
   return 0;
 
   /****************************************************************************
      The output should be similar to :
 
      With the whole expression, a matched substring "simple simple" is found
      at position 7 to 19.
      With the sub-expression, a matched substring "simple" is found
      at position 7 to 12.
   ****************************************************************************/
}

运行结果:

With the whole expression, a matched substring "simple simple" is found at position 7 to 19.
With the sub-expression, a matched substring "simple" is found at position 7 to 12.

#28 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » Linux下的C语言内置支持正则表达式, 不用满世界找库了. » 2020-03-08 18:37:52

https://www.mitchr.me/SS/exampleCode/AUPG/regex_example.c.html

/* -*- Mode:C; Coding:us-ascii-unix; fill-column:132 -*- */
/**********************************************************************************************************************************/
/**
   @file      regex_example.c
   @author    Mitch Richling <https://www.mitchr.me/>
   @Copyright Copyright 1994,2014 by Mitch Richling.  All rights reserved.
   @brief     UNIX regex tools@EOL
   @Keywords  UNIX regular expressions regex
   @Std       ISOC POSIX.2 (IEEE Std 103.2) BSD4.3
   @Tested    
              - Solaris 2.8
              - MacOS X.2
              - Linux (RH 7.3)

   This is an example program intended to illustrate very basic use of regular expressions.
  
   Grumpy programmer note: IEEE Std 1003.2, generally referred to as 'POSIX.2' is a bit vague regarding several details like how
   back references work.  It also has a couple of errors (like how a single ')' is treated in a regular expression.  Because of
   this, most actual implementations of the standard will have several minor inconsistencies that one must watch out for.  My best
   advice is to "read the man page" on the platforms you wish to run on and to avoid exotic things.  For example, avoid things like
   the BSD REG_NOSPEC and REG_PEND options.  Another option is to simply carry your favorite regular expression library with you.
   For example, C++11 has very good regex support, and the BOOST library has a very nice regex class for older C++ versions.  PCRE
   is probably the most popular alternative, FOSS regular expression library available.
***********************************************************************************************************************************/

#include <sys/types.h>          /* UNIX types      POSIX */
#include <regex.h>              /* Regular Exp     POSIX */
#include <stdio.h>              /* I/O lib         C89   */
#include <string.h>             /* Strings         C89   */
#include <stdlib.h>             /* Standard Lib    C89   */

/**********************************************************************************************************************************/
#define MAX_SUB_EXPR_CNT 256
#define MAX_SUB_EXPR_LEN 256
#define MAX_ERR_STR_LEN  256

/**********************************************************************************************************************************/
int main(int argc, char *argv[]) {
  int i;                                /* Loop variable.                          */
  char p[MAX_SUB_EXPR_LEN];             /* For string manipulation                 */
  regex_t aCmpRegex;                    /* Pointer to our compiled regex           */
  char *aStrRegex;                      /* Pointer to the string holding the regex */
  regmatch_t pMatch[MAX_SUB_EXPR_CNT];  /* Hold partial matches.                   */
  char **aLineToMatch;                  /* Holds each line that we wish to match   */
  int result;                           /* Return from regcomp() and regexec()     */
  char outMsgBuf[MAX_ERR_STR_LEN];      /* Holds error messages from regerror()    */
  char *testStrings[] = { "This should match... hello",
                          "This could match... hello!",
                          "More than one hello.. hello",
                          "No chance of a match...",
                          NULL};

  /* use aStrRegex for readability. */
  aStrRegex = "(.*)(hello)+";
  printf("Regex to use: %s\n", aStrRegex);

  /* Compile the regex */
  if( (result = regcomp(&aCmpRegex, aStrRegex, REG_EXTENDED)) ) {
    printf("Error compiling regex(%d).\n", result);
    regerror(result, &aCmpRegex, outMsgBuf, sizeof(outMsgBuf));
    printf("Error msg: %s\n", outMsgBuf);
    exit(1);
  } /* end if */

  /*  Possible last argument to regcomp (||'ed together):
        REG_EXTENDED  Use extended regular expressions
        REG_BASIC     Use basic regular expressions
        REG_NOSPEC    Special character support off (Not POSIX.2)
        REG_ICASE     Ignore upper/lower case distinctions
        REG_NOSUB     No sub-strings (just check for match/no match)
        REG_NEWLINE   Compile for newline-sensitive matching
        REG_PEND      Specify alternate string ending (Not POSIX.2) */


  /* Apply our regular expression to some strings. */
  for(aLineToMatch=testStrings; *aLineToMatch != NULL; aLineToMatch++) {
    printf("String: %s\n", *aLineToMatch);
    printf("        %s\n", "0123456789012345678901234567890123456789");
    printf("        %s\n", "0         1         2         3");
    /* compare and check result (MAX_SUB_EXPR_CNT max sub-expressions).*/
    if( !(result = regexec(&aCmpRegex, *aLineToMatch, MAX_SUB_EXPR_CNT, pMatch, 0)) ) {
      /* Last argument to regexec (||'ed together):
         REG_NOTBOL    Start of the string is NOT the start of a line
         REG_NOTEOL    $ shouldn't match end of string (gotta have a newline)
         REG_STARTEND  Not POSIX.2 */
      printf("Result: We have a match!\n");
      for(i=0;i<=(int)aCmpRegex.re_nsub;i++) {
        printf("Match(%2d/%2d): (%2d,%2d): ", 
               i, 
               (int)(aCmpRegex.re_nsub), 
               (int)(pMatch[i].rm_so), 
               (int)(pMatch[i].rm_eo));

          if( (pMatch[i].rm_so >= 0) && (pMatch[i].rm_eo >= 1) && 
              (pMatch[i].rm_so != pMatch[i].rm_eo) ) {
            strncpy(p, &((*aLineToMatch)[pMatch[i].rm_so]), pMatch[i].rm_eo-pMatch[i].rm_so);
            p[pMatch[i].rm_eo-pMatch[i].rm_so] = '\0';
            printf("'%s'", p);
          } /* end if */
          printf("\n");
      } /* end for */
      printf("\n");
    } else {
      switch(result) {
        case REG_NOMATCH   : printf("String did not match the pattern\n");                   break;
        ////Some typical return codes:
        //case REG_BADPAT    : printf("invalid regular expression\n");                         break;
        //case REG_ECOLLATE  : printf("invalid collating element\n");                          break;
        //case REG_ECTYPE    : printf("invalid character class\n");                            break;
        //case REG_EESCAPE   : printf("`\' applied to unescapable character\n");               break;
        //case REG_ESUBREG   : printf("invalid backreference number\n");                       break;
        //case REG_EBRACK    : printf("brackets `[ ]' not balanced\n");                        break;
        //case REG_EPAREN    : printf("parentheses `( )' not balanced\n");                     break;
        //case REG_EBRACE    : printf("braces `{ }' not balanced\n");                          break;
        //case REG_BADBR     : printf("invalid repetition count(s) in `{ }'\n");               break;
        //case REG_ERANGE    : printf("invalid character range in `[ ]'\n");                   break;
        //case REG_ESPACE    : printf("Ran out of memory\n");                                  break;
        //case REG_BADRPT    : printf("`?', `*', or `+' operand invalid\n");                   break;
        //case REG_EMPTY     : printf("empty (sub)expression\n");                              break;
        //case REG_ASSERT    : printf("can't happen - you found a bug\n");                     break;
        //case REG_INVARG    : printf("A bad option was passed\n");                            break;
        //case REG_ILLSEQ    : printf("illegal byte sequence\n");                              break;
        default              : printf("Unknown error\n");                                      break;
      } /* end switch */
      regerror(result, &aCmpRegex, outMsgBuf, sizeof(outMsgBuf));
      printf("Result: Error msg: %s\n\n", outMsgBuf);
    } /* end if/else */
  } /* end for */
  
  /* Free up resources for the regular expression */
  regfree(&aCmpRegex);

  exit(0);
} /* end func main */

另外一个demo, 运行结果:

Regex to use: (.*)(hello)+
String: This should match... hello
        0123456789012345678901234567890123456789
        0         1         2         3
Result: We have a match!
Match( 0/ 2): ( 0,26): 'This should match... hello'
Match( 1/ 2): ( 0,21): 'This should match... '
Match( 2/ 2): (21,26): 'hello'

String: This could match... hello!
        0123456789012345678901234567890123456789
        0         1         2         3
Result: We have a match!
Match( 0/ 2): ( 0,25): 'This could match... hello'
Match( 1/ 2): ( 0,20): 'This could match... '
Match( 2/ 2): (20,25): 'hello'

String: More than one hello.. hello
        0123456789012345678901234567890123456789
        0         1         2         3
Result: We have a match!
Match( 0/ 2): ( 0,27): 'More than one hello.. hello'
Match( 1/ 2): ( 0,22): 'More than one hello.. '
Match( 2/ 2): (22,27): 'hello'

String: No chance of a match...
        0123456789012345678901234567890123456789
        0         1         2         3
String did not match the pattern
Result: Error msg: No match

#29 VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » Linux下的C语言内置支持正则表达式, 不用满世界找库了. » 2020-03-08 18:36:24

firstman
回复: 9

https://stackoverflow.com/questions/9656161/why-regexec-of-c-does-not-match-this-pattern-but-match-of-javascript-works

#include <assert.h>
#include <stdio.h>
#include <sys/types.h>
#include <regex.h>

int main(void) {
  int r;
  regex_t reg;
  regmatch_t match[2];
  char *line = "----------------------- Page 1-----------------------";

  regcomp(&reg, "[-]{23}[ ]*Page[ ]*([0-9]*)[-]{23}", REG_ICASE | REG_EXTENDED);
  /*                                ^------^ capture page number */
  r = regexec(&reg, line, 2, match, 0);
  if (r == 0) {
    printf("Match!\n");
    printf("0: [%.*s]\n", match[0].rm_eo - match[0].rm_so, line + match[0].rm_so);
    printf("1: [%.*s]\n", match[1].rm_eo - match[1].rm_so, line + match[1].rm_so);
  } else {
    printf("NO match!\n");
  }

  return 0;
}

这个可以直接编译运行.


windows下的VC编译估计通不过, 但是用mingw应该可以, 未测试.

运行结果:

Match!
0: [----------------------- Page 1-----------------------]
1: [1]

#32 Re: 华芯微特 » 计划 50元 得5寸IPS SWM320VE 开发板 可行? » 2020-03-01 17:43:32

OggyJFX 说:

这个处理器用啥烧写器?

swd接口的 jlink 就可以了, 或者别的开源调试器也行.

#34 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 随手记录一下玩 vultr 的记录, 不越界. » 2020-02-26 23:19:07

mango 说:

http://dl.widora.io/dl/linux-4.14.158.tar.xz  这个是日本节点的,测测速。

下半夜速度不行噢, 和般佤弓没什么区别.

现在速度 15KB/s 以下.

#38 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 转发一个opengl 渲染到缓冲区,写到文件的 demo » 2020-02-20 19:58:40

https://stackoverflow.com/questions/11474078/efficient-off-screen-rendering-of-qpainterpaths-opengl-and-non-opengl-solution

#include <QApplication>
#include <Windows.h>
#include <gl/GL.h>
#include <gl/GLU.h>
#include <QtOpenGL/QGLFormat>
#include <QtOpenGL/QGLPixelBuffer>
#include <QImage>

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

    // Construct an OpenGL pixel buffer.
    QGLPixelBuffer glPixBuf(100, 100);
    // Make the QGLContext object bound to pixel buffer the current context
    glPixBuf.makeCurrent();
    // The opengl commands
    glClearColor(1.0, 1.0, 1.0, 0.0);
    glViewport(0, 0, 100, 100);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    gluOrtho2D(0, 100, 0, 100);
    glClear(GL_COLOR_BUFFER_BIT);
    glColor3f(1.0, 0.0, 0.0);
    glPointSize(4.0);
    glBegin(GL_TRIANGLES);
    glVertex2i(10, 10);
    glVertex2i(50, 50);
    glVertex2i(25, 75);
    glEnd();
    // At last, the pixel buffer was saved as an image
    auto pImage = glPixBuf.toImage();
    pImage.save(QString::fromLocal8Bit("gl.png"));

    return a.exec();
}

记得 qt pro 工程文件要添加:

QT       += core gui opengl

LIBS += -lopengl32 -lglu32

这里有一个OpenGL Qt渲染到内存, 然后输出到文件的demo

#39 Re: 全志 V3S/F1C100s/X3 » f1c100s 如何让lcd显存空间连续? » 2020-02-19 23:03:56

你是不是想通过 DMA 画任意矩形这种方式?

#40 Re: 华芯微特 » 华芯微特正式复工啦!!! » 2020-02-17 19:41:34

还在老家的飘过, 希望疫情早点过去.

#45 Re: 全志 V3S/F1C100s/X3 » F1C100S 为什么要这么多路电压 » 2020-02-16 11:12:39

还好吧,不能苛求完美, 总比三桑的 s3c2440/2416 好吧.

#49 Re: 全志 V3S/F1C100s/X3 » 跟风画了个F1C200S的小板 【开源PCB】 » 2020-02-11 21:58:17

mango 说:

漂亮,推荐使用  http://g.widora.io 下载git包,填入: https://github.com/wujique/F1C200S_HDK.git 
big_smile

你这仓库中的 ibom.html 真牛逼,好评!

一直显示正在打包, 纹丝不动呢.

#51 Re: 全志 V3S/F1C100s/X3 » 哪位大神,移植了RTT到V3s上呢? » 2020-02-07 21:44:59

这板子性价比不错啊, 什么时候可以发货啊?

#52 Re: 全志 V3S/F1C100s/X3 » f1c100s使用uart1 » 2020-02-07 13:30:19

看启动 log, uart1 不一定对应 /dev/ttyS1.

#53 Re: 全志 V3S/F1C100s/X3 » F1C100S在编译buildroot-2017.08 时出现以下错误,请问如何解决,谢谢 » 2020-02-06 20:59:52

ycq6671338 说:

换回Ubuntu16.04再编译就没问题了,应该是和软件版本有关,新的不中>_<

还有这种操作 sad

#54 Re: DSP » TI C6745 游戏机:BlackPrism » 2020-02-06 18:07:37

感谢分享, 楼主的工作很有创意!

#55 Re: 全志 V3S/F1C100s/X3 » F1C100S的Keil裸机USB+LCD+PWM+GPIO工程搞定,修复GNU工具链BUG » 2020-02-06 14:51:07

xidaole 说:

我编译工具改为了绝对路径: ..\f1c100s_keil\Toolchain\ 
然后编译成功。 但对bin文件“打包”失败。

mksunxi.exe 不存在/路径错误/执行失败/参数错误?

#62 Re: 全志 V3S/F1C100s/X3 » Licheepi Zero实现裸板点亮RGB LED的功能 » 2020-01-15 17:30:35

1. 8k偏移地址是BROM固化的,没办法修改。



其他不会呢。

#63 Re: 全志 V3S/F1C100s/X3 » 全志a20可不可以接8位并口的8080 CPU屏?如果可以的话接口怎么连接? » 2020-01-15 15:27:44

sunxi_lcd_cpu_write_index/data 写进去之后, LCD 有没有反应, 如果有反应, 可以直接写像素点的话,不考虑程序可移植性,怎么玩都可以。

#65 Re: 全志 V3S/F1C100s/X3 » 请教高手, f1c100s LCD的驱动是哪个文件? » 2020-01-15 15:10:40

改 u-boot 的驱动只会影响 u-boot, Linux同理.

linux 源码目录执行:

find . |grep pinctrl |grep \\.o$

看哪些 pinctrl 文件参与了编译链接。

#66 Re: 全志 V3S/F1C100s/X3 » 全志a20可不可以接8位并口的8080 CPU屏?如果可以的话接口怎么连接? » 2020-01-15 15:08:27

sunxi_lcd_cpu_write_index 直接写帧缓冲区(framebuffer)?没有这么玩过嗯, 为什么要这么做呢?

#67 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/ » 嫌全字库ttf文件太肥的朋友,可以进来看看了,按需剪裁, 减肥/瘦身/不留赘肉 » 2020-01-13 10:49:33

谢谢, 试了一把, 好用:

java -jar sfnttool.jar -s "米秒分钟小时瞬时流速累计流量水表单位立方米秒一二三四五六七八九十百千万亿0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ""!#$%&'()*+,-./:;<=>?@[\]^_`" msyh.ttf msyh_simple.ttf

参数 msyh.ttf 是源字库文件

参数 msyh_simple.ttf 是瘦身之后的字库文件


这里可以下载: msyh_simple.7z

#68 DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/ » 刚刚翻京东方 bp101wx1-206 的手册, 发现有一个 CABC_EN 引脚, 搜了一下,这个神奇的功能 » 2020-01-11 10:29:40

firstman
回复: 4

刚刚翻京东方 bp101wx1-206 的手册, 发现有一个 CABC_EN 引脚, 搜了一下,这个神奇的功能

居然是背光节电技术, 就是根据显示的内容, 自动调整背光亮度, 用于节省能源。


以前的用的液晶都没有这个功能, 第一次见识。

参考: https://blog.csdn.net/chenzhen1080/article/details/54709715

#75 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/ » 请问市场上群创 10.1寸 LVDS 液晶 EJ101IA 100片左右是什么价?有没有兼容的产品? » 2019-12-25 13:34:28

放羊娃 说:

你这几款都赶不上 EJ101IA的分辨率吧?

对, EJ101IA 是 1280x800 LVDS,

我上面这个是 1024x600 50PIN TTL RGB, 排线兼容群创的AT070TN92/AT070TN94, 这样公司也不用重新做板了,

只要做一个外壳手板先应付顾客。

#76 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/ » 请问市场上群创 10.1寸 LVDS 液晶 EJ101IA 100片左右是什么价?有没有兼容的产品? » 2019-12-25 11:50:25

arychen 说:

22寸的,华星的组装屏200出头点。这个是我了解的22寸左右最便宜的。
10寸的居然也要毛200啊。。。。   这么贵,估计RGB/MIPI的可能便宜点吧

没办法, 客户只要便宜货,还要耐艹的。

找到一个楼上友达的兼容屏了,80元左右

https://detail.1688.com/offer/587638144808.html




另一家带电容触摸, 150元:
https://detail.1688.com/offer/557211351992.html

这家没公开价格:
https://detail.1688.com/offer/588031071182.html

#77 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/ » 请问市场上群创 10.1寸 LVDS 液晶 EJ101IA 100片左右是什么价?有没有兼容的产品? » 2019-12-24 17:41:35

notepad-- 说:

楼主最后液晶型号确定下来了吗?

没有呢,这种太贵,最便宜都要接近200元, 直接被老板打枪了。

友达AUO G101STN01 这种兼容屏貌似还行, 阿里巴巴售价 80 - 100块。


这是手册: G101STN01_V2.pdf

#79 Re: 全志 V3S/F1C100s/X3 » dd 命令 打包, sunxi-fel烧写 » 2019-12-17 10:24:06

可能是超大之后, 回环把u-boot擦掉了。

你执行前5步试一试呗

#81 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/ » 请问市场上群创 10.1寸 LVDS 液晶 EJ101IA 100片左右是什么价?有没有兼容的产品? » 2019-12-17 09:35:18

微凉VeiLiang 说:

这两个屏我家里还有两片,是平板电脑拆机的

嗯, 发现这个屏的兼容厂家还挺多的: 群创 EJ101IA, 翰彩HSD101PWW1, 京东方 BP101WX1

路过的朋友求推荐供应商了。

#82 Re: 全志 V3S/F1C100s/X3 » 编译gdb总是出错,有没有编译好的,能不能发一个给我 » 2019-12-17 09:33:30

psst 说:

需要选中Toolchain下的Thread library debugging,这样就可以了,在论坛里找到了,这里真好,帮我绕过很多坑啊

哪个帖子呢?我也去围观一下。

#87 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/ » 请问市场上群创 10.1寸 LVDS 液晶 EJ101IA 100片左右是什么价?有没有兼容的产品? » 2019-12-17 08:45:31

1 LCD size 10.1 inch(Diagonal)  
2 Driver element a-Si TFT active matrix  
3 Resolution 1280 × 3(RGB) × 800  
4 Display mode Normally Black, Transmissive  
5 Dot pitch 0.0565(W) × 0.1695(H) mm  
6 Active area  216.96(W) × 135.60(H) mm 
7 Module size 229.46(W) ×149.1(H) ×2.50(D) mm N
8 Surface treatment HC 
9 Color arrangement RGB-stripe  
10 Interface Digital  
11 Backlight power consumption 1.76 W(Typ.)  
12 Panel power consumption 0.7W(Typ.) Not
13 Weight 0.183KG(Typ.)  
14 inversion 1+2line  
15 IC HX8288*4&HX8695*1  

#88 DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/ » 请问市场上群创 10.1寸 LVDS 液晶 EJ101IA 100片左右是什么价?有没有兼容的产品? » 2019-12-17 08:44:41

firstman
回复: 15

手册奉上: EJ101IA-01G_Final_spec_V06_20160923.pdf







找到一些兼容的屏, 我对照过接口/分辨率/尺寸等, 所以更新:
----------------------
群创 EJ101IA: EJ101IA-01G_Final_spec_V06_20160923.pdf
韩国 LG LP101WX1: LP101WX1-SLN2.pdf
友达 AUO B101EW05: B101EW05_V0.pdf
京东方 BP101WX1-206: bp101wx1-206.pdf
翰彩 HSD101PWW1: HSD101PWW1.pdf

群创 EJ101IA
韩国 LG LP101WX1
友达 AUO B101EW05
京东方 BP101WX1-206
翰彩 HSD101PWW1

#89 Re: 全志 V3S/F1C100s/X3 » 试一试用MDK ARMCC 编译全志官方f1c100s sdk --- melis » 2019-12-14 16:52:21

感觉是卡和boot不兼容的问题, sd卡初始化错误了,先换张卡试一试。

#90 Re: 全志 V3S/F1C100s/X3 » LIcheepi Nano如何简单的竖屏显示? » 2019-12-14 16:50:30

达克罗德 说:

用带初始化spi的那种屏,LCD驱动芯片可以转

我手里有一个 ILI9481 SPI + RGB 的 320x480 屏, 本来想用SPI初始化成 480x320,

但是死活没搞定, 不是这里不对, 就是那里不对,操碎了心。

请问你用的是哪个屏呢?旋转可以参考一下吗?

#91 Re: RK3288/RK3399/RK1108 » 以太网mac地址设置为随机,会影响联网吗? » 2019-12-14 15:57:11

BMN李 说:

获取不到ip,开启了dhcp的。路由器、交换机都试了都不行。网线在其他联网设备上是可以用的。这个兼容问题不确定。

现在就是想找到大概的可能性,好一一排查。

那试一试动态mac, 静态给一个固定IP, 看是否可以联网。

如果可以联网,说名很可能是因为发不出去 广播/组播包, 导致无法用 dhcp获取ip地址,因为dhcp是基于 广播/组播的。

有些网络管得严,什么组播广播全禁用了,还分割成vlan,情况复杂着呢。

#92 Re: 全志 V3S/F1C100s/X3 » LIcheepi Nano如何简单的竖屏显示? » 2019-12-14 15:48:59

胸弟, 还是上个GUI吧,哪怕 ugui 也好啊: https://whycan.cn/t_29.html

代码非常的简单: https://github.com/achimdoebler/UGUI

底层只要提供一个画点函数就可以了:  https://whycan.cn/t_29.html#p5129

UG_Init(&gui,ssd1325_pset,128,64);

#94 Re: 全志 V3S/F1C100s/X3 » 在海豚派上运行彩虹派的SDK » 2019-12-12 10:52:32

好贴, 关注!准备移植到荔枝派zero.

#95 Re: 全志 V3S/F1C100s/X3 » F1C100s支持MCU接口液晶屏吗? » 2019-12-12 10:52:02

Quotation 说:

按晕哥的提示,参考了 彩虹派V3s开发板原理图A10 LCD 调试手册 这两份资料,画了块RGB屏转 i80屏的转接板。等打样回来慢慢调~
(图上丝印1脚和常用的线序是反的)

https://whycan.cn/files/members/1163/i80lcd-bridge-v1_0.png

后面成功了吗?原理图是否正确?

#96 Re: Cortex M0/M3/M4/M7 » stm32有没有可以接两个hall传感器的(控制2个bldc)? » 2019-12-12 08:27:49

https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html

的STM32F303是混合信号微控制器与ARM ® Cortex® -M4芯(具有FPU和DSP指令)在72兆赫运行。
这些是STM32F30x系列中的超集设备

设备配备:

高达7倍的快速和超快速比较器(25 ns)
高达4倍的运算放大器,具有可编程增益
多达2个12位DAC
高达5个MSPS的4个超快速12位ADC
多达3个快速144 MHz电机控制定时器(分辨率<7 ns)
全速USB和CAN 2.0B通信接口
核心耦合内存SRAM(Routine Booster),一种特定的内存体系结构可增强对时间要求严格的例程,与闪存执行相比,性能提高了43%
STM32F303微控制器的工作电压为2至3.6伏。
内存范围从32到512 KB,封装范围从32到144引脚。
温度范围为-40至85°C或-40至105°C(结温为125°C)。

确实为电机而生.

#99 Re: 全志 V3S/F1C100s/X3 » LicheePi Nano 运行lvgl只有半截,无全屏 » 2019-10-30 08:35:20

屏幕的Ui界面仍然是非全屏 是怎样的?你屏幕分辨率是多少?

#100 Re: Cortex M0/M3/M4/M7 » 关于6轴惯性模块的姿态解算问题请教 » 2019-10-29 09:20:40

用加速度传感器, 可以精确计算电梯现在在几楼吗?

#102 Qt/MSVC/MINGW/C++/MFC/GTK+/Delphi/BCB » vs工程生成脚本,一个由源文件自动生成vs2012工程的脚本,使用时放到源文件的根目录下,直接执行就可以看到效果了。 » 2019-10-29 09:10:38

firstman
回复: 1

vs工程生成脚本,一个由源文件自动生成vs2012工程的脚本,使用时放到源文件的根目录下,直接执行就可以看到效果了。

由于脚本是python编写的,请先安装python2.

下载地址: https://download.csdn.net/download/ybxuwei/9447004

# vsproj.py
import uuid
import os
import os.path
import re

def write_file(filepath, str):
	f = file(filepath, "w")
	f.write(str)
	f.close()


proj_uuid = str(uuid.uuid1()).upper()
cwd = os.getcwd()
proj_name = cwd[cwd.rfind("\\")+1:]
vs_dir = "vs2012"
# sln 

sln = \
"Microsoft Visual Studio Solution File, Format Version 12.00"\
"\n# Visual Studio 2012"\
"\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"$proj_name\", \"vs2012.vcxproj\", \"{$proj_uuid}\""\
"\nEndProject"\
"\nGlobal"\
"\n	GlobalSection(SolutionConfigurationPlatforms) = preSolution"\
"\n		Debug|Win32 = Debug|Win32"\
"\n		Release|Win32 = Release|Win32"\
"\n	EndGlobalSection"\
"\n	GlobalSection(ProjectConfigurationPlatforms) = postSolution"\
"\n		{$proj_uuid}.Debug|Win32.ActiveCfg = Debug|Win32"\
"\n		{$proj_uuid}.Release|Win32.ActiveCfg = Debug|Win32"\
"\n	EndGlobalSection"\
"\n	GlobalSection(SolutionProperties) = preSolution"\
"\n		HideSolutionNode = FALSE"\
"\n	EndGlobalSection"\
"\nEndGlobal\n"
sln = sln.replace("$proj_uuid", proj_uuid).replace("$proj_name", proj_name)
#print sln

# vcxproj
vcproj = \
"<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
"\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">"\
"\n  <ItemGroup Label=\"ProjectConfigurations\">"\
"\n    <ProjectConfiguration Include=\"Debug|Win32\">"\
"\n      <Configuration>Debug</Configuration>"\
"\n      <Platform>Win32</Platform>"\
"\n    </ProjectConfiguration>"\
"\n  </ItemGroup>"\
"\n  <Import Project=\"$(VCTargetsPath)\Microsoft.Cpp.Default.props\" />"\
"\n  <Import Project=\"$(VCTargetsPath)\Microsoft.Cpp.props\" />"\
"\n  <ImportGroup Label=\"ExtensionSettings\">"\
"\n  </ImportGroup>  "\
"\n  <ImportGroup Label=\"PropertySheets\" Condition=\"\'$(Configuration)|$(Platform)\'==\'Debug|Win32\'\">"\
"\n    <Import Project=\"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists(\'$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props\')\" Label=\"LocalAppDataPlatform\" />"\
"\n  </ImportGroup>"\
"\n  <PropertyGroup Condition=\"\'$(Configuration)|$(Platform)\'==\'Debug|Win32\'\" Label=\"Configuration\">"\
"\n    <ConfigurationType>Application</ConfigurationType>"\
"\n    <UseDebugLibraries>true</UseDebugLibraries>"\
"\n    <PlatformToolset>v110</PlatformToolset>"\
"\n    <CharacterSet>MultiByte</CharacterSet>"\
"\n  </PropertyGroup>"\
"\n  <PropertyGroup Label=\"Globals\">"\
"\n    <ProjectGuid>{$proj_uuid}</ProjectGuid>"\
"\n    <RootNamespace>vs2012</RootNamespace>"\
"\n    <ProjectName>$proj_name</ProjectName>"\
"\n  </PropertyGroup>"\
"\n  <Import Project=\"$(VCTargetsPath)\Microsoft.Cpp.Default.props\" />"\
"\n  <PropertyGroup Condition=\"\'$(Configuration)|$(Platform)\'==\'Debug|Win32\'\" Label=\"Configuration\">"\
"\n    <ConfigurationType>Application</ConfigurationType>"\
"\n    <UseDebugLibraries>true</UseDebugLibraries>"\
"\n    <PlatformToolset>v110</PlatformToolset>"\
"\n    <CharacterSet>MultiByte</CharacterSet>"\
"\n  </PropertyGroup>"\
"\n  <Import Project=\"$(VCTargetsPath)\Microsoft.Cpp.props\" />"\
"\n  <ImportGroup Label=\"ExtensionSettings\">"\
"\n  </ImportGroup>"\
"\n  <ImportGroup Label=\"PropertySheets\" Condition=\"\'$(Configuration)|$(Platform)\'==\'Debug|Win32\'\">"\
"\n    <Import Project=\"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists(\'$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props\')\" Label=\"LocalAppDataPlatform\" />"\
"\n  </ImportGroup>"\
"\n  <PropertyGroup Label=\"UserMacros\" />"\
"\n  <PropertyGroup Condition=\"\'$(Configuration)|$(Platform)\'==\'Debug|Win32\'\">"\
"\n    <IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath)</IncludePath>"\
"\n  </PropertyGroup>"\
"\n  <ItemDefinitionGroup Condition=\"\'$(Configuration)|$(Platform)\'==\'Debug|Win32\'\">"\
"\n    <ClCompile>"\
"\n      <WarningLevel>Level3</WarningLevel>"\
"\n      <Optimization>Disabled</Optimization>"\
"\n      <AdditionalIncludeDirectories>..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>"\
"\n    </ClCompile>"\
"\n    <Link>"\
"\n      <GenerateDebugInformation>true</GenerateDebugInformation>"\
"\n    </Link>"\
"\n  </ItemDefinitionGroup>"\
"\n  <ItemGroup>"\
"$item_list"\
"\n  </ItemGroup>"\
"\n  <Import Project=\"$(VCTargetsPath)\Microsoft.Cpp.targets\" />"\
"\n  <ImportGroup Label=\"ExtensionTargets\">"\
"\n  </ImportGroup>"\
"\n</Project>"

#print vcproj

# filters

filters = \
"<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
"\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">"\
"\n  <ItemGroup>"\
"$item_groups"\
"\n  </ItemGroup>"\
"\n</Project>"

filter_group = \
"\n    <Filter Include=\"$dir\">"\
"\n      <UniqueIdentifier>{$uuid}</UniqueIdentifier>"\
"\n    </Filter>"\

normal_group = \
"\n    <$type Include=\"$file\">"\
"\n      <Filter>$dir</Filter>"\
"\n    </$type>"\


normal_group2 = "\n    <$type Include=\"$file\" />"

#print uuid.uuid1()
groups = ""
list = ""
def gen_groups(rootdir):
	global groups
	global list
	c_groups = ""
	i_groups = ""
	t_groups = ""
	f_groups = ""
	c_list = ""
	i_list = ""
	t_list = ""
	
	for parent,dirnames,filenames in os.walk(rootdir):
		parent = re.sub(r"^\.\\*", "", parent)
		#print parent
		for file in filenames:
			if len(parent) == 0:
				path = "..\\%s"%(file);
			else:	
				path = "..\\%s\\%s"%(parent,file)
			if(re.search(r'\.cc$|\.cpp$', file)):
				c_groups += normal_group.replace("$type", "ClCompile").replace("$file", path).replace("$dir", parent)
				c_list += normal_group2.replace("$type", "ClCompile").replace("$file", path)
			if(re.search(r'\.h$', file)):
				i_groups += normal_group.replace("$type", "ClInclude").replace("$file", path).replace("$dir", parent)
				i_list += normal_group2.replace("$type", "ClInclude").replace("$file", path)
			if(re.search(r'\.mk$', file)):
				t_groups += normal_group.replace("$type", "Text").replace("$file", path).replace("$dir", parent)
				t_list += normal_group2.replace("$type", "Text").replace("$file", path)				
		for dir in dirnames:
			if len(parent) == 0:
				path = dir;
			else:	
				path = "%s\\%s"%(parent,dir)
			if dir != vs_dir:	
				f_groups += filter_group.replace("$dir",path).replace("$uuid", str(uuid.uuid1()).upper())
		groups = f_groups + i_groups + c_groups + t_groups;
		list = c_list + i_list + t_list
		
gen_groups(".")
print groups
filters = filters.replace("$item_groups", groups)
#print filters
vcproj = vcproj.replace("$proj_uuid", proj_uuid)
vcproj = vcproj.replace("$proj_name", proj_name)
vcproj = vcproj.replace("$item_list", list)
# mkdir vs_dir
if os.path.exists(vs_dir) == False:
	os.mkdir(vs_dir)
#gen files
write_file(vs_dir+"\\vs2012.vcxproj.filters",filters)
write_file(vs_dir+"\\vs2012.vcxproj",vcproj)
write_file(vs_dir+"\\vs2012.sln",sln)

#107 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/ » “微软雅黑”不可商用!为了避免日后被字体公司索(qiao)赔(zha), 请尽快改用商业免费字体. » 2019-10-10 08:23:47

迪卡 说:

自创一体怎么样

对个人几乎不可能,

https://www.zhihu.com/question/19889152

开发字体是一项非常庞大的工程,耗时长、人力多,据说微软雅黑平均每个字造价就在100美元左右。

#109 Re: 全志 V3S/F1C100s/X3 » 买个全志arm9 F1C100s 方案的唱戏机回来拆一拆 » 2019-09-25 21:56:01

@明月心惜 最近买的吗?求购买链接

背光芯片就那么几个, 看下是什么封装的, 帮你猜一下

#112 Re: ESP32/ESP8266 » m5stickc积木式编程 » 2019-09-24 07:29:34

这个是基于编程猫改的吧,界面很像

#116 Re: 全志 V3S/F1C100s/X3 » V3s Linux4.13执行modprobe g_webcam 出现端点错误, 是端点不够吗? 其他的 g_serial/g_ffs没问题 » 2019-09-19 23:35:07

不知道这个补丁有没有用哦: https://gitlab-beta.engr.illinois.edu/ejclark2/linux/commit/f82a689faeb328ba7c194782f42cc438519d508e

		musb_writew(hw_ep->regs, MUSB_RXCSR, val);

#ifdef CONFIG_USB_INVENTRA_DMA
		if (usb_pipeisoc(pipe)) {
			struct usb_iso_packet_descriptor *d;

			d = urb->iso_frame_desc + qh->iso_idx;
			d->actual_length = xfer_len;

			/* even if there was an error, we did the dma
			 * for iso_frame_desc->length
			 */
			if (d->status != EILSEQ && d->status != -EOVERFLOW)
				d->status = 0;

			if (++qh->iso_idx >= urb->number_of_packets)
				done = true;
			else
				done = false;

		} else  {
		/* done if urb buffer is full or short packet is recd */
		done = (urb->actual_length + xfer_len >=
				urb->transfer_buffer_length
			|| dma->actual_len < qh->maxpacket);
		}

		/* send IN token for next packet, without AUTOREQ */
		if (!done) {
		if (dma) {
			struct dma_controller	*c;
			u16			rx_count;
			int			ret;
			int			ret, length;
			dma_addr_t		buf;

			rx_count = musb_readw(epio, MUSB_RXCOUNT);


			c = musb->dma_controller;

			if (usb_pipeisoc(pipe)) {
				int status = 0;
				struct usb_iso_packet_descriptor *d;

				d = urb->iso_frame_desc + qh->iso_idx;

				if (iso_err) {
					status = -EILSEQ;
					urb->error_count++;
				}
				if (rx_count > d->length) {
					if (status == 0) {
						status = -EOVERFLOW;
						urb->error_count++;
					}
					DBG(2, "** OVERFLOW %d into %d\n",\
					    rx_count, d->length);

					length = d->length;
				} else
					length = rx_count;
				d->status = status;
				buf = urb->transfer_dma + d->offset;
			} else {
				length = rx_count;
				buf = urb->transfer_dma +
						urb->actual_length;
			}

			dma->desired_mode = 0;
#ifdef USE_MODE1
			/* because of the issue below, mode 1 will
						urb->actual_length)
					> qh->maxpacket)
				dma->desired_mode = 1;
			if (rx_count < hw_ep->max_packet_sz_rx) {
				length = rx_count;
				dma->bDesiredMode = 0;
			} else {
				length = urb->transfer_buffer_length;
			}
#endif

/* Disadvantage of using mode 1:
			 */
			ret = c->channel_program(
				dma, qh->maxpacket,
				dma->desired_mode,
				urb->transfer_dma
					+ urb->actual_length,
				(dma->desired_mode == 0)
					? rx_count
					: urb->transfer_buffer_length);
				dma->desired_mode, buf, length);

			if (!ret) {
				c->channel_release(dma);
		}
	}

	if (dma && usb_pipeisoc(pipe)) {
		struct usb_iso_packet_descriptor	*d;
		int					iso_stat = status;

		d = urb->iso_frame_desc + qh->iso_idx;
		d->actual_length += xfer_len;
		if (iso_err) {
			iso_stat = -EILSEQ;
			urb->error_count++;
		}
		d->status = iso_stat;
	}

finish:
	urb->actual_length += xfer_len;
	qh->offset += xfer_len;

#117 Re: 全志 V3S/F1C100s/X3 » V3s Linux4.13执行modprobe g_webcam 出现端点错误, 是端点不够吗? 其他的 g_serial/g_ffs没问题 » 2019-09-19 23:28:37

https://devtalk.nvidia.com/default/topic/1036885/tx1-usb-uvc-gadget-troubles/

问题:
TX1的OTG端口是否支持等时模式?
是否有不同的方法来配置系统以解决此错误?
我可以提供其他日志/信息,以便更容易调试吗?

在设备模式下,OTG端口不支持等时模式。

看来有点悲剧了

#118 全志 V3S/F1C100s/X3 » V3s Linux4.13执行modprobe g_webcam 出现端点错误, 是端点不够吗? 其他的 g_serial/g_ffs没问题 » 2019-09-19 23:23:47

firstman
回复: 4
# modprobe g_webcam
[   13.884493] g_webcam gadget: uvc: uvc_function_bind()
[   13.889574] g_webcam gadget: uvc: Unable to allocate streaming EP
[   13.895850] g_webcam musb-hdrc.1.auto: failed to start g_webcam: -22
[   13.905209] g_webcam gadget: uvc: uvc_function_bind()
[   13.910284] g_webcam gadget: uvc: Unable to allocate streaming EP
[   13.916566] g_webcam musb-hdrc.1.auto: failed to start g_webcam: -22
modprobe: can't load module g_webcam (kernel/drivers/usb/gadget/legacy/g_webcam.ko): Invalid argument

发现 HI3518 也有一模一样的问题 http://bbs.ebaina.com/thread-39433-1-1.html

#119 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 找到一篇关于Linux usb gadget 非常使用的说明和使用教程 » 2019-09-19 15:00:50

试了一下, 这个挂载TF卡成U盘, 卸载U盘挺好用的: https://gist.github.com/nv-h/972ece47ba28c07f825f0b272b71d3c6

usb_config_multi.sh

#!/bin/sh

# https:/github.com/torvalds/linux/blob/master/Documentation/usb/gadget_configfs.txt
# http:/irq5.io/2016/12/22/raspberry-pi-zero-as-multiple-usb-gadgets/
# 上記2つを参考に同時に二つのガジェットを有効化する。
#   1. mass storageで、SDカードをUSBメモリとして見せる
#   2. rndisで、USBをetherデバイスとして見せる

# ドライバを依存関係含めてロード
modprobe usb_f_rndis
modprobe usb_f_mass_storage

# configfsをマウント
mount -t configfs none /sys/kernel/config

# usb_gadgetの下に任意のディレクトリを生成する
g=/sys/kernel/config/usb_gadget/multi
mkdir ${g}

# USBの各種設定(VID/PIDは必須)
echo "64"     > ${g}/bMaxPacketSize0
echo "0x200"  > ${g}/bcdUSB    # USB2.0
echo "0x100"  > ${g}/bcdDevice # 適当
echo "0x03FD" > ${g}/idVendor  # Xilinx
echo "0x0104" > ${g}/idProduct # Multifunction Composite Gadget

# 複数functionのcomposite USB向けの設定
# refer: https://msdn.microsoft.com/en-us/library/windows/hardware/ff540054.aspx
echo "0xEF"   > ${g}/bDeviceClass
echo "0x02"   > ${g}/bDeviceSubClass
echo "0x01"   > ${g}/bDeviceProtocol

# functionsに登録
mkdir ${g}/functions/rndis.rn0
mkdir ${g}/functions/mass_storage.ms0

# rndis固有の設定(設定しないとランダムなmacアドレスを生成する)
# echo "${dev_mac}"  > ${g}/functions/rndis.rn0/dev_addr
# echo "${host_mac}" > ${g}/functions/rndis.rn0/host_addr

# mass storage固有の設定
# fileにストレージとして見せるデバイスを指定する
echo /dev/mmcblk0p1 > ${g}/functions/mass_storage.ms0/lun.0/file
echo 1              > ${g}/functions/mass_storage.ms0/lun.0/removable

# functionとconfigを関連付け
mkdir ${g}/configs/c.1
ln -s ${g}/functions/rndis.rn0        ${g}/configs/c.1/
ln -s ${g}/functions/mass_storage.ms0 ${g}/configs/c.1/

# rndisをwindowsで見えるようにするための設定
echo "1"       > ${g}/os_desc/use
echo "0xcd"    > ${g}/os_desc/b_vendor_code
echo "MSFT100" > ${g}/os_desc/qw_sign
echo "RNDIS"   > ${g}/functions/rndis.rn0/os_desc/interface.rndis/compatible_id
echo "5162001" > ${g}/functions/rndis.rn0/os_desc/interface.rndis/sub_compatible_id
ln -s ${g}/configs/c.1 ${g}/os_desc

# デバイス有効化
echo "ci_hdrc.0" > ${g}/UDC

usb_remove_multi.sh

#!/bin/sh

# https://github.com/torvalds/linux/blob/master/Documentation/usb/gadget_configfs.txt
# http://irq5.io/2016/12/22/raspberry-pi-zero-as-multiple-usb-gadgets/
# 上記を参考にusb_config_multi.shで追加したガジェット2つを無効化する。

# ガジェットを無効化
g=/sys/kernel/config/usb_gadget/multi
echo "" > ${g}/UDC

# functionsのsimlink先を削除
rm ${g}/os_desc/c.1
rm ${g}/configs/c.1/rndis.rn0
rm ${g}/configs/c.1/mass_storage.ms0

# Configurationsを削除
rmdir ${g}/configs/c.1/

# functionsのsimlink元を削除
rmdir ${g}/functions/rndis.rn0
rmdir ${g}/functions/mass_storage.ms0

# gadget本体を削除
rmdir ${g}

# ドライバを依存関係含めてアンロード
modprobe -r usb_f_rndis
modprobe -r usb_f_mass_storage

# configfsをアンマウント
umount /sys/kernel/config

挂载好用, 卸载也是干干净净的。

#120 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 找到一篇关于Linux usb gadget 非常使用的说明和使用教程 » 2019-09-19 14:11:23

usb gadget configfs 验证: http://wowothink.com/a64c6a27/

按照上一篇文章对gadget_configfs.txt的翻译,以imx8qxp mek的板子做为验证,配置为mass storage进行验证。

内核打开对应的宏
1、必须打开CONFIG_CONFIGFS_FS和CONFIG_USB_LIBCOMPOSITE的宏,前者为用户空间提供访问配置内核驱动的configfs文件系统,后者提供usb gadget composite框架;
2、必须打开UDC(USB Device Controller)的配置,这个是配置硬件控制器。我这里使用CONFIG_USB_CHIPIDEA和CONFIG_USB_CHIPIDEA_UDC;
3、如果使用mass storage功能,需要打开USB_CONFIGFS_MASS_STORAGE和USB_F_MASS_STORAGE,对应于usb_f_mass_storage.ko驱动。

配置步骤
挂载configfs:mount -t configfs none /config/,在这之后,/configfs/目录下就会生成usb_gadget/目录;
创建gadget:mkdir usb_gadget/g1,创建g1/目录之后,该目录下会生成很多配置目录,这里的g1表示gadget 1,一个UDC对应一个gadget,如果你的SOC上有多个gadget,可以创建多个gx目录。

# ll usb_gadget/g1/
total 0
-rw-r--r-- 1 root root 4096 1999-11-30 00:02 UDC
-rw-r--r-- 1 root root 4096 1999-11-30 00:02 bDeviceClass
-rw-r--r-- 1 root root 4096 1999-11-30 00:02 bDeviceProtocol
-rw-r--r-- 1 root root 4096 1999-11-30 00:02 bDeviceSubClass
-rw-r--r-- 1 root root 4096 1999-11-30 00:02 bMaxPacketSize0
-rw-r--r-- 1 root root 4096 1999-11-30 00:02 bcdDevice
-rw-r--r-- 1 root root 4096 1999-11-30 00:02 bcdUSB
drwxr-xr-x 2 root root    0 1999-11-30 00:02 configs
drwxr-xr-x 2 root root    0 1999-11-30 00:02 functions
-rw-r--r-- 1 root root 4096 1999-11-30 00:02 idProduct
-rw-r--r-- 1 root root 4096 1999-11-30 00:02 idVendor
drwxr-xr-x 2 root root    0 1999-11-30 00:02 os_desc
drwxr-xr-x 2 root root    0 1999-11-30 00:02 strings

配置PID和VID

# echo 0x18d1 > usb_gadget/g1/idVendor
# echo 0x4ee2 > usb_gadget/g1/idProduct

创建并配置string字目录

# mkdir usb_gadget/g1/strings/0x409
# echo "123456789" > usb_gadget/g1/strings/0x409/serialnumber
# echo "xxx" > usb_gadget/g1/strings/0x409/manufacturer
# echo "xxx_product" > usb_gadget/g1/strings/0x409/product

创建configuration和字符串

# mkdir usb_gadget/g1/configs/c.1
# mkdir usb_gadget/g1/configs/c.1/strings/0x409
# echo "mass_storage" > usb_gadget/g1/configs/c.1/strings/0x409/configuration

创建functions

# mkdir usb_gadget/g1/functions/mass_storage.0
[  108.582976]  [1:          mkdir: 1976] Mass Storage Function, version: 2009/09/11
[  108.592679]  [1:          mkdir: 1976] LUN: removable file: (no medium)

这里的mass_storage的名字不能随便起,需要根据insmod的function驱动usb_f_mass_storage.ko来决定。否则会出现如下错误:

1|@android:/config # mkdir usb_gadget/g1/functions/msg.0
mkdir: 'usb_gadget/g1/functions/msg.0': No such file or directory

将functions和configuration关联起来
# ln -s usb_gadget/g1/functions/mass_storage.0 usb_gadget/g1/configs/c.1
上述配置之后,得到的结果为:

127|@android:/config # find .
.
./usb_gadget
./usb_gadget/g1
./usb_gadget/g1/os_desc
./usb_gadget/g1/os_desc/qw_sign
./usb_gadget/g1/os_desc/b_vendor_code
./usb_gadget/g1/os_desc/use
./usb_gadget/g1/strings
./usb_gadget/g1/strings/0x409
./usb_gadget/g1/strings/0x409/serialnumber
./usb_gadget/g1/strings/0x409/product
./usb_gadget/g1/strings/0x409/manufacturer
./usb_gadget/g1/configs
./usb_gadget/g1/configs/c.1
./usb_gadget/g1/configs/c.1/mass_storage.0
./usb_gadget/g1/configs/c.1/strings
./usb_gadget/g1/configs/c.1/strings/0x409
./usb_gadget/g1/configs/c.1/strings/0x409/configuration
./usb_gadget/g1/configs/c.1/bmAttributes
./usb_gadget/g1/configs/c.1/MaxPower
./usb_gadget/g1/functions
./usb_gadget/g1/functions/mass_storage.0
./usb_gadget/g1/functions/mass_storage.0/lun.0
./usb_gadget/g1/functions/mass_storage.0/lun.0/inquiry_string
./usb_gadget/g1/functions/mass_storage.0/lun.0/nofua
./usb_gadget/g1/functions/mass_storage.0/lun.0/cdrom
./usb_gadget/g1/functions/mass_storage.0/lun.0/removable
./usb_gadget/g1/functions/mass_storage.0/lun.0/ro
./usb_gadget/g1/functions/mass_storage.0/lun.0/file
./usb_gadget/g1/functions/mass_storage.0/stall
./usb_gadget/g1/UDC
./usb_gadget/g1/bcdUSB
./usb_gadget/g1/bcdDevice
./usb_gadget/g1/idProduct
./usb_gadget/g1/idVendor
./usb_gadget/g1/bMaxPacketSize0
./usb_gadget/g1/bDeviceProtocol
./usb_gadget/g1/bDeviceSubClass
./usb_gadget/g1/bDeviceClass

查看当前的UDC
可见当前的板子上有两个UDC,ci_hdrc.0和gadget-cdns3。

130|@android:/config # ll /sys/class/udc/
total 0
lrwxrwxrwx 1 root root 0 1999-11-30 00:09 ci_hdrc.0 -> ../../devices/platform/5b0d0000.usb/ci_hdrc.0/udc/ci_hdrc.0
lrwxrwxrwx 1 root root 0 1999-11-30 00:09 gadget-cdns3 -> ../../devices/platform/5b110000.usb3/gadget-cdns3/udc/gadget-cdns3

绑定到UDC,使能gadget
将UDC切换至device模式,这里使用OTG ID pin来实现切换。

# echo ci_hdrc.0 > usb_gadget/g1/UDC
# echo 1 > /sys/class/gpio/gpio358/value

验证结果
将配置好的开发板与ubuntu连接,从ubuntu上的串口可以看到如下信息,表示已将开发板配置成一个mass storage的设备了。

[95705.390004] usb 1-11: USB disconnect, device number 28
[95708.606717] usb 1-11: new high-speed USB device number 29 using xhci_hcd
[95708.756934] usb 1-11: New USB device found, idVendor=18d1, idProduct=4ee2
[95708.756941] usb 1-11: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[95708.756946] usb 1-11: Product: xxx_product
[95708.756950] usb 1-11: Manufacturer: xxx
[95708.756953] usb 1-11: SerialNumber: 123456789
[95708.766595] usb-storage 1-11:1.0: USB Mass Storage device detected
[95708.766798] scsi host6: usb-storage 1-11:1.0

当然,上述的结果是ubuntu只识别到一个mass storage的设备,但是没有识别看分区表,所以没有看到相应的磁盘信息。想要看到磁盘信息,可以更进一步的设置mass_storage的backen file属性。

定制分区
在上面创建functions步骤之后,执行以下的命令,为mass storage创建2个分区,分区的backing file是开发板上的/dev/block/mmcblk0p1和/dev/block/mmcblk0p2,也就是开发板上的system分区和data分区。

mkdir usb_gadget/g1/functions/mass_storage.0/partition.2
mkdir usb_gadget/g1/functions/mass_storage.0/lun.1
echo /dev/block/mmcblk0p1 > usb_gadget/g1/functions/mass_storage.0/lun.0/file
echo /dev/block/mmcblk0p2 > usb_gadget/g1/functions/mass_storage.0/lun.1/file

所有配置完成之后,插入到ubuntu后,可以看到能识别去新的分区信息:

130 victor@victor-HP:/mnt⟫ sudo dmesg -c
[40873.009026] EXT4-fs (sdc): mounted filesystem with ordered data mode. Opts: (null)
[41094.127318] usb 1-11: USB disconnect, device number 23
[41094.128072] print_req_error: I/O error, dev sdc, sector 0
[41094.131049] sd 6:0:0:0: [sdc] Synchronizing SCSI cache
[41094.131118] sd 6:0:0:0: [sdc] Synchronize Cache(10) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[41466.480635] usb 1-11: new high-speed USB device number 24 using xhci_hcd
[41466.630904] usb 1-11: New USB device found, idVendor=18d1, idProduct=4ee2
[41466.630911] usb 1-11: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[41466.630915] usb 1-11: Product: xxx_product
[41466.630919] usb 1-11: Manufacturer: xxx
[41466.630923] usb 1-11: SerialNumber: 123456789
[41466.640789] usb-storage 1-11:1.0: USB Mass Storage device detected
[41466.641062] scsi host7: usb-storage 1-11:1.0
[41467.645699] scsi 7:0:0:0: Direct-Access     Linux    File-Stor Gadget 0414 PQ: 0 ANSI: 2
[41467.646291] scsi 7:0:0:1: Direct-Access     Linux    File-Stor Gadget 0414 PQ: 0 ANSI: 2
[41467.646826] scsi 7:0:0:2: Direct-Access     Linux    File-Stor Gadget 0414 PQ: 0 ANSI: 2
[41467.647387] sd 7:0:0:0: Attached scsi generic sg2 type 0
[41467.647764] sd 7:0:0:1: Attached scsi generic sg3 type 0
[41467.648144] sd 7:0:0:0: Power-on or device reset occurred
[41467.648173] sd 7:0:0:2: Attached scsi generic sg4 type 0
[41467.649026] sd 7:0:0:1: Power-on or device reset occurred
[41467.649555] sd 7:0:0:2: Power-on or device reset occurred
[41467.650006] sd 7:0:0:0: [sdd] 1048576 512-byte logical blocks: (537 MB/512 MiB)
[41467.650766] sd 7:0:0:1: [sde] 524288 512-byte logical blocks: (268 MB/256 MiB)
[41467.651726] sd 7:0:0:0: [sdd] Write Protect is off
[41467.651731] sd 7:0:0:0: [sdd] Mode Sense: 0f 00 00 00
[41467.651929] sd 7:0:0:1: [sde] Write Protect is off
[41467.651933] sd 7:0:0:1: [sde] Mode Sense: 0f 00 00 00
[41467.652327] sd 7:0:0:2: [sdf] Attached SCSI removable disk
[41467.652581] sd 7:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[41467.652837] sd 7:0:0:1: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[41467.673305] sd 7:0:0:1: [sde] Attached SCSI removable disk
[41467.674915] sd 7:0:0:0: [sdd] Attached SCSI removable disk

参考
上述的配置过程太繁琐了,在Android上,基于configfs有专门的init.rc在启动过程中去配置对应的configuration和function,比如说init.usb.rc,里面包含了一系列gadget的配置方法。在后面的文章中,将详细讲述每条命令背后的实现原理。

on boot
    write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
    write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
    write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}

    setprop sys.usb.configfs 1

    # OS DESCRIPTORS
    #===============
    # OS STRING
    #----------
    write /config/usb_gadget/g1/os_desc/b_vendor_code 1
    write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
    # use os desc or not is up to each usb functions respectively
    # write /config/usb_gadget/g1/os_desc/use 1

    # MAKE b.1 THE ONE ASSOCIATED WITH OS DESCRIPTORS
    #------------------------------------------------
    symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b1

    # ci_hdrc.0 is the fixed UDC name
    setprop sys.usb.controller ci_hdrc.0

on fs
    mkdir /dev/usb-ffs 0770 shell shell
    mkdir /dev/usb-ffs/adb 0770 shell shell
    # mount the configfs on /config
    mount configfs none /config mode=0755
    mkdir /config/usb_gadget/g1
    mkdir /config/usb_gadget/g1/configs/b.1
    # mkdir for functions needed
    # this will call each gadget's alloc_inst()
    mkdir /config/usb_gadget/g1/functions/ffs.adb
    mkdir /config/usb_gadget/g1/functions/mtp.gs0
    mkdir /config/usb_gadget/g1/functions/ptp.gs1
    mkdir /config/usb_gadget/g1/functions/accessory.gs2
    mkdir /config/usb_gadget/g1/functions/audio_source.gs3
    mkdir /config/usb_gadget/g1/functions/rndis.gs4
    mkdir /config/usb_gadget/g1/functions/midi.gs5
    mkdir /config/usb_gadget/g1/strings/0x409
    mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409
    # The mount of functionfs for adb must be put AFTER the mkdir for functions in configfs

on property:sys.usb.config=none && property:sys.usb.configfs=1
    write /config/usb_gadget/g1/os_desc/use 0

on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb && property:sys.usb.configfs=1
    write /config/usb_gadget/g1/idProduct 0x4ee7
    write /config/usb_gadget/g1/idVendor 0x18d1

on property:sys.usb.config=mtp && property:sys.usb.configfs=1
    write /config/usb_gadget/g1/functions/mtp.gs0/os_desc/interface.MTP/compatible_id "MTP"
    write /config/usb_gadget/g1/os_desc/use 1
    write /config/usb_gadget/g1/idProduct 0x4ee1
    write /config/usb_gadget/g1/idVendor 0x18d1

#122 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 找到一篇关于Linux usb gadget 非常使用的说明和使用教程 » 2019-09-19 14:00:39

接楼上, 测试USB输入设备命令:

echo -ne "\0\0\x4\0\0\0\0\0" > /dev/hidg0;echo -ne "\0\0\x0\0\0\0\0\0" > /dev/hidg0

也可以测试 adb:

adb shell

#123 Re: 全志 V3S/F1C100s/X3 » littlevgl触摸点是怎么映射的? » 2019-09-19 11:48:14

before data->point.x = 3921     
before data->point.y = 3773 

这种一看就是 ADC 值,
要获取 LCD X/Y 要通过 tslib
tslib 有做滤波、去抖、校准等功能了。

#124 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 找到一篇关于Linux usb gadget 非常使用的说明和使用教程 » 2019-09-19 11:37:28

2019-09-19_113155.png

linux usb gadget驱动简直太好用, 随便配置一下就是一个复合USB设备, 这是我的 S5PV210 开发板。

https://www.kernel.org/doc/Documentation/usb/gadget_configfs.txt

mount -t configfs none /sys/kernel/config

modprobe libcomposite
modprobe usb_f_serial
modprobe usb_f_fs
modprobe usb_f_hid

modprobe usb_f_acm
sleep 2
cd /sys/kernel/config/usb_gadget/

if [ ! -d /sys/kernel/config/usb_gadget/g1 ]; then
	mkdir g1
	cd g1
	echo 0x8087 > idVendor
	echo 0x101e > idProduct
	mkdir strings/0x409
	echo 012345678 > strings/0x409/serialnumber
	echo Intel > strings/0x409/manufacturer
	echo IoTplatform > strings/0x409/product
	mkdir functions/acm.GS0
	mkdir functions/ffs.adb
	mkdir functions/hid.usb0

	
	# setup hid parameters for the keyboard function
	echo 1 > functions/hid.usb0/protocol
	echo 1 > functions/hid.usb0/subclass
	echo 8 > functions/hid.usb0/report_length
	echo -ne "\x05\x01\x09\x06\xA1\x01\x05\x07\x19\xE0\x29\xE7\x15\x00\x25\x01\x75\x01\x95\x08\x81\x02\x95\x01\x75\x08\x81\x03\x95\x05\x75\x01\x05\x08\x19\x01\x29\x05\x91\x02\x95\x01\x75\x03\x91\x03\x95\x06\x75\x08\x15\x00\x25\x65\x05\x07\x19\x00\x29\x65\x81\x00\xC0" > functions/hid.usb0/report_desc

	
	mkdir configs/c.1
	mkdir configs/c.1/strings/0x409
	echo "adb+cdc" > configs/c.1/strings/0x409/configuration
	echo 120 > configs/c.1/MaxPower
	ln -s functions/acm.GS0 configs/c.1
	ln -s functions/ffs.adb/ configs/c.1
	ln -s functions/hid.usb0 configs/c.1/
	

	
	mkdir /dev/usb-ffs
	mkdir /dev/usb-ffs/adb
	mount -t functionfs adb /dev/usb-ffs/adb
	adbd &

fi

echo s3c-hsotg > UDC

#128 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 找到一篇关于Linux usb gadget 非常使用的说明和使用教程 » 2019-09-18 17:35:47

Jmhh247 说:

多谢分享,准备试试UVC

不用谢, 一起学习.

https://www.kernel.org/doc/Documentation/usb/gadget-testing.txt

  # mkdir functions/uvc.usb0/control/header/h
  # cd functions/uvc.usb0/control/
  # ln -s header/h class/fs
  # ln -s header/h class/ss
  # mkdir -p functions/uvc.usb0/streaming/uncompressed/u/360p
  # cat <<EOF > functions/uvc.usb0/streaming/uncompressed/u/360p/dwFrameInterval
  666666
  1000000
  5000000
  EOF
  # cd $GADGET_CONFIGFS_ROOT
  # mkdir functions/uvc.usb0/streaming/header/h
  # cd functions/uvc.usb0/streaming/header/h
  # ln -s ../../uncompressed/u
  # cd ../../class/fs
  # ln -s ../../header/h
  # cd ../../class/hs
  # ln -s ../../header/h
  # cd ../../class/ss
  # ln -s ../../header/h


Testing the UVC function
------------------------

device: run the gadget, modprobe vivid::

  # uvc-gadget -u /dev/video<uvc video node #> -v /dev/video<vivid video node #>

where uvc-gadget is this program:
	http://git.ideasonboard.org/uvc-gadget.git

with these patches:

	http://www.spinics.net/lists/linux-usb/msg99220.html

host::

	luvcview -f yuv

把板载摄像头转为USB摄像头.

#132 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 找到一篇关于Linux usb gadget 非常使用的说明和使用教程 » 2019-09-18 10:43:33

https://www.spinics.net/lists/linux-usb/msg155033.html

mount -t debugfs debugfs /mnt/
echo "device" > /mnt/488d0000.usb/mode
modprobe -v configfs
modprobe -v libcomposite
sleep 2
cd /sys/kernel/config/usb_gadget
mkdir g1
cd g1
echo "0x1d6b" > idVendor
echo "0x0104" > idProduct
mkdir strings/0x409
echo "0123456789" > strings/0x409/serialnumber
echo "TI Inc." > strings/0x409/manufacturer
echo "MS+UVC gadget" > strings/0x409/product
modprobe -v usb_f_mass_storage
mkdir functions/mass_storage.ms0
# create backing store(s): in this example 2 LUN's 16MB each
dd bs=1M count=16 if=/dev/zero of=/tmp/lun0.img # 16MB
chmod 777 /tmp/lun0.img
modprobe -v usb_f_uvc
mkdir functions/uvc.usb0
mkdir configs/c.1
mkdir configs/c.1/strings/0x409
echo "mass-storage + uvc" > configs/c.1/strings/0x409/configuration
echo 120 > configs/c.1/MaxPower
mkdir functions/uvc.usb0/control/header/h
cd functions/uvc.usb0/control/
ln -s header/h class/fs
ln -s header/h class/ss
cd ../../../
mkdir -p functions/uvc.usb0/streaming/uncompressed/u/360p
cat <<EOF > functions/uvc.usb0/streaming/uncompressed/u/360p/dwFrameInterval
666666
1000000
5000000
EOF
mkdir functions/uvc.usb0/streaming/header/h
cd functions/uvc.usb0/streaming/header/h
ln -s ../../uncompressed/u
cd ../../class/fs
ln -s ../../header/h
cd ../../class/hs
ln -s ../../header/h
cd ../../../control
cd ../../../
echo /tmp/lun0.img > functions/mass_storage.ms0/lun.0/file
echo 1 > functions/mass_storage.ms0/lun.0/removable
ln -s functions/mass_storage.ms0 configs/c.1/
ln -s functions/uvc.usb0 configs/c.1/
echo "488d0000.usb" > UDC

mass_storage 和 uvc 摄像头的复合设备

#133 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 找到一篇关于Linux usb gadget 非常使用的说明和使用教程 » 2019-09-18 09:30:21

我的理解,  drivers/usb/gadget/function/ 目录下面的驱动程序可以任意组合,
drivers/usb/gadget/legacy/ 这些驱动程序只能选一个,所以这里面有很多组合功能的 gadget驱动。

#134 Re: VMWare/Linux/Ubuntu/Fedora/CentOS/U-BOOT » 找到一篇关于Linux usb gadget 非常使用的说明和使用教程 » 2019-09-18 09:21:17

实现两个独立的U盘:

# mount configfs
mount -t configfs none /sys/kernel/config
# load libcomposite module
modprobe libcomposite
# create a gadget
mkdir /sys/kernel/config/usb_gadget/g1
# cd to its configfs node
cd /sys/kernel/config/usb_gadget/g1
# configure it (vid/pid can be anything if USB Class is used for driver compat)
echo 0xabcd > idVendor
echo 0x1234 > idProduct
# configure its serial/mfg/product
mkdir strings/0x409
echo myserial > strings/0x409/serialnumber
echo mymfg > strings/0x409/manufacturer
echo myproduct > strings/0x409/product
# create configs
mkdir configs/c.1
mkdir configs/c.2
mkdir configs/c.3
# configure them with attributes if needed
echo 120 > configs/c.1/MaxPower
echo 120 > configs/c.2/MaxPower
echo 120 > configs/c.2/MaxPower
# ensure function is loaded
modprobe usb_f_mass_storage
# create the function (name must match a usb_f_<name> module such as 'acm')
mkdir functions/mass_storage.0
# create backing store(s): in this example 2 LUN's 16MB each
dd bs=1M count=16 if=/dev/zero of=/tmp/lun0.img # 16MB
dd bs=1M count=16 if=/dev/zero of=/tmp/lun1.img # 16MB
# associate with partitions
mkdir functions/mass_storage.0/lun.0
echo /tmp/lun0.img > functions/mass_storage.0/lun.0/file
mkdir functions/mass_storage.0/lun.1
echo /tmp/lun1.img > functions/mass_storage.0/lun.1/file
# associate function with config
ln -s functions/mass_storage.0 configs/c.1
# enable gadget by binding it to a UDC from /sys/class/udc
echo 0000:01:00.0 > UDC
# to unbind it: echo "" UDC; sleep 1; rm -rf /sys/kernel/config/usb_gadget/g1

#137 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/ » Saleae 逻辑分析仪软件目前还不能分析SDIO协议, 但是官方网站给了一个非正式的版本,怎么是源码的,应该如何编译/安装/使用呢? » 2019-09-16 07:33:31

metro 说:

emmm,不是很了解Saleae的逻辑分析仪,不过可以试试基于sigrok的PulseView?这个软件应该是可以分析SD card信号的,而且据说和Saleae的兼容性不错。

我佛了, 支持辣么多硬件  https://sigrok.org/wiki/Supported_hardware

下载一个试一试

#139 Re: 全志 V3S/F1C100s/X3 » 分享个licheepi nano镜像,支持adb调试 » 2019-09-13 17:46:38

貌似不能同时 装两个 gadget 驱动:

会出现一个错误:

# modprobe g_mass_storage file=/dev/mmcblk0 removable=1
[  877.681949] udc-core: couldn't find an available UDC - added [g_mass_storage] to list of pending drivers

然后还不能动态卸载 g_ffs 驱动:

# rmmod g_ffs
rmmod: can't unload module 'g_ffs': Resource temporarily unavailable

即使 kill 了 adbd 也一样的错误.



请问楼主和各位大神,怎么解决呢?

#141 Re: DIY/综合/Arduino/写字机/3D打印机/智能小车/平衡车/四轴飞行/ » 25元的矿渣BeagleBone Black_NAND版AM335x » 2019-09-13 14:03:32

选择sd卡启动 然后利用sd卡里面的uboot的 fat把镜像读入ram 然后通过sf稍写

#145 Re: 全志 V3S/F1C100s/X3 » nano编译LittlevGL时报错 » 2019-09-06 18:14:27

你的toolchain 可能配置有点点问题, 在 Makefile 里面手动加入 -I/usr/include/

强制搜索这个目录试一试

#148 Re: Openwrt/LEDE/AR9331/MT7688/RT5350 » 求助!关于openwrt19版本下MT7688的驱动!!! » 2019-09-06 09:43:18

从日志上面来貌似没有什么问题,  初始化声卡也过了。

我感觉从硬件调试入手比较容易判断问题,

控制台执行 madplay xx.mp3

逻辑分析仪(或示波器)看 I2S 引脚是否有信号

#152 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 试看看爆照 » 2019-08-26 16:05:16

代码撸多了,眼神不好,看成了果照,面壁去。。。。

不过小姐姐身材超级棒,能不能交个朋友,没别的意思就像跟着学点 stm32

#153 Re: 全志 V3S/F1C100s/X3 » 请问:全志F1C100S下不了数据 » 2019-08-24 11:57:43

f1c100s 没有SID寄存器,可能就 SID 子命令

#154 Re: 计算机图形/GUI/RTOS/FileSystem » ubuntu 编译运行 libvncserver » 2019-08-24 11:38:44

QQ20190824113248.png


https://github.com/ponty/framebuffer-vncserver

我现在用这个 demo 在 ubuntu 跑起来 demo

但是不能输入:

firstman@ubuntu:/opt/framebuffer-vncserver/build$ sudo ./framebuffer-vncserver 
Initializing framebuffer device /dev/fb0...
  xres=800, yres=600, xresv=2048, yresv=1920, xoffs=0, yoffs=0, bpp=32
  offset:length red=16:8 green=8:8 blue=0:8 
No touch device
Initializing VNC server:
	width:  800
	height: 600
	bpp:    32
	port:   5900
Initializing server...
24/08/2019 11:08:40 Listening for VNC connections on TCP port 5900
24/08/2019 11:08:40 Listening for VNC connections on TCP6 port 5900
24/08/2019 11:16:22 Got connection from client 192.168.1.189
24/08/2019 11:16:22   other clients:
24/08/2019 11:16:22 Normal socket connection
24/08/2019 11:16:22 Client Protocol Version 3.3
24/08/2019 11:16:22 Protocol version sent 3.3, using 3.3
24/08/2019 11:16:23 Pixel format for client 192.168.1.189:
24/08/2019 11:16:23   32 bpp, depth 32, little endian
24/08/2019 11:16:23   true colour: max r 31 g 31 b 31, shift r 0 g 5 b 10
24/08/2019 11:16:23 no translation needed
24/08/2019 11:16:23 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x00000003)
24/08/2019 11:16:23 Using hextile encoding for client 192.168.1.189

请问楼主, No touch device 如何解决?

代码在这里: https://github.com/ponty/framebuffer-vncserver/blob/master/src/framebuffer-vncserver.c

#156 Re: 全志 V3S/F1C100s/X3 » 分享个licheepi nano镜像,支持adb调试 » 2019-08-23 11:12:55

adbd_ok.png

真可以了, 奔走相告 ^_^

adb shell/push/pull 都可以了

妈妈再也不用为我收发文件操心了。

感谢各位大神!

#157 Re: 全志 V3S/F1C100s/X3 » 分享个licheepi nano镜像,支持adb调试 » 2019-08-23 10:29:49

加了, 但是电脑上仍然没有反应, 看来还是脚本不太对。

#158 Re: 全志 V3S/F1C100s/X3 » 分享个licheepi nano镜像,支持adb调试 » 2019-08-23 09:58:12

firstman 说:

奇怪, rootfs 里面没有发现 run_adbd.sh

https://github.com/rockchip-linux/linux-adb/raw/master/run_adbd.sh

#! /bin/sh

UDC=`ls /sys/class/udc/| awk '{print $1}'`

mkdir /dev/usb-ffs -m 0770 
mkdir /dev/usb-ffs/adb -m 0770 

mkdir /sys/kernel/config/usb_gadget/g1  -m 0770 

sleep 1

echo 0x2207 > /sys/kernel/config/usb_gadget/g1/idVendor 
echo 0x0006 > /sys/kernel/config/usb_gadget/g1/idProduct

mkdir /sys/kernel/config/usb_gadget/g1/strings/0x409   -m 0770 

sleep 1

echo "0123456789ABCDEF" > /sys/kernel/config/usb_gadget/g1/strings/0x409/serialnumber
echo "rockchip"  > /sys/kernel/config/usb_gadget/g1/strings/0x409/manufacturer
echo "rk3xxx"  > /sys/kernel/config/usb_gadget/g1/strings/0x409/product

sleep 1

mkdir /sys/kernel/config/usb_gadget/g1/functions/ffs.adb
mkdir /sys/kernel/config/usb_gadget/g1/configs/b.1  -m 0770 
mkdir /sys/kernel/config/usb_gadget/g1/configs/b.1/strings/0x409  -m 0770 

sleep 1

ln -s  /sys/kernel/config/usb_gadget/g1/functions/ffs.adb /sys/kernel/config/usb_gadget/g1/configs/b.1
echo "adb" > /sys/kernel/config/usb_gadget/g1/configs/b.1/strings/0x409/configuration
mount -t functionfs adb /dev/usb-ffs/adb

adbd  &

这个弄进去有问题,:

#  run_adbd.sh
mkdir: can't create directory '/sys/kernel/config/usb_gadget/g1': No such file or directory
/bin/run_adbd.sh: line 12: can't create /sys/kernel/config/usb_gadget/g1/idVendor: nonexistent directory
/bin/run_adbd.sh: line 13: can't create /sys/kernel/config/usb_gadget/g1/idProduct: nonexistent directory
mkdir: can't create directory '/sys/kernel/config/usb_gadget/g1/strings/0x409': No such file or directory
/bin/run_adbd.sh: line 19: can't create /sys/kernel/config/usb_gadget/g1/strings/0x409/serialnumber: nonexistent directory
/bin/run_adbd.sh: line 20: can't create /sys/kernel/config/usb_gadget/g1/strings/0x409/manufacturer: nonexistent directory
/bin/run_adbd.sh: line 21: can't create /sys/kernel/config/usb_gadget/g1/strings/0x409/product: nonexistent directory
mkdir: can't create directory '/sys/kernel/config/usb_gadget/g1/functions/ffs.adb': No such file or directory
mkdir: can't create directory '/sys/kernel/config/usb_gadget/g1/configs/b.1': No such file or directory
mkdir: can't create directory '/sys/kernel/config/usb_gadget/g1/configs/b.1/strings/0x409': No such file or directory
ln: /sys/kernel/config/usb_gadget/g1/configs/b.1: No such file or directory
/bin/run_adbd.sh: line 32: can't create /sys/kernel/config/usb_gadget/g1/configs/b.1/strings/0x409/configuration: nonexistent directory
[  952.353269] ------------[ cut here ]------------
[  952.357969] WARNING: CPU: 0 PID: 143 at fs/filesystems.c:282 get_fs_type+0xf8/0x110
[  952.365750] request_module fs-functionfs succeeded, but still no fs?
[  952.372147] Modules linked in: usb_f_fs libcomposite
[  952.377148] CPU: 0 PID: 143 Comm: mount Not tainted 4.14.0-licheepi-nano #7
[  952.384130] Hardware name: Allwinner suniv Family
[  952.388914] [<c010e8c0>] (unwind_backtrace) from [<c010ba10>] (show_stack+0x10/0x14)
[  952.396730] [<c010ba10>] (show_stack) from [<c0116a74>] (__warn+0xd4/0xfc)
[  952.403660] [<c0116a74>] (__warn) from [<c0116ad4>] (warn_slowpath_fmt+0x38/0x48)
[  952.411202] [<c0116ad4>] (warn_slowpath_fmt) from [<c01e618c>] (get_fs_type+0xf8/0x110)
[  952.419223] [<c01e618c>] (get_fs_type) from [<c01e9478>] (do_mount+0x1c0/0xb58)
[  952.426589] [<c01e9478>] (do_mount) from [<c01ea148>] (SyS_mount+0x54/0xc0)
[  952.433606] [<c01ea148>] (SyS_mount) from [<c0108060>] (ret_fast_syscall+0x0/0x44)
[  952.441201] ---[ end trace 803250e82eace444 ]---
mount: /dev/usb-ffs/adb: unknown filesystem type 'functionfs'.
# install_listener('tcp:5037','*smartsocket*')
Using USB

#161 Re: 计算机图形/GUI/RTOS/FileSystem » 分享一个自己制作uCGUI 3.98的Dev-C++工程文件 » 2019-08-22 18:15:56

试了一下这个 dev-cpp 还是挺好用的,免费小巧(50M)速度快,也可以单步调试。

#162 Re: 计算机图形/GUI/RTOS/FileSystem » 分享一个自己制作uCGUI 3.98的Dev-C++工程文件 » 2019-08-22 17:33:45

Beta_vulgaris 说:

我这里不知道什么原因,Dev-C++默认生成的Makefike就能用。或许,你可以试试把最后那条命令拿出来?

最后那个命令单独拿出来放 mintty.exe (git 自带shell) 可以成功链接 ucgui.exe


找到晕哥这个相似问题的帖子了:
windows平台编译XBoot test-lvgl分支, 链接出错(error: CreateProcess)的原因
https://whycan.cn/t_995.html

#163 Re: 计算机图形/GUI/RTOS/FileSystem » 分享一个自己制作uCGUI 3.98的Dev-C++工程文件 » 2019-08-22 16:28:16

Beta_vulgaris 说:

分批链接吧,用ar命令挨个添加目标文件。

这个如何操作呢?要修改文件吗?

#164 Re: 全志 V3S/F1C100s/X3 » 网友 @chong 大神提供的f1c100s mainline linux usb 补丁包,支持usb otg(host & device) » 2019-08-22 15:00:00

@checkout 厉害厉害, 105楼那个问题我当时也遇到了,没有深究, 就直接用 4.15 了

#165 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 现在用arm9做产品用什么芯片好? » 2019-08-22 14:57:30

商业级可以选 全志 F1C100s, 10元人民币左右, 封装好, 内置32M dram,

即使停产市场上的翻新货都能养活很多公司了。

#166 Re: 计算机图形/GUI/RTOS/FileSystem » 分享一个自己制作uCGUI 3.98的Dev-C++工程文件 » 2019-08-22 14:55:46

@Beta_vulgaris 请问楼主, 这个命令超长的问题你是怎么解决的?记得以前编译 xboot 某分支也会这样.

8192 记得是 CreateProcess() 这个Win32 系统API限制的,
为什么 git 自带的 shell 可以调用成功?

#167 Re: 计算机图形/GUI/RTOS/FileSystem » 分享一个自己制作uCGUI 3.98的Dev-C++工程文件 » 2019-08-22 14:53:20

devcpp_build2.png

gcc.exe Application/GUIDemo/GUIDEMO.o Application/GUIDemo/GUIDEMO_Automotive.o Application/GUIDemo/GUIDEMO_Bitmap.o Application/GUIDemo/GUIDEMO_Bitmap4bpp.o Application/GUIDemo/GUIDEMO_Circle.o Application/GUIDemo/GUIDEMO_ColorBar.o Application/GUIDemo/GUIDEMO_ColorList.o Application/GUIDemo/GUIDEMO_Cursor.o Application/GUIDemo/GUIDEMO_Dialog.o Application/GUIDemo/GUIDEMO_Font.o Application/GUIDemo/GUIDEMO_FrameWin.o Application/GUIDemo/GUIDEMO_Graph.o Application/GUIDemo/GUIDEMO_HardwareInfo.o Application/GUIDemo/GUIDEMO_Intro.o Application/GUIDemo/GUIDEMO_LUT.o Application/GUIDemo/GUIDEMO_MemDevB.o Application/GUIDemo/GUIDEMO_Messagebox.o Application/GUIDemo/GUIDEMO_Navi.o Application/GUIDemo/GUIDEMO_Polygon.o Application/GUIDemo/GUIDEMO_ProgBar.o Application/GUIDemo/GUIDEMO_Speed.o Application/GUIDemo/GUIDEMO_Touch.o Application/GUIDemo/GUIDEMO_WM.o Application/GUIDemo/MainTask.o Application/GUIDemo/MicriumLogo.o Application/GUIDemo/MicriumLogoWRed.o GUI/AntiAlias/GUIAAArc.o GUI/AntiAlias/GUIAAChar.o GUI/AntiAlias/GUIAAChar2.o GUI/AntiAlias/GUIAAChar4.o GUI/AntiAlias/GUIAACircle.o GUI/AntiAlias/GUIAALib.o GUI/AntiAlias/GUIAALine.o GUI/AntiAlias/GUIAAPoly.o GUI/AntiAlias/GUIAAPolyOut.o GUI/ConvertColor/LCDP111.o GUI/ConvertColor/LCDP222.o GUI/ConvertColor/LCDP233.o GUI/ConvertColor/LCDP323.o GUI/ConvertColor/LCDP332.o GUI/ConvertColor/LCDP444_12.o GUI/ConvertColor/LCDP444_12_1.o GUI/ConvertColor/LCDP444_16.o GUI/ConvertColor/LCDP555.o GUI/ConvertColor/LCDP556.o GUI/ConvertColor/LCDP565.o GUI/ConvertColor/LCDP655.o GUI/ConvertColor/LCDP666.o GUI/ConvertColor/LCDP888.o GUI/ConvertColor/LCDP8666.o GUI/ConvertColor/LCDP8666_1.o GUI/ConvertColor/LCDPM233.o GUI/ConvertColor/LCDPM323.o GUI/ConvertColor/LCDPM332.o GUI/ConvertColor/LCDPM444_12.o GUI/ConvertColor/LCDPM444_16.o GUI/ConvertColor/LCDPM555.o GUI/ConvertColor/LCDPM556.o GUI/ConvertColor/LCDPM565.o GUI/ConvertColor/LCDPM655.o GUI/ConvertColor/LCDPM666.o GUI/ConvertColor/LCDPM888.o GUI/ConvertMono/LCDP0.o GUI/ConvertMono/LCDP2.o GUI/ConvertMono/LCDP4.o GUI/Core/GUI__AddSpaceHex.o GUI/Core/GUI__Arabic.o GUI/Core/GUI__CalcTextRect.o GUI/Core/GUI__DivideRound.o GUI/Core/GUI__DivideRound32.o GUI/Core/GUI__DrawBitmap16bpp.o GUI/Core/GUI__GetCursorPos.o GUI/Core/GUI__GetFontSizeY.o GUI/Core/GUI__GetNumChars.o GUI/Core/GUI__HandleEOLine.o GUI/Core/GUI__IntersectRect.o GUI/Core/GUI__IntersectRects.o GUI/Core/GUI__memset.o GUI/Core/GUI__memset16.o GUI/Core/GUI__Read.o GUI/Core/GUI__ReduceRect.o GUI/Core/GUI__SetText.o GUI/Core/GUI__strcmp.o GUI/Core/GUI__strlen.o GUI/Core/GUI__Wrap.o GUI/Core/GUI_AddBin.o GUI/Core/GUI_AddDec.o GUI/Core/GUI_AddDecMin.o GUI/Core/GUI_AddDecShift.o GUI/Core/GUI_AddHex.o GUI/Core/GUI_AddKeyMsgHook.o GUI/Core/GUI_ALLOC_AllocInit.o GUI/Core/GUI_ALLOC_AllocZero.o GUI/Core/GUI_BMP.o GUI/Core/GUI_BMP_Serialize.o GUI/Core/GUI_CalcColorDist.o GUI/Core/GUI_ClearRectEx.o GUI/Core/GUI_Color2VisColor.o GUI/Core/GUI_CursorArrowL.o GUI/Core/GUI_CursorArrowLI.o GUI/Core/GUI_CursorArrowLPx.o GUI/Core/GUI_CursorArrowM.o GUI/Core/GUI_CursorArrowMI.o GUI/Core/GUI_CursorArrowMPx.o GUI/Core/GUI_CursorArrowS.o GUI/Core/GUI_CursorArrowSI.o GUI/Core/GUI_CursorArrowSPx.o GUI/Core/GUI_CursorCrossL.o GUI/Core/GUI_CursorCrossLI.o GUI/Core/GUI_CursorCrossLPx.o GUI/Core/GUI_CursorCrossM.o GUI/Core/GUI_CursorCrossMI.o GUI/Core/GUI_CursorCrossMPx.o GUI/Core/GUI_CursorCrossS.o GUI/Core/GUI_CursorCrossSI.o GUI/Core/GUI_CursorCrossSPx.o GUI/Core/GUI_CursorHeaderM.o GUI/Core/GUI_CursorHeaderMI.o GUI/Core/GUI_CursorHeaderMPx.o GUI/Core/GUI_CursorPal.o GUI/Core/GUI_CursorPalI.o GUI/Core/GUI_DispBin.o GUI/Core/GUI_DispCEOL.o GUI/Core/GUI_DispChar.o GUI/Core/GUI_DispChars.o GUI/Core/GUI_DispHex.o GUI/Core/GUI_DispString.o GUI/Core/GUI_DispStringAt.o GUI/Core/GUI_DispStringAtCEOL.o GUI/Core/GUI_DispStringHCenter.o GUI/Core/GUI_DispStringInRect.o GUI/Core/GUI_DispStringInRectEx.o GUI/Core/GUI_DispStringInRectWrap.o GUI/Core/GUI_DispStringLen.o GUI/Core/GUI_DrawBitmap.o GUI/Core/GUI_DrawBitmap_555.o GUI/Core/GUI_DrawBitmap_565.o GUI/Core/GUI_DrawBitmap_888.o GUI/Core/GUI_DrawBitmapEx.o GUI/Core/GUI_DrawBitmapExp.o GUI/Core/GUI_DrawBitmapMag.o GUI/Core/GUI_DrawFocusRect.o GUI/Core/GUI_DrawGraph.o GUI/Core/GUI_DrawGraphEx.o GUI/Core/GUI_DrawHLine.o GUI/Core/GUI_DrawLine.o GUI/Core/GUI_DrawPie.o GUI/Core/GUI_DrawPixel.o GUI/Core/GUI_DrawPoint.o GUI/Core/GUI_DrawPolygon.o GUI/Core/GUI_DrawPolyline.o GUI/Core/GUI_DrawRectEx.o GUI/Core/GUI_DrawVLine.o GUI/Core/GUI_ErrorOut.o GUI/Core/GUI_Exec.o GUI/Core/GUI_FillPolygon.o GUI/Core/GUI_FillRect.o GUI/Core/GUI_FillRectEx.o GUI/Core/GUI_GetBitmapPixelColor.o GUI/Core/GUI_GetBitmapPixelIndex.o GUI/Core/GUI_GetClientRect.o GUI/Core/GUI_GetColor.o GUI/Core/GUI_GetDispPos.o GUI/Core/GUI_GetDrawMode.o GUI/Core/GUI_GetFont.o GUI/Core/GUI_GetFontInfo.o GUI/Core/GUI_GetFontSizeY.o GUI/Core/GUI_GetLineStyle.o GUI/Core/GUI_GetOrg.o GUI/Core/GUI_GetStringDistX.o GUI/Core/GUI_GetTextAlign.o GUI/Core/GUI_GetTextExtend.o GUI/Core/GUI_GetTextMode.o GUI/Core/GUI_GetVersionString.o GUI/Core/GUI_GetYSizeOfFont.o GUI/Core/GUI_GIF.o GUI/Core/GUI_Goto.o GUI/Core/GUI_InitLUT.o GUI/Core/GUI_InvertRect.o GUI/Core/GUI_IsInFont.o GUI/Core/GUI_Log.o GUI/Core/GUI_MergeRect.o GUI/Core/GUI_MOUSE.o GUI/Core/GUI_MOUSE_DriverPS2.o GUI/Core/GUI_MoveRect.o GUI/Core/GUI_OnKey.o GUI/Core/GUI_Pen.o GUI/Core/GUI_PID.o GUI/Core/GUI_RectsIntersect.o GUI/Core/GUI_SaveContext.o GUI/Core/GUI_ScreenSize.o GUI/Core/GUI_SelectLayer.o GUI/Core/GUI_SelectLCD.o GUI/Core/GUI_SetClipRect.o GUI/Core/GUI_SetColor.o GUI/Core/GUI_SetColorIndex.o GUI/Core/GUI_SetDecChar.o GUI/Core/GUI_SetDefault.o GUI/Core/GUI_SetDrawMode.o GUI/Core/GUI_SetFont.o GUI/Core/GUI_SetLBorder.o GUI/Core/GUI_SetLineStyle.o GUI/Core/GUI_SetLUTColor.o GUI/Core/GUI_SetLUTColorEx.o GUI/Core/GUI_SetLUTEntry.o GUI/Core/GUI_SetOrg.o GUI/Core/GUI_SetPixelIndex.o GUI/Core/GUI_SetTextAlign.o GUI/Core/GUI_SetTextMode.o GUI/Core/GUI_SetTextStyle.o GUI/Core/GUI_SIF.o GUI/Core/GUI_SIF_Prop.o GUI/Core/GUI_TOUCH.o GUI/Core/GUI_TOUCH_DriverAnalog.o GUI/Core/GUI_TOUCH_StoreState.o GUI/Core/GUI_TOUCH_StoreUnstable.o GUI/Core/GUI_UC.o GUI/Core/GUI_UC_ConvertUC2UTF8.o GUI/Core/GUI_UC_ConvertUTF82UC.o GUI/Core/GUI_UC_DispString.o GUI/Core/GUI_UC_EncodeNone.o GUI/Core/GUI_UC_EncodeUTF8.o GUI/Core/GUI_WaitEvent.o GUI/Core/GUI_WaitKey.o GUI/Core/GUI_Warn.o GUI/Core/GUI2DLib.o GUI/Core/GUIAlloc.o GUI/Core/GUIArc.o GUI/Core/GUIChar.o GUI/Core/GUICharLine.o GUI/Core/GUICharM.o GUI/Core/GUICharP.o GUI/Core/GUICirc.o GUI/Core/GUIColor2Index.o GUI/Core/GUICore.o GUI/Core/GUICurs.o GUI/Core/GUIEncJS.o GUI/Core/GUIIndex2Color.o GUI/Core/GUIPolyE.o GUI/Core/GUIPolyM.o GUI/Core/GUIPolyR.o GUI/Core/GUIRealloc.o GUI/Core/GUIStream.o GUI/Core/GUITask.o GUI/Core/GUITime.o GUI/Core/GUITimer.o GUI/Core/GUIUC0.o GUI/Core/GUIVal.o GUI/Core/GUIValf.o GUI/Core/LCD.o GUI/Core/LCD_API.o GUI/Core/LCD_DrawVLine.o GUI/Core/LCD_GetColorIndex.o GUI/Core/LCD_GetEx.o GUI/Core/LCD_GetNumDisplays.o GUI/Core/LCD_GetPixelColor.o GUI/Core/LCD_Index2ColorEx.o GUI/Core/LCD_Mirror.o GUI/Core/LCD_MixColors256.o GUI/Core/LCD_ReadRect.o GUI/Core/LCD_Rotate180.o GUI/Core/LCD_RotateCCW.o GUI/Core/LCD_RotateCW.o GUI/Core/LCD_SelectLCD.o GUI/Core/LCD_SetAPI.o GUI/Core/LCD_SetClipRectEx.o GUI/Core/LCD_UpdateColorIndices.o GUI/Core/LCDAA.o GUI/Core/LCDColor.o GUI/Core/LCDGetP.o GUI/Core/LCDInfo.o GUI/Core/LCDInfo0.o GUI/Core/LCDInfo1.o GUI/Core/LCDL0Delta.o GUI/Core/LCDL0Mag.o GUI/Core/LCDP1.o GUI/Core/LCDP565_Index2Color.o GUI/Core/LCDP888_Index2Color.o GUI/Core/LCDPM565_Index2Color.o GUI/Core/LCDPM888_Index2Color.o GUI/Core/LCDRLE4.o GUI/Core/LCDRLE8.o GUI/Core/LCDRLE16.o GUI/Font/F4x6.o GUI/Font/F6x8.o GUI/Font/F08_1.o GUI/Font/F08_ASCII.o GUI/Font/F8x8.o GUI/Font/F8x10_ASCII.o GUI/Font/F8x12_ASCII.o GUI/Font/F8x13_1.o GUI/Font/F8x13_ASCII.o GUI/Font/F8x15B_1.o GUI/Font/F8x15B_ASCII.o GUI/Font/F8x16.o GUI/Font/F10_1.o GUI/Font/F10_ASCII.o GUI/Font/F10S_1.o GUI/Font/F10S_ASCII.o GUI/Font/F13_1.o GUI/Font/F13_ASCII.o GUI/Font/F13B_1.o GUI/Font/F13B_ASCII.o GUI/Font/F13H_1.o GUI/Font/F13H_ASCII.o GUI/Font/F13HB_1.o GUI/Font/F13HB_ASCII.o GUI/Font/F16_1.o GUI/Font/F16_1HK.o GUI/Font/F16_ASCII.o GUI/Font/F16_HK.o GUI/Font/F16B_1.o GUI/Font/F16B_ASCII.o GUI/Font/F24_1.o GUI/Font/F24_ASCII.o GUI/Font/F24B_1.o GUI/Font/F24B_ASCII.o GUI/Font/F32_1.o GUI/Font/F32_ASCII.o GUI/Font/F32B_1.o GUI/Font/F32B_ASCII.o GUI/Font/FComic18B_1.o GUI/Font/FComic18B_ASCII.o GUI/Font/FComic24B_1.o GUI/Font/FComic24B_ASCII.o GUI/Font/FD24x32.o GUI/Font/FD32.o GUI/Font/FD36x48.o GUI/Font/FD48.o GUI/Font/FD48x64.o GUI/Font/FD60x80.o GUI/Font/FD64.o GUI/Font/FD80.o GUI/LCDDriver/LCDWin.o GUI/MemDev/GUIDEV.o GUI/MemDev/GUIDEV_1.o GUI/MemDev/GUIDEV_8.o GUI/MemDev/GUIDEV_16.o GUI/MemDev/GUIDEV_AA.o GUI/MemDev/GUIDEV_Auto.o GUI/MemDev/GUIDEV_Banding.o GUI/MemDev/GUIDEV_Clear.o GUI/MemDev/GUIDEV_CmpWithLCD.o GUI/MemDev/GUIDEV_CopyFromLCD.o GUI/MemDev/GUIDEV_CreateFixed.o GUI/MemDev/GUIDEV_GetDataPtr.o GUI/MemDev/GUIDEV_GetXSize.o GUI/MemDev/GUIDEV_GetYSize.o GUI/MemDev/GUIDEV_Measure.o GUI/MemDev/GUIDEV_ReduceYSize.o GUI/MemDev/GUIDEV_SetOrg.o GUI/MemDev/GUIDEV_Usage.o GUI/MemDev/GUIDEV_UsageBM.o GUI/MemDev/GUIDEV_Write.o GUI/MemDev/GUIDEV_WriteAlpha.o GUI/MemDev/GUIDEV_WriteEx.o GUI/MemDev/GUIDEV_XY2PTR.o GUI/MultiLayer/LCD_1.o GUI/MultiLayer/LCD_2.o GUI/MultiLayer/LCD_3.o GUI/MultiLayer/LCD_4.o GUI/WM/WM.o GUI/WM/WM__ForEachDesc.o GUI/WM/WM__GetFirstSibling.o GUI/WM/WM__GetFocussedChild.o GUI/WM/WM__GetLastSibling.o GUI/WM/WM__GetOrg_AA.o GUI/WM/WM__GetPrevSibling.o GUI/WM/WM__IsAncestor.o GUI/WM/WM__IsChild.o GUI/WM/WM__IsEnabled.o GUI/WM/WM__NotifyVisChanged.o GUI/WM/WM__Screen2Client.o GUI/WM/WM__SendMessage.o GUI/WM/WM__SendMessageIfEnabled.o GUI/WM/WM__SendMessageNoPara.o GUI/WM/WM__UpdateChildPositions.o GUI/WM/WM_AttachWindow.o GUI/WM/WM_BringToBottom.o GUI/WM/WM_BringToTop.o GUI/WM/WM_Broadcast.o GUI/WM/WM_CheckScrollPos.o GUI/WM/WM_CriticalHandle.o GUI/WM/WM_DIAG.o GUI/WM/WM_EnableWindow.o GUI/WM/WM_ForEachDesc.o GUI/WM/WM_GetBkColor.o GUI/WM/WM_GetCallback.o GUI/WM/WM_GetClientRect.o GUI/WM/WM_GetClientWindow.o GUI/WM/WM_GetDesktopWindow.o GUI/WM/WM_GetDesktopWindowEx.o GUI/WM/WM_GetDiagInfo.o GUI/WM/WM_GetDialogItem.o GUI/WM/WM_GetFirstChild.o GUI/WM/WM_GetFlags.o GUI/WM/WM_GetFocussedWindow.o GUI/WM/WM_GetId.o GUI/WM/WM_GetInsideRect.o GUI/WM/WM_GetInsideRectExScrollbar.o GUI/WM/WM_GetInvalidRect.o GUI/WM/WM_GetNextSibling.o GUI/WM/WM_GetOrg.o GUI/WM/WM_GetParent.o GUI/WM/WM_GetPrevSibling.o GUI/WM/WM_GetScrollbar.o GUI/WM/WM_GetScrollPartner.o GUI/WM/WM_GetScrollPos.o GUI/WM/WM_GetScrollState.o GUI/WM/WM_GetWindowRect.o GUI/WM/WM_GetWindowSize.o GUI/WM/WM_HasCaptured.o GUI/WM/WM_HasFocus.o GUI/WM/WM_Hide.o GUI/WM/WM_InvalidateArea.o GUI/WM/WM_IsCompletelyVisible.o GUI/WM/WM_IsEnabled.o GUI/WM/WM_IsFocussable.o GUI/WM/WM_IsVisible.o GUI/WM/WM_IsWindow.o GUI/WM/WM_MakeModal.o GUI/WM/WM_Move.o GUI/WM/WM_MoveChildTo.o GUI/WM/WM_NotifyParent.o GUI/WM/WM_OnKey.o GUI/WM/WM_Paint.o GUI/WM/WM_PaintWindowAndDescs.o GUI/WM/WM_PID__GetPrevState.o GUI/WM/WM_ResizeWindow.o GUI/WM/WM_Screen2Win.o GUI/WM/WM_SendMessageNoPara.o GUI/WM/WM_SendToParent.o GUI/WM/WM_SetAnchor.o GUI/WM/WM_SetCallback.o GUI/WM/WM_SetCapture.o GUI/WM/WM_SetCaptureMove.o GUI/WM/WM_SetCreateFlags.o GUI/WM/WM_SetDesktopColor.o GUI/WM/WM_SetFocus.o GUI/WM/WM_SetFocusOnNextChild.o GUI/WM/WM_SetFocusOnPrevChild.o GUI/WM/WM_SetId.o GUI/WM/WM_SetpfPollPID.o GUI/WM/WM_SetScrollbar.o GUI/WM/WM_SetScrollPos.o GUI/WM/WM_SetScrollState.o GUI/WM/WM_SetSize.o GUI/WM/WM_SetTrans.o GUI/WM/WM_SetTransState.o GUI/WM/WM_SetUserClipRect.o GUI/WM/WM_SetWindowPos.o GUI/WM/WM_SetXSize.o GUI/WM/WM_SetYSize.o GUI/WM/WM_Show.o GUI/WM/WM_SIM.o GUI/WM/WM_StayOnTop.o GUI/WM/WM_Timer.o GUI/WM/WM_TimerExternal.o GUI/WM/WM_UpdateWindowAndDescs.o GUI/WM/WM_UserData.o GUI/WM/WM_Validate.o GUI/WM/WM_ValidateWindow.o GUI/WM/WMMemDev.o GUI/WM/WMTouch.o GUI/Widget/BUTTON.o GUI/Widget/BUTTON__SetBitmapObj.o GUI/Widget/BUTTON_Bitmap.o GUI/Widget/BUTTON_BMP.o GUI/Widget/BUTTON_Create.o GUI/Widget/BUTTON_CreateIndirect.o GUI/Widget/BUTTON_Default.o GUI/Widget/BUTTON_Get.o GUI/Widget/BUTTON_GetBitmap.o GUI/Widget/BUTTON_IsPressed.o GUI/Widget/BUTTON_SelfDraw.o GUI/Widget/BUTTON_SetFocusColor.o GUI/Widget/BUTTON_SetTextAlign.o GUI/Widget/BUTTON_StreamedBitmap.o GUI/Widget/CHECKBOX.o GUI/Widget/CHECKBOX_Create.o GUI/Widget/CHECKBOX_CreateIndirect.o GUI/Widget/CHECKBOX_Default.o GUI/Widget/CHECKBOX_GetState.o GUI/Widget/CHECKBOX_GetText.o GUI/Widget/CHECKBOX_Image.o GUI/Widget/CHECKBOX_IsChecked.o GUI/Widget/CHECKBOX_SetBkColor.o GUI/Widget/CHECKBOX_SetBoxBkColor.o GUI/Widget/CHECKBOX_SetDefaultImage.o GUI/Widget/CHECKBOX_SetFocusColor.o GUI/Widget/CHECKBOX_SetFont.o GUI/Widget/CHECKBOX_SetImage.o GUI/Widget/CHECKBOX_SetNumStates.o GUI/Widget/CHECKBOX_SetSpacing.o GUI/Widget/CHECKBOX_SetState.o GUI/Widget/CHECKBOX_SetText.o GUI/Widget/CHECKBOX_SetTextAlign.o GUI/Widget/CHECKBOX_SetTextColor.o GUI/Widget/DIALOG.o GUI/Widget/DROPDOWN.o GUI/Widget/DROPDOWN_AddString.o GUI/Widget/DROPDOWN_Create.o GUI/Widget/DROPDOWN_CreateIndirect.o GUI/Widget/DROPDOWN_Default.o GUI/Widget/DROPDOWN_DeleteItem.o GUI/Widget/DROPDOWN_GetNumItems.o GUI/Widget/DROPDOWN_InsertString.o GUI/Widget/DROPDOWN_ItemSpacing.o GUI/Widget/DROPDOWN_SetAutoScroll.o GUI/Widget/DROPDOWN_SetBkColor.o GUI/Widget/DROPDOWN_SetColor.o GUI/Widget/DROPDOWN_SetFont.o GUI/Widget/DROPDOWN_SetScrollbarColor.o GUI/Widget/DROPDOWN_SetScrollbarWidth.o GUI/Widget/DROPDOWN_SetTextAlign.o GUI/Widget/DROPDOWN_SetTextColor.o GUI/Widget/DROPDOWN_SetTextHeight.o GUI/Widget/EDIT.o GUI/Widget/EDIT_Create.o GUI/Widget/EDIT_CreateIndirect.o GUI/Widget/EDIT_Default.o GUI/Widget/EDIT_GetCursorPixelPos.o GUI/Widget/EDIT_GetCursorPos.o GUI/Widget/EDIT_GetNumChars.o GUI/Widget/EDIT_SetCursorAtChar.o GUI/Widget/EDIT_SetFocussable.o GUI/Widget/EDIT_SetInsertMode.o GUI/Widget/EDIT_SetpfAddKeyEx.o GUI/Widget/EDIT_SetpfUpdateBuffer.o GUI/Widget/EDIT_SetSel.o GUI/Widget/EDIT_SetTextMode.o GUI/Widget/EDITBin.o GUI/Widget/EDITDec.o GUI/Widget/EDITFloat.o GUI/Widget/EDITHex.o GUI/Widget/EDITUlong.o GUI/Widget/FRAMEWIN.o GUI/Widget/FRAMEWIN__UpdateButtons.o GUI/Widget/FRAMEWIN_AddMenu.o GUI/Widget/FRAMEWIN_Button.o GUI/Widget/FRAMEWIN_ButtonClose.o GUI/Widget/FRAMEWIN_ButtonMax.o GUI/Widget/FRAMEWIN_ButtonMin.o GUI/Widget/FRAMEWIN_Create.o GUI/Widget/FRAMEWIN_CreateIndirect.o GUI/Widget/FRAMEWIN_Default.o GUI/Widget/FRAMEWIN_Get.o GUI/Widget/FRAMEWIN_IsMinMax.o GUI/Widget/FRAMEWIN_MinMaxRest.o GUI/Widget/FRAMEWIN_SetBorderSize.o GUI/Widget/FRAMEWIN_SetColors.o GUI/Widget/FRAMEWIN_SetFont.o GUI/Widget/FRAMEWIN_SetResizeable.o GUI/Widget/FRAMEWIN_SetTitleHeight.o GUI/Widget/FRAMEWIN_SetTitleVis.o GUI/Widget/GRAPH.o GUI/Widget/GRAPH_CreateIndirect.o GUI/Widget/GRAPH_DATA_XY.o GUI/Widget/GRAPH_DATA_YT.o GUI/Widget/GRAPH_SCALE.o GUI/Widget/GUI_ARRAY.o GUI/Widget/GUI_ARRAY_DeleteItem.o GUI/Widget/GUI_ARRAY_InsertItem.o GUI/Widget/GUI_ARRAY_ResizeItem.o GUI/Widget/GUI_DRAW.o GUI/Widget/GUI_DRAW_BITMAP.o GUI/Widget/GUI_DRAW_BMP.o GUI/Widget/GUI_DRAW_Self.o GUI/Widget/GUI_DRAW_STREAMED.o GUI/Widget/GUI_EditBin.o GUI/Widget/GUI_EditDec.o GUI/Widget/GUI_EditFloat.o GUI/Widget/GUI_EditHex.o GUI/Widget/GUI_EditString.o GUI/Widget/GUI_HOOK.o GUI/Widget/HEADER.o GUI/Widget/HEADER__SetDrawObj.o GUI/Widget/HEADER_Bitmap.o GUI/Widget/HEADER_BMP.o GUI/Widget/HEADER_Create.o GUI/Widget/HEADER_CreateIndirect.o GUI/Widget/HEADER_GetSel.o GUI/Widget/HEADER_SetDragLimit.o GUI/Widget/HEADER_StreamedBitmap.o GUI/Widget/LISTBOX.o GUI/Widget/LISTBOX_Create.o GUI/Widget/LISTBOX_CreateIndirect.o GUI/Widget/LISTBOX_Default.o GUI/Widget/LISTBOX_DeleteItem.o GUI/Widget/LISTBOX_Font.o GUI/Widget/LISTBOX_GetItemText.o GUI/Widget/LISTBOX_GetNumItems.o GUI/Widget/LISTBOX_GetTextAlign.o GUI/Widget/LISTBOX_InsertString.o GUI/Widget/LISTBOX_ItemDisabled.o GUI/Widget/LISTBOX_ItemSpacing.o GUI/Widget/LISTBOX_MultiSel.o GUI/Widget/LISTBOX_ScrollStep.o GUI/Widget/LISTBOX_SetAutoScroll.o GUI/Widget/LISTBOX_SetBkColor.o GUI/Widget/LISTBOX_SetOwner.o GUI/Widget/LISTBOX_SetOwnerDraw.o GUI/Widget/LISTBOX_SetScrollbarColor.o GUI/Widget/LISTBOX_SetScrollbarWidth.o GUI/Widget/LISTBOX_SetString.o GUI/Widget/LISTBOX_SetTextAlign.o GUI/Widget/LISTBOX_SetTextColor.o GUI/Widget/LISTVIEW.o GUI/Widget/LISTVIEW_Create.o GUI/Widget/LISTVIEW_CreateIndirect.o GUI/Widget/LISTVIEW_Default.o GUI/Widget/LISTVIEW_DeleteAllRows.o GUI/Widget/LISTVIEW_DeleteColumn.o GUI/Widget/LISTVIEW_DeleteRow.o GUI/Widget/LISTVIEW_DisableRow.o GUI/Widget/LISTVIEW_GetBkColor.o GUI/Widget/LISTVIEW_GetFont.o GUI/Widget/LISTVIEW_GetHeader.o GUI/Widget/LISTVIEW_GetItemText.o GUI/Widget/LISTVIEW_GetNumColumns.o GUI/Widget/LISTVIEW_GetNumRows.o GUI/Widget/LISTVIEW_GetSel.o GUI/Widget/LISTVIEW_GetTextColor.o GUI/Widget/LISTVIEW_InsertRow.o GUI/Widget/LISTVIEW_SetAutoScroll.o GUI/Widget/LISTVIEW_SetBkColor.o GUI/Widget/LISTVIEW_SetColumnWidth.o GUI/Widget/LISTVIEW_SetFont.o GUI/Widget/LISTVIEW_SetGridVis.o GUI/Widget/LISTVIEW_SetItemColor.o GUI/Widget/LISTVIEW_SetItemText.o GUI/Widget/LISTVIEW_SetLBorder.o GUI/Widget/LISTVIEW_SetRBorder.o GUI/Widget/LISTVIEW_SetRowHeight.o GUI/Widget/LISTVIEW_SetSel.o GUI/Widget/LISTVIEW_SetSort.o GUI/Widget/LISTVIEW_SetTextAlign.o GUI/Widget/LISTVIEW_SetTextColor.o GUI/Widget/LISTVIEW_UserData.o GUI/Widget/MENU.o GUI/Widget/MENU__FindItem.o GUI/Widget/MENU_Attach.o GUI/Widget/MENU_CreateIndirect.o GUI/Widget/MENU_Default.o GUI/Widget/MENU_DeleteItem.o GUI/Widget/MENU_DisableItem.o GUI/Widget/MENU_EnableItem.o GUI/Widget/MENU_GetItem.o GUI/Widget/MENU_GetItemText.o GUI/Widget/MENU_GetNumItems.o GUI/Widget/MENU_InsertItem.o GUI/Widget/MENU_Popup.o GUI/Widget/MENU_SetBkColor.o GUI/Widget/MENU_SetBorderSize.o GUI/Widget/MENU_SetFont.o GUI/Widget/MENU_SetItem.o GUI/Widget/MENU_SetTextColor.o GUI/Widget/MESSAGEBOX.o GUI/Widget/MULTIEDIT.o GUI/Widget/MULTIEDIT_Create.o GUI/Widget/MULTIEDIT_CreateIndirect.o GUI/Widget/MULTIPAGE.o GUI/Widget/MULTIPAGE_Create.o GUI/Widget/MULTIPAGE_CreateIndirect.o GUI/Widget/MULTIPAGE_Default.o GUI/Widget/PROGBAR.o GUI/Widget/PROGBAR_Create.o GUI/Widget/PROGBAR_CreateIndirect.o GUI/Widget/PROGBAR_SetBarColor.o GUI/Widget/PROGBAR_SetFont.o GUI/Widget/PROGBAR_SetMinMax.o GUI/Widget/PROGBAR_SetText.o GUI/Widget/PROGBAR_SetTextAlign.o GUI/Widget/PROGBAR_SetTextColor.o GUI/Widget/PROGBAR_SetTextPos.o GUI/Widget/RADIO.o GUI/Widget/RADIO_Create.o GUI/Widget/RADIO_CreateIndirect.o GUI/Widget/RADIO_Default.o GUI/Widget/RADIO_GetText.o GUI/Widget/RADIO_Image.o GUI/Widget/RADIO_SetBkColor.o GUI/Widget/RADIO_SetDefaultImage.o GUI/Widget/RADIO_SetFocusColor.o GUI/Widget/RADIO_SetFont.o GUI/Widget/RADIO_SetGroupId.o GUI/Widget/RADIO_SetImage.o GUI/Widget/RADIO_SetText.o GUI/Widget/RADIO_SetTextColor.o GUI/Widget/SCROLLBAR.o GUI/Widget/SCROLLBAR_Create.o GUI/Widget/SCROLLBAR_CreateIndirect.o GUI/Widget/SCROLLBAR_Defaults.o GUI/Widget/SCROLLBAR_GetValue.o GUI/Widget/SCROLLBAR_SetColor.o GUI/Widget/SCROLLBAR_SetWidth.o GUI/Widget/SLIDER.o GUI/Widget/SLIDER_Create.o GUI/Widget/SLIDER_CreateIndirect.o GUI/Widget/SLIDER_Default.o GUI/Widget/SLIDER_SetFocusColor.o GUI/Widget/TEXT.o GUI/Widget/TEXT_Create.o GUI/Widget/TEXT_CreateIndirect.o GUI/Widget/TEXT_Default.o GUI/Widget/TEXT_SetBkColor.o GUI/Widget/TEXT_SetFont.o GUI/Widget/TEXT_SetText.o GUI/Widget/TEXT_SetTextAlign.o GUI/Widget/TEXT_SetTextColor.o GUI/Widget/TEXT_SetWrapMode.o GUI/Widget/WIDGET.o GUI/Widget/WIDGET_Effect_3D.o GUI/Widget/WIDGET_Effect_3D1L.o GUI/Widget/WIDGET_Effect_3D2L.o GUI/Widget/WIDGET_Effect_None.o GUI/Widget/WIDGET_Effect_Simple.o GUI/Widget/WIDGET_FillStringInRect.o GUI/Widget/WIDGET_SetEffect.o GUI/Widget/WIDGET_SetWidth.o GUI/Widget/WINDOW.o GUI/Widget/WINDOW_Default.o Simulation/GUI_X_Win.o Simulation/LCDSIM.o Simulation/WinMain.o -o ucgui.exe -L"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib32" -L"C:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib32" -static-libgcc -mwindows -lwinmm -m32

编译正常, 链接出错, 看来是 windows shell 的黑锅了, 一条命令最懂只能8192 个字符:

gcc.exe: error: GU: No such file or directory

F:\ucGUI\uCGUI398\Makefile.win:25: recipe for target 'ucgui.exe' failed

mingw32-make.exe: *** [ucgui.exe] Error 1

devcpp_build3.png

我用 git 自带的 shell 就能接受这么长的字符串, 然后编译成功, 生成了 ucgui.exe

#169 Re: 全志 V3S/F1C100s/X3 » 投屏软件scrcpy在Linux上的移植(porting scrcpy to linux) » 2019-08-21 09:28:11

楼主大神, 我还是接着到这里来问你合适一点

https://whycan.cn/t_2760.html#p22646

checkout 说:

你首先要分清adb和adbd的区别。adbd是手机里面跑的那种,需要支持gadget,adb是主机模式下跑的,用来连接手机

firstman 说:

https://whycan.cn/files/members/1574/QQ20190820223450.png

弄了一个 adb 执行程序进去, 然而, 并不能连到我的小米手机.

总觉得还有一个协议没有勾选.

如果我的 f1c100s 里面跑一个 adb, 用来连接手机(手机里面应该跑的是 adbd???)
我需要做哪些操作, 需要在 make menuconfig 里面勾选什么协议吗?

#170 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 第一次见到这种夹具, 可以用于SOP8 SOIC8 封装的 flash 在线烧录, 免拆芯片,转载QQ群 » 2019-08-21 09:18:54

xk100 说:
还能这么玩 说:

3.因为是简易的编程器,我电脑的USB已经烧了两组了.现在是加的PCI扩展的USB使用。。

这操作让我的表情有点不稳定啊,
我是受过训练的人, 一般都能忍住不笑, 哈哈哈哈哈哈哈哈
加个USB HUB 是不是能保护主板?

不,不是保护主板,而是现在已经无USB可用了。只能扩展,

没烧之前可以加 HUB 保护主板吧?

#172 Re: ESP32/ESP8266 » 开源!吃鸡开发板ESP32+CH374U方案,让你通过鼠标键盘玩手机吃鸡游戏! » 2019-08-20 22:50:00

貌似要打上这几个补丁才行:

In kernel .config, the Android gadget drivers are enabled:

CONFIG_USB_ANDROID=y
CONFIG_USB_ANDROID_ADB=y
CONFIG_USB_ANDROID_MASS_STORAGE=y
CONFIG_USB_ANDROID_RNDIS=y
CONFIG_USB_ANDROID_RNDIS_WCEIS=y

https://community.nxp.com/thread/256677

#173 Re: ESP32/ESP8266 » 开源!吃鸡开发板ESP32+CH374U方案,让你通过鼠标键盘玩手机吃鸡游戏! » 2019-08-20 22:35:53

QQ20190820223450.png

弄了一个 adb 执行程序进去, 然而, 并不能连到我的小米手机.

总觉得还有一个协议没有勾选.

#174 Re: ESP32/ESP8266 » 开源!吃鸡开发板ESP32+CH374U方案,让你通过鼠标键盘玩手机吃鸡游戏! » 2019-08-20 21:38:22

checkout 说:

adb只是个协议

buildroot 里面有 adb tools, 勾上编译一下就可以, 但是不知道USB驱动怎么弄

#175 Re: ESP32/ESP8266 » 开源!吃鸡开发板ESP32+CH374U方案,让你通过鼠标键盘玩手机吃鸡游戏! » 2019-08-20 20:50:22

guanglun 说:
firstman 说:

可以通过 f1c100s 这种 usb otg 接口,安装 adb 操作安卓手机吗?

可以的

请教这个驱动里面要开启哪一项呢? 然后移植一个 adb 进来?

#176 Re: 全志 V3S/F1C100s/X3 » 有一个电脑可以正常读写的U盘, 但是用 荔枝派nand + f1c100s linux 4.15 无法识别 » 2019-08-20 11:59:30

谢谢楼上各位解答。

这个U盘是 QC 部门的同事, 8块钱一个在外面买的64M的, 一共十多个, 就这一个出问题了,
后来无意中发现, 偏着插一点点进去, 不全部插进去(全插LED不亮),
成功率就会有 50%, 也就是说没有一楼的错误, 可以正常使用。

百思不得其解.

#178 Re: ESP32/ESP8266 » 开源!吃鸡开发板ESP32+CH374U方案,让你通过鼠标键盘玩手机吃鸡游戏! » 2019-08-20 09:04:48

可以通过 f1c100s 这种 usb otg 接口,安装 adb 操作安卓手机吗?

#179 Re: RK3288/RK3399/RK1108 » GET_DEF(PROBE) not supported是什么问题? » 2019-08-19 09:27:34

https://e2e.ti.com/support/processors/f/791/t/483508?UVC-camera-non-compliance-for-AM335x

This issue is platform independent, not related to AM335x. This camera is not compliant with UVC Specs - GET_DEF(PROBE) is not supported, so that the UVCVIDEO driver is unable to enumerate this camera.

My only advice is to try the latest AM335x Processor SDK 2.0 (http://software-dl.ti.com/processor-sw/esd/PROCESSOR-SDK-LINUX-AM335X/latest/index_FDS.html), which uses kernel v4.1. If the newer kernel had any quirk added in UVCVIDEO driver to support this particular camera, it might work. If not, the only option you have is to pick other UVC-compliant cameras, since this one is not supported in Linux kernel.

此问题与平台无关,与AM335x无关。本相机不符合UVC规格 - 不支持GET_DEF(PROBE),因此UVCVIDEO驱动程序无法枚举此相机。

我唯一的建议是尝试最新的AM335x处理器SDK 2.0(http://software-dl.ti.com/processor-sw/esd/PROCESSOR-SDK-LINUX-AM335X/latest/index_FDS.html),它使用内核v4 0.1。如果较新的内核在UVCVIDEO驱动程序中添加任何怪癖来支持这个特定的相机,它可能会工作。如果没有,您唯一的选择是选择其他符合UVC标准的摄像机,因为Linux内核不支持此摄像机。

#185 Re: 全志 V3S/F1C100s/X3 » 有一个电脑可以正常读写的U盘, 但是用 荔枝派nand + f1c100s linux 4.15 无法识别 » 2019-08-17 15:56:13

看来是因为荔枝派nano 的 VBUS 引脚没有并大电容引起???
我这个U盘有个指示的LED, 估计电流也大, 然后瞬间拉低?

#186 Re: 全志 V3S/F1C100s/X3 » 有一个电脑可以正常读写的U盘, 但是用 荔枝派nand + f1c100s linux 4.15 无法识别 » 2019-08-17 15:55:00

搜了一圈, 搜到 TI 的 AM335x 资料: https://wiki.phytec.com/pages/viewpage.action?pageId=69503441

而如果要实现OTG的功能,自动在HOST和Device之间转换,则需要用这个引脚来控制电源的输出。

USBx_VBUS引脚用于检测5V电压,不管是HOST还是Device都需要接USB的5V电源,且如果做HOST,在底板上需要有一个5V电源来供这个引脚来检测,这个引脚(或者说USB的VBUS)要求有最少150uF的电容,以防止在插入USB设备时,瞬间拉低5V供电导致错误。

如果VBUS相关的上面两个引脚有问题时,则会报类似下面的错误:

[    2.216291] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in a_wait_vrise (89, <AValid), retry #1, port1 00000104
[    2.368523] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in a_wait_vrise (81, <SessEnd), retry #2, port1 00000104

USBx_ID引脚用于做HOST-Device判断,如果不需要则可以通过软件设为HOST或Device,则此时该引脚被bypass。

USBx_CE引脚用于使能外部充电器,主要当AM335x为被充电对象时,AM335x会对状况进行判断以配置是否要使能电池充电器,因为某些情况下使能充电器可能会拉垮主机使得usb通讯中断。不使用请悬空。

#188 全志 V3S/F1C100s/X3 » 有一个电脑可以正常读写的U盘, 但是用 荔枝派nand + f1c100s linux 4.15 无法识别 » 2019-08-17 15:51:22

firstman
回复: 8

日志是这样的:

[    1.585842] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    1.675173] EXT4-fs (mmcblk0p2): recovery complete
[    1.683420] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.691754] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.699808] devtmpfs: mounted
[    1.709940] Freeing unused kernel memory: 1024K
[    1.900221] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
[    4.579951] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[    9.497489] g_serial gadget: Gadget Serial v2.4
[    9.502134] g_serial gadget: g_serial ready
[   53.893354] random: crng init done
[   68.554535] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in a_wait_vrise (81, <SessEnd), retry #1, port1 00000100
[  568.494533] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in a_wait_vrise (81, <SessEnd), retry #2, port1 00000100
[  598.514529] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in a_wait_vrise (81, <SessEnd), retry #3, port1 00000100


请问我哪位大佬遇到过吗?

#189 Re: 全志 V3S/F1C100s/X3 » 分享一个 5寸的 800x480 的 f1c100s 固件, 感谢 @xm1994 » 2019-08-17 09:05:48

晕哥 说:

感谢楼主热心分享!






参考链接1: http://nano.lichee.pro/build_sys/build_flash.html
参考链接2: 核心板原理图 Lichee_nano.pdf (第一版)
参考链接3: 核心板原理图 lichee_nano_new.pdf (第二版 ns2009)
参考链接4: 底板原理图    lpi-nano-dock.pdf


2019-08-17_090528.png

请问这种接口的 GT911 电容触摸屏哪里可以买到?

#190 Re: 全志 V3S/F1C100s/X3 » 批量生产,你们都在哪家PCB厂和SMT厂呢 » 2019-08-14 09:58:25

关注, 嘉立创 今年连 FPC 都不能贴, 去年还可以贴, 真是蛋疼。

#192 Re: 全志 V3S/F1C100s/X3 » 哪位知道f1c100s的DEFE怎么用的,有没有例子? » 2019-08-10 13:36:59

特意去翻了一下 c600 的手册, 找到 DEFE, 原来是显示引擎哦,没有玩过, 只能表示关注了。

#193 Re: 全志 V3S/F1C100s/X3 » XBOOT能通过JLINK调试吗? » 2019-08-10 13:35:32

好贴好贴, 持续关注, 有空跟着楼主一起用 jlink 裸奔

#194 Re: RK3288/RK3399/RK1108 » 怎么修改/dev/ttyS后面的数字? » 2019-08-10 13:33:49

但是改成

serial9 = &uart2;

就不太正常了哦:

[    0.410050] console [ttyS0] disabled
[    0.430326] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 25, base_baud = 6250000) is a 16550A
[    0.911293] console [ttyS0] enabled
[    0.937658] 1c25800.serial: ttyS1 at MMIO 0x1c25800 (irq = 26, base_baud = 6250000) is a 16550A

#195 Re: RK3288/RK3399/RK1108 » 怎么修改/dev/ttyS后面的数字? » 2019-08-10 12:00:53

再次测试, 改成

serial3 = &uart2;

也是正常的:

[    0.410050] console [ttyS0] disabled
[    0.430326] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 25, base_baud = 6250000) is a 16550A
[    0.911293] console [ttyS0] enabled
[    0.937658] 1c25800.serial: ttyS3 at MMIO 0x1c25800 (irq = 26, base_baud = 6250000) is a 16550A

#196 Re: RK3288/RK3399/RK1108 » 怎么修改/dev/ttyS后面的数字? » 2019-08-10 11:51:38

BMN李 说:

aliases {
...
serial0 = &uart0;
serial1 = &uart1;
serial2 = &uart2;
serial3 = &uart3;
serial4 = &uart4;
};

理论上,我把这里的“serial2”改成“serial9”就可以了,但实际测试不行额,还是原来的一样,没有ttyS9这个节点呢。

参考资料: https://blog.csdn.net/kris_fei/article/details/75309163

我这里改是没有问题

改成这样:

aliases {
        serial0 = &uart0;
        serial2 = &uart2;
        spi0 = &spi0;
};

日志就是这样:

[    0.410101] console [ttyS0] disabled
[    0.430375] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 25, base_baud = 6250000) is a 16550A
[    0.911348] console [ttyS0] enabled
[    0.937726] 1c25800.serial: ttyS2 at MMIO 0x1c25800 (irq = 26, base_baud = 6250000) is a 16550A
[    0.954747] panel-simple panel: panel supply power not found, using dummy regulator

然后 echo "XXXXXXXXXX" > /dev/ttyS2 , 用串口工具在Windows 读 /dev/ttyS2 正常

#197 Re: 全志 V3S/F1C100s/X3 » 请教F1C100S lradc 不产生中断问题 » 2019-08-10 10:17:50

顺便传一个控制荔枝派 nano 底板 三色LED 的脚本:

#########控制PE4 (绿) 4*32 + 4 = 132
echo 132 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio132/direction
#打开绿灯
echo 0 > /sys/class/gpio/gpio132/value
#关闭绿灯
echo 1 > /sys/class/gpio/gpio132/value

#########控制PE5 (蓝) 4*32 + 5 = 133
echo 133 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio133/direction
#打开蓝灯
echo 0 > /sys/class/gpio/gpio133/value
#关闭蓝灯
echo 1 > /sys/class/gpio/gpio133/value

#########控制PE6 (红) 4*32 + 6 = 134
echo 134 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio134/direction
#打开红灯
echo 0 > /sys/class/gpio/gpio134/value
#关闭红灯
echo 1 > /sys/class/gpio/gpio134/value

#198 Re: 全志 V3S/F1C100s/X3 » 请教F1C100S lradc 不产生中断问题 » 2019-08-10 09:02:46

lichee_nano.jpg

终于搞定, 感谢万能的晕哥.

# /mnt/sdcard/evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:      1c23400.lradc
/dev/input/event1:      1c24800.rtp
Select the device event number [0-1]: 0
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "1c23400.lradc"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 114 (KEY_VOLUMEDOWN)
    Event code 115 (KEY_VOLUMEUP)
    Event code 352 (KEY_OK)
    Event code 353 (KEY_SELECT)
Properties:
Testing ... (interrupt to exit)
Event: time 26.366489, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1
Event: time 26.366489, -------------- SYN_REPORT ------------
Event: time 26.539027, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0
Event: time 26.539027, -------------- SYN_REPORT ------------
Event: time 29.266293, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1
Event: time 29.266293, -------------- SYN_REPORT ------------
Event: time 29.445736, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0
Event: time 29.445736, -------------- SYN_REPORT ------------
Event: time 29.957952, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1
Event: time 29.957952, -------------- SYN_REPORT ------------
Event: time 30.121078, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0
Event: time 30.121078, -------------- SYN_REPORT ------------
Event: time 30.447588, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 1
Event: time 30.447588, -------------- SYN_REPORT ------------
Event: time 30.607447, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 0
Event: time 30.607447, -------------- SYN_REPORT ------------
Event: time 31.299260, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 1
Event: time 31.299260, -------------- SYN_REPORT ------------
Event: time 31.459163, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 0
Event: time 31.459163, -------------- SYN_REPORT ------------
Event: time 31.883504, type 1 (EV_KEY), code 353 (KEY_SELECT), value 1
Event: time 31.883504, -------------- SYN_REPORT ------------
Event: time 32.076111, type 1 (EV_KEY), code 353 (KEY_SELECT), value 0
Event: time 32.076111, -------------- SYN_REPORT ------------
Event: time 32.539590, type 1 (EV_KEY), code 353 (KEY_SELECT), value 1
Event: time 32.539590, -------------- SYN_REPORT ------------
Event: time 32.699518, type 1 (EV_KEY), code 353 (KEY_SELECT), value 0
Event: time 32.699518, -------------- SYN_REPORT ------------
Event: time 33.156510, type 1 (EV_KEY), code 352 (KEY_OK), value 1
Event: time 33.156510, -------------- SYN_REPORT ------------
Event: time 33.322983, type 1 (EV_KEY), code 352 (KEY_OK), value 0
Event: time 33.322983, -------------- SYN_REPORT ------------
Event: time 34.149170, type 1 (EV_KEY), code 352 (KEY_OK), value 1
Event: time 34.149170, -------------- SYN_REPORT ------------
Event: time 34.328744, type 1 (EV_KEY), code 352 (KEY_OK), value 0
Event: time 34.328744, -------------- SYN_REPORT ------------

#200 Re: 全志 V3S/F1C100s/X3 » 请教一下各们,为什么我的AXP203的电源芯片在Power_supply下没有内容? » 2019-08-09 16:41:30

[    1.306817] axp20x-i2c 0-0034: Failed to request IRQ 0 for axp20x_irq_chip: -22
[    1.314193] axp20x-i2c 0-0034: failed to add irq chip: -22
[    1.319929] axp20x-i2c: probe of 0-0034 failed with error -22

获取中断资源出问题了, 估计这里导致驱动退出检测了。

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB