回复: [PATCH] bootm: Pass SMP core ID and DTB address for ELF-formatted kernels

Tom Rini trini at konsulko.com
Thu May 29 17:49:23 CEST 2025


On Thu, May 29, 2025 at 09:33:56AM +0000, 牛 志宏 wrote:
> hi team,
> 
> The ITS file looks something like the following, and the kernel is not a standard Linux kernel:
> ```
> /dts-v1/;
> 
> / {
>     ...
>     images {
>         kernel {
>             type = "kernel";
>             arch = "riscv";
>             os = "elf";
>             ...
>         };
> 
>         fdt {
>             type = "flat_dt";
>             arch = "riscv";
>             ...
>         };
>     };
>     ...
> };
> ```
> 
> To handle this scenario, we need to:
> 
>   1.
> Access the values of the `type`, os, and arch fields stored in bootm_headers->image_info to determine the current context.
>   2.
> Access the boot_hart and ft_addr stored in the gd variable to update argc and argv.
> 
> Not sure whether accessing the bootm_headers and gd variables in lib/elf.c is allowed or safe.
So this is why I was asking if there's some more generalized
specification we can reference. Is the OS you're using something
pre-existing and so we need to do what it already expect from some other
loader? Or is it something you're also creating and if so, why not
follow the linux kernel convention for compatibility?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250529/b8976aa6/attachment.sig>


More information about the U-Boot mailing list