On 16.06.23 12:20, Ahmad Fatoum wrote: > barebox may be built as x86 EFI payload with CONFIG_OFTREE=n. This > recently started to fail, because of newly added symbols that had > no stubs defined. The symptom is recent barebox builds (not using efi_defconfig) failing with: common/efi/payload/init.c:351:23: error: implicit declaration of function 'barebox_register_of' [-Werror=implicit-function-declaration] (Adding this, so search engines may pick this up). > > Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> > --- > include/of.h | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/include/of.h b/include/of.h > index 0037bad6c4d7..92a15f5c4a13 100644 > --- a/include/of.h > +++ b/include/of.h > @@ -6,6 +6,7 @@ > #include <errno.h> > #include <linux/types.h> > #include <linux/list.h> > +#include <linux/err.h> > #include <asm/byteorder.h> > > /* Default string compare functions */ > @@ -116,7 +117,6 @@ int of_diff(struct device_node *a, struct device_node *b, int indent); > int of_probe(void); > int of_parse_dtb(struct fdt_header *fdt); > struct device_node *of_unflatten_dtb(const void *fdt, int size); > -struct device_node *of_read_file(const char *filename); > struct device_node *of_unflatten_dtb_const(const void *infdt, int size); > > int of_fixup_reserved_memory(struct device_node *node, void *data); > @@ -124,6 +124,7 @@ int of_fixup_reserved_memory(struct device_node *node, void *data); > struct cdev; > > #ifdef CONFIG_OFTREE > +extern struct device_node *of_read_file(const char *filename); > extern struct of_reserve_map *of_get_reserve_map(void); > extern int of_bus_n_addr_cells(struct device_node *np); > extern int of_n_addr_cells(struct device_node *np); > @@ -361,6 +362,11 @@ static inline const char *of_node_full_name(const struct device_node *np) > } > > #else > +static inline struct device_node *of_read_file(const char *filename) > +{ > + return ERR_PTR(-ENOSYS); > +} > + > static inline struct of_reserve_map *of_get_reserve_map(void) > { > return NULL; > @@ -429,6 +435,11 @@ static inline int of_set_root_node(struct device_node *node) > return -ENOSYS; > } > > +static inline int barebox_register_of(struct device_node *root) > +{ > + return -ENOSYS; > +} > + > static inline struct device *of_platform_device_create(struct device_node *np, > struct device *parent) > { -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |