发现问题:
用12月16号的补丁,能正常编译。
再打上19号的补丁,却要求重新配置,一堆的选择项,不知道是什么原因?用的是480x272的电阻屏。
刚开始用linux,不了解linux。还有,别再要求积分下载,用不起。
关键是:下载浪费积分不说,还不好用。
从网站上下载资料,就跟赌博一样,一个不小心,下载无用的东西。
@吴助建
1、要修改的内容都很写明白了,修改两个地方就可以
2、19号的你可以跟16号的对比下,只是修改了说的那两个地方
3、19号只是提供个可以直接用的补丁和固件,方便大家可以直接测试,要不要积分也不是我决定的
4、你说的要配置一堆的选择项看看是不是哪里的配置变了
这个我都是自己用了没问题才发的,不坑人 ,上面那个也用了没问题啊
占楼备用,后面添加详细内容。
上面运行后发现刚上电屏幕很亮,但是过一会屏幕就变暗了(或者说变蓝了),这不能忍。
原因分析:
通过日志看到是在启动内核后变暗的。
这个是启动内核后出现的,看一下内核设备树,可以发现 PD17 引脚被 dmic 占用了:
tina-d1-open/lichee/linux-5.4/arch/riscv/boot/dts/sunxi/sun20iw1p1.dtsi:
rgb18_pins_a: rgb18@0 {
pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", \
"PD6", "PD7", "PD8", "PD9", "PD10", "PD11", \
"PD12", "PD13", "PD14", "PD15", "PD16", "PD17", \
"PD18", "PD19", "PD20", "PD21";
function = "lcd0";
drive-strength = <30>;
bias-disable;
};
tina-d1-open/device/config/chips/d1/configs/mangopi_mq_rgb800x480_gt9xx/board.dts:(这里是编译后拷贝了 linux-5.4/board.dts)
dmic_pins_a: dmic@0 {
/* DMIC_PIN: CLK, DATA0, DATA1, DATA2 */
pins = "PE17", "PB11", "PB10", "PD17";
function = "dmic";
drive-strength = <20>;
bias-disable;
};
LCD部分原理图:
修改方法:
修改设备树,把 `dmic` 关了。
tina-d1-open/device/config/chips/d1/configs/mangopi_mq_rgb800x480_gt9xx/linux-5.4/board.dts
tina-d1-open/device/config/chips/d1/configs/mangopi_mq_rgb480x272_rtp/linux-5.4/board.dts
&dmic {
pinctrl-names = "default","sleep";
pinctrl-0 = <&dmic_pins_a>;
pinctrl-1 = <&dmic_pins_b>;
status = "disabled";
};
修改后补丁包和镜像:
芒果派麻雀固件与源码补丁2021-12-19(修改LCD变暗问题).zip
论坛没找到开发板上手的教程,所以站在晕哥的肩膀上,总结下麻雀的上手编译流程 。
这里粗浅的分析一下适配开发板需要做的修改。
做一些简单的总结和注释 。
正文开始
SDK百度云下载:提取码: 6666 解压密码: whycan.com
SDK官方下载:全志客户服务平台-SDK下载
官方下载说明:资源下载说明
官方教程:D1 官方在线开发教程
官方介绍:Tina Linux 系统介绍
Tina Linux 基于 openwrt-14.07 版本的,可以参考下 MT7628学习笔记(3)——openwrt源码目录分析(OpenWrt CC1505 版本移植)
Tina-SDK/
├── build # 构建系统文件
├── config # 配置菜单的界面以及一些固定的配置项,该配置菜单基于内核的 mconf 规格编写
├── Config.in # 菜单项配置文件。和 make menuconfig 相关联的文件
├── device # 用于存放方案的配置文件,包括内核配置、env 配置、分区表配置、sys_config.fex(全志定制板级配置文件)、board.dts(linux标准设备树文件) 等
├── dl # 软件包文件
├── lichee # 存放 bootloader、linux内核、DSP等代码
├── Makefile # 在顶层目录执行 make 命令的入口文件
├── out # 编译相关的临时文件和最终镜像文件 ,编译后自动生成此目录
├── package # 存放Tina系统支持的软件包源码和编译规则
├── prebuilt # 存放预编译交叉编译器
├── rules.mk # 定义了 Makefile 中使用的一些通用变量和函数
├── scripts # 存放host端(PC端,下同)或target端(小机端,即目标机器,下同)使用的一些脚本
├── target # 存放目标板相关的配置以及sdk和toolchain生成的规格
├── tmp # 临时文件夹。编译过程中的临时文件保存。
├── toolchain # 交叉工具链构建配置、规则
└── tools # 存放 host 端工具的编译规则
# 更新
$ sudo apt-get update
# 安装依赖包
$ sudo apt-get install build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip lib32z1 lib32z1-dev lib32stdc++6 libstdc++6 -y
# Ubuntu 16.04以上版本执行
sudo apt-get install libc6:i386 libstdc++6:i386 lib32ncurses5 lib32z1
5寸800x480,4.3寸480x272补丁:芒果派麻雀固件与源码补丁2021-12-16.7z
补丁修改文件分析:
config 配置修改:
lichee/
└── brandy-2.0
└── u-boot-2018
└── .config
以下是 .config 配置文件修改的地方:
#
# sunxi board feature
#
CONFIG_SUNXI_ADVERT_PICTURE=y
#
# SUNXI LOGO DISPLAY
#
# CONFIG_HDMI2_DISP2_SUNXI is not set
#
# LCD panels select
#
CONFIG_LCD_SUPPORT_WILLIAMLCD=y
CONFIG_LCD_SUPPORT_LQ101R1SX03=y
CONFIG_LCD_SUPPORT_INET_DSI_PANEL=y
# CONFIG_LCD_SUPPORT_BP101WX1 is not set
# CONFIG_LCD_SUPPORT_K101IM2QA04 is not set
# CONFIG_LCD_SUPPORT_K101IM2BYL02L is not set
# CONFIG_LCD_SUPPORT_FX070 is not set
# CONFIG_LCD_SUPPORT_K080_IM2HYL802R_800X1280 is not set
# CONFIG_LCD_SUPPORT_TFT08006 is not set
在以下位置增加对应的开发板/方案配置:
.
├── device
│ └── config
│ └── chips
│ └── d1
│ └── configs
│ ├── mangopi_mq_rgb480x272_rtp
│ └── mangopi_mq_rgb800x480_gt9xx
├── package
│ └── allwinner
│ └── alsa-conf-aw
│ └── files
│ └── d1
│ ├── d1-mangopi_mq_rgb480x272_rtp
│ └── d1-mangopi_mq_rgb800x480_gt9xx
└── target
└── allwinner
├── d1-mangopi_mq_rgb480x272_rtp
└── d1-mangopi_mq_rgb800x480_gt9xx
开发板/方案名的定义在:/target/allwinner/d1-mangopi_mq_rgb800x480_gt9xx/vendorsetup.sh:
add_lunch_combo d1_mangopi_mq_rgb800x480_gt9xx-tina
# 把补丁解压到SDK目录下就行了
tar -xzvf d1-mangopi_mq_20211216.tgz <sdk目录>
选择对应的开发板/方案 d1_mangopi_mq_rgb800x480_gt9xx-tina:
# 获取环境变量(打开新终端时执行)
source build/envsetup.sh
# 方案选择(打开新终端时执行)
$ lunch
You're building on Linux
Lunch menu... pick a combo:
1. d1_mangopi_mq_rgb480x272_rtp-tina # 麻雀 480x272屏
2. d1_mangopi_mq_rgb800x480_gt9xx-tina # 麻雀 800x480屏
3. d1_nezha_min-tina # d1_nezha-tina 是哪吒d1标准方案
4. d1_nezha-tina # d1_nezha_min-tina 是哪吒d1只能让系统跑起来的最小系统方案
Which would you like? [Default d1_nezha]: 2
============================================
TINA_BUILD_TOP=/home/pjw/Allwinner/D1s/tina-d1-open
TINA_TARGET_ARCH=riscv
TARGET_PRODUCT=d1_mangopi_mq_rgb800x480_gt9xx
TARGET_PLATFORM=d1
TARGET_BOARD=d1-mangopi_mq_rgb800x480_gt9xx
TARGET_PLAN=mangopi_mq_rgb800x480_gt9xx
TARGET_BUILD_VARIANT=tina
TARGET_BUILD_TYPE=release
TARGET_KERNEL_VERSION=5.4
TARGET_UBOOT=u-boot-2018
TARGET_CHIP=sun20iw1p1
============================================
# 编译
make -j16
# 编译完成
#### make completed successfully (25:29 (mm:ss)) ####
# 打包,将编译好的固件打包成一个.img格式的固件。
# 固件路径 /out/d1-mangopi_mq_rgb800x480_gt9xx/tina_d1-mangopi_mq_rgb800x480_gt9xx_uart0.img
pack
# BuildImg 0
# Dragon execute image.cfg SUCCESS !
# ----------image is for nand/emmc----------
# ----------image is at----------
#
# tina-d1-open/out/d1-mangopi_mq_rgb800x480_gt9xx/tina_d1-mangopi_mq_rgb800x480_gt9xx_uart0.img
#
# pack finish
单独编译命令:
# 单独编译boot0和uboot:(可在Tina任意目录下使用)
mboot
# 单独编译boot0:(可在Tina任意目录下使用)
mboot0
# 单独编译uboot:(可在Tina任意目录下使用)
muboot
# 单独编译内核:(可在Tina任意目录下使用)
mkernel
# 单独编译某个包:(只能在编译的包路径下操作)
# 如包路径为 tina/package/utils/rwcheck,则需要进入到 tina/package/utils/rwcheck路径下再输入 mm 命令,
# 编译出来对应的安装包的路径在 tina/out/d1-nezha/packages/base下
mm
# 在根目录下编译某个软件包:(需要在根目录下操作)
make <应用包的路径>/install # 如 make package/utils/rwcheck/install
# 在根目录下清空应用包临时文件:(需要在根目录下操作)
make <应用包的路径>/clean # 如 make package/utils/rwcheck/clean
全志在线开发者社区——工具下载
固件在 out/d1-mangopi_mq_rgb800x480_gt9xx/tina_d1-mangopi_mq_rgb800x480_gt9xx_uart0.img,这里使用 PhoenixCard 烧录:
TF卡插入开发板上电,uart0 为控制台。
**uart0 引脚示意:**
**运行图:**
[32]HELLO! BOOT0 is starting!
[35]BOOT0 commit : 27369ab
[38]set pll start
[39]periph0 has been enabled
[42]set pll end
[44][pmu]: bus read error
[46]board init ok
[48]ZQ value = 0x2f***********
[51]get_pmu_exist() = -1
[53]ddr_efuse_type: 0xa
[56][AUTO DEBUG] single rank and full DQ!
[60]ddr_efuse_type: 0xa
[63][AUTO DEBUG] rank 0 row = 13
[66][AUTO DEBUG] rank 0 bank = 4
[69][AUTO DEBUG] rank 0 page size = 2 KB
[73]DRAM BOOT DRIVE INFO: V0.24
[75]DRAM CLK = 528 MHz
[78]DRAM Type = 2 (2:DDR2,3:DDR3)
[81]DRAMC read ODT off.
[83]DRAM ODT off.
[85]ddr_efuse_type: 0xa
[88]DRAM SIZE =64 M
[91]DRAM simple test OK.
[93]dram size =64
[95]card no is 0
[97]sdcard 0 line count 4
[99][mmc]: mmc driver ver 2021-04-2 16:45
[108][mmc]: Wrong media type 0x0
[111][mmc]: ***Try SD card 0***
[120][mmc]: HSSDR52/SDR25 4 bit
[123][mmc]: 50000000 Hz
[125][mmc]: 29819 MB
[127][mmc]: ***SD/MMC 0 init OK!!!***
[175]Loading boot-pkg Succeed(index=0).
[179]Entry_name = opensbi
[182]Entry_name = u-boot
[185]Entry_name = dtb
[188]mmc not para
[190]Jump to second Boot.
OpenSBI v0.6
____ _____ ____ _____
/ __ \ / ____| _ \_ _|
| | | |_ __ ___ _ __ | (___ | |_) || |
| | | | '_ \ / _ \ '_ \ \___ \| _ < | |
| |__| | |_) | __/ | | |____) | |_) || |_
\____/| .__/ \___|_| |_|_____/|____/_____|
| |
|_|
Platform Name : T-HEAD Xuantie Platform
Platform HART Features : RV64ACDFIMSUVX
Platform Max HARTs : 1
Current Hart : 0
Firmware Base : 0x40000400
Firmware Size : 75 KB
Runtime SBI Version : 0.2
MIDELEG : 0x0000000000000222
MEDELEG : 0x000000000000b1ff
PMP0 : 0x0000000040000000-0x000000004001ffff (A)
PMP1 : 0x0000000040000000-0x000000007fffffff (A,R,W,X)
PMP2 : 0x0000000080000000-0x00000000bfffffff (A,R,W,X)
PMP3 : 0x0000000000020000-0x0000000000027fff (A,ÿ
U-Boot 2018.05-g0a88ac9-config-dirty (Dec 18 2021 - 22:57:39 +0800) Allwinner Technology
[00.273]DRAM: 64 MiB
[00.276]Relocation Offset is: 01ef0000
[00.280]secure enable bit: 0
[00.283]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz
[00.289]flash init start
[00.291]workmode = 0,storage type = 1
[00.295][mmc]: mmc driver ver uboot2018:2021-04-16 14:23:00-1
[00.300][mmc]: get sdc_type fail and use default host:tm1.
[00.306][mmc]: can't find node "mmc0",will add new node
[00.311][mmc]: fdt err returned <no error>
[00.315][mmc]: Using default timing para
[00.319][mmc]: SUNXI SDMMC Controller Version:0x50310
[00.336][mmc]: card_caps:0x3000000a
[00.339][mmc]: host_caps:0x3000003f
[00.343]sunxi flash init ok
[00.345]line:714 init_clocks
__clk_init: clk pll_periph0x2 already initialized
register fix_factor clk error
[00.355]drv_disp_init
fdt_getprop_u32 s_pwm.pwm-base fail
[00.371]drv_disp_init finish
[00.374]boot_gui_init:start
[00.377]set disp.dev2_output_type fail. using defval=0
[00.383]boot_gui_init:finish
partno erro : can't find partition bootloader
54 bytes read in 1 ms (52.7 KiB/s)
[00.399]bmp_name=bootlogo.bmp size 1152054
1152054 bytes read in 49 ms (22.4 MiB/s)
[00.467]Loading Environment from SUNXI_FLASH... OK
[00.486]out of usb burn from boot: not need burn key
root_partition is rootfs
set root to /dev/mmcblk0p5
[00.496]update part info
[00.498]update bootcmd
[00.501]change working_fdt 0x42aafda8 to 0x42a8fda8
[00.522]update dts
Hit any key to stop autoboot: 0
[00.563]LCD open finish
Android's image name: d1-mangopi_mq_rg
No reserved memory region found in source FDT
[00.949]
Starting kernel ...
[00.952][mmc]: MMC Device 2 not found
[00.955][mmc]: mmc 2 not find, so not exit
[ 0.000000] OF: fdt: Ignoring memory range 0x40000000 - 0x40200000
[ 0.000000] Linux version 5.4.61 (pjw@pjw-virtual-machine) (riscv64-unknown-linux-gnu-gcc (C-SKY RISCV Tools V1.8.4 B20200702) 8.1.0, GNU ld (GNU Binutils) 2.32) #2 PREEMPT Sat Dec 18 15:37:58 UTC 2021
[ 0.000000] cma: Reserved 8 MiB at 0x0000000043800000
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000040200000-0x0000000043ffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040200000-0x0000000043ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040200000-0x0000000043ffffff]
[ 0.000000] On node 0 totalpages: 15872
[ 0.000000] DMA32 zone: 217 pages used for memmap
[ 0.000000] DMA32 zone: 0 pages reserved
[ 0.000000] DMA32 zone: 15872 pages, LIFO batch:3
[ 0.000000] elf_hwcap is 0x20112d
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 15655
[ 0.000000] Kernel command line: earlyprintk=sunxi-uart,0x02500000 clk_ignore_unused initcall_debug=0 console=ttyS0,115200 loglevel=8 root=/dev/mmcblk0p5 init=/sbin/init partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:env-redund@mmcblk0p3:boot@mmcblk0p4:rootfs@mmcblk0p5:dsp0@mmcblk0p6:recovery@mmcblk0p7:UDISK@mmcblk0p8 cma=8M snum= mac_addr= wifi_mac= bt_mac= specialstr= gpt=1 androidboot.mode=normal androidboot.hardware=sun20iw1p1 boot_type=1 androidboot.boot_type=1 gpt=1 uboot_message=2018.05-g0a88ac9-config-dirty(12/18/2021-22:57:39)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.000000] Sorting __ex_table...
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 42144K/63488K available (6130K kernel code, 659K rwdata, 2113K rodata, 196K init, 254K bss, 13152K reserved, 8192K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, 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: 0, nr_irqs: 0, preallocated irqs: 0
[ 0.000000] plic: mapped 200 interrupts with 1 handlers for 2 contexts.
[ 0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0]
[ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000007] sched_clock: 64 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000029] riscv_timer_clockevent depends on broadcast, but no broadcast function available
[ 0.000378] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.001010] Console: colour dummy device 80x25
[ 0.001057] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.001077] pid_max: default: 32768 minimum: 301
[ 0.001304] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.001327] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.003484] ASID allocator initialised with 65536 entries
[ 0.003698] rcu: Hierarchical SRCU implementation.
[ 0.004457] devtmpfs: initialized
[ 0.020602] random: get_random_u32 called from bucket_table_alloc.isra.31+0x4e/0x15e with crng_init=0
[ 0.021640] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.021678] futex hash table entries: 256 (order: 0, 6144 bytes, linear)
[ 0.022256] pinctrl core: initialized pinctrl subsystem
[ 0.023841] NET: Registered protocol family 16
[ 0.025962] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.026731] cpuidle: using governor menu
[ 0.069987] rtc_ccu: sunxi ccu init OK
[ 0.078133] clock: sunxi ccu init OK
[ 0.079228] clock: sunxi ccu init OK
[ 0.125461] iommu: Default domain type: Translated
[ 0.125670] sunxi iommu: irq = 4
[ 0.126981] SCSI subsystem initialized
[ 0.127407] usbcore: registered new interface driver usbfs
[ 0.127510] usbcore: registered new interface driver hub
[ 0.127636] usbcore: registered new device driver usb
[ 0.127860] mc: Linux media interface: v0.10
[ 0.127951] videodev: Linux video capture interface: v2.00
[ 0.129292] sunxi-msgbox-amp 3003000.msgbox: invalid resource
[ 0.130075] Advanced Linux Sound Architecture Driver Initialized.
[ 0.130879] Bluetooth: Core ver 2.22
[ 0.130974] NET: Registered protocol family 31
[ 0.130987] Bluetooth: HCI device and connection manager initialized
[ 0.131011] Bluetooth: HCI socket layer initialized
[ 0.131027] Bluetooth: L2CAP socket layer initialized
[ 0.131067] Bluetooth: SCO socket layer initialized
[ 0.131418] pwm module init!
[ 0.133107] g2d 5410000.g2d: Adding to iommu group 0
[ 0.133678] G2D: rcq version initialized.major:250
[ 0.135267] clocksource: Switched to clocksource riscv_clocksource
[ 0.148997] sun8iw20-pinctrl 2000000.pinctrl: initialized sunXi PIO driver
[ 0.167955] thermal_sys: Registered thermal governor 'step_wise'
[ 0.167961] thermal_sys: Registered thermal governor 'user_space'
[ 0.168566] NET: Registered protocol family 2
[ 0.169492] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.169539] TCP established hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.169560] TCP bind hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.169576] TCP: Hash tables configured (established 512 bind 512)
[ 0.169752] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.169800] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.170094] NET: Registered protocol family 1
[ 0.172975] Initialise system trusted keyrings
[ 0.173308] workingset: timestamp_bits=62 max_order=14 bucket_order=0
[ 0.181408] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.202219] Key type asymmetric registered
[ 0.202237] Asymmetric key parser 'x509' registered
[ 0.202264] io scheduler mq-deadline registered
[ 0.202273] io scheduler kyber registered
[ 0.202295] atomic64_test: passed
[ 0.203688] [DISP]disp_module_init
[ 0.204327] disp 5000000.disp: Adding to iommu group 0
[ 0.204980] [DISP] disp_init,line:2385:
[ 0.204987] smooth display screen:0 type:1 mode:4
[ 0.233110] disp 5000000.disp: 5000000.disp supply vcc-lcd not found, using dummy regulator
[ 0.233389] disp 5000000.disp: 5000000.disp supply vcc-pd not found, using dummy regulator
[ 0.246182] [DISP] disp_sys_pwm_request,line:442:
[ 0.246190] disp_sys_pwm_request pwm 8 fail! -517
[ 0.246206] [DISP] disp_sys_pwm_config,line:509:
[ 0.246209] disp_sys_pwm_Config, handle is NULL!
[ 0.246897] display_fb_request,fb_id:0
[ 0.266810] disp_al_manager_apply ouput_type:1
[ 0.266957] [DISP] lcd_clk_config,line:731:
[ 0.266972] disp 0, clk: pll(198000000),clk(198000000),dclk(33000000) dsi_rate(198000000)
[ 0.266972] clk real:pll(288000000),clk(288000000),dclk(48000000) dsi_rate(0)
[ 0.267035] [DISP] disp_sys_gpio_request,line:276:
[ 0.267042] disp_sys_gpio_request failed, gpio_name=lcd_bl_en, gpio=123, value=0, ret=-517
[ 0.267057] [DISP] disp_sys_pwm_request,line:442:
[ 0.267061] disp_sys_pwm_request pwm 8 fail! -517
[ 0.267709] [DISP]disp_module_init finish
[ 0.268674] sunxi_sid_init()506 - insmod ok
[ 0.277213] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pe not found, using dummy regulator
[ 0.277872] uart uart0: get regulator failed
[ 0.277904] uart uart0: uart0 supply uart not found, using dummy regulator
[ 0.278337] uart0: ttyS0 at MMIO 0x2500000 (irq = 18, base_baud = 1500000) is a SUNXI
[ 0.278370] sw_console_setup()1808 - console setup baud 115200 parity n bits 8, flow n
[ 1.083751] printk: console [ttyS0] enabled
[ 1.089461] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pg not found, using dummy regulator
[ 1.101010] uart uart1: get regulator failed
[ 1.105909] uart uart1: uart1 supply uart not found, using dummy regulator
[ 1.114022] uart1: ttyS1 at MMIO 0x2500400 (irq = 19, base_baud = 1500000) is a SUNXI
[ 1.123699] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pb not found, using dummy regulator
[ 1.135229] uart uart3: get regulator failed
[ 1.140134] uart uart3: uart3 supply uart not found, using dummy regulator
[ 1.148242] uart3: ttyS3 at MMIO 0x2500c00 (irq = 21, base_baud = 1500000) is a SUNXI
[ 1.158315] misc dump reg init
[ 1.162720] sunxi-rfkill soc@3000000:rfkill@0: module version: v1.0.9
[ 1.169985] sunxi-rfkill soc@3000000:rfkill@0: devm_pinctrl_get() failed!
[ 1.177665] sunxi-rfkill soc@3000000:rfkill@0: get gpio chip_en failed
[ 1.184983] sunxi-rfkill soc@3000000:rfkill@0: get gpio power_en failed
[ 1.192430] sunxi-rfkill soc@3000000:rfkill@0: wlan_busnum (1)
[ 1.199022] sunxi-rfkill soc@3000000:rfkill@0: Missing wlan_power.
[ 1.206001] sunxi-rfkill soc@3000000:rfkill@0: wlan_regon gpio=204 assert=1
[ 1.213876] sunxi-rfkill soc@3000000:rfkill@0: wlan_hostwake gpio=202 assert=1
[ 1.222084] sunxi-rfkill soc@3000000:rfkill@0: wakeup source is enabled
[ 1.229842] sunxi-rfkill soc@3000000:rfkill@0: Missing bt_power.
[ 1.236652] sunxi-rfkill soc@3000000:rfkill@0: bt_rst gpio=207 assert=0
[ 1.244850] [ADDR_MGT] addr_mgt_probe: module version: v1.0.9
[ 1.252621] [ADDR_MGT] addr_mgt_probe: success.
[ 1.259293] libphy: Fixed MDIO Bus: probed
[ 1.263870] CAN device driver interface
[ 1.268622] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.276040] sunxi-ehci: EHCI SUNXI driver
[ 1.281083] get ehci0-controller wakeup-source is fail.
[ 1.287100] sunxi ehci0-controller don't init wakeup source
[ 1.293363] [sunxi-ehci0]: probe, pdev->name: 4101000.ehci0-controller, sunxi_ehci: 0xffffffe00090fb58, 0x:ffffffd004078000, irq_no:2e
[ 1.306927] [sunxi-ehci0]: Not init ehci0
[ 1.311835] get ehci1-controller wakeup-source is fail.
[ 1.317847] sunxi ehci1-controller don't init wakeup source
[ 1.324107] [sunxi-ehci1]: probe, pdev->name: 4200000.ehci1-controller, sunxi_ehci: 0xffffffe00090ff18, 0x:ffffffd00407c000, irq_no:31
[ 1.337694] hci: sunxi_insmod_ehci()600 WARN: get supply failed
[ 1.344339] sunxi-ehci 4200000.ehci1-controller: EHCI Host Controller
[ 1.351658] sunxi-ehci 4200000.ehci1-controller: new USB bus registered, assigned bus number 1
[ 1.361592] sunxi-ehci 4200000.ehci1-controller: irq 49, io mem 0x04200000
[ 1.395322] sunxi-ehci 4200000.ehci1-controller: USB 2.0 started, EHCI 1.00
[ 1.404280] hub 1-0:1.0: USB hub found
[ 1.408624] hub 1-0:1.0: 1 port detected
[ 1.413949] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.421024] sunxi-ohci: OHCI SUNXI driver
[ 1.426221] get ohci0-controller wakeup-source is fail.
[ 1.432177] sunxi ohci0-controller don't init wakeup source
[ 1.438513] [sunxi-ohci0]: probe, pdev->name: 4101400.ohci0-controller, sunxi_ohci: 0xffffffe000910698
[ 1.448997] [sunxi-ohci0]: Not init ohci0
[ 1.453909] get ohci1-controller wakeup-source is fail.
[ 1.459928] sunxi ohci1-controller don't init wakeup source
[ 1.466255] [sunxi-ohci1]: probe, pdev->name: 4200400.ohci1-controller, sunxi_ohci: 0xffffffe000910a58
[ 1.476742] hci: sunxi_insmod_ohci()265 WARN: get supply failed
[ 1.483442] sunxi-ohci 4200400.ohci1-controller: OHCI Host Controller
[ 1.490737] sunxi-ohci 4200400.ohci1-controller: new USB bus registered, assigned bus number 2
[ 1.500632] sunxi-ohci 4200400.ohci1-controller: irq 50, io mem 0x04200400
[ 1.580462] hub 2-0:1.0: USB hub found
[ 1.584711] hub 2-0:1.0: 1 port detected
[ 1.590498] usbcore: registered new interface driver uas
[ 1.596761] usbcore: registered new interface driver usb-storage
[ 1.603618] usbcore: registered new interface driver ums-alauda
[ 1.610493] usbcore: registered new interface driver ums-cypress
[ 1.617343] usbcore: registered new interface driver ums-datafab
[ 1.624164] usbcore: registered new interface driver ums_eneub6250
[ 1.631200] usbcore: registered new interface driver ums-freecom
[ 1.638116] usbcore: registered new interface driver ums-isd200
[ 1.644793] usbcore: registered new interface driver ums-jumpshot
[ 1.651814] usbcore: registered new interface driver ums-karma
[ 1.658530] usbcore: registered new interface driver ums-onetouch
[ 1.665493] usbcore: registered new interface driver ums-realtek
[ 1.672320] usbcore: registered new interface driver ums-sddr09
[ 1.679074] usbcore: registered new interface driver ums-sddr55
[ 1.685879] usbcore: registered new interface driver ums-usbat
[ 1.692926] mousedev: PS/2 mouse device common for all mice
[ 1.700036] ts probe start
[ 1.700466] input: 2009c00.rtp as /devices/platform/soc@3000000/2009c00.rtp/input/input0
[ 1.713196] ts probe success
[ 1.713644] sunxi_gpadc_init,1968, success
[ 1.722396] sunxi-rtc 7090000.rtc: errata__fix_alarm_day_reg_default_value(): ALARM0_DAY_REG=0, set it to 1
[ 1.734837] sunxi-rtc 7090000.rtc: registered as rtc0
[ 1.740707] sunxi-rtc 7090000.rtc: setting system clock to 1970-01-01T00:00:02 UTC (2)
[ 1.749660] sunxi-rtc 7090000.rtc: sunxi rtc probed
[ 1.755578] i2c /dev entries driver
[ 1.759591] IR NEC protocol handler initialized
[ 1.764681] IR RC5(x/sz) protocol handler initialized
[ 1.770367] IR RC6 protocol handler initialized
[ 1.775497] IR JVC protocol handler initialized
[ 1.780549] IR Sony protocol handler initialized
[ 1.785765] IR SANYO protocol handler initialized
[ 1.791011] IR Sharp protocol handler initialized
[ 1.796324] IR MCE Keyboard/mouse protocol handler initialized
[ 1.802828] IR XMP protocol handler initialized
[ 1.807947] ir_imon_decoder: IR iMON protocol handler initialized
[ 1.814742] IR RCMM protocol handler initialized
[ 1.820691] sunxi cedar version 1.1
[ 1.824872] sunxi-cedar 1c0e000.ve: Adding to iommu group 0
[ 1.831247] VE: install start!!!
[ 1.831247]
[ 1.836868] VE: cedar-ve the get irq is 6
[ 1.836868]
[ 1.843249] VE: ve_debug_proc_info:(____ptrval____), data:(____ptrval____), lock:(____ptrval____)
[ 1.843249]
[ 1.854904] VE: install end!!!
[ 1.854904]
[ 1.861509] sunxi-wdt 6011000.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.870764] Bluetooth: HCI UART driver ver 2.3
[ 1.875866] Bluetooth: HCI UART protocol H4 registered
[ 1.881597] Bluetooth: HCI UART protocol BCSP registered
[ 1.887617] Bluetooth: XRadio Bluetooth LPM Mode Driver Ver 1.0.10
[ 1.894924] [XR_BT_LPM] bluesleep_probe: bt_wake polarity: 1
[ 1.901442] [XR_BT_LPM] bluesleep_probe: host_wake polarity: 1
[ 1.908035] [XR_BT_LPM] bluesleep_probe: wakeup source is disabled!
[ 1.908035]
[ 1.916766] [XR_BT_LPM] bluesleep_probe: uart_index(1)
[ 1.925893] sunxi-mmc 4020000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.19 2021-03-24 19:50)
[ 1.935977] sunxi-mmc 4020000.sdmmc: ***ctl-spec-caps*** 8
[ 1.942150] sunxi-mmc 4020000.sdmmc: No vmmc regulator found
[ 1.948573] sunxi-mmc 4020000.sdmmc: No vqmmc regulator found
[ 1.954984] sunxi-mmc 4020000.sdmmc: No vdmmc regulator found
[ 1.961464] sunxi-mmc 4020000.sdmmc: No vd33sw regulator found
[ 1.968070] sunxi-mmc 4020000.sdmmc: No vd18sw regulator found
[ 1.974578] sunxi-mmc 4020000.sdmmc: No vq33sw regulator found
[ 1.981158] sunxi-mmc 4020000.sdmmc: No vq18sw regulator found
[ 1.988240] sunxi-mmc 4020000.sdmmc: Got CD GPIO
[ 1.993776] sunxi-mmc 4020000.sdmmc: set cd-gpios as 24M fail
[ 2.000494] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.011716] sunxi-mmc 4020000.sdmmc: no vqmmc,Check if there is regulator
[ 2.031930] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.056464] sunxi-mmc 4020000.sdmmc: detmode:gpio irq
[ 2.062181] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.074561] sunxi-mmc 4021000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.19 2021-03-24 19:50)
[ 2.084645] sunxi-mmc 4021000.sdmmc: ***ctl-spec-caps*** 8
[ 2.091004] sunxi-mmc 4021000.sdmmc: No vmmc regulator found
[ 2.097444] sunxi-mmc 4021000.sdmmc: No vqmmc regulator found
[ 2.103909] sunxi-mmc 4021000.sdmmc: No vdmmc regulator found
[ 2.110405] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.122029] sunxi-mmc 4021000.sdmmc: No vd33sw regulator found
[ 2.128577] sunxi-mmc 4021000.sdmmc: No vd18sw regulator found
[ 2.135106] sunxi-mmc 4021000.sdmmc: No vq33sw regulator found
[ 2.141790] sunxi-mmc 4021000.sdmmc: No vq18sw regulator found
[ 2.148405] sunxi-mmc 4021000.sdmmc: Cann't get pin bias hs pinstate,check if needed
[ 2.157969] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.170245] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.181504] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator
[ 2.190470] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.202105] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.226496] sunxi-mmc 4021000.sdmmc: detmode:manually by software
[ 2.234170] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !!
[ 2.241853] usbcore: registered new interface driver usbhid
[ 2.241896] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !!
[ 2.255040] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.266688] usbhid: USB HID core driver
[ 2.273173] usbcore: registered new interface driver snd-usb-audio
[ 2.281915] mmc0: host does not support reading read-only switch, assuming write-enable
[ 2.292268] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 2.304446] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pd not found, using dummy regulator
[ 2.317286] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[ 2.328755] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[ 2.335993] [AUDIOCODEC][sunxi_codec_parse_params][2094]:digital_vol:0, lineout_vol:26, mic1gain:19, mic2gain:19 pa_msleep:120, pa_level:1, pa_pwr_level:1
[ 2.335993]
[ 2.353087] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[ 2.360061] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[ 2.371723] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[ 2.378601] [AUDIOCODEC][sunxi_codec_parse_params][2130]:adcdrc_cfg:0, adchpf_cfg:1, dacdrc_cfg:0, dachpf:0
[ 2.389486] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[ 2.396340] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[ 2.407664] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(SDR25) dt B
[ 2.419946] [AUDIOCODEC][sunxi_internal_codec_probe][2266]:codec probe finished
[ 2.428392] mmc0: new high speed SDHC card at address 59b4
[ 2.436132] sid_rd_ver_reg()254 - ver >= 4, soc ver:5
[ 2.441856] debugfs: Directory '203034c.dummy_cpudai' with parent 'audiocodec' already present!
[ 2.453205] mmcblk0: mmc0:59b4 SD32G 29.1 GiB
[ 2.461074] [SNDCODEC][sunxi_card_init][583]:card init finished
[ 2.468586] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8
[ 2.479298] sunxi-codec-machine 2030340.sound: 2030000.codec <-> 203034c.dummy_cpudai mapping ok
[ 2.490874] input: audiocodec sunxi Audio Jack as /devices/platform/soc@3000000/2030340.sound/sound/card0/input1
[ 2.503208] [SNDCODEC][sunxi_card_dev_probe][832]:register card finished
[ 2.511697] rpmsg_hifi 3003000.msgbox.sunxi,dsp-msgbox.514.258: id:sunxi,dsp-msgbox new channel: 0x202 -> 0x102!
[ 2.523412] rpmsg_hifi 3003000.msgbox.sunxi,dsp-msgbox.514.258: rpmsg hifi[0] client driver is probed
[ 2.535793] NET: Registered protocol family 10
[ 2.542337] Segment Routing with IPv6
[ 2.546847] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 2.554411] NET: Registered protocol family 17
[ 2.559606] can: controller area network core (rev 20170425 abi 9)
[ 2.566730] NET: Registered protocol family 29
[ 2.571736] can: raw protocol (rev 20170425)
[ 2.576552] can: broadcast manager protocol (rev 20170425 t)
[ 2.582903] can: netlink gateway (rev 20190810) max_hops=1
[ 2.589432] Bluetooth: RFCOMM TTY layer initialized
[ 2.594933] Bluetooth: RFCOMM socket layer initialized
[ 2.600817] Bluetooth: RFCOMM ver 1.11
[ 2.606224] Loading compiled-in X.509 certificates
[ 2.614481] HDMI 2.0 driver init start!
[ 2.618880] boot_hdmi=false
[ 2.622076] ERROR: pinctrl_get for HDMI2.0 DDC fail
[ 2.629333] HDMI2.0 module init end
[ 2.657396] twi twi2: twi2 supply twi not found, using dummy regulator
[ 2.670933] sunxi_i2c_probe()2262 - [i2c2] probe success
[ 2.680492] debugfs: Directory '2031000.dmic' with parent 'snddmic' already present!
[ 2.691179] sunxi-audio-card 2031060.sounddmic: dmic-hifi <-> 2031000.dmic mapping ok
[ 2.703778] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 2.715049] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 2.722818] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 2.732571] clk: Not disabling unused clocks
[ 2.737496] ALSA device list:
[ 2.740813] #0: audiocodec
[ 2.744052] #1: snddmic
[ 2.747067] cfg80211: failed to load regulatory.db
[ 2.752517] alloc_fd: slot 0 not NULL!
[ 2.761489] random: fast init done
[ 2.765924] VFS: Mounted root (squashfs filesystem) readonly on device 179:5.
[ 2.776777] devtmpfs: mounted
[ 2.780331] Freeing unused kernel memory: 196K
[ 2.785441] This architecture does not have kernel memory protection.
[ 2.792664] Run /sbin/init as init process
[ 3.230648] [SNDCODEC][sunxi_check_hs_detect_status][191]:plugin --> switch:1
[ 3.466769] init: Console is alive
[ 3.470967] init: - watchdog -
[ 3.474554] init: - preinit -
[ 3.809432] random: procd: uninitialized urandom read (4 bytes read)
formating /dev/by-name/UDISK to ext4
/etc/preinit: line 1: mkfs.ext4: not found
[ 4.644963] mount_root: mounting /dev/root
[ 4.650933] mount_root: loading kmods from internal overlay
[ 4.757375] block: attempting to load /etc/config/fstab
[ 4.786172] block: extroot: device not present, retrying in 5 seconds
[ 6.285306]
[ 6.285306] insmod_device_driver
[ 6.285306]
[ 6.495312] hdmi_hpd_sys_config_release
[ 9.854842] block: extroot: cannot find device UDISK
[ 9.874398] procd: - early -
[ 9.878876] procd: - watchdog -
[ 9.968645] random: procd: uninitialized urandom read (4 bytes read)
[ 10.336545] procd: - watchdog -
[ 10.340421] procd: - ubus -
[ 10.344383] procd (1): /proc/111/oom_adj is deprecated, please use /proc/111/oom_score_adj instead.
[ 10.425752] random: ubusd: uninitialized urandom read (4 bytes read)
[ 10.635513] random: ubusd: uninitialized urandom read (4 bytes read)
[ 10.686614] procd: - init -
Please press Enter to activate this console.
[ 12.582460] file system registered
[ 12.716312] fuse: init (API version 7.31)
[ 12.722555] configfs-gadget 4100000.udc-controller: failed to start g1: -19
[ 12.905865] usbcore: registered new interface driver uvcvideo
[ 12.912316] USB Video Class driver (1.1.1)
[ 13.096152] get ctp_power is fail, -22
[ 13.100338] get ctp_power_ldo_vol is fail, -22
[ 13.125447] sunxi_ctp_startup: ctp_power_io is invalid.
[ 13.131370] get ctp_gesture_wakeup fail, no gesture wakeup
[ 13.172249] gt9xxnew_ts 2-0014: 2-0014 supply ctp not found, using dummy regulator
[ 13.225582] read descriptors
[ 13.228813] read strings
[ 13.393375] sunxi_set_cur_vol_work()394 WARN: get power supply failed
[ 13.401011] input: gt9xxnew_ts as /devices/virtual/input/input2
[ 13.441063] android_work: sent uevent USB_STATE=CONNECTED
[ 13.665997] sunxi_set_cur_vol_work()394 WARN: get power supply failed
[ 13.712563] sunxi_set_cur_vol_work()394 WARN: get power supply failed
[ 13.899833] sunxi_set_cur_vol_work()394 WARN: get power supply failed
[ 13.949044] sunxi_set_cur_vol_work()394 WARN: get power supply failed
[ 14.154446] configfs-gadget gadget: high-speed config #1: c
[ 14.160907] android_work: sent uevent USB_STATE=CONFIGURED
[ 17.369795] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 18.614753] ======== XRADIO WIFI OPEN ========
[ 18.631487] [XRADIO] Driver Label:XR_V02.16.84_P2P_HT40_01.31
[ 18.650641] [XRADIO] Allocated hw_priv @ (____ptrval____)
[ 18.677573] sunxi-rfkill soc@3000000:rfkill@0: bus_index: 1
[ 18.720124] sunxi-rfkill soc@3000000:rfkill@0: wlan power on success
[ 19.144997] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 19.156454] [XRADIO] Detect SDIO card 1
[ 19.171843] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator
[ 19.200309] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 19.233396] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 19.258942] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 19.282578] sunxi-mmc 4021000.sdmmc: card claims to support voltages below defined range
[ 19.312443] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[ 19.334590] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[ 19.362126] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(SDR25) dt B
[ 19.385778] mmc1: new high speed SDIO card at address 0001
[ 21.205455] sunxi-rfkill soc@3000000:rfkill@0: wlan power off success
[ 21.395632] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !!
[ 21.402442] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !!
[ 21.409240] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !!
[ 21.416055] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !!
[ 21.423080] mmc1: card 0001 removed
[ 21.434823] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[ 21.446344] [XRADIO] Remove SDIO card 1
[ 21.466709] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 21.480440] [SBUS_ERR] sdio probe timeout!
[ 21.495369] [XRADIO_ERR] sbus_sdio_init failed
[ 21.500572] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator
[ 21.515063] xradio_core_init failed (-110)!
[ 21.540702] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 21.579142] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !!
[ 21.586875] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !!
[ 21.593741] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 21.622898] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 21.640936] xt_time: kernel timezone is -0000
[ 21.663575] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[ 21.671221] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[ 21.678862] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[ 21.686502] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[ 21.693299] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[ 24.666119] ======== XRADIO WIFI OPEN ========
[ 24.681704] [XRADIO] Driver Label:XR_V02.16.84_P2P_HT40_01.31
[ 24.693785] [XRADIO] Allocated hw_priv @ (____ptrval____)
[ 24.715437] sunxi-rfkill soc@3000000:rfkill@0: bus_index: 1
[ 24.755393] sunxi-rfkill soc@3000000:rfkill@0: wlan power on success
[ 25.118477] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 25.134807] [XRADIO] Detect SDIO card 1
[ 25.150400] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator
[ 25.178864] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 25.222566] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 25.247709] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 25.271433] sunxi-mmc 4021000.sdmmc: card claims to support voltages below defined range
[ 25.301001] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[ 25.323125] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[ 25.350702] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(SDR25) dt B
[ 25.378497] mmc1: new high speed SDIO card at address 0001
[ 27.205473] sunxi-rfkill soc@3000000:rfkill@0: wlan power off success
[ 27.396178] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !!
[ 27.402989] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !!
[ 27.409788] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !!
[ 27.416599] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !!
[ 27.423610] mmc1: card 0001 removed
[ 27.435147] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[ 27.446685] [XRADIO] Remove SDIO card 1
[ 27.466707] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 27.485217] [SBUS_ERR] sdio probe timeout!
[ 27.495013] [XRADIO_ERR] sbus_sdio_init failed
[ 27.500202] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator
[ 27.514733] xradio_core_init failed (-110)!
[ 27.540277] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 27.578724] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !!
[ 27.586457] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !!
[ 27.593325] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 27.668549] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[ 27.692998] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[ 27.700623] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[ 27.708244] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[ 27.715867] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[ 27.722638] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
Trying to connect to SWUpdate...
[ 32.211668] [SNDCODEC][sunxi_card_hw_params][620]:stream_flag: 0
BusyBox v1.27.2 () built-in shell (ash)
_____ _ __ _
|_ _||_| ___ _ _ | | |_| ___ _ _ _ _
| | _ | || | | |__ | || || | ||_'_|
| | | || | || _ | |_____||_||_|_||___||_,_|
|_| |_||_|_||_|_| Tina is Based on OpenWrt!
----------------------------------------------
Tina Linux (Neptune, 5C1C9C53)
----------------------------------------------
root@TinaLinux:/#
关于 spi-flash 方式的配置等可以参考的资料链接如下:
荔枝派Nano | spi-flash 启动适配
荔枝派Zero | SPI Flash 系统编译
荔枝派Zero | jffs2文件系统挂载不上的常见原因
荔枝派Zero | Zero Spi Nor Flash启动系统制作指南
sipeed | spi_flash编译
lichee nano官方linux config文件踩坑与填坑(常见配置误区)
荔枝派nano(f1c100s)的SPI-Flash系统编译创建全过程
这一楼就当成问题解决汇总楼层吧,方便大家踩到坑快速解决
跟博客同步更新:全志F1C100S/F1C200S学习笔记(12)——问题解决汇总
$ sudo sunxi-fel ver
Warning: no 'soc_sram_info' data for your SoC (id=1663)
AWUSBFEX soc=00001663(unknown) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000
解决:
sunxi-tools 分支不对,用 git checkout 切换分支,具体可查看 全志sunxi-tools烧录工具安装和使用
SF: unrecognized JEDEC id bytes: 0b, 40, 18
*** Warning - spi_flash_probe_bus_cs() failed, using default environment
解决:
uboot没有板上使用的FLASH支持,参考 1 楼的添加FLASH支持章节。
识别成功后会显示:
SF: Detected xt25f128b with page size 256 Bytes, erase size 4 KiB, total 16 MiB
spi_flash@0:50000000: failed to activate chip-select 50000000
SF: error -2 reading JEDEC ID
Failed to initialize SPI flash at 0:50000000 (error -2)
No SPI flash selected. Please run `sf probe'
No SPI flash selected. Please run `sf probe'
解决:
上面说了,官方文档的错误,"sf probe 0:50000000; " ,修改为 "sf probe 0 50000000; "
日志中有dts中的spiflash 分区信息打印,但仍然卡在 waiting for rootfs
解决:
内核配置:
Device Drivers --->
<*> Memory Technology Device (MTD) support --->
<*> Caching block device access to MTD devices # 勾选,读写块设备用户模块
[*] SPI support --->
< > Allwinner A10 SoCs SPI controller # 取消勾选
<*> Allwinner A31 SPI controller # 勾选
[ 1.476051] VFS: Cannot open root device "mtdblock3" or unknown-block(31,3): error -19
[ 1.484131] Please append a correct "root=" boot option; here are the available partitions:
[ 1.492542] 1f00 1024 mtdblock0
[ 1.492554] (driver?)
[ 1.499197] 1f01 64 mtdblock1
[ 1.499208] (driver?)
[ 1.505747] 1f02 4096 mtdblock2
[ 1.505753] (driver?)
[ 1.512349] 1f03 11200 mtdblock3
[ 1.512358] (driver?)
解决:
这个问题一般是 flash分区信息 没有正确配置导致的。
如果 bootarg 是用的我的传参方法配置的,内核需要勾选上mtd的 <*> Command line partition table parsing 支持,该项是用来解析uboot传递过来的flash分区信息。
没添加对jffs2文件系统的支持,需要勾选 File systems ‣ Miscellaneous filesystems ‣ Journalling Flash File System v2 (JFFS2) support
通过参考荔枝派nano官方和论坛大佬的帖子,总结了烧录 spi-flash 启动的方法。
通过搜寻资料,把其中有错误或者做了多余的操作的步骤做了修正,以免大家再次踩坑,耗费青春。
以下包括 uboot、kernel、buildroot 和 烧录的详细步骤和需要注意的问题,尽量精简方法,以期容易上手和理解。
各种配置项也做了详细注释,要知其然,也知其所以然。
最理想的状态应该是是:有的坑,踩的人多了,也便没有了坑。
论坛不太好排版,有需要的也可以去我的博客看:P:全志F1C100S/F1C200S学习笔记(11)——spi-flash 启动全流程适配烧录及踩坑指南
正文开始
分区序号 分区大小 分区作用 地址空间及分区名
mtd0 1MB (0x100000) spl+uboot 0x0000000-0x0100000 : “uboot”
mtd1 64KB (0x10000) dtb文件 0x0100000-0x0110000 : “dtb”
mtd2 4MB (0x400000) linux内核 0x0110000-0x0510000 : “kernel”
mtd3 剩余 (0xAF0000) 根文件系统 0x0510000-0x1000000 : “rootfs”
这种方法只需要修改配置就行,不需要修改源码和设备树:
这里只写使spi-flash需要做的修改,详细配置参考:全志F1C100S/F1C200S学习笔记(3)——u-boot编译与烧录
git clone https://gitee.com/LicheePiNano/u-boot.git -b nano-v2018.01&&cd u-boot
make licheepi_nano_spiflash_defconfig
make menuconfig
# 对应 `CONFIG_BOOTCMD` 的宏定义
# 选中 然后 run distro_bootcmd 修改为以下参数
[*] Enable a default value for bootcmd
(sf probe 0 50000000; sf read 0x80C00000 0x100000 0x4000; sf read 0x80008000 0x110000 0x400000; bootz 0x80008000 - 0x80C00000) bootcmd value
# 对应 `CONFIG_BOOTARGS` 的宏定义
[*] Enable boot arguments
(console=ttyS0,115200 earlyprintk panic=5 rootwait; mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) root=/dev/mtdblock3 rw rootfstype=jffs2) Boot arguments
参数说明
# 初始化Flash设备(CS拉低)
sf probe 0 50000000;
# 从flash0x100000(1MB)位置读取dtb放到内存0x41800000偏移处。
sf read 0x41800000 0x100000 0x10000;
# 从flash0x110000(1MB+64KB)位置读取dtb放到内存0x41000000偏移处。
sf read 0x41000000 0x110000 0x400000;
# 启动内核
bootz 0x41000000 (内核地址)- 0x41800000(dtb地址)
# 在串口0上输出信息,如果要用串口1做控制台就改为 console=ttyS1
# 由于在kernel刚启动的过程中,还没有为串口等设备等注册console(在device probe阶段实现),此时无法通过正常的console来输出log。
# early console机制,用于实现为设备注册console之前的早期log的输出。
# earlyprintk 是基于 early console的基础上实现
console=ttyS0,115200 earlyprintk panic=5 rootwait
# spi32766.0是设备名,后面是分区大小,名字,读写属性。
# 根文件系统是mtd3;jffs2格式 root=31:03 等同于 /dev/mtdblock3 指的是mtd设备第三分区
mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) root=31:03 rw rootfstype=jffs2
说明
1. 重要!!!官方文档这里有错误,不是 "sf probe 0:50000000; " ,应该是 "sf probe 0 50000000; "
2. root=/dev/mtdblock3 也可以用 root=31:03 表示。
3. mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) 是FLASH分区,分区指定也可以在dts中声明。即修改内核源码目录下的 ./arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts。
添加FLASH支持_xt25f128b
由于我这开发板的FLASH没在支持列表(xt25f128b),所以需要自己添加,不然的话启动后报错 SF: unrecognized JEDEC id bytes: 0b, 40, 18。
# 显示spiflash的信息
$ sudo sunxi-fel spiflash-info
Manufacturer: Unknown (0Bh), model: 40h, size: 16777216 bytes.
修改 u-boot/drivers/mtd/spi/spi_flash_ids.c,根据上面查询的信息增加 xt25f128b:
const struct spi_flash_info spi_flash_ids[] = {
...
{"w25q128fw", INFO(0xef6018, 0x0, 64 * 1024, 256, RD_FULL | WR_QPP | SECT_4K) },
{"xt25f128b", INFO(0x0b4018, 0x0, 64 * 1024, 256, RD_FULL | WR_QPP | SECT_4K) },
...
};
修改 u-boot/arch/arm/dts/suniv-f1c100s-licheepi-nano.dts:
&spi0 {
...
flash@0 {
...
compatible = "winbond,xt25f128b", "jedec,spi-nor";
...
};
};
这里只写使用spi-flash需要做的修改,详细配置参考:
全志F1C100S/F1C200S学习笔记(5)——主线Linux编译
全志F1C100S/F1C200S学习笔记(6)——设备树添加节点
# 以下适配了 800*480屏幕 和 xt25f128bflash
git clone https://gitee.com/LicheePiNano/Linux.git && cd linux/
wget http://dl.sipeed.com/LICHEE/Nano/SDK/config
cp config .config
make menuconfig
File systems --->
[*] Miscellaneous filesystems --->
<*> Journalling Flash File System v2 (JFFS2) support # 打开jffs2的文件系统支持
(0) JFFS2 debugging verbosity (0 = quiet, 2 = noisy)
[*] JFFS2 write-buffering support
[ ] JFFS2 summary support
[ ] JFFS2 XATTR support
[ ] Advanced compression options for JFFS2
Device Drivers --->
<*> Memory Technology Device (MTD) support --->
<*> Command line partition table parsing # 勾选,用来解析uboot传递过来的flash分区信息。(如果 bootarg 是用的我的方法一就需要勾选)
<*> Caching block device access to MTD devices # 勾选,读写块设备用户模块
<*> SPI-NOR device support --->
[ ] Use small 4096 B erase sectors # 取消勾选,否则jffs2文件系统会报错
注:
lichee官方的u-boot 中 kernel cmdline 使用jffs2格式的 mtdblock3 作为rootfs,但config中没有打开mtdblock设备接口。所以需要勾选 Caching block device access to MTD devices。
mkfs.jffs2 使用的最小擦除尺寸是 8KB,而spi flash的扇区大小是 4KB,所以按照扇区擦除的话,会无法使用,所以必须使用块擦除。即勾选 Use small 4096 B erase sectors。,这样以后添加FLASH也不用再修改源文件 linux/drivers/mtd/spi-nor/spi-nor.c 了
如果不勾选 Caching block device access to MTD devices,会卡在 Waiting for root device /dev/mtdblock3。
添加FLASH支持_xt25f128b
修改文件 linux/drivers/mtd/spi-nor/spi-nor.c :,在 { "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) }下面添加:
{ "xt25f128b", INFO(0x0b4018, 0, 64 * 1024, 256, SECT_4K) },
参考:全志F1C100S/F1C200S学习笔记(7)——根文件系统编译
git clone https://gitee.com/LicheePiNano/buildroot-2017.08.git
cd buildroot-2017.08/
make menuconfig
Target options --->
Target Architecture (ARM (little endian)) --->
Target Architecture Variant (arm926t) --->
Toolchain --->
C library (musl) --->
System configuration --->
(gateway) System hostname # 主机名,随便改
(Welcome to gateway) System banner # 欢迎语,随便改
[*] Enable root login with password (NEW)
(123456) Root password # 登录密码,随便改
[*] remount root filesystem read-write during boot (NEW) # 重新挂载根文件系统到可读写
[*] Install timezone info # 安装时区信息,可选
(asia) timezone list
(Asia/Shanghai) default local time
Target packages --->
System tools --->
[*] util-linux --->
[*] mount/umount # 访问其它文件系统中的资源,如果要用overlayfs,那就要用这个挂载
** 生成 rootfs.jffs2 格式的rootfs,打开后会自动下载 mtd-utils 软件包。 **
看官方和论坛生成 rootfs.jffs2 格式的rootfs 都是自己再次打包的,其实 buildroot 可以直接选择生成这个格式的 rootfs :
Filesystem images --->
[*] jffs2 root filesystem
Flash Type (Parallel flash with 64 kB erase size) ---> # 具有64 kB擦除大小的并行闪存 -e 参数
[*] Do not use Cleanmarker # 用于标记一个块是_完整地_被擦除了。 -n 参数 Do not use cleanmarkers if using NAND flash or Dataflash where the pagesize is not a power of
[*] Pad output
(0xAF0000) Pad output size (0x0 = to end of EB) # 指定 jffs2 分区总空间 -p(--pad) 参数
Endianess (little-endian) --->
[ ] Produce a summarized JFFS2 image (NEW) # 生成镜像的
[*] Select custom virtual memory page size
(0x100) Virtual memory page size # 虚拟内存页大小 -s 参数
当然,要自己用命令行手动生成方法也列在下面,并做了详细注释:(要把内核模块直接打包进文件系统还是要自己动手)
# 下载jffs2文件系统制作工具
sudo apt-get install mtd-utils
# 解压
# -C 当前目录的绝对目录
mkdir rootfs && sudo tar -xvf rootfs.tar -C ./rootfs
# 生成 rootfs.jffs2
# -r :指定要做成image的目录名
# -o : 指定输出image的文件名
# -s :页大小 0x100 256 字节
# -e :块大小 0x10000 64k
# -p :或--pad 参数指定 jffs2 分区总空间
# 由此计算得到 0x1000000(16M)-0x10000(64K)-0x100000(1M)-0x400000(4M)=0xAF0000
# -n 如果挂载后会出现类似:CLEANMARKER node found at0x0042c000 has totlen 0xc != normal 0x0 的警告,则加上-n 就会消失。
# jffs2.img 是生成的文件系统镜像
sudo mkfs.jffs2 -s 0x100 -e 0x10000 -p 0xAF0000 -r rootfs -o rootfs.jffs2 -n
# 为根文件系统制作jffs2镜像包
sudo mkfs.jffs2 -s 0x100 -e 0x10000 -p 0xAF0000 -d rootfs/ -o jffs2.img
# 或者
sudo mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0xAF0000 -d rootfs/ -o jffs2.img
sunxi-fel使用方法看这里:全志sunxi-tools烧录工具安装和使用
烧录单独镜像
sudo sunxi-fel -p spiflash-write 0 ./u-boot/u-boot-sunxi-with-spl.bin
sudo sunxi-fel -p spiflash-write 0x0100000 ./linux/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dtb
sudo sunxi-fel -p spiflash-write 0x0110000 ./linux/arch/arm/boot/zImage
sudo sunxi-fel -p spiflash-write 0x0510000 ./buildroot-2017.08/output/images/rootfs.jffs2
烧录完整镜像
16M 大小flash镜像打包脚本:nano_flash_dd.sh
先用脚本打包成 flashimg.bin:
# 下载jffs2文件系统制作工具
sudo apt-get install mtd-utils
# 给脚本权限
chmod 777 nano_flash_dd.sh
# 加 sudo,不然会报错 tar: 由于前次错误,将以上次的错误状态退出
sudo ./nano_flash_dd.sh
在执行以下命令烧录:
sudo sunxi-fel -p spiflash-write 0 flashimg.bin
自从发现了这个宝藏坑网,为伊消得人憔悴,泡在里面学到了太多,更见识到了各种大佬。
之前并没有接触过全志的芯片,学习过程可谓艰辛,但好在问题都解决了,解决办法都记录了下来,方便大家不再掉坑里出不来。
学习和搭建V3S开发环境是参考的 荔枝派Zero 用户指南 和坛里各位大佬的分享。
平时习惯在CSDN记录开发笔记,我就不再一一复制搬过来了,后续学习过程会继续记录下来,需要的请参考:
全志v3s学习笔记(1)——基础简介及资料
全志v3s学习笔记(2)——u-boot编译与烧录
全志v3s学习笔记(3)——u-boot开机logo替换
全志v3s学习笔记(4)——u-boot传参(boot.scr)和参数配置(script.bin)文件
全志v3s学习笔记(5)——主线Linux编译
全志v3s学习笔记(6)——Bsp内核编译与烧录
全志v3s学习笔记(7)——Buildroot 根文件系统构建
全志v3s学习笔记(8)——TF卡分区及烧录
3、 /u-boot/arch/arm/include/asm/arch-sunxi/gpio.h 146行:
#define SUNXI_GPA_EMAC 2
#define SUNIV_GPA_UART1 5
4、 u-boot/include/configs/suniv.h 17行:
#include <configs/sunxi-common.h>
#undef CONFIG_CONS_INDEX
#define CONFIG_CONS_INDEX 2 //UART1
#endif /* __CONFIG_H */
5、 u-boot/arch/arm/mach-sunxi/board.c 86行:
#elif CONFIG_CONS_INDEX == 1 && defined(CONFIG_MACH_SUNIV)
sunxi_gpio_set_cfgpin(SUNXI_GPE(0), SUNIV_GPE_UART0);
sunxi_gpio_set_cfgpin(SUNXI_GPE(1), SUNIV_GPE_UART0);
sunxi_gpio_set_pull(SUNXI_GPE(1), SUNXI_GPIO_PULL_UP);
#elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUNIV)
sunxi_gpio_set_cfgpin(SUNXI_GPA(2), SUNIV_GPA_UART1);
sunxi_gpio_set_cfgpin(SUNXI_GPA(3), SUNIV_GPA_UART1);
sunxi_gpio_set_pull(SUNXI_GPA(3), SUNXI_GPIO_PULL_UP);
2、 u-boot/arch/arm/dts/suniv.dtsi 124行:
pio: pinctrl@1c20800 {
compatible = "allwinner,suniv-pinctrl";
reg = <0x01c20800 0x400>;
interrupts = <38>, <39>, <40>;
clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&osc32k>;
clock-names = "apb", "hosc", "losc";
gpio-controller;
interrupt-controller;
#interrupt-cells = <3>;
#gpio-cells = <3>;
spi0_pins_a: spi0-pins-pc {
pins = "PC0", "PC1", "PC2", "PC3";
function = "spi0";
};
uart0_pins_a: uart-pins-pe {
pins = "PE0", "PE1";
function = "uart0";
};
uart1_pins_a: uart-pins-pa {
pins = "PA2", "PA3";
function = "uart1";
};
};
贴出修改内容:
1、 u-boot/arch/arm/dts/suniv-f1c100s-licheepi-nano.dts 17行:
/ {
model = "Lichee Pi Nano";
compatible = "licheepi,licheepi-nano", "allwinner,suniv-f1c100s",
"allwinner,suniv";
aliases {
serial0 = &uart0;
serial1 = &uart1;
spi0 = &spi0;
};
chosen {
stdout-path = "serial1:115200n8";
};
};
...
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&uart1_pins_a>;
status = "okay";
};
买了芒果派的f1c200s板子,烧录nano的uboot无LOG输出,最终发现串口终端使用的是uart1,而nano的源码是使用的uart0。
找了很多资料,参考:https://whycan.com/t_1624.html修改u-boot源码uart1为终端输出,并打包成patch分享给大家使用。
补丁包:f1c100s-uboot串口1终端补丁包.zip
详细的修改步骤之前记录在CSDN了:全志F1C100S/F1C200S学习笔记(3)——主线uboot更改默认终端串口为uart1
补丁使用:
1、u-boot-uart1.patch 放在u-boot 同级目录
2、进入u-boot目录
3、执行patch -p1 < ../u-boot-uart1.patch