void modules_init( void ) { #ifdef CONFIG_CMDLINE cmdline_init(); #endif #ifdef CONFIG_DEBLOCKER deblocker_init(); #endif #ifdef CONFIG_DISK_LABEL disklabel_init(); #endif #ifdef CONFIG_HFSP hfsp_init(); #endif #ifdef CONFIG_HFS hfs_init(); #endif #ifdef CONFIG_EXT2 ext2_init(); #endif #ifdef CONFIG_ISO9660 iso9660_init(); #endif #ifdef CONFIG_GRUBFS grubfs_init(); #endif #ifdef CONFIG_MAC_PARTS macparts_init(); #endif #ifdef CONFIG_PC_PARTS pcparts_init(); #endif #ifdef CONFIG_SUN_PARTS sunparts_init(); #endif #ifdef CONFIG_LOADER_XCOFF xcoff_loader_init(); #endif #ifdef CONFIG_LOADER_ELF elf_loader_init(); #endif #ifdef CONFIG_LOADER_BOOTINFO bootinfo_loader_init(); #endif }
/** * remoteproc_loader_init * * Initializes the remoteproc loader. * * @param type - loader type * * @return - remoteproc_loader */ struct remoteproc_loader *remoteproc_loader_init(enum loader_type type) { struct remoteproc_loader *loader; /* Check for valid loader type. */ if (type >= LAST_LOADER) { return RPROC_NULL; } /* Allocate a loader handle. */ loader = env_allocate_memory(sizeof(struct remoteproc_loader)); if (!loader) { return RPROC_NULL; } /* Clear loader handle. */ env_memset(loader, 0, sizeof(struct remoteproc_loader)); /* Save loader type. */ loader->type = type; switch (type) { case ELF_LOADER: elf_loader_init(loader); break; default: /* Loader not supported. */ env_free_memory(loader); loader = RPROC_NULL; break; } return loader; }