Browse Source

external_toolchain: add find_sysroot_files convenience function

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Christopher Larson 9 years ago
parent
commit
62d08032c9
1 changed files with 6 additions and 0 deletions
  1. 6 0
      classes/external-toolchain.bbclass

+ 6 - 0
classes/external-toolchain.bbclass

@@ -201,6 +201,12 @@ def search_sysroots(path_entries, sysroots):
         else:
             yield path, None
 
+def find_sysroot_files(paths, d):
+    sysroots, mirrors = get_file_search_metadata(d)
+    expanded = expand_paths(paths, mirrors)
+    search_results = search_sysroots(expanded, sysroots)
+    return [v for k, v in search_results]
+
 # Change do_install's CWD to EXTERNAL_TOOLCHAIN for convenience
 do_install[dirs] = "${D} ${EXTERNAL_TOOLCHAIN}"