[PATCH v2 2/3] rockpi4: board: Add firmware image information needed for capsule updates
Sughosh Ganu
sughosh.ganu at linaro.org
Tue Sep 13 11:31:33 CEST 2022
hi Peter,
On Fri, 9 Sept 2022 at 18:12, Peter Robinson <pbrobinson at gmail.com> wrote:
>
> On Tue, Sep 6, 2022 at 7:59 AM Sughosh Ganu <sughosh.ganu at linaro.org> wrote:
> >
> > Add information that will be needed for enabling the UEFI capsule
> > update feature on the RockPi4 boards. With the feature enabled, it
> > would be possible to update the idbloader and u-boot.itb images on the
> > RockPi4B and RockPi4C variants.
> >
> > Signed-off-by: Sughosh Ganu <sughosh.ganu at linaro.org>
> > ---
> > Changes since V1:
> > * Split the board related declarations into a separate patch.
> >
> > board/rockchip/evb_rk3399/evb-rk3399.c | 14 ++++++++++++++
> > 1 file changed, 14 insertions(+)
> >
> > diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c
> > index abb76585cf..abb0580a8e 100644
> > --- a/board/rockchip/evb_rk3399/evb-rk3399.c
> > +++ b/board/rockchip/evb_rk3399/evb-rk3399.c
> > @@ -5,11 +5,25 @@
> >
> > #include <common.h>
> > #include <dm.h>
> > +#include <efi_loader.h>
> > #include <init.h>
> > #include <log.h>
> > #include <asm/arch-rockchip/periph.h>
> > +#include <linux/kernel.h>
> > #include <power/regulator.h>
> >
> > +#define ROCKPI4_UPDATABLE_IMAGES 2
>
> Any reason the above isn't defineable in the config file?
Do you mean through a Kconfig symbol? Currently, RockPi4 is the only
board for which such a macro is needed. The rest of the boards which
enable capsule updates define the fw_images array statically and the
number of images can be computed without a need for a config symbol.
So I did not want to add a Kconfig symbol when it won't be needed for
a majority of the boards.
-sughosh
>
> > +#if CONFIG_IS_ENABLED(EFI_HAVE_CAPSULE_SUPPORT)
> > +struct efi_fw_image fw_images[ROCKPI4_UPDATABLE_IMAGES] = {0};
> > +
> > +struct efi_capsule_update_info update_info = {
> > + .images = fw_images,
> > +};
> > +
> > +u8 num_image_type_guids = ARRAY_SIZE(fw_images);
> > +#endif
> > +
> > #ifndef CONFIG_SPL_BUILD
> > int board_early_init_f(void)
> > {
> > --
> > 2.34.1
> >
More information about the U-Boot
mailing list