mCore R818使用genimage 打包镜像通过dd if烧录 提示如下错误!
-
如果镜像只包含 boot0_sdcard.fex boot_package.fex 两个分区,就可以正常启动到uboot,如果增加了任意某一个 如 env boot.vfat rootfs就会出现 如下提示 GPT分区无效,目前怀疑是 R818的 uboot 启动后会对分区做动态修改,导致不能手动指定分区类型/格式。
目前尝试多种方式,都会出现类似情况,有知道问题/方向的大佬指点一下?GUID Partition Table Entry Array CRC is wrong: 0xab54d286 != 0xb6ac2e52 part_get_info_efi: *** ERROR: Invalid GPT *** GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid Backup GPT *** partno erro : can't find partition bootloader GUID Partition Table Entry Array CRC is wrong: 0xab54d286 != 0xb6ac2e52 part_get_info_efi: *** ERROR: Invalid GPT *** GUID Partition Table Header signature is wr[01.512]LCD open finish ong: 0x0 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid Backup GPT *** partno erro : can't find partition boot-resource
完整启动log[28]HELLO! BOOT0 is starting! [31]BOOT0 commit : e7dab2b212 [34]set pll start [36]periph0 has been enabled [39]set pll end [41]PL gpio voltage : 1.8V [45][pmu]: bus read error [47]unknow PMU [49][pmu]: bus read error [52]PMU: AXP2202 [54][pmu]: bus read error [58]vaild para:1 select dram para0 [61]board init ok, set sys_vol to 950mv! [65]rtc[3] value = 0xb00f [88]enable_jtag [90]DRAM BOOT DRIVE INFO: V0.697 [93]the chip id is 0x1000 [95]the chip id is 0x1000 [98]the chip id is 0x1000 [101]the chip id is 0x1000 [103]the chip id is 0x1000 [106]chip id check OK [109]DRAM_VCC set to 1100 mv [122][AUTO DEBUG]32bit,2 ranks training success! [250][AUTO DEBUG]default config,dram_clk=792 ,mtest pass [600][AUTO DEBUG]26-45,19,0x23 18-36,18,0x1b 23-44,21,0x21 26-48,22,0x25 [AUTO DEBUG]10-26,16,0x12 11-29,18,0x14 11-28,17,0x13 7-28,21,0x11 [708][AUTO DEBUG]after escan,dram_tpr11 = 25211b23,dram_tpr12 = 11131412 [715]DRAM CLK =792 MHZ [717]DRAM Type =8 (3:DDR3,4:DDR4,6:LPDDR2,7:LPDDR3,8:LPDDR4) [729]phy_dfs_clk1 = 632M [731]phy_dfs_clk2 = 352M [734]phy_dfs_clk3 = 98M [737]phy_dfs_clk0 = 792M [739]DRAM SIZE =4096 MBytes, para1 = 310a, para2 = 10001000, tpr13 = 7525 [751]DRAM simple test OK. [754]dram size =4096 [757]chipid = 53801000 [759]nsi init ok 2021-10-14 [762]card no is 0 [764]sdcard 0 line count 4 [766][mmc]: mmc driver ver 2021-10-12 13:56 [771][mmc]: b mmc 0 bias 4 [779][mmc]: Wrong media type 0x0 [782][mmc]: ***Try SD card 0*** [793][mmc]: HSSDR52/SDR25 4 bit [796][mmc]: 50000000 Hz [798][mmc]: 30448 MB [800][mmc]: ***SD/MMC 0 init OK!!!*** [877]Loading boot-pkg Succeed(index=0). [881][mmc]: b mmc 0 bias 4 [884]Entry_name = u-boot [892]Entry_name = dtb [895]mmc not para ▒897]Jump to second Boot. U-Boot 2018.07-gdb54bdb-dirty (Aug 08 2023 - 02:23:48 +0000) Allwinner Technology [00.908]CPU: Allwinner Family [00.911]Model: sun50iw10 I2C: ready [00.927]DRAM: 4 GiB [00.931]Relocation Offset is: 75eee000 [00.965]secure enable bit: 0 [00.968]PMU: AXP2202 [00.970]BMU: AXP2202 AXP2202_IIN_LIM:38 AXP2202_IIN_LIM:38 [00.977][axp][err]: b12_mode: 0 AXP2202_IIN_LIM:38 FDT ERROR:fdt_get_all_pin:get property handle pinctrl-1 error:FDT_ERR_INTERNAL bias_name:pl_bias bias_vol:1800 bias_name:pc_bias bias_vol:1800 [01.024]battery_check pass:radio:100, vol:4345 [01.029]EXT: EXT_probe [01.031]pmu_sy8827g_probe pmic_bus_read fail [01.035]TCS: TCS_probe [01.037]pmu_tcs4838_probe pmic_bus_read fail [01.042]CPU=1416 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=400Mhz [01.048]gic: normal mode sunxi flash map init [01.052]flash init start [01.054]workmode = 0,storage type = 1 get value error [01.059][mmc]: mmc driver ver uboot2018:2022-11-04 08:58:00 [01.064][mmc]: get sdc_type fail and use default host:tm1. [01.070][mmc]: can't find node "mmc0",will add new node [01.075][mmc]: fdt err returned <no error> [01.079][mmc]: Using default timing para [01.082][mmc]: SUNXI SDMMC Controller Version:0x50300 [01.101][mmc]: card_caps:0x3000000a [01.104][mmc]: host_caps:0x3000003f [01.109]sunxi flash init ok [01.112]drv_disp_init partno erro : can't find partition bootloader partno erro : can't find partition boot-resource Get bootloader and boot-resource partition number fail! request pwm success, pwm0:pwm0:0x300a000. [01.161]drv_disp_init finish GUID Partition Table Entry Array CRC is wrong: 0xab54d286 != 0xb6ac2e52 part_get_info_efi: *** ERROR: Invalid GPT *** GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid Backup GPT *** [01.192]Loading Environment from SUNXI_FLASH... GUID Partition Table Entry Array CRC is wrong: 0xab54d286 != 0xb6ac2e52 part_get_info_efi: *** ERROR: Invalid GPT *** GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid Backup GPT *** *** Warning - no device, using default environment Failed (-19) [01.226]boot_gui_init:start [01.228]set disp.dev2_output_type fail. using defval=0 [01.395]set disp.fb0_rot_used fail. using defval=0 [01.399]set disp.fb0_rot_degree fail. using defval=0 [01.404]soc ic_ver:0x4, qa_val:0x0, markid:0x1000 dclk[0-200] display_cfg_flag:0 [01.412]boot_gui_init:finish GUID Partition Table Entry Array CRC is wrong: 0xab54d286 != 0xb6ac2e52 part_get_info_efi: *** ERROR: Invalid GPT *** GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid Backup GPT *** partno erro : can't find partition bootloader GUID Partition Table Entry Array CRC is wrong: 0xab54d286 != 0xb6ac2e52 part_get_info_efi: *** ERROR: Invalid GPT *** GUID Partition Table Header signature is wr[01.512]LCD open finish ong: 0x0 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid Backup GPT *** partno erro : can't find partition boot-resource [01.526]Get bootloader and boot-resource partition number fail! [01.532]Item0 (Map) magic is bad [01.535]the secure storage item0 copy0 magic is bad [01.541]Item0 (Map) magic is bad [01.543]the secure storage item0 copy1 magic is bad [01.548]Item0 (Map) magic is bad [01.551]usb burn from boot delay time 0 weak:otg_phy_config [01.562]usb prepare ok [01.827]usb sof ok [01.829]usb probe ok [01.831]usb setup ok set address 0x35 set address 0x35 ok [02.238]do_burn_from_boot usb : have no handshake cann't get the boot_base from the env GUID Partition Table Entry Array CRC is wrong: 0xab54d286 != 0xb6ac2e52 part_get_info_efi: *** ERROR: Invalid GPT *** GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid Backup GPT *** [02.272]update part info [02.275]battery temp is 194 GUID Partition Table Entry Array CRC is wrong: 0xab54d286 != 0xb6ac2e52 part_get_info_efi: *** ERROR: Invalid GPT *** GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid Backup GPT *** GUID Partition Table Entry Array CRC is wrong: 0xab54d286 != 0xb6ac2e52 part_get_info_efi: *** ERROR: Invalid GPT *** GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid Backup GPT *** [02.326]update bootcmd GUID Partition Table Entry Array CRC is wrong: 0xab54d286 != 0xb6ac2e52 part_get_info_efi: *** ERROR: Invalid GPT *** GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid Backup GPT *** GUID Partition Table Entry Array CRC is wrong: 0xab54d286 != 0xb6ac2e52 part_get_info_efi: *** ERROR: Invalid GPT *** GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid Backup GPT *** [02.376]change working_fdt 0xbbe9de50 to 0xbbe6de50 disable nand error: FDT_ERR_BADPATH get value error GUID Partition Table Entry Array CRC is wrong: 0xab54d286 != 0xb6ac2e52 part_get_info_efi: *** ERROR: Invalid GPT *** GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid Backup GPT *** partno erro : can't find partition bootloader GUID Partition Table Entry Array CRC is wrong: 0xab54d286 != 0xb6ac2e52 part_get_info_efi: *** ERROR: Invalid GPT *** GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid Backup GPT *** partno erro : can't find partition boot-resource Get bootloader and boot-resource partition number fail! GUID Partition Table Entry Array CRC is wrong: 0xab54d286 != 0xb6ac2e52 part_get_info_efi: *** ERROR: Invalid GPT *** GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid Backup GPT *** partno erro : can't find partition bootloader GUID Partition Table Entry Array CRC is wrong: 0xab54d286 != 0xb6ac2e52 part_get_info_efi: *** ERROR: Invalid GPT *** GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid Backup GPT *** partno erro : can't find partition boot-resource Get bootloader and boot-resource partition number fail! GUID Partition Table Entry Array CRC is wrong: 0xab54d286 != 0xb6ac2e52 part_get_info_efi: *** ERROR: Invalid GPT *** GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid Backup GPT *** partno erro : can't find partition bootloader GUID Partition Table Entry Array CRC is wrong: 0xab54d286 != 0xb6ac2e52 part_get_info_efi: *** ERROR: Invalid GPT *** GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 part_get_info_efi: *** ERROR: Invalid Backup GPT *** partno erro : can't find partition boot-resource Get bootloader and boot-resource partition number fail! [02.594]libfdt fdt_path_offset() for lcd [02.598]Could not find pmu_ext type: update_pmu_ext_info_to_kernel: L63 [02.604]update dts Hit any key to stop autoboot: 0 ## Error: "distro_bootcmd" not defined => mmc <INTERRUPT> => part list mmc 0 Partition Map for MMC device 0 -- Partition Type: EFI GUID Partition Table Entry Array CRC is wrong: 0xab54d286 != 0xb6ac2e52 part_print_efi: *** ERROR: Invalid GPT *** GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 part_print_efi: *** ERROR: Invalid Backup GPT *** => part list mmc 0 Partition Map for MMC device 0 -- Partition Type: EFI GUID Partition Table Entry Array CRC is wrong: 0xab54d286 != 0xb6ac2e52 part_print_efi: *** ERROR: Invalid GPT *** GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 part_print_efi: *** ERROR: Invalid Backup GPT ***
-
可以尝试使用 programmer_img 生成固件
使用方法
programmer_img boot0_sdcard.fex boot_package.fex ${out_img} boot0_sdcard.fex----boot0文件 boot_package.fex------即uboot文件 ${out_img}------为生成的镜像文件
或者
programmer_img sys_partition.bin sunxi_mbr.fex ${out_img} ${in_img} sunxi_gpt.fex sys_partition.bin----分区表的脚本文件 sunxi_mbr.fex------为mbr格式的分区表文件 ${out_img}------为输入的镜像文件 ${in_img}-----为输出的镜像文件 sunxi_gpt.fex----为gpt 格式的分区表文件
-
sunxi_gpt 可以这样生成
update_mbr sys_partition.bin 4 sunxi_mbr.fex dlinfo.fex 15269888 40960 0 sys_partition.bin----分区表的2进制文件 4----------------------分区表的备份个数,一般spinor为1,其他为4 sunxi_mbr.fex------生成mbr格式分区表的文件 dlinfo.fex-----------下载文件信息表 15269888----------该flash的大小,比如EMMC的USR分区的大小,单位为sector 20------------------该flash的逻辑地址,单位MByte 0--------------------代表flash的类型,1是spinor flash,0是非 spi nor类型
-
@awwwwa 感谢大佬的回复,我通过分析 build/pack 使用 ./build.sh packraw
找到了下面那个最终生成的命令
然后把 programmer_img 丢进 buildroot 打包目录,直接编译打包,生成的镜像就可以直接用啦!
sunxi_gpt这个我学习一下 怎么融进去 让他自己转换打包。
不得不说,这个 programmer_img 很强大,但是里面怎么实现的我很好奇,当时修改了各种 genimage.cfg的分区类型和头部都不行。
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号