> From: "Theo de Raadt" <[email protected]>
> Date: Tue, 01 Feb 2022 09:28:59 -0700
> 
> A few comments.
> 
> I think this approach is increasingly fragile, because a change for one
> architecture will affect others.
> 
> > -.elif ${MACHINE} == "armv7" || ${MACHINE} == "arm64"
> > +.elif ${MACHINE} == "armv7" || ${MACHINE} == "arm64" || ${MACHINE} == 
> > "riscv64"
> >  SRCS += armv7_installboot.c
> 
> How about copying armv7_installboot.c to a new file, and then it even becomes
> possible to perform this operation in the C code also:
> 
> >     echo bootriscv64.efi > /mnt/mnt/efi/boot/startup.nsh
> 
> As a bonus, it will umount the disk... which the current shell function 
> forgets
> to do.
> 
> I think a new file is better, if this addition is made, rather than hiding it
> behind a #ifdef inside a .if file

I disagree.  Apart from the name of the bootloader file, the code is
identical and this is by design!

Maybe we should rename the file to efi_installboot.c and/or rearrange
the code slightly such that is becomes more obvious that the name of
the file is indeed the only difference.

Reply via email to