u-boot of_live_active函数
/** * of_live_active() - check if livetree is active * * @returns true if livetree is active, false it not */ static inline bool of_live_active(void) { return gd_of_root() != NULL; }
/* These macros help avoid #ifdefs in the code */
#if CONFIG_IS_ENABLED(OF_LIVE)
#define gd_of_root() gd->of_root
#define gd_of_root_ptr() &gd->of_root
#define gd_set_of_root(_root) gd->of_root = (_root)
#else
#define gd_of_root() NULL
#define gd_of_root_ptr() NULL
#define gd_set_of_root(_root)
#endif