I need to decrease the kernel partitions sizes as they are too big. For example, the kernel and kernel_b partitions are 60 mb each, and they are only containing u-boot (boot.img) which is 400k in size.
I’m using the Jetpack 4.2 BSP flashing utility ./flash.sh jetson-tx2 mmcblk0p1 and set the LNXSIZE by hand in the flash_l4t_t186.xml config file for both kernel and kernel_b, like this:
<partition name="LNXNAME" type="data" oem_sign="true"> <allocation_policy> sequential </allocation_policy> <filesystem_type> basic </filesystem_type> <size> 6291456 </size> <file_system_attribute> 0 </file_system_attribute> <allocation_attribute> 8 </allocation_attribute> <percent_reserved> 0 </percent_reserved> <filename> LNXFILE </filename> </partition>
However, the board won’t load u-boot anymore after doing so:
[0001.880] I> Kernel type = Normal [0001.883] I> Loading kernel/boot.img from built-in storage ... [0001.889] W> No valid slot number is found in scratch register [0001.894] W> Return default slot: _a [0001.898] I> A/B: bin_type (24) slot 0 [0001.901] E> Cannot read beyond partition boundary for kernel [0001.907] E> Failed to read bootimage partition [0001.911] E> Cannot get binary info kernel [0001.915] E> A/B loader failure [0001.918] E> Top caller module: LOADER, error module: PARTITION_MANAGER, reason: 0x04, aux_info: 0x01
size | | (Required) Specifies the size of the partition in bytes. Decimal and hexadecimal values are valid.
The partition size may be equal to or larger than the size of the file to be written to the partition. Specifying a larger size allows the file size to increase later without requiring the partition configuration file to be modified.
If the partition size specified is less than an erase block size, it will align itself to the partition erase block boundary.
Can you please help and tell me where else I should specify kernel partitions sizes apart from the xml so that I can actually lower them?