Jump to content

Recommended Posts

Posted
On 5/10/2025 at 8:29 PM, Nick A said:

You could use this tool to extract your dram settings from an android update or boot0.bin. 
https://github.com/apritzel/sunxi-fw

 

sunxi-fw info -v boot0.bin

Hi @Nick A, I really need your help to understand the way to change the 171-add-x98h-defconfig.patch. Firstly, I extracted the DRAM parameters, but there are 15 of them: DRAM parameters, DRAM parameters 1, ... DRAM parameters E. Some of them have distinct parameters. The first of then (DRAM parameters) have the very identical parameters as yours, only differ in the same parameters, that isn't in patch file like TPR13, but I don't know if it matters. So I tried using the DRAM parameters 1, which is the most different, with clock 600 instead of 648 and almost all parameters different, but it works the same way with the same 2GB of RAM.

I think this is strange, because with so many differences, I expected the image would not work. Do you have any tips for giving me?

 

My extracted parameters:

 

./sunxi-fw info -v ./image4.img
@   0: wty: PhoenixSuite image file
    header v3.0, 45 images, 1859 MB
        wty:sys_config.fex      :       34908 bytes @ +0x000000b800
        wty:board.fex           :        1024 bytes @ +0x0000014400
        wty:config.fex          :       53248 bytes @ +0x0000014800
        wty:split_xxxx.fex      :         512 bytes @ +0x0000021800
        wty:sys_partition.fex   :        5601 bytes @ +0x0000021c00
        wty:sunxi.fex           :       71680 bytes @ +0x0000023400
        wty:boot0_nand.fex      :       61440 bytes @ +0x0000034c00
        wty:boot0_sdcard.fex    :       61440 bytes @ +0x0000043c00
        wty:u-boot.fex          :      917504 bytes @ +0x0000052c00
        wty:u-boot-crash.fex    :          37 bytes @ +0x0000132c00
        wty:toc1.fex            :           8 bytes @ +0x0000133000
        wty:toc0.fex            :           8 bytes @ +0x0000133400
        wty:fes1.fex            :       40160 bytes @ +0x0000133800
        wty:boot_package.fex    :     1294336 bytes @ +0x000013d800
        wty:usbtool.fex         :      154624 bytes @ +0x0000279800
        wty:usbtool_crash.fex   :      621056 bytes @ +0x000029f400
        wty:aultools.fex        :      166515 bytes @ +0x0000337000
        wty:aultls32.fex        :      152069 bytes @ +0x000035fc00
        wty:cardtool.fex        :       73728 bytes @ +0x0000385000
        wty:cardscript.fex      :        1899 bytes @ +0x0000397000
        wty:sunxi_gpt.fex       :        8192 bytes @ +0x0000397800
        wty:sunxi_mbr.fex       :       65536 bytes @ +0x0000399800
        wty:dlinfo.fex          :       16384 bytes @ +0x00003a9800
        wty:arisc.fex           :           6 bytes @ +0x00003ad800
        wty:vmlinux.fex         :    12444168 bytes @ +0x00003adc00
        wty:boot-resource.fex   :     7490560 bytes @ +0x0000f8c000
        wty:Vboot-resource.fex  :           4 bytes @ +0x00016b0c00
        wty:env.fex             :      131072 bytes @ +0x00016b1000
        wty:Venv.fex            :           4 bytes @ +0x00016d1000
        wty:boot.fex            :    67108864 bytes @ +0x00016d1400
        wty:Vboot.fex           :           4 bytes @ +0x00056d1400
        wty:vendor_boot.fex     :    33554432 bytes @ +0x00056d1800
        wty:Vvendor_boot.fex    :           4 bytes @ +0x00076d1800
        wty:super.fex           :  1806382676 bytes @ +0x00076d1c00
        wty:Vsuper.fex          :           4 bytes @ +0x0073185400
        wty:misc.fex            :    16777216 bytes @ +0x0073185800
        wty:Vmisc.fex           :           4 bytes @ +0x0074185800
        wty:vbmeta.fex          :        8192 bytes @ +0x0074185c00
        wty:Vvbmeta.fex         :           4 bytes @ +0x0074187c00
        wty:vbmeta_system.fex   :        4096 bytes @ +0x0074188000
        wty:Vvbmeta_system.fex  :           4 bytes @ +0x0074189000
        wty:vbmeta_vendor.fex   :        4096 bytes @ +0x0074189400
        wty:Vvbmeta_vendor.fex  :           4 bytes @ +0x007418a400
        wty:dtbo.fex            :     2097152 bytes @ +0x007418a800
        wty:Vdtbo.fex           :           4 bytes @ +0x007438a800
@ 542: boot0: Allwinner boot0
    size: 61440 bytes
    eGON checksum matches: 0x505a301a
    DRAM parameters:           A64        H616        A133   
        DRAM clock  :         648         648         648
        DRAM type   :         0x3         0x3         0x3
        ZQ value    :   0x3030303           -           -
        ODT enabled :   0xe0e0e0e         0x1           -
        DX ODT      :           -   0x3030303   0x3030303
        DX DRI      :           -   0xe0e0e0e   0xe0e0e0e
        CA DRI      :           -      0x1f12      0x1f12
        PARA0       :           -           -         0x1
        PARA1       :      0x1f12      0x30fb      0x30fb
        PARA2       :         0x1           0           0
        MR0         :      0x30fb       0x840       0x840
        MR1         :           0         0x4         0x4
        MR2         :       0x840         0x8         0x8
        MR3         :         0x4           0           0
        TPR0        :         0x8  0xc0001002           0
        TPR2        :           0           0  0xc0001002
        TPR6        :           0  0x33808080  0x33808080
        TPR10       :           0    0x2f1107    0x2f1107
        TPR11       :           0  0xddddcccc  0xddddcccc
        TPR12       :  0xc0001002  0xeddc7665  0xeddc7665
        TPR13       :           0        0x40        0x40
    DRAM parameters 1:         A64        H616        A133   
        DRAM clock  :         600         600         600
        DRAM type   :         0x3         0x3         0x3
        ZQ value    :   0x3030303           -           -
        ODT enabled :   0xe0e0e0e         0x1           -
        DX ODT      :           -   0x3030303   0x3030303
        DX DRI      :           -   0xe0e0e0e   0xe0e0e0e
        CA DRI      :           -      0x1c1a      0x1c1a
        PARA0       :           -           -         0x1
        PARA1       :      0x1c1a      0x30fb      0x30fb
        PARA2       :         0x1           0           0
        MR0         :      0x30fb       0x840       0x840
        MR1         :           0         0x4         0x4
        MR2         :       0x840         0x8         0x8
        MR3         :         0x4           0           0
        TPR0        :         0x8  0xc000130a           0
        TPR2        :           0           0  0xc000130a
        TPR6        :           0  0x33808080  0x33808080
        TPR10       :           0    0x2f0006    0x2f0006
        TPR11       :           0  0xddddcccc  0xddddcccc
        TPR12       :  0xc000130a  0xeddc6554  0xeddc6554
        TPR13       :           0        0x40        0x40
    DRAM parameters 2:         A64        H616        A133   
        DRAM clock  :         648         648         648
        DRAM type   :         0x3         0x3         0x3
        ZQ value    :   0x3030303           -           -
        ODT enabled :   0xe0e0e0e         0x1           -
        DX ODT      :           -   0x3030303   0x3030303
        DX DRI      :           -   0xe0e0e0e   0xe0e0e0e
        CA DRI      :           -      0x1c12      0x1c12
        PARA0       :           -           -         0x1
        PARA1       :      0x1c12      0x30fb      0x30fb
        PARA2       :         0x1           0           0
        MR0         :      0x30fb       0x840       0x840
        MR1         :           0         0x4         0x4
        MR2         :       0x840         0x8         0x8
        MR3         :         0x4           0           0
        TPR0        :         0x8  0xc0000a05           0
        TPR2        :           0           0  0xc0000a05
        TPR6        :           0  0x33808080  0x33808080
        TPR10       :           0    0x2f0006    0x2f0006
        TPR11       :           0  0xddddcccc  0xddddcccc
        TPR12       :  0xc0000a05  0xeddc7564  0xeddc7564
        TPR13       :           0        0x40        0x40
    DRAM parameters 3:         A64        H616        A133   
        DRAM clock  :         648         648         648
        DRAM type   :         0x3         0x3         0x3
        ZQ value    :   0x3030303           -           -
        ODT enabled :   0xe0e0e0e         0x1           -
        DX ODT      :           -   0x3030303   0x3030303
        DX DRI      :           -   0xe0e0e0e   0xe0e0e0e
        CA DRI      :           -      0x1c12      0x1c12
        PARA0       :           -           -         0x1
        PARA1       :      0x1c12      0x30fb      0x30fb
        PARA2       :         0x1           0           0
        MR0         :      0x30fb       0x840       0x840
        MR1         :           0         0x4         0x4
        MR2         :       0x840         0x8         0x8
        MR3         :         0x4           0           0
        TPR0        :         0x8  0xc0000a05           0
        TPR2        :           0           0  0xc0000a05
        TPR6        :           0  0x33808080  0x33808080
        TPR10       :           0    0x2f0006    0x2f0006
        TPR11       :           0  0xddddcccc  0xddddcccc
        TPR12       :  0xc0000a05  0xeddc7564  0xeddc7564
        TPR13       :           0        0x40        0x40
    DRAM parameters 4:         A64        H616        A133   
        DRAM clock  :         648         648         648
        DRAM type   :         0x3         0x3         0x3
        ZQ value    :   0x3030303           -           -
        ODT enabled :   0xe0e0e0e         0x1           -
        DX ODT      :           -   0x3030303   0x3030303
        DX DRI      :           -   0xe0e0e0e   0xe0e0e0e
        CA DRI      :           -      0x1c12      0x1c12
        PARA0       :           -           -         0x1
        PARA1       :      0x1c12      0x30fb      0x30fb
        PARA2       :         0x1           0           0
        MR0         :      0x30fb       0x840       0x840
        MR1         :           0         0x4         0x4
        MR2         :       0x840         0x8         0x8
        MR3         :         0x4           0           0
        TPR0        :         0x8  0xc0000a05           0
        TPR2        :           0           0  0xc0000a05
        TPR6        :           0  0x33808080  0x33808080
        TPR10       :           0    0x2f0006    0x2f0006
        TPR11       :           0  0xddddcccc  0xddddcccc
        TPR12       :  0xc0000a05  0xeddc7564  0xeddc7564
        TPR13       :           0        0x40        0x40
    DRAM parameters 5:         A64        H616        A133   
        DRAM clock  :         648         648         648
        DRAM type   :         0x3         0x3         0x3
        ZQ value    :   0x3030303           -           -
        ODT enabled :   0xe0e0e0e         0x1           -
        DX ODT      :           -   0x3030303   0x3030303
        DX DRI      :           -   0xe0e0e0e   0xe0e0e0e
        CA DRI      :           -      0x1c12      0x1c12
        PARA0       :           -           -         0x1
        PARA1       :      0x1c12      0x30fb      0x30fb
        PARA2       :         0x1           0           0
        MR0         :      0x30fb       0x840       0x840
        MR1         :           0         0x4         0x4
        MR2         :       0x840         0x8         0x8
        MR3         :         0x4           0           0
        TPR0        :         0x8  0xc0000a05           0
        TPR2        :           0           0  0xc0000a05
        TPR6        :           0  0x33808080  0x33808080
        TPR10       :           0    0x2f0006    0x2f0006
        TPR11       :           0  0xddddcccc  0xddddcccc
        TPR12       :  0xc0000a05  0xeddc7564  0xeddc7564
        TPR13       :           0        0x40        0x40
    DRAM parameters 6:         A64        H616        A133   
        DRAM clock  :         648         648         648
        DRAM type   :         0x3         0x3         0x3
        ZQ value    :   0x3030303           -           -
        ODT enabled :   0xe0e0e0e         0x1           -
        DX ODT      :           -   0x3030303   0x3030303
        DX DRI      :           -   0xe0e0e0e   0xe0e0e0e
        CA DRI      :           -      0x1c12      0x1c12
        PARA0       :           -           -         0x1
        PARA1       :      0x1c12      0x30fb      0x30fb
        PARA2       :         0x1           0           0
        MR0         :      0x30fb       0x840       0x840
        MR1         :           0         0x4         0x4
        MR2         :       0x840         0x8         0x8
        MR3         :         0x4           0           0
        TPR0        :         0x8  0xc0000a05           0
        TPR2        :           0           0  0xc0000a05
        TPR6        :           0  0x33808080  0x33808080
        TPR10       :           0    0x2f0006    0x2f0006
        TPR11       :           0  0xddddcccc  0xddddcccc
        TPR12       :  0xc0000a05  0xeddc7564  0xeddc7564
        TPR13       :           0        0x40        0x40
    DRAM parameters 7:         A64        H616        A133   
        DRAM clock  :         648         648         648
        DRAM type   :         0x3         0x3         0x3
        ZQ value    :   0x3030303           -           -
        ODT enabled :   0xe0e0e0e         0x1           -
        DX ODT      :           -   0x3030303   0x3030303
        DX DRI      :           -   0xe0e0e0e   0xe0e0e0e
        CA DRI      :           -      0x1c12      0x1c12
        PARA0       :           -           -         0x1
        PARA1       :      0x1c12      0x30fb      0x30fb
        PARA2       :         0x1           0           0
        MR0         :      0x30fb       0x840       0x840
        MR1         :           0         0x4         0x4
        MR2         :       0x840         0x8         0x8
        MR3         :         0x4           0           0
        TPR0        :         0x8  0xc0000a05           0
        TPR2        :           0           0  0xc0000a05
        TPR6        :           0  0x33808080  0x33808080
        TPR10       :           0    0x2f0006    0x2f0006
        TPR11       :           0  0xddddcccc  0xddddcccc
        TPR12       :  0xc0000a05  0xeddc7564  0xeddc7564
        TPR13       :           0        0x40        0x40
    DRAM parameters 8:         A64        H616        A133   
        DRAM clock  :         648         648         648
        DRAM type   :         0x3         0x3         0x3
        ZQ value    :   0x3030303           -           -
        ODT enabled :   0xe0e0e0e         0x1           -
        DX ODT      :           -   0x3030303   0x3030303
        DX DRI      :           -   0xe0e0e0e   0xe0e0e0e
        CA DRI      :           -      0x1c12      0x1c12
        PARA0       :           -           -         0x1
        PARA1       :      0x1c12      0x30fb      0x30fb
        PARA2       :         0x1           0           0
        MR0         :      0x30fb       0x840       0x840
        MR1         :           0         0x4         0x4
        MR2         :       0x840         0x8         0x8
        MR3         :         0x4           0           0
        TPR0        :         0x8  0xc0000a05           0
        TPR2        :           0           0  0xc0000a05
        TPR6        :           0  0x33808080  0x33808080
        TPR10       :           0    0x2f0006    0x2f0006
        TPR11       :           0  0xddddcccc  0xddddcccc
        TPR12       :  0xc0000a05  0xeddc7564  0xeddc7564
        TPR13       :           0        0x40        0x40
    DRAM parameters 9:         A64        H616        A133   
        DRAM clock  :         648         648         648
        DRAM type   :         0x3         0x3         0x3
        ZQ value    :   0x3030303           -           -
        ODT enabled :   0xe0e0e0e         0x1           -
        DX ODT      :           -   0x3030303   0x3030303
        DX DRI      :           -   0xe0e0e0e   0xe0e0e0e
        CA DRI      :           -      0x1c12      0x1c12
        PARA0       :           -           -         0x1
        PARA1       :      0x1c12      0x30fb      0x30fb
        PARA2       :         0x1           0           0
        MR0         :      0x30fb       0x840       0x840
        MR1         :           0         0x4         0x4
        MR2         :       0x840         0x8         0x8
        MR3         :         0x4           0           0
        TPR0        :         0x8  0xc0000a05           0
        TPR2        :           0           0  0xc0000a05
        TPR6        :           0  0x33808080  0x33808080
        TPR10       :           0    0x2f0006    0x2f0006
        TPR11       :           0  0xddddcccc  0xddddcccc
        TPR12       :  0xc0000a05  0xeddc7564  0xeddc7564
        TPR13       :           0        0x40        0x40
    DRAM parameters A:         A64        H616        A133   
        DRAM clock  :         648         648         648
        DRAM type   :         0x3         0x3         0x3
        ZQ value    :   0x3030303           -           -
        ODT enabled :   0xe0e0e0e         0x1           -
        DX ODT      :           -   0x3030303   0x3030303
        DX DRI      :           -   0xe0e0e0e   0xe0e0e0e
        CA DRI      :           -      0x1c12      0x1c12
        PARA0       :           -           -         0x1
        PARA1       :      0x1c12      0x30fb      0x30fb
        PARA2       :         0x1           0           0
        MR0         :      0x30fb       0x840       0x840
        MR1         :           0         0x4         0x4
        MR2         :       0x840         0x8         0x8
        MR3         :         0x4           0           0
        TPR0        :         0x8  0xc0000a05           0
        TPR2        :           0           0  0xc0000a05
        TPR6        :           0  0x33808080  0x33808080
        TPR10       :           0    0x2f0006    0x2f0006
        TPR11       :           0  0xddddcccc  0xddddcccc
        TPR12       :  0xc0000a05  0xeddc7564  0xeddc7564
        TPR13       :           0        0x40        0x40
    DRAM parameters B:         A64        H616        A133   
        DRAM clock  :         648         648         648
        DRAM type   :         0x3         0x3         0x3
        ZQ value    :   0x3030303           -           -
        ODT enabled :   0xe0e0e0e         0x1           -
        DX ODT      :           -   0x3030303   0x3030303
        DX DRI      :           -   0xe0e0e0e   0xe0e0e0e
        CA DRI      :           -      0x1c12      0x1c12
        PARA0       :           -           -         0x1
        PARA1       :      0x1c12      0x30fb      0x30fb
        PARA2       :         0x1           0           0
        MR0         :      0x30fb       0x840       0x840
        MR1         :           0         0x4         0x4
        MR2         :       0x840         0x8         0x8
        MR3         :         0x4           0           0
        TPR0        :         0x8  0xc0000a05           0
        TPR2        :           0           0  0xc0000a05
        TPR6        :           0  0x33808080  0x33808080
        TPR10       :           0    0x2f0006    0x2f0006
        TPR11       :           0  0xddddcccc  0xddddcccc
        TPR12       :  0xc0000a05  0xeddc7564  0xeddc7564
        TPR13       :           0        0x40        0x40
    DRAM parameters C:         A64        H616        A133   
        DRAM clock  :         648         648         648
        DRAM type   :         0x3         0x3         0x3
        ZQ value    :   0x3030303           -           -
        ODT enabled :   0xe0e0e0e         0x1           -
        DX ODT      :           -   0x3030303   0x3030303
        DX DRI      :           -   0xe0e0e0e   0xe0e0e0e
        CA DRI      :           -      0x1c12      0x1c12
        PARA0       :           -           -         0x1
        PARA1       :      0x1c12      0x30fb      0x30fb
        PARA2       :         0x1           0           0
        MR0         :      0x30fb       0x840       0x840
        MR1         :           0         0x4         0x4
        MR2         :       0x840         0x8         0x8
        MR3         :         0x4           0           0
        TPR0        :         0x8  0xc0000a05           0
        TPR2        :           0           0  0xc0000a05
        TPR6        :           0  0x33808080  0x33808080
        TPR10       :           0    0x2f0006    0x2f0006
        TPR11       :           0  0xddddcccc  0xddddcccc
        TPR12       :  0xc0000a05  0xeddc7564  0xeddc7564
        TPR13       :           0        0x40        0x40
    DRAM parameters D:         A64        H616        A133   
        DRAM clock  :         648         648         648
        DRAM type   :         0x3         0x3         0x3
        ZQ value    :   0x3030303           -           -
        ODT enabled :   0xe0e0e0e         0x1           -
        DX ODT      :           -   0x3030303   0x3030303
        DX DRI      :           -   0xe0e0e0e   0xe0e0e0e
        CA DRI      :           -      0x1c12      0x1c12
        PARA0       :           -           -         0x1
        PARA1       :      0x1c12      0x30fb      0x30fb
        PARA2       :         0x1           0           0
        MR0         :      0x30fb       0x840       0x840
        MR1         :           0         0x4         0x4
        MR2         :       0x840         0x8         0x8
        MR3         :         0x4           0           0
        TPR0        :         0x8  0xc0000a05           0
        TPR2        :           0           0  0xc0000a05
        TPR6        :           0  0x33808080  0x33808080
        TPR10       :           0    0x2f0006    0x2f0006
        TPR11       :           0  0xddddcccc  0xddddcccc
        TPR12       :  0xc0000a05  0xeddc7564  0xeddc7564
        TPR13       :           0        0x40        0x40
    DRAM parameters E:         A64        H616        A133   
        DRAM clock  :         648         648         648
        DRAM type   :         0x3         0x3         0x3
        ZQ value    :   0x3030303           -           -
        ODT enabled :   0xe0e0e0e         0x1           -
        DX ODT      :           -   0x3030303   0x3030303
        DX DRI      :           -   0xe0e0e0e   0xe0e0e0e
        CA DRI      :           -      0x1c12      0x1c12
        PARA0       :           -           -         0x1
        PARA1       :      0x1c12      0x30fb      0x30fb
        PARA2       :         0x1           0           0
        MR0         :      0x30fb       0x840       0x840
        MR1         :           0         0x4         0x4
        MR2         :       0x840         0x8         0x8
        MR3         :         0x4           0           0
        TPR0        :         0x8  0xc0000a05           0
        TPR2        :           0           0  0xc0000a05
        TPR6        :           0  0x33808080  0x33808080
        TPR10       :           0    0x2f0006    0x2f0006
        TPR11       :           0  0xddddcccc  0xddddcccc
        TPR12       :  0xc0000a05  0xeddc7564  0xeddc7564
        TPR13       :           0        0x40        0x40
 

Posted (edited)

I think the only difference with x98h is the emmc gpio #. So it should boot but not off of emmc. Unless x98h has the correct value.

 

I'm not sure if this will fix your problem because it's the kernel not detecting your dram. I don't know why. You can ask for help in this IRC channel.

https://oftc.catirclogs.org/linux-sunxi/2025-05-18

 

You can find the dram config options here. I don't see TPR13 as an option so you can leave that out.

https://elixir.bootlin.com/u-boot/v2025.07-rc2/source/arch/arm/mach-sunxi/Kconfig

if DRAM_SUN50I_H616
config DRAM_SUNXI_DX_ODT
	hex "DRAM DX ODT parameter"
	help
	  DX ODT value from vendor DRAM settings.

config DRAM_SUNXI_DX_DRI
	hex "DRAM DX DRI parameter"
	help
	  DX DRI value from vendor DRAM settings.

config DRAM_SUNXI_CA_DRI
	hex "DRAM CA DRI parameter"
	help
	  CA DRI value from vendor DRAM settings.

config DRAM_SUNXI_ODT_EN
	hex "DRAM ODT EN parameter"
	default 0x1
	help
	  ODT EN value from vendor DRAM settings.

config DRAM_SUNXI_TPR0
	hex "DRAM TPR0 parameter"
	default 0x0
	help
	  TPR0 value from vendor DRAM settings.

config DRAM_SUNXI_TPR2
	hex "DRAM TPR2 parameter"
	default 0x0
	help
	  TPR2 value from vendor DRAM settings.

config DRAM_SUNXI_TPR6
	hex "DRAM TPR6 parameter"
	default 0x3300c080
	help
	  TPR6 value from vendor DRAM settings.

config DRAM_SUNXI_TPR10
	hex "DRAM TPR10 parameter"
	help
	  TPR10 value from vendor DRAM settings. It tells which features
	  should be configured, like write leveling, read calibration, etc.

config DRAM_SUNXI_TPR11
	hex "DRAM TPR11 parameter"
	default 0x0
	help
	  TPR11 value from vendor DRAM settings.

config DRAM_SUNXI_TPR12
	hex "DRAM TPR12 parameter"
	default 0x0
	help
	  TPR12 value from vendor DRAM settings.

 

Edited by Nick A

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines