首先还是说一下前提吧,就是拿到开发板之后,把之前6ull使用的rootfs移植过去了。然后运行QT的时候发现字体大了很多,遂研究发现是因为dpi不同的原因,windows通用的dpi大概是96,6ull上的大概是100,然而t113上的是172,这就导致了字体变大。然后想办法解决,查阅相关文档之后发现在设备树里面有lcd_width和lcd_height两个参数,如果将其修改为6ull一样大小的便可以解决这个问题。所以就在内核里面的设备树上做了修改,然后一开始是通过nfs挂接之后直接copy到/dev/mmcblk0p4分区里,接下来重启之后发现字体大小没有改变,然后进入/proc/device-tree/soc@3000000/lcd0@5461000/里面,用hexdump打印了lcd_width的值,发现还是原来的,并不是我修改后的。然后接下来就怀疑是没有更新成功,我就把板子上的dtb文件有copy回ubuntu下,然后反编译成dts文件看,确实是已经修改过的。然后接下来就怀疑是不是uboot将dtb文件读出来之后做了一些修改,所以就着手开始研究uboot。在uboot源码里面发现了一个sun8iw20p1-t113-100ask-t113-pro.dtb文件,和内核里面的一模一样,然后接下来尝试在这个文件里面进行修改,编译打包烧写之后启动,发现修改成功。接下来又想进一步验证一下,直接把/dev/mmcblk0p4里面的dtb文件删除,看看是否能够启动,删除之后发现正常启动,大致看了一眼,启动打印和之前是一样的。然后我就比较好奇,通常来说uboot里面应该是会有一个配置文件,里面包涵了一些针对当前单板的配置信息,比如说kernel的位置,dtb文件的位置以及名称等信息。然而我在源码里面并没有搜索想有关于sun8iw20p1-t113-100ask-t113-pro的字符串。那么我是不是就可以怀疑这个dtb文件其实就是已经编译进了uboot文件里面了。/dev/mmcblk0p4分区里面的其实就是障眼法,假象而已。包括里面的zImage也是没有用到的,删除之后照样能够启动,不过这个在文档里面有写明白zImage是需要转换成一个boot.img文件的。但是关于设备树这个,我确实有点不太理解这种操作。亦或许又是我自己没有研究透彻,其实另有门道?希望老师们能够给于解答,谢谢。
[20]HELLO! BOOT0 is starting!
[23]BOOT0 commit : 2c94b33
[25]set pll start
[31]periph0 has been enabled
[34]set pll end
[36][pmu]: bus read error
[38]board init ok
[40]enable_jtag
[42]ZQ value = 0x2f***********
[45]get_pmu_exist() = -1
[47]ddr_efuse_type: 0xa
[50][AUTO DEBUG] single rank and full DQ!
[55]ddr_efuse_type: 0xa
[58][AUTO DEBUG] rank 0 row = 13
[61][AUTO DEBUG] rank 0 bank = 8
[64][AUTO DEBUG] rank 0 page size = 2 KB
[68]DRAM BOOT DRIVE INFO: V0.24
[71]DRAM CLK = 792 MHz
[73]DRAM Type = 3 (2:DDR2,3:DDR3)
[77]DRAMC read ODT off.
[79]DRAM ODT value: 0x42.
[82]ddr_efuse_type: 0xa
[85]DRAM SIZE =128 M
[87]PLL_DDR_CTRL_REG:0xf8004100
[90]DRAM_CLK_REG:0xc0000000
[97]DRAM simple test OK.
[100]rtc standby flag is 0x0, super standby flag is 0x0
[105]dram size =128
[108]card no is 0
[110]sdcard 0 line count 4
[112][mmc]: mmc driver ver 2021-03-22 20:20
[122][mmc]: Wrong media type 0x0
[125][mmc]: ***Try SD card 0***
[134][mmc]: HSSDR52/SDR25 4 bit
[137][mmc]: 50000000 Hz
[139][mmc]: 14840 MB
[141][mmc]: ***SD/MMC 0 init OK!!!***
[235]Loading boot-pkg Succeed(index=0).
[238]Entry_name = u-boot
[246]Entry_name = optee
[250]Entry_name = logo
[252]Entry_name = dtb
[255]mmc not para
[257]Jump to second Boot.
M/TC: OP-TEE version: 6aef7bb2-dirty (gcc version 5.3.1 20160412 (Linaro GCC 5.3-2016.05)) #1 Fri Jul 23 09:25:11 UTC 2021 arm
U-Boot 2018.05 (Jun 30 2022 - 06:55:01 +0000) Allwinner Technology
[00.312]CPU: Allwinner Family
[00.315]Model: sun8iw20
[00.317]DRAM: 128 MiB
[00.321]Relocation Offset is: 04ebd000
[00.348]secure enable bit: 0
[00.350]smc_tee_inform_fdt failed with: -65526[00.354]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz
[00.361]gic: sec monitor mode
[00.364]line:703 init_clocks
[00.366]drv_disp_init
request pwm success, pwm7:pwm7:0x2000c00.
[00.381]drv_disp_init finish
[00.383]boot_gui_init:start
[00.386]set disp.dev2_output_type fail. using defval=0
[00.392]boot_gui_init:finish
[00.411]flash init start
[00.413]workmode = 0,storage type = 1
[00.416][mmc]: mmc driver ver uboot2018:2021-09-07 19:43:00
[00.422][mmc]: get sdc_type fail and use default host:tm1.
[00.428][mmc]: can't find node "mmc0",will add new node
[00.432][mmc]: fdt err returned <no error>
[00.436][mmc]: Using default timing para
[00.440][mmc]: SUNXI SDMMC Controller Version:0x50310
[00.458][mmc]: card_caps:0x3000000a
[00.461][mmc]: host_caps:0x3000003f
[00.465]sunxi flash init ok
[00.480]Loading Environment from SUNXI_FLASH... OK
[00.504]Item0 (Map) magic is bad
[00.507]the secure storage item0 copy0 magic is bad
[00.515]Item0 (Map) magic is bad
[00.518]the secure storage item0 copy1 magic is bad
[00.523]Item0 (Map) magic is bad
secure storage read widevine fail
[00.529]secure storage read widevine fail with:-1
secure storage read ec_key fail
[00.536]secure storage read ec_key fail with:-1
secure storage read ec_cert1 fail
[00.543]secure storage read ec_cert1 fail with:-1
secure storage read ec_cert2 fail
[00.551]secure storage read ec_cert2 fail with:-1
secure storage read ec_cert3 fail
[00.558]secure storage read ec_cert3 fail with:-1
secure storage read rsa_key fail
[00.566]secure storage read rsa_key fail with:-1
secure storage read rsa_ce[00.573]LCD open finish
rt1 fail
[00.576]secure storage read rsa_cert1 fail with:-1
secure storage read rsa_cert2 fail
[00.584]secure storage read rsa_cert2 fail with:-1
secure storage read rsa_cert3 fail
[00.591]secure storage read rsa_cert3 fail with:-1
[00.596]usb burn from boot
delay time 0
weak:otg_phy_config
[00.607]usb prepare ok
[00.814]usb sof ok
[00.815]usb probe ok
[00.817]usb setup ok
set address 0xc
set address 0xc ok
[03.822]do_burn_from_boot usb : have no handshake
partno erro : can't find partition private
root_partition is rootfs
set root to /dev/mmcblk0p5
[03.839]update part info
[03.843]update bootcmd
[03.848]change working_fdt 0x4487ce70 to 0x4485ce70
[03.865]update dts
phy_mode=rmii, phy_interface=6
eth0
Error: eth0 address not set.
Hit any key to stop autoboot: 0
card0 has inited
curr_device:0
Device: SUNXI SD/MMC
Manufacturer ID: 27
OEM: 5048
Name: SD16G
Bus Speed: 50000000
Mode : SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.5 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
Partition Map for MMC device 0 -- Partition Type: EFI
Part Start LBA End LBA Name
Attributes
Type GUID
Partition GUID
1 0x00008a40 0x00009a3f "boot-resource"
attrs: 0x0000000000000000
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
guid: c893b4c2-28d7-418c-bd34-b06ec4c56790
2 0x00009a40 0x00009b3f "env"
attrs: 0x0000000000000000
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
guid: be51d0bc-1ada-4238-920f-072cc09ad4b6
3 0x00009b40 0x00009c3f "env-redund"
attrs: 0x0000000000000000
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
guid: a8fe4c2a-4d6b-4ad6-9efa-e97fdd39854e
4 0x00009c40 0x00019c3f "boot"
attrs: 0x0000000000000004
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
guid: 2fc12b28-cd79-4831-a577-41f2c0753030
5 0x00019c40 0x00819c3f "rootfs"
attrs: 0x0000000000000000
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
guid: d9242c5e-a1b7-446e-a3cb-ecf5db97923f
261240 bytes read in 15 ms (16.6 MiB/s)
5148672 bytes read in 219 ms (22.4 MiB/s)
[06.236]no vendor_boot partition is found
Android's image name: sun8iw20p1
[06.248]Starting kernel ...