On 23/08/2022 15.38, Simon Glass wrote: >> +/** >> + * board_rng_seed() - Provide a seed to be passed via /chosen/rng-seed >> + * >> + * This function is called if CONFIG_BOARD_RNG_SEED is set, and must >> + * be provided by the board. It should return, via @buf, some suitable >> + * seed value to pass to the kernel. >> + * >> + * @param buf A struct abuf for returning the seed and its size. >> + * @return 0 if ok, negative on error. >> + */ >> +int board_rng_seed(struct abuf *buf); > > Instead of yet another hook, can we use EVT_FT_FIXUP? An even better > option might be to use EVT_FT_FIXUP and then call a UCLASS_BOARD > method to obtain the information.
I didn't know there was anything called EVT_FT_FIXUP, and from grepping, it seems suffer the same problem as ft_board_setup() as I mention, namely running after the command line (aka /chosen/bootargs) has been set up. Also, I can't see how it can actually affect the blob being passed to the kernel, doesn't fixup.tree = oftree_default(); ret = event_notify(EVT_FT_FIXUP, &fixup, sizeof(fixup)); mean that fixup.tree points at U-Boot's control fdt rather than the blob that will be passed as the kernel's fdt? That seems wrong. Rasmus