(T113i工业套件)Tina-SDK开发

开发环境搭建

1.获取TinaSDK5源码

在虚拟机上,打开下载好的ubuntu镜像。 拉取扩展补丁:

ubuntu@ubuntu1804:~$ git clone https://github.com/DongshanPI/T113i_DevKitF_Tina5SDK.git 
ubuntu@ubuntu1804:~$ tar -xvf tina5sdk-bsp-50ae436fe556be2253856af283b1e094.tar.gz
ubuntu@ubuntu1804:~$ cd tina5sdk-bsp
ubuntu@ubuntu1804:~/tina5sdk-bsp$ git clone https://e.coding.net/weidongshan/tina5/buildroot.git
ubuntu@ubuntu1804:~/tina5sdk-bsp$ git clone https://e.coding.net/weidongshan/tina5/openwrt.git
ubuntu@ubuntu1804:~/tina5sdk-bsp$ git clone https://e.coding.net/weidongshan/tina5/platform.git
ubuntu@ubuntu1804:~/tina5sdk-bsp$ ls
brandy build buildroot build.sh device kernel openwrt platform prebuilt tools
ubuntu@ubuntu1804:~/tina5sdk-bsp$
 

进入源码根目录tina5sdk-bsp/,拷贝扩展补丁:

ubuntu@ubuntu1804:~/tina5sdk-bsp$ cp ~/T113i_DevKitF_Tina5SDK/* -rfvd .
 

2.编译固件

在Ubuntu上,进入源码根目录tina5sdk-bsp

①先执行 source build/envsetup.sh 初始化环境变量;

②接着执行 ./build.sh 选择开发板选项。

  • platform : linux
  • linux_dev : buildroot
  • ic : t113_i
  • board : evb1_auto
  • flash : default
ubuntu@ubuntu1804:~/tina5sdk-bsp$ source build/envsetup.sh
NOTE: The SDK(/home/ubuntu/tina5sdk-bsp) was successfully loaded
load openwrt... ok
Please run lunch next for openwrt.
load buildroot,bsp...ok
Invoke . build/quick.sh from your shell to add the following functions to your environment:
croot - Changes directory to the top of the tree
cbsp - Changes directory to the bsp
cbsptest - Changes directory to the bsptest
ckernel - Changes directory to the kernel
cbrandy - Changes directory to the brandy
cboot - Changes directory to the uboot
cbr - Changes directory to the buildroot
cchips - Changes directory to the board
cconfigs - Changes directory to the board's config
cbin - Changes directory to the board's bin
cdts - Changes directory to the kernel's dts
ckernelout - Changes directory to the kernel output
cout - Changes directory to the product's output
copenssl - Changes directory to the product's openssl-1.0.0
Usage: build.sh [args]
build.sh - default build all
build.sh bootloader - only build bootloader
build.sh kernel - only build kernel
build.sh buildroot_rootfs - only build buildroot
build.sh menuconfig - edit kernel menuconfig
build.sh saveconfig - save kernel menuconfig
build.sh recovery_menuconfig - edit recovery menuconfig
build.sh recovery_saveconfig - save recovery menuconfig
build.sh buildroot_menuconfig - edit buildroot menuconfig
build.sh buildroot_saveconfig - save buildroot menuconfig
build.sh clean - clean all
build.sh distclean - distclean all
build.sh pack - pack firmware
build.sh pack_debug - pack firmware with debug info output to card0
build.sh pack_secure - pack firmware with secureboot
Usage: pack [args]
pack - pack firmware
pack -d - pack firmware with debug info output to card0
pack -s - pack firmware with secureboot
pack -sd - pack firmware with secureboot and debug info output to card0
ubuntu@ubuntu1804:~/tina5sdk-bsp$
ubuntu@ubuntu1804:~/tina5sdk-bsp$ ./build.sh
All available platform:
0. android
1. linux
Choice [android]: 1
All available linux_dev:
0. bsp
1. buildroot
2. openwrt
Choice [bsp]: 1
All available ic:
0. t113_i
1. t113_s4
Choice [t113_i]: 0
All available board:
0. evb1
1. evb1_auto
2. evb1_auto_nand
3. evb1_auto_nor
Choice [evb1]: 1
All available flash:
0. default
1. nor
Choice [default]: 0
 

选择完,按下Enter键之后,会出现报错。

Choice [default]: 0
INFO: kernel relative recovery defconfig: ../../../../../device/config/chips/t113_i/configs/evb1_auto/linux-5.4/config-5.4-recovery
INFO: kernel absolute recovery defconfig: /home/ubuntu/tina5sdk-bspdevice/config/chips/t113_i/configs/evb1_auto/linux-5.4/config-5.4-recovery
INFO: Prepare toolchain ...
INFO: kernel defconfig: generate /home/ubuntu/tina5sdk-bspout/t113_i/kernel/build/.config by /home/ubuntu/tina5sdk-bspdevice/config/chips/t113_i/configs/evb1_auto/linux-5.4/config-5.4
INFO: Prepare toolchain ...
make: Entering directory '/home/ubuntu/tina5sdk-bspkernel/linux-5.4'
make[1]: Entering directory '/home/ubuntu/tina5sdk-bspout/t113_i/kernel/build'
GEN Makefile
*** Default configuration is based on '../../../../../device/config/chips/t113_i/configs/evb1_auto/linux-5.4/config-5.4'
#
# No change to .config
#
make[1]: Leaving directory '/home/ubuntu/tina5sdk-bspout/t113_i/kernel/build'
make: Leaving directory '/home/ubuntu/tina5sdk-bspkernel/linux-5.4'
make: Entering directory '/home/ubuntu/tina5sdk-bspbuildroot/buildroot-201902'
GEN /home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/buildroot/buildroot/Makefile
Config.in.legacy:1769:warning: choice value used outside its choice group
#
# configuration written to /home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/buildroot/buildroot/.config
#
make: Leaving directory '/home/ubuntu/tina5sdk-bspbuildroot/buildroot-201902'
INFO: buildroot defconfig is sun8iw20p1_t113_defconfig
INFO: clean buildserver
INFO: prepare_buildserver
========ACTION List: build_linuxdev;========
options :
INFO: ----------------------------------------
INFO: build linuxdev ...
INFO: chip: sun8iw20p1
INFO: platform: linux
INFO: kernel: linux-5.4
INFO: board: evb1_auto
INFO: output: /home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/buildroot
INFO: ----------------------------------------
INFO: don't build dtbo ...
INFO: build arisc
find: '/home/ubuntu/tina5sdk-bspbrandy/brandy-2.0/spl': No such file or directory
find: '/home/ubuntu/tina5sdk-bspbrandy/dramlib': No such file or directory
INFO: build_bootloader: brandy_path=/home/ubuntu/tina5sdk-bspbrandy/brandy-2.0
INFO: skip build brandy.
INFO: build kernel ...
INFO: prepare_buildserver
INFO: Prepare toolchain ...
Makefile:681: arch//Makefile: No such file or directory
make: *** No rule to make target 'arch//Makefile'. Stop.
ERROR: build Failed
INFO: build kernel failed
ubuntu@ubuntu1804:~/tina5sdk-bsp$
 

加上 -d 参数,强行编译,就不会出现报错了。

ubuntu@ubuntu1804:~/tina5sdk-bsp$ ./build.sh -d
========ACTION List: build_linuxdev;========
options :
INFO: ----------------------------------------
INFO: build linuxdev ...
INFO: chip: sun8iw20p1
INFO: platform: linux
INFO: kernel: linux-5.4
INFO: board: evb1_auto
INFO: output: /home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/buildroot
INFO: ----------------------------------------
INFO: don't build dtbo ...
INFO: build arisc
find: '/home/ubuntu/tina5sdk-bspbrandy/brandy-2.0/spl': No such file or directory
find: '/home/ubuntu/tina5sdk-bspbrandy/dramlib': No such file or directory
INFO: build_bootloader: brandy_path=/home/ubuntu/tina5sdk-bspbrandy/brandy-2.0
INFO: skip build brandy.
INFO: build kernel ...
INFO: prepare_buildserver
INFO: Prepare toolchain ...
Building kernel
make[1]: Entering directory '/home/ubuntu/tina5sdk-bspout/t113_i/kernel/build'
GEN Makefile
DTC arch/arm/boot/dts/board.dtb
CALL /home/ubuntu/tina5sdk-bspkernel/linux-5.4/scripts/atomic/check-atomics.sh
CALL /home/ubuntu/tina5sdk-bspkernel/linux-5.4/scripts/checksyscalls.sh
CHK include/generated/compile.h
Kernel: arch/arm/boot/Image is ready
Building modules, stage 2.
MODPOST 6 modules
Kernel: arch/arm/boot/zImage is ready
Kernel: arch/arm/boot/uImage is ready
...

Exportable Squashfs 4.0 filesystem, xz compressed, data block size 131072
compressed data, compressed metadata, compressed fragments, no xattrs
duplicates are removed
Filesystem size 56902.63 Kbytes (55.57 Mbytes)
38.88% of uncompressed filesystem size (146336.84 Kbytes)
Inode table size 54158 bytes (52.89 Kbytes)
23.54% of uncompressed inode table size (230025 bytes)
Directory table size 70804 bytes (69.14 Kbytes)
48.95% of uncompressed directory table size (144657 bytes)
Number of duplicate files found 37
Number of inodes 6686
Number of files 5571
Number of fragments 397
Number of symbolic links 813
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 302
Number of ids (unique uids + gids) 1
Number of uids 1
root (0)
Number of gids 1
root (0)
INFO: pack rootfs ok ...
INFO: ----------------------------------------
INFO: build Tina OK.
INFO: ----------------------------------------
ubuntu@ubuntu1804:~/tina5sdk-bsp$
 

等待一段时间,编译成功后,执行 ./build.sh pack 进行打包。

ubuntu@ubuntu1804:~/tina5sdk-bsp$ ./build.sh pack
========ACTION List: mk_pack ;========
options :
INFO: packing firmware ...
INFO: /home/ubuntu/tina5sdk-bspout/t113_i/common/keys
copying tools file
copying configs file
copying product configs file
linux copying boardt&linux_kernel_version configs file
ls: cannot access '/home/ubuntu/tina5sdk-bspdevice/config/chips/t113_i/configs/evb1_auto/linux-5.4/env*': No such file or directory
Use u-boot env file:
Warning: u-boot env file '' not exist! use file in default directory other than 'evb1_auto' directory
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/aultls32.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/aultools.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/boot_package.cfg
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/boot_package.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/boot_package_nor.cfg
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/cardscript.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/cardscript_secure.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/cardtool.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/diskfs.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/dragon_toc.cfg
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/env-recovery.cfg
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/env.cfg
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/env_ab.cfg
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/env_burn.cfg
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/env_dragon.cfg
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/env_nor.cfg
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/esm.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/image.cfg
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/image_crashdump.cfg
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/image_linux.cfg
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/image_nor.cfg
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/parameter.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/split_xxxx.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/sunxi.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/sw-subimgs-ab-rdiff.cfg
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/sw-subimgs-ab.cfg
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/sw-subimgs-recovery.cfg
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/sys_config.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/sys_partition-recovery.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/sys_partition.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/sys_partition_ab.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/sys_partition_dump.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/sys_partition_nor.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/sys_partition_private.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/sysrecovery.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/toc0.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/toc0_ft.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/toc0_nand.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/toc0_sdcard.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/toc0_ufs.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/toc1.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/usbtool.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/usbtool_crash.fex
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/usbtool_test.fex
copying boot resource
copying boot file
'/home/ubuntu/tina5sdk-bspdevice/config/chips/t113_i/bin/boot0_nand_sun8iw20p1.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/boot0_nand.fex'
'/home/ubuntu/tina5sdk-bspdevice/config/chips/t113_i/bin/boot0_sdcard_sun8iw20p1.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/boot0_sdcard.fex'
'/home/ubuntu/tina5sdk-bspdevice/config/chips/t113_i/bin/boot0_spinor_sun8iw20p1.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/boot0_spinor.fex'
'/home/ubuntu/tina5sdk-bspdevice/config/chips/t113_i/bin/fes1_sun8iw20p1.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/fes1.fex'
'/home/ubuntu/tina5sdk-bspdevice/config/chips/t113_i/bin/u-boot-sun8iw20p1.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/u-boot.fex'
'/home/ubuntu/tina5sdk-bspdevice/config/chips/t113_i/bin/optee_sun8iw20p1.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/optee.fex'
'/home/ubuntu/tina5sdk-bspdevice/config/chips/t113_i//bin/boot0_nand_sun8iw20p1.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/boot0_nand.fex'
'/home/ubuntu/tina5sdk-bspdevice/config/chips/t113_i//bin/boot0_sdcard_sun8iw20p1.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/boot0_sdcard.fex'
'/home/ubuntu/tina5sdk-bspdevice/config/chips/t113_i//bin/boot0_spinor_sun8iw20p1.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/boot0_spinor.fex'
'/home/ubuntu/tina5sdk-bspdevice/config/chips/t113_i//bin/fes1_sun8iw20p1.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/fes1.fex'
'/home/ubuntu/tina5sdk-bspdevice/config/chips/t113_i//bin/u-boot-sun8iw20p1.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/u-boot.fex'
'/home/ubuntu/tina5sdk-bspdevice/config/chips/t113_i//bin/optee_sun8iw20p1.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/optee.fex'
'/home/ubuntu/tina5sdk-bspdevice/config/chips/t113_i/configs/evb1_auto/bin/amp_rv0.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/amp_rv0.fex'
'/home/ubuntu/tina5sdk-bspdevice/config/chips/t113_i/configs/evb1_auto//bin/amp_rv0.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/amp_rv0.fex'
copying boot file 2.0
'/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/buildroot/arisc' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/arisc.fex'
'/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/buildroot/sunxi.dtb' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/sunxi.fex'
'/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/buildroot/boot0_nand_sun8iw20p1.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/boot0_nand.fex'
'/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/buildroot/boot0_sdcard_sun8iw20p1.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/boot0_sdcard.fex'
'/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/buildroot/boot0_spinor_sun8iw20p1.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/boot0_spinor.fex'
'/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/buildroot/fes1_sun8iw20p1.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/fes1.fex'
'/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/buildroot/sboot_sun8iw20p1.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/sboot.bin'
'/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/buildroot/u-boot-sun8iw20p1.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/u-boot.fex'
'/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/buildroot/vmlinux.tar.bz2' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/vmlinux.fex'
copying arm secure boot file
copying additional files
handle partition_size
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/.uboot.dtb.dts.tmp: Warning (spi_bus_reg): /soc@29000000/spi@4025000/spi_board0: SPI bus unit address format error, expected "0"
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/.uboot.dtb.dts.tmp:661.15-670.6: Warning (spi_bus_reg): /soc@29000000/spi@4025000/spi_board0: SPI bus unit address format error, expected "0"
'/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/temp_ubootnodtb.bin' -> '/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/u-boot.fex'
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/.uboot.dts: Warning (spi_bus_reg): /soc@29000000/spi@4025000/spi_board0: SPI bus unit address format error, expected "0"
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/buildroot/.sunxi.dts: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
update optee
do not set LINUX_DTBO_FILE
pack boot package
content_count=3
2:LICHEE_REDUNDANT_ENV_SIZE:0x20000
--mkenvimage create redundant env data!--
--redundant env data size 0x20000---
verity not supported yet
packing for linux
normal
commit : f7388902e9-dirty
mbr count = 4

partitation file Path=/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/sys_partition.bin
mbr_name file Path=/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/sunxi_mbr.fex
download_name file Path=/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/dlinfo.fex

mbr size = 16384
mbr magic softw411
disk name=boot-resource
disk name=env
disk name=env-redund
disk name=boot
disk name=rootfs
disk name=riscv
disk name=private
disk name=UDISK
this is not a partition key
update_for_part_info 0
crc 0 = fd3908da
crc 1 = 68845987
crc 2 = d32ac21
crc 3 = 988ffd7c
MBR addr = 0x8000,logic_offset = 0xa000 GPT:boot-resource: 12000 1a685
MBR addr = 0x10686,logic_offset = 0xa000 GPT:env : 1a686 1ae85
MBR addr = 0x10e86,logic_offset = 0xa000 GPT:env-redund : 1ae86 1b685
MBR addr = 0x11686,logic_offset = 0xa000 GPT:boot : 1b686 24005
MBR addr = 0x1a006,logic_offset = 0xa000 GPT:rootfs : 24006 224005
MBR addr = 0x21a006,logic_offset = 0xa000 GPT:riscv : 224006 224805
MBR addr = 0x21a806,logic_offset = 0xa000 GPT:private : 224806 22c805
MBR addr = 0x222806,logic_offset = 0xa000 GPT:UDISK : 22c806 ffffffde
gpt_head->header_crc32 = 0xc0b73d8e
GPT----part num 8---
gpt_entry: 128
gpt_header: 92
GPT:boot-resource: 12000 1a685
GPT:env : 1a686 1ae85
GPT:env-redund : 1ae86 1b685
GPT:boot : 1b686 24005
GPT:rootfs : 24006 224005
GPT:riscv : 224006 224805
GPT:private : 224806 22c805
GPT:UDISK : 22c806 ffffffde
update gpt file ok
update mbr file ok
commit : f7388902e9-dirty
temp = 40960
mbr count = 4 total_sectors = 15269888 logic_offset = 40960 media = 0

partitation file Path=/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/sys_partition.bin
mbr_name file Path=/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/sunxi_mbr.fex
download_name file Path=/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out/dlinfo.fex

mbr size = 16384
mbr magic softw411
disk name=boot-resource
disk name=env
disk name=env-redund
disk name=boot
disk name=rootfs
disk name=riscv
disk name=private
disk name=UDISK
this is not a partition key
update_for_part_info 0
crc 0 = fd3908da
crc 1 = 68845987
crc 2 = d32ac21
crc 3 = 988ffd7c
MBR addr = 0x8000,logic_offset = 0xa000 GPT:boot-resource: 12000 1a685
MBR addr = 0x10686,logic_offset = 0xa000 GPT:env : 1a686 1ae85
MBR addr = 0x10e86,logic_offset = 0xa000 GPT:env-redund : 1ae86 1b685
MBR addr = 0x11686,logic_offset = 0xa000 GPT:boot : 1b686 24005
MBR addr = 0x1a006,logic_offset = 0xa000 GPT:rootfs : 24006 224005
MBR addr = 0x21a006,logic_offset = 0xa000 GPT:riscv : 224006 224805
MBR addr = 0x21a806,logic_offset = 0xa000 GPT:private : 224806 22c805
MBR addr = 0x222806,logic_offset = 0xa000 GPT:UDISK : 22c806 e8ffde
gpt_head->header_crc32 = 0x5ab3941c
GPT----part num 8---
gpt_entry: 128
gpt_header: 92
GPT:boot-resource: 12000 1a685
GPT:env : 1a686 1ae85
GPT:env-redund : 1ae86 1b685
GPT:boot : 1b686 24005
GPT:rootfs : 24006 224005
GPT:riscv : 224006 224805
GPT:private : 224806 22c805
GPT:UDISK : 22c806 e8ffde
update gpt file ok
update mbr file ok
/home/ubuntu/tina5sdk-bsptools/pack/pctools/linux/eDragonEx/
/home/ubuntu/tina5sdk-bspout/t113_i/evb1_auto/pack_out
Begin Parse sys_partion.fex
Add partion boot-resource.fex BOOT-RESOURCE_FEX
Add partion very boot-resource.fex BOOT-RESOURCE_FEX
FilePath: boot-resource.fex
FileLength=dad400Add partion env.fex ENV_FEX000000000
Add partion very env.fex ENV_FEX000000000
FilePath: env.fex
FileLength=20000Add partion env.fex ENV_FEX000000000
Add partion very env.fex ENV_FEX000000000
FilePath: env.fex
FileLength=20000Add partion boot.fex BOOT_FEX00000000
Add partion very boot.fex BOOT_FEX00000000
FilePath: boot.fex
FileLength=912800Add partion rootfs.fex ROOTFS_FEX000000
Add partion very rootfs.fex ROOTFS_FEX000000
FilePath: rootfs.fex
FileLength=b20d850Add partion amp_rv0.fex AMP_RV0_FEX00000
Add partion very amp_rv0.fex AMP_RV0_FEX00000
FilePath: amp_rv0.fex
FileLength=29eb8BuildImg 0
Dragon execute image.cfg SUCCESS !
----------image is at----------

264M /home/ubuntu/tina5sdk-bspout/t113_i_linux_evb1_auto_uart0.img

pack finish
ubuntu@ubuntu1804:~/tina5sdk-bsp$
 

打包成功后,镜像文件保存在 tina5sdk-bspout/t113_i/evb1_auto/buildroot/t113_i_linux_evb1_auto_uart0.img

ubuntu@ubuntu1804:~/tina5sdk-bspout/t113_i/evb1_auto/buildroot$ ls -la
total 825068
drwxrwxr-x 4 ubuntu ubuntu 4096 7月 16 18:10 .
drwxrwxr-x 4 ubuntu ubuntu 4096 7月 16 18:10 ..
-rw-rw-r-- 1 ubuntu ubuntu 6 7月 16 18:07 arisc
-rwxrwxr-x 1 ubuntu ubuntu 12985488 7月 16 18:07 bImage
-rw-rw-r-- 1 ubuntu ubuntu 66 7月 16 18:07 .board.dtb.d.dtc.tmp
-rw-rw-r-- 1 ubuntu ubuntu 79218 7月 16 18:07 .board.dtb.dts.tmp
-rw-rw-r-- 1 ubuntu ubuntu 40960 7月 16 16:31 boot0_mmc_car_fastboot_sun8iw20p1.bin
-rw-rw-r-- 1 ubuntu ubuntu 45056 7月 16 16:31 boot0_mmcfastboot_sun8iw20p1.bin
-rw-rw-r-- 1 ubuntu ubuntu 49152 7月 16 16:31 boot0_nand_car_fastboot_sun8iw20p1.bin
-rw-rw-r-- 1 ubuntu ubuntu 53248 7月 16 16:31 boot0_nandfastboot_sun8iw20p1.bin
-rw-rw-r-- 1 ubuntu ubuntu 49152 7月 16 16:31 boot0_nand_sun8iw20p1.bin
-rw-rw-r-- 1 ubuntu ubuntu 40960 7月 16 16:31 boot0_sdcard_sun8iw20p1.bin
-rw-rw-r-- 1 ubuntu ubuntu 32768 7月 16 16:31 boot0_spinor_sun8iw20p1.bin
-rw-rw-r-- 1 ubuntu ubuntu 9512960 7月 16 18:07 boot.img
-rw-rw-r-- 1 ubuntu ubuntu 4924 7月 16 18:07 .buildconfig
drwxrwxr-x 7 ubuntu ubuntu 4096 7月 16 18:07 buildroot
-rw-rw-r-- 1 ubuntu ubuntu 127053 7月 16 18:07 .config
lrwxrwxrwx 1 ubuntu ubuntu 18 7月 16 18:07 dist -> lib/modules/5.4.61
-rwxrwxr-x 1 ubuntu ubuntu 168392 7月 16 18:07 dtc
-rw-rw-r-- 1 ubuntu ubuntu 21152 7月 16 16:31 fes1_sun8iw20p1.bin
drwxrwxr-x 3 ubuntu ubuntu 4096 7月 16 18:07 lib
-rw-rw-r-- 1 ubuntu ubuntu 4000287 7月 16 18:07 rootfs.cpio.gz
-rw-r--r-- 1 ubuntu ubuntu 186701904 7月 16 18:07 rootfs.ext4
-rw-r--r-- 1 ubuntu ubuntu 58269696 7月 16 18:08 rootfs.squashfs
-rw-rw-r-- 1 ubuntu ubuntu 86446080 7月 16 18:08 rootfs.ubifs
-rw-rw-r-- 1 ubuntu ubuntu 86016 7月 16 16:31 sboot_sun8iw20p1.bin
-rw-rw-r-- 1 ubuntu ubuntu 57824 7月 16 18:07 sunxi.dtb
-rw-rw-r-- 1 ubuntu ubuntu 67864 7月 16 18:10 .sunxi.dts
-rw-rw-r-- 1 ubuntu ubuntu 2351698 7月 16 18:07 System.map
-rwxrwxr-x 2 ubuntu ubuntu 276633600 7月 16 18:10 t113_i_linux_evb1_auto_uart0.img
-rw-rw-r-- 1 ubuntu ubuntu 981756 7月 16 16:31 u-boot-sun8iw20p1.bin
-rw-rw-r-- 1 ubuntu ubuntu 5162016 7月 16 18:07 uImage
-rwxrwxr-x 1 ubuntu ubuntu 136244496 7月 16 18:07 vmlinux
-rw-rw-r-- 1 ubuntu ubuntu 62033866 7月 16 18:07 vmlinux.tar.bz2
-rwxrwxr-x 1 ubuntu ubuntu 5161952 7月 16 18:07 zImage
ubuntu@ubuntu1804:~/tina5sdk-bspout/t113_i/evb1_auto/buildroot$
 

3.烧录固件

拉取打包好的镜像到PC端,打开全志线刷工具 AllwinnertechPhoeniSuit,找到PhoenixSuit.exe ,双击运行。

image-20240716182751548

image-20240716182823353

点击一键刷机。

image-20240716182925324

点击浏览,找到拉取下来的镜像,选择全盘擦除。

image-20240716183057447

选择好之后,不需要其他的界面操作了。这时拿起已经连接好的开发板,先按住 FEL 烧写模式按键,之后按一下 RESET 系统复位键,再松开 **FEL **,就可以自动进入烧写模式并开始烧写。

image-20240716183440834

等待烧录完成,串口打印信息如下:

[27]HELLO! BOOT0 is starting!
[30]BOOT0 commit : 069ed30b88
[33]set pll start
[38]periph0 has been enabled
[41]set pll end
[43][pmu]: bus read error
[45]board init ok
[47]enable_jtag
[49]get_pmu_exist() = -1
[51]DRAM BOOT DRIVE INFO: V0.34
[54]DRAM CLK = 792 MHz
[56]DRAM Type = 3 (2:DDR2,3:DDR3)
[60]DRAMC ZQ value: 0x7b7bfb
[62]DRAM ODT value: 0x42.
[65]ddr_efuse_type: 0x0
[68]DRAM SIZE = 512 MB
[75]DRAM simple test OK.
[77]rtc standby flag is 0x0, super standby flag is 0x0
[82]dram size =512
[85]card no is 2
[86]sdcard 2 line count 4
[89][mmc]: mmc driver ver 2021-05-21 14:47
[98][mmc]: Wrong media type 0x0, but host sdc2, try mmc first
[104][mmc]: ***Try MMC card 2***
[111][mmc]: mmc 2 cmd 1 timeout, err 100
[115][mmc]: mmc 2 cmd 1 err 100
[117][mmc]: mmc 2 send op cond failed
[121][mmc]: MMC card 2 Card did not respond to voltage select!
[127][mmc]: ***SD/MMC 2 init error!!!***
[134][mmc]: ***Try SD card 2***
[147][mmc]: HSSDR52/SDR25 4 bit
[150][mmc]: 50000000 Hz
[152][mmc]: 3696 MB
[154][mmc]: ***SD/MMC 2 init OK!!!***
[249]Loading boot-pkg Succeed(index=0).
[253]Entry_name = u-boot
[260]Entry_name = optee
[264]Entry_name = dtb
[267]mmc not para
[269]Jump to second Boot.
M/TC: OP-TEE version: 2a99a16f (gcc version 5.3.1 20160412 (Linaro GCC 5.3-2016.05)) #1 Thu Aug 17 11:13:02 UTC 2023 arm
E/TC:0 0 platform_standby_fdt_parse:126 no pmu0 node
E/TC:0 0 sunxi_twi_parse_from_dt:121 no pmu node


U-Boot 2018.07-g6047f84-dirty (Jul 16 2024 - 16:30:57 +0800) Allwinner Technology

[00.340]CPU: Allwinner Family
[00.342]Model: sun8iw20
[00.345]DRAM: 512 MiB
[00.348]Relocation Offset is: 1cebd000
[00.376]secure enable bit: 0
E/TC:0 fdt_getprop_u32:336 prop trace_level not found
[00.389]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz
[00.396]gic: sec monitor mode
SPI ALL: ready
[00.401]line:703 init_clocks
[00.404]flash init start
[00.406]workmode = 0,storage type = 2
[00.409][mmc]: mmc driver ver uboot2018:2023-07-4 16:18:00
[00.415][mmc]: get sdly from uboot header fail
[00.420][mmc]: Is not EXT_PARA0_ID or EXT_PARA0_TUNING_SUCCESS_FLAG!
[00.426][mmc]: SUNXI SDMMC Controller Version:0x50310
[00.447][mmc]: card_caps:0x3000000a
[00.450][mmc]: host_caps:0x3000003f
[00.457][mmc]: read mmc 2 info ok
[00.460]sunxi flash init ok
[00.462]drv_disp_init
partno erro : can't find partition bootloader
[00.509]drv_disp_init finish
[00.520]Loading Environment from SUNXI_FLASH... OK
[00.539]boot_gui_init:start
partno erro : can't find partition Reserve0
[00.548]LCD open finish
bad fb1_cfg[w=0,h=0,bpp=32,format=0]
[00.555]boot_gui_init:finish
partno erro : can't find partition bootloader
[00.564]bmp_name=bootlogo.bmp size 1152054
[00.626]Item0 (Map) magic is bad
[00.629]the secure storage item0 copy0 magic is bad
[00.634]Item0 (Map) magic is bad
[00.637]the secure storage item0 copy1 magic is bad
[00.641]Item0 (Map) magic is bad
secure storage read widevine fail
secure storage read ec_key fail
secure storage read ec_cert1 fail
secure storage read ec_cert2 fail
secure storage read ec_cert3 fail
secure storage read rsa_key fail
secure storage read rsa_cert1 fail
secure storage read rsa_cert2 fail
secure storage read rsa_cert3 fail
[00.672]usb burn from boot
delay time 0
weak:otg_phy_config
[00.683]usb prepare ok
[00.873]usb sof ok
[00.874]usb probe ok
[00.876]usb setup ok
set address 0x20
set address 0x20 ok
set address 0x27
set address 0x27 ok
try to update
[01.281]do_burn_from_boot usb : have no handshake
List file under ULI/factory
** Unrecognized filesystem type **
[01.292]update part info
[01.295]update bootcmd
[01.301]change working_fdt 0x5c87ce68 to 0x5c85ce68
[01.306][mmc]: can't find node "sunxi-mmc2" try "mmc"
[01.311][mmc]: no mmc-hs400-1_8v!
[01.314][mmc]: no mmc-hs200-1_8v!
[01.317][mmc]: no mmc-ddr-1_8v!
[01.320][mmc]: get sunxi-mmc2 string failed
[01.325]The storage not support sample function
[01.349]update dts
Hit any key to stop autoboot: 0
[01.758]no vendor_boot partition is found
Android's image name: sun8i_arm
The loading address of the kernel is not in the boot image
ERROR: reserving fdt memory region failed (addr=41b00000 size=100000)
ERROR: reserving fdt memory region failed (addr=5c907000 size=3e8000)
[01.806]Starting kernel ...

[01.809][mmc]: mmc exit start
[01.822][mmc]: mmc 2 exit ok
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.4.61 (ubuntu@ubuntu1804) (arm-linux-gnueabi-gcc (Linaro GCC 5.3-2016.05) 5.3.1 20160412, GNU ld (Linaro_Binutils-2016.05) 2.25.0 Linaro 2016_02) #1 SMP PREEMPT Tue Jul 16 16:31:37 CST 2024
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: sun8iw20
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] Reserved memory: created DMA memory pool at 0x42200000, size 0 MiB
[ 0.000000] OF: reserved mem: initialized node vdev0buffer@42200000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x42244000, size 0 MiB
[ 0.000000] OF: reserved mem: initialized node dsp0_rpbuf@42244000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x42900000, size 0 MiB
[ 0.000000] OF: reserved mem: initialized node vdev0buffer@42900000, compatible id shared-dma-pool
[ 0.000000] cma: Reserved 16 MiB at 0x5f000000
[ 0.000000] On node 0 totalpages: 129120
[ 0.000000] Normal zone: 1024 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 129120 pages, LIFO batch:31
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.0 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] psci: SMC Calling Convention v1.0
[ 0.000000] percpu: Embedded 15 pages/cpu s30976 r8192 d22272 u61440
[ 0.000000] pcpu-alloc: s30976 r8192 d22272 u61440 alloc=15*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 128096
[ 0.000000] Kernel command line: earlycon=uart8250,mmio32,0x02500000 clk_ignore_unused initcall_debug=0 console=ttyS0,115200 loglevel=8 root=/dev/mmcblk0p5 rootwait init=/init partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:env-redund@mmcblk0p3:boot@mmcblk0p4:rootfs@mmcblk0p5:riscv@mmcblk0p6:private@mmcblk0p7:UDISK@mmcblk0p8 cma=16M snum= mac_addr= wifi_mac= bt_mac= specialstr= gpt=1 androidboot.mode=normal androidboot.hardware=sun8iw20p1 boot_type=2 androidboot.boot_type=2 gpt=1 uboot_message=2018.07-g6047f84-dirty(07/16/2024-16:30:57) mbr_offset=1032192 disp_reserve=4096000,0x5c907000 androidboot.dramfreq=792 androidboot.dramsize=512 mtdparts=<NULL> uboot_backup=ubootA
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 467904K/516480K available (7168K kernel code, 425K rwdata, 2572K rodata, 1024K init, 195K bss, 32192K reserved, 16384K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] random: get_random_bytes called from start_kernel+0x250/0x3d0 with crng_init=0
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000018] Switching to timer-based delay loop, resolution 41ns
[ 0.000204] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000888] Console: colour dummy device 80x30
[ 0.000928] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000942] pid_max: default: 32768 minimum: 301
[ 0.001099] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.001113] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.001760] CPU: Testing write buffer coherency: ok
[ 0.002111] /cpus/cpu@0 missing clock-frequency property
[ 0.002133] /cpus/cpu@1 missing clock-frequency property
[ 0.002145] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002755] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.002883] rcu: Hierarchical SRCU implementation.
[ 0.003207] BOOTEVENT: 3.198416: ON
[ 0.003409] smp: Bringing up secondary CPUs ...
[ 0.004649] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.004807] smp: Brought up 1 node, 2 CPUs
[ 0.004821] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[ 0.004828] CPU: All CPU(s) started in SVC mode.
[ 0.005356] devtmpfs: initialized
[ 0.019691] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.020311] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.020343] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[ 0.021226] pinctrl core: initialized pinctrl subsystem
[ 0.022699] NET: Registered protocol family 16
[ 0.024867] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.066145] rtc_ccu: sunxi ccu init OK
[ 0.068603] ccu: sunxi ccu init OK
[ 0.069134] r_ccu: sunxi ccu init OK
[ 0.109032] sun6i-dma 3002000.dma-controller: sunxi dma probed
[ 0.113709] iommu: Default domain type: Translated
[ 0.113943] sunxi iommu: irq = 24
[ 0.115106] SCSI subsystem initialized
[ 0.115473] usbcore: registered new interface driver usbfs
[ 0.115568] usbcore: registered new interface driver hub
[ 0.116143] usbcore: registered new device driver usb
[ 0.116341] mc: Linux media interface: v0.10
[ 0.116400] videodev: Linux video capture interface: v2.00
[ 0.117735] Advanced Linux Sound Architecture Driver Initialized.
[ 0.118516] Bluetooth: Core ver 2.22
[ 0.118617] NET: Registered protocol family 31
[ 0.118629] Bluetooth: HCI device and connection manager initialized
[ 0.118649] Bluetooth: HCI socket layer initialized
[ 0.118663] Bluetooth: L2CAP socket layer initialized
[ 0.118695] Bluetooth: SCO socket layer initialized
[ 0.118970] pwm module init!
[ 0.129846] g2d 5410000.g2d: Adding to iommu group 0
[ 0.130640] G2D: rcq version initialized.major:250
[ 0.131431] input: sunxi-keyboard as /devices/virtual/input/input0
[ 0.133145] clocksource: Switched to clocksource arch_sys_counter
[ 0.143019] sun8iw20-pinctrl pio: initialized sunXi PIO driver
[ 0.157993] thermal_sys: Registered thermal governor 'step_wise'
[ 0.158001] thermal_sys: Registered thermal governor 'user_space'
[ 0.158018] thermal_sys: Registered thermal governor 'power_allocator'
[ 0.158586] NET: Registered protocol family 2
[ 0.159467] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[ 0.159500] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 0.159553] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.159615] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.159720] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.159756] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.159930] NET: Registered protocol family 1
[ 0.162695] Initialise system trusted keyrings
[ 0.162936] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[ 0.174068] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.174358] ntfs: driver 2.1.32 [Flags: R/W].
[ 0.174686] fuse: init (API version 7.31)
[ 0.204938] NET: Registered protocol family 38
[ 0.204963] Key type asymmetric registered
[ 0.204972] Asymmetric key parser 'x509' registered
[ 0.205071] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[ 0.205087] io scheduler mq-deadline registered
[ 0.205095] io scheduler kyber registered
[ 0.205242] atomic64_test: passed
[ 0.206836] [DISP]disp_module_init
[ 0.207462] disp 5000000.disp: Adding to iommu group 0
[ 0.208093] [DISP] disp_init,line:2372:
[ 0.208098] smooth display screen:0 type:1 mode:4
[ 0.225066] display_fb_request,fb_id:0
[ 0.236835] disp_al_manager_apply ouput_type:1
[ 0.237011] [DISP] lcd_clk_config,line:777:
[ 0.237023] disp 0, clk: pll(420000000),clk(420000000),dclk(70000000) dsi_rate(70000000)
[ 0.237023] clk real:pll(420000000),clk(420000000),dclk(105000000) dsi_rate(150000000)
[ 0.237330] sun8iw20-pinctrl pio: pio supply vcc-pb not found, using dummy regulator
[ 0.238163] [DISP]disp_module_init finish
[ 0.239563] sunxi_sid_init()783 - insmod ok
[ 0.240322] pwm-regulator: supplied by regulator-dummy
[ 0.242115] uart uart0: uart0 supply uart not found, using dummy regulator
[ 0.242464] uart0: ttyS0 at MMIO 0x2500000 (irq = 34, base_baud = 1500000) is a SUNXI
[ 0.242494] sw_console_setup()1831 - console setup baud 115200 parity n bits 8, flow n
[ 1.164971] printk: console [ttyS0] enabled
[ 1.170468] sun8iw20-pinctrl pio: pio supply vcc-pg not found, using dummy regulator
[ 1.179614] uart uart1: uart1 supply uart not found, using dummy regulator
[ 1.187704] uart1: ttyS1 at MMIO 0x2500400 (irq = 35, base_baud = 1500000) is a SUNXI
[ 1.197333] uart uart2: uart2 supply uart not found, using dummy regulator
[ 1.205441] uart2: ttyS2 at MMIO 0x2500800 (irq = 36, base_baud = 1500000) is a SUNXI
[ 1.215051] uart uart3: uart3 supply uart not found, using dummy regulator
[ 1.223084] uart3: ttyS3 at MMIO 0x2500c00 (irq = 37, base_baud = 1500000) is a SUNXI
[ 1.233080] misc dump reg init
[ 1.237157] deinterlace 5400000.deinterlace: Adding to iommu group 0
[ 1.244909] deinterlace 5400000.deinterlace: version[1.0.0], ip=0x110
[ 1.253914] sunxi-rfkill soc@3000000:rfkill@0: module version: v1.0.9
[ 1.261163] sunxi-rfkill soc@3000000:rfkill@0: get gpio chip_en failed
[ 1.268536] sunxi-rfkill soc@3000000:rfkill@0: get gpio power_en failed
[ 1.275987] sunxi-rfkill soc@3000000:rfkill@0: wlan_busnum (1)
[ 1.282535] sunxi-rfkill soc@3000000:rfkill@0: Missing wlan_power.
[ 1.289499] sunxi-rfkill soc@3000000:rfkill@0: wlan clock[0] (32k-fanout1)
[ 1.297255] sunxi-rfkill soc@3000000:rfkill@0: wlan_regon gpio=44 assert=1
[ 1.305023] sunxi-rfkill soc@3000000:rfkill@0: wlan_hostwake gpio=202 assert=1
[ 1.313159] sunxi-rfkill soc@3000000:rfkill@0: wakeup source is enabled
[ 1.320896] sunxi-rfkill soc@3000000:rfkill@0: Missing bt_power.
[ 1.327683] sunxi-rfkill soc@3000000:rfkill@0: bt clock[0] (32k-fanout1)
[ 1.335243] sunxi-rfkill soc@3000000:rfkill@0: bt_rst gpio=210 assert=0
[ 1.343717] [ADDR_MGT] addr_mgt_probe: module version: v1.0.11
[ 1.350959] [ADDR_MGT] addr_init: Failed to get type_def_bt, use default: 0
[ 1.358848] [ADDR_MGT] addr_mgt_probe: success.
[ 1.365825] libphy: Fixed MDIO Bus: probed
[ 1.370431] CAN device driver interface
[ 1.375603] sun8iw20-pinctrl pio: pio supply vcc-pe not found, using dummy regulator
[ 1.384772] gmac-power0: NULL
[ 1.388104] gmac-power1: NULL
[ 1.391429] gmac-power2: NULL
[ 1.395982] Failed to alloc md5
[ 1.399518] eth0: Use random mac address
[ 1.404424] usbcore: registered new interface driver asix
[ 1.410581] usbcore: registered new interface driver ax88179_178a
[ 1.417528] usbcore: registered new interface driver cdc_ether
[ 1.424158] usbcore: registered new interface driver net1080
[ 1.430568] usbcore: registered new interface driver cdc_subset
[ 1.437292] usbcore: registered new interface driver zaurus
[ 1.443647] usbcore: registered new interface driver cdc_ncm
[ 1.449998] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.457335] sunxi-ehci: EHCI SUNXI driver
[ 1.462284] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.469266] sunxi-ohci: OHCI SUNXI driver
[ 1.474436] usbcore: registered new interface driver uas
[ 1.480485] usbcore: registered new interface driver usb-storage
[ 1.487321] usbcore: registered new interface driver ums-alauda
[ 1.494082] usbcore: registered new interface driver ums-cypress
[ 1.500875] usbcore: registered new interface driver ums-datafab
[ 1.507692] usbcore: registered new interface driver ums_eneub6250
[ 1.514700] usbcore: registered new interface driver ums-freecom
[ 1.521491] usbcore: registered new interface driver ums-isd200
[ 1.528217] usbcore: registered new interface driver ums-jumpshot
[ 1.535136] usbcore: registered new interface driver ums-karma
[ 1.541736] usbcore: registered new interface driver ums-onetouch
[ 1.548665] usbcore: registered new interface driver ums-realtek
[ 1.555477] usbcore: registered new interface driver ums-sddr09
[ 1.562173] usbcore: registered new interface driver ums-sddr55
[ 1.568893] usbcore: registered new interface driver ums-usbat
[ 1.576554] input: sunxi-ts as /devices/platform/soc@3000000/2009c00.rtp/input/input1
[ 1.587610] sunxi-rtc 7090000.rtc: registered as rtc0
[ 1.593463] sunxi-rtc 7090000.rtc: setting system clock to 1970-01-01T00:06:05 UTC (365)
[ 1.602551] sunxi-rtc 7090000.rtc: Fail to read dts property 'gpr_bootcount_pos'
[ 1.610884] reasonbase NULL
[ 1.614028] reason large than max, fix to hot reboot, save boot reason
[ 1.621348] invalid reason or reasonbase NULL
[ 1.626256] sunxi-rtc 7090000.rtc: sunxi rtc probed
[ 1.632285] i2c /dev entries driver
[ 1.636455] IR NEC protocol handler initialized
[ 1.641540] IR RC5(x/sz) protocol handler initialized
[ 1.649745] usbcore: registered new interface driver uvcvideo
[ 1.656239] USB Video Class driver (1.1.1)
[ 1.660833] gspca_main: v2.14.0 registered
[ 1.665446] sunxi cedar version 1.1
[ 1.669590] sunxi-cedar 1c0e000.ve: Adding to iommu group 0
[ 1.675945] VE: sunxi_cedar_probe power-domain init!!!
[ 1.681714] VE: install start!!!
[ 1.681714]
[ 1.687305] VE: cedar-ve the get irq is 45
[ 1.687305]
[ 1.693817] VE: ve_debug_proc_info:(ptrval), data:(ptrval), lock:(ptrval)
[ 1.693817]
[ 1.703090] VE: install end!!!
[ 1.703090]
[ 1.708195] VE: sunxi_cedar_probe
[ 1.713464] sunxi-wdt 20500a0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.722673] Bluetooth: HCI UART driver ver 2.3
[ 1.727702] Bluetooth: HCI UART protocol H4 registered
[ 1.733772] Bluetooth: XRadio Bluetooth LPM Mode Driver Ver 1.0.10
[ 1.741035] [XR_BT_LPM] bluesleep_probe: bt_wake polarity: 1
[ 1.747493] [XR_BT_LPM] bluesleep_probe: host_wake polarity: 1
[ 1.754075] [XR_BT_LPM] bluesleep_probe: wakeup source is disabled!
[ 1.754075]
[ 1.762764] [XR_BT_LPM] bluesleep_probe: uart_index(1)
[ 1.771263] sun8iw20-pinctrl pio: pio supply vcc-pc not found, using dummy regulator
[ 1.780222] sunxi-mmc 4022000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.25 2022-6-21 13:40)
[ 1.790139] sunxi-mmc 4022000.sdmmc: ***ctl-spec-caps*** 8
[ 1.796381] sunxi-mmc 4022000.sdmmc: No vmmc regulator found
[ 1.802731] sunxi-mmc 4022000.sdmmc: No vqmmc regulator found
[ 1.809201] sunxi-mmc 4022000.sdmmc: No vdmmc regulator found
[ 1.815666] sunxi-mmc 4022000.sdmmc: No vd33sw regulator found
[ 1.822209] sunxi-mmc 4022000.sdmmc: No vd18sw regulator found
[ 1.828767] sunxi-mmc 4022000.sdmmc: No vq33sw regulator found
[ 1.835324] sunxi-mmc 4022000.sdmmc: No vq18sw regulator found
[ 1.841887] sunxi-mmc 4022000.sdmmc: Cann't get pin bias hs pinstate,check if needed
[ 1.851555] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1.862783] sunxi-mmc 4022000.sdmmc: no vqmmc,Check if there is regulator
[ 1.882970] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1.907238] sunxi-mmc 4022000.sdmmc: detmode:alway in(non removable)
[ 1.914414] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1.924771] sunxi-mmc 4020000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.25 2022-6-21 13:40)
[ 1.929105] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1.935972] sunxi-mmc 4020000.sdmmc: ***ctl-spec-caps*** 8
[ 1.949742] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1.953586] sunxi-mmc 4020000.sdmmc: No vmmc regulator found
[ 1.968198] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 1.971534] sunxi-mmc 4020000.sdmmc: No vqmmc regulator found
[ 1.989596] sunxi-mmc 4020000.sdmmc: No vdmmc regulator found
[ 1.996063] sunxi-mmc 4020000.sdmmc: No vd33sw regulator found
[ 2.002606] sunxi-mmc 4020000.sdmmc: No vd18sw regulator found
[ 2.009167] sunxi-mmc 4020000.sdmmc: No vq33sw regulator found
[ 2.015727] sunxi-mmc 4020000.sdmmc: No vq18sw regulator found
[ 2.021189] mmc0: host does not support reading read-only switch, assuming write-enable
[ 2.022737] sunxi-mmc 4020000.sdmmc: Got CD GPIO
[ 2.031329] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 25000000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.048518] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 25000000Hz bm PP pm ON vdd 21 width 4 timing LEGACY(SDR12) dt B
[ 2.048859] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.060434] mmc0: new SDHC card at address 1388
[ 2.071681] sunxi-mmc 4020000.sdmmc: no vqmmc,Check if there is regulator
[ 2.077907] mmcblk0: mmc0:1388 MK 3.61 GiB
[ 2.094611] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8
[ 2.096877] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.123191] sunxi-mmc 4020000.sdmmc: detmode:gpio polling
[ 2.129280] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[ 2.133832] sunxi-mmc 4021000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.25 2022-6-21 13:40)
[ 2.150354] sunxi-mmc 4021000.sdmmc: ***ctl-spec-caps*** 8
[ 2.156619] sunxi-mmc 4021000.sdmmc: No vmmc regulator found
[ 2.162970] sunxi-mmc 4021000.sdmmc: No vqmmc regulator found
[ 2.169437] sunxi-mmc 4021000.sdmmc: No vdmmc regulator found
[ 2.175898] sunxi-mmc 4021000.sdmmc: No vd33sw regulator found
[ 2.182441] sunxi-mmc 4021000.sdmmc: No vd18sw regulator found
[ 2.188998] sunxi-mmc 4021000.sdmmc: No vq33sw regulator found
[ 2.195554] sunxi-mmc 4021000.sdmmc: No vq18sw regulator found
[ 2.202117] sunxi-mmc 4021000.sdmmc: Cann't get pin bias hs pinstate,check if needed
[ 2.211710] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.222898] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator
[ 2.243062] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.267312] sunxi-mmc 4021000.sdmmc: detmode:manually by software
[ 2.275008] sunxi-mmc 4021000.sdmmc: smc 2 p1 err, cmd 52, RTO !!
[ 2.282184] usbcore: registered new interface driver usbhid
[ 2.288470] sunxi-mmc 4021000.sdmmc: smc 2 p1 err, cmd 52, RTO !!
[ 2.295369] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.303168] usbhid: USB HID core driver
[ 2.310044] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.311290] exFAT: Version 1.3.0
[ 2.325044] sunxi-mmc 4021000.sdmmc: smc 2 p1 err, cmd 5, RTO !!
[ 2.327100] sunxi-msgbox 3003000.msgbox: sunxi_msgbox_probe(): sunxi msgbox start probe
[ 2.334267] sunxi-mmc 4021000.sdmmc: smc 2 p1 err, cmd 5, RTO !!
[ 2.342636] sunxi-msgbox 3003000.msgbox: sunxi_msgbox_probe(): sunxi msgbox probe success
[ 2.349892] sunxi-mmc 4021000.sdmmc: smc 2 p1 err, cmd 5, RTO !!
[ 2.358877] sunxi-rproc 3000008.dsp_rproc: sunxi rproc driver 2.2.1
[ 2.366017] sunxi-mmc 4021000.sdmmc: smc 2 p1 err, cmd 5, RTO !!
[ 2.372035] sunxi-rproc 3000008.dsp_rproc: failed to get firmware-name
[ 2.378809] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[ 2.386648] remoteproc remoteproc0: dsp_rproc is available
[ 2.403551] sunxi-rproc 3000008.dsp_rproc: sunxi rproc driver probe ok
[ 2.411065] sunxi-rproc 6010000.c906_rproc: sunxi rproc driver 2.2.1
[ 2.418676] remoteproc remoteproc1: c906_rproc is available
[ 2.425112] sunxi-rproc 6010000.c906_rproc: sunxi rproc driver probe ok
[ 2.433658] sunxi-rpbuf-controller rpbuf_controller@0: assigned reserved memory node dsp0_rpbuf@42244000
[ 2.449273] NET: Registered protocol family 10
[ 2.455565] Segment Routing with IPv6
[ 2.459756] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 2.468062] NET: Registered protocol family 17
[ 2.473077] NET: Registered protocol family 15
[ 2.478102] can: controller area network core (rev 20170425 abi 9)
[ 2.485148] NET: Registered protocol family 29
[ 2.490138] can: raw protocol (rev 20170425)
[ 2.494944] can: broadcast manager protocol (rev 20170425 t)
[ 2.501298] can: netlink gateway (rev 20190810) max_hops=1
[ 2.507811] Bluetooth: RFCOMM TTY layer initialized
[ 2.513335] Bluetooth: RFCOMM socket layer initialized
[ 2.519123] Bluetooth: RFCOMM ver 1.11
[ 2.524211] Registering SWP/SWPB emulation handler
[ 2.529978] Loading compiled-in X.509 certificates
[ 2.554633] sunxi-twi 2502800.twi: 2502800.twi supply twi not found, using dummy regulator
[ 2.565135] sunxi:i2c_sunxi@2502800.twi[INFO]: v2.6.5 probe success
[ 2.573933] sunxi-thermal 2009400.ths: sun8iw20 cp version:15
[ 2.581340] sun8iw20-pinctrl pio: pio supply vcc-pd not found, using dummy regulator
[ 2.624206] get drvvbus-en is fail, 22
[ 2.628414] get ehci0-controller wakeup-source is fail.
[ 2.634445] sunxi ehci0-controller don't init wakeup source
[ 2.640696] [sunxi-ehci0]: probe, pdev->name: 4101000.ehci0-controller, sunxi_ehci: 0xc0c911a0, 0x:e08e1000, irq_no:3a
[ 2.652702] [sunxi-ehci0]: Not init ehci0
[ 2.657613] get drvvbus-en is fail, 22
[ 2.661819] get ohci0-controller wakeup-source is fail.
[ 2.667793] sunxi ohci0-controller don't init wakeup source
[ 2.674059] [sunxi-ohci0]: probe, pdev->name: 4101400.ohci0-controller, sunxi_ohci: 0xc0c91450
[ 2.683720] [sunxi-ohci0]: Not init ohci0
[ 2.688615] get drvvbus-en is fail, 22
[ 2.692820] get ehci1-controller wakeup-source is fail.
[ 2.698792] sunxi ehci1-controller don't init wakeup source
[ 2.705057] [sunxi-ehci1]: probe, pdev->name: 4200000.ehci1-controller, sunxi_ehci: 0xc0c91700, 0x:e08f5000, irq_no:3c
[ 2.717318] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply hci not found, using dummy regulator
[ 2.730776] sunxi-ehci 4200000.ehci1-controller: EHCI Host Controller
[ 2.738056] sunxi-ehci 4200000.ehci1-controller: new USB bus registered, assigned bus number 1
[ 2.748037] sunxi-ehci 4200000.ehci1-controller: irq 60, io mem 0x04200000
[ 2.783164] sunxi-ehci 4200000.ehci1-controller: USB 2.0 started, EHCI 1.00
[ 2.790975] sunxi-ehci 4200000.ehci1-controller: ehci_irq: highspeed device connect
[ 2.800467] hub 1-0:1.0: USB hub found
[ 2.804737] hub 1-0:1.0: 1 port detected
[ 2.810002] get drvvbus-en is fail, 22
[ 2.814243] get ohci1-controller wakeup-source is fail.
[ 2.820236] sunxi ohci1-controller don't init wakeup source
[ 2.826503] [sunxi-ohci1]: probe, pdev->name: 4200400.ohci1-controller, sunxi_ohci: 0xc0c919b0
[ 2.836416] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply hci not found, using dummy regulator
[ 2.848750] sunxi-ohci 4200400.ohci1-controller: OHCI Host Controller
[ 2.856034] sunxi-ohci 4200400.ohci1-controller: new USB bus registered, assigned bus number 2
[ 2.865947] sunxi-ohci 4200400.ohci1-controller: irq 61, io mem 0x04200400
[ 2.948017] hub 2-0:1.0: USB hub found
[ 2.952265] hub 2-0:1.0: 1 port detected
[ 2.958190] otg manager soc@3000000:usbc0@0: soc@3000000:usbc0@0 supply usbc not found, using dummy regulator
[ 2.972234] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 2.983438] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 2.990786] clk: Not disabling unused clocks
[ 2.995721] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 3.003180] ALSA device list:
[ 3.005536] cfg80211: failed to load regulatory.db
[ 3.008694] No soundcards found.
[ 3.017919] alloc_fd: slot 0 not NULL!
[ 3.026778] EXT4-fs (mmcblk0p5): INFO: recovery required on readonly filesystem
[ 3.035062] EXT4-fs (mmcblk0p5): write access will be enabled during recovery
[ 3.144876] EXT4-fs (mmcblk0p5): recovery complete
[ 3.152655] EXT4-fs (mmcblk0p5): mounted filesystem with ordered data mode. Opts: (null)
[ 3.161856] VFS: Mounted root (ext4 filesystem) readonly on device 179:5.
[ 3.169652] devtmpfs: mounted
[ 3.173193] usb 1-1: new high-speed USB device number 2 using sunxi-ehci
[ 3.174658] Freeing unused kernel memory: 1024K
[ 3.203304] Kernel init done
[ 3.206532] Run /init as init process
[ 3.273168] [DISP] fb_free_reserve_mem,line:2316:
[ 3.273174] [DISP] fb_free_reserve_mem wait for sync timeout
[ 3.287007] Freeing logo buffer memory: 4000K
[ 3.374687] hub 1-1:1.0: USB hub found
[ 3.379072] hub 1-1:1.0: 4 ports detected
can't run '/etc/preinit': No such file or directory
[ 3.447981] EXT4-fs (mmcblk0p5): re-mounted. Opts: (null)
Starting syslogd: OK
Starting klogd: OK
Populating /dev using udev: [ 3.743916] udevd[1162]: starting version 3.2.7
[ 3.771610] random: udevd: uninitialized urandom read (16 bytes read)
[ 3.781043] random: udevd: uninitialized urandom read (16 bytes read)
[ 3.788442] random: udevd: uninitialized urandom read (16 bytes read)
[ 3.805652] udevd[1162]: specified group 'input' unknown
[ 3.812380] udevd[1162]: specified group 'kvm' unknown
[ 3.849785] udevd[1163]: starting eudev-3.2.7
[ 4.429043] random: fast init done
done
Initializing random number generator... done.
Starting system message bus: [ 4.836615] urandom_read: 3 callbacks suppressed
[ 4.836626] random: dbus-uuidgen: uninitialized urandom read (12 bytes read)
[ 4.849986] random: dbus-uuidgen: uninitialized urandom read (8 bytes read)
[ 4.900173] random: dbus-daemon: uninitialized urandom read (12 bytes read)
done
Starting network: OK
usb0 current mode: null
Starting switch usb0 to device mode.
[ 6.153157]
[ 6.153157] insmod_device_driver
[ 6.153157]
[ 6.160368] sunxi_usb_udc 4100000.udc-controller: 4100000.udc-controller supply udc not found, using dummy regulator
device_chose finished!
Starting adb: [ 6.231496] file system registered
OK
init adb main
[ 6.284384] read descriptors
Handling main()
[ 6.288091] read strings
Initializing postgresql data base...
su: unknown user postgres
done
Starting postgresql: su: unknown user postgres
OK
/etc/init.d/S50powerkey_display: line 12: powerkey_display: command not found
/etc/init.d/S50powerkey_suspend: line 12: powerkey_suspend: command not found
[ 6.432894] FAT-fs (mmcblk0p8): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
/dev/by-name/UDISK already format
[ 6.475666] sunxi_set_cur_vol_work()422 WARN: get power supply failed
[ 6.488543] FAT-fs (mmcblk0p8): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 6.522283] android_work: sent uevent USB_STATE=CONNECTED
Starting dnsmasq: OK
[ 6.678764] sunxi_set_cur_vol_work()422 WARN: get power supply failed
Trying to connect to SWUpdate...
[ 6.739147] configfs-gadget gadget: high-speed config #1: c
[ 6.745614] android_work: sent uevent USB_STATE=CONFIGURED
[ 6.773181] sunxi_vbus_det_work()3439 WARN: get power supply failed
[ 6.780440] android_work: sent uevent USB_STATE=DISCONNECTED
swu_param: ####
swu_software: ####
swu_mode: ####
no swupdate_cmd to run, wait for next swupdate
# [ 7.115243] android_work: sent uevent USB_STATE=CONNECTED

# ls
THIS_IS_NOT_YOUR_ROOT_FILESYSTEM opt
bin proc
dev root
etc run
init sbin
lib sys
lib32 system
linuxrc tmp
lost+found usr
media var
mnt
#


GPADC检测按键

1.GPADC

GPADC(General Purpose Analog to Digital Converter)是指高精度数模转换模块,拥有12bit分辨率,8位采集精度。模拟输入范围0~1.8V,最高采样率1MHz。

GPADC 驱动路径:

t113i_tinasdk5.0-v1/kernel/linux-5.4/drivers/input/sensor/sunxi_gpadc.c
t113i_tinasdk5.0-v1/kernel/linux-5.4/drivers/input/sensor/sunxi_gpadc.h
 

1.1 GPADC硬件介绍

查看原理图,如下:

image-20240717142644688

AVCC 为 1.8V 电源供电,通过一个电阻串联到GPADC的按键组。按键通过不同阻值的电阻相连接,按下不同的按键,GPADC0 口的电压不同,CPU 通过对这个电压的采样来决定具体是哪一个按键被按下。上图按键与电压的对应关系如下表所示:

0.21V0.41V0.59V
VOL+ VOL- MENU

当按键按下时,会触发 GPADC 模块的中断,CPU 会采集 GPADC 的数据,采集到的数据转换成相应的键值之后通过 input 子系统上传到 /dev/input/event 节点,程序便可以从相应的节点获取数据。

1.2 GPADC软件配置

设备树配置

GPADC 的设备树配置分为两个部分:

第一部分包括基础的寄存器配置、设备驱动绑定配置和时钟中断配置。这一部分的配置位于 t113i_tinasdk5.0-v1/kernel/linux-5.4/arch/arm/boot/dts/sun8iw20p1.dtsi 文件内。这一部分通常不需要修改。

gpadc: gpadc@2009000 {
compatible = "allwinner,sunxi-gpadc";
reg = <0x0 0x02009000 0x0 0x400>;
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_BUS_GPADC>;
clock-names = "bus";
resets = <&ccu RST_BUS_GPADC>;
status = "okay";
};
 

第二部分包括采样相关的配置,键值,电压数据等等,在 t113i_tinasdk5.0-v1/device/config/chips/t113_i/configs/evb1_auto/linux-5.4/board.dts 文件内。

&gpadc {
channel_num = <1>;
channel_select = <0x1>;
channel_data_select = <0>;
channel_compare_select = <0x1>;
channel_cld_select = <0x1>;
channel_chd_select = <0>;
channel0_compare_lowdata = <1700000>;
channel0_compare_higdata = <1200000>;
channel1_compare_lowdata = <460000>;
channel1_compare_higdata = <1200000>;
key_cnt = <5>;
key0_vol = <210>;
key0_val = <115>;
key1_vol = <410>;
key1_val = <114>;
key2_vol = <590>;
key2_val = <119>;
key3_vol = <750>;
key3_val = <373>;
key4_vol = <880>;
key4_val = <28>;
status = "okay";
};
 

内核驱动配置

进入源码根目录t113i_tinasdk5.0-v1/

执行./build.sh menuconfig,找到Device Drivers,进入。

image-20240717112142534

找到 Input device support ,进入。

image-20240717112421876

找到 Sensors 空格勾选并进入。

image-20240717112450212

空格选中 <*> sunxi gpadc driver support ,保存并退出配置页面。

image-20240717112532232

在源码根目录上,先编译内核./build.sh kernel,再执行./build.sh ,最后打包./build.sh pack

打包完成后,生成的固件保存在 t113i_tinasdk5.0-v1/out/t113_i/evb1_auto/buildroot 目录下,镜像是t113_i_linux_evb1_auto_uart0.img

ubuntu@dshanpi:~/meihao/t113i_tinasdk5.0-v1/out/t113_i/evb1_auto/buildroot$ ls -la
total 825244
drwxrwxr-x 4 ubuntu ubuntu 4096 7月 17 08:53 .
drwxrwxr-x 4 ubuntu ubuntu 4096 7月 16 20:29 ..
-rw-rw-r-- 1 ubuntu ubuntu 6 7月 17 08:53 arisc
-rwxrwxr-x 1 ubuntu ubuntu 12986128 7月 17 08:53 bImage
-rw-rw-r-- 1 ubuntu ubuntu 66 7月 17 08:53 .board.dtb.d.dtc.tmp
-rw-rw-r-- 1 ubuntu ubuntu 79218 7月 17 08:53 .board.dtb.dts.tmp
-rw-rw-r-- 1 ubuntu ubuntu 40960 7月 16 16:31 boot0_mmc_car_fastboot_sun8iw20p1.bin
-rw-rw-r-- 1 ubuntu ubuntu 45056 7月 16 16:31 boot0_mmcfastboot_sun8iw20p1.bin
-rw-rw-r-- 1 ubuntu ubuntu 49152 7月 16 16:31 boot0_nand_car_fastboot_sun8iw20p1.bin
-rw-rw-r-- 1 ubuntu ubuntu 53248 7月 16 16:31 boot0_nandfastboot_sun8iw20p1.bin
-rw-rw-r-- 1 ubuntu ubuntu 49152 7月 16 16:31 boot0_nand_sun8iw20p1.bin
-rw-rw-r-- 1 ubuntu ubuntu 40960 7月 16 16:31 boot0_sdcard_sun8iw20p1.bin
-rw-rw-r-- 1 ubuntu ubuntu 32768 7月 16 16:31 boot0_spinor_sun8iw20p1.bin
-rw-rw-r-- 1 ubuntu ubuntu 9521152 7月 17 08:53 boot.img
-rw-rw-r-- 1 ubuntu ubuntu 4924 7月 17 08:53 .buildconfig
drwxrwxr-x 7 ubuntu ubuntu 4096 7月 17 08:54 buildroot
-rw-rw-r-- 1 ubuntu ubuntu 127042 7月 17 08:53 .config
lrwxrwxrwx 1 ubuntu ubuntu 18 7月 17 08:53 dist -> lib/modules/5.4.61
-rwxrwxr-x 1 ubuntu ubuntu 168392 7月 17 08:53 dtc
-rw-rw-r-- 1 ubuntu ubuntu 21152 7月 16 16:31 fes1_sun8iw20p1.bin
drwxrwxr-x 3 ubuntu ubuntu 4096 7月 17 08:53 lib
-rw-rw-r-- 1 ubuntu ubuntu 4000287 7月 17 08:53 rootfs.cpio.gz
-rw-r--r-- 1 ubuntu ubuntu 186701904 7月 17 08:54 rootfs.ext4
-rw-r--r-- 1 ubuntu ubuntu 58269696 7月 17 08:54 rootfs.squashfs
-rw-rw-r-- 1 ubuntu ubuntu 86446080 7月 17 08:54 rootfs.ubifs
-rw-rw-r-- 1 ubuntu ubuntu 86016 7月 16 16:31 sboot_sun8iw20p1.bin
-rw-rw-r-- 1 ubuntu ubuntu 57824 7月 17 08:53 sunxi.dtb
-rw-rw-r-- 1 ubuntu ubuntu 67864 7月 16 20:29 .sunxi.dts
-rw-rw-r-- 1 ubuntu ubuntu 2354346 7月 17 08:53 System.map
-rwxrwxr-x 2 ubuntu ubuntu 276659200 7月 16 20:29 t113_i_linux_evb1_auto_uart0.img
-rw-rw-r-- 1 ubuntu ubuntu 981756 7月 16 16:31 u-boot-sun8iw20p1.bin
-rw-rw-r-- 1 ubuntu ubuntu 5169888 7月 17 08:53 uImage
-rwxrwxr-x 1 ubuntu ubuntu 136330284 7月 17 08:53 vmlinux
-rw-rw-r-- 1 ubuntu ubuntu 62050327 7月 17 08:53 vmlinux.tar.bz2
-rwxrwxr-x 1 ubuntu ubuntu 5169824 7月 17 08:53 zImage
 

根据之前的烧录方式进行烧录。

2.测试按键

烧录完成后,进入开发板,执行cat /proc/bus/input/devices,查看对应的设备节点。

# cat /proc/bus/input/devices
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="sunxi-keyboard"
P: Phys=sunxikbd/input0
S: Sysfs=/devices/virtual/input/input0
U: Uniq=
H: Handlers=kbd event0
B: PROP=0
B: EV=3
B: KEY=1000 800 c0000 0 0 10000000

I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="sunxi-ts"
P: Phys=sunxi_ts/input0
S: Sysfs=/devices/platform/soc@3000000/2009c00.rtp/input/input1
U: Uniq=
H: Handlers=event1
B: PROP=0
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=3

I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="sunxi-gpadc0"
P: Phys=sunxigpadc0/input0
S: Sysfs=/devices/virtual/input/input2
U: Uniq=
H: Handlers=kbd event2
B: PROP=0
B: EV=100003
B: KEY=200000 0 0 0 0 0 0 0 8c0000 0 0 10000000

#
 

可以看到sunxi-gpadc0对应的设备节点是/dev/input/event2

2.1 hexdump测试

在开发板上,执行/dev/input/event2,检测按键按下状态:

# hexdump /dev/input/event2
0000000 1dcd 0000 b22e 0004 0001 0073 0001 0000
0000010 1dcd 0000 b22e 0004 0000 0000 0000 0000
0000020 1dcd 0000 5e10 0007 0001 0073 0000 0000
0000030 1dcd 0000 5e10 0007 0000 0000 0000 0000
0000040 1dce 0000 5bbf 0007 0001 0072 0001 0000
0000050 1dce 0000 5bbf 0007 0000 0000 0000 0000
0000060 1dce 0000 6374 0009 0001 0072 0000 0000
0000070 1dce 0000 6374 0009 0000 0000 0000 0000
0000080 1dcf 0000 4dc5 0005 0001 0077 0001 0000
0000090 1dcf 0000 4dc5 0005 0000 0000 0000 0000
00000a0 1dcf 0000 f5bb 0007 0001 0077 0000 0000
00000b0 1dcf 0000 f5bb 0007 0000 0000 0000 0000
 

image-20240717094803138

可以在t113i_tinasdk5.0-v1/device/config/chips/t113_i/configs/evb1_auto/linux-5.4/board.dts里,设置key*_val值来自定义改变按键按下返回的值。

2.2 C程序测试

为了更加直观分辨哪个按键按下和松开,编写一个c文件用于读取按键。

在Ubuntu上,创建一个.c文件。

ubuntu@dshanpi:~/meihao/gpadc_test$ ls -la
total 24
drwxrwxr-x 2 ubuntu ubuntu 4096 7月 17 10:48 .
drwxrwxr-x 4 ubuntu ubuntu 4096 7月 17 10:21 ..
-rw-rw-r-- 1 ubuntu ubuntu 1181 7月 17 10:48 gpadc_test.c
ubuntu@dshanpi:~/meihao/gpadc_test$
 

写入以下内容:

#include <stdio.h>
#include <linux/input.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/time.h>
#include <limits.h>
#include <unistd.h>
#include <signal.h>

#define DEV_PATH "/dev/input/event2"

static int g_igpadc_fd = 0;

static int test_gpadc(const char *event_file)
{
int code = 0;
int i = 0;

struct input_event data;

g_igpadc_fd = open(DEV_PATH,O_RDONLY);
if(g_igpadc_fd <= 0)
{
printf("open %s error!\n",DEV_PATH);
return -1;
}

for(i = 0;i < 20;i++)
{
read(g_igpadc_fd,&data,sizeof(data));

/*如果按下按键*/
if(data.type == EV_KEY && data.value == 1)
{
if(data.code == 115)
{
code = 1;
}else if(data.code == 114)
{
code = 2;
}else if(data.code == 119)
{
code = 3;
}
printf("k%d pressed\n",code);
code = 0;
}
else if(data.type == EV_KEY && data.value == 0)
{
if(data.code == 115)
{
code = 1;
}else if(data.code == 114)
{
code = 2;
}else if(data.code == 119)
{
code = 3;
}
printf("k%d releaseed\n",code);
code = 0;
}
}

close(g_igpadc_fd);
return 0;
}

intmain()
{
returntest_gpadc(DEV_PATH);
}
 

编译之前,先找到相应的交叉编译工具,在源码根目录t113i_tinasdk5.0-v1/上,查看.buildconfig

ubuntu@dshanpi:~/meihao/t113i_tinasdk5.0-v1$ vim .buildconfig
...
export LICHEE_TOOLCHAIN_PATH=/home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/toolchain/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi
 

image-20240717120030950

可以看到交叉编译工具是t113i_tinasdk5.0-v1/out/toolchain/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc

image-20240717120259883

执行t113i_tinasdk5.0-v1/out/toolchain/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc gpadc_test.c -o gpadc_test编译应用程序,这里的交叉编译工具路径需要改为实际的路径。

ubuntu@dshanpi:~/meihao/gpadc_test$ /home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/toolchain/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc gpadc_test.c -o gpadc_test
ubuntu@dshanpi:~/meihao/gpadc_test$
ubuntu@dshanpi:~/meihao/gpadc_test$ ls -la
total 24
drwxrwxr-x 2 ubuntu ubuntu 4096 7月 17 12:07 .
drwxrwxr-x 4 ubuntu ubuntu 4096 7月 17 10:21 ..
-rwxrwxr-x 1 ubuntu ubuntu 10652 7月 17 12:07 gpadc_test
-rw-rw-r-- 1 ubuntu ubuntu 1181 7月 17 10:48 gpadc_test.c
ubuntu@dshanpi:~/meihao/gpadc_test$ file gpadc_test
gpadc_test: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=b8a92558e4a8aa4ea8ef04018054c8d4e55de7ff, with debug_info, not stripped
ubuntu@dshanpi:~/meihao/gpadc_test$
 

编译成功后,把可执行程序gpadc_test上传到开发板。

ubuntu@dshanpi:~/meihao/gpadc_test$ adb push gpadc_test /mnt/UDISK/
 

执行程序:

# cd /mnt/UDISK/
# ls
gpadc_test
## cd gpadc_test/
# ls
gpadc_test gpadc_test.c
# ./gpadc_test
k1 pressed
k1 releaseed
k2 pressed
k2 releaseed
k3 pressed
k3 releaseed
k1 pressed
k1 releaseed
k2 pressed
k2 releaseed
#



支持RS485功能

1.查看设备树

image-20240717174919665

从原理图上可以知道,板子上的RS485是自动使能收发的,所以确保设备树上uart2,uart3使能即可使用。/

在ubuntu上,进入目录t113i_tinasdk5.0-v1/device/config/chips/t113_i/configs/evb1_auto/linux-5.4

查看设备树文件board.dts,确保uart2,uart3处于使能状态。

image-20240717175613571

默认是处于使能状态。

2.测试RS485收发功能

在进行RS485功能测试前,需要使用两根接线端子(杜邦线)连接开发板的RS485接口,RS485_A1 连接 RS485_A2,RS485_B1 连接 RS485_B2。

image-20240717181419744

RS485 是半双工,连接设备的时候一般接 A/B/GND,即源端的 A 连接目标设备的 A,源端的 B 连接目标设备的 B。

确保连接成功后,在开发板上执行以下几步:

①配置uart2、uart3的波特率;

由原理图可知:

uart2 ==> 端口1

uart3 ==> 端口2

设置uart2波特率。

# stty -F /dev/ttyS2 speed 115200
9600
# stty -F /dev/ttyS2 speed 115200
115200
#
 

执行两次,才可以成功设置波特率为115200。

同样设置uart3波特率。

# stty -F /dev/ttyS3 speed 115200
9600
# stty -F /dev/ttyS3 speed 115200
115200
 

②后台监测端口1;

# cat /dev/ttyS2 &
[1] 1372
#
 

③控制端口2发送数据。

# echo 100ask > /dev/ttyS3
100ask

 

可以看到有100ask打印出来。

同样可以控制端口1发送数据给端口2,因为上面已经设置过一次波特率了,不用再次设置。

①后台监测端口2;

在这之前先杀掉之前后台监测的端口1

# ps
...
1372 root cat /dev/ttyS2
...
# kill -9 1372
#
[1]+ Killed cat /dev/ttyS2
#
 

再执行以下指令:

# cat /dev/ttyS3 &
[1] 1374
#
 

②控制端口1发送数据。

# echo 123456 > /dev/ttyS2
123456

#



支持CAN功能

1.使能设备树CAN节点

在t113-i开发板的设备树中,CAN的设备树节点不叫can,名称是awlink。

进入t113i_tinasdk5.0-v1/device/config/chips/t113_i/configs/evb1_auto/linux-5.4/board.dts

ubuntu@dshanpi:~/meihao/t113i_tinasdk5.0-v1/device/config/chips/t113_i/configs/evb1_auto/linux-5.4$ vim board.dts
 

image-20240718092147186

使能awlink0和awlink1,默认处于使能状态。

2.配置内核驱动

进入SDK源码根目录t113i_tinasdk5.0-v1/

执行./build.sh menuconfig,打开内核配置界面。

点击键盘上的/键,搜索awlink

image-20240718092830534

根据路径,找到Allwinner AWLINK controller选项。

选择Networking support,点击enter键进入。image-20240718093128490

找到CAN bus subsystem support,点击enter键进入。

image-20240718093520345

之后,找到CAN Device Drivers,点击enter键进入。

image-20240718093611165

找到Allwinner AWLINK controller,点击键盘上的y键选上。

image-20240718093905474

最后保存,退出。

在SDK源码根目录t113i_tinasdk5.0-v1/下,执行./build.sh kernel编译内核,再执行./build.sh ,最后打包./build.sh pack

image-20240718094531615

打包完成后,根据之前的烧录方式,烧录到开发板上。

3.测试CAN功能

烧录完成后,进入开发板。

在开发板上,执行ifconfig -a,查看是否存在awlink0awlink1

# ifconfig  -a
awlink0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

awlink1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:1

eth0 Link encap:Ethernet HWaddr 42:5A:1A:01:32:43
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:40

ip6tnl0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:1452 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

#
 

可以看到,通过ifconfig命令查看CAN接口功能为正常,下面进行CAN功能的收发测试。

测试之前,先使用两根杜邦线,一根将 CAN0 L 连接至 CAN1 L,另一根将 CAN0 H连接 CAN1 H

连接如下图:

image-20240718100001191

连接好线后,做以下几个步骤进行测试。

①使用ip命令设置awlink接口的速度为500Kb/s

注意:需要设置完成awlink接口速度才能使能awlink接口!!!

# ip link set awlink0 type can bitrate 500000
# ip link set awlink1 type can bitrate 500000
 

②打开awlink网卡

# ifconfig awlink0 up
[ 1105.138598] IPv6: ADDRCONF(NETDEV_CHANGE): awlink0: link becomes ready
# ifconfig awlink1 up
[ 1106.368692] IPv6: ADDRCONF(NETDEV_CHANGE): awlink1: link becomes ready
#
 

③设置awlink0接收数据

# candump awlink0 &
[1] 1386
 

④向awlink0发送数据

# cansend awlink0 5A1#11.22.33.44.55.66.77.88
awlink0 5A1 [8] 11 22 33 44 55 66 77 88
 

上述cansend命令中,“5A1”是帧ID,“#”后面的“11.22.33.44.55.66.77.88”是要发送的数据,十六进制。CAN2.0一次最多发送8个字节的数据,8字节数据之间用“.”隔开,can-utils会对数据进行解析。

MIPI屏适配

本章节主要介绍如何在T113-i开发板中适配4寸MIPI屏,MIPI屏购买地址

下面操作步骤需要相对应的uboot屏驱动、kernel屏驱动。这里有相应的下载链接 ==> 资源包

1.显示部分适配

1.1 配置内核屏驱动

在Ubuntu上,进入目录t113i_tinasdk5.0-v1/kernel/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/

需要使用上面资源包kerneldriver文件夹里面的tft08006.ctft08006.h,替换掉当前目录下的tft08006.ctft08006.h

image-20240719111212342

还需要修改tft08006.c,执行vim tft08006.c ,点击键盘上的大写G,跳到文件的最后,对比原来的tft08006.c文件,如下:

image-20240719112514470

ili9806e改为tft08006,当然也可以不改,只要设备树上的名字和这里的对应就可以。这里选择修改。

image-20240720105349232

esc,然后:wq退出保存。

回到SDK源码根目录t113i_tinasdk5.0-v1/,执行./build.sh menuconfig进入内核配置界面。

找到 Device Drivers,进入。

image-20240720110452103

找到Graphics support,进入。

image-20240720110541665

找到Frame buffer Devices,进入。

image-20240720110636609

找到Video support for sunxi,进入。

image-20240720110720605

找到 LCD panels select,进入。

image-20240720110751403

找到LCD support TFT08006 panel,点击键盘y,选上。

image-20240720110835544

保存退出。

回到SDK源码根目录t113i_tinasdk5.0-v1/,执行./build.sh kernel,单独编译内核。

ubuntu@dshanpi:~/meihao/t113i_tinasdk5.0-v1$ ./build.sh kernel
========ACTION List: build_kernel ;========
options :
INFO: build kernel ...
INFO: prepare_buildserver
INFO: Prepare toolchain ...
Building kernel
...
Copy boot.img to output directory ...

sun8iw20p1 compile all(Kernel+modules+boot.img) successful


INFO: build dts ...
INFO: Prepare toolchain ...
removed '/home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/evb1_auto/buildroot/.board.dtb.d.dtc.tmp'
removed '/home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/evb1_auto/buildroot/.board.dtb.dts.tmp'
'/home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/kernel/build/arch/arm/boot/dts/.board.dtb.d.dtc.tmp' -> '/home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/evb1_auto/buildroot/.board.dtb.d.dtc.tmp'
'/home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/kernel/build/arch/arm/boot/dts/.board.dtb.dts.tmp' -> '/home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/evb1_auto/buildroot/.board.dtb.dts.tmp'
'/home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/kernel/staging/sunxi.dtb' -> '/home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/evb1_auto/buildroot/sunxi.dtb'
ubuntu@dshanpi:~/meihao/t113i_tinasdk5.0-v1$
 

这样内核里就支持了MIPI屏幕的驱动,想要该MIPI屏幕的驱动程序工作,还需要在设备树上添加相应的设备树节点。

1.2 修改内核设备树

进入目录t113i_tinasdk5.0-v1/device/config/chips/t113_i/configs/evb1_auto/linux-5.4

可以看到目录下有一个board.dts设备树文件。

image-20240720113932286

输入vim board.dts

在普通模式下执行/lcd0,找到原本已存在的lcd0设备树节点,复制以下内容,在附近点击键盘p粘贴,:

&lcd0 {
lcd_used = <1>;

lcd_driver_name = "tft08006";
lcd_backlight = <100>;
lcd_if = <4>;

lcd_x = <480>;
lcd_y = <800>;
lcd_width = <52>;
lcd_height = <52>;
lcd_dclk_freq = <25>;

lcd_pwm_used = <1>;
lcd_pwm_ch = <2>;
lcd_pwm_freq = <1000>;
lcd_pwm_pol = <0>;
lcd_pwm_max_limit = <255>;

lcd_hbp = <10>;
lcd_ht = <515>;
lcd_hspw = <5>;
lcd_vbp = <20>;
lcd_vt = <830>;
lcd_vspw = <5>;

lcd_dsi_if = <0>;
lcd_dsi_lane = <2>;
lcd_lvds_if = <0>;
lcd_lvds_colordepth = <0>;
lcd_lvds_mode = <0>;
lcd_frm = <0>;
lcd_hv_clk_phase = <0>;
lcd_hv_sync_polarity= <0>;
lcd_io_phase = <0x0000>;
lcd_gamma_en = <0>;
lcd_bright_curve_en = <0>;
lcd_cmap_en = <0>;
lcd_fsync_en = <0>;
lcd_fsync_act_time = <1000>;
lcd_fsync_dis_time = <1000>;
lcd_fsync_pol = <0>;

deu_mode = <0>;
lcdgamma4iep = <22>;
smart_color = <90>;

lcd_gpio_0 = <&pio PD 19 GPIO_ACTIVE_HIGH>;
pinctrl-0 = <&dsi4lane_pins_a>;
pinctrl-1 = <&dsi4lane_pins_b>;
};
 

原本的设备树文件中,还有lcd0设备树节点存在,需要把多余的lcd0设备树节点注释或者删除。

通过查看原理图:

image-20240720115348046

MIPI屏的pwm引脚是PB11,需要确保PB11引脚没有被其他设备树节点使用。

在设备树里可以看到,usbc0设备树节点占用了PB11引脚,而该设备树节点对应的是OTG的接口,不过只作为usb device使用,所以只需要把usb_id_gpiousb_det_vbus_gpio注释或者删除即可。

image-20240720140857681

这里选择删除。

image-20240720141350478

继续查看原理图:

image-20240720141824905

MIPI屏的reset引脚是PD19,需要确保PD19引脚没有被其他设备树节点使用。

在设备树里可以看到,被reg_usb1_vbus占用了PD19,选择注释。

image-20240720142221661

执行:wq,退出保存。

1.3 配置uboot屏驱动

想要开机进入系统后,屏幕能直接支持显示,不用执行重置屏幕操作,就需要在uboot阶段添加相应的屏驱动,这样也能在uboot阶段显示LOGO图。

在Ubuntu上,进入目录t113i_tinasdk5.0-v1/brandy/brandy-2.0/u-boot-2018/drivers/video/sunxi/disp2/disp/lcd

需要使用上面资源包ubootdriver文件夹里面的tft08006.ctft08006.h,替换掉当前目录下的tft08006.ctft08006.h

image-20240720143336223

还需要修改tft08006.c,执行vim tft08006.c ,点击键盘上的大写G,跳到文件的最后,对比原来的tft08006.c文件,如下:

image-20240719112514470

ili9806e改为tft08006,当然也可以不改,只要设备树上的名字和这里的对应就可以。这里选择修改。

image-20240720105349232

esc,然后:wq退出保存。

执行cboot,进入uboot源码目录t113i_tinasdk5.0-v1/brandy/brandy-2.0/u-boot-2018

输入make menuconfig,进入uboot配置界面。

找到 Device Drivers,进入。

image-20240720144500248

找到Graphics support,进入。

image-20240720144536262

找到 LCD panels select,进入。

image-20240720144629349

找到LCD support TFT08006 panel,点击键盘y,选上。

image-20240720144730353

保存退出。

在当前目录上t113i_tinasdk5.0-v1/brandy/brandy-2.0/u-boot-2018,执行mboot编译uboot源码

ubuntu@dshanpi:~/meihao/t113i_tinasdk5.0-v1/brandy/brandy-2.0/u-boot-2018$ mboot
========ACTION List: build_bootloader all force;========
options :
find: '/home/ubuntu/meihao/t113i_tinasdk5.0-v1/brandy/brandy-2.0/spl': No such file or directory
find: '/home/ubuntu/meihao/t113i_tinasdk5.0-v1/brandy/dramlib': No such file or directory
INFO: build_bootloader: brandy_path=/home/ubuntu/meihao/t113i_tinasdk5.0-v1/brandy/brandy-2.0
INFO: uboot-board.dts updated.
build_option:-p sun8iw20p1_auto_t113_i -b t113_i -o all
grep: /home/ubuntu/meihao/t113i_tinasdk5.0-v1/brandy/brandy-2.0/spl/Makefile: No such file or directory
Prepare toolchain ...
Prepare toolchain ...
uboot version:u-boot-2018
build for sun8iw20p1_auto_t113_i_defconfig ...
...
bootaddr is 0x20480
/home/ubuntu/meihao/t113i_tinasdk5.0-v1/brandy/brandy-2.0/spl-pub/../tools/toolchain/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-ld /home/ubuntu/meihao/t113i_tinasdk5.0-v1/brandy/brandy-2.0/spl-pub/board/t113_i/libsun8iw20p1_sboot.a /home/ubuntu/meihao/t113i_tinasdk5.0-v1/brandy/brandy-2.0/spl-pub/sboot/main/sboot_main.o -L /home/ubuntu/meihao/t113i_tinasdk5.0-v1/brandy/brandy-2.0/tools/toolchain/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabi/7.2.1 -lgcc --gc-sections --gc-sections -Tsboot.lds -o sboot.elf -Map sboot.map
/home/ubuntu/meihao/t113i_tinasdk5.0-v1/brandy/brandy-2.0/spl-pub/../tools/toolchain/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-objcopy -O binary sboot.elf sboot.bin
'sboot_sun8iw20p1.bin' -> '/home/ubuntu/meihao/t113i_tinasdk5.0-v1/brandy/brandy-2.0/spl-pub/out/sun8iw20p1/bin/sboot_sun8iw20p1.bin'
'sboot_sun8iw20p1.bin' -> '/home/ubuntu/meihao/t113i_tinasdk5.0-v1/device/config/chips/t113_i/bin/sboot_sun8iw20p1.bin'
'sboot_sun8iw20p1.bin' -> '/home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/evb1_auto/buildroot/sboot_sun8iw20p1.bin'
INFO: build brandy OK.
ubuntu@dshanpi:~/meihao/t113i_tinasdk5.0-v1/brandy/brandy-2.0/u-boot-2018$
 

1.4 修改uboot设备树

同样的,uboot的设备树也需要添加相应的设备树节点。

进入目录t113i_tinasdk5.0-v1/device/config/chips/t113_i/configs/evb1_auto

可以看到当前目录有一个uboot-board.dts设备树文件。

image-20240720145243993

输入vim uboot-board.dts

在普通模式下执行/lcd0,找到原本已存在的lcd0设备树节点,复制以下内容,在附近点击键盘p粘贴,:

&lcd0 {
lcd_used = <1>;

lcd_driver_name = "tft08006";
lcd_backlight = <100>;
lcd_if = <4>;

lcd_x = <480>;
lcd_y = <800>;
lcd_width = <52>;
lcd_height = <52>;
lcd_dclk_freq = <25>;

lcd_pwm_used = <1>;
lcd_pwm_ch = <2>;
lcd_pwm_freq = <1000>;
lcd_pwm_pol = <0>;
lcd_pwm_max_limit = <255>;

lcd_hbp = <10>;
lcd_ht = <515>;
lcd_hspw = <5>;
lcd_vbp = <20>;
lcd_vt = <830>;
lcd_vspw = <5>;

lcd_dsi_if = <0>;
lcd_dsi_lane = <2>;
lcd_lvds_if = <0>;
lcd_lvds_colordepth = <0>;
lcd_lvds_mode = <0>;
lcd_frm = <0>;
lcd_hv_clk_phase = <0>;
lcd_hv_sync_polarity= <0>;
lcd_io_phase = <0x0000>;
lcd_gamma_en = <0>;
lcd_bright_curve_en = <0>;
lcd_cmap_en = <0>;
lcd_fsync_en = <0>;
lcd_fsync_act_time = <1000>;
lcd_fsync_dis_time = <1000>;
lcd_fsync_pol = <0>;

deu_mode = <0>;
lcdgamma4iep = <22>;
smart_color = <90>;

lcd_gpio_0 = <&pio PD 19 GPIO_ACTIVE_HIGH>;
pinctrl-0 = <&dsi4lane_pins_a>;
pinctrl-1 = <&dsi4lane_pins_b>;
};
 

执行:wq,退出保存。

1.5 添加LOGO图

MIPI的分辨率大小是480*800,所以需要准备一张类似大小的logo图。

制作一张分辨率为480*800大小的logo图,保存格式是.bmp格式,并且命名为bootlogo

image-20240720151239365

制作好图片后,把图片拉取到目录t113i_tinasdk5.0-v1/device/config/chips/t113_i/boot-resource/boot-resource下。

image-20240720151614671

还需要确保t113i_tinasdk5.0-v1/brandy/brandy-2.0/u-boot-2018/configs/sun8iw20p1_auto_t113_i_defconfig文件中,以下选项是否打开:

CONFIG_CMD_SUNXI_BMP=y
CONFIG_LZMA=y
CONFIG_DISP2_SUNXI=y
CONFIG_AW_PHY=y
CONFIG_BOOT_GUI=y
 

进入SDK源码目录t113i_tinasdk5.0-v1/,输入./build.sh,编译固件。

ubuntu@dshanpi:~/meihao/t113i_tinasdk5.0-v1$ ./build.sh
========ACTION List: build_linuxdev;========
options :
INFO: ----------------------------------------
INFO: build linuxdev ...
INFO: chip: sun8iw20p1
INFO: platform: linux
INFO: kernel: linux-5.4
INFO: board: evb1_auto
INFO: output: /home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/evb1_auto/buildroot
INFO: ----------------------------------------
INFO: don't build dtbo ...
INFO: build arisc
find: '/home/ubuntu/meihao/t113i_tinasdk5.0-v1/brandy/brandy-2.0/spl': No such file or directory
find: '/home/ubuntu/meihao/t113i_tinasdk5.0-v1/brandy/dramlib': No such file or directory
INFO: build_bootloader: brandy_path=/home/ubuntu/meihao/t113i_tinasdk5.0-v1/brandy/brandy-2.0
INFO: skip build brandy.
INFO: build kernel ...
INFO: prepare_buildserver
INFO: Prepare toolchain ...
Building kernel
...
Number of duplicate files found 37
Number of inodes 6686
Number of files 5571
Number of fragments 397
Number of symbolic links 813
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 302
Number of ids (unique uids + gids) 1
Number of uids 1
root (0)
Number of gids 1
root (0)
INFO: pack rootfs ok ...
INFO: ----------------------------------------
INFO: build Tina OK.
INFO: ----------------------------------------
ubuntu@dshanpi:~/meihao/t113i_tinasdk5.0-v1$
 

编译完成后,进行打包./build.sh pack,最后根据之前的烧录方式烧录到开发板。

image-20240720152806637

如果进入内核阶段没有logo图显示,可以执行重置屏幕操作:

mount -t debugfs none /sys/kernel/debug
cd /sys/kernel/debug/dispdbg
echo suspend> command
echo disp0 > name
echo 1 > start

echo resume > command
echo disp0 > name
echo 1 > start

echo 8 > /sys/class/disp/disp/attr/colorbar
 

2.触摸部分适配

2.1 修改内核设备树

查看原理图:

image-20240720163430990

由原理图可以看出:

RPI_SCL 对应的引脚是 PD20;

RPI_SDA 对应的引脚是 PD21;

CTP_INT 对应的引脚是 PB10;

CTP_RST 对应的引脚是 PE17;

在Ubuntu上,进入目录t113i_tinasdk5.0-v1/device/config/chips/t113_i/configs/evb1_auto/linux-5.4

可以看到目录下有一个board.dts设备树文件。

image-20240720113932286

输入vim board.dts

PD20 和 PD21 对应的是IIC适配器2。修改twi2_pins_atwi2_pins_b里面的引脚为PD20 、PD21。

image-20240720164304915

twi2设备树节点内添加触摸设备树节点,写入以下内容:

ctp@38 {
compatible = "focaltech,fts";
reg = <0x38>;
status = "okay";
interrupt-parent = <&pio>;
interrupts = <PB 10 IRQ_TYPE_LEVEL_LOW>;
focaltech,reset-gpio = <&pio PE 17 GPIO_ACTIVE_HIGH>;
focaltech,irq-gpio = <&pio PB 10 IRQ_TYPE_LEVEL_LOW>;
focaltech,max-touch-number = <5>;
//focaltech,display-coords = <0 0 800 480>;
focaltech,display-coords = <0 0 480 800>;
//focaltech,reg_vdd = <0x0000001f>;
//focaltech,reg_avdd = <0x0000001f>;
focaltech,reg_vdd = <&reg_3v3>;
focaltech,reg_avdd = <&reg_3v3>;
};
 

CTP_INT 对应的引脚是 PB10;CTP_RST 对应的引脚是 PE17。

image-20240720164433209

执行:wq,退出保存。

2.2 修改触摸驱动

在测试过程中,发现触摸点(x,y)不对,需要修改驱动程序。

进入目录t113i_tinasdk5.0-v1/kernel/linux-5.4/drivers/input/touchscreen/focaltech_touch

执行vim focaltech_core.c,修改文件focaltech_core.c

image-20240720165220591

两处修改:

  • fts_input_dev_report_a函数中修改,找到相应的位置:

    #原来的
    input_report_abs(data->input_dev, ABS_MT_POSITION_X, event->au16_x[i]);
    input_report_abs(data->input_dev, ABS_MT_POSITION_Y, event->au16_y[i]);

    #修改的
    input_report_abs(data->input_dev, ABS_MT_POSITION_X, -(event->au16_x[i] - 480));
    input_report_abs(data->input_dev, ABS_MT_POSITION_Y, -(event->au16_y[i] - 800));
     
  • fts_input_dev_report_b函数中修改,找到相应的位置:

    #原来的
    input_report_abs(data->input_dev, ABS_MT_POSITION_X, event->au16_x[i]);
    input_report_abs(data->input_dev, ABS_MT_POSITION_Y, event->au16_y[i]);

    #修改的
    input_report_abs(data->input_dev, ABS_MT_POSITION_X, -(event->au16_x[i] - 480));
    input_report_abs(data->input_dev, ABS_MT_POSITION_Y, -(event->au16_y[i] - 800));
     

2.3 添加触摸驱动

回到SDK源码根目录t113i_tinasdk5.0-v1/,输入./build.sh menuconfig,进入内核配置界面

找到 Device Drivers,进入。

image-20240720165934166

找到Input device support,进入。

image-20240720170002305

找到Touchscreens,进入。

image-20240720170029990

找到Focaltech Touchscreen,点击键盘y,选上。

image-20240720170056564

保存退出。

执行./build.sh kernel编译内核,再输入./build.sh,最后打包./build.sh pack

ubuntu@dshanpi:~/meihao/t113i_tinasdk5.0-v1$ ./build.sh pack
...
/home/ubuntu/meihao/t113i_tinasdk5.0-v1/tools/pack/pctools/linux/eDragonEx/
/home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/evb1_auto/pack_out
Begin Parse sys_partion.fex
Add partion boot-resource.fex BOOT-RESOURCE_FEX
Add partion very boot-resource.fex BOOT-RESOURCE_FEX
FilePath: boot-resource.fex
FileLength=dad400Add partion env.fex ENV_FEX000000000
Add partion very env.fex ENV_FEX000000000
FilePath: env.fex
FileLength=20000Add partion env.fex ENV_FEX000000000
Add partion very env.fex ENV_FEX000000000
FilePath: env.fex
FileLength=20000Add partion boot.fex BOOT_FEX00000000
Add partion very boot.fex BOOT_FEX00000000
FilePath: boot.fex
FileLength=920800Add partion rootfs.fex ROOTFS_FEX000000
Add partion very rootfs.fex ROOTFS_FEX000000
FilePath: rootfs.fex
FileLength=b20d850Add partion amp_rv0.fex AMP_RV0_FEX00000
Add partion very amp_rv0.fex AMP_RV0_FEX00000
FilePath: amp_rv0.fex
FileLength=29eb8BuildImg 0
Dragon execute image.cfg SUCCESS !
----------image is at----------

265M /home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i_linux_evb1_auto_uart0.img

pack finish
ubuntu@dshanpi:~/meihao/t113i_tinasdk5.0-v1$
 

最后根据之前的烧录方式烧录到开发板。

烧录完成后,在开发板上,输入cat /proc/bus/input/devices

# cat /proc/bus/input/devices
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="sunxi-keyboard"
P: Phys=sunxikbd/input0
S: Sysfs=/devices/virtual/input/input0
U: Uniq=
H: Handlers=kbd event0
B: PROP=0
B: EV=3
B: KEY=1000 800 c0000 0 0 10000000

I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="sunxi-ts"
P: Phys=sunxi_ts/input0
S: Sysfs=/devices/platform/soc@3000000/2009c00.rtp/input/input1
U: Uniq=
H: Handlers=event1
B: PROP=0
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=3

I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="sunxi-gpadc0"
P: Phys=sunxigpadc0/input0
S: Sysfs=/devices/virtual/input/input2
U: Uniq=
H: Handlers=kbd event2
B: PROP=0
B: EV=100003
B: KEY=200000 0 0 0 0 0 0 0 8c0000 0 0 10000000

I: Bus=0018 Vendor=0000 Product=0000 Version=0000
N: Name="fts_ts"
P: Phys=
S: Sysfs=/devices/platform/soc@3000000/2502800.twi/i2c-2/2-0038/input/input3
U: Uniq=
H: Handlers=event3
B: PROP=2
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=6618000 0

#
 

可以看到/dev/input/event3对应的是MIPI屏上的触摸设备节点。

执行hexdump /dev/input/event3,用手指在MIPI屏点击几下,会有如下信息出现:

# hexdump /dev/input/event3
0000000 5896 0000 f76d 0003 0003 0039 0006 0000
0000010 5896 0000 f76d 0003 0003 003a 007f 0000
0000020 5896 0000 f76d 0003 0003 0030 0004 0000
0000030 5896 0000 f76d 0003 0003 0035 0143 0000
0000040 5896 0000 f76d 0003 0003 0036 0246 0000
0000050 5896 0000 f76d 0003 0001 014a 0001 0000
0000060 5896 0000 f76d 0003 0000 0000 0000 0000
0000070 5896 0000 1ff9 0004 0003 0039 ffff ffff
0000080 5896 0000 1ff9 0004 0001 014a 0000 0000
0000090 5896 0000 1ff9 0004 0000 0000 0000 0000


XR829芯片适配

本章节来讲解如何适配XR829芯片,连接wifi进行上网和连接蓝牙。

1.修改内核设备树

查看原理图

对于wifi功能需要查看的引脚:

image-20240722094736975

由图可知,

WL_REG_ON 对应的引脚是 ==> PB12

WL_WAKE_AP 对应的引脚是 ==> PG10

对于蓝牙功能需要查看的引脚:

image-20240722100210725

由图可知,

BT_RST_N 对应的引脚是 ==> PG18

修改设备树

进入目录t113i_tinasdk5.0-v1/device/config/chips/t113_i/configs/evb1_auto/linux-5.4

修改内核设备树文件board.dts

vim board.dts
 

对于wifi设备树节点修改对应的引脚:

在普通模式下,键盘输入/wlan,找到wlan设备树节点,修改如下:

image-20240722095001631

对于蓝牙设备树节点修改对应的引脚:

在普通模式下,键盘输入/bt,找到蓝牙设备树节点,修改如下:

image-20240722100324084

2.添加内核驱动

进入SDK源码目录t113i_tinasdk5.0-v1$

执行./build.sh menuconfig进入内核配置界面。

找到Device Drivers,进入。

image-20240722173759419

找到 Network device support,进入。

image-20240722173929498

找到 Wireless LAN,进入。

image-20240722174010522

找到XR829 WLAN support,按住键盘M,选为编译成内核模块。

image-20240722174031444

保存退出。

在SDK源码目录t113i_tinasdk5.0-v1$下,执行./build.sh kernel

ubuntu@dshanpi:~/meihao/t113i_tinasdk5.0-v1$ ./build.sh kernel
========ACTION List: build_kernel ;========
options :
INFO: build kernel ...
INFO: prepare_buildserver
INFO: Prepare toolchain ...
Building kernel
...
Copy boot.img to output directory ...

sun8iw20p1 compile all(Kernel+modules+boot.img) successful


INFO: build dts ...
INFO: Prepare toolchain ...
removed '/home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/evb1_auto/buildroot/.board.dtb.d.dtc.tmp'
removed '/home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/evb1_auto/buildroot/.board.dtb.dts.tmp'
'/home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/kernel/build/arch/arm/boot/dts/.board.dtb.d.dtc.tmp' -> '/home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/evb1_auto/buildroot/.board.dtb.d.dtc.tmp'
'/home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/kernel/build/arch/arm/boot/dts/.board.dtb.dts.tmp' -> '/home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/evb1_auto/buildroot/.board.dtb.dts.tmp'
'/home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/kernel/staging/sunxi.dtb' -> '/home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/evb1_auto/buildroot/sunxi.dtb'
ubuntu@dshanpi:~/meihao/t113i_tinasdk5.0-v1$
 

3.添加xr829固件

在SDK源码目录t113i_tinasdk5.0-v1$下,执行./build.sh buildroot_menuconfig

找到Target packages,进入

image-20240722174546971

找到allwinner platform private package select,进入。

image-20240722174640109

找到wireless,进入。

image-20240722174724011

找到firmware,进入。

image-20240722174751600

先点击键盘y,选择xr829-firmware,然后选择xr829_24M,板子上xr829芯片旁边用的晶振是24M的。

image-20240722174821908

4.启动odhcp6c服务

odhcp6c的核心作用在于简化并自动化IPv6网络环境下的地址配置过程,确保设备能够顺利接入并通信。

接着上面的操作,退出到Target packages下,找到Networking applications,进入。

image-20240722175208320

找到odhcp6c,点击键盘y,选上。

image-20240722175256342

保存退出。

在SDK源码目录t113i_tinasdk5.0-v1$下,执行./build.sh

编译完成后,输入./build.sh pack

ubuntu@dshanpi:~/meihao/t113i_tinasdk5.0-v1$ ./build.sh pack
========ACTION List: mk_pack ;========
options :
INFO: packing firmware ...
INFO: /home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/common/keys
copying tools file
copying configs file
copying product configs file
linux copying boardt&linux_kernel_version configs file
...
update gpt file ok
update mbr file ok
/home/ubuntu/meihao/t113i_tinasdk5.0-v1/tools/pack/pctools/linux/eDragonEx/
/home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i/evb1_auto/pack_out
Begin Parse sys_partion.fex
Add partion boot-resource.fex BOOT-RESOURCE_FEX
Add partion very boot-resource.fex BOOT-RESOURCE_FEX
FilePath: boot-resource.fex
FileLength=dad400Add partion env.fex ENV_FEX000000000
Add partion very env.fex ENV_FEX000000000
FilePath: env.fex
FileLength=20000Add partion env.fex ENV_FEX000000000
Add partion very env.fex ENV_FEX000000000
FilePath: env.fex
FileLength=20000Add partion boot.fex BOOT_FEX00000000
Add partion very boot.fex BOOT_FEX00000000
FilePath: boot.fex
FileLength=920800Add partion rootfs.fex ROOTFS_FEX000000
Add partion very rootfs.fex ROOTFS_FEX000000
FilePath: rootfs.fex
FileLength=b260880Add partion amp_rv0.fex AMP_RV0_FEX00000
Add partion very amp_rv0.fex AMP_RV0_FEX00000
FilePath: amp_rv0.fex
FileLength=29eb8BuildImg 0
Dragon execute image.cfg SUCCESS !
----------image is at----------

266M /home/ubuntu/meihao/t113i_tinasdk5.0-v1/out/t113_i_linux_evb1_auto_uart0.img

pack finish
ubuntu@dshanpi:~/meihao/t113i_tinasdk5.0-v1$
 

打包完成后,根据之前的烧录方式烧录到开发板上。

5.上网测试

在开发板上,执行ifconfig -a

# ifconfig -a
awlink0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:255

awlink1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

eth0 Link encap:Ethernet HWaddr 9A:47:64:F5:A8:4E
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:40

ip6tnl0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:1452 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

#
 

可以看到目前没有wlan接口,需要加载wifi驱动模块。

执行insmod /lib/modules/5.4.61/xr829.ko

# insmod /lib/modules/5.4.61/xr829.ko
[ 173.496018] ======== XRADIO WIFI OPEN ========
[ 173.501856] [XRADIO] Driver Label:XR_V02.16.88_P2P_HT40_01.31
[ 173.508696] [XRADIO] Allocated hw_priv @ (ptrval)
[ 173.514978] sunxi-rfkill soc@3000000:rfkill@0: bus_index: 1
[ 173.531312] sunxi-rfkill soc@3000000:rfkill@0: wlan power on success
[ 173.738498] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 173.746231] [XRADIO] Detect SDIO card 1
[ 173.749727] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator
[ 173.774101] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 173.797213] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 173.811824] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 173.834060] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[ 173.845657] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[ 173.857505] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(SDR25) dt B
[ 173.870081] mmc1: new high speed SDIO card at address 0001
[ 173.877097] [SBUS] XRadio Device:sdio clk=50000000
[ 173.890482] [XRADIO] XRADIO_HW_REV 1.0 detected.
[ 173.947031] [XRADIO] xradio_update_dpllctrl: DPLL_CTRL Sync=0x01400000.
[ 173.980161] [XRADIO] Bootloader complete
[ 174.002859] random: crng init done
[ 174.006676] random: 2 urandom warning(s) missed due to ratelimiting
[ 174.094363] [XRADIO] Firmware completed.
[ 174.100603] [WSM] Firmware Label:XR_C09.08.52.64_DBG_02.100 2GHZ HT40 Jan 3 2020 13:14:37
[ 174.109975] [XRADIO] Firmware Startup Done.
[ 174.114975] [XRADIO_WRN] enable Multi-Rx!
[ 174.122681] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
#
 

再次执行ifconfig -a,可以看到wlan0这个接口了。

image-20240722180642540

输入ifconfig wlan0 up,使能wlan0接口。

# ifconfig wlan0 up
[ 324.579646] ieee80211_do_open: vif_type=2, p2p=0, ch=3, addr=f8:f2:1a:3e:86:2e
[ 324.587897] [STA] !!!xradio_vif_setup: id=0, type=2, p2p=0, addr=f8:f2:1a:3e:86:2e
[ 324.603169] [AP_WRN] BSS_CHANGED_ASSOC but driver is unjoined.
# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr F8:F2:1A:3E:86:2E
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
 

扫描wifi

输入以下内容:

iw dev wlan0 scan | grep SSID
 

扫描附近的wifi节点:

# iw dev wlan0 scan | grep SSID
SSID: Programmers
* SSID List
SSID: ChinaNet-kRAH
SSID: \xe9\xa1\xba\xe6\x88\x90\xe5\x8a\xb3\xe5\x8a\xa1
SSID: Voform
SSID: Guest_An
SSID: Redmi_83D1
SSID: pobo
* SSID List
SSID: ChinaNet-ec7h
SSID: ChinaNet-ccXn
SSID: MERCURY_62A2
SSID:
SSID: ChinaNet-sqJr
SSID: VANTEN
* SSID List
SSID: HUAWEI-1619
SSID: HUAWEI-yuanyuan
SSID:
SSID:
SSID: WiFi
 

连接wifi

wpa_supplicant连接WIFI的时候会从配置文件中读取账号和密码,以及加密方式等, 所以我们再运行wpa_supplicant工具的时候要提前写好配置文件。 配置文件名称自定,但是要以 .conf 为后缀,并保存在 /etc/ 目录下,这边给出一个配置文件的例子。

vim /etc/wpa_supplicant.conf
 

添加如下内容:

ctrl_interface=/var/run/wpa_supplicant
update_config=1

network={
ssid="Programmers"
psk="100askxxx"
}
 

创建一个socket通信的目录

mkdir -p /var/log/wpa_supplicant
 

连接到 SSID

wpa_supplicant -B -c /etc/wpa_supplicant.conf -i wlan0
 

打印信息如下:

# wpa_supplicant -B -c /etc/wpa_supplicant.conf -i wlan0
Successfully initialized wpa_supplicant
[ 762.072364] ieee80211_do_open: vif_type=10, p2p=0, ch=3, addr=f8:f2:1a:3e:86:2f
[ 762.080682] [STA] !!!xradio_vif_setup: id=2, type=10, p2p=0, addr=f8:f2:1a:3e:86:2f
# [ 763.621943] [STA_WRN] Freq 2442 (wsm ch: 7) prev: 3.
[ 763.627544] wlan0: authenticate with 94:d9:b3:b7:c9:0a (try 1)
[ 763.640709] [STA_WRN] [HT40][xradio_join_work][bss_ht_info]:
[ 763.640709] [primary_chan :0x00000007]
[ 763.640709] [ht_param :0x0000000f]
[ 763.640709] [operation_mode:0x00000006]
[ 763.640709] [stbc_param :0x00000000]
[ 763.640709] [basic_set[0] :0x00000000]
[ 763.668482] [STA_WRN] [HT40][xradio_join_work][PhyModeCfg:0x0027]
[ 763.668482] [ModemFlags :0x00000007]
[ 763.668482] [ChWidthCfg :0x00000002]
[ 763.668482] [PriChCfg :0x00000000]
[ 763.668482] [BandCfg :0x00000000]
[ 763.668482] [STBC_Enable :0x00000000]
[ 763.668482] [PreambleCfg :0x00000000]
[ 763.668482] [SGI_Enable :0x00000000]
[ 763.668482] GF_Enable :0x00000000]
[ 763.737620] wlan0: authenticated
[ 763.741576] [STA_WRN] Freq 2422 (wsm ch: 3) prev: 7.
[ 763.747343] [AP_WRN] xradio_bss_info_changed vif(type=3) is not enable!changed=0x200
[ 763.756080] [STA_WRN] Freq 2442 (wsm ch: 7) prev: 3.
[ 763.761794] wlan0: associate with 94:d9:b3:b7:c9:0a (try 1)
[ 763.805085] wlan0: RX AssocResp from 94:d9:b3:b7:c9:0a (capab=0x431 status=0 aid=7)
[ 763.813721] wlan0: associated
[ 763.820299] [AP_WRN] [STA] ASSOC HTCAP 11N 58
[ 763.825180] [AP_WRN] [HT40][xradio_bss_info_changed][ht_prot:0x0000000a][HtProtMode:0x0002][Green:0x0004]
[ 763.825406] [AP_WRN] [HT40][xradio_bss_info_changed][PhyModeCfg:0x5027]
[ 763.825406] [ModemFlags :0x00000007]
[ 763.825406] [ChWidthCfg :0x00000002]
[ 763.825406] [PriChCfg :0x00000000]
[ 763.825406] [BandCfg :0x00000000]
[ 763.825406] [STBC_Enable :0x00000000]
[ 763.825406] [PreambleCfg :0x00000001]
[ 763.825406] [SGI_Enable :0x00000001]
[ 763.825406] [GF_Enable :0x00000000]
[ 763.880752] [AP_WRN] xradio_bss_info_changed vif(type=3) is not enable!changed=0x200
[ 763.918906] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

 

为 WLAN 接口分配IP地址

udhcpc -i wlan0
 

打印信息如下:

# udhcpc -i wlan0
udhcpc: started, v1.33.2
udhcpc: sending discover
[ 913.170444] [TXRX_WRN] drop=1773, fctl=0x00d0.
udhcpc: sending select for 192.168.0.104
udhcpc: lease of 192.168.0.104 obtained, lease time 122
deleting routers
adding dns 192.168.0.1
adding dns 192.168.0.1
#
 

检查连接性

# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr F8:F2:1A:3E:86:2E
inet addr:192.168.0.104 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::faf2:1aff:fe3e:862e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2243 errors:0 dropped:9 overruns:0 frame:0
TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:219959 (214.8 KiB) TX bytes:3036 (2.9 KiB)
# ping www.baidu.com
PING www.baidu.com (183.2.172.185): 56 data bytes
64 bytes from 183.2.172.185: seq=0 ttl=52 time=9.954 ms
64 bytes from 183.2.172.185: seq=1 ttl=52 time=10.585 ms
64 bytes from 183.2.172.185: seq=2 ttl=52 time=8.143 ms
^C
--- www.baidu.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 8.143/9.560/10.585 ms
#
 

注意:输入 <CTRL + C> 可终止 ping 会话。

6.蓝牙测试

开机进入开发板,执行bt_test -i,发现蓝牙起不来,报错。

查看/etc/bluetooth/bt_init.sh

start_hci_attach()
{
h=`ps | grep "$bt_hciattach" | grep -v grep`
[ -n "$h" ] && {
killall "$bt_hciattach"
}

# reset_bluetooth_power

"$bt_hciattach" -n ttyAS1 xradio >/dev/null 2>&1 &

wait_hci0_count=0
while true
do
[ -d /sys/class/bluetooth/hci0 ] && break
usleep 100000
let wait_hci0_count++
[ $wait_hci0_count -eq 70 ] && {
echo "bring up hci0 failed"
exit 1
}
done
}
 

发现脚本有错:"$bt_hciattach" -n ttyAS1 xradio >/dev/null 2>&1 &

串口1的设备节点是/dev/ttyS1

# ls /dev/tty
tty tty14 tty20 tty27 tty33 tty4 tty46 tty52 tty59 tty8
tty0 tty15 tty21 tty28 tty34 tty40 tty47 tty53 tty6 tty9
tty1 tty16 tty22 tty29 tty35 tty41 tty48 tty54 tty60 ttyS0
tty10 tty17 tty23 tty3 tty36 tty42 tty49 tty55 tty61 ttyS1
tty11 tty18 tty24 tty30 tty37 tty43 tty5 tty56 tty62 ttyS2
tty12 tty19 tty25 tty31 tty38 tty44 tty50 tty57 tty63 ttyS3
tty13 tty2 tty26 tty32 tty39 tty45 tty51 tty58 tty7
# ls /dev/tty
 

修改如下:

start_hci_attach()
{
h=`ps | grep "$bt_hciattach" | grep -v grep`
[ -n "$h" ] && {
killall "$bt_hciattach"
}

# reset_bluetooth_power

"$bt_hciattach" -n ttyS1 xradio >/dev/null 2>&1 &

wait_hci0_count=0
while true
do
[ -d /sys/class/bluetooth/hci0 ] && break
usleep 100000
let wait_hci0_count++
[ $wait_hci0_count -eq 70 ] && {
echo "bring up hci0 failed"
exit 1
}
done
}
 

重启开发板。

再次执行bt_test -i

# bt_test -i
[ACT D][ring_buff_init,27]enter

[ACT D][ring_buff_start,173]ring buffer start enter

[ACT D][ring_buff_start,187]ring buffer start quit

[ACT D][ring_buff_init,27]enter

[ACT D][ring_buff_start,173]ring buffer start enter

[ACT D][ring_buff_start,187]ring buffer start quit

1970-01-01 09:55:24:756: BTMG[_bt_manager_set_default_profile:374]: enable default profile from bt config
1970-01-01 09:55:24:756: BTMG[_bt_manager_enable:258]: btmanager version: Version:4.0.4.20231208, builed time: Jul 16 2024-16:53:44
1970-01-01 09:55:24:756: BTMG[_bt_manager_enable:259]: enable state: 1, now bt adapter state : 0
197[ 286.262531] sunxi-rfkill soc@3000000:rfkill@0: block state already is 1
0-01-01 09:55:24:757: BTMG[bt_test_adapter_status_cb:74]: bt is turnning on.
[ 286.471759] sunxi-rfkill soc@3000000:rfkill@0: set block: 0
[ 286.488049] sunxi-rfkill soc@3000000:rfkill@0: bt power on success
[ 286.515417] [XR_BT_LPM] bluedroid_write_proc_btwake: bluedroid_write_proc_btwake 1
[ 286.523960] [XR_BT_LPM] bluedroid_write_proc_btwake: wakeup bt device
[ 286.531339] [XR_BT_LPM] bluedroid_write_proc_lpm: disable lpm mode
Starting bluetoothd: OK
1970-01-01 09:55:29:953: BTMG[bt_routine:102]: bt adapter info:
address:6E:D6:22:1F:82:27
Name: BlueZ 5.54
Alias: aw-bt-test-82-27
Discoverable: 1
DiscoverableTimeout: 180

[ACT D][ring_buff_init,27]enter

1970-01-01 09:55:30:199: BTMG[bt_test_adapter_status_cb:59]: BT is ON
1970-01-01 09:55:30:202: BTMG[bt_agent_register:226]: set io capability: KeyboardDisplay
1970-01-01 09:55:30:208: BTMG[bt_manager_set_scan_mode:208]: enter
1970-01-01 09:55:30:209: BTMG[pfd1_thread_process:1008]: enter
[BT]:
 

成功,手机可以连接上蓝牙了。

image-20240722191823240

打印信息如下:

[BT]:1970-01-01 09:56:01:896: BTMG[bt_test_agent_authorize_service_cb:192]:  AGENT: 04:10:6B:F9:43:23 Authorize Service 0000110d-0000-1000-8000-00805f9b34fb
1970-01-01 09:56:02:183: BTMG[supervise_pcm_worker_start:131]: transport A2DP:AAC
1970-01-01 09:56:02:184: BTMG[a2dp_pcm_worker_routine:115]: codec:AAC, sampling:44100, channels:2, format_size:2
1970-01-01 09:56:02:191: BTMG[a2dp_pcm_worker_routine:149]: Starting PCM loop
1970-01-01 09:56:02:545: BTMG[bt_test_agent_authorize_service_cb:192]: AGENT: 04:10:6B:F9:43:23 Authorize Service 0000110e-0000-1000-8000-00805f9b34fb
1970-01-01 09:56:02:590: BTMG[bt_test_a2dp_sink_connection_state_cb:205]: A2DP sink connected with device: 04:10:6B:F9:43:23
1970-01-01 09:56:02:626: BTMG[bluez_signal_mediatransport_properties_changed:506]: Volume is :59
1970-01-01 09:56:02:626: BTMG[bt_test_avrcp_audio_volume_cb:287]: AVRCP audio volume:04:10:6B:F9:43:23 : 59
1970-01-01 09:56:03:058: BTMG[bt_test_avrcp_play_state_cb:260]: BT palying music paused with device: 04:10:6B:F9:43:23
1970-01-01 09:56:03:061: BTMG[bt_test_avrcp_track_changed_cb:276]: BT playing music title: Not Provided
1970-01-01 09:56:03:061: BTMG[bt_test_avrcp_track_changed_cb:277]: BT playing music artist:
1970-01-01 09:56:03:061: BTMG[bt_test_avrcp_track_changed_cb:278]: BT playing music album:

[BT]:



千兆网卡测试

源码SDK编译出的镜像中默认支持千兆网卡功能,本章节讲解如何测试千兆网卡。

测试

在进行千兆网卡功能测试前,准备一根可以上网的网线,网卡的位置如下图所示:

image-20240723103252145

注意:请确保网线可以正常通过路由器进行联网

1.网线安装完成后,上电启动系统,进入串口终端,查看eth0节点是否存在,输入:

ifconfig -a
 

输入完成之后。即可看到eth0节点,如下图所示:

image-20240723105715822

2.使能eth0网络设备节点,输入:

ifconfig eth0 up
 

输入完成后,即可通过ifconfig查看到使能后的网络设备节点,如下图所示:

image-20240723105945429

3.将网线插入网卡之后,可以看到网卡座子处的绿色灯亮起,此时可以去获取eth0的IP地址,输入:

udhcpc -i eth0
 

输入完成后即可获取到路由器分配的ip地址,如下图所示:

image-20240723110147263

可以看到1Gbps/Full。

支持TF启动

本章节讲解如何把镜像烧录到TF上,并开机启动。根据开发环境搭建章节,编译出的镜像默认支持TF卡功能。

1.格式化TF卡

准备一张TF卡,打开格式化工具,这里使用的是SD Card Formatter

选择相应的TF卡,点击格式化Format

image-20240724092052042

选择

image-20240724092238829

格式化成功,选择确定即可格式化完成。

image-20240724092429533

2.烧录镜像

烧录全志的镜像,需要使用全志官方提供的烧录工具 PhoenixCard,双击打开。

image-20240724092708952

点击①固件。找到相应的镜像,开发环境搭建章节编译出的固件支持烧录到emmc和TF。

选择②启动卡。

点击③烧卡。

image-20240724092944051

等待烧写完成即可。

image-20240724093307115

3.启动镜像

烧写完成后,把TF插入开发板中,开发板TF卡槽位置如下:

image-20240724093610329

默认TF启动优先级大于emmc启动。所以插入TF卡,上电时,默认TF启动镜像。

串口打印信息如下:

[198]HELLO! BOOT0 is starting!
[201]BOOT0 commit : 069ed30b88
[204]set pll start
[206]fix vccio detect value:0xc0
[214]periph0 has been enabled
[217]set pll end
[218][pmu]: bus read error
[221]board init ok
[223]enable_jtag
[224]get_pmu_exist() = -1
[227]ddr_efuse_type: 0x0
[229]trefi:7.8ms
[232][AUTO DEBUG] single rank and full DQ!
[236]ddr_efuse_type: 0x0
[238]trefi:7.8ms
[241][AUTO DEBUG] rank 0 row = 15
[244][AUTO DEBUG] rank 0 bank = 8
[247][AUTO DEBUG] rank 0 page size = 2 KB
[251]DRAM BOOT DRIVE INFO: V0.34
[255]DRAM CLK = 792 MHz
[257]DRAM Type = 3 (2:DDR2,3:DDR3)
[260]DRAMC ZQ value: 0x7b7bfb
[263]DRAM ODT value: 0x42.
[266]ddr_efuse_type: 0x0
[269]DRAM SIZE = 512 MB
[276]DRAM simple test OK.
[278]rtc standby flag is 0x0, super standby flag is 0x0
[283]dram size =512
[286]card no is 0
[288]sdcard 0 line count 4
[290][mmc]: mmc driver ver 2021-05-21 14:47
[299][mmc]: Wrong media type 0x0
[302][mmc]: ***Try SD card 0***
[323][mmc]: HSSDR52/SDR25 4 bit
[326][mmc]: 50000000 Hz
[328][mmc]: 30436 MB
[330][mmc]: ***SD/MMC 0 init OK!!!***
[426]Loading boot-pkg Succeed(index=0).
[430]Entry_name = u-boot
[437]Entry_name = optee
[441]Entry_name = dtb
[444]mmc not para
[445]Jump to second Boot.
M/TC: OP-TEE version: 2a99a16f (gcc version 5.3.1 20160412 (Linaro GCC 5.3-2016.05)) #1 Thu Aug 17 11:13:02 UTC 2023 arm
E/TC:0 0 platform_standby_fdt_parse:126 no pmu0 node
E/TC:0 0 sunxi_twi_parse_from_dt:121 no pmu node


U-Boot 2018.07-g6047f84-dirty (Jul 20 2024 - 14:56:41 +0800) Allwinner Technology

[00.516]CPU: Allwinner Family
[00.519]Model: sun8iw20
[00.521]DRAM: 512 MiB
[00.525]Relocation Offset is: 1cebd000
[00.553]secure enable bit: 0
E/TC:0 fdt_getprop_u32:336 prop trace_level not found
[00.566]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz
[00.572]gic: sec monitor mode
SPI ALL: ready
[00.578]line:703 init_clocks
[00.581]flash init start
[00.583]workmode = 0,storage type = 1
[00.586][mmc]: mmc driver ver uboot2018:2023-07-4 16:18:00
[00.592][mmc]: get sdc_type fail and use default host:tm1.
[00.598][mmc]: can't find node "mmc0",will add new node
[00.602][mmc]: fdt err returned <no error>
[00.606][mmc]: Using default timing para
[00.610][mmc]: SUNXI SDMMC Controller Version:0x50310
[00.638][mmc]: card_caps:0x3000000a
[00.641][mmc]: host_caps:0x3000003f
[00.646]sunxi flash init ok
get value error
[00.650]drv_disp_init
partno erro : can't find partition bootloader
** Unable to read file lcd_compatible_index.txt **
[00.676]disp_fat_load for lcd config failed
[00.704]drv_disp_init finish
[00.713]Loading Environment from SUNXI_FLASH... OK
[00.732]boot_gui_init:start
partno erro : can't find partition Reserve0
[00.739]lcd_open_flow
[00.742]lcd_cfg_panel_info
[00.745]lcd_power_on
bad fb1_cfg[w=0,h=0,bpp=32,format=0]
[00.775]boot_gui_init:finish
partno erro : can't find partition bootloader
[00.784]bmp_name=bootlogo.bmp size 1152054
[00.845]Item0 (Map) magic is bad
[00.848]the secure storage item0 copy0 magic is bad
[00.853]Item0 (Map) magic is bad
[00.855]the secure storage item0 copy1 magic is bad
[00.860]Item0 (Map) magic is bad
secure storage read widevine fail
secure storage read ec_key fail
secure storage read ec_cert1 fail
secure storage read ec_cert2 fail
secure storage read ec_cert3 fail
secure storage read rsa_key fail
secure storage read rsa_cert1 fail
secure storage read rsa_cert2 fail
secure storage read rsa_cert3 fail
[00.890]u[00.891] tft08006 drivers/video/sunxi/disp2/disp/lcd/tft08006.c lcd_panel_init 162
[00.898]lcd_panel_init
sb burn from boot
delay time 0
weak:otg_phy_config
[01.384]usb prepare ok
[01.435]lcd_bl_open
[01.438]LCD open finish
[01.688]overtime
[01.691]do_burn_from_boot usb : no usb exist
List file under ULI/factory
** Unrecognized filesystem type **
[01.702]update part info
[01.705]update bootcmd
[01.711]change working_fdt 0x5c87ce68 to 0x5c85ce68
get value error
[01.717][mmc]: get sunxi-mmc0 string failed
[01.722]The storage not support sample function
partno erro : can't find partition bootloader
** Unable to read file lcd_compatible_index.txt **
[01.755]disp_fat_load for lcd config failed
partno erro : can't find partition bootloader
writing lcd_compatible_index.txt
16 bytes written
save lcd compatible disp0 index 0 to flash
partno erro : can't find partition bootloader
[01.793]update dts
Hit any key to stop autoboot: 0
[02.205]no vendor_boot partition is found
Android's image name: sun8i_arm
The loading address of the kernel is not in the boot image
ERROR: reserving fdt memory region failed (addr=41b00000 size=100000)
ERROR: reserving fdt memory region failed (addr=5c907000 size=177000)
[02.254]Starting kernel ...

[02.256][mmc]: MMC Device 2 not found
[02.260][mmc]: mmc 2 not find, so not exit
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.4.61 (ubuntu@dshanpi) (arm-linux-gnueabi-gcc (Linaro GCC 5.3-2016.05) 5.3.1 20160412, GNU ld (Linaro_Binutils-2016.05) 2.25.0 Linaro 2016_02) #14 SMP PREEMPT Mon Jul 22 11:47:15 CST 2024
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: sun8iw20
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] Reserved memory: created DMA memory pool at 0x42200000, size 0 MiB
[ 0.000000] OF: reserved mem: initialized node vdev0buffer@42200000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x42244000, size 0 MiB
[ 0.000000] OF: reserved mem: initialized node dsp0_rpbuf@42244000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x42900000, size 0 MiB
[ 0.000000] OF: reserved mem: initialized node vdev0buffer@42900000, compatible id shared-dma-pool
[ 0.000000] cma: Reserved 16 MiB at 0x5f000000
[ 0.000000] On node 0 totalpages: 129120
[ 0.000000] Normal zone: 1024 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 129120 pages, LIFO batch:31
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.0 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] psci: SMC Calling Convention v1.0
[ 0.000000] percpu: Embedded 15 pages/cpu s30976 r8192 d22272 u61440
[ 0.000000] pcpu-alloc: s30976 r8192 d22272 u61440 alloc=15*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 128096
[ 0.000000] Kernel command line: earlycon=uart8250,mmio32,0x02500000 clk_ignore_unused initcall_debug=0 console=ttyS0,115200 loglevel=8 root=/dev/mmcblk0p5 rootwait init=/init partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:env-redund@mmcblk0p3:boot@mmcblk0p4:rootfs@mmcblk0p5:riscv@mmcblk0p6:private@mmcblk0p7:UDISK@mmcblk0p8 cma=16M snum= mac_addr= wifi_mac= bt_mac= specialstr= gpt=1 androidboot.mode=normal androidboot.hardware=sun8iw20p1 boot_type=1 androidboot.boot_type=1 gpt=1 uboot_message=2018.07-g6047f84-dirty(07/20/2024-14:56:41) mbr_offset=1032192 disp_reserve=1536000,0x5c907000 androidboot.dramfreq=792 androidboot.dramsize=512 mtdparts=<NULL> uboot_backup=ubootA
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 470324K/516480K available (7168K kernel code, 426K rwdata, 2608K rodata, 1024K init, 270K bss, 29772K reserved, 16384K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] random: get_random_bytes called from start_kernel+0x250/0x3d0 with crng_init=0
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000017] Switching to timer-based delay loop, resolution 41ns
[ 0.000203] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000882] Console: colour dummy device 80x30
[ 0.000922] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000936] pid_max: default: 32768 minimum: 301
[ 0.001092] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.001106] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.001764] CPU: Testing write buffer coherency: ok
[ 0.002118] /cpus/cpu@0 missing clock-frequency property
[ 0.002141] /cpus/cpu@1 missing clock-frequency property
[ 0.002153] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002767] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.002896] rcu: Hierarchical SRCU implementation.
[ 0.003222] BOOTEVENT: 3.213874: ON
[ 0.003429] smp: Bringing up secondary CPUs ...
[ 0.004678] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.004835] smp: Brought up 1 node, 2 CPUs
[ 0.004849] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[ 0.004856] CPU: All CPU(s) started in SVC mode.
[ 0.005387] devtmpfs: initialized
[ 0.019415] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.020042] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.020070] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[ 0.020959] pinctrl core: initialized pinctrl subsystem
[ 0.022458] NET: Registered protocol family 16
[ 0.024567] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.064795] rtc_ccu: sunxi ccu init OK
[ 0.067424] ccu: sunxi ccu init OK
[ 0.067972] r_ccu: sunxi ccu init OK
[ 0.109210] sun6i-dma 3002000.dma-controller: sunxi dma probed
[ 0.112035] iommu: Default domain type: Translated
[ 0.112259] sunxi iommu: irq = 24
[ 0.113462] SCSI subsystem initialized
[ 0.113853] usbcore: registered new interface driver usbfs
[ 0.113936] usbcore: registered new interface driver hub
[ 0.114264] usbcore: registered new device driver usb
[ 0.114489] mc: Linux media interface: v0.10
[ 0.114549] videodev: Linux video capture interface: v2.00
[ 0.116982] Advanced Linux Sound Architecture Driver Initialized.
[ 0.117727] Bluetooth: Core ver 2.22
[ 0.117811] NET: Registered protocol family 31
[ 0.117820] Bluetooth: HCI device and connection manager initialized
[ 0.117840] Bluetooth: HCI socket layer initialized
[ 0.117853] Bluetooth: L2CAP socket layer initialized
[ 0.117883] Bluetooth: SCO socket layer initialized
[ 0.118140] pwm module init!
[ 0.123223] g2d 5410000.g2d: Adding to iommu group 0
[ 0.123705] G2D: rcq version initialized.major:250
[ 0.124463] input: sunxi-keyboard as /devices/virtual/input/input0
[ 0.126214] clocksource: Switched to clocksource arch_sys_counter
[ 0.136043] sun8iw20-pinctrl pio: initialized sunXi PIO driver
[ 0.150772] thermal_sys: Registered thermal governor 'step_wise'
[ 0.150778] thermal_sys: Registered thermal governor 'user_space'
[ 0.150795] thermal_sys: Registered thermal governor 'power_allocator'
[ 0.151382] NET: Registered protocol family 2
[ 0.152125] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[ 0.152158] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 0.152216] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.152278] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.152384] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.152420] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.152594] NET: Registered protocol family 1
[ 0.155354] Initialise system trusted keyrings
[ 0.155600] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[ 0.167460] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.167766] ntfs: driver 2.1.32 [Flags: R/W].
[ 0.168129] fuse: init (API version 7.31)
[ 0.199405] NET: Registered protocol family 38
[ 0.199446] Key type asymmetric registered
[ 0.199456] Asymmetric key parser 'x509' registered
[ 0.199553] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[ 0.199567] io scheduler mq-deadline registered
[ 0.199575] io scheduler kyber registered
[ 0.199715] atomic64_test: passed
[ 0.201334] [DISP]disp_module_init
[ 0.201962] disp 5000000.disp: Adding to iommu group 0
[ 0.202580] [DISP] disp_init,line:2372:
[ 0.202585] smooth display screen:0 type:1 mode:4
[ 0.219701] lcd_cfg_panel_info
[ 0.219714] tft08006
[ 0.219754] display_fb_request,fb_id:0
[ 0.225832] disp_al_manager_apply ouput_type:1
[ 0.226012] [DISP] lcd_clk_config,line:777:
[ 0.226023] disp 0, clk: pll(300000000),clk(300000000),dclk(25000000) dsi_rate(25000000)
[ 0.226023] clk real:pll(300000000),clk(300000000),dclk(75000000) dsi_rate(150000000)
[ 0.226503] sun8iw20-pinctrl pio: pio supply vcc-pb not found, using dummy regulator
[ 0.226991] [DISP]disp_module_init finish
[ 0.228424] sunxi_sid_init()783 - insmod ok
[ 0.229162] pwm-regulator: supplied by regulator-dummy
[ 0.230898] uart uart0: uart0 supply uart not found, using dummy regulator
[ 0.231263] uart0: ttyS0 at MMIO 0x2500000 (irq = 34, base_baud = 1500000) is a SUNXI
[ 0.231293] sw_console_setup()1831 - console setup baud 115200 parity n bits 8, flow n
[ 0.927605] Freeing logo buffer memory: 1500K
[ 0.931580] printk: console [ttyS0] enabled
[ 1.165082] sun8iw20-pinctrl pio: pio supply vcc-pg not found, using dummy regulator
[ 1.174204] uart uart1: uart1 supply uart not found, using dummy regulator
[ 1.182241] uart1: ttyS1 at MMIO 0x2500400 (irq = 35, base_baud = 1500000) is a SUNXI
[ 1.191849] uart uart2: uart2 supply uart not found, using dummy regulator
[ 1.199913] uart2: ttyS2 at MMIO 0x2500800 (irq = 36, base_baud = 1500000) is a SUNXI
[ 1.209519] uart uart3: uart3 supply uart not found, using dummy regulator
[ 1.217629] uart3: ttyS3 at MMIO 0x2500c00 (irq = 37, base_baud = 1500000) is a SUNXI
[ 1.227557] misc dump reg init
[ 1.231499] deinterlace 5400000.deinterlace: Adding to iommu group 0
[ 1.239197] deinterlace 5400000.deinterlace: version[1.0.0], ip=0x110
[ 1.248108] sunxi-rfkill soc@3000000:rfkill@0: module version: v1.0.9
[ 1.255349] sunxi-rfkill soc@3000000:rfkill@0: get gpio chip_en failed
[ 1.262682] sunxi-rfkill soc@3000000:rfkill@0: get gpio power_en failed
[ 1.270103] sunxi-rfkill soc@3000000:rfkill@0: wlan_busnum (1)
[ 1.276625] sunxi-rfkill soc@3000000:rfkill@0: Missing wlan_power.
[ 1.283535] sunxi-rfkill soc@3000000:rfkill@0: wlan clock[0] (32k-fanout1)
[ 1.291249] sunxi-rfkill soc@3000000:rfkill@0: wlan_regon gpio=44 assert=1
[ 1.298979] sunxi-rfkill soc@3000000:rfkill@0: wlan_hostwake gpio=202 assert=1
[ 1.307077] sunxi-rfkill soc@3000000:rfkill@0: wakeup source is enabled
[ 1.314730] sunxi-rfkill soc@3000000:rfkill@0: Missing bt_power.
[ 1.321495] sunxi-rfkill soc@3000000:rfkill@0: bt clock[0] (32k-fanout1)
[ 1.329013] sunxi-rfkill soc@3000000:rfkill@0: bt_rst gpio=210 assert=0
[ 1.337449] [ADDR_MGT] addr_mgt_probe: module version: v1.0.11
[ 1.344654] [ADDR_MGT] addr_init: Failed to get type_def_bt, use default: 0
[ 1.352472] [ADDR_MGT] addr_mgt_probe: success.
[ 1.359541] libphy: Fixed MDIO Bus: probed
[ 1.364117] CAN device driver interface
[ 1.369576] sunxi-awlink awlink@0x0: awlink driver probe ok ...
[ 1.377262] sunxi-awlink awlink@0x1: awlink driver probe ok ...
[ 1.384841] sun8iw20-pinctrl pio: pio supply vcc-pe not found, using dummy regulator
[ 1.394018] gmac-power0: NULL
[ 1.397369] gmac-power1: NULL
[ 1.400675] gmac-power2: NULL
[ 1.405188] Failed to alloc md5
[ 1.408767] eth0: Use random mac address
[ 1.413605] usbcore: registered new interface driver asix
[ 1.419753] usbcore: registered new interface driver ax88179_178a
[ 1.426665] usbcore: registered new interface driver cdc_ether
[ 1.433246] usbcore: registered new interface driver net1080
[ 1.439685] usbcore: registered new interface driver cdc_subset
[ 1.446372] usbcore: registered new interface driver zaurus
[ 1.452673] usbcore: registered new interface driver cdc_ncm
[ 1.459022] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.466316] sunxi-ehci: EHCI SUNXI driver
[ 1.471276] get drvvbus-en is fail, 22
[ 1.475482] get ehci0-controller wakeup-source is fail.
[ 1.481447] sunxi ehci0-controller don't init wakeup source
[ 1.487684] [sunxi-ehci0]: probe, pdev->name: 4101000.ehci0-controller, sunxi_ehci: 0xc0c911a8, 0x:e083d000, irq_no:39
[ 1.499644] [sunxi-ehci0]: Not init ehci0
[ 1.504442] get drvvbus-en is fail, 22
[ 1.508667] get ehci1-controller wakeup-source is fail.
[ 1.514596] sunxi ehci1-controller don't init wakeup source
[ 1.520833] [sunxi-ehci1]: probe, pdev->name: 4200000.ehci1-controller, sunxi_ehci: 0xc0c91708, 0x:e0883000, irq_no:3b
[ 1.533068] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply hci not found, using dummy regulator
[ 1.545407] sunxi-ehci 4200000.ehci1-controller: EHCI Host Controller
[ 1.552682] sunxi-ehci 4200000.ehci1-controller: new USB bus registered, assigned bus number 1
[ 1.562829] sunxi-ehci 4200000.ehci1-controller: irq 59, io mem 0x04200000
[ 1.596245] sunxi-ehci 4200000.ehci1-controller: USB 2.0 started, EHCI 1.00
[ 1.604018] sunxi-ehci 4200000.ehci1-controller: ehci_irq: highspeed device connect
[ 1.613608] hub 1-0:1.0: USB hub found
[ 1.617868] hub 1-0:1.0: 1 port detected
[ 1.623079] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.630064] sunxi-ohci: OHCI SUNXI driver
[ 1.635039] get drvvbus-en is fail, 22
[ 1.639251] get ohci0-controller wakeup-source is fail.
[ 1.645224] sunxi ohci0-controller don't init wakeup source
[ 1.651460] [sunxi-ohci0]: probe, pdev->name: 4101400.ohci0-controller, sunxi_ohci: 0xc0c91458
[ 1.661074] [sunxi-ohci0]: Not init ohci0
[ 1.665865] get drvvbus-en is fail, 22
[ 1.670071] get ohci1-controller wakeup-source is fail.
[ 1.676009] sunxi ohci1-controller don't init wakeup source
[ 1.682265] [sunxi-ohci1]: probe, pdev->name: 4200400.ohci1-controller, sunxi_ohci: 0xc0c919b8
[ 1.692144] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply hci not found, using dummy regulator
[ 1.704515] sunxi-ohci 4200400.ohci1-controller: OHCI Host Controller
[ 1.711757] sunxi-ohci 4200400.ohci1-controller: new USB bus registered, assigned bus number 2
[ 1.721673] sunxi-ohci 4200400.ohci1-controller: irq 60, io mem 0x04200400
[ 1.801252] hub 2-0:1.0: USB hub found
[ 1.805486] hub 2-0:1.0: 1 port detected
[ 1.810986] usbcore: registered new interface driver uas
[ 1.817104] usbcore: registered new interface driver usb-storage
[ 1.823869] usbcore: registered new interface driver ums-alauda
[ 1.830560] usbcore: registered new interface driver ums-cypress
[ 1.837545] usbcore: registered new interface driver ums-datafab
[ 1.844310] usbcore: registered new interface driver ums_eneub6250
[ 1.851327] usbcore: registered new interface driver ums-freecom
[ 1.858124] usbcore: registered new interface driver ums-isd200
[ 1.864785] usbcore: registered new interface driver ums-jumpshot
[ 1.871682] usbcore: registered new interface driver ums-karma
[ 1.878269] usbcore: registered new interface driver ums-onetouch
[ 1.885168] usbcore: registered new interface driver ums-realtek
[ 1.891953] usbcore: registered new interface driver ums-sddr09
[ 1.898659] usbcore: registered new interface driver ums-sddr55
[ 1.905349] usbcore: registered new interface driver ums-usbat
[ 1.913084] input: sunxi-ts as /devices/platform/soc@3000000/2009c00.rtp/input/input1
[ 1.922953] sunxi_gpadc_init,2228, success
[ 1.928184] sunxi_gpadc_setup: get channel scan data failed
[ 1.934675] input: sunxi-gpadc0 as /devices/virtual/input/input2
[ 1.942514] sunxi-rtc 7090000.rtc: errata__fix_alarm_day_reg_default_value(): ALARM0_DAY_REG=0, set it to 1
[ 1.954911] sunxi-rtc 7090000.rtc: registered as rtc0
[ 1.960724] sunxi-rtc 7090000.rtc: setting system clock to 1970-01-01T00:00:04 UTC (4)
[ 1.969629] sunxi-rtc 7090000.rtc: Fail to read dts property 'gpr_bootcount_pos'
[ 1.977916] reasonbase NULL
[ 1.981027] reason large than max, fix to hot reboot, save boot reason
[ 1.988355] usb 1-1: new high-speed USB device number 2 using sunxi-ehci
[ 1.995889] invalid reason or reasonbase NULL
[ 2.000873] sunxi-rtc 7090000.rtc: sunxi rtc probed
[ 2.006907] i2c /dev entries driver
[ 2.011138] IR NEC protocol handler initialized
[ 2.016191] IR RC5(x/sz) protocol handler initialized
[ 2.024462] usbcore: registered new interface driver uvcvideo
[ 2.030913] USB Video Class driver (1.1.1)
[ 2.035480] gspca_main: v2.14.0 registered
[ 2.040083] sunxi cedar version 1.1
[ 2.044199] sunxi-cedar 1c0e000.ve: Adding to iommu group 0
[ 2.050514] VE: sunxi_cedar_probe power-domain init!!!
[ 2.056282] VE: install start!!!
[ 2.056282]
[ 2.061856] VE: cedar-ve the get irq is 44
[ 2.061856]
[ 2.068323] VE: ve_debug_proc_info:(ptrval), data:(ptrval), lock:(ptrval)
[ 2.068323]
[ 2.077701] VE: install end!!!
[ 2.077701]
[ 2.082752] VE: sunxi_cedar_probe
[ 2.087951] sunxi-wdt 20500a0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 2.097186] Bluetooth: HCI UART driver ver 2.3
[ 2.102145] Bluetooth: HCI UART protocol H4 registered
[ 2.108184] Bluetooth: XRadio Bluetooth LPM Mode Driver Ver 1.0.10
[ 2.115390] [XR_BT_LPM] bluesleep_probe: bt_wake polarity: 1
[ 2.121790] [XR_BT_LPM] bluesleep_probe: host_wake polarity: 1
[ 2.128348] [XR_BT_LPM] bluesleep_probe: wakeup source is disabled!
[ 2.128348]
[ 2.136998] [XR_BT_LPM] bluesleep_probe: uart_index(1)
[ 2.146025] sunxi-mmc 4020000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.25 2022-6-21 13:40)
[ 2.156044] sunxi-mmc 4020000.sdmmc: ***ctl-spec-caps*** 8
[ 2.162311] sunxi-mmc 4020000.sdmmc: No vmmc regulator found
[ 2.168674] sunxi-mmc 4020000.sdmmc: No vqmmc regulator found
[ 2.175103] sunxi-mmc 4020000.sdmmc: No vdmmc regulator found
[ 2.181535] sunxi-mmc 4020000.sdmmc: No vd33sw regulator found
[ 2.188055] sunxi-mmc 4020000.sdmmc: No vd18sw regulator found
[ 2.194569] sunxi-mmc 4020000.sdmmc: No vq33sw regulator found
[ 2.201141] sunxi-mmc 4020000.sdmmc: No vq18sw regulator found
[ 2.209226] hub 1-1:1.0: USB hub found
[ 2.213509] sunxi-mmc 4020000.sdmmc: Got CD GPIO
[ 2.218746] hub 1-1:1.0: 4 ports detected
[ 2.223915] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.235123] sunxi-mmc 4020000.sdmmc: no vqmmc,Check if there is regulator
[ 2.255768] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.278462] sunxi-mmc 4020000.sdmmc: detmode:gpio polling
[ 2.284520] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.286918] sunxi-mmc 4021000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.25 2022-6-21 13:40)
[ 2.299331] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.305960] sunxi-mmc 4021000.sdmmc: ***ctl-spec-caps*** 8
[ 2.319605] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.323401] sunxi-mmc 4021000.sdmmc: No vmmc regulator found
[ 2.337876] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.341206] sunxi-mmc 4021000.sdmmc: No vqmmc regulator found
[ 2.359163] sunxi-mmc 4021000.sdmmc: No vdmmc regulator found
[ 2.365570] sunxi-mmc 4021000.sdmmc: No vd33sw regulator found
[ 2.372091] sunxi-mmc 4021000.sdmmc: No vd18sw regulator found
[ 2.378607] sunxi-mmc 4021000.sdmmc: No vq33sw regulator found
[ 2.385110] sunxi-mmc 4021000.sdmmc: No vq18sw regulator found
[ 2.391649] sunxi-mmc 4021000.sdmmc: Cann't get pin bias hs pinstate,check if needed
[ 2.400211] mmc0: host does not support reading read-only switch, assuming write-enable
[ 2.409623] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.412068] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[ 2.420759] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator
[ 2.432333] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[ 2.451630] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(SDR25) dt B
[ 2.452316] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.463357] mmc0: new high speed SDHC card at address aaaa
[ 2.482080] mmcblk0: mmc0:aaaa SD32G 29.7 GiB
[ 2.486302] sunxi-mmc 4021000.sdmmc: detmode:manually by software
[ 2.490431] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8
[ 2.494892] usbcore: registered new interface driver usbhid
[ 2.505018] usbhid: USB HID core driver
[ 2.505797] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !!
[ 2.509330] exFAT: Version 1.3.0
[ 2.520236] sunxi-msgbox 3003000.msgbox: sunxi_msgbox_probe(): sunxi msgbox start probe
[ 2.520518] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !!
[ 2.529547] sunxi-msgbox 3003000.msgbox: sunxi_msgbox_probe(): sunxi msgbox probe success
[ 2.545134] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.547068] sunxi-rproc 3000008.dsp_rproc: sunxi rproc driver 2.2.1
[ 2.563769] sunxi-rproc 3000008.dsp_rproc: failed to get firmware-name
[ 2.571125] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.576854] remoteproc remoteproc0: dsp_rproc is available
[ 2.588815] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[ 2.595569] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[ 2.602296] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[ 2.609031] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[ 2.609059] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[ 2.615808] sunxi-rproc 3000008.dsp_rproc: sunxi rproc driver probe ok
[ 2.634297] sunxi-rproc 6010000.c906_rproc: sunxi rproc driver 2.2.1
[ 2.641901] remoteproc remoteproc1: c906_rproc is available
[ 2.648252] sunxi-rproc 6010000.c906_rproc: sunxi rproc driver probe ok
[ 2.656757] sunxi-rpbuf-controller rpbuf_controller@0: assigned reserved memory node dsp0_rpbuf@42244000
[ 2.672441] NET: Registered protocol family 10
[ 2.678672] Segment Routing with IPv6
[ 2.682851] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 2.691195] NET: Registered protocol family 17
[ 2.696182] NET: Registered protocol family 15
[ 2.701178] can: controller area network core (rev 20170425 abi 9)
[ 2.708221] NET: Registered protocol family 29
[ 2.713182] can: raw protocol (rev 20170425)
[ 2.717969] can: broadcast manager protocol (rev 20170425 t)
[ 2.724299] can: netlink gateway (rev 20190810) max_hops=1
[ 2.730876] Bluetooth: RFCOMM TTY layer initialized
[ 2.736377] Bluetooth: RFCOMM socket layer initialized
[ 2.742150] Bluetooth: RFCOMM ver 1.11
[ 2.747264] Registering SWP/SWPB emulation handler
[ 2.752988] Loading compiled-in X.509 certificates
[ 2.777588] sun8iw20-pinctrl pio: pio supply vcc-pd not found, using dummy regulator
[ 2.786675] sunxi-twi 2502800.twi: 2502800.twi supply twi not found, using dummy regulator
[ 2.797495] input: fts_ts as /devices/platform/soc@3000000/2502800.twi/i2c-2/2-0038/input/input3
[ 2.836397] fts_ts 2-0038: 2-0038 supply not found, using dummy regulator
[ 2.844321] fts_ts 2-0038: 2-0038 supply not found, using dummy regulator
[ 2.852062] debugfs: Directory '2-0038-' with parent 'reg-dummy-regulator-dummy' already present!
[ 3.354467] random: fast init done
[ 3.716619] sunxi:i2c_sunxi@2502800.twi[INFO]: v2.6.5 probe success
[ 3.724778] sunxi-thermal 2009400.ths: sun8iw20 cp version:15
[ 3.767971] get det_vbus is fail, -84
[ 3.772048] get id is fail, -84
[ 3.775562] otg manager soc@3000000:usbc0@0: soc@3000000:usbc0@0 supply usbc not found, using dummy regulator
[ 3.789499] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 3.800586] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 3.808071] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 3.816245] clk: Not disabling unused clocks
[ 3.817757] cfg80211: failed to load regulatory.db
[ 3.822431] ALSA device list:
[ 3.831052] No soundcards found.
[ 3.834837] alloc_fd: slot 0 not NULL!
[ 3.850650] EXT4-fs (mmcblk0p5): mounted filesystem with ordered data mode. Opts: (null)
[ 3.859789] VFS: Mounted root (ext4 filesystem) readonly on device 179:5.
[ 3.868426] devtmpfs: mounted
[ 3.873394] Freeing unused kernel memory: 1024K
[ 3.896389] Kernel init done
[ 3.899596] Run /init as init process
can't run '/etc/preinit': No such file or directory
[ 4.040002] EXT4-fs (mmcblk0p5): re-mounted. Opts: (null)
Starting syslogd: OK
Starting klogd: OK
Populating /dev using udev: [ 4.350067] udevd[1179]: starting version 3.2.7
[ 4.370122] random: udevd: uninitialized urandom read (16 bytes read)
[ 4.379021] random: udevd: uninitialized urandom read (16 bytes read)
[ 4.386336] random: udevd: uninitialized urandom read (16 bytes read)
[ 4.401245] udevd[1179]: specified group 'input' unknown
[ 4.408029] udevd[1179]: specified group 'kvm' unknown
[ 4.440122] udevd[1181]: starting eudev-3.2.7
done
Initializing random number generator... done.
Starting system message bus: done
Starting network: OK
usb0 current mode: null
Starting switch usb0 to device mode.
[ 6.566236]
[ 6.566236] insmod_device_driver
[ 6.566236]
[ 6.573428] sunxi_usb_udc 4100000.udc-controller: 4100000.udc-controller supply udc not found, using dummy regulator
device_chose finished!
Starting adb: [ 6.651817] file system registered
OK
init adb main
[ 6.700692] read descriptors
Handling main()
[ 6.704297] read strings
Initializing postgresql data base...
su: unknown user postgres
done
Starting postgresql: su: unknown user postgres
OK
/etc/init.d/S50powerkey_display: line 12: powerkey_display: command not found
/etc/init.d/S50powerkey_suspend: line 12: powerkey_suspend: command not found
[ 6.848720] [EXFAT] trying to mount...
formating /dev/by-name/UDISK to vfat...
mkfs.fat 4.1 (2017-01-24)
[ 13.050669] random: crng init done
[ 13.054467] random: 7 urandom warning(s) missed due to ratelimiting

Starting dnsmasq: OK
Trying to connect to SWUpdate...
swu_param: ####
swu_software: ####
swu_mode: ####
no swupdate_cmd to run, wait for next swupdate
#


QT适配

运行qt程序,需要很多相应的动态库,下面讲解如何在buildroot工具里编译QT动态库,并成功编译一个qtdemo。

1.搭建QT开发环境

在Ubuntu上,进入SDK根目录t113i_tinasdk5.0-v1

前面开发环境搭建章节已经搭建好了开发环境,先执行 source build/envsetup.sh,再执行./build.sh buildroot_menuconfig 进入buildroot配置界面。

找到Target packages,进入。

image-20240730103356980

找到Graphic libraries and applications,进入。

image-20240730103449997

找到QT5,点击键盘y,并进入。

image-20240730103526051

点击键盘y,选上以下选项。

image-20240730103743271

image-20240730103947554

image-20240730104020154

注意:先不要编译例程,因为目前交叉编译工具链中还没有相应的库文件,编译例程会出现错误。要把以上的库文件先编译。

保存退出。

执行./build.sh,编译程序。编译完成后,交叉编译工具链中自动会有相对应的库文件,这样就可以去编译qt应用程序了。

如果前面误操作选上了例程,编译时会出现报错(即便把例程取消再编译),

需要到t113i_tinasdk5.0-v1/out/t113_i/evb1_auto/buildroot/buildroot/build目录下,把相应的库文件和例程文件删除,再重新编译。

2.编译及运行QT应用程序

上面搭建好环境之后,就可以选择编译qt例程了。

进入SDK根目录t113i_tinasdk5.0-v1

执行./build.sh buildroot_menuconfig,进入buildroot配置界面。

找到Target packages,进入。

image-20240730105942803

找到 allwinner platform private package select,进入。

image-20240730110022974

找到qt_demo,进入。

image-20240730110052980

点击键盘y,选上以下选项。

image-20240730110136442

保存退出。

执行./build.sh编译程序。

SDK中已为qt-demo编写了一份开机自启动的脚本,

脚本保存在t113i_tinasdk5.0-v1/buildroot/config/buildroot/allwinner/system/busybox-init-base-files/etc/init.d/S70launcher

ubuntu@dshanpi:~/meihao/t113i_tinasdk5.0-v1/buildroot/config/buildroot/allwinner/system/busybox-init-base-files/etc/init.d$ pwd
/home/ubuntu/meihao/t113i_tinasdk5.0-v1/buildroot/config/buildroot/allwinner/system/busybox-init-base-files/etc/init.d
ubuntu@dshanpi:~/meihao/t113i_tinasdk5.0-v1/buildroot/config/buildroot/allwinner/system/busybox-init-base-files/etc/init.d$ ls
S20mdev S50adb_start S50powerkey_display S50powerkey_suspend S60mount_udisk S70launcher
ubuntu@dshanpi:~/meihao/t113i_tinasdk5.0-v1/buildroot/config/buildroot/allwinner/system/busybox-init-base-files/etc/init.d$
 

image-20240730111009494

可以在该脚本S70launcher中修改或者配置显示设备节点和触摸设备节点。

#!/bin/sh
#
# Start the launcher
#

case "$1" in
start)
if [ ! -f "/usr/bin/Launcher" ];then
exit 1
fi

if [ -d "/usr/local/Qt_5.12.5" ];then
export QTDIR=/usr/local/Qt_5.12.5
else
export QTDIR=/usr/lib
fi

if [ -d $QTDIR ];then

export QT_ROOT=$QTDIR
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:/usr/lib/cedarx/:$LD_LIBRARY_PATH

export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
export QT_QPA_PLATFORM=linuxfb:tty=/dev/fb0
export QT_QPA_FONTDIR=$QT_ROOT/fonts

TouchDevice=fts_ts
for InputDevices in /sys/class/input/input*
do
DeviceName=`cat $InputDevices/name`
if [ "$DeviceName" == "$TouchDevice" ];then
TouchDeviceNum=${InputDevices##*input}
export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event$TouchDeviceNum
echo "add "/dev/input/event$TouchDeviceNum "to Qt Application."
break
fi
done
if [ ! -n "$TouchDeviceNum" ]; then
echo "Error:Input device $TouchDevice can not be found,plz check it!"
fi

if [ -d "/usr/local/Qt_5.12.5" ];then
export QT_QPA_PLATFORM=eglfs
export QT_QPA_GENERIC_PLUGINS=evdevtouch
export QT_QPA_EGLFS_INTEGRATION=eglfs_mali
else
export QT_QPA_FONTDIR=/usr/lib/fonts
export QT_QPA_GENERIC_PLUGINS=tslib
#export QT_QPA_GENERIC_PLUGINS=evdevmouse:/dev/input/event4
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_CONSOLEDEVICE=none
export TSLIB_TSDEVICE=/dev/input/event3
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_PLUGINDIR=/usr/lib/ts
fi

export QWS_MOUSE_PROTO=
mkdir -p /dev/shm
ulimit -c unlimited
Launcher &
fi
;;
stop)]
;;
*)
echo "Usage: $0 {start}"
exit 1
;;
esac

exit 0
 

修改完成后,回到SDK根目录t113i_tinasdk5.0-v1

执行./build.sh编译程序。

注意:要确保 t113i_tinasdk5.0-v1/out/t113_i/evb1_auto/buildroot/buildroot/build/busybox-init-base-files/etc/init.d 目录下的 S70launcher 脚本文件与上面的修改的相对应,否则需要删除 busybox-init-base-files 文件,再重新编译。

编译成功后,执行./build.sh pack进行打包。烧录到开发板上。

...
Starting adb: [ 7.930514] file system registered
OK
init adb main[ 7.981491] read descriptors

Handling main()
[ 7.985095] read strings
Initializing postgresql data base...
su: unknown user postgres
done
Starting postgresql: su: unknown user postgres
OK
/etc/init.d/S50powerkey_display: line 12: powerkey_display: command not found
/etc/init.d/S50powerkey_suspend: line 12: powerkey_suspend: command not found
[ 8.130511] FAT-fs (mmcblk0p8): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
/dev/by-name/UDISK already forma[ 8.144528] sunxi_set_cur_vol_work()422 WARN: get power supply failed
t
[ 8.187954] FAT-fs (mmcblk0p8): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 8.230945] android_work: sent uevent USB_STATE=CONNECTED
add /dev/input/event3 to Qt Application.
Starting dnsmasq: [ 8.324039] configfs-gadget gadget: high-speed config #1: c
[ 8.330520] android_work: sent uevent USB_STATE=CONFIGURED
[ 8.484259] urandom_read: 2 callbacks suppressed
[ 8.484270] random: dnsmasq: uninitialized urandom read (128 bytes read)
OK
Trying to connect to SWUpdate...
swu_param: ####
swu_software: ####
swu_mode: ####
no swupdate_cmd to run, wait for next swupdate
# [ 14.056782] random: crng init done
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
xkbcommon: ERROR: failed to add default include path /usr/share/X11/xkb
Failed to create xkb context
load filemanager_zh ok;
load qt_zh_CN ok;
load qfile_zh ok;
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
#
 

可以看到qt-demo已经在后台中运行。

image-20240730112210544

完整的界面并不是这样,需要修改相应的分辨率适配mipi屏幕。

 

posted @ 2024-08-21 10:02  韦东山  阅读(20)  评论(0编辑  收藏  举报