realtek: rt-loader: rename flash loading function

The loading function searches the image on flash (or its memory
copy). Rename it to make clearer what the function does. Adapt
comments accordingly.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21332
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Markus Stockhausen 2025-12-30 17:32:45 +01:00 committed by Robert Marko
parent 2e74ef5be1
commit 4491f1d233

View File

@ -144,10 +144,14 @@ void search_image(void **image_addr, int *image_size, void **load_addr)
}
}
void load_kernel(void *flash_start)
void load_uimage_from_flash(void *flash_start)
{
void *flash_addr = flash_start;
/*
* Loader has been started standalone. So no piggy backed kernel. Search
* flash for kernel uImage and copy it to memory before the loader.
*/
printf("Searching for uImage starting at 0x%08x ...\n", flash_addr);
search_image(&flash_addr, &_kernel_data_size, &_kernel_load_addr);
@ -186,11 +190,11 @@ void main(unsigned long reg_a0, unsigned long reg_a1,
}
/*
* Check if we have been started standalone. So no piggy backed kernel.
* Search flash for kernel uImage and copy it to memory before the loader.
* Usually the loader expects a piggy-backed lzma compressed kernel stream.
* Evaluate alternative configurations for kernel loading and decompression.
*/
if (flash_start)
load_kernel(flash_start);
load_uimage_from_flash(flash_start);
else if (kernel_addr)
_kernel_load_addr = kernel_addr;