How to resize partitions app in jetson tx2

how to resize partitions app in jetson tx2,I Want to Reduce the app partition size and create a new partition

You can check some old posts like this.

The method should be still same on rel-32.

  • Flash.xml generation is based on Flash L4T T186.xml,Changing flash.xml makes no sense

Good, then change the one that would take effect.

I Have try to change flash_l4t_t186.xml, but write to system.img with flash.sh and it gets stuck,like this:


<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
21474836480
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 0x8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
<align_boundary> 4096 </align_boundary>
<unique_guid> APPUUID </unique_guid>
APPFILE
Required. Contains the rootfs. This partition must be defined
after primary_GPT so that it can be accessed as the fixed known special device
/dev/mmcblk0p1.

Or you can use the default xml file with -S in your flash.sh.


         -S <size> ------------ Rootfs size in bytes. Valid only for internal
                                 rootdev. KiB, MiB, GiB short hands are allowed,
                                 for example, 1GiB means 1024 * 1024 * 1024 bytes.

*I’ve already used this method and running flash.sh is also stuck

What is the size of your system image?
What is the jetpack release version?

Could you dump both the uart log and host log when flash fails?

the size of my system image is 21143708372 byte, and the jetpack release version is JetPack_4.5.1_Linux_JETSON_TX2,
Operation instruction is :sudo ./flash.sh -r -S 23GiB jetson-tx2 mmcblk0p1,
here is th flash fails log:
[ 22.9321 ] Writing partition APP with system.img
[ 1026.2622 ] ] 000%
Error: Return value 3
Command tegradevflash_v2 --pt flash.xml.bin --create
Failed flashing t186ref.

Can you dump the uart log during the flash?

[0035.563] I> Welcome to MB2(TBoot-BPMP) Recovery(version: 01.00.160913-t186-M-00.00-mobile-2814ffb8)
[0035.573] I> Boot-device: eMMC
[0035.702] I> sdmmc DDR50 mode
[0035.707] I> sdmmc bdev is already initialized
[0035.711] I> pmic: reset reason (nverc) : 0x80
[0035.719] I> Found 19 partitions in SDMMC_BOOT (instance 3)
[0035.729] I> Found 33 partitions in SDMMC_USER (instance 3)
[0035.738] I> Binary(16) of size 534416 is loaded @ 0xd7800000
[0035.747] I> Binary(17) of size 604720 is loaded @ 0xd796c5c0
[0035.977] I> Copy BTCM section
[0035.981] I> Binary(13) of size 221376 is loaded @ 0x96000000
[0035.989] I> Binary(20) of size 374528 is loaded @ 0x8520f400
[0035.997] I> Binary(14) of size 394672 is loaded @ 0x8530f600
[0036.004] I> TOS boot-params @ 0x85000000
[0036.008] I> TOS params prepared
[0036.011] I> Loading EKS …
[0036.015] I> Binary(15) of size 1040 is loaded @ 0x8590f800
[0036.020] I> EKB detected (length: 0x400) @ 0x8590f800
[0036.025] I> Copied encrypted keys
[0036.029] I> boot profiler @ 0x275844000
[0036.033] I> boot profiler for TOS @ 0x275844000
[0036.038] I> Unhalting SCE
[0036.040] I> Primary Memory Start:80000000 Size:70000000
[0036.046] I> Extended Memory Start:f0110000 Size:1856f0000
[0036.052] I> MB2(TBoot-BPMP) Recovery done

NOTICE: BL31: v1.3(release):5b49e7f80
NOTICE: BL31: Built : 08:38:54, Feb 19 2021
ipc-unittest-main: 1519: Welcome to IPC unittest!!!
ipc-unittest-main: 1531: waiting forever
ipc-unittest-srv: 329: Init unittest services!!!
hwkey-agent: 40: hwkey-agent is running!!
hwkey-agent: 197: key_mgnt_processing …
hwkey-agent: 189: Setting EKB key 0 to slot 14
hwkey-agent: 167: Init hweky-agent services!!
luks-srv: 40: luks-srv is running!!
luks-srv: 157: Init luks-srv IPC services!!
platform_bootstrap_epilog: trusty bootstrap complete
[0036.427] I> Welcome to TBoot-CPU Recovery(version: 01.00.160913-t186-M-00.00-mobile-bf9ced17)
[0036.435] I> gpio framework initialized
[0036.439] I> tegrabl_gpio_driver_register: register ‘nvidia,tegra186-gpio’ driver
[0036.446] I> tegrabl_gpio_driver_register: register ‘nvidia,tegra186-gpio-aon’ driver
[0036.454] I> tegrabl_tca9539_init: i2c bus: 0, slave addr: 0xee
[0036.463] I> tegrabl_gpio_driver_register: register ‘tca9539_gpio_driver’ driver
[0036.470] I> tegrabl_tca9539_init: i2c bus: 0, slave addr: 0xe8
[0036.478] I> tegrabl_gpio_driver_register: register ‘tca9539_gpio_driver’ driver
[0036.485] I> CPU: ARM Cortex A57
[0036.488] I> CPU: MIDR: 0x411fd073, MPIDR: 0x80000100
[0036.493] I> L2 ECC enabled : yes
[0036.496] I> CPU-BL Params @ 0x275800000
[0036.500] I> 0) Base:0x00000000 Size:0x00000000
[0036.504] I> 1) Base:0x277f00000 Size:0x00100000
[0036.509] I> 2) Base:0x277e00000 Size:0x00100000
[0036.513] I> 3) Base:0x277d00000 Size:0x00100000
[0036.518] I> 4) Base:0x277c00000 Size:0x00100000
[0036.522] I> 5) Base:0x277b00000 Size:0x00100000
[0036.527] I> 6) Base:0x277800000 Size:0x00200000
[0036.531] I> 7) Base:0x277400000 Size:0x00400000
[0036.536] I> 8) Base:0x277a00000 Size:0x00100000
[0036.540] I> 9) Base:0x277300000 Size:0x00100000
[0036.545] I> 10) Base:0x276800000 Size:0x00800000
[0036.550] I> 11) Base:0x30000000 Size:0x00040000
[0036.554] I> 12) Base:0xf0000000 Size:0x00100000
[0036.558] I> 13) Base:0x30040000 Size:0x00001000
[0036.563] I> 14) Base:0x30048000 Size:0x00001000
[0036.567] I> 15) Base:0x30049000 Size:0x00001000
[0036.572] I> 16) Base:0x3004a000 Size:0x00001000
[0036.576] I> 17) Base:0x3004b000 Size:0x00001000
[0036.581] I> 18) Base:0x3004c000 Size:0x00001000
[0036.585] I> 19) Base:0x3004d000 Size:0x00001000
[0036.589] I> 20) Base:0x3004e000 Size:0x00001000
[0036.594] I> 21) Base:0x3004f000 Size:0x00001000
[0036.598] I> 22) Base:0x00000000 Size:0x00000000
[0036.603] I> 23) Base:0xf0100000 Size:0x00010000
[0036.607] I> 24) Base:0x00000000 Size:0x00000000
[0036.612] I> 25) Base:0x00000000 Size:0x00000000
[0036.616] I> 26) Base:0x00000000 Size:0x00000000
[0036.620] I> 27) Base:0x00000000 Size:0x00000000
[0036.625] I> 28) Base:0x84400000 Size:0x00400000
[0036.629] I> 29) Base:0x30000000 Size:0x00010000
[0036.634] I> 30) Base:0x278000000 Size:0x08000000
[0036.638] I> 31) Base:0x00000000 Size:0x00000000
[0036.643] I> 32) Base:0x276000000 Size:0x00600000
[0036.647] I> 33) Base:0x80000000 Size:0x70000000
[0036.652] I> 34) Base:0xf0110000 Size:0x1856f0000
[0036.656] I> 35) Base:0x00000000 Size:0x00000000
[0036.661] I> 36) Base:0x00000000 Size:0x00000000
[0036.665] I> 37) Base:0x2772e0000 Size:0x00020000
[0036.670] I> 38) Base:0x84000000 Size:0x00400000
[0036.674] I> 39) Base:0x96000000 Size:0x02000000
[0036.678] I> 40) Base:0x85000000 Size:0x01200000
[0036.683] I> 41) Base:0x275800000 Size:0x00500000
[0036.687] I> 42) Base:0x00000000 Size:0x00000000
[0036.692] I> 43) Base:0x00000000 Size:0x00000000
[0036.696] I> Boot-device: eMMC
[0036.719] I> sdmmc DDR50 mode
[0036.724] I> sdmmc bdev is already initialized
[0036.730] I> Found 19 partitions in SDMMC_BOOT (instance 3)
[0036.736] I> Found 33 partitions in SDMMC_USER (instance 3)
[0036.741] I> bl dtb load address = @0x8520f400
[0036.746] I> Recovery boot_type: 0
[0036.753] I> fixed regulator driver initialized
[0036.795] I> register ‘maxim’ power off handle
[0036.802] I> virtual i2c enabled
[0036.805] I> registered ‘maxim,max77620’ pmic
[0036.809] I> tegrabl_gpio_driver_register: register ‘max77620-gpio’ driver
[0036.816] I> Entering 3p server
[0036.819] I> HIGH SPEED
[0037.891] I> USB configuration success
[0038.869] I> Populate storage info
[0039.150] I> Erasing device 0: 3
[0039.216] I> Writing device 0: 3.
[0039.249] I> Found 19 partitions in SDMMC_BOOT (instance 3)
[0039.294] I> Erasing device 1: 3
[0039.622] I> Writing device 1: 3.
[0039.688] I> Writing device 1: 3.
[0039.721] I> Found 33 partitions in SDMMC_USER (instance 3)
[0039.768] I> Writing device 1: 3.
[0039.798] I> Found 33 partitions in SDMMC_USER (instance 3)
[0039.844] I> Writing mb1 partition.
[0039.926] I> Writing mb1_b partition.
[0040.010] I> Writing dram-ecc-fw partition.
[0040.087] I> Writing badpage-fw partition.
[0040.159] I> Writing badpage-fw_b partition.
[0040.229] I> Writing spe-fw partition.
[0040.314] I> Writing spe-fw_b partition.
[0040.396] I> Writing mb2 partition.
[0040.484] I> Writing mb2_b partition.
[0040.569] I> Writing mts-preboot partition.
[0040.650] I> Writing mts-preboot_b partition.
[0040.724] I> Writing SMD partition.
[0040.791] I> Writing SMD_b partition.
[0040.857] I> Writing VER_b partition.
[0040.927] I> Writing VER partition.
[0040.995] I> Writing device 1: 3.
[0041.068] I> Writing APP partition.
[0041.228] E> NV3P_SERVER: Could not write 1048576 bytes.

Do you change both xml file and “-S” in flash.sh now or you only change the “-S” in flash.sh?

only change the “-S” in flash.sh

Can you please do not use “-r” in flash.sh?

like this:
sudo ./flash.sh -S 23GiB jetson-tx2 mmcblk0p1
?

Hi 673765403,

Please try below steps:

1. Edit Linux_for_Tegra/bootloader/flash.xml
    --> change APP size to 23GiB
2. Run below command to flash:
    $ sudo ./flash.sh -S 23GiB jetson-tx2 mmcblk0p1

We confirm it’s working and boot up success.

  • This method is proven to work. Thank you
1 Like

use below steps: ./flash.sh -S 23GiB jetson-tx2 mmcblk0p1, *A new image is created each time ,But I’m going to use my own system.img.How do I do that

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.