From 8fbba09895a9d47962c076e81431af94889b39d6 Mon Sep 17 00:00:00 2001 From: Michal Lenc Date: Thu, 17 Jul 2025 17:14:15 +0200 Subject: [PATCH] boot/nxboot/loader/boot.c: copy partition with blocksize large writes The previous logic MAX(info_from.blocksize, info_where.blocksize) was incorrect. The most effective access with by writing the entire size of the block, therefore just decide the size based on the target page size. Signed-off-by: Michal Lenc --- boot/nxboot/loader/boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/nxboot/loader/boot.c b/boot/nxboot/loader/boot.c index 9364ba16f..42f83a66e 100644 --- a/boot/nxboot/loader/boot.c +++ b/boot/nxboot/loader/boot.c @@ -164,7 +164,7 @@ static int copy_partition(int from, int where, struct nxboot_state *state, #ifdef CONFIG_NXBOOT_PRINTF_PROGRESS_PERCENT total_size = remain * 100; #endif - blocksize = MAX(info_from.blocksize, info_where.blocksize); + blocksize = info_where.blocksize; buf = malloc(blocksize); if (!buf)