[PATCH v2 03/16] image: Take entry point as an output of setup_booti

Yao Zi me at ziyao.cc
Thu Jul 2 22:39:44 CEST 2026


On Wed, Jul 01, 2026 at 11:39:40AM -0600, Tom Rini wrote:
> On Wed, Jul 01, 2026 at 11:17:55AM +0000, Yao Zi wrote:
> 
> > From: Jiaxun Yang <jiaxun.yang at flygoat.com>
> > 
> > For LoongArch the start of the image is not the entry
> > point to the image.
> > 
> > We refactor the code base to allow entry point to be
> > supplied by setup_booti.
> > 
> > Signed-off-by: Jiaxun Yang <jiaxun.yang at flygoat.com>
> > Signed-off-by: Yao Zi <me at ziyao.cc>
> > ---
> > 
> > Changed from v1
> > - Correct type of "entry" argument for RISC-V and sandbox
> 
> Can you please also provide a link to
> https://www.kernel.org/doc/html/latest/arch/loongarch/booting.html which
> probably should cover this, but I'm not entirely sure does?

It does in a non-obvious way, quoting part of the image header,

	u32     MZ_MAGIC                /* "MZ", MS-DOS header */
	u32     res0 = 0                /* Reserved */
	u64     kernel_entry            /* Kernel entry point */

comparing it to the RISC-V version[1],

	u32 code0;                /* Executable code */
	u32 code1;                /* Executable code */
	u64 text_offset;          /* Image load offset, little endian */
	u64 image_size;           /* Effective Image size, little endian */

The start of LoongArch image isn't marked as executable.

Additionally, should I include the URL of "latest" kernel documentation,
or using a link with explicit kernel version (e.g. [2]) to ensure the
content doesn't change or become 404 over time?

> -- 
> Tom

Regards,
Yao Zi

[1]: https://www.kernel.org/doc/html/v6.6/riscv/boot-image-header.html
[2]: https://www.kernel.org/doc/html/v7.1/arch/loongarch/booting.html


More information about the U-Boot mailing list