Re: [PATCH] boot: android: Check kcmdline's for NULL in android_image_get_kernel()

2025-01-13 Thread Nicolas Belin
ta.kcmdline_extra && *img_data.kcmdline_extra) { > if (*newbootargs) /* If there is something in newbootargs, a > space is needed */ > strcat(newbootargs, " "); > strcat(newbootargs, img_data.kcmdline_extra); > > --- > base-commit: bc157bb6667ed97e33be8ce8436c28baa275b295 > change-id: 20250113-kcmdline-extra-fix-509331e4d7f3 > > Best regards, > -- > Mattijs Korpershoek > Reviewed-by: Nicolas Belin

[PATCH v2 3/3] boot: android: rework bootargs concatenation

2024-12-17 Thread Nicolas Belin
Rework the bootargs concatenation allocating more accurately the length that is needed. Do not forget an extra byte for the null termination byte as, in some cases, the allocation was 1 byte short. Fixes: 86f4695b ("image: Fix Android boot image support") Signed-off-by: Nicolas Belin

[PATCH v2 2/3] boot: android: free newbootargs when done

2024-12-17 Thread Nicolas Belin
Free newbootargs when the concatenation is done and bootargs env is set. Fixes: 86f4695b ("image: Fix Android boot image support") Reviewed-by: Mattijs Korpershoek Signed-off-by: Nicolas Belin --- boot/image-android.c | 1 + 1 file changed, 1 insertion(+) diff --git a/boot/image-a

[PATCH v2 1/3] boot: android: fix extra command line support

2024-12-17 Thread Nicolas Belin
Check that the value at the address kcmdline_extra is not 0 instead of checking the address value itself keeping it consistent with what is done for kcmdline. Fixes: b36b227b ("android: boot: support extra command line") Reviewed-by: Mattijs Korpershoek Signed-off-by: Nicolas Belin

[PATCH v2 0/3] boot: android: rework the bootargs concatenation

2024-12-17 Thread Nicolas Belin
amount of bytes for the concatenated string, not forgetting the byte for the NULL termination Signed-off-by: Nicolas Belin --- Changes in v2: - Improve the logic to avoid trailing whitespaces in the concatenated bootargs - Drop the last patch reordering the length calculation as it is already done

Re: [PATCH 3/4] boot: android: rework bootargs concatenation

2024-12-16 Thread Nicolas Belin
Le lun. 16 déc. 2024 à 09:41, Mattijs Korpershoek a écrit : > > Hi Nicolas, > > Thank you for the patch. > > On mer., déc. 11, 2024 at 14:53, Nicolas Belin wrote: > > > Rework the bootargs concatenation allocating more accurately > > the length that is needed. &g

[PATCH 4/4] boot: android: reorder the length calculation order

2024-12-11 Thread Nicolas Belin
Keep the same order (bootargs then kcmdline then kcmdline_extra) for both the length calculation and the string concatenation steps. Signed-off-by: Nicolas Belin --- boot/image-android.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/boot/image-android.c b/boot

[PATCH 3/4] boot: android: rework bootargs concatenation

2024-12-11 Thread Nicolas Belin
Rework the bootargs concatenation allocating more accurately the length that is needed. Do not forget an extra byte for the null termination byte as, in some cases, the allocation was 1 byte short. Fixes: 86f4695b ("image: Fix Android boot image support") Signed-off-by: Nicolas Belin

[PATCH 1/4] boot: android: fix extra command line support

2024-12-11 Thread Nicolas Belin
Check that the value at the address kcmdline_extra is not 0 instead of checking the address value itself keeping it consistent with what is done for kcmdline. Fixes: b36b227b ("android: boot: support extra command line") Signed-off-by: Nicolas Belin --- boot/image-android.c | 4 ++

[PATCH 2/4] boot: android: free newbootargs when done

2024-12-11 Thread Nicolas Belin
Free newbootargs when the concatenation is done and bootargs env is set. Fixes: 86f4695b ("image: Fix Android boot image support") Signed-off-by: Nicolas Belin --- boot/image-android.c | 1 + 1 file changed, 1 insertion(+) diff --git a/boot/image-android.c b/boot/image-andro

[PATCH 0/4] boot: android: rework the bootargs concatenation

2024-12-11 Thread Nicolas Belin
amount of bytes for the concatenated string, not forgetting the byte for the NULL termination Signed-off-by: Nicolas Belin --- Nicolas Belin (4): boot: android: fix extra command line support boot: android: free newbootargs when done boot: android: rework bootargs concatenation