@yuzukitsuru 自己做个Makefile, 扔到package 去,install 的时候使用
$(INSTALL_BIN) ./app $(1)/usr/bin/
感受一下。
@yuzukitsuru 自己做个Makefile, 扔到package 去,install 的时候使用
$(INSTALL_BIN) ./app $(1)/usr/bin/
感受一下。
如题
竖的屏幕横过来用很难受,要转图像,很烦的。
TinaV2.2 已经有LVGL8 GUI福利package
那么咱就是说,转一波?
很难受的一点是G2D这设置没找到哪里是完整的配置案例,
一波摸索以后是这样的:
disp_rotation_used = <1>;
degree0 = <3>;
fb0_format = <0>;
fb0_buffer_num = <2>;
fb0_pixel_sequence = <3>;
fb0_scaler_mode_enable = <1>;
fb0_width = <854>;
fb0_height = <480>; /*read from lcd*/
fb1_format = <0>;
fb1_width = <0>;
fb1_height = <0>;
chn_cfg_mode = <0>;
当然 内核的g2d 配置项目要开启:
编译一波测试一下吧,
舒服啦
@whycan
recovery.fex 是 用来做升级的镜像,是ramdisk的文件系统,make ota_menuconfig 可以配这个recovery
详见 D1_Tina_Linux_OTA_开发指南.pdf
@aozima 一样的改法,亲测有效,烧录速度,200MB的固件我用tf卡烧录大概50秒
@xxpcb
建议还是让rom区是只读
然后客户只操作overlayfs
这样你后续的OTA升级,东西都还会在overlayfs 存着
@mangogeek
太巧了,改一个数字解决了,期待没有什么毛病
这个时候直接用overlayfs 就行了,
本身rom区,最好也是只读的。
具体overlayfs 咋搞,可以看下帖子:
https://bbs.aw-ol.com/topic/1000/在d1的tina上整上overlayfs/7?lang=zh-CN
@memory
啊哈,
改ext4文件系统,可以参考
TinaLinux_系统配置说明文档.pdf
指定rootfs_data 和 开机挂载策略在fstab
更多的可以参考
D1_Tina_Linux_存储_开发指南.pdf
如题
因为不喜欢插拔卡搞来搞去,喜欢直接USB插上直接干活烧录到底,
那就,看下D1怎么搞TF直接通过PhoenixSuit烧录 TF卡或者SDNAND
第一步,看启动过程的LOG:
U-Boot 2018.05-g0a62f10 (Dec 31 2021 - 07:53:57 +0000) Allwinner Technology
[03.820]DRAM: 512 MiB
[03.825]Relocation Offset is: 1def0000
[03.847]secure enable bit: 0
[03.851]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz
[03.858]flash init start
[03.860]workmode = 16,storage type = 0
try card 2
set card number 2
get card number 2
[03.867][mmc]: mmc driver ver uboot2018:2021-04-16 14:23:00-1
[03.876][mmc]: get sdc_type fail and use default host:tm4.
[03.900][mmc]: Is not Boot mode!
[03.903][mmc]: SUNXI SDMMC Controller Version:0x50310
[03.914][mmc]: ************Try SD card 2************
[03.919][mmc]: mmc 2 cmd timeout 100 status 100
[03.924][mmc]: smc 2 err, cmd 8, RTO
[03.927][mmc]: mmc 2 close bus gating and reset
[03.932][mmc]: mmc 2 cmd timeout 100 status 100
[03.936][mmc]: smc 2 err, cmd 55, RTO
[03.940][mmc]: mmc 2 close bus gating and reset
[03.944][mmc]: ************Try MMC card 2************
[03.953][mmc]: mmc 2 cmd timeout 100 status 100
[03.957][mmc]: smc 2 err, cmd 1, RTO
[03.960][mmc]: mmc 2 close bus gating and reset
[03.965][mmc]: Card did not respond to voltage select!
[03.969][mmc]: ************SD/MMC 2 init error!************
[03.975][mmc]: mmc init product failed
MMC init failed
try emmc fail
[03.988]sunxi-spinand: AW SPINand MTD Layer Version: 1.5 20200407
[03.994]sunxi-spinand-phy: AW SPINand Phy Layer Version: 1.9 20200306
[04.041]sunxi-spinand-phy: request spi0 gpio ok
[04.045]sunxi-spinand-phy: request general tx dma channel ok!
[04.050]sunxi-spinand-phy: request general rx dma channel ok!
[04.056]sunxi-spinand-phy: set spic0 clk to 20 Mhz
[04.060]sunxi-spinand-phy: init spic0 clk ok
[04.085]sunxi-spinand-phy: read id failed : -110
try nand fail
[04.132]unrecognized JEDEC id bytes: ff, ff, ff
try spinor fail
initcall sequence 000000005ff948c8 failed at call 000000004200d70e (err=-1)
### ERROR ### Please RESET the board ###
看到关键的点
try card 2
set card number 2
get card number 2
这里默认从card 2 开始
那么咱就先试试看,直接从card 0 行不行?
直接搜索到代码中定位到的是:
tina_d1_open_v1.0.1\lichee\brandy-2.0\u-boot-2018\drivers\sunxi_flash\mmc\sdmmc.c
中的接口:
int sunxi_sprite_mmc_probe(void)
{
#ifndef CONFIG_MACH_SUN50IW11
return sdmmc_init_for_sprite(0, 2);
#else
int workmode = uboot_spare_head.boot_data.work_mode;
if (workmode == WORK_MODE_CARD_PRODUCT)
return -1;
else
return sdmmc_init_for_sprite(0, 0);
#endif
}
这里 CONFIG_MACH_SUN50IW11 没有定义
默认是执行 return sdmmc_init_for_sprite(0, 2);
那么咱就是说,直接改return sdmmc_init_for_sprite(0, 0); 试试看?
好的说改就改了。
int sunxi_sprite_mmc_probe(void)
{
#ifndef CONFIG_MACH_SUN50IW11
return sdmmc_init_for_sprite(0, 0);
#else
int workmode = uboot_spare_head.boot_data.work_mode;
if (workmode == WORK_MODE_CARD_PRODUCT)
return -1;
else
return sdmmc_init_for_sprite(0, 0);
#endif
}
改动了下,直接烧录测一下:
U-Boot 2018.05-g0a62f10-dirty (Jan 28 2022 - 22:35:17 +0800) Allwinner Technology
[03.804]DRAM: 512 MiB
[03.809]Relocation Offset is: 1def0000
[03.831]secure enable bit: 0
[03.835]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz
[03.842]flash init start
[03.844]workmode = 16,storage type = 0
running in sunxi_sprite_mmc_probe try card
sdmmc_init_for_sprite try card 0
set card number 0
get card number 0
[03.857][mmc]: mmc driver ver uboot2018:2021-04-16 14:23:00-1
[03.866][mmc]: get sdc_type fail and use default host:tm1.
[03.891][mmc]: can't find node "mmc0",will add new node
[03.896][mmc]: fdt err returned <no error>
[03.900][mmc]: Using default timing para
[03.904][mmc]: SUNXI SDMMC Controller Version:0x50310
[03.922][mmc]: card_caps:0x3000000a
[03.925][mmc]: host_caps:0x3000003f
[03.933]Loading Environment from SUNXI_FLASH... OK
[03.939]try to burn key
[03.943]out of usb burn from boot: not need burn key
Hit any key to stop autoboot: 0
sunxi work mode=0x10
run usb efex
delay time 2500
weak:otg_phy_config
usb init ok
set address 0x30
set address 0x30 ok
set address 0x31
set address 0x31 ok
SUNXI_EFEX_ERASE_TAG
erase_flag = 0x12
origin_erase_flag = 0x1
FEX_CMD_fes_verify_status
FEX_CMD_fes_verify last err=0
the 0 mbr table is ok
the 1 mbr table is ok
the 2 mbr table is ok
the 3 mbr table is ok
*************MBR DUMP***************
total mbr part 9
part[0] name :boot-resource
part[0] classname :DISK
part[0] addrlo :0x1f8
part[0] lenlo :0x1f80
part[0] user_type :32768
part[0] keydata :0
part[0] ro :0
part[1] name :env
part[1] classname :DISK
part[1] addrlo :0x2178
part[1] lenlo :0x1f8
part[1] user_type :32768
part[1] keydata :0
part[1] ro :0
part[2] name :env-redund
part[2] classname :DISK
part[2] addrlo :0x2370
part[2] lenlo :0x1f8
part[2] user_type :32768
part[2] keydata :0
part[2] ro :0
part[3] name :boot
part[3] classname :DISK
part[3] addrlo :0x2568
part[3] lenlo :0x50b8
part[3] user_type :32768
part[3] keydata :0
part[3] ro :0
part[4] name :dsp0
part[4] classname :DISK
part[4] addrlo :0x7620
part[4] lenlo :0x3f0
part[4] user_type :32768
part[4] keydata :0
part[4] ro :0
part[5] name :recovery
part[5] classname :DISK
part[5] addrlo :0x7a10
part[5] lenlo :0x6e40
part[5] user_type :32768
part[5] keydata :0
part[5] ro :0
part[6] name :rootfs
part[6] classname :DISK
part[6] addrlo :0xe850
part[6] lenlo :0x1000000
part[6] user_type :32768
part[6] keydata :0
part[6] ro :0
part[7] name :rootfs_data
part[7] classname :DISK
part[7] addrlo :0x100e850
part[7] lenlo :0x6400
part[7] user_type :32768
part[7] keydata :0
part[7] ro :0
part[8] name :UDISK
part[8] classname :DISK
part[8] addrlo :0x1014c50
part[8] lenlo :0x0
part[8] user_type :33024
part[8] keydata :0
part[8] ro :0
total part: 10
mbr 0, 1f8, 8000
boot-resource 1, 1f80, 8000
env 2, 1f8, 8000
env-redund 3, 1f8, 8000
boot 4, 50b8, 8000
dsp0 5, 3f0, 8000
recovery 6, 6e40, 8000
rootfs 7, 1000000, 8000
rootfs_data 8, 6400, 8000
UDISK 9, 0, 8100
[07.119]erase all part start
need erase flash: 18
[07.125][mmc]: mmc_mmc_erase: sd card don't support erase
[07.130]read item0 copy0
[07.132][mmc]: memalign dst_align is NULL!
read first backup failed in fun sunxi_sprite_mmc_secread line 468
[07.142][mmc]: memalign dst_align is NULL!
read first backup failed in fun sunxi_sprite_mmc_secread line 468
[07.152]unknown error happen in item 0 read
[07.155]get secure storage map err
[07.159][mmc]: memalign src_align is NULL!
write first backup failed in fun sunxi_sprite_mmc_secwrite line 533
[07.168]erase secure storage block 0 err
SUNXI_EFEX_MBR_TAG
mbr size = 0x10000
write primary GPT success
write Backup GPT success
[08.043]update partition map
FEX_CMD_fes_verify_status
FEX_CMD_fes_verify last err=0
running in sunxi_sprite_mmc_init try card 2
******Has init
FEX_CMD_fes_verify_value, start 0x1f8, size high 0x0:low 0x2f8c00
FEX_CMD_fes_verify_value 0x3481d9f0
FEX_CMD_fes_verify_value, start 0x2178, size high 0x0:low 0x20000
FEX_CMD_fes_verify_value 0xcb347ad3
FEX_CMD_fes_verify_value, start 0x2370, size high 0x0:low 0x20000
FEX_CMD_fes_verify_value 0xcb347ad3
FEX_CMD_fes_verify_value, start 0x2568, size high 0x0:low 0x91d000
FEX_CMD_fes_verify_value 0xe5a32b17
FEX_CMD_fes_verify_value, start 0x7620, size high 0x0:low 0x4059c
FEX_CMD_fes_verify_value 0x413a5c54
FEX_CMD_fes_verify_value, start 0xe850, size high 0x0:low 0x6400000
FEX_CMD_fes_verify_value 0x87284509
bootfile_mode=4
SUNXI_EFEX_BOOT1_TAG
boot1 size = 0xfc000, max size = 0x200000
uboot size = 0xfc000
storage type = 7
FEX_CMD_fes_verify_status
FEX_CMD_fes_verify last err=0
bootfile_mode=4
SUNXI_EFEX_BOOT0_TAG
boot0 size = 0x10000
[36.353][mmc]: write mmc 0 info ok
dram para[0] = 318
dram para[1] = 3
dram para[2] = 7b7bfb
dram para[3] = 1
dram para[4] = 10f210f2
dram para[5] = 4001000
dram para[6] = 1c70
dram para[7] = 42
dram para[8] = 18
dram para[9] = 0
dram para[10] = 4a2195
dram para[11] = 2423190
dram para[12] = 8b061
dram para[13] = b4787896
dram para[14] = 0
dram para[15] = 48484848
dram para[16] = 48
dram para[17] = 1620121e
dram para[18] = 0
dram para[19] = 0
dram para[20] = 0
dram para[21] = 870000
dram para[22] = 24
dram para[23] = b4056103
dram para[24] = 0
dram para[25] = 0
dram para[26] = 0
dram para[27] = 0
dram para[28] = 0
dram para[29] = 0
dram para[30] = 0
dram para[31] = 0
storage type = 7
FEX_CMD_fes_verify_status
FEX_CMD_fes_verify last err=0
sunxi_efex_next_action=2
exit usb
next work 2
▒[33]HELLO! BOOT0 is starting!T
[36]BOOT0 commit : 603490b
[38]set pll start
[40]periph0 has been enabled
[43]set pll end
[44][pmu]: bus read error
[47]board init ok
[49]DRAM only have internal ZQ!!
[52]get_pmu_exist() = -1
[54]DRAM BOOT DRIVE INFO: V0.24
[57]DRAM CLK = 792 MHz
[59]DRAM Type = 3 (2:DDR2,3:DDR3)
[62]DRAMC ZQ value: 0x7b7bfb
[65]DRAM ODT value: 0x42.
[67]ddr_efuse_type: 0x0
[70]DRAM SIZE =1024 M
[74]DRAM simple test OK.
[76]dram size =1024
[78]card no is 0
[79]sdcard 0 line count 4
[82][mmc]: mmc driver ver 2021-04-2 16:45
[91][mmc]: Wrong media type 0x0
[94][mmc]: ***Try SD card 0***
[103][mmc]: HSSDR52/SDR25 4 bit
[106][mmc]: 50000000 Hz
[108][mmc]: 15280 MB
[110][mmc]: ***SD/MMC 0 init OK!!!***
[158]Loading boot-pkg Succeed(index=0).
[162]Entry_name = opensbi
[165]Entry_name = u-boot
[169]Entry_name = dtb
[171]mmc not para
[173]Jump to second Boot.
23333 还真就烧录进去了,也不知道这会有什么隐患没,反正我用着很舒服,不用插拔卡了。若有啥隐患还请大佬们指正。
同时呢,这个烧录口USB还能做adb shell调试用,美滋滋了。
而且呢额外挂载的 /mnt/SDCARD 空间等可以在烧录后保留,不会被擦除。
芜湖,起飞!
@memory
没错,ext4的
sys_partition.fex 需要修改
加上 如下:
[partition]
name = rootfs_data
size = 25600
user_type = 0x8000
@memory
另外分区表 加入 rootfs_data 这个是必须的。
这里patch只是解决e2fsprogs编译不过的问题,因为overlayfs 第一次起来要用mkfs.ext4 工具
@memory
大佬你好,
这个显然,menuconfig 得开起来呀
patches 文件夹里,直接扔我的这个patch文件
重新mm e2fsprogs ,肯定成功呀。
目前你遇到啥问题呢?
刚拿到机器,刷上了86的固件,哎呀,这,没有overlayfs? 这怎么行!
为了文件系统捣鼓起来更方便和各种OTA操作的舒服感觉,
所以,搞上了e2fsprogs
make menuconfig 一阵操作后,竟然报错了,还好有谷歌大法,直接找到问题:
https://bugs.gentoo.org/577946
于是自己加了个patch进去,一波烧录,起飞了
不敢独享,patch在这里
solve_major.patch
直接扔到 package\utils\e2fsprogs\patches 下面就可以啦。