Hi Bin,

On Thu, 13 Apr 2023 at 04:06, Bin Meng <bmeng...@gmail.com> wrote:
>
> On Mon, Apr 10, 2023 at 3:25 PM Rick Chen <rickche...@gmail.com> wrote:
> >
> > > From: Simon Glass <s...@chromium.org>
> > > Sent: Monday, April 03, 2023 4:28 AM
> > > To: U-Boot Mailing List <u-boot@lists.denx.de>
> > > Cc: Sean Anderson <sean...@gmail.com>; Bin Meng <bmeng...@gmail.com>; 
> > > Rick Jian-Zhi Chen(陳建志) <r...@andestech.com>; Leo Yu-Chi Liang(梁育齊) 
> > > <ycli...@andestech.com>; Simon Glass <s...@chromium.org>; Andre Przywara 
> > > <andre.przyw...@arm.com>; Marc Kleine-Budde <m...@pengutronix.de>; 
> > > SESA644425 <giojaherm...@gmail.com>; Samuel Holland 
> > > <sam...@sholland.org>; Steven Lawrance <steven.lawra...@softathome.com>
> > > Subject: [PATCH] riscv: Add a 64-bit image type
> > >
> > > At present it is not possible to know whether an image can be booted by a 
> > > 32- or 64-bit bootloader. This means that U-Boot may attempt to boot the 
> > > wrong image. This may cause a crash which might be hard to debug.
> > >
> > > Add a new property to make this explicit.
> > >
> > > The existing 'RISC-V' is now taken to mean 32-bit.
> > >
> > > Signed-off-by: Simon Glass <s...@chromium.org>
> > > ---
> > >
> > >  boot/image.c    | 3 ++-
> > >  include/image.h | 3 ++-
> > >  2 files changed, 4 insertions(+), 2 deletions(-)
> >
> > Reviewed-by: Rick Chen <r...@andestech.com>
>
> This might create compatibility issues if the shipped host tool
> (mkimage) does not match U-Boot version. Any idea how to avoid that?

If the images are created as 'riscv' then they will look like 32-bit
images to U-Boot, so likely won't be allowed on a 64-bit machine. I
don't think we can avoid that, but of course, the images could be
updated to use the new type. Note that the type is a string in the
image, so mkimage may in fact tolerate it. I haven't checked though.

Regards,
Simon

Reply via email to