Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to pack all file back #32

Open
galenzhao opened this issue Mar 1, 2024 · 0 comments
Open

how to pack all file back #32

galenzhao opened this issue Mar 1, 2024 · 0 comments

Comments

@galenzhao
Copy link

unpacked with this info:

root@ubuntu1-telegraf:/avv/mstar-bin-tool# python3 unpack.py /avv/GIMI_MADISON_Z4AIR_WPM.bin 
[i] Analizing header ...
[i] Saving header script to unpacked/~header_script ...
[i] Parsing script ...
[i] Partition: recovery	Offset: 4000	Size 79f1f2 (7.62 MB) -> unpacked/recovery.img
[i] Partition: boot	Offset: 7a4000	Size 38d774 (3.55 MB) -> unpacked/boot.img
[i] Partition: system	Offset: b32000	Size 780c400 (120.05 MB) -> unpacked/system.lzo
[i]     Unpacking LZO (Please be patient) unpacked/system.lzo -> unpacked/system.img
[i] Partition: system	Offset: 833f000	Size 88c9fe9 (136.79 MB) -> unpacked/system1.lzo
[i]     Unpacking LZO (Please be patient) unpacked/system1.lzo -> unpacked/system1.img
[i]     unpacked/system1.img append to unpacked/system.img
[i] Partition: system	Offset: 10c09000	Size 6821824 (104.13 MB) -> unpacked/system2.lzo
[i]     Unpacking LZO (Please be patient) unpacked/system2.lzo -> unpacked/system2.img
[i]     unpacked/system2.img append to unpacked/system.img
[i] Partition: system	Offset: 1742b000	Size 5298c0e (82.6 MB) -> unpacked/system3.lzo
[i]     Unpacking LZO (Please be patient) unpacked/system3.lzo -> unpacked/system3.img
[i]     unpacked/system3.img append to unpacked/system.img
[i] Partition: userdata	Offset: 1c6c4000	Size 4afc5 (299.94 KB) -> unpacked/userdata.lzo
[i]     Unpacking LZO (Please be patient) unpacked/userdata.lzo -> unpacked/userdata.img
[i] Partition: cache	Offset: 1c70f000	Size d2dd (52.72 KB) -> unpacked/cache.lzo
[i]     Unpacking LZO (Please be patient) unpacked/cache.lzo -> unpacked/cache.img
[i] Partition: tvservice	Offset: 1c71d000	Size 3c00000 (60.0 MB) -> unpacked/tvservice.img
[i] Partition: tvconfig	Offset: 2031d000	Size a00000 (10.0 MB) -> unpacked/tvconfig.img
[i] Partition: tvdatabase	Offset: 20d1d000	Size 800000 (8.0 MB) -> unpacked/tvdatabase.img
[i] Partition: tvcustomer	Offset: 2151d000	Size 1000000 (16.0 MB) -> unpacked/tvcustomer.img
[i] Partition: RTPM	Offset: 2251d000	Size 10000 (64.0 KB) -> unpacked/RTPM.img
[i] Partition: sboot	Offset: 2252d000	Size 12800 (74.0 KB) -> unpacked/sboot.img
[i] Partition: MBOOT	Offset: 22540000	Size 14b7cc (1.29 MB) -> unpacked/MBOOT.img
[i] Partition: virtualsdcard	Offset: 2268c000	Size 5da1f01 (93.63 MB) -> unpacked/virtualsdcard.lzo
[i]     Unpacking LZO (Please be patient) unpacked/virtualsdcard.lzo -> unpacked/virtualsdcard.img
[i] Parsing setenv filesize -> 38d774
[i] Parsing setenv bootcmd -> mmc read.p 0x25000000 boot 0x00400000\; bootm 0x25000000
[i] Parsing setenv recoverycmd -> mmc read.p 0x25000000 recovery 0x00A00000\; bootm 0x25000000
[i] Parsing setenv MIU0_GROUP_PRIORITY -> 2:0:1:3
[i] Parsing setenv MIU1_GROUP_PRIORITY -> 1:2:3:0
[i] Parsing setenv MIU0_GROUP_SELMIU -> 1120:3000:3000:1ADE
[i] Parsing setenv MIU1_GROUP_SELMIU -> 4E40:0000:0000:0120
[i] Parsing setenv MS_MEM -> LX_MEM=0x1A200000 EMAC_MEM=0x40000 DRAM_LEN=0x40000000 LX_MEM2=0xA0000000,0x1A800000 cma_miu1=0xA0000000,0x10000000
[i] Parsing setenv KERNEL_PROTECT -> DRAM_SIZE1=0x20000000 DRAM_SIZE2=0x20000000
[i] Parsing setenv ROOT -> root=/dev/ram rw rootwait
[i] Parsing setenv bootargs -> console=ttyS0,115200 androidboot.console=ttyS0 $(ROOT) init=/init $(MS_MEM) CORE_DUMP_PATH=/data/core_dump.%%p.gz KDebug=1 delaylogo=true
[i] Parsing setenv ENV -> EMMC
[i] Parsing setenv str_crc -> 2
[i] Parsing setenv bootlogo_buffer -> E_MMAP_ID_CAMERA
[i] Parsing setenv bootlogo_gopidx -> 2
[i] Parsing setenv db_table -> 0
[i] Parsing setenv verify -> n
[i] Parsing setenv xgimi_bootwizard_environment -> true
[i] Parsing setenv MstarUpgrade_complete -> 1
root@ubuntu1-telegraf:/avv/mstar-bin-tool# ls

does my config file correct to pack all file back?
root@ubuntu1-telegraf:/avv/mstar-bin-tool/unpacked# cat ../configs/xgimi.ini

[Main]
FirmwareFileName=GIMI_MADISON_Z4AIR_WPM.bin
ProjectFolder=./unpacked
useHexValuesPrefix=true
 
SCRIPT_FIRMWARE_FILE_NAME=${FirmwareFileName}
DRAM_BUF_ADDR=20200000
MAGIC_FOOTER=12345678
HEADER_SIZE=16KB
USE_XGIMI_CRC2=True
 
[HeaderScript]
Prefix:
 
Suffix:
    setenv MstarUpgrade_complete 1
    setenv sync_mmap 1
    setenv db_table 0
    saveenv
    printenv
 
[part/system]
erase=True
imageFile=${Main:ProjectFolder}/system.img
type=partitionImage
lzo=True
chunkSize=150MB

[part/userdata]
erase=True
imageFile=${Main:ProjectFolder}/userdata.img
type=partitionImage
lzo=True
chunkSize=150MB

[part/cache]
erase=True
imageFile=${Main:ProjectFolder}/cache.img
type=partitionImage
lzo=True
chunkSize=150MB

[part/tvservice]
erase=True
imageFile=${Main:ProjectFolder}/tvservice.img
type=partitionImage

[part/tvconfig]
erase=True
imageFile=${Main:ProjectFolder}/tvconfig.img
type=partitionImage

[part/tvdatabase]
erase=True
imageFile=${Main:ProjectFolder}/tvdatabase.img
type=partitionImage

[part/tvcustomer]
erase=True
imageFile=${Main:ProjectFolder}/tvcustomer.img
type=partitionImage

[part/virtualsdcard]
erase=True
imageFile=${Main:ProjectFolder}/virtualsdcard.img
type=partitionImage
lzo=True
chunkSize=150MB

do I need put all setenv from unpack script to Suffix section in config file?
thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant